Add smartInsertDeleteEnabled setting to WebCore::Page
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Feb 2013 20:20:37 +0000 (20:20 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Feb 2013 20:20:37 +0000 (20:20 +0000)
commit31dd5cfae8a275265baa2d9d46172b5bb3896c2c
tree3fe6e15c5646fdb09154beaf0166e6105c34ccf9
parentbafe64270a237e55429c3af442f61714cffb98f2
Add smartInsertDeleteEnabled setting to WebCore::Page
https://bugs.webkit.org/show_bug.cgi?id=107840

Patch by Manuel Rego Casasnovas <rego@igalia.com> on 2013-02-27
Reviewed by Ryosuke Niwa.

Source/WebCore:

Covered by editing/deleting/smart-editing-disabled.html.

* page/Settings.in: Add new setting with true as initial value.

Source/WebKit2:

* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode): Remove code related to
isSmartInsertDeleteEnabled.
* Shared/WebPageCreationParameters.h:
(WebPageCreationParameters): Remove isSmartInsertDeleteEnabled.
* Shared/WebPreferencesStore.h:
(WebKit): Add macro for smartInsertDeleteEnabled setting.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetSmartInsertDeleteEnabled):
(WKPreferencesGetSmartInsertDeleteEnabled): Implement methods using the
new setting.
* UIProcess/API/C/WKPreferencesPrivate.h: Add new methods headers.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage): Set smartInsertDeleteEnabled
setting using m_isSmartInsertDeleteEnabled to keep initial value on Mac.
(WebKit::WebPageProxy::creationParameters): Remove usage of
parameters.isSmartInsertDeleteEnabled.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::smartInsertDeleteEnabled): Enable method for
all platforms.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Remove m_isSmartInsertDeleteEnabled
initialization.
(WebKit::WebPage::updatePreferences): Set smartInsertDeleteEnabled
setting.
(WebKit::WebPage::isSmartInsertDeleteEnabled): Implement method using
settings.
(WebKit):
(WebKit::WebPage::setSmartInsertDeleteEnabled): Implement method using
settings.
* WebProcess/WebPage/WebPage.h:
(WebPage): Enable methods dealing with smartInsertDeleteEnabled for all
platforms and remove m_isSmartInsertDeleteEnabled as it will be a
setting.

LayoutTests:

Replace testRunner.setSmartInsertDeleteEnabled by
internals.settings.setSmartInsertDeleteEnabled in tests.

* 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:
* platform/wk2/TestExpectations: Unflag
editing/deleting/smart-editing-disabled.html as it passes now.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144221 268f45cc-cd09-0410-ab3c-d52691b4dbfc
19 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/deleting/smart-editing-disabled.html
LayoutTests/editing/selection/doubleclick-beside-cr-span.html
LayoutTests/editing/selection/doubleclick-whitespace-crash.html
LayoutTests/editing/selection/doubleclick-whitespace-img-crash.html
LayoutTests/editing/selection/doubleclick-whitespace.html
LayoutTests/platform/wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/page/Settings.in
Source/WebKit2/ChangeLog
Source/WebKit2/Shared/WebPageCreationParameters.cpp
Source/WebKit2/Shared/WebPageCreationParameters.h
Source/WebKit2/Shared/WebPreferencesStore.h
Source/WebKit2/UIProcess/API/C/WKPreferences.cpp
Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h
Source/WebKit2/UIProcess/WebPageProxy.cpp
Source/WebKit2/WebProcess/WebCoreSupport/WebEditorClient.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.cpp
Source/WebKit2/WebProcess/WebPage/WebPage.h