<!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>[176609] 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/176609">176609</a></dd>
<dt>Author</dt> <dd>cdumez@apple.com</dd>
<dt>Date</dt> <dd>2014-12-01 16:09:56 -0800 (Mon, 01 Dec 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Take into consideration canvas drawing for throttling DOM timers
https://bugs.webkit.org/show_bug.cgi?id=139140
&lt;rdar://problem/19102218&gt;

Reviewed by Andreas Kling.

Source/WebCore:

Take into consideration canvas drawing for throttling DOM timers so
that:
- Timers drawing on a visible canvas can no longer get throttled.
  This fixes the following sites:
  - http://hint.fm/wind/
  - http://radar.weather.gov/Conus/full_loop.php
- Timers that are drawing on a canvas that is not user observable
  now get throttled, thus using less CPU. As an example, on
  http://hint.fm/wind/, CPU usage is at 110% when the canvas is
  inside the viewport on my machine. CPU usage would remain at
  110% when scrolling the canvas outside the viewport before this
  patch. After this patch, the CPU usage goes down to 5% when
  the canvas is outside the viewport.

Tests: fast/canvas/canvas-inside-viewport-timer-throttling.html
       fast/canvas/canvas-outside-viewport-timer-throttling.html

* bindings/js/JSCSSStyleDeclarationCustom.cpp:
(WebCore::JSCSSStyleDeclaration::putDelegate):
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::notifyObserversCanvasChanged):
* page/DOMTimer.cpp:
(WebCore::DOMTimerFireState::setScriptMadeNonUserObservableChangesToElement):
(WebCore::DOMTimer::scriptDidCauseElementRepaint):
(WebCore::DOMTimerFireState::setScriptMadeNonUserObservableChangesToElementStyle): Deleted.
(WebCore::DOMTimer::scriptDidUpdateStyleOfElement): Deleted.
* page/DOMTimer.h:

LayoutTests:

Add layout tests to test that we take into consideration canvas drawing
when considering if we should throttle DOM timers.

* fast/canvas/canvas-inside-viewport-timer-throttling-expected.txt: Added.
* fast/canvas/canvas-inside-viewport-timer-throttling.html: Added.
* fast/canvas/canvas-outside-viewport-timer-throttling-expected.txt: Added.
* fast/canvas/canvas-outside-viewport-timer-throttling.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="#trunkSourceWebCorebindingsjsJSCSSStyleDeclarationCustomcpp">trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp</a></li>
<li><a href="#trunkSourceWebCorehtmlHTMLCanvasElementcpp">trunk/Source/WebCore/html/HTMLCanvasElement.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMTimercpp">trunk/Source/WebCore/page/DOMTimer.cpp</a></li>
<li><a href="#trunkSourceWebCorepageDOMTimerh">trunk/Source/WebCore/page/DOMTimer.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcanvascanvasinsideviewporttimerthrottlingexpectedtxt">trunk/LayoutTests/fast/canvas/canvas-inside-viewport-timer-throttling-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcanvascanvasinsideviewporttimerthrottlinghtml">trunk/LayoutTests/fast/canvas/canvas-inside-viewport-timer-throttling.html</a></li>
<li><a href="#trunkLayoutTestsfastcanvascanvasoutsideviewporttimerthrottlingexpectedtxt">trunk/LayoutTests/fast/canvas/canvas-outside-viewport-timer-throttling-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcanvascanvasoutsideviewporttimerthrottlinghtml">trunk/LayoutTests/fast/canvas/canvas-outside-viewport-timer-throttling.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (176608 => 176609)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-12-01 23:56:14 UTC (rev 176608)
+++ trunk/LayoutTests/ChangeLog        2014-12-02 00:09:56 UTC (rev 176609)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2014-12-01  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Take into consideration canvas drawing for throttling DOM timers
+        https://bugs.webkit.org/show_bug.cgi?id=139140
+        &lt;rdar://problem/19102218&gt;
+
+        Reviewed by Andreas Kling.
+
+        Add layout tests to test that we take into consideration canvas drawing
+        when considering if we should throttle DOM timers.
+
+        * fast/canvas/canvas-inside-viewport-timer-throttling-expected.txt: Added.
+        * fast/canvas/canvas-inside-viewport-timer-throttling.html: Added.
+        * fast/canvas/canvas-outside-viewport-timer-throttling-expected.txt: Added.
+        * fast/canvas/canvas-outside-viewport-timer-throttling.html: Added.
+
</ins><span class="cx"> 2014-12-01  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Crash in Font::dashesForIntersectionsWithRect() due to underlining SVG fonts
</span></span></pre></div>
<a id="trunkLayoutTestsfastcanvascanvasinsideviewporttimerthrottlingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/canvas/canvas-inside-viewport-timer-throttling-expected.txt (0 => 176609)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/canvas-inside-viewport-timer-throttling-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/canvas/canvas-inside-viewport-timer-throttling-expected.txt        2014-12-02 00:09:56 UTC (rev 176609)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Test that a DOM timer drawing on a canvas inside viewport does not get throttled.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+Timer should initially not be throttled.
+PASS internals.isTimerThrottled(timeoutId) is false
+Timer should still not be throttled because it is drawing on a canvas inside viewport.
+PASS internals.isTimerThrottled(timeoutId) is false
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcanvascanvasinsideviewporttimerthrottlinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/canvas/canvas-inside-viewport-timer-throttling.html (0 => 176609)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/canvas-inside-viewport-timer-throttling.html                                (rev 0)
+++ trunk/LayoutTests/fast/canvas/canvas-inside-viewport-timer-throttling.html        2014-12-02 00:09:56 UTC (rev 176609)
</span><span class="lines">@@ -0,0 +1,42 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var i = 0;
+var context;
+var timeoutId;
+
+function loop()
+{
+   i = (i + 1) % 255;
+   context.fillStyle = &quot;rgb(&quot; + i + &quot;, 0, 0)&quot;;
+   context.fillRect(0, 0, 150, 150);
+
+   // 5 iterations should suffice to throttle the timer.
+   if (i == 5) {
+     debug(&quot;Timer should still not be throttled because it is drawing on a canvas inside viewport.&quot;);
+     shouldBeFalse(&quot;internals.isTimerThrottled(timeoutId)&quot;);
+     clearInterval(timeoutId);
+     finishJSTest();
+   }
+}
+
+function runTest() {
+  context = document.getElementById(&quot;canvas&quot;).getContext('2d');
+
+  timeoutId = setInterval(loop, 5);
+  debug(&quot;Timer should initially not be throttled.&quot;);
+  shouldBeFalse(&quot;internals.isTimerThrottled(timeoutId)&quot;);
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest();&quot;&gt;
+&lt;script&gt;
+description(&quot;Test that a DOM timer drawing on a canvas inside viewport does not get throttled.&quot;);
+jsTestIsAsync = true;
+&lt;/script&gt;
+&lt;canvas id=&quot;canvas&quot; width=150 height=150&gt;&lt;/canvas&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcanvascanvasoutsideviewporttimerthrottlingexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/canvas/canvas-outside-viewport-timer-throttling-expected.txt (0 => 176609)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/canvas-outside-viewport-timer-throttling-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/canvas/canvas-outside-viewport-timer-throttling-expected.txt        2014-12-02 00:09:56 UTC (rev 176609)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+Test that a DOM timer drawing on a canvas outside viewport gets throttled.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+The timer should initially not be throttled.
+PASS internals.isTimerThrottled(timeoutId) is false
+The timer should now be throttled as it is drawing on a canvas outside viewport.
+PASS internals.isTimerThrottled(timeoutId) is true
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcanvascanvasoutsideviewporttimerthrottlinghtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/canvas/canvas-outside-viewport-timer-throttling.html (0 => 176609)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/canvas/canvas-outside-viewport-timer-throttling.html                                (rev 0)
+++ trunk/LayoutTests/fast/canvas/canvas-outside-viewport-timer-throttling.html        2014-12-02 00:09:56 UTC (rev 176609)
</span><span class="lines">@@ -0,0 +1,45 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var i = 0;
+var context;
+var timeoutId;
+var wasThrottled;
+
+function loop()
+{
+   i = (i + 1) % 255;
+   context.fillStyle = &quot;rgb(&quot; + i + &quot;, 0, 0)&quot;;
+   context.fillRect(0, 0, 150, 150);
+
+   // 5 iterations should suffice to throttle the timer.
+   if (i == 5) {
+     debug(&quot;The timer should now be throttled as it is drawing on a canvas outside viewport.&quot;);
+     shouldBeTrue(&quot;internals.isTimerThrottled(timeoutId)&quot;);
+     clearInterval(timeoutId);
+     finishJSTest();
+   }
+}
+
+function runTest() {
+  context = document.getElementById(&quot;canvas&quot;).getContext('2d');
+
+  timeoutId = setInterval(loop, 5);
+  debug(&quot;The timer should initially not be throttled.&quot;);
+  shouldBeFalse(&quot;internals.isTimerThrottled(timeoutId)&quot;);
+}
+&lt;/script&gt;
+&lt;/head&gt;
+&lt;body onload=&quot;runTest();&quot;&gt;
+&lt;script&gt;
+description(&quot;Test that a DOM timer drawing on a canvas outside viewport gets throttled.&quot;);
+jsTestIsAsync = true;
+&lt;/script&gt;
+&lt;div style=&quot;position: relative; width: 1600px; height: 2400px;&quot;&gt;
+  &lt;canvas id=&quot;canvas&quot; width=150 height=150 style=&quot;position:absolute; left: 600px; top: 800px;&quot;&gt;&lt;/canvas&gt;
+&lt;/div&gt;
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (176608 => 176609)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-12-01 23:56:14 UTC (rev 176608)
+++ trunk/Source/WebCore/ChangeLog        2014-12-02 00:09:56 UTC (rev 176609)
</span><span class="lines">@@ -1,3 +1,39 @@
</span><ins>+2014-12-01  Chris Dumez  &lt;cdumez@apple.com&gt;
+
+        Take into consideration canvas drawing for throttling DOM timers
+        https://bugs.webkit.org/show_bug.cgi?id=139140
+        &lt;rdar://problem/19102218&gt;
+
+        Reviewed by Andreas Kling.
+
+        Take into consideration canvas drawing for throttling DOM timers so
+        that:
+        - Timers drawing on a visible canvas can no longer get throttled.
+          This fixes the following sites:
+          - http://hint.fm/wind/
+          - http://radar.weather.gov/Conus/full_loop.php
+        - Timers that are drawing on a canvas that is not user observable
+          now get throttled, thus using less CPU. As an example, on
+          http://hint.fm/wind/, CPU usage is at 110% when the canvas is
+          inside the viewport on my machine. CPU usage would remain at
+          110% when scrolling the canvas outside the viewport before this
+          patch. After this patch, the CPU usage goes down to 5% when
+          the canvas is outside the viewport.
+
+        Tests: fast/canvas/canvas-inside-viewport-timer-throttling.html
+               fast/canvas/canvas-outside-viewport-timer-throttling.html
+
+        * bindings/js/JSCSSStyleDeclarationCustom.cpp:
+        (WebCore::JSCSSStyleDeclaration::putDelegate):
+        * html/HTMLCanvasElement.cpp:
+        (WebCore::HTMLCanvasElement::notifyObserversCanvasChanged):
+        * page/DOMTimer.cpp:
+        (WebCore::DOMTimerFireState::setScriptMadeNonUserObservableChangesToElement):
+        (WebCore::DOMTimer::scriptDidCauseElementRepaint):
+        (WebCore::DOMTimerFireState::setScriptMadeNonUserObservableChangesToElementStyle): Deleted.
+        (WebCore::DOMTimer::scriptDidUpdateStyleOfElement): Deleted.
+        * page/DOMTimer.h:
+
</ins><span class="cx"> 2014-12-01  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Crash in Font::dashesForIntersectionsWithRect() due to underlining SVG fonts
</span></span></pre></div>
<a id="trunkSourceWebCorebindingsjsJSCSSStyleDeclarationCustomcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp (176608 => 176609)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp        2014-12-01 23:56:14 UTC (rev 176608)
+++ trunk/Source/WebCore/bindings/js/JSCSSStyleDeclarationCustom.cpp        2014-12-02 00:09:56 UTC (rev 176609)
</span><span class="lines">@@ -36,6 +36,7 @@
</span><span class="cx"> #include &quot;RuntimeEnabledFeatures.h&quot;
</span><span class="cx"> #include &quot;Settings.h&quot;
</span><span class="cx"> #include &quot;StyleProperties.h&quot;
</span><ins>+#include &quot;StyledElement.h&quot;
</ins><span class="cx"> #include &lt;runtime/IdentifierInlines.h&gt;
</span><span class="cx"> #include &lt;runtime/StringPrototype.h&gt;
</span><span class="cx"> #include &lt;wtf/ASCIICType.h&gt;
</span><span class="lines">@@ -344,7 +345,7 @@
</span><span class="cx"> 
</span><span class="cx">     // Choke point for interaction with style of element; notify DOMTimer of the event.
</span><span class="cx">     if (auto* element = impl().parentElement())
</span><del>-        DOMTimer::scriptDidUpdateStyleOfElement(*element, changed);
</del><ins>+        DOMTimer::scriptDidCauseElementRepaint(*element, changed);
</ins><span class="cx"> 
</span><span class="cx">     return true;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorehtmlHTMLCanvasElementcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/html/HTMLCanvasElement.cpp (176608 => 176609)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/html/HTMLCanvasElement.cpp        2014-12-01 23:56:14 UTC (rev 176608)
+++ trunk/Source/WebCore/html/HTMLCanvasElement.cpp        2014-12-02 00:09:56 UTC (rev 176609)
</span><span class="lines">@@ -279,6 +279,9 @@
</span><span class="cx"> 
</span><span class="cx"> void HTMLCanvasElement::notifyObserversCanvasChanged(const FloatRect&amp; rect)
</span><span class="cx"> {
</span><ins>+    // Choke point for canvas drawing; notify DOMTimer of the event.
+    DOMTimer::scriptDidCauseElementRepaint(*this);
+
</ins><span class="cx">     for (auto it = m_observers.begin(), end = m_observers.end(); it != end; ++it)
</span><span class="cx">         (*it)-&gt;canvasChanged(*this, rect);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMTimercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMTimer.cpp (176608 => 176609)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMTimer.cpp        2014-12-01 23:56:14 UTC (rev 176608)
+++ trunk/Source/WebCore/page/DOMTimer.cpp        2014-12-02 00:09:56 UTC (rev 176609)
</span><span class="lines">@@ -82,7 +82,7 @@
</span><span class="cx"> 
</span><span class="cx">     void setScriptMadeUserObservableChanges() { m_scriptMadeUserObservableChanges = true; }
</span><span class="cx">     void setScriptMadeNonUserObservableChanges() { m_scriptMadeNonUserObservableChanges = true; }
</span><del>-    void setScriptMadeNonUserObservableChangesToElementStyle(StyledElement&amp; element)
</del><ins>+    void setScriptMadeNonUserObservableChangesToElement(Element&amp; element)
</ins><span class="cx">     {
</span><span class="cx">         m_scriptMadeNonUserObservableChanges = true;
</span><span class="cx">         m_elementsChangedOutsideViewport.add(&amp;element);
</span><span class="lines">@@ -113,7 +113,7 @@
</span><span class="cx">     ScriptExecutionContext&amp; m_context;
</span><span class="cx">     uint64_t m_initialDOMTreeVersion;
</span><span class="cx">     DOMTimerFireState* m_previous;
</span><del>-    HashSet&lt;RefPtr&lt;StyledElement&gt;&gt; m_elementsChangedOutsideViewport;
</del><ins>+    HashSet&lt;RefPtr&lt;Element&gt;&gt; m_elementsChangedOutsideViewport;
</ins><span class="cx">     bool m_contextIsDocument;
</span><span class="cx">     bool m_scriptMadeNonUserObservableChanges { false };
</span><span class="cx">     bool m_scriptMadeUserObservableChanges { false };
</span><span class="lines">@@ -310,7 +310,7 @@
</span><span class="cx">         DOMTimerFireState::current-&gt;setScriptMadeNonUserObservableChanges();
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-void DOMTimer::scriptDidUpdateStyleOfElement(StyledElement&amp; styledElement, bool changed)
</del><ins>+void DOMTimer::scriptDidCauseElementRepaint(Element&amp; element, bool changed)
</ins><span class="cx"> {
</span><span class="cx">     if (!DOMTimerFireState::current)
</span><span class="cx">         return;
</span><span class="lines">@@ -321,10 +321,10 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (styledElement.isInsideViewport())
</del><ins>+    if (element.isInsideViewport())
</ins><span class="cx">         DOMTimerFireState::current-&gt;setScriptMadeUserObservableChanges();
</span><span class="cx">     else
</span><del>-        DOMTimerFireState::current-&gt;setScriptMadeNonUserObservableChangesToElementStyle(styledElement);
</del><ins>+        DOMTimerFireState::current-&gt;setScriptMadeNonUserObservableChangesToElement(element);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void DOMTimer::fired()
</span></span></pre></div>
<a id="trunkSourceWebCorepageDOMTimerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/DOMTimer.h (176608 => 176609)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/DOMTimer.h        2014-12-01 23:56:14 UTC (rev 176608)
+++ trunk/Source/WebCore/page/DOMTimer.h        2014-12-02 00:09:56 UTC (rev 176609)
</span><span class="lines">@@ -41,7 +41,6 @@
</span><span class="cx">     class HTMLPlugInElement;
</span><span class="cx">     class IntRect;
</span><span class="cx">     class ScheduledAction;
</span><del>-    class StyledElement;
</del><span class="cx"> 
</span><span class="cx">     class DOMTimer final : public RefCounted&lt;DOMTimer&gt;, public SuspendableTimer {
</span><span class="cx">         WTF_MAKE_NONCOPYABLE(DOMTimer);
</span><span class="lines">@@ -60,7 +59,7 @@
</span><span class="cx">         void updateThrottlingStateAfterViewportChange(const IntRect&amp; visibleRect);
</span><span class="cx"> 
</span><span class="cx">         static void scriptDidInteractWithPlugin(HTMLPlugInElement&amp;);
</span><del>-        static void scriptDidUpdateStyleOfElement(StyledElement&amp;, bool changed);
</del><ins>+        static void scriptDidCauseElementRepaint(Element&amp;, bool changed = true);
</ins><span class="cx"> 
</span><span class="cx">     private:
</span><span class="cx">         DOMTimer(ScriptExecutionContext&amp;, std::unique_ptr&lt;ScheduledAction&gt;, int interval, bool singleShot);
</span></span></pre>
</div>
</div>

</body>
</html>