-
-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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
@@ -206,23 +204,31 @@ impl DisplayList { | |||
/// inefficient and should only be used for debugging. | |||
pub fn all_display_items(&self) -> Vec<DisplayItem> { | |||
let mut result = Vec::new(); | |||
fn add_all_display_items_for_item(result: &mut Vec<DisplayItem>, item: &DisplayItem) { |
There was a problem hiding this comment.
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.
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 |
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.