Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog (213808 => 213809)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog 2017-03-13 10:34:50 UTC (rev 213808)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog 2017-03-13 10:36:27 UTC (rev 213809)
@@ -1,3 +1,34 @@
+2017-03-04 Simon Fraser <[email protected]>
+
+ Clarify some terminology in RenderLayerBacking
+ https://bugs.webkit.org/show_bug.cgi?id=169174
+
+ Reviewed by Zalan Bujtas.
+
+ Rename some functions related to directly-composited background images and
+ box decorations for clarify.
+
+ Only behavior change is for canDirectlyCompositeBackgroundBackgroundImage() to check
+ GraphicsLayer::supportsContentsTiling(), which means that RenderLayerBacking::contentChanged()
+ will no longer trigger a updateGeometry() when it gets BackgroundImageChanged on non-
+ CoordinateGraphics platforms.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateConfiguration):
+ (WebCore::RenderLayerBacking::updateAfterDescendants):
+ (WebCore::RenderLayerBacking::updateDirectlyCompositedBoxDecorations):
+ (WebCore::canDirectlyCompositeBackgroundBackgroundImage):
+ (WebCore::hasPaintedBoxDecorationsOrBackgroundImage):
+ (WebCore::supportsDirectlyCompositedBoxDecorations):
+ (WebCore::RenderLayerBacking::paintsBoxDecorations):
+ (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
+ (WebCore::RenderLayerBacking::contentChanged):
+ (WebCore::RenderLayerBacking::updateDirectlyCompositedContents): Deleted.
+ (WebCore::canCreateTiledImage): Deleted.
+ (WebCore::hasVisibleBoxDecorationsOrBackgroundImage): Deleted.
+ (WebCore::supportsDirectBoxDecorationsComposition): Deleted.
+ * rendering/RenderLayerBacking.h:
+
2017-03-03 Simon Fraser <[email protected]>
Clean up some RenderLayerBacking code
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderLayerBacking.cpp (213808 => 213809)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderLayerBacking.cpp 2017-03-13 10:34:50 UTC (rev 213808)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderLayerBacking.cpp 2017-03-13 10:36:27 UTC (rev 213809)
@@ -606,12 +606,12 @@
m_graphicsLayer->setReplicatedByLayer(reflectionLayer);
}
} else
- m_graphicsLayer->setReplicatedByLayer(0);
+ m_graphicsLayer->setReplicatedByLayer(nullptr);
if (!m_owningLayer.isRootLayer()) {
bool isSimpleContainer = isSimpleContainerCompositingLayer();
bool didUpdateContentsRect = false;
- updateDirectlyCompositedContents(isSimpleContainer, didUpdateContentsRect);
+ updateDirectlyCompositedBoxDecorations(isSimpleContainer, didUpdateContentsRect);
} else
updateRootLayerConfiguration();
@@ -1096,7 +1096,7 @@
bool didUpdateContentsRect = false;
// FIXME: this duplicates work we did in updateConfiguration().
isSimpleContainer = isSimpleContainerCompositingLayer();
- updateDirectlyCompositedContents(isSimpleContainer, didUpdateContentsRect);
+ updateDirectlyCompositedBoxDecorations(isSimpleContainer, didUpdateContentsRect);
if (!didUpdateContentsRect && m_graphicsLayer->usesContentsLayer())
resetContentsRect();
}
@@ -1180,7 +1180,7 @@
}
}
-void RenderLayerBacking::updateDirectlyCompositedContents(bool isSimpleContainer, bool& didUpdateContentsRect)
+void RenderLayerBacking::updateDirectlyCompositedBoxDecorations(bool isSimpleContainer, bool& didUpdateContentsRect)
{
if (!m_owningLayer.hasVisibleContent())
return;
@@ -1709,8 +1709,11 @@
return style.hasVisibleBorder() || style.hasBorderRadius() || style.hasOutline() || style.hasAppearance() || style.boxShadow() || style.hasFilter();
}
-static bool canCreateTiledImage(const RenderStyle& style)
+static bool canDirectlyCompositeBackgroundBackgroundImage(const RenderStyle& style)
{
+ if (!GraphicsLayer::supportsContentsTiling())
+ return false;
+
auto& fillLayer = style.backgroundLayers();
if (fillLayer.next())
return false;
@@ -1738,7 +1741,7 @@
return true;
}
-static bool hasVisibleBoxDecorationsOrBackgroundImage(const RenderStyle& style)
+static bool hasPaintedBoxDecorationsOrBackgroundImage(const RenderStyle& style)
{
if (hasVisibleBoxDecorations(style))
return true;
@@ -1746,7 +1749,7 @@
if (!style.hasBackgroundImage())
return false;
- return !GraphicsLayer::supportsContentsTiling() || !canCreateTiledImage(style);
+ return !canDirectlyCompositeBackgroundBackgroundImage(style);
}
static inline bool hasPerspectiveOrPreserves3D(const RenderStyle& style)
@@ -1832,7 +1835,7 @@
}
}
-static bool supportsDirectBoxDecorationsComposition(const RenderLayerModelObject& renderer)
+static bool supportsDirectlyCompositedBoxDecorations(const RenderLayerModelObject& renderer)
{
if (!GraphicsLayer::supportsBackgroundColorContent())
return false;
@@ -1841,7 +1844,7 @@
if (renderer.hasClip())
return false;
- if (hasVisibleBoxDecorationsOrBackgroundImage(style))
+ if (hasPaintedBoxDecorationsOrBackgroundImage(style))
return false;
// FIXME: We can't create a directly composited background if this
@@ -1864,7 +1867,7 @@
if (!m_owningLayer.hasVisibleBoxDecorations())
return false;
- return !supportsDirectBoxDecorationsComposition(renderer());
+ return !supportsDirectlyCompositedBoxDecorations(renderer());
}
bool RenderLayerBacking::paintsChildRenderers() const
@@ -1926,7 +1929,7 @@
// Reject anything that has a border, a border-radius or outline,
// or is not a simple background (no background, or solid color).
- if (hasVisibleBoxDecorationsOrBackgroundImage(rootObject->style()))
+ if (hasPaintedBoxDecorationsOrBackgroundImage(rootObject->style()))
return false;
// Now look at the body's renderer.
@@ -1937,7 +1940,7 @@
if (!bodyRenderer)
return false;
- if (hasVisibleBoxDecorationsOrBackgroundImage(bodyRenderer->style()))
+ if (hasPaintedBoxDecorationsOrBackgroundImage(bodyRenderer->style()))
return false;
}
@@ -2049,7 +2052,7 @@
return;
}
- if ((changeType == BackgroundImageChanged) && canCreateTiledImage(renderer().style()))
+ if ((changeType == BackgroundImageChanged) && canDirectlyCompositeBackgroundBackgroundImage(renderer().style()))
updateGeometry();
if ((changeType == MaskImageChanged) && m_maskLayer) {
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderLayerBacking.h (213808 => 213809)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderLayerBacking.h 2017-03-13 10:34:50 UTC (rev 213808)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderLayerBacking.h 2017-03-13 10:36:27 UTC (rev 213809)
@@ -321,9 +321,10 @@
void updateImageContents();
Color rendererBackgroundColor() const;
+
+ void updateDirectlyCompositedBoxDecorations(bool isSimpleContainer, bool& didUpdateContentsRect);
void updateDirectlyCompositedBackgroundColor(bool isSimpleContainer, bool& didUpdateContentsRect);
void updateDirectlyCompositedBackgroundImage(bool isSimpleContainer, bool& didUpdateContentsRect);
- void updateDirectlyCompositedContents(bool isSimpleContainer, bool& didUpdateContentsRect);
void resetContentsRect();