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

Unified Diff: Source/core/layout/LayoutLayerModelObject.cpp

Issue 898783003: Move rendering/RenderLayer* to layout/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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/layout/LayoutLayerModelObject.h ('k') | Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutLayerModelObject.cpp
diff --git a/Source/core/rendering/RenderLayerModelObject.cpp b/Source/core/layout/LayoutLayerModelObject.cpp
similarity index 87%
rename from Source/core/rendering/RenderLayerModelObject.cpp
rename to Source/core/layout/LayoutLayerModelObject.cpp
index 029c8ddec58c4d542d059f5a416f6a6adea0290d..7f26065d574e957204d8f863ba4353233dffe501 100644
--- a/Source/core/rendering/RenderLayerModelObject.cpp
+++ b/Source/core/layout/LayoutLayerModelObject.cpp
@@ -23,54 +23,54 @@
*/
#include "config.h"
-#include "core/rendering/RenderLayerModelObject.h"
+#include "core/layout/LayoutLayerModelObject.h"
#include "core/frame/LocalFrame.h"
+#include "core/layout/Layer.h"
#include "core/layout/compositing/CompositedLayerMapping.h"
-#include "core/rendering/RenderLayer.h"
#include "core/rendering/RenderView.h"
namespace blink {
-bool RenderLayerModelObject::s_wasFloating = false;
+bool LayoutLayerModelObject::s_wasFloating = false;
-RenderLayerModelObject::RenderLayerModelObject(ContainerNode* node)
+LayoutLayerModelObject::LayoutLayerModelObject(ContainerNode* node)
: RenderObject(node)
{
}
-RenderLayerModelObject::~RenderLayerModelObject()
+LayoutLayerModelObject::~LayoutLayerModelObject()
{
// Our layer should have been destroyed and cleared by now
ASSERT(!hasLayer());
ASSERT(!m_layer);
}
-void RenderLayerModelObject::destroyLayer()
+void LayoutLayerModelObject::destroyLayer()
{
setHasLayer(false);
m_layer = nullptr;
}
-void RenderLayerModelObject::createLayer(LayerType type)
+void LayoutLayerModelObject::createLayer(LayerType type)
{
ASSERT(!m_layer);
- m_layer = adoptPtr(new RenderLayer(this, type));
+ m_layer = adoptPtr(new Layer(this, type));
setHasLayer(true);
m_layer->insertOnlyThisLayer();
}
-bool RenderLayerModelObject::hasSelfPaintingLayer() const
+bool LayoutLayerModelObject::hasSelfPaintingLayer() const
{
return m_layer && m_layer->isSelfPaintingLayer();
}
-RenderLayerScrollableArea* RenderLayerModelObject::scrollableArea() const
+LayerScrollableArea* LayoutLayerModelObject::scrollableArea() const
{
return m_layer ? m_layer->scrollableArea() : 0;
}
-void RenderLayerModelObject::willBeDestroyed()
+void LayoutLayerModelObject::willBeDestroyed()
{
if (isPositioned()) {
// Don't use this->view() because the document's renderView has been set to 0 during destruction.
@@ -87,7 +87,7 @@ void RenderLayerModelObject::willBeDestroyed()
destroyLayer();
}
-void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderStyle& newStyle)
+void LayoutLayerModelObject::styleWillChange(StyleDifference diff, const RenderStyle& newStyle)
{
s_wasFloating = isFloating();
@@ -102,7 +102,7 @@ void RenderLayerModelObject::styleWillChange(StyleDifference diff, const RenderS
RenderObject::styleWillChange(diff, newStyle);
}
-void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
+void LayoutLayerModelObject::styleDidChange(StyleDifference diff, const RenderStyle* oldStyle)
{
bool hadTransform = hasTransformRelatedProperty();
bool hadLayer = hasLayer();
@@ -154,14 +154,14 @@ void RenderLayerModelObject::styleDidChange(StyleDifference diff, const RenderSt
}
}
-void RenderLayerModelObject::addLayerHitTestRects(LayerHitTestRects& rects, const RenderLayer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
+void LayoutLayerModelObject::addLayerHitTestRects(LayerHitTestRects& rects, const Layer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& containerRect) const
{
if (hasLayer()) {
if (isRenderView()) {
// RenderView is handled with a special fast-path, but it needs to know the current layer.
RenderObject::addLayerHitTestRects(rects, layer(), LayoutPoint(), LayoutRect());
} else {
- // Since a RenderObject never lives outside it's container RenderLayer, we can switch
+ // Since a RenderObject never lives outside it's container Layer, we can switch
// to marking entire layers instead. This may sometimes mark more than necessary (when
// a layer is made of disjoint objects) but in practice is a significant performance
// savings.
@@ -172,7 +172,7 @@ void RenderLayerModelObject::addLayerHitTestRects(LayerHitTestRects& rects, cons
}
}
-void RenderLayerModelObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState)
+void LayoutLayerModelObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState)
{
ASSERT(!needsLayout());
@@ -180,7 +180,7 @@ void RenderLayerModelObject::invalidateTreeIfNeeded(const PaintInvalidationState
return;
bool establishesNewPaintInvalidationContainer = isPaintInvalidationContainer();
- const RenderLayerModelObject& newPaintInvalidationContainer = *adjustCompositedContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : &paintInvalidationState.paintInvalidationContainer());
+ const LayoutLayerModelObject& newPaintInvalidationContainer = *adjustCompositedContainerForSpecialAncestors(establishesNewPaintInvalidationContainer ? this : &paintInvalidationState.paintInvalidationContainer());
// FIXME: This assert should be re-enabled when we move paint invalidation to after compositing update. crbug.com/360286
// ASSERT(&newPaintInvalidationContainer == containerForPaintInvalidation());
@@ -193,7 +193,7 @@ void RenderLayerModelObject::invalidateTreeIfNeeded(const PaintInvalidationState
invalidatePaintOfSubtreesIfNeeded(childTreeWalkState);
}
-void RenderLayerModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRect& r, PaintInvalidationReason invalidationReason) const
+void LayoutLayerModelObject::setBackingNeedsPaintInvalidationInRect(const LayoutRect& r, PaintInvalidationReason invalidationReason) const
{
// https://bugs.webkit.org/show_bug.cgi?id=61159 describes an unreproducible crash here,
// so assert but check that the layer is composited.
@@ -211,7 +211,7 @@ void RenderLayerModelObject::setBackingNeedsPaintInvalidationInRect(const Layout
}
}
-void RenderLayerModelObject::addChildFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset) const
+void LayoutLayerModelObject::addChildFocusRingRects(Vector<LayoutRect>& rects, const LayoutPoint& additionalOffset) const
{
for (RenderObject* current = slowFirstChild(); current; current = current->nextSibling()) {
if (current->isText() || current->isListMarker())
« no previous file with comments | « Source/core/layout/LayoutLayerModelObject.h ('k') | Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698