Bug 178538 - [FrameView::layout cleanup] Move post layout task scheduling logic to a separate function
Summary: [FrameView::layout cleanup] Move post layout task scheduling logic to a separ...
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-10-19 13:22 PDT by zalan
Modified: 2017-10-19 15:31 PDT (History)
6 users (show)

See Also:


Attachments
Patch (4.06 KB, patch)
2017-10-19 13:36 PDT, zalan
no flags Details | Formatted Diff | Diff
Patch (3.87 KB, patch)
2017-10-19 14:16 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-10-19 13:22:03 PDT
ssia
Comment 1 Radar WebKit Bug Importer 2017-10-19 13:22:30 PDT
<rdar://problem/35080743>
Comment 2 zalan 2017-10-19 13:36:50 PDT
Created attachment 324277 [details]
Patch
Comment 3 Simon Fraser (smfr) 2017-10-19 14:06:31 PDT
Comment on attachment 324277 [details]
Patch

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

> Source/WebCore/page/FrameView.cpp:1568
> +    // If we are already in a synchronous call, defer post layout tasks until after we return.

blank line above.

> Source/WebCore/page/FrameView.cpp:1569
> +    // Post layout taks can make us need to update again, and we can get stuck in a cycle.

The following call to performPostLayoutTasks can cause this function to get re-entered. We use the timer to prevent re-entrancy.

> Source/WebCore/page/FrameView.cpp:1574
> +    performPostLayoutTasks();

blank line above

> Source/WebCore/page/FrameView.cpp:1576
> +        // Post layout widget tasks made us need layout again.

Remove this line.

> Source/WebCore/page/FrameView.h:692
>      void performPostLayoutTasks();
> +    void runOrSchedulePostLayoutTasks();

Maybe swap.
Comment 4 zalan 2017-10-19 14:16:49 PDT
Created attachment 324282 [details]
Patch
Comment 5 WebKit Commit Bot 2017-10-19 15:31:33 PDT
Comment on attachment 324282 [details]
Patch

Clearing flags on attachment: 324282

Committed r223717: <https://trac.webkit.org/changeset/223717>
Comment 6 WebKit Commit Bot 2017-10-19 15:31:34 PDT
All reviewed patches have been landed.  Closing bug.