Closed Bug 1866939 Opened 2 years ago Closed 2 years ago

ZoomToFocusInput doesn't work in some cases in OOP iframes

Categories

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

defect

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

Details

Attachments

(2 files)

data:text/html,<iframe src="https://hiikezoe.github.io/input.html" style="margin-top:2000px">
data:text/html,<iframe src="https://hiikezoe.github.io/input.html?margin-top=2000px">

In above cases ZoomToFocusInput doesn't work properly. I suppose it's due to the lack of the top level document layout scroll offset translation as Botond pointed out.

With the scroll offset, this targetRect can be same as non Fission case, but still there's something wrong. Zooming-in doesn't happen at all.

Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED
Attachment #9370187 - Attachment description: Bug 1866939 - Use nsIFrame::GetBoundingClientRect for OOP iframe in nsDOMWindowUtils::ZoomToFocusedInput(). r?botond → Bug 1866939 - Offset the in-process root frame scroll position layout in nsDOMWindowUtils::ZoomToFocusedInput(). r?botond
Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6fb1b891307b Apply the root APZC's scroll offset in GetOopifToRootContentTransform(). r=botond https://hg.mozilla.org/integration/autoland/rev/b0542bbe1fe7 Offset the in-process root frame scroll position layout in nsDOMWindowUtils::ZoomToFocusedInput(). r=botond
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
Regressions: 1875019
Status: RESOLVED → REOPENED
Flags: needinfo?(hikezoe.birchill)
Resolution: FIXED → ---
Target Milestone: 123 Branch → ---

There were two different causes of the test failure.

  1. bug 1875211
  2. I forgot setting layout.scroll.disable-pixel-alignment

I am not sure about 2 though, it may not be related. The main cause is 1 anyway.

Flags: needinfo?(hikezoe.birchill)
Pushed by hikezoe.birchill@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/f47aba128d29 Apply the root APZC's scroll offset in GetOopifToRootContentTransform(). r=botond https://hg.mozilla.org/integration/autoland/rev/2775f61c6182 Offset the in-process root frame scroll position layout in nsDOMWindowUtils::ZoomToFocusedInput(). r=botond
Status: REOPENED → RESOLVED
Closed: 2 years ago2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: