Bug 217045 - [LFC][Floats] Add support for clear on float box
Summary: [LFC][Floats] Add support for clear on float box
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: 2020-09-27 20:14 PDT by zalan
Modified: 2020-09-28 08:01 PDT (History)
5 users (show)

See Also:


Attachments
Patch (12.66 KB, patch)
2020-09-27 20:33 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (12.69 KB, patch)
2020-09-28 07:36 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 2020-09-27 20:14:12 PDT
<div style="float: left; clear: both">
Comment 1 zalan 2020-09-27 20:33:45 PDT
Created attachment 409867 [details]
Patch
Comment 2 Antti Koivisto 2020-09-28 06:31:29 PDT
Comment on attachment 409867 [details]
Patch

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

> Source/WebCore/layout/floats/FloatingContext.cpp:262
> +        auto floatBottom = Optional<PositionInContextRoot> { };
> +        switch (layoutBox.style().clear()) {
> +        case Clear::Left:
> +            floatBottom = floatingState().leftBottom(root());
> +            break;
> +        case Clear::Right:
> +            floatBottom = floatingState().rightBottom(root());
> +            break;
> +        case Clear::Both:
> +            floatBottom = floatingState().bottom(root());
> +            break;
> +        default:
> +            ASSERT_NOT_REACHED();
> +        }

No lambda?
Comment 3 zalan 2020-09-28 07:36:50 PDT
Created attachment 409885 [details]
Patch
Comment 4 zalan 2020-09-28 07:37:53 PDT
(In reply to Antti Koivisto from comment #2)
> Comment on attachment 409867 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=409867&action=review
> 
> > Source/WebCore/layout/floats/FloatingContext.cpp:262
> > +        auto floatBottom = Optional<PositionInContextRoot> { };
> > +        switch (layoutBox.style().clear()) {
> > +        case Clear::Left:
> > +            floatBottom = floatingState().leftBottom(root());
> > +            break;
> > +        case Clear::Right:
> > +            floatBottom = floatingState().rightBottom(root());
> > +            break;
> > +        case Clear::Both:
> > +            floatBottom = floatingState().bottom(root());
> > +            break;
> > +        default:
> > +            ASSERT_NOT_REACHED();
> > +        }
> 
> No lambda?
Certainly an oversight on my part.
Comment 5 EWS 2020-09-28 08:00:18 PDT
Committed r267700: <https://trac.webkit.org/changeset/267700>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 409885 [details].
Comment 6 Radar WebKit Bug Importer 2020-09-28 08:01:21 PDT
<rdar://problem/69698893>