<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[183990] trunk</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/183990">183990</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2015-05-08 02:44:28 -0700 (Fri, 08 May 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/183985">r183985</a>.
https://bugs.webkit.org/show_bug.cgi?id=144796
broke loader/go-back-to-different-window-size.html (Requested
by kling on #webkit).
Reverted changeset:
"Throttle RequestAnimationFrame in subframes that are outside
the viewport"
https://bugs.webkit.org/show_bug.cgi?id=144718
http://trac.webkit.org/changeset/183985</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoredomDocumenth">trunk/Source/WebCore/dom/Document.h</a></li>
<li><a href="#trunkSourceWebCoredomScriptedAnimationControllercpp">trunk/Source/WebCore/dom/ScriptedAnimationController.cpp</a></li>
<li><a href="#trunkSourceWebCoredomScriptedAnimationControllerh">trunk/Source/WebCore/dom/ScriptedAnimationController.h</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalscpp">trunk/Source/WebCore/testing/Internals.cpp</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsh">trunk/Source/WebCore/testing/Internals.h</a></li>
<li><a href="#trunkSourceWebCoretestingInternalsidl">trunk/Source/WebCore/testing/Internals.idl</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastanimationrequestanimationframethrottlesubframedisplaynoneexpectedtxt">trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe-display-none-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastanimationrequestanimationframethrottlesubframedisplaynonehtml">trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe-display-none.html</a></li>
<li><a href="#trunkLayoutTestsfastanimationrequestanimationframethrottlesubframeexpectedtxt">trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastanimationrequestanimationframethrottlesubframehtml">trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe.html</a></li>
<li>trunk/LayoutTests/fast/animation/resources/</li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/LayoutTests/ChangeLog        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-05-08 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r183985.
+ https://bugs.webkit.org/show_bug.cgi?id=144796
+
+ broke loader/go-back-to-different-window-size.html (Requested
+ by kling on #webkit).
+
+ Reverted changeset:
+
+ "Throttle RequestAnimationFrame in subframes that are outside
+ the viewport"
+ https://bugs.webkit.org/show_bug.cgi?id=144718
+ http://trac.webkit.org/changeset/183985
+
</ins><span class="cx"> 2015-05-08 Csaba Osztrogonác <ossy@webkit.org>
</span><span class="cx">
</span><span class="cx"> REGRESSION(r183072): dfg-put-by-id-prototype-check.js.layout-dfg-eager-no-cjit fails on AArch64 Linux
</span></span></pre></div>
<a id="trunkLayoutTestsfastanimationrequestanimationframethrottlesubframedisplaynoneexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe-display-none-expected.txt (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe-display-none-expected.txt        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe-display-none-expected.txt        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -1,19 +0,0 @@
</span><del>-Tests that requestAnimationFrame is throttled in subframes that are display:none
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Frame is initially visibile so requestAnimationFrame should not be throttled
-PASS testFrame.contentWindow.internals.isRequestAnimationFrameThrottled() became false
-PASS testFrame.contentWindow.internals.isRequestAnimationFrameThrottled() is false
-Hiding subframe.
-testFrame.style.display = 'none';
-PASS testFrame.contentWindow.internals.isRequestAnimationFrameThrottled() became true
-PASS testFrame.contentWindow.internals.isRequestAnimationFrameThrottled() is true
-Show subframe again
-testFrame.style.display = 'block';
-PASS testFrame.contentWindow.internals.isRequestAnimationFrameThrottled() became false
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsfastanimationrequestanimationframethrottlesubframedisplaynonehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe-display-none.html (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe-display-none.html        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe-display-none.html        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -1,44 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<body>
-<script src="../../resources/js-test-pre.js"></script>
-<script>
-description("Tests that requestAnimationFrame is throttled in subframes that are display:none");
-window.jsTestIsAsync = true;
-
-function checkSubframeThrottled()
-{
- shouldBeTrue("testFrame.contentWindow.internals.isRequestAnimationFrameThrottled()");
-
- debug("Show subframe again");
- evalAndLog("testFrame.style.display = 'block';");
-
- shouldBecomeEqual("testFrame.contentWindow.internals.isRequestAnimationFrameThrottled()", "false", finishJSTest);
-}
-
-function hideFrame()
-{
- shouldBeFalse("testFrame.contentWindow.internals.isRequestAnimationFrameThrottled()");
-
- debug("Hiding subframe.");
- evalAndLog("testFrame.style.display = 'none';");
-
- shouldBecomeEqual("testFrame.contentWindow.internals.isRequestAnimationFrameThrottled()", "true", checkSubframeThrottled);
-}
-
-function runTest()
-{
- testFrame = document.getElementById("testFrame");
- debug("Frame is initially visibile so requestAnimationFrame should not be throttled");
- shouldBecomeEqual("testFrame.contentWindow.internals.isRequestAnimationFrameThrottled()", "false", hideFrame);
-}
-
-var i = 0;
-requestAnimationFrame(function() {
- i++;
-});
-</script>
-<iframe id="testFrame" src="resources/requestAnimationFrame-frame.html" onload="runTest()"></iframe>
-<script src="../../resources/js-test-post.js"></script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestsfastanimationrequestanimationframethrottlesubframeexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe-expected.txt (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe-expected.txt        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe-expected.txt        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -1,24 +0,0 @@
</span><del>-Tests that requestAnimationFrame is throttled in subframes that are outside the viewport
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-Frame is initially outside the viewport so requestAnimationFrame should be throttled
-PASS testFrame.contentWindow.internals.isRequestAnimationFrameThrottled() became true
-PASS internals.isRequestAnimationFrameThrottled() is false
-PASS testFrame.contentWindow.internals.isRequestAnimationFrameThrottled() is true
-PASS grandChildFrame.contentWindow.internals.isRequestAnimationFrameThrottled() is true
-Scrolling frame into view.
-RequestAnimationFrame should no longer be throttled
-PASS internals.isRequestAnimationFrameThrottled() is false
-PASS grandChildFrame.contentWindow.internals.isRequestAnimationFrameThrottled() is false
-PASS testFrame.contentWindow.internals.isRequestAnimationFrameThrottled() is false
-Scrolling frame out of view again.
-PASS internals.isRequestAnimationFrameThrottled() is false
-PASS testFrame.contentWindow.internals.isRequestAnimationFrameThrottled() became true
-PASS testFrame.contentWindow.internals.isRequestAnimationFrameThrottled() is true
-PASS grandChildFrame.contentWindow.internals.isRequestAnimationFrameThrottled() is true
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestsfastanimationrequestanimationframethrottlesubframehtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe.html (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe.html        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/LayoutTests/fast/animation/request-animation-frame-throttle-subframe.html        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -1,61 +0,0 @@
</span><del>-<!DOCTYPE html>
-<html>
-<body>
-<script src="../../resources/js-test-pre.js"></script>
-<script>
-description("Tests that requestAnimationFrame is throttled in subframes that are outside the viewport");
-window.jsTestIsAsync = true;
-
-function checkSubframesThrottled()
-{
- shouldBeTrue("testFrame.contentWindow.internals.isRequestAnimationFrameThrottled()");
- shouldBeTrue("grandChildFrame.contentWindow.internals.isRequestAnimationFrameThrottled()");
-
- finishJSTest();
-}
-
-function scrollFrameOutOfView()
-{
- debug("Scrolling frame out of view again.");
- window.scroll(0, 0);
-
- shouldBeFalse("internals.isRequestAnimationFrameThrottled()");
- shouldBecomeEqual("testFrame.contentWindow.internals.isRequestAnimationFrameThrottled()", "true", checkSubframesThrottled);
-}
-
-function scrollFrameIntoView()
-{
- shouldBeFalse("internals.isRequestAnimationFrameThrottled()");
- shouldBeTrue("testFrame.contentWindow.internals.isRequestAnimationFrameThrottled()");
- shouldBeTrue("grandChildFrame.contentWindow.internals.isRequestAnimationFrameThrottled()");
-
- debug("Scrolling frame into view.");
- window.internals.scrollElementToRect(testFrame, 0, 0, 300, 300);
-
- debug("RequestAnimationFrame should no longer be throttled");
- shouldBeFalse("internals.isRequestAnimationFrameThrottled()");
- shouldBeFalse("grandChildFrame.contentWindow.internals.isRequestAnimationFrameThrottled()");
- shouldBeFalse("testFrame.contentWindow.internals.isRequestAnimationFrameThrottled()");
-
- scrollFrameOutOfView();
-}
-
-function runTest()
-{
- testFrame = document.getElementById("testFrame");
- grandChildFrame = testFrame.contentDocument.getElementById("grandChildFrame");
- debug("Frame is initially outside the viewport so requestAnimationFrame should be throttled");
- shouldBecomeEqual("testFrame.contentWindow.internals.isRequestAnimationFrameThrottled()", "true", scrollFrameIntoView);
-}
-
-var i = 0;
-requestAnimationFrame(function() {
- i++;
-});
-</script>
-<div style="position: relative; width: 1600px; height: 2400px; background-color: green;">
- <iframe id="testFrame" src="resources/requestAnimationFrame-frame.html" style="position:absolute; left: 600px; top: 800px;" onload="runTest()"></iframe>
-</div>
-<script src="../../resources/js-test-post.js"></script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/Source/WebCore/ChangeLog        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -1,3 +1,18 @@
</span><ins>+2015-05-08 Commit Queue <commit-queue@webkit.org>
+
+ Unreviewed, rolling out r183985.
+ https://bugs.webkit.org/show_bug.cgi?id=144796
+
+ broke loader/go-back-to-different-window-size.html (Requested
+ by kling on #webkit).
+
+ Reverted changeset:
+
+ "Throttle RequestAnimationFrame in subframes that are outside
+ the viewport"
+ https://bugs.webkit.org/show_bug.cgi?id=144718
+ http://trac.webkit.org/changeset/183985
+
</ins><span class="cx"> 2015-05-08 Youenn Fablet <youenn.fablet@crf.canon.fr>
</span><span class="cx">
</span><span class="cx"> SharedBuffer::m_size should be initialized to 0 when defining it
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/Source/WebCore/dom/Document.h        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -948,9 +948,6 @@
</span><span class="cx">
</span><span class="cx"> virtual void postTask(Task) override final; // Executes the task on context's thread asynchronously.
</span><span class="cx">
</span><del>-#if ENABLE(REQUEST_ANIMATION_FRAME)
- ScriptedAnimationController* scriptedAnimationController() { return m_scriptedAnimationController.get(); }
-#endif
</del><span class="cx"> void suspendScriptedAnimationControllerCallbacks();
</span><span class="cx"> void resumeScriptedAnimationControllerCallbacks();
</span><span class="cx"> void scriptedAnimationControllerSetThrottled(bool);
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptedAnimationControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptedAnimationController.cpp (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptedAnimationController.cpp        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/Source/WebCore/dom/ScriptedAnimationController.cpp        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -34,8 +34,6 @@
</span><span class="cx"> #include "DocumentLoader.h"
</span><span class="cx"> #include "FrameView.h"
</span><span class="cx"> #include "InspectorInstrumentation.h"
</span><del>-#include "Logging.h"
-#include "MainFrame.h"
</del><span class="cx"> #include "RequestAnimationFrameCallback.h"
</span><span class="cx"> #include "Settings.h"
</span><span class="cx"> #include <wtf/Ref.h>
</span><span class="lines">@@ -86,8 +84,6 @@
</span><span class="cx"> if (m_isThrottled == isThrottled)
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- LOG(Animations, "%p - Setting RequestAnimationFrame throttling state to %d in frame %p (isMainFrame: %d)", this, isThrottled, m_document->frame(), m_document->frame() ? m_document->frame()->isMainFrame() : 0);
-
</del><span class="cx"> m_isThrottled = isThrottled;
</span><span class="cx"> if (m_animationTimer.isActive()) {
</span><span class="cx"> m_animationTimer.stop();
</span><span class="lines">@@ -98,15 +94,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool ScriptedAnimationController::isThrottled() const
-{
-#if USE(REQUEST_ANIMATION_FRAME_TIMER) && USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
- return m_isThrottled;
-#else
- return false;
-#endif
-}
-
</del><span class="cx"> ScriptedAnimationController::CallbackId ScriptedAnimationController::registerCallback(PassRefPtr<RequestAnimationFrameCallback> callback)
</span><span class="cx"> {
</span><span class="cx"> ScriptedAnimationController::CallbackId id = ++m_nextCallbackId;
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptedAnimationControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptedAnimationController.h (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptedAnimationController.h        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/Source/WebCore/dom/ScriptedAnimationController.h        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -68,7 +68,6 @@
</span><span class="cx"> void suspend();
</span><span class="cx"> void resume();
</span><span class="cx"> void setThrottled(bool);
</span><del>- WEBCORE_EXPORT bool isThrottled() const;
</del><span class="cx">
</span><span class="cx"> void windowScreenDidChange(PlatformDisplayID);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/Source/WebCore/page/FrameView.cpp        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -80,7 +80,6 @@
</span><span class="cx"> #include "RenderWidget.h"
</span><span class="cx"> #include "SVGDocument.h"
</span><span class="cx"> #include "SVGSVGElement.h"
</span><del>-#include "ScriptedAnimationController.h"
</del><span class="cx"> #include "ScrollAnimator.h"
</span><span class="cx"> #include "ScrollingCoordinator.h"
</span><span class="cx"> #include "Settings.h"
</span><span class="lines">@@ -1756,18 +1755,10 @@
</span><span class="cx">
</span><span class="cx"> void FrameView::viewportContentsChanged()
</span><span class="cx"> {
</span><del>- if (!frame().view()) {
- // The frame is being destroyed.
- return;
- }
-
</del><span class="cx"> // When the viewport contents changes (scroll, resize, style recalc, layout, ...),
</span><span class="cx"> // check if we should resume animated images or unthrottle DOM timers.
</span><del>- applyRecursivelyWithVisibleRect([] (FrameView& frameView, const IntRect& visibleRect) {
- frameView.resumeVisibleImageAnimations(visibleRect);
- frameView.updateThrottledDOMTimersState(visibleRect);
- frameView.updateScriptedAnimationsThrottlingState(visibleRect);
- });
</del><ins>+ resumeVisibleImageAnimationsIncludingSubframes();
+ updateThrottledDOMTimersState();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool FrameView::fixedElementsLayoutRelativeToFrame() const
</span><span class="lines">@@ -2104,60 +2095,28 @@
</span><span class="cx"> viewportContentsChanged();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void FrameView::applyRecursivelyWithVisibleRect(const std::function<void (FrameView& frameView, const IntRect& visibleRect)>& apply)
</del><ins>+void FrameView::resumeVisibleImageAnimationsIncludingSubframes()
</ins><span class="cx"> {
</span><ins>+ auto* renderView = frame().contentRenderer();
+ if (!renderView)
+ return;
+
</ins><span class="cx"> IntRect windowClipRect = this->windowClipRect();
</span><span class="cx"> auto visibleRect = windowToContents(windowClipRect);
</span><del>- apply(*this, visibleRect);
</del><ins>+ if (visibleRect.isEmpty())
+ return;
</ins><span class="cx">
</span><ins>+ // Resume paused image animations in this frame.
+ renderView->resumePausedImageAnimationsIfNeeded(visibleRect);
+
</ins><span class="cx"> // Recursive call for subframes. We cache the current FrameView's windowClipRect to avoid recomputing it for every subframe.
</span><span class="cx"> TemporaryChange<IntRect*> windowClipRectCache(m_cachedWindowClipRect, &windowClipRect);
</span><span class="cx"> for (Frame* childFrame = frame().tree().firstChild(); childFrame; childFrame = childFrame->tree().nextSibling()) {
</span><span class="cx"> if (auto* childView = childFrame->view())
</span><del>- childView->applyRecursivelyWithVisibleRect(apply);
</del><ins>+ childView->resumeVisibleImageAnimationsIncludingSubframes();
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void FrameView::resumeVisibleImageAnimations(const IntRect& visibleRect)
-{
- if (visibleRect.isEmpty())
- return;
-
- if (auto* renderView = frame().contentRenderer())
- renderView->resumePausedImageAnimationsIfNeeded(visibleRect);
-}
-
-void FrameView::updateScriptedAnimationsThrottlingState(const IntRect& visibleRect)
-{
-#if ENABLE(REQUEST_ANIMATION_FRAME)
- if (frame().isMainFrame())
- return;
-
- auto* document = frame().document();
- if (!document)
- return;
-
- auto* scriptedAnimationController = document->scriptedAnimationController();
- if (!scriptedAnimationController)
- return;
-
- // FIXME: This doesn't work for subframes of a "display: none" frame because
- // they have a non-null ownerRenderer.
- bool shouldThrottle = !frame().ownerRenderer() || visibleRect.isEmpty();
- scriptedAnimationController->setThrottled(shouldThrottle);
-#else
- UNUSED_PARAM(visibleRect);
-#endif
-}
-
-
-void FrameView::resumeVisibleImageAnimationsIncludingSubframes()
-{
- applyRecursivelyWithVisibleRect([] (FrameView& frameView, const IntRect& visibleRect) {
- frameView.resumeVisibleImageAnimations(visibleRect);
- });
-}
-
</del><span class="cx"> void FrameView::updateLayerPositionsAfterScrolling()
</span><span class="cx"> {
</span><span class="cx"> // If we're scrolling as a result of updating the view size after layout, we'll update widgets and layer positions soon anyway.
</span><span class="lines">@@ -3100,11 +3059,13 @@
</span><span class="cx"> m_throttledTimers.remove(timer);
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void FrameView::updateThrottledDOMTimersState(const IntRect& visibleRect)
</del><ins>+void FrameView::updateThrottledDOMTimersState()
</ins><span class="cx"> {
</span><span class="cx"> if (m_throttledTimers.isEmpty())
</span><span class="cx"> return;
</span><span class="cx">
</span><ins>+ IntRect visibleRect = windowToContents(windowClipRect());
+
</ins><span class="cx"> // Do not iterate over the HashSet because calling DOMTimer::updateThrottlingStateAfterViewportChange()
</span><span class="cx"> // may cause timers to remove themselves from it while we are iterating.
</span><span class="cx"> Vector<DOMTimer*> timers;
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/Source/WebCore/page/FrameView.h        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -596,12 +596,8 @@
</span><span class="cx"> void forceLayoutParentViewIfNeeded();
</span><span class="cx"> void performPostLayoutTasks();
</span><span class="cx"> void autoSizeIfEnabled();
</span><ins>+ void updateThrottledDOMTimersState();
</ins><span class="cx">
</span><del>- void applyRecursivelyWithVisibleRect(const std::function<void (FrameView& frameView, const IntRect& visibleRect)>&);
- void updateThrottledDOMTimersState(const IntRect& visibleRect);
- void resumeVisibleImageAnimations(const IntRect& visibleRect);
- void updateScriptedAnimationsThrottlingState(const IntRect& visibleRect);
-
</del><span class="cx"> void updateLayerFlushThrottling();
</span><span class="cx"> WEBCORE_EXPORT void adjustTiledBackingCoverage();
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.cpp (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.cpp        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/Source/WebCore/testing/Internals.cpp        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -98,7 +98,6 @@
</span><span class="cx"> #include "RenderedDocumentMarker.h"
</span><span class="cx"> #include "RuntimeEnabledFeatures.h"
</span><span class="cx"> #include "SchemeRegistry.h"
</span><del>-#include "ScriptedAnimationController.h"
</del><span class="cx"> #include "ScrollingCoordinator.h"
</span><span class="cx"> #include "SerializedScriptValue.h"
</span><span class="cx"> #include "Settings.h"
</span><span class="lines">@@ -767,18 +766,6 @@
</span><span class="cx"> return timer->m_throttleState == DOMTimer::ShouldThrottle;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool Internals::isRequestAnimationFrameThrottled() const
-{
-#if ENABLE(REQUEST_ANIMATION_FRAME)
- auto* scriptedAnimationController = contextDocument()->scriptedAnimationController();
- if (!scriptedAnimationController)
- return false;
- return scriptedAnimationController->isThrottled();
-#else
- return false;
-#endif
-}
-
</del><span class="cx"> String Internals::visiblePlaceholder(Element* element)
</span><span class="cx"> {
</span><span class="cx"> if (is<HTMLTextFormControlElement>(element)) {
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.h (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.h        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/Source/WebCore/testing/Internals.h        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -113,7 +113,6 @@
</span><span class="cx">
</span><span class="cx"> // DOMTimers throttling testing.
</span><span class="cx"> bool isTimerThrottled(int timeoutId, ExceptionCode&);
</span><del>- bool isRequestAnimationFrameThrottled() const;
</del><span class="cx">
</span><span class="cx"> // Spatial Navigation testing.
</span><span class="cx"> unsigned lastSpatialNavigationCandidateCount(ExceptionCode&) const;
</span></span></pre></div>
<a id="trunkSourceWebCoretestingInternalsidl"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/testing/Internals.idl (183989 => 183990)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/testing/Internals.idl        2015-05-08 09:37:56 UTC (rev 183989)
+++ trunk/Source/WebCore/testing/Internals.idl        2015-05-08 09:44:28 UTC (rev 183990)
</span><span class="lines">@@ -279,8 +279,6 @@
</span><span class="cx"> // Query if a timer is currently throttled, to debug timer throttling.
</span><span class="cx"> [RaisesException] boolean isTimerThrottled(long timerHandle);
</span><span class="cx">
</span><del>- boolean isRequestAnimationFrameThrottled();
-
</del><span class="cx"> [RaisesException] void startTrackingStyleRecalcs();
</span><span class="cx"> [RaisesException] unsigned long styleRecalcCount();
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>