WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED WONTFIX
40204
Need to recognize ";" as separator for arguments of viewport tag
https://bugs.webkit.org/show_bug.cgi?id=40204
Summary
Need to recognize ";" as separator for arguments of viewport tag
Gyuyoung Kim
Reported
2010-06-05 02:22:16 PDT
When arguments of viewport's tag are processed, ";" is not recognized as separator as below, static bool isSeparator(UChar c) { return c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '=' || c == ',' || c == '\0'; } However, some website is using ";" as separator. For example, in
http://m.flickr.com/#/home
, it is using ";" for arguments of viewport as below, <meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"> So, the "device-width;" argument is not processed by processArguments() function because the "deveice-width;" contains ";". In my opinion, we need to add ";" to isSeparator() as below, static bool isSeparator(UChar c) { return c == ' ' || c == '\t' || c == '\n' || c == '\r' || c == '=' || c == ',' || c == '\0' || c == ';'; } If there are better solutions, please let me know.
Attachments
patch-1
(1.32 KB, patch)
2010-06-05 02:27 PDT
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Proposed Patch
(2.44 KB, patch)
2011-03-06 17:48 PST
,
Gyuyoung Kim
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Gyuyoung Kim
Comment 1
2010-06-05 02:27:05 PDT
Created
attachment 57963
[details]
patch-1 Please review a patch attached.
Peter Beverloo
Comment 2
2010-06-06 06:02:00 PDT
After doing some quick research, the Safari documentation[1] clearly demonstrates that multiple tags should be divided by commas instead of semicolons. Other websites, including some Opera's introduction about the viewport meta[2] and a fair amount of other websites describing the possibility, talk solely about dividing by commas as well. The CSS3 Media Queries spec[3], which certainly has some similarities with viewport, does not list a semicolon in its syntax either. Are you sure a change like this is desirable? A much easier solution probably is asking Flickr to fix their meta-tag. [1]
http://developer.apple.com/safari/library/documentation/appleapplications/reference/safarihtmlref/articles/metatags.html#//apple_ref/html/const/viewport
[2]
http://dev.opera.com/articles/view/opera-mobile-9-5-the-developer-angle/
[3]
http://www.w3.org/TR/css3-mediaqueries/#syntax
Gyuyoung Kim
Comment 3
2010-06-06 17:16:41 PDT
Thank you for your your opinion. It seems I need to investigate this specification further.
Viatcheslav Ostapenko
Comment 4
2011-01-07 13:55:50 PST
(In reply to
comment #2
)
> After doing some quick research, the Safari documentation[1] clearly demonstrates that multiple tags should be divided by commas instead of semicolons. Other websites, including some Opera's introduction about the viewport meta[2] and a fair amount of other websites describing the possibility, talk solely about dividing by commas as well. The CSS3 Media Queries spec[3], which certainly has some similarities with viewport, does not list a semicolon in its syntax either. > > Are you sure a change like this is desirable? A much easier solution probably is asking Flickr to fix their meta-tag. > > [1]
http://developer.apple.com/safari/library/documentation/appleapplications/reference/safarihtmlref/articles/metatags.html#//apple_ref/html/const/viewport
> [2]
http://dev.opera.com/articles/view/opera-mobile-9-5-the-developer-angle/
> [3]
http://www.w3.org/TR/css3-mediaqueries/#syntax
That's all true, but iphone-4 and android both support comma and semicolon for viewport tag separator. It seems also, that android support space as separator also, but iphone-4 doesn't.
mike.zraly
Comment 5
2011-01-10 11:51:56 PST
The patch is not quite complete. In addition to modifying isSeparator() it should also modify two lines in the function that calls isSeparator(), Document::processArguments(), to replace if (buffer[i] == ',' || i >= length) with if (buffer[i] == ',' || buffer[i] == ';' || i >= length)
Gyuyoung Kim
Comment 6
2011-03-06 17:48:52 PST
Created
attachment 84902
[details]
Proposed Patch Thank you for your comment. I add ';' to the two lines. Iphone and Android already support semicolon as separator, I think we can add semicolon to separator. I add comments to this patch.
Kenneth Rohde Christiansen
Comment 7
2011-03-08 00:52:02 PST
Android has removed support for ; and iOS does not support it. What iOS (and WebKit trunk now) supports is trailing garbage. ie the ; in width = 230; is considered garbage and thus ignored. This means that width will indeed become 230. Closing as wontfix.
Eric Seidel (no email)
Comment 8
2011-03-08 09:52:43 PST
Comment on
attachment 84902
[details]
Proposed Patch Cleared review? from
attachment 84902
[details]
so that this bug does not appear in
http://webkit.org/pending-review
. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).
Gyuyoung Kim
Comment 9
2011-03-08 17:24:25 PST
(In reply to
comment #8
)
> (From update of
attachment 84902
[details]
) > Cleared review? from
attachment 84902
[details]
so that this bug does not appear in
http://webkit.org/pending-review
. If you would like this patch reviewed, please attach it to a new bug (or re-open this bug before marking it for review again).
Kenneth said we don't need this patch. Do you think this patch can be needed ?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug