Bug 47330 - Fixing viewport meta tag user-scalable handling
Summary: Fixing viewport meta tag user-scalable handling
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Luiz Agostini
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-07 02:11 PDT by Luiz Agostini
Modified: 2010-12-13 14:37 PST (History)
3 users (show)

See Also:


Attachments
patch (5.25 KB, patch)
2010-10-07 02:22 PDT, Luiz Agostini
no flags Details | Formatted Diff | Diff
patch (5.29 KB, patch)
2010-10-07 08:33 PDT, Luiz Agostini
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Luiz Agostini 2010-10-07 02:11:31 PDT
user-scalable viewport meta tag attribute was not considered when computing viewport attributes.
Comment 1 Luiz Agostini 2010-10-07 02:22:17 PDT
Created attachment 70057 [details]
patch
Comment 2 Kenneth Rohde Christiansen 2010-10-07 07:39:38 PDT
Comment on attachment 70057 [details]
patch

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

> WebCore/dom/ViewportArguments.cpp:162
> +    if (!args.userScalable)
> +        result.maximumScale = result.minimumScale = result.initialScale;

I think you are missing a result.userScalable = args.userScalable here.
Comment 3 Luiz Agostini 2010-10-07 08:33:57 PDT
Created attachment 70091 [details]
patch
Comment 4 WebKit Commit Bot 2010-10-07 10:26:52 PDT
Comment on attachment 70091 [details]
patch

Clearing flags on attachment: 70091

Committed r69316: <http://trac.webkit.org/changeset/69316>
Comment 5 WebKit Commit Bot 2010-10-07 10:26:56 PDT
All reviewed patches have been landed.  Closing bug.
Comment 6 Evan Martin 2010-12-13 14:36:06 PST
This patch changed userScalable from a float to a bool.
However, userScalable is initialized from an enum in the constructor, and the enum value is ValueAuto (-1).  This produces a compiler warning and probably isn't what you intended.


third_party/WebKit/WebCore/dom/ViewportArguments.h(78) : warning C4305: 'initializing' : truncation from '' to 'bool'

Should I open a separate bug about this?
Comment 7 Kenneth Rohde Christiansen 2010-12-13 14:37:33 PST
(In reply to comment #6)
> This patch changed userScalable from a float to a bool.
> However, userScalable is initialized from an enum in the constructor, and the enum value is ValueAuto (-1).  This produces a compiler warning and probably isn't what you intended.
> 
> 
> third_party/WebKit/WebCore/dom/ViewportArguments.h(78) : warning C4305: 'initializing' : truncation from '' to 'bool'
> 
> Should I open a separate bug about this?

Oh yeah, please do. Feel free to cc me as.