<!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>[167529] 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/167529">167529</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2014-04-18 22:31:39 -0700 (Fri, 18 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Contents of directly composited image layers are sometimes missing
https://bugs.webkit.org/show_bug.cgi?id=131880

Reviewed by Tim Horton.

Source/WebCore:
RenderLayerBacking::updateGraphicsLayerGeometry() tested whether a
GraphicsLayer had a contents layer to determine whether to call code
that updates the contents rect. However, on Mac, we don't make a contents
layer until later at layer flush time. That would result in an empty
contentsRect being set.

Fix by renaming GraphicsLayer::hasContentsLayer() to usesContentsLayer(),
and on Mac consulting the m_contentsLayerPurpose flag, which is set
at the appropriate time.

Test: compositing/images/update-content-rect.html

* platform/ScrollView.cpp:
(WebCore::positionScrollbarLayer):
* platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::getDebugBorderInfo):
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::usesContentsLayer):
(WebCore::GraphicsLayer::hasContentsLayer): Deleted.
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::hasContentsLayer): Deleted.
* platform/graphics/texmap/GraphicsLayerTextureMapper.h:
(WebCore::GraphicsLayerTextureMapper::usesContentsLayer):
(WebCore::GraphicsLayerTextureMapper::hasContentsLayer): Deleted.
* platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
(WebCore::RenderLayerBacking::positionOverflowControlsLayers):
(WebCore::RenderLayerBacking::compositingLayerType):

LayoutTests:
Test that that shows the issue in Safari, but not in the test
runner because of timing issues, but maybe it will some day.

* compositing/images/update-content-rect-expected.html: Added.
* compositing/images/update-content-rect.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="#trunkSourceWebCoreplatformScrollViewcpp">trunk/Source/WebCore/platform/ScrollView.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayercpp">trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayerh">trunk/Source/WebCore/platform/graphics/GraphicsLayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapGraphicsLayerTextureMapperh">trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayerh">trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerBackingcpp">trunk/Source/WebCore/rendering/RenderLayerBacking.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestscompositingimagesupdatecontentrectexpectedhtml">trunk/LayoutTests/compositing/images/update-content-rect-expected.html</a></li>
<li><a href="#trunkLayoutTestscompositingimagesupdatecontentrecthtml">trunk/LayoutTests/compositing/images/update-content-rect.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (167528 => 167529)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-04-19 05:19:30 UTC (rev 167528)
+++ trunk/LayoutTests/ChangeLog        2014-04-19 05:31:39 UTC (rev 167529)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-04-18  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Contents of directly composited image layers are sometimes missing
+        https://bugs.webkit.org/show_bug.cgi?id=131880
+
+        Reviewed by Tim Horton.
+        
+        Test that that shows the issue in Safari, but not in the test
+        runner because of timing issues, but maybe it will some day.
+
+        * compositing/images/update-content-rect-expected.html: Added.
+        * compositing/images/update-content-rect.html: Added.
+
</ins><span class="cx"> 2014-04-18  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r167527.
</span></span></pre></div>
<a id="trunkLayoutTestscompositingimagesupdatecontentrectexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/compositing/images/update-content-rect-expected.html (0 => 167529)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/compositing/images/update-content-rect-expected.html                                (rev 0)
+++ trunk/LayoutTests/compositing/images/update-content-rect-expected.html        2014-04-19 05:31:39 UTC (rev 167529)
</span><span class="lines">@@ -0,0 +1,18 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        img {
+            width: 200px;
+            height: 180px;
+        }
+        
+        .composited {
+          -webkit-transform: translateZ(0);
+        }
+    &lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;img id=&quot;image&quot; class=&quot;composited&quot; src=&quot;../resources/alpha-gradient-small.png&quot;&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestscompositingimagesupdatecontentrecthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/compositing/images/update-content-rect.html (0 => 167529)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/compositing/images/update-content-rect.html                                (rev 0)
+++ trunk/LayoutTests/compositing/images/update-content-rect.html        2014-04-19 05:31:39 UTC (rev 167529)
</span><span class="lines">@@ -0,0 +1,13 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;html&gt;
+&lt;head&gt;
+    &lt;style&gt;
+        .composited {
+          -webkit-transform: translateZ(0);
+        }
+    &lt;/style&gt;
+&lt;/head&gt;
+&lt;body&gt;
+    &lt;img id=&quot;image&quot; class=&quot;composited&quot; src=&quot;../resources/alpha-gradient-small.png&quot;&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (167528 => 167529)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-19 05:19:30 UTC (rev 167528)
+++ trunk/Source/WebCore/ChangeLog        2014-04-19 05:31:39 UTC (rev 167529)
</span><span class="lines">@@ -1,3 +1,40 @@
</span><ins>+2014-04-18  Simon Fraser  &lt;simon.fraser@apple.com&gt;
+
+        Contents of directly composited image layers are sometimes missing
+        https://bugs.webkit.org/show_bug.cgi?id=131880
+
+        Reviewed by Tim Horton.
+        
+        RenderLayerBacking::updateGraphicsLayerGeometry() tested whether a
+        GraphicsLayer had a contents layer to determine whether to call code
+        that updates the contents rect. However, on Mac, we don't make a contents
+        layer until later at layer flush time. That would result in an empty
+        contentsRect being set.
+        
+        Fix by renaming GraphicsLayer::hasContentsLayer() to usesContentsLayer(),
+        and on Mac consulting the m_contentsLayerPurpose flag, which is set
+        at the appropriate time.
+
+        Test: compositing/images/update-content-rect.html
+
+        * platform/ScrollView.cpp:
+        (WebCore::positionScrollbarLayer):
+        * platform/graphics/GraphicsLayer.cpp:
+        (WebCore::GraphicsLayer::getDebugBorderInfo):
+        * platform/graphics/GraphicsLayer.h:
+        (WebCore::GraphicsLayer::usesContentsLayer):
+        (WebCore::GraphicsLayer::hasContentsLayer): Deleted.
+        * platform/graphics/ca/GraphicsLayerCA.h:
+        (WebCore::GraphicsLayerCA::hasContentsLayer): Deleted.
+        * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
+        (WebCore::GraphicsLayerTextureMapper::usesContentsLayer):
+        (WebCore::GraphicsLayerTextureMapper::hasContentsLayer): Deleted.
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
+        (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
+        (WebCore::RenderLayerBacking::compositingLayerType):
+
</ins><span class="cx"> 2014-04-18  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r167527.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformScrollViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/ScrollView.cpp (167528 => 167529)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/ScrollView.cpp        2014-04-19 05:19:30 UTC (rev 167528)
+++ trunk/Source/WebCore/platform/ScrollView.cpp        2014-04-19 05:31:39 UTC (rev 167529)
</span><span class="lines">@@ -1049,7 +1049,7 @@
</span><span class="cx"> 
</span><span class="cx">     graphicsLayer-&gt;setSize(scrollbarRect.size());
</span><span class="cx"> 
</span><del>-    if (graphicsLayer-&gt;hasContentsLayer()) {
</del><ins>+    if (graphicsLayer-&gt;usesContentsLayer()) {
</ins><span class="cx">         graphicsLayer-&gt;setContentsRect(IntRect(0, 0, scrollbarRect.width(), scrollbarRect.height()));
</span><span class="cx">         return;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp (167528 => 167529)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp        2014-04-19 05:19:30 UTC (rev 167528)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.cpp        2014-04-19 05:31:39 UTC (rev 167529)
</span><span class="lines">@@ -370,7 +370,7 @@
</span><span class="cx">         return;
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (hasContentsLayer()) {
</del><ins>+    if (usesContentsLayer()) {
</ins><span class="cx">         color = Color(255, 150, 255, 200); // non-painting layer with contents: pink
</span><span class="cx">         width = 2;
</span><span class="cx">         return;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (167528 => 167529)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-04-19 05:19:30 UTC (rev 167528)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-04-19 05:31:39 UTC (rev 167529)
</span><span class="lines">@@ -408,7 +408,7 @@
</span><span class="cx">     // FIXME: webkit.org/b/109658
</span><span class="cx">     // Should unify setContentsToMedia and setContentsToCanvas
</span><span class="cx">     virtual void setContentsToPlatformLayer(PlatformLayer* layer) { setContentsToMedia(layer); }
</span><del>-    virtual bool hasContentsLayer() const { return false; }
</del><ins>+    virtual bool usesContentsLayer() const { return false; }
</ins><span class="cx"> 
</span><span class="cx">     // Callback from the underlying graphics system to draw layer contents.
</span><span class="cx">     void paintGraphicsLayerContents(GraphicsContext&amp;, const FloatRect&amp; clip);
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (167528 => 167529)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-04-19 05:19:30 UTC (rev 167528)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-04-19 05:31:39 UTC (rev 167529)
</span><span class="lines">@@ -133,7 +133,7 @@
</span><span class="cx">     virtual void setContentsToCanvas(PlatformLayer*);
</span><span class="cx">     virtual void setContentsToSolidColor(const Color&amp;);
</span><span class="cx"> 
</span><del>-    virtual bool hasContentsLayer() const { return m_contentsLayer; }
</del><ins>+    virtual bool usesContentsLayer() const override { return m_contentsLayerPurpose != NoContentsLayer; }
</ins><span class="cx">     
</span><span class="cx">     virtual void setShowDebugBorder(bool) override;
</span><span class="cx">     virtual void setShowRepaintCounter(bool) override;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapGraphicsLayerTextureMapperh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h (167528 => 167529)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h        2014-04-19 05:19:30 UTC (rev 167528)
+++ trunk/Source/WebCore/platform/graphics/texmap/GraphicsLayerTextureMapper.h        2014-04-19 05:31:39 UTC (rev 167529)
</span><span class="lines">@@ -76,7 +76,7 @@
</span><span class="cx">     virtual void flushCompositingState(const FloatRect&amp;);
</span><span class="cx">     virtual void flushCompositingStateForThisLayerOnly();
</span><span class="cx">     virtual void setName(const String&amp; name);
</span><del>-    virtual bool hasContentsLayer() const { return m_contentsLayer; }
</del><ins>+    virtual bool usesContentsLayer() const { return m_contentsLayer; }
</ins><span class="cx">     virtual PlatformLayer* platformLayer() const { return m_contentsLayer; }
</span><span class="cx"> 
</span><span class="cx">     inline int changeMask() const { return m_changeMask; }
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicstexmapcoordinatedCoordinatedGraphicsLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h (167528 => 167529)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h        2014-04-19 05:19:30 UTC (rev 167528)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h        2014-04-19 05:31:39 UTC (rev 167529)
</span><span class="lines">@@ -109,7 +109,7 @@
</span><span class="cx">     virtual void removeAnimation(const String&amp;) override;
</span><span class="cx">     virtual void suspendAnimations(double time) override;
</span><span class="cx">     virtual void resumeAnimations() override;
</span><del>-    virtual bool hasContentsLayer() const override { return m_canvasPlatformLayer || m_compositedImage; }
</del><ins>+    virtual bool usesContentsLayer() const override { return m_canvasPlatformLayer || m_compositedImage; }
</ins><span class="cx"> 
</span><span class="cx">     void syncPendingStateChangesIncludingSubLayers();
</span><span class="cx">     void updateContentBuffersIncludingSubLayers();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerBackingcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (167528 => 167529)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-04-19 05:19:30 UTC (rev 167528)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp        2014-04-19 05:31:39 UTC (rev 167529)
</span><span class="lines">@@ -987,7 +987,7 @@
</span><span class="cx"> 
</span><span class="cx">     bool didUpdateContentsRect = false;
</span><span class="cx">     updateDirectlyCompositedContents(isSimpleContainer, didUpdateContentsRect);
</span><del>-    if (!didUpdateContentsRect &amp;&amp; m_graphicsLayer-&gt;hasContentsLayer())
</del><ins>+    if (!didUpdateContentsRect &amp;&amp; m_graphicsLayer-&gt;usesContentsLayer())
</ins><span class="cx">         resetContentsRect();
</span><span class="cx"> 
</span><span class="cx">     updateDrawsContent(isSimpleContainer);
</span><span class="lines">@@ -1275,24 +1275,24 @@
</span><span class="cx">         IntRect hBarRect = m_owningLayer.rectForHorizontalScrollbar(borderBox);
</span><span class="cx">         layer-&gt;setPosition(hBarRect.location() - offsetFromRenderer);
</span><span class="cx">         layer-&gt;setSize(hBarRect.size());
</span><del>-        if (layer-&gt;hasContentsLayer()) {
</del><ins>+        if (layer-&gt;usesContentsLayer()) {
</ins><span class="cx">             IntRect barRect = IntRect(IntPoint(), hBarRect.size());
</span><span class="cx">             layer-&gt;setContentsRect(barRect);
</span><span class="cx">             layer-&gt;setContentsClippingRect(barRect);
</span><span class="cx">         }
</span><del>-        layer-&gt;setDrawsContent(m_owningLayer.horizontalScrollbar() &amp;&amp; !layer-&gt;hasContentsLayer());
</del><ins>+        layer-&gt;setDrawsContent(m_owningLayer.horizontalScrollbar() &amp;&amp; !layer-&gt;usesContentsLayer());
</ins><span class="cx">     }
</span><span class="cx">     
</span><span class="cx">     if (GraphicsLayer* layer = layerForVerticalScrollbar()) {
</span><span class="cx">         IntRect vBarRect = m_owningLayer.rectForVerticalScrollbar(borderBox);
</span><span class="cx">         layer-&gt;setPosition(vBarRect.location() - offsetFromRenderer);
</span><span class="cx">         layer-&gt;setSize(vBarRect.size());
</span><del>-        if (layer-&gt;hasContentsLayer()) {
</del><ins>+        if (layer-&gt;usesContentsLayer()) {
</ins><span class="cx">             IntRect barRect = IntRect(IntPoint(), vBarRect.size());
</span><span class="cx">             layer-&gt;setContentsRect(barRect);
</span><span class="cx">             layer-&gt;setContentsClippingRect(barRect);
</span><span class="cx">         }
</span><del>-        layer-&gt;setDrawsContent(m_owningLayer.verticalScrollbar() &amp;&amp; !layer-&gt;hasContentsLayer());
</del><ins>+        layer-&gt;setDrawsContent(m_owningLayer.verticalScrollbar() &amp;&amp; !layer-&gt;usesContentsLayer());
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (GraphicsLayer* layer = layerForScrollCorner()) {
</span><span class="lines">@@ -2580,7 +2580,7 @@
</span><span class="cx"> 
</span><span class="cx"> CompositingLayerType RenderLayerBacking::compositingLayerType() const
</span><span class="cx"> {
</span><del>-    if (m_graphicsLayer-&gt;hasContentsLayer())
</del><ins>+    if (m_graphicsLayer-&gt;usesContentsLayer())
</ins><span class="cx">         return MediaCompositingLayer;
</span><span class="cx"> 
</span><span class="cx">     if (m_graphicsLayer-&gt;drawsContent())
</span></span></pre>
</div>
</div>

</body>
</html>