Bug 1746126 Comment 4 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Razvan Cojocaru from comment #3)
> Just to recap, you've suggested that we use a copy of [this mochitest](https://searchfox.org/mozilla-central/source/gfx/layers/apz/test/mochitest/helper_zoomToFocusedInput_nozoom.html) to debug this. I'm guessing that, in order to reproduce this, the test can be used as-is, except for setting `maximum-scale` to something else (`2`, for example)? However, doing so keeps allowing the test to pass, so it's likely that I'm missing something.

It's possible some minor modifications to the test will be required, though I'm not sure exactly what without playing around with it.

Some things to check are:

  * Does `AsyncPanZoomController::ZoomToRect()` get called when running the test?
  * If so, what are the values of the starting zoom (`Metrics().GetZoom()`) and the computed target zoom (`endZoomToMetrics.GetZoom()` near the end of the function)?

> Also, I'm guessing that the test (once correctly implemented) is supposed to only fail with an Android build, and not on desktop builds?

Good question!

The main thing the test relies on that is disabled by default on desktop, is processing of the `<meta name="viewport">` tag (sometimes referred to as "mobile viewport sizing" in the code). This can be enabled on desktop by setting the pref `dom.meta-viewport.enabled=true`. This is technically an unsupported configuration, especially if non-overlay scrollbars are used (because mobile viewport sizing can have weird interactions with scrollbars that take up layout-space on the page), and we probably wouldn't want to check this in, but it's probably fine for running the test locally in a desktop build for convenience.
(In reply to Razvan Cojocaru from comment #3)
> Just to recap, you've suggested that we use a copy of [this mochitest](https://searchfox.org/mozilla-central/source/gfx/layers/apz/test/mochitest/helper_zoomToFocusedInput_nozoom.html) to debug this. I'm guessing that, in order to reproduce this, the test can be used as-is, except for setting `maximum-scale` to something else (`2`, for example)? However, doing so keeps allowing the test to pass, so it's likely that I'm missing something.

It's possible some minor modifications to the test will be required, though I'm not sure exactly what without playing around with it.

Some things to check are:

  * Does `AsyncPanZoomController::ZoomToRect()` get called when running the test?
  * If so, what are the values of the starting zoom (`Metrics().GetZoom()`) and the computed target zoom (`endZoomToMetrics.GetZoom()` near the end of the function)?

> Also, I'm guessing that the test (once correctly implemented) is supposed to only fail with an Android build, and not on desktop builds?

Good question!

The main thing the test relies on that is disabled by default on desktop, is processing of the `<meta name="viewport">` tag (sometimes referred to as "mobile viewport sizing" in the code). This can be enabled on desktop by setting the pref `dom.meta-viewport.enabled=true`. This is technically an unsupported configuration, especially if non-overlay scrollbars are used (because mobile viewport sizing can have weird interactions with scrollbars that take up layout-space on the page; details can be found [here](https://bugzilla.mozilla.org/show_bug.cgi?id=1556556#c35) if you're curious), and we probably wouldn't want to check this in, but it's probably fine for running the test locally in a desktop build for convenience.

Back to Bug 1746126 Comment 4