Changeset 93134 in webkit


Ignore:
Timestamp:
Aug 16, 2011 11:39:52 AM (13 years ago)
Author:
rniwa@webkit.org
Message:

Programmatically set selection should not have direction on Mac
https://bugs.webkit.org/show_bug.cgi?id=60529

Patch by Wyatt Carss <wcarss@chromium.org> on 2011-08-12
Reviewed by Ryosuke Niwa.

Source/WebCore:

Modified default value of VisibleSelection->m_isDirectional from 'true'
to 'false' by adding a defaulted argument to several VisibleSelection
constructors to make programmatic selection be directionless by default
on Mac. Also modified several calls to VisibleSelection's constructors
to correctly preserve directionality.

Near the end of FrameSelection::modify (presently FrameSelection.cpp:869)
a call to setExtent triggers an editing delegate that uses the
FrameSelection. The direction here should have been preserved from before,
but setIsDirectional was not called until after FrameSelection.cpp:869. It
has been moved up to make things behave.

  • WebCore.exp.in:
  • editing/ApplyBlockElementCommand.cpp:

(WebCore::ApplyBlockElementCommand::doApply):
(WebCore::ApplyBlockElementCommand::formatSelection):

  • editing/ApplyStyleCommand.cpp:

(WebCore::ApplyStyleCommand::updateStartEnd):

  • editing/BreakBlockquoteCommand.cpp:

(WebCore::BreakBlockquoteCommand::doApply):

  • editing/CompositeEditCommand.cpp:

(WebCore::CompositeEditCommand::moveParagraphWithClones):
(WebCore::CompositeEditCommand::moveParagraphs):
(WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
(WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):

  • editing/CreateLinkCommand.cpp:

(WebCore::CreateLinkCommand::doApply):

  • editing/DeleteSelectionCommand.cpp:

(WebCore::DeleteSelectionCommand::setStartingSelectionOnSmartDelete):
(WebCore::DeleteSelectionCommand::doApply):

  • editing/Editor.cpp:

(WebCore::Editor::selectionForCommand):

  • editing/FrameSelection.cpp:

(WebCore::shouldAlwaysUseDirectionalSelection):
(WebCore::FrameSelection::FrameSelection):
(WebCore::FrameSelection::moveTo):
(WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded):
(WebCore::FrameSelection::modify):
(WebCore::FrameSelection::setBase):
(WebCore::FrameSelection::setExtent):

  • editing/FrameSelection.h:
  • editing/InsertLineBreakCommand.cpp:

(WebCore::InsertLineBreakCommand::doApply):

  • editing/InsertListCommand.cpp:

(WebCore::InsertListCommand::doApply):

  • editing/InsertParagraphSeparatorCommand.cpp:

(WebCore::InsertParagraphSeparatorCommand::doApply):

  • editing/InsertTextCommand.cpp:

(WebCore::InsertTextCommand::performTrivialReplace):
(WebCore::InsertTextCommand::doApply):

  • editing/MoveSelectionCommand.cpp:

(WebCore::MoveSelectionCommand::doApply):

  • editing/ReplaceSelectionCommand.cpp:

(WebCore::ReplaceSelectionCommand::completeHTMLReplacement):

  • editing/TypingCommand.cpp:

(WebCore::TypingCommand::makeEditableRootEmpty):
(WebCore::TypingCommand::deleteKeyPressed):
(WebCore::TypingCommand::forwardDeleteKeyPressed):

  • editing/VisibleSelection.cpp:

(WebCore::VisibleSelection::VisibleSelection):

  • editing/VisibleSelection.h:
  • page/EventHandler.cpp:

(WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
(WebCore::EventHandler::updateSelectionForMouseDrag):

LayoutTests:

Added editing/selection/programmatic-selection-on-mac-is-directionless
to test selection direction in programmatically set selections on
windows, unix, and mac, in plain text, editable divs, text-input
fields, and textareas. Modified text baselines for many editing tests,
which had a delegate change as a result of the cpp patch.

  • editing/deleting/delete-ligature-003-expected.txt:
  • editing/deleting/paragraph-in-preserveNewline-expected.txt:
  • editing/deleting/whitespace-pre-1-expected.txt:
  • editing/selection/after-line-break-expected.txt:
  • platform/mac/editing/deleting/delete-all-text-in-text-field-assertion-expected.txt:
  • platform/mac/editing/deleting/delete-and-undo-expected.txt:
  • platform/mac/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt:
  • platform/mac/editing/deleting/delete-br-002-expected.txt:
  • platform/mac/editing/deleting/delete-br-004-expected.txt:
  • platform/mac/editing/deleting/delete-br-005-expected.txt:
  • platform/mac/editing/deleting/delete-br-006-expected.txt:
  • platform/mac/editing/deleting/delete-br-009-expected.txt:
  • platform/mac/editing/deleting/delete-br-010-expected.txt:
  • platform/mac/editing/deleting/delete-br-011-expected.txt:
  • platform/mac/editing/deleting/delete-ws-fixup-003-expected.txt:
  • platform/mac/editing/deleting/delete-ws-fixup-004-expected.txt:
  • platform/mac/editing/deleting/smart-delete-002-expected.txt:
  • platform/mac/editing/inserting/insert-3800346-fix-expected.txt:
  • platform/mac/editing/inserting/insert-at-end-01-expected.txt:
  • platform/mac/editing/inserting/insert-at-end-02-expected.txt:
  • platform/mac/editing/inserting/insert-div-010-expected.txt:
  • platform/mac/editing/inserting/insert-div-013-expected.txt:
  • platform/mac/editing/inserting/insert-div-015-expected.txt:
  • platform/mac/editing/inserting/insert-div-019-expected.txt:
  • platform/mac/editing/inserting/insert-paragraph-03-expected.txt:
  • platform/mac/editing/pasteboard/3976872-expected.txt:
  • platform/mac/editing/pasteboard/4076267-2-expected.txt:
  • platform/mac/editing/pasteboard/4076267-expected.txt:
  • platform/mac/editing/pasteboard/drag-selected-image-to-contenteditable-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/paste-text-014-expected.txt:
  • platform/mac/editing/pasteboard/paste-text-015-expected.txt:
  • platform/mac/editing/pasteboard/smart-paste-008-expected.txt:
  • platform/mac/editing/selection/4932260-1-expected.txt:
  • platform/mac/editing/selection/anchor-focus2-expected.txt:
  • platform/mac/editing/selection/anchor-focus3-expected.txt:
  • platform/mac/editing/selection/expanding-selections-expected.txt:
  • platform/mac/editing/selection/expanding-selections2-expected.txt:
  • platform/mac/editing/selection/fake-drag-expected.txt:
  • platform/mac/editing/selection/move-by-word-001-expected.txt:
  • platform/mac/editing/selection/transformed-selection-rects-expected.txt:
  • platform/mac/editing/selection/triple-click-in-pre-expected.txt:
  • platform/mac/editing/style/create-block-for-style-008-expected.txt:
  • platform/mac/editing/undo/4063751-expected.txt:
  • platform/mac/editing/undo/undo-forward-delete-boundary-expected.txt:
  • platform/mac/editing/undo/undo-forward-delete-expected.txt:
Location:
trunk
Files:
2 added
72 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r93132 r93134  
     12011-08-12  Wyatt Carss  <wcarss@chromium.org>
     2
     3        Programmatically set selection should not have direction on Mac
     4        https://bugs.webkit.org/show_bug.cgi?id=60529
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Added editing/selection/programmatic-selection-on-mac-is-directionless
     9        to test selection direction in programmatically set selections on
     10        windows, unix, and mac, in plain text, editable divs, text-input
     11        fields, and textareas. Modified text baselines for many editing tests,
     12        which had a delegate change as a result of the cpp patch.
     13
     14        * editing/deleting/delete-ligature-003-expected.txt:
     15        * editing/deleting/paragraph-in-preserveNewline-expected.txt:
     16        * editing/deleting/whitespace-pre-1-expected.txt:
     17        * editing/selection/after-line-break-expected.txt:
     18        * platform/mac/editing/deleting/delete-all-text-in-text-field-assertion-expected.txt:
     19        * platform/mac/editing/deleting/delete-and-undo-expected.txt:
     20        * platform/mac/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt:
     21        * platform/mac/editing/deleting/delete-br-002-expected.txt:
     22        * platform/mac/editing/deleting/delete-br-004-expected.txt:
     23        * platform/mac/editing/deleting/delete-br-005-expected.txt:
     24        * platform/mac/editing/deleting/delete-br-006-expected.txt:
     25        * platform/mac/editing/deleting/delete-br-009-expected.txt:
     26        * platform/mac/editing/deleting/delete-br-010-expected.txt:
     27        * platform/mac/editing/deleting/delete-br-011-expected.txt:
     28        * platform/mac/editing/deleting/delete-ws-fixup-003-expected.txt:
     29        * platform/mac/editing/deleting/delete-ws-fixup-004-expected.txt:
     30        * platform/mac/editing/deleting/smart-delete-002-expected.txt:
     31        * platform/mac/editing/inserting/insert-3800346-fix-expected.txt:
     32        * platform/mac/editing/inserting/insert-at-end-01-expected.txt:
     33        * platform/mac/editing/inserting/insert-at-end-02-expected.txt:
     34        * platform/mac/editing/inserting/insert-div-010-expected.txt:
     35        * platform/mac/editing/inserting/insert-div-013-expected.txt:
     36        * platform/mac/editing/inserting/insert-div-015-expected.txt:
     37        * platform/mac/editing/inserting/insert-div-019-expected.txt:
     38        * platform/mac/editing/inserting/insert-paragraph-03-expected.txt:
     39        * platform/mac/editing/pasteboard/3976872-expected.txt:
     40        * platform/mac/editing/pasteboard/4076267-2-expected.txt:
     41        * platform/mac/editing/pasteboard/4076267-expected.txt:
     42        * platform/mac/editing/pasteboard/drag-selected-image-to-contenteditable-expected.txt:
     43        * platform/mac/editing/pasteboard/emacs-ctrl-a-k-y-expected.txt:
     44        * platform/mac/editing/pasteboard/emacs-ctrl-k-y-001-expected.txt:
     45        * platform/mac/editing/pasteboard/paste-text-014-expected.txt:
     46        * platform/mac/editing/pasteboard/paste-text-015-expected.txt:
     47        * platform/mac/editing/pasteboard/smart-paste-008-expected.txt:
     48        * platform/mac/editing/selection/4932260-1-expected.txt:
     49        * platform/mac/editing/selection/anchor-focus2-expected.txt:
     50        * platform/mac/editing/selection/anchor-focus3-expected.txt:
     51        * platform/mac/editing/selection/expanding-selections-expected.txt:
     52        * platform/mac/editing/selection/expanding-selections2-expected.txt:
     53        * platform/mac/editing/selection/fake-drag-expected.txt:
     54        * platform/mac/editing/selection/move-by-word-001-expected.txt:
     55        * platform/mac/editing/selection/transformed-selection-rects-expected.txt:
     56        * platform/mac/editing/selection/triple-click-in-pre-expected.txt:
     57        * platform/mac/editing/style/create-block-for-style-008-expected.txt:
     58        * platform/mac/editing/undo/4063751-expected.txt:
     59        * platform/mac/editing/undo/undo-forward-delete-boundary-expected.txt:
     60        * platform/mac/editing/undo/undo-forward-delete-expected.txt:
     61
    1622011-08-16  Tony Chang  <tony@chromium.org>
    263
  • trunk/LayoutTests/editing/deleting/delete-ligature-003-expected.txt

    r80121 r93134  
    22EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
    33EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     4EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     5EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document
     6EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     7EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     8EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     9EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     10EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 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
     11EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     12EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     13EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     14EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document
     15EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     16EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     17EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     18EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     19EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     20EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    421EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    522EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document
     
    1229This test tests whether the undo command works when the BackSpace key deletes the last character of a ligature "วั".
    1330
    14 If this test succeeds, you can see "วั" (U+0E27,U+0E31) and a string "succeeded" below.
     31If this test succeeds, you can see "วั" (U+0E27,U+0E31) and a string "succeeded" for each platform below.
    1532
    1633วั
    17 Succeeded.
     34Succeeded for mac
     35Succeeded for win
     36Succeeded for unix
  • trunk/LayoutTests/editing/deleting/delete-ligature-003.html

    r46926 r93134  
    1313                eventSender.keyDown(String.fromCharCode(0x0008), null);
    1414        }
    15         function editingTest() {
    16             if (window.layoutTestController)
    17                 layoutTestController.dumpAsText();
     15        function runTestOn(platform) {
    1816            var testarea = document.getElementById("test");
     17            if(window.layoutTestController)
     18                layoutTestController.setEditingBehavior(platform);
     19
    1920            testarea.focus();
    2021            moveSelectionForwardByCharacterCommand();
     
    2324            execUndoCommand();
    2425            if (testarea.textContent == "\u0E27\u0E31")
    25                 log("Succeeded.");
     26                log("Succeeded for " + platform);
    2627            else
    2728                log("Failed. Actual: \"" + testarea.value + "\", Expected: \"\u0E27\u0E31\"");
     29        }
     30        function editingTest() {
     31            if (window.layoutTestController)
     32                layoutTestController.dumpAsText();
     33            runTestOn("mac");
     34            runTestOn("win");
     35            runTestOn("unix");
    2836        }
    2937        </script>
     
    3240    <body>
    3341        <p>This test tests whether the undo command works when the BackSpace key deletes the last character of a ligature "&#x0E27;&#x0E31;".</p>
    34         <p>If this test succeeds, you can see "&#x0E27;&#x0E31;" (U+0E27,U+0E31) and a string "succeeded" below.</p>
     42        <p>If this test succeeds, you can see "&#x0E27;&#x0E31;" (U+0E27,U+0E31) and a string "succeeded" for each platform below.</p>
    3543        <div id="test" contenteditable>&#x0E27;&#x0E31;</div>
    3644        <ul id="console"></ul>
  • trunk/LayoutTests/editing/deleting/paragraph-in-preserveNewline-expected.txt

    r90031 r93134  
    11EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document
    22EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
     3EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     4EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     5EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     6EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     7EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > PRE > DIV > BODY > HTML > #document to 3 of #text > PRE > DIV > BODY > HTML > #document
     8EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     9EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of PRE > DIV > BODY > HTML > #document to 0 of PRE > DIV > BODY > HTML > #document toDOMRange:range from 0 of PRE > DIV > BODY > HTML > #document to 0 of PRE > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     10EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     11EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     12EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     13EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > PRE > DIV > BODY > HTML > #document to 3 of #text > PRE > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > PRE > DIV > BODY > HTML > #document to 3 of #text > PRE > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     14EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     15EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    316EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    417EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     
    1023EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    1124EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     25EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > PRE > DIV > BODY > HTML > #document to 3 of #text > PRE > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > PRE > DIV > BODY > HTML > #document to 3 of #text > PRE > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     26EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     27EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     28EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     29EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     30EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     31EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     32EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > PRE > DIV > BODY > HTML > #document to 3 of #text > PRE > DIV > BODY > HTML > #document
     33EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     34EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     35EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     36EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     37EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > PRE > DIV > BODY > HTML > #document to 3 of #text > PRE > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > PRE > DIV > BODY > HTML > #document to 3 of #text > PRE > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     38EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     39EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     40EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1241EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
    1342This tests for a bug where deleting a paragraph in preserveNewline text would introduce an extra line.  You should see '\nbar' below.
     43
     44initial state:
     45| <pre>
     46|   "foo
     47bar"
     48
     49on mac:
    1450| <pre>
    1551|   "<#selection-caret>
    1652bar"
     53
     54after undo on mac:
     55| <pre>
     56|   "<#selection-anchor>foo<#selection-focus>
     57bar"
     58
     59on win:
     60| <pre>
     61|   "<#selection-caret>
     62bar"
     63
     64after undo on win:
     65| <pre>
     66|   "<#selection-anchor>foo<#selection-focus>
     67bar"
     68
     69on unix:
     70| <pre>
     71|   "<#selection-caret>
     72bar"
     73
     74after undo on unix:
     75| <pre>
     76|   "<#selection-anchor>foo<#selection-focus>
     77bar"
  • trunk/LayoutTests/editing/deleting/paragraph-in-preserveNewline.html

    r90031 r93134  
    88<script src="../../resources/dump-as-markup.js"></script>
    99<script>
    10 var sel = window.getSelection();
    11 var e = document.getElementById("test");
     10function runTestsOn(platform) {
     11    var sel = window.getSelection();
     12    var e = document.getElementById("test");
     13   
     14    if(window.layoutTestController)
     15        layoutTestController.setEditingBehavior(platform);
     16
     17    sel.setPosition(e, 0);
     18    sel.modify("extend", "forward", "character");
     19    sel.modify("extend", "forward", "character");
     20    sel.modify("extend", "forward", "character");
     21    document.execCommand("Delete");
     22    Markup.dump("test", "on " + platform);
     23    document.execCommand("undo");
     24    Markup.dump("test", "after undo on " + platform);
     25}
    1226
    1327if (window.layoutTestController)
    1428     layoutTestController.dumpEditingCallbacks();
    15 sel.setPosition(e, 0);
    16 sel.modify("extend", "forward", "character");
    17 sel.modify("extend", "forward", "character");
    18 sel.modify("extend", "forward", "character");
    19 document.execCommand("Delete");
    2029Markup.description(description.textContent);
    21 Markup.dump("test");
     30Markup.dump("test", "initial state");
     31runTestsOn("mac");
     32runTestsOn("win");
     33runTestsOn("unix");
    2234</script>
    2335</body>
  • trunk/LayoutTests/editing/deleting/whitespace-pre-1-expected.txt

    r89862 r93134  
    33EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    44EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    5 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 49 of #text > DIV > BODY > HTML > #document
     5EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 69 of #text > DIV > BODY > HTML > #document
    66EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     7EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     8EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     9EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     10EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     11EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 69 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 69 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     12EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     13EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     14EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     15EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     16EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 69 of #text > DIV > BODY > HTML > #document
     17EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     18EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     19EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     20EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     21EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 69 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 69 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     22EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     23EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     24EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     25EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     26EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 69 of #text > DIV > BODY > HTML > #document
     27EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     28EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     29EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     30EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     31EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 69 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 69 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    732EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    833EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     
    1035EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification
    1136This tests for a bug in endOfLine.
     37
     38initial state:
     39| "You should not see this paragraph unless the command has been undone.
     40There should be three paragraphs in this editable region.
     41The first one should be empty."
     42
     43on mac:
    1244| "<#selection-caret>
    1345There should be three paragraphs in this editable region.
    1446The first one should be empty."
     47
     48after undo on mac:
     49| "<#selection-anchor>You should not see this paragraph unless the command has been undone.<#selection-focus>
     50There should be three paragraphs in this editable region.
     51The first one should be empty."
     52
     53on win:
     54| "<#selection-caret>
     55There should be three paragraphs in this editable region.
     56The first one should be empty."
     57
     58after undo on win:
     59| "<#selection-anchor>You should not see this paragraph unless the command has been undone.<#selection-focus>
     60There should be three paragraphs in this editable region.
     61The first one should be empty."
     62
     63on unix:
     64| "<#selection-caret>
     65There should be three paragraphs in this editable region.
     66The first one should be empty."
     67
     68after undo on unix:
     69| "<#selection-anchor>You should not see this paragraph unless the command has been undone.<#selection-focus>
     70There should be three paragraphs in this editable region.
     71The first one should be empty."
  • trunk/LayoutTests/editing/deleting/whitespace-pre-1.html

    r89862 r93134  
    11<script src="../../resources/dump-as-markup.js"></script>
    2 <script>
    3 if (window.layoutTestController)
    4      layoutTestController.dumpEditingCallbacks();
    5 </script>
    62<p id="description">This tests for a bug in endOfLine.</p>
    73
    8 <div id="test" contenteditable="true" style="white-space:pre;">You should not see this paragraph after the test.
     4<div id="test" contenteditable="true" style="white-space:pre;">You should not see this paragraph unless the command has been undone.
    95There should be three paragraphs in this editable region.
    106The first one should be empty.</div>
    117
    128<script>
    13 var e = document.getElementById("test");
    14 var s = window.getSelection();
     9function runTestsOn(platform) {
     10    var e = document.getElementById("test");
     11    var s = window.getSelection();
    1512
    16 s.setPosition(e, 0);
    17 s.modify("extend", "forward", "lineBoundary");
    18 document.execCommand("Delete");
     13    if(window.layoutTestController)
     14        layoutTestController.setEditingBehavior(platform);
     15
     16    s.setPosition(e, 0);
     17    s.modify("extend", "forward", "lineBoundary");
     18    document.execCommand("Delete");
     19    Markup.dump("test", "on " + platform);
     20    document.execCommand("undo");
     21    Markup.dump("test", "after undo on " + platform);
     22}
     23
     24if (window.layoutTestController)
     25    layoutTestController.dumpEditingCallbacks();
    1926Markup.description(description.textContent);
    20 Markup.dump("test");
     27Markup.dump("test", "initial state");
     28runTestsOn("mac");
     29runTestsOn("win");
     30runTestsOn("unix");
    2131</script>
  • trunk/LayoutTests/editing/selection/after-line-break-expected.txt

    r90275 r93134  
    44EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    55EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    6 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 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
    76Test for rdar://problem/5973313 REGRESSION (r32508): Down arrow doesn't change caret with non-user entered newlines in textareas.
    87
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-all-text-in-text-field-assertion-expected.txt

    r92088 r93134  
    11EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    22EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > DIV > #shadow-root to 1 of #text > DIV > #shadow-root toDOMRange:range from 0 of #text > DIV > #shadow-root to 1 of #text > DIV > #shadow-root affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    43EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > #shadow-root to 1 of #text > DIV > #shadow-root
    54EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-and-undo-expected.txt

    r80121 r93134  
    1313EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document
    1414EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     15EDITING 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 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    1516EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1617EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    1718EDITING DELEGATE: shouldDeleteDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document
    1819EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     20EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    1921EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    2022EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    2123EDITING DELEGATE: shouldDeleteDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document
    2224EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     25EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    2326EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    2427EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    2528EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document
    2629EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     30EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    2731EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    2832EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    2933EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document
    3034EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     35EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    3136EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    3237EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt

    r80121 r93134  
    1111EDITING DELEGATE: shouldDeleteDOMRange:range from 2 of #text > P > DIV > DIV > BODY > HTML > #document to 4 of #text > P > DIV > DIV > BODY > HTML > #document
    1212EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     13EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > P > DIV > DIV > BODY > HTML > #document to 2 of #text > P > DIV > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > P > DIV > DIV > BODY > HTML > #document to 2 of #text > P > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    1314EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1415EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-br-002-expected.txt

    r90275 r93134  
    2525EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    2626EDITING DELEGATE: shouldDeleteDOMRange:range from 2 of SPAN > DIV > BODY > HTML > #document to 3 of SPAN > DIV > BODY > HTML > #document
    27 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of SPAN > DIV > BODY > HTML > #document to 2 of SPAN > DIV > BODY > HTML > #document toDOMRange:range from 2 of SPAN > DIV > BODY > HTML > #document to 2 of SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    2827EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    2928EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-br-004-expected.txt

    r90275 r93134  
    2626EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    2727EDITING DELEGATE: shouldDeleteDOMRange:range from 3 of SPAN > DIV > BODY > HTML > #document to 4 of SPAN > DIV > BODY > HTML > #document
    28 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of SPAN > DIV > BODY > HTML > #document to 3 of SPAN > DIV > BODY > HTML > #document toDOMRange:range from 3 of SPAN > DIV > BODY > HTML > #document to 3 of SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    2928EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    3029EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-br-005-expected.txt

    r90275 r93134  
    2626EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    2727EDITING DELEGATE: shouldDeleteDOMRange:range from 3 of SPAN > DIV > BODY > HTML > #document to 4 of SPAN > DIV > BODY > HTML > #document
    28 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of SPAN > DIV > BODY > HTML > #document to 3 of SPAN > DIV > BODY > HTML > #document toDOMRange:range from 3 of SPAN > DIV > BODY > HTML > #document to 3 of SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    2928EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    3029EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-br-006-expected.txt

    r90275 r93134  
    2626EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    2727EDITING DELEGATE: shouldDeleteDOMRange:range from 3 of SPAN > DIV > BODY > HTML > #document to 4 of SPAN > DIV > BODY > HTML > #document
    28 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of SPAN > DIV > BODY > HTML > #document to 3 of SPAN > DIV > BODY > HTML > #document toDOMRange:range from 3 of SPAN > DIV > BODY > HTML > #document to 3 of SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    2928EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    3029EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-br-009-expected.txt

    r90275 r93134  
    88EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    99EDITING DELEGATE: shouldDeleteDOMRange:range from 2 of BODY > HTML > #document to 0 of DIV > BODY > HTML > #document
    10 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    1110EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1211EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-br-010-expected.txt

    r90275 r93134  
    88EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    99EDITING DELEGATE: shouldDeleteDOMRange:range from 2 of BODY > HTML > #document to 0 of DIV > BODY > HTML > #document
    10 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    1110EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1211EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-br-011-expected.txt

    r90280 r93134  
    11EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 4 of BODY > HTML > #document
    22EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
    3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    73EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    84EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-ws-fixup-003-expected.txt

    r80121 r93134  
    1111EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 7 of #text > SPAN > DIV > BODY > HTML > #document
    1212EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     13EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    1314EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1415EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/deleting/delete-ws-fixup-004-expected.txt

    r80121 r93134  
    1111EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 7 of #text > SPAN > DIV > BODY > HTML > #document
    1212EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     13EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 4 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    1314EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1415EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/deleting/smart-delete-002-expected.txt

    r90275 r93134  
    44EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    55EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    6 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    76EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    87EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  • trunk/LayoutTests/platform/mac/editing/inserting/insert-3800346-fix-expected.txt

    r90275 r93134  
    1212EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1313EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    14 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of DIV > DIV > BODY > HTML > #document to 3 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 3 of DIV > DIV > BODY > HTML > #document to 3 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    1514EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1615EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/inserting/insert-at-end-01-expected.txt

    r90275 r93134  
    11EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 6 of DIV > BODY > HTML > #document
    22EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
    3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    53EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    64EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  • trunk/LayoutTests/platform/mac/editing/inserting/insert-at-end-02-expected.txt

    r90275 r93134  
    11EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 7 of DIV > BODY > HTML > #document
    22EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
    3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    53EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    64EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  • trunk/LayoutTests/platform/mac/editing/inserting/insert-div-010-expected.txt

    r90275 r93134  
    77EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    88EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    9 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    109EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1110EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/inserting/insert-div-013-expected.txt

    r90275 r93134  
    66EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    77EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    8 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > BODY > HTML > #document to 0 of #text > BODY > HTML > #document toDOMRange:range from 0 of #text > BODY > HTML > #document to 0 of #text > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    98EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    109EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/inserting/insert-div-015-expected.txt

    r90275 r93134  
    1010EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1111EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    12 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    1312EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1413EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/inserting/insert-div-019-expected.txt

    r90275 r93134  
    66EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    77EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    8 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of BODY > HTML > #document to 5 of BODY > HTML > #document toDOMRange:range from 5 of BODY > HTML > #document to 5 of BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    98EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    109EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/inserting/insert-paragraph-03-expected.txt

    r90275 r93134  
    44EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    55EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    6 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document toDOMRange:range from 3 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    76EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    87EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/pasteboard/3976872-expected.txt

    r90275 r93134  
    88EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    99EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    10 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    1110EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1211EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/pasteboard/4076267-2-expected.txt

    r80121 r93134  
    88EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 96 of #text > DIV > DIV > BODY > HTML > #document
    99EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     10EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    1011EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1112EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/pasteboard/4076267-expected.txt

    r80121 r93134  
    66EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 56 of #text > DIV > DIV > BODY > HTML > #document
    77EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     8EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    89EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    910EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/pasteboard/drag-selected-image-to-contenteditable-expected.txt

    r63291 r93134  
     1EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    12EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    23EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document givenAction:WebViewInsertActionDropped
  • trunk/LayoutTests/platform/mac/editing/pasteboard/emacs-ctrl-a-k-y-expected.txt

    r90275 r93134  
    55EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    66EDITING DELEGATE: shouldDeleteDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 23 of #text > DIV > DIV > BODY > HTML > #document
    7 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 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    87EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    98EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/pasteboard/emacs-ctrl-k-y-001-expected.txt

    r90275 r93134  
    55EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    66EDITING DELEGATE: shouldDeleteDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document
    7 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 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    87EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    98EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/pasteboard/paste-text-014-expected.txt

    r90275 r93134  
    1212EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1313EDITING DELEGATE: shouldInsertNode:#document-fragment replacingDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document givenAction:WebViewInsertActionPasted
    14 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    1514EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1615EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/pasteboard/paste-text-015-expected.txt

    r63291 r93134  
    1010EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1111EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of #text > P > DIV > DIV > BODY > HTML > #document to 3 of #text > P > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > P > DIV > DIV > BODY > HTML > #document to 3 of #text > P > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     12EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    1213EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > P > DIV > DIV > BODY > HTML > #document to 3 of #text > P > DIV > DIV > BODY > HTML > #document
    1314EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  • trunk/LayoutTests/platform/mac/editing/pasteboard/smart-paste-008-expected.txt

    r81095 r93134  
    11EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document
    22EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
     3EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     4EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    35EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    46EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
  • trunk/LayoutTests/platform/mac/editing/selection/4932260-1-expected.txt

    r90275 r93134  
    11EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
    22EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
    3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    43EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    54EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  • trunk/LayoutTests/platform/mac/editing/selection/anchor-focus2-expected.txt

    r90280 r93134  
    11EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    22EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    3 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    43EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    54EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  • trunk/LayoutTests/platform/mac/editing/selection/anchor-focus3-expected.txt

    r90280 r93134  
    11EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    22EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    3 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 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
    43EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 4 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    54EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  • trunk/LayoutTests/platform/mac/editing/selection/expanding-selections-expected.txt

    r90275 r93134  
    33EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    44EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    65layer at (0,0) size 800x600
    76  RenderView at (0,0) size 800x600
  • trunk/LayoutTests/platform/mac/editing/selection/expanding-selections2-expected.txt

    r90275 r93134  
    33EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    44EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > SPAN > DIV > BODY > HTML > #document to 1 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    65layer at (0,0) size 800x600
    76  RenderView at (0,0) size 800x600
  • trunk/LayoutTests/platform/mac/editing/selection/fake-drag-expected.txt

    r90275 r93134  
    55EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of 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
    66EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 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
    87EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 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 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    98EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  • trunk/LayoutTests/platform/mac/editing/selection/move-by-word-001-expected.txt

    r90275 r93134  
    11EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document
    22EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification
    3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    73EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    84EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  • trunk/LayoutTests/platform/mac/editing/selection/transformed-selection-rects-expected.txt

    r63291 r93134  
     1EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    12EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    23EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  • trunk/LayoutTests/platform/mac/editing/selection/triple-click-in-pre-expected.txt

    r90275 r93134  
    55EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 30 of #text > PRE > DIV > DIV > BODY > HTML > #document to 30 of #text > PRE > DIV > DIV > BODY > HTML > #document toDOMRange:range from 16 of #text > PRE > DIV > DIV > BODY > HTML > #document to 30 of #text > PRE > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    66EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 16 of #text > PRE > DIV > DIV > BODY > HTML > #document to 30 of #text > PRE > DIV > DIV > BODY > HTML > #document toDOMRange:range from 16 of #text > PRE > DIV > DIV > BODY > HTML > #document to 30 of #text > PRE > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    87layer at (0,0) size 800x600
    98  RenderView at (0,0) size 800x600
  • trunk/LayoutTests/platform/mac/editing/style/create-block-for-style-008-expected.txt

    r90275 r93134  
    33EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    44EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    5 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    65EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    76EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/undo/4063751-expected.txt

    r90275 r93134  
    8484EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    8585EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    86 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    8786EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    8887EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     
    107106EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    108107EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    109 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    110108EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    111109EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/undo/undo-forward-delete-boundary-expected.txt

    r90275 r93134  
    55EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    66EDITING DELEGATE: shouldDeleteDOMRange:range from 5 of #text > SPAN > DIV > BODY > HTML > #document to 6 of #text > SPAN > DIV > BODY > HTML > #document
    7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > SPAN > DIV > BODY > HTML > #document to 5 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > SPAN > DIV > BODY > HTML > #document to 5 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    87EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    98EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/LayoutTests/platform/mac/editing/undo/undo-forward-delete-expected.txt

    r90275 r93134  
    55EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    66EDITING DELEGATE: shouldDeleteDOMRange:range from 5 of #text > SPAN > DIV > BODY > HTML > #document to 6 of #text > SPAN > DIV > BODY > HTML > #document
    7 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > SPAN > DIV > BODY > HTML > #document to 5 of #text > SPAN > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > SPAN > DIV > BODY > HTML > #document to 5 of #text > SPAN > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    87EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    98EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
  • trunk/Source/WebCore/ChangeLog

    r93133 r93134  
     12011-08-12  Wyatt Carss  <wcarss@chromium.org>
     2
     3        Programmatically set selection should not have direction on Mac
     4        https://bugs.webkit.org/show_bug.cgi?id=60529
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Modified default value of VisibleSelection->m_isDirectional from 'true'
     9        to 'false' by adding a defaulted argument to several VisibleSelection
     10        constructors to make programmatic selection be directionless by default
     11        on Mac. Also modified several calls to VisibleSelection's constructors
     12        to correctly preserve directionality.
     13       
     14        Near the end of FrameSelection::modify (presently FrameSelection.cpp:869)
     15        a call to setExtent triggers an editing delegate that uses the
     16        FrameSelection. The direction here should have been preserved from before,
     17        but setIsDirectional was not called until after FrameSelection.cpp:869. It
     18        has been moved up to make things behave.
     19
     20        * WebCore.exp.in:
     21        * editing/ApplyBlockElementCommand.cpp:
     22        (WebCore::ApplyBlockElementCommand::doApply):
     23        (WebCore::ApplyBlockElementCommand::formatSelection):
     24        * editing/ApplyStyleCommand.cpp:
     25        (WebCore::ApplyStyleCommand::updateStartEnd):
     26        * editing/BreakBlockquoteCommand.cpp:
     27        (WebCore::BreakBlockquoteCommand::doApply):
     28        * editing/CompositeEditCommand.cpp:
     29        (WebCore::CompositeEditCommand::moveParagraphWithClones):
     30        (WebCore::CompositeEditCommand::moveParagraphs):
     31        (WebCore::CompositeEditCommand::breakOutOfEmptyListItem):
     32        (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph):
     33        * editing/CreateLinkCommand.cpp:
     34        (WebCore::CreateLinkCommand::doApply):
     35        * editing/DeleteSelectionCommand.cpp:
     36        (WebCore::DeleteSelectionCommand::setStartingSelectionOnSmartDelete):
     37        (WebCore::DeleteSelectionCommand::doApply):
     38        * editing/Editor.cpp:
     39        (WebCore::Editor::selectionForCommand):
     40        * editing/FrameSelection.cpp:
     41        (WebCore::shouldAlwaysUseDirectionalSelection):
     42        (WebCore::FrameSelection::FrameSelection):
     43        (WebCore::FrameSelection::moveTo):
     44        (WebCore::FrameSelection::setNonDirectionalSelectionIfNeeded):
     45        (WebCore::FrameSelection::modify):
     46        (WebCore::FrameSelection::setBase):
     47        (WebCore::FrameSelection::setExtent):
     48        * editing/FrameSelection.h:
     49        * editing/InsertLineBreakCommand.cpp:
     50        (WebCore::InsertLineBreakCommand::doApply):
     51        * editing/InsertListCommand.cpp:
     52        (WebCore::InsertListCommand::doApply):
     53        * editing/InsertParagraphSeparatorCommand.cpp:
     54        (WebCore::InsertParagraphSeparatorCommand::doApply):
     55        * editing/InsertTextCommand.cpp:
     56        (WebCore::InsertTextCommand::performTrivialReplace):
     57        (WebCore::InsertTextCommand::doApply):
     58        * editing/MoveSelectionCommand.cpp:
     59        (WebCore::MoveSelectionCommand::doApply):
     60        * editing/ReplaceSelectionCommand.cpp:
     61        (WebCore::ReplaceSelectionCommand::completeHTMLReplacement):
     62        * editing/TypingCommand.cpp:
     63        (WebCore::TypingCommand::makeEditableRootEmpty):
     64        (WebCore::TypingCommand::deleteKeyPressed):
     65        (WebCore::TypingCommand::forwardDeleteKeyPressed):
     66        * editing/VisibleSelection.cpp:
     67        (WebCore::VisibleSelection::VisibleSelection):
     68        * editing/VisibleSelection.h:
     69        * page/EventHandler.cpp:
     70        (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
     71        (WebCore::EventHandler::updateSelectionForMouseDrag):
     72
    1732011-08-16  Jeffrey Pfau  <jpfau@apple.com>
    274
  • trunk/Source/WebCore/WebCore.exp.in

    r93058 r93134  
    486486__ZN7WebCore16ThreadGlobalDataD1Ev
    487487__ZN7WebCore16VisibleSelection22expandUsingGranularityENS_15TextGranularityE
    488 __ZN7WebCore16VisibleSelectionC1EPKNS_5RangeENS_9EAffinityE
    489 __ZN7WebCore16VisibleSelectionC1ERKNS_15VisiblePositionES3_
     488__ZN7WebCore16VisibleSelectionC1EPKNS_5RangeENS_9EAffinityEb
     489__ZN7WebCore16VisibleSelectionC1ERKNS_15VisiblePositionEb
     490__ZN7WebCore16VisibleSelectionC1ERKNS_15VisiblePositionES3_b
    490491__ZN7WebCore16colorFromNSColorEP7NSColor
    491492__ZN7WebCore16createFullMarkupEPKNS_4NodeE
  • trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp

    r93051 r93134  
    7474    // then use a left margin/padding rule here.
    7575    if (visibleEnd != visibleStart && isStartOfParagraph(visibleEnd))
    76         setEndingSelection(VisibleSelection(visibleStart, visibleEnd.previous(CannotCrossEditingBoundary)));
     76        setEndingSelection(VisibleSelection(visibleStart, visibleEnd.previous(CannotCrossEditingBoundary), endingSelection().isDirectional()));
    7777
    7878    VisibleSelection selection = selectionForParagraphIteration(endingSelection());
     
    9797        VisiblePosition end(visiblePositionForIndex(endIndex, endScope));
    9898        if (start.isNotNull() && end.isNotNull())
    99             setEndingSelection(VisibleSelection(start, end));
     99            setEndingSelection(VisibleSelection(start, end, endingSelection().isDirectional()));
    100100    }
    101101}
     
    111111        RefPtr<Element> placeholder = createBreakElement(document());
    112112        appendNode(placeholder, blockquote);
    113         setEndingSelection(VisibleSelection(positionBeforeNode(placeholder.get()), DOWNSTREAM));
     113        setEndingSelection(VisibleSelection(positionBeforeNode(placeholder.get()), DOWNSTREAM, endingSelection().isDirectional()));
    114114        return;
    115115    }
  • trunk/Source/WebCore/editing/ApplyStyleCommand.cpp

    r93001 r93134  
    191191        m_useEndingSelection = true;
    192192
    193     setEndingSelection(VisibleSelection(newStart, newEnd, VP_DEFAULT_AFFINITY));
     193    setEndingSelection(VisibleSelection(newStart, newEnd, VP_DEFAULT_AFFINITY, endingSelection().isDirectional()));
    194194    m_start = newStart;
    195195    m_end = newEnd;
  • trunk/Source/WebCore/editing/BreakBlockquoteCommand.cpp

    r82421 r93134  
    7979    if (isFirstVisiblePositionInNode(visiblePos, topBlockquote) && !isLastVisPosInNode) {
    8080        insertNodeBefore(breakNode.get(), topBlockquote);
    81         setEndingSelection(VisibleSelection(positionBeforeNode(breakNode.get()), DOWNSTREAM));
     81        setEndingSelection(VisibleSelection(positionBeforeNode(breakNode.get()), DOWNSTREAM, endingSelection().isDirectional()));
    8282        rebalanceWhitespace();   
    8383        return;
     
    8989    // If we're inserting the break at the end of the quoted content, we don't need to break the quote.
    9090    if (isLastVisPosInNode) {
    91         setEndingSelection(VisibleSelection(positionBeforeNode(breakNode.get()), DOWNSTREAM));
     91        setEndingSelection(VisibleSelection(positionBeforeNode(breakNode.get()), DOWNSTREAM, endingSelection().isDirectional()));
    9292        rebalanceWhitespace();
    9393        return;
     
    122122    // If there's nothing inside topBlockquote to move, we're finished.
    123123    if (!startNode->isDescendantOf(topBlockquote)) {
    124         setEndingSelection(VisibleSelection(VisiblePosition(firstPositionInOrBeforeNode(startNode))));
     124        setEndingSelection(VisibleSelection(VisiblePosition(firstPositionInOrBeforeNode(startNode)), endingSelection().isDirectional()));
    125125        return;
    126126    }
     
    195195   
    196196    // Put the selection right before the break.
    197     setEndingSelection(VisibleSelection(positionBeforeNode(breakNode.get()), DOWNSTREAM));
     197    setEndingSelection(VisibleSelection(positionBeforeNode(breakNode.get()), DOWNSTREAM, endingSelection().isDirectional()));
    198198    rebalanceWhitespace();
    199199}
  • trunk/Source/WebCore/editing/CompositeEditCommand.cpp

    r92441 r93134  
    950950    int endIndex = -1;
    951951    int destinationIndex = -1;
     952    bool originalIsDirectional = endingSelection().isDirectional();
    952953    if (preserveSelection && !endingSelection().isNone()) {
    953954        VisiblePosition visibleStart = endingSelection().visibleStart();
     
    982983    Position start = startOfParagraphToMove.deepEquivalent().downstream();
    983984    Position end = endOfParagraphToMove.deepEquivalent().upstream();
    984    
     985     
    985986    // start and end can't be used directly to create a Range; they are "editing positions"
    986987    Position startRangeCompliant = start.parentAnchoredEquivalent();
     
    10351036    destinationIndex = TextIterator::rangeLength(startToDestinationRange.get(), true);
    10361037
    1037     setEndingSelection(destination);
     1038    setEndingSelection(VisibleSelection(destination, originalIsDirectional));
    10381039    ASSERT(endingSelection().isCaretOrRange());
    10391040    ReplaceSelectionCommand::CommandOptions options = ReplaceSelectionCommand::SelectReplacement | ReplaceSelectionCommand::MovingParagraph;
     
    10581059        RefPtr<Range> end = TextIterator::rangeFromLocationAndLength(document()->documentElement(), destinationIndex + endIndex, 0, true);
    10591060        if (start && end)
    1060             setEndingSelection(VisibleSelection(start->startPosition(), end->startPosition(), DOWNSTREAM));
     1061            setEndingSelection(VisibleSelection(start->startPosition(), end->startPosition(), DOWNSTREAM, originalIsDirectional));
    10611062    }
    10621063}
     
    11171118
    11181119    appendBlockPlaceholder(newBlock);
    1119     setEndingSelection(VisibleSelection(firstPositionInNode(newBlock.get()), DOWNSTREAM));
     1120    setEndingSelection(VisibleSelection(firstPositionInNode(newBlock.get()), DOWNSTREAM, endingSelection().isDirectional()));
    11201121
    11211122    style->prepareToApplyAt(endingSelection().start());
     
    11551156    if (!isStartOfParagraph(atBR))
    11561157        insertNodeBefore(createBreakElement(document()), br);
    1157     setEndingSelection(VisibleSelection(atBR));
     1158    setEndingSelection(VisibleSelection(atBR, endingSelection().isDirectional()));
    11581159   
    11591160    // If this is an empty paragraph there must be a line break here.
  • trunk/Source/WebCore/editing/CreateLinkCommand.cpp

    r66040 r93134  
    5353        RefPtr<Text> textNode = Text::create(document(), m_url);
    5454        appendNode(textNode.get(), anchorElement.get());
    55         setEndingSelection(VisibleSelection(positionInParentBeforeNode(anchorElement.get()), positionInParentAfterNode(anchorElement.get()), DOWNSTREAM));
     55        setEndingSelection(VisibleSelection(positionInParentBeforeNode(anchorElement.get()), positionInParentAfterNode(anchorElement.get()), DOWNSTREAM, endingSelection().isDirectional()));
    5656    }
    5757}
  • trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp

    r90098 r93134  
    170170        newExtent = start;       
    171171    }
    172     setStartingSelection(VisibleSelection(newBase, newExtent));           
     172    setStartingSelection(VisibleSelection(newBase, newExtent, startingSelection().isDirectional()));
    173173}
    174174   
     
    822822    if (handleSpecialCaseBRDelete()) {
    823823        calculateTypingStyleAfterDelete();
    824         setEndingSelection(VisibleSelection(m_endingPosition, affinity));
     824        setEndingSelection(VisibleSelection(m_endingPosition, affinity, endingSelection().isDirectional()));
    825825        clearTransientState();
    826826        rebalanceWhitespace();
     
    850850    }
    851851
    852     setEndingSelection(VisibleSelection(m_endingPosition, affinity));
     852    setEndingSelection(VisibleSelection(m_endingPosition, affinity, endingSelection().isDirectional()));
    853853    clearTransientState();
    854854}
  • trunk/Source/WebCore/editing/Editor.cpp

    r92451 r93134  
    111111    if (textFromControlOfTarget && (selection.start().isNull() || textFromControlOfTarget != textFormControlOfSelectionStart)) {
    112112        if (RefPtr<Range> range = textFromControlOfTarget->selection())
    113             return VisibleSelection(range.get());
     113            return VisibleSelection(range.get(), DOWNSTREAM, selection.isDirectional());
    114114    }
    115115    return selection;
  • trunk/Source/WebCore/editing/FrameSelection.cpp

    r92966 r93134  
    9595}
    9696
     97static inline bool shouldAlwaysUseDirectionalSelection(Frame* frame)
     98{
     99    return !frame || frame->editor()->behavior().shouldConsiderSelectionAsDirectional();
     100}
     101
    97102FrameSelection::FrameSelection(Frame* frame)
    98103    : m_frame(frame)
     
    105110    , m_focused(frame && frame->page() && frame->page()->focusController()->focusedFrame() == frame)
    106111{
     112    if (shouldAlwaysUseDirectionalSelection(m_frame))
     113        m_selection.setIsDirectional(true);
    107114}
    108115
     
    110117{
    111118    SetSelectionOptions options = CloseTyping | ClearTypingStyle | userTriggered;
    112     setSelection(VisibleSelection(pos.deepEquivalent(), pos.deepEquivalent(), pos.affinity()), options, align);
     119    setSelection(VisibleSelection(pos.deepEquivalent(), pos.deepEquivalent(), pos.affinity(), m_selection.isDirectional()), options, align);
    113120}
    114121
    115122void FrameSelection::moveTo(const VisiblePosition &base, const VisiblePosition &extent, EUserTriggered userTriggered)
    116123{
     124    const bool selectionHasDirection = true;
    117125    SetSelectionOptions options = CloseTyping | ClearTypingStyle | userTriggered;
    118     setSelection(VisibleSelection(base.deepEquivalent(), extent.deepEquivalent(), base.affinity()), options);
     126    setSelection(VisibleSelection(base.deepEquivalent(), extent.deepEquivalent(), base.affinity(), selectionHasDirection), options);
    119127}
    120128
     
    122130{
    123131    SetSelectionOptions options = CloseTyping | ClearTypingStyle | userTriggered;
    124     setSelection(VisibleSelection(pos, affinity), options);
     132    setSelection(VisibleSelection(pos, affinity, m_selection.isDirectional()), options);
    125133}
    126134
     
    134142void FrameSelection::moveTo(const Position &base, const Position &extent, EAffinity affinity, EUserTriggered userTriggered)
    135143{
     144    const bool selectionHasDirection = true;
    136145    SetSelectionOptions options = CloseTyping | ClearTypingStyle | userTriggered;
    137     setSelection(VisibleSelection(base, extent, affinity), options);
     146    setSelection(VisibleSelection(base, extent, affinity, selectionHasDirection), options);
    138147}
    139148
     
    155164}
    156165
    157 static inline bool shouldAlwaysUseDirectionalSelection(Frame* frame)
    158 {
    159     return !frame || frame->editor()->behavior().shouldConsiderSelectionAsDirectional();
     166void FrameSelection::setNonDirectionalSelectionIfNeeded(FrameSelection* selection, const VisibleSelection& passedNewSelection, TextGranularity granularity)
     167{
     168    ASSERT(selection);
     169    VisibleSelection newSelection = passedNewSelection;
     170
     171    if (shouldAlwaysUseDirectionalSelection(m_frame))
     172        newSelection.setIsDirectional(true);
     173
     174    if (selection->selection() == newSelection || !selection->shouldChangeSelection(newSelection))
     175        return;
     176
     177    setSelection(newSelection, granularity);
    160178}
    161179
     
    839857    // the requested position type if there were no xPosForVerticalArrowNavigation set.
    840858    LayoutUnit x = lineDirectionPointForBlockDirectionNavigation(START);
     859    m_selection.setIsDirectional(shouldAlwaysUseDirectionalSelection(m_frame) || alter == AlterationExtend);
    841860
    842861    switch (alter) {
     
    865884        m_granularity = CharacterGranularity;
    866885
    867 
    868886    setCaretRectNeedsUpdate();
    869 
    870     m_selection.setIsDirectional(shouldAlwaysUseDirectionalSelection(m_frame) || alter == AlterationExtend);
    871887
    872888    return true;
     
    10241040void FrameSelection::setBase(const VisiblePosition &pos, EUserTriggered userTriggered)
    10251041{
    1026     setSelection(VisibleSelection(pos.deepEquivalent(), m_selection.extent(), pos.affinity()), CloseTyping | ClearTypingStyle | userTriggered);
     1042    const bool selectionHasDirection = true;
     1043    setSelection(VisibleSelection(pos.deepEquivalent(), m_selection.extent(), pos.affinity(), selectionHasDirection), CloseTyping | ClearTypingStyle | userTriggered);
    10271044}
    10281045
    10291046void FrameSelection::setExtent(const VisiblePosition &pos, EUserTriggered userTriggered)
    10301047{
    1031     setSelection(VisibleSelection(m_selection.base(), pos.deepEquivalent(), pos.affinity()), CloseTyping | ClearTypingStyle | userTriggered);
     1048    const bool selectionHasDirection = true;
     1049    setSelection(VisibleSelection(m_selection.base(), pos.deepEquivalent(), pos.affinity(), selectionHasDirection), CloseTyping | ClearTypingStyle | userTriggered);
    10321050}
    10331051
    10341052void FrameSelection::setBase(const Position &pos, EAffinity affinity, EUserTriggered userTriggered)
    10351053{
    1036     setSelection(VisibleSelection(pos, m_selection.extent(), affinity), CloseTyping | ClearTypingStyle | userTriggered);
     1054    const bool selectionHasDirection = true;
     1055    setSelection(VisibleSelection(pos, m_selection.extent(), affinity, selectionHasDirection), CloseTyping | ClearTypingStyle | userTriggered);
    10371056}
    10381057
    10391058void FrameSelection::setExtent(const Position &pos, EAffinity affinity, EUserTriggered userTriggered)
    10401059{
    1041     setSelection(VisibleSelection(m_selection.base(), pos, affinity), CloseTyping | ClearTypingStyle | userTriggered);
     1060    const bool selectionHasDirection = true;
     1061    setSelection(VisibleSelection(m_selection.base(), pos, affinity, selectionHasDirection), CloseTyping | ClearTypingStyle | userTriggered);
    10421062}
    10431063
  • trunk/Source/WebCore/editing/FrameSelection.h

    r90522 r93134  
    224224    bool shouldChangeSelection(const VisibleSelection&) const;
    225225    bool shouldDeleteSelection(const VisibleSelection&) const;
     226    void setNonDirectionalSelectionIfNeeded(FrameSelection*, const VisibleSelection&, TextGranularity);
    226227    void setFocusedNodeIfNeeded();
    227228    void notifyRendererOfSelectionChange(EUserTriggered);
  • trunk/Source/WebCore/editing/InsertLineBreakCommand.cpp

    r81165 r93134  
    122122       
    123123        VisiblePosition endingPosition(positionBeforeNode(nodeToInsert.get()));
    124         setEndingSelection(VisibleSelection(endingPosition));
     124        setEndingSelection(VisibleSelection(endingPosition, endingSelection().isDirectional()));
    125125    } else if (pos.deprecatedEditingOffset() <= caretMinOffset(pos.deprecatedNode())) {
    126126        insertNodeAt(nodeToInsert.get(), pos);
     
    130130            insertNodeBefore(nodeToInsert->cloneNode(false).get(), nodeToInsert.get());
    131131       
    132         setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert.get()), DOWNSTREAM));
     132        setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert.get()), DOWNSTREAM, endingSelection().isDirectional()));
    133133    // If we're inserting after all of the rendered text in a text node, or into a non-text node,
    134134    // a simple insertion is sufficient.
    135135    } else if (pos.deprecatedEditingOffset() >= caretMaxOffset(pos.deprecatedNode()) || !pos.deprecatedNode()->isTextNode()) {
    136136        insertNodeAt(nodeToInsert.get(), pos);
    137         setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert.get()), DOWNSTREAM));
     137        setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert.get()), DOWNSTREAM, endingSelection().isDirectional()));
    138138    } else if (pos.deprecatedNode()->isTextNode()) {
    139139        // Split a text node
     
    160160        }
    161161       
    162         setEndingSelection(VisibleSelection(endingPosition, DOWNSTREAM));
     162        setEndingSelection(VisibleSelection(endingPosition, DOWNSTREAM, endingSelection().isDirectional()));
    163163    }
    164164
  • trunk/Source/WebCore/editing/InsertListCommand.cpp

    r90072 r93134  
    123123    // then use a left margin/padding rule here.
    124124    if (visibleEnd != visibleStart && isStartOfParagraph(visibleEnd, CanSkipOverEditingBoundary))
    125         setEndingSelection(VisibleSelection(visibleStart, visibleEnd.previous(CannotCrossEditingBoundary)));
     125        setEndingSelection(VisibleSelection(visibleStart, visibleEnd.previous(CannotCrossEditingBoundary), endingSelection().isDirectional()));
    126126
    127127    const QualifiedName& listTag = (m_type == OrderedList) ? olTag : ulTag;
     
    179179            // Fetch the end of the selection, for the reason mentioned above.
    180180            endOfSelection = endingSelection().visibleEnd();
    181             setEndingSelection(VisibleSelection(startOfSelection, endOfSelection));
     181            setEndingSelection(VisibleSelection(startOfSelection, endOfSelection, endingSelection().isDirectional()));
    182182            return;
    183183        }
  • trunk/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp

    r91158 r93134  
    249249        appendBlockPlaceholder(parent);
    250250
    251         setEndingSelection(VisibleSelection(firstPositionInNode(parent.get()), DOWNSTREAM));
     251        setEndingSelection(VisibleSelection(firstPositionInNode(parent.get()), DOWNSTREAM, endingSelection().isDirectional()));
    252252        return;
    253253    }
     
    288288       
    289289        // In this case, we need to set the new ending selection.
    290         setEndingSelection(VisibleSelection(insertionPosition, DOWNSTREAM));
     290        setEndingSelection(VisibleSelection(insertionPosition, DOWNSTREAM, endingSelection().isDirectional()));
    291291        return;
    292292    }
     
    306306        // we need to do.
    307307        if (visiblePos.deepEquivalent().anchorNode()->renderer()->isBR()) {
    308             setEndingSelection(VisibleSelection(insertionPosition, DOWNSTREAM));
     308            setEndingSelection(VisibleSelection(insertionPosition, DOWNSTREAM, endingSelection().isDirectional()));
    309309            return;
    310310        }
     
    397397    }
    398398
    399     setEndingSelection(VisibleSelection(firstPositionInNode(blockToInsert.get()), DOWNSTREAM));
     399    setEndingSelection(VisibleSelection(firstPositionInNode(blockToInsert.get()), DOWNSTREAM, endingSelection().isDirectional()));
    400400    applyStyleAfterInsertion(startBlock);
    401401}
  • trunk/Source/WebCore/editing/InsertTextCommand.cpp

    r90933 r93134  
    8787    VisibleSelection forcedEndingSelection;
    8888    forcedEndingSelection.setWithoutValidation(start, endPosition);
     89    forcedEndingSelection.setIsDirectional(endingSelection().isDirectional());
    8990    setEndingSelection(forcedEndingSelection);
    9091
    9192    if (!selectInsertedText)
    92         setEndingSelection(VisibleSelection(endingSelection().visibleEnd()));
     93        setEndingSelection(VisibleSelection(endingSelection().visibleEnd(), endingSelection().isDirectional()));
    9394   
    9495    return true;
     
    181182    VisibleSelection forcedEndingSelection;
    182183    forcedEndingSelection.setWithoutValidation(startPosition, endPosition);
     184    forcedEndingSelection.setIsDirectional(endingSelection().isDirectional());
    183185    setEndingSelection(forcedEndingSelection);
    184186
     
    191193
    192194    if (!m_selectInsertedText)
    193         setEndingSelection(VisibleSelection(endingSelection().end(), endingSelection().affinity()));
     195        setEndingSelection(VisibleSelection(endingSelection().end(), endingSelection().affinity(), endingSelection().isDirectional()));
    194196}
    195197
  • trunk/Source/WebCore/editing/MoveSelectionCommand.cpp

    r79196 r93134  
    6666        pos = endingSelection().start();
    6767
    68     setEndingSelection(VisibleSelection(pos, endingSelection().affinity()));
     68    setEndingSelection(VisibleSelection(pos, endingSelection().affinity(), endingSelection().isDirectional()));
    6969    if (!pos.anchorNode()->inDocument()) {
    7070        // Document was modified out from under us.
  • trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp

    r93001 r93134  
    12181218   
    12191219    if (m_selectReplacement)
    1220         setEndingSelection(VisibleSelection(start, end, SEL_DEFAULT_AFFINITY));
     1220        setEndingSelection(VisibleSelection(start, end, SEL_DEFAULT_AFFINITY, endingSelection().isDirectional()));
    12211221    else
    1222         setEndingSelection(VisibleSelection(end, SEL_DEFAULT_AFFINITY));
     1222        setEndingSelection(VisibleSelection(end, SEL_DEFAULT_AFFINITY, endingSelection().isDirectional()));
    12231223}
    12241224
  • trunk/Source/WebCore/editing/TypingCommand.cpp

    r90933 r93134  
    447447
    448448    addBlockPlaceholderIfNeeded(root);
    449     setEndingSelection(VisibleSelection(firstPositionInNode(root), DOWNSTREAM));
     449    setEndingSelection(VisibleSelection(firstPositionInNode(root), DOWNSTREAM, endingSelection().isDirectional()));
    450450
    451451    return true;
     
    505505        // If the caret is just after a table, select the table and don't delete anything.
    506506        } else if (Node* table = isFirstPositionAfterTable(visibleStart)) {
    507             setEndingSelection(VisibleSelection(positionBeforeNode(table), endingSelection().start(), DOWNSTREAM));
     507            setEndingSelection(VisibleSelection(positionBeforeNode(table), endingSelection().start(), DOWNSTREAM, endingSelection().isDirectional()));
    508508            typingAddedToOpenCommand(DeleteKey);
    509509            return;
     
    582582        if (downstreamEnd.containerNode() && downstreamEnd.containerNode()->renderer() && downstreamEnd.containerNode()->renderer()->isTable()
    583583            && downstreamEnd.computeOffsetInContainerNode() <= caretMinOffset(downstreamEnd.containerNode())) {
    584             setEndingSelection(VisibleSelection(endingSelection().end(), positionAfterNode(downstreamEnd.containerNode()), DOWNSTREAM));
     584            setEndingSelection(VisibleSelection(endingSelection().end(), positionAfterNode(downstreamEnd.containerNode()), DOWNSTREAM, endingSelection().isDirectional()));
    585585            typingAddedToOpenCommand(ForwardDeleteKey);
    586586            return;
  • trunk/Source/WebCore/editing/VisibleSelection.cpp

    r90275 r93134  
    4545    , m_selectionType(NoSelection)
    4646    , m_baseIsFirst(true)
    47     , m_isDirectional(true)
    48 {
    49 }
    50 
    51 VisibleSelection::VisibleSelection(const Position& pos, EAffinity affinity)
     47    , m_isDirectional(false)
     48{
     49}
     50
     51VisibleSelection::VisibleSelection(const Position& pos, EAffinity affinity, bool isDirectional)
    5252    : m_base(pos)
    5353    , m_extent(pos)
    5454    , m_affinity(affinity)
    55     , m_isDirectional(true)
    56 {
    57     validate();
    58 }
    59 
    60 VisibleSelection::VisibleSelection(const Position& base, const Position& extent, EAffinity affinity)
     55    , m_isDirectional(isDirectional)
     56{
     57    validate();
     58}
     59
     60VisibleSelection::VisibleSelection(const Position& base, const Position& extent, EAffinity affinity, bool isDirectional)
    6161    : m_base(base)
    6262    , m_extent(extent)
    6363    , m_affinity(affinity)
    64     , m_isDirectional(true)
    65 {
    66     validate();
    67 }
    68 
    69 VisibleSelection::VisibleSelection(const VisiblePosition& pos)
     64    , m_isDirectional(isDirectional)
     65{
     66    validate();
     67}
     68
     69VisibleSelection::VisibleSelection(const VisiblePosition& pos, bool isDirectional)
    7070    : m_base(pos.deepEquivalent())
    7171    , m_extent(pos.deepEquivalent())
    7272    , m_affinity(pos.affinity())
    73     , m_isDirectional(true)
    74 {
    75     validate();
    76 }
    77 
    78 VisibleSelection::VisibleSelection(const VisiblePosition& base, const VisiblePosition& extent)
     73    , m_isDirectional(isDirectional)
     74{
     75    validate();
     76}
     77
     78VisibleSelection::VisibleSelection(const VisiblePosition& base, const VisiblePosition& extent, bool isDirectional)
    7979    : m_base(base.deepEquivalent())
    8080    , m_extent(extent.deepEquivalent())
    8181    , m_affinity(base.affinity())
    82     , m_isDirectional(true)
    83 {
    84     validate();
    85 }
    86 
    87 VisibleSelection::VisibleSelection(const Range* range, EAffinity affinity)
     82    , m_isDirectional(isDirectional)
     83{
     84    validate();
     85}
     86
     87VisibleSelection::VisibleSelection(const Range* range, EAffinity affinity, bool isDirectional)
    8888    : m_base(range->startPosition())
    8989    , m_extent(range->endPosition())
    9090    , m_affinity(affinity)
    91     , m_isDirectional(true)
     91    , m_isDirectional(isDirectional)
    9292{
    9393    validate();
  • trunk/Source/WebCore/editing/VisibleSelection.h

    r90275 r93134  
    4343    VisibleSelection();
    4444
    45     VisibleSelection(const Position&, EAffinity);
    46     VisibleSelection(const Position&, const Position&, EAffinity = SEL_DEFAULT_AFFINITY);
     45    VisibleSelection(const Position&, EAffinity, bool isDirectional = false);
     46    VisibleSelection(const Position&, const Position&, EAffinity = SEL_DEFAULT_AFFINITY, bool isDirectional = false);
    4747
    48     VisibleSelection(const Range*, EAffinity = SEL_DEFAULT_AFFINITY);
     48    VisibleSelection(const Range*, EAffinity = SEL_DEFAULT_AFFINITY, bool isDirectional = false);
    4949   
    50     VisibleSelection(const VisiblePosition&);
    51     VisibleSelection(const VisiblePosition&, const VisiblePosition&);
     50    VisibleSelection(const VisiblePosition&, bool isDirectional = false);
     51    VisibleSelection(const VisiblePosition&, const VisiblePosition&, bool isDirectional = false);
    5252
    5353    static VisibleSelection selectionFromContentsOfNode(Node*);
  • trunk/Source/WebCore/page/EventHandler.cpp

    r93053 r93134  
    268268}
    269269
    270 static void setNonDirectionalSelectionIfNeeded(FrameSelection* selection, const VisibleSelection& newSelection, TextGranularity granularity)
    271 {
    272     ASSERT(selection);
    273     if (selection->selection() == newSelection || !selection->shouldChangeSelection(newSelection))
    274         return;
    275 
    276     VisibleSelection newNonDirectionalSelection = newSelection;
    277     newNonDirectionalSelection.setIsDirectional(false);
    278 
    279     selection->setSelection(newNonDirectionalSelection, granularity);
    280 }
    281 
    282270static inline bool dispatchSelectStart(Node* node)
    283271{
     
    300288    }
    301289
    302     setNonDirectionalSelectionIfNeeded(m_frame->selection(), newSelection, granularity);
     290    m_frame->selection()->setNonDirectionalSelectionIfNeeded(m_frame->selection(), newSelection, granularity);
    303291
    304292    return true;
     
    703691        newSelection.expandUsingGranularity(m_frame->selection()->granularity());
    704692
    705     setNonDirectionalSelectionIfNeeded(m_frame->selection(), newSelection, m_frame->selection()->granularity());
     693    m_frame->selection()->setNonDirectionalSelectionIfNeeded(m_frame->selection(), newSelection, m_frame->selection()->granularity());
    706694}
    707695#endif // ENABLE(DRAG_SUPPORT)
Note: See TracChangeset for help on using the changeset viewer.