Changeset 93134 in webkit
- Timestamp:
- Aug 16, 2011 11:39:52 AM (13 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 72 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r93132 r93134 1 2011-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 1 62 2011-08-16 Tony Chang <tony@chromium.org> 2 63 -
trunk/LayoutTests/editing/deleting/delete-ligature-003-expected.txt
r80121 r93134 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 9 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 10 EDITING 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 11 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 12 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 13 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 14 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document 15 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 16 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 17 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 18 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 19 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 20 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 4 21 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 22 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > BODY > HTML > #document to 2 of #text > DIV > BODY > HTML > #document … … 12 29 This test tests whether the undo command works when the BackSpace key deletes the last character of a ligature "วั". 13 30 14 If this test succeeds, you can see "วั" (U+0E27,U+0E31) and a string "succeeded" below.31 If this test succeeds, you can see "วั" (U+0E27,U+0E31) and a string "succeeded" for each platform below. 15 32 16 33 วั 17 Succeeded. 34 Succeeded for mac 35 Succeeded for win 36 Succeeded for unix -
trunk/LayoutTests/editing/deleting/delete-ligature-003.html
r46926 r93134 13 13 eventSender.keyDown(String.fromCharCode(0x0008), null); 14 14 } 15 function editingTest() { 16 if (window.layoutTestController) 17 layoutTestController.dumpAsText(); 15 function runTestOn(platform) { 18 16 var testarea = document.getElementById("test"); 17 if(window.layoutTestController) 18 layoutTestController.setEditingBehavior(platform); 19 19 20 testarea.focus(); 20 21 moveSelectionForwardByCharacterCommand(); … … 23 24 execUndoCommand(); 24 25 if (testarea.textContent == "\u0E27\u0E31") 25 log("Succeeded .");26 log("Succeeded for " + platform); 26 27 else 27 28 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"); 28 36 } 29 37 </script> … … 32 40 <body> 33 41 <p>This test tests whether the undo command works when the BackSpace key deletes the last character of a ligature "วั".</p> 34 <p>If this test succeeds, you can see "วั" (U+0E27,U+0E31) and a string "succeeded" below.</p>42 <p>If this test succeeds, you can see "วั" (U+0E27,U+0E31) and a string "succeeded" for each platform below.</p> 35 43 <div id="test" contenteditable>วั</div> 36 44 <ul id="console"></ul> -
trunk/LayoutTests/editing/deleting/paragraph-in-preserveNewline-expected.txt
r90031 r93134 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 1 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > PRE > DIV > BODY > HTML > #document to 3 of #text > PRE > DIV > BODY > HTML > #document 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 EDITING 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 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 12 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 13 EDITING 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 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 15 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 3 16 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 4 17 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification … … 10 23 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 11 24 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 25 EDITING 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 26 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 27 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 28 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 29 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 30 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 31 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 32 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > PRE > DIV > BODY > HTML > #document to 3 of #text > PRE > DIV > BODY > HTML > #document 33 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 34 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 35 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 36 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 37 EDITING 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 38 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 39 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 40 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 12 41 EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification 13 42 This tests for a bug where deleting a paragraph in preserveNewline text would introduce an extra line. You should see '\nbar' below. 43 44 initial state: 45 | <pre> 46 | "foo 47 bar" 48 49 on mac: 14 50 | <pre> 15 51 | "<#selection-caret> 16 52 bar" 53 54 after undo on mac: 55 | <pre> 56 | "<#selection-anchor>foo<#selection-focus> 57 bar" 58 59 on win: 60 | <pre> 61 | "<#selection-caret> 62 bar" 63 64 after undo on win: 65 | <pre> 66 | "<#selection-anchor>foo<#selection-focus> 67 bar" 68 69 on unix: 70 | <pre> 71 | "<#selection-caret> 72 bar" 73 74 after undo on unix: 75 | <pre> 76 | "<#selection-anchor>foo<#selection-focus> 77 bar" -
trunk/LayoutTests/editing/deleting/paragraph-in-preserveNewline.html
r90031 r93134 8 8 <script src="../../resources/dump-as-markup.js"></script> 9 9 <script> 10 var sel = window.getSelection(); 11 var e = document.getElementById("test"); 10 function 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 } 12 26 13 27 if (window.layoutTestController) 14 28 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");20 29 Markup.description(description.textContent); 21 Markup.dump("test"); 30 Markup.dump("test", "initial state"); 31 runTestsOn("mac"); 32 runTestsOn("win"); 33 runTestsOn("unix"); 22 34 </script> 23 35 </body> -
trunk/LayoutTests/editing/deleting/whitespace-pre-1-expected.txt
r89862 r93134 3 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 49 of #text > DIV > BODY > HTML > #document5 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 69 of #text > DIV > BODY > HTML > #document 6 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 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 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 EDITING 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 12 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 13 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 15 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 16 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 69 of #text > DIV > BODY > HTML > #document 17 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 18 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 19 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 20 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 21 EDITING 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 22 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 23 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 24 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 25 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 26 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > BODY > HTML > #document to 69 of #text > DIV > BODY > HTML > #document 27 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 28 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 29 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 30 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 31 EDITING 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 7 32 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 33 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 10 35 EDITING DELEGATE: webViewDidEndEditing:WebViewDidEndEditingNotification 11 36 This tests for a bug in endOfLine. 37 38 initial state: 39 | "You should not see this paragraph unless the command has been undone. 40 There should be three paragraphs in this editable region. 41 The first one should be empty." 42 43 on mac: 12 44 | "<#selection-caret> 13 45 There should be three paragraphs in this editable region. 14 46 The first one should be empty." 47 48 after undo on mac: 49 | "<#selection-anchor>You should not see this paragraph unless the command has been undone.<#selection-focus> 50 There should be three paragraphs in this editable region. 51 The first one should be empty." 52 53 on win: 54 | "<#selection-caret> 55 There should be three paragraphs in this editable region. 56 The first one should be empty." 57 58 after undo on win: 59 | "<#selection-anchor>You should not see this paragraph unless the command has been undone.<#selection-focus> 60 There should be three paragraphs in this editable region. 61 The first one should be empty." 62 63 on unix: 64 | "<#selection-caret> 65 There should be three paragraphs in this editable region. 66 The first one should be empty." 67 68 after undo on unix: 69 | "<#selection-anchor>You should not see this paragraph unless the command has been undone.<#selection-focus> 70 There should be three paragraphs in this editable region. 71 The first one should be empty." -
trunk/LayoutTests/editing/deleting/whitespace-pre-1.html
r89862 r93134 1 1 <script src="../../resources/dump-as-markup.js"></script> 2 <script>3 if (window.layoutTestController)4 layoutTestController.dumpEditingCallbacks();5 </script>6 2 <p id="description">This tests for a bug in endOfLine.</p> 7 3 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. 9 5 There should be three paragraphs in this editable region. 10 6 The first one should be empty.</div> 11 7 12 8 <script> 13 var e = document.getElementById("test"); 14 var s = window.getSelection(); 9 function runTestsOn(platform) { 10 var e = document.getElementById("test"); 11 var s = window.getSelection(); 15 12 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 24 if (window.layoutTestController) 25 layoutTestController.dumpEditingCallbacks(); 19 26 Markup.description(description.textContent); 20 Markup.dump("test"); 27 Markup.dump("test", "initial state"); 28 runTestsOn("mac"); 29 runTestsOn("win"); 30 runTestsOn("unix"); 21 31 </script> -
trunk/LayoutTests/editing/selection/after-line-break-expected.txt
r90275 r93134 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 5 EDITING 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:FALSE7 6 Test for rdar://problem/5973313 REGRESSION (r32508): Down arrow doesn't change caret with non-user entered newlines in textareas. 8 7 -
trunk/LayoutTests/platform/mac/editing/deleting/delete-all-text-in-text-field-assertion-expected.txt
r92088 r93134 1 1 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 2 2 EDITING 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:WebViewDidChangeSelectionNotification4 3 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > #shadow-root to 1 of #text > DIV > #shadow-root 5 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/deleting/delete-and-undo-expected.txt
r80121 r93134 13 13 EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document 14 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 15 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 15 16 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 16 17 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 17 18 EDITING DELEGATE: shouldDeleteDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document 18 19 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 20 EDITING 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 19 21 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 20 22 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 21 23 EDITING DELEGATE: shouldDeleteDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document 22 24 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 25 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 23 26 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 24 27 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 25 28 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document 26 29 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 30 EDITING 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 27 31 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 28 32 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 29 33 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document 30 34 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 35 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 31 36 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 32 37 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt
r80121 r93134 11 11 EDITING DELEGATE: shouldDeleteDOMRange:range from 2 of #text > P > DIV > DIV > BODY > HTML > #document to 4 of #text > P > DIV > DIV > BODY > HTML > #document 12 12 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 13 EDITING 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 13 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 14 15 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/deleting/delete-br-002-expected.txt
r90275 r93134 25 25 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 26 26 EDITING 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:FALSE28 27 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 29 28 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/deleting/delete-br-004-expected.txt
r90275 r93134 26 26 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 27 27 EDITING 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:FALSE29 28 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 30 29 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/deleting/delete-br-005-expected.txt
r90275 r93134 26 26 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 27 27 EDITING 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:FALSE29 28 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 30 29 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/deleting/delete-br-006-expected.txt
r90275 r93134 26 26 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 27 27 EDITING 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:FALSE29 28 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 30 29 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/deleting/delete-br-009-expected.txt
r90275 r93134 8 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 9 EDITING 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:FALSE11 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 12 11 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/deleting/delete-br-010-expected.txt
r90275 r93134 8 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 9 EDITING 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:FALSE11 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 12 11 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/deleting/delete-br-011-expected.txt
r90280 r93134 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of BODY > HTML > #document to 4 of BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification7 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/deleting/delete-ws-fixup-003-expected.txt
r80121 r93134 11 11 EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 7 of #text > SPAN > DIV > BODY > HTML > #document 12 12 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 13 EDITING 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 13 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 14 15 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/deleting/delete-ws-fixup-004-expected.txt
r80121 r93134 11 11 EDITING DELEGATE: shouldDeleteDOMRange:range from 4 of #text > SPAN > DIV > BODY > HTML > #document to 7 of #text > SPAN > DIV > BODY > HTML > #document 12 12 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 13 EDITING 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 13 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 14 15 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/deleting/smart-delete-002-expected.txt
r90275 r93134 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 5 EDITING 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:FALSE7 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 8 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 8 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/inserting/insert-3800346-fix-expected.txt
r90275 r93134 12 12 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 13 13 EDITING 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:FALSE15 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 16 15 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/inserting/insert-at-end-01-expected.txt
r90275 r93134 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 6 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification5 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/inserting/insert-at-end-02-expected.txt
r90275 r93134 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 7 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification5 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/inserting/insert-div-010-expected.txt
r90275 r93134 7 7 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 8 8 EDITING 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:FALSE10 9 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 10 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/inserting/insert-div-013-expected.txt
r90275 r93134 6 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 7 EDITING 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:FALSE9 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 10 9 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/inserting/insert-div-015-expected.txt
r90275 r93134 10 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 11 EDITING 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:FALSE13 12 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 14 13 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/inserting/insert-div-019-expected.txt
r90275 r93134 6 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 7 EDITING 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:FALSE9 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 10 9 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/inserting/insert-paragraph-03-expected.txt
r90275 r93134 4 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 5 EDITING 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:FALSE7 6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 7 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/pasteboard/3976872-expected.txt
r90275 r93134 8 8 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification 9 9 EDITING 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:FALSE11 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 12 11 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/pasteboard/4076267-2-expected.txt
r80121 r93134 8 8 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 96 of #text > DIV > DIV > BODY > HTML > #document 9 9 EDITING 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 10 11 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 12 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/pasteboard/4076267-expected.txt
r80121 r93134 6 6 EDITING DELEGATE: shouldDeleteDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 56 of #text > DIV > DIV > BODY > HTML > #document 7 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 EDITING 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 8 9 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 10 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/pasteboard/drag-selected-image-to-contenteditable-expected.txt
r63291 r93134 1 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 1 2 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 2 3 EDITING 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 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 6 EDITING 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:FALSE8 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 8 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/pasteboard/emacs-ctrl-k-y-001-expected.txt
r90275 r93134 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 6 EDITING 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:FALSE8 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 8 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/pasteboard/paste-text-014-expected.txt
r90275 r93134 12 12 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 13 13 EDITING 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:FALSE15 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 16 15 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/pasteboard/paste-text-015-expected.txt
r63291 r93134 10 10 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 11 11 EDITING 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 12 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 12 13 EDITING DELEGATE: shouldDeleteDOMRange:range from 0 of #text > P > DIV > DIV > BODY > HTML > #document to 3 of #text > P > DIV > DIV > BODY > HTML > #document 13 14 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/pasteboard/smart-paste-008-expected.txt
r81095 r93134 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 2 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 4 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 3 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 4 6 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 #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 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification4 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 5 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/selection/anchor-focus2-expected.txt
r90280 r93134 1 1 EDITING DELEGATE: shouldChangeSelectedDOMRange:(null) toDOMRange:range from 0 of DIV > BODY > HTML > #document to 0 of DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 2 2 EDITING 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:FALSE4 3 EDITING 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 5 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/selection/anchor-focus3-expected.txt
r90280 r93134 1 1 EDITING 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 2 2 EDITING 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:FALSE4 3 EDITING 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 5 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/selection/expanding-selections-expected.txt
r90275 r93134 3 3 EDITING 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 4 4 EDITING 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:FALSE6 5 layer at (0,0) size 800x600 7 6 RenderView at (0,0) size 800x600 -
trunk/LayoutTests/platform/mac/editing/selection/expanding-selections2-expected.txt
r90275 r93134 3 3 EDITING 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 4 4 EDITING 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:FALSE6 5 layer at (0,0) size 800x600 7 6 RenderView at (0,0) size 800x600 -
trunk/LayoutTests/platform/mac/editing/selection/fake-drag-expected.txt
r90275 r93134 5 5 EDITING 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 6 6 EDITING 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:FALSE8 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 5 of #text > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE 9 8 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/selection/move-by-word-001-expected.txt
r90275 r93134 1 1 EDITING DELEGATE: shouldBeginEditingInDOMRange:range from 0 of DIV > BODY > HTML > #document to 3 of DIV > BODY > HTML > #document 2 2 EDITING DELEGATE: webViewDidBeginEditing:WebViewDidBeginEditingNotification 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification6 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification7 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 8 4 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/selection/transformed-selection-rects-expected.txt
r63291 r93134 1 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 1 2 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 2 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification -
trunk/LayoutTests/platform/mac/editing/selection/triple-click-in-pre-expected.txt
r90275 r93134 5 5 EDITING 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 6 6 EDITING 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:FALSE8 7 layer at (0,0) size 800x600 9 8 RenderView at (0,0) size 800x600 -
trunk/LayoutTests/platform/mac/editing/style/create-block-for-style-008-expected.txt
r90275 r93134 3 3 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 4 4 EDITING 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:FALSE6 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 7 6 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/undo/4063751-expected.txt
r90275 r93134 84 84 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 85 85 EDITING 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:FALSE87 86 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 88 87 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification … … 107 106 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 108 107 EDITING 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:FALSE110 108 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 111 109 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/undo/undo-forward-delete-boundary-expected.txt
r90275 r93134 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 6 EDITING 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:FALSE8 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 8 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/LayoutTests/platform/mac/editing/undo/undo-forward-delete-expected.txt
r90275 r93134 5 5 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 6 6 EDITING 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:FALSE8 7 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification 9 8 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification -
trunk/Source/WebCore/ChangeLog
r93133 r93134 1 2011-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 1 73 2011-08-16 Jeffrey Pfau <jpfau@apple.com> 2 74 -
trunk/Source/WebCore/WebCore.exp.in
r93058 r93134 486 486 __ZN7WebCore16ThreadGlobalDataD1Ev 487 487 __ZN7WebCore16VisibleSelection22expandUsingGranularityENS_15TextGranularityE 488 __ZN7WebCore16VisibleSelectionC1EPKNS_5RangeENS_9EAffinityE 489 __ZN7WebCore16VisibleSelectionC1ERKNS_15VisiblePositionES3_ 488 __ZN7WebCore16VisibleSelectionC1EPKNS_5RangeENS_9EAffinityEb 489 __ZN7WebCore16VisibleSelectionC1ERKNS_15VisiblePositionEb 490 __ZN7WebCore16VisibleSelectionC1ERKNS_15VisiblePositionES3_b 490 491 __ZN7WebCore16colorFromNSColorEP7NSColor 491 492 __ZN7WebCore16createFullMarkupEPKNS_4NodeE -
trunk/Source/WebCore/editing/ApplyBlockElementCommand.cpp
r93051 r93134 74 74 // then use a left margin/padding rule here. 75 75 if (visibleEnd != visibleStart && isStartOfParagraph(visibleEnd)) 76 setEndingSelection(VisibleSelection(visibleStart, visibleEnd.previous(CannotCrossEditingBoundary) ));76 setEndingSelection(VisibleSelection(visibleStart, visibleEnd.previous(CannotCrossEditingBoundary), endingSelection().isDirectional())); 77 77 78 78 VisibleSelection selection = selectionForParagraphIteration(endingSelection()); … … 97 97 VisiblePosition end(visiblePositionForIndex(endIndex, endScope)); 98 98 if (start.isNotNull() && end.isNotNull()) 99 setEndingSelection(VisibleSelection(start, end ));99 setEndingSelection(VisibleSelection(start, end, endingSelection().isDirectional())); 100 100 } 101 101 } … … 111 111 RefPtr<Element> placeholder = createBreakElement(document()); 112 112 appendNode(placeholder, blockquote); 113 setEndingSelection(VisibleSelection(positionBeforeNode(placeholder.get()), DOWNSTREAM ));113 setEndingSelection(VisibleSelection(positionBeforeNode(placeholder.get()), DOWNSTREAM, endingSelection().isDirectional())); 114 114 return; 115 115 } -
trunk/Source/WebCore/editing/ApplyStyleCommand.cpp
r93001 r93134 191 191 m_useEndingSelection = true; 192 192 193 setEndingSelection(VisibleSelection(newStart, newEnd, VP_DEFAULT_AFFINITY ));193 setEndingSelection(VisibleSelection(newStart, newEnd, VP_DEFAULT_AFFINITY, endingSelection().isDirectional())); 194 194 m_start = newStart; 195 195 m_end = newEnd; -
trunk/Source/WebCore/editing/BreakBlockquoteCommand.cpp
r82421 r93134 79 79 if (isFirstVisiblePositionInNode(visiblePos, topBlockquote) && !isLastVisPosInNode) { 80 80 insertNodeBefore(breakNode.get(), topBlockquote); 81 setEndingSelection(VisibleSelection(positionBeforeNode(breakNode.get()), DOWNSTREAM ));81 setEndingSelection(VisibleSelection(positionBeforeNode(breakNode.get()), DOWNSTREAM, endingSelection().isDirectional())); 82 82 rebalanceWhitespace(); 83 83 return; … … 89 89 // If we're inserting the break at the end of the quoted content, we don't need to break the quote. 90 90 if (isLastVisPosInNode) { 91 setEndingSelection(VisibleSelection(positionBeforeNode(breakNode.get()), DOWNSTREAM ));91 setEndingSelection(VisibleSelection(positionBeforeNode(breakNode.get()), DOWNSTREAM, endingSelection().isDirectional())); 92 92 rebalanceWhitespace(); 93 93 return; … … 122 122 // If there's nothing inside topBlockquote to move, we're finished. 123 123 if (!startNode->isDescendantOf(topBlockquote)) { 124 setEndingSelection(VisibleSelection(VisiblePosition(firstPositionInOrBeforeNode(startNode)) ));124 setEndingSelection(VisibleSelection(VisiblePosition(firstPositionInOrBeforeNode(startNode)), endingSelection().isDirectional())); 125 125 return; 126 126 } … … 195 195 196 196 // Put the selection right before the break. 197 setEndingSelection(VisibleSelection(positionBeforeNode(breakNode.get()), DOWNSTREAM ));197 setEndingSelection(VisibleSelection(positionBeforeNode(breakNode.get()), DOWNSTREAM, endingSelection().isDirectional())); 198 198 rebalanceWhitespace(); 199 199 } -
trunk/Source/WebCore/editing/CompositeEditCommand.cpp
r92441 r93134 950 950 int endIndex = -1; 951 951 int destinationIndex = -1; 952 bool originalIsDirectional = endingSelection().isDirectional(); 952 953 if (preserveSelection && !endingSelection().isNone()) { 953 954 VisiblePosition visibleStart = endingSelection().visibleStart(); … … 982 983 Position start = startOfParagraphToMove.deepEquivalent().downstream(); 983 984 Position end = endOfParagraphToMove.deepEquivalent().upstream(); 984 985 985 986 // start and end can't be used directly to create a Range; they are "editing positions" 986 987 Position startRangeCompliant = start.parentAnchoredEquivalent(); … … 1035 1036 destinationIndex = TextIterator::rangeLength(startToDestinationRange.get(), true); 1036 1037 1037 setEndingSelection( destination);1038 setEndingSelection(VisibleSelection(destination, originalIsDirectional)); 1038 1039 ASSERT(endingSelection().isCaretOrRange()); 1039 1040 ReplaceSelectionCommand::CommandOptions options = ReplaceSelectionCommand::SelectReplacement | ReplaceSelectionCommand::MovingParagraph; … … 1058 1059 RefPtr<Range> end = TextIterator::rangeFromLocationAndLength(document()->documentElement(), destinationIndex + endIndex, 0, true); 1059 1060 if (start && end) 1060 setEndingSelection(VisibleSelection(start->startPosition(), end->startPosition(), DOWNSTREAM ));1061 setEndingSelection(VisibleSelection(start->startPosition(), end->startPosition(), DOWNSTREAM, originalIsDirectional)); 1061 1062 } 1062 1063 } … … 1117 1118 1118 1119 appendBlockPlaceholder(newBlock); 1119 setEndingSelection(VisibleSelection(firstPositionInNode(newBlock.get()), DOWNSTREAM ));1120 setEndingSelection(VisibleSelection(firstPositionInNode(newBlock.get()), DOWNSTREAM, endingSelection().isDirectional())); 1120 1121 1121 1122 style->prepareToApplyAt(endingSelection().start()); … … 1155 1156 if (!isStartOfParagraph(atBR)) 1156 1157 insertNodeBefore(createBreakElement(document()), br); 1157 setEndingSelection(VisibleSelection(atBR ));1158 setEndingSelection(VisibleSelection(atBR, endingSelection().isDirectional())); 1158 1159 1159 1160 // If this is an empty paragraph there must be a line break here. -
trunk/Source/WebCore/editing/CreateLinkCommand.cpp
r66040 r93134 53 53 RefPtr<Text> textNode = Text::create(document(), m_url); 54 54 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())); 56 56 } 57 57 } -
trunk/Source/WebCore/editing/DeleteSelectionCommand.cpp
r90098 r93134 170 170 newExtent = start; 171 171 } 172 setStartingSelection(VisibleSelection(newBase, newExtent ));172 setStartingSelection(VisibleSelection(newBase, newExtent, startingSelection().isDirectional())); 173 173 } 174 174 … … 822 822 if (handleSpecialCaseBRDelete()) { 823 823 calculateTypingStyleAfterDelete(); 824 setEndingSelection(VisibleSelection(m_endingPosition, affinity ));824 setEndingSelection(VisibleSelection(m_endingPosition, affinity, endingSelection().isDirectional())); 825 825 clearTransientState(); 826 826 rebalanceWhitespace(); … … 850 850 } 851 851 852 setEndingSelection(VisibleSelection(m_endingPosition, affinity ));852 setEndingSelection(VisibleSelection(m_endingPosition, affinity, endingSelection().isDirectional())); 853 853 clearTransientState(); 854 854 } -
trunk/Source/WebCore/editing/Editor.cpp
r92451 r93134 111 111 if (textFromControlOfTarget && (selection.start().isNull() || textFromControlOfTarget != textFormControlOfSelectionStart)) { 112 112 if (RefPtr<Range> range = textFromControlOfTarget->selection()) 113 return VisibleSelection(range.get() );113 return VisibleSelection(range.get(), DOWNSTREAM, selection.isDirectional()); 114 114 } 115 115 return selection; -
trunk/Source/WebCore/editing/FrameSelection.cpp
r92966 r93134 95 95 } 96 96 97 static inline bool shouldAlwaysUseDirectionalSelection(Frame* frame) 98 { 99 return !frame || frame->editor()->behavior().shouldConsiderSelectionAsDirectional(); 100 } 101 97 102 FrameSelection::FrameSelection(Frame* frame) 98 103 : m_frame(frame) … … 105 110 , m_focused(frame && frame->page() && frame->page()->focusController()->focusedFrame() == frame) 106 111 { 112 if (shouldAlwaysUseDirectionalSelection(m_frame)) 113 m_selection.setIsDirectional(true); 107 114 } 108 115 … … 110 117 { 111 118 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); 113 120 } 114 121 115 122 void FrameSelection::moveTo(const VisiblePosition &base, const VisiblePosition &extent, EUserTriggered userTriggered) 116 123 { 124 const bool selectionHasDirection = true; 117 125 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); 119 127 } 120 128 … … 122 130 { 123 131 SetSelectionOptions options = CloseTyping | ClearTypingStyle | userTriggered; 124 setSelection(VisibleSelection(pos, affinity ), options);132 setSelection(VisibleSelection(pos, affinity, m_selection.isDirectional()), options); 125 133 } 126 134 … … 134 142 void FrameSelection::moveTo(const Position &base, const Position &extent, EAffinity affinity, EUserTriggered userTriggered) 135 143 { 144 const bool selectionHasDirection = true; 136 145 SetSelectionOptions options = CloseTyping | ClearTypingStyle | userTriggered; 137 setSelection(VisibleSelection(base, extent, affinity ), options);146 setSelection(VisibleSelection(base, extent, affinity, selectionHasDirection), options); 138 147 } 139 148 … … 155 164 } 156 165 157 static inline bool shouldAlwaysUseDirectionalSelection(Frame* frame) 158 { 159 return !frame || frame->editor()->behavior().shouldConsiderSelectionAsDirectional(); 166 void 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); 160 178 } 161 179 … … 839 857 // the requested position type if there were no xPosForVerticalArrowNavigation set. 840 858 LayoutUnit x = lineDirectionPointForBlockDirectionNavigation(START); 859 m_selection.setIsDirectional(shouldAlwaysUseDirectionalSelection(m_frame) || alter == AlterationExtend); 841 860 842 861 switch (alter) { … … 865 884 m_granularity = CharacterGranularity; 866 885 867 868 886 setCaretRectNeedsUpdate(); 869 870 m_selection.setIsDirectional(shouldAlwaysUseDirectionalSelection(m_frame) || alter == AlterationExtend);871 887 872 888 return true; … … 1024 1040 void FrameSelection::setBase(const VisiblePosition &pos, EUserTriggered userTriggered) 1025 1041 { 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); 1027 1044 } 1028 1045 1029 1046 void FrameSelection::setExtent(const VisiblePosition &pos, EUserTriggered userTriggered) 1030 1047 { 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); 1032 1050 } 1033 1051 1034 1052 void FrameSelection::setBase(const Position &pos, EAffinity affinity, EUserTriggered userTriggered) 1035 1053 { 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); 1037 1056 } 1038 1057 1039 1058 void FrameSelection::setExtent(const Position &pos, EAffinity affinity, EUserTriggered userTriggered) 1040 1059 { 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); 1042 1062 } 1043 1063 -
trunk/Source/WebCore/editing/FrameSelection.h
r90522 r93134 224 224 bool shouldChangeSelection(const VisibleSelection&) const; 225 225 bool shouldDeleteSelection(const VisibleSelection&) const; 226 void setNonDirectionalSelectionIfNeeded(FrameSelection*, const VisibleSelection&, TextGranularity); 226 227 void setFocusedNodeIfNeeded(); 227 228 void notifyRendererOfSelectionChange(EUserTriggered); -
trunk/Source/WebCore/editing/InsertLineBreakCommand.cpp
r81165 r93134 122 122 123 123 VisiblePosition endingPosition(positionBeforeNode(nodeToInsert.get())); 124 setEndingSelection(VisibleSelection(endingPosition ));124 setEndingSelection(VisibleSelection(endingPosition, endingSelection().isDirectional())); 125 125 } else if (pos.deprecatedEditingOffset() <= caretMinOffset(pos.deprecatedNode())) { 126 126 insertNodeAt(nodeToInsert.get(), pos); … … 130 130 insertNodeBefore(nodeToInsert->cloneNode(false).get(), nodeToInsert.get()); 131 131 132 setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert.get()), DOWNSTREAM ));132 setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert.get()), DOWNSTREAM, endingSelection().isDirectional())); 133 133 // If we're inserting after all of the rendered text in a text node, or into a non-text node, 134 134 // a simple insertion is sufficient. 135 135 } else if (pos.deprecatedEditingOffset() >= caretMaxOffset(pos.deprecatedNode()) || !pos.deprecatedNode()->isTextNode()) { 136 136 insertNodeAt(nodeToInsert.get(), pos); 137 setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert.get()), DOWNSTREAM ));137 setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert.get()), DOWNSTREAM, endingSelection().isDirectional())); 138 138 } else if (pos.deprecatedNode()->isTextNode()) { 139 139 // Split a text node … … 160 160 } 161 161 162 setEndingSelection(VisibleSelection(endingPosition, DOWNSTREAM ));162 setEndingSelection(VisibleSelection(endingPosition, DOWNSTREAM, endingSelection().isDirectional())); 163 163 } 164 164 -
trunk/Source/WebCore/editing/InsertListCommand.cpp
r90072 r93134 123 123 // then use a left margin/padding rule here. 124 124 if (visibleEnd != visibleStart && isStartOfParagraph(visibleEnd, CanSkipOverEditingBoundary)) 125 setEndingSelection(VisibleSelection(visibleStart, visibleEnd.previous(CannotCrossEditingBoundary) ));125 setEndingSelection(VisibleSelection(visibleStart, visibleEnd.previous(CannotCrossEditingBoundary), endingSelection().isDirectional())); 126 126 127 127 const QualifiedName& listTag = (m_type == OrderedList) ? olTag : ulTag; … … 179 179 // Fetch the end of the selection, for the reason mentioned above. 180 180 endOfSelection = endingSelection().visibleEnd(); 181 setEndingSelection(VisibleSelection(startOfSelection, endOfSelection ));181 setEndingSelection(VisibleSelection(startOfSelection, endOfSelection, endingSelection().isDirectional())); 182 182 return; 183 183 } -
trunk/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp
r91158 r93134 249 249 appendBlockPlaceholder(parent); 250 250 251 setEndingSelection(VisibleSelection(firstPositionInNode(parent.get()), DOWNSTREAM ));251 setEndingSelection(VisibleSelection(firstPositionInNode(parent.get()), DOWNSTREAM, endingSelection().isDirectional())); 252 252 return; 253 253 } … … 288 288 289 289 // In this case, we need to set the new ending selection. 290 setEndingSelection(VisibleSelection(insertionPosition, DOWNSTREAM ));290 setEndingSelection(VisibleSelection(insertionPosition, DOWNSTREAM, endingSelection().isDirectional())); 291 291 return; 292 292 } … … 306 306 // we need to do. 307 307 if (visiblePos.deepEquivalent().anchorNode()->renderer()->isBR()) { 308 setEndingSelection(VisibleSelection(insertionPosition, DOWNSTREAM ));308 setEndingSelection(VisibleSelection(insertionPosition, DOWNSTREAM, endingSelection().isDirectional())); 309 309 return; 310 310 } … … 397 397 } 398 398 399 setEndingSelection(VisibleSelection(firstPositionInNode(blockToInsert.get()), DOWNSTREAM ));399 setEndingSelection(VisibleSelection(firstPositionInNode(blockToInsert.get()), DOWNSTREAM, endingSelection().isDirectional())); 400 400 applyStyleAfterInsertion(startBlock); 401 401 } -
trunk/Source/WebCore/editing/InsertTextCommand.cpp
r90933 r93134 87 87 VisibleSelection forcedEndingSelection; 88 88 forcedEndingSelection.setWithoutValidation(start, endPosition); 89 forcedEndingSelection.setIsDirectional(endingSelection().isDirectional()); 89 90 setEndingSelection(forcedEndingSelection); 90 91 91 92 if (!selectInsertedText) 92 setEndingSelection(VisibleSelection(endingSelection().visibleEnd() ));93 setEndingSelection(VisibleSelection(endingSelection().visibleEnd(), endingSelection().isDirectional())); 93 94 94 95 return true; … … 181 182 VisibleSelection forcedEndingSelection; 182 183 forcedEndingSelection.setWithoutValidation(startPosition, endPosition); 184 forcedEndingSelection.setIsDirectional(endingSelection().isDirectional()); 183 185 setEndingSelection(forcedEndingSelection); 184 186 … … 191 193 192 194 if (!m_selectInsertedText) 193 setEndingSelection(VisibleSelection(endingSelection().end(), endingSelection().affinity() ));195 setEndingSelection(VisibleSelection(endingSelection().end(), endingSelection().affinity(), endingSelection().isDirectional())); 194 196 } 195 197 -
trunk/Source/WebCore/editing/MoveSelectionCommand.cpp
r79196 r93134 66 66 pos = endingSelection().start(); 67 67 68 setEndingSelection(VisibleSelection(pos, endingSelection().affinity() ));68 setEndingSelection(VisibleSelection(pos, endingSelection().affinity(), endingSelection().isDirectional())); 69 69 if (!pos.anchorNode()->inDocument()) { 70 70 // Document was modified out from under us. -
trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp
r93001 r93134 1218 1218 1219 1219 if (m_selectReplacement) 1220 setEndingSelection(VisibleSelection(start, end, SEL_DEFAULT_AFFINITY ));1220 setEndingSelection(VisibleSelection(start, end, SEL_DEFAULT_AFFINITY, endingSelection().isDirectional())); 1221 1221 else 1222 setEndingSelection(VisibleSelection(end, SEL_DEFAULT_AFFINITY ));1222 setEndingSelection(VisibleSelection(end, SEL_DEFAULT_AFFINITY, endingSelection().isDirectional())); 1223 1223 } 1224 1224 -
trunk/Source/WebCore/editing/TypingCommand.cpp
r90933 r93134 447 447 448 448 addBlockPlaceholderIfNeeded(root); 449 setEndingSelection(VisibleSelection(firstPositionInNode(root), DOWNSTREAM ));449 setEndingSelection(VisibleSelection(firstPositionInNode(root), DOWNSTREAM, endingSelection().isDirectional())); 450 450 451 451 return true; … … 505 505 // If the caret is just after a table, select the table and don't delete anything. 506 506 } else if (Node* table = isFirstPositionAfterTable(visibleStart)) { 507 setEndingSelection(VisibleSelection(positionBeforeNode(table), endingSelection().start(), DOWNSTREAM ));507 setEndingSelection(VisibleSelection(positionBeforeNode(table), endingSelection().start(), DOWNSTREAM, endingSelection().isDirectional())); 508 508 typingAddedToOpenCommand(DeleteKey); 509 509 return; … … 582 582 if (downstreamEnd.containerNode() && downstreamEnd.containerNode()->renderer() && downstreamEnd.containerNode()->renderer()->isTable() 583 583 && 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())); 585 585 typingAddedToOpenCommand(ForwardDeleteKey); 586 586 return; -
trunk/Source/WebCore/editing/VisibleSelection.cpp
r90275 r93134 45 45 , m_selectionType(NoSelection) 46 46 , 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 51 VisibleSelection::VisibleSelection(const Position& pos, EAffinity affinity, bool isDirectional) 52 52 : m_base(pos) 53 53 , m_extent(pos) 54 54 , 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 60 VisibleSelection::VisibleSelection(const Position& base, const Position& extent, EAffinity affinity, bool isDirectional) 61 61 : m_base(base) 62 62 , m_extent(extent) 63 63 , 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 69 VisibleSelection::VisibleSelection(const VisiblePosition& pos, bool isDirectional) 70 70 : m_base(pos.deepEquivalent()) 71 71 , m_extent(pos.deepEquivalent()) 72 72 , 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 78 VisibleSelection::VisibleSelection(const VisiblePosition& base, const VisiblePosition& extent, bool isDirectional) 79 79 : m_base(base.deepEquivalent()) 80 80 , m_extent(extent.deepEquivalent()) 81 81 , 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 87 VisibleSelection::VisibleSelection(const Range* range, EAffinity affinity, bool isDirectional) 88 88 : m_base(range->startPosition()) 89 89 , m_extent(range->endPosition()) 90 90 , m_affinity(affinity) 91 , m_isDirectional( true)91 , m_isDirectional(isDirectional) 92 92 { 93 93 validate(); -
trunk/Source/WebCore/editing/VisibleSelection.h
r90275 r93134 43 43 VisibleSelection(); 44 44 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); 47 47 48 VisibleSelection(const Range*, EAffinity = SEL_DEFAULT_AFFINITY );48 VisibleSelection(const Range*, EAffinity = SEL_DEFAULT_AFFINITY, bool isDirectional = false); 49 49 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); 52 52 53 53 static VisibleSelection selectionFromContentsOfNode(Node*); -
trunk/Source/WebCore/page/EventHandler.cpp
r93053 r93134 268 268 } 269 269 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 282 270 static inline bool dispatchSelectStart(Node* node) 283 271 { … … 300 288 } 301 289 302 setNonDirectionalSelectionIfNeeded(m_frame->selection(), newSelection, granularity);290 m_frame->selection()->setNonDirectionalSelectionIfNeeded(m_frame->selection(), newSelection, granularity); 303 291 304 292 return true; … … 703 691 newSelection.expandUsingGranularity(m_frame->selection()->granularity()); 704 692 705 setNonDirectionalSelectionIfNeeded(m_frame->selection(), newSelection, m_frame->selection()->granularity());693 m_frame->selection()->setNonDirectionalSelectionIfNeeded(m_frame->selection(), newSelection, m_frame->selection()->granularity()); 706 694 } 707 695 #endif // ENABLE(DRAG_SUPPORT)
Note: See TracChangeset
for help on using the changeset viewer.