[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

darin at apple.com darin at apple.com
Wed Dec 22 11:32:58 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ba2d62ffbbb651afed648a70eb3ce08c4c9f589e
Author: darin at apple.com <darin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Jul 29 01:27:06 2010 +0000

    WebKitTestRunner needs to support layoutTestController.execCommand
    <https://bugs.webkit.org/show_bug.cgi?id=42538>
    
    Reviewed by Sam Weinig.
    
    WebKitTestRunner needs layoutTestController.isCommandEnabled
    <https://bugs.webkit.org/show_bug.cgi?id=42671>
    
    WebKit2:
    
    * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
    (WKBundlePageExecuteEditingCommand): Added.
    (WKBundlePageIsEditingCommandEnabled): Added.
    * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Ditto.
    
    * WebProcess/WebPage/WebPage.cpp:
    (WebKit::WebPage::executeEditingCommand): Added.
    (WebKit::WebPage::isEditingCommandEnabled): Added.
    * WebProcess/WebPage/WebPage.h: Ditto.
    
    WebKitTools:
    
    * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
    Added execCommand and isCommandEnabled.
    * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
    (WTR::LayoutTestController::execCommand): Added.
    (WTR::LayoutTestController::isCommandEnabled): Added.
    * WebKitTestRunner/InjectedBundle/LayoutTestController.h: Ditto.
    
    LayoutTests:
    
    * platform/mac-wk2/Skipped: Don't skip the now-functioning tests.
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64251 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index abec234..9a4ab04 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,15 @@
+2010-07-28  Darin Adler  <darin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        WebKitTestRunner needs to support layoutTestController.execCommand
+        <https://bugs.webkit.org/show_bug.cgi?id=42538>
+
+        WebKitTestRunner needs layoutTestController.isCommandEnabled
+        <https://bugs.webkit.org/show_bug.cgi?id=42671>
+
+        * platform/mac-wk2/Skipped: Don't skip the now-functioning tests.
+
 2010-07-28  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/LayoutTests/platform/mac-wk2/Skipped b/LayoutTests/platform/mac-wk2/Skipped
index 87a0957..99ca9e9 100644
--- a/LayoutTests/platform/mac-wk2/Skipped
+++ b/LayoutTests/platform/mac-wk2/Skipped
@@ -2007,14 +2007,6 @@ fast/frames/flattening/iframe-flattening-fixed-width.html
 fast/frames/flattening/iframe-flattening-offscreen.html
 fast/frames/flattening/iframe-flattening-simple.html
 
-# WebKitTestRunner needs to support layoutTestController.execCommand
-# <https://bugs.webkit.org/show_bug.cgi?id=42538>
-editing/deleting/5300379.html
-editing/deleting/smart-editing-disabled.html
-editing/execCommand/delete-image-in-anchor.html
-editing/selection/extend-forward-after-set-base-and-extent.html
-editing/selection/select-line.html
-
 # WebKitTestRunner needs layoutTestController.clearAllDatabases
 # <https://bugs.webkit.org/show_bug.cgi?id=42540>
 storage/change-version.html
@@ -2133,10 +2125,6 @@ transitions/transition-shorthand-delay.html
 # <https://bugs.webkit.org/show_bug.cgi?id=42669>
 editing/execCommand/clipboard-access.html
 
-# WebKitTestRunner needs layoutTestController.isCommandEnabled
-# <https://bugs.webkit.org/show_bug.cgi?id=42671>
-editing/execCommand/enabling-and-selection-2.html
-
 # WebKitTestRunner needs layoutTestController.queueReload
 # <https://bugs.webkit.org/show_bug.cgi?id=42672>
 fast/css/compare-content-style.html
@@ -2351,6 +2339,9 @@ http/tests/loading/basic-auth-resend-wrong-credentials.html
 http/tests/loading/basic-credentials-sent-automatically.html
 http/tests/security/401-logout/401-logout.php
 
+# WebKitTestRunner needs layoutTestController.setSmartInsertDeleteEnabled
+editing/deleting/smart-editing-disabled.html
+
 # Unexplained failures that were formerly in the dumpChildFramesAsText list.
 fast/frames/sandboxed-iframe-noscript.html
 fast/frames/sandboxed-iframe-storage.html
diff --git a/WebKit2/ChangeLog b/WebKit2/ChangeLog
index bca74f7..9ad16e0 100644
--- a/WebKit2/ChangeLog
+++ b/WebKit2/ChangeLog
@@ -1,3 +1,23 @@
+2010-07-28  Darin Adler  <darin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        WebKitTestRunner needs to support layoutTestController.execCommand
+        <https://bugs.webkit.org/show_bug.cgi?id=42538>
+
+        WebKitTestRunner needs layoutTestController.isCommandEnabled
+        <https://bugs.webkit.org/show_bug.cgi?id=42671>
+
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
+        (WKBundlePageExecuteEditingCommand): Added.
+        (WKBundlePageIsEditingCommandEnabled): Added.
+        * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Ditto.
+
+        * WebProcess/WebPage/WebPage.cpp:
+        (WebKit::WebPage::executeEditingCommand): Added.
+        (WebKit::WebPage::isEditingCommandEnabled): Added.
+        * WebProcess/WebPage/WebPage.h: Ditto.
+
 2010-07-28  Anders Carlsson  <andersca at apple.com>
 
         Fix 64-bit build.
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
index 2f03789..fe6b314 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
@@ -60,3 +60,13 @@ WKStringRef WKBundlePageCopyRenderTreeExternalRepresentation(WKBundlePageRef pag
 {
     return toCopiedRef(toWK(pageRef)->renderTreeExternalRepresentation());
 }
+
+void WKBundlePageExecuteEditingCommand(WKBundlePageRef pageRef, WKStringRef name, WKStringRef argument)
+{
+    toWK(pageRef)->executeEditingCommand(toWK(name)->string(), toWK(argument)->string());
+}
+
+bool WKBundlePageIsEditingCommandEnabled(WKBundlePageRef pageRef, WKStringRef name)
+{
+    return toWK(pageRef)->isEditingCommandEnabled(toWK(name)->string());
+}
diff --git a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h
index e738d4c..97ba128 100644
--- a/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h
+++ b/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h
@@ -34,6 +34,8 @@ extern "C" {
 #endif
 
 WK_EXPORT WKStringRef WKBundlePageCopyRenderTreeExternalRepresentation(WKBundlePageRef page);
+WK_EXPORT void WKBundlePageExecuteEditingCommand(WKBundlePageRef page, WKStringRef commandName, WKStringRef argument);
+WK_EXPORT bool WKBundlePageIsEditingCommandEnabled(WKBundlePageRef page, WKStringRef commandName);
 
 #ifdef __cplusplus
 }
diff --git a/WebKit2/WebProcess/WebPage/WebPage.cpp b/WebKit2/WebProcess/WebPage/WebPage.cpp
index 504b837..ffd01d6 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -154,6 +154,16 @@ String WebPage::renderTreeExternalRepresentation() const
     return externalRepresentation(m_mainFrame->coreFrame(), RenderAsTextBehaviorNormal);
 }
 
+void WebPage::executeEditingCommand(const String& commandName, const String& argument)
+{
+    m_mainFrame->coreFrame()->editor()->command(commandName).execute(argument);
+}
+
+bool WebPage::isEditingCommandEnabled(const String& commandName)
+{
+    return m_mainFrame->coreFrame()->editor()->command(commandName).isEnabled();
+}
+
 #if USE(ACCELERATED_COMPOSITING)
 void WebPage::changeAcceleratedCompositingMode(WebCore::GraphicsLayer* layer)
 {
diff --git a/WebKit2/WebProcess/WebPage/WebPage.h b/WebKit2/WebProcess/WebPage/WebPage.h
index 172bce6..2fe25d3 100644
--- a/WebKit2/WebProcess/WebPage/WebPage.h
+++ b/WebKit2/WebProcess/WebPage/WebPage.h
@@ -102,7 +102,10 @@ public:
     InjectedBundlePageUIClient& injectedBundleUIClient() { return m_uiClient; }
 
     WebFrame* mainFrame() const { return m_mainFrame.get(); }
+
     WebCore::String renderTreeExternalRepresentation() const;
+    void executeEditingCommand(const WebCore::String& commandName, const WebCore::String& argument);
+    bool isEditingCommandEnabled(const WebCore::String& commandName);
 
 #if USE(ACCELERATED_COMPOSITING)
     void changeAcceleratedCompositingMode(WebCore::GraphicsLayer*);
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 747fd90..ce581dd 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,20 @@
+2010-07-28  Darin Adler  <darin at apple.com>
+
+        Reviewed by Sam Weinig.
+
+        WebKitTestRunner needs to support layoutTestController.execCommand
+        <https://bugs.webkit.org/show_bug.cgi?id=42538>
+
+        WebKitTestRunner needs layoutTestController.isCommandEnabled
+        <https://bugs.webkit.org/show_bug.cgi?id=42671>
+
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        Added execCommand and isCommandEnabled.
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        (WTR::LayoutTestController::execCommand): Added.
+        (WTR::LayoutTestController::isCommandEnabled): Added.
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h: Ditto.
+
 2010-07-28  Kent Tamura  <tkent at chromium.org>
 
         Reviewed by Dimitri Glazkov.
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
index 6d4fd65..a0fbb85 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
@@ -46,6 +46,8 @@ module WTR {
         object computedStyleIncludingVisitedInfo(in object element);
         DOMString counterValueForElementById(in DOMString elementId);
         DOMString markerTextForListItem(in object element);
+        void execCommand(in DOMString name, in DOMString argument);
+        boolean isCommandEnabled(in DOMString name);
 
         // Repaint testing.
         void testRepaint();
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
index e760fe8..2f59eb1 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
@@ -31,6 +31,7 @@
 #include <JavaScriptCore/JSRetainPtr.h>
 #include <WebKit2/WKBundleFrame.h>
 #include <WebKit2/WKBundleFramePrivate.h>
+#include <WebKit2/WKBundlePagePrivate.h>
 #include <WebKit2/WKRetainPtr.h>
 #include <WebKit2/WKStringCF.h>
 #include <WebKit2/WebKit2.h>
@@ -231,6 +232,16 @@ JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSValueRef
     return toJS(text);
 }
 
+void LayoutTestController::execCommand(JSStringRef name, JSStringRef argument)
+{
+    WKBundlePageExecuteEditingCommand(InjectedBundle::shared().page()->page(), toWK(name).get(), toWK(argument).get());
+}
+
+bool LayoutTestController::isCommandEnabled(JSStringRef name)
+{
+    return WKBundlePageIsEditingCommandEnabled(InjectedBundle::shared().page()->page(), toWK(name).get());
+}
+
 // Object Creation
 
 void LayoutTestController::makeWindowObject(JSContextRef context, JSObjectRef windowObject, JSValueRef* exception)
diff --git a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
index 3a10854..9f0641b 100644
--- a/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
+++ b/WebKitTools/WebKitTestRunner/InjectedBundle/LayoutTestController.h
@@ -65,6 +65,8 @@ public:
     JSValueRef computedStyleIncludingVisitedInfo(JSValueRef element);
     JSRetainPtr<JSStringRef> counterValueForElementById(JSStringRef elementId);
     JSRetainPtr<JSStringRef> markerTextForListItem(JSValueRef element);
+    void execCommand(JSStringRef name, JSStringRef argument);
+    bool isCommandEnabled(JSStringRef name);
 
     // Repaint testing.
     void testRepaint() { m_testRepaint = true; }

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list