Bug 1355394 part 2 - Move GetRules function into macro. r=heycam
authorXidorn Quan <me@upsuper.org>
Wed, 26 Apr 2017 15:57:57 +0800
changeset 355546 19b3fcb74901391fa6d4ea81481ec8108e7aa402
parent 355545 29728643acd48526029005d133361a19f31aacf7
child 355547 ffc4714cef395282c0551d3b741112ad0d3945d5
push id31732
push userkwierso@gmail.com
push dateFri, 28 Apr 2017 22:43:27 +0000
treeherdermozilla-central@1c994cd72265 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersheycam
bugs1355394
milestone55.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 1355394 part 2 - Move GetRules function into macro. r=heycam MozReview-Commit-ID: AlQ5os4s26v
layout/style/ServoBindingList.h
--- a/layout/style/ServoBindingList.h
+++ b/layout/style/ServoBindingList.h
@@ -93,34 +93,37 @@ SERVO_BINDING_FUNC(Servo_CssRules_Delete
 #define BASIC_RULE_FUNCS(type_) \
   SERVO_BINDING_FUNC(Servo_CssRules_Get##type_##RuleAt, \
                      RawServo##type_##RuleStrong, \
                      ServoCssRulesBorrowed rules, uint32_t index) \
   SERVO_BINDING_FUNC(Servo_##type_##Rule_Debug, void, \
                      RawServo##type_##RuleBorrowed rule, nsACString* result) \
   SERVO_BINDING_FUNC(Servo_##type_##Rule_GetCssText, void, \
                      RawServo##type_##RuleBorrowed rule, nsAString* result)
+#define GROUP_RULE_FUNCS(type_) \
+  BASIC_RULE_FUNCS(type_) \
+  SERVO_BINDING_FUNC(Servo_##type_##Rule_GetRules, ServoCssRulesStrong, \
+                     RawServo##type_##RuleBorrowed rule)
 BASIC_RULE_FUNCS(Style)
-BASIC_RULE_FUNCS(Media)
+GROUP_RULE_FUNCS(Media)
 BASIC_RULE_FUNCS(Namespace)
 BASIC_RULE_FUNCS(Page)
+#undef GROUP_RULE_FUNCS
 #undef BASIC_RULE_FUNCS
 SERVO_BINDING_FUNC(Servo_CssRules_GetFontFaceRuleAt, nsCSSFontFaceRule*,
                    ServoCssRulesBorrowed rules, uint32_t index)
 SERVO_BINDING_FUNC(Servo_StyleRule_GetStyle, RawServoDeclarationBlockStrong,
                    RawServoStyleRuleBorrowed rule)
 SERVO_BINDING_FUNC(Servo_StyleRule_SetStyle, void,
                    RawServoStyleRuleBorrowed rule,
                    RawServoDeclarationBlockBorrowed declarations)
 SERVO_BINDING_FUNC(Servo_StyleRule_GetSelectorText, void,
                    RawServoStyleRuleBorrowed rule, nsAString* result)
 SERVO_BINDING_FUNC(Servo_MediaRule_GetMedia, RawServoMediaListStrong,
                    RawServoMediaRuleBorrowed rule)
-SERVO_BINDING_FUNC(Servo_MediaRule_GetRules, ServoCssRulesStrong,
-                   RawServoMediaRuleBorrowed rule)
 SERVO_BINDING_FUNC(Servo_NamespaceRule_GetPrefix, nsIAtom*,
                    RawServoNamespaceRuleBorrowed rule)
 SERVO_BINDING_FUNC(Servo_NamespaceRule_GetURI, nsIAtom*,
                    RawServoNamespaceRuleBorrowed rule)
 SERVO_BINDING_FUNC(Servo_PageRule_GetStyle, RawServoDeclarationBlockStrong,
                    RawServoPageRuleBorrowed rule)
 SERVO_BINDING_FUNC(Servo_PageRule_SetStyle, void,
                    RawServoPageRuleBorrowed rule,