Bug 90494 - Implement device metrics for blackberry
Summary: Implement device metrics for blackberry
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit BlackBerry (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-03 14:09 PDT by Hanna
Modified: 2012-07-15 20:40 PDT (History)
4 users (show)

See Also:


Attachments
Patch (8.79 KB, patch)
2012-07-04 07:36 PDT, Hanna
no flags Details | Formatted Diff | Diff
Patch (5.45 KB, patch)
2012-07-04 08:59 PDT, Hanna
no flags Details | Formatted Diff | Diff
Patch (5.45 KB, patch)
2012-07-04 11:50 PDT, Hanna
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hanna 2012-07-03 14:09:41 PDT
enabling remotely changing the size of the viewport on device

https://przilla.ott.qnx.com/bugzilla/show_bug.cgi?id=149876
Comment 1 Hanna 2012-07-04 07:36:41 PDT
Created attachment 150792 [details]
Patch
Comment 2 Konrad Piascik 2012-07-04 08:05:45 PDT
Comment on attachment 150792 [details]
Patch

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

> Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.h:65
> +    OwnPtr<DeviceMetricsSupport> m_deviceMetrics;

New member variables should be declared last and initialized in the order they are declared in the header.  You're initializing in the correct order in your constructor but not declaring in the right order.

> Source/WebKit/blackberry/WebCoreSupport/InspectorDeviceMetrics.h:1
> +/*

This is a small class that's entirely declared in the header.  This is not good and should be moved into the InspectorClientBlackberry class we don't need a separate class for this functionality.
Comment 3 Hanna 2012-07-04 08:59:25 PDT
Created attachment 150808 [details]
Patch
Comment 4 Konrad Piascik 2012-07-04 09:05:06 PDT
Comment on attachment 150808 [details]
Patch

Looks good.
Comment 5 Rob Buis 2012-07-04 09:53:39 PDT
Comment on attachment 150808 [details]
Patch

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

LGTM.

> Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp:93
> +void InspectorClientBlackBerry::overrideDeviceMetrics(int width, int height, float fontScaleFactor, bool fitWindow)

fitWindow not used, so you can remove the name.
Comment 6 Hanna 2012-07-04 11:31:50 PDT
(In reply to comment #5)
> (From update of attachment 150808 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=150808&action=review
> 
> LGTM.
> 
> > Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp:93
> > +void InspectorClientBlackBerry::overrideDeviceMetrics(int width, int height, float fontScaleFactor, bool fitWindow)
> 
> fitWindow not used, so you can remove the name.

This function is called from the front end, I do not know if I remove a parameter it would still recognize the function
Comment 7 Hanna 2012-07-04 11:50:59 PDT
Created attachment 150829 [details]
Patch
Comment 8 Rob Buis 2012-07-04 12:35:05 PDT
Comment on attachment 150829 [details]
Patch

Looks good.
Comment 9 WebKit Review Bot 2012-07-04 15:06:56 PDT
Comment on attachment 150829 [details]
Patch

Clearing flags on attachment: 150829

Committed r121872: <http://trac.webkit.org/changeset/121872>
Comment 10 WebKit Review Bot 2012-07-04 15:07:01 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Antonio Gomes 2012-07-15 20:40:34 PDT
Comment on attachment 150829 [details]
Patch

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

> Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp:88
> +bool InspectorClientBlackBerry::canOverrideDeviceMetrics()

not const?

> Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp:100
> +bool InspectorClientBlackBerry::supportsFrameInstrumentation()

ditto