| Index: sky/engine/core/rendering/RenderBoxModelObject.cpp
|
| diff --git a/sky/engine/core/rendering/RenderBoxModelObject.cpp b/sky/engine/core/rendering/RenderBoxModelObject.cpp
|
| index 62f95a470ef4db808449817a80d5147bae45d32a..2335c6ea92248a606726f686d60f8e1b7ab58eb5 100644
|
| --- a/sky/engine/core/rendering/RenderBoxModelObject.cpp
|
| +++ b/sky/engine/core/rendering/RenderBoxModelObject.cpp
|
| @@ -63,7 +63,7 @@ void RenderBoxModelObject::setSelectionState(SelectionState state)
|
| }
|
|
|
| RenderBoxModelObject::RenderBoxModelObject(ContainerNode* node)
|
| - : RenderLayerModelObject(node)
|
| + : RenderObject(node)
|
| {
|
| }
|
|
|
| @@ -71,23 +71,6 @@ RenderBoxModelObject::~RenderBoxModelObject()
|
| {
|
| }
|
|
|
| -bool RenderBoxModelObject::calculateHasBoxDecorations() const
|
| -{
|
| - RenderStyle* styleToUse = style();
|
| - ASSERT(styleToUse);
|
| - return hasBackground() || styleToUse->hasBorder() || styleToUse->boxShadow();
|
| -}
|
| -
|
| -void RenderBoxModelObject::updateFromStyle()
|
| -{
|
| - RenderLayerModelObject::updateFromStyle();
|
| -
|
| - RenderStyle* styleToUse = style();
|
| - setHasBoxDecorationBackground(calculateHasBoxDecorations());
|
| - setInline(styleToUse->isDisplayInlineType());
|
| - setPositionState(styleToUse->position());
|
| -}
|
| -
|
| bool RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight() const
|
| {
|
| Length logicalHeightLength = style()->logicalHeight();
|
| @@ -655,7 +638,7 @@ static inline int getSpace(int areaSize, int tileSize)
|
| return space;
|
| }
|
|
|
| -void RenderBoxModelObject::calculateBackgroundImageGeometry(const RenderLayerModelObject* paintContainer, const FillLayer& fillLayer, const LayoutRect& paintRect,
|
| +void RenderBoxModelObject::calculateBackgroundImageGeometry(const RenderBox* paintContainer, const FillLayer& fillLayer, const LayoutRect& paintRect,
|
| BackgroundImageGeometry& geometry, RenderObject* backgroundObject) const
|
| {
|
| LayoutUnit left = 0;
|
| @@ -2331,7 +2314,7 @@ void RenderBoxModelObject::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, Tra
|
| transformState.move(containerOffset.width(), containerOffset.height(), preserve3D ? TransformState::AccumulateTransform : TransformState::FlattenTransform);
|
| }
|
|
|
| -const RenderObject* RenderBoxModelObject::pushMappingToContainer(const RenderLayerModelObject* ancestorToStopAt, RenderGeometryMap& geometryMap) const
|
| +const RenderObject* RenderBoxModelObject::pushMappingToContainer(const RenderBox* ancestorToStopAt, RenderGeometryMap& geometryMap) const
|
| {
|
| ASSERT(ancestorToStopAt != this);
|
|
|
| @@ -2341,7 +2324,7 @@ const RenderObject* RenderBoxModelObject::pushMappingToContainer(const RenderLay
|
| return 0;
|
|
|
| bool isInline = isRenderInline();
|
| - bool hasTransform = !isInline && hasLayer() && layer()->transform();
|
| + bool hasTransform = !isInline && hasLayer() && toRenderBox(this)->layer()->transform();
|
|
|
| LayoutSize adjustmentForSkippedAncestor;
|
| if (ancestorSkipped) {
|
| @@ -2367,6 +2350,21 @@ const RenderObject* RenderBoxModelObject::pushMappingToContainer(const RenderLay
|
| return ancestorSkipped ? ancestorToStopAt : container;
|
| }
|
|
|
| +void RenderBoxModelObject::collectSelfPaintingLayers(Vector<RenderBox*>& layers)
|
| +{
|
| + for (RenderObject* child = slowFirstChild(); child; child = child->nextSibling()) {
|
| + if (child->isBox()) {
|
| + RenderBox* childBox = toRenderBox(child);
|
| + if (childBox->hasSelfPaintingLayer())
|
| + layers.append(childBox);
|
| + else
|
| + childBox->collectSelfPaintingLayers(layers);
|
| + } else if (child->isBoxModelObject()) {
|
| + toRenderBoxModelObject(child)->collectSelfPaintingLayers(layers);
|
| + }
|
| + }
|
| +}
|
| +
|
| void RenderBoxModelObject::moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child, RenderObject* beforeChild, bool fullRemoveInsert)
|
| {
|
| // We assume that callers have cleared their positioned objects list for child moves (!fullRemoveInsert) so the
|
|
|