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 context issue with CSS transforms #7779

Closed
paulrouget opened this issue Sep 29, 2015 · 5 comments
Closed

Stacking context issue with CSS transforms #7779

paulrouget opened this issue Sep 29, 2015 · 5 comments
Assignees

Comments

@paulrouget
Copy link
Contributor

This code:

<style>
  body {
    margin: 0;
  }

  div {
    position: absolute;
    width: 100px;
    height: 100px;
  }

  #a {
    top: 40px;
    background: red;
    transform: translateX(1px);
  }

  #b {
    top: 50px;
    left: 10px;
    background: blue;
  }
</style>

<body>
  <div id='a'></div>
  <div id='b'></div>
</body>

Servo vs. Firefox:

screen shot 2015-09-29 at 09 56 57

@paulrouget
Copy link
Contributor Author

@mrobinson have you made any progress? If you can point me to the right direction, maybe I could take a look.

@mrobinson
Copy link
Member

@paulrouget Yes, actually. This issue is the same as #7983. I have a patch that fixes it, but the PR is waiting on #7950 to land. Hopefully today or tomorrow I'll have the PR ready.

@metajack
Copy link
Contributor

metajack commented Nov 2, 2015

#7950 has landed. What's the status of #7983 @mrobinson ?

@metajack
Copy link
Contributor

metajack commented Nov 2, 2015

Note: this is now blocking @paulrouget on browser.html work.

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
Copy link
Member

The fix for this one is at #8266. I just double-checked that it fixes the issue @paulrouget filed.

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
Projects
None yet
Development

No branches or pull requests

4 participants