- Revision
- 111835
- Author
- [email protected]
- Date
- 2012-03-23 00:25:25 -0700 (Fri, 23 Mar 2012)
Log Message
[EFL][DRT] Implement LayoutTestController's methods related with editing.
https://bugs.webkit.org/show_bug.cgi?id=80136
Patch by Grzegorz Czajkowski <[email protected]> on 2012-03-23
Reviewed by Ryosuke Niwa.
Source/WebKit/efl:
Implements DumpRenderTreeSupportEfl's and EditorClientEfl's methods related with editing.
* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
(DumpRenderTreeSupportEfl::setSmartInsertDeleteEnabled): New function.
(DumpRenderTreeSupportEfl::setSelectTrailingWhitespaceEnabled): New function.
* WebCoreSupport/DumpRenderTreeSupportEfl.h:
* WebCoreSupport/EditorClientEfl.cpp:
(WebCore::EditorClientEfl::setSmartInsertDeleteEnabled): New function.
(WebCore):
(WebCore::EditorClientEfl::smartInsertDeleteEnabled): Add implementation.
(WebCore::EditorClientEfl::setSelectTrailingWhitespaceEnabled): New function.
(WebCore::EditorClientEfl::isSelectTrailingWhitespaceEnabled): Add implementation.
(WebCore::EditorClientEfl::EditorClientEfl):
* WebCoreSupport/EditorClientEfl.h:
(EditorClientEfl):
Tools:
Implements EFL's LayoutTestController methods e.i. setSmartInsertDeleteEnabled,
setSelectTrailingWhitespaceEnabled.
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
(LayoutTestController::setSmartInsertDeleteEnabled):
(LayoutTestController::setSelectTrailingWhitespaceEnabled):
LayoutTests:
Enables tests connected with setSelectTrailingWhitespaceEnabled and setSmartInsertDeleteEnabled.
Tests related with spelling can not be enabled in this patch because WebKit-Efl doesn't
support spell checking (missing TextCheckerClient implementation).
* platform/efl/Skipped:
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (111834 => 111835)
--- trunk/LayoutTests/ChangeLog 2012-03-23 07:14:29 UTC (rev 111834)
+++ trunk/LayoutTests/ChangeLog 2012-03-23 07:25:25 UTC (rev 111835)
@@ -1,3 +1,16 @@
+2012-03-23 Grzegorz Czajkowski <[email protected]>
+
+ [EFL][DRT] Implement LayoutTestController's methods related with editing.
+ https://bugs.webkit.org/show_bug.cgi?id=80136
+
+ Reviewed by Ryosuke Niwa.
+
+ Enables tests connected with setSelectTrailingWhitespaceEnabled and setSmartInsertDeleteEnabled.
+ Tests related with spelling can not be enabled in this patch because WebKit-Efl doesn't
+ support spell checking (missing TextCheckerClient implementation).
+
+ * platform/efl/Skipped:
+
2012-03-22 Dan Bernstein <[email protected]>
Added fast/events/remove-target-with-shadow-in-drag.html to the Mac WebKit2 skip list, since
Modified: trunk/LayoutTests/platform/efl/Skipped (111834 => 111835)
--- trunk/LayoutTests/platform/efl/Skipped 2012-03-23 07:14:29 UTC (rev 111834)
+++ trunk/LayoutTests/platform/efl/Skipped 2012-03-23 07:25:25 UTC (rev 111835)
@@ -61,7 +61,8 @@
svg/zoom/page/relative-sized-document-scrollbars.svg
svg/zoom/page/zoom-zoom-coords.xhtml
-# EFL's EventSender needs to emit double clicks
+# EFL's EventSender needs to emit double clicks (e.g. to select text)
+editing/selection/doubleclick-inline-first-last-contenteditable.html
fast/events/dblclick-addEventListener.html
fast/forms/password-doubleclick-selection.html
@@ -441,13 +442,6 @@
fast/events/show-modal-dialog-onblur-onfocus.html
plugins/netscape-plugin-setwindow-size-2.html
-# EFL's LayoutTestController does not implement setSmartInsertDeleteEnabled
-editing/deleting/smart-editing-disabled.html
-editing/selection/doubleclick-beside-cr-span.html
-editing/selection/doubleclick-whitespace-crash.html
-editing/selection/doubleclick-whitespace-img-crash.html
-editing/selection/doubleclick-whitespace.html
-
# EFL's LayoutTestController does not implement setJavaScriptCanAccessClipboard
editing/execCommand/clipboard-access.html
@@ -473,13 +467,6 @@
# EFL's LayoutTestController does not implement setJavaScriptProfilingEnabled
fast/profiler
-# EFL's LayoutTestController does not implement setSelectTrailingWhitespaceEnabled
-editing/selection/doubleclick-beside-cr-span.html
-editing/selection/doubleclick-inline-first-last-contenteditable.html
-editing/selection/doubleclick-whitespace-crash.html
-editing/selection/doubleclick-whitespace-img-crash.html
-editing/selection/doubleclick-whitespace.html
-
# EFL's LayoutTestController does not implement elementDoesAutoCompleteForElementWithId
security/set-form-autocomplete-attribute.html
@@ -699,7 +686,7 @@
fast/events/show-modal-dialog-onblur-onfocus.html
fast/harness/show-modal-dialog.html
-# EFL's LayoutTestController does not implement hasSpellingMarker
+# Missing TextCheckerClient implementation (Efl's port does not support spell checking, Gtk port uses Enchant library https://bugs.webkit.org/show_bug.cgi?id=61787)
editing/spelling/design-mode-spellcheck-off.html
editing/spelling/spellcheck-attribute.html
editing/spelling/spellcheck-paste.html
Modified: trunk/Source/WebKit/efl/ChangeLog (111834 => 111835)
--- trunk/Source/WebKit/efl/ChangeLog 2012-03-23 07:14:29 UTC (rev 111834)
+++ trunk/Source/WebKit/efl/ChangeLog 2012-03-23 07:25:25 UTC (rev 111835)
@@ -1,3 +1,26 @@
+2012-03-23 Grzegorz Czajkowski <[email protected]>
+
+ [EFL][DRT] Implement LayoutTestController's methods related with editing.
+ https://bugs.webkit.org/show_bug.cgi?id=80136
+
+ Reviewed by Ryosuke Niwa.
+
+ Implements DumpRenderTreeSupportEfl's and EditorClientEfl's methods related with editing.
+
+ * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+ (DumpRenderTreeSupportEfl::setSmartInsertDeleteEnabled): New function.
+ (DumpRenderTreeSupportEfl::setSelectTrailingWhitespaceEnabled): New function.
+ * WebCoreSupport/DumpRenderTreeSupportEfl.h:
+ * WebCoreSupport/EditorClientEfl.cpp:
+ (WebCore::EditorClientEfl::setSmartInsertDeleteEnabled): New function.
+ (WebCore):
+ (WebCore::EditorClientEfl::smartInsertDeleteEnabled): Add implementation.
+ (WebCore::EditorClientEfl::setSelectTrailingWhitespaceEnabled): New function.
+ (WebCore::EditorClientEfl::isSelectTrailingWhitespaceEnabled): Add implementation.
+ (WebCore::EditorClientEfl::EditorClientEfl):
+ * WebCoreSupport/EditorClientEfl.h:
+ (EditorClientEfl):
+
2012-03-22 Sudarsana Nagineni <[email protected]>
[EFL] [DRT] Implement LayoutTestController::markerTextForListItem()
Modified: trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp (111834 => 111835)
--- trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp 2012-03-23 07:14:29 UTC (rev 111834)
+++ trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp 2012-03-23 07:25:25 UTC (rev 111835)
@@ -26,6 +26,7 @@
#include <AnimationController.h>
#include <DocumentLoader.h>
+#include <EditorClientEfl.h>
#include <Eina.h>
#include <Evas.h>
#include <FindOptions.h>
@@ -322,6 +323,32 @@
return page->findString(String::fromUTF8(text), options);
}
+void DumpRenderTreeSupportEfl::setSmartInsertDeleteEnabled(Evas_Object* ewkView, bool enabled)
+{
+ WebCore::Page* page = EWKPrivate::corePage(ewkView);
+ if (!page)
+ return;
+
+ WebCore::EditorClientEfl* editorClient = static_cast<WebCore::EditorClientEfl*>(page->editorClient());
+ if (!editorClient)
+ return;
+
+ editorClient->setSmartInsertDeleteEnabled(enabled);
+}
+
+void DumpRenderTreeSupportEfl::setSelectTrailingWhitespaceEnabled(Evas_Object* ewkView, bool enabled)
+{
+ WebCore::Page* page = EWKPrivate::corePage(ewkView);
+ if (!page)
+ return;
+
+ WebCore::EditorClientEfl* editorClient = static_cast<WebCore::EditorClientEfl*>(page->editorClient());
+ if (!editorClient)
+ return;
+
+ editorClient->setSelectTrailingWhitespaceEnabled(enabled);
+}
+
void DumpRenderTreeSupportEfl::garbageCollectorCollect()
{
WebCore::gcController().garbageCollectNow();
Modified: trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h (111834 => 111835)
--- trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h 2012-03-23 07:14:29 UTC (rev 111834)
+++ trunk/Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h 2012-03-23 07:25:25 UTC (rev 111835)
@@ -66,6 +66,8 @@
static void setAutofilled(JSContextRef, JSValueRef nodeObject, bool autofilled);
static bool findString(const Evas_Object* ewkView, const char* text, WebCore::FindOptions);
+ static void setSmartInsertDeleteEnabled(Evas_Object* ewkView, bool enabled);
+ static void setSelectTrailingWhitespaceEnabled(Evas_Object* ewkView, bool enabled);
static void garbageCollectorCollect();
static void garbageCollectorCollectOnAlternateThread(bool waitUntilDone);
Modified: trunk/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp (111834 => 111835)
--- trunk/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp 2012-03-23 07:14:29 UTC (rev 111834)
+++ trunk/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.cpp 2012-03-23 07:25:25 UTC (rev 111835)
@@ -23,6 +23,7 @@
#include "config.h"
#include "EditorClientEfl.h"
+#include "DumpRenderTreeSupportEfl.h"
#include "Editor.h"
#include "EventNames.h"
#include "FocusController.h"
@@ -229,16 +230,28 @@
delete this;
}
+void EditorClientEfl::setSmartInsertDeleteEnabled(bool enabled)
+{
+ m_smartInsertDeleteEnabled = enabled;
+ if (enabled)
+ setSelectTrailingWhitespaceEnabled(false);
+}
+
bool EditorClientEfl::smartInsertDeleteEnabled()
{
- notImplemented();
- return false;
+ return m_smartInsertDeleteEnabled;
}
+void EditorClientEfl::setSelectTrailingWhitespaceEnabled(bool enabled)
+{
+ m_selectTrailingWhitespaceEnabled = enabled;
+ if (enabled)
+ setSmartInsertDeleteEnabled(false);
+}
+
bool EditorClientEfl::isSelectTrailingWhitespaceEnabled()
{
- notImplemented();
- return false;
+ return m_selectTrailingWhitespaceEnabled;
}
void EditorClientEfl::toggleContinuousSpellChecking()
@@ -437,6 +450,8 @@
EditorClientEfl::EditorClientEfl(Evas_Object* view)
: m_isInRedo(false)
, m_view(view)
+ , m_selectTrailingWhitespaceEnabled(false)
+ , m_smartInsertDeleteEnabled(false)
{
notImplemented();
}
Modified: trunk/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h (111834 => 111835)
--- trunk/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h 2012-03-23 07:14:29 UTC (rev 111834)
+++ trunk/Source/WebKit/efl/WebCoreSupport/EditorClientEfl.h 2012-03-23 07:25:25 UTC (rev 111835)
@@ -60,7 +60,9 @@
virtual bool shouldDeleteRange(Range*);
virtual bool shouldShowDeleteInterface(HTMLElement*);
virtual bool smartInsertDeleteEnabled();
+ void setSmartInsertDeleteEnabled(bool);
virtual bool isSelectTrailingWhitespaceEnabled();
+ void setSelectTrailingWhitespaceEnabled(bool);
virtual bool isContinuousSpellCheckingEnabled();
virtual void toggleContinuousSpellChecking();
virtual bool isGrammarCheckingEnabled();
@@ -125,6 +127,8 @@
private:
Evas_Object *m_view;
+ bool m_selectTrailingWhitespaceEnabled;
+ bool m_smartInsertDeleteEnabled;
};
}
Modified: trunk/Tools/ChangeLog (111834 => 111835)
--- trunk/Tools/ChangeLog 2012-03-23 07:14:29 UTC (rev 111834)
+++ trunk/Tools/ChangeLog 2012-03-23 07:25:25 UTC (rev 111835)
@@ -1,3 +1,17 @@
+2012-03-23 Grzegorz Czajkowski <[email protected]>
+
+ [EFL][DRT] Implement LayoutTestController's methods related with editing.
+ https://bugs.webkit.org/show_bug.cgi?id=80136
+
+ Reviewed by Ryosuke Niwa.
+
+ Implements EFL's LayoutTestController methods e.i. setSmartInsertDeleteEnabled,
+ setSelectTrailingWhitespaceEnabled.
+
+ * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+ (LayoutTestController::setSmartInsertDeleteEnabled):
+ (LayoutTestController::setSelectTrailingWhitespaceEnabled):
+
2012-03-22 Gyuyoung Kim <[email protected]>
Convert hasGrammarMarker to use Internals interface
Modified: trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp (111834 => 111835)
--- trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp 2012-03-23 07:14:29 UTC (rev 111834)
+++ trunk/Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp 2012-03-23 07:25:25 UTC (rev 111835)
@@ -286,9 +286,9 @@
notImplemented();
}
-void LayoutTestController::setSmartInsertDeleteEnabled(bool)
+void LayoutTestController::setSmartInsertDeleteEnabled(bool flag)
{
- notImplemented();
+ DumpRenderTreeSupportEfl::setSmartInsertDeleteEnabled(browser->mainView(), flag);
}
static Eina_Bool waitToDumpWatchdogFired(void*)
@@ -446,9 +446,9 @@
notImplemented();
}
-void LayoutTestController::setSelectTrailingWhitespaceEnabled(bool)
+void LayoutTestController::setSelectTrailingWhitespaceEnabled(bool flag)
{
- notImplemented();
+ DumpRenderTreeSupportEfl::setSelectTrailingWhitespaceEnabled(browser->mainView(), flag);
}
void LayoutTestController::setPopupBlockingEnabled(bool flag)