Bug 249165 - [IFC][Integration] Enable nested out-of-flow boxes for IFC
Summary: [IFC][Integration] Enable nested out-of-flow boxes for IFC
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: 2022-12-12 12:46 PST by zalan
Modified: 2022-12-13 11:13 PST (History)
6 users (show)

See Also:


Attachments
Patch (3.53 KB, patch)
2022-12-12 12:56 PST, zalan
koivisto: review+
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (10.44 KB, patch)
2022-12-12 16:51 PST, zalan
no flags Details | Formatted Diff | Diff
Patch (12.16 KB, patch)
2022-12-13 09:04 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 2022-12-12 12:46:35 PST
ssia
Comment 1 zalan 2022-12-12 12:56:08 PST
Created attachment 464013 [details]
Patch
Comment 2 Antti Koivisto 2022-12-12 12:59:48 PST
Comment on attachment 464013 [details]
Patch

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

> Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:126
> +        RenderElement* containingBlock = nullptr;
> +        if (renderer.isOutOfFlowPositioned()) {
> +            // Here we are looking for the containing block as if the out-of-flow box was inflow (for static position purpose).
> +            containingBlock = renderer.parent();
> +            if (is<RenderInline>(containingBlock))
> +                containingBlock = containingBlock->containingBlock();
> +        } else if (renderer.isFloating())
> +            containingBlock = renderer.containingBlock();

I feel there is lambda here.
Comment 3 Antti Koivisto 2022-12-12 13:00:15 PST
Comment on attachment 464013 [details]
Patch

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

> Source/WebCore/layout/integration/LayoutIntegrationCoverage.cpp:-400
> -            // FIXME: We don't collect out-of-flow boxes from nested subtrees.
> -            if (renderer.parent() != renderer.containingBlock())
> -                return false;

Nice!
Comment 4 zalan 2022-12-12 14:15:55 PST
(In reply to Antti Koivisto from comment #2)
> Comment on attachment 464013 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=464013&action=review
> 
> > Source/WebCore/layout/integration/inline/LayoutIntegrationLineLayout.cpp:126
> > +        RenderElement* containingBlock = nullptr;
> > +        if (renderer.isOutOfFlowPositioned()) {
> > +            // Here we are looking for the containing block as if the out-of-flow box was inflow (for static position purpose).
> > +            containingBlock = renderer.parent();
> > +            if (is<RenderInline>(containingBlock))
> > +                containingBlock = containingBlock->containingBlock();
> > +        } else if (renderer.isFloating())
> > +            containingBlock = renderer.containingBlock();
> 
> I feel there is lambda here.
haha
Comment 5 zalan 2022-12-12 16:51:39 PST
Created attachment 464015 [details]
Patch
Comment 6 Radar WebKit Bug Importer 2022-12-13 09:03:36 PST
<rdar://problem/103304375>
Comment 7 zalan 2022-12-13 09:04:46 PST
Created attachment 464025 [details]
Patch
Comment 8 EWS 2022-12-13 11:13:47 PST
Committed 257802@main (a5081fa2fab8): <https://commits.webkit.org/257802@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 464025 [details].