Title: [211760] trunk/Source/WebKit2
- Revision
- 211760
- Author
- simon.fra...@apple.com
- Date
- 2017-02-06 17:20:05 -0800 (Mon, 06 Feb 2017)
Log Message
Tiled scrolling indicator gets doubled up on navigation
https://bugs.webkit.org/show_bug.cgi?id=167909
Reviewed by Tim Horton.
TiledCoreAnimationDrawingArea::updateDebugInfoLayer() would parent a new m_debugInfoLayer
in m_hostingLayer without removing the old one, causing the old tiled scrolling indicator layer
hierarchy to get left in the layer tree.
Also a couple of nullptr/0 -> nil.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
(WebKit::TiledCoreAnimationDrawingArea::updateDebugInfoLayer):
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (211759 => 211760)
--- trunk/Source/WebKit2/ChangeLog 2017-02-07 00:29:00 UTC (rev 211759)
+++ trunk/Source/WebKit2/ChangeLog 2017-02-07 01:20:05 UTC (rev 211760)
@@ -1,3 +1,20 @@
+2017-02-06 Simon Fraser <simon.fra...@apple.com>
+
+ Tiled scrolling indicator gets doubled up on navigation
+ https://bugs.webkit.org/show_bug.cgi?id=167909
+
+ Reviewed by Tim Horton.
+
+ TiledCoreAnimationDrawingArea::updateDebugInfoLayer() would parent a new m_debugInfoLayer
+ in m_hostingLayer without removing the old one, causing the old tiled scrolling indicator layer
+ hierarchy to get left in the layer tree.
+
+ Also a couple of nullptr/0 -> nil.
+
+ * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
+ (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
+ (WebKit::TiledCoreAnimationDrawingArea::updateDebugInfoLayer):
+
2017-02-06 Alex Christensen <achristen...@webkit.org>
More build fixes after r211751
Modified: trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm (211759 => 211760)
--- trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2017-02-07 00:29:00 UTC (rev 211759)
+++ trunk/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm 2017-02-07 01:20:05 UTC (rev 211760)
@@ -651,9 +651,9 @@
updateRootLayers();
if (hadRootLayer != !!layer)
- m_layerHostingContext->setRootLayer(layer ? m_hostingLayer.get() : 0);
+ m_layerHostingContext->setRootLayer(layer ? m_hostingLayer.get() : nil);
- updateDebugInfoLayer(m_webPage.corePage()->settings().showTiledScrollingIndicator());
+ updateDebugInfoLayer(layer && m_webPage.corePage()->settings().showTiledScrollingIndicator());
[CATransaction commit];
}
@@ -666,6 +666,11 @@
void TiledCoreAnimationDrawingArea::updateDebugInfoLayer(bool showLayer)
{
+ if (m_debugInfoLayer) {
+ [m_debugInfoLayer removeFromSuperlayer];
+ m_debugInfoLayer = nil;
+ }
+
if (showLayer) {
if (TiledBacking* tiledBacking = mainFrameTiledBacking()) {
if (PlatformCALayer* indicatorLayer = tiledBacking->tiledScrollingIndicatorLayer())
@@ -673,14 +678,9 @@
}
if (m_debugInfoLayer) {
-#ifndef NDEBUG
[m_debugInfoLayer setName:@"Debug Info"];
-#endif
[m_hostingLayer addSublayer:m_debugInfoLayer.get()];
}
- } else if (m_debugInfoLayer) {
- [m_debugInfoLayer removeFromSuperlayer];
- m_debugInfoLayer = nullptr;
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes