Bug 1455940 - Remove constructors from SVGNumber r=mystor
authorRobert Longson <longsonr@gmail.com>
Wed, 25 Apr 2018 07:00:36 +0100
changeset 469044 f9b99c0aa7fc4f061fe52332bb9bbcbb769ad2d9
parent 469043 be541e099174094c130b196a3a1510c121730f4e
child 469045 a83a4ef50f6ca754ec451320dfefbffa707bad1a
child 469146 5af215d265b649a69975cc94886dd281c91f5908
push id9165
push userasasaki@mozilla.com
push dateThu, 26 Apr 2018 21:04:54 +0000
treeherdermozilla-beta@064c3804de2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmystor
bugs1455940
milestone61.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 1455940 - Remove constructors from SVGNumber r=mystor
dom/svg/DOMSVGNumber.cpp
dom/svg/DOMSVGNumber.h
dom/webidl/SVGNumber.webidl
testing/web-platform/meta/svg/interfaces.html.ini
--- a/dom/svg/DOMSVGNumber.cpp
+++ b/dom/svg/DOMSVGNumber.cpp
@@ -106,46 +106,16 @@ DOMSVGNumber::DOMSVGNumber(nsISupports* 
   , mParent(aParent)
   , mListIndex(0)
   , mAttrEnum(0)
   , mIsAnimValItem(false)
   , mValue(0.0f)
 {
 }
 
-/* static */ already_AddRefed<DOMSVGNumber>
-DOMSVGNumber::Constructor(const dom::GlobalObject& aGlobal, ErrorResult& aRv)
-{
-  nsCOMPtr<nsPIDOMWindowInner> window =
-    do_QueryInterface(aGlobal.GetAsSupports());
-  if (!window) {
-    aRv.Throw(NS_ERROR_UNEXPECTED);
-    return nullptr;
-  }
-
-  RefPtr<DOMSVGNumber> number = new DOMSVGNumber(window);
-  return number.forget();
-}
-
-/* static */ already_AddRefed<DOMSVGNumber>
-DOMSVGNumber::Constructor(const dom::GlobalObject& aGlobal, float aValue,
-                          ErrorResult& aRv)
-{
-  nsCOMPtr<nsPIDOMWindowInner> window =
-    do_QueryInterface(aGlobal.GetAsSupports());
-  if (!window) {
-    aRv.Throw(NS_ERROR_UNEXPECTED);
-    return nullptr;
-  }
-
-  RefPtr<DOMSVGNumber> number = new DOMSVGNumber(window);
-  number->SetValue(aValue, aRv);
-  return number.forget();
-}
-
 float
 DOMSVGNumber::Value()
 {
   if (mIsAnimValItem && HasOwner()) {
     Element()->FlushAnimations(); // May make HasOwner() == false
   }
   return HasOwner() ? InternalItem() : mValue;
 }
--- a/dom/svg/DOMSVGNumber.h
+++ b/dom/svg/DOMSVGNumber.h
@@ -121,22 +121,16 @@ public:
 
   nsISupports* GetParentObject()
   {
     return mParent;
   }
 
   virtual JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
 
-  static already_AddRefed<DOMSVGNumber>
-  Constructor(const dom::GlobalObject& aGlobal, ErrorResult& aRv);
-
-  static already_AddRefed<DOMSVGNumber>
-  Constructor(const dom::GlobalObject& aGlobal, float aValue, ErrorResult& aRv);
-
   float Value();
 
   void SetValue(float aValue, ErrorResult& aRv);
 
 private:
 
   nsSVGElement* Element() {
     return mList->Element();
--- a/dom/webidl/SVGNumber.webidl
+++ b/dom/webidl/SVGNumber.webidl
@@ -5,14 +5,12 @@
  *
  * The origin of this IDL file is
  * http://www.w3.org/TR/SVG2/
  *
  * Copyright © 2012 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
-[Constructor,
- Constructor(float value)]
 interface SVGNumber {
   [SetterThrows]
   attribute float value;
 };
--- a/testing/web-platform/meta/svg/interfaces.html.ini
+++ b/testing/web-platform/meta/svg/interfaces.html.ini
@@ -1,18 +1,15 @@
 [interfaces.html]
   [SVGGeometryElement interface: operation isPointInFill(DOMPoint)]
     expected: FAIL
 
   [SVGGeometryElement interface: operation isPointInStroke(DOMPoint)]
     expected: FAIL
 
-  [SVGNumber interface: existence and properties of interface object]
-    expected: FAIL
-
   [SVGSVGElement interface: operation getIntersectionList(DOMRectReadOnly,SVGElement)]
     expected: FAIL
 
   [SVGSVGElement interface: operation getEnclosureList(DOMRectReadOnly,SVGElement)]
     expected: FAIL
 
   [SVGSVGElement interface: operation checkIntersection(SVGElement,DOMRectReadOnly)]
     expected: FAIL