Should have an editing behavior specific for IOS.
authorenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Sep 2014 00:48:01 +0000 (00:48 +0000)
committerenrica@apple.com <enrica@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 17 Sep 2014 00:48:01 +0000 (00:48 +0000)
commit57f3b5defae6cc62b06dd9ced12f89363e5c224d
treed60734e9837b30cc20ef44934527629f28c63e20
parentc3b72543933d66455590c0b3fdbe7970cdba7c68
Should have an editing behavior specific for IOS.
https://bugs.webkit.org/show_bug.cgi?id=136876

Reviewed by Sam Weinig.

This patch introduces a new editing behavior type to be able
to perform editing tasks that are specific to iOS.
All the existing EditingBehavior methods return the same boolean
value for for Mac and iOS. A new one has been introduced to support
a specific behavior in the DeleteSelectionCommand.

* editing/DeleteSelectionCommand.cpp:
(WebCore::DeleteSelectionCommand::doApply):
* editing/EditingBehavior.h:
(WebCore::EditingBehavior::shouldConsiderSelectionAsDirectional):
(WebCore::EditingBehavior::shouldCenterAlignWhenSelectionIsRevealed):
(WebCore::EditingBehavior::shouldToggleStyleBasedOnStartOfSelection):
(WebCore::EditingBehavior::shouldAlwaysGrowSelectionWhenExtendingToBoundary):
(WebCore::EditingBehavior::shouldSelectOnContextualMenuClick):
(WebCore::EditingBehavior::shouldExtendSelectionByWordOrLineAcrossCaret):
(WebCore::EditingBehavior::shouldRebalanceWhiteSpacesInSecureField):
* editing/EditingBehaviorTypes.h:
* editing/FrameSelection.cpp:
(WebCore::FrameSelection::positionForPlatform):
* page/Settings.cpp:
(WebCore::editingBehaviorTypeForPlatform):
* testing/InternalSettings.cpp:
(WebCore::InternalSettings::setEditingBehavior):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/editing/DeleteSelectionCommand.cpp
Source/WebCore/editing/EditingBehavior.h
Source/WebCore/editing/EditingBehaviorTypes.h
Source/WebCore/editing/FrameSelection.cpp
Source/WebCore/page/Settings.cpp
Source/WebCore/testing/InternalSettings.cpp