-
a.bah@samsung.com authored
https://bugs.webkit.org/show_bug.cgi?id=120726 Reviewed by Ryosuke Niwa. Source/WebCore: When moving from one text node to the other, while deleting characters, the deleted text node's style was being applied to any new characters added into the existing text node. Typing Style in the frame selection maintains the editing style for the deleted text node, so that if new characters are inserted at the position of the deleted text node, it's style can be applied to them. However, when moving into another text node, we should reset or clear the typing style maintained by the frame selection. This ensures that any new content inserted within the existing node does not take on any uncleared style of the deleted node. Test: editing/deleting/maintain-style-after-delete.html * editing/DeleteSelectionCommand.cpp: (WebCore::DeleteSelectionCommand::saveTypingStyleState): Calling clearTypingStyle() on frame selection whenever deletion occurs within the same text node. Thus any existing typing styleh held by the frame selection shall be cleared. LayoutTests: * editing/deleting/maintain-style-after-delete-expected.txt: Added. * editing/deleting/maintain-style-after-delete.html: Added. Testcase added for verifying that style of the text node being deleted is maintained. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155425 268f45cc-cd09-0410-ab3c-d52691b4dbfc
305f6858