Closed Bug 524900 Opened 10 years ago Closed 10 years ago

treat mobile doctypes like we treat handheld friendly content

Categories

(Firefox for Android Graveyard :: General, defect)

x86
Windows Vista
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: blassey, Assigned: blassey)

Details

Attachments

(2 files, 1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
generally content that specifies a mobile doctype is designed to be fit to screen width, just as content with the handheld friendly meta tag
Attached patch patch v.2Splinter Review
this patch actually sets the width correctly, the previous one only set the zoom
Assignee: nobody → bugmail
Attachment #408794 - Attachment is obsolete: true
Attachment #408803 - Flags: review?(mark.finkle)
Attachment #408803 - Flags: review?(mark.finkle) → review+
Comment on attachment 408803 [details] [diff] [review]
patch v.2

>     var handheldFriendly = windowUtils.getDocumentMetadata("HandheldFriendly");

Change to "let" while you're here

>     
>-    if (handheldFriendly == "true") {
>+    
>+    if (handheldFriendly == "true" ||
>+        (browser.contentDocument.doctype && 
>+         (browser.contentDocument.doctype.publicId.search("WAP") != -1||
>+	  browser.contentDocument.doctype.publicId.search("WML") != -1||
>+	  browser.contentDocument.doctype.publicId.search("Mobile")!= -1))) {

Can you make a local var for this logic?

var handheldDoctype = (browser.contentDocument.doctype && 
        (browser.contentDocument.doctype.publicId.search("WAP") != -1 ||
        browser.contentDocument.doctype.publicId.search("WML") != -1 ||
        browser.contentDocument.doctype.publicId.search("Mobile")!= -1));

then use it in the if test

Also, you have TABs in there

>     let handheldFriendly = windowUtils.getDocumentMetadata("HandheldFriendly");
>-    if (handheldFriendly == "true") {
>+    if (handheldFriendly == "true" ||
>+        (browser.contentDocument.doctype && 
>+         (browser.contentDocument.doctype.publicId.search("WAP") != -1||
>+	  browser.contentDocument.doctype.publicId.search("WML") != -1||
>+	  browser.contentDocument.doctype.publicId.search("Mobile")!= -1))) {

Same here (including the TABs)

r+ with nits fixed
pushed http://hg.mozilla.org/mobile-browser/rev/cab142d04282
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Brad, I don't have any real experience with WML and WAP docs. Is this patch affecting maemo builds and winmo builds or only winmo builds?
It effects both, you'll notice the text on m.* sites is more readable and laid out better.  For example m.espn.go.com is roughly twice as big as it was prior to landing on the Touch Pro.
You need to log in before you can comment on or make changes to this bug.