[Bug 16016] Place some constraints on when computed values must be deemed to change

https://www.w3.org/Bugs/Public/show_bug.cgi?id=16016

--- Comment #3 from Aryeh Gregor <ayg@aryeh.name> 2012-02-20 20:03:06 UTC ---
Here's a test-case where browsers aren't compatible:

data:text/html,<!doctype html>
<p style="transition: 4s -1s"></p>
<script>
var p = document.querySelector("p");
setTimeout(function() {
p.style.marginLeft = "100px";
p.textContent = getComputedStyle(p).marginLeft
}, 100);
</script>

In IE10 Developer Preview, Chrome 18 dev, and Opera Next 12.00 alpha, this
outputs "0px" and animates nicely.  (You have to change marginLeft to
textIndent in both places for it to work in Opera.)  In Firefox 13.0a1, it
outputs "40.85px".  So Firefox is considering the transition to start right
away, and others start it a little later.  If I do

data:text/html,<!doctype html>
<p style="transition: 4s -1s"></p>
<script>
var p = document.querySelector("p");
setTimeout(function() {
p.style.marginLeft = "100px";
}, 0);
setTimeout(function() {
p.textContent = getComputedStyle(p).marginLeft
}, 2);
</script>

then in Chrome it outputs "40px", but if I change the second timeout from 2 to
1 it's "0px" again.  In IE, the second timeout has to be around 50 for it to
display a nonzero value consistently, but it will sometimes be nonzero as low
as 10.  In Opera the cutoff is around 40.

Is this something we can realistically specify, or do we have to leave it
undefined?  Gecko's behavior makes the most sense to me.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 20 February 2012 20:03:09 UTC