Bug 1345697 part 1 - Various fix for adding new files. r=heycam draft
authorXidorn Quan <me@upsuper.org>
Wed, 17 May 2017 16:56:59 +1000
changeset 580915 407e3aa3f1b84931b5808861aa9160ce9a733ab9
parent 580779 bce8ab2e356a113bbd3a100e1661635c14a94ff2
child 580916 a97464201a12620b28bea580ad7e911fd64f8599
push id59714
push userxquan@mozilla.com
push dateFri, 19 May 2017 05:01:48 +0000
reviewersheycam
bugs1345697
milestone55.0a1
Bug 1345697 part 1 - Various fix for adding new files. r=heycam MozReview-Commit-ID: 33Ssd7tNZ2K
layout/style/ServoBindings.cpp
layout/style/nsCSSParser.cpp
layout/style/nsDOMCSSDeclaration.cpp
layout/style/nsDOMCSSDeclaration.h
--- a/layout/style/ServoBindings.cpp
+++ b/layout/style/ServoBindings.cpp
@@ -7,23 +7,26 @@
 #include "mozilla/ServoBindings.h"
 
 #include "ChildIterator.h"
 #include "GeckoProfiler.h"
 #include "gfxFontFamilyList.h"
 #include "nsAnimationManager.h"
 #include "nsAttrValueInlines.h"
 #include "nsCSSCounterStyleRule.h"
+#include "nsCSSFontFaceRule.h"
 #include "nsCSSFrameConstructor.h"
 #include "nsCSSProps.h"
 #include "nsCSSParser.h"
 #include "nsCSSPseudoElements.h"
 #include "nsCSSRuleProcessor.h"
+#include "nsCSSRules.h"
 #include "nsContentUtils.h"
 #include "nsDOMTokenList.h"
+#include "nsDeviceContext.h"
 #include "nsIContentInlines.h"
 #include "nsIDOMNode.h"
 #include "nsIDocument.h"
 #include "nsIDocumentInlines.h"
 #include "nsIFrame.h"
 #include "nsINode.h"
 #include "nsIPresShell.h"
 #include "nsIPresShellInlines.h"
@@ -1171,17 +1174,18 @@ CreateStyleImageRequest(nsStyleImageRequ
 }
 
 mozilla::css::ImageValue*
 Gecko_ImageValue_Create(ServoBundledURI aURI)
 {
   NS_ConvertUTF8toUTF16 url(reinterpret_cast<const char*>(aURI.mURLString),
                             aURI.mURLStringLength);
 
-  RefPtr<ImageValue> value(new ImageValue(url, do_AddRef(aURI.mExtraData)));
+  RefPtr<css::ImageValue> value(
+    new css::ImageValue(url, do_AddRef(aURI.mExtraData)));
   return value.forget().take();
 }
 
 void
 Gecko_SetLayerImageImageValue(nsStyleImage* aImage,
                               mozilla::css::ImageValue* aImageValue)
 {
   MOZ_ASSERT(aImage && aImageValue);
--- a/layout/style/nsCSSParser.cpp
+++ b/layout/style/nsCSSParser.cpp
@@ -4532,18 +4532,18 @@ CSSParserImpl::ParseSupportsRule(RuleApp
 
   // Remove spaces from the start and end of the recorded supports condition.
   condition.Trim(" ", true, true, false);
 
   // Record whether we are in a failing @supports, so that property parse
   // errors don't get reported.
   nsAutoFailingSupportsRule failing(this, conditionMet);
 
-  RefPtr<css::GroupRule> rule = new CSSSupportsRule(conditionMet, condition,
-                                                      linenum, colnum);
+  RefPtr<css::GroupRule> rule =
+    new mozilla::CSSSupportsRule(conditionMet, condition, linenum, colnum);
   return ParseGroupRule(rule, aAppendFunc, aProcessData);
 }
 
 // supports_condition
 //   : supports_condition_in_parens supports_condition_terms
 //   | supports_condition_negation
 //   ;
 bool
--- a/layout/style/nsDOMCSSDeclaration.cpp
+++ b/layout/style/nsDOMCSSDeclaration.cpp
@@ -341,17 +341,17 @@ nsDOMCSSDeclaration::ModifyDeclaration(G
 }
 
 nsresult
 nsDOMCSSDeclaration::ParsePropertyValue(const nsCSSPropertyID aPropID,
                                         const nsAString& aPropValue,
                                         bool aIsImportant)
 {
   return ModifyDeclaration(
-    [&](Declaration* decl, CSSParsingEnvironment& env, bool* changed) {
+    [&](css::Declaration* decl, CSSParsingEnvironment& env, bool* changed) {
       nsCSSParser cssParser(env.mCSSLoader);
       cssParser.ParseProperty(aPropID, aPropValue,
                               env.mSheetURI, env.mBaseURI, env.mPrincipal,
                               decl, changed, aIsImportant);
     },
     [&](ServoDeclarationBlock* decl, ServoCSSParsingEnvironment& env) {
       NS_ConvertUTF16toUTF8 value(aPropValue);
       return Servo_DeclarationBlock_SetPropertyById(
@@ -362,17 +362,17 @@ nsDOMCSSDeclaration::ParsePropertyValue(
 
 nsresult
 nsDOMCSSDeclaration::ParseCustomPropertyValue(const nsAString& aPropertyName,
                                               const nsAString& aPropValue,
                                               bool aIsImportant)
 {
   MOZ_ASSERT(nsCSSProps::IsCustomPropertyName(aPropertyName));
   return ModifyDeclaration(
-    [&](Declaration* decl, CSSParsingEnvironment& env, bool* changed) {
+    [&](css::Declaration* decl, CSSParsingEnvironment& env, bool* changed) {
       nsCSSParser cssParser(env.mCSSLoader);
       auto propName = Substring(aPropertyName, CSS_CUSTOM_NAME_PREFIX_LENGTH);
       cssParser.ParseVariable(propName, aPropValue, env.mSheetURI,
                               env.mBaseURI, env.mPrincipal, decl,
                               changed, aIsImportant);
     },
     [&](ServoDeclarationBlock* decl, ServoCSSParsingEnvironment& env) {
       NS_ConvertUTF16toUTF8 property(aPropertyName);
--- a/layout/style/nsDOMCSSDeclaration.h
+++ b/layout/style/nsDOMCSSDeclaration.h
@@ -6,18 +6,20 @@
 /* base class for DOM objects for element.style and cssStyleRule.style */
 
 #ifndef nsDOMCSSDeclaration_h___
 #define nsDOMCSSDeclaration_h___
 
 #include "nsICSSDeclaration.h"
 
 #include "mozilla/Attributes.h"
+#include "mozilla/URLExtraData.h"
 #include "nsIURI.h"
 #include "nsCOMPtr.h"
+#include "nsCompatibility.h"
 
 class nsIPrincipal;
 class nsIDocument;
 struct JSContext;
 class JSObject;
 
 namespace mozilla {
 class DeclarationBlock;