Repository navigation
Mix stacking contexts into the positioned content list - #8266
Conversation
|
@pcwalton r? This is the main prerequisite for eliminating |
88b6ca2 to
5c63287
Compare
5c63287 to
90a16a4
Compare
There was a problem hiding this comment.
Maybe just call this flatten? That's the terminology WR uses for a similar operation.
90a16a4 to
a2acb2a
Compare
|
@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? |
Adding overflow:hidden to an absolute positioned div will change it's stacking order. referencing servo#8122
|
Not sure if you want to address this issue in this PR or not, but for the record: #8310 |
a2acb2a to
5b3e953
Compare
|
@paulrouget Thanks for finding that issue! I've fixed it in the latest version. I had omitted some code that was removed. |
|
@bors-servo: r+ |
|
📌 Commit 5b3e953 has been approved by |
|
@bors-servo: r- @mrobinson wants to add a test |
|
@bors-servo: r+ |
|
📌 Commit 5b3e953 has been approved by |
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 -->
|
💔 Test failed - linux-rel |
|
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.
5b3e953 to
c1a38e2
Compare
|
@bors-servo: r=pcwalton I confirmed with @pcwalton via IRC that he was okay with trying to land this again. |
|
📌 Commit c1a38e2 has been approved by |
|
⌛ Testing commit c1a38e2 with merge 86e3add... |
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 -->
|
☀️ Test successful - android, gonk, linux-dev, linux-rel, mac-dev-ref-unit, mac-rel-css, mac-rel-wpt |
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.