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

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

Issue 104783005: Fix for an issue while breaking out of an empty list item in case of nested lists (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Resubmitting as base file was missing Created 7 years 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/inserting/break-out-of-nested-lists-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/htmlediting.cpp
diff --git a/Source/core/editing/htmlediting.cpp b/Source/core/editing/htmlediting.cpp
index 6c00bb5d9a38062fb59b1a66e24aa76eac83c386..59f981ae3845a715a7cecdfb867b7f5fca61a820 100644
--- a/Source/core/editing/htmlediting.cpp
+++ b/Source/core/editing/htmlediting.cpp
@@ -680,30 +680,6 @@ Node* enclosingListChild(Node *node)
return 0;
}
-static HTMLElement* embeddedSublist(Node* listItem)
-{
- // Check the DOM so that we'll find collapsed sublists without renderers.
- for (Node* n = listItem->firstChild(); n; n = n->nextSibling()) {
- if (isListElement(n))
- return toHTMLElement(n);
- }
-
- return 0;
-}
-
-static Node* appendedSublist(Node* listItem)
-{
- // Check the DOM so that we'll find collapsed sublists without renderers.
- for (Node* n = listItem->nextSibling(); n; n = n->nextSibling()) {
- if (isListElement(n))
- return toHTMLElement(n);
- if (isListItem(listItem))
- return 0;
- }
-
- return 0;
-}
-
// FIXME: This method should not need to call isStartOfParagraph/isEndOfParagraph
Node* enclosingEmptyListItem(const VisiblePosition& visiblePos)
{
@@ -718,9 +694,6 @@ Node* enclosingEmptyListItem(const VisiblePosition& visiblePos)
if (firstInListChild != visiblePos || lastInListChild != visiblePos)
return 0;
- if (embeddedSublist(listChildNode) || appendedSublist(listChildNode))
- return 0;
-
return listChildNode;
}
« no previous file with comments | « LayoutTests/editing/inserting/break-out-of-nested-lists-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698