Skip to content

overflow:hidden changes the stacking order #8122

Closed

Description

@paulrouget
<style>

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

  #a {
    background: red;
    position: absolute;
    top: 10px;
    left: 10px;
    overflow: hidden;
  }

  #b {
    background: blue;
    position: absolute;
    top: 20px;
    left: 20px;
  }
</style>

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

screen shot 2015-10-21 at 11 58 11

Activity

  1. gilles-leblanc commented on Oct 23, 2015

    @gilles-leblanc
    Contributor

    If this one is free for the taking I would like to have a look into it.

  2. jdm commented on Oct 23, 2015

    @jdm
    Member

    Sure looks like it!

  3. added
    C-assigned
    on Oct 23, 2015
  4. gilles-leblanc commented on Oct 30, 2015

    @gilles-leblanc
    Contributor

    For the moment I'm stuck with this one.

    I have established that it works with overflow auto, scroll and visible.

    I have looked in components/gfx/display_list.

    There's two files in this directory. One of them is the optimizer.

    I have taken out the optimizer (I've had it return the same display_list it was given in input as it's output) and the problem is still present, so that rules out an optimizer bug.

    I then looked at the mod.rs file. I then also looked at components/layout/[block, display_list_builder].rs. I don't understand everything going on in all those files yet though. Display lists, fragments, stacking order and even block elements are all pretty new to me so that makes a lot to absorb.

    I've search components/gfx and components/layout for mentions of the terms overflow, hidden and absolute positioning and looked at that code and made some changes to see if they had any impact.

    Do you have any suggestions as to where I could look next or any ideas?

    I'm hoping for some angle on how to tackle this next.

  5. eefriedman commented on Oct 30, 2015

    @eefriedman
    Contributor
  6. added
    C-looking for assistance
    on Oct 31, 2015
  7. metajack commented on Nov 2, 2015

    @metajack
    Collaborator

    cc @pcwalton @glennw

    This is blocking browser.html work.

  8. mrobinson commented on Nov 2, 2015

    @mrobinson
    Member

    I believe this is also fixed by #8266.

  9. added 2 commits that reference this issue on Nov 2, 2015
    90a16a4
    a2acb2a
  10. gilles-leblanc commented on Nov 3, 2015

    @gilles-leblanc
    Contributor

    @mrobinson I have made a wpt test with the case written by @paulrouget which I have committed to a branch (gilles-leblanc@b2ba72a). I then pulled and merged your branch master...mrobinson:stacking-context-mix and tested it but I'm still getting a failure on the test case.

  11. mrobinson commented on Nov 3, 2015

    @mrobinson
    Member

    @gilles-leblanc I ran your test locally on top of master...mrobinson:stacking-context-mix and it seems to pass for me. Can you double-check by pulling the branch at https://github.com/mrobinson/servo/tree/gilles-test and testing again? If it continues to fail for you, would you post or describe the image diff from the test results analyzer at http://hoppipolla.co.uk/410/reftest-analyser-structured.xhtml?

  12. gilles-leblanc commented on Nov 3, 2015

    @gilles-leblanc
    Contributor

    @mrobinson I pulled the branch and it's still failing but it's probably something on my side, some sort of mistake I did. I've created a gist with the log file: https://gist.github.com/gilles-leblanc/8e6467040d342272a996 which you can paste in the reftest analyser.

  13. mrobinson commented on Nov 3, 2015

    @mrobinson
    Member

    @gilles-leblanc Tests that were added for issues in previous PRs that I have landed seem to be failing as well. Can you double-check that you are not running the tests with a stale build? One thing that I sometimes do is to only compile a debug build and accidentally run the tests with --release flag or the opposite.

  14. gilles-leblanc commented on Nov 3, 2015

    @gilles-leblanc
    Contributor

    @mrobinson Oh my bad I thought that the tests were ran with the last build, in my case a release build so I didn't supply the --release switch for the test command.

    Sorry!

    Everything now works.

  15. removed
    C-looking for assistance
    on Nov 3, 2015
  16. added 2 commits that reference this issue on Nov 3, 2015
    5b3e953
    c1a38e2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-gfx/displaylistC-assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions