[EFL][DRT] Implement LayoutTestController::execCommand
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 May 2012 09:20:40 +0000 (09:20 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 7 May 2012 09:20:40 +0000 (09:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=82286

Patch by Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com> on 2012-05-07
Reviewed by Antonio Gomes.

Source/WebKit/efl:

Add missing implementation execCommand and isCommandEnabled to EFL's
DumpRenderTreeSupport to execute an internal command and check if the
command is enabled.

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::executeCoreCommandByName):
(DumpRenderTreeSupportEfl::isCommandEnabled):
* WebCoreSupport/DumpRenderTreeSupportEfl.h:

Tools:

Add missing implementation execCommand and isCommandEnabled to EFL's
LayoutTestController.

* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::execCommand):
(LayoutTestController::isCommandEnabled):

LayoutTests:

Unskipped test cases which rely on execCommand and
updated test expectations for failure test cases.

* platform/efl/Skipped:
* platform/efl/test_expectations.txt:

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

LayoutTests/ChangeLog
LayoutTests/platform/efl/Skipped
LayoutTests/platform/efl/test_expectations.txt
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
Tools/ChangeLog
Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp

index 6c6c57d9f5a5c222bc54c14e610bc3236b4fdf94..a435bae78d753de3e0f78248a242dafd5ab6d31b 100644 (file)
@@ -1,3 +1,16 @@
+2012-05-07  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
+
+        [EFL][DRT] Implement LayoutTestController::execCommand
+        https://bugs.webkit.org/show_bug.cgi?id=82286
+
+        Reviewed by Antonio Gomes.
+
+        Unskipped test cases which rely on execCommand and 
+        updated test expectations for failure test cases.
+
+        * platform/efl/Skipped:
+        * platform/efl/test_expectations.txt:
+
 2012-05-07  Andrey Kosyakov  <caseq@chromium.org>
 
         Unreviewed gardening, compositing/overflow/scrollbar-painting.html times out on mac & linux.
index bb53787adbec679afaee6026f57c6c68bbde647a..d16ed2033ea925434acc612a56311fa05157cddc 100644 (file)
@@ -325,9 +325,8 @@ fast/frames/location-change-no-file-access.html
 fast/xmlhttprequest/xmlhttprequest-no-file-access.html
 fast/xmlhttprequest/xmlhttprequest-nonexistent-file.html
 
-# EFL's LayoutTestController does not implement execCommand
+# BUG84835: Tests failing because of missing editing delegate callbacks.
 editing/deleting
-editing/execCommand
 editing/inserting
 editing/pasteboard
 editing/selection
index 8f3acc1df3f117325fdfe08cbd3fd27bf4e86eef..9ded56d4ecd942ac0f5d82e2554cb378a16ce826 100644 (file)
@@ -296,3 +296,79 @@ BUGWK85689 SKIP : fast/animation/request-animation-frame-disabled.html = TEXT
 
 // Crash shared with the GTK+ port
 BUGWK30724 : fast/loader/opaque-base-url.html = CRASH
+
+// EFL's DumpRenderTree should support LayoutTestController's dumpEditingCallbacks()
+BUGWK84835 : editing/execCommand/4128080-2.html = TEXT
+BUGWK84835 : editing/execCommand/5939887.html = TEXT
+BUGWK84835 : editing/execCommand/copy-without-selection.html = TEXT
+BUGWK84835 : editing/execCommand/createLink.html = TEXT
+BUGWK84835 : editing/execCommand/enabling-and-selection.html = TEXT
+BUGWK84835 : editing/execCommand/findString-diacriticals.html = TEXT
+BUGWK84835 : editing/execCommand/format-block-with-braces.html = TEXT
+BUGWK84835 : editing/execCommand/format-block-with-trailing-br.html = TEXT
+BUGWK84835 : editing/execCommand/format-block.html = TEXT
+BUGWK84835 : editing/execCommand/hilitecolor.html = TEXT
+BUGWK84835 : editing/execCommand/indent-nested-lists-1.html = TEXT
+BUGWK84835 : editing/execCommand/indent-nested-lists-2.html = TEXT
+BUGWK84835 : editing/execCommand/indent-nested-lists-3.html = TEXT
+BUGWK84835 : editing/execCommand/indent-nested-lists-4.html = TEXT
+BUGWK84835 : editing/execCommand/indent-nested-lists-5.html = TEXT
+BUGWK84835 : editing/execCommand/indent-nested-lists-6.html = TEXT
+BUGWK84835 : editing/execCommand/indent-nested-lists-7.html = TEXT
+BUGWK84835 : editing/execCommand/indent-paragraphs.html = TEXT
+BUGWK84835 : editing/execCommand/indent-with-style.html = TEXT
+BUGWK84835 : editing/execCommand/insertHTML.html = TEXT
+BUGWK84835 : editing/execCommand/outdent-nested-lists-1.html = TEXT
+BUGWK84835 : editing/execCommand/outdent-nested-lists-2.html = TEXT
+BUGWK84835 : editing/execCommand/outdent-nested-lists-3.html = TEXT
+BUGWK84835 : editing/execCommand/outdent-nested-lists-4.html = TEXT
+BUGWK84835 : editing/execCommand/paste-and-match-style-event.html = TEXT
+BUGWK84835 : editing/execCommand/queryCommandState-01.html = TEXT
+BUGWK84835 : editing/execCommand/remove-formatting-2.html = TEXT
+BUGWK84835 : editing/execCommand/remove-formatting.html = TEXT
+BUGWK84835 : editing/execCommand/remove-list-1.html = TEXT
+BUGWK84835 : editing/execCommand/remove-list-items.html = TEXT
+BUGWK84835 : editing/execCommand/switch-list-type.html = TEXT
+BUGWK84835 : editing/execCommand/unlink.html = TEXT
+
+// Needs baselines 
+BUGWK84839 : editing/execCommand/4580583-1.html = MISSING
+BUGWK84839 : editing/execCommand/4580583-2.html = MISSING
+BUGWK84839 : editing/execCommand/4641880-1.html = MISSING
+BUGWK84839 : editing/execCommand/4641880-2.html = MISSING
+BUGWK84839 : editing/execCommand/4747450.html = MISSING
+BUGWK84839 : editing/execCommand/4916402.html = MISSING
+BUGWK84839 : editing/execCommand/4916541.html = MISSING
+BUGWK84839 : editing/execCommand/4924441.html = MISSING
+BUGWK84839 : editing/execCommand/5080333-1.html = MISSING
+BUGWK84839 : editing/execCommand/5080333-2.html = MISSING
+BUGWK84839 : editing/execCommand/5136770.html = MISSING
+BUGWK84839 : editing/execCommand/5138441.html = MISSING
+BUGWK84839 : editing/execCommand/5142012-1.html = MISSING
+BUGWK84839 : editing/execCommand/5142012-2.html = MISSING
+BUGWK84839 : editing/execCommand/5190926.html = MISSING
+BUGWK84839 : editing/execCommand/5481523.html = MISSING
+BUGWK84839 : editing/execCommand/5482023.html = MISSING
+BUGWK84839 : editing/execCommand/5569741.html = MISSING
+BUGWK84839 : editing/execCommand/create-list-with-hr.html = MISSING
+BUGWK84839 : editing/execCommand/find-after-replace.html = MISSING
+BUGWK84839 : editing/execCommand/findString-2.html = MISSING
+BUGWK84839 : editing/execCommand/findString.html = MISSING
+BUGWK84839 : editing/execCommand/indent-empty-root.html = MISSING
+BUGWK84839 : editing/execCommand/indent-list-item.html = MISSING
+BUGWK84839 : editing/execCommand/indent-selection.html = MISSING
+BUGWK84839 : editing/execCommand/insert-list-and-stitch.html = MISSING
+BUGWK84839 : editing/execCommand/insertHorizontalRule.html = MISSING
+BUGWK84839 : editing/execCommand/insertImage.html = MISSING
+BUGWK84839 : editing/execCommand/nsresponder-indent.html = MISSING
+BUGWK84839 : editing/execCommand/nsresponder-outdent.html = MISSING
+BUGWK84839 : editing/execCommand/outdent-blockquote-test1.html = MISSING
+BUGWK84839 : editing/execCommand/outdent-blockquote-test2.html = MISSING
+BUGWK84839 : editing/execCommand/outdent-blockquote-test3.html = MISSING
+BUGWK84839 : editing/execCommand/outdent-blockquote-test4.html = MISSING
+BUGWK84839 : editing/execCommand/paste-1.html = MISSING
+BUGWK84839 : editing/execCommand/paste-2.html = MISSING
+BUGWK84839 : editing/execCommand/print.html = MISSING
+BUGWK84839 : editing/execCommand/remove-list-from-range-selection.html = MISSING
+BUGWK84839 : editing/execCommand/remove-list-item-1.html = MISSING
+BUGWK84839 : editing/execCommand/selectAll.html = MISSING
index 4deabe93168cbc38b2c38e55066f5a8ce607ef91..b251653b7e4879a372fd118b156decc1560ebae6 100644 (file)
@@ -1,3 +1,19 @@
+2012-05-07  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
+
+        [EFL][DRT] Implement LayoutTestController::execCommand
+        https://bugs.webkit.org/show_bug.cgi?id=82286
+
+        Reviewed by Antonio Gomes.
+
+        Add missing implementation execCommand and isCommandEnabled to EFL's
+        DumpRenderTreeSupport to execute an internal command and check if the
+        command is enabled.
+
+        * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+        (DumpRenderTreeSupportEfl::executeCoreCommandByName):
+        (DumpRenderTreeSupportEfl::isCommandEnabled):
+        * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+
 2012-05-06  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
 
         [EFL] EFL's LayoutTestController setJavaScriptCanAccessClipboard implementation
index 74958fba8edec89fa6a1efedb414a57832b03a4e..9b28046f8cbda0c237f253db5457661432ce9880 100644 (file)
@@ -32,6 +32,7 @@
 #include <Evas.h>
 #include <FindOptions.h>
 #include <FloatSize.h>
+#include <FocusController.h>
 #include <FrameView.h>
 #include <HTMLInputElement.h>
 #include <InspectorController.h>
@@ -392,6 +393,15 @@ void DumpRenderTreeSupportEfl::addUserStyleSheet(const Evas_Object* ewkView, con
     page->group().addUserStyleSheetToWorld(WebCore::mainThreadNormalWorld(), sourceCode, WebCore::KURL(), nullptr, nullptr, allFrames ? WebCore::InjectInAllFrames : WebCore::InjectInTopFrameOnly);
 }
 
+void DumpRenderTreeSupportEfl::executeCoreCommandByName(const Evas_Object* ewkView, const char* name, const char* value)
+{
+    WebCore::Page* page = EWKPrivate::corePage(ewkView);
+    if (!page)
+        return;
+
+    page->focusController()->focusedOrMainFrame()->editor()->command(name).execute(value);
+}
+
 bool DumpRenderTreeSupportEfl::findString(const Evas_Object* ewkView, const char* text, WebCore::FindOptions options)
 {
     WebCore::Page* page = EWKPrivate::corePage(ewkView);
@@ -420,6 +430,15 @@ void DumpRenderTreeSupportEfl::setJavaScriptProfilingEnabled(const Evas_Object*
 #endif
 }
 
+bool DumpRenderTreeSupportEfl::isCommandEnabled(const Evas_Object* ewkView, const char* name)
+{
+    WebCore::Page* page = EWKPrivate::corePage(ewkView);
+    if (!page)
+        return false;
+
+    return page->focusController()->focusedOrMainFrame()->editor()->command(name).isEnabled();
+}
+
 void DumpRenderTreeSupportEfl::setSmartInsertDeleteEnabled(Evas_Object* ewkView, bool enabled)
 {
     WebCore::Page* page = EWKPrivate::corePage(ewkView);
index b16772373a30d1ea859c58b3a906816b96517738..d65fa74c425539dd6830bc12023ddbcaaa49c62b 100644 (file)
@@ -72,7 +72,9 @@ public:
     static void setLoadsSiteIconsIgnoringImageLoadingSetting(Evas_Object* ewkView, bool loadsSiteIconsIgnoringImageLoadingPreferences);
 
     static void addUserStyleSheet(const Evas_Object* ewkView, const char* sourceCode, bool allFrames);
+    static void executeCoreCommandByName(const Evas_Object* ewkView, const char* name, const char* value);
     static bool findString(const Evas_Object* ewkView, const char* text, WebCore::FindOptions);
+    static bool isCommandEnabled(const Evas_Object* ewkView, const char* name);
     static void setJavaScriptProfilingEnabled(const Evas_Object* ewkView, bool enabled);
     static void setSmartInsertDeleteEnabled(Evas_Object* ewkView, bool enabled);
     static void setSelectTrailingWhitespaceEnabled(Evas_Object* ewkView, bool enabled);
index 905bc389a91a1ff7463a4f38cb5664aeff822396..129d161d0cae93472681006de7a33a736025cf2e 100644 (file)
@@ -1,3 +1,17 @@
+2012-05-07  Sudarsana Nagineni  <sudarsana.nagineni@linux.intel.com>
+
+        [EFL][DRT] Implement LayoutTestController::execCommand
+        https://bugs.webkit.org/show_bug.cgi?id=82286
+
+        Reviewed by Antonio Gomes.
+
+        Add missing implementation execCommand and isCommandEnabled to EFL's
+        LayoutTestController. 
+
+        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+        (LayoutTestController::execCommand):
+        (LayoutTestController::isCommandEnabled):
+
 2012-05-06  Hayato Ito  <hayato@chromium.org>
 
         [prepare-ChangeLog] Excludes a reference file used by reftests from test files.
index 81f93c2372f617853cadde91973c8e0ccd062858..bb7a50b6668f43bca5237f444101a31e15adde20 100644 (file)
@@ -479,9 +479,9 @@ bool LayoutTestController::elementDoesAutoCompleteForElementWithId(JSStringRef i
     return DumpRenderTreeSupportEfl::elementDoesAutoCompleteForElementWithId(mainFrame, elementId);
 }
 
-void LayoutTestController::execCommand(JSStringRef, JSStringRef)
+void LayoutTestController::execCommand(JSStringRef name, JSStringRef value)
 {
-    notImplemented();
+    DumpRenderTreeSupportEfl::executeCoreCommandByName(browser->mainView(), name->ustring().utf8().data(), value->ustring().utf8().data());
 }
 
 bool LayoutTestController::findString(JSContextRef context, JSStringRef target, JSObjectRef optionsArray)
@@ -520,7 +520,7 @@ bool LayoutTestController::findString(JSContextRef context, JSStringRef target,
 
 bool LayoutTestController::isCommandEnabled(JSStringRef name)
 {
-    return false;
+    return DumpRenderTreeSupportEfl::isCommandEnabled(browser->mainView(), name->ustring().utf8().data());
 }
 
 void LayoutTestController::setCacheModel(int)