Closed Bug 622461 Opened 13 years ago Closed 13 years ago

CSS3 transition delay ignored when transition duration is 0

Categories

(Core :: CSS Parsing and Computation, defect, P2)

defect

Tracking

()

RESOLVED FIXED
mozilla2.0b9
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: djgredler, Assigned: dbaron)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Windows NT 5.1; rv:2.0b8) Gecko/20100101 Firefox/4.0b8
Build Identifier: Mozilla/5.0 (Windows NT 5.1; rv:2.0b8) Gecko/20100101 Firefox/4.0b8

It's valid to specify that a certain property doesn't animate (transition duration = 0) but does wait to take effect (transition delay > 0). Chrome handles this fine; the workaround right now in Firefox is to set the transition duration to a very small number (e.g. 0.01s). See the attached test page for an example. This is somewhat related to bug 533352, except that this bug is about animatable properties, and bug 533352 is about non-animatable properties.

Reproducible: Always

Steps to Reproduce:
Load the attached file.
Actual Results:  
The background color of the test div immediately changes to red, and its height grows for 1 second.

Expected Results:  
The test div's height grows for 1 second, and after it has finished growing then the background color changes to red.
Attached file testcase
Attaching testcase.
Confirmed with Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b9pre) Gecko/20110102 Firefox/4.0b9pre ID:20110102030355
Component: General → Style System (CSS)
OS: Windows XP → All
Product: Firefox → Core
QA Contact: general → style-system
Hardware: x86 → All
Version: unspecified → Trunk
Status: UNCONFIRMED → NEW
Ever confirmed: true
I think this used to work, and I just got a small piece of code in ElementPropertyTransition::ValuePortionFor backwards when refactoring it.  Patch coming in a bit, once I test it.
blocking2.0: --- → betaN+
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
Priority: -- → P2
Attached patch patchSplinter Review
I confirmed that a bunch of the new tests fail without the patch, but they all pass with the patch.
Attachment #500825 - Flags: review?(bzbarsky)
Whiteboard: [needs review]
Comment on attachment 500825 [details] [diff] [review]
patch

r=me
Attachment #500825 - Flags: review?(bzbarsky) → review+
Whiteboard: [needs review] → [needs landing]
http://hg.mozilla.org/mozilla-central/rev/66096f867849
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
Target Milestone: --- → mozilla2.0b9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: