WebCore:
authorjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 May 2008 19:30:44 +0000 (19:30 +0000)
committerjustin.garcia@apple.com <justin.garcia@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 14 May 2008 19:30:44 +0000 (19:30 +0000)
commit8538fb2833f48fe86cc33003fa93083dcb649dfd
tree15d54b0775c9957c7b4303a29b1959a17b8d7723
parent697de8004a984b90c77219f5d4becfc36719fdeb
WebCore:

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: https://svn.webkit.org/repository/webkit/trunk@33449 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/mac/editing/input/text-input-controller-expected.txt
LayoutTests/platform/mac/editing/inserting/4959067-expected.txt
LayoutTests/platform/mac/editing/style/style-3681552-fix-001-expected.txt
WebCore/ChangeLog
WebCore/editing/Editor.cpp
WebCore/editing/InsertTextCommand.cpp
WebCore/editing/InsertTextCommand.h
WebCore/editing/htmlediting.cpp
WebCore/page/Frame.cpp