Skip to content
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

Stacking contexts should more often be drawn in tree order #7983

Closed
mrobinson opened this issue Oct 12, 2015 · 1 comment
Closed

Stacking contexts should more often be drawn in tree order #7983

mrobinson opened this issue Oct 12, 2015 · 1 comment

Comments

@mrobinson
Copy link
Member

@mrobinson mrobinson commented Oct 12, 2015

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_content and children. 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_content and children be replaced with positioned_content_and_stacking_contexts that holds an enums carrying either a DisplayItem or a StackingContext.

cc @pcwalton

@pcwalton
Copy link
Contributor

@pcwalton pcwalton commented Oct 12, 2015

I agree.

@mrobinson mrobinson changed the title Positioned content and some stacking contexts should be drawn in tree order Stacking contexts should more often be drawn in tree order Oct 12, 2015
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.
@mrobinson mrobinson closed this in c1a38e2 Nov 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.