requestAnimationFrame broken with subframes (DisplayRefreshMonitorManager::registerCl...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Sep 2012 22:25:36 +0000 (22:25 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 27 Sep 2012 22:25:36 +0000 (22:25 +0000)
commitcbfab03c7a2fe7ed1e8c04ae4ef9339e19f9e2e0
treec0df57a6342bedc54d2b7f24b713c762f7240afe
parentdb143d4f7518331211f33722356bf66def059cfc
requestAnimationFrame broken with subframes (DisplayRefreshMonitorManager::registerClient fails to register client)
https://bugs.webkit.org/show_bug.cgi?id=95360

Patch by Andrew Lo <anlo@rim.com> on 2012-09-27
Reviewed by Simon Fraser.

Source/WebCore:

DisplayRefreshMonitorManager::ensureMonitorForClient currently only adds the DisplayRefreshMonitorClient
to the appropriate DisplayRefreshMonitor when a new monitor is created.
It should also do so when it finds an existing monitor.

Test: fast/animation/request-animation-frame-iframe2.html

* platform/graphics/DisplayRefreshMonitor.cpp:
(WebCore::DisplayRefreshMonitor::addClient):
(WebCore::DisplayRefreshMonitorManager::ensureMonitorForClient):

LayoutTests:

Add a new test which does requestAnimationFrame in both a sub-frame and
main-frame, and checks that both were executed.

* fast/animation/request-animation-frame-iframe2-expected.txt: Added.
* fast/animation/request-animation-frame-iframe2.html: Added.
* fast/animation/script-tests/request-animation-frame-subframe.html:
    Remove element parameter from window.webkitRequestAnimationFrame.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@129808 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/animation/request-animation-frame-iframe2-expected.txt [new file with mode: 0644]
LayoutTests/fast/animation/request-animation-frame-iframe2.html [new file with mode: 0644]
LayoutTests/fast/animation/script-tests/request-animation-frame-subframe.html
Source/WebCore/ChangeLog
Source/WebCore/platform/graphics/DisplayRefreshMonitor.cpp