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] Make sure |CreateLine| is called #16865

Merged
merged 1 commit into from May 16, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented May 16, 2019

|NGLineLayoutOpportunity| stores |line_left| and |line_right|
values, and compute inline size by diffing the two.

Because of this, when |line_left + inline_size| exceeds
|LayoutUnit::Max()| and clamped, |AvailableFloatInlineSize()|
will not match to the originally given size.

This causes NGInlineLayoutAlgorithm to consider there are no
opportunities that can fit the line, and skips the call to
|CreateLine()|. This causes invalid baseline computation,
|AssertNotLaidOut|, paint invalidation failures, and some
other problems.

Due to its impact, this patch adds a CHECK in addition to the
fix of this case.

Change-Id: I571a48a62c2327c8f49feb30a252ac4c05a88f57
Bug: 963794, 963060
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614004
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660483}

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.

|NGLineLayoutOpportunity| stores |line_left| and |line_right|
values, and compute inline size by diffing the two.

Because of this, when |line_left + inline_size| exceeds
|LayoutUnit::Max()| and clamped, |AvailableFloatInlineSize()|
will not match to the originally given size.

This causes NGInlineLayoutAlgorithm to consider there are no
opportunities that can fit the line, and skips the call to
|CreateLine()|. This causes invalid baseline computation,
|AssertNotLaidOut|, paint invalidation failures, and some
other problems.

Due to its impact, this patch adds a CHECK in addition to the
fix of this case.

Change-Id: I571a48a62c2327c8f49feb30a252ac4c05a88f57
Bug: 963794, 963060
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614004
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Morten Stenshorne <mstensho@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660483}
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.

None yet

3 participants