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

Absolute elements in the dom tree break InlineFlow collapsing. #2474

Open
glennw opened this issue May 22, 2014 · 0 comments
Open

Absolute elements in the dom tree break InlineFlow collapsing. #2474

glennw opened this issue May 22, 2014 · 0 comments

Comments

@glennw
Copy link
Member

@glennw glennw commented May 22, 2014

Consider the following html:

<!DOCTYPE html>
<html>
    <head>
        <style type="text/css">
            body {
                margin: 0;
            }
            P.fls {
                background-color: yellow;
                width: 25%;
                position: absolute;
                font-size: 64px;
                margin: 0;
            }
            DIV {
                font-size: 32px;
                clear: both;
                background-color: green;
                height: 400px;
            }
        </style>
    </head>
    <body>
        <div class="ch"><span>a b c d e f g h i j k l m n o p q r s t u v q x y z a b c d e f g h i j k l m n o p q r s t u v q x y z</span><p class="fls">F</p><span>A B C D E F G H I J K L M N O P Q R S T U V W X Y Z</span></div>
    </body>
</html>

The flow tree is:

+ RootFlow: (GenericBox  )
| + BlockFlow: (GenericBox  )
| | + BlockFlow: (GenericBox  )
| | | + InlineFlow: (ScannedTextBox  )
| | | + BlockFlow: (GenericBox  )
| | | | + InlineFlow: (ScannedTextBox  )
| | | + InlineFlow: (ScannedTextBox  )

In this case, the block is absolutely positioned, so it is taken out of the flow. In FF, the two spans are then collapsed into a single inline flow, and the lower and upper case characters are joined together. However, in Servo they are not collapsed.

@jdm jdm added the A-layout/inline label May 22, 2014
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.