Closed Bug 572696 Opened 10 years ago Closed 9 years ago

Fennec should understand meta viewport with spaces

Categories

(Core :: DOM: Core & HTML, defect)

Other
Other
defect
Not set

Tracking

()

RESOLVED FIXED
Tracking Status
fennec 2.0b3+ ---

People

(Reporter: rik, Assigned: vingtetun)

References

()

Details

(Whiteboard: [has-patch])

Attachments

(2 files, 2 obsolete files)

User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_4; fr-fr) AppleWebKit/534.1+ (KHTML, like Gecko) Version/5.0 Safari/533.16
Build Identifier: http://people.mozilla.com/~mbrubeck/fennec.apk

Fennec doesn't understand <meta name="viewport" content="width = device-width">

Most of Apple documentation is using this syntax with spaces so there's potentially a lot of copy/paste pages.

See http://developer.apple.com/safari/library/documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html#//apple_ref/doc/uid/TP40006509-SW26 for examples.

Reproducible: Always
Attached patch Patch (obsolete) — Splinter Review
This is not a fennec bug, this is a platform bug.
The patch should do the work but I need to test it.
Assignee: nobody → 21
Assignee: 21 → nobody
Status: UNCONFIRMED → NEW
Component: General → DOM
Ever confirmed: true
Product: Fennec → Core
QA Contact: general → general
Attached patch Patch v0.2 (obsolete) — Splinter Review
It was a bit more complicated than what I was thinking first.

The patch allow spaces around the '=' character but still allow to use ' ' as a separators between tokens to keep cross browsers compatibilities.
Attachment #452779 - Attachment is obsolete: true
Attachment #452823 - Flags: review?(jst)
tracking-fennec: --- → ?
tracking-fennec: ? → 2.0+
tracking-fennec: 2.0+ → 2.0b3+
I think you should write tests for that. It shouldn't be hard.
(In reply to comment #3)
> I think you should write tests for that. It shouldn't be hard.

We have some tests already. And will add new ones for this:
http://mxr.mozilla.org/mobile-browser/source/chrome/tests/browser_viewport.js
Patch updated on trunk
Attachment #452823 - Attachment is obsolete: true
Attachment #488270 - Flags: review?(jst)
Attachment #452823 - Flags: review?(jst)
Basic tests for checking spaces, I should probably add checks for "\t", "\r", "\n" too
Whiteboard: [has-patch]
Attachment #488270 - Flags: review?(jst) → review+
Pushed:
http://hg.mozilla.org/mozilla-central/rev/99de996537ef

Keeping open given that tests need to be pushed on mobile-browser.
Status: NEW → ASSIGNED
Tests: 
http://hg.mozilla.org/mobile-browser/rev/655367cfcc57

Thanks Mounir for landing the platform part!
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.