RESOLVED FIXED 82827
Web Inspector: Implement backend for device metrics emulation
https://bugs.webkit.org/show_bug.cgi?id=82827
Summary Web Inspector: Implement backend for device metrics emulation
Alexander Pavlov (apavlov)
Reported 2012-03-31 02:01:12 PDT
Patch to follow.
Attachments
Patch (18.73 KB, patch)
2012-03-31 02:57 PDT, Alexander Pavlov (apavlov)
pfeldman: review+
Alexander Pavlov (apavlov)
Comment 1 2012-03-31 02:57:06 PDT
Pavel Feldman
Comment 2 2012-04-02 04:53:59 PDT
Comment on attachment 134952 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=134952&action=review > Source/WebCore/inspector/Inspector.json:314 > + "description": "Checks whether <code>setDeviceMetricsOverride()</code> can be invoked.", drop the () > Source/WebCore/inspector/Inspector.json:316 > + { "name": "result", "type": "boolean", "description": "If true, <code>setDeviceMetricsOverride()</code> can safely be invoked on the agent." } ditto > Source/WebCore/inspector/Inspector.json:317 > + ] should be hidden > Source/WebCore/inspector/InspectorClient.h:60 > + virtual void overrideDeviceMetrics(int /*width*/, int /*height*/, float /*fontScaleFactor*/) { } Please file a bug requesting this feature is either upstreamed to WebCore or implemented for the other ports. > Source/WebCore/inspector/InspectorClient.h:61 > + virtual void autoZoomPageToFitWidth() { } Can we implement it in WebCore?
Alexander Pavlov (apavlov)
Comment 3 2012-04-02 05:14:47 PDT
(In reply to comment #2) > (From update of attachment 134952 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=134952&action=review > > > Source/WebCore/inspector/Inspector.json:314 > > + "description": "Checks whether <code>setDeviceMetricsOverride()</code> can be invoked.", > > drop the () Done. > > Source/WebCore/inspector/Inspector.json:316 > > + { "name": "result", "type": "boolean", "description": "If true, <code>setDeviceMetricsOverride()</code> can safely be invoked on the agent." } > > ditto Done. > > Source/WebCore/inspector/Inspector.json:317 > > + ] > > should be hidden Done. > > Source/WebCore/inspector/InspectorClient.h:60 > > + virtual void overrideDeviceMetrics(int /*width*/, int /*height*/, float /*fontScaleFactor*/) { } > > Please file a bug requesting this feature is either upstreamed to WebCore or implemented for the other ports. Done. > > Source/WebCore/inspector/InspectorClient.h:61 > > + virtual void autoZoomPageToFitWidth() { } > > Can we implement it in WebCore? Alas, we need to know the emulated text scale factor for this method to work correctly.
Alexander Pavlov (apavlov)
Comment 4 2012-04-02 05:21:00 PDT
Simon Fraser (smfr)
Comment 5 2012-04-02 11:59:01 PDT
This appears to have broken one test: inspector/styles/override-screen-size.html Should you have landed new test results too?
Alexander Pavlov (apavlov)
Comment 6 2012-04-03 01:55:13 PDT
(In reply to comment #5) > This appears to have broken one test: inspector/styles/override-screen-size.html > > Should you have landed new test results too? No. This test should rather be disabled on all platforms but Chromium, since the implementation has changed to a platform-specific one (previously it was implemented in WebCore but did not do as much as we need to support the related feature (bug 75963). I have landed the respective suppressions in http://trac.webkit.org/changeset/112998
Note You need to log in before you can comment on or make changes to this bug.