Skip to content

Absolutely positioned child of positioned fragment positioned incorrectly #16462

Closed

Description

@mrobinson

Given this test case:

<!DOCTYPE html>
<html>
    <head>
        <style>
            .test { float: left; margin-right: 25px; }
            .box { height: 50px; width: 50px; }
            .grayer { background: rgb(80, 80, 80); }
            .grayest { background: rgb(0, 0, 0); }
            .overflowing-absolute-child {
                position: absolute;
                left: 10px;
                top: 10px;
                width: 200px;
                height: 200px;
            }
        </style>
    </head>
    <body>
        <div class="test grayest box" style="overflow: scroll">
            <span style="position: relative;">
                <div class="overflowing-absolute-child grayer"></div>
            </span>
        </div>

    </body>
</html>

I see this in Servo after some related clipping fixes:
screenshot from 2017-04-14 19-56-32

In Firefox:
screenshot from 2017-04-14 19-57-05

In Chrome:
screenshot from 2017-04-14 19-58-14

Activity

  1. mrobinson commented on Apr 14, 2017

    @mrobinson
    MemberAuthor

    Perhaps related to #8602

  2. added
    C-has-manual-testcase
    on Apr 14, 2017
  3. lumiscosity commented on Jul 26, 2025

    @lumiscosity
    Member

    Still broken, but now it matches Firefox's old behaviour, which Firefox has since fixed. Tested on Arch Linux x86_64, servo built against commit id 9d29017, compared against Firefox 141.0, Epiphany 48.5 and Chromium 138.0.7204.168 (ordered left to right).

    Image
  4. lumiscosity commented on May 31, 2026

    @lumiscosity
    Member

    Appears to have been fixed. Tested on Arch Linux x86_64, Servo built against commit 073180a.

    Image
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-layout/blockC-has-manual-testcase

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions