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

Unified Diff: Source/core/editing/htmlediting.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: 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
Index: Source/core/editing/htmlediting.cpp
diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp
index 3ab1c75b6a68424f3762bc8d7c392cdb789cd1e2..5cf97d16de6444cd6006bd55b74c7585f992a7b0 100644
--- a/Source/core/editing/htmlediting.cpp
+++ b/Source/core/editing/htmlediting.cpp
@@ -714,7 +714,7 @@ HTMLElement* outermostEnclosingList(Node* node, Node* rootList)
bool canMergeLists(Element* firstList, Element* secondList)
{
- if (!firstList || !secondList || !firstList->isHTMLElement() || !secondList->isHTMLElement())
+ if (!firstList || !secondList || firstList == secondList || !firstList->isHTMLElement() || !secondList->isHTMLElement())
yosin_UTC9 2014/04/22 04:42:52 I think caller should not pass same |Element| to |
return false;
return firstList->hasTagName(secondList->tagQName()) // make sure the list types match (ol vs. ul)

Powered by Google App Engine
This is Rietveld 408576698