Diff
Modified: branches/safari-605-branch/LayoutTests/ChangeLog (226680 => 226681)
--- branches/safari-605-branch/LayoutTests/ChangeLog 2018-01-10 04:31:11 UTC (rev 226680)
+++ branches/safari-605-branch/LayoutTests/ChangeLog 2018-01-10 04:31:14 UTC (rev 226681)
@@ -1,5 +1,20 @@
2018-01-09 Jason Marcell <[email protected]>
+ Cherry-pick r226521. rdar://problem/36392339
+
+ 2018-01-08 Antti Koivisto <[email protected]>
+
+ REGRESSION (r219145): Toggling layer borders on a static document no longer works immediately
+ https://bugs.webkit.org/show_bug.cgi?id=176260
+ <rdar://problem/34219966>
+
+ Reviewed by Simon Fraser.
+
+ * compositing/debug-borders-dynamic-expected.html: Added.
+ * compositing/debug-borders-dynamic.html: Added.
+
+2018-01-09 Jason Marcell <[email protected]>
+
Revert r226432. rdar://problem/10353542
2018-01-08 Ms2ger <[email protected]>
Added: branches/safari-605-branch/LayoutTests/compositing/debug-borders-dynamic-expected.html (0 => 226681)
--- branches/safari-605-branch/LayoutTests/compositing/debug-borders-dynamic-expected.html (rev 0)
+++ branches/safari-605-branch/LayoutTests/compositing/debug-borders-dynamic-expected.html 2018-01-10 04:31:14 UTC (rev 226681)
@@ -0,0 +1,7 @@
+<script>
+if (window.internals) {
+ internals.settings.setShowRepaintCounter(true);
+ internals.settings.setShowDebugBorders(true);
+}
+</script>
+<div style="border:2px solid red; width:100px; height:100px; will-change:transform"></div>
Added: branches/safari-605-branch/LayoutTests/compositing/debug-borders-dynamic.html (0 => 226681)
--- branches/safari-605-branch/LayoutTests/compositing/debug-borders-dynamic.html (rev 0)
+++ branches/safari-605-branch/LayoutTests/compositing/debug-borders-dynamic.html 2018-01-10 04:31:14 UTC (rev 226681)
@@ -0,0 +1,8 @@
+<div style="border:2px solid red; width:100px; height:100px; will-change:transform"></div>
+<script>
+document.body.offsetLeft;
+if (window.internals) {
+ internals.settings.setShowRepaintCounter(true);
+ internals.settings.setShowDebugBorders(true);
+}
+</script>
Modified: branches/safari-605-branch/Source/WebCore/ChangeLog (226680 => 226681)
--- branches/safari-605-branch/Source/WebCore/ChangeLog 2018-01-10 04:31:11 UTC (rev 226680)
+++ branches/safari-605-branch/Source/WebCore/ChangeLog 2018-01-10 04:31:14 UTC (rev 226681)
@@ -1,5 +1,35 @@
2018-01-09 Jason Marcell <[email protected]>
+ Cherry-pick r226521. rdar://problem/36392339
+
+ 2018-01-08 Antti Koivisto <[email protected]>
+
+ REGRESSION (r219145): Toggling layer borders on a static document no longer works immediately
+ https://bugs.webkit.org/show_bug.cgi?id=176260
+ <rdar://problem/34219966>
+
+ Reviewed by Simon Fraser.
+
+ Optimization reveled bugs in debug indicator painting.
+
+ Test: compositing/debug-borders-dynamic.html
+
+ * platform/graphics/ca/GraphicsLayerCA.cpp:
+ (WebCore::GraphicsLayerCA::commitLayerChangesBeforeSublayers):
+ (WebCore::GraphicsLayerCA::updateDebugIndicators):
+ (WebCore::GraphicsLayerCA::updateDebugBorder): Deleted.
+
+ - Rename to indicate this is not just about debug borders.
+ - Trigger display so repaint counters get painted. This helper is only called when the indicators change.
+
+ * platform/graphics/ca/GraphicsLayerCA.h:
+ * rendering/RenderLayerCompositor.cpp:
+ (WebCore::RenderLayerCompositor::cacheAcceleratedCompositingFlags):
+
+ Ensure we do compositing update on debug border change even when there is no layout.
+
+2018-01-09 Jason Marcell <[email protected]>
+
Revert r226432. rdar://problem/10353542
2018-01-08 Jeremy Jones <[email protected]>
Modified: branches/safari-605-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (226680 => 226681)
--- branches/safari-605-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2018-01-10 04:31:11 UTC (rev 226680)
+++ branches/safari-605-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp 2018-01-10 04:31:14 UTC (rev 226681)
@@ -1793,7 +1793,7 @@
updateSupportsSubpixelAntialiasedText();
if (m_uncommittedChanges & DebugIndicatorsChanged)
- updateDebugBorder();
+ updateDebugIndicators();
if (m_uncommittedChanges & CustomAppearanceChanged)
updateCustomAppearance();
@@ -2351,7 +2351,7 @@
return showingBorders ? Color(255, 122, 251) : Color();
}
-void GraphicsLayerCA::updateDebugBorder()
+void GraphicsLayerCA::updateDebugIndicators()
{
Color borderColor;
float width = 0;
@@ -2360,6 +2360,9 @@
if (showDebugBorders)
getDebugBorderInfo(borderColor, width);
+ // Paint repaint counter.
+ m_layer->setNeedsDisplay();
+
setLayerDebugBorder(*m_layer, borderColor, width);
if (m_contentsLayer)
setLayerDebugBorder(*m_contentsLayer, contentsLayerDebugBorderColor(showDebugBorders), contentsLayerBorderWidth);
Modified: branches/safari-605-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h (226680 => 226681)
--- branches/safari-605-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2018-01-10 04:31:11 UTC (rev 226680)
+++ branches/safari-605-branch/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.h 2018-01-10 04:31:14 UTC (rev 226681)
@@ -414,7 +414,7 @@
void updateContentsNeedsDisplay();
void updateAcceleratesDrawing();
void updateSupportsSubpixelAntialiasedText();
- void updateDebugBorder();
+ void updateDebugIndicators();
void updateTiles();
void updateContentsScale(float pageScaleFactor);
void updateCustomAppearance();
Modified: branches/safari-605-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp (226680 => 226681)
--- branches/safari-605-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp 2018-01-10 04:31:11 UTC (rev 226680)
+++ branches/safari-605-branch/Source/WebCore/rendering/RenderLayerCompositor.cpp 2018-01-10 04:31:14 UTC (rev 226681)
@@ -320,8 +320,10 @@
if (isMainFrameCompositor())
forceCompositingMode = m_renderView.settings().forceCompositingMode() && hasAcceleratedCompositing;
- if (hasAcceleratedCompositing != m_hasAcceleratedCompositing || showDebugBorders != m_showDebugBorders || showRepaintCounter != m_showRepaintCounter || forceCompositingMode != m_forceCompositingMode)
+ if (hasAcceleratedCompositing != m_hasAcceleratedCompositing || showDebugBorders != m_showDebugBorders || showRepaintCounter != m_showRepaintCounter || forceCompositingMode != m_forceCompositingMode) {
setCompositingLayersNeedRebuild();
+ m_layerNeedsCompositingUpdate = true;
+ }
bool debugBordersChanged = m_showDebugBorders != showDebugBorders;
m_hasAcceleratedCompositing = hasAcceleratedCompositing;