Bug 31588 - CSSKeyframesRule::findRule() and deleteRule() should accept 'from' and 'to' as well as percentages
Summary: CSSKeyframesRule::findRule() and deleteRule() should accept 'from' and 'to' a...
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Simon Fraser (smfr)
Depends on:
Reported: 2009-11-17 08:15 PST by Simon Fraser (smfr)
Modified: 2009-11-21 16:19 PST (History)
2 users (show)

See Also:

Patch (5.16 KB, patch)
2009-11-21 12:51 PST, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch v2. (5.39 KB, patch)
2009-11-21 15:38 PST, Simon Fraser (smfr)
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 2009-11-17 08:15:40 PST
CSSKeyframesRule::findRule() and deleteRule () only seem to work if you pass percentage values. It should also work if you pass 'from' and 'to'.

The spec also needs to be clarified here.
Comment 1 Simon Fraser (smfr) 2009-11-21 12:51:55 PST
Created attachment 43656 [details]
Comment 2 mitz 2009-11-21 12:57:34 PST
Comment on attachment 43656 [details]

CSSOM APIs like getPropertyValue() are case-insensitive. Shouldn’t this also be case-insensitive?
Comment 3 Simon Fraser (smfr) 2009-11-21 15:28:05 PST
Good point.
Comment 4 Simon Fraser (smfr) 2009-11-21 15:38:06 PST
Created attachment 43660 [details]
Patch v2.
Comment 5 mitz 2009-11-21 15:45:59 PST
Comment on attachment 43660 [details]
Patch v2.

> +    if (key.lower() == "from")

I think the way this is typically done is using equalIgnoringCase, although I thought there was also a special function for when one of the strings is known to be all-lowercase, but I can’t find it right now.

r=me either way
Comment 6 Simon Fraser (smfr) 2009-11-21 16:19:36 PST