Bug 1746126 Comment 11 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 Botond Ballo [:botond] from comment #9)
> (In reply to Razvan Cojocaru from comment #8)
> > This is interesting, I had previously just set `dom.meta-viewport.enabled` to `true` manually in the browser and just ran the test (and `mZoomConstraints.mMaxZoom` was `10`).
> 
> This doesn't work because prefs are stored in the profile directory, and `./mach mochitest` creates a temporary profile directory in `/tmp`, while `./mach run` uses a profile directory in the objdir which persists across runs; so prefs set during `./mach run` will not be visible to `./mach mochitest`.
> 
> So the test actually ran with `dom.meta-viewport.enaled=false` (the default), the meta viewport tag wasn't processed, and the default zoom constraints was used which has a max zoom of 10.
> 
> > I've now put this in test_group_zoomToFocusedInput.html: `{"file": "helper_zoomToFocusedInput_nozoom2.html", "prefs": [["dom.meta-viewport.enabled", true]]},`,
> 
> Yep, this is the way to do it.
> 
> > and I get:
> > ```
> > 1:29.16 GECKO(3447) mZoomConstraints.mMaxZoom: 1
> > ```
> > Neither case reflects the value in my test (`maximum-scale=2`). Quite confusing.
> 
> I wonder if the `user-scalable=no` forces the max zoom to be clamped to 1. Does the max zoom change to 2 if you remove the `user-scalable=no`?

It does apparently, yes. But the test still passes. And furthermore, isn't the test supposed to fail with `user-scalable=no` (isn't the issue about how `user-scalable=no` is not taken into account), or am I misunderstanding it?

```
 1:38.84 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | WaitUntilApzStable: got apz-flush-done in child proc
 1:38.85 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | WaitUntilApzStable: done promiseFocus
 1:38.86 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | WaitUntilApzStable: done promiseAllPaintsDone
 1:38.86 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: Flushed APZ repaints, waiting for callback...
 1:38.89 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: APZ flush done
 1:38.89 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | WaitUntilApzStable: all done
 1:39.09 PASS helper_zoomToFocusedInput_nozoom2.html | The initial_resolution is 1, which is some sane value
 1:39.72 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: Flushed APZ repaints, waiting for callback...
 1:39.72 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: APZ flush done
 1:39.76 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: Flushed APZ repaints, waiting for callback...
 1:39.77 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: APZ flush done
 1:39.79 PASS helper_zoomToFocusedInput_nozoom2.html | focusing input did not change resolution 1
 1:39.80 GECKO(5832) void mozilla::layers::AsyncPanZoomController::ZoomToRect(const mozilla::layers::ZoomTarget &, const uint32_t)
 1:39.80 GECKO(5832) mZoomConstraints.mMaxZoom: 2
 1:39.80 GECKO(5832) aZoomTarget.targetRect: (x=-7, y=8, w=1294, h=200)
 1:39.80 GECKO(5832) Metrics().GetZoom(): 1, endZoomToMetrics.GetZoom(): 1
 1:39.81 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: Flushed APZ repaints, waiting for callback...
 1:39.82 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: APZ flush done
 1:40.15 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: Flushed APZ repaints, waiting for callback...
 1:40.15 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: APZ flush done
 1:40.18 PASS helper_zoomToFocusedInput_nozoom2.html | zoomToFocusedInput input did not change resolution 1
```
(In reply to Botond Ballo [:botond] from comment #9)
> I wonder if the `user-scalable=no` forces the max zoom to be clamped to 1. Does the max zoom change to 2 if you remove the `user-scalable=no`?

It does apparently, yes. But the test still passes. And furthermore, isn't the test supposed to fail with `user-scalable=no` (isn't the issue about how `user-scalable=no` is not taken into account), or am I misunderstanding it?

```
 1:38.84 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | WaitUntilApzStable: got apz-flush-done in child proc
 1:38.85 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | WaitUntilApzStable: done promiseFocus
 1:38.86 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | WaitUntilApzStable: done promiseAllPaintsDone
 1:38.86 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: Flushed APZ repaints, waiting for callback...
 1:38.89 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: APZ flush done
 1:38.89 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | WaitUntilApzStable: all done
 1:39.09 PASS helper_zoomToFocusedInput_nozoom2.html | The initial_resolution is 1, which is some sane value
 1:39.72 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: Flushed APZ repaints, waiting for callback...
 1:39.72 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: APZ flush done
 1:39.76 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: Flushed APZ repaints, waiting for callback...
 1:39.77 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: APZ flush done
 1:39.79 PASS helper_zoomToFocusedInput_nozoom2.html | focusing input did not change resolution 1
 1:39.80 GECKO(5832) void mozilla::layers::AsyncPanZoomController::ZoomToRect(const mozilla::layers::ZoomTarget &, const uint32_t)
 1:39.80 GECKO(5832) mZoomConstraints.mMaxZoom: 2
 1:39.80 GECKO(5832) aZoomTarget.targetRect: (x=-7, y=8, w=1294, h=200)
 1:39.80 GECKO(5832) Metrics().GetZoom(): 1, endZoomToMetrics.GetZoom(): 1
 1:39.81 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: Flushed APZ repaints, waiting for callback...
 1:39.82 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: APZ flush done
 1:40.15 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: Flushed APZ repaints, waiting for callback...
 1:40.15 GECKO(5832) helper_zoomToFocusedInput_nozoom2.html | PromiseApzRepaintsFlushed: APZ flush done
 1:40.18 PASS helper_zoomToFocusedInput_nozoom2.html | zoomToFocusedInput input did not change resolution 1
```

Back to Bug 1746126 Comment 11