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

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

Issue 428823002: Use tighter typing in editing: markup (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « Source/core/editing/InsertTextCommand.cpp ('k') | Source/core/editing/htmlediting.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/ReplaceSelectionCommand.cpp
diff --git a/Source/core/editing/ReplaceSelectionCommand.cpp b/Source/core/editing/ReplaceSelectionCommand.cpp
index a73f851f668c755a4558be2f787dfc4006cff978..48b8dbad42866d3e431c6051fe680a6f80483fc8 100644
--- a/Source/core/editing/ReplaceSelectionCommand.cpp
+++ b/Source/core/editing/ReplaceSelectionCommand.cpp
@@ -1096,7 +1096,7 @@ void ReplaceSelectionCommand::doApply()
fragment.removeNode(refNode);
Node* blockStart = enclosingBlock(insertionPos.deprecatedNode());
- if ((isListElement(refNode.get()) || (isLegacyAppleStyleSpan(refNode.get()) && isListElement(refNode->firstChild())))
+ if ((isHTMLListElement(refNode.get()) || (isLegacyAppleStyleSpan(refNode.get()) && isHTMLListElement(refNode->firstChild())))
&& blockStart && blockStart->renderer()->isListItem())
refNode = insertAsListItems(toHTMLElement(refNode), blockStart, insertionPos, insertedNodes);
else {
@@ -1441,7 +1441,7 @@ Node* ReplaceSelectionCommand::insertAsListItems(PassRefPtrWillBeRawPtr<HTMLElem
{
RefPtrWillBeRawPtr<HTMLElement> listElement = prpListElement;
- while (listElement->hasChildren() && isListElement(listElement->firstChild()) && listElement->hasOneChild())
+ while (listElement->hasOneChild() && isHTMLListElement(listElement->firstChild()))
listElement = toHTMLElement(listElement->firstChild());
bool isStart = isStartOfParagraph(VisiblePosition(insertPos));
« no previous file with comments | « Source/core/editing/InsertTextCommand.cpp ('k') | Source/core/editing/htmlediting.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698