[CSS Parser] Leave the Animation type alone when the property is invalid
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Dec 2016 22:53:23 +0000 (22:53 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 5 Dec 2016 22:53:23 +0000 (22:53 +0000)
https://bugs.webkit.org/show_bug.cgi?id=165418

Reviewed by Dean Jackson.

* css/CSSToStyleMap.cpp:
(WebCore::CSSToStyleMap::mapAnimationProperty):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@209355 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/css/CSSToStyleMap.cpp

index 86588a9..38dc01f 100644 (file)
@@ -1,3 +1,13 @@
+2016-12-05  Dave Hyatt  <hyatt@apple.com>
+
+        [CSS Parser] Leave the Animation type alone when the property is invalid
+        https://bugs.webkit.org/show_bug.cgi?id=165418
+
+        Reviewed by Dean Jackson.
+
+        * css/CSSToStyleMap.cpp:
+        (WebCore::CSSToStyleMap::mapAnimationProperty):
+
 2016-12-05  Antti Koivisto  <antti@apple.com>
 
         keyframes do not work when defined inside a style in a shadowRoot
index bddc68f..2a27ddb 100644 (file)
@@ -447,10 +447,9 @@ void CSSToStyleMap::mapAnimationProperty(Animation& animation, const CSSValue& v
     } else if (primitiveValue.valueID() == CSSValueNone) {
         animation.setAnimationMode(Animation::AnimateNone);
         animation.setProperty(CSSPropertyInvalid);
-    } else {
+    } else if (primitiveValue.propertyID() != CSSPropertyInvalid) {
         animation.setAnimationMode(Animation::AnimateSingleProperty);
-        if (primitiveValue.propertyID() != CSSPropertyInvalid)
-            animation.setProperty(primitiveValue.propertyID());
+        animation.setProperty(primitiveValue.propertyID());
     }
 }