Remove zoom special casing of SVG when computing border-widths

Ever since border-image-width was implemented in

https://bugs.webkit.org/show_bug.cgi?id=67657

border-widths values haven't been scaled with the zoom level for SVG
elements. Remove the special casing since it doesn't seems to be any
good reason for having it. Firefox doesn't do anything of the sort and
there is no specification support for it.

BUG=377447

Review URL: https://codereview.chromium.org/302643002

git-svn-id: svn://svn.chromium.org/blink/trunk@174960 bbb929c8-8fbe-4397-9dbb-9b2b20218538
diff --git a/LayoutTests/fast/css/border-image-widths-on-svg-with-zoom-expected.html b/LayoutTests/fast/css/border-image-widths-on-svg-with-zoom-expected.html
new file mode 100644
index 0000000..b405c71
--- /dev/null
+++ b/LayoutTests/fast/css/border-image-widths-on-svg-with-zoom-expected.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<body style="zoom: 3">
+  <style>
+    span { display: inline-block;
+           width: 100px;
+           height: 100px;
+           border-style: solid;
+           border-image: radial-gradient(yellow, green) 35% / 30px }
+  </style>
+  <span></span>
+  <span></span>
+</body>
diff --git a/LayoutTests/fast/css/border-image-widths-on-svg-with-zoom.html b/LayoutTests/fast/css/border-image-widths-on-svg-with-zoom.html
new file mode 100644
index 0000000..7d87a9f
--- /dev/null
+++ b/LayoutTests/fast/css/border-image-widths-on-svg-with-zoom.html
@@ -0,0 +1,12 @@
+<!doctype html>
+<body style="zoom: 3">
+  <style>
+    span { display: inline-block; }
+    span, svg { width: 100px;
+                height: 100px;
+                border-style: solid;
+                border-image: radial-gradient(yellow, green) 35% / 30px }
+  </style>
+  <svg></svg>
+  <span></span>
+</body>
diff --git a/Source/core/css/resolver/CSSToStyleMap.cpp b/Source/core/css/resolver/CSSToStyleMap.cpp
index 7020392..4f559d1 100644
--- a/Source/core/css/resolver/CSSToStyleMap.cpp
+++ b/Source/core/css/resolver/CSSToStyleMap.cpp
@@ -47,11 +47,6 @@
     return m_state.cssToLengthConversionData();
 }
 
-bool CSSToStyleMap::useSVGZoomRules() const
-{
-    return m_state.useSVGZoomRules();
-}
-
 PassRefPtr<StyleImage> CSSToStyleMap::styleImage(CSSPropertyID propertyId, CSSValue* value)
 {
     return m_elementStyleResources.styleImage(m_state.document(), m_state.document().textLinkColors(), m_state.style()->color(), propertyId, value);
@@ -548,16 +543,14 @@
     if (!value || !value->isPrimitiveValue())
         return BorderImageLengthBox(Length(Auto));
 
-    float zoom = useSVGZoomRules() ? 1.0f : cssToLengthConversionData().zoom();
     Quad* slices = toCSSPrimitiveValue(value)->getQuadValue();
 
     // Set up a border image length box to represent our image slices.
-    const CSSToLengthConversionData& conversionData = cssToLengthConversionData().copyWithAdjustedZoom(zoom);
     return BorderImageLengthBox(
-        toBorderImageLength(*slices->top(), conversionData),
-        toBorderImageLength(*slices->right(), conversionData),
-        toBorderImageLength(*slices->bottom(), conversionData),
-        toBorderImageLength(*slices->left(), conversionData));
+        toBorderImageLength(*slices->top(), cssToLengthConversionData()),
+        toBorderImageLength(*slices->right(), cssToLengthConversionData()),
+        toBorderImageLength(*slices->bottom(), cssToLengthConversionData()),
+        toBorderImageLength(*slices->left(), cssToLengthConversionData()));
 }
 
 void CSSToStyleMap::mapNinePieceImageRepeat(CSSValue* value, NinePieceImage& image) const
diff --git a/Source/core/css/resolver/CSSToStyleMap.h b/Source/core/css/resolver/CSSToStyleMap.h
index 3c38b05..82018a0 100644
--- a/Source/core/css/resolver/CSSToStyleMap.h
+++ b/Source/core/css/resolver/CSSToStyleMap.h
@@ -80,7 +80,6 @@
 
 private:
     const CSSToLengthConversionData& cssToLengthConversionData() const;
-    bool useSVGZoomRules() const;
 
     PassRefPtr<StyleImage> styleImage(CSSPropertyID, CSSValue*);