Re: [css3-transitions] [css3-animations] API for testing transitions and animations

On Tue, Feb 28, 2012 at 5:00 AM, fantasai <fantasai.lists@inkedblade.net> wrote:
> Looks like plinss fixed this for you:
>  http://test.csswg.org/resources/

I still don't like to use /resources, because then
dvcs.w3.org/hg/.../raw-file/ breaks, so you can't look at old
revisions.  /resources would be good if dvcs.w3.org/resources/ also
pointed to the right place.

> This one will take a bit more time to fix... Ideally we'd handle the
> prefixing
> in the build scripts, maybe by running a set of regexps stored in a
> configuration
> file. (Regular expressions should work fine for most static tests, but I'm
> not
> sure how you'd handle scripting. Would that work for your tests?)

Regex might do the wrong thing for some static markup too, since some
properties are common words like "transform" or "transition".  For
instance, SVG has a "transform" content attribute, and SVG reftests
for transforms might use that, but we don't want it getting prefixed
along with the CSS property.

What I did for my ad-hoc reftest viewer is at
<http://hg.csswg.org/test/file/b047c7e7c66b/contributors/aryehgregor/incoming/viewer.html#l335>.
 Basically, I did use regex, but only on style="" and <style>
contents, using the DOM -- not on the text file.  This limits the
damage, and seems to work well enough for me.  If tests are already
being parsed and reserialized as both HTML and XHTML, then it should
be possible to do this kind of DOM manipulation in the middle too.

For scripts, I think regex is a nonstarter.  You don't know without
context whether "transform" needs to be changed to "-moz-transform" or
"MozTransform", for instance.  I think the script needs to call
functions itself to do prefixing, like
<http://hg.csswg.org/test/file/b047c7e7c66b/contributors/aryehgregor/incoming/transforms.js#l86>.
 These can be added to testharness.js to make things easier.  Any
final test version can have these function calls removed, or the
function redefined as the identity.

Received on Thursday, 1 March 2012 20:14:05 UTC