-
justin.garcia@apple.com authored
2008-05-14 Justin Garcia <justin.garcia@apple.com> Reviewed by Darin. <rdar://problem/5914803> Improve performance of WebCore::Editor::setComposition * editing/Editor.cpp: (WebCore::Editor::confirmComposition): Remove the previous composition when we insert the new one, not with a separate, slower, delete operation. (WebCore::Editor::setComposition): Ditto. * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::performTrivialReplace): Remove the selected text with a low level operation that doesn't perform a layout and insert the new text in a way that won't trigger a layout from the removal. (WebCore::InsertTextCommand::input): Call the optimized replace. * editing/InsertTextCommand.h: * editing/htmlediting.cpp: (WebCore::isTabSpanNode): Check to see if the node is a span, to avoid the expense of getAttribute in the common case. * page/Frame.cpp: (WebCore::Frame::selectionLayoutChanged): Selection::start() and end() will already be at VisiblePosition deepEquivalents. Selection::validate() ensures this. LayoutTests: 2008-05-14 Justin Garcia <justin.garcia@apple.com> Reviewed by Darin. <rdar://problem/5914803> Improve performance of WebCore::Editor::setComposition Replacing all the text in a node is now much less likely to remove it and cause selection changes. * platform/mac/editing/input/text-input-controller-expected.txt: * platform/mac/editing/inserting/4959067-expected.txt: * platform/mac/editing/style/style-3681552-fix-001-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
3571e8f6