Bug 1382285 - stylo: initialize missing Servo*Rule with line and column numbers. r=xidorn
authorFernando Jimenez Moreno <ferjmoreno@gmail.com>
Mon, 24 Jul 2017 15:07:07 +0200
changeset 419530 b82ea19a479f5bee3d18e8d121f9746a74f27fd1
parent 419529 9679bdd8b0a39b0f37cd754324a436e7ff76d9f2
child 419531 ff6edfdd8b6c54fdbd33968031b49b22431d35bf
push id7566
push usermtabara@mozilla.com
push dateWed, 02 Aug 2017 08:25:16 +0000
treeherdermozilla-beta@86913f512c3c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersxidorn
bugs1382285
milestone56.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 1382285 - stylo: initialize missing Servo*Rule with line and column numbers. r=xidorn MozReview-Commit-ID: 7gNTbctHYGh
layout/style/GroupRule.cpp
layout/style/GroupRule.h
layout/style/ServoDocumentRule.cpp
layout/style/ServoMediaRule.cpp
layout/style/ServoSupportsRule.cpp
--- a/layout/style/GroupRule.cpp
+++ b/layout/style/GroupRule.cpp
@@ -218,18 +218,19 @@ ServoGroupRuleRules::SizeOfExcludingThis
 //
 
 GroupRule::GroupRule(uint32_t aLineNumber, uint32_t aColumnNumber)
   : Rule(aLineNumber, aColumnNumber)
   , mInner(GeckoGroupRuleRules())
 {
 }
 
-GroupRule::GroupRule(already_AddRefed<ServoCssRules> aRules)
-  : Rule(0, 0) // TODO
+GroupRule::GroupRule(already_AddRefed<ServoCssRules> aRules,
+                     uint32_t aLineNumber, uint32_t aColumnNumber)
+  : Rule(aLineNumber, aColumnNumber)
   , mInner(ServoGroupRuleRules(Move(aRules)))
 {
   mInner.as<ServoGroupRuleRules>().SetParentRule(this);
 }
 
 GroupRule::GroupRule(const GroupRule& aCopy)
   : Rule(aCopy)
   , mInner(aCopy.mInner)
--- a/layout/style/GroupRule.h
+++ b/layout/style/GroupRule.h
@@ -138,17 +138,18 @@ struct ServoGroupRuleRules
   }                                                \
 
 // inherits from Rule so it can be shared between
 // MediaRule and DocumentRule
 class GroupRule : public Rule
 {
 protected:
   GroupRule(uint32_t aLineNumber, uint32_t aColumnNumber);
-  explicit GroupRule(already_AddRefed<ServoCssRules> aRules);
+  GroupRule(already_AddRefed<ServoCssRules> aRules,
+            uint32_t aLineNumber, uint32_t aColumnNumber);
   GroupRule(const GroupRule& aCopy);
   virtual ~GroupRule();
 public:
 
   NS_DECL_CYCLE_COLLECTION_CLASS_INHERITED(GroupRule, Rule)
   NS_DECL_ISUPPORTS_INHERITED
   virtual bool IsCCLeaf() const override;
 
--- a/layout/style/ServoDocumentRule.cpp
+++ b/layout/style/ServoDocumentRule.cpp
@@ -10,17 +10,18 @@
 #include "mozilla/ServoDocumentRule.h"
 
 using namespace mozilla::dom;
 
 namespace mozilla {
 
 ServoDocumentRule::ServoDocumentRule(RefPtr<RawServoDocumentRule> aRawRule,
                                      uint32_t aLine, uint32_t aColumn)
-  : CSSMozDocumentRule(Servo_DocumentRule_GetRules(aRawRule).Consume())
+  : CSSMozDocumentRule(Servo_DocumentRule_GetRules(aRawRule).Consume(),
+                       aLine, aColumn)
   , mRawRule(Move(aRawRule))
 {
 }
 
 ServoDocumentRule::~ServoDocumentRule()
 {
 }
 
--- a/layout/style/ServoMediaRule.cpp
+++ b/layout/style/ServoMediaRule.cpp
@@ -12,17 +12,17 @@
 #include "mozilla/ServoMediaList.h"
 
 using namespace mozilla::dom;
 
 namespace mozilla {
 
 ServoMediaRule::ServoMediaRule(RefPtr<RawServoMediaRule> aRawRule,
                                uint32_t aLine, uint32_t aColumn)
-  : CSSMediaRule(Servo_MediaRule_GetRules(aRawRule).Consume())
+  : CSSMediaRule(Servo_MediaRule_GetRules(aRawRule).Consume(), aLine, aColumn)
   , mRawRule(Move(aRawRule))
 {
 }
 
 ServoMediaRule::~ServoMediaRule()
 {
 }
 
--- a/layout/style/ServoSupportsRule.cpp
+++ b/layout/style/ServoSupportsRule.cpp
@@ -11,17 +11,18 @@
 #include "mozilla/ServoBindings.h"
 
 using namespace mozilla::dom;
 
 namespace mozilla {
 
 ServoSupportsRule::ServoSupportsRule(RefPtr<RawServoSupportsRule> aRawRule,
                                      uint32_t aLine, uint32_t aColumn)
-  : CSSSupportsRule(Servo_SupportsRule_GetRules(aRawRule).Consume())
+  : CSSSupportsRule(Servo_SupportsRule_GetRules(aRawRule).Consume(),
+                    aLine, aColumn)
   , mRawRule(Move(aRawRule))
 {
 }
 
 ServoSupportsRule::~ServoSupportsRule()
 {
 }