Closed Bug 561497 Opened 14 years ago Closed 14 years ago

Respect minimum-scale and maximum-scale viewport properties

Categories

(Firefox for Android Graveyard :: Panning/Zooming, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: mbrubeck, Assigned: mbrubeck)

References

Details

Attachments

(1 file, 1 obsolete file)

Attached patch WIP (obsolete) — Splinter Review
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
Attached patch patchSplinter Review
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)
Blocks: 561815
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
Closed: 14 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+
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.

Attachment

General

Created:
Updated:
Size: