| Index: Source/core/rendering/RenderObject.cpp
|
| diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
|
| index fad82562adb24917ac6240b8338ad0156fabbec1..fd5d75fcd85c6d8d2df2c98eb4e594055c1903f2 100644
|
| --- a/Source/core/rendering/RenderObject.cpp
|
| +++ b/Source/core/rendering/RenderObject.cpp
|
| @@ -746,13 +746,19 @@ void RenderObject::invalidateContainerPreferredLogicalWidths()
|
| void RenderObject::setLayerNeedsFullRepaint()
|
| {
|
| ASSERT(hasLayer());
|
| - toRenderLayerModelObject(this)->layer()->repainter().setRepaintStatus(NeedsFullRepaint);
|
| + if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
|
| + setShouldDoFullRepaintAfterLayout(true);
|
| + else
|
| + toRenderLayerModelObject(this)->layer()->repainter().setRepaintStatus(NeedsFullRepaint);
|
| }
|
|
|
| void RenderObject::setLayerNeedsFullRepaintForPositionedMovementLayout()
|
| {
|
| ASSERT(hasLayer());
|
| - toRenderLayerModelObject(this)->layer()->repainter().setRepaintStatus(NeedsFullRepaintForPositionedMovementLayout);
|
| + if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
|
| + setShouldDoFullRepaintIfNotComposited(true);
|
| + else
|
| + toRenderLayerModelObject(this)->layer()->repainter().setRepaintStatus(NeedsFullRepaintForPositionedMovementLayout);
|
| }
|
|
|
| RenderBlock* RenderObject::containerForFixedPosition(const RenderLayerModelObject* repaintContainer, bool* repaintContainerSkipped) const
|
| @@ -1614,6 +1620,9 @@ void RenderObject::repaintOverflow()
|
|
|
| bool RenderObject::checkForRepaint() const
|
| {
|
| + if (RuntimeEnabledFeatures::repaintAfterLayoutEnabled())
|
| + return !document().view()->needsFullRepaint() && everHadLayout();
|
| +
|
| return !document().view()->needsFullRepaint() && !hasLayer() && everHadLayout();
|
| }
|
|
|
| @@ -3328,6 +3337,64 @@ bool RenderObject::isRelayoutBoundaryForInspector() const
|
| return objectIsRelayoutBoundary(this);
|
| }
|
|
|
| +LayoutRect RenderObject::newOutlineRect()
|
| +{
|
| + ASSERT(hasOutline());
|
| +
|
| + OutlineRects& outlineRects = view()->outlineRects();
|
| + OutlineRects::iterator it = outlineRects.find(this);
|
| + if (it == outlineRects.end())
|
| + return outlineBoundsForRepaint(containerForRepaint());
|
| + return it->value->newOutlineRect;
|
| +}
|
| +
|
| +void RenderObject::setNewOutlineRect(const LayoutRect& rect)
|
| +{
|
| + ASSERT(hasOutline());
|
| +
|
| + OutlineRects& outlineRects = view()->outlineRects();
|
| + OutlineRects::iterator it = outlineRects.find(this);
|
| + if (it == outlineRects.end())
|
| + outlineRects.set(this, adoptPtr(new OutlineRectInfo()));
|
| +
|
| + outlineRects.get(this)->newOutlineRect = rect;
|
| +}
|
| +
|
| +LayoutRect RenderObject::oldOutlineRect()
|
| +{
|
| + ASSERT(hasOutline());
|
| +
|
| + OutlineRects& outlineRects = view()->outlineRects();
|
| + OutlineRects::iterator it = outlineRects.find(this);
|
| + if (it == outlineRects.end())
|
| + return LayoutRect();
|
| + return it->value->oldOutlineRect;
|
| +}
|
| +
|
| +void RenderObject::setOldOutlineRect(const LayoutRect& rect)
|
| +{
|
| + ASSERT(hasOutline());
|
| +
|
| + OutlineRects& outlineRects = view()->outlineRects();
|
| + OutlineRects::iterator it = outlineRects.find(this);
|
| + if (it == outlineRects.end())
|
| + outlineRects.set(this, adoptPtr(new OutlineRectInfo()));
|
| + outlineRects.get(this)->oldOutlineRect = rect;
|
| +}
|
| +
|
| +void RenderObject::clearRepaintState()
|
| +{
|
| + setShouldDoFullRepaintAfterLayout(false);
|
| + setShouldDoFullRepaintIfSelfPaintingLayer(false);
|
| + setShouldRepaintOverflowIfNeeded(false);
|
| + setLayoutDidGetCalled(false);
|
| +
|
| + OutlineRects& outlineRects = view()->outlineRects();
|
| + OutlineRects::iterator it = outlineRects.find(this);
|
| + if (it != outlineRects.end())
|
| + outlineRects.remove(it);
|
| +}
|
| +
|
| } // namespace WebCore
|
|
|
| #ifndef NDEBUG
|
|
|