Bug 249165

Summary: [IFC][Integration] Enable nested out-of-flow boxes for IFC
Product: WebKit Reporter: zalan <zalan>
Component: Layout and RenderingAssignee: zalan <zalan>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, jbedard, koivisto, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
koivisto: review+, ews-feeder: commit-queue-
Patch
none
Patch none

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].