Bug 160215 - Move RenderView::shouldDisableLayoutStateForSubtree to SubtreeLayoutStateMaintainer.
Summary: Move RenderView::shouldDisableLayoutStateForSubtree to SubtreeLayoutStateMain...
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:
Depends on:
Blocks:
 
Reported: 2016-07-26 14:39 PDT by zalan
Modified: 2016-07-26 16:35 PDT (History)
5 users (show)

See Also:


Attachments
Patch (3.33 KB, patch)
2016-07-26 14:44 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (3.83 KB, patch)
2016-07-26 14:58 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (3.62 KB, patch)
2016-07-26 15:10 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (4.01 KB, patch)
2016-07-26 15:21 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 2016-07-26 14:39:20 PDT
ssia.
Comment 1 zalan 2016-07-26 14:44:19 PDT
Created attachment 284634 [details]
Patch
Comment 2 zalan 2016-07-26 14:58:39 PDT
Created attachment 284637 [details]
Patch
Comment 3 Darin Adler 2016-07-26 15:00:32 PDT
Comment on attachment 284637 [details]
Patch

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

> Source/WebCore/page/FrameView.cpp:204
>      bool m_disableLayoutState { false };

The name of this isn’t great. It keeps track of whether we already disabled layout state, and it’s confusing that its name is verb.
Comment 4 Darin Adler 2016-07-26 15:02:16 PDT
Comment on attachment 284637 [details]
Patch

I think the old factoring was clearer, where one function makes the decision about whether to disable layout state, and another does the disabling. I’m not sure that this is an improvement. It’s especially poor to put the actual work of disabling layout state inside a loop just before a return statement. Too subtle I think.
Comment 5 Simon Fraser (smfr) 2016-07-26 15:03:46 PDT
Comment on attachment 284637 [details]
Patch

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

> Source/WebCore/page/FrameView.cpp:190
> +    void disableLayoutStateForSubtree()

disableIfNeeded?

> Source/WebCore/page/FrameView.cpp:196
> +        for (auto* renderer = m_layoutRoot; renderer; renderer = renderer->container()) {
> +            if (renderer->hasTransform() || renderer->hasReflection()) {
> +                m_disableLayoutState = true;
> +                m_layoutRoot->view().disableLayoutState();
> +                return;

Slight preference for assignment to m_disableLayoutState in one place. You could hoist the loop into a separate function.
Comment 6 zalan 2016-07-26 15:10:08 PDT
Created attachment 284641 [details]
Patch
Comment 7 zalan 2016-07-26 15:21:53 PDT
Created attachment 284644 [details]
Patch
Comment 8 WebKit Commit Bot 2016-07-26 16:35:10 PDT
Comment on attachment 284644 [details]
Patch

Clearing flags on attachment: 284644

Committed r203751: <http://trac.webkit.org/changeset/203751>
Comment 9 WebKit Commit Bot 2016-07-26 16:35:15 PDT
All reviewed patches have been landed.  Closing bug.