Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(394)

Unified Diff: Source/core/editing/DeleteSelectionCommand.cpp

Issue 242733004: canMergeLists() should make sure that the list items do not belong to the same list (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Review comments incorporated Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/editing/deleting/merge-list-items-in-same-list-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/DeleteSelectionCommand.cpp
diff --git a/Source/core/editing/DeleteSelectionCommand.cpp b/Source/core/editing/DeleteSelectionCommand.cpp
index de814092d875265882ff4096cb7ef045a27687ec..160e346f1f6ba6f34158cee435e234f3d70e5871 100644
--- a/Source/core/editing/DeleteSelectionCommand.cpp
+++ b/Source/core/editing/DeleteSelectionCommand.cpp
@@ -635,6 +635,7 @@ void DeleteSelectionCommand::mergeParagraphs()
Node* listItemInFirstParagraph = enclosingNodeOfType(m_upstreamStart, isListItem);
Node* listItemInSecondParagraph = enclosingNodeOfType(m_downstreamEnd, isListItem);
if (listItemInFirstParagraph && listItemInSecondParagraph
+ && listItemInFirstParagraph->parentElement() != listItemInSecondParagraph->parentElement()
&& canMergeLists(listItemInFirstParagraph->parentElement(), listItemInSecondParagraph->parentElement())) {
mergeIdenticalElements(listItemInFirstParagraph->parentElement(), listItemInSecondParagraph->parentElement());
m_endingPosition = mergeDestination.deepEquivalent();
« no previous file with comments | « LayoutTests/editing/deleting/merge-list-items-in-same-list-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698