Title: [189083] trunk/Source/WebCore
- Revision
- 189083
- Author
- [email protected]
- Date
- 2015-08-27 20:51:13 -0700 (Thu, 27 Aug 2015)
Log Message
Tiny cleanup in RenderLayer::enclosingCompositingLayerForRepaint()
https://bugs.webkit.org/show_bug.cgi?id=148541
Reviewed by Tim Horton.
No change in functionality.
* rendering/RenderLayer.cpp:
(WebCore::compositingContainer):
(WebCore::compositedWithOwnBackingStore):
(WebCore::RenderLayer::enclosingCompositingLayer):
(WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
(WebCore::RenderLayer::enclosingFilterRepaintLayer):
(WebCore::RenderLayer::clippingRootForPainting):
* rendering/RenderLayer.h:
* rendering/RenderLayerBacking.cpp:
(WebCore::descendantLayerPaintsIntoAncestor):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (189082 => 189083)
--- trunk/Source/WebCore/ChangeLog 2015-08-28 02:28:35 UTC (rev 189082)
+++ trunk/Source/WebCore/ChangeLog 2015-08-28 03:51:13 UTC (rev 189083)
@@ -1,3 +1,23 @@
+2015-08-27 Zalan Bujtas <[email protected]>
+
+ Tiny cleanup in RenderLayer::enclosingCompositingLayerForRepaint()
+ https://bugs.webkit.org/show_bug.cgi?id=148541
+
+ Reviewed by Tim Horton.
+
+ No change in functionality.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::compositingContainer):
+ (WebCore::compositedWithOwnBackingStore):
+ (WebCore::RenderLayer::enclosingCompositingLayer):
+ (WebCore::RenderLayer::enclosingCompositingLayerForRepaint):
+ (WebCore::RenderLayer::enclosingFilterRepaintLayer):
+ (WebCore::RenderLayer::clippingRootForPainting):
+ * rendering/RenderLayer.h:
+ * rendering/RenderLayerBacking.cpp:
+ (WebCore::descendantLayerPaintsIntoAncestor):
+
2015-08-27 Commit Queue <[email protected]>
Unreviewed, rolling out r189079.
Modified: trunk/Source/WebCore/rendering/RenderLayer.cpp (189082 => 189083)
--- trunk/Source/WebCore/rendering/RenderLayer.cpp 2015-08-28 02:28:35 UTC (rev 189082)
+++ trunk/Source/WebCore/rendering/RenderLayer.cpp 2015-08-28 03:51:13 UTC (rev 189083)
@@ -1515,9 +1515,9 @@
return curr;
}
-static inline const RenderLayer* compositingContainer(const RenderLayer* layer)
+static inline const RenderLayer* compositingContainer(const RenderLayer& layer)
{
- return layer->isNormalFlowOnly() ? layer->parent() : layer->stackingContainer();
+ return layer.isNormalFlowOnly() ? layer.parent() : layer.stackingContainer();
}
inline bool RenderLayer::shouldRepaintAfterLayout() const
@@ -1531,9 +1531,9 @@
return !isComposited() || backing()->paintsIntoCompositedAncestor();
}
-bool compositedWithOwnBackingStore(const RenderLayer* layer)
+bool compositedWithOwnBackingStore(const RenderLayer& layer)
{
- return layer->isComposited() && !layer->backing()->paintsIntoCompositedAncestor();
+ return layer.isComposited() && !layer.backing()->paintsIntoCompositedAncestor();
}
RenderLayer* RenderLayer::enclosingCompositingLayer(IncludeSelfOrNot includeSelf) const
@@ -1541,7 +1541,7 @@
if (includeSelf == IncludeSelf && isComposited())
return const_cast<RenderLayer*>(this);
- for (const RenderLayer* curr = compositingContainer(this); curr; curr = compositingContainer(curr)) {
+ for (const RenderLayer* curr = compositingContainer(*this); curr; curr = compositingContainer(*curr)) {
if (curr->isComposited())
return const_cast<RenderLayer*>(curr);
}
@@ -1551,11 +1551,11 @@
RenderLayer* RenderLayer::enclosingCompositingLayerForRepaint(IncludeSelfOrNot includeSelf) const
{
- if (includeSelf == IncludeSelf && isComposited() && !backing()->paintsIntoCompositedAncestor())
+ if (includeSelf == IncludeSelf && compositedWithOwnBackingStore(*this))
return const_cast<RenderLayer*>(this);
- for (const RenderLayer* curr = compositingContainer(this); curr; curr = compositingContainer(curr)) {
- if (compositedWithOwnBackingStore(curr))
+ for (const RenderLayer* curr = compositingContainer(*this); curr; curr = compositingContainer(*curr)) {
+ if (compositedWithOwnBackingStore(*curr))
return const_cast<RenderLayer*>(curr);
}
@@ -1576,7 +1576,7 @@
RenderLayer* RenderLayer::enclosingFilterRepaintLayer() const
{
for (const RenderLayer* curr = this; curr; curr = curr->parent()) {
- if ((curr != this && curr->requiresFullLayerImageForFilters()) || compositedWithOwnBackingStore(curr) || curr->isRootLayer())
+ if ((curr != this && curr->requiresFullLayerImageForFilters()) || compositedWithOwnBackingStore(*curr) || curr->isRootLayer())
return const_cast<RenderLayer*>(curr);
}
return nullptr;
@@ -1640,9 +1640,9 @@
if (current->isRootLayer())
return const_cast<RenderLayer*>(current);
- current = compositingContainer(current);
+ current = compositingContainer(*current);
ASSERT(current);
- if (current->transform() || compositedWithOwnBackingStore(current))
+ if (current->transform() || compositedWithOwnBackingStore(*current))
return const_cast<RenderLayer*>(current);
}
Modified: trunk/Source/WebCore/rendering/RenderLayer.h (189082 => 189083)
--- trunk/Source/WebCore/rendering/RenderLayer.h 2015-08-28 02:28:35 UTC (rev 189082)
+++ trunk/Source/WebCore/rendering/RenderLayer.h 2015-08-28 03:51:13 UTC (rev 189083)
@@ -1184,7 +1184,7 @@
void makeMatrixRenderable(TransformationMatrix&, bool has3DRendering);
-bool compositedWithOwnBackingStore(const RenderLayer*);
+bool compositedWithOwnBackingStore(const RenderLayer&);
} // namespace WebCore
Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (189082 => 189083)
--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2015-08-28 02:28:35 UTC (rev 189082)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp 2015-08-28 03:51:13 UTC (rev 189083)
@@ -1902,7 +1902,7 @@
size_t listSize = normalFlowList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = normalFlowList->at(i);
- if (!compositedWithOwnBackingStore(curLayer)
+ if (!compositedWithOwnBackingStore(*curLayer)
&& (curLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*curLayer)))
return true;
}
@@ -1917,7 +1917,7 @@
size_t listSize = negZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = negZOrderList->at(i);
- if (!compositedWithOwnBackingStore(curLayer)
+ if (!compositedWithOwnBackingStore(*curLayer)
&& (curLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*curLayer)))
return true;
}
@@ -1927,7 +1927,7 @@
size_t listSize = posZOrderList->size();
for (size_t i = 0; i < listSize; ++i) {
RenderLayer* curLayer = posZOrderList->at(i);
- if (!compositedWithOwnBackingStore(curLayer)
+ if (!compositedWithOwnBackingStore(*curLayer)
&& (curLayer->isVisuallyNonEmpty() || descendantLayerPaintsIntoAncestor(*curLayer)))
return true;
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes