Bug 244782 - [LFC][IFC] Move overflowing float boxes to the next line
Summary: [LFC][IFC] Move overflowing float boxes to the next line
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-09-04 14:21 PDT by zalan
Modified: 2022-09-05 17:20 PDT (History)
5 users (show)

See Also:


Attachments
Patch (19.68 KB, patch)
2022-09-04 14:34 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (19.68 KB, patch)
2022-09-04 15:34 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (20.44 KB, patch)
2022-09-04 19:12 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (20.78 KB, patch)
2022-09-05 10:04 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 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>