Bug 206570 - [LFC] Do not create a FormattingContext unless there's content to layout.
Summary: [LFC] Do not create a FormattingContext unless there's content to layout.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: zalan
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2020-01-21 21:12 PST by zalan
Modified: 2020-01-22 09:07 PST (History)
6 users (show)

See Also:


Attachments
Patch (9.12 KB, patch)
2020-01-21 21:15 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (10.39 KB, patch)
2020-01-22 07:59 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (10.42 KB, patch)
2020-01-22 08:09 PST, zalan
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zalan 2020-01-21 21:12:56 PST
ssia
Comment 1 Radar WebKit Bug Importer 2020-01-21 21:13:21 PST
<rdar://problem/58785735>
Comment 2 zalan 2020-01-21 21:15:54 PST
Created attachment 388396 [details]
Patch
Comment 3 Antti Koivisto 2020-01-22 07:02:54 PST
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 4 zalan 2020-01-22 07:26:31 PST
Comment on attachment 388396 [details]
Patch

Oops
Comment 5 zalan 2020-01-22 07:59:51 PST
Created attachment 388421 [details]
Patch
Comment 6 Antti Koivisto 2020-01-22 08:02:32 PST
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?
Comment 7 zalan 2020-01-22 08:09:19 PST
Created attachment 388422 [details]
Patch
Comment 8 zalan 2020-01-22 08:10:00 PST
(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.
Comment 9 WebKit Commit Bot 2020-01-22 09:06:59 PST
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 10 WebKit Commit Bot 2020-01-22 09:07:32 PST
Comment on attachment 388422 [details]
Patch

Clearing flags on attachment: 388422

Committed r254927: <https://trac.webkit.org/changeset/254927>
Comment 11 WebKit Commit Bot 2020-01-22 09:07:33 PST
All reviewed patches have been landed.  Closing bug.