<!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>[215070] 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/215070">215070</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2017-04-06 17:04:10 -0700 (Thu, 06 Apr 2017)</dd>
</dl>
<h3>Log Message</h3>
<pre>Throttle requestAnimationFrame in cross-origin iframes to 30fps
https://bugs.webkit.org/show_bug.cgi?id=170534
Reviewed by Dan Bates.
Source/WebCore:
Add a throttling reason to ScriptedAnimationController which is NonInteractedCrossOriginFrame,
set on cross-origin iframes whose documents have never seen a user interaction. It's cleared
as soon as an interaction on this frame or a child frame is detected.
Move the initialization of the LowPowerMode throttling reason to Document::requestAnimationFrame(),
since it's more appropriate to compute NonInteractedCrossOriginFrame here than down in ScriptedAnimationController,
and best to do both in the same place.
Tests: http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html
* dom/Document.cpp:
(WebCore::Document::requestAnimationFrame):
(WebCore::Document::updateLastHandledUserGestureTimestamp):
* dom/Document.h:
(WebCore::Document::hasHadUserInteraction):
* dom/ScriptedAnimationController.cpp:
(WebCore::ScriptedAnimationController::ScriptedAnimationController):
(WebCore::throttlingReasonToString):
(WebCore::ScriptedAnimationController::interval):
* dom/ScriptedAnimationController.h:
* loader/FrameLoader.cpp:
(WebCore::shouldAskForNavigationConfirmation):
LayoutTests:
* http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe-expected.txt: Added.
* http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html: Added.
* http/tests/frame-throttling/resources/requestAnimationFrame-frame.html: Added.</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="#trunkSourceWebCoredomDocumentcpp">trunk/Source/WebCore/dom/Document.cpp</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="#trunkSourceWebCoreloaderFrameLoadercpp">trunk/Source/WebCore/loader/FrameLoader.cpp</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li>trunk/LayoutTests/http/tests/frame-throttling/</li>
<li><a href="#trunkLayoutTestshttptestsframethrottlingrafthrottleincrossoriginsubframeexpectedtxt">trunk/LayoutTests/http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe-expected.txt</a></li>
<li><a href="#trunkLayoutTestshttptestsframethrottlingrafthrottleincrossoriginsubframehtml">trunk/LayoutTests/http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html</a></li>
<li>trunk/LayoutTests/http/tests/frame-throttling/resources/</li>
<li><a href="#trunkLayoutTestshttptestsframethrottlingresourcesrequestAnimationFrameframehtml">trunk/LayoutTests/http/tests/frame-throttling/resources/requestAnimationFrame-frame.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (215069 => 215070)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2017-04-07 00:01:29 UTC (rev 215069)
+++ trunk/LayoutTests/ChangeLog        2017-04-07 00:04:10 UTC (rev 215070)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2017-04-05 Simon Fraser <simon.fraser@apple.com>
+
+ Throttle requestAnimationFrame in cross-origin iframes to 30fps
+ https://bugs.webkit.org/show_bug.cgi?id=170534
+
+ Reviewed by Dan Bates.
+
+ * http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe-expected.txt: Added.
+ * http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html: Added.
+ * http/tests/frame-throttling/resources/requestAnimationFrame-frame.html: Added.
+
</ins><span class="cx"> 2017-04-06 Ryan Haddad <ryanhaddad@apple.com>
</span><span class="cx">
</span><span class="cx"> Unreviewed, rolling out r215041.
</span></span></pre></div>
<a id="trunkLayoutTestshttptestsframethrottlingrafthrottleincrossoriginsubframeexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe-expected.txt (0 => 215070)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe-expected.txt         (rev 0)
+++ trunk/LayoutTests/http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe-expected.txt        2017-04-07 00:04:10 UTC (rev 215070)
</span><span class="lines">@@ -0,0 +1,22 @@
</span><ins>+Tests that requestAnimationFrame is throttled in subframes that are cross-origin, and not in same-origin frames
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+Received message: frameload
+Received message: frameload
+Checking that requestAnimationFrame is throttled in cross origin frame
+Received message: throttled[cross]: true
+Received message: throttled[same]: false
+PASS throttledState['cross'] is "true"
+PASS throttledState['same'] is "false"
+Interacted with cross-origin frame
+Interacted with same-origin frame
+Received message: throttled[cross]: false
+Received message: throttled[same]: false
+PASS throttledState['cross'] is "false"
+PASS throttledState['same'] is "false"
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsframethrottlingrafthrottleincrossoriginsubframehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html (0 => 215070)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html         (rev 0)
+++ trunk/LayoutTests/http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html        2017-04-07 00:04:10 UTC (rev 215070)
</span><span class="lines">@@ -0,0 +1,98 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ iframe {
+ height: 200px;
+ width: 400px;
+ }
+ </style>
+ <script src="/js-test-resources/js-test-pre.js"></script>
+ <script src="/js-test-resources/ui-helper.js"></script>
+
+ <script>
+ description("Tests that requestAnimationFrame is throttled in subframes that are cross-origin, and not in same-origin frames");
+ window.jsTestIsAsync = true;
+
+ var crossOriginFrame;
+ var sameOriginFrame
+
+ var throttledState = {
+ 'cross' : undefined,
+ 'same' : undefined,
+ }
+
+ var messageHandler;
+ var messagesReceived = 0;
+
+ function interactWithSubframes()
+ {
+ UIHelper.activateAt(crossOriginFrame.offsetLeft + 5, crossOriginFrame.offsetTop + 5).then(function() {
+ debug("Interacted with cross-origin frame");
+ UIHelper.activateAt(sameOriginFrame.offsetLeft + 5, sameOriginFrame.offsetTop + 5).then(function() {
+ debug("Interacted with same-origin frame");
+ messageHandler = checkUnthrottledAfterInteraction;
+ messagesReceived = 0;
+ crossOriginFrame.contentWindow.postMessage("report-throttle-cross", "*");
+ sameOriginFrame.contentWindow.postMessage("report-throttle-same", "*");
+ });
+ });
+ }
+
+ function runTest()
+ {
+ crossOriginFrame = document.getElementById("cross-origin-frame");
+ sameOriginFrame = document.getElementById("same-origin-frame");
+
+ debug("Checking that requestAnimationFrame is throttled in cross origin frame");
+
+ messageHandler = checkInitiallyThrottled;
+ messagesReceived = 0;
+ crossOriginFrame.contentWindow.postMessage("report-throttle-cross", "*");
+ sameOriginFrame.contentWindow.postMessage("report-throttle-same", "*");
+ }
+
+ function checkInitiallyThrottled()
+ {
+ shouldBeEqualToString("throttledState['cross']", "true");
+ shouldBeEqualToString("throttledState['same']", "false");
+ interactWithSubframes();
+ }
+
+ function checkUnthrottledAfterInteraction()
+ {
+ shouldBeEqualToString("throttledState['cross']", "false");
+ shouldBeEqualToString("throttledState['same']", "false");
+ finishJSTest();
+ }
+
+ window.onmessage = function(message)
+ {
+ debug("Received message: " + message.data);
+ if (message.data === "frameload") {
+ if (++messagesReceived == 2)
+ runTest();
+ return;
+ }
+
+ var re = /throttled\[(\w+)\]: (true|false)/;
+ var match = re.exec(message.data);
+ if (match) {
+ frameID = match[1];
+ throttledState[frameID] = match[2];
+ if (++messagesReceived == 2)
+ messageHandler();
+ return;
+ }
+
+ debug("Failed to handle message " + message.data);
+ }
+ </script>
+</head>
+<body>
+ <iframe id="cross-origin-frame" src="http://localhost:8000/frame-throttling/resources/requestAnimationFrame-frame.html?dontcacheme"></iframe>
+ <iframe id="same-origin-frame" src="resources/requestAnimationFrame-frame.html?dontcacheme"></iframe>
+
+ <script src="/js-test-resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestshttptestsframethrottlingresourcesrequestAnimationFrameframehtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/http/tests/frame-throttling/resources/requestAnimationFrame-frame.html (0 => 215070)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/http/tests/frame-throttling/resources/requestAnimationFrame-frame.html         (rev 0)
+++ trunk/LayoutTests/http/tests/frame-throttling/resources/requestAnimationFrame-frame.html        2017-04-07 00:04:10 UTC (rev 215070)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+<!DOCTYPE html>
+<html>
+<head>
+ <script>
+ var i = 0;
+ function step()
+ {
+ i++;
+ requestAnimationFrame(step);
+ }
+ step();
+
+ window.onmessage = function(message)
+ {
+ var re = /report-throttle-(cross|same)/;
+ var match = re.exec(message.data);
+
+ if (match) {
+ var frameId = match[1];
+ if (window.internals)
+ parent.window.postMessage("throttled[" + frameId + "]: " + internals.isRequestAnimationFrameThrottled(), "*");
+ }
+ }
+
+ window.addEventListener("load", function() {
+ parent.window.postMessage("frameload", "*");
+ }, false);
+ </script>
+</head>
+<body>
+ Child frame.
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (215069 => 215070)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2017-04-07 00:01:29 UTC (rev 215069)
+++ trunk/Source/WebCore/ChangeLog        2017-04-07 00:04:10 UTC (rev 215070)
</span><span class="lines">@@ -1,5 +1,35 @@
</span><span class="cx"> 2017-04-05 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><ins>+ Throttle requestAnimationFrame in cross-origin iframes to 30fps
+ https://bugs.webkit.org/show_bug.cgi?id=170534
+
+ Reviewed by Dan Bates.
+
+ Add a throttling reason to ScriptedAnimationController which is NonInteractedCrossOriginFrame,
+ set on cross-origin iframes whose documents have never seen a user interaction. It's cleared
+ as soon as an interaction on this frame or a child frame is detected.
+
+ Move the initialization of the LowPowerMode throttling reason to Document::requestAnimationFrame(),
+ since it's more appropriate to compute NonInteractedCrossOriginFrame here than down in ScriptedAnimationController,
+ and best to do both in the same place.
+
+ Tests: http/tests/frame-throttling/raf-throttle-in-cross-origin-subframe.html
+
+ * dom/Document.cpp:
+ (WebCore::Document::requestAnimationFrame):
+ (WebCore::Document::updateLastHandledUserGestureTimestamp):
+ * dom/Document.h:
+ (WebCore::Document::hasHadUserInteraction):
+ * dom/ScriptedAnimationController.cpp:
+ (WebCore::ScriptedAnimationController::ScriptedAnimationController):
+ (WebCore::throttlingReasonToString):
+ (WebCore::ScriptedAnimationController::interval):
+ * dom/ScriptedAnimationController.h:
+ * loader/FrameLoader.cpp:
+ (WebCore::shouldAskForNavigationConfirmation):
+
+2017-04-05 Simon Fraser <simon.fraser@apple.com>
+
</ins><span class="cx"> Use the Accelerate framework to optimize FEColorMatrix operations
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=170518
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.cpp (215069 => 215070)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.cpp        2017-04-07 00:01:29 UTC (rev 215069)
+++ trunk/Source/WebCore/dom/Document.cpp        2017-04-07 00:04:10 UTC (rev 215070)
</span><span class="lines">@@ -6011,6 +6011,12 @@
</span><span class="cx"> if (!page() || page()->scriptedAnimationsSuspended())
</span><span class="cx"> m_scriptedAnimationController->suspend();
</span><span class="cx">
</span><ins>+ if (page() && page()->isLowPowerModeEnabled())
+ m_scriptedAnimationController->addThrottlingReason(ScriptedAnimationController::ThrottlingReason::LowPowerMode);
+
+ if (!topOrigin().canAccess(securityOrigin()) && !hasHadUserInteraction())
+ m_scriptedAnimationController->addThrottlingReason(ScriptedAnimationController::ThrottlingReason::NonInteractedCrossOriginFrame);
+
</ins><span class="cx"> if (settings().shouldDispatchRequestAnimationFrameEvents()) {
</span><span class="cx"> if (!page())
</span><span class="cx"> dispatchEvent(Event::create("raf-no-page", false, false));
</span><span class="lines">@@ -6315,6 +6321,11 @@
</span><span class="cx"> void Document::updateLastHandledUserGestureTimestamp(MonotonicTime time)
</span><span class="cx"> {
</span><span class="cx"> m_lastHandledUserGestureTimestamp = time;
</span><ins>+
+ if (static_cast<bool>(time) && m_scriptedAnimationController) {
+ // It's OK to always remove NonInteractedCrossOriginFrame even if this frame isn't cross-origin.
+ m_scriptedAnimationController->removeThrottlingReason(ScriptedAnimationController::ThrottlingReason::NonInteractedCrossOriginFrame);
+ }
</ins><span class="cx">
</span><span class="cx"> if (HTMLFrameOwnerElement* element = ownerElement())
</span><span class="cx"> element->document().updateLastHandledUserGestureTimestamp(time);
</span></span></pre></div>
<a id="trunkSourceWebCoredomDocumenth"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/Document.h (215069 => 215070)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/Document.h        2017-04-07 00:01:29 UTC (rev 215069)
+++ trunk/Source/WebCore/dom/Document.h        2017-04-07 00:04:10 UTC (rev 215070)
</span><span class="lines">@@ -1144,6 +1144,7 @@
</span><span class="cx"> void didRemoveWheelEventHandler(Node&, EventHandlerRemoval = EventHandlerRemoval::One);
</span><span class="cx">
</span><span class="cx"> MonotonicTime lastHandledUserGestureTimestamp() const { return m_lastHandledUserGestureTimestamp; }
</span><ins>+ bool hasHadUserInteraction() const { return static_cast<bool>(m_lastHandledUserGestureTimestamp); }
</ins><span class="cx"> void updateLastHandledUserGestureTimestamp(MonotonicTime);
</span><span class="cx">
</span><span class="cx"> // Used for testing. Count handlers in the main document, and one per frame which contains handlers.
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptedAnimationControllercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptedAnimationController.cpp (215069 => 215070)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptedAnimationController.cpp        2017-04-07 00:01:29 UTC (rev 215069)
+++ trunk/Source/WebCore/dom/ScriptedAnimationController.cpp        2017-04-07 00:04:10 UTC (rev 215070)
</span><span class="lines">@@ -64,10 +64,6 @@
</span><span class="cx"> #endif
</span><span class="cx"> {
</span><span class="cx"> windowScreenDidChange(displayID);
</span><del>-
- auto* page = document.page();
- if (page && page->isLowPowerModeEnabled())
- addThrottlingReason(ThrottlingReason::LowPowerMode);
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> ScriptedAnimationController::~ScriptedAnimationController()
</span><span class="lines">@@ -110,6 +106,8 @@
</span><span class="cx"> return "OutsideViewport";
</span><span class="cx"> case ScriptedAnimationController::ThrottlingReason::LowPowerMode:
</span><span class="cx"> return "LowPowerMode";
</span><ins>+ case ScriptedAnimationController::ThrottlingReason::NonInteractedCrossOriginFrame:
+ return "NonInteractiveCrossOriginFrame";
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -268,8 +266,13 @@
</span><span class="cx"> #if USE(REQUEST_ANIMATION_FRAME_TIMER) && USE(REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR)
</span><span class="cx"> if (m_throttlingReasons.contains(ThrottlingReason::VisuallyIdle) || m_throttlingReasons.contains(ThrottlingReason::OutsideViewport))
</span><span class="cx"> return aggressiveThrottlingAnimationInterval;
</span><ins>+
</ins><span class="cx"> if (m_throttlingReasons.contains(ThrottlingReason::LowPowerMode))
</span><span class="cx"> return halfSpeedThrottlingAnimationInterval;
</span><ins>+
+ if (m_throttlingReasons.contains(ThrottlingReason::NonInteractedCrossOriginFrame))
+ return halfSpeedThrottlingAnimationInterval;
+
</ins><span class="cx"> ASSERT(m_throttlingReasons.isEmpty());
</span><span class="cx"> #endif
</span><span class="cx"> return fullSpeedAnimationInterval;
</span></span></pre></div>
<a id="trunkSourceWebCoredomScriptedAnimationControllerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/dom/ScriptedAnimationController.h (215069 => 215070)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/dom/ScriptedAnimationController.h        2017-04-07 00:01:29 UTC (rev 215069)
+++ trunk/Source/WebCore/dom/ScriptedAnimationController.h        2017-04-07 00:04:10 UTC (rev 215070)
</span><span class="lines">@@ -73,9 +73,10 @@
</span><span class="cx"> void resume();
</span><span class="cx">
</span><span class="cx"> enum class ThrottlingReason {
</span><del>- VisuallyIdle = 1 << 0,
- OutsideViewport = 1 << 1,
- LowPowerMode = 1 << 2,
</del><ins>+ VisuallyIdle = 1 << 0,
+ OutsideViewport = 1 << 1,
+ LowPowerMode = 1 << 2,
+ NonInteractedCrossOriginFrame = 1 << 3,
</ins><span class="cx"> };
</span><span class="cx"> void addThrottlingReason(ThrottlingReason);
</span><span class="cx"> void removeThrottlingReason(ThrottlingReason);
</span></span></pre></div>
<a id="trunkSourceWebCoreloaderFrameLoadercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/loader/FrameLoader.cpp (215069 => 215070)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/loader/FrameLoader.cpp        2017-04-07 00:01:29 UTC (rev 215069)
+++ trunk/Source/WebCore/loader/FrameLoader.cpp        2017-04-07 00:04:10 UTC (rev 215070)
</span><span class="lines">@@ -3036,7 +3036,7 @@
</span><span class="cx">
</span><span class="cx"> static bool shouldAskForNavigationConfirmation(Document& document, const BeforeUnloadEvent& event)
</span><span class="cx"> {
</span><del>- bool userDidInteractWithPage = static_cast<bool>(document.topDocument().lastHandledUserGestureTimestamp());
</del><ins>+ bool userDidInteractWithPage = document.topDocument().hasHadUserInteraction();
</ins><span class="cx"> // Web pages can request we ask for confirmation before navigating by:
</span><span class="cx"> // - Cancelling the BeforeUnloadEvent (modern way)
</span><span class="cx"> // - Setting the returnValue attribute on the BeforeUnloadEvent to a non-empty string.
</span></span></pre>
</div>
</div>
</body>
</html>