Skip to content

Mix stacking contexts into the positioned content list - #8266

Merged
bors-servo merged 1 commit into
servo:masterfrom
mrobinson:stacking-context-mix
Nov 4, 2015
Merged

bors-servo merged 1 commit into
servo:masterfrom
mrobinson:stacking-context-mix

Conversation

@mrobinson

Copy link
Copy Markdown
Member

Sometimes positioned content needs to be layered on top of stacking
contexts. The layer synthesis code can do this, but the current design
prevents it because stacking contexts are stored in a separate struct
member. In order to preserve tree order, mix stacking contexts into the
positioned content list, by adding a new StackingContextClass
DisplayItem. Such items do not have a base DisplayItem.

In some ways this simplifies the code, because we no longer have to
have a separate code path in the StackingContextLayerCreator.

Review on Reviewable

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Oct 30, 2015
@mrobinson

Copy link
Copy Markdown
Member Author

@pcwalton r?

This is the main prerequisite for eliminating LAYERS_NEEDED_FOR_DESCENDANTS.

Comment thread components/gfx/display_list/mod.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.

Maybe just call this flatten? That's the terminology WR uses for a similar operation.

@mrobinson
mrobinson force-pushed the stacking-context-mix branch from 90a16a4 to a2acb2a Compare November 2, 2015 22:01
@mrobinson

Copy link
Copy Markdown
Member Author

@pcwalton Thanks, as always, for the review comments. I think I've made all the changes you suggested in the latest version of the branch. Do you see any other issues here?

gilles-leblanc referenced this pull request in gilles-leblanc/servo Nov 3, 2015
Adding overflow:hidden to an absolute positioned div will change it's
stacking order.

referencing servo#8122
@paulrouget

Copy link
Copy Markdown
Contributor

Not sure if you want to address this issue in this PR or not, but for the record: #8310

@mrobinson
mrobinson force-pushed the stacking-context-mix branch from a2acb2a to 5b3e953 Compare November 3, 2015 18:57
@mrobinson

Copy link
Copy Markdown
Member Author

@paulrouget Thanks for finding that issue! I've fixed it in the latest version. I had omitted some code that was removed.

@pcwalton

pcwalton commented Nov 3, 2015

Copy link
Copy Markdown
Contributor

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 5b3e953 has been approved by pcwalton

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 3, 2015
@pcwalton

pcwalton commented Nov 3, 2015

Copy link
Copy Markdown
Contributor

@bors-servo: r-

@mrobinson wants to add a test

@pcwalton

pcwalton commented Nov 3, 2015

Copy link
Copy Markdown
Contributor

@bors-servo: r+

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 5b3e953 has been approved by pcwalton

@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 5b3e953 with merge 61ef78e...

bors-servo pushed a commit that referenced this pull request Nov 3, 2015
Mix stacking contexts into the positioned content list

Sometimes positioned content needs to be layered on top of stacking
contexts. The layer synthesis code can do this, but the current design
prevents it because stacking contexts are stored in a separate struct
member. In order to preserve tree order, mix stacking contexts into the
positioned content list, by adding a new StackingContextClass
DisplayItem. Such items do not have a base DisplayItem.

In some ways this simplifies the code, because we no longer have to
have a separate code path in the StackingContextLayerCreator.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8266)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

💔 Test failed - linux-rel

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Nov 4, 2015
@mrobinson

Copy link
Copy Markdown
Member Author

Looks like some tests are now passing with this change. I'll update the branch and reupload.

Sometimes positioned content needs to be layered on top of stacking
contexts. The layer synthesis code can do this, but the current design
prevents it because stacking contexts are stored in a separate struct
member. In order to preserve tree order, mix stacking contexts into the
positioned content list, by adding a new StackingContextClass
DisplayItem. Such items do not have a base DisplayItem.

In some ways this simplifies the code, because we no longer have to
have a separate code path in the StackingContextLayerCreator.

Fixes servo#7779.
Fixes servo#7983.
Fixes servo#8122.
Fixes servo#8310.
@mrobinson
mrobinson force-pushed the stacking-context-mix branch from 5b3e953 to c1a38e2 Compare November 4, 2015 01:48
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Nov 4, 2015
@mrobinson

Copy link
Copy Markdown
Member Author

@bors-servo: r=pcwalton

I confirmed with @pcwalton via IRC that he was okay with trying to land this again.

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit c1a38e2 has been approved by pcwalton

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Nov 4, 2015
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit c1a38e2 with merge 86e3add...

bors-servo pushed a commit that referenced this pull request Nov 4, 2015
Mix stacking contexts into the positioned content list

Sometimes positioned content needs to be layered on top of stacking
contexts. The layer synthesis code can do this, but the current design
prevents it because stacking contexts are stored in a separate struct
member. In order to preserve tree order, mix stacking contexts into the
positioned content list, by adding a new StackingContextClass
DisplayItem. Such items do not have a base DisplayItem.

In some ways this simplifies the code, because we no longer have to
have a separate code path in the StackingContextLayerCreator.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8266)
<!-- Reviewable:end -->
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt

@bors-servo
bors-servo merged commit c1a38e2 into servo:master Nov 4, 2015
@mrobinson
mrobinson deleted the stacking-context-mix branch November 5, 2015 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants