Closed Bug 1013054 Opened 10 years ago Closed 9 years ago

Incorrect invalidation with CSS transform and iframe


(Core :: Layout, defect)

Not set





(Reporter: billm, Assigned: roc)





(1 file)

If you visit the URL given here, then an iframe with some text will appear. If you click in the iframe, the text should scroll by a fixed amount. More clicking should cause more scrolling. The scrolling is done through CSS "transform: translateY(100px)", and the style is modified by a JS event handler.

What happens to me with basic layers, as well as the basic compositor, is that the scrolling sometimes is delayed. Often, I'll click and nothing will happen. But then if I move the cursor out of the content area, the scrolling will happen. I suspect this may be an invalidation bug. Interestingly, if I have the web console open, the scrolling always happens right away. Maybe because we invalidate the whole screen when updating the console?

I hope this isn't just a bug in my HTML. However, it works fine in Chrome, and Firefox's behavior is really strange, so I figure I should file.
Here's what happens:
1) Transform change triggers a style change with nsChangeHint_UpdateTransformLayer for the <body> element
2) ApplyRenderingChangeToTree maps the change hint to the nsCanvasFrame because "If the frame's background is propagated to an ancestor, walk up to that ancestor."
3) In DoApplyRenderingChangeToTree the change hint is ignored because the nsCanvasFrame is not transformed.

Step 2 is incorrect here, at least for transform hints.
Attached patch fixSplinter Review
Assignee: nobody → roc
Attachment #8454406 - Flags: review?(matt.woodrow)
Attachment #8454406 - Flags: review?(matt.woodrow) → review+
sorry had to backout this change for reftest failures on windows like
Latest try push shows a one-pixel error on Windows XP only. I cannot reproduce this locally (with Direct2D/D3D disabled on Windows 7). I'll fuzz it.
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
You need to log in before you can comment on or make changes to this bug.