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 issue with iframe + overflow:hidden #8310

Closed
paulrouget opened this issue Nov 3, 2015 · 0 comments
Closed

Stacking issue with iframe + overflow:hidden #8310

paulrouget opened this issue Nov 3, 2015 · 0 comments

Comments

@paulrouget
Copy link
Contributor

PR #8266 solves the stacking issue with overflow:hidden for regular elements, but with an iframe, stacking order is still wrong. The iframe element stacking level is ok (see its green border), but its content is not (blue square).

screen shot 2015-11-03 at 11 22 09

<style>

  .a {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 400px;
    height: 400px;
    overflow: hidden;
  }

  .b {
    position: absolute;
    left: 0;
    top: 0;
    width: 200px;
    height: 200px;
    background-color: red;
  }

  iframe {
    border: 10px solid green;
  }

</style>

<body>

  <div class="a">
    <iframe src="data:text/html,<style>body{background:blue}</style>"></iframe>
  </div>

  <div class="b">

  </div>
</body>
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

2 participants