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

Custom layout needs to force NG layout for the subtree. #25575

Merged
merged 1 commit into from Sep 18, 2020

Conversation

@chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Sep 16, 2020

Just like for MathML, custom layout (display:layout()) has no legacy
layout engine implementation, so we need to force NG layout, even when
contained by something that requires legacy fallback.

Rewrote the mechanism somewhat; calling ComputedStyle() on an element
isn't the right thing to do within Element::ShouldForceLegacyLayout()
(it called ShouldForceNGLayout(), which did that), since
ShouldForceLegacyLayout() is involved when style is about to change, or
when it has just been changed. ShouldForceLegacyLayout() will now
return true even if the display type requires LayoutNG. Cope with this
by just not setting ForceLegacyLayout on any NG LayoutObjects at all.
And remove a couple of DCHECKs in NG LayoutObject classes that expected
legacy fallback not to be in use on the Element side.
This is rather convoluted. :(

Also update HTMLSlotElement::AttachLayoutTree(), which recently got
modified to support legacy fallback properly.

This fixes one of three DCHECK failures that occur in the fuzzer test
in bug 1127112.

Bug: 1127112
Change-Id: I16b5f5297cb04192056f6c5137c2cefa1bc33298
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2414289
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Frédéric Wang <fwang@igalia.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808311}

Copy link
Collaborator

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

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

@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2414289 branch 3 times, most recently from 62a3f1f to 31c1b63 Sep 17, 2020
Just like for MathML, custom layout (display:layout()) has no legacy
layout engine implementation, so we need to force NG layout, even when
contained by something that requires legacy fallback.

Rewrote the mechanism somewhat; calling ComputedStyle() on an element
isn't the right thing to do within Element::ShouldForceLegacyLayout()
(it called ShouldForceNGLayout(), which did that), since
ShouldForceLegacyLayout() is involved when style is about to change, or
when it has just been changed. ShouldForceLegacyLayout() will now
return true even if the display type requires LayoutNG. Cope with this
by just not setting ForceLegacyLayout on any NG LayoutObjects at all.
And remove a couple of DCHECKs in NG LayoutObject classes that expected
legacy fallback not to be in use on the Element side.
This is rather convoluted. :(

Also update HTMLSlotElement::AttachLayoutTree(), which recently got
modified to support legacy fallback properly.

This fixes one of three DCHECK failures that occur in the fuzzer test
in bug 1127112.

Bug: 1127112
Change-Id: I16b5f5297cb04192056f6c5137c2cefa1bc33298
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2414289
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Frédéric Wang <fwang@igalia.com>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Morten Stenshorne <mstensho@chromium.org>
Cr-Commit-Position: refs/heads/master@{#808311}
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-2414289 branch from 31c1b63 to 246027a Sep 18, 2020
@chromium-wpt-export-bot chromium-wpt-export-bot merged commit 4811c33 into master Sep 18, 2020
19 checks passed
19 checks passed
Azure Pipelines Build #20200918.45 succeeded
Details
Azure Pipelines (./wpt test-jobs) ./wpt test-jobs succeeded
Details
Azure Pipelines (affected tests without changes: Safari Technology Preview) affected tests without changes: Safari Technology Preview succeeded
Details
Azure Pipelines (affected tests: Safari Technology Preview) affected tests: 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
download-firefox-nightly Community-TC (pull_request)
Details
lint Community-TC (pull_request)
Details
sink-task Community-TC (pull_request)
Details
wpt-chrome-dev-results Community-TC (pull_request)
Details
wpt-chrome-dev-results-without-changes Community-TC (pull_request)
Details
wpt-chrome-dev-stability Community-TC (pull_request)
Details
wpt-decision-task Community-TC (pull_request)
Details
wpt-firefox-nightly-results Community-TC (pull_request)
Details
wpt-firefox-nightly-results-without-changes Community-TC (pull_request)
Details
wpt-firefox-nightly-stability Community-TC (pull_request)
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-2414289 branch Sep 18, 2020
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.