summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwangxianzhu <wangxianzhu@chromium.org>2016-03-18 13:09:05 -0700
committerCommit bot <commit-bot@chromium.org>2016-03-18 20:10:41 +0000
commit8f265dbe451806797bde728047fad52525e89d65 (patch)
tree823776f9cfb30af3ff812e573490ab1c535cc855
parent905b111f901585bd25901e72b2141a7dc4bae246 (diff)
downloadchromium_src-8f265dbe451806797bde728047fad52525e89d65.zip
chromium_src-8f265dbe451806797bde728047fad52525e89d65.tar.gz
chromium_src-8f265dbe451806797bde728047fad52525e89d65.tar.bz2
Rename some LayoutObject's SVG-specific methods
These methods declared in LayoutObject are SVG-specific. Some concepts are different or not applicable to non-SVG LayoutObjects. For example, "local coordinates" in paintInvalidationRectInLocalCoordinates() means differently for SVG and normal LayoutObjects. Review URL: https://codereview.chromium.org/1810233002 Cr-Commit-Position: refs/heads/master@{#382060}
-rw-r--r--third_party/WebKit/Source/core/layout/LayoutObject.cpp8
-rw-r--r--third_party/WebKit/Source/core/layout/LayoutObject.h14
-rw-r--r--third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp2
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.h2
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp4
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp6
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.h4
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGGradientStop.h2
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp4
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.h4
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.cpp4
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.h2
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp2
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.h2
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp2
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.cpp6
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.h2
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMasker.cpp2
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp12
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h4
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp4
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h4
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp4
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGText.h4
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGTransformableContainer.h4
-rw-r--r--third_party/WebKit/Source/core/layout/svg/LayoutSVGViewportContainer.h2
-rw-r--r--third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp22
-rw-r--r--third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp4
-rw-r--r--third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp2
-rw-r--r--third_party/WebKit/Source/core/paint/SVGContainerPainter.cpp10
-rw-r--r--third_party/WebKit/Source/core/paint/SVGForeignObjectPainter.cpp4
-rw-r--r--third_party/WebKit/Source/core/paint/SVGImagePainter.cpp6
-rw-r--r--third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp4
-rw-r--r--third_party/WebKit/Source/core/paint/SVGPaintContext.cpp4
-rw-r--r--third_party/WebKit/Source/core/paint/SVGShapePainter.cpp6
-rw-r--r--third_party/WebKit/Source/core/paint/SVGTextPainter.cpp4
-rw-r--r--third_party/WebKit/Source/core/svg/SVGSVGElement.cpp2
-rw-r--r--third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp4
38 files changed, 91 insertions, 91 deletions
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 856a206..1941a74 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -3405,21 +3405,19 @@ FloatRect LayoutObject::strokeBoundingBox() const
return FloatRect();
}
-// Returns the smallest rectangle enclosing all of the painted content
-// respecting clipping, masking, filters, opacity, stroke-width and markers
-FloatRect LayoutObject::paintInvalidationRectInLocalCoordinates() const
+FloatRect LayoutObject::paintInvalidationRectInLocalSVGCoordinates() const
{
ASSERT_NOT_REACHED();
return FloatRect();
}
-AffineTransform LayoutObject::localTransform() const
+AffineTransform LayoutObject::localSVGTransform() const
{
static const AffineTransform identity;
return identity;
}
-const AffineTransform& LayoutObject::localToParentTransform() const
+const AffineTransform& LayoutObject::localToSVGParentTransform() const
{
static const AffineTransform identity;
return identity;
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.h b/third_party/WebKit/Source/core/layout/LayoutObject.h
index bca876b..28431c2 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.h
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.h
@@ -613,21 +613,23 @@ public:
// Returns the smallest rectangle enclosing all of the painted content
// respecting clipping, masking, filters, opacity, stroke-width and markers
- virtual FloatRect paintInvalidationRectInLocalCoordinates() const;
+ virtual FloatRect paintInvalidationRectInLocalSVGCoordinates() const;
- // This only returns the transform="" value from the element
- // most callsites want localToParentTransform() instead.
- virtual AffineTransform localTransform() const;
+ // This only returns the transform="" value from the SVG element.
+ // Most callsites want localToParentTransform() instead.
+ virtual AffineTransform localSVGTransform() const;
// Returns the full transform mapping from local coordinates to local coords for the parent SVG layoutObject
// This includes any viewport transforms and x/y offsets as well as the transform="" value off the element.
- virtual const AffineTransform& localToParentTransform() const;
+ virtual const AffineTransform& localToSVGParentTransform() const;
// SVG uses FloatPoint precise hit testing, and passes the point in parent
- // coordinates instead of in paint invalidaiton container coordinates. Eventually the
+ // coordinates instead of in paint invalidation container coordinates. Eventually the
// rest of the layout tree will move to a similar model.
virtual bool nodeAtFloatPoint(HitTestResult&, const FloatPoint& pointInParent, HitTestAction);
+ // End of SVG-specific methods.
+
bool isAnonymous() const { return m_bitfields.isAnonymous(); }
bool isAnonymousBlock() const
{
diff --git a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
index b24b6b1..ca464ab 100644
--- a/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
+++ b/third_party/WebKit/Source/core/layout/PaintInvalidationState.cpp
@@ -102,7 +102,7 @@ void PaintInvalidationState::updatePaintOffsetAndClipForChildren()
ASSERT(m_currentObject.isSVG());
ASSERT(!establishesPaintInvalidationContainer);
if (m_cachedOffsetsEnabled)
- m_svgTransform = AffineTransform(m_svgTransform * m_currentObject.localToParentTransform());
+ m_svgTransform = AffineTransform(m_svgTransform * m_currentObject.localToSVGParentTransform());
return;
}
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.h
index d75113c6..a2cd30d 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGBlock.h
@@ -36,7 +36,7 @@ public:
void mapAncestorToLocal(const LayoutBoxModelObject* ancestor, TransformState&, MapCoordinatesFlags = ApplyContainerFlip) const final;
const LayoutObject* pushMappingToContainer(const LayoutBoxModelObject* ancestorToStopAt, LayoutGeometryMap&) const final;
- AffineTransform localTransform() const final { return m_localTransform; }
+ AffineTransform localSVGTransform() const final { return m_localTransform; }
PaintLayerType layerTypeRequired() const final { return NoPaintLayer; }
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp
index d891048..4b7e9e3 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGContainer.cpp
@@ -151,7 +151,7 @@ void LayoutSVGContainer::paint(const PaintInfo& paintInfo, const LayoutPoint&) c
void LayoutSVGContainer::addOutlineRects(Vector<LayoutRect>& rects, const LayoutPoint&, IncludeBlockVisualOverflowOrNot) const
{
- rects.append(LayoutRect(paintInvalidationRectInLocalCoordinates()));
+ rects.append(LayoutRect(paintInvalidationRectInLocalSVGCoordinates()));
}
void LayoutSVGContainer::updateCachedBoundaries()
@@ -167,7 +167,7 @@ bool LayoutSVGContainer::nodeAtFloatPoint(HitTestResult& result, const FloatPoin
return false;
FloatPoint localPoint;
- if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localToParentTransform(), pointInParent, localPoint))
+ if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localToSVGParentTransform(), pointInParent, localPoint))
return false;
for (LayoutObject* child = lastChild(); child; child = child->previousSibling()) {
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
index 7c9a97c..e8614c6 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.cpp
@@ -51,9 +51,9 @@ void LayoutSVGForeignObject::paint(const PaintInfo& paintInfo, const LayoutPoint
SVGForeignObjectPainter(*this).paint(paintInfo);
}
-const AffineTransform& LayoutSVGForeignObject::localToParentTransform() const
+const AffineTransform& LayoutSVGForeignObject::localToSVGParentTransform() const
{
- m_localToParentTransform = localTransform();
+ m_localToParentTransform = localSVGTransform();
m_localToParentTransform.translate(m_viewport.x(), m_viewport.y());
return m_localToParentTransform;
}
@@ -126,7 +126,7 @@ bool LayoutSVGForeignObject::nodeAtFloatPoint(HitTestResult& result, const Float
if (hitTestAction != HitTestForeground)
return false;
- AffineTransform localTransform = this->localTransform();
+ AffineTransform localTransform = this->localSVGTransform();
if (!localTransform.isInvertible())
return false;
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.h
index f1e715c..ede5ffb 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGForeignObject.h
@@ -54,7 +54,7 @@ public:
FloatRect objectBoundingBox() const override { return FloatRect(FloatPoint(), m_viewport.size()); }
FloatRect strokeBoundingBox() const override { return FloatRect(FloatPoint(), m_viewport.size()); }
- FloatRect paintInvalidationRectInLocalCoordinates() const override { return FloatRect(FloatPoint(), m_viewport.size()); }
+ FloatRect paintInvalidationRectInLocalSVGCoordinates() const override { return FloatRect(FloatPoint(), m_viewport.size()); }
bool nodeAtFloatPoint(HitTestResult&, const FloatPoint& pointInParent, HitTestAction) override;
bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVGForeignObject || LayoutSVGBlock::isOfType(type); }
@@ -67,7 +67,7 @@ private:
void updateLogicalWidth() override;
void computeLogicalHeight(LayoutUnit logicalHeight, LayoutUnit logicalTop, LogicalExtentComputedValues&) const override;
- const AffineTransform& localToParentTransform() const override;
+ const AffineTransform& localToSVGParentTransform() const override;
bool m_needsTransformUpdate : 1;
FloatRect m_viewport;
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGGradientStop.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGGradientStop.h
index 72feae9..739e1b5 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGGradientStop.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGGradientStop.h
@@ -45,7 +45,7 @@ public:
LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObject*, const PaintInvalidationState* = nullptr) const override { return LayoutRect(); }
FloatRect objectBoundingBox() const override { return FloatRect(); }
FloatRect strokeBoundingBox() const override { return FloatRect(); }
- FloatRect paintInvalidationRectInLocalCoordinates() const override { return FloatRect(); }
+ FloatRect paintInvalidationRectInLocalSVGCoordinates() const override { return FloatRect(); }
protected:
void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp
index aa62500..ad36284 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.cpp
@@ -122,7 +122,7 @@ bool LayoutSVGImage::nodeAtFloatPoint(HitTestResult& result, const FloatPoint& p
bool isVisible = (style()->visibility() == VISIBLE);
if (isVisible || !hitRules.requireVisible) {
FloatPoint localPoint;
- if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localToParentTransform(), pointInParent, localPoint))
+ if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localToSVGParentTransform(), pointInParent, localPoint))
return false;
if (hitRules.canHitFill || hitRules.canHitBoundingBox) {
@@ -153,7 +153,7 @@ void LayoutSVGImage::imageChanged(WrappedImagePtr, const IntRect*)
void LayoutSVGImage::addOutlineRects(Vector<LayoutRect>& rects, const LayoutPoint&, IncludeBlockVisualOverflowOrNot) const
{
// this is called from paint() after the localTransform has already been applied
- rects.append(LayoutRect(paintInvalidationRectInLocalCoordinates()));
+ rects.append(LayoutRect(paintInvalidationRectInLocalSVGCoordinates()));
}
} // namespace blink
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.h
index 4e1fc73..650580b 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGImage.h
@@ -44,7 +44,7 @@ public:
LayoutImageResource* imageResource() { return m_imageResource.get(); }
const LayoutImageResource* imageResource() const { return m_imageResource.get(); }
- const AffineTransform& localToParentTransform() const override { return m_localTransform; }
+ const AffineTransform& localToSVGParentTransform() const override { return m_localTransform; }
RefPtr<const SkPicture>& bufferedForeground() { return m_bufferedForeground; }
FloatRect objectBoundingBox() const override { return m_objectBoundingBox; }
@@ -69,7 +69,7 @@ private:
bool nodeAtFloatPoint(HitTestResult&, const FloatPoint& pointInParent, HitTestAction) override;
- AffineTransform localTransform() const override { return m_localTransform; }
+ AffineTransform localSVGTransform() const override { return m_localTransform; }
bool m_needsBoundariesUpdate : 1;
bool m_needsTransformUpdate : 1;
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.cpp
index a566f87..97ee97d 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.cpp
@@ -75,10 +75,10 @@ FloatRect LayoutSVGInline::strokeBoundingBox() const
return FloatRect();
}
-FloatRect LayoutSVGInline::paintInvalidationRectInLocalCoordinates() const
+FloatRect LayoutSVGInline::paintInvalidationRectInLocalSVGCoordinates() const
{
if (const LayoutSVGText* textRoot = LayoutSVGText::locateLayoutSVGTextAncestor(this))
- return textRoot->paintInvalidationRectInLocalCoordinates();
+ return textRoot->paintInvalidationRectInLocalSVGCoordinates();
return FloatRect();
}
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.h
index 0645208..2d851b1 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGInline.h
@@ -42,7 +42,7 @@ public:
// this element, since we need it for filters.
FloatRect objectBoundingBox() const final;
FloatRect strokeBoundingBox() const final;
- FloatRect paintInvalidationRectInLocalCoordinates() const final;
+ FloatRect paintInvalidationRectInLocalSVGCoordinates() const final;
LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const final;
void mapLocalToAncestor(const LayoutBoxModelObject* ancestor, TransformState&, MapCoordinatesFlags = ApplyContainerFlip, bool* wasFixed = nullptr, const PaintInvalidationState* = nullptr) const final;
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp
index 9e57cfb..76144fa 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.cpp
@@ -127,7 +127,7 @@ bool LayoutSVGModelObject::nodeAtPoint(HitTestResult&, const HitTestLocation&, c
// returns incorrect values for SVG objects. Overriding this method provides access to the absolute bounds.
IntRect LayoutSVGModelObject::absoluteElementBoundingBoxRect() const
{
- return localToAbsoluteQuad(FloatQuad(paintInvalidationRectInLocalCoordinates())).enclosingBoundingBox();
+ return localToAbsoluteQuad(FloatQuad(paintInvalidationRectInLocalSVGCoordinates())).enclosingBoundingBox();
}
void LayoutSVGModelObject::invalidateTreeIfNeeded(const PaintInvalidationState& paintInvalidationState)
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.h
index 7605d9e..a9a29a7 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGModelObject.h
@@ -49,7 +49,7 @@ public:
LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObject* paintInvalidationContainer, const PaintInvalidationState* = nullptr) const override;
- FloatRect paintInvalidationRectInLocalCoordinates() const final { return m_paintInvalidationBoundingBox; }
+ FloatRect paintInvalidationRectInLocalSVGCoordinates() const final { return m_paintInvalidationBoundingBox; }
void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedOffset) const final;
void absoluteQuads(Vector<FloatQuad>&, bool* wasFixed) const override;
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp
index b8c1dca..1e013a5 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceClipper.cpp
@@ -232,7 +232,7 @@ void LayoutSVGResourceClipper::calculateClipContentPaintInvalidationRect()
const ComputedStyle* style = layoutObject->style();
if (!style || style->display() == NONE || style->visibility() != VISIBLE)
continue;
- m_clipBoundaries.unite(layoutObject->localToParentTransform().mapRect(layoutObject->paintInvalidationRectInLocalCoordinates()));
+ m_clipBoundaries.unite(layoutObject->localToSVGParentTransform().mapRect(layoutObject->paintInvalidationRectInLocalSVGCoordinates()));
}
m_clipBoundaries = toSVGClipPathElement(element())->calculateAnimatedLocalTransform().mapRect(m_clipBoundaries);
}
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.cpp
index 7fca73f..5ffed88 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.cpp
@@ -65,15 +65,15 @@ void LayoutSVGResourceMarker::removeClientFromCache(LayoutObject* client, bool m
FloatRect LayoutSVGResourceMarker::markerBoundaries(const AffineTransform& markerTransformation) const
{
- FloatRect coordinates = LayoutSVGContainer::paintInvalidationRectInLocalCoordinates();
+ FloatRect coordinates = LayoutSVGContainer::paintInvalidationRectInLocalSVGCoordinates();
// Map paint invalidation rect into parent coordinate space, in which the marker boundaries have to be evaluated
- coordinates = localToParentTransform().mapRect(coordinates);
+ coordinates = localToSVGParentTransform().mapRect(coordinates);
return markerTransformation.mapRect(coordinates);
}
-const AffineTransform& LayoutSVGResourceMarker::localToParentTransform() const
+const AffineTransform& LayoutSVGResourceMarker::localToSVGParentTransform() const
{
m_localToParentTransform = AffineTransform::translation(m_viewport.x(), m_viewport.y()) * viewportTransform();
return m_localToParentTransform;
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.h
index c48a7e5..a024b5e 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMarker.h
@@ -46,7 +46,7 @@ public:
void layout() override;
void calcViewport() override;
- const AffineTransform& localToParentTransform() const override;
+ const AffineTransform& localToSVGParentTransform() const override;
AffineTransform markerTransformation(const FloatPoint& origin, float angle, float strokeWidth) const;
FloatPoint referencePoint() const;
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMasker.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMasker.cpp
index 803496f..beaa7b7 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMasker.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGResourceMasker.cpp
@@ -100,7 +100,7 @@ void LayoutSVGResourceMasker::calculateMaskContentPaintInvalidationRect()
const ComputedStyle* style = layoutObject->style();
if (!style || style->display() == NONE || style->visibility() != VISIBLE)
continue;
- m_maskContentBoundaries.unite(layoutObject->localToParentTransform().mapRect(layoutObject->paintInvalidationRectInLocalCoordinates()));
+ m_maskContentBoundaries.unite(layoutObject->localToSVGParentTransform().mapRect(layoutObject->paintInvalidationRectInLocalSVGCoordinates()));
}
}
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
index 675c646..3380513 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.cpp
@@ -162,7 +162,7 @@ void LayoutSVGRoot::layout()
addVisualEffectOverflow();
if (!shouldApplyViewportClip()) {
- FloatRect contentPaintInvalidationRect = paintInvalidationRectInLocalCoordinates();
+ FloatRect contentPaintInvalidationRect = paintInvalidationRectInLocalSVGCoordinates();
contentPaintInvalidationRect = m_localToBorderBoxTransform.mapRect(contentPaintInvalidationRect);
addVisualOverflow(enclosingLayoutRect(contentPaintInvalidationRect));
}
@@ -278,13 +278,13 @@ PositionWithAffinity LayoutSVGRoot::positionForPoint(const LayoutPoint& point)
return LayoutReplaced::positionForPoint(point);
LayoutObject* layoutObject = closestDescendant;
- AffineTransform transform = layoutObject->localToParentTransform();
+ AffineTransform transform = layoutObject->localToSVGParentTransform();
transform.translate(toLayoutSVGText(layoutObject)->location().x(), toLayoutSVGText(layoutObject)->location().y());
while (layoutObject) {
layoutObject = layoutObject->parent();
if (layoutObject->isSVGRoot())
break;
- transform = layoutObject->localToParentTransform() * transform;
+ transform = layoutObject->localToSVGParentTransform() * transform;
}
absolutePoint = transform.inverse().mapPoint(absolutePoint);
@@ -307,7 +307,7 @@ void LayoutSVGRoot::buildLocalToBorderBoxTransform()
m_localToBorderBoxTransform.preMultiply(viewToBorderBoxTransform);
}
-const AffineTransform& LayoutSVGRoot::localToParentTransform() const
+const AffineTransform& LayoutSVGRoot::localToSVGParentTransform() const
{
// Slightly optimized version of m_localToParentTransform = AffineTransform::translation(x(), y()) * m_localToBorderBoxTransform;
m_localToParentTransform = m_localToBorderBoxTransform;
@@ -330,7 +330,7 @@ LayoutRect LayoutSVGRoot::clippedOverflowRectForPaintInvalidation(const LayoutBo
return LayoutRect();
// Compute the paint invalidation rect of the content of the SVG in the border-box coordinate space.
- FloatRect contentPaintInvalidationRect = paintInvalidationRectInLocalCoordinates();
+ FloatRect contentPaintInvalidationRect = paintInvalidationRectInLocalSVGCoordinates();
contentPaintInvalidationRect = m_localToBorderBoxTransform.mapRect(contentPaintInvalidationRect);
// Apply initial viewport clip, overflow:visible content is added to visualOverflow
@@ -394,7 +394,7 @@ bool LayoutSVGRoot::nodeAtPoint(HitTestResult& result, const HitTestLocation& lo
// don't clip to the viewport, the visual overflow rect.
// FIXME: This should be an intersection when rect-based hit tests are supported by nodeAtFloatPoint.
if (contentBoxRect().contains(pointInBorderBox) || (!shouldApplyViewportClip() && visualOverflowRect().contains(pointInBorderBox))) {
- const AffineTransform& localToParentTransform = this->localToParentTransform();
+ const AffineTransform& localToParentTransform = this->localToSVGParentTransform();
if (localToParentTransform.isInvertible()) {
FloatPoint localPoint = localToParentTransform.inverse().mapPoint(FloatPoint(pointInParent));
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h
index 42bb69b..f006cb7f 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGRoot.h
@@ -93,11 +93,11 @@ private:
void insertedIntoTree() override;
void willBeRemovedFromTree() override;
- const AffineTransform& localToParentTransform() const override;
+ const AffineTransform& localToSVGParentTransform() const override;
FloatRect objectBoundingBox() const override { return m_objectBoundingBox; }
FloatRect strokeBoundingBox() const override { return m_strokeBoundingBox; }
- FloatRect paintInvalidationRectInLocalCoordinates() const override { return m_paintInvalidationBoundingBox; }
+ FloatRect paintInvalidationRectInLocalSVGCoordinates() const override { return m_paintInvalidationBoundingBox; }
bool nodeAtPoint(HitTestResult&, const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) override;
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp
index 9915ff8..abcd05e 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.cpp
@@ -214,7 +214,7 @@ void LayoutSVGShape::paint(const PaintInfo& paintInfo, const LayoutPoint&) const
// while transformed to our coord system, return local coords
void LayoutSVGShape::addOutlineRects(Vector<LayoutRect>& rects, const LayoutPoint&, IncludeBlockVisualOverflowOrNot) const
{
- rects.append(LayoutRect(paintInvalidationRectInLocalCoordinates()));
+ rects.append(LayoutRect(paintInvalidationRectInLocalSVGCoordinates()));
}
bool LayoutSVGShape::nodeAtFloatPoint(HitTestResult& result, const FloatPoint& pointInParent, HitTestAction hitTestAction)
@@ -224,7 +224,7 @@ bool LayoutSVGShape::nodeAtFloatPoint(HitTestResult& result, const FloatPoint& p
return false;
FloatPoint localPoint;
- if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localToParentTransform(), pointInParent, localPoint))
+ if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localToSVGParentTransform(), pointInParent, localPoint))
return false;
PointerEventsHitRules hitRules(PointerEventsHitRules::SVG_GEOMETRY_HITTESTING, result.hitTestRequest(), style()->pointerEvents());
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h
index 60d1cb4..afe3667 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGShape.h
@@ -78,7 +78,7 @@ public:
bool hasNonScalingStroke() const { return style()->svgStyle().vectorEffect() == VE_NON_SCALING_STROKE; }
Path* nonScalingStrokePath(const Path*, const AffineTransform&) const;
AffineTransform nonScalingStrokeTransform() const;
- AffineTransform localTransform() const final { return m_localTransform; }
+ AffineTransform localSVGTransform() const final { return m_localTransform; }
virtual const Vector<MarkerPosition>* markerPositions() const { return nullptr; }
@@ -112,7 +112,7 @@ private:
bool fillContains(const FloatPoint&, bool requiresFill = true, const WindRule fillRule = RULE_NONZERO);
bool strokeContains(const FloatPoint&, bool requiresStroke = true);
- const AffineTransform& localToParentTransform() const final { return m_localTransform; }
+ const AffineTransform& localToSVGParentTransform() const final { return m_localTransform; }
LayoutRect clippedOverflowRectForPaintInvalidation(const LayoutBoxModelObject*,
const PaintInvalidationState* = nullptr) const override;
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp b/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp
index d11e198..a60f188f 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.cpp
@@ -409,7 +409,7 @@ bool LayoutSVGText::nodeAtFloatPoint(HitTestResult& result, const FloatPoint& po
|| (hitRules.canHitStroke && (style()->svgStyle().hasStroke() || !hitRules.requireStroke))
|| (hitRules.canHitFill && (style()->svgStyle().hasFill() || !hitRules.requireFill))) {
FloatPoint localPoint;
- if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localToParentTransform(), pointInParent, localPoint))
+ if (!SVGLayoutSupport::transformToUserSpaceAndCheckClipping(this, localToSVGParentTransform(), pointInParent, localPoint))
return false;
if (hitRules.canHitBoundingBox && !objectBoundingBox().contains(localPoint))
@@ -466,7 +466,7 @@ FloatRect LayoutSVGText::strokeBoundingBox() const
return strokeBoundaries;
}
-FloatRect LayoutSVGText::paintInvalidationRectInLocalCoordinates() const
+FloatRect LayoutSVGText::paintInvalidationRectInLocalSVGCoordinates() const
{
FloatRect paintInvalidationRect = strokeBoundingBox();
SVGLayoutSupport::intersectPaintInvalidationRectWithResources(this, paintInvalidationRect);
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.h
index e7b8a15..f951132 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGText.h
@@ -41,7 +41,7 @@ public:
void setNeedsPositioningValuesUpdate() { m_needsPositioningValuesUpdate = true; }
void setNeedsTransformUpdate() override { m_needsTransformUpdate = true; }
void setNeedsTextMetricsUpdate() { m_needsTextMetricsUpdate = true; }
- FloatRect paintInvalidationRectInLocalCoordinates() const override;
+ FloatRect paintInvalidationRectInLocalSVGCoordinates() const override;
FloatRect objectBoundingBox() const override { return FloatRect(frameRect()); }
FloatRect strokeBoundingBox() const override;
bool isObjectBoundingBoxValid() const;
@@ -57,7 +57,7 @@ public:
void subtreeChildWasRemoved(const Vector<SVGTextLayoutAttributes*, 2>& affectedAttributes);
void subtreeTextDidChange(LayoutSVGInlineText*);
- const AffineTransform& localToParentTransform() const override { return m_localTransform; }
+ const AffineTransform& localToSVGParentTransform() const override { return m_localTransform; }
const char* name() const override { return "LayoutSVGText"; }
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGTransformableContainer.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGTransformableContainer.h
index 6b3eb4f..dff925d 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGTransformableContainer.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGTransformableContainer.h
@@ -33,7 +33,7 @@ public:
bool isChildAllowed(LayoutObject*, const ComputedStyle&) const override;
bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVGTransformableContainer || LayoutSVGContainer::isOfType(type); }
- const AffineTransform& localToParentTransform() const override { return m_localTransform; }
+ const AffineTransform& localToSVGParentTransform() const override { return m_localTransform; }
const FloatSize& additionalTranslation() const { return m_additionalTranslation; }
void setNeedsTransformUpdate() override { m_needsTransformUpdate = true; }
@@ -41,7 +41,7 @@ public:
private:
bool calculateLocalTransform() override;
- AffineTransform localTransform() const override { return m_localTransform; }
+ AffineTransform localSVGTransform() const override { return m_localTransform; }
bool m_needsTransformUpdate : 1;
bool m_didTransformToRootUpdate : 1;
diff --git a/third_party/WebKit/Source/core/layout/svg/LayoutSVGViewportContainer.h b/third_party/WebKit/Source/core/layout/svg/LayoutSVGViewportContainer.h
index 8f7c28a..62bbb9a9 100644
--- a/third_party/WebKit/Source/core/layout/svg/LayoutSVGViewportContainer.h
+++ b/third_party/WebKit/Source/core/layout/svg/LayoutSVGViewportContainer.h
@@ -48,7 +48,7 @@ private:
bool isOfType(LayoutObjectType type) const override { return type == LayoutObjectSVGViewportContainer || LayoutSVGContainer::isOfType(type); }
AffineTransform viewportTransform() const;
- const AffineTransform& localToParentTransform() const override { return m_localToParentTransform; }
+ const AffineTransform& localToSVGParentTransform() const override { return m_localToParentTransform; }
void calcViewport() override;
bool calculateLocalTransform() override;
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp b/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp
index 6ac7b72..2123c63 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGLayoutSupport.cpp
@@ -91,13 +91,13 @@ LayoutRect SVGLayoutSupport::clippedOverflowRectForPaintInvalidation(const Layou
if (object.styleRef().visibility() != VISIBLE && !object.enclosingLayer()->hasVisibleContent())
return LayoutRect();
- FloatRect paintInvalidationRect = object.paintInvalidationRectInLocalCoordinates();
+ FloatRect paintInvalidationRect = object.paintInvalidationRectInLocalSVGCoordinates();
if (int outlineOutset = object.styleRef().outlineOutsetExtent())
paintInvalidationRect.inflate(outlineOutset);
if (paintInvalidationState && paintInvalidationState->canMapToAncestor(paintInvalidationContainer)) {
// Compute accumulated SVG transform and apply to local paint rect.
- AffineTransform transform = paintInvalidationState->svgTransform() * object.localToParentTransform();
+ AffineTransform transform = paintInvalidationState->svgTransform() * object.localToSVGParentTransform();
// FIXME: These are quirks carried forward from the old paint invalidation infrastructure.
LayoutRect rect = adjustedEnclosingIntRect(transform.mapRect(paintInvalidationRect),
@@ -122,7 +122,7 @@ static const LayoutSVGRoot& computeTransformToSVGRoot(const LayoutObject& object
const LayoutObject* parent;
for (parent = &object; !parent->isSVGRoot(); parent = parent->parent())
- rootBorderBoxTransform.preMultiply(parent->localToParentTransform());
+ rootBorderBoxTransform.preMultiply(parent->localToSVGParentTransform());
const LayoutSVGRoot& svgRoot = toLayoutSVGRoot(*parent);
rootBorderBoxTransform.preMultiply(svgRoot.localToBorderBoxTransform());
@@ -142,7 +142,7 @@ const LayoutSVGRoot& SVGLayoutSupport::mapRectToSVGRootForPaintInvalidation(cons
void SVGLayoutSupport::mapLocalToAncestor(const LayoutObject* object, const LayoutBoxModelObject* ancestor, TransformState& transformState, bool* wasFixed, const PaintInvalidationState* paintInvalidationState)
{
- transformState.applyTransform(object->localToParentTransform());
+ transformState.applyTransform(object->localToSVGParentTransform());
if (paintInvalidationState && paintInvalidationState->canMapToAncestor(ancestor)) {
// |svgTransform| contains localToBorderBoxTransform mentioned below.
@@ -190,11 +190,11 @@ const LayoutObject* SVGLayoutSupport::pushMappingToContainer(const LayoutObject*
// to map an element from SVG viewport coordinates to CSS box coordinates.
// LayoutSVGRoot's mapLocalToAncestor method expects CSS box coordinates.
if (parent->isSVGRoot()) {
- TransformationMatrix matrix(object->localToParentTransform());
+ TransformationMatrix matrix(object->localToSVGParentTransform());
matrix.multiply(toLayoutSVGRoot(parent)->localToBorderBoxTransform());
geometryMap.push(object, matrix);
} else {
- geometryMap.push(object, object->localToParentTransform());
+ geometryMap.push(object, object->localToSVGParentTransform());
}
return parent;
@@ -236,10 +236,10 @@ void SVGLayoutSupport::computeContainerBoundingBoxes(const LayoutObject* contain
if (current->isSVGText() && !toLayoutSVGText(current)->isObjectBoundingBoxValid())
continue;
- const AffineTransform& transform = current->localToParentTransform();
+ const AffineTransform& transform = current->localToSVGParentTransform();
updateObjectBoundingBox(objectBoundingBox, objectBoundingBoxValid, current,
transform.mapRect(current->objectBoundingBox()));
- strokeBoundingBox.unite(transform.mapRect(current->paintInvalidationRectInLocalCoordinates()));
+ strokeBoundingBox.unite(transform.mapRect(current->paintInvalidationRectInLocalSVGCoordinates()));
}
paintInvalidationBoundingBox = strokeBoundingBox;
@@ -493,7 +493,7 @@ AffineTransform SVGLayoutSupport::deprecatedCalculateTransformToLayer(const Layo
{
AffineTransform transform;
while (layoutObject) {
- transform = layoutObject->localToParentTransform() * transform;
+ transform = layoutObject->localToSVGParentTransform() * transform;
if (layoutObject->isSVGRoot())
break;
layoutObject = layoutObject->parent();
@@ -540,7 +540,7 @@ static inline bool compareCandidateDistance(const SearchCandidate& r1, const Sea
static inline float distanceToChildLayoutObject(LayoutObject* child, const FloatPoint& point)
{
- const AffineTransform& localToParentTransform = child->localToParentTransform();
+ const AffineTransform& localToParentTransform = child->localToSVGParentTransform();
if (!localToParentTransform.isInvertible())
return std::numeric_limits<float>::max();
FloatPoint childLocalPoint = localToParentTransform.inverse().mapPoint(point);
@@ -587,7 +587,7 @@ static SearchCandidate searchTreeForFindClosestLayoutSVGText(LayoutObject* layou
if (closestText.candidateDistance < searchCandidate.candidateDistance)
break;
LayoutObject* candidateLayoutObject = searchCandidate.candidateLayoutObject;
- FloatPoint candidateLocalPoint = candidateLayoutObject->localToParentTransform().inverse().mapPoint(point);
+ FloatPoint candidateLocalPoint = candidateLayoutObject->localToSVGParentTransform().inverse().mapPoint(point);
SearchCandidate candidateText = searchTreeForFindClosestLayoutSVGText(candidateLayoutObject, candidateLocalPoint);
diff --git a/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp b/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
index 638ad91..f79de45 100644
--- a/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
+++ b/third_party/WebKit/Source/core/layout/svg/SVGLayoutTreeAsText.cpp
@@ -273,8 +273,8 @@ static void writeStyle(TextStream& ts, const LayoutObject& object)
const ComputedStyle& style = object.styleRef();
const SVGComputedStyle& svgStyle = style.svgStyle();
- if (!object.localTransform().isIdentity())
- writeNameValuePair(ts, "transform", object.localTransform());
+ if (!object.localSVGTransform().isIdentity())
+ writeNameValuePair(ts, "transform", object.localSVGTransform());
writeIfNotDefault(ts, "image rendering", style.imageRendering(), ComputedStyle::initialImageRendering());
writeIfNotDefault(ts, "opacity", style.opacity(), ComputedStyle::initialOpacity());
if (object.isSVGShape()) {
diff --git a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
index e19a8a7..bf1341e 100644
--- a/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
+++ b/third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
@@ -178,7 +178,7 @@ static FloatPoint3D transformOrigin(const LayoutBox& box)
static PassRefPtr<TransformPaintPropertyNode> createTransformIfNeeded(const LayoutObject& object, PaintPropertyTreeBuilderContext& context)
{
if (object.isSVG() && !object.isSVGRoot()) {
- const AffineTransform& transform = object.localToParentTransform();
+ const AffineTransform& transform = object.localToSVGParentTransform();
if (transform.isIdentity())
return nullptr;
diff --git a/third_party/WebKit/Source/core/paint/SVGContainerPainter.cpp b/third_party/WebKit/Source/core/paint/SVGContainerPainter.cpp
index 1eb6070..94e198a 100644
--- a/third_party/WebKit/Source/core/paint/SVGContainerPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGContainerPainter.cpp
@@ -23,8 +23,8 @@ void SVGContainerPainter::paint(const PaintInfo& paintInfo)
if (!m_layoutSVGContainer.firstChild() && !m_layoutSVGContainer.selfWillPaint())
return;
- FloatRect boundingBox = m_layoutSVGContainer.paintInvalidationRectInLocalCoordinates();
- if (!paintInfo.cullRect().intersectsCullRect(m_layoutSVGContainer.localToParentTransform(), boundingBox))
+ FloatRect boundingBox = m_layoutSVGContainer.paintInvalidationRectInLocalSVGCoordinates();
+ if (!paintInfo.cullRect().intersectsCullRect(m_layoutSVGContainer.localToSVGParentTransform(), boundingBox))
return;
// Spec: An empty viewBox on the <svg> element disables rendering.
@@ -33,12 +33,12 @@ void SVGContainerPainter::paint(const PaintInfo& paintInfo)
return;
PaintInfo paintInfoBeforeFiltering(paintInfo);
- paintInfoBeforeFiltering.updateCullRect(m_layoutSVGContainer.localToParentTransform());
- TransformRecorder transformRecorder(paintInfoBeforeFiltering.context, m_layoutSVGContainer, m_layoutSVGContainer.localToParentTransform());
+ paintInfoBeforeFiltering.updateCullRect(m_layoutSVGContainer.localToSVGParentTransform());
+ TransformRecorder transformRecorder(paintInfoBeforeFiltering.context, m_layoutSVGContainer, m_layoutSVGContainer.localToSVGParentTransform());
{
Optional<FloatClipRecorder> clipRecorder;
if (m_layoutSVGContainer.isSVGViewportContainer() && SVGLayoutSupport::isOverflowHidden(&m_layoutSVGContainer)) {
- FloatRect viewport = m_layoutSVGContainer.localToParentTransform().inverse().mapRect(toLayoutSVGViewportContainer(m_layoutSVGContainer).viewport());
+ FloatRect viewport = m_layoutSVGContainer.localToSVGParentTransform().inverse().mapRect(toLayoutSVGViewportContainer(m_layoutSVGContainer).viewport());
clipRecorder.emplace(paintInfoBeforeFiltering.context, m_layoutSVGContainer, paintInfoBeforeFiltering.phase, viewport);
}
diff --git a/third_party/WebKit/Source/core/paint/SVGForeignObjectPainter.cpp b/third_party/WebKit/Source/core/paint/SVGForeignObjectPainter.cpp
index 1b3a28b..a051b19 100644
--- a/third_party/WebKit/Source/core/paint/SVGForeignObjectPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGForeignObjectPainter.cpp
@@ -41,8 +41,8 @@ void SVGForeignObjectPainter::paint(const PaintInfo& paintInfo)
return;
PaintInfo paintInfoBeforeFiltering(paintInfo);
- paintInfoBeforeFiltering.updateCullRect(m_layoutSVGForeignObject.localTransform());
- TransformRecorder transformRecorder(paintInfoBeforeFiltering.context, m_layoutSVGForeignObject, m_layoutSVGForeignObject.localTransform());
+ paintInfoBeforeFiltering.updateCullRect(m_layoutSVGForeignObject.localSVGTransform());
+ TransformRecorder transformRecorder(paintInfoBeforeFiltering.context, m_layoutSVGForeignObject, m_layoutSVGForeignObject.localSVGTransform());
Optional<FloatClipRecorder> clipRecorder;
if (SVGLayoutSupport::isOverflowHidden(&m_layoutSVGForeignObject))
diff --git a/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp b/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp
index 51a5b41..c635143 100644
--- a/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGImagePainter.cpp
@@ -27,13 +27,13 @@ void SVGImagePainter::paint(const PaintInfo& paintInfo)
|| !m_layoutSVGImage.imageResource()->hasImage())
return;
- FloatRect boundingBox = m_layoutSVGImage.paintInvalidationRectInLocalCoordinates();
- if (!paintInfo.cullRect().intersectsCullRect(m_layoutSVGImage.localToParentTransform(), boundingBox))
+ FloatRect boundingBox = m_layoutSVGImage.paintInvalidationRectInLocalSVGCoordinates();
+ if (!paintInfo.cullRect().intersectsCullRect(m_layoutSVGImage.localToSVGParentTransform(), boundingBox))
return;
PaintInfo paintInfoBeforeFiltering(paintInfo);
// Images cannot have children so do not call updateCullRect.
- TransformRecorder transformRecorder(paintInfoBeforeFiltering.context, m_layoutSVGImage, m_layoutSVGImage.localToParentTransform());
+ TransformRecorder transformRecorder(paintInfoBeforeFiltering.context, m_layoutSVGImage, m_layoutSVGImage.localToSVGParentTransform());
{
SVGPaintContext paintContext(m_layoutSVGImage, paintInfoBeforeFiltering);
if (paintContext.applyClipMaskAndFilterIfNecessary() && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintContext.paintInfo().context, m_layoutSVGImage, paintContext.paintInfo().phase)) {
diff --git a/third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp b/third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp
index 4dcb0d2..a6f534e 100644
--- a/third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGMaskPainter.cpp
@@ -22,7 +22,7 @@ bool SVGMaskPainter::prepareEffect(const LayoutObject& object, GraphicsContext&
m_mask.clearInvalidationMask();
- FloatRect paintInvalidationRect = object.paintInvalidationRectInLocalCoordinates();
+ FloatRect paintInvalidationRect = object.paintInvalidationRectInLocalSVGCoordinates();
if (paintInvalidationRect.isEmpty() || !m_mask.element()->hasChildren())
return false;
@@ -35,7 +35,7 @@ void SVGMaskPainter::finishEffect(const LayoutObject& object, GraphicsContext& c
ASSERT(m_mask.style());
ASSERT_WITH_SECURITY_IMPLICATION(!m_mask.needsLayout());
- FloatRect paintInvalidationRect = object.paintInvalidationRectInLocalCoordinates();
+ FloatRect paintInvalidationRect = object.paintInvalidationRectInLocalSVGCoordinates();
{
ColorFilter maskLayerFilter = m_mask.style()->svgStyle().maskType() == MT_LUMINANCE
? ColorFilterLuminanceToAlpha : ColorFilterNone;
diff --git a/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp b/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp
index ad3c5ad..2c66c7f 100644
--- a/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGPaintContext.cpp
@@ -107,7 +107,7 @@ void SVGPaintContext::applyCompositingIfNecessary()
WebBlendMode blendMode = style.hasBlendMode() && m_object.isBlendingAllowed() ?
style.blendMode() : WebBlendModeNormal;
if (opacity < 1 || blendMode != WebBlendModeNormal) {
- const FloatRect compositingBounds = m_object.paintInvalidationRectInLocalCoordinates();
+ const FloatRect compositingBounds = m_object.paintInvalidationRectInLocalSVGCoordinates();
m_compositingRecorder = adoptPtr(new CompositingRecorder(paintInfo().context, m_object,
WebCoreCompositeToSkiaComposite(CompositeSourceOver, blendMode), opacity, &compositingBounds));
}
@@ -119,7 +119,7 @@ bool SVGPaintContext::applyClipIfNecessary(SVGResources* resources)
// m_object.style()->clipPath() corresponds to '-webkit-clip-path'.
// FIXME: We should unify the clip-path and -webkit-clip-path codepaths.
if (LayoutSVGResourceClipper* clipper = resources ? resources->clipper() : nullptr) {
- if (!SVGClipPainter(*clipper).prepareEffect(m_object, m_object.objectBoundingBox(), m_object.paintInvalidationRectInLocalCoordinates(), paintInfo().context, m_clipperState))
+ if (!SVGClipPainter(*clipper).prepareEffect(m_object, m_object.objectBoundingBox(), m_object.paintInvalidationRectInLocalSVGCoordinates(), paintInfo().context, m_clipperState))
return false;
m_clipper = clipper;
} else {
diff --git a/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp b/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp
index 4ef9f4c..164a531 100644
--- a/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGShapePainter.cpp
@@ -47,13 +47,13 @@ void SVGShapePainter::paint(const PaintInfo& paintInfo)
|| m_layoutSVGShape.isShapeEmpty())
return;
- FloatRect boundingBox = m_layoutSVGShape.paintInvalidationRectInLocalCoordinates();
- if (!paintInfo.cullRect().intersectsCullRect(m_layoutSVGShape.localTransform(), boundingBox))
+ FloatRect boundingBox = m_layoutSVGShape.paintInvalidationRectInLocalSVGCoordinates();
+ if (!paintInfo.cullRect().intersectsCullRect(m_layoutSVGShape.localSVGTransform(), boundingBox))
return;
PaintInfo paintInfoBeforeFiltering(paintInfo);
// Shapes cannot have children so do not call updateCullRect.
- TransformRecorder transformRecorder(paintInfoBeforeFiltering.context, m_layoutSVGShape, m_layoutSVGShape.localTransform());
+ TransformRecorder transformRecorder(paintInfoBeforeFiltering.context, m_layoutSVGShape, m_layoutSVGShape.localSVGTransform());
{
SVGPaintContext paintContext(m_layoutSVGShape, paintInfoBeforeFiltering);
if (paintContext.applyClipMaskAndFilterIfNecessary() && !LayoutObjectDrawingRecorder::useCachedDrawingIfPossible(paintContext.paintInfo().context, m_layoutSVGShape, paintContext.paintInfo().phase)) {
diff --git a/third_party/WebKit/Source/core/paint/SVGTextPainter.cpp b/third_party/WebKit/Source/core/paint/SVGTextPainter.cpp
index 561ce21..acbb6b7 100644
--- a/third_party/WebKit/Source/core/paint/SVGTextPainter.cpp
+++ b/third_party/WebKit/Source/core/paint/SVGTextPainter.cpp
@@ -17,8 +17,8 @@ void SVGTextPainter::paint(const PaintInfo& paintInfo)
return;
PaintInfo blockInfo(paintInfo);
- blockInfo.updateCullRect(m_layoutSVGText.localToParentTransform());
- TransformRecorder transformRecorder(blockInfo.context, m_layoutSVGText, m_layoutSVGText.localToParentTransform());
+ blockInfo.updateCullRect(m_layoutSVGText.localToSVGParentTransform());
+ TransformRecorder transformRecorder(blockInfo.context, m_layoutSVGText, m_layoutSVGText.localToSVGParentTransform());
BlockPainter(m_layoutSVGText).paint(blockInfo, LayoutPoint());
diff --git a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
index 6e7ed43..38cccc1 100644
--- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
@@ -340,7 +340,7 @@ bool SVGSVGElement::checkIntersectionOrEnclosure(const SVGElement& element, cons
return false;
AffineTransform ctm = toSVGGraphicsElement(element).computeCTM(AncestorScope, DisallowStyleUpdate, this);
- FloatRect mappedRepaintRect = ctm.mapRect(layoutObject->paintInvalidationRectInLocalCoordinates());
+ FloatRect mappedRepaintRect = ctm.mapRect(layoutObject->paintInvalidationRectInLocalSVGCoordinates());
bool result = false;
switch (mode) {
diff --git a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
index b27fe83..a32427a 100644
--- a/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
+++ b/third_party/WebKit/Source/core/svg/graphics/filters/SVGFEImage.cpp
@@ -78,8 +78,8 @@ PassRefPtrWillBeRawPtr<FEImage> FEImage::createWithIRIReference(Filter* filter,
static FloatRect getLayoutObjectRepaintRect(LayoutObject* layoutObject)
{
- return layoutObject->localToParentTransform().mapRect(
- layoutObject->paintInvalidationRectInLocalCoordinates());
+ return layoutObject->localToSVGParentTransform().mapRect(
+ layoutObject->paintInvalidationRectInLocalSVGCoordinates());
}
AffineTransform makeMapBetweenRects(const FloatRect& source, const FloatRect& dest)