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)

defect

Tracking

()

RESOLVED FIXED
mozilla1.9.3a1

People

(Reporter: dbaron, Assigned: dbaron)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Attached patch patch (deleted) — Splinter Review
No description provided.
Attachment #408714 - Flags: review?(dholbert)
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.
Attachment #408714 - Flags: review?(dholbert) → review+
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Priority: -- → P2
Resolution: --- → FIXED
Target Milestone: --- → mozilla1.9.3a1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: