<!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>[171498] trunk/Source</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/171498">171498</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2014-07-23 17:23:03 -0700 (Wed, 23 Jul 2014)</dd>
</dl>
<h3>Log Message</h3>
<pre>[iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
https://bugs.webkit.org/show_bug.cgi?id=135221
Reviewed by Tim Horton.
Source/WebCore:
Add a function on GraphicsLayer to force a flush of the layer position
to the underlying graphics system, so that when layers cease being
scroll-coordinated, we can ensure that their layers are repositioned
in the correct location.
* WebCore.exp.in:
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::forcePositionUpdate):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::forcePositionUpdate):
* platform/graphics/ca/GraphicsLayerCA.h:
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
Source/WebKit2:
The call to didCommitLayerTree() can cause one or two visible rect updates,
via changes to the UIScrollView contentSize and contentOffset. As a result, we
would notify the scrolling tree about a viewport change, but using the old
scrolling tree rather than the new one, so we could move layers around for
nodes which are about to be removed from the tree.
Fix by m_webPageProxy->didCommitLayerTree() after the scrolling tree has been
committed.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreWebCoreexpin">trunk/Source/WebCore/WebCore.exp.in</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicsGraphicsLayerh">trunk/Source/WebCore/platform/graphics/GraphicsLayer.h</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp</a></li>
<li><a href="#trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh">trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderLayerCompositorcpp">trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp</a></li>
<li><a href="#trunkSourceWebKit2ChangeLog">trunk/Source/WebKit2/ChangeLog</a></li>
<li><a href="#trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm">trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (171497 => 171498)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-07-24 00:08:10 UTC (rev 171497)
+++ trunk/Source/WebCore/ChangeLog        2014-07-24 00:23:03 UTC (rev 171498)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2014-07-23 Simon Fraser <simon.fraser@apple.com>
+
+ [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
+ https://bugs.webkit.org/show_bug.cgi?id=135221
+
+ Reviewed by Tim Horton.
+
+ Add a function on GraphicsLayer to force a flush of the layer position
+ to the underlying graphics system, so that when layers cease being
+ scroll-coordinated, we can ensure that their layers are repositioned
+ in the correct location.
+
+ * WebCore.exp.in:
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::forcePositionUpdate):
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::forcePositionUpdate):
+ * platform/graphics/ca/GraphicsLayerCA.h:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::detachScrollCoordinatedLayer):
+
</ins><span class="cx"> 2014-07-23 Pratik Solanki <psolanki@apple.com>
</span><span class="cx">
</span><span class="cx"> Get rid of SharedBuffer::NSDataRetainPtrWithoutImplicitConversionOperator
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCoreexpin"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.exp.in (171497 => 171498)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.exp.in        2014-07-24 00:08:10 UTC (rev 171497)
+++ trunk/Source/WebCore/WebCore.exp.in        2014-07-24 00:23:03 UTC (rev 171498)
</span><span class="lines">@@ -579,6 +579,7 @@
</span><span class="cx"> __ZN7WebCore15GraphicsLayerCA18setOpacityInternalEf
</span><span class="cx"> __ZN7WebCore15GraphicsLayerCA18setReplicatedLayerEPNS_13GraphicsLayerE
</span><span class="cx"> __ZN7WebCore15GraphicsLayerCA18setShowDebugBorderEb
</span><ins>+__ZN7WebCore15GraphicsLayerCA19forcePositionUpdateEv
</ins><span class="cx"> __ZN7WebCore15GraphicsLayerCA19setContentsToCanvasEP7CALayer
</span><span class="cx"> __ZN7WebCore15GraphicsLayerCA19setCustomAppearanceENS_13GraphicsLayer16CustomAppearanceE
</span><span class="cx"> __ZN7WebCore15GraphicsLayerCA20setChildrenTransformERKNS_20TransformationMatrixE
</span><span class="lines">@@ -2962,6 +2963,17 @@
</span><span class="cx"> __ZN7WebCore14ResourceHandle25continueWillCacheResponseEP19NSCachedURLResponse
</span><span class="cx"> #endif
</span><span class="cx">
</span><ins>+#if USE(CONTENT_FILTERING)
+__ZN7WebCore13ContentFilter6decodeEP17NSKeyedUnarchiverRS0_
+__ZN7WebCore13ContentFilterC1Ev
+__ZN7WebCore13ContentFilterD1Ev
+__ZNK7WebCore13ContentFilter6encodeEP15NSKeyedArchiver
+#endif
+
+#if USE(CONTENT_FILTERING) && PLATFORM(IOS)
+__ZN7WebCore13ContentFilter43handleUnblockRequestAndDispatchIfSuccessfulERKNS_15ResourceRequestENSt3__18functionIFvvEEE
+#endif
+
</ins><span class="cx"> #if ENABLE(CONTEXT_MENUS)
</span><span class="cx"> __ZN7WebCore11ContextMenu22setPlatformDescriptionEP14NSMutableArray
</span><span class="cx"> __ZN7WebCore12EventHandler20sendContextMenuEventERKNS_18PlatformMouseEventE
</span><span class="lines">@@ -3465,13 +3477,3 @@
</span><span class="cx"> #if ENABLE(VIEW_MODE_CSS_MEDIA)
</span><span class="cx"> __ZN7WebCore4Page11setViewModeENS0_8ViewModeE
</span><span class="cx"> #endif
</span><del>-
-#if USE(CONTENT_FILTERING)
-#if PLATFORM(IOS)
-__ZN7WebCore13ContentFilter43handleUnblockRequestAndDispatchIfSuccessfulERKNS_15ResourceRequestENSt3__18functionIFvvEEE
-#endif
-__ZN7WebCore13ContentFilter6decodeEP17NSKeyedUnarchiverRS0_
-__ZN7WebCore13ContentFilterC1Ev
-__ZN7WebCore13ContentFilterD1Ev
-__ZNK7WebCore13ContentFilter6encodeEP15NSKeyedArchiver
-#endif
</del></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (171497 => 171498)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-07-24 00:08:10 UTC (rev 171497)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2014-07-24 00:23:03 UTC (rev 171498)
</span><span class="lines">@@ -291,6 +291,9 @@
</span><span class="cx"> const FloatPoint& position() const { return m_position; }
</span><span class="cx"> virtual void setPosition(const FloatPoint& p) { m_position = p; }
</span><span class="cx">
</span><ins>+ // Ensure that the position is flushed to the underlying graphics framework.
+ virtual void forcePositionUpdate() { }
+
</ins><span class="cx"> // For platforms that move underlying platform layers on a different thread for scrolling; just update the GraphicsLayer state.
</span><span class="cx"> virtual void syncPosition(const FloatPoint& p) { m_position = p; }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (171497 => 171498)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2014-07-24 00:08:10 UTC (rev 171497)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2014-07-24 00:23:03 UTC (rev 171498)
</span><span class="lines">@@ -502,6 +502,11 @@
</span><span class="cx"> noteLayerPropertyChanged(GeometryChanged);
</span><span class="cx"> }
</span><span class="cx">
</span><ins>+void GraphicsLayerCA::forcePositionUpdate()
+{
+ noteLayerPropertyChanged(GeometryChanged);
+}
+
</ins><span class="cx"> void GraphicsLayerCA::setAnchorPoint(const FloatPoint3D& point)
</span><span class="cx"> {
</span><span class="cx"> if (point == m_anchorPoint)
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (171497 => 171498)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-07-24 00:08:10 UTC (rev 171497)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2014-07-24 00:23:03 UTC (rev 171498)
</span><span class="lines">@@ -80,6 +80,8 @@
</span><span class="cx"> virtual void setReplicatedLayer(GraphicsLayer*) override;
</span><span class="cx">
</span><span class="cx"> virtual void setPosition(const FloatPoint&) override;
</span><ins>+ virtual void forcePositionUpdate() override;
+
</ins><span class="cx"> virtual void setAnchorPoint(const FloatPoint3D&) override;
</span><span class="cx"> virtual void setSize(const FloatSize&) override;
</span><span class="cx"> virtual void setBoundsOrigin(const FloatPoint&) override;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (171497 => 171498)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2014-07-24 00:08:10 UTC (rev 171497)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2014-07-24 00:23:03 UTC (rev 171498)
</span><span class="lines">@@ -3759,8 +3759,10 @@
</span><span class="cx"> if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(FrameScrollingNode))
</span><span class="cx"> m_scrollingNodeToLayerMap.remove(nodeID);
</span><span class="cx">
</span><del>- if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(FixedNode))
</del><ins>+ if (ScrollingNodeID nodeID = backing->scrollingNodeIDForRole(FixedNode)) {
</ins><span class="cx"> m_scrollingNodeToLayerMap.remove(nodeID);
</span><ins>+ backing->graphicsLayer()->forcePositionUpdate();
+ }
</ins><span class="cx">
</span><span class="cx"> backing->detachFromScrollingCoordinator();
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (171497 => 171498)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2014-07-24 00:08:10 UTC (rev 171497)
+++ trunk/Source/WebKit2/ChangeLog        2014-07-24 00:23:03 UTC (rev 171498)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2014-07-23 Simon Fraser <simon.fraser@apple.com>
+
+ [iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
+ https://bugs.webkit.org/show_bug.cgi?id=135221
+
+ Reviewed by Tim Horton.
+
+ The call to didCommitLayerTree() can cause one or two visible rect updates,
+ via changes to the UIScrollView contentSize and contentOffset. As a result, we
+ would notify the scrolling tree about a viewport change, but using the old
+ scrolling tree rather than the new one, so we could move layers around for
+ nodes which are about to be removed from the tree.
+
+ Fix by m_webPageProxy->didCommitLayerTree() after the scrolling tree has been
+ committed.
+
+ * UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
+ (WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
+
</ins><span class="cx"> 2014-07-23 Oliver Hunt <oliver@apple.com>
</span><span class="cx">
</span><span class="cx"> Add a pseudo target to create sandbox override roots
</span></span></pre></div>
<a id="trunkSourceWebKit2UIProcessmacRemoteLayerTreeDrawingAreaProxymm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm (171497 => 171498)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2014-07-24 00:08:10 UTC (rev 171497)
+++ trunk/Source/WebKit2/UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm        2014-07-24 00:23:03 UTC (rev 171498)
</span><span class="lines">@@ -200,10 +200,6 @@
</span><span class="cx"> if (m_remoteLayerTreeHost.updateLayerTree(layerTreeTransaction))
</span><span class="cx"> m_webPageProxy->setAcceleratedCompositingRootLayer(m_remoteLayerTreeHost.rootLayer());
</span><span class="cx">
</span><del>-#if PLATFORM(IOS)
- m_webPageProxy->didCommitLayerTree(layerTreeTransaction);
-#endif
-
</del><span class="cx"> #if ENABLE(ASYNC_SCROLLING)
</span><span class="cx"> bool fixedOrStickyLayerChanged = false;
</span><span class="cx"> m_webPageProxy->scrollingCoordinatorProxy()->updateScrollingTree(scrollingTreeTransaction, fixedOrStickyLayerChanged);
</span><span class="lines">@@ -217,6 +213,10 @@
</span><span class="cx"> #endif
</span><span class="cx"> #endif // ENABLE(ASYNC_SCROLLING)
</span><span class="cx">
</span><ins>+#if PLATFORM(IOS)
+ m_webPageProxy->didCommitLayerTree(layerTreeTransaction);
+#endif
+
</ins><span class="cx"> if (m_debugIndicatorLayerTreeHost) {
</span><span class="cx"> float scale = indicatorScale(layerTreeTransaction.contentsSize());
</span><span class="cx"> bool rootLayerChanged = m_debugIndicatorLayerTreeHost->updateLayerTree(layerTreeTransaction, scale);
</span></span></pre>
</div>
</div>
</body>
</html>