Respect minimum-scale and maximum-scale viewport properties

VERIFIED FIXED

Status

VERIFIED FIXED
9 years ago
9 years ago

People

(Reporter: mbrubeck, Assigned: mbrubeck)

Tracking

Bug Flags:
in-testsuite +

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

9 years ago
Created attachment 441214 [details] [diff] [review]
WIP

We should use the viewport-minimum-scale and viewport-maximum-scale metadata to limit default zoom and user-specified zoom.

These metadata values are non-standard, but used by Mobile Safari and Android. They are documented here:

http://developer.apple.com/safari/library/documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html
(Assignee)

Comment 1

9 years ago
Created attachment 441547 [details] [diff] [review]
patch

This patch adds minimum-scale and maximum-scale support to the viewport sizing code, and adds several new test cases.

Expected results are partly calculated rather than hard-coded so the tests work at different screen sizes (like under xmonad on my development machine).

This patch does *not* use minimum- and maximum-scale to limit volume-button or gesture zooming.  I think I'll file a separate bug+patch for that...
Attachment #441214 - Attachment is obsolete: true
Attachment #441547 - Flags: review?(mark.finkle)
(Assignee)

Updated

9 years ago
Blocks: 561815
(Assignee)

Comment 2

9 years ago
Bug 561815 filed for limits during volume-button/gesture zooming.
Tests pass

pushed m-b:
http://hg.mozilla.org/mobile-browser/rev/a7742ac37e93
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Attachment #441547 - Flags: review?(mark.finkle) → review+
I love the testcases, but remember to set the in-testsuite flasg to + once they're pushed with the patch.

Also, is there a way to verify this without the browser chrome testcases?
Flags: in-testsuite+
(Assignee)

Comment 5

9 years ago
Some possible test sites:

http://daringfireball.net/ - initial-scale=0.5, minimum-scale=0.45

http://sudoku.rectang.com/iphone/ - maximum-scale=1.0, user-scalable=0
ah cool, verified FIXED on builds:

Mozilla/5.0 (X11; U; Linux armv7l; Nokia N900; en-US; rv:1.9.2.5pre) Gecko/20100428 Namoroka/3.6.5pre Fennec/1.1b2pre

and

Mozilla/5.0 (X11; U; Linux armv71; Nokia N900; en-US; rv:1.9.3a5pre) Gecko/20100428 Namoroka/3.7a5pre Fennec/1.1b2pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.