Chromium Code Reviews| Index: third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp |
| diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp |
| index 3380513a74a27304b088a1eb25d50dd26dc5031a..3d91e2278e6e57542cf24c1d1143529a613b0612 100644 |
| --- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp |
| +++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp |
| @@ -318,10 +318,10 @@ const AffineTransform& LayoutSVGRoot::localToSVGParentTransform() const |
| return m_localToParentTransform; |
| } |
| -LayoutRect LayoutSVGRoot::clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) const |
| +LayoutRect LayoutSVGRoot::localOverflowRectForPaintInvalidation() const |
| { |
| - // This is an open-coded aggregate of SVGLayoutSupport::clippedOverflowRectForPaintInvalidation, |
| - // LayoutSVGRoot::mapToVisibleRectInAncestorSpace and LayoutReplaced::clippedOverflowRectForPaintInvalidation. |
| + // This is an open-coded aggregate of SVGLayoutSupport::localOverflowRectForPaintInvalidation, |
|
pdr.
2016/03/25 01:08:01
This comment is no longer correct because mapToVis
Xianzhu
2016/03/25 16:35:54
Removed LayoutSVGRoot::mapToVisibleRectInAncestorS
|
| + // LayoutSVGRoot::mapToVisibleRectInAncestorSpace and LayoutReplaced::localOverflowRectForPaintInvalidation. |
| // The reason for this is to optimize/minimize the paint invalidation rect when the box is not "decorated" |
| // (does not have background/border/etc.) |
| @@ -346,13 +346,10 @@ LayoutRect LayoutSVGRoot::clippedOverflowRectForPaintInvalidation(const LayoutBo |
| paintInvalidationRect.unite(decoratedPaintInvalidationRect); |
| } |
| - // Compute the paint invalidation rect in the parent coordinate space. |
| - LayoutRect rect(enclosingIntRect(paintInvalidationRect)); |
| - LayoutReplaced::mapToVisibleRectInAncestorSpace(paintInvalidationContainer, rect, paintInvalidationState); |
| - return rect; |
| + return LayoutRect(enclosingIntRect(paintInvalidationRect)); |
| } |
| -void LayoutSVGRoot::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState) const |
| +void LayoutSVGRoot::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ancestor, LayoutRect& rect) const |
| { |
| // Note that we don't apply the border-box transform here - it's assumed |
| // that whoever called us has done that already. |
| @@ -361,17 +358,17 @@ void LayoutSVGRoot::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* |
| if (shouldApplyViewportClip()) |
| rect.intersect(LayoutRect(pixelSnappedBorderBoxRect())); |
| - LayoutReplaced::mapToVisibleRectInAncestorSpace(ancestor, rect, paintInvalidationState); |
| + LayoutReplaced::mapToVisibleRectInAncestorSpace(ancestor, rect); |
| } |
| // This method expects local CSS box coordinates. |
| // Callers with local SVG viewport coordinates should first apply the localToBorderBoxTransform |
| // to convert from SVG viewport coordinates to local CSS box coordinates. |
| -void LayoutSVGRoot::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const |
| +void LayoutSVGRoot::mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState& transformState, MapCoordinatesFlags mode, bool* wasFixed) const |
| { |
| ASSERT(!(mode & IsFixed)); // We should have no fixed content in the SVG layout tree. |
| - LayoutReplaced::mapLocalToAncestor(ancestor, transformState, mode | ApplyContainerFlip, wasFixed, paintInvalidationState); |
| + LayoutReplaced::mapLocalToAncestor(ancestor, transformState, mode | ApplyContainerFlip, wasFixed); |
| } |
| const LayoutObject* LayoutSVGRoot::pushMappingToContainer(const LayoutBoxModelObject* ancestorToStopAt, LayoutGeometryMap& geometryMap) const |