Bug 31588

Summary: CSSKeyframesRule::findRule() and deleteRule() should accept 'from' and 'to' as well as percentages
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: CSSAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: cmarrin, dino
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Mac   
OS: OS X 10.5   
Attachments:
Description Flags
Patch
none
Patch v2. mitz: review+

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]
Patch
Comment 2 mitz 2009-11-21 12:57:34 PST
Comment on attachment 43656 [details]
Patch

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
http://trac.webkit.org/changeset/51289