Bug 1241898 - Make SVGUnitTypes [NoInterfaceObject]. r=cam r=peterv
☠☠ backed out by 4616f76f25ec ☠ ☠
authorRobert Longson <longsonr@gmail.com>
Sun, 23 Oct 2016 11:16:41 +0100
changeset 319017 a8cc44c79c30946426314285c6f63c0f4d2b0295
parent 319016 795b9e63823c3750fd9c1a573cdbb0961c994bad
child 319018 4616f76f25ec7196d6eae80049dd79dbfc001ef6
push id83061
push userlongsonr@gmail.com
push dateSun, 23 Oct 2016 10:17:10 +0000
treeherdermozilla-inbound@a8cc44c79c30 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscam, peterv
bugs1241898
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1241898 - Make SVGUnitTypes [NoInterfaceObject]. r=cam r=peterv
dom/svg/test/test_SVGUnitTypes.html
dom/webidl/SVGClipPathElement.webidl
dom/webidl/SVGFilterElement.webidl
dom/webidl/SVGGradientElement.webidl
dom/webidl/SVGMaskElement.webidl
dom/webidl/SVGPatternElement.webidl
dom/webidl/SVGUnitTypeValues.webidl
dom/webidl/SVGUnitTypes.webidl
dom/webidl/moz.build
--- a/dom/svg/test/test_SVGUnitTypes.html
+++ b/dom/svg/test/test_SVGUnitTypes.html
@@ -14,30 +14,28 @@ https://bugzilla.mozilla.org/show_bug.cg
 <div id="content" style="display: none"></div>
 
 <pre id="test">
 <script class="testbody" type="application/javascript">
 SimpleTest.waitForExplicitFinish();
 
 function runTest()
 {
-  ok(document.createElementNS("http://www.w3.org/2000/svg", "pattern")
-       instanceof SVGUnitTypes, "Pattern should implement SVGUnitTypes");
-  ok(document.createElementNS("http://www.w3.org/2000/svg", "filter")
-       instanceof SVGUnitTypes, "Filter should implement SVGUnitTypes");
-  ok(document.createElementNS("http://www.w3.org/2000/svg", "mask")
-       instanceof SVGUnitTypes, "Mask should implement SVGUnitTypes");
-  ok(document.createElementNS("http://www.w3.org/2000/svg", "clipPath")
-       instanceof SVGUnitTypes, "ClipPath should implement SVGUnitTypes");
-  ok(document.createElementNS("http://www.w3.org/2000/svg", "linearGradient")
-       instanceof SVGUnitTypes, "LinearGradient should implement SVGUnitTypes");
-  ok(document.createElementNS("http://www.w3.org/2000/svg", "radialGradient")
-       instanceof SVGUnitTypes, "radialGradient should implement SVGUnitTypes");
-  ok(!(document.createElementNS("http://www.w3.org/2000/svg", "svg")
-       instanceof SVGUnitTypes), "svg should not implement SVGUnitTypes");
+  is(SVGPatternElement.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, 2,
+     "Pattern should implement SVGUnitTypes values");
+  is(SVGFilteElement.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, 2,
+     "Filter should implement SVGUnitTypes values");
+  is(SVGMaskElement.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, 2,
+     "Mask should implement SVGUnitTypes values");
+  is(SVGClipPathElement.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, 2,
+     "ClipPath should implement SVGUnitTypes values");
+  is(SVGLinearGradientElement.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, 2,
+     "LinearGradient should implement SVGUnitTypes values");
+  is(SVGRadialGradientElement.SVG_UNIT_TYPE_OBJECTBOUNDINGBOX, 2,
+     "RadialGradient should implement SVGUnitTypes values");
   SimpleTest.finish();
 }
 
 window.addEventListener("load", runTest, false);
 </script>
 </pre>
 </body>
 </html>
--- a/dom/webidl/SVGClipPathElement.webidl
+++ b/dom/webidl/SVGClipPathElement.webidl
@@ -12,10 +12,10 @@
 
 interface SVGClipPathElement : SVGElement {
   [Constant]
   readonly attribute SVGAnimatedEnumeration clipPathUnits;
   [Constant]
   readonly attribute SVGAnimatedTransformList transform;
 };
 
-SVGClipPathElement implements SVGUnitTypes;
+SVGClipPathElement implements SVGUnitTypeValues;
 
--- a/dom/webidl/SVGFilterElement.webidl
+++ b/dom/webidl/SVGFilterElement.webidl
@@ -23,10 +23,10 @@ interface SVGFilterElement : SVGElement 
   readonly attribute SVGAnimatedLength width;
   [Constant]
   readonly attribute SVGAnimatedLength height;
 
   // ImageData apply(ImageData source);
 };
 
 SVGFilterElement implements SVGURIReference;
-SVGFilterElement implements SVGUnitTypes;
+SVGFilterElement implements SVGUnitTypeValues;
 
--- a/dom/webidl/SVGGradientElement.webidl
+++ b/dom/webidl/SVGGradientElement.webidl
@@ -22,9 +22,9 @@ interface SVGGradientElement : SVGElemen
   readonly attribute SVGAnimatedEnumeration gradientUnits;
   [Constant]
   readonly attribute SVGAnimatedTransformList gradientTransform;
   [Constant]
   readonly attribute SVGAnimatedEnumeration spreadMethod;
 };
 
 SVGGradientElement implements SVGURIReference;
-SVGGradientElement implements SVGUnitTypes;
+SVGGradientElement implements SVGUnitTypeValues;
--- a/dom/webidl/SVGMaskElement.webidl
+++ b/dom/webidl/SVGMaskElement.webidl
@@ -25,10 +25,10 @@ interface SVGMaskElement : SVGElement {
   [Constant]
   readonly attribute SVGAnimatedLength y;
   [Constant]
   readonly attribute SVGAnimatedLength width;
   [Constant]
   readonly attribute SVGAnimatedLength height;
 };
 
-SVGMaskElement implements SVGUnitTypes;
+SVGMaskElement implements SVGUnitTypeValues;
 
--- a/dom/webidl/SVGPatternElement.webidl
+++ b/dom/webidl/SVGPatternElement.webidl
@@ -24,9 +24,9 @@ interface SVGPatternElement : SVGElement
   [Constant]
   readonly attribute SVGAnimatedLength width;
   [Constant]
   readonly attribute SVGAnimatedLength height;
 };
 
 SVGPatternElement implements SVGFitToViewBox;
 SVGPatternElement implements SVGURIReference;
-SVGPatternElement implements SVGUnitTypes;
+SVGPatternElement implements SVGUnitTypeValues;
copy from dom/webidl/SVGUnitTypes.webidl
copy to dom/webidl/SVGUnitTypeValues.webidl
--- a/dom/webidl/SVGUnitTypes.webidl
+++ b/dom/webidl/SVGUnitTypeValues.webidl
@@ -5,14 +5,15 @@
  *
  * The origin of this IDL file is
  * https://svgwg.org/svg2-draft/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-interface SVGUnitTypes {
+[NoInterfaceObject]
+interface SVGUnitTypeValues {
   // Unit Types
   const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0;
   const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1;
   const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
 };
--- a/dom/webidl/SVGUnitTypes.webidl
+++ b/dom/webidl/SVGUnitTypes.webidl
@@ -6,13 +6,11 @@
  * The origin of this IDL file is
  * https://svgwg.org/svg2-draft/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 interface SVGUnitTypes {
-  // Unit Types
-  const unsigned short SVG_UNIT_TYPE_UNKNOWN = 0;
-  const unsigned short SVG_UNIT_TYPE_USERSPACEONUSE = 1;
-  const unsigned short SVG_UNIT_TYPE_OBJECTBOUNDINGBOX = 2;
 };
+
+SVGUnitTypes implements SVGUnitTypesValues;
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -529,16 +529,17 @@ WEBIDL_FILES = [
     'SVGTextElement.webidl',
     'SVGTextPathElement.webidl',
     'SVGTextPositioningElement.webidl',
     'SVGTitleElement.webidl',
     'SVGTransform.webidl',
     'SVGTransformList.webidl',
     'SVGTSpanElement.webidl',
     'SVGUnitTypes.webidl',
+    'SVGUnitTypeValues.webidl',
     'SVGURIReference.webidl',
     'SVGUseElement.webidl',
     'SVGViewElement.webidl',
     'SVGZoomAndPan.webidl',
     'SVGZoomAndPanValues.webidl',
     'SVGZoomEvent.webidl',
     'SystemUpdate.webidl',
     'TCPServerSocket.webidl',