The default bug view has changed. See this FAQ.

transition-duration and animation-duration should reject negative values at parse time

RESOLVED FIXED in mozilla16

Status

()

Core
CSS Parsing and Computation
P3
normal
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

({dev-doc-complete})

Trunk
mozilla16
dev-doc-complete
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Assignee)

Description

5 years ago
Per resolution in the CSS working group's teleconference today, animation-duration and transition-duration should reject negative values at parse time.
http://lists.w3.org/Archives/Public/www-style/2012Jul/0265.html
(Assignee)

Updated

5 years ago
Assignee: nobody → dbaron
Status: NEW → ASSIGNED
(Assignee)

Comment 1

5 years ago
Created attachment 641274 [details] [diff] [review]
Require animation-duration and transtion-duration to be nonnegative at parse time.  (, patch 3)
Attachment #641274 - Flags: review?(bzbarsky)
(Assignee)

Comment 2

5 years ago
Created attachment 641275 [details] [diff] [review]
Rename VARIANT_POSITIVE_LENGTH to VARIANT_NONNEGATIVE_DIMENSION since (a) it also applies to times and frequencies and (b) it allows 0.  (patch 1)
Attachment #641275 - Flags: review?(bzbarsky)
(Assignee)

Updated

5 years ago
Attachment #641275 - Attachment description: Rename VARIANT_POSITIVE_LENGTH to VARIANT_NONNEGATIVE_DIMENSION since (a) it also applies to times and frequencies and (b) it allows 0. → Rename VARIANT_POSITIVE_LENGTH to VARIANT_NONNEGATIVE_DIMENSION since (a) it also applies to times and frequencies and (b) it allows 0. (patch 1)
Comment on attachment 641275 [details] [diff] [review]
Rename VARIANT_POSITIVE_LENGTH to VARIANT_NONNEGATIVE_DIMENSION since (a) it also applies to times and frequencies and (b) it allows 0.  (patch 1)

The parser code ungets and returns false if "tk->mNumber <= 0.0".  So as far as I can tell, it really is requiring a positive value....

And in fact, the spec for "perspective" claims that lengths "must be positive".  Or is the spec and the parser code wrong?
Attachment #641275 - Flags: review?(bzbarsky) → review-
Comment on attachment 641274 [details] [diff] [review]
Require animation-duration and transtion-duration to be nonnegative at parse time.  (, patch 3)

This seems fine, assuming the first patch is fine...
Attachment #641274 - Flags: review?(bzbarsky) → review+
(Assignee)

Updated

5 years ago
Attachment #641274 - Attachment description: Require animation-duration and transtion-duration to be nonnegative at parse time. (, patch 2) → Require animation-duration and transtion-duration to be nonnegative at parse time. (, patch 3)
(Assignee)

Comment 5

5 years ago
Created attachment 641988 [details] [diff] [review]
Rename VARIANT_POSITIVE_LENGTH to VARIANT_POSITIVE_DIMENSION since it also applies to times and frequencies.  (, patch 1)
Attachment #641988 - Flags: review?(bzbarsky)
(Assignee)

Comment 6

5 years ago
Created attachment 641989 [details] [diff] [review]
Add VARIANT_NONNEGATIVE_DIMENSION.  (, patch 2)
Attachment #641989 - Flags: review?(bzbarsky)
Comment on attachment 641988 [details] [diff] [review]
Rename VARIANT_POSITIVE_LENGTH to VARIANT_POSITIVE_DIMENSION since it also applies to times and frequencies.  (, patch 1)

r=me
Attachment #641988 - Flags: review?(bzbarsky) → review+
Comment on attachment 641989 [details] [diff] [review]
Add VARIANT_NONNEGATIVE_DIMENSION.  (, patch 2)

r=me
Attachment #641989 - Flags: review?(bzbarsky) → review+
(Assignee)

Comment 9

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/4e1480ab5116
https://hg.mozilla.org/integration/mozilla-inbound/rev/576f7d52de4b
https://hg.mozilla.org/integration/mozilla-inbound/rev/2a030d4733a0
Flags: in-testsuite+
Keywords: dev-doc-needed
Priority: -- → P3
Target Milestone: --- → mozilla16
Backed out because of test failure: https://hg.mozilla.org/integration/mozilla-inbound/rev/16b2a1339ec0

Sample failure log: https://tbpl.mozilla.org/php/getParsedLog.php?id=13509570&tree=Mozilla-Inbound&full=1
(Assignee)

Comment 11

5 years ago
https://hg.mozilla.org/integration/mozilla-inbound/rev/9d29e87c3b64
https://hg.mozilla.org/integration/mozilla-inbound/rev/6f2ab38fd992
https://hg.mozilla.org/integration/mozilla-inbound/rev/1e6065596ace
(Assignee)

Comment 12

5 years ago
The difference from the last landing is:

https://hg.mozilla.org/integration/mozilla-inbound/diff/1e6065596ace/layout/style/test/test_transitions_computed_value_combinations.html
https://hg.mozilla.org/mozilla-central/rev/9d29e87c3b64
https://hg.mozilla.org/mozilla-central/rev/6f2ab38fd992
https://hg.mozilla.org/mozilla-central/rev/1e6065596ace
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
I've added a sentence in:
https://developer-new.mozilla.org/en-US/docs/CSS/transition-duration
https://developer-new.mozilla.org/en-US/docs/CSS/animation-duration
(Negative values are invalid)

and added the info in 
https://developer-new.mozilla.org/en-US/docs/Firefox_16_for_developers
Keywords: dev-doc-needed → dev-doc-complete
You need to log in before you can comment on or make changes to this bug.