Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1080)

Unified Diff: Source/core/rendering/RenderLayer.cpp

Issue 261053004: Simplify RenderLayer::setParent (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderLayer.cpp
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp
index 4196e8f2d9be9e192569aae086b6dfd4f7c80259..922e1a0ac76c8457a90283c6a378e9e52580d84b 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -1404,7 +1404,7 @@ void RenderLayer::addChild(RenderLayer* child, RenderLayer* beforeChild)
} else
setLastChild(child);
- child->setParent(this);
+ child->m_parent = this;
setNeedsToUpdateAncestorDependentProperties();
@@ -1475,7 +1475,7 @@ RenderLayer* RenderLayer::removeChild(RenderLayer* oldChild)
oldChild->setPreviousSibling(0);
oldChild->setNextSibling(0);
- oldChild->setParent(0);
+ oldChild->m_parent = 0;
oldChild->updateDescendantDependentFlags();
if (subtreeContainsOutOfFlowPositionedLayer(oldChild)) {
@@ -3612,20 +3612,6 @@ bool RenderLayer::childBackgroundIsKnownToBeOpaqueInRect(const LayoutRect& local
return false;
}
-void RenderLayer::setParent(RenderLayer* parent)
-{
- if (parent == m_parent)
- return;
-
- if (m_parent && !renderer()->documentBeingDestroyed())
- compositor()->layerWillBeRemoved(m_parent, this);
-
- m_parent = parent;
-
- if (m_parent && !renderer()->documentBeingDestroyed())
- compositor()->layerWasAdded(m_parent, this);
-}
-
bool RenderLayer::shouldBeSelfPaintingLayer() const
{
return m_layerType == NormalLayer
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698