Closed Bug 1030124 Opened 6 years ago Closed 5 years ago

Canvas drawImage incorrect offset if backface-visibility is hidden

Categories

(Core :: Web Painting, defect)

30 Branch
x86_64
Windows 7
defect
Not set

Tracking

()

RESOLVED FIXED
mozilla34
Tracking Status
firefox30 --- wontfix
firefox31 + wontfix
firefox32 + wontfix
firefox33 + verified
firefox34 + fixed
firefox-esr24 --- unaffected

People

(Reporter: info, Assigned: mattwoodrow)

References

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140605174243

Steps to reproduce:

apply backface-visibility: hidden to an canvas with absolute position


http://jsfiddle.net/0ldsk3wl/vJ6Rk/6/


Actual results:

Canvas drawImage draws incorrect offset by start position



Expected results:

Canvas drawImage draws offset should be 0,0
Component: Untriaged → General
Regressed within ESR 24 and 30 by a quick check.
Attached file bug sample
Regression widnow(m-i)
Good:
https://hg.mozilla.org/integration/mozilla-inbound/rev/de17e5deb35d
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 ID:20140226185711
Bad:
https://hg.mozilla.org/integration/mozilla-inbound/rev/88723262c85c
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:30.0) Gecko/20100101 Firefox/30.0 ID:20140226185811
Pushlog:
http://hg.mozilla.org/integration/mozilla-inbound/pushloghtml?fromchange=de17e5deb35d&tochange=88723262c85c

Suspect: 
88723262c85c	Matt Woodrow — Bug 968555 - Don't create a stacking context for backface-visibility:hidden. r=dbaron
Blocks: 968555
Status: UNCONFIRMED → NEW
Component: General → Layout: View Rendering
Ever confirmed: true
Product: Firefox → Core
Attachment #8446809 - Attachment mime type: text/plain → text/html
Matt, does it ring a bell? Thanks
Flags: needinfo?(matt.woodrow)
This is now too late for 31. However, there is still some time for 32.
I'll fix this. I don't think this is super urgent, so it won't be this week.
Assignee: nobody → matt.woodrow
Flags: needinfo?(matt.woodrow)
Summary: Canvas drawImage incorrect offset if backface-visibilty is hidden → Canvas drawImage incorrect offset if backface-visibility is hidden
I'm marking this as won't fix for 32 based on comment 6. 

Matt - Can you get to this in the next two weeks before 33 hits beta? Or, if you think it's less urgent than that, perhaps we should just untrack and let this ride the trains.
Previously, all nsDisplayTransform items existed for frames that were also 'reference frames', and child display items had their coordinates relative to that. When building the transform we include a translation from the child coordinate space into that of the parent.

Since we're no longer marking backface-visibility as transformed/stacking context, then it's also no longer a reference frame. To get the correct behaviour we need to apply the translation when computing the transform for the parent, which is transformed and a reference frame.
Attachment #8474978 - Flags: review?(dbaron)
Comment on attachment 8474978 [details] [diff] [review]
Handle reference frames correctly

Actually, I think roc probably knows this code better
Attachment #8474978 - Flags: review?(dbaron) → review?(roc)
https://hg.mozilla.org/mozilla-central/rev/789d20c54b14
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Matt, as it is affecting 33, we could take a patch for this. Could you fill an uplift request? Thanks
Flags: needinfo?(matt.woodrow)
Comment on attachment 8474978 [details] [diff] [review]
Handle reference frames correctly

Approval Request Comment
[Feature/regressing bug #]: Bug 968555
[User impact if declined]: Incorrect positioning of backface-visibility:hidden elements that don't have a transform.
[Describe test coverage new/current, TBPL]: Tested manually, added reftest for this case.
[Risks and why]: Low risk, just changes the transforms on elements.
[String/UUID change made/needed]: None
Attachment #8474978 - Flags: approval-mozilla-aurora?
Flags: needinfo?(matt.woodrow)
Attachment #8474978 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
(In reply to Ryan VanderMeulen [:RyanVM UTC-4] from comment #14)
> https://hg.mozilla.org/releases/mozilla-aurora/rev/56bd99846222

This time with a version that actually builds:
https://hg.mozilla.org/releases/mozilla-aurora/rev/11e62d865e99
QA Whiteboard: [good first verify]
I was able to reproduce this bug on Nightly 30.0a1 (2014-06-25), using Windows 7 x64.

Verified fixed on Windows 7 x64 using Firefox 33.0b9 (20141002185629).

This fix can be marked as verified.

[bugday-20141008]
(In reply to vasilicamihasca from comment #16)
> I was able to reproduce this bug on Nightly 30.0a1 (2014-06-25), using
> Windows 7 x64.
> 
> Verified fixed on Windows 7 x64 using Firefox 33.0b9 (20141002185629).
> 
> This fix can be marked as verified.
> 
> [bugday-20141008]

Thank you for the verification on Beta. Setting status flag.
QA Whiteboard: [good first verify] → [good first verify][bugday-20141008]
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.