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

[LayoutNG] Allow floats to be placed "before" other floats of the same type. #19235

Merged
merged 1 commit into from
Sep 24, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Sep 23, 2019

Floats have some "interesting" behaviour which allows a left (or right)
float to be placed left (or right) of a previous float. This typically
isn't allowed.

This occurs when a float has "negative size" e.g. it has a large
negative margin, which is larger than its width. E.g.
<div style="width: 50px; margin-left: -150px; float: left;"></div>

In such cases the float doesn't respect the normal rules, and is
placed in a typically invalid area.

This patch also changes "const LogicalSize& minimum_size" to
"const LayoutUnit minimum_inline_size" for "FindLayoutOpportunity".

Bug: 1005437
Change-Id: I4c91a53911b2651346487f71c4b31ec6e0240202
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819356
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699390}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

…e type.

Floats have some "interesting" behaviour which allows a left (or right)
float to be placed left (or right) of a previous float. This typically
isn't allowed.

This occurs when a float has "negative size" e.g. it has a large
negative margin, which is larger than its width. E.g.
<div style="width: 50px; margin-left: -150px; float: left;"></div>

In such cases the float doesn't respect the normal rules, and is
placed in a typically invalid area.

This patch also changes "const LogicalSize& minimum_size" to
"const LayoutUnit minimum_inline_size" for "FindLayoutOpportunity".

Bug: 1005437
Change-Id: I4c91a53911b2651346487f71c4b31ec6e0240202
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1819356
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699390}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants