Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(830)

Unified Diff: Source/core/svg/SVGSVGElement.cpp

Issue 61753005: Remove SVGLocatable and SVGTransformable (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix farthestVieportElement Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/svg/SVGSVGElement.h ('k') | Source/core/svg/SVGTransformList.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGSVGElement.cpp
diff --git a/Source/core/svg/SVGSVGElement.cpp b/Source/core/svg/SVGSVGElement.cpp
index 0d4005572d50d263725c27aa3227d3e2d4510f44..96caed5087022f944e771828d9e64aa63d30c804 100644
--- a/Source/core/svg/SVGSVGElement.cpp
+++ b/Source/core/svg/SVGSVGElement.cpp
@@ -424,7 +424,7 @@ SVGTransform SVGSVGElement::createSVGTransformFromMatrix(const SVGMatrix& matrix
return SVGTransform(static_cast<const AffineTransform&>(matrix));
}
-AffineTransform SVGSVGElement::localCoordinateSpaceTransform(SVGLocatable::CTMScope mode) const
+AffineTransform SVGSVGElement::localCoordinateSpaceTransform(SVGElement::CTMScope mode) const
{
AffineTransform viewBoxTransform;
if (!hasEmptyViewBox()) {
@@ -436,7 +436,7 @@ AffineTransform SVGSVGElement::localCoordinateSpaceTransform(SVGLocatable::CTMSc
if (!isOutermostSVGSVGElement()) {
SVGLengthContext lengthContext(this);
transform.translate(xCurrentValue().value(lengthContext), yCurrentValue().value(lengthContext));
- } else if (mode == SVGLocatable::ScreenScope) {
+ } else if (mode == SVGElement::ScreenScope) {
if (RenderObject* renderer = this->renderer()) {
FloatPoint location;
float zoomFactor = 1;
@@ -729,9 +729,7 @@ void SVGSVGElement::setupInitialView(const String& fragmentIdentifier, Element*
if (!viewElement)
return;
- SVGElement* element = SVGLocatable::nearestViewportElement(viewElement);
- if (element->hasTagName(SVGNames::svgTag)) {
- SVGSVGElement* svg = toSVGSVGElement(element);
+ if (SVGSVGElement* svg = viewElement->ownerSVGElement()) {
svg->inheritViewAttributes(viewElement);
if (RenderObject* renderer = svg->renderer())
« no previous file with comments | « Source/core/svg/SVGSVGElement.h ('k') | Source/core/svg/SVGTransformList.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698