Move setEditingBehavior() from layoutTestController to window.internals
authorcaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 May 2012 12:24:04 +0000 (12:24 +0000)
committercaio.oliveira@openbossa.org <caio.oliveira@openbossa.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 21 May 2012 12:24:04 +0000 (12:24 +0000)
commita6414505d2826d02685e012d45b3b4920862bf44
tree7375181bba73b708d267b665940fb2c3149c9619
parentdd1bd8a2aae5620da7650013b7b47ee1d0c90af8
Move setEditingBehavior() from layoutTestController to window.internals
https://bugs.webkit.org/show_bug.cgi?id=42689

Reviewed by Hajime Morita and Kenneth Rohde Christiansen.

Source/WebCore:

Add setEditingBehavior() to window.internals.settings. No new tests, but this
change will allow more tests to run in WebKitTestRunner.

* testing/InternalSettings.cpp:
(WebCore::InternalSettings::InternalSettings):
(WebCore::InternalSettings::restoreTo):
(WebCore::InternalSettings::setEditingBehavior):
(WebCore):
* testing/InternalSettings.h:
(InternalSettings):
* testing/InternalSettings.idl:

Source/WebKit/efl:

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
* WebCoreSupport/DumpRenderTreeSupportEfl.h:

Source/WebKit/mac:

Remove Mac private API to get/set the editing behavior, since it was only there
for the DRT.

* WebKit.order:
* WebView/WebFrame.mm:
* WebView/WebFrameInternal.h:
* WebView/WebPreferenceKeysPrivate.h:
* WebView/WebPreferences.mm:
(+[WebPreferences initialize]):
* WebView/WebPreferencesPrivate.h:
* WebView/WebView.mm:
(-[WebView _preferencesChanged:]):

Source/WebKit/qt:

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
(DumpRenderTreeSupportQt::setWindowsBehaviorAsEditingBehavior): Reduce the job
done by this function to the minimal.
* WebCoreSupport/DumpRenderTreeSupportQt.h:

Source/WebKit/win:

Remove Win private API to get/set the editing behavior. Follow the previous
removals that keep the virtual functions there but failing.

* Interfaces/IWebPreferences.idl:
* WebPreferenceKeysPrivate.h:
* WebPreferences.cpp:
(WebPreferences::unused5):
(WebPreferences::unused6):
* WebPreferences.h:
(WebPreferences):
* WebView.cpp:
(WebView::notifyPreferencesChanged):

Tools:

Remove code that implements setEditingBehavior() for each platform. Note that
During the InternalsObject reset the behavior is changed back to the platform
default.

Qt and Chromium ports set a default editing behavior for running tests different
from the platform default, so they still keep code for resetting to the desired
editing behavior. Other ports use the their defaults, that are restored by
internals object.

* DumpRenderTree/LayoutTestController.cpp:
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/blackberry/DumpRenderTree.cpp:
(BlackBerry::WebKit::DumpRenderTree::resetToConsistentStateBeforeTesting):
* DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
* DumpRenderTree/chromium/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/efl/DumpRenderTreeChrome.cpp:
(DumpRenderTreeChrome::resetDefaultsToConsistentValues):
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
* DumpRenderTree/mac/DumpRenderTree.mm:
(resetDefaultsToConsistentValues):
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
* DumpRenderTree/qt/DumpRenderTreeQt.cpp:
(WebCore::DumpRenderTree::resetToConsistentStateBeforeTesting):
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
* DumpRenderTree/qt/LayoutTestControllerQt.h:
(LayoutTestController):
* DumpRenderTree/win/DumpRenderTree.cpp:
(resetDefaultsToConsistentValues):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:

LayoutTests:

* editing/deleting/delete-ligature-003.html:
* editing/deleting/paragraph-in-preserveNewline.html:
* editing/deleting/whitespace-pre-1.html:
* editing/execCommand/script-tests/query-command-state.js:
(runTests):
* editing/execCommand/script-tests/query-text-alignment.js:
(runRangeTests):
* editing/execCommand/script-tests/toggle-compound-styles.js:
* editing/selection/5195166-1.html:
* editing/selection/5354455-1.html:
* editing/selection/caret-mode-paragraph-keys-navigation.html:
* editing/selection/collapse-selection-in-bidi.html:
* editing/selection/context-menu-text-selection.html:
* editing/selection/directionality-after-undo-replace.html:
* editing/selection/extend-after-mouse-selection.html:
* editing/selection/extend-selection-after-double-click.html:
* editing/selection/move-by-word-visually-crash-test-1.html:
* editing/selection/move-by-word-visually-crash-test-2.html:
* editing/selection/move-by-word-visually-crash-test-3.html:
* editing/selection/move-by-word-visually-crash-test-4.html:
* editing/selection/move-by-word-visually-crash-test-5.html:
* editing/selection/move-by-word-visually-crash-test-css-generated-content.html:
* editing/selection/move-by-word-visually-crash-test-textarea.html:
* editing/selection/move-by-word-visually-inline-block-positioned-element.html:
* editing/selection/move-by-word-visually-mac.html:
* editing/selection/move-by-word-visually-multi-line.html:
* editing/selection/move-by-word-visually-multi-space.html:
* editing/selection/move-by-word-visually-null-box.html:
* editing/selection/move-by-word-visually-single-space-inline-element.html:
* editing/selection/move-by-word-visually-single-space-one-element.html:
* editing/selection/move-by-word-visually-textarea.html:
* editing/selection/move-by-word-visually-wrong-left-right.html:
* editing/selection/programmatic-selection-on-mac-is-directionless.html:
* editing/selection/rtl-move-selection-right-left.html:
* editing/selection/script-tests/click-in-margins-inside-editable-div.js:
* editing/selection/script-tests/click-in-padding-with-multiple-line-boxes.js:
* editing/selection/script-tests/shift-click.js:
(runShiftClickTest):
* editing/selection/selection-extend-should-not-move-across-caret-on-mac.html:
* editing/style/iframe-onload-crash-mac.html:
* editing/style/iframe-onload-crash-unix.html:
* editing/style/iframe-onload-crash-win.html:
* fast/events/backspace-navigates-back.html:
* fast/forms/selection-direction.html:
* platform/gtk-wk2/Skipped: Add here tests that are still failing for GTK WK2 port.
* platform/wk2/Skipped: Unskip!

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@117771 268f45cc-cd09-0410-ab3c-d52691b4dbfc
86 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/delete-ligature-003.html
LayoutTests/editing/deleting/paragraph-in-preserveNewline.html
LayoutTests/editing/deleting/whitespace-pre-1.html
LayoutTests/editing/execCommand/script-tests/query-command-state.js
LayoutTests/editing/execCommand/script-tests/query-text-alignment.js
LayoutTests/editing/execCommand/script-tests/toggle-compound-styles.js
LayoutTests/editing/selection/5195166-1.html
LayoutTests/editing/selection/5354455-1.html
LayoutTests/editing/selection/caret-mode-paragraph-keys-navigation.html
LayoutTests/editing/selection/collapse-selection-in-bidi.html
LayoutTests/editing/selection/context-menu-text-selection.html
LayoutTests/editing/selection/directionality-after-undo-replace.html
LayoutTests/editing/selection/extend-after-mouse-selection.html
LayoutTests/editing/selection/extend-selection-after-double-click.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-1.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-2.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-3.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-4.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-5.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-css-generated-content.html
LayoutTests/editing/selection/move-by-word-visually-crash-test-textarea.html
LayoutTests/editing/selection/move-by-word-visually-inline-block-positioned-element.html
LayoutTests/editing/selection/move-by-word-visually-mac.html
LayoutTests/editing/selection/move-by-word-visually-multi-line.html
LayoutTests/editing/selection/move-by-word-visually-multi-space.html
LayoutTests/editing/selection/move-by-word-visually-null-box.html
LayoutTests/editing/selection/move-by-word-visually-single-space-inline-element.html
LayoutTests/editing/selection/move-by-word-visually-single-space-one-element.html
LayoutTests/editing/selection/move-by-word-visually-textarea.html
LayoutTests/editing/selection/move-by-word-visually-wrong-left-right.html
LayoutTests/editing/selection/programmatic-selection-on-mac-is-directionless.html
LayoutTests/editing/selection/rtl-move-selection-right-left.html
LayoutTests/editing/selection/script-tests/click-in-margins-inside-editable-div.js
LayoutTests/editing/selection/script-tests/click-in-padding-with-multiple-line-boxes.js
LayoutTests/editing/selection/script-tests/shift-click.js
LayoutTests/editing/selection/selection-extend-should-not-move-across-caret-on-mac.html
LayoutTests/editing/style/iframe-onload-crash-mac.html
LayoutTests/editing/style/iframe-onload-crash-unix.html
LayoutTests/editing/style/iframe-onload-crash-win.html
LayoutTests/fast/events/backspace-navigates-back.html
LayoutTests/fast/forms/selection-direction.html
LayoutTests/platform/gtk-wk2/Skipped
LayoutTests/platform/wk2/Skipped
Source/WebCore/ChangeLog
Source/WebCore/testing/InternalSettings.cpp
Source/WebCore/testing/InternalSettings.h
Source/WebCore/testing/InternalSettings.idl
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.h
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebKit.order
Source/WebKit/mac/WebView/WebFrame.mm
Source/WebKit/mac/WebView/WebFrameInternal.h
Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
Source/WebKit/mac/WebView/WebPreferences.mm
Source/WebKit/mac/WebView/WebPreferencesPrivate.h
Source/WebKit/mac/WebView/WebView.mm
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/Interfaces/IWebPreferences.idl
Source/WebKit/win/WebPreferenceKeysPrivate.h
Source/WebKit/win/WebPreferences.cpp
Source/WebKit/win/WebPreferences.h
Source/WebKit/win/WebView.cpp
Tools/ChangeLog
Tools/DumpRenderTree/LayoutTestController.cpp
Tools/DumpRenderTree/LayoutTestController.h
Tools/DumpRenderTree/blackberry/DumpRenderTree.cpp
Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.h
Tools/DumpRenderTree/efl/DumpRenderTreeChrome.cpp
Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp
Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
Tools/DumpRenderTree/qt/DumpRenderTreeQt.cpp
Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
Tools/DumpRenderTree/win/DumpRenderTree.cpp
Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp