Bug 217045

Summary: [LFC][Floats] Add support for clear on float box
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

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>