diff options
Diffstat (limited to 'WebCore/css/WebKitCSSKeyframesRule.cpp')
-rw-r--r-- | WebCore/css/WebKitCSSKeyframesRule.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/WebCore/css/WebKitCSSKeyframesRule.cpp b/WebCore/css/WebKitCSSKeyframesRule.cpp index 440d7a2..23f9f34 100644 --- a/WebCore/css/WebKitCSSKeyframesRule.cpp +++ b/WebCore/css/WebKitCSSKeyframesRule.cpp @@ -108,8 +108,16 @@ WebKitCSSKeyframeRule* WebKitCSSKeyframesRule::findRule(const String& s) int WebKitCSSKeyframesRule::findRuleIndex(const String& key) const { + String percentageString; + if (equalIgnoringCase(key, "from")) + percentageString = "0%"; + else if (equalIgnoringCase(key, "to")) + percentageString = "100%"; + else + percentageString = key; + for (unsigned i = 0; i < length(); ++i) { - if (item(i)->keyText() == key) + if (item(i)->keyText() == percentageString) return i; } |