Closed Bug 1133375 Opened 5 years ago Closed 5 years ago

Transitions are not cancelled when the combined duration is <= 0s

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla38
Tracking Status
firefox38 --- fixed

People

(Reporter: birtles, Assigned: dbaron)

Details

Attachments

(2 files)

Attached file cancel.html
As described in bug 960465 comment 39, we don't appear to be following step 3.2 of the algorithm for starting transitions:

> Otherwise, if the combined duration is less than or equal to 0s,
> then implementations must cancel the running transition. 
> http://dev.w3.org/csswg/css-transitions/#starting

See attached test case.
Summary: Transitions are not cancelled when the combined duration is 0s → Transitions are not cancelled when the combined duration is <= 0s
We should also check that the code for starting transitions is correct.
The two count mochitests fail without the patch (the value tests pass,
though they exist partly just to flush); all tests pass with the patch.
Attachment #8566200 - Flags: review?(bbirtles)
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
Comment on attachment 8566200 [details] [diff] [review]
Condition starting (or cancelling) CSS transitions on the combined duration, rather than delay and duration both being exactly 0

Review of attachment 8566200 [details] [diff] [review]:
-----------------------------------------------------------------

r=birtles with that comment corrected.

::: layout/style/test/test_transitions_dynamic_changes.html
@@ +67,5 @@
> +utils.advanceTimeAndRefresh(10);
> +is(endCount, 0, "should not have started transition when combined duration less than or equal to 0");
> +p.style.transitionDelay = "-2s";
> +p.style.textIndent = "0";
> +is(cs.textIndent, "0px", "value should now be 100px");

I think the assertion text here is incorrect.
Attachment #8566200 - Flags: review?(bbirtles) → review+
https://hg.mozilla.org/mozilla-central/rev/c7b08a1d83f0
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.