Changeset 145195 in webkit
- Timestamp:
- Mar 8, 2013 1:58:28 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r145192 r145195 1 2013-03-08 Sergio Villar Senin <svillar@igalia.com> 2 3 Improve drag&drop of list items in contentEditable divs 4 https://bugs.webkit.org/show_bug.cgi?id=111556 5 6 Reviewed by Ryosuke Niwa. 7 8 Added a new test case. The test performs 2 drag&drops, first of 9 all a selection of a single list item, and secondly a selection of 10 two list items. It checks that both behave the same way, i.e, the 11 whole <li> is moved and not only the text. 12 13 * editing/selection/drag-list-item-expected.txt: Added. 14 * editing/selection/drag-list-item.html: Added. 15 1 16 2013-03-08 Zoltan Arvai <zarvai@inf.u-szeged.hu> 2 17 -
trunk/Source/WebCore/ChangeLog
r145193 r145195 1 2013-03-08 Sergio Villar Senin <svillar@igalia.com> 2 3 Improve drag&drop of list items in contentEditable divs 4 https://bugs.webkit.org/show_bug.cgi?id=111556 5 6 Reviewed by Ryosuke Niwa. 7 8 A single fully selected <li> should generate the same markup as if 9 we were selecting some of them, i.e., we should preserve the list 10 structure and appearance. 11 12 Test: editing/selection/drag-list-item.html 13 14 * editing/htmlediting.cpp: 15 (WebCore::isListItem): modified constness. 16 * editing/htmlediting.h: 17 (WebCore): ditto. 18 * editing/markup.cpp: 19 (WebCore::highestAncestorToWrapMarkup): 20 1 21 2013-03-08 Alberto Garcia <agarcia@igalia.com> 2 22 -
trunk/Source/WebCore/editing/htmlediting.cpp
r144911 r145195 581 581 } 582 582 583 bool isListItem( Node *n)583 bool isListItem(const Node *n) 584 584 { 585 585 return n && n->renderer() && n->renderer()->isListItem(); -
trunk/Source/WebCore/editing/htmlediting.h
r143893 r145195 108 108 bool isTableStructureNode(const Node*); 109 109 bool isListElement(Node*); 110 bool isListItem( Node*);110 bool isListItem(const Node*); 111 111 bool isNodeRendered(const Node*); 112 112 bool isNodeVisiblyContainedWithin(Node*, const Range*); -
trunk/Source/WebCore/editing/markup.cpp
r144995 r145195 517 517 specialCommonAncestor = ancestorToRetainStructureAndAppearance(commonAncestor); 518 518 519 if (Node* parentListNode = enclosingNodeOfType(firstPositionInOrBeforeNode(range->firstNode()), isListItem)) { 520 if (WebCore::areRangesEqual(VisibleSelection::selectionFromContentsOfNode(parentListNode).toNormalizedRange().get(), range)) { 521 specialCommonAncestor = parentListNode->parentNode(); 522 while (specialCommonAncestor && !isListElement(specialCommonAncestor)) 523 specialCommonAncestor = specialCommonAncestor->parentNode(); 524 } 525 } 526 519 527 // Retain the Mail quote level by including all ancestor mail block quotes. 520 528 if (Node* highestMailBlockquote = highestEnclosingNodeOfType(firstPositionInOrBeforeNode(range->firstNode()), isMailBlockquote, CanCrossEditingBoundary))
Note: See TracChangeset
for help on using the changeset viewer.