-
ap@webkit.org authored
<rdar://problem/6438271> Improve backspace handling of accented characters Test: platform/mac/editing/deleting/backward-delete.html This change makes WebKit behave like AppKit on the Mac. Other platforms are not affected, because the current behavior matches their standards (tested on Windows, assumed elsewhere). * dom/Position.cpp: (WebCore::Position::previous): (WebCore::Position::next): (WebCore::Position::uncheckedPreviousOffsetForBackwardDeletion): * dom/Position.h: Added a new option for previous(), used to move to a next position for backward deletion. Renamed EUsingComposedCharacters to PositionMoveType. * editing/TypingCommand.cpp: (WebCore::TypingCommand::deleteKeyPressed): Use previous(BackwardDeletion) to find a proper range to delete. Also, simplified a check surrounding this code a little. * editing/htmlediting.cpp: (WebCore::nextVisuallyDistinctCandidate): (WebCore::previousVisuallyDistinctCandidate): Adjusted for renamed enum values. * rendering/RenderObject.cpp: * rendering/RenderObject.h: * rendering/RenderText.h: Added previousOffsetForBackwardDeletion(). * rendering/RenderText.cpp: (WebCore::RenderText::previousOffsetForBackwardDeletion): On PLATFORM(MAC), use an algorithm that matches the one AppKit has for backward deletion. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40710 268f45cc-cd09-0410-ab3c-d52691b4dbfc
73ecea19