Bug 230921

Summary: [LFC][IFC] Layout::Box should be able to return the first-line style when applicable
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, koivisto, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch none

Description zalan 2021-09-28 15:58:01 PDT
ssia
Comment 1 zalan 2021-09-28 16:03:34 PDT
Created attachment 439540 [details]
Patch
Comment 2 Antti Koivisto 2021-09-29 07:12:01 PDT
Comment on attachment 439540 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=439540&action=review

> Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp:78
> +        std::unique_ptr<RenderStyle> firstLineStyle;
> +        if (childRenderer.style() != childRenderer.firstLineStyle())
> +            firstLineStyle = RenderStyle::clonePtr(childRenderer.firstLineStyle());

I think this can even do faster

if (&renderer.style() != &renderer.firstLineStyle())

> Source/WebCore/layout/integration/LayoutIntegrationBoxTree.cpp:167
> +        if (renderer.style() != renderer.firstLineStyle())

This too
Comment 3 zalan 2021-09-29 09:59:13 PDT
Created attachment 439618 [details]
Patch
Comment 4 EWS 2021-09-29 10:58:40 PDT
Committed r283234 (242276@main): <https://commits.webkit.org/242276@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439618 [details].
Comment 5 Radar WebKit Bug Importer 2021-09-29 10:59:16 PDT
<rdar://problem/83679025>