Chromium Code Reviews| Index: Source/core/rendering/RenderObject.cpp |
| diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp |
| index 646a964a5809a9b70d88a5fb6babfebdeb56ebb1..e207ce62b50227819efd120a3aa62fd7c4ec2e59 100644 |
| --- a/Source/core/rendering/RenderObject.cpp |
| +++ b/Source/core/rendering/RenderObject.cpp |
| @@ -749,13 +749,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()) |
| + setShouldDoFullRepaintAfterLayout(true); |
| + else |
| + toRenderLayerModelObject(this)->layer()->repainter().setRepaintStatus(NeedsFullRepaintForPositionedMovementLayout); |
| } |
| RenderBlock* RenderObject::containerForFixedPosition(const RenderLayerModelObject* repaintContainer, bool* repaintContainerSkipped) const |
| @@ -1594,7 +1600,7 @@ void RenderObject::repaintOverflow() |
| bool RenderObject::checkForRepaint() const |
| { |
| - return !document().view()->needsFullRepaint() && !hasLayer() && everHadLayout(); |
| + return !document().view()->needsFullRepaint() && everHadLayout(); |
| } |
| bool RenderObject::checkForRepaintDuringLayout() const |
| @@ -3308,6 +3314,55 @@ bool RenderObject::isRelayoutBoundaryForInspector() const |
| return objectIsRelayoutBoundary(this); |
| } |
| +const LayoutRect RenderObject::newOutlineRect() |
| +{ |
| + OutlineRects* outlineRects = view()->outlineRects(); |
|
esprehn
2014/02/28 02:54:33
ditto, you need a "hasOutlineRects" bitfield to gu
dsinclair
2014/02/28 18:58:24
ack.
|
| + OutlineRects::iterator it = outlineRects->find(this); |
| + if (it == outlineRects->end()) |
| + return outlineBoundsForRepaint(containerForRepaint()); |
| + return it->value.newOutlineRect; |
| +} |
| + |
| +void RenderObject::setNewOutlineRect(const LayoutRect& rect) |
| +{ |
| + OutlineRects* outlineRects = view()->outlineRects(); |
| + OutlineRects::iterator it = outlineRects->find(this); |
| + if (it == outlineRects->end()) |
| + outlineRects->set(this, OutlineRectInfo()); |
| + |
| + outlineRects->get(this).newOutlineRect = rect; |
| +} |
| + |
| +const LayoutRect RenderObject::oldOutlineRect() |
| +{ |
| + OutlineRects* outlineRects = view()->outlineRects(); |
|
esprehn
2014/02/28 02:54:33
You need to use a bitfield so you don't hit the ha
dsinclair
2014/02/28 18:58:24
I did the check on the other side, I only query th
Julien - ping for review
2014/03/04 18:22:10
Outline is a style property so it won't change dur
|
| + OutlineRects::iterator it = outlineRects->find(this); |
| + if (it == outlineRects->end()) |
| + return LayoutRect(); |
| + return it->value.oldOutlineRect; |
| +} |
| + |
| +void RenderObject::setOldOutlineRect(const LayoutRect& rect) |
| +{ |
| + OutlineRects* outlineRects = view()->outlineRects(); |
| + OutlineRects::iterator it = outlineRects->find(this); |
| + if (it == outlineRects->end()) |
| + outlineRects->set(this, OutlineRectInfo()); |
| + outlineRects->get(this).oldOutlineRect = rect; |
| +} |
| + |
| +void RenderObject::clearRepaintState() |
| +{ |
| + setShouldDoFullRepaintAfterLayout(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 |