Closed
Bug 514351
Opened 15 years ago
Closed 15 years ago
support HandheldFriendly meta tag
Categories
(Core :: DOM: Core & HTML, defect)
Core
DOM: Core & HTML
Tracking
()
RESOLVED
FIXED
Tracking | Status | |
---|---|---|
status1.9.2 | --- | beta1-fixed |
fennec | 1.0b1-wm+ | --- |
People
(Reporter: blassey, Assigned: blassey)
Details
(Keywords: mobile)
Attachments
(2 files, 3 obsolete files)
1.40 KB,
patch
|
sicking
:
review+
jst
:
approval1.9.2+
|
Details | Diff | Splinter Review |
4.01 KB,
patch
|
mfinkle
:
review+
|
Details | Diff | Splinter Review |
When a page specifies this we shouldn't scale the page, just fit to actual screen width.
Flags: wanted-fennec1.0+
Assignee | ||
Comment 1•15 years ago
|
||
Assignee: nobody → bugmail
Attachment #398333 -
Flags: review?
Assignee | ||
Comment 2•15 years ago
|
||
Attachment #398334 -
Flags: review?(mark.finkle)
Comment 3•15 years ago
|
||
Comment on attachment 398334 [details] [diff] [review] mobile patch >- let [w, h] = BrowserView.Util.getBrowserDimensions(browser); >- this.setZoomLevel(BrowserView.Util.pageZoomLevel(this.getVisibleRect(), w, h)); >+ var windowUtils = browser.contentWindow.QueryInterface(Components.interfaces >+ .nsIInterfaceRequestor) >+ .getInterface(Components.interfaces.nsIDOMWindowUtils); Use Ci in these two places >+ if (handheldFriendly == "true") { >+ browser.setAttribute("style", "width: " + window.screen.width + "px;"); >+ this.setZoomLevel(1); >+ browser.markupDocumentViewer.textZoom = 1; There is code in the window resize handler that updates the height of the browsers based on the width. However, the code assumes the width is always the default: http://mxr.mozilla.org/mobile-browser/source/chrome/content/browser.js#401 When we create the browser, we default the width: http://mxr.mozilla.org/mobile-browser/source/chrome/content/browser.js#2404 So, you could change the code at line 401 to use the parseInt(browser.style.width) instead of the hardcoded default.
Attachment #398334 -
Flags: review?(mark.finkle) → review-
Assignee | ||
Comment 4•15 years ago
|
||
I untabified browser.js, which led to some ws changes outside the code I'm modifying. Mark said he welcomed that clean up, so I've included it in the patch.
Attachment #398334 -
Attachment is obsolete: true
Attachment #398379 -
Flags: review?(mark.finkle)
Assignee | ||
Updated•15 years ago
|
Attachment #398333 -
Flags: review? → review?(jonas)
Assignee | ||
Comment 5•15 years ago
|
||
changes suggested on irc
Attachment #398379 -
Attachment is obsolete: true
Attachment #398415 -
Flags: review?(mark.finkle)
Attachment #398379 -
Flags: review?(mark.finkle)
Comment 6•15 years ago
|
||
Comment on attachment 398415 [details] [diff] [review] mobile patch v.3 >diff --git a/chrome/content/BrowserView.js b/chrome/content/BrowserView.js >+ if (handheldFriendly == "true") { >+ browser.handheld = true; >+ browser.setAttribute("style", "width: " + window.screen.width + "px;"); >+ this.setZoomLevel(1); >+ browser.markupDocumentViewer.textZoom = 1; >+ } else { >+ let [w, h] = BrowserView.Util.getBrowserDimensions(browser); >+ this.setZoomLevel(BrowserView.Util.pageZoomLevel(this.getVisibleRect(), w, h)); >+ } You probably want to remove the property in the else clause: delete browser.handheld; >diff --git a/chrome/content/browser.js b/chrome/content/browser.js > let scrollbox = document.getElementById("tile-container-container") >- .boxObject >- .QueryInterface(Components.interfaces.nsIScrollBoxObject); >+ .boxObject >+ .QueryInterface(Components.interfaces.nsIScrollBoxObject); Ci. while you're here? >- let scaledH = (kDefaultBrowserWidth * (h / w)); >+ let scaledDefaultH = (kDefaultBrowserWidth * (h / w)); >+ let scaledScreenH = (window.screen.width * (h/w)); Add spaces: (h / w) >+ browserStyle.height = ((browser.hasOwnProperty("handheld") && >+ browser.handheld) ? >+ scaledScreenH : scaledDefaultH) + 'px'; Oops: there is no "browser" variable in this block. need to make one or use "browsers[i]" and use "px" (double quotes) Sorry I didn't catch some of these earlier
Attachment #398415 -
Flags: review?(mark.finkle) → review-
Assignee | ||
Comment 7•15 years ago
|
||
Attachment #398415 -
Attachment is obsolete: true
Attachment #398418 -
Flags: review?(mark.finkle)
Updated•15 years ago
|
Attachment #398418 -
Flags: review?(mark.finkle) → review+
Assignee | ||
Comment 8•15 years ago
|
||
this meta tag was originally defined by AvantGo. Its fairly common on the web and signifies that the page is designed to work well with small screens. It is used by m.cnn.com and referenced by blackberry in their docs: http://docs.blackberry.com/en/developers/deliverables/6176/HTML_ref_meta_564143_11.jsp
Comment 9•15 years ago
|
||
i'd really much rather we support the viewport meta tag, than this tag...
Attachment #398333 -
Flags: review?(jonas) → review+
Assignee | ||
Updated•15 years ago
|
Assignee: bugmail → nobody
Component: General → DOM
Product: Fennec → Core
QA Contact: general → general
Assignee | ||
Updated•15 years ago
|
Attachment #398333 -
Flags: approval1.9.2?
Assignee | ||
Comment 10•15 years ago
|
||
pushed http://hg.mozilla.org/mozilla-central/rev/bb5d0b3c624a
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Updated•15 years ago
|
Attachment #398333 -
Flags: approval1.9.2? → approval1.9.2+
Comment 11•15 years ago
|
||
pushed http://hg.mozilla.org/releases/mozilla-1.9.2/rev/f3b8ed7b59ae the mobile-browser patch has bitrotted or has landed already?
status1.9.2:
--- → beta1-fixed
Comment 12•15 years ago
|
||
(In reply to comment #11) > the mobile-browser patch has bitrotted or has landed already? It has landed
Updated•13 years ago
|
Assignee: nobody → blassey.bugs
Updated•5 years ago
|
Component: DOM → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•