Closed
Bug 524808
Opened 15 years ago
Closed 15 years ago
add support for animation of integer-valued properties (i.e., z-index)
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Core
CSS Parsing and Computation
Tracking
()
RESOLVED
FIXED
mozilla1.9.3a1
People
(Reporter: dbaron, Assigned: dbaron)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
patch
|
dholbert
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Attachment #408714 -
Flags: review?(dholbert)
Comment 1•15 years ago
|
||
Comment on attachment 408714 [details] [diff] [review]
patch
>@@ -125,16 +125,22 @@ nsStyleAnimation::ComputeDistance(const
>+ aDistance = PR_ABS(startInt - endInt);
Nit: You should probably reverse the order here -- i.e. change to |endInt - startInt| -- to match the surrounding code.
>@@ -429,16 +435,23 @@ nsStyleAnimation::AddWeighted(double aCo
>+ case eUnit_Integer: {
>+ aResultValue.SetIntValue(NS_floor(
>+ aCoeff1 * double(aValue1.GetIntValue()) +
>+ aCoeff2 * double(aValue2.GetIntValue())),
>+ eUnit_Integer);
>+ break;
>+ }
Are you sure NS_floor is the behavior you want?
So in a transition from 0 to 1, we effectively won't do any interpolation at all -- we'll stay at 0 for the entire duration of the transition (until aPortion == 1, when we snap up to 1).
I guess this behavior seems reasonable -- I just want to double-check that it's what you're going for.
r=dholbert with the subtraction-order-reversal nit.
Updated•15 years ago
|
Attachment #408714 -
Flags: review?(dholbert) → review+
Assignee | ||
Comment 2•15 years ago
|
||
http://dev.w3.org/csswg/css3-transitions/#animation-of-property-types- says to use floor.
Assignee | ||
Comment 3•15 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
Assignee | ||
Updated•15 years ago
|
Blocks: css-transitions
You need to log in
before you can comment on or make changes to this bug.
Description
•