Re: [css-animations] findRule/deleteRule key argument






-----Original Message-----
From: Dean Jackson <dino@apple.com>
Date: Thursday, December 11, 2014 at 12:17 PM
To: Adobe <galineau@adobe.com>
Cc: "www-style@w3.org" <www-style@w3.org>
Subject: Re: [css-animations] findRule/deleteRule key argument

>
>> On 9 Dec 2014, at 10:08 am, Sylvain Galineau <galineau@adobe.com> wrote:
>> 
>> Per a recent resolution of this bug [1], I have started describing 
>>browser 
>> behavior after running some simple tests [2]. In particular:
>> 
>> - The key argument is really a keyframe selector. 
>> - A keyframe selector is a list of one or more values each of which is 
>> either a percentage or one of ‘from’/‘to’.
>> 
>> Couple of issues:
>> - Some browsers are white-space sensitive. I do not think that should 
>>be 
>> the case. Specifically, WebKit/Blink fail to find/delete the ’25%,50%’ 
>> rule in the test if a space is added somewhere. 
>
>I agree that they should not be sensitive to whitespace. I consider that
>a bug in WebKit.
>
>What about order though? Would "50%,25%" match "25%,50%"?

Today all browsers expect you to match the number and order of the values.

>
>Also, should "0%" match "from"?

This already works in browsers today; both ways i.e. findRule(‘from’) will 
return the 0% rule and findRule(‘100%’) will return the ‘to’ rule.

>
>> - Second, we need to agree on which rule gets returned/deleted when 
>> multiple rules have the same keyframe selector. Currently, WebKit/Blink 
>> return the first rule with a matching keyframe selector. Win10 IE and 
>> Firefox return the last. I think both methods should be consistent - 
>>i.e. 
>> we do not want findRule to return the first and deleteRule to remove 
>>the 
>> last - but I do not have a strong opinion as to the default. Thoughts?
>
>I agree that they should be consistent. I think we should pick the
>behaviour of the most common one (we might have to guess at which that is,
>probably findRule).

findRule/deleteRule is already consistent in browsers; but two browsers 
find/delete the first rule with a matching keyframe selector. Two browser 
find/delete the last rule for the specified selector...

>
>Dean
>
>
>> 
>> 
>> 
>> [1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=14788

>> [2] http://jsbin.com/jelili/3/edit

>> 
>

Received on Thursday, 11 December 2014 22:38:11 UTC