Bug 244782

Summary: [LFC][IFC] Move overflowing float boxes to the next line
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
Patch
none
Patch none

Description zalan 2022-09-04 14:21:47 PDT
ssia
Comment 1 zalan 2022-09-04 14:34:55 PDT
Created attachment 462131 [details]
Patch
Comment 2 zalan 2022-09-04 15:34:31 PDT
Created attachment 462132 [details]
Patch
Comment 3 zalan 2022-09-04 19:12:25 PDT
Created attachment 462134 [details]
Patch
Comment 4 Antti Koivisto 2022-09-05 09:02:44 PDT
Comment on attachment 462134 [details]
Patch

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

> Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:937
> +        // we can still continue placing inline content on the line, but we have to save all the upcoming floats for subsequent lines.
> +        auto lineHasSkippedFloats = !m_overflowingFloats.isEmpty();
> +        if (lineHasSkippedFloats)
> +            return false;
> +        if (lineBoxConstraintApplies == LineBoxConstraintApplies::No) {
> +            // This is an overflowing float from previous line. Now we need to find a place for it.
> +            return true;
> +        }

maybe we can assert these conditions are mutually exclusive
Comment 5 zalan 2022-09-05 09:56:58 PDT
(In reply to Antti Koivisto from comment #4)
> Comment on attachment 462134 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=462134&action=review
> 
> > Source/WebCore/layout/formattingContexts/inline/InlineLineBuilder.cpp:937
> > +        // we can still continue placing inline content on the line, but we have to save all the upcoming floats for subsequent lines.
> > +        auto lineHasSkippedFloats = !m_overflowingFloats.isEmpty();
> > +        if (lineHasSkippedFloats)
> > +            return false;
> > +        if (lineBoxConstraintApplies == LineBoxConstraintApplies::No) {
> > +            // This is an overflowing float from previous line. Now we need to find a place for it.
> > +            return true;
> > +        }
> 
> maybe we can assert these conditions are mutually exclusive
good idea!
Comment 6 zalan 2022-09-05 10:04:21 PDT
Created attachment 462145 [details]
Patch
Comment 7 EWS 2022-09-05 17:19:02 PDT
Committed 254170@main (9f5be0d75394): <https://commits.webkit.org/254170@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 462145 [details].
Comment 8 Radar WebKit Bug Importer 2022-09-05 17:20:19 PDT
<rdar://problem/99578693>