Closed Bug 1888861 Opened 6 months ago Closed 6 months ago

ZoomToFocusInput should wait for resize events in the parent process document rather than in hte content

Categories

(GeckoView :: General, defect)

All
Android
defect

Tracking

(firefox126 fixed)

RESOLVED FIXED
126 Branch
Tracking Status
firefox126 --- fixed

People

(Reporter: hiro, Assigned: hiro)

References

Details

Attachments

(2 files)

This is a follow-up bug of bug 1649440.

In the content process we wait for at least one resize event before triggering nsIDOMWindowUtils.zoomToFocusedInput, but if the focused element is inside a cross-process iframe and the iframe size is quite small, say 50x50 px, then there's no resize event happens.

This bug should block bug 1831649, though there's no significant impact on that bug since we end up calling nsIDOMWindoUtils.zoomToFocused after 500ms timed out.

Blocks: 1831649
Assignee: nobody → hikezoe.birchill
Status: NEW → ASSIGNED
Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/962a7f1eca54
Wait for resize events in the parent process document for ZoomToFocusInput. r=geckoview-reviewers,m_kato

Backed out for causing mochitests failures in test_bug861217.html.

Flags: needinfo?(hikezoe.birchill)

Odd, the test fails on my local Android emulator with/without the change. Why the test passes on our CIs?

The failure is unfortunate.

The failed test is supposed to be run on zoom level is 1. But unfortunately the test file doesn't specify any meta viewport tag, thus if it runs with "./mach mochitest dom/tests/mochitest/general/test_bug861217.html", it's rendered on < 1 zoom level, locally it was 0.8163265585899353.

Also in the same directly there are a couple of other tests triggering zoomToFocusInput, test_bug1170911.html for example, then it makes the zoom level is 1. Thus test_bug861217.html has been passing on our CIs.

Note that even with the change for this bug, I don't see the test failure locally even with "./mach mochitest dom/tests/mochitest/general/", so I'd guess the failure is very timing specific.

I am going to post a patch to make the test works with "./mach mochitest dom/tests/mochitest/general/test_bug861217.html".

Flags: needinfo?(hikezoe.birchill)
Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ac3510c60f1e
Forcibly set the zoom level to 1 in test_bug861217.html. r=m_kato
https://hg.mozilla.org/integration/autoland/rev/54761c698e87
Wait for resize events in the parent process document for ZoomToFocusInput. r=geckoview-reviewers,m_kato

Backed out for causing (part of commit message)

Flags: needinfo?(hikezoe.birchill)

The passed wpt is interactive-content.html, and the passed test case is <input type=color> one. With apz.zoom-to-focused-input.enabled:false the test case passes without the change for this bug, I'd set the pref for now.

I suppose this passed case is also racy on the interaction of zoomToFocusInput. I'd hope the case would be stable.

Flags: needinfo?(hikezoe.birchill)
Pushed by hikezoe.birchill@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/4ad62798030c
Forcibly set the zoom level to 1 in test_bug861217.html. r=m_kato
https://hg.mozilla.org/integration/autoland/rev/06a6a94fe1bd
Wait for resize events in the parent process document for ZoomToFocusInput. r=geckoview-reviewers,m_kato
Status: ASSIGNED → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
Target Milestone: --- → 126 Branch
Component: Core → General
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: