Title: [213807] releases/WebKitGTK/webkit-2.16/Source/WebCore
- Revision
- 213807
- Author
- [email protected]
- Date
- 2017-03-13 03:32:49 -0700 (Mon, 13 Mar 2017)
Log Message
Merge r213405 - Clean up some RenderLayerBacking code
https://bugs.webkit.org/show_bug.cgi?id=169160
Reviewed by Dean Jackson.
Modern loops in descendantLayerPaintsIntoAncestor().
Rename RenderLayerBacking::paintsChildren() to RenderLayerBacking::paintsChildRenderers() to clarify that
it refers to renderers, not RenderLayers.
Rename RenderLayerBacking::paintsNonDirectCompositedBoxDecoration() to RenderLayerBacking::paintsBoxDecorations().
"Paints" already implies non-composited.
No behavior change.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateDrawsContent):
(WebCore::RenderLayerBacking::paintsBoxDecorations):
(WebCore::RenderLayerBacking::paintsChildRenderers):
(WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
(WebCore::descendantLayerPaintsIntoAncestor):
(WebCore::RenderLayerBacking::paintsNonDirectCompositedBoxDecoration): Deleted.
(WebCore::RenderLayerBacking::paintsChildren): Deleted.
* rendering/RenderLayerBacking.h:
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog (213806 => 213807)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog 2017-03-13 10:31:43 UTC (rev 213806)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/ChangeLog 2017-03-13 10:32:49 UTC (rev 213807)
@@ -1,5 +1,32 @@
2017-03-03 Simon Fraser <[email protected]>
+ Clean up some RenderLayerBacking code
+ https://bugs.webkit.org/show_bug.cgi?id=169160
+
+ Reviewed by Dean Jackson.
+
+ Modern loops in descendantLayerPaintsIntoAncestor().
+
+ Rename RenderLayerBacking::paintsChildren() to RenderLayerBacking::paintsChildRenderers() to clarify that
+ it refers to renderers, not RenderLayers.
+
+ Rename RenderLayerBacking::paintsNonDirectCompositedBoxDecoration() to RenderLayerBacking::paintsBoxDecorations().
+ "Paints" already implies non-composited.
+
+ No behavior change.
+
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::RenderLayerBacking::updateDrawsContent):
+ (WebCore::RenderLayerBacking::paintsBoxDecorations):
+ (WebCore::RenderLayerBacking::paintsChildRenderers):
+ (WebCore::RenderLayerBacking::isSimpleContainerCompositingLayer):
+ (WebCore::descendantLayerPaintsIntoAncestor):
+ (WebCore::RenderLayerBacking::paintsNonDirectCompositedBoxDecoration): Deleted.
+ (WebCore::RenderLayerBacking::paintsChildren): Deleted.
+ * rendering/RenderLayerBacking.h:
+
+2017-03-03 Simon Fraser <[email protected]>
+
Clean up RenderImage and a RenderImageResource function
https://bugs.webkit.org/show_bug.cgi?id=169153
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderLayerBacking.cpp (213806 => 213807)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderLayerBacking.cpp 2017-03-13 10:31:43 UTC (rev 213806)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderLayerBacking.cpp 2017-03-13 10:32:49 UTC (rev 213807)
@@ -1270,7 +1270,7 @@
bool hasNonScrollingPaintedContent = m_owningLayer.hasVisibleContent() && m_owningLayer.hasVisibleBoxDecorationsOrBackground();
m_graphicsLayer->setDrawsContent(hasNonScrollingPaintedContent);
- bool hasScrollingPaintedContent = m_owningLayer.hasVisibleContent() && (renderer().hasBackground() || paintsChildren());
+ bool hasScrollingPaintedContent = m_owningLayer.hasVisibleContent() && (renderer().hasBackground() || paintsChildRenderers());
m_scrollingContentsLayer->setDrawsContent(hasScrollingPaintedContent);
return;
}
@@ -1859,7 +1859,7 @@
return true;
}
-bool RenderLayerBacking::paintsNonDirectCompositedBoxDecoration() const
+bool RenderLayerBacking::paintsBoxDecorations() const
{
if (!m_owningLayer.hasVisibleBoxDecorations())
return false;
@@ -1867,7 +1867,7 @@
return !supportsDirectBoxDecorationsComposition(renderer());
}
-bool RenderLayerBacking::paintsChildren() const
+bool RenderLayerBacking::paintsChildRenderers() const
{
if (m_owningLayer.hasVisibleContent() && m_owningLayer.hasNonEmptyChildRenderers())
return true;
@@ -1906,7 +1906,7 @@
if (renderer().isTextControl())
return false;
- if (paintsNonDirectCompositedBoxDecoration() || paintsChildren())
+ if (paintsBoxDecorations() || paintsChildRenderers())
return false;
if (renderer().style().backgroundClip() == TextFillBox)
@@ -1953,12 +1953,9 @@
LayerListMutationDetector mutationChecker(&parent);
#endif
- if (Vector<RenderLayer*>* normalFlowList = parent.normalFlowList()) {
- size_t listSize = normalFlowList->size();
- for (size_t i = 0; i < listSize; ++i) {
- RenderLayer* curLayer = normalFlowList->at(i);
- if (!compositedWithOwnBackingStore(*curLayer)
- && (curLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*curLayer)))
+ if (auto* normalFlowList = parent.normalFlowList()) {
+ for (auto* childLayer : *normalFlowList) {
+ if (!compositedWithOwnBackingStore(*childLayer) && (childLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*childLayer)))
return true;
}
}
@@ -1968,22 +1965,16 @@
return false;
// Use the m_hasCompositingDescendant bit to optimize?
- if (Vector<RenderLayer*>* negZOrderList = parent.negZOrderList()) {
- size_t listSize = negZOrderList->size();
- for (size_t i = 0; i < listSize; ++i) {
- RenderLayer* curLayer = negZOrderList->at(i);
- if (!compositedWithOwnBackingStore(*curLayer)
- && (curLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*curLayer)))
+ if (auto* negZOrderList = parent.negZOrderList()) {
+ for (auto* childLayer : *negZOrderList) {
+ if (!compositedWithOwnBackingStore(*childLayer) && (childLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*childLayer)))
return true;
}
}
- if (Vector<RenderLayer*>* posZOrderList = parent.posZOrderList()) {
- size_t listSize = posZOrderList->size();
- for (size_t i = 0; i < listSize; ++i) {
- RenderLayer* curLayer = posZOrderList->at(i);
- if (!compositedWithOwnBackingStore(*curLayer)
- && (curLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*curLayer)))
+ if (auto* posZOrderList = parent.posZOrderList()) {
+ for (auto* childLayer : *posZOrderList) {
+ if (!compositedWithOwnBackingStore(*childLayer) && (childLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*childLayer)))
return true;
}
}
Modified: releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderLayerBacking.h (213806 => 213807)
--- releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderLayerBacking.h 2017-03-13 10:31:43 UTC (rev 213806)
+++ releases/WebKitGTK/webkit-2.16/Source/WebCore/rendering/RenderLayerBacking.h 2017-03-13 10:32:49 UTC (rev 213807)
@@ -309,8 +309,8 @@
bool isMainFrameRenderViewLayer() const;
- bool paintsNonDirectCompositedBoxDecoration() const;
- bool paintsChildren() const;
+ bool paintsBoxDecorations() const;
+ bool paintsChildRenderers() const;
// Returns true if this compositing layer has no visible content.
bool isSimpleContainerCompositingLayer() const;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes