Closed Bug 940073 Opened 11 years ago Closed 11 years ago

Do off-main-thread animations when a position change does not result in an actual change to the dimensions of a frame (top/left/right/bottom changes)

Categories

(Core :: Layout, defect, P3)

defect

Tracking

()

RESOLVED WONTFIX

People

(Reporter: sicking, Unassigned)

References

Details

(Keywords: perf)

This is a followup of bug 745485. Right now a lot of developers animate various transform properties rather than top/left/right/bottom since that's the only way to get smooth off-main-thread animations.

It would be great to do off-main-thread animations in cases when we know that a frame won't change dimensions throughout it's animation. Or even better would be to do off-main-thread animations until we get into a situation when the dimensions need to change.
This is difficult to do. One reason is that an abs-pos element that's not a stacking context might, during its animation, have to have its content split into more than one layer.
Doesn't that also apply to transformed elements? Or are they always stacking contexts?

Either way, would it be easier to do it for the common case when all of the content in the abs-pos frame has the same z-index?
(In reply to Jonas Sicking (:sicking) Please ni? if you want feedback from comment #2)
> Doesn't that also apply to transformed elements? Or are they always stacking
> contexts?

They are always stacking contexts.

> Either way, would it be easier to do it for the common case when all of the
> content in the abs-pos frame has the same z-index?

That's not trivial to prove.

Transforms generally solve this problem in a way that's simple and works cross-browser. Is there a reason to use abs-pos instead?
Maybe not. I was under the impression that people animated .top/.left a lot, but maybe that's more commonly done in legacy content that uses JS and that was written before we had animations or transforms. And that most content that uses animations uses transforms.

If so, feel free to WONTFIX this.
Basically, if you're using CSS transitions or animations you probably want to use CSS transforms and you get OMTA that way across browsers. If you're animating top/left you're probably using JS and can't get OMTA anyway.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.