Bug 230921 - [LFC][IFC] Layout::Box should be able to return the first-line style when applicable
Summary: [LFC][IFC] Layout::Box should be able to return the first-line style when app...
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: 2021-09-28 15:58 PDT by zalan
Modified: 2021-09-29 10:59 PDT (History)
5 users (show)

See Also:


Attachments
Patch (20.12 KB, patch)
2021-09-28 16:03 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (20.63 KB, patch)
2021-09-29 09:59 PDT, 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 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>