Bug 179279 - [LayoutState cleanup] Move offset/cliprect/pagination code to dedicated methods
Summary: [LayoutState cleanup] Move offset/cliprect/pagination code to dedicated methods
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: 2017-11-03 20:03 PDT by zalan
Modified: 2017-11-06 11:19 PST (History)
6 users (show)

See Also:


Attachments
Patch (10.88 KB, patch)
2017-11-03 20:06 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (10.11 KB, patch)
2017-11-04 14:07 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 2017-11-03 20:03:27 PDT
ssia.
Comment 1 Radar WebKit Bug Importer 2017-11-03 20:03:53 PDT
<rdar://problem/35348171>
Comment 2 zalan 2017-11-03 20:06:32 PDT
Created attachment 326006 [details]
Patch
Comment 3 Antti Koivisto 2017-11-04 10:09:54 PDT
Comment on attachment 326006 [details]
Patch

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

> Source/WebCore/rendering/LayoutState.h:86
> +    void computeOffsets(RenderBox&, LayoutSize offset);
> +    void computeClipRect(RenderBox&);
> +    void computePaginationInformation(RenderBox&, LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged);

It would be nice if compute* methods would return the results instead of mutating the object state (they could be const). This might be something to consider in future.
Comment 4 zalan 2017-11-04 14:07:55 PDT
Created attachment 326043 [details]
Patch
Comment 5 zalan 2017-11-04 14:08:37 PDT
(In reply to Antti Koivisto from comment #3)
> Comment on attachment 326006 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=326006&action=review
> 
> > Source/WebCore/rendering/LayoutState.h:86
> > +    void computeOffsets(RenderBox&, LayoutSize offset);
> > +    void computeClipRect(RenderBox&);
> > +    void computePaginationInformation(RenderBox&, LayoutUnit pageLogicalHeight, bool pageLogicalHeightChanged);
> 
> It would be nice if compute* methods would return the results instead of
> mutating the object state (they could be const). This might be something to
> consider in future.
Good idea!
Comment 6 WebKit Commit Bot 2017-11-04 14:41:14 PDT
Comment on attachment 326043 [details]
Patch

Clearing flags on attachment: 326043

Committed r224460: <https://trac.webkit.org/changeset/224460>
Comment 7 WebKit Commit Bot 2017-11-04 14:41:15 PDT
All reviewed patches have been landed.  Closing bug.