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] Only reset a legacy cached result if OOF-positioned. #16859

Merged
merged 1 commit into from May 15, 2019

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

chromium-wpt-export-bot commented May 15, 2019

We had an issue with our simplified layout algorithm + relayout boundary
roots.

For this to trigger we needed a (legacy) layout object to be marked for
simplified layout which was also a relayout boundary root.

During LocalFrameView::PerformLayout, LayoutBox::UpdateLayout would run
on the legacy LayoutBox, and during LayoutBox::UpdateAfterLayout, this
would clear the LayoutBox::cached_layout_result_.

During another relayout boundary layout, we'd trigger simplified layout
for an NG node. This expects that there is always a cached layout
result associated with a box.
However this now wasn't the case, as the child had previously cleared
it, within LayoutBox::UpdateAfterLayout.

The guard inside LayoutBox::UpdateAfterLayout was designed to protect
against OOF-positioned nodes changing their layout parent, this
modifies that check do only clear the layout result of OOF-positioned
legacy layout objects.

Bug: 963387, 963433, 963620
Change-Id: Ice1202bdb939689e26e24a8690a52e7d7e82ecbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614082
Reviewed-by: Aleks Totic <atotic@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660166}

Copy link
Collaborator

wpt-pr-bot left a comment

Already reviewed downstream.

We had an issue with our simplified layout algorithm + relayout boundary
roots.

For this to trigger we needed a (legacy) layout object to be marked for
simplified layout which was also a relayout boundary root.

During LocalFrameView::PerformLayout, LayoutBox::UpdateLayout would run
on the legacy LayoutBox, and during LayoutBox::UpdateAfterLayout, this
would clear the LayoutBox::cached_layout_result_.

During another relayout boundary layout, we'd trigger simplified layout
for an NG node. This expects that there is always a cached layout
result associated with a box.
However this now wasn't the case, as the child had previously cleared
it, within LayoutBox::UpdateAfterLayout.

The guard inside LayoutBox::UpdateAfterLayout was designed to protect
against OOF-positioned nodes changing their layout parent, this
modifies that check do only clear the layout result of OOF-positioned
legacy layout objects.

Bug: 	963387, 963433, 963620
Change-Id: Ice1202bdb939689e26e24a8690a52e7d7e82ecbc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1614082
Reviewed-by: Aleks Totic <atotic@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#660166}
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1614082 branch from 8b61964 to 48904a2 May 15, 2019
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit c40cd30 into master May 15, 2019
15 checks passed
15 checks passed
manifest-build-and-tag manifest-build-and-tag
Details
website-build-and-publish website-build-and-publish
Details
Azure Pipelines Build #20190515.164 succeeded
Details
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
Azure Pipelines (affected tests (Safari Technology Preview)) affected tests (Safari Technology Preview) succeeded
Details
Azure Pipelines (affected tests without changes (Safari Technology Preview)) affected tests without changes (Safari Technology Preview) succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests) wpt.fyi hook: safari-preview-affected-tests succeeded
Details
Azure Pipelines (wpt.fyi hook: safari-preview-affected-tests-without-changes) wpt.fyi hook: safari-preview-affected-tests-without-changes succeeded
Details
Taskcluster (pull_request) TaskGroup: success
Details
staging.wpt.fyi - chrome[experimental] Chrome results
Details
staging.wpt.fyi - firefox[experimental] Firefox results
Details
staging.wpt.fyi - safari[experimental] Safari results
Details
wpt.fyi - chrome[experimental] Chrome results
Details
wpt.fyi - firefox[experimental] Firefox results
Details
wpt.fyi - safari[experimental] Safari results
Details
@chromium-wpt-export-bot chromium-wpt-export-bot deleted the chromium-export-cl-1614082 branch May 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.