Bug 101217

Summary: Remove support for "desktop-width" in the viewport meta tag
Product: WebKit Reporter: Kenneth Rohde Christiansen <kenneth>
Component: WebCore Misc.Assignee: Kenneth Rohde Christiansen <kenneth>
Status: RESOLVED FIXED    
Severity: Normal CC: ddkilzer, dglazkov, fsamuel, hausmann, jkjiang, joepeck, johnme, koivisto, kpiascik, mifenton, peter, peter+ews, rwlbuis, simon.fraser, tmpsantos, tonikitoo, webkit.review.bot
Priority: P2 Keywords: WebExposed
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 95959    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch none

Description Kenneth Rohde Christiansen 2012-11-05 07:03:19 PST
This has been removed from the CSS Device Adaptation spec, and should be safe to remove as it is not documented anywhere (neither in blog posts).
Comment 1 Kenneth Rohde Christiansen 2012-11-05 07:04:56 PST
Created attachment 172329 [details]
Patch
Comment 2 Peter Beverloo 2012-11-05 07:23:00 PST
Comment on attachment 172329 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=172329&action=review

Removing this feature seems fine to me. Thanks Kenneth!

> Source/WebCore/dom/ViewportArguments.cpp:-219
> -    if (equalIgnoringCase(valueString, "desktop-width"))

We'll probably want to remove parsing in findScaleValue() and findUserScalableValue() as well.
Comment 3 WebKit Review Bot 2012-11-05 07:57:29 PST
Comment on attachment 172329 [details]
Patch

Attachment 172329 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14730071
Comment 4 Kenneth Rohde Christiansen 2012-11-05 08:07:58 PST
Created attachment 172337 [details]
Patch
Comment 5 Peter Beverloo 2012-11-05 08:16:39 PST
The Chromium port is using this in Source/WebKit/chromium/src/ChromeClientImpl.cpp, in ChromeClientImpl::dispatchViewportPropertiesDidChange(). Passing in a default viewport apparently is a signal to reset it, which sets the args.width value to DesktopWidth.

Since arguments.initialScale defaults to Auto and this *is* a default viewport, we should be ending up setting width=desktopWidth on line 136 of ViewportArguments.cpp anyway. It looks like it should be fine to remove lines 618-623 from ChromeClientImpl.cpp

Fady, could you confirm this?
Comment 6 WebKit Review Bot 2012-11-05 08:53:00 PST
Comment on attachment 172337 [details]
Patch

Attachment 172337 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14728622
Comment 7 Peter Beverloo (cr-android ews) 2012-11-05 09:28:37 PST
Comment on attachment 172337 [details]
Patch

Attachment 172337 [details] did not pass cr-android-ews (chromium-android):
Output: http://queues.webkit.org/results/14747075
Comment 8 Kenneth Rohde Christiansen 2012-11-06 06:17:58 PST
Created attachment 172567 [details]
Patch
Comment 9 Konrad Piascik 2012-11-06 06:35:51 PST
Comment on attachment 172567 [details]
Patch

You're missing a change to Source/WebKit/blackberry/Api/WebViewportArguments.h which also makes use of ValueDesktopWidth.  It's defined it its own enum, so this patch won't break anything for our port.  I can easily follow up with a patch if you want to go ahead and land this though.
Comment 10 Peter Beverloo (cr-android ews) 2012-11-06 07:48:41 PST
Comment on attachment 172567 [details]
Patch

Attachment 172567 [details] did not pass cr-android-ews (chromium-android):
Output: http://queues.webkit.org/results/14728837
Comment 11 WebKit Review Bot 2012-11-06 10:09:05 PST
Comment on attachment 172567 [details]
Patch

Attachment 172567 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14747472
Comment 12 Kenneth Rohde Christiansen 2012-11-06 10:28:16 PST
Created attachment 172611 [details]
Patch
Comment 13 WebKit Review Bot 2012-11-07 00:55:13 PST
Comment on attachment 172611 [details]
Patch

Clearing flags on attachment: 172611

Committed r133729: <http://trac.webkit.org/changeset/133729>
Comment 14 WebKit Review Bot 2012-11-07 00:55:19 PST
All reviewed patches have been landed.  Closing bug.