Bug 142140 - Document::recalcStyle() shouldn't call viewportContentsChanged() if there is a pending layout
Summary: Document::recalcStyle() shouldn't call viewportContentsChanged() if there is ...
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
Depends on:
Reported: 2015-02-28 16:33 PST by Simon Fraser (smfr)
Modified: 2015-03-05 20:38 PST (History)
5 users (show)

See Also:

Patch (2.32 KB, patch)
2015-03-04 13:18 PST, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2015-02-28 16:33:59 PST
It's wasteful for viewportContentsChanged() to be called from recalcStyle() if a layout is pending, because that's going to move things around, and then we'll call viewportContentsChanged() again.
Comment 1 Simon Fraser (smfr) 2015-02-28 16:34:58 PST
It's actually positively bad, because resumePausedImageAnimationsIfNeeded() does repaints which assume the render tree is in a valid state.
Comment 2 Chris Dumez 2015-03-04 11:50:55 PST
I am busy with other things right now but I'll try to get to it asap. If someone else want to volunteer to make the change before then, feel free to reassign though.
Comment 3 Chris Dumez 2015-03-04 13:18:42 PST
Created attachment 247887 [details]
Comment 4 WebKit Commit Bot 2015-03-05 20:38:42 PST
Comment on attachment 247887 [details]

Clearing flags on attachment: 247887

Committed r181133: <http://trac.webkit.org/changeset/181133>
Comment 5 WebKit Commit Bot 2015-03-05 20:38:48 PST
All reviewed patches have been landed.  Closing bug.