Ticket #3335 (closed feature: fixed)

Opened 2 years ago

Last modified 22 months ago

<meta name="viewport"> has irregular contents in the content attribute

Reported by: marcjansen Owned by:
Priority: minor Milestone: 2.11 Release
Component: general Version: 2.10
Keywords: Cc:
State: Pullup

Description

According to  http://wiki.whatwg.org/wiki/MetaExtensions and the parsing algorithm here  http://dev.w3.org/csswg/css-device-adapt/#parsing-algorithm (at least how I read it) the content attribute of <meta name="viewport"> should use the comma to separate the single properties.

We currently use the semicolon to separate the properties, which leads to errors in Chrome:

Viewport argument value "device-width;" for key "width" not recognized. Content ignored.

or

Viewport argument value "1.0;" for key "initial-scale" was truncated to its numeric prefix.

The attached patch suggests replacing the ;-separator with , and removing the final semicolon in the content-attribute of the the meta-tag completely. The notices in Chrome are gone with the patch applied and the examples still look OK to me.

It would be great if someone could check the examples on mobile devices.

Attachments

3335.001.patch Download (124.2 KB) - added by marcjansen 2 years ago.

Change History

Changed 2 years ago by marcjansen

Changed 2 years ago by fredj

  • state changed from Awaiting User Feedback to Review

examples looks good on android 2.3.3

Changed 2 years ago by fredj

there's still a trailing semicolon in example/mobile.html

Changed 2 years ago by aabt

  • state changed from Review to Commit

Looks good to me, and works on my iphone.

Please commit.

Changed 2 years ago by marcjansen

  • milestone changed from 2.12 Release to 2.11 Release

Thanks for checking. I will commit next monday, as I am currently unable to do so. I'll mark this as pullup for 2.11, if there are no objections. In case that is to late, soneone else may commit this trivial change.

Changed 2 years ago by marcjansen

  • state changed from Commit to Pullup

Committed in r12082. Leaving the ticket open as this is a pullup.

Changed 22 months ago by ahocevar

  • status changed from new to closed
  • resolution set to fixed

in 2.11-rc2

Note: See TracTickets for help on using tickets.