Bug 1321495 part 2: Add needed "using namespace" declarations to several .cpp files in layout/style, to preemptively fix unified-build bustage. r?TYLin draft
authorDaniel Holbert <dholbert@cs.stanford.edu>
Thu, 01 Dec 2016 10:37:44 -0800
changeset 446655 5ab072ef39796e8b71eacdae14fad522274e1a2f
parent 446654 ab513e5d9c9ace6ddfdb3b43aa9c4d6f47b1ad98
child 446656 f5d6fe42a928c6e7f1539c5c0c2da946c3e09679
child 446657 e66b2e8cb27c449bcc6c55327c567d655f80ae3c
push id37846
push userdholbert@mozilla.com
push dateThu, 01 Dec 2016 18:38:02 +0000
reviewersTYLin
bugs1321495
milestone53.0a1
Bug 1321495 part 2: Add needed "using namespace" declarations to several .cpp files in layout/style, to preemptively fix unified-build bustage. r?TYLin MozReview-Commit-ID: 5p6DhiZ5YFg
layout/style/ServoStyleSheet.cpp
layout/style/nsCSSScanner.cpp
layout/style/nsCSSValue.cpp
layout/style/nsStyleCoord.cpp
layout/style/nsStyleStruct.cpp
--- a/layout/style/ServoStyleSheet.cpp
+++ b/layout/style/ServoStyleSheet.cpp
@@ -7,16 +7,18 @@
 #include "mozilla/ServoStyleSheet.h"
 #include "mozilla/StyleBackendType.h"
 #include "mozilla/ServoBindings.h"
 #include "mozilla/ServoCSSRuleList.h"
 #include "mozilla/dom/CSSRuleList.h"
 
 #include "mozAutoDocUpdate.h"
 
+using namespace mozilla::dom;
+
 namespace mozilla {
 
 ServoStyleSheet::ServoStyleSheet(css::SheetParsingMode aParsingMode,
                                  CORSMode aCORSMode,
                                  net::ReferrerPolicy aReferrerPolicy,
                                  const dom::SRIMetadata& aIntegrity)
   : StyleSheet(StyleBackendType::Servo, aParsingMode)
   , mSheetInfo(aCORSMode, aReferrerPolicy, aIntegrity)
--- a/layout/style/nsCSSScanner.cpp
+++ b/layout/style/nsCSSScanner.cpp
@@ -9,16 +9,18 @@
 #include "nsCSSScanner.h"
 #include "nsStyleUtil.h"
 #include "nsISupportsImpl.h"
 #include "mozilla/ArrayUtils.h"
 #include "mozilla/css/ErrorReporter.h"
 #include "mozilla/Likely.h"
 #include <algorithm>
 
+using namespace mozilla;
+
 /* Character class tables and related helper functions. */
 
 static const uint8_t IS_HEX_DIGIT  = 0x01;
 static const uint8_t IS_IDSTART    = 0x02;
 static const uint8_t IS_IDCHAR     = 0x04;
 static const uint8_t IS_URL_CHAR   = 0x08;
 static const uint8_t IS_HSPACE     = 0x10;
 static const uint8_t IS_VSPACE     = 0x20;
--- a/layout/style/nsCSSValue.cpp
+++ b/layout/style/nsCSSValue.cpp
@@ -23,16 +23,17 @@
 #include "nsNetUtil.h"
 #include "nsPresContext.h"
 #include "nsStyleUtil.h"
 #include "nsDeviceContext.h"
 #include "nsStyleSet.h"
 #include "nsContentUtils.h"
 
 using namespace mozilla;
+using namespace mozilla::css;
 
 static bool
 IsLocalRefURL(nsStringBuffer* aString)
 {
   // Find the first non-"C0 controls + space" character.
   char16_t* current = static_cast<char16_t*>(aString->Data());
   for (; *current != '\0'; current++) {
     if (*current > 0x20) {
--- a/layout/style/nsStyleCoord.cpp
+++ b/layout/style/nsStyleCoord.cpp
@@ -4,16 +4,18 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* representation of length values in computed style data */
 
 #include "nsStyleCoord.h"
 #include "mozilla/HashFunctions.h"
 #include "mozilla/PodOperations.h"
 
+using namespace mozilla;
+
 nsStyleCoord::nsStyleCoord(nsStyleUnit aUnit)
   : mUnit(aUnit)
 {
   NS_ASSERTION(aUnit < eStyleUnit_Percent, "not a valueless unit");
   if (aUnit >= eStyleUnit_Percent) {
     mUnit = eStyleUnit_Null;
   }
   mValue.mInt = 0;
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -35,16 +35,17 @@
 #include "mozilla/dom/AnimationEffectReadOnlyBinding.h" // for PlaybackDirection
 #include "mozilla/dom/ImageTracker.h"
 #include "mozilla/Likely.h"
 #include "nsIURI.h"
 #include "nsIDocument.h"
 #include <algorithm>
 
 using namespace mozilla;
+using namespace mozilla::dom;
 
 static_assert((((1 << nsStyleStructID_Length) - 1) &
                ~(NS_STYLE_INHERIT_MASK)) == 0,
               "Not enough bits in NS_STYLE_INHERIT_MASK");
 
 /* static */ const int32_t nsStyleGridLine::kMinLine;
 /* static */ const int32_t nsStyleGridLine::kMaxLine;