<!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>[186155] 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/186155">186155</a></dd>
<dt>Author</dt> <dd>simon.fraser@apple.com</dd>
<dt>Date</dt> <dd>2015-06-30 18:08:41 -0700 (Tue, 30 Jun 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>[iOS] Missing tiles inside position:fixed on scrolling
https://bugs.webkit.org/show_bug.cgi?id=146485
rdar://problem/21226861
Reviewed by Tim Horton.
Layer flushing adjusts the coverage rect for tiled layers, but does so at times
when position:fixed layers are moved around by the scrolling tree. The computed
coverage rect then doesn't reflect the layer's on-screen position, causing missing
tiles.
Fix by pushing the notion of being in a "stable state" onto FrameView, and passing
that state into the layer flush. When not in a stable state, flushing doesn't change
the visible and coverage rects for layers that are viewport-constrained.
Source/WebCore:
* page/FrameView.cpp:
(WebCore::FrameView::reset):
* page/FrameView.h: Remove some velocity-related data members that were unused.
* platform/graphics/GraphicsLayer.h:
(WebCore::GraphicsLayer::flushCompositingState):
(WebCore::GraphicsLayer::flushCompositingStateForThisLayerOnly):
* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::flushCompositingState):
(WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
(WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): If this is a viewport-constrained
layer, and the viewport is not stable, don't touch the rects.
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
* platform/graphics/ca/GraphicsLayerCA.h:
(WebCore::GraphicsLayerCA::CommitState::CommitState):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::flushPendingLayerChanges):
Source/WebKit2:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewcpp">trunk/Source/WebCore/page/FrameView.cpp</a></li>
<li><a href="#trunkSourceWebCorepageFrameViewh">trunk/Source/WebCore/page/FrameView.h</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="#trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm">trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm</a></li>
<li><a href="#trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm">trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (186154 => 186155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-07-01 01:01:13 UTC (rev 186154)
+++ trunk/Source/WebCore/ChangeLog        2015-07-01 01:08:41 UTC (rev 186155)
</span><span class="lines">@@ -1,5 +1,39 @@
</span><span class="cx"> 2015-06-30 Simon Fraser <simon.fraser@apple.com>
</span><span class="cx">
</span><ins>+ [iOS] Missing tiles inside position:fixed on scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=146485
+ rdar://problem/21226861
+
+ Reviewed by Tim Horton.
+
+ Layer flushing adjusts the coverage rect for tiled layers, but does so at times
+ when position:fixed layers are moved around by the scrolling tree. The computed
+ coverage rect then doesn't reflect the layer's on-screen position, causing missing
+ tiles.
+
+ Fix by pushing the notion of being in a "stable state" onto FrameView, and passing
+ that state into the layer flush. When not in a stable state, flushing doesn't change
+ the visible and coverage rects for layers that are viewport-constrained.
+
+ * page/FrameView.cpp:
+ (WebCore::FrameView::reset):
+ * page/FrameView.h: Remove some velocity-related data members that were unused.
+ * platform/graphics/GraphicsLayer.h:
+ (WebCore::GraphicsLayer::flushCompositingState):
+ (WebCore::GraphicsLayer::flushCompositingStateForThisLayerOnly):
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::flushCompositingState):
+ (WebCore::GraphicsLayerCA::flushCompositingStateForThisLayerOnly):
+ (WebCore::GraphicsLayerCA::setVisibleAndCoverageRects): If this is a viewport-constrained
+ layer, and the viewport is not stable, don't touch the rects.
+ (WebCore::GraphicsLayerCA::recursiveCommitChanges):
+ * platform/graphics/ca/GraphicsLayerCA.h:
+ (WebCore::GraphicsLayerCA::CommitState::CommitState):
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::flushPendingLayerChanges):
+
+2015-06-30 Simon Fraser <simon.fraser@apple.com>
+
</ins><span class="cx"> Rename GraphicsLayer's allowsBackingStoreDetachment to isViewportConstrained
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=146483
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.cpp (186154 => 186155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.cpp        2015-07-01 01:01:13 UTC (rev 186154)
+++ trunk/Source/WebCore/page/FrameView.cpp        2015-07-01 01:08:41 UTC (rev 186155)
</span><span class="lines">@@ -188,10 +188,6 @@
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> , m_useCustomFixedPositionLayoutRect(false)
</span><span class="cx"> , m_useCustomSizeForResizeEvent(false)
</span><del>- , m_horizontalVelocity(0)
- , m_verticalVelocity(0)
- , m_scaleChangeRate(0)
- , m_lastVelocityUpdateTime(0)
</del><span class="cx"> #endif
</span><span class="cx"> , m_hasOverrideViewportSize(false)
</span><span class="cx"> , m_shouldAutoSize(false)
</span><span class="lines">@@ -290,6 +286,7 @@
</span><span class="cx"> m_visuallyNonEmptyPixelCount = 0;
</span><span class="cx"> m_isVisuallyNonEmpty = false;
</span><span class="cx"> m_firstVisuallyNonEmptyLayoutCallbackPending = true;
</span><ins>+ m_viewportIsStable = true;
</ins><span class="cx"> m_maintainScrollPositionAnchor = nullptr;
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorepageFrameViewh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/page/FrameView.h (186154 => 186155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/page/FrameView.h        2015-07-01 01:01:13 UTC (rev 186154)
+++ trunk/Source/WebCore/page/FrameView.h        2015-07-01 01:08:41 UTC (rev 186155)
</span><span class="lines">@@ -129,6 +129,9 @@
</span><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT bool renderedCharactersExceed(unsigned threshold);
</span><span class="cx">
</span><ins>+ WEBCORE_EXPORT void setViewportIsStable(bool stable) { m_viewportIsStable = stable; }
+ bool viewportIsStable() const { return m_viewportIsStable; }
+
</ins><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> bool useCustomFixedPositionLayoutRect() const { return m_useCustomFixedPositionLayoutRect; }
</span><span class="cx"> IntRect customFixedPositionLayoutRect() const { return m_customFixedPositionLayoutRect; }
</span><span class="lines">@@ -743,6 +746,8 @@
</span><span class="cx"> bool m_isVisuallyNonEmpty;
</span><span class="cx"> bool m_firstVisuallyNonEmptyLayoutCallbackPending;
</span><span class="cx">
</span><ins>+ bool m_viewportIsStable { true };
+
</ins><span class="cx"> RefPtr<ContainerNode> m_maintainScrollPositionAnchor;
</span><span class="cx">
</span><span class="cx"> // Renderer to hold our custom scroll corner.
</span><span class="lines">@@ -757,11 +762,6 @@
</span><span class="cx">
</span><span class="cx"> bool m_useCustomSizeForResizeEvent;
</span><span class="cx"> IntSize m_customSizeForResizeEvent;
</span><del>-
- double m_horizontalVelocity;
- double m_verticalVelocity;
- double m_scaleChangeRate;
- double m_lastVelocityUpdateTime;
</del><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> IntSize m_overrideViewportSize;
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicsGraphicsLayerh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/GraphicsLayer.h (186154 => 186155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2015-07-01 01:01:13 UTC (rev 186154)
+++ trunk/Source/WebCore/platform/graphics/GraphicsLayer.h        2015-07-01 01:08:41 UTC (rev 186155)
</span><span class="lines">@@ -504,8 +504,8 @@
</span><span class="cx"> // Some compositing systems may do internal batching to synchronize compositing updates
</span><span class="cx"> // with updates drawn into the window. These methods flush internal batched state on this layer
</span><span class="cx"> // and descendant layers, and this layer only.
</span><del>- virtual void flushCompositingState(const FloatRect& /* clipRect */) { }
- virtual void flushCompositingStateForThisLayerOnly() { }
</del><ins>+ virtual void flushCompositingState(const FloatRect& /* clipRect */, bool /* viewportIsStable */) { }
+ virtual void flushCompositingStateForThisLayerOnly(bool /* viewportIsStable */) { }
</ins><span class="cx">
</span><span class="cx"> // If the exposed rect of this layer changes, returns true if this or descendant layers need a flush,
</span><span class="cx"> // for example to allocate new tiles.
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (186154 => 186155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2015-07-01 01:01:13 UTC (rev 186154)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp        2015-07-01 01:08:41 UTC (rev 186155)
</span><span class="lines">@@ -1092,20 +1092,20 @@
</span><span class="cx"> return FloatPoint();
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsLayerCA::flushCompositingState(const FloatRect& clipRect)
</del><ins>+void GraphicsLayerCA::flushCompositingState(const FloatRect& clipRect, bool viewportIsStable)
</ins><span class="cx"> {
</span><span class="cx"> TransformState state(TransformState::UnapplyInverseTransformDirection, FloatQuad(clipRect));
</span><span class="cx"> FloatQuad coverageQuad(clipRect);
</span><span class="cx"> state.setSecondaryQuad(&coverageQuad);
</span><del>- recursiveCommitChanges(CommitState(), state);
</del><ins>+ recursiveCommitChanges(CommitState(viewportIsStable), state);
</ins><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsLayerCA::flushCompositingStateForThisLayerOnly()
</del><ins>+void GraphicsLayerCA::flushCompositingStateForThisLayerOnly(bool viewportIsStable)
</ins><span class="cx"> {
</span><span class="cx"> float pageScaleFactor;
</span><span class="cx"> bool hadChanges = m_uncommittedChanges;
</span><span class="cx">
</span><del>- CommitState commitState;
</del><ins>+ CommitState commitState(viewportIsStable);
</ins><span class="cx">
</span><span class="cx"> FloatPoint offset = computePositionRelativeToBase(pageScaleFactor);
</span><span class="cx"> commitLayerChangesBeforeSublayers(commitState, pageScaleFactor, offset);
</span><span class="lines">@@ -1272,13 +1272,16 @@
</span><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx">
</span><del>-void GraphicsLayerCA::setVisibleAndCoverageRects(const VisibleAndCoverageRects& rects, bool isViewportConstrained)
</del><ins>+void GraphicsLayerCA::setVisibleAndCoverageRects(const VisibleAndCoverageRects& rects, bool isViewportConstrained, bool viewportIsStable)
</ins><span class="cx"> {
</span><span class="cx"> bool visibleRectChanged = rects.visibleRect != m_visibleRect;
</span><span class="cx"> bool coverageRectChanged = rects.coverageRect != m_coverageRect;
</span><span class="cx"> if (!visibleRectChanged && !coverageRectChanged)
</span><span class="cx"> return;
</span><span class="cx">
</span><ins>+ if (isViewportConstrained && !viewportIsStable)
+ return;
+
</ins><span class="cx"> // FIXME: we need to take reflections into account when determining whether this layer intersects the coverage rect.
</span><span class="cx"> bool intersectsCoverageRect = isViewportConstrained || rects.coverageRect.intersects(FloatRect(m_boundsOrigin, size()));
</span><span class="cx"> if (intersectsCoverageRect != m_intersectsCoverageRect) {
</span><span class="lines">@@ -1329,7 +1332,7 @@
</span><span class="cx"> localState.setLastPlanarSecondaryQuad(&secondaryQuad);
</span><span class="cx"> }
</span><span class="cx"> }
</span><del>- setVisibleAndCoverageRects(rects, m_isViewportConstrained || commitState.ancestorIsViewportConstrained);
</del><ins>+ setVisibleAndCoverageRects(rects, m_isViewportConstrained || commitState.ancestorIsViewportConstrained, commitState.viewportIsStable);
</ins><span class="cx">
</span><span class="cx"> #ifdef VISIBLE_TILE_WASH
</span><span class="cx"> // Use having a transform as a key to making the tile wash layer. If every layer gets a wash,
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformgraphicscaGraphicsLayerCAh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (186154 => 186155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2015-07-01 01:01:13 UTC (rev 186154)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h        2015-07-01 01:08:41 UTC (rev 186155)
</span><span class="lines">@@ -152,11 +152,17 @@
</span><span class="cx"> int treeDepth { 0 };
</span><span class="cx"> bool ancestorHasTransformAnimation { false };
</span><span class="cx"> bool ancestorIsViewportConstrained { false };
</span><ins>+ bool viewportIsStable { true };
+
+ CommitState(bool stableViewport)
+ : viewportIsStable(stableViewport)
+ {
+ }
</ins><span class="cx"> };
</span><span class="cx"> void recursiveCommitChanges(const CommitState&, const TransformState&, float pageScaleFactor = 1, const FloatPoint& positionRelativeToBase = FloatPoint(), bool affectedByPageScale = false);
</span><span class="cx">
</span><del>- WEBCORE_EXPORT virtual void flushCompositingState(const FloatRect&) override;
- WEBCORE_EXPORT virtual void flushCompositingStateForThisLayerOnly() override;
</del><ins>+ WEBCORE_EXPORT virtual void flushCompositingState(const FloatRect&, bool viewportIsStable) override;
+ WEBCORE_EXPORT virtual void flushCompositingStateForThisLayerOnly(bool viewportIsStable) override;
</ins><span class="cx">
</span><span class="cx"> WEBCORE_EXPORT virtual bool visibleRectChangeRequiresFlush(const FloatRect& visibleRect) const override;
</span><span class="cx">
</span><span class="lines">@@ -294,7 +300,7 @@
</span><span class="cx"> const FloatRect& visibleRect() const { return m_visibleRect; }
</span><span class="cx"> const FloatRect& coverageRect() const { return m_coverageRect; }
</span><span class="cx">
</span><del>- void setVisibleAndCoverageRects(const VisibleAndCoverageRects&, bool isViewportConstrained);
</del><ins>+ void setVisibleAndCoverageRects(const VisibleAndCoverageRects&, bool isViewportConstrained, bool viewportIsStable);
</ins><span class="cx">
</span><span class="cx"> static FloatRect adjustTiledLayerVisibleRect(TiledBacking*, const FloatRect& oldVisibleRect, const FloatRect& newVisibleRect, const FloatSize& oldSize, const FloatSize& newSize);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderLayerCompositorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (186154 => 186155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2015-07-01 01:01:13 UTC (rev 186154)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp        2015-07-01 01:08:41 UTC (rev 186155)
</span><span class="lines">@@ -468,18 +468,18 @@
</span><span class="cx"> if (GraphicsLayer* rootLayer = rootGraphicsLayer()) {
</span><span class="cx"> #if PLATFORM(IOS)
</span><span class="cx"> FloatRect exposedRect = frameView.exposedContentRect();
</span><del>- LOG(Compositing, "RenderLayerCompositor %p flushPendingLayerChanges(%d) %.2f, %.2f, %.2fx%.2f", this, isFlushRoot,
- exposedRect.x(), exposedRect.y(), exposedRect.width(), exposedRect.height());
- rootLayer->flushCompositingState(exposedRect);
</del><ins>+ LOG(Compositing, "RenderLayerCompositor %p flushPendingLayerChanges(%d) %.2f, %.2f, %.2fx%.2f (stable viewport %d)", this, isFlushRoot,
+ exposedRect.x(), exposedRect.y(), exposedRect.width(), exposedRect.height(), frameView.viewportIsStable());
+ rootLayer->flushCompositingState(exposedRect, frameView.viewportIsStable());
</ins><span class="cx"> #else
</span><span class="cx"> // Having a m_clipLayer indicates that we're doing scrolling via GraphicsLayers.
</span><span class="cx"> IntRect visibleRect = m_clipLayer ? IntRect(IntPoint(), frameView.unscaledVisibleContentSizeIncludingObscuredArea()) : frameView.visibleContentRect();
</span><span class="cx"> if (!frameView.exposedRect().isInfinite())
</span><span class="cx"> visibleRect.intersect(IntRect(frameView.exposedRect()));
</span><span class="cx">
</span><del>- LOG(Compositing, "RenderLayerCompositor %p flushPendingLayerChanges(%d) %d, %d, %dx%d", this, isFlushRoot,
- visibleRect.x(), visibleRect.y(), visibleRect.width(), visibleRect.height());
- rootLayer->flushCompositingState(visibleRect);
</del><ins>+ LOG(Compositing, "RenderLayerCompositor %p flushPendingLayerChanges(%d) %d, %d, %dx%d (stable viewport %d)", this, isFlushRoot,
+ visibleRect.x(), visibleRect.y(), visibleRect.width(), visibleRect.height(), frameView.viewportIsStable());
+ rootLayer->flushCompositingState(visibleRect, frameView.viewportIsStable());
</ins><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceWebKit2ChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/ChangeLog (186154 => 186155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/ChangeLog        2015-07-01 01:01:13 UTC (rev 186154)
+++ trunk/Source/WebKit2/ChangeLog        2015-07-01 01:08:41 UTC (rev 186155)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2015-06-30 Simon Fraser <simon.fraser@apple.com>
+
+ [iOS] Missing tiles inside position:fixed on scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=146485
+ rdar://problem/21226861
+
+ Reviewed by Tim Horton.
+
+ Layer flushing adjusts the coverage rect for tiled layers, but does so at times
+ when position:fixed layers are moved around by the scrolling tree. The computed
+ coverage rect then doesn't reflect the layer's on-screen position, causing missing
+ tiles.
+
+ Fix by pushing the notion of being in a "stable state" onto FrameView, and passing
+ that state into the layer flush. When not in a stable state, flushing doesn't change
+ the visible and coverage rects for layers that are viewport-constrained.
+
+ * WebProcess/WebPage/ios/WebPageIOS.mm:
+ (WebKit::WebPage::updateVisibleContentRects):
+ * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
+ (WebKit::RemoteLayerTreeDrawingArea::flushLayers):
+
</ins><span class="cx"> 2015-06-30 Hyungwook Lee <hyungwook.lee@navercorp.com>
</span><span class="cx">
</span><span class="cx"> [EFL] Implement ewk_favicon_database_clear() API.
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPageiosWebPageIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm (186154 => 186155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2015-07-01 01:01:13 UTC (rev 186154)
+++ trunk/Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm        2015-07-01 01:08:41 UTC (rev 186155)
</span><span class="lines">@@ -2870,6 +2870,7 @@
</span><span class="cx"> double scaleChangeRate = visibleContentRectUpdateInfo.scaleChangeRate();
</span><span class="cx"> adjustVelocityDataForBoundedScale(horizontalVelocity, verticalVelocity, scaleChangeRate, visibleContentRectUpdateInfo.scale(), m_viewportConfiguration.minimumScale(), m_viewportConfiguration.maximumScale());
</span><span class="cx">
</span><ins>+ frameView.setViewportIsStable(m_isInStableState);
</ins><span class="cx"> frameView.setScrollVelocity(horizontalVelocity, verticalVelocity, scaleChangeRate, visibleContentRectUpdateInfo.timestamp());
</span><span class="cx">
</span><span class="cx"> if (m_isInStableState)
</span></span></pre></div>
<a id="trunkSourceWebKit2WebProcessWebPagemacRemoteLayerTreeDrawingAreamm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm (186154 => 186155)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2015-07-01 01:01:13 UTC (rev 186154)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm        2015-07-01 01:08:41 UTC (rev 186155)
</span><span class="lines">@@ -371,9 +371,9 @@
</span><span class="cx">
</span><span class="cx"> // Because our view-relative overlay root layer is not attached to the FrameView's GraphicsLayer tree, we need to flush it manually.
</span><span class="cx"> if (m_viewOverlayRootLayer)
</span><del>- m_viewOverlayRootLayer->flushCompositingState(visibleRect);
</del><ins>+ m_viewOverlayRootLayer->flushCompositingState(visibleRect, m_webPage.mainFrameView()->viewportIsStable());
</ins><span class="cx">
</span><del>- m_rootLayer->flushCompositingStateForThisLayerOnly();
</del><ins>+ m_rootLayer->flushCompositingStateForThisLayerOnly(m_webPage.mainFrameView()->viewportIsStable());
</ins><span class="cx">
</span><span class="cx"> // FIXME: Minimize these transactions if nothing changed.
</span><span class="cx"> RemoteLayerTreeTransaction layerTransaction;
</span></span></pre>
</div>
</div>
</body>
</html>