Bug 1516025 part 1: Add "using namespace mozilla::dom" to some SVG C++ files that currently depend on unification to provide that using statement. r=longsonr
authorDaniel Holbert <dholbert@cs.stanford.edu>
Sat, 22 Dec 2018 17:04:05 +0000
changeset 508929 780ab4fd468b92f567c7198f6ba91e83a60388de
parent 508928 d5966d00f8363b3d4aa264d9600ab64bb6d4bd0e
child 508930 eab4ecad469f58b7b57ff696155ef4320c668eb9
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslongsonr
bugs1516025, 1515187
milestone66.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 1516025 part 1: Add "using namespace mozilla::dom" to some SVG C++ files that currently depend on unification to provide that using statement. r=longsonr These are to support of usages of "SVGElement" in these files, so they problably only started needing this namespace as of bug 1515187. In any case, they're currently relying on picking up this "using" statement from other files in unified builds, so let's just make the usage explicit by giving them their own "using" statement. Also, I'm fixing up the #include for SVGElement.h in these files to use the full mozilla/dom include path (and to make these files include their own .h file first). Differential Revision: https://phabricator.services.mozilla.com/D15231
dom/svg/DOMSVGPathSegList.cpp
dom/svg/DOMSVGPointList.cpp
dom/svg/SVGAnimatedNumberList.cpp
dom/svg/SVGAnimatedPathSegList.cpp
dom/svg/SVGAnimatedPointList.cpp
dom/svg/SVGLength.cpp
--- a/dom/svg/DOMSVGPathSegList.cpp
+++ b/dom/svg/DOMSVGPathSegList.cpp
@@ -1,24 +1,26 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "SVGElement.h"
 #include "DOMSVGPathSegList.h"
 #include "DOMSVGPathSeg.h"
 #include "nsError.h"
 #include "SVGAnimatedPathSegList.h"
 #include "nsCOMPtr.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "SVGPathSegUtils.h"
+#include "mozilla/dom/SVGElement.h"
 #include "mozilla/dom/SVGPathSegListBinding.h"
 
+using namespace mozilla::dom;
+
 // See the comment in this file's header.
 
 namespace mozilla {
 
 static inline nsSVGAttrTearoffTable<void, DOMSVGPathSegList>&
 SVGPathSegListTearoffTable() {
   static nsSVGAttrTearoffTable<void, DOMSVGPathSegList>
       sSVGPathSegListTearoffTable;
--- a/dom/svg/DOMSVGPointList.cpp
+++ b/dom/svg/DOMSVGPointList.cpp
@@ -1,25 +1,27 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "SVGElement.h"
 #include "DOMSVGPointList.h"
 #include "DOMSVGPoint.h"
 #include "nsError.h"
 #include "SVGAnimatedPointList.h"
 #include "nsCOMPtr.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsContentUtils.h"
+#include "mozilla/dom/SVGElement.h"
 #include "mozilla/dom/SVGPointListBinding.h"
 #include <algorithm>
 
+using namespace mozilla::dom;
+
 // See the comment in this file's header.
 
 // local helper functions
 namespace {
 
 void UpdateListIndicesFromIndex(
     FallibleTArray<mozilla::nsISVGPoint*>& aItemsArray,
     uint32_t aStartingIndex) {
--- a/dom/svg/SVGAnimatedNumberList.cpp
+++ b/dom/svg/SVGAnimatedNumberList.cpp
@@ -2,22 +2,24 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "SVGAnimatedNumberList.h"
 
 #include "DOMSVGAnimatedNumberList.h"
+#include "mozilla/dom/SVGElement.h"
 #include "mozilla/Move.h"
-#include "SVGElement.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsSMILValue.h"
 #include "SVGNumberListSMILType.h"
 
+using namespace mozilla::dom;
+
 namespace mozilla {
 
 nsresult SVGAnimatedNumberList::SetBaseValueString(const nsAString &aValue) {
   SVGNumberList newBaseValue;
   nsresult rv = newBaseValue.SetValueFromString(aValue);
   if (NS_FAILED(rv)) {
     return rv;
   }
--- a/dom/svg/SVGAnimatedPathSegList.cpp
+++ b/dom/svg/SVGAnimatedPathSegList.cpp
@@ -8,16 +8,18 @@
 
 #include "DOMSVGPathSegList.h"
 #include "mozilla/Move.h"
 #include "SVGElement.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsSMILValue.h"
 #include "SVGPathSegListSMILType.h"
 
+using namespace mozilla::dom;
+
 // See the comments in this file's header!
 
 namespace mozilla {
 
 nsresult SVGAnimatedPathSegList::SetBaseValueString(const nsAString &aValue) {
   SVGPathData newBaseValue;
 
   // The spec says that the path data is parsed and accepted up to the first
--- a/dom/svg/SVGAnimatedPointList.cpp
+++ b/dom/svg/SVGAnimatedPointList.cpp
@@ -2,22 +2,24 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "SVGAnimatedPointList.h"
 
 #include "DOMSVGPointList.h"
+#include "mozilla/dom/SVGElement.h"
 #include "mozilla/Move.h"
-#include "SVGElement.h"
 #include "nsSVGAttrTearoffTable.h"
 #include "nsSMILValue.h"
 #include "SVGPointListSMILType.h"
 
+using namespace mozilla::dom;
+
 // See the comments in this file's header!
 
 namespace mozilla {
 
 nsresult SVGAnimatedPointList::SetBaseValueString(const nsAString &aValue) {
   SVGPointList newBaseValue;
 
   // The spec says that the point data is parsed and accepted up to the first
--- a/dom/svg/SVGLength.cpp
+++ b/dom/svg/SVGLength.cpp
@@ -1,27 +1,27 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "mozilla/ArrayUtils.h"
+#include "SVGLength.h"
 
-#include "SVGLength.h"
-#include "SVGElement.h"
+#include "mozilla/ArrayUtils.h"
+#include "mozilla/dom/SVGElement.h"
 #include "mozilla/dom/SVGSVGElement.h"
 #include "nsTextFormatter.h"
 #include "SVGContentUtils.h"
 #include <limits>
 #include <algorithm>
 
-namespace mozilla {
+using namespace mozilla::dom;
 
-using namespace mozilla;
+namespace mozilla {
 
 // Declare some helpers defined below:
 static void GetUnitString(nsAString& unit, uint16_t unitType);
 static uint16_t GetUnitTypeForString(const nsAString& unitStr);
 
 void SVGLength::GetValueAsString(nsAString& aValue) const {
   nsTextFormatter::ssprintf(aValue, u"%g", (double)mValue);