<!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>[161989] branches/safari-537.60-branch</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/161989">161989</a></dd>
<dt>Author</dt> <dd>bfulgham@apple.com</dd>
<dt>Date</dt> <dd>2014-01-14 11:41:43 -0800 (Tue, 14 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/154470">r154470</a>

    2013-08-22  Simon Fraser  &lt;simon.fraser@apple.com&gt;

    compositing/geometry/bounds-ignores-hidden-dynamic.html has incorrect initial rendering
    https://bugs.webkit.org/show_bug.cgi?id=119825

Source/WebCore: 

    Reviewed by Tim Horton.
        
    <a href="http://trac.webkit.org/projects/webkit/changeset/137526">r137526</a> and some earlier commits attempted to avoid unconditionally
    repainting layers when their size changes, because this was causing
    TiledBacking layers to repaint when the document size changed.
        
    However, the approach required that we have good information about
    whether size changes require a repaint, which in some cases is hard
    to determine, especially when RenderLayer changes affect our
    decisions about which layers are composited.
        
    Fix by pushing the decision about whether to repaint on size change
    into GraphicsLayer. The default is to repaint on size change,
    but GraphicsLayer provides a function that can be overridden to
    modify this behavior; GraphicsLayerCA does so to avoid repaints
    when layers with TiledBackings get resized.

    Test: compositing/repaint/repaint-on-layer-grouping-change.html

    * WebCore.exp.in: WebKit2 needs GraphicsLayer::setSize, which is no longer inline.
    * platform/graphics/GraphicsLayer.cpp:
    (WebCore::GraphicsLayer::setOffsetFromRenderer):
    (WebCore::GraphicsLayer::setSize):
    * platform/graphics/GraphicsLayer.h:
    (WebCore::GraphicsLayer::shouldRepaintOnSizeChange):
    * platform/graphics/ca/GraphicsLayerCA.cpp:
    (WebCore::GraphicsLayerCA::shouldRepaintOnSizeChange):
    * platform/graphics/ca/GraphicsLayerCA.h:
    * rendering/RenderLayerBacking.h: No longer need m_boundsConstrainedByClipping
    * rendering/RenderLayerBacking.cpp:
    (WebCore::RenderLayerBacking::RenderLayerBacking):
    (WebCore::RenderLayerBacking::updateCompositedBounds):
    (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): setSize takes
    care of repainting for us now, so we can remove all the conditional code.

LayoutTests: 

    Reviewed by Tim Horton.
        
    Test that dumps repaint rects on layers after visibility changes affect
    the layer hierarchy.

    * compositing/repaint/repaint-on-layer-grouping-change-expected.txt: Added.
    * compositing/repaint/repaint-on-layer-grouping-change.html: Added.
    * compositing/repaint/resize-repaint-expected.txt: Update result.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari53760branchLayoutTestsChangeLog">branches/safari-537.60-branch/LayoutTests/ChangeLog</a></li>
<li><a href="#branchessafari53760branchLayoutTestscompositingrepaintresizerepaintexpectedtxt">branches/safari-537.60-branch/LayoutTests/compositing/repaint/resize-repaint-expected.txt</a></li>
<li><a href="#branchessafari53760branchSourceWebCoreChangeLog">branches/safari-537.60-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari53760branchSourceWebCoreWebCoreexpin">branches/safari-537.60-branch/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#branchessafari53760branchSourceWebCoreplatformgraphicsGraphicsLayercpp">branches/safari-537.60-branch/Source/WebCore/platform/graphics/GraphicsLayer.cpp</a></li>
<li><a href="#branchessafari53760branchSourceWebCoreplatformgraphicsGraphicsLayerh">branches/safari-537.60-branch/Source/WebCore/platform/graphics/GraphicsLayer.h</a></li>
<li><a href="#branchessafari53760branchSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp">branches/safari-537.60-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp</a></li>
<li><a href="#branchessafari53760branchSourceWebCoreplatformgraphicscaGraphicsLayerCAh">branches/safari-537.60-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h</a></li>
<li><a href="#branchessafari53760branchSourceWebCorerenderingRenderLayerBackingcpp">branches/safari-537.60-branch/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
<li><a href="#branchessafari53760branchSourceWebCorerenderingRenderLayerBackingh">branches/safari-537.60-branch/Source/WebCore/rendering/RenderLayerBacking.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#branchessafari53760branchLayoutTestscompositingrepaintrepaintonlayergroupingchangeexpectedtxt">branches/safari-537.60-branch/LayoutTests/compositing/repaint/repaint-on-layer-grouping-change-expected.txt</a></li>
<li><a href="#branchessafari53760branchLayoutTestscompositingrepaintrepaintonlayergroupingchangehtml">branches/safari-537.60-branch/LayoutTests/compositing/repaint/repaint-on-layer-grouping-change.html</a></li>
</ul>

<h3>Property Changed</h3>
<ul>
<li><a href="#branchessafari53760branch">branches/safari-537.60-branch/</a></li>
<li><a href="#branchessafari53760branchSourceWebCore">branches/safari-537.60-branch/Source/WebCore/</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari53760branch"></a>
<div class="propset"><h4>Property changes: branches/safari-537.60-branch</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4>Modified: svn:mergeinfo</h4></div>
<span class="cx">   + /trunk:53455,153629,154470
</span><a id="branchessafari53760branchLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-537.60-branch/LayoutTests/ChangeLog (161988 => 161989)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.60-branch/LayoutTests/ChangeLog        2014-01-14 19:21:29 UTC (rev 161988)
+++ branches/safari-537.60-branch/LayoutTests/ChangeLog        2014-01-14 19:41:43 UTC (rev 161989)
</span><span class="lines">@@ -1,3 +1,21 @@
</span><ins>+2014-01-14  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        Merge r154470
+
+    2013-08-22  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+            compositing/geometry/bounds-ignores-hidden-dynamic.html has incorrect initial rendering
+            https://bugs.webkit.org/show_bug.cgi?id=119825
+
+            Reviewed by Tim Horton.
+        
+            Test that dumps repaint rects on layers after visibility changes affect
+            the layer hierarchy.
+
+            * compositing/repaint/repaint-on-layer-grouping-change-expected.txt: Added.
+            * compositing/repaint/repaint-on-layer-grouping-change.html: Added.
+            * compositing/repaint/resize-repaint-expected.txt: Update result.
+
</ins><span class="cx"> 2013-11-06  Lucas Forschler  &lt;lforschler@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r154392
</span></span></pre></div>
<a id="branchessafari53760branchLayoutTestscompositingrepaintrepaintonlayergroupingchangeexpectedtxtfromrev154470trunkLayoutTestscompositingrepaintrepaintonlayergroupingchangeexpectedtxt"></a>
<div class="copfile"><h4>Copied: branches/safari-537.60-branch/LayoutTests/compositing/repaint/repaint-on-layer-grouping-change-expected.txt (from rev 154470, trunk/LayoutTests/compositing/repaint/repaint-on-layer-grouping-change-expected.txt) (0 => 161989)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.60-branch/LayoutTests/compositing/repaint/repaint-on-layer-grouping-change-expected.txt                                (rev 0)
+++ branches/safari-537.60-branch/LayoutTests/compositing/repaint/repaint-on-layer-grouping-change-expected.txt        2014-01-14 19:41:43 UTC (rev 161989)
</span><span class="lines">@@ -0,0 +1,33 @@
</span><ins>+
+(GraphicsLayer
+  (bounds 800.00 600.00)
+  (children 1
+    (GraphicsLayer
+      (bounds 800.00 600.00)
+      (contentsOpaque 1)
+      (children 2
+        (GraphicsLayer
+          (position 10.00 10.00)
+          (anchor -0.02 -0.04)
+          (bounds 540.00 240.00)
+          (drawsContent 1)
+          (repaint rects
+            (rect 0.00 0.00 540.00 240.00)
+          )
+        )
+        (GraphicsLayer
+          (position 10.00 260.00)
+          (anchor -0.20 -0.20)
+          (bounds 50.00 50.00)
+          (contentsOpaque 1)
+          (drawsContent 1)
+          (repaint rects
+            (rect 490.00 190.00 50.00 50.00)
+            (rect 0.00 0.00 50.00 50.00)
+          )
+        )
+      )
+    )
+  )
+)
+
</ins></span></pre></div>
<a id="branchessafari53760branchLayoutTestscompositingrepaintrepaintonlayergroupingchangehtmlfromrev154470trunkLayoutTestscompositingrepaintrepaintonlayergroupingchangehtml"></a>
<div class="copfile"><h4>Copied: branches/safari-537.60-branch/LayoutTests/compositing/repaint/repaint-on-layer-grouping-change.html (from rev 154470, trunk/LayoutTests/compositing/repaint/repaint-on-layer-grouping-change.html) (0 => 161989)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.60-branch/LayoutTests/compositing/repaint/repaint-on-layer-grouping-change.html                                (rev 0)
+++ branches/safari-537.60-branch/LayoutTests/compositing/repaint/repaint-on-layer-grouping-change.html        2014-01-14 19:41:43 UTC (rev 161989)
</span><span class="lines">@@ -0,0 +1,68 @@
</span><ins>+&lt;style&gt;
+  .composited {
+    -webkit-transform: translateZ(0);
+  }
+  
+  .box {
+    width: 100px;
+    height: 100px;
+    background-color: blue;
+  }
+  
+  img {
+    background-color: black;
+    width: 50px;
+    height: 50px;
+  }
+  
+  img.to-visible {
+      visibility: hidden;
+  }
+  body.changed img.to-visible {
+      visibility: visible;
+  }
+
+  img.to-hidden {
+      visibility: visible;
+  }
+  body.changed img.to-hidden {
+      visibility: hidden;
+  }
+  
+  #layers {
+      opacity: 0; /* hide from pixel result */
+  }
+&lt;/style&gt;
+&lt;script&gt;
+    if (window.testRunner) {
+        testRunner.dumpAsText(true);
+        testRunner.waitUntilDone();
+    }
+
+    function doTest()
+    {
+        document.body.offsetWidth;
+        window.setTimeout(function() {
+            if (window.internals)
+                window.internals.startTrackingRepaints(document);
+            document.body.classList.toggle('changed');
+            if (window.testRunner) {
+                document.getElementById('layers').innerText = window.internals.layerTreeAsText(document, internals.LAYER_TREE_INCLUDES_REPAINT_RECTS);
+                testRunner.notifyDone();
+            }
+        }, 0);
+    }
+    window.addEventListener('load', doTest, false);
+&lt;/script&gt;
+&lt;body&gt;
+    &lt;div style=&quot;position: absolute; left: 0px; top: 0px; z-index: 106; &quot; class=&quot;composited&quot;&gt;
+        &lt;img style=&quot;position: absolute; left: 10px; top: 10px; z-index: 0;&quot;&gt;
+        &lt;img style=&quot;position: absolute; left: 500px; top: 200px; z-index: 0;&quot; class=&quot;to-visible&quot;&gt;
+    &lt;/div&gt;
+
+    &lt;div style=&quot;position: absolute; left: 0px; top: 250px; z-index: 106; &quot; class=&quot;composited&quot;&gt;
+        &lt;img style=&quot;position: absolute; left: 10px; top: 10px; z-index: 0;&quot;&gt;
+        &lt;img style=&quot;position: absolute; left: 500px; top: 200px; z-index: 0;&quot; class=&quot;to-hidden&quot;&gt;
+    &lt;/div&gt;
+&lt;pre id=&quot;layers&quot;&gt;Layer tree goes here in DRT&lt;/pre&gt;
+&lt;/body&gt;
</ins></span></pre></div>
<a id="branchessafari53760branchLayoutTestscompositingrepaintresizerepaintexpectedtxt"></a>
<div class="modfile"><h4>Modified: branches/safari-537.60-branch/LayoutTests/compositing/repaint/resize-repaint-expected.txt (161988 => 161989)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.60-branch/LayoutTests/compositing/repaint/resize-repaint-expected.txt        2014-01-14 19:21:29 UTC (rev 161988)
+++ branches/safari-537.60-branch/LayoutTests/compositing/repaint/resize-repaint-expected.txt        2014-01-14 19:41:43 UTC (rev 161989)
</span><span class="lines">@@ -14,8 +14,7 @@
</span><span class="cx">           (bounds 402.00 207.00)
</span><span class="cx">           (drawsContent 1)
</span><span class="cx">           (repaint rects
</span><del>-            (rect 2.00 104.00 398.00 1.00)
-            (rect 0.00 104.00 402.00 1.00)
</del><ins>+            (rect 0.00 0.00 402.00 207.00)
</ins><span class="cx">           )
</span><span class="cx">         )
</span><span class="cx">       )
</span></span></pre></div>
<a id="branchessafari53760branchSourceWebCore"></a>
<div class="propset"><h4>Property changes: branches/safari-537.60-branch/Source/WebCore</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnmergeinfo"></a>
<div class="modfile"><h4>Modified: svn:mergeinfo</h4></div>
<span class="cx">   + /trunk/Source/WebCore:154470
</span><span class="cx">/trunk/WebCore:53455
</span><a id="branchessafari53760branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-537.60-branch/Source/WebCore/ChangeLog (161988 => 161989)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.60-branch/Source/WebCore/ChangeLog        2014-01-14 19:21:29 UTC (rev 161988)
+++ branches/safari-537.60-branch/Source/WebCore/ChangeLog        2014-01-14 19:41:43 UTC (rev 161989)
</span><span class="lines">@@ -1,3 +1,47 @@
</span><ins>+2014-01-14  Brent Fulgham  &lt;bfulgham@apple.com&gt;
+
+        Merge r154470
+
+    2013-08-22  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+            compositing/geometry/bounds-ignores-hidden-dynamic.html has incorrect initial rendering
+            https://bugs.webkit.org/show_bug.cgi?id=119825
+
+            Reviewed by Tim Horton.
+        
+            r137526 and some earlier commits attempted to avoid unconditionally
+            repainting layers when their size changes, because this was causing
+            TiledBacking layers to repaint when the document size changed.
+        
+            However, the approach required that we have good information about
+            whether size changes require a repaint, which in some cases is hard
+            to determine, especially when RenderLayer changes affect our
+            decisions about which layers are composited.
+        
+            Fix by pushing the decision about whether to repaint on size change
+            into GraphicsLayer. The default is to repaint on size change,
+            but GraphicsLayer provides a function that can be overridden to
+            modify this behavior; GraphicsLayerCA does so to avoid repaints
+            when layers with TiledBackings get resized.
+
+            Test: compositing/repaint/repaint-on-layer-grouping-change.html
+
+            * WebCore.exp.in: WebKit2 needs GraphicsLayer::setSize, which is no longer inline.
+            * platform/graphics/GraphicsLayer.cpp:
+            (WebCore::GraphicsLayer::setOffsetFromRenderer):
+            (WebCore::GraphicsLayer::setSize):
+            * platform/graphics/GraphicsLayer.h:
+            (WebCore::GraphicsLayer::shouldRepaintOnSizeChange):
+            * platform/graphics/ca/GraphicsLayerCA.cpp:
+            (WebCore::GraphicsLayerCA::shouldRepaintOnSizeChange):
+            * platform/graphics/ca/GraphicsLayerCA.h:
+            * rendering/RenderLayerBacking.h: No longer need m_boundsConstrainedByClipping
+            * rendering/RenderLayerBacking.cpp:
+            (WebCore::RenderLayerBacking::RenderLayerBacking):
+            (WebCore::RenderLayerBacking::updateCompositedBounds):
+            (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry): setSize takes
+            care of repainting for us now, so we can remove all the conditional code.
+
</ins><span class="cx"> 2013-11-22  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Merge r159691
</span></span></pre></div>
<a id="branchessafari53760branchSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: branches/safari-537.60-branch/Source/WebCore/WebCore.exp.in (161988 => 161989)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.60-branch/Source/WebCore/WebCore.exp.in        2014-01-14 19:21:29 UTC (rev 161988)
+++ branches/safari-537.60-branch/Source/WebCore/WebCore.exp.in        2014-01-14 19:41:43 UTC (rev 161989)
</span><span class="lines">@@ -1367,6 +1367,7 @@
</span><span class="cx"> __ZNK7WebCore12TextIterator5rangeEv
</span><span class="cx"> __ZNK7WebCore13ContainerNode14childNodeCountEv
</span><span class="cx"> __ZNK7WebCore13ContainerNode9childNodeEj
</span><ins>+__ZN7WebCore13GraphicsLayer7setSizeERKNS_9FloatSizeE
</ins><span class="cx"> __ZNK7WebCore13GraphicsLayer18accumulatedOpacityEv
</span><span class="cx"> __ZNK7WebCore13GraphicsLayer18getDebugBorderInfoERNS_5ColorERf
</span><span class="cx"> __ZNK7WebCore13GraphicsLayer26backingStoreMemoryEstimateEv
</span></span></pre></div>
<a id="branchessafari53760branchSourceWebCoreplatformgraphicsGraphicsLayercpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.60-branch/Source/WebCore/platform/graphics/GraphicsLayer.cpp (161988 => 161989)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.60-branch/Source/WebCore/platform/graphics/GraphicsLayer.cpp        2014-01-14 19:21:29 UTC (rev 161988)
+++ branches/safari-537.60-branch/Source/WebCore/platform/graphics/GraphicsLayer.cpp        2014-01-14 19:41:43 UTC (rev 161989)
</span><span class="lines">@@ -307,6 +307,17 @@
</span><span class="cx">         setNeedsDisplay();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void GraphicsLayer::setSize(const FloatSize&amp; size)
+{
+    if (size == m_size)
+        return;
+    
+    m_size = size;
+
+    if (shouldRepaintOnSizeChange())
+        setNeedsDisplay();
+}
+
</ins><span class="cx"> void GraphicsLayer::setBackgroundColor(const Color&amp; color)
</span><span class="cx"> {
</span><span class="cx">     m_backgroundColor = color;
</span></span></pre></div>
<a id="branchessafari53760branchSourceWebCoreplatformgraphicsGraphicsLayerh"></a>
<div class="modfile"><h4>Modified: branches/safari-537.60-branch/Source/WebCore/platform/graphics/GraphicsLayer.h (161988 => 161989)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.60-branch/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-01-14 19:21:29 UTC (rev 161988)
+++ branches/safari-537.60-branch/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-01-14 19:41:43 UTC (rev 161989)
</span><span class="lines">@@ -292,7 +292,7 @@
</span><span class="cx"> 
</span><span class="cx">     // The size of the layer.
</span><span class="cx">     const FloatSize&amp; size() const { return m_size; }
</span><del>-    virtual void setSize(const FloatSize&amp; size) { m_size = size; }
</del><ins>+    virtual void setSize(const FloatSize&amp;);
</ins><span class="cx"> 
</span><span class="cx">     // The boundOrigin affects the offset at which content is rendered, and sublayers are positioned.
</span><span class="cx">     const FloatPoint&amp; boundsOrigin() const { return m_boundsOrigin; }
</span><span class="lines">@@ -504,6 +504,8 @@
</span><span class="cx">     // rotations of &gt;= 180 degrees
</span><span class="cx">     static int validateTransformOperations(const KeyframeValueList&amp;, bool&amp; hasBigRotation);
</span><span class="cx"> 
</span><ins>+    virtual bool shouldRepaintOnSizeChange() const { return drawsContent(); }
+
</ins><span class="cx">     virtual void setOpacityInternal(float) { }
</span><span class="cx"> 
</span><span class="cx">     // The layer being replicated.
</span></span></pre></div>
<a id="branchessafari53760branchSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.60-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (161988 => 161989)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.60-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2014-01-14 19:21:29 UTC (rev 161988)
+++ branches/safari-537.60-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2014-01-14 19:41:43 UTC (rev 161989)
</span><span class="lines">@@ -677,6 +677,11 @@
</span><span class="cx">     noteLayerPropertyChanged(ContentsRectChanged);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+bool GraphicsLayerCA::shouldRepaintOnSizeChange() const
+{
+    return drawsContent() &amp;&amp; !tiledBacking();
+}
+
</ins><span class="cx"> bool GraphicsLayerCA::addAnimation(const KeyframeValueList&amp; valueList, const IntSize&amp; boxSize, const Animation* anim, const String&amp; animationName, double timeOffset)
</span><span class="cx"> {
</span><span class="cx">     ASSERT(!animationName.isEmpty());
</span></span></pre></div>
<a id="branchessafari53760branchSourceWebCoreplatformgraphicscaGraphicsLayerCAh"></a>
<div class="modfile"><h4>Modified: branches/safari-537.60-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (161988 => 161989)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.60-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-01-14 19:21:29 UTC (rev 161988)
+++ branches/safari-537.60-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-01-14 19:41:43 UTC (rev 161989)
</span><span class="lines">@@ -176,6 +176,8 @@
</span><span class="cx"> 
</span><span class="cx">     virtual double backingStoreMemoryEstimate() const;
</span><span class="cx"> 
</span><ins>+    virtual bool shouldRepaintOnSizeChange() const OVERRIDE;
+
</ins><span class="cx">     void updateOpacityOnLayer();
</span><span class="cx">     
</span><span class="cx"> #if ENABLE(CSS_FILTERS)
</span></span></pre></div>
<a id="branchessafari53760branchSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-537.60-branch/Source/WebCore/rendering/RenderLayerBacking.cpp (161988 => 161989)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.60-branch/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-01-14 19:21:29 UTC (rev 161988)
+++ branches/safari-537.60-branch/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-01-14 19:41:43 UTC (rev 161989)
</span><span class="lines">@@ -110,7 +110,6 @@
</span><span class="cx">     : m_owningLayer(layer)
</span><span class="cx">     , m_scrollLayerID(0)
</span><span class="cx">     , m_artificiallyInflatedBounds(false)
</span><del>-    , m_boundsConstrainedByClipping(false)
</del><span class="cx">     , m_isMainFrameRenderViewLayer(false)
</span><span class="cx">     , m_usingTiledCacheLayer(false)
</span><span class="cx">     , m_requiresOwnBackingStore(true)
</span><span class="lines">@@ -448,9 +447,7 @@
</span><span class="cx">         clippingBounds.move(-delta.x(), -delta.y());
</span><span class="cx"> 
</span><span class="cx">         layerBounds.intersect(pixelSnappedIntRect(clippingBounds));
</span><del>-        m_boundsConstrainedByClipping = true;
-    } else
-        m_boundsConstrainedByClipping = false;
</del><ins>+    }
</ins><span class="cx">     
</span><span class="cx">     // If the element has a transform-origin that has fixed lengths, and the renderer has zero size,
</span><span class="cx">     // then we need to ensure that the compositing layer has non-zero size so that we can apply
</span><span class="lines">@@ -700,17 +697,9 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     m_graphicsLayer-&gt;setPosition(FloatPoint(relativeCompositingBounds.location() - graphicsLayerParentLocation));
</span><ins>+    m_graphicsLayer-&gt;setSize(contentsSize);
</ins><span class="cx">     m_graphicsLayer-&gt;setOffsetFromRenderer(toIntSize(localCompositingBounds.location()));
</span><span class="cx">     
</span><del>-    FloatSize oldSize = m_graphicsLayer-&gt;size();
-    if (oldSize != contentsSize) {
-        m_graphicsLayer-&gt;setSize(contentsSize);
-        // Usually invalidation will happen via layout etc, but if we've affected the layer
-        // size by constraining relative to a clipping ancestor or the viewport, we
-        // have to invalidate to avoid showing stretched content.
-        if (m_boundsConstrainedByClipping)
-            m_graphicsLayer-&gt;setNeedsDisplay();
-    }
</del><span class="cx">     if (!m_isMainFrameRenderViewLayer) {
</span><span class="cx">         // For non-root layers, background is always painted by the primary graphics layer.
</span><span class="cx">         ASSERT(!m_backgroundLayer);
</span><span class="lines">@@ -727,10 +716,7 @@
</span><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (m_maskLayer) {
</span><del>-        if (m_maskLayer-&gt;size() != m_graphicsLayer-&gt;size()) {
-            m_maskLayer-&gt;setSize(m_graphicsLayer-&gt;size());
-            m_maskLayer-&gt;setNeedsDisplay();
-        }
</del><ins>+        m_maskLayer-&gt;setSize(m_graphicsLayer-&gt;size());
</ins><span class="cx">         m_maskLayer-&gt;setPosition(FloatPoint());
</span><span class="cx">         m_maskLayer-&gt;setOffsetFromRenderer(m_graphicsLayer-&gt;offsetFromRenderer());
</span><span class="cx">     }
</span><span class="lines">@@ -787,10 +773,7 @@
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         m_foregroundLayer-&gt;setPosition(foregroundPosition);
</span><del>-        if (foregroundSize != m_foregroundLayer-&gt;size()) {
-            m_foregroundLayer-&gt;setSize(foregroundSize);
-            m_foregroundLayer-&gt;setNeedsDisplay();
-        }
</del><ins>+        m_foregroundLayer-&gt;setSize(foregroundSize);
</ins><span class="cx">         m_foregroundLayer-&gt;setOffsetFromRenderer(foregroundOffset);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -803,10 +786,7 @@
</span><span class="cx">             backgroundSize = frameView-&gt;visibleContentRect().size();
</span><span class="cx">         }
</span><span class="cx">         m_backgroundLayer-&gt;setPosition(backgroundPosition);
</span><del>-        if (backgroundSize != m_backgroundLayer-&gt;size()) {
-            m_backgroundLayer-&gt;setSize(backgroundSize);
-            m_backgroundLayer-&gt;setNeedsDisplay();
-        }
</del><ins>+        m_backgroundLayer-&gt;setSize(backgroundSize);
</ins><span class="cx">         m_backgroundLayer-&gt;setOffsetFromRenderer(m_graphicsLayer-&gt;offsetFromRenderer());
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="lines">@@ -850,9 +830,7 @@
</span><span class="cx">         m_scrollingContentsLayer-&gt;setOffsetFromRenderer(scrollingContentsOffset, GraphicsLayer::DontSetNeedsDisplay);
</span><span class="cx"> 
</span><span class="cx">         if (m_foregroundLayer) {
</span><del>-            if (m_foregroundLayer-&gt;size() != m_scrollingContentsLayer-&gt;size())
-                m_foregroundLayer-&gt;setSize(m_scrollingContentsLayer-&gt;size());
-            m_foregroundLayer-&gt;setNeedsDisplay();
</del><ins>+            m_foregroundLayer-&gt;setSize(m_scrollingContentsLayer-&gt;size());
</ins><span class="cx">             m_foregroundLayer-&gt;setOffsetFromRenderer(m_scrollingContentsLayer-&gt;offsetFromRenderer());
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="branchessafari53760branchSourceWebCorerenderingRenderLayerBackingh"></a>
<div class="modfile"><h4>Modified: branches/safari-537.60-branch/Source/WebCore/rendering/RenderLayerBacking.h (161988 => 161989)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-537.60-branch/Source/WebCore/rendering/RenderLayerBacking.h        2014-01-14 19:21:29 UTC (rev 161988)
+++ branches/safari-537.60-branch/Source/WebCore/rendering/RenderLayerBacking.h        2014-01-14 19:41:43 UTC (rev 161989)
</span><span class="lines">@@ -300,7 +300,6 @@
</span><span class="cx">     IntRect m_compositedBounds;
</span><span class="cx"> 
</span><span class="cx">     bool m_artificiallyInflatedBounds; // bounds had to be made non-zero to make transform-origin work
</span><del>-    bool m_boundsConstrainedByClipping;
</del><span class="cx">     bool m_isMainFrameRenderViewLayer;
</span><span class="cx">     bool m_usingTiledCacheLayer;
</span><span class="cx">     bool m_requiresOwnBackingStore;
</span></span></pre>
</div>
</div>

</body>
</html>