Bug 1524314 Part 1 - use using mozilla:dom to reduce typing r=dholbert
☠☠ backed out by d08b9d599f25 ☠ ☠
authorlongsonr <longsonr@gmail.com>
Sat, 09 Mar 2019 16:01:33 +0000
changeset 524256 6838e7d3960f9888ecdfcd6eda67fa1afae76190
parent 524255 e9672ac059b453a1b6e9f5a177b2a10a9eed113f
child 524257 2d1f2814e41d53c985643fbb9c73f4af2caaa3ec
push id2032
push userffxbld-merge
push dateMon, 13 May 2019 09:36:57 +0000
treeherdermozilla-release@455c1065dcbe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs1524314
milestone67.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 1524314 Part 1 - use using mozilla:dom to reduce typing r=dholbert
dom/svg/SVGViewBox.cpp
--- a/dom/svg/SVGViewBox.cpp
+++ b/dom/svg/SVGViewBox.cpp
@@ -8,16 +8,18 @@
 
 #include "mozilla/Move.h"
 #include "mozilla/SMILValue.h"
 #include "mozilla/SVGContentUtils.h"
 #include "nsCharSeparatedTokenizer.h"
 #include "SVGViewBoxSMILType.h"
 #include "nsTextFormatter.h"
 
+using namespace mozilla::dom;
+
 namespace mozilla {
 
 #define NUM_VIEWBOX_COMPONENTS 4
 
 /* Implementation of SVGViewBoxRect methods */
 
 bool SVGViewBoxRect::operator==(const SVGViewBoxRect& aOther) const {
   if (&aOther == this) return true;
@@ -82,17 +84,17 @@ NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 static SVGAttrTearoffTable<SVGViewBox, SVGViewBox::DOMBaseVal>
     sBaseSVGViewBoxTearoffTable;
 static SVGAttrTearoffTable<SVGViewBox, SVGViewBox::DOMAnimVal>
     sAnimSVGViewBoxTearoffTable;
-SVGAttrTearoffTable<SVGViewBox, dom::SVGAnimatedRect>
+SVGAttrTearoffTable<SVGViewBox, SVGAnimatedRect>
     SVGViewBox::sSVGAnimatedRectTearoffTable;
 
 /* Implementation of SVGViewBox methods */
 
 void SVGViewBox::Init() {
   mHasBaseVal = false;
   // We shouldn't use mBaseVal for rendering (its usages should be guarded with
   // "mHasBaseVal" checks), but just in case we do by accident, this will
@@ -188,29 +190,29 @@ void SVGViewBox::GetBaseValueString(nsAS
     aValue.AssignLiteral("none");
     return;
   }
   nsTextFormatter::ssprintf(aValue, u"%g %g %g %g", (double)mBaseVal.x,
                             (double)mBaseVal.y, (double)mBaseVal.width,
                             (double)mBaseVal.height);
 }
 
-already_AddRefed<dom::SVGAnimatedRect> SVGViewBox::ToSVGAnimatedRect(
+already_AddRefed<SVGAnimatedRect> SVGViewBox::ToSVGAnimatedRect(
     SVGElement* aSVGElement) {
-  RefPtr<dom::SVGAnimatedRect> domAnimatedRect =
+  RefPtr<SVGAnimatedRect> domAnimatedRect =
       sSVGAnimatedRectTearoffTable.GetTearoff(this);
   if (!domAnimatedRect) {
-    domAnimatedRect = new dom::SVGAnimatedRect(this, aSVGElement);
+    domAnimatedRect = new SVGAnimatedRect(this, aSVGElement);
     sSVGAnimatedRectTearoffTable.AddTearoff(this, domAnimatedRect);
   }
 
   return domAnimatedRect.forget();
 }
 
-already_AddRefed<dom::SVGIRect> SVGViewBox::ToDOMBaseVal(
+already_AddRefed<SVGIRect> SVGViewBox::ToDOMBaseVal(
     SVGElement* aSVGElement) {
   if (!mHasBaseVal || mBaseVal.none) {
     return nullptr;
   }
 
   RefPtr<DOMBaseVal> domBaseVal = sBaseSVGViewBoxTearoffTable.GetTearoff(this);
   if (!domBaseVal) {
     domBaseVal = new DOMBaseVal(this, aSVGElement);
@@ -219,17 +221,17 @@ already_AddRefed<dom::SVGIRect> SVGViewB
 
   return domBaseVal.forget();
 }
 
 SVGViewBox::DOMBaseVal::~DOMBaseVal() {
   sBaseSVGViewBoxTearoffTable.RemoveTearoff(mVal);
 }
 
-already_AddRefed<dom::SVGIRect> SVGViewBox::ToDOMAnimVal(
+already_AddRefed<SVGIRect> SVGViewBox::ToDOMAnimVal(
     SVGElement* aSVGElement) {
   if ((mAnimVal && mAnimVal->none) ||
       (!mAnimVal && (!mHasBaseVal || mBaseVal.none))) {
     return nullptr;
   }
 
   RefPtr<DOMAnimVal> domAnimVal = sAnimSVGViewBoxTearoffTable.GetTearoff(this);
   if (!domAnimVal) {
@@ -268,17 +270,17 @@ void SVGViewBox::DOMBaseVal::SetHeight(f
   mVal->SetBaseValue(rect, mSVGElement);
 }
 
 UniquePtr<SMILAttr> SVGViewBox::ToSMILAttr(SVGElement* aSVGElement) {
   return MakeUnique<SMILViewBox>(this, aSVGElement);
 }
 
 nsresult SVGViewBox::SMILViewBox ::ValueFromString(
-    const nsAString& aStr, const dom::SVGAnimationElement* /*aSrcElement*/,
+    const nsAString& aStr, const SVGAnimationElement* /*aSrcElement*/,
     SMILValue& aValue, bool& aPreventCachingOfSandwich) const {
   SVGViewBoxRect viewBox;
   nsresult res = SVGViewBoxRect::FromString(aStr, &viewBox);
   if (NS_FAILED(res)) {
     return res;
   }
   SMILValue val(&SVGViewBoxSMILType::sSingleton);
   *static_cast<SVGViewBoxRect*>(val.mU.mPtr) = viewBox;