Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upStacking contexts should more often be drawn in tree order #7983
Comments
|
I agree. |
mrobinson
added a commit
to mrobinson/servo
that referenced
this issue
Nov 2, 2015
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.
mrobinson
added a commit
to mrobinson/servo
that referenced
this issue
Nov 2, 2015
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.
mrobinson
added a commit
to mrobinson/servo
that referenced
this issue
Nov 2, 2015
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.
mrobinson
added a commit
to mrobinson/servo
that referenced
this issue
Nov 3, 2015
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
According to CSS 2.1 Appendix E: Elaborate description of Stacking Contexts E.2.8, stacking contexts with a z-index of 0 or auto and positioned element should be drawn in tree order. Currently these two types of descendents are split into two display list sections
positioned_contentandchildren.In order to preserve tree order, at least some of the stacking contexts will need to be in the same list as the positioned content or carry a tree order number.My proposal is that
positioned_contentandchildrenbe replaced withpositioned_content_and_stacking_contextsthat holds an enums carrying either a DisplayItem or a StackingContext.cc @pcwalton