Title: [120541] trunk
Revision
120541
Author
[email protected]
Date
2012-06-16 17:39:25 -0700 (Sat, 16 Jun 2012)

Log Message

layoutTestController.setBackingScaleFactor is redundant with (and less awesome than) internals.settings.setDeviceScaleFactor
https://bugs.webkit.org/show_bug.cgi?id=89274

Reviewed by Levi Weintraub.

Tools:

Delete (mostly stub) implementations of layoutTestController.setBackingScaleFactor.
Note: The WebKit2 API that setBackingScaleFactor exercises is still
tested by API-level tests.

* DumpRenderTree/LayoutTestController.cpp:
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:
* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::didReceiveMessage):
(WTR):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
(InjectedBundle):
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR):
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
(LayoutTestController):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):

LayoutTests:

We don't need both layoutTestController.setBackingScaleFactor and
internals.settings.setDeviceScaleFactor because they do exactly the
same thing.  This patch removes setBackingScaleFactor because it's
async nature is annoying and implementing it requires a bunch of
port-specific code.

* fast/hidpi/broken-image-icon-hidpi.html:
* fast/hidpi/broken-image-with-size-hidpi.html:
* fast/hidpi/clip-text-in-hidpi.html:
* fast/hidpi/focus-rings.html:
* fast/hidpi/image-set-as-background.html:
* fast/hidpi/image-set-background-dynamic.html:
* fast/hidpi/image-set-background-repeat-without-size.html:
* fast/hidpi/image-set-background-repeat.html:
* fast/hidpi/image-set-border-image-comparison.html:
* fast/hidpi/image-set-border-image-dynamic.html:
* fast/hidpi/image-set-border-image-simple.html:
* fast/hidpi/image-set-in-content-dynamic.html:
* fast/hidpi/image-set-out-of-order.html:
* fast/hidpi/image-set-simple.html:
* fast/hidpi/image-set-without-specified-width.html:
* fast/hidpi/resize-corner-hidpi.html:
* fast/hidpi/video-controls-in-hidpi.html:
* svg/as-image/image-respects-deviceScaleFactor.html:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (120540 => 120541)


--- trunk/LayoutTests/ChangeLog	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/ChangeLog	2012-06-17 00:39:25 UTC (rev 120541)
@@ -1,3 +1,35 @@
+2012-06-16  Adam Barth  <[email protected]>
+
+        layoutTestController.setBackingScaleFactor is redundant with (and less awesome than) internals.settings.setDeviceScaleFactor
+        https://bugs.webkit.org/show_bug.cgi?id=89274
+
+        Reviewed by Levi Weintraub.
+
+        We don't need both layoutTestController.setBackingScaleFactor and
+        internals.settings.setDeviceScaleFactor because they do exactly the
+        same thing.  This patch removes setBackingScaleFactor because it's
+        async nature is annoying and implementing it requires a bunch of
+        port-specific code.
+
+        * fast/hidpi/broken-image-icon-hidpi.html:
+        * fast/hidpi/broken-image-with-size-hidpi.html:
+        * fast/hidpi/clip-text-in-hidpi.html:
+        * fast/hidpi/focus-rings.html:
+        * fast/hidpi/image-set-as-background.html:
+        * fast/hidpi/image-set-background-dynamic.html:
+        * fast/hidpi/image-set-background-repeat-without-size.html:
+        * fast/hidpi/image-set-background-repeat.html:
+        * fast/hidpi/image-set-border-image-comparison.html:
+        * fast/hidpi/image-set-border-image-dynamic.html:
+        * fast/hidpi/image-set-border-image-simple.html:
+        * fast/hidpi/image-set-in-content-dynamic.html:
+        * fast/hidpi/image-set-out-of-order.html:
+        * fast/hidpi/image-set-simple.html:
+        * fast/hidpi/image-set-without-specified-width.html:
+        * fast/hidpi/resize-corner-hidpi.html:
+        * fast/hidpi/video-controls-in-hidpi.html:
+        * svg/as-image/image-respects-deviceScaleFactor.html:
+
 2012-06-16  Mike West  <[email protected]>
 
         Ignore paths in Content Security Policy sources rather than failing to parse them.

Modified: trunk/LayoutTests/fast/hidpi/broken-image-icon-hidpi.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/broken-image-icon-hidpi.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/broken-image-icon-hidpi.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -1,16 +1,10 @@
 <html>
     <script>
         function startTest() {
-            if (window.layoutTestController) {
-                layoutTestController.waitUntilDone();
-                layoutTestController.setBackingScaleFactor(2, finishTest);
-            }
+            if (window.internals)
+                internals.settings.setDeviceScaleFactor(2);
         }
-        
-        function finishTest() {
-            setTimeout(function() { layoutTestController.notifyDone(); }, 0);
-        }
-        </script>
+    </script>
     </head>
     <body _onload_="startTest();">
         <div>This test passes if the broken image icon appears high-resolution in HiDPI and if the outline is of the appropriate size.</div>

Modified: trunk/LayoutTests/fast/hidpi/broken-image-with-size-hidpi.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/broken-image-with-size-hidpi.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/broken-image-with-size-hidpi.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -1,16 +1,10 @@
 <html>
     <script>
         function startTest() {
-            if (window.layoutTestController) {
-                layoutTestController.waitUntilDone();
-                layoutTestController.setBackingScaleFactor(2, finishTest);
-            }
+            if (window.internals)
+                internals.settings.setDeviceScaleFactor(2);
         }
-        
-        function finishTest() {
-            setTimeout(function() { layoutTestController.notifyDone(); }, 0);
-        }
-        </script>
+    </script>
     </head>
     <body _onload_="startTest();">
         <div>This test passes if the broken image icon appears high-resolution in HiDPI and is the appropriate size.</div>

Modified: trunk/LayoutTests/fast/hidpi/clip-text-in-hidpi.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/clip-text-in-hidpi.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/clip-text-in-hidpi.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -2,16 +2,11 @@
 <head>
 <script>
     function startTest() {
-        if (window.layoutTestController) {
-            layoutTestController.waitUntilDone();
-            layoutTestController.setBackingScaleFactor(2, finishTest);
-        }
-    }
-    
-    function finishTest() {
+        if (window.internals)
+            internals.settings.setDeviceScaleFactor(2);
+
         var test = document.getElementById("test");
         test.innerHTML = window.devicePixelRatio;
-        setTimeout(function() { layoutTestController.notifyDone(); }, 0);
     }
 </script>
 </head>

Modified: trunk/LayoutTests/fast/hidpi/focus-rings.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/focus-rings.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/focus-rings.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -1,16 +1,11 @@
 <html>
 <script>
     function startTest() {
-        if (window.layoutTestController) {
-            layoutTestController.waitUntilDone();
-            layoutTestController.setBackingScaleFactor(2, finishTest);
-        }
-    }
-    
-    function finishTest() {
+        if (window.internals)
+            internals.settings.setDeviceScaleFactor(2);
+
         var div = document.getElementById("div");
         div.focus();
-        setTimeout(function() { layoutTestController.notifyDone(); }, 0);
     }
     </script>
 </head>

Modified: trunk/LayoutTests/fast/hidpi/image-set-as-background.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/image-set-as-background.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/image-set-as-background.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -7,7 +7,8 @@
 
         if (!sessionStorage.scaleFactorIsSet) {
             layoutTestController.waitUntilDone();
-            layoutTestController.setBackingScaleFactor(2, scaleFactorIsSet);
+            internals.settings.setDeviceScaleFactor(2);
+            setTimeout(scaleFactorIsSet, 0);
         }
         
         if (sessionStorage.pageReloaded && sessionStorage.scaleFactorIsSet) {

Modified: trunk/LayoutTests/fast/hidpi/image-set-background-dynamic.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/image-set-background-dynamic.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/image-set-background-dynamic.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -3,19 +3,15 @@
     <head>
     <script>
         function startTest() {
-            if (window.layoutTestController) {
-                layoutTestController.waitUntilDone();
-                layoutTestController.setBackingScaleFactor(2, finishTest);
-            }
-        }
+            if (window.internals)
+                internals.settings.setDeviceScaleFactor(2);
 
-        function finishTest() {
             var test = document.getElementById("foo");
             test.innerHTML = window.devicePixelRatio;
             setTimeout(function() { layoutTestController.notifyDone(); }, 0);
         }
     </script>
-    
+   
 <style>
     #foo {
         width:100px;

Modified: trunk/LayoutTests/fast/hidpi/image-set-background-repeat-without-size.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/image-set-background-repeat-without-size.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/image-set-background-repeat-without-size.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -7,7 +7,8 @@
 
         if (!sessionStorage.scaleFactorIsSet) {
             layoutTestController.waitUntilDone();
-            layoutTestController.setBackingScaleFactor(2, scaleFactorIsSet);
+            internals.settings.setDeviceScaleFactor(2);
+            setTimeout(scaleFactorIsSet, 0);
         }
         
         if (sessionStorage.pageReloaded && sessionStorage.scaleFactorIsSet) {

Modified: trunk/LayoutTests/fast/hidpi/image-set-background-repeat.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/image-set-background-repeat.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/image-set-background-repeat.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -7,7 +7,8 @@
 
         if (!sessionStorage.scaleFactorIsSet) {
             layoutTestController.waitUntilDone();
-            layoutTestController.setBackingScaleFactor(2, scaleFactorIsSet);
+            internals.settings.setDeviceScaleFactor(2);
+            setTimeout(scaleFactorIsSet, 0);
         }
         
         if (sessionStorage.pageReloaded && sessionStorage.scaleFactorIsSet) {

Modified: trunk/LayoutTests/fast/hidpi/image-set-border-image-comparison.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/image-set-border-image-comparison.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/image-set-border-image-comparison.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -2,15 +2,9 @@
 <head>
 <script>
     function startTest() {
-        if (window.layoutTestController) {
-            layoutTestController.waitUntilDone();
-            layoutTestController.setBackingScaleFactor(2, finishTest);
-        }
+        if (window.internals)
+            internals.settings.setDeviceScaleFactor(2);
     }
-    
-    function finishTest() {
-        setTimeout(function() { layoutTestController.notifyDone(); }, 0);
-    }
 </script>
 
 <style>

Modified: trunk/LayoutTests/fast/hidpi/image-set-border-image-dynamic.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/image-set-border-image-dynamic.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/image-set-border-image-dynamic.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -3,16 +3,11 @@
     <head>
     <script>
         function startTest() {
-            if (window.layoutTestController) {
-                layoutTestController.waitUntilDone();
-                layoutTestController.setBackingScaleFactor(2, finishTest);
-            }
-        }
+            if (window.internals)
+                internals.settings.setDeviceScaleFactor(2);
 
-        function finishTest() {
             var test = document.getElementById("foo");
             test.innerHTML = window.devicePixelRatio;
-            setTimeout(function() { layoutTestController.notifyDone(); }, 0);
         }
     </script>
     

Modified: trunk/LayoutTests/fast/hidpi/image-set-border-image-simple.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/image-set-border-image-simple.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/image-set-border-image-simple.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -7,7 +7,8 @@
 
         if (!sessionStorage.scaleFactorIsSet) {
             layoutTestController.waitUntilDone();
-            layoutTestController.setBackingScaleFactor(2, scaleFactorIsSet);
+            internals.settings.setDeviceScaleFactor(2);
+            setTimeout(scaleFactorIsSet, 0);
         }
         
         if (sessionStorage.pageReloaded && sessionStorage.scaleFactorIsSet) {

Modified: trunk/LayoutTests/fast/hidpi/image-set-in-content-dynamic.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/image-set-in-content-dynamic.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/image-set-in-content-dynamic.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -3,16 +3,11 @@
     <head>
     <script>
         function startTest() {
-            if (window.layoutTestController) {
-                layoutTestController.waitUntilDone();
-                layoutTestController.setBackingScaleFactor(2, finishTest);
-            }
-        }
+            if (window.internals)
+                internals.settings.setDeviceScaleFactor(2)
 
-        function finishTest() {
             var test = document.getElementById("foo");
             test.innerHTML = window.devicePixelRatio;
-            setTimeout(function() { layoutTestController.notifyDone(); }, 0);
         }
     </script>
     

Modified: trunk/LayoutTests/fast/hidpi/image-set-out-of-order.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/image-set-out-of-order.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/image-set-out-of-order.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -7,7 +7,8 @@
 
         if (!sessionStorage.scaleFactorIsSet) {
             layoutTestController.waitUntilDone();
-            layoutTestController.setBackingScaleFactor(2, scaleFactorIsSet);
+            internals.settings.setDeviceScaleFactor(2);
+            setTimeout(scaleFactorIsSet, 0);
         }
         
         if (sessionStorage.pageReloaded && sessionStorage.scaleFactorIsSet) {

Modified: trunk/LayoutTests/fast/hidpi/image-set-simple.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/image-set-simple.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/image-set-simple.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -7,7 +7,8 @@
 
         if (!sessionStorage.scaleFactorIsSet) {
             layoutTestController.waitUntilDone();
-            layoutTestController.setBackingScaleFactor(2, scaleFactorIsSet);
+            internals.settings.setDeviceScaleFactor(2);
+            setTimeout(scaleFactorIsSet, 0);
         }
         
         if (sessionStorage.pageReloaded && sessionStorage.scaleFactorIsSet) {

Modified: trunk/LayoutTests/fast/hidpi/image-set-without-specified-width.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/image-set-without-specified-width.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/image-set-without-specified-width.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -7,7 +7,8 @@
 
         if (!sessionStorage.scaleFactorIsSet) {
             layoutTestController.waitUntilDone();
-            layoutTestController.setBackingScaleFactor(2, scaleFactorIsSet);
+            internals.settings.setDeviceScaleFactor(2);
+            setTimeout(scaleFactorIsSet, 0);
         }
         
         if (sessionStorage.pageReloaded && sessionStorage.scaleFactorIsSet) {

Modified: trunk/LayoutTests/fast/hidpi/resize-corner-hidpi.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/resize-corner-hidpi.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/resize-corner-hidpi.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -1,16 +1,10 @@
 <html>
     <script>
         function startTest() {
-            if (window.layoutTestController) {
-                layoutTestController.waitUntilDone();
-                layoutTestController.setBackingScaleFactor(2, finishTest);
-            }
+            if (window.internals)
+                internals.settings.setDeviceScaleFactor(2);
         }
-        
-        function finishTest() {
-            setTimeout(function() { layoutTestController.notifyDone(); }, 0);
-        }
-        </script>
+    </script>
     </head>
     <body _onload_="startTest();">
         <div>This test passes if the resize corner icon appears high-resolution in HiDPI.</div>

Modified: trunk/LayoutTests/fast/hidpi/video-controls-in-hidpi.html (120540 => 120541)


--- trunk/LayoutTests/fast/hidpi/video-controls-in-hidpi.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/fast/hidpi/video-controls-in-hidpi.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -1,16 +1,10 @@
 <html>
 <script>
     function startTest() {
-        if (window.layoutTestController) {
-            layoutTestController.waitUntilDone();
-            layoutTestController.setBackingScaleFactor(2, finishTest);
-        }
+        if (window.internals)
+            internals.settings.setDeviceScaleFactor(2);
     }
-    
-    function finishTest() {
-        setTimeout(function() { layoutTestController.notifyDone(); }, 0);
-    }
-    </script>
+</script>
 </head>
 <body _onload_="startTest();">
     <div>This test passes if the video controls are non-blurry and properly positioned in HiDPI.</div>

Modified: trunk/LayoutTests/svg/as-image/image-respects-deviceScaleFactor.html (120540 => 120541)


--- trunk/LayoutTests/svg/as-image/image-respects-deviceScaleFactor.html	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/LayoutTests/svg/as-image/image-respects-deviceScaleFactor.html	2012-06-17 00:39:25 UTC (rev 120541)
@@ -2,11 +2,10 @@
 <head>
     <script>
     function init() {
-        if (!window.layoutTestController)
+        if (!window.internals)
             return;
 
-        layoutTestController.waitUntilDone();
-        layoutTestController.setBackingScaleFactor(2, function () { layoutTestController.notifyDone(); });
+        internals.settings.setDeviceScaleFactor(2);
     }
     window._onload_ = init;
     </script>

Modified: trunk/Tools/ChangeLog (120540 => 120541)


--- trunk/Tools/ChangeLog	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/ChangeLog	2012-06-17 00:39:25 UTC (rev 120541)
@@ -1,3 +1,37 @@
+2012-06-16  Adam Barth  <[email protected]>
+
+        layoutTestController.setBackingScaleFactor is redundant with (and less awesome than) internals.settings.setDeviceScaleFactor
+        https://bugs.webkit.org/show_bug.cgi?id=89274
+
+        Reviewed by Levi Weintraub.
+
+        Delete (mostly stub) implementations of layoutTestController.setBackingScaleFactor.
+        Note: The WebKit2 API that setBackingScaleFactor exercises is still
+        tested by API-level tests.
+
+        * DumpRenderTree/LayoutTestController.cpp:
+        (LayoutTestController::staticFunctions):
+        * DumpRenderTree/LayoutTestController.h:
+        (LayoutTestController):
+        * DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
+        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+        (WTR::InjectedBundle::didReceiveMessage):
+        (WTR):
+        * WebKitTestRunner/InjectedBundle/InjectedBundle.h:
+        (InjectedBundle):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        (WTR):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+        (LayoutTestController):
+        * WebKitTestRunner/TestInvocation.cpp:
+        (WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
+
 2012-06-16  Xianzhu Wang  <[email protected]>
 
         [Chromium] Move chromium/public/linuxish/WebFontRendering.h out of linuxish directory

Modified: trunk/Tools/DumpRenderTree/LayoutTestController.cpp (120540 => 120541)


--- trunk/Tools/DumpRenderTree/LayoutTestController.cpp	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/DumpRenderTree/LayoutTestController.cpp	2012-06-17 00:39:25 UTC (rev 120541)
@@ -2107,22 +2107,6 @@
     return JSValueMakeUndefined(context);
 }
 
-static JSValueRef setBackingScaleFactorCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    if (argumentCount != 2)
-        return JSValueMakeUndefined(context);
-
-    double backingScaleFactor = JSValueToNumber(context, arguments[0], exception);
-    ASSERT(!*exception);
-
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
-    controller->setBackingScaleFactor(backingScaleFactor);
-
-    // The second argument is a callback that is called once the backing scale factor has been set.
-    JSObjectCallAsFunction(context, JSValueToObject(context, arguments[1], 0), thisObject, 0, 0, 0);
-    return JSValueMakeUndefined(context);
-}
-
 static JSValueRef preciseTimeCallback(JSContextRef context, JSObjectRef, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     return JSValueMakeNumber(context, WTF::currentTime());
@@ -2442,7 +2426,6 @@
         { "addChromeInputField", addChromeInputFieldCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "removeChromeInputField", removeChromeInputFieldCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "focusWebView", focusWebViewCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "setBackingScaleFactor", setBackingScaleFactorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "preciseTime", preciseTimeCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "setHasCustomFullScreenBehavior", setHasCustomFullScreenBehaviorCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { 0, 0, 0 }

Modified: trunk/Tools/DumpRenderTree/LayoutTestController.h (120540 => 120541)


--- trunk/Tools/DumpRenderTree/LayoutTestController.h	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/DumpRenderTree/LayoutTestController.h	2012-06-17 00:39:25 UTC (rev 120541)
@@ -319,8 +319,6 @@
     void removeChromeInputField();
     void focusWebView();
 
-    void setBackingScaleFactor(double);
-
     void setPOSIXLocale(JSStringRef locale);
 
     void setWebViewEditable(bool);

Modified: trunk/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp (120540 => 120541)


--- trunk/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp	2012-06-17 00:39:25 UTC (rev 120541)
@@ -825,10 +825,6 @@
 {
 }
 
-void LayoutTestController::setBackingScaleFactor(double)
-{
-}
-
 void LayoutTestController::setMockSpeechInputDumpRect(bool)
 {
 }

Modified: trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp (120540 => 120541)


--- trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp	2012-06-17 00:39:25 UTC (rev 120541)
@@ -871,11 +871,6 @@
     notImplemented();
 }
 
-void LayoutTestController::setBackingScaleFactor(double)
-{
-    notImplemented();
-}
-
 void LayoutTestController::simulateDesktopNotificationClick(JSStringRef title)
 {
 }

Modified: trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp (120540 => 120541)


--- trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp	2012-06-17 00:39:25 UTC (rev 120541)
@@ -972,10 +972,6 @@
 {
 }
 
-void LayoutTestController::setBackingScaleFactor(double)
-{
-}
-
 void LayoutTestController::simulateDesktopNotificationClick(JSStringRef title)
 {
 }

Modified: trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm (120540 => 120541)


--- trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm	2012-06-17 00:39:25 UTC (rev 120541)
@@ -1170,11 +1170,6 @@
     [[[mainFrame webView] window] makeFirstResponder:[mainFrame webView]];
 }
 
-void LayoutTestController::setBackingScaleFactor(double backingScaleFactor)
-{
-    [[mainFrame webView] _setCustomBackingScaleFactor:backingScaleFactor];
-}
-
 void LayoutTestController::simulateDesktopNotificationClick(JSStringRef title)
 {
     // FIXME: Implement.

Modified: trunk/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp (120540 => 120541)


--- trunk/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp	2012-06-17 00:39:25 UTC (rev 120541)
@@ -1450,10 +1450,6 @@
 {
 }
 
-void LayoutTestController::setBackingScaleFactor(double)
-{
-}
-
 void LayoutTestController::simulateDesktopNotificationClick(JSStringRef title)
 {
     // FIXME: Implement.

Modified: trunk/Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp (120540 => 120541)


--- trunk/Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp	2012-06-17 00:39:25 UTC (rev 120541)
@@ -611,10 +611,6 @@
 {
 }
 
-void LayoutTestController::setBackingScaleFactor(double)
-{
-}
-
 void LayoutTestController::simulateDesktopNotificationClick(JSStringRef title)
 {
     // FIXME: Implement.

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl (120540 => 120541)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl	2012-06-17 00:39:25 UTC (rev 120541)
@@ -135,8 +135,6 @@
         void removeChromeInputField(in object callback);
         void focusWebView(in object callback);
 
-        void setBackingScaleFactor(in double backingScaleFactor, in object callback);
-
         void setWindowIsKey(in boolean isKey);
 
         // FIXME: handle non-boolean preferences.

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (120540 => 120541)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp	2012-06-17 00:39:25 UTC (rev 120541)
@@ -180,10 +180,6 @@
         m_layoutTestController->callFocusWebViewCallback();
         return;
     }
-    if (WKStringIsEqualToUTF8CString(messageName, "CallSetBackingScaleFactorCallback")) {
-        m_layoutTestController->callSetBackingScaleFactorCallback();
-        return;
-    }
 
     WKRetainPtr<WKStringRef> errorMessageName(AdoptWK, WKStringCreateWithUTF8CString("Error"));
     WKRetainPtr<WKStringRef> errorMessageBody(AdoptWK, WKStringCreateWithUTF8CString("Unknown"));
@@ -309,13 +305,6 @@
     WKBundlePostMessage(m_bundle, messageName.get(), 0);
 }
 
-void InjectedBundle::postSetBackingScaleFactor(double backingScaleFactor)
-{
-    WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetBackingScaleFactor"));
-    WKRetainPtr<WKDoubleRef> messageBody(AdoptWK, WKDoubleCreate(backingScaleFactor));
-    WKBundlePostMessage(m_bundle, messageName.get(), messageBody.get());
-}
-
 void InjectedBundle::postSetWindowIsKey(bool isKey)
 {
     WKRetainPtr<WKStringRef> messageName(AdoptWK, WKStringCreateWithUTF8CString("SetWindowIsKey"));

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h (120540 => 120541)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.h	2012-06-17 00:39:25 UTC (rev 120541)
@@ -86,7 +86,6 @@
     void postAddChromeInputField();
     void postRemoveChromeInputField();
     void postFocusWebView();
-    void postSetBackingScaleFactor(double);
     void postSetWindowIsKey(bool);
 
 private:

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp (120540 => 120541)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp	2012-06-17 00:39:25 UTC (rev 120541)
@@ -537,8 +537,7 @@
 enum {
     AddChromeInputFieldCallbackID = 1,
     RemoveChromeInputFieldCallbackID,
-    FocusWebViewCallbackID,
-    SetBackingScaleFactorCallbackID
+    FocusWebViewCallbackID
 };
 
 static void cacheLayoutTestControllerCallback(unsigned index, JSValueRef callback)
@@ -581,12 +580,6 @@
     InjectedBundle::shared().postFocusWebView();
 }
 
-void LayoutTestController::setBackingScaleFactor(double backingScaleFactor, JSValueRef callback)
-{
-    cacheLayoutTestControllerCallback(SetBackingScaleFactorCallbackID, callback);
-    InjectedBundle::shared().postSetBackingScaleFactor(backingScaleFactor);
-}
-
 void LayoutTestController::setWindowIsKey(bool isKey)
 {
     InjectedBundle::shared().postSetWindowIsKey(isKey);
@@ -607,11 +600,6 @@
     callLayoutTestControllerCallback(FocusWebViewCallbackID);
 }
 
-void LayoutTestController::callSetBackingScaleFactorCallback()
-{
-    callLayoutTestControllerCallback(SetBackingScaleFactorCallbackID);
-}
-
 void LayoutTestController::overridePreference(JSStringRef preference, bool value)
 {
     WKBundleOverrideBoolPreferenceForTestRunner(InjectedBundle::shared().bundle(), InjectedBundle::shared().pageGroup(), toWK(preference).get(), value);

Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h (120540 => 120541)


--- trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h	2012-06-17 00:39:25 UTC (rev 120541)
@@ -192,14 +192,12 @@
     void addChromeInputField(JSValueRef);
     void removeChromeInputField(JSValueRef);
     void focusWebView(JSValueRef);
-    void setBackingScaleFactor(double, JSValueRef);
 
     void setWindowIsKey(bool);
 
     void callAddChromeInputFieldCallback();
     void callRemoveChromeInputFieldCallback();
     void callFocusWebViewCallback();
-    void callSetBackingScaleFactorCallback();
 
     void overridePreference(JSStringRef preference, bool value);
 

Modified: trunk/Tools/WebKitTestRunner/TestInvocation.cpp (120540 => 120541)


--- trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2012-06-17 00:35:48 UTC (rev 120540)
+++ trunk/Tools/WebKitTestRunner/TestInvocation.cpp	2012-06-17 00:39:25 UTC (rev 120541)
@@ -297,16 +297,6 @@
         return;
     }
 
-    if (WKStringIsEqualToUTF8CString(messageName, "SetBackingScaleFactor")) {
-        ASSERT(WKGetTypeID(messageBody) == WKDoubleGetTypeID());
-        double backingScaleFactor = WKDoubleGetValue(static_cast<WKDoubleRef>(messageBody));
-        WKPageSetCustomBackingScaleFactor(TestController::shared().mainWebView()->page(), backingScaleFactor);
-
-        WKRetainPtr<WKStringRef> messageName = adoptWK(WKStringCreateWithUTF8CString("CallSetBackingScaleFactorCallback"));
-        WKContextPostMessageToInjectedBundle(TestController::shared().context(), messageName.get(), 0);
-        return;
-    }
-
     ASSERT_NOT_REACHED();
 }
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to