Chromium Code Reviews| Index: Source/core/rendering/RenderObject.cpp |
| diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
| index 60588d5e404fd042451a69fe843ede9e24d2dd4c..2eccdf5babe78d36eb8a657b466ba5487582dda0 100644 |
| --- a/Source/core/rendering/RenderObject.cpp |
| +++ b/Source/core/rendering/RenderObject.cpp |
| @@ -1367,7 +1367,7 @@ void RenderObject::repaintUsingContainer(const RenderLayerModelObject* repaintCo |
| RenderView* v = view(); |
| if (repaintContainer->isRenderView()) { |
| ASSERT(repaintContainer == v); |
| - bool viewHasCompositedLayer = v->hasLayer() && v->layer()->isComposited(); |
| + bool viewHasCompositedLayer = v->hasLayer() && v->layer()->compositingState() == PaintsIntoOwnBacking; |
| if (!viewHasCompositedLayer) { |
| IntRect repaintRectangle = r; |
| if (viewHasCompositedLayer && v->layer()->transform()) |
| @@ -1378,7 +1378,7 @@ void RenderObject::repaintUsingContainer(const RenderLayerModelObject* repaintCo |
| } |
| if (v->usesCompositing()) { |
| - ASSERT(repaintContainer->hasLayer() && repaintContainer->layer()->isComposited()); |
| + ASSERT(repaintContainer->hasLayer() && repaintContainer->layer()->compositingState() == PaintsIntoOwnBacking); |
| repaintContainer->layer()->setBackingNeedsRepaintInRect(r); |
| } |
| } |
| @@ -1748,7 +1748,7 @@ StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff, unsign |
| // Text nodes share style with their parents but transforms don't apply to them, |
| // hence the !isText() check. |
| // FIXME: when transforms are taken into account for overflow, we will need to do a layout. |
| - if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer()->isComposited())) { |
| + if (!isText() && (!hasLayer() || toRenderLayerModelObject(this)->layer()->compositingState() != PaintsIntoOwnBacking)) { |
| // We need to set at least SimplifiedLayout, but if PositionedMovementOnly is already set |
| // then we actually need SimplifiedLayoutAndPositionedMovement. |
| if (!hasLayer()) |
| @@ -1764,7 +1764,7 @@ StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff, unsign |
| // If opacity changed, and we are not composited, need to repaint (also |
| // ignoring text nodes) |
| if (contextSensitiveProperties & ContextSensitivePropertyOpacity) { |
| - if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer()->isComposited())) |
| + if (!isText() && (!hasLayer() || toRenderLayerModelObject(this)->layer()->compositingState() != PaintsIntoOwnBacking)) |
|
Julien - ping for review
2013/10/03 20:08:36
This looks like it is solving some bugs when we pa
shawnsingh
2013/10/07 11:45:04
will look into it. =)
|
| diff = StyleDifferenceRepaintLayer; |
| else if (diff < StyleDifferenceRecompositeLayer) |
| diff = StyleDifferenceRecompositeLayer; |
| @@ -1772,7 +1772,7 @@ StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff, unsign |
| if ((contextSensitiveProperties & ContextSensitivePropertyFilter) && hasLayer()) { |
| RenderLayer* layer = toRenderLayerModelObject(this)->layer(); |
| - if (!layer->isComposited() || layer->paintsWithFilters()) |
| + if (layer->compositingState() != PaintsIntoOwnBacking || layer->paintsWithFilters()) |
| diff = StyleDifferenceRepaintLayer; |
| else if (diff < StyleDifferenceRecompositeLayer) |
| diff = StyleDifferenceRecompositeLayer; |
| @@ -2720,9 +2720,9 @@ void RenderObject::updateDragState(bool dragOn) |
| curr->updateDragState(dragOn); |
| } |
| -bool RenderObject::isComposited() const |
| +CompositingState RenderObject::compositingState() const |
| { |
| - return hasLayer() && toRenderLayerModelObject(this)->layer()->isComposited(); |
| + return hasLayer() ? toRenderLayerModelObject(this)->layer()->compositingState() : NotComposited; |
| } |
| bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestFilter hitTestFilter) |