Title: [161477] trunk
Revision
161477
Author
seo...@webkit.org
Date
2014-01-07 18:20:46 -0800 (Tue, 07 Jan 2014)

Log Message

Web Inspector: Remove leftover 'device metrics' code
https://bugs.webkit.org/show_bug.cgi?id=126607

Reviewed by Joseph Pecoraro.

Source/WebCore:

No new tests, No changes in behavior.

Removes unused code related to 'device metrics'.

* css/MediaQueryEvaluator.cpp:
(WebCore::device_heightMediaFeatureEval):
(WebCore::device_widthMediaFeatureEval):
* inspector/InspectorClient.h:
* inspector/InspectorInstrumentation.cpp:
* inspector/InspectorInstrumentation.h:
* inspector/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::InspectorPageAgent):
(WebCore::InspectorPageAgent::disable):
(WebCore::InspectorPageAgent::didLayout):
* inspector/InspectorPageAgent.h:
* page/DOMWindow.cpp:
(WebCore::DOMWindow::innerHeight):
(WebCore::DOMWindow::innerWidth):
* page/Screen.cpp:
(WebCore::Screen::height):
(WebCore::Screen::width):
* rendering/TextAutosizer.cpp:
(WebCore::TextAutosizer::processSubtree):

Source/WebKit/blackberry:

Clean up after removing InspectorClient::overrideDeviceMetrics().

* WebCoreSupport/InspectorClientBlackBerry.cpp:
* WebCoreSupport/InspectorClientBlackBerry.h:

Source/WebKit/mac:

* WebKit.order: Update after removing InspectorClient::overrideDeviceMetrics().

Source/WebKit2:

* mac/WebKit2.order: Update after removing InspectorClient::overrideDeviceMetrics().

LayoutTests:

* inspector/styles/override-screen-size-expected.txt: Removed.
* inspector/styles/override-screen-size.html: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (161476 => 161477)


--- trunk/LayoutTests/ChangeLog	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/LayoutTests/ChangeLog	2014-01-08 02:20:46 UTC (rev 161477)
@@ -1,3 +1,13 @@
+2014-01-07  Seokju Kwon  <seo...@webkit.org>
+
+        Web Inspector: Remove leftover 'device metrics' code
+        https://bugs.webkit.org/show_bug.cgi?id=126607
+
+        Reviewed by Joseph Pecoraro.
+
+        * inspector/styles/override-screen-size-expected.txt: Removed.
+        * inspector/styles/override-screen-size.html: Removed.
+
 2014-01-07  Brent Fulgham  <bfulg...@apple.com>
 
         Unreviewed test fix: Correct whitespace around ]

Deleted: trunk/LayoutTests/inspector/styles/override-screen-size-expected.txt (161476 => 161477)


--- trunk/LayoutTests/inspector/styles/override-screen-size-expected.txt	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/LayoutTests/inspector/styles/override-screen-size-expected.txt	2014-01-08 02:20:46 UTC (rev 161477)
@@ -1,49 +0,0 @@
-Tests that screen dimension overrides affect media rules, body dimensions, and window.screen.
-
-Override: 480x800
-Screen from page: 480x800
-Window from page: 480x800
-Body from page: 480x800
-Main style:
-[expanded] 
-element.style  { ()
-
-======== Matched CSS Rules ========
-[expanded] 
-media="screen" (override-screen-size.html)
-@media (max-device-height: 960px) and (max-device-width: 480px) (override-screen-size.html:9)
-#main  { (override-screen-size.html:10)
-background: green;
-
-[expanded] 
-div  { (user agent stylesheet)
-display: block;
-
-
-Override: 800x480
-Screen from page: 800x480
-Window from page: 800x480
-Body from page: 800x480
-Main style:
-[expanded] 
-element.style  { ()
-
-======== Matched CSS Rules ========
-[expanded] 
-div  { (user agent stylesheet)
-display: block;
-
-
-Override: 10000001x800 => ERROR
-Override: -1x800 => ERROR
-Override: 480x10000001 => ERROR
-Override: 480x-1 => ERROR
-Current dimensions:
-Screen from page: 800x480
-Window from page: 800x480
-Body from page: 800x480
-Disable PageAgent:
-Screen size same as original - OK
-Enable PageAgent:
-Screen size same as original - OK
-

Deleted: trunk/LayoutTests/inspector/styles/override-screen-size.html (161476 => 161477)


--- trunk/LayoutTests/inspector/styles/override-screen-size.html	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/LayoutTests/inspector/styles/override-screen-size.html	2014-01-08 02:20:46 UTC (rev 161477)
@@ -1,219 +0,0 @@
-<html>
-<head>
-
-<style type="text/css" media="screen">
-@media (max-device-width: 478px) and (max-device-height: 959px) {
-    #main { background: red; }
-}
-
-@media (max-device-width: 480px) and (max-device-height: 960px) {
-    #main { background: green; }
-}
-
-@media (min-device-width: 481px) and (min-device-height: 961px) {
-    #main { background: yellow; }
-}
-
-body {
-    position: absolute;
-    top: 0;
-    right: 0;
-    bottom: 0;
-    left: 0;
-    margin: 0;
-}
-
-</style>
-
-<script src=""
-<script src=""
-<script>
-
-function getSizes()
-{
-    return JSON.stringify({
-        screen: window.screen.width + "x" + window.screen.height,
-        inner: window.innerWidth + "x" + window.innerHeight,
-        body: document.body.offsetWidth + "x" + document.body.offsetHeight
-    });
-}
-
-function test()
-{
-    var exceededDimension = 10000001;
-    var originalScreenSize;
-
-    function saveSizeCallback(jsonResult)
-    {
-        var value = JSON.parse(jsonResult.value);
-        originalScreenSize = value.screen;
-        if (!originalScreenSize || originalScreenSize.indexOf("x") === -1)
-            InspectorTest.addResult("Invalid original screen size: " + originalScreenSize + ". Expect runtime failures later on.");
-
-        InspectorTest.selectNodeAndWaitForStyles("main", step0);
-    }
-
-    InspectorTest.evaluateInPage("getSizes()", saveSizeCallback);
-
-
-    function step0()
-    {
-        overrideAndDumpData(480, 800, step1);
-    }
-
-    function step1()
-    {
-        function compareSizeCallback(jsonResult)
-        {
-            // Check that the screen size reported is the same as the original one.
-            var result = JSON.parse(jsonResult.value);
-            if (result.screen !== originalScreenSize)
-                InspectorTest.addResult("Original size " + originalScreenSize + " not restored, found: " + result.screen);
-            step2();
-        }
-
-        function overrideCallback()
-        {
-            InspectorTest.evaluateInPage("getSizes()", compareSizeCallback);
-        }
-
-        // Disable overrides.
-        PageAgent.setDeviceMetricsOverride(0, 0, 1, true, overrideCallback);
-    }
-
-    function step2()
-    {
-        overrideAndDumpData(800, 480, step3);
-    }
-
-    function step3()
-    {
-        applyOverride(exceededDimension, 800, step4);
-    }
-
-    function step4()
-    {
-        applyOverride(-1, 800, step5);
-    }
-
-    function step5()
-    {
-        applyOverride(480, exceededDimension, step6);
-    }
-
-    function step6()
-    {
-        function callback()
-        {
-            InspectorTest.addResult("Current dimensions:");
-            getAndDumpSizes(step7);
-        }
-        applyOverride(480, -1, callback);
-    }
-
-    function step7()
-    {
-        function callback(jsonResult)
-        {
-            var value = JSON.parse(jsonResult.value);
-            if (value.screen !== originalScreenSize)
-                InspectorTest.addResult("Screen size not restored, actual: " + value.screen + ", expected: " + originalScreenSize);
-            else
-                InspectorTest.addResult("Screen size same as original - OK");
-            step8();
-        }
-
-        InspectorTest.addResult("Disable PageAgent:");
-        PageAgent.disable();
-        InspectorTest.evaluateInPage("getSizes()", callback);
-    }
-
-    function step8()
-    {
-        function callback(jsonResult)
-        {
-            var value = JSON.parse(jsonResult.value);
-            if (value.screen !== originalScreenSize)
-                InspectorTest.addResult("Screen size not restored, actual: " + value.screen + ", expected: " + originalScreenSize);
-            else
-                InspectorTest.addResult("Screen size same as original - OK");
-            InspectorTest.completeTest();
-        }
-
-        InspectorTest.addResult("Enable PageAgent:");
-        PageAgent.enable();
-        InspectorTest.evaluateInPage("getSizes()", callback);
-    }
-
-    function applyOverride(width, height, userCallback)
-    {
-        function callback(error)
-        {
-            if (error)
-                InspectorTest.addResult("Override: " + width + "x" + height + " => ERROR");
-            userCallback();
-        }
-        PageAgent.setDeviceMetricsOverride(width, height, 1, true, callback);
-    }
-
-    function overrideAndDumpData(width, height, callback)
-    {
-        function finalCallback()
-        {
-            InspectorTest.addResult("Main style:");
-            InspectorTest.dumpSelectedElementStyles(true, false, true);
-            callback();
-        }
-
-        var gotSizes;
-        var gotStyles;
-        function stylesCallback()
-        {
-            if (gotSizes)
-                return finalCallback();
-            gotStyles = true;
-        }
-
-        function sizesCallback()
-        {
-            gotSizes = true;
-            if (gotStyles)
-                finalCallback();
-        }
-
-        function applyCallback()
-        {
-            getAndDumpSizes(sizesCallback);
-        }
-
-        InspectorTest.addResult("Override: " + width + "x" + height);
-        InspectorTest.waitForStyles("main", stylesCallback);
-        applyOverride(width, height, applyCallback);
-    }
-
-    function getAndDumpSizes(callback)
-    {
-        function getSizesCallback(jsonResult)
-        {
-            var result = JSON.parse(jsonResult.value);
-            InspectorTest.addResult("Screen from page: " + result.screen);
-            InspectorTest.addResult("Window from page: " + result.inner);
-            InspectorTest.addResult("Body from page: " + result.body);
-            if (callback)
-                callback();
-        }
-
-        InspectorTest.evaluateInPage("getSizes()", getSizesCallback);
-    }
-}
-</script>
-</head>
-
-<body _onload_="runTest()">
-<p>
-Tests that screen dimension overrides affect media rules, body dimensions, and window.screen.
-</p>
-
-<div id="main"></div>
-</body>
-</html>

Modified: trunk/Source/WebCore/ChangeLog (161476 => 161477)


--- trunk/Source/WebCore/ChangeLog	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebCore/ChangeLog	2014-01-08 02:20:46 UTC (rev 161477)
@@ -1,3 +1,34 @@
+2014-01-07  Seokju Kwon  <seo...@webkit.org>
+
+        Web Inspector: Remove leftover 'device metrics' code
+        https://bugs.webkit.org/show_bug.cgi?id=126607
+
+        Reviewed by Joseph Pecoraro.
+
+        No new tests, No changes in behavior.
+
+        Removes unused code related to 'device metrics'.
+
+        * css/MediaQueryEvaluator.cpp:
+        (WebCore::device_heightMediaFeatureEval):
+        (WebCore::device_widthMediaFeatureEval):
+        * inspector/InspectorClient.h:
+        * inspector/InspectorInstrumentation.cpp:
+        * inspector/InspectorInstrumentation.h:
+        * inspector/InspectorPageAgent.cpp:
+        (WebCore::InspectorPageAgent::InspectorPageAgent):
+        (WebCore::InspectorPageAgent::disable):
+        (WebCore::InspectorPageAgent::didLayout):
+        * inspector/InspectorPageAgent.h:
+        * page/DOMWindow.cpp:
+        (WebCore::DOMWindow::innerHeight):
+        (WebCore::DOMWindow::innerWidth):
+        * page/Screen.cpp:
+        (WebCore::Screen::height):
+        (WebCore::Screen::width):
+        * rendering/TextAutosizer.cpp:
+        (WebCore::TextAutosizer::processSubtree):
+
 2014-01-02  Andy Estes  <aes...@apple.com>
 
         [iOS] Upstream remainder of minimal-ui viewport changes

Modified: trunk/Source/WebCore/css/MediaQueryEvaluator.cpp (161476 => 161477)


--- trunk/Source/WebCore/css/MediaQueryEvaluator.cpp	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebCore/css/MediaQueryEvaluator.cpp	2014-01-08 02:20:46 UTC (rev 161477)
@@ -368,7 +368,6 @@
         RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle();
         int length;
         long height = sg.height();
-        InspectorInstrumentation::applyScreenHeightOverride(frame, &height);
         return computeLength(value, !frame->document()->inQuirksMode(), style, rootStyle, length) && compareValue(static_cast<int>(height), length, op);
     }
     // ({,min-,max-}device-height)
@@ -383,7 +382,6 @@
         RenderStyle* rootStyle = frame->document()->documentElement()->renderStyle();
         int length;
         long width = sg.width();
-        InspectorInstrumentation::applyScreenWidthOverride(frame, &width);
         return computeLength(value, !frame->document()->inQuirksMode(), style, rootStyle, length) && compareValue(static_cast<int>(width), length, op);
     }
     // ({,min-,max-}device-width)

Modified: trunk/Source/WebCore/inspector/InspectorClient.h (161476 => 161477)


--- trunk/Source/WebCore/inspector/InspectorClient.h	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebCore/inspector/InspectorClient.h	2014-01-08 02:20:46 UTC (rev 161477)
@@ -61,15 +61,6 @@
     virtual void clearBrowserCookies() { }
     virtual bool canMonitorMainThread() { return false; }
 
-    virtual void overrideDeviceMetrics(int /*width*/, int /*height*/, float /*fontScaleFactor*/, bool /*fitWindow*/)
-    {
-        // FIXME: Platforms may want to implement this (see https://bugs.webkit.org/show_bug.cgi?id=82886).
-    }
-    virtual void autoZoomPageToFitWidth()
-    {
-        // FIXME: Platforms may want to implement this (see https://bugs.webkit.org/show_bug.cgi?id=82886).
-    }
-
     virtual bool overridesShowPaintRects() { return false; }
     virtual void setShowPaintRects(bool) { }
 

Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp (161476 => 161477)


--- trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.cpp	2014-01-08 02:20:46 UTC (rev 161477)
@@ -625,38 +625,6 @@
         resourceAgent->applyUserAgentOverride(userAgent);
 }
 
-void InspectorInstrumentation::applyScreenWidthOverrideImpl(InstrumentingAgents* instrumentingAgents, long* width)
-{
-    if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent())
-        pageAgent->applyScreenWidthOverride(width);
-}
-
-void InspectorInstrumentation::applyScreenHeightOverrideImpl(InstrumentingAgents* instrumentingAgents, long* height)
-{
-    if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent())
-        pageAgent->applyScreenHeightOverride(height);
-}
-
-bool InspectorInstrumentation::shouldApplyScreenWidthOverrideImpl(InstrumentingAgents* instrumentingAgents)
-{
-    if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent()) {
-        long width = 0;
-        pageAgent->applyScreenWidthOverride(&width);
-        return !!width;
-    }
-    return false;
-}
-
-bool InspectorInstrumentation::shouldApplyScreenHeightOverrideImpl(InstrumentingAgents* instrumentingAgents)
-{
-    if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent()) {
-        long height = 0;
-        pageAgent->applyScreenHeightOverride(&height);
-        return !!height;
-    }
-    return false;
-}
-
 void InspectorInstrumentation::applyEmulatedMediaImpl(InstrumentingAgents* instrumentingAgents, String* media)
 {
     if (InspectorPageAgent* pageAgent = instrumentingAgents->inspectorPageAgent())

Modified: trunk/Source/WebCore/inspector/InspectorInstrumentation.h (161476 => 161477)


--- trunk/Source/WebCore/inspector/InspectorInstrumentation.h	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebCore/inspector/InspectorInstrumentation.h	2014-01-08 02:20:46 UTC (rev 161477)
@@ -186,11 +186,7 @@
     static void didProcessRule(const InspectorInstrumentationCookie&);
 
     static void applyUserAgentOverride(Frame*, String*);
-    static void applyScreenWidthOverride(Frame*, long*);
-    static void applyScreenHeightOverride(Frame*, long*);
     static void applyEmulatedMedia(Frame*, String*);
-    static bool shouldApplyScreenWidthOverride(Frame*);
-    static bool shouldApplyScreenHeightOverride(Frame*);
     static void willSendRequest(Frame*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse);
     static void continueAfterPingLoader(Frame*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse&);
     static void markResourceAsCached(Page*, unsigned long identifier);
@@ -387,11 +383,7 @@
     static void didProcessRuleImpl(const InspectorInstrumentationCookie&);
 
     static void applyUserAgentOverrideImpl(InstrumentingAgents*, String*);
-    static void applyScreenWidthOverrideImpl(InstrumentingAgents*, long*);
-    static void applyScreenHeightOverrideImpl(InstrumentingAgents*, long*);
     static void applyEmulatedMediaImpl(InstrumentingAgents*, String*);
-    static bool shouldApplyScreenWidthOverrideImpl(InstrumentingAgents*);
-    static bool shouldApplyScreenHeightOverrideImpl(InstrumentingAgents*);
     static void willSendRequestImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse& redirectResponse);
     static void continueAfterPingLoaderImpl(InstrumentingAgents*, unsigned long identifier, DocumentLoader*, ResourceRequest&, const ResourceResponse&);
     static void markResourceAsCachedImpl(InstrumentingAgents*, unsigned long identifier);
@@ -1281,42 +1273,6 @@
 #endif
 }
 
-inline void InspectorInstrumentation::applyScreenWidthOverride(Frame* frame, long* width)
-{
-#if ENABLE(INSPECTOR)
-    FAST_RETURN_IF_NO_FRONTENDS(void());
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
-        applyScreenWidthOverrideImpl(instrumentingAgents, width);
-#else
-    UNUSED_PARAM(frame);
-    UNUSED_PARAM(width);
-#endif
-}
-
-inline void InspectorInstrumentation::applyScreenHeightOverride(Frame* frame, long* height)
-{
-#if ENABLE(INSPECTOR)
-    FAST_RETURN_IF_NO_FRONTENDS(void());
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
-        applyScreenHeightOverrideImpl(instrumentingAgents, height);
-#else
-    UNUSED_PARAM(frame);
-    UNUSED_PARAM(height);
-#endif
-}
-
-inline bool InspectorInstrumentation::shouldApplyScreenWidthOverride(Frame* frame)
-{
-#if ENABLE(INSPECTOR)
-    FAST_RETURN_IF_NO_FRONTENDS(false);
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
-        return shouldApplyScreenWidthOverrideImpl(instrumentingAgents);
-#else
-    UNUSED_PARAM(frame);
-#endif
-    return false;
-}
-
 inline void InspectorInstrumentation::applyEmulatedMedia(Frame* frame, String* media)
 {
 #if ENABLE(INSPECTOR)
@@ -1329,18 +1285,6 @@
 #endif
 }
 
-inline bool InspectorInstrumentation::shouldApplyScreenHeightOverride(Frame* frame)
-{
-#if ENABLE(INSPECTOR)
-    FAST_RETURN_IF_NO_FRONTENDS(false);
-    if (InstrumentingAgents* instrumentingAgents = instrumentingAgentsForFrame(frame))
-        return shouldApplyScreenHeightOverrideImpl(instrumentingAgents);
-#else
-    UNUSED_PARAM(frame);
-#endif
-    return false;
-}
-
 inline void InspectorInstrumentation::willSendRequest(Frame* frame, unsigned long identifier, DocumentLoader* loader, ResourceRequest& request, const ResourceResponse& redirectResponse)
 {
 #if ENABLE(INSPECTOR)

Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.cpp (161476 => 161477)


--- trunk/Source/WebCore/inspector/InspectorPageAgent.cpp	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.cpp	2014-01-08 02:20:46 UTC (rev 161477)
@@ -360,8 +360,6 @@
     , m_client(client)
     , m_overlay(overlay)
     , m_lastScriptIdentifier(0)
-    , m_screenWidthOverride(0)
-    , m_screenHeightOverride(0)
     , m_enabled(false)
     , m_isFirstLayoutAfterOnLoad(false)
     , m_originalScriptExecutionDisabled(false)
@@ -410,10 +408,6 @@
     setShowFPSCounter(0, false);
     setEmulatedMedia(0, "");
     setContinuousPaintingEnabled(0, false);
-
-    // When disabling the agent, reset the override values if necessary.
-    m_screenWidthOverride = 0;
-    m_screenHeightOverride = 0;
 }
 
 void InspectorPageAgent::addScriptToEvaluateOnLoad(ErrorString*, const String& source, String* identifier)
@@ -924,18 +918,6 @@
     m_frontendDispatcher->_javascript_DialogClosed();
 }
 
-void InspectorPageAgent::applyScreenWidthOverride(long* width)
-{
-    if (m_screenWidthOverride)
-        *width = m_screenWidthOverride;
-}
-
-void InspectorPageAgent::applyScreenHeightOverride(long* height)
-{
-    if (m_screenHeightOverride)
-        *height = m_screenHeightOverride;
-}
-
 void InspectorPageAgent::didPaint(GraphicsContext* context, const LayoutRect& rect)
 {
     if (!m_enabled || m_client->overridesShowPaintRects() || !m_showPaintRects)
@@ -962,10 +944,6 @@
     if (!m_enabled)
         return;
 
-    if (isFirstLayout) {
-        if (m_screenWidthOverride && m_screenHeightOverride)
-            m_client->autoZoomPageToFitWidth();
-    }
     m_overlay->update();
 }
 

Modified: trunk/Source/WebCore/inspector/InspectorPageAgent.h (161476 => 161477)


--- trunk/Source/WebCore/inspector/InspectorPageAgent.h	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebCore/inspector/InspectorPageAgent.h	2014-01-08 02:20:46 UTC (rev 161477)
@@ -155,8 +155,6 @@
     void frameClearedScheduledNavigation(Frame*);
     void willRunJavaScriptDialog(const String& message);
     void didRunJavaScriptDialog();
-    void applyScreenWidthOverride(long*);
-    void applyScreenHeightOverride(long*);
     void applyEmulatedMedia(String*);
     void didPaint(GraphicsContext*, const LayoutRect&);
     void didLayout();
@@ -207,8 +205,6 @@
     HashMap<Frame*, String> m_frameToIdentifier;
     HashMap<String, Frame*> m_identifierToFrame;
     HashMap<DocumentLoader*, String> m_loaderToIdentifier;
-    int m_screenWidthOverride;
-    int m_screenHeightOverride;
     bool m_enabled;
     bool m_isFirstLayoutAfterOnLoad;
     bool m_originalScriptExecutionDisabled;

Modified: trunk/Source/WebCore/page/DOMWindow.cpp (161476 => 161477)


--- trunk/Source/WebCore/page/DOMWindow.cpp	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebCore/page/DOMWindow.cpp	2014-01-08 02:20:46 UTC (rev 161477)
@@ -1156,9 +1156,7 @@
 #if PLATFORM(IOS)
     return view->mapFromLayoutToCSSUnits(static_cast<int>(view->actualVisibleContentRect().height()));
 #else
-    // If the device height is overridden, do not include the horizontal scrollbar into the innerHeight (since it is absent on the real device).
-    bool includeScrollbars = !InspectorInstrumentation::shouldApplyScreenHeightOverride(m_frame);
-    return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRect(includeScrollbars ? ScrollableArea::IncludeScrollbars : ScrollableArea::ExcludeScrollbars).height()));
+    return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRect(ScrollableArea::IncludeScrollbars).height()));
 #endif
 }
 
@@ -1174,9 +1172,7 @@
 #if PLATFORM(IOS)
     return view->mapFromLayoutToCSSUnits(static_cast<int>(view->actualVisibleContentRect().width()));
 #else
-    // If the device width is overridden, do not include the vertical scrollbar into the innerWidth (since it is absent on the real device).
-    bool includeScrollbars = !InspectorInstrumentation::shouldApplyScreenWidthOverride(m_frame);
-    return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRect(includeScrollbars ? ScrollableArea::IncludeScrollbars : ScrollableArea::ExcludeScrollbars).width()));
+    return view->mapFromLayoutToCSSUnits(static_cast<int>(view->visibleContentRect(ScrollableArea::IncludeScrollbars).width()));
 #endif
 }
 

Modified: trunk/Source/WebCore/page/Screen.cpp (161476 => 161477)


--- trunk/Source/WebCore/page/Screen.cpp	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebCore/page/Screen.cpp	2014-01-08 02:20:46 UTC (rev 161477)
@@ -50,7 +50,6 @@
     if (!m_frame)
         return 0;
     long height = static_cast<long>(screenRect(m_frame->view()).height());
-    InspectorInstrumentation::applyScreenHeightOverride(m_frame, &height);
     return static_cast<unsigned>(height);
 }
 
@@ -59,7 +58,6 @@
     if (!m_frame)
         return 0;
     long width = static_cast<long>(screenRect(m_frame->view()).width());
-    InspectorInstrumentation::applyScreenWidthOverride(m_frame, &width);
     return static_cast<unsigned>(width);
 }
 

Modified: trunk/Source/WebCore/rendering/TextAutosizer.cpp (161476 => 161477)


--- trunk/Source/WebCore/rendering/TextAutosizer.cpp	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebCore/rendering/TextAutosizer.cpp	2014-01-08 02:20:46 UTC (rev 161477)
@@ -114,10 +114,8 @@
 
     // Window area, in logical (density-independent) pixels.
     windowInfo.windowSize = m_document->settings()->textAutosizingWindowSizeOverride();
-    if (windowInfo.windowSize.isEmpty()) {
-        bool includeScrollbars = !InspectorInstrumentation::shouldApplyScreenWidthOverride(&mainFrame);
-        windowInfo.windowSize = mainFrame.view()->unscaledVisibleContentSize(includeScrollbars ? ScrollableArea::IncludeScrollbars : ScrollableArea::ExcludeScrollbars);
-    }
+    if (windowInfo.windowSize.isEmpty())
+        windowInfo.windowSize = mainFrame.view()->unscaledVisibleContentSize(ScrollableArea::IncludeScrollbars);
 
     // Largest area of block that can be visible at once (assuming the main
     // frame doesn't get scaled to less than overview scale), in CSS pixels.

Modified: trunk/Source/WebKit/blackberry/ChangeLog (161476 => 161477)


--- trunk/Source/WebKit/blackberry/ChangeLog	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebKit/blackberry/ChangeLog	2014-01-08 02:20:46 UTC (rev 161477)
@@ -1,3 +1,15 @@
+2014-01-07  Seokju Kwon  <seo...@webkit.org>
+
+        Web Inspector: Remove leftover 'device metrics' code
+        https://bugs.webkit.org/show_bug.cgi?id=126607
+
+        Reviewed by Joseph Pecoraro.
+
+        Clean up after removing InspectorClient::overrideDeviceMetrics().
+
+        * WebCoreSupport/InspectorClientBlackBerry.cpp:
+        * WebCoreSupport/InspectorClientBlackBerry.h:
+
 2014-01-06  Seokju Kwon  <seo...@webkit.org>
 
         Web Inspector: Remove canOverrideDeviceMetrics and setDeviceMetricsOverride from protocol

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp (161476 => 161477)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.cpp	2014-01-08 02:20:46 UTC (rev 161477)
@@ -86,13 +86,6 @@
     m_webPagePrivate->m_client->clearCookies();
 }
 
-void InspectorClientBlackBerry::overrideDeviceMetrics(int width, int height, float fontScaleFactor, bool)
-{
-    // Note: when width and height = 0, and fontScaleFactor = 1, this is the signal for restoring to default size.
-    m_webPagePrivate->applySizeOverride(width, height);
-    m_webPagePrivate->setTextZoomFactor(fontScaleFactor);
-}
-
 bool InspectorClientBlackBerry::supportsFrameInstrumentation()
 {
     return true;

Modified: trunk/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.h (161476 => 161477)


--- trunk/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.h	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebKit/blackberry/WebCoreSupport/InspectorClientBlackBerry.h	2014-01-08 02:20:46 UTC (rev 161477)
@@ -55,7 +55,6 @@
     virtual bool canClearBrowserCookies() { return true; }
     virtual void paintInspectorOverlay(WebCore::GraphicsContext&);
 
-    virtual void overrideDeviceMetrics(int, int, float, bool);
     virtual bool supportsFrameInstrumentation();
 
 private:

Modified: trunk/Source/WebKit/mac/ChangeLog (161476 => 161477)


--- trunk/Source/WebKit/mac/ChangeLog	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebKit/mac/ChangeLog	2014-01-08 02:20:46 UTC (rev 161477)
@@ -1,3 +1,12 @@
+2014-01-07  Seokju Kwon  <seo...@webkit.org>
+
+        Web Inspector: Remove leftover 'device metrics' code
+        https://bugs.webkit.org/show_bug.cgi?id=126607
+
+        Reviewed by Joseph Pecoraro.
+
+        * WebKit.order: Update after removing InspectorClient::overrideDeviceMetrics().
+
 2014-01-02  Andy Estes  <aes...@apple.com>
 
         [iOS] Upstream WebKit support for various features

Modified: trunk/Source/WebKit/mac/WebKit.order (161476 => 161477)


--- trunk/Source/WebKit/mac/WebKit.order	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebKit/mac/WebKit.order	2014-01-08 02:20:46 UTC (rev 161477)
@@ -1595,7 +1595,6 @@
 __ZN7WebCore15InspectorClient19setShowDebugBordersEb
 __ZN7WebCore15InspectorClient17setShowFPSCounterEb
 __ZN7WebCore15InspectorClient28setContinuousPaintingEnabledEb
-__ZN7WebCore15InspectorClient21overrideDeviceMetricsEiifb
 __ZN26WebInspectorFrontendClient21disconnectFromBackendEv
 -[WebInspectorWindowController destroyInspectorView:]
 -[WebInspector releaseFrontend]

Modified: trunk/Source/WebKit2/ChangeLog (161476 => 161477)


--- trunk/Source/WebKit2/ChangeLog	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebKit2/ChangeLog	2014-01-08 02:20:46 UTC (rev 161477)
@@ -1,3 +1,12 @@
+2014-01-07  Seokju Kwon  <seo...@webkit.org>
+
+        Web Inspector: Remove leftover 'device metrics' code
+        https://bugs.webkit.org/show_bug.cgi?id=126607
+
+        Reviewed by Joseph Pecoraro.
+
+        * mac/WebKit2.order: Update after removing InspectorClient::overrideDeviceMetrics().
+
 2014-01-07  Simon Fraser  <simon.fra...@apple.com>
 
         Fix the build. The WebKit2 project copied all of WebKit2/Scripts/webkit2 into WebKit2.framework/PrivateHeaders,

Modified: trunk/Source/WebKit2/mac/WebKit2.order (161476 => 161477)


--- trunk/Source/WebKit2/mac/WebKit2.order	2014-01-08 01:35:35 UTC (rev 161476)
+++ trunk/Source/WebKit2/mac/WebKit2.order	2014-01-08 02:20:46 UTC (rev 161477)
@@ -8512,7 +8512,6 @@
 __ZN7WebCore15InspectorClient19setShowDebugBordersEb
 __ZN7WebCore15InspectorClient17setShowFPSCounterEb
 __ZN7WebCore15InspectorClient28setContinuousPaintingEnabledEb
-__ZN7WebCore15InspectorClient21overrideDeviceMetricsEiifb
 __ZN6WebKit12WebInspector8didCloseEv
 __ZN7CoreIPC10Connection4sendIN8Messages17WebInspectorProxy8DidCloseEEEbRKT_yj
 __ZN7WebCore15InspectorClient23overridesShowPaintRectsEv
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to