Chromium Code Reviews| Index: Source/core/rendering/svg/RenderSVGModelObject.cpp |
| diff --git a/Source/core/rendering/svg/RenderSVGModelObject.cpp b/Source/core/rendering/svg/RenderSVGModelObject.cpp |
| index 15679791569f254950edbde84f9cc9cffea4ae77..a2c2338202cbadae547f69f9a3d93b847600ad20 100644 |
| --- a/Source/core/rendering/svg/RenderSVGModelObject.cpp |
| +++ b/Source/core/rendering/svg/RenderSVGModelObject.cpp |
| @@ -33,6 +33,8 @@ |
| #include "core/rendering/svg/RenderSVGModelObject.h" |
| #include "SVGNames.h" |
| +#include "core/rendering/RenderLayer.h" |
| +#include "core/rendering/RenderView.h" |
| #include "core/rendering/svg/RenderSVGRoot.h" |
| #include "core/rendering/svg/SVGResourcesCache.h" |
| #include "core/svg/SVGGraphicsElement.h" |
| @@ -123,4 +125,53 @@ void RenderSVGModelObject::absoluteFocusRingQuads(Vector<FloatQuad>& quads) |
| quads.append(localToAbsoluteQuad(FloatQuad(repaintRectInLocalCoordinates()))); |
| } |
| +void RenderSVGModelObject::repaintTreeAfterLayout() |
| +{ |
| + // Note: This is a reduced version of RenderBox::repaintTreeAfterLayout(). |
|
leviw_travelin_and_unemployed
2014/05/02 18:30:15
This makes me sad, but I don't have a better idea
|
| + |
| + ASSERT(RuntimeEnabledFeatures::repaintAfterLayoutEnabled()); |
| + ASSERT(!needsLayout()); |
| + |
| + const LayoutRect oldRepaintRect = previousRepaintRect(); |
| + const LayoutPoint oldPositionFromRepaintContainer = previousPositionFromRepaintContainer(); |
| + RenderLayerModelObject* repaintContainer = containerForRepaint(); |
| + setPreviousRepaintRect(clippedOverflowRectForRepaint(repaintContainer)); |
| + setPreviousPositionFromRepaintContainer(positionFromRepaintContainer(repaintContainer)); |
| + |
| + // If we are set to do a full repaint that means the RenderView will be |
| + // invalidated. We can then skip issuing of invalidations for the child |
| + // renderers as they'll be covered by the RenderView. |
| + if (view()->doingFullRepaint()) { |
| + LayoutStateDisabler layoutStateDisabler(*this); |
| + RenderObject::repaintTreeAfterLayout(); |
| + return; |
| + } |
| + |
| + if (onlyNeededPositionedMovementLayout() && compositingState() != PaintsIntoOwnBacking) { |
|
leviw_travelin_and_unemployed
2014/05/02 18:30:15
nit: don't need braces
fs
2014/05/05 08:27:12
Dropped.
|
| + setShouldDoFullRepaintAfterLayout(true); |
| + } |
| + |
| + const LayoutRect& newRepaintRect = previousRepaintRect(); |
| + const LayoutPoint& newPositionFromRepaintContainer = previousPositionFromRepaintContainer(); |
| + bool didFullRepaint = repaintAfterLayoutIfNeeded(containerForRepaint(), |
| + shouldDoFullRepaintAfterLayout(), oldRepaintRect, oldPositionFromRepaintContainer, &newRepaintRect, &newPositionFromRepaintContainer); |
| + |
| + if (!didFullRepaint) |
| + repaintOverflowIfNeeded(); |
| + |
| + // Repaint any scrollbars if there is a scrollable area for this renderer. |
| + if (enclosingLayer()) { |
|
leviw_travelin_and_unemployed
2014/05/02 18:30:15
This block of code should be moved into a shared f
fs
2014/05/05 08:27:12
Relocated to RenderObject::repaintScrollbarsIfNeed
|
| + if (RenderLayerScrollableArea* area = enclosingLayer()->scrollableArea()) { |
| + if (area->hasVerticalBarDamage()) |
| + repaintRectangle(area->verticalBarDamage()); |
| + if (area->hasHorizontalBarDamage()) |
| + repaintRectangle(area->horizontalBarDamage()); |
| + area->resetScrollbarDamage(); |
| + } |
| + } |
| + |
| + LayoutStateDisabler layoutStateDisabler(*this); |
|
leviw_travelin_and_unemployed
2014/05/02 18:30:15
Should we just have one of these at the top of the
fs
2014/05/05 08:27:12
Makes sense. Hoisted and combined.
|
| + RenderObject::repaintTreeAfterLayout(); |
| +} |
| + |
| } // namespace WebCore |