Skip to content

Commit

Permalink
Merge r180846 - FrameView::layoutTimerFired() should update style if …
Browse files Browse the repository at this point in the history
…needed before doing layout

https://bugs.webkit.org/show_bug.cgi?id=141688

Reviewed by Andreas Kling.

If the style recalc timer has been scheduled to fire after the layout timer,
when the layout timer fires, we might as well just do the style recalc
too. The call to updateStyleIfNeeded() will cancel the pending style
recalc timer.

This doesn't have much impact on the number of layouts (measured via PLT)
but seems like a reasonable thing to do.

* page/FrameView.cpp:
(WebCore::FrameView::layoutTimerFired):
  • Loading branch information
smfr authored and carlosgcampos committed Mar 1, 2015
1 parent 76aab4b commit 1944558
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,21 @@
2015-02-28 Simon Fraser <simon.fraser@apple.com>

FrameView::layoutTimerFired() should update style if needed before doing layout
https://bugs.webkit.org/show_bug.cgi?id=141688

Reviewed by Andreas Kling.

If the style recalc timer has been scheduled to fire after the layout timer,
when the layout timer fires, we might as well just do the style recalc
too. The call to updateStyleIfNeeded() will cancel the pending style
recalc timer.

This doesn't have much impact on the number of layouts (measured via PLT)
but seems like a reasonable thing to do.

* page/FrameView.cpp:
(WebCore::FrameView::layoutTimerFired):

2015-02-27 Andreas Kling <akling@apple.com>

Use NeverDestroyed for JS wrapper owners.
Expand Down
1 change: 1 addition & 0 deletions Source/WebCore/page/FrameView.cpp
Expand Up @@ -2449,6 +2449,7 @@ void FrameView::layoutTimerFired()
if (!frame().document()->ownerElement())
printf("Layout timer fired at %lld\n", frame().document()->elapsedTime().count());
#endif
frame().document()->updateStyleIfNeeded();
layout();
}

Expand Down

0 comments on commit 1944558

Please sign in to comment.