Summary: | [LFC] Do not create a FormattingContext unless there's content to layout. | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | zalan <zalan> | ||||||||
Component: | Layout and Rendering | Assignee: | zalan <zalan> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bfulgham, commit-queue, koivisto, simon.fraser, webkit-bug-importer, zalan | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
zalan
2020-01-21 21:12:56 PST
Created attachment 388396 [details]
Patch
Comment on attachment 388396 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=388396&action=review > Source/WebCore/layout/FormattingContext.cpp:171 > auto formattingContext = LayoutContext::createFormattingContext(outOfFlowRootContainer, layoutState()); > - formattingContext->layoutInFlowContent(invalidationState, Geometry::horizontalConstraintsForInFlow(outOfFlowRootDisplayBox), Geometry::verticalConstraintsForInFlow(outOfFlowRootDisplayBox)); > + if (outOfFlowRootContainer.hasInFlowOrFloatingChild()) > + formattingContext->layoutInFlowContent(invalidationState, Geometry::horizontalConstraintsForInFlow(outOfFlowRootDisplayBox), Geometry::verticalConstraintsForInFlow(outOfFlowRootDisplayBox)); You are still creating the formatting context. Comment on attachment 388396 [details]
Patch
Oops
Created attachment 388421 [details]
Patch
Comment on attachment 388421 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=388421&action=review > Source/WebCore/ChangeLog:9 > + We still construct "no-op" FormattingContexts through the computeIntrinsicWidth* codepath. But why? Created attachment 388422 [details]
Patch
(In reply to Antti Koivisto from comment #6) > Comment on attachment 388421 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=388421&action=review > > > Source/WebCore/ChangeLog:9 > > + We still construct "no-op" FormattingContexts through the computeIntrinsicWidth* codepath. > > But why? bug 206581. -and updated the changelog. The commit-queue encountered the following flaky tests while processing attachment 388422 [details]: editing/spelling/spellcheck-async-remove-frame.html bug 158401 (authors: morrita@google.com, rniwa@webkit.org, and tony@chromium.org) The commit-queue is continuing to process your patch. Comment on attachment 388422 [details] Patch Clearing flags on attachment: 388422 Committed r254927: <https://trac.webkit.org/changeset/254927> All reviewed patches have been landed. Closing bug. |