Closed Bug 1712400 Opened 7 months ago Closed 5 months ago

Ensure drag previews are correctly positioned/sized when dragging content inside an OOP iframe with the parent document pinch-zoomed in

Categories

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

defect

Tracking

()

RESOLVED FIXED
91 Branch
Fission Milestone M8
Tracking Status
firefox91 --- fixed

People

(Reporter: botond, Assigned: botond)

References

Details

Attachments

(1 file)

An audit of APIs related to crossing document boundaries in bug 1699846 revealed two places related to drag previews which may need adjustment for Fission. They are the calls to nsPresContext::GetParentPresContext() in:

  1. CreateRangePaintInfo
  2. ConvertToScreenRelativeVisual
Summary: Ensure drag previews are correctly positioned/sizedwhen dragging content inside an OOP iframe with the parent document pinch-zoomed in → Ensure drag previews are correctly positioned/sized when dragging content inside an OOP iframe with the parent document pinch-zoomed in

To help inform the choice of target Fission milestone, the failure mode here is:

  • The page has to be pinch-zoomed in (via pinch or double-tap)
  • The page needs to contain an OOP iframe
  • You need to be dragging content inside the OOP iframe
  • The potential failure mode is that the "drag preview" (the slightly transparent copy of the content being dragged that follows your cursor as you drag) may not be the right scale (i.e. may not account for the zoom level of the page), and may be offset from the cursor.
Fission Milestone: --- → ?

Tracking for Fission M8 so we confirm whether this is a problem and fix before we run our Fission experiment in the Release channel.

Severity: -- → S3
Fission Milestone: ? → M8
Priority: -- → P2

Provisionally assigning to myself.

Assignee: nobody → botond

I've confirmed that there is indeed a bug here: the drag preview image is both unscaled (i.e. rendered at the original scale, ignoring the desktop zoom level), and offset from the location of the cursor.

It seems like a pretty low-impact bug to me (since 1. the drag preview image is more like a visual affordance to give you feedback for the drag than an important part of the page rendering, and 2. the scenario that's affected is an edge case in that you have to be desktop-zoomed in and dragging a selection in that state), so I'm not sure if this needs to block the release experiment, but we can try to fix it.

I have a fix for this that seems to be working well locally, though it's a bit hacky and may not be correct for some edge cases that also involve CSS transforms (though, notably, drag previews already don't seem to account for CSS transforms, so that's probably fine). Will clean it up a bit and post for review.

Pushed by bballo@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/65ecc7f9c8ee
Account for the resolution in the enclosing document when positioning and sizing the drag preview image when dragging content in a nested content process. r=hiro
Status: NEW → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
You need to log in before you can comment on or make changes to this bug.