Closed Bug 1194811 Opened 10 years ago Closed 10 years ago

ZoomConstraintsClient probably doesn't update the double-tap-to-zoom flag properly

Categories

(Core :: Panning and Zooming, defect)

Unspecified
Gonk (Firefox OS)
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla43
Tracking Status
firefox43 --- fixed

People

(Reporter: kats, Assigned: kats)

References

()

Details

Attachments

(2 files, 1 obsolete file)

The ZoomConstraintsClient class decides whether or not double-tap-to-zoom is allowed based in part by whether or not the CSS viewport is <= the screen size [1]. Therefore, if either the CSS viewport or the screen size changes (such as on device rotation) this flag should be updated. However I don't believe ZoomConstraintClient does so, since it probably doesn't get triggered on a rotation. I haven't confirmed this yet. [1] http://mxr.mozilla.org/mozilla-central/source/layout/base/ZoomConstraintsClient.cpp?rev=e7c3406ce2c6#185
Confirmed using linked test case in the B2G browser on an Aries device.
Assignee: nobody → bugmail.mozilla
OS: Unspecified → Gonk (Firefox OS)
Version: unspecified → Trunk
Attached patch Patch (obsolete) — Splinter Review
Pretty simple fix, just recompute the zoom constraints on resize.
Attachment #8651907 - Flags: review?(botond)
Comment on attachment 8651907 [details] [diff] [review] Patch Review of attachment 8651907 [details] [diff] [review]: ----------------------------------------------------------------- Is there a reason MobileViewportManager and ZoomConstraintsClient get notified by resizes in different ways (PresShell::ResizeReflow() vs. listening to a resize event)?
Comment on attachment 8651907 [details] [diff] [review] Patch Hm, that's a good point. For some reason I was thinking that we want to run the ZCC after the MVM has recomputed the new CSS viewport but since the ZCC just uses nsViewportInfo directly that doesn't make much sense. Also it looks like the ZCC is using CalculateCompositionSizeForFrame intead of GetContentViewerSize like MVM does, so that should probably be updated as well. Let me rework the patch.
Attachment #8651907 - Flags: review?(botond)
Attachment #8652476 - Flags: review?(botond) → review+
Comment on attachment 8652477 [details] [diff] [review] Part 2 - Make ZCC screen size computation consistent with MVM Review of attachment 8652477 [details] [diff] [review]: ----------------------------------------------------------------- Nice catch!
Attachment #8652477 - Flags: review?(botond) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: