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

mrobinson at webkit.org mrobinson at webkit.org
Wed Dec 22 11:39:46 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit ab8426af2aee9dc8b55dac0650e007ce1ff3c244
Author: mrobinson at webkit.org <mrobinson at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Aug 3 02:20:09 2010 +0000

    2010-08-02  Martin Robinson  <mrobinson at igalia.com>
    
            Reviewed by Xan Lopez.
    
            [GTK] DRT implement execCommand()
            https://bugs.webkit.org/show_bug.cgi?id=35351
    
            Enable tests which are now passing and re-organize some others that
            will pass once we have editing callbacks enabled.
    
            * platform/gtk/Skipped:
            * platform/gtk/editing/deleting/5300379-expected.txt: Added.
            * platform/gtk/editing/deleting/delete-to-end-of-paragraph-expected.txt:
            * platform/gtk/editing/deleting/smart-delete-003-expected.txt: Added.
            * platform/gtk/editing/deleting/smart-delete-004-expected.txt: Added.
            * platform/gtk/editing/selection/selection-actions-expected.txt: Added.
    2010-08-02  Martin Robinson  <mrobinson at igalia.com>
    
            Reviewed by Xan Lopez.
    
            [GTK] DRT implement execCommand()
            https://bugs.webkit.org/show_bug.cgi?id=35351
    
            * webkit/webkitprivate.h: Add some private methods for the DRT which enable
            LayoutTestController.execCommand and LayoutTestController.isCommandEnabled:
            webkit_web_view_execute_core_command_by_name and webkit_web_view_is_command_enabled.
            * webkit/webkitwebview.cpp:
            (webkit_web_view_execute_core_command_by_name): added.
            (webkit_web_view_is_command_enabled): Added.
    2010-08-02  Martin Robinson  <mrobinson at igalia.com>
    
            Reviewed by Xan Lopez.
    
            [GTK] DRT implement execCommand()
            https://bugs.webkit.org/show_bug.cgi?id=35351
    
            * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
            (LayoutTestController::execCommand): Implement using webkit_web_view_execute_core_command_by_name.
            (LayoutTestController::isCommandEnabled): Implement using webkit_web_view_is_command_enabled.
            (LayoutTestController::setCacheModel): Move below LayoutTestController::isCommandEnabled.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@64524 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 101ccab..e9b08ec 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,20 @@
+2010-08-02  Martin Robinson  <mrobinson at igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] DRT implement execCommand()
+        https://bugs.webkit.org/show_bug.cgi?id=35351
+
+        Enable tests which are now passing and re-organize some others that
+        will pass once we have editing callbacks enabled.
+
+        * platform/gtk/Skipped:
+        * platform/gtk/editing/deleting/5300379-expected.txt: Added.
+        * platform/gtk/editing/deleting/delete-to-end-of-paragraph-expected.txt:
+        * platform/gtk/editing/deleting/smart-delete-003-expected.txt: Added.
+        * platform/gtk/editing/deleting/smart-delete-004-expected.txt: Added.
+        * platform/gtk/editing/selection/selection-actions-expected.txt: Added.
+
 2010-08-02  Andrew Wilson  <atwilson at chromium.org>
 
         Unreviewed Chromium change to mark keydown-numpad-keys.html as failing on all platforms (not just linux)
diff --git a/LayoutTests/platform/gtk/Skipped b/LayoutTests/platform/gtk/Skipped
index 1b8998f..615a37e 100644
--- a/LayoutTests/platform/gtk/Skipped
+++ b/LayoutTests/platform/gtk/Skipped
@@ -622,7 +622,6 @@ editing/deleting/delete-ligature-002.html
 editing/deleting/delete-ligature-003.html
 editing/deleting/pruning-after-merge-1.html
 editing/deleting/skip-virama-001.html
-editing/deleting/smart-editing-disabled.html
 editing/inserting/5994480-2.html
 editing/inserting/insert-thai-characters-001.html
 editing/inserting/space-after-removeformat.html
@@ -662,7 +661,6 @@ editing/text-iterator/basic-iteration.html
 editing/deleting/4845371.html
 editing/deleting/5144139-2.html
 editing/deleting/5168598.html
-editing/deleting/5300379.html
 editing/deleting/5408255.html
 editing/deleting/delete-3857753-fix.html
 editing/deleting/delete-3865854-fix.html
@@ -739,8 +737,6 @@ editing/deleting/paragraph-in-preserveNewline.html
 editing/deleting/pruning-after-merge-2.html
 editing/deleting/smart-delete-001.html
 editing/deleting/smart-delete-002.html
-editing/deleting/smart-delete-003.html
-editing/deleting/smart-delete-004.html
 editing/deleting/table-cells.html
 editing/deleting/transpose-empty.html
 editing/deleting/whitespace-pre-1.html
@@ -937,10 +933,7 @@ editing/selection/4895428-4.html
 editing/selection/4932260-1.html
 editing/selection/4932260-2.html
 editing/selection/4932260-3.html
-editing/selection/4947387.html
 editing/selection/4975120.html
-editing/selection/5195166-1.html
-editing/selection/5195166-2.html
 editing/selection/5240265.html
 editing/selection/after-line-wrap.html
 editing/selection/caret-and-focus-ring.html
@@ -1004,7 +997,6 @@ editing/selection/select-element-paragraph-boundary.html
 editing/selection/select-from-textfield-outwards.html
 editing/selection/select-missing-image.html
 editing/selection/selection-3748164-fix.html
-editing/selection/selection-actions.html
 editing/selection/selection-background.html
 editing/selection/table-caret-1.html
 editing/selection/table-caret-2.html
@@ -5036,6 +5028,62 @@ http/tests/plugins/plugin-document-has-focus.html
 editing/text-iterator/thai-cursor-movement.html
 editing/undo/redo-style.html
 editing/undo/undo-indent.html
+editing/execCommand/indent-with-style.html
+editing/execCommand/4641880-1.html
+editing/execCommand/4641880-2.html
+editing/execCommand/create-list-from-range-selection.html
+editing/execCommand/create-list-with-hr.html
+editing/execCommand/find-after-replace.html
+editing/execCommand/findString-2.html
+editing/execCommand/findString.html
+editing/execCommand/format-block-from-range-selection.html
+editing/execCommand/format-block-with-braces.html
+editing/execCommand/format-block-with-trailing-br.html
+editing/execCommand/format-block.html
+editing/execCommand/hilitecolor.html
+editing/execCommand/indent-empty-root.html
+editing/execCommand/indent-list-item.html
+editing/execCommand/indent-selection.html
+editing/execCommand/insert-list-and-stitch.html
+editing/execCommand/insertHorizontalRule.html
+editing/execCommand/insertImage.html
+editing/execCommand/nsresponder-indent.html
+editing/execCommand/nsresponder-outdent.html
+editing/execCommand/outdent-selection.html
+editing/execCommand/paste-1.html
+editing/execCommand/paste-2.html
+editing/execCommand/print.html
+editing/execCommand/remove-formatting-2.html
+editing/execCommand/remove-formatting.html
+editing/execCommand/remove-list-from-range-selection.html
+editing/execCommand/remove-list-item-1.html
+editing/execCommand/selectAll.html
+editing/execCommand/createLink.html
+editing/execCommand/enabling-and-selection-2.html
+editing/execCommand/findString-diacriticals.html
+editing/execCommand/indent-nested-lists-1.html
+editing/execCommand/indent-nested-lists-2.html
+editing/execCommand/indent-nested-lists-3.html
+editing/execCommand/indent-nested-lists-4.html
+editing/execCommand/indent-nested-lists-5.html
+editing/execCommand/indent-nested-lists-6.html
+editing/execCommand/indent-nested-lists-7.html
+editing/execCommand/insertHTML.html
+editing/execCommand/outdent-blockquote-test1.html
+editing/execCommand/outdent-blockquote-test2.html
+editing/execCommand/outdent-blockquote-test3.html
+editing/execCommand/outdent-blockquote-test4.html
+editing/execCommand/outdent-nested-lists-1.html
+editing/execCommand/outdent-nested-lists-2.html
+editing/execCommand/outdent-nested-lists-3.html
+editing/execCommand/outdent-nested-lists-4.html
+editing/execCommand/queryCommandState-01.html
+editing/execCommand/remove-list-1.html
+editing/execCommand/remove-list-items.html
+editing/execCommand/switch-list-type.html
+editing/execCommand/unlink.html
+editing/selection/4947387.html
+editing/selection/5195166-2.html
 
 # Requires expected results that we don't have atm
 editing/inserting/break-blockquote-after-delete.html
@@ -5733,65 +5781,6 @@ editing/pasteboard/5761530-1.html
 # Speech input is not yet enabled.
 fast/speech
 
-# Tests failing because we lack execCommand support.
-# https://bugs.webkit.org/show_bug.cgi?id=35351
-editing/execCommand/indent-with-style.html
-editing/execCommand/4641880-1.html
-editing/execCommand/4641880-2.html
-editing/execCommand/create-list-from-range-selection.html
-editing/execCommand/create-list-with-hr.html
-editing/execCommand/find-after-replace.html
-editing/execCommand/findString-2.html
-editing/execCommand/findString.html
-editing/execCommand/format-block-from-range-selection.html
-editing/execCommand/format-block-with-braces.html
-editing/execCommand/format-block-with-trailing-br.html
-editing/execCommand/format-block.html
-editing/execCommand/hilitecolor.html
-editing/execCommand/indent-empty-root.html
-editing/execCommand/indent-list-item.html
-editing/execCommand/indent-selection.html
-editing/execCommand/insert-list-and-stitch.html
-editing/execCommand/insertHorizontalRule.html
-editing/execCommand/insertImage.html
-editing/execCommand/nsresponder-indent.html
-editing/execCommand/nsresponder-outdent.html
-editing/execCommand/outdent-selection.html
-editing/execCommand/paste-1.html
-editing/execCommand/paste-2.html
-editing/execCommand/print.html
-editing/execCommand/remove-formatting-2.html
-editing/execCommand/remove-formatting.html
-editing/execCommand/remove-list-from-range-selection.html
-editing/execCommand/remove-list-item-1.html
-editing/execCommand/selectAll.html
-editing/execCommand/createLink.html
-editing/execCommand/delete-image-in-anchor.html
-editing/execCommand/enabling-and-selection-2.html
-editing/execCommand/findString-diacriticals.html
-editing/execCommand/indent-nested-lists-1.html
-editing/execCommand/indent-nested-lists-2.html
-editing/execCommand/indent-nested-lists-3.html
-editing/execCommand/indent-nested-lists-4.html
-editing/execCommand/indent-nested-lists-5.html
-editing/execCommand/indent-nested-lists-6.html
-editing/execCommand/indent-nested-lists-7.html
-editing/execCommand/insertHTML.html
-editing/execCommand/outdent-blockquote-test1.html
-editing/execCommand/outdent-blockquote-test2.html
-editing/execCommand/outdent-blockquote-test3.html
-editing/execCommand/outdent-blockquote-test4.html
-editing/execCommand/outdent-nested-lists-1.html
-editing/execCommand/outdent-nested-lists-2.html
-editing/execCommand/outdent-nested-lists-3.html
-editing/execCommand/outdent-nested-lists-4.html
-editing/execCommand/queryCommandState-01.html
-editing/execCommand/remove-list-1.html
-editing/execCommand/remove-list-items.html
-editing/execCommand/switch-list-type.html
-editing/execCommand/unlink.html
-editing/selection/extend-forward-after-set-base-and-extent.html
-
 # Missing DRT API.
 http/tests/loading/preload-slow-loading.php
 
@@ -5870,3 +5859,8 @@ editing/pasteboard/drop-link.html
 # Flaky due to JSC debugger issue.
 # https://bugs.webkit.org/show_bug.cgi?id=43034
 inspector/debugger-breakpoints-not-activated-on-reload.html
+
+# Fails because multiple clicks in a row in the same place
+# register as a triple-click even though the mouse have moved
+# outside of the double-click distance.
+editing/selection/5195166-1.html
diff --git a/LayoutTests/platform/gtk/editing/deleting/5300379-expected.txt b/LayoutTests/platform/gtk/editing/deleting/5300379-expected.txt
new file mode 100644
index 0000000..c3d26c8
--- /dev/null
+++ b/LayoutTests/platform/gtk/editing/deleting/5300379-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {DIV} at (0,0) size 784x0
+      RenderBlock {DIV} at (0,0) size 784x20
+        RenderText {#text} at (0,0) size 50x20
+          text run at (0,0) width 50: "Success"
+      RenderBlock {DIV} at (0,20) size 784x0
+caret: position 7 of child 0 {#text} of child 2 {DIV} of body
diff --git a/LayoutTests/platform/gtk/editing/deleting/delete-to-end-of-paragraph-expected.txt b/LayoutTests/platform/gtk/editing/deleting/delete-to-end-of-paragraph-expected.txt
index 118ee7e..a8323a1 100644
--- a/LayoutTests/platform/gtk/editing/deleting/delete-to-end-of-paragraph-expected.txt
+++ b/LayoutTests/platform/gtk/editing/deleting/delete-to-end-of-paragraph-expected.txt
@@ -3,10 +3,8 @@ layer at (0,0) size 800x600
 layer at (0,0) size 800x600
   RenderBlock {HTML} at (0,0) size 800x600
     RenderBody {BODY} at (8,8) size 784x584
-      RenderBlock {DIV} at (0,0) size 600x30
-        RenderText {#text} at (0,0) size 132x30
-          text run at (0,0) width 132: "one two three"
-      RenderBlock {DIV} at (0,30) size 784x20
-        RenderText {#text} at (0,0) size 76x20
-          text run at (0,0) width 76: "four five six"
-caret: position 0 of child 0 {#text} of child 1 {DIV} of body
+      RenderBlock {DIV} at (0,0) size 600x20
+        RenderInline {SPAN} at (0,0) size 76x20
+          RenderText {#text} at (0,0) size 76x20
+            text run at (0,0) width 76: "four five six"
+caret: position 0 of child 0 {#text} of child 0 {SPAN} of child 1 {DIV} of body
diff --git a/LayoutTests/platform/gtk/editing/deleting/smart-delete-003-expected.txt b/LayoutTests/platform/gtk/editing/deleting/smart-delete-003-expected.txt
new file mode 100644
index 0000000..3a2c75e
--- /dev/null
+++ b/LayoutTests/platform/gtk/editing/deleting/smart-delete-003-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {P} at (0,0) size 784x40
+        RenderText {#text} at (0,0) size 768x40
+          text run at (0,0) width 392: "This tests deleting a selection created with a word granularity. "
+          text run at (392,0) width 348: "To run it manually, double click on 'bar' and hit delete. "
+          text run at (740,0) width 28: "You"
+          text run at (0,20) width 127: "should see 'foo baz'."
+      RenderBlock {DIV} at (0,56) size 784x20
+        RenderText {#text} at (0,0) size 25x20
+          text run at (0,0) width 25: "foo "
+        RenderText {#text} at (25,0) size 26x20
+          text run at (25,0) width 26: " baz"
+caret: position 4 of child 0 {#text} of child 2 {DIV} of body
diff --git a/LayoutTests/platform/gtk/editing/deleting/smart-delete-004-expected.txt b/LayoutTests/platform/gtk/editing/deleting/smart-delete-004-expected.txt
new file mode 100644
index 0000000..1ba15a7
--- /dev/null
+++ b/LayoutTests/platform/gtk/editing/deleting/smart-delete-004-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderBlock {P} at (0,0) size 784x40
+        RenderText {#text} at (0,0) size 745x40
+          text run at (0,0) width 392: "This tests deleting a selection created with a word granularity. "
+          text run at (392,0) width 353: "To run it manually, double click on 'bar' and hit forward"
+          text run at (0,20) width 45: "delete. "
+          text run at (45,20) width 159: "You should see 'foo baz'."
+      RenderBlock {DIV} at (0,56) size 784x20
+        RenderText {#text} at (0,0) size 25x20
+          text run at (0,0) width 25: "foo "
+        RenderText {#text} at (25,0) size 26x20
+          text run at (25,0) width 26: " baz"
+caret: position 4 of child 0 {#text} of child 2 {DIV} of body
diff --git a/LayoutTests/platform/gtk/editing/selection/selection-actions-expected.txt b/LayoutTests/platform/gtk/editing/selection/selection-actions-expected.txt
new file mode 100644
index 0000000..c8b118a
--- /dev/null
+++ b/LayoutTests/platform/gtk/editing/selection/selection-actions-expected.txt
@@ -0,0 +1,34 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+  RenderBlock {HTML} at (0,0) size 800x600
+    RenderBody {BODY} at (8,8) size 784x584
+      RenderText {#text} at (0,0) size 772x40
+        text run at (0,0) width 772: "This tests whether certain NSResponder methods that should only operate on editable regions modify a selection that is not"
+        text run at (0,20) width 132: "in an editable region."
+      RenderBR {BR} at (132,35) size 0x0
+      RenderText {#text} at (0,40) size 84x20
+        text run at (0,40) width 84: "This is a para"
+      RenderInline {SPAN} at (0,0) size 8x20 [color=#0000FF]
+        RenderText {#text} at (84,40) size 8x20
+          text run at (84,40) width 8: "g"
+      RenderText {#text} at (92,40) size 32x20
+        text run at (92,40) width 32: "raph."
+      RenderBR {BR} at (124,55) size 0x0
+      RenderText {#text} at (0,60) size 63x20
+        text run at (0,60) width 63: "Some text"
+      RenderBR {BR} at (63,75) size 0x0
+      RenderText {#text} at (0,80) size 63x20
+        text run at (0,80) width 63: "Some text"
+      RenderBR {BR} at (63,95) size 0x0
+      RenderText {#text} at (0,100) size 63x20
+        text run at (0,100) width 63: "Some text"
+      RenderBR {BR} at (63,115) size 0x0
+      RenderText {#text} at (0,120) size 63x20
+        text run at (0,120) width 63: "Some text"
+      RenderBR {BR} at (63,135) size 0x0
+      RenderText {#text} at (0,140) size 124x20
+        text run at (0,140) width 124: "This is a paragraph."
+      RenderText {#text} at (0,0) size 0x0
+selection start: position 11 of child 2 {#text} of body
+selection end:   position 1 of child 7 {BR} of body
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 3d3436f..2d02015 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,17 @@
+2010-08-02  Martin Robinson  <mrobinson at igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] DRT implement execCommand()
+        https://bugs.webkit.org/show_bug.cgi?id=35351
+
+        * webkit/webkitprivate.h: Add some private methods for the DRT which enable
+        LayoutTestController.execCommand and LayoutTestController.isCommandEnabled:
+        webkit_web_view_execute_core_command_by_name and webkit_web_view_is_command_enabled.
+        * webkit/webkitwebview.cpp: 
+        (webkit_web_view_execute_core_command_by_name): added.
+        (webkit_web_view_is_command_enabled): Added.
+
 2010-07-27  Luiz Agostini  <luiz.agostini at openbossa.org>
 
         Reviewed by Darin Fisher.
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index 3ce77e6..aa19bec 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -273,6 +273,12 @@ extern "C" {
     void
     webkit_web_view_set_tooltip_text(WebKitWebView*, const char*);
 
+    WEBKIT_API void
+    webkit_web_view_execute_core_command_by_name(WebKitWebView* webView, const gchar* name, const gchar* value);
+
+    WEBKIT_API gboolean
+    webkit_web_view_is_command_enabled(WebKitWebView* webView, const gchar* name);
+
     WebKitDownload*
     webkit_download_new_with_handle(WebKitNetworkRequest* request, WebCore::ResourceHandle* handle, const WebCore::ResourceResponse& response);
 
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 8747d42..6640630 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -4658,3 +4658,20 @@ WebKitCacheModel webkit_get_cache_model()
     webkit_init();
     return cacheModel;
 }
+
+void webkit_web_view_execute_core_command_by_name(WebKitWebView* webView, const gchar* name, const gchar* value)
+{
+    g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
+    g_return_if_fail(name);
+    g_return_if_fail(value);
+
+    core(webView)->focusController()->focusedOrMainFrame()->editor()->command(name).execute(value);
+}
+
+gboolean webkit_web_view_is_command_enabled(WebKitWebView* webView, const gchar* name)
+{
+    g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), FALSE);
+    g_return_val_if_fail(name, FALSE);
+
+    return core(webView)->focusController()->focusedOrMainFrame()->editor()->command(name).isEnabled();
+}
diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog
index 987fe7c..5e3c5a5 100644
--- a/WebKitTools/ChangeLog
+++ b/WebKitTools/ChangeLog
@@ -1,3 +1,15 @@
+2010-08-02  Martin Robinson  <mrobinson at igalia.com>
+
+        Reviewed by Xan Lopez.
+
+        [GTK] DRT implement execCommand()
+        https://bugs.webkit.org/show_bug.cgi?id=35351
+
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        (LayoutTestController::execCommand): Implement using webkit_web_view_execute_core_command_by_name.
+        (LayoutTestController::isCommandEnabled): Implement using webkit_web_view_is_command_enabled.
+        (LayoutTestController::setCacheModel): Move below LayoutTestController::isCommandEnabled.
+
 2010-08-02  Sam Weinig  <sam at webkit.org>
 
         Reviewed by Anders Carlsson.
diff --git a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
index 2aece10..43ad9f4 100644
--- a/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
+++ b/WebKitTools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
@@ -60,6 +60,8 @@ int webkit_web_frame_page_number_for_element_by_id(WebKitWebFrame* frame, const
 int webkit_web_frame_number_of_pages(WebKitWebFrame* frame, float pageWidth, float pageHeight);
 void webkit_web_inspector_execute_script(WebKitWebInspector* inspector, long callId, const gchar* script);
 gchar* webkit_web_frame_marker_text_for_list_item(WebKitWebFrame* frame, JSContextRef context, JSValueRef nodeObject);
+void webkit_web_view_execute_core_command_by_name(WebKitWebView* webView, const gchar* name, const gchar* value);
+gboolean webkit_web_view_is_command_enabled(WebKitWebView* webView, const gchar* name);
 }
 
 static gchar* copyWebSettingKey(gchar* preferenceKey)
@@ -504,18 +506,30 @@ bool LayoutTestController::elementDoesAutoCompleteForElementWithId(JSStringRef i
 
 void LayoutTestController::execCommand(JSStringRef name, JSStringRef value)
 {
-    // FIXME: implement
+    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
+    ASSERT(view);
+
+    gchar* cName = JSStringCopyUTF8CString(name);
+    gchar* cValue = JSStringCopyUTF8CString(value);
+    webkit_web_view_execute_core_command_by_name(view, cName, cValue);
+    g_free(cName);
+    g_free(cValue);
 }
 
-void LayoutTestController::setCacheModel(int)
+bool LayoutTestController::isCommandEnabled(JSStringRef name)
 {
-    // FIXME: implement
+    WebKitWebView* view = webkit_web_frame_get_web_view(mainFrame);
+    ASSERT(view);
+
+    gchar* cName = JSStringCopyUTF8CString(name);
+    gboolean result = webkit_web_view_is_command_enabled(view, cName);
+    g_free(cName);
+    return result;
 }
 
-bool LayoutTestController::isCommandEnabled(JSStringRef /*name*/)
+void LayoutTestController::setCacheModel(int)
 {
     // FIXME: implement
-    return false;
 }
 
 void LayoutTestController::setPersistentUserStyleSheetLocation(JSStringRef jsURL)

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list