Skip to content

Have ContentBox(es)Queries consult the flow tree - #3857

Closed
mrobinson wants to merge 1 commit into
servo:masterfrom
mrobinson:queries
Closed

mrobinson wants to merge 1 commit into
servo:masterfrom
mrobinson:queries

Conversation

@mrobinson

Copy link
Copy Markdown
Member

Instead of looking at the display tree, have ContentBox(es)Query consult
the flow tree. This allow optimizing away parts of the display tree
later. To do this we need to be more careful about how we send reflow
requests, only querying the flow tree when possible.

Fixes #3790.

@hoppipolla-critic-bot

Copy link
Copy Markdown

Critic review: https://critic.hoppipolla.co.uk/r/3033

This is an external review system which you may optionally use for the code review of your pull request.

In order to help critic track your changes, please do not make in-place history rewrites (e.g. via git rebase -i or git commit --amend) when updating this pull request.

Comment thread components/layout/layout_task.rs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a little strange that we have content_box_request, content_boxes_request, and so forth, instead of an enum specifying which one script wants. Does it have to be done this way?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not at all. I reimplemented this using an enum and everything is much cleaner. Thanks for the suggestion!

@pcwalton

Copy link
Copy Markdown
Contributor

Can we get rid of PseudoDisplayItem now as well?

@mrobinson

Copy link
Copy Markdown
Member Author

I don't think we can eliminate it yet. Hit box and mouse over testing is still done using the display list and I think a flow tree implementation is more difficult, because of z-index considerations. The paint order is encoded more readily in the display list than the flow tree, though admittedly I don't understand the mechanism ATM.

@pcwalton

Copy link
Copy Markdown
Contributor

That shouldn't matter, because you can't mouse-over an element that has no display items. (Gecko does mouseover and hit box testing using the display list and has no PseudoDisplayItem.)

@mrobinson

Copy link
Copy Markdown
Member Author

Oh, in that case, I can try removing it in a followup commit. It will be nice to remove that from the display list.

@pcwalton

Copy link
Copy Markdown
Contributor

Sounds good for a followup. (BTW, on the maze solver pseudo-DL items outnumber real DL items 2-1—that's why I'm keen to remove it) :)

Instead of looking at the display tree, have ContentBox(es)Query consult
the flow tree. This allow optimizing away parts of the display tree
later. To do this we need to be more careful about how we send reflow
requests, only querying the flow tree when possible.

Fixes servo#3790.
bors-servo pushed a commit that referenced this pull request Nov 3, 2014
Instead of looking at the display tree, have ContentBox(es)Query consult
the flow tree. This allow optimizing away parts of the display tree
later. To do this we need to be more careful about how we send reflow
requests, only querying the flow tree when possible.

Fixes #3790.
@bors-servo bors-servo closed this Nov 3, 2014
@mrobinson
mrobinson deleted the queries branch November 17, 2014 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make layout queries walk the cached flow tree instead of the display list

4 participants