Closed Bug 1135764 Opened 10 years ago Closed 10 years ago

CSS transitions not working Firefox for XML document transformed to HTML with XSLT

Categories

(Core :: CSS Parsing and Computation, defect)

35 Branch
x86_64
All
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox36 --- affected
firefox37 + fixed
firefox38 + fixed
firefox39 + fixed
firefox-esr31 --- unaffected

People

(Reporter: kim.betti, Assigned: bzbarsky)

References

Details

(Keywords: regression)

Attachments

(5 files)

Attached file xsl-css-bug.zip
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.111 Safari/537.36 Steps to reproduce: Tried to use css transitions in a html document transformed from xml using xslt. 1. Open the attached 'data.xml' and hover the box with your mouse 2. Notice that the box rotates without any animation being applied 3. Open 'data.html' (html document copied from the transformed xml document) 4. Hover the box and notice that the box rotates evenly as expected. http://stackoverflow.com/questions/28676926/css-transitions-not-working-firefox-for-xml-document-transformed-to-html-with-xs Actual results: It did not work, but copying out the generated html from Firefox developer tools and pasting it into a plain .html document did. Expected results: I expected css transitions to work in html transformed from xml.
Version: 39 Branch → 35 Branch
Attachment #8568458 - Attachment mime type: text/plain → application/xml
I can confirm the problem with Firefox 35 on Windows 8.1
Status: UNCONFIRMED → NEW
Component: Untriaged → CSS Parsing and Computation
Ever confirmed: true
OS: Linux → All
Product: Firefox → Core
I have now tried to reproduce the problem with a nightly 39.0a1, there it is even worse, the div is not rotated at all when I hover over the red div block in the document generated by XSLT (test case https://bug1135764.bugzilla.mozilla.org/attachment.cgi?id=8568458). The static HTML test case continues to work fine.
It's worth figuring out the regression range for when the :hover style stopped applying. Chances are, it's the same issue..
I'm afraid I'm on PTO then travelling so I might not be able to look into this for another two weeks.
via local build Last good: 003c367a510f First bad: d99b6fd9ca56 triggered by: d99b6fd9ca56 Brian Birtles — Bug 1112480 part 6 - Make PendingPlayerTracker call StartOnNextTick; r=jwatt
jwatt, is there someone else who can work on this while Brian is out of town? And, should we (or can we) back this out for 37 while trying to fix it for 38 and 39?
Flags: needinfo?(jwatt)
Keywords: regression
Martin, if you tested this in Firefox 35, and it was broken there, I wonder if it's also broken in 36. Would you mind trying that out? Or, did you really mean to say it's broken in 35? Thanks for the help and the test cases!
Flags: needinfo?(martin.honnen)
I'll try to have a look sometime next week. jwatt, I can see we're successfully creating the AnimationPlayer but it remains pending. So perhaps we're registering the pending animation against the wrong document, or perhaps nsTransitionManager is not registered against the refresh driver for the right document--in any case, we're not getting to the point where we kick start the animation.
(In reply to Liz Henry :lizzard from comment #11) > Martin, if you tested this in Firefox 35, and it was broken there, I wonder > if it's also broken in 36. Would you mind trying that out? Or, did you > really mean to say it's broken in 35? Thanks for the help and the test > cases! I have now upgraded to Firefox 36 and see the same problem with the test case https://bug1135764.bugzilla.mozilla.org/attachment.cgi?id=8568458 as in Firefox 35, when I hover over the red box it is rotated, but the rotation is not animated, there is no transition happening.
Flags: needinfo?(martin.honnen)
(In reply to Martin Honnen from comment #13) > (In reply to Liz Henry :lizzard from comment #11) > > Martin, if you tested this in Firefox 35, and it was broken there, I wonder > > if it's also broken in 36. Would you mind trying that out? Or, did you > > really mean to say it's broken in 35? Thanks for the help and the test > > cases! > > I have now upgraded to Firefox 36 and see the same problem with the test > case https://bug1135764.bugzilla.mozilla.org/attachment.cgi?id=8568458 as in > Firefox 35, when I hover over the red box it is rotated, but the rotation is > not animated, there is no transition happening. Regression window about the animation https://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=810b3536cb50&tochange=0f4b90123dba Regressed by: Bug 1002332
Blocks: 1002332
After reading the comments above properly, I think the issue is basically that in this case we're applying the styles to a resource document. I suspect resource documents probably won't have a navigationStart time hence document.timeline.currentTime will always return 0 (as of bug 1002332). As a result there will be no animation. I'm not sure exactly why we would complete the transition before bug 1112480 landed, but in any case, if we fix the lack of animation, that should be enough. I don't think we need to back anything out here since this bug has been around for a long time and no-one has noticed until now (and we'd have to back out a *lot*). Ideally we need to get the timeline from the presentation document and use its timeline in this case. We already have AnimationPlayer::GetRenderedDocument but I've yet to check if that's the correct document for this. We should also write a test for this to ensure browsers behave consistently here.
> I think the issue is basically that in this case we're applying the styles to a resource > document No, the styles apply to the post-transform document, which is not a resource document. > I suspect resource documents probably won't have a navigationStart time This document has a navigationStart time. You can see it by just loading it and doing performance.timing.navigationStart in the console. > hence document.timeline.currentTime will always return 0 Ah, here we go. So the _window_ has the right performance.timing. But calling mDocument->GetNavigationTiming() in AnimationTimeline::ToTimelineTime returns null. This we do have. document.timeline.currenTime is returning null for me in a slightly-old nightly.
This makes the transition happen for me. The test tests document.timeline, but if someone wants to add a test for transition stuff directly, so much the better.
Attachment #8571355 - Flags: review?(bugs)
Assignee: nobody → bzbarsky
Status: NEW → ASSIGNED
Attachment #8571355 - Flags: review?(bugs) → review+
Flags: needinfo?(jwatt)
Flags: needinfo?(bbirtles)
Comment on attachment 8571355 [details] [diff] [review] Make sure XSLT transform results have a document timeline so things like transitions will work Approval Request Comment [Feature/regressing bug #]: Bug 1112480 [User impact if declined]: Transitions on web pages produced via XSLT transformations are broken. [Describe test coverage new/current, TreeHerder]: Test coverage is a bit spotty, though this patch adds some tests. [Risks and why]: I think this is very low risk. [String/UUID change made/needed]: None.
Attachment #8571355 - Flags: approval-mozilla-beta?
Attachment #8571355 - Flags: approval-mozilla-aurora?
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
(In reply to Not doing reviews right now from comment #19) > [Feature/regressing bug #]: Bug 1112480 Bug 1112480 landed in 37. 36 is marked as affected. Is that correct?
Flags: needinfo?(bzbarsky)
Comment on attachment 8571355 [details] [diff] [review] Make sure XSLT transform results have a document timeline so things like transitions will work Given that bz thinks this is very low risk and this has already landed on m-c, let's get this fix into Beta 3. Beta+ Aurora+
Attachment #8571355 - Flags: approval-mozilla-beta?
Attachment #8571355 - Flags: approval-mozilla-beta+
Attachment #8571355 - Flags: approval-mozilla-aurora?
Attachment #8571355 - Flags: approval-mozilla-aurora+
> Is that correct? Yes. In 36, the new transform does take effect, but there is no transition. That's what this bug report was about originally. In 37, the new transform doesn't take effect at all. That was caused by bug 1112480. The patch fixes both problems, as it happens, but for approval purposes for beta the relevant thing is the regression from bug 1112480, imo.
Flags: needinfo?(bzbarsky)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: