| Index: third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
|
| diff --git a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
|
| index 79dcc61cc0e289a71c46106bd7cefbed214a7be9..5cdb55aa470102e089166c9dd519594f4026d229 100644
|
| --- a/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
|
| +++ b/third_party/WebKit/Source/core/svg/SVGSVGElement.cpp
|
| @@ -450,57 +450,18 @@ SVGTransformTearOff* SVGSVGElement::createSVGTransformFromMatrix(
|
| return SVGTransformTearOff::create(matrix);
|
| }
|
|
|
| -AffineTransform SVGSVGElement::localCoordinateSpaceTransform(
|
| - SVGElement::CTMScope mode) const {
|
| - AffineTransform viewBoxTransform;
|
| - if (!hasEmptyViewBox()) {
|
| - FloatSize size = currentViewportSize();
|
| - viewBoxTransform = viewBoxToViewTransform(size.width(), size.height());
|
| - }
|
| -
|
| +AffineTransform SVGSVGElement::localCoordinateSpaceTransform() const {
|
| AffineTransform transform;
|
| if (!isOutermostSVGSVGElement()) {
|
| SVGLengthContext lengthContext(this);
|
| transform.translate(m_x->currentValue()->value(lengthContext),
|
| m_y->currentValue()->value(lengthContext));
|
| - } else if (mode == SVGElement::ScreenScope) {
|
| - if (LayoutObject* layoutObject = this->layoutObject()) {
|
| - FloatPoint location;
|
| - float zoomFactor = 1;
|
| -
|
| - // At the SVG/HTML boundary (aka LayoutSVGRoot), we apply the
|
| - // localToBorderBoxTransform to map an element from SVG viewport
|
| - // coordinates to CSS box coordinates. LayoutSVGRoot's localToAbsolute
|
| - // method expects CSS box coordinates. We also need to adjust for the
|
| - // zoom level factored into CSS coordinates (bug #96361).
|
| - if (layoutObject->isSVGRoot()) {
|
| - location = toLayoutSVGRoot(layoutObject)
|
| - ->localToBorderBoxTransform()
|
| - .mapPoint(location);
|
| - zoomFactor = 1 / layoutObject->style()->effectiveZoom();
|
| - }
|
| -
|
| - // Translate in our CSS parent coordinate space
|
| - // FIXME: This doesn't work correctly with CSS transforms.
|
| - location = layoutObject->localToAbsolute(location, UseTransforms);
|
| - location.scale(zoomFactor, zoomFactor);
|
| -
|
| - // Be careful here! localToBorderBoxTransform() included the x/y offset
|
| - // coming from the viewBoxToViewTransform(), so we have to subtract it
|
| - // here (original cause of bug #27183)
|
| - transform.translate(location.x() - viewBoxTransform.e(),
|
| - location.y() - viewBoxTransform.f());
|
| -
|
| - // Respect scroll offset.
|
| - if (FrameView* view = document().view()) {
|
| - LayoutSize scrollOffset(view->getScrollOffset());
|
| - scrollOffset.scale(zoomFactor);
|
| - transform.translate(-scrollOffset.width(), -scrollOffset.height());
|
| - }
|
| - }
|
| }
|
| -
|
| - return transform.multiply(viewBoxTransform);
|
| + if (!hasEmptyViewBox()) {
|
| + FloatSize size = currentViewportSize();
|
| + transform.multiply(viewBoxToViewTransform(size.width(), size.height()));
|
| + }
|
| + return transform;
|
| }
|
|
|
| bool SVGSVGElement::layoutObjectIsNeeded(const ComputedStyle& style) {
|
|
|