Open Bug 1424506 Opened 7 years ago Updated 6 months ago

CSS3D translate3d transition is not smooth in Firefox Quantum

Categories

(Core :: Graphics: WebRender, defect, P2)

58 Branch
Unspecified
All
defect

Tracking

()

ASSIGNED
Tracking Status
firefox-esr52 --- wontfix
firefox-esr60 --- wontfix
firefox57 --- wontfix
firefox58 + wontfix
firefox59 --- wontfix
firefox60 --- wontfix
firefox61 --- wontfix
firefox62 --- wontfix

People

(Reporter: henrik.ingo, Assigned: hiro, NeedInfo)

References

(Blocks 1 open bug)

Details

(Keywords: regression)

Attachments

(3 files, 1 obsolete file)

Attached file css3d.html (obsolete) —
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0 Build ID: 20171115220812 Steps to reproduce: Open attached css3d.html in Firefox Quantum. Click on the "left" and "right" buttons to animate transitions between boxes "ONE" and "TWO". Exact version: Mozilla/5.0 (X11; Linux x86_64; rv:58.0) Gecko/20100101 Firefox/58.0 Actual results: The transition to center the other box in the center of the screen, using CSS3D translate3d and transition, is not smooth. Expected results: In previous versions of Firefox, and also Chrome, the transition between the two boxes is smooth.
The attached repro of this issue is a simplification of what impress.js presentations do. See for example http://impress.github.io/impress.js/
[Tracking Requested - why for this release]: I can reproduce the problem on 58.0b11 x64 windows10. And sometimes,there are no transition animation... Regression window: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=401840a241b9861cac205bd866ba24e69d11b7e2&tochange=fa94f7205173d34f23975c6af9cb95237b28c8b8 Regressed by:fa94f7205173 Hiroyuki Ikezoe — Bug 1190721 - Throttle animations that produce any transform change hint if the target element is out-of-view. r=birtles @:hiro, Your patch seems to cause the regression. Can you look into this?
Blocks: 1190721
Status: UNCONFIRMED → NEW
Component: Untriaged → DOM: Animation
Ever confirmed: true
Flags: needinfo?(hikezoe)
Keywords: regression
OS: Unspecified → All
Product: Firefox → Core
Has Regression Range: --- → yes
Has STR: --- → yes
Thank you Alice, I will take a look.
Assignee: nobody → hikezoe
Flags: needinfo?(hikezoe)
Priority: -- → P2
Attached file A reduced test case
With 'transform-style:preserve-3d', GetVisualOverflowRectRelativeToSelf() returns {0, 0, 0, 0} for the animating frame. I don't know the reason yet.
Attachment #8936050 - Attachment is obsolete: true
New regression in 58 with a testcase, tracking.
Actually this bug was introduced by bug 1166500. As for transform animation we started the optimization for offscreen animation in bug 1190721 though.
(In reply to Hiroyuki Ikezoe (:hiro) from comment #4) > Created attachment 8936453 [details] > A reduced test case > > With 'transform-style:preserve-3d', GetVisualOverflowRectRelativeToSelf() > returns {0, 0, 0, 0} for the animating frame. I don't know the reason yet. So IIUC bug 1274962, it's not a good idea to use over flow area for checking whether the frame is scrolled out or not if the frame is a preserve-3d leaf. I think we should not optimize the preserve-3d case. https://treeherder.mozilla.org/#/jobs?repo=try&revision=a71076d3d7aad515cc7092129d16dc2efeb071e4
Status: NEW → ASSIGNED
Attachment #8938785 - Flags: review?(matt.woodrow)
Attachment #8938785 - Flags: review?(bbirtles)
Comment on attachment 8938785 [details] Bug 1424506 - Don't throttle preserve-3d frame even if the frame is scrolled out. https://reviewboard.mozilla.org/r/209318/#review215588 It looks like IsScrolledOutOfView() is using nsIFrame::GetVisualOverflowRectRelativeToSelf(), which should be valid for true leaves (nsIFrame::IsPreserve3DLeaf()), but isn't valid for the root preserve-3d frame. GetVisualOverflowRectRelativeToSelf() should be correct if !Extend3DContext(), and GetVisualOverflowRect() should be valid if !Combines3DTransformWithAncestors(). So the root frame has a valid post-transform overflow, leaves have valid pre-transform overflows and intermediate frames have neither. Given that, I think we want to check !frame->Extend3DContext() here. We could also probably do slightly better if you think the performance of not throttling these animations is likely to be a problem. * We could optionally use nsIFrame::GetVisualOverflowRect() if the animated frame is the root of the preserve-3d context (and use the parent frame's coordinate space), so that we can get a result for these frames. * When we compute all the overflow rects for a preserve-3d scene, we should know the overflow rect for an intermediate frame (in the post-transform coordinate space of the preserve-3d root). We could store those as a frame property (maybe only if there's an animation?) so that we can use it during IsScrolledOutOfView(). Sorry, the coordinate spaces and overflow rects for preserve-3d are really complicated. Please let me know if you want me to try expain the current state in more detail.
Comment on attachment 8938785 [details] Bug 1424506 - Don't throttle preserve-3d frame even if the frame is scrolled out. https://reviewboard.mozilla.org/r/209318/#review215594 r=me for the test case. I'll leave the code changes to Matt to review.
Attachment #8938785 - Flags: review?(bbirtles) → review+
Wow! Thanks for the detailed explanations! (In reply to Matt Woodrow (:mattwoodrow) from comment #10) > Comment on attachment 8938785 [details] > Bug 1424506 - Don't throttle preserve-3d frame even if the frame is scrolled > out. > > https://reviewboard.mozilla.org/r/209318/#review215588 > > It looks like IsScrolledOutOfView() is using > nsIFrame::GetVisualOverflowRectRelativeToSelf(), which should be valid for > true leaves (nsIFrame::IsPreserve3DLeaf()), but isn't valid for the root > preserve-3d frame. > > GetVisualOverflowRectRelativeToSelf() should be correct if > !Extend3DContext(), and GetVisualOverflowRect() should be valid if > !Combines3DTransformWithAncestors(). So the root frame has a valid > post-transform overflow, leaves have valid pre-transform overflows and > intermediate frames have neither. > > Given that, I think we want to check !frame->Extend3DContext() here. > > We could also probably do slightly better if you think the performance of > not throttling these animations is likely to be a problem. > > * We could optionally use nsIFrame::GetVisualOverflowRect() if the animated > frame is the root of the preserve-3d context (and use the parent frame's > coordinate space), so that we can get a result for these frames. > > * When we compute all the overflow rects for a preserve-3d scene, we should > know the overflow rect for an intermediate frame (in the post-transform > coordinate space of the preserve-3d root). We could store those as a frame > property (maybe only if there's an animation?) so that we can use it during > IsScrolledOutOfView(). I don't yet understand this second part, but it seem to me that the second part requires some extent code changes. I will only try the first star change in this bug (because I'd like to uplift this to beta) and fix the second part in a later bug. And if it couldn't happen I will use '!frame->Extend3DContext()' there. Anyway thanks for you kindness, I will ping you on IRC if I can't understand the second part.
Any updates?
Flags: needinfo?(hikezoe)
Matt, is this still waiting on a review from you?
(In reply to Ryan VanderMeulen [:RyanVM] from comment #14) > Matt, is this still waiting on a review from you? I think I'm waiting on an updated patch to address my comments in Comment 10.
Flags: needinfo?(matt.woodrow)
Attachment #8938785 - Flags: review?(matt.woodrow)

I can confirm this is still an issue. Its really disappointing that in order to give presentations I have to use a non-free browser (Chrome).

Is there anything I can do to provide more information to help get this solved?

Severity: normal → S3

Can you still reproduce this issue in the latest Firefox Nightly?

Flags: needinfo?(mozilla)

Redirect a needinfo that is pending on an inactive user to the triage owner.
:boris, since the bug has recent activity, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(mozilla) → needinfo?(boris.chiou)

The performance is still not good, per my test in Nightly today.

Flags: needinfo?(boris.chiou)

The component should be moved to Graphics: WebRender.

Flags: needinfo?(boris.chiou)

Per comment 20, move this to webrender

Component: DOM: Animation → Graphics: WebRender
Flags: needinfo?(boris.chiou)
See Also: → 1839121
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: