[CSS Parser] Rename StyleKeyframe to StyleRuleKeyframe
authorhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Dec 2016 23:15:24 +0000 (23:15 +0000)
committerhyatt@apple.com <hyatt@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 Dec 2016 23:15:24 +0000 (23:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=165876

Reviewed by Simon Fraser.

* css/CSSKeyframeRule.cpp:
(WebCore::StyleRuleKeyframe::StyleRuleKeyframe):
(WebCore::StyleRuleKeyframe::~StyleRuleKeyframe):
(WebCore::StyleRuleKeyframe::mutableProperties):
(WebCore::StyleRuleKeyframe::keyText):
(WebCore::StyleRuleKeyframe::setKeyText):
(WebCore::StyleRuleKeyframe::cssText):
(WebCore::CSSKeyframeRule::CSSKeyframeRule):
(WebCore::StyleKeyframe::StyleKeyframe): Deleted.
(WebCore::StyleKeyframe::~StyleKeyframe): Deleted.
(WebCore::StyleKeyframe::mutableProperties): Deleted.
(WebCore::StyleKeyframe::keyText): Deleted.
(WebCore::StyleKeyframe::setKeyText): Deleted.
(WebCore::StyleKeyframe::cssText): Deleted.
* css/CSSKeyframeRule.h:
* css/CSSKeyframesRule.cpp:
(WebCore::StyleRuleKeyframes::keyframes):
(WebCore::StyleRuleKeyframes::parserAppendKeyframe):
(WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
(WebCore::CSSKeyframesRule::appendRule):
(WebCore::CSSKeyframesRule::item):
* css/CSSKeyframesRule.h:
* css/StyleResolver.cpp:
(WebCore::StyleResolver::styleForKeyframe):
(WebCore::StyleResolver::keyframeStylesForAnimation):
* css/StyleResolver.h:
* css/StyleRule.cpp:
(WebCore::StyleRuleBase::destroy):
* css/StyleRule.h:
* css/parser/CSSParser.cpp:
(WebCore::CSSParser::parseKeyframeRule):
* css/parser/CSSParser.h:
* css/parser/CSSParserImpl.cpp:
(WebCore::CSSParserImpl::parseDeferredKeyframeList):
(WebCore::CSSParserImpl::consumeKeyframesRule):
(WebCore::CSSParserImpl::consumeKeyframeStyleRule):
* css/parser/CSSParserImpl.h:

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

13 files changed:
Source/WebCore/ChangeLog
Source/WebCore/css/CSSKeyframeRule.cpp
Source/WebCore/css/CSSKeyframeRule.h
Source/WebCore/css/CSSKeyframesRule.cpp
Source/WebCore/css/CSSKeyframesRule.h
Source/WebCore/css/StyleResolver.cpp
Source/WebCore/css/StyleResolver.h
Source/WebCore/css/StyleRule.cpp
Source/WebCore/css/StyleRule.h
Source/WebCore/css/parser/CSSParser.cpp
Source/WebCore/css/parser/CSSParser.h
Source/WebCore/css/parser/CSSParserImpl.cpp
Source/WebCore/css/parser/CSSParserImpl.h

index 970be54..62d361f 100644 (file)
@@ -1,5 +1,50 @@
 2016-12-14  Dave Hyatt  <hyatt@apple.com>
 
+        [CSS Parser] Rename StyleKeyframe to StyleRuleKeyframe
+        https://bugs.webkit.org/show_bug.cgi?id=165876
+
+        Reviewed by Simon Fraser.
+
+        * css/CSSKeyframeRule.cpp:
+        (WebCore::StyleRuleKeyframe::StyleRuleKeyframe):
+        (WebCore::StyleRuleKeyframe::~StyleRuleKeyframe):
+        (WebCore::StyleRuleKeyframe::mutableProperties):
+        (WebCore::StyleRuleKeyframe::keyText):
+        (WebCore::StyleRuleKeyframe::setKeyText):
+        (WebCore::StyleRuleKeyframe::cssText):
+        (WebCore::CSSKeyframeRule::CSSKeyframeRule):
+        (WebCore::StyleKeyframe::StyleKeyframe): Deleted.
+        (WebCore::StyleKeyframe::~StyleKeyframe): Deleted.
+        (WebCore::StyleKeyframe::mutableProperties): Deleted.
+        (WebCore::StyleKeyframe::keyText): Deleted.
+        (WebCore::StyleKeyframe::setKeyText): Deleted.
+        (WebCore::StyleKeyframe::cssText): Deleted.
+        * css/CSSKeyframeRule.h:
+        * css/CSSKeyframesRule.cpp:
+        (WebCore::StyleRuleKeyframes::keyframes):
+        (WebCore::StyleRuleKeyframes::parserAppendKeyframe):
+        (WebCore::StyleRuleKeyframes::wrapperAppendKeyframe):
+        (WebCore::CSSKeyframesRule::appendRule):
+        (WebCore::CSSKeyframesRule::item):
+        * css/CSSKeyframesRule.h:
+        * css/StyleResolver.cpp:
+        (WebCore::StyleResolver::styleForKeyframe):
+        (WebCore::StyleResolver::keyframeStylesForAnimation):
+        * css/StyleResolver.h:
+        * css/StyleRule.cpp:
+        (WebCore::StyleRuleBase::destroy):
+        * css/StyleRule.h:
+        * css/parser/CSSParser.cpp:
+        (WebCore::CSSParser::parseKeyframeRule):
+        * css/parser/CSSParser.h:
+        * css/parser/CSSParserImpl.cpp:
+        (WebCore::CSSParserImpl::parseDeferredKeyframeList):
+        (WebCore::CSSParserImpl::consumeKeyframesRule):
+        (WebCore::CSSParserImpl::consumeKeyframeStyleRule):
+        * css/parser/CSSParserImpl.h:
+
+2016-12-14  Dave Hyatt  <hyatt@apple.com>
+
         [CSS Parser] Make deferred parsing retain the sheet text. Fix invalidation to avoid deferred parsing.
         https://bugs.webkit.org/show_bug.cgi?id=165868
 
index bf87300..c3f9a22 100644 (file)
 
 namespace WebCore {
 
-StyleKeyframe::StyleKeyframe(Ref<StyleProperties>&& properties)
+StyleRuleKeyframe::StyleRuleKeyframe(Ref<StyleProperties>&& properties)
     : StyleRuleBase(Keyframe)
     , m_properties(WTFMove(properties))
 {
 }
 
-StyleKeyframe::StyleKeyframe(std::unique_ptr<Vector<double>> keys, Ref<StyleProperties>&& properties)
+StyleRuleKeyframe::StyleRuleKeyframe(std::unique_ptr<Vector<double>> keys, Ref<StyleProperties>&& properties)
     : StyleRuleBase(Keyframe)
     , m_properties(WTFMove(properties))
     , m_keys(*keys)
 {
 }
     
-StyleKeyframe::~StyleKeyframe()
+StyleRuleKeyframe::~StyleRuleKeyframe()
 {
 }
 
-MutableStyleProperties& StyleKeyframe::mutableProperties()
+MutableStyleProperties& StyleRuleKeyframe::mutableProperties()
 {
     if (!is<MutableStyleProperties>(m_properties.get()))
         m_properties = m_properties->mutableCopy();
     return downcast<MutableStyleProperties>(m_properties.get());
 }
 
-String StyleKeyframe::keyText() const
+String StyleRuleKeyframe::keyText() const
 {
     StringBuilder keyText;
 
@@ -71,7 +71,7 @@ String StyleKeyframe::keyText() const
     return keyText.toString();
 }
     
-bool StyleKeyframe::setKeyText(const String& keyText)
+bool StyleRuleKeyframe::setKeyText(const String& keyText)
 {
     ASSERT(!keyText.isNull());
     auto keys = CSSParser::parseKeyframeKeyList(keyText);
@@ -81,7 +81,7 @@ bool StyleKeyframe::setKeyText(const String& keyText)
     return true;
 }
 
-String StyleKeyframe::cssText() const
+String StyleRuleKeyframe::cssText() const
 {
     StringBuilder result;
     result.append(keyText());
@@ -94,7 +94,7 @@ String StyleKeyframe::cssText() const
     return result.toString();
 }
 
-CSSKeyframeRule::CSSKeyframeRule(StyleKeyframe& keyframe, CSSKeyframesRule* parent)
+CSSKeyframeRule::CSSKeyframeRule(StyleRuleKeyframe& keyframe, CSSKeyframesRule* parent)
     : CSSRule(0)
     , m_keyframe(keyframe)
 {
index 349decd..866c6c4 100644 (file)
@@ -36,20 +36,18 @@ class CSSStyleDeclaration;
 class StyleRuleCSSStyleDeclaration;
 class CSSKeyframesRule;
 
-// FIXME-NEWPARSER: Rename this to StyleRuleKeyframe
-class StyleKeyframe final : public StyleRuleBase {
+class StyleRuleKeyframe final : public StyleRuleBase {
 public:
-    // FIXME-NEWPARSER: Remove this create function once we get rid of the old parser.
-    static Ref<StyleKeyframe> create(Ref<StyleProperties>&& properties)
+    static Ref<StyleRuleKeyframe> create(Ref<StyleProperties>&& properties)
     {
-        return adoptRef(*new StyleKeyframe(WTFMove(properties)));
+        return adoptRef(*new StyleRuleKeyframe(WTFMove(properties)));
     }
 
-    static Ref<StyleKeyframe> create(std::unique_ptr<Vector<double>> keys, Ref<StyleProperties>&& properties)
+    static Ref<StyleRuleKeyframe> create(std::unique_ptr<Vector<double>> keys, Ref<StyleProperties>&& properties)
     {
-        return adoptRef(*new StyleKeyframe(WTFMove(keys), WTFMove(properties)));
+        return adoptRef(*new StyleRuleKeyframe(WTFMove(keys), WTFMove(properties)));
     }
-    ~StyleKeyframe();
+    ~StyleRuleKeyframe();
 
     String keyText() const;
     bool setKeyText(const String&);
@@ -68,8 +66,8 @@ public:
     String cssText() const;
 
 private:
-    explicit StyleKeyframe(Ref<StyleProperties>&&);
-    StyleKeyframe(std::unique_ptr<Vector<double>>, Ref<StyleProperties>&&);
+    explicit StyleRuleKeyframe(Ref<StyleProperties>&&);
+    StyleRuleKeyframe(std::unique_ptr<Vector<double>>, Ref<StyleProperties>&&);
 
     Ref<StyleProperties> m_properties;
     Vector<double> m_keys;
@@ -88,11 +86,11 @@ public:
     CSSStyleDeclaration& style();
 
 private:
-    CSSKeyframeRule(StyleKeyframe&, CSSKeyframesRule* parent);
+    CSSKeyframeRule(StyleRuleKeyframe&, CSSKeyframesRule* parent);
 
     CSSRule::Type type() const final { return KEYFRAME_RULE; }
 
-    Ref<StyleKeyframe> m_keyframe;
+    Ref<StyleRuleKeyframe> m_keyframe;
     mutable RefPtr<StyleRuleCSSStyleDeclaration> m_propertiesCSSOMWrapper;
     
     friend class CSSKeyframesRule;
index b479654..0642b87 100644 (file)
@@ -74,20 +74,20 @@ void StyleRuleKeyframes::parseDeferredRulesIfNeeded() const
     m_deferredRules = nullptr;
 }
 
-const Vector<Ref<StyleKeyframe>>& StyleRuleKeyframes::keyframes() const
+const Vector<Ref<StyleRuleKeyframe>>& StyleRuleKeyframes::keyframes() const
 {
     parseDeferredRulesIfNeeded();
     return m_keyframes;
 }
 
-void StyleRuleKeyframes::parserAppendKeyframe(RefPtr<StyleKeyframe>&& keyframe)
+void StyleRuleKeyframes::parserAppendKeyframe(RefPtr<StyleRuleKeyframe>&& keyframe)
 {
     if (!keyframe)
         return;
     m_keyframes.append(keyframe.releaseNonNull());
 }
 
-void StyleRuleKeyframes::wrapperAppendKeyframe(Ref<StyleKeyframe>&& keyframe)
+void StyleRuleKeyframes::wrapperAppendKeyframe(Ref<StyleRuleKeyframe>&& keyframe)
 {
     parseDeferredRulesIfNeeded();
     m_keyframes.append(WTFMove(keyframe));
@@ -142,7 +142,7 @@ void CSSKeyframesRule::appendRule(const String& ruleText)
     ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size());
 
     CSSParser parser(parserContext());
-    RefPtr<StyleKeyframe> keyframe = parser.parseKeyframeRule(ruleText);
+    RefPtr<StyleRuleKeyframe> keyframe = parser.parseKeyframeRule(ruleText);
     if (!keyframe)
         return;
 
@@ -215,7 +215,7 @@ CSSKeyframeRule* CSSKeyframesRule::item(unsigned index) const
     ASSERT(m_childRuleCSSOMWrappers.size() == m_keyframesRule->keyframes().size());
     RefPtr<CSSKeyframeRule>& rule = m_childRuleCSSOMWrappers[index];
     if (!rule)
-        rule = adoptRef(new CSSKeyframeRule(const_cast<StyleKeyframe&>(m_keyframesRule->keyframes()[index].get()), const_cast<CSSKeyframesRule*>(this)));
+        rule = adoptRef(new CSSKeyframeRule(const_cast<StyleRuleKeyframe&>(m_keyframesRule->keyframes()[index].get()), const_cast<CSSKeyframesRule*>(this)));
 
     return rule.get(); 
 }
index 3417dbc..dd07595 100644 (file)
@@ -34,7 +34,7 @@
 namespace WebCore {
 
 class CSSRuleList;
-class StyleKeyframe;
+class StyleRuleKeyframe;
 class CSSKeyframeRule;
 
 class StyleRuleKeyframes final : public StyleRuleBase {
@@ -44,14 +44,14 @@ public:
     
     ~StyleRuleKeyframes();
     
-    const Vector<Ref<StyleKeyframe>>& keyframes() const;
-    const Vector<Ref<StyleKeyframe>>* keyframesWithoutDeferredParsing() const
+    const Vector<Ref<StyleRuleKeyframe>>& keyframes() const;
+    const Vector<Ref<StyleRuleKeyframe>>* keyframesWithoutDeferredParsing() const
     {
         return !m_deferredRules ? &m_keyframes : nullptr;
     }
 
-    void parserAppendKeyframe(RefPtr<StyleKeyframe>&&);
-    void wrapperAppendKeyframe(Ref<StyleKeyframe>&&);
+    void parserAppendKeyframe(RefPtr<StyleRuleKeyframe>&&);
+    void wrapperAppendKeyframe(Ref<StyleRuleKeyframe>&&);
     void wrapperRemoveKeyframe(unsigned);
 
     const AtomicString& name() const { return m_name; }
@@ -68,7 +68,7 @@ private:
 
     void parseDeferredRulesIfNeeded() const;
     
-    mutable Vector<Ref<StyleKeyframe>> m_keyframes;
+    mutable Vector<Ref<StyleRuleKeyframe>> m_keyframes;
     AtomicString m_name;
     
     mutable std::unique_ptr<DeferredStyleGroupRuleList> m_deferredRules;
index 62f0864..d39a7ba 100644 (file)
@@ -444,7 +444,7 @@ ElementStyle StyleResolver::styleForElement(const Element& element, const Render
     return { state.takeStyle(), WTFMove(elementStyleRelations) };
 }
 
-std::unique_ptr<RenderStyle> StyleResolver::styleForKeyframe(const RenderStyle* elementStyle, const StyleKeyframe* keyframe, KeyframeValue& keyframeValue)
+std::unique_ptr<RenderStyle> StyleResolver::styleForKeyframe(const RenderStyle* elementStyle, const StyleRuleKeyframe* keyframe, KeyframeValue& keyframeValue)
 {
     RELEASE_ASSERT(!m_isDeleted);
 
@@ -516,7 +516,7 @@ void StyleResolver::keyframeStylesForAnimation(const Element& element, const Ren
     const StyleRuleKeyframes* keyframesRule = it->value.get();
 
     auto* keyframes = &keyframesRule->keyframes();
-    Vector<Ref<StyleKeyframe>> newKeyframesIfNecessary;
+    Vector<Ref<StyleRuleKeyframe>> newKeyframesIfNecessary;
 
     bool hasDuplicateKeys = false;
     HashSet<double> keyframeKeys;
@@ -535,17 +535,17 @@ void StyleResolver::keyframeStylesForAnimation(const Element& element, const Ren
     // to copy the HashMap into a Vector.
     if (hasDuplicateKeys) {
         // Merge duplicate key times.
-        HashMap<double, RefPtr<StyleKeyframe>> keyframesMap;
+        HashMap<double, RefPtr<StyleRuleKeyframe>> keyframesMap;
 
         for (auto& originalKeyframe : keyframesRule->keyframes()) {
             for (auto key : originalKeyframe->keys()) {
                 if (auto keyframe = keyframesMap.get(key))
                     keyframe->mutableProperties().mergeAndOverrideOnConflict(originalKeyframe->properties());
                 else {
-                    auto styleKeyframe = StyleKeyframe::create(MutableStyleProperties::create());
-                    styleKeyframe.ptr()->setKey(key);
-                    styleKeyframe.ptr()->mutableProperties().mergeAndOverrideOnConflict(originalKeyframe->properties());
-                    keyframesMap.set(key, styleKeyframe.ptr());
+                    auto StyleRuleKeyframe = StyleRuleKeyframe::create(MutableStyleProperties::create());
+                    StyleRuleKeyframe.ptr()->setKey(key);
+                    StyleRuleKeyframe.ptr()->mutableProperties().mergeAndOverrideOnConflict(originalKeyframe->properties());
+                    keyframesMap.set(key, StyleRuleKeyframe.ptr());
                 }
             }
         }
@@ -573,9 +573,9 @@ void StyleResolver::keyframeStylesForAnimation(const Element& element, const Ren
     // If the 0% keyframe is missing, create it (but only if there is at least one other keyframe).
     int initialListSize = list.size();
     if (initialListSize > 0 && list[0].key()) {
-        static StyleKeyframe* zeroPercentKeyframe;
+        static StyleRuleKeyframe* zeroPercentKeyframe;
         if (!zeroPercentKeyframe) {
-            zeroPercentKeyframe = &StyleKeyframe::create(MutableStyleProperties::create()).leakRef();
+            zeroPercentKeyframe = &StyleRuleKeyframe::create(MutableStyleProperties::create()).leakRef();
             zeroPercentKeyframe->setKey(0);
         }
         KeyframeValue keyframeValue(0, nullptr);
@@ -585,9 +585,9 @@ void StyleResolver::keyframeStylesForAnimation(const Element& element, const Ren
 
     // If the 100% keyframe is missing, create it (but only if there is at least one other keyframe).
     if (initialListSize > 0 && (list[list.size() - 1].key() != 1)) {
-        static StyleKeyframe* hundredPercentKeyframe;
+        static StyleRuleKeyframe* hundredPercentKeyframe;
         if (!hundredPercentKeyframe) {
-            hundredPercentKeyframe = &StyleKeyframe::create(MutableStyleProperties::create()).leakRef();
+            hundredPercentKeyframe = &StyleRuleKeyframe::create(MutableStyleProperties::create()).leakRef();
             hundredPercentKeyframe->setKey(1);
         }
         KeyframeValue keyframeValue(1, nullptr);
index ed113a6..3702686 100644 (file)
@@ -75,7 +75,7 @@ class Settings;
 class StyleCachedImage;
 class StyleGeneratedImage;
 class StyleImage;
-class StyleKeyframe;
+class StyleRuleKeyframe;
 class StyleProperties;
 class StyleRule;
 class StyleRuleKeyframes;
@@ -162,7 +162,7 @@ public:
     void setOverrideDocumentElementStyle(RenderStyle* style) { m_overrideDocumentElementStyle = style; }
 
 private:
-    std::unique_ptr<RenderStyle> styleForKeyframe(const RenderStyle*, const StyleKeyframe*, KeyframeValue&);
+    std::unique_ptr<RenderStyle> styleForKeyframe(const RenderStyle*, const StyleRuleKeyframe*, KeyframeValue&);
 
 public:
     // These methods will give back the set of rules that matched for a given element (or a pseudo-element).
index 1ee6524..23767d8 100644 (file)
@@ -95,7 +95,7 @@ void StyleRuleBase::destroy()
         delete downcast<StyleRuleNamespace>(this);
         return;
     case Keyframe:
-        delete downcast<StyleKeyframe>(this);
+        delete downcast<StyleRuleKeyframe>(this);
         return;
     case Charset:
         delete downcast<StyleRuleCharset>(this);
index c572872..e768efe 100644 (file)
@@ -33,7 +33,7 @@ class CSSStyleRule;
 class CSSStyleSheet;
 class MediaQuerySet;
 class MutableStyleProperties;
-class StyleKeyframe;
+class StyleRuleKeyframe;
 class StyleProperties;
 class StyleRuleKeyframes;
     
@@ -49,7 +49,7 @@ public:
         FontFace,
         Page,
         Keyframes,
-        Keyframe, // Not used. These are internally non-rule StyleKeyframe objects.
+        Keyframe, // Not used. These are internally non-rule StyleRuleKeyframe objects.
         Namespace,
         Supports = 12,
 #if ENABLE(CSS_DEVICE_ADAPTATION)
@@ -393,7 +393,7 @@ SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::StyleRuleNamespace)
     static bool isType(const WebCore::StyleRuleBase& rule) { return rule.isNamespaceRule(); }
 SPECIALIZE_TYPE_TRAITS_END()
 
-SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::StyleKeyframe)
+SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::StyleRuleKeyframe)
 static bool isType(const WebCore::StyleRuleBase& rule) { return rule.isKeyframeRule(); }
 SPECIALIZE_TYPE_TRAITS_END()
 
index 1538885..156647d 100644 (file)
@@ -150,10 +150,10 @@ RefPtr<StyleRuleBase> CSSParser::parseRule(const CSSParserContext& context, Styl
     return CSSParserImpl::parseRule(string, context, sheet, CSSParserImpl::AllowImportRules);
 }
 
-RefPtr<StyleKeyframe> CSSParser::parseKeyframeRule(const String& string)
+RefPtr<StyleRuleKeyframe> CSSParser::parseKeyframeRule(const String& string)
 {
     RefPtr<StyleRuleBase> keyframe = CSSParserImpl::parseRule(string, m_context, nullptr, CSSParserImpl::KeyframeRules);
-    return downcast<StyleKeyframe>(keyframe.get());
+    return downcast<StyleRuleKeyframe>(keyframe.get());
 }
 
 bool CSSParser::parseSupportsCondition(const String& condition)
index 54e4c66..0991dff 100644 (file)
@@ -36,7 +36,7 @@ class Element;
 class ImmutableStyleProperties;
 class MutableStyleProperties;
 class StyleRuleBase;
-class StyleKeyframe;
+class StyleRuleKeyframe;
 class StyleSheetContents;
 
 class CSSParser {
@@ -55,7 +55,7 @@ public:
     
     static RefPtr<StyleRuleBase> parseRule(const CSSParserContext&, StyleSheetContents*, const String&);
     
-    RefPtr<StyleKeyframe> parseKeyframeRule(const String&);
+    RefPtr<StyleRuleKeyframe> parseKeyframeRule(const String&);
     static std::unique_ptr<Vector<double>> parseKeyframeKeyList(const String&);
     
     bool parseSupportsCondition(const String&);
index fcf2352..2da1144 100644 (file)
@@ -191,7 +191,7 @@ void CSSParserImpl::parseDeferredKeyframeList(CSSParserTokenRange tokenRange, CS
         return;
     CSSParserImpl parser(deferredParser);
     parser.consumeRuleList(tokenRange, KeyframesRuleList, [&keyframeRule](const RefPtr<StyleRuleBase>& keyframe) {
-        keyframeRule.parserAppendKeyframe(downcast<const StyleKeyframe>(keyframe.get()));
+        keyframeRule.parserAppendKeyframe(downcast<const StyleRuleKeyframe>(keyframe.get()));
     });
 }
 
@@ -649,7 +649,7 @@ RefPtr<StyleRuleKeyframes> CSSParserImpl::consumeKeyframesRule(bool webkitPrefix
 
     RefPtr<StyleRuleKeyframes> keyframeRule = StyleRuleKeyframes::create(name);
     consumeRuleList(block, KeyframesRuleList, [keyframeRule](const RefPtr<StyleRuleBase>& keyframe) {
-        keyframeRule->parserAppendKeyframe(downcast<const StyleKeyframe>(keyframe.get()));
+        keyframeRule->parserAppendKeyframe(downcast<const StyleRuleKeyframe>(keyframe.get()));
     });
 
     // FIXME-NEWPARSER: Find out why this is done. Behavior difference when prefixed?
@@ -714,7 +714,7 @@ RefPtr<StyleRuleRegion> CSSParserImpl::consumeRegionRule(CSSParserTokenRange pre
 }
 */
     
-RefPtr<StyleKeyframe> CSSParserImpl::consumeKeyframeStyleRule(CSSParserTokenRange prelude, CSSParserTokenRange block)
+RefPtr<StyleRuleKeyframe> CSSParserImpl::consumeKeyframeStyleRule(CSSParserTokenRange prelude, CSSParserTokenRange block)
 {
     std::unique_ptr<Vector<double>> keyList = consumeKeyframeKeyList(prelude);
     if (!keyList)
@@ -726,7 +726,7 @@ RefPtr<StyleKeyframe> CSSParserImpl::consumeKeyframeStyleRule(CSSParserTokenRang
     }
 
     consumeDeclarationList(block, StyleRule::Keyframe);
-    return StyleKeyframe::create(WTFMove(keyList), createStyleProperties(m_parsedProperties, m_context.mode));
+    return StyleRuleKeyframe::create(WTFMove(keyList), createStyleProperties(m_parsedProperties, m_context.mode));
 }
 
 static void observeSelectors(CSSParserObserverWrapper& wrapper, CSSParserTokenRange selectors)
index 613f792..302c22b 100644 (file)
@@ -48,7 +48,7 @@ class CSSParserObserver;
 class CSSParserObserverWrapper;
 class CSSSelectorList;
 class CSSTokenizer;
-class StyleKeyframe;
+class StyleRuleKeyframe;
 class StyleRule;
 class StyleRuleBase;
 class StyleRuleCharset;
@@ -142,7 +142,7 @@ private:
     // FIXME-NEWPARSER: Support "apply"
     // void consumeApplyRule(CSSParserTokenRange prelude);
 
-    RefPtr<StyleKeyframe> consumeKeyframeStyleRule(CSSParserTokenRange prelude, CSSParserTokenRange block);
+    RefPtr<StyleRuleKeyframe> consumeKeyframeStyleRule(CSSParserTokenRange prelude, CSSParserTokenRange block);
     RefPtr<StyleRule> consumeStyleRule(CSSParserTokenRange prelude, CSSParserTokenRange block);
 
     void consumeDeclarationList(CSSParserTokenRange, StyleRule::Type);