Commit 2e986a1f authored by rniwa@webkit.org's avatar rniwa@webkit.org

2010-12-23 Ryosuke Niwa <rniwa@webkit.org>

        Reviewed by Darin Adler.

        Selection becomes stale when CharacterData is manipulated directly
        https://bugs.webkit.org/show_bug.cgi?id=51389

        The bug was caused by SelectionController's not adjusting selection when CharacterData's
        m_data is modified by its API.

        Fixed the bug by adding textWillBeReplaced to SelectionController and calling it in
        CharacterData::textWillBeReplaced. Added newLength to setDataAndUpdate, which is passed to
        textWillBeReplaced because inserting, replacing, or removing data may require moving
        the offset of the selection end points (done by shouldRemovePositionAfterAdoptingTextReplacement).

        Also fixed the condition for determining whether or not a node intersects the selection
        in respondToNodeModification, which is extracted from nodeWillBeRemoved. The old condition
        failed to recognize certain cases when selection started and ended with non-zero offsets.

        Tests: editing/selection/character-data-mutation-crash.html
               editing/selection/character-data-mutation.html

        * dom/CharacterData.cpp:
        (WebCore::CharacterData::setData): Passes newLegnth to setDataAndUpdate.
        (WebCore::CharacterData::appendData): Ditto.
        (WebCore::CharacterData::insertData): Ditto.
        (WebCore::CharacterData::deleteData): Ditto.
        (WebCore::CharacterData::replaceData): Ditto.
        (WebCore::CharacterData::setDataAndUpdate): Added newLegnth to the argument list,
        and renamed lengthOfReplacedData to oldLength; calls textWillBeReplaced.
        * dom/CharacterData.h:
        * editing/SelectionController.cpp:
        (WebCore::removingNodeRemovesPosition): Removed indentations from blank lines.
        (WebCore::SelectionController::nodeWillBeRemoved): Calls nodeWillBeRemoved.
        (WebCore::SelectionController::respondToNodeModification): Extracted from nodeWillBeRemoved;
        fixed the logic to figure out whether a node is inside the range or not.
        (WebCore::shouldRemovePositionAfterAdoptingTextReplacement): Added.
        (WebCore::SelectionController::textWillBeReplaced): Added.
        * editing/SelectionController.h:
2010-12-23  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Darin Adler.

        Selection becomes stale when CharacterData is manipulated directly
        https://bugs.webkit.org/show_bug.cgi?id=51389

        Added tests to ensure WebKit adjusts or clears selection when the start container
        or the end container of the selection's first range is modified by CharacterData's API.

        Many editing tests had to be rebaselined due to different editing delegate dumps
        caused by WebKit's properly adjusting selection's offsets as editing commands modify the DOM.

        * editing/deleting/delete-by-word-001-expected.txt:
        * editing/deleting/delete-by-word-002-expected.txt:
        * editing/deleting/delete-ligature-001-expected.txt:
        * editing/deleting/delete-ligature-002-expected.txt:
        * editing/deleting/delete-ligature-003-expected.txt:
        * editing/deleting/skip-virama-001-expected.txt:
        * editing/execCommand/createLink-expected.txt:
        * editing/execCommand/hilitecolor-expected.txt:
        * editing/execCommand/unlink-expected.txt:
        * editing/inserting/insert-thai-characters-001-expected.txt:
        * editing/pasteboard/copy-in-password-field-expected.txt:
        * editing/pasteboard/paste-into-anchor-text-expected.txt:
        * editing/selection/character-data-mutation-crash-expected.txt: Added.
        * editing/selection/character-data-mutation-crash.html: Added.
        * editing/selection/character-data-mutation-expected.txt: Added.
        * editing/selection/character-data-mutation.html: Added.
        * editing/style/remove-underline-from-stylesheet-expected.txt:
        * editing/style/typing-style-003-expected.txt:
        * editing/undo/redo-style-expected.txt:
        * platform/mac/editing/deleting/collapse-whitespace-3587601-fix-expected.txt:
        * platform/mac/editing/deleting/delete-3608430-fix-expected.txt:
        * platform/mac/editing/deleting/delete-3608445-fix-expected.txt:
        * platform/mac/editing/deleting/delete-3608462-fix-expected.txt:
        * platform/mac/editing/deleting/delete-after-span-ws-001-expected.txt:
        * platform/mac/editing/deleting/delete-after-span-ws-002-expected.txt:
        * platform/mac/editing/deleting/delete-after-span-ws-003-expected.txt:
        * platform/mac/editing/deleting/delete-and-undo-expected.txt:
        * platform/mac/editing/deleting/delete-block-merge-contents-010-expected.txt:
        * platform/mac/editing/deleting/delete-block-table-expected.txt:
        * platform/mac/editing/deleting/delete-br-007-expected.txt:
        * platform/mac/editing/deleting/delete-character-001-expected.txt:
        * platform/mac/editing/deleting/delete-contiguous-ws-001-expected.txt:
        * platform/mac/editing/deleting/delete-hr-expected.txt:
        * platform/mac/editing/deleting/delete-leading-ws-001-expected.txt:
        * platform/mac/editing/deleting/delete-line-end-ws-001-expected.txt:
        * platform/mac/editing/deleting/delete-line-end-ws-002-expected.txt:
        * platform/mac/editing/deleting/delete-listitem-001-expected.txt:
        * platform/mac/editing/deleting/delete-selection-001-expected.txt:
        * platform/mac/editing/deleting/delete-tab-001-expected.txt:
        * platform/mac/editing/deleting/delete-tab-002-expected.txt:
        * platform/mac/editing/deleting/delete-tab-003-expected.txt:
        * platform/mac/editing/deleting/delete-tab-004-expected.txt:
        * platform/mac/editing/deleting/delete-trailing-ws-001-expected.txt:
        * platform/mac/editing/deleting/delete-trailing-ws-002-expected.txt:
        * platform/mac/editing/deleting/delete-ws-fixup-001-expected.txt:
        * platform/mac/editing/deleting/delete-ws-fixup-002-expected.txt:
        * platform/mac/editing/deleting/forward-delete-expected.txt:
        * platform/mac/editing/deleting/non-smart-delete-expected.txt:
        * platform/mac/editing/deleting/smart-delete-001-expected.txt:
        * platform/mac/editing/deleting/smart-delete-002-expected.txt:
        * platform/mac/editing/deleting/smart-delete-003-expected.txt:
        * platform/mac/editing/deleting/smart-delete-004-expected.txt:
        * platform/mac/editing/execCommand/insertHorizontalRule-expected.txt:
        * platform/mac/editing/input/firstrectforcharacterrange-styled-expected.txt:
        * platform/mac/editing/input/text-input-controller-expected.txt:
        * platform/mac/editing/inserting/4278698-expected.txt:
        * platform/mac/editing/inserting/editing-empty-divs-expected.txt:
        * platform/mac/editing/inserting/insert-3654864-fix-expected.txt:
        * platform/mac/editing/inserting/insert-after-delete-001-expected.txt:
        * platform/mac/editing/inserting/insert-br-003-expected.txt:
        * platform/mac/editing/inserting/insert-br-006-expected.txt:
        * platform/mac/editing/inserting/insert-br-007-expected.txt:
        * platform/mac/editing/inserting/insert-br-008-expected.txt:
        * platform/mac/editing/inserting/insert-br-009-expected.txt:
        * platform/mac/editing/inserting/insert-br-at-tabspan-002-expected.txt:
        * platform/mac/editing/inserting/insert-br-at-tabspan-003-expected.txt:
        * platform/mac/editing/inserting/insert-div-003-expected.txt:
        * platform/mac/editing/inserting/insert-div-006-expected.txt:
        * platform/mac/editing/inserting/insert-div-008-expected.txt:
        * platform/mac/editing/inserting/insert-div-024-expected.txt:
        * platform/mac/editing/inserting/insert-space-in-empty-doc-expected.txt:
        * platform/mac/editing/inserting/insert-tab-003-expected.txt:
        * platform/mac/editing/inserting/insert-text-at-tabspan-001-expected.txt:
        * platform/mac/editing/inserting/insert-text-at-tabspan-002-expected.txt:
        * platform/mac/editing/inserting/insert-text-with-newlines-expected.txt:
        * platform/mac/editing/inserting/typing-001-expected.txt:
        * platform/mac/editing/inserting/typing-002-expected.txt:
        * platform/mac/editing/inserting/typing-003-expected.txt:
        * platform/mac/editing/inserting/typing-around-br-001-expected.txt:
        * platform/mac/editing/inserting/typing-around-image-001-expected.txt:
        * platform/mac/editing/pasteboard/4076267-2-expected.txt:
        * platform/mac/editing/pasteboard/4076267-3-expected.txt:
        * platform/mac/editing/pasteboard/bad-placeholder-expected.txt:
        * platform/mac/editing/pasteboard/cut-text-001-expected.txt:
        * platform/mac/editing/pasteboard/emacs-ctrl-a-k-y-expected.txt:
        * platform/mac/editing/pasteboard/emacs-ctrl-k-y-001-expected.txt:
        * platform/mac/editing/pasteboard/interchange-newline-1-expected.txt:
        * platform/mac/editing/pasteboard/merge-end-1-expected.txt:
        * platform/mac/editing/pasteboard/merge-end-2-expected.txt:
        * platform/mac/editing/pasteboard/merge-end-4-expected.txt:
        * platform/mac/editing/pasteboard/merge-end-list-expected.txt:
        * platform/mac/editing/pasteboard/merge-end-table-expected.txt:
        * platform/mac/editing/pasteboard/paste-match-style-001-expected.txt:
        * platform/mac/editing/pasteboard/paste-text-001-expected.txt:
        * platform/mac/editing/pasteboard/paste-text-019-expected.txt:
        * platform/mac/editing/pasteboard/paste-text-at-tabspan-001-expected.txt:
        * platform/mac/editing/pasteboard/paste-text-at-tabspan-002-expected.txt:
        * platform/mac/editing/pasteboard/paste-text-at-tabspan-003-expected.txt:
        * platform/mac/editing/pasteboard/paste-xml-expected.txt:
        * platform/mac/editing/pasteboard/pasting-object-expected.txt:
        * platform/mac/editing/pasteboard/smart-paste-002-expected.txt:
        * platform/mac/editing/pasteboard/smart-paste-006-expected.txt:
        * platform/mac/editing/pasteboard/smart-paste-007-expected.txt:
        * platform/mac/editing/pasteboard/subframe-dragndrop-1-expected.txt:
        * platform/mac/editing/spelling/spelling-expected.txt:
        * platform/mac/editing/style/style-3681552-fix-001-expected.txt:
        * platform/mac/editing/style/style-3681552-fix-002-expected.txt:
        * platform/mac/editing/style/style-boundary-002-expected.txt:
        * platform/mac/editing/style/style-boundary-005-expected.txt:
        * platform/mac/editing/style/typing-style-001-expected.txt:
        * platform/mac/editing/style/typing-style-002-expected.txt:
        * platform/mac/editing/style/unbold-in-bold-expected.txt:
        * platform/mac/editing/undo/4063751-expected.txt:
        * platform/mac/editing/undo/redo-typing-001-expected.txt:
        * platform/mac/editing/undo/undo-combined-delete-boundary-expected.txt:
        * platform/mac/editing/undo/undo-combined-delete-expected.txt:
        * platform/mac/editing/undo/undo-delete-boundary-expected.txt:
        * platform/mac/editing/undo/undo-delete-expected.txt:
        * platform/mac/editing/undo/undo-forward-delete-boundary-expected.txt:
        * platform/mac/editing/undo/undo-forward-delete-expected.txt:
        * platform/mac/editing/undo/undo-misspellings-expected.txt:
        * platform/mac/editing/undo/undo-typing-001-expected.txt:
        * platform/mac/editing/unsupported-content/list-type-after-expected.txt:
        * platform/mac/editing/unsupported-content/list-type-before-expected.txt:
        * platform/mac/editing/unsupported-content/table-type-after-expected.txt:
        * platform/mac/editing/unsupported-content/table-type-before-expected.txt:


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7eeeb4b2
2010-12-23 Ryosuke Niwa <rniwa@webkit.org>
Reviewed by Darin Adler.
Selection becomes stale when CharacterData is manipulated directly
https://bugs.webkit.org/show_bug.cgi?id=51389
Added tests to ensure WebKit adjusts or clears selection when the start container
or the end container of the selection's first range is modified by CharacterData's API.
Many editing tests had to be rebaselined due to different editing delegate dumps
caused by WebKit's properly adjusting selection's offsets as editing commands modify the DOM.
* editing/deleting/delete-by-word-001-expected.txt:
* editing/deleting/delete-by-word-002-expected.txt:
* editing/deleting/delete-ligature-001-expected.txt:
* editing/deleting/delete-ligature-002-expected.txt:
* editing/deleting/delete-ligature-003-expected.txt:
* editing/deleting/skip-virama-001-expected.txt:
* editing/execCommand/createLink-expected.txt:
* editing/execCommand/hilitecolor-expected.txt:
* editing/execCommand/unlink-expected.txt:
* editing/inserting/insert-thai-characters-001-expected.txt:
* editing/pasteboard/copy-in-password-field-expected.txt:
* editing/pasteboard/paste-into-anchor-text-expected.txt:
* editing/selection/character-data-mutation-crash-expected.txt: Added.
* editing/selection/character-data-mutation-crash.html: Added.
* editing/selection/character-data-mutation-expected.txt: Added.
* editing/selection/character-data-mutation.html: Added.
* editing/style/remove-underline-from-stylesheet-expected.txt:
* editing/style/typing-style-003-expected.txt:
* editing/undo/redo-style-expected.txt:
* platform/mac/editing/deleting/collapse-whitespace-3587601-fix-expected.txt:
* platform/mac/editing/deleting/delete-3608430-fix-expected.txt:
* platform/mac/editing/deleting/delete-3608445-fix-expected.txt:
* platform/mac/editing/deleting/delete-3608462-fix-expected.txt:
* platform/mac/editing/deleting/delete-after-span-ws-001-expected.txt:
* platform/mac/editing/deleting/delete-after-span-ws-002-expected.txt:
* platform/mac/editing/deleting/delete-after-span-ws-003-expected.txt:
* platform/mac/editing/deleting/delete-and-undo-expected.txt:
* platform/mac/editing/deleting/delete-block-merge-contents-010-expected.txt:
* platform/mac/editing/deleting/delete-block-table-expected.txt:
* platform/mac/editing/deleting/delete-br-007-expected.txt:
* platform/mac/editing/deleting/delete-character-001-expected.txt:
* platform/mac/editing/deleting/delete-contiguous-ws-001-expected.txt:
* platform/mac/editing/deleting/delete-hr-expected.txt:
* platform/mac/editing/deleting/delete-leading-ws-001-expected.txt:
* platform/mac/editing/deleting/delete-line-end-ws-001-expected.txt:
* platform/mac/editing/deleting/delete-line-end-ws-002-expected.txt:
* platform/mac/editing/deleting/delete-listitem-001-expected.txt:
* platform/mac/editing/deleting/delete-selection-001-expected.txt:
* platform/mac/editing/deleting/delete-tab-001-expected.txt:
* platform/mac/editing/deleting/delete-tab-002-expected.txt:
* platform/mac/editing/deleting/delete-tab-003-expected.txt:
* platform/mac/editing/deleting/delete-tab-004-expected.txt:
* platform/mac/editing/deleting/delete-trailing-ws-001-expected.txt:
* platform/mac/editing/deleting/delete-trailing-ws-002-expected.txt:
* platform/mac/editing/deleting/delete-ws-fixup-001-expected.txt:
* platform/mac/editing/deleting/delete-ws-fixup-002-expected.txt:
* platform/mac/editing/deleting/forward-delete-expected.txt:
* platform/mac/editing/deleting/non-smart-delete-expected.txt:
* platform/mac/editing/deleting/smart-delete-001-expected.txt:
* platform/mac/editing/deleting/smart-delete-002-expected.txt:
* platform/mac/editing/deleting/smart-delete-003-expected.txt:
* platform/mac/editing/deleting/smart-delete-004-expected.txt:
* platform/mac/editing/execCommand/insertHorizontalRule-expected.txt:
* platform/mac/editing/input/firstrectforcharacterrange-styled-expected.txt:
* platform/mac/editing/input/text-input-controller-expected.txt:
* platform/mac/editing/inserting/4278698-expected.txt:
* platform/mac/editing/inserting/editing-empty-divs-expected.txt:
* platform/mac/editing/inserting/insert-3654864-fix-expected.txt:
* platform/mac/editing/inserting/insert-after-delete-001-expected.txt:
* platform/mac/editing/inserting/insert-br-003-expected.txt:
* platform/mac/editing/inserting/insert-br-006-expected.txt:
* platform/mac/editing/inserting/insert-br-007-expected.txt:
* platform/mac/editing/inserting/insert-br-008-expected.txt:
* platform/mac/editing/inserting/insert-br-009-expected.txt:
* platform/mac/editing/inserting/insert-br-at-tabspan-002-expected.txt:
* platform/mac/editing/inserting/insert-br-at-tabspan-003-expected.txt:
* platform/mac/editing/inserting/insert-div-003-expected.txt:
* platform/mac/editing/inserting/insert-div-006-expected.txt:
* platform/mac/editing/inserting/insert-div-008-expected.txt:
* platform/mac/editing/inserting/insert-div-024-expected.txt:
* platform/mac/editing/inserting/insert-space-in-empty-doc-expected.txt:
* platform/mac/editing/inserting/insert-tab-003-expected.txt:
* platform/mac/editing/inserting/insert-text-at-tabspan-001-expected.txt:
* platform/mac/editing/inserting/insert-text-at-tabspan-002-expected.txt:
* platform/mac/editing/inserting/insert-text-with-newlines-expected.txt:
* platform/mac/editing/inserting/typing-001-expected.txt:
* platform/mac/editing/inserting/typing-002-expected.txt:
* platform/mac/editing/inserting/typing-003-expected.txt:
* platform/mac/editing/inserting/typing-around-br-001-expected.txt:
* platform/mac/editing/inserting/typing-around-image-001-expected.txt:
* platform/mac/editing/pasteboard/4076267-2-expected.txt:
* platform/mac/editing/pasteboard/4076267-3-expected.txt:
* platform/mac/editing/pasteboard/bad-placeholder-expected.txt:
* platform/mac/editing/pasteboard/cut-text-001-expected.txt:
* platform/mac/editing/pasteboard/emacs-ctrl-a-k-y-expected.txt:
* platform/mac/editing/pasteboard/emacs-ctrl-k-y-001-expected.txt:
* platform/mac/editing/pasteboard/interchange-newline-1-expected.txt:
* platform/mac/editing/pasteboard/merge-end-1-expected.txt:
* platform/mac/editing/pasteboard/merge-end-2-expected.txt:
* platform/mac/editing/pasteboard/merge-end-4-expected.txt:
* platform/mac/editing/pasteboard/merge-end-list-expected.txt:
* platform/mac/editing/pasteboard/merge-end-table-expected.txt:
* platform/mac/editing/pasteboard/paste-match-style-001-expected.txt:
* platform/mac/editing/pasteboard/paste-text-001-expected.txt:
* platform/mac/editing/pasteboard/paste-text-019-expected.txt:
* platform/mac/editing/pasteboard/paste-text-at-tabspan-001-expected.txt:
* platform/mac/editing/pasteboard/paste-text-at-tabspan-002-expected.txt:
* platform/mac/editing/pasteboard/paste-text-at-tabspan-003-expected.txt:
* platform/mac/editing/pasteboard/paste-xml-expected.txt:
* platform/mac/editing/pasteboard/pasting-object-expected.txt:
* platform/mac/editing/pasteboard/smart-paste-002-expected.txt:
* platform/mac/editing/pasteboard/smart-paste-006-expected.txt:
* platform/mac/editing/pasteboard/smart-paste-007-expected.txt:
* platform/mac/editing/pasteboard/subframe-dragndrop-1-expected.txt:
* platform/mac/editing/spelling/spelling-expected.txt:
* platform/mac/editing/style/style-3681552-fix-001-expected.txt:
* platform/mac/editing/style/style-3681552-fix-002-expected.txt:
* platform/mac/editing/style/style-boundary-002-expected.txt:
* platform/mac/editing/style/style-boundary-005-expected.txt:
* platform/mac/editing/style/typing-style-001-expected.txt:
* platform/mac/editing/style/typing-style-002-expected.txt:
* platform/mac/editing/style/unbold-in-bold-expected.txt:
* platform/mac/editing/undo/4063751-expected.txt:
* platform/mac/editing/undo/redo-typing-001-expected.txt:
* platform/mac/editing/undo/undo-combined-delete-boundary-expected.txt:
* platform/mac/editing/undo/undo-combined-delete-expected.txt:
* platform/mac/editing/undo/undo-delete-boundary-expected.txt:
* platform/mac/editing/undo/undo-delete-expected.txt:
* platform/mac/editing/undo/undo-forward-delete-boundary-expected.txt:
* platform/mac/editing/undo/undo-forward-delete-expected.txt:
* platform/mac/editing/undo/undo-misspellings-expected.txt:
* platform/mac/editing/undo/undo-typing-001-expected.txt:
* platform/mac/editing/unsupported-content/list-type-after-expected.txt:
* platform/mac/editing/unsupported-content/list-type-before-expected.txt:
* platform/mac/editing/unsupported-content/table-type-after-expected.txt:
* platform/mac/editing/unsupported-content/table-type-before-expected.txt:
2010-12-23 Kenneth Russell <kbr@google.com>
Unreviewed Chromium test expectations update. Fix botched update
......
......@@ -3,29 +3,30 @@ EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 12 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 12 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldDeleteDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 12 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 12 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 12 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
Tests:
......
......@@ -4,10 +4,10 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
Tests:
......
......@@ -3,7 +3,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV to 0 of DIV toDOMRange:range from 1 of #text > DIV to 1 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV to 1 of #text > DIV toDOMRange:range from 2 of #text > DIV to 2 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV to 2 of #text > DIV toDOMRange:range from 2 of #text > DIV to 2 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV to 2 of #text > DIV
......
......@@ -4,7 +4,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
......
......@@ -6,7 +6,6 @@ EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > BODY > HTML
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
This test tests whether the undo command works when the BackSpace key deletes the last character of a ligature "วั".
......
......@@ -4,10 +4,10 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
......
......@@ -13,7 +13,7 @@ EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > A > DIV > LI > OL > BODY > HTML > #document to 14 of #text > A > DIV > LI > OL > BODY > HTML > #document toDOMRange:range from 0 of #text > A > DIV > LI > OL > BODY > HTML > #document to 10 of #text > A > DIV > LI > OL > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > A > DIV > LI > OL > BODY > HTML > #document to 10 of #text > A > DIV > LI > OL > BODY > HTML > #document toDOMRange:range from 0 of #text > A > DIV > LI > OL > BODY > HTML > #document to 10 of #text > A > DIV > LI > OL > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of DIV > LI > OL > BODY > HTML > #document to 3 of DIV > LI > OL > BODY > HTML > #document
......
......@@ -4,7 +4,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 6 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > SPAN > DIV > BODY > HTML > #document to 6 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
......
......@@ -13,7 +13,7 @@ EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > A > DIV > LI > OL > BODY > HTML > #document to 10 of #text > A > DIV > LI > OL > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > LI > OL > BODY > HTML > #document to 7 of #text > DIV > LI > OL > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > A > DIV > LI > OL > BODY > HTML > #document to 7 of #text > A > DIV > LI > OL > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > LI > OL > BODY > HTML > #document to 7 of #text > DIV > LI > OL > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldEndEditingInDOMRange:range from 0 of DIV > LI > OL > BODY > HTML > #document to 3 of DIV > LI > OL > BODY > HTML > #document
......
......@@ -4,43 +4,43 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > BODY > HTML > #document to 7 of #text > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > BODY > HTML > #document to 8 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > BODY > HTML > #document to 8 of #text > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > BODY > HTML > #document to 8 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > BODY > HTML > #document to 8 of #text > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 9 of #text > DIV > BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 10 of #text > DIV > BODY > HTML > #document toDOMRange:range from 11 of #text > DIV > BODY > HTML > #document to 11 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > BODY > HTML > #document to 11 of #text > DIV > BODY > HTML > #document toDOMRange:range from 11 of #text > DIV > BODY > HTML > #document to 11 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 5 of #text > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > BODY > HTML > #document to 6 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
This test tests whether we can insert a Thai character after a Thai "prepend" character.
......
......@@ -4,7 +4,7 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldInsertText:[not modified] replacingDOMRange:range from 0 of #text > DIV to 14 of #text > DIV givenAction:WebViewInsertActionPasted
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV to 14 of #text > DIV toDOMRange:range from 14 of #text > DIV to 14 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV to 14 of #text > DIV toDOMRange:range from 14 of #text > DIV to 14 of #text > DIV affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
This test verifies that copying is disabled for password fields by attempting to copy from a password field and paste into a textfield. If the test passes, you'll see a of 'PASS' message below, and the textfield will remain unmodified.
......
EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > B > A > TD > TR > TBODY > TABLE > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document to 5 of #text > B > A > TD > TR > TBODY > TABLE > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document toDOMRange:range from 16 of #text > B > A > TD > TR > TBODY > TABLE > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document to 16 of #text > B > A > TD > TR > TBODY > TABLE > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > B > A > TD > TR > TBODY > TABLE > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document to 16 of #text > B > A > TD > TR > TBODY > TABLE > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document toDOMRange:range from 16 of #text > B > A > TD > TR > TBODY > TABLE > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document to 16 of #text > B > A > TD > TR > TBODY > TABLE > TD > TR > TBODY > TABLE > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
......
This tests modifying the value of text node that's pointed by the selection and executing an editing command. WebKit should not crash and you should see PASS:
PASS
<!DOCTYPE html>
<html>
<body>
<p>This tests modifying the value of text node that's pointed by the selection and executing an editing command. WebKit should not crash and you should see PASS:</p>
<div id="test" contenteditable>hello world</div>
<script>
if (window.layoutTestController)
layoutTestController.dumpAsText();
var test = document.getElementById('test');
test.focus();
window.getSelection().setBaseAndExtent(test.firstChild, 1, test.firstChild, 10);
test.firstChild.data = 'hey';
document.execCommand('insertLineBreak', false, null);
test.innerHTML = 'PASS';
</script>
</body>
</html>
This test ensures WebKit adjusts or clears the selection when either the start or the end container was modified.
Base is first:
PASS: Removing the parent of startContainer cleared selection
PASS: Replacing nodeValue of startContainer cleared selection
PASS: Replacing nodeValue of endContainer cleared selection
PASS: Appending " WebKit" to startContainer did not move selection
PASS: Appending " WebKit" to endContainer did not move selection
PASS: Inserting " WebKit" to startContainer before the end point moved the start offset from 2 to 9
PASS: Inserting " WebKit" to endContainer before the end point moved the start offset from 3 to 10
PASS: Inserting " WebKit" to startContainer after the end point did not move selection
PASS: Inserting " WebKit" to endContainer after the end point did not move selection
PASS: Removing text in startContainer containing the end point cleared selection
PASS: Removing text in endContainer containing the end point cleared selection
PASS: Removing 2 characters in startContainer before the end point moved the start offset from 2 to 0
PASS: Removing 2 characters in endContainer before the end point moved the start offset from 3 to 1
PASS: Removing text in startContainer after the end point did not move selection
PASS: Removing text in endContainer after the end point did not move selection
PASS: Replacing text in startContainer containing the end point cleared selection
PASS: Replacing text in endContainer containing the end point cleared selection
PASS: Replacing 2 characters in startContainer by 2 characters before the end point did not move selection
PASS: Replacing 2 characters in endContainer by 2 characters before the end point did not move selection
PASS: Replacing 2 characters in startContainer by 1 characters before the end point moved the start offset from 2 to 1
PASS: Replacing 2 characters in endContainer by 1 characters before the end point moved the start offset from 3 to 2
PASS: Replacing 2 characters in startContainer by 2 characters after the end point did not move selection
PASS: Replacing 2 characters in endContainer by 2 characters after the end point did not move selection
Extent is first:
PASS: Removing the parent of startContainer cleared selection
PASS: Replacing nodeValue of startContainer cleared selection
PASS: Replacing nodeValue of endContainer cleared selection
PASS: Appending " WebKit" to startContainer did not move selection
PASS: Appending " WebKit" to endContainer did not move selection
PASS: Inserting " WebKit" to startContainer before the end point moved the start offset from 2 to 9
PASS: Inserting " WebKit" to endContainer before the end point moved the start offset from 3 to 10
PASS: Inserting " WebKit" to startContainer after the end point did not move selection
PASS: Inserting " WebKit" to endContainer after the end point did not move selection
PASS: Removing text in startContainer containing the end point cleared selection
PASS: Removing text in endContainer containing the end point cleared selection
PASS: Removing 2 characters in startContainer before the end point moved the start offset from 2 to 0
PASS: Removing 2 characters in endContainer before the end point moved the start offset from 3 to 1
PASS: Removing text in startContainer after the end point did not move selection
PASS: Removing text in endContainer after the end point did not move selection
PASS: Replacing text in startContainer containing the end point cleared selection
PASS: Replacing text in endContainer containing the end point cleared selection
PASS: Replacing 2 characters in startContainer by 2 characters before the end point did not move selection
PASS: Replacing 2 characters in endContainer by 2 characters before the end point did not move selection
PASS: Replacing 2 characters in startContainer by 1 characters before the end point moved the start offset from 2 to 1
PASS: Replacing 2 characters in endContainer by 1 characters before the end point moved the start offset from 3 to 2
PASS: Replacing 2 characters in startContainer by 2 characters after the end point did not move selection
PASS: Replacing 2 characters in endContainer by 2 characters after the end point did not move selection
DONE
<!DOCTYPE html>
<html>
<body>
<p>This test ensures WebKit adjusts or clears the selection when either the start or the end container was modified.</p>
<div id="test" contenteditable></div>
<pre>
<script>
var test = document.getElementById('test');
test.focus();
if (window.layoutTestController)
layoutTestController.dumpAsText();
var baseIsFirst = true;
function runSingleTest(actor, isStart, expectedOffset) {
test.innerHTML = '<span>hello</span> world';
// Select "llo wo"
var selection = window.getSelection();
if (baseIsFirst)
selection.setBaseAndExtent(test.firstChild.firstChild, 2, test.lastChild, 3);
else
selection.setBaseAndExtent(test.lastChild, 3, test.firstChild.firstChild, 2);
var originalOffset = isStart ? selection.getRangeAt(0).startOffset : selection.getRangeAt(0).endOffset;
var action = isStart ? actor(test.firstChild.firstChild, 'startContainer') : actor(test.lastChild, 'endContainer');
var message = null;
var passed = false;
if (typeof(expectedOffset) == 'undefined') {
if (selection.rangeCount)
message = 'did not clear selection';
else {
message = 'cleared selection';
passed = true;
}
} else if (!selection.rangeCount)
message = 'cleared selection unexpectedly';
else if ((selection.getRangeAt(0).startContainer == selection.baseNode
&& selection.getRangeAt(0).startOffset == selection.baseOffset) ^ baseIsFirst)
message = 'exchanged base and extent';
else {
var actualOffset = isStart ? selection.getRangeAt(0).startOffset : selection.getRangeAt(0).endOffset;
message = actualOffset == originalOffset ? 'did not move selection' : 'moved the start offset from ' +
originalOffset + ' to ' + actualOffset;
if (actualOffset != expectedOffset)
message += ' but expected ' + expectedOffset;
else
passed = true;
}
document.write((passed ? 'PASS: ' : 'FAIL: ') + action + ' ' + message + '\n');
}
function runTestPairs(actor, expectedStartOffset, expectedEndOffset, skipEnd) {
runSingleTest(actor, true, expectedStartOffset);
if (!skipEnd)
runSingleTest(actor, false, expectedEndOffset);
}
function runTests() {
runTestPairs(function() { test.removeChild(test.firstChild); return 'Removing the parent of startContainer'; }, undefined, undefined, true);
runTestPairs(function(node, nodeName) { node.nodeValue = 'a'; return 'Replacing nodeValue of ' + nodeName; }, undefined, undefined);
runTestPairs(function(node, nodeName) { node.appendData(' WebKit'); return 'Appending " WebKit" to ' + nodeName; }, 2, 3);
runTestPairs(function(node, nodeName) { node.insertData(2, 'WebKit ');
return 'Inserting " WebKit" to ' + nodeName + ' before the end point'; }, 9, 10);
runTestPairs(function(node, nodeName) { node.insertData(3, 'WebKit ');
return 'Inserting " WebKit" to ' + nodeName + ' after the end point'; }, 2, 3);
runTestPairs(function(node, nodeName) { node.deleteData(1, 4);
return 'Removing text in ' + nodeName + ' containing the end point'; }, undefined, undefined);
runTestPairs(function(node, nodeName) { node.deleteData(0, 2);
return 'Removing 2 characters in ' + nodeName + ' before the end point'; }, 0, 1);
runTestPairs(function(node, nodeName) { node.deleteData(3, 2);
return 'Removing text in ' + nodeName + ' after the end point'; }, 2, 3);
runTestPairs(function(node, nodeName) { node.replaceData(1, 4, '1234');
return 'Replacing text in ' + nodeName + ' containing the end point'; }, undefined, undefined);
runTestPairs(function(node, nodeName) { node.replaceData(0, 2, '12');
return 'Replacing 2 characters in ' + nodeName + ' by 2 characters before the end point'; }, 2, 3);
runTestPairs(function(node, nodeName) { node.replaceData(0, 2, '1');
return 'Replacing 2 characters in ' + nodeName + ' by 1 characters before the end point'; }, 1, 2);
runTestPairs(function(node, nodeName) { node.replaceData(3, 2, '12');
return 'Replacing 2 characters in ' + nodeName + ' by 2 characters after the end point'; }, 2, 3);
}
document.write('Base is first:\n');
runTests();
baseIsFirst = false;
document.write('\nExtent is first:\n');
runTests();
/*
runTestPairs(function(node, nodeName) { node.splitText(3); return 'Splitting ' + nodeName; });
*/
test.style.display = 'none';
document.write('\nDONE');
</script>
</pre>
</body>
</html>
......@@ -4,67 +4,67 @@ EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotificatio
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 1 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > BODY > HTML > #document to 3 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE