WebKitTools:
authorweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Sep 2007 03:58:16 +0000 (03:58 +0000)
committerweinig <weinig@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 5 Sep 2007 03:58:16 +0000 (03:58 +0000)
        Reviewed by Adam.

        Fix for <rdar://problem/5382277>
        Implement eventSender.textZoomIn and eventSender.textZoomOut for windows DRT.

        * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EventSender.cpp:
        (textZoomInCallback):
        (textZoomOutCallback):

LayoutTests:

        Reviewed by Adam.

        Fix for <rdar://problem/5382277>
        Remove fast/css/ignore-text-zoom.html from skip list now that
        eventSender.textZoomIn is supported.

        * platform/win/Skipped:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25364 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/platform/win/Skipped
WebKitTools/ChangeLog
WebKitTools/DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EventSender.cpp

index 9c87352944a542e3934d828f0364bb2bd22a36e8..200f02715b7fc1ed225237b3a686d105dccd5bf8 100644 (file)
@@ -1,3 +1,13 @@
+2007-09-04  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Adam.
+
+        Fix for <rdar://problem/5382277>
+        Remove fast/css/ignore-text-zoom.html from skip list now that 
+        eventSender.textZoomIn is supported.
+
+        * platform/win/Skipped:
+
 2007-09-04  Adele Peterson  <adele@apple.com>
 
         Updated test for <rdar://problem/5279521>.  The old test didn't crash before the fix.
index adcafe80ede1174bba2571fb50eeb31d44d36815..b7e97579b117b66e2ce09ca1ac25f6577f50e973 100644 (file)
@@ -493,9 +493,6 @@ editing/selection/5109817.html
 editing/selection/5354455-1.html
 editing/selection/5354455-2.html
 
-# eventSender.textZoomIn is unimplemented <rdar://problem/5382277>
-fast/css/ignore-text-zoom.html
-
 # layoutTestController.setCustomPolicyDelegate is unimplemented <rdar://problem/5382546>
 http/tests/security/feed-urls-from-remote.html
 
index 55cb73376304b5938512cddf74162bd584cc04a7..13317134b288f823fc7a93f5e2860e092369361f 100644 (file)
@@ -1,3 +1,14 @@
+2007-09-04  Sam Weinig  <sam@webkit.org>
+
+        Reviewed by Adam.
+
+        Fix for <rdar://problem/5382277>
+        Implement eventSender.textZoomIn and eventSender.textZoomOut for windows DRT.
+
+        * DumpRenderTree/DumpRenderTree.vcproj/DumpRenderTree/EventSender.cpp:
+        (textZoomInCallback):
+        (textZoomOutCallback):
+
 2007-08-29  David Kilzer  <ddkilzer@apple.com>
 
         Reviewed by Adam.
index 62a61c3caee74c2119e4f727a0ad81cb87817093..291c5599cf115ece76274fc4ccd4b0c8845b73e8 100644 (file)
@@ -305,12 +305,42 @@ static JSValueRef keyDownCallback(JSContextRef context, JSObjectRef function, JS
     return JSValueMakeUndefined(context);
 }
 
+static JSValueRef textZoomInCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    COMPtr<IWebView> webView;
+    if (FAILED(frame->webView(&webView)))
+        return JSValueMakeUndefined(context);
+
+    COMPtr<IWebIBActions> webIBActions;
+    if (FAILED(webView->QueryInterface(IID_IWebIBActions, (void**)&webIBActions)))
+        return JSValueMakeUndefined(context);
+
+    webIBActions->makeTextLarger(0);
+    return JSValueMakeUndefined(context);
+}
+
+static JSValueRef textZoomOutCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
+{
+    COMPtr<IWebView> webView;
+    if (FAILED(frame->webView(&webView)))
+        return JSValueMakeUndefined(context);
+
+    COMPtr<IWebIBActions> webIBActions;
+    if (FAILED(webView->QueryInterface(IID_IWebIBActions, (void**)&webIBActions)))
+        return JSValueMakeUndefined(context);
+
+    webIBActions->makeTextSmaller(0);
+    return JSValueMakeUndefined(context);
+}
+
 static JSStaticFunction staticFunctions[] = {
     { "mouseDown", mouseDownCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     { "mouseUp", mouseUpCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     { "mouseMoveTo", mouseMoveToCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     { "leapForward", leapForwardCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     { "keyDown", keyDownCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+    { "textZoomIn", textZoomInCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
+    { "textZoomOut", textZoomOutCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
     { 0, 0, 0 }
 };