Bug 185377 - [LFC] Add FormattingContext::layoutOutOfFlowDescendants implementation
Summary: [LFC] Add FormattingContext::layoutOutOfFlowDescendants implementation
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: 2018-05-07 07:18 PDT by zalan
Modified: 2018-05-07 22:27 PDT (History)
6 users (show)

See Also:


Attachments
Patch (8.88 KB, patch)
2018-05-07 07:27 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (14.92 KB, patch)
2018-05-07 21:37 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 2018-05-07 07:18:35 PDT
ssia.
Comment 1 zalan 2018-05-07 07:27:49 PDT
Created attachment 339718 [details]
Patch
Comment 2 Antti Koivisto 2018-05-07 12:19:06 PDT
Comment on attachment 339718 [details]
Patch

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

> Source/WebCore/layout/FormattingContext.h:66
> -    const LayoutContext& layoutContext() const { return m_layoutContext; }
> +    LayoutContext& layoutContext() const { return m_layoutContext; }

I'm not sure I understand what the intention with constness here is. If LayoutContext is part of the FormattingContext and it is mutated during layout then functions like FormattingContext::layoutOutOfFlowDescendants() probably shouldn't be const in the first place.
Comment 3 zalan 2018-05-07 13:31:09 PDT
(In reply to Antti Koivisto from comment #2)
> Comment on attachment 339718 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=339718&action=review
> 
> > Source/WebCore/layout/FormattingContext.h:66
> > -    const LayoutContext& layoutContext() const { return m_layoutContext; }
> > +    LayoutContext& layoutContext() const { return m_layoutContext; }
> 
> I'm not sure I understand what the intention with constness here is. If
> LayoutContext is part of the FormattingContext and it is mutated during
> layout then functions like FormattingContext::layoutOutOfFlowDescendants()
> probably shouldn't be const in the first place.
I think what I need to do here is to go back the original design when LayoutContext was passed in to FormattingContext::layout() (together with the mutable FormattingState). I changed it to a member while dealing with inherited floatings, but I think I can workaround that. FormattingContext::layout() will always mutate the (passed in) FormattingState by design. It also mutates the LayoutContext to construct Display::Boxes and generate new FormattingStates for the nested formatting contexts (and that is also by design)
Comment 4 zalan 2018-05-07 21:37:33 PDT
Created attachment 339797 [details]
Patch
Comment 5 WebKit Commit Bot 2018-05-07 22:26:45 PDT
Comment on attachment 339797 [details]
Patch

Clearing flags on attachment: 339797

Committed r231480: <https://trac.webkit.org/changeset/231480>
Comment 6 WebKit Commit Bot 2018-05-07 22:26:47 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Radar WebKit Bug Importer 2018-05-07 22:27:20 PDT
<rdar://problem/40048933>