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

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

Issue 423003003: Use tighter typing in editing: InsertParagraphSeparatorCommand / InsertTextCommand (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase 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/InsertParagraphSeparatorCommand.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/InsertTextCommand.cpp
diff --git a/Source/core/editing/InsertTextCommand.cpp b/Source/core/editing/InsertTextCommand.cpp
index b3bd919775890c00104832149d314496fa4cd7b8..d029560703e806ee8f2e3d599f803629afa137d8 100644
--- a/Source/core/editing/InsertTextCommand.cpp
+++ b/Source/core/editing/InsertTextCommand.cpp
@@ -49,7 +49,7 @@ Position InsertTextCommand::positionInsideTextNode(const Position& p)
{
Position pos = p;
if (isTabHTMLSpanElementTextNode(pos.anchorNode())) {
- RefPtrWillBeRawPtr<Node> textNode = document().createEditingTextNode("");
+ RefPtrWillBeRawPtr<Text> textNode = document().createEditingTextNode("");
insertNodeAtTabSpanPosition(textNode.get(), pos);
return firstPositionInNode(textNode.get());
}
@@ -57,7 +57,7 @@ Position InsertTextCommand::positionInsideTextNode(const Position& p)
// Prepare for text input by looking at the specified position.
// It may be necessary to insert a text node to receive characters.
if (!pos.containerNode()->isTextNode()) {
- RefPtrWillBeRawPtr<Node> textNode = document().createEditingTextNode("");
+ RefPtrWillBeRawPtr<Text> textNode = document().createEditingTextNode("");
insertNodeAt(textNode.get(), pos);
return firstPositionInNode(textNode.get());
}
« no previous file with comments | « Source/core/editing/InsertParagraphSeparatorCommand.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698