Closed Bug 1561858 Opened 7 months ago Closed 7 months ago

Mouse coordinates are wrong for scaled out-of-process iframes without WebRender

Categories

(Core :: Panning and Zooming, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla69
Fission Milestone M4
Tracking Status
firefox69 --- verified
firefox70 --- verified

People

(Reporter: hsivonen, Assigned: mattwoodrow)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Steps to reproduce

  1. Set fission.autostart to true.
  2. Set gfx.webrender.force-disabled to true.
  3. Restart Firefox.
  4. Navigate to https://hsivonen.fi/fission-host.html
  5. Click the button in the second frame.
  6. Keep clicking as you move the mouse to the left over the text field.

Actual results

The first click doesn't go to the button. However, once your mouse has moved left to the position where the button would be if the frame hadn't been stretched, the click goes to the button.

Expected results

Correct targeting as with WebRender enabled.

Fission Milestone: --- → ?

This is a regression from bug 1558482 I think, removing the scale factors fixes it.

Passing a scale factor down should only affect Layers within the remote iframe. I'd expect that the root Layer has the inverse scaling of the css transform in the outer document, and then the actual leaf Layers to have the CSS transform's scaling.

I haven't yet got my head around the fission hit testing code, but are we including the root remote Layer in the transform-to-window matrix we compute? That would be wrong I think since it'd include the downscale (and cancel out the css transform scale), and actual hit testing for clicking wouldn't apply the up-scale later.

I think the transform we want is from outside the root remote layer (the RefLayer created by the outer document) up to the root of the Layer tree.

Assignee: nobody → matt.woodrow
Attachment #9074734 - Attachment description: Bug 1561858 - Use only transforms outside of the subtree when computing the subtree transform to root. r?hsivonen → Bug 1561858 - Use only transforms outside of the subtree when computing the subtree transform to root. r?kats
Pushed by mwoodrow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/da65877c0fec
Use only transforms outside of the subtree when computing the subtree transform to root. r=kats
Status: NEW → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla69

I have managed to reproduce this issue using Firefox 69.0a1 (BuildId:20190627214735) on Windows 10 64bit.

This issue is verified fixed using Firefox 70.0a1 (BuildId:20190714214027) on Windows 10 64bit, macOS 10.13.6 and Ubuntu 18.04 64bit

Status: RESOLVED → VERIFIED
Fission Milestone: ? → M4
You need to log in before you can comment on or make changes to this bug.