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

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

Issue 13943004: Avoid reparsing keyframe selectors (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 5 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
« no previous file with comments | « no previous file | Source/core/css/CSSKeyframeRule.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/CSSKeyframeRule.h
diff --git a/Source/core/css/CSSKeyframeRule.h b/Source/core/css/CSSKeyframeRule.h
index 365ef74c1bb730d263f758cbca87805c6e037d3b..6e5adcce37f77bdbf148bd2222b9731aed353f67 100644
--- a/Source/core/css/CSSKeyframeRule.h
+++ b/Source/core/css/CSSKeyframeRule.h
@@ -45,10 +45,11 @@ 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>&);
- void getKeys(Vector<float>& keys) const { parseKeyString(m_key, keys); }
+ const Vector<float>& keys() const { return m_keys; }
const StylePropertySet* properties() const { return m_properties.get(); }
MutableStylePropertySet* mutableProperties();
@@ -61,12 +62,11 @@ public:
private:
StyleKeyframe();
- static void parseKeyString(const String&, Vector<float>& keys);
+ static void parseKeyString(const String&, Vector<float>&);
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 CSSKeyframeRule : public CSSRule {
« no previous file with comments | « no previous file | Source/core/css/CSSKeyframeRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698