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

[FragmentItem] Clear inline fragment index for positioned objects #24416

Merged
merged 1 commit into from Jul 2, 2020

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Jul 1, 2020

When once laid out floating object is changed to a positioned
object, it may have |FirstInlineFragmentItemIndex| set, but
positioned objects should not have the index because they do
not produce |NGFragmentIem|. This patch makes sure the index
is cleared for positioned objects.

Also this patch turns DCHECK in |NGInlineCursor::MoveTo| to
NOTREACHED + return to avoid such case could result in crash.

This is a regression in r784297 <crrev.com/c/2275373>, which
started to index floating objects.

Bug: 1101277
Change-Id: I21a75440c3aa77a8d66b1e002d05ff2b252e6b94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2275820
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#784685}

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.

The review process for this patch is being conducted in the Chromium project.

When once laid out floating object is changed to a positioned
object, it may have |FirstInlineFragmentItemIndex| set, but
positioned objects should not have the index because they do
not produce |NGFragmentIem|. This patch makes sure the index
is cleared for positioned objects.

Also this patch turns DCHECK in |NGInlineCursor::MoveTo| to
NOTREACHED + return to avoid such case could result in crash.

This is a regression in r784297 <crrev.com/c/2275373>, which
started to index floating objects.

Bug: 1101277
Change-Id: I21a75440c3aa77a8d66b1e002d05ff2b252e6b94
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2275820
Reviewed-by: Kent Tamura <tkent@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#784685}
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