Changeset 145798 in webkit
- Timestamp:
- Mar 14, 2013 2:43:34 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 1 deleted
- 15 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r145797 r145798 1 2013-03-14 Sergio Villar Senin <svillar@igalia.com> 2 3 Empty list items after drag&drop in contentEditable divs 4 https://bugs.webkit.org/show_bug.cgi?id=110610 5 6 Reviewed by Ryosuke Niwa. 7 8 Some placeholders should not be left after performing a cleanup in 9 move operations, this includes the empty list items generated when 10 moving around list items inside a list. 11 12 I'm also moving drag-list-item.html to editing/pasteboard because 13 it fits much better there than under editing/selection. 14 15 * editing/pasteboard/cleanup-on-move-expected.txt: Added. 16 * editing/pasteboard/cleanup-on-move.html: Added. 17 * editing/pasteboard/drag-list-item-expected.txt: Renamed from LayoutTests/editing/selection/drag-list-item-expected.txt. 18 * editing/pasteboard/drag-list-item.html: Renamed from LayoutTests/editing/selection/drag-list-item.html. 19 * editing/pasteboard/resources/select-and-drag.js: Added. 20 (selectAndDragToTarget): Selects nodes and drops them after a target node. 21 * editing/pasteboard/drag-drop-list-expected.txt: Removed an empty <li>. 22 * editing/pasteboard/paste-list-004-expected.txt: Removed 2 empty <li>. 23 * editing/pasteboard/paste-list-004.html: Ditto. 24 * editing/selection/4895428-1-expected.txt: Removed a <br>. 25 * editing/selection/4895428-4-expected.txt: Ditto. 26 * fast/events/ondragenter-expected.txt: Removed a blank line. 27 * platform/chromium/fast/events/ondragenter-expected.txt: Ditto. 28 * platform/efl/TestExpectations: Added cleanup-on-move.html to the skipped list. 29 * platform/mac-wk2/TestExpectations: Ditto. 30 * platform/qt/TestExpectations: Ditto. 31 * platform/win/fast/events/ondragenter-expected.txt: Removed a blank line. 32 1 33 2013-03-14 Eric Seidel <eric@webkit.org> 2 34 -
trunk/LayoutTests/editing/pasteboard/drag-drop-list-expected.txt
r130411 r145798 12 12 | " 13 13 " 14 | <div>15 | <br>16 14 | " 17 15 " -
trunk/LayoutTests/editing/pasteboard/drag-list-item-expected.txt
r145797 r145798 1 1 This test drags a selection of one <li> and drops them after another <li> in the first list. The same test is repeated in the second list but this time with two selected items instead of one. It verifies that the behavior is independent of how many fully selected items we move, i.e. fully selected <li> are moved as <li> and not just as plain text 2 2 3 The original list looks like this. 'two' is going to be selected and pasted after 'four':3 The original list looks like this. 'two' is selected and is going to be dropped after 'four': 4 4 | " 5 5 " … … 9 9 | <li> 10 10 | id="two" 11 | " two"11 | "<#selection-anchor>two<#selection-focus>" 12 12 | <li> 13 13 | id="three" … … 26 26 | "one" 27 27 | <li> 28 | id="two"29 | <br>30 | <li>31 28 | id="three" 32 29 | "three" … … 40 37 " 41 38 42 The original list looks like this. 'two' and 'three' are going to be selected and pasted after 'four':39 The original list looks like this. 'two' and 'three' are selected and are going to be dropped after 'four': 43 40 | <li> 44 41 | id="one" … … 46 43 | <li> 47 44 | id="two" 48 | " two"45 | "<#selection-anchor>two" 49 46 | <li> 50 47 | id="three" 51 | "three "48 | "three<#selection-focus>" 52 49 | <li> 53 50 | id="four" … … 59 56 | "one" 60 57 | <li> 61 | id="two"62 | <br>63 | <li>64 58 | id="four" 65 59 | "four" -
trunk/LayoutTests/editing/pasteboard/paste-list-004-expected.txt
r55178 r145798 4 4 three: three 5 5 one two: one two 6 :7 6 four: four 8 7 monsters walking: <span style="background-color:green"><b>monsters walking</b></span> 9 8 one two: one two 10 :11 9 cross the floor: <span style="background-color:green"><b>cross the floor</b></span> 12 10 PASS -
trunk/LayoutTests/editing/pasteboard/paste-list-004.html
r55178 r145798 30 30 31 31 // Place the cursor between "walking" and "cross" 32 for (var i = 0; i < 2; ++i) 33 moveSelectionForwardByLineCommand(); 32 moveSelectionForwardByLineCommand(); 34 33 for (var i = 0; i < 2; ++i) 35 34 moveSelectionForwardByWordCommand(); … … 43 42 "three", 44 43 "one two", 45 "",46 44 "four", 47 45 "monsters walking", 48 46 "one two", 49 "",50 47 "cross the floor" 51 48 ]; 52 if (listItems.length != 9)53 throw "Expected 8list items, found " + listItems.length;49 if (listItems.length != 7) 50 throw "Expected 7 list items, found " + listItems.length; 54 51 for (var i = 0; i < results.length; ++i) { 55 52 var actual = listItems[i].innerText.replace(/^\s+/g, ""); … … 58 55 } 59 56 60 // Verify that the cursor is in the right place ( on the blank line).57 // Verify that the cursor is in the right place (at the beginning of 'cross the floor'). 61 58 var selection = window.getSelection(); 62 if (selection.baseNode != listItems[ 7]|| selection.baseOffset != 0 || !selection.isCollapsed)59 if (selection.baseNode != listItems[6].firstChild.firstChild.firstChild || selection.baseOffset != 0 || !selection.isCollapsed) 63 60 throw "Wrong selection position"; 64 61 -
trunk/LayoutTests/editing/selection/4895428-1-expected.txt
r87466 r145798 6 6 | id="source" 7 7 | style="border: 1px solid blue;" 8 | <br>9 8 | " 10 9 " -
trunk/LayoutTests/editing/selection/4895428-4-expected.txt
r98899 r145798 8 8 | " 9 9 " 10 | <br>11 10 | " 12 11 " -
trunk/LayoutTests/fast/events/ondragenter-expected.txt
r130411 r145798 1 2 1 Success: Text 3 2 This automated layout test checks to see that ondragenter events are being sent. -
trunk/LayoutTests/platform/chromium/fast/events/ondragenter-expected.txt
r97115 r145798 1 2 1 Success: Text 3 2 This automated layout test checks to see that ondragenter events are being sent. -
trunk/LayoutTests/platform/efl/TestExpectations
r145782 r145798 455 455 webkit.org/b/86623 http/tests/security/drag-drop-different-origin.html 456 456 webkit.org/b/86623 http/tests/security/drag-over-remote-content-iframe.html 457 webkit.org/b/86623 editing/selection/drag-list-item.html [ Failure ] 457 webkit.org/b/86623 editing/pasteboard/cleanup-on-move.html [ Failure ] 458 webkit.org/b/86623 editing/pasteboard/drag-list-item.html [ Failure ] 458 459 459 460 # Missing drag'n'drop, needs baselines -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r145593 r145798 17 17 # <https://bugs.webkit.org/show_bug.cgi?id=42194> 18 18 editing/pasteboard/4947130.html 19 editing/pasteboard/cleanup-on-move.html 19 20 editing/pasteboard/copy-standalone-image-crash.html 20 21 editing/pasteboard/drag-and-drop-image-contenteditable.html … … 28 29 editing/pasteboard/drag-image-in-about-blank-frame.html 29 30 editing/pasteboard/drag-image-to-contenteditable-in-iframe.html 31 editing/pasteboard/drag-list-item.html 30 32 editing/pasteboard/drag-selected-image-to-contenteditable.html 31 33 editing/pasteboard/drop-file-svg.html … … 60 62 editing/selection/doubleclick-whitespace-img-crash.html 61 63 editing/selection/doubleclick-whitespace.html 62 editing/selection/drag-list-item.html63 64 editing/selection/drag-select-1.html 64 65 editing/selection/drag-select-rapidly.html -
trunk/LayoutTests/platform/qt/TestExpectations
r145797 r145798 573 573 fast/events/input-element-display-none-in-dragleave-crash.html 574 574 fast/events/only-valid-drop-targets-receive-file-drop.html 575 576 # New test added in r145195 is failing 577 webkit.org/b/111853 editing/pasteboard/cleanup-on-move.html [ Skip ] 578 webkit.org/b/111853 editing/pasteboard/drag-list-item.html [ Skip ] 575 579 576 580 # =========================================================================== # … … 2680 2684 webkit.org/b/111606 fast/repaint/border-fit-lines.html [ Skip ] 2681 2685 2682 # New test added in r145195 is failing2683 webkit.org/b/111853 editing/selection/drag-list-item.html [ Skip ]2684 2685 2686 # jack server is not running or cannot be started 2686 2687 fast/dom/beforeload/remove-video-poster-in-beforeload-listener.html -
trunk/LayoutTests/platform/win/fast/events/ondragenter-expected.txt
r97102 r145798 1 2 1 Success: Text 3 2 This automated layout test checks to see that ondragenter events are being sent. -
trunk/Source/WebCore/ChangeLog
r145797 r145798 1 2013-03-14 Sergio Villar Senin <svillar@igalia.com> 2 3 Empty list items after drag&drop in contentEditable divs 4 https://bugs.webkit.org/show_bug.cgi?id=110610 5 6 Reviewed by Ryosuke Niwa. 7 8 Perform a cleanup after moving operations. This will mainly prune 9 extra placeholders left by the editing algorithms. Also do not 10 leave empty <li> when moving them around inside a list element. 11 12 Tests: editing/pasteboard/cleanup-on-move.html 13 editing/pasteboard/drag-list-item.html 14 15 * editing/MoveSelectionCommand.cpp: 16 (WebCore::MoveSelectionCommand::doApply): perform 17 cleanupAfterDeletion(). 18 * editing/ReplaceSelectionCommand.cpp: 19 (WebCore::ReplaceSelectionCommand::insertAsListItems): do not 20 insert an empty list item. 21 * editing/MoveSelectionCommand.cpp: 22 (WebCore::MoveSelectionCommand::doApply): 23 * editing/ReplaceSelectionCommand.cpp: 24 (WebCore::ReplaceSelectionCommand::insertAsListItems): 25 1 26 2013-03-14 Eric Seidel <eric@webkit.org> 2 27 -
trunk/Source/WebCore/editing/MoveSelectionCommand.cpp
r123412 r145798 66 66 pos = endingSelection().start(); 67 67 68 cleanupAfterDeletion(pos); 69 68 70 setEndingSelection(VisibleSelection(pos, endingSelection().affinity(), endingSelection().isDirectional())); 69 71 if (!pos.anchorNode()->inDocument()) { -
trunk/Source/WebCore/editing/ReplaceSelectionCommand.cpp
r145562 r145798 1445 1445 if (isStart || isMiddle) 1446 1446 lastNode = lastNode->previousSibling(); 1447 if (isMiddle)1448 insertNodeAfter(createListItemElement(document()), lastNode);1449 1447 return lastNode; 1450 1448 }
Note: See TracChangeset
for help on using the changeset viewer.