Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(446)

Unified Diff: Source/core/css/WebKitCSSKeyframeRule.h

Issue 13943004: Avoid reparsing keyframe selectors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/css/WebKitCSSKeyframeRule.h
diff --git a/Source/core/css/WebKitCSSKeyframeRule.h b/Source/core/css/WebKitCSSKeyframeRule.h
index e4c4094740513d4a06949639d6773ce8d2f806f5..9d3337cc5e09150ec810977b1439a2799f3a2914 100644
--- a/Source/core/css/WebKitCSSKeyframeRule.h
+++ b/Source/core/css/WebKitCSSKeyframeRule.h
@@ -44,10 +44,12 @@ public:
}
~StyleKeyframe();
- String keyText() const { return m_key; }
- void setKeyText(const String& s) { m_key = s; }
+ String keyText() const;
+ void setKeyText(const String&);
+ void setKeys(const Vector<float>&);
+ bool isValid() const { return m_keys.size() > 0 || !m_keyText.isEmpty(); }
- void getKeys(Vector<float>& keys) const { parseKeyString(m_key, keys); }
+ Vector<float> getKeys() const { return m_keys; }
const StylePropertySet* properties() const { return m_properties.get(); }
StylePropertySet* mutableProperties();
@@ -60,12 +62,11 @@ public:
private:
StyleKeyframe();
- static void parseKeyString(const String&, Vector<float>& keys);
+ static Vector<float> parseKeyString(const String&);
RefPtr<StylePropertySet> m_properties;
- // FIXME: This should be a parsed vector of floats.
- // comma separated list of keys
- String m_key;
+ mutable String m_keyText;
+ Vector<float> m_keys;
};
class WebKitCSSKeyframeRule : public CSSRule {

Powered by Google App Engine
This is Rietveld 408576698