Bug 1324700 - Servo_ParseProperty() takes nsCSSPropertyID instead of nsACString. r?heycam draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Sat, 15 Apr 2017 07:37:34 +0900
changeset 563183 ac6156eb67929146eb2c2bfa9d0c69ca7eb7f281
parent 563182 05474bd27af4a6b7df239b158347e40a79285ad5
child 563184 1eebf5ce5bbd04787d2323c3e38e77714055814e
push id54220
push userhikezoe@mozilla.com
push dateSat, 15 Apr 2017 04:25:00 +0000
reviewersheycam
bugs1324700
milestone55.0a1
Bug 1324700 - Servo_ParseProperty() takes nsCSSPropertyID instead of nsACString. r?heycam MozReview-Commit-ID: Gn90DBlJSS9
dom/animation/KeyframeUtils.cpp
layout/style/ServoBindingList.h
--- a/dom/animation/KeyframeUtils.cpp
+++ b/dom/animation/KeyframeUtils.cpp
@@ -1009,27 +1009,25 @@ MakePropertyValuePair(nsCSSPropertyID aP
                       nsCSSParser& aParser, nsIDocument* aDocument)
 {
   MOZ_ASSERT(aDocument);
   PropertyValuePair result;
 
   result.mProperty = aProperty;
 
   if (aDocument->GetStyleBackendType() == StyleBackendType::Servo) {
-    nsCString name = nsCSSProps::GetStringValue(aProperty);
-
     NS_ConvertUTF16toUTF8 value(aStringValue);
 
     // FIXME this is using the wrong base uri (bug 1343919)
     RefPtr<URLExtraData> data = new URLExtraData(aDocument->GetDocumentURI(),
                                                  aDocument->GetDocumentURI(),
                                                  aDocument->NodePrincipal());
 
     RefPtr<RawServoDeclarationBlock> servoDeclarationBlock =
-      Servo_ParseProperty(&name, &value, data).Consume();
+      Servo_ParseProperty(aProperty, &value, data).Consume();
 
     if (servoDeclarationBlock) {
       result.mServoDeclarationBlock = servoDeclarationBlock.forget();
     }
     return result;
   }
 
   nsCSSValue value;
--- a/layout/style/ServoBindingList.h
+++ b/layout/style/ServoBindingList.h
@@ -119,17 +119,17 @@ SERVO_BINDING_FUNC(Servo_PageRule_GetSty
                    RawServoPageRuleBorrowed rule)
 SERVO_BINDING_FUNC(Servo_PageRule_SetStyle, void,
                    RawServoPageRuleBorrowed rule,
                    RawServoDeclarationBlockBorrowed declarations)
 
 // Animations API
 SERVO_BINDING_FUNC(Servo_ParseProperty,
                    RawServoDeclarationBlockStrong,
-                   const nsACString* property, const nsACString* value,
+                   nsCSSPropertyID property, const nsACString* value,
                    RawGeckoURLExtraData* data)
 SERVO_BINDING_FUNC(Servo_ParseEasing, bool,
                    const nsAString* easing,
                    RawGeckoURLExtraData* data,
                    nsTimingFunctionBorrowedMut output)
 SERVO_BINDING_FUNC(Servo_GetComputedKeyframeValues, void,
                    RawGeckoKeyframeListBorrowed keyframes,
                    ServoComputedValuesBorrowed style,