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

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

Issue 24278008: [oilpan] Handlify Nodes in htmlediting (Closed) Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 3 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/InsertLineBreakCommand.cpp
diff --git a/Source/core/editing/InsertLineBreakCommand.cpp b/Source/core/editing/InsertLineBreakCommand.cpp
index 39facecc47f1d9b70f75adb8f7f20a943db3d6a8..2e4ecda2e2acce161aabc5595f64af351713b8a8 100644
--- a/Source/core/editing/InsertLineBreakCommand.cpp
+++ b/Source/core/editing/InsertLineBreakCommand.cpp
@@ -124,7 +124,7 @@ void InsertLineBreakCommand::doApply()
VisiblePosition endingPosition(positionBeforeNode(nodeToInsert));
setEndingSelection(VisibleSelection(endingPosition, endingSelection().isDirectional()));
- } else if (pos.deprecatedEditingOffset() <= caretMinOffset(pos.deprecatedNode().handle().raw())) {
+ } else if (pos.deprecatedEditingOffset() <= caretMinOffset(pos.deprecatedNode())) {
insertNodeAt(nodeToInsert, pos);
// Insert an extra br or '\n' if the just inserted one collapsed.
@@ -134,7 +134,7 @@ void InsertLineBreakCommand::doApply()
setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert), DOWNSTREAM, endingSelection().isDirectional()));
// If we're inserting after all of the rendered text in a text node, or into a non-text node,
// a simple insertion is sufficient.
- } else if (pos.deprecatedEditingOffset() >= caretMaxOffset(pos.deprecatedNode().handle().raw()) || !pos.deprecatedNode()->isTextNode()) {
+ } else if (pos.deprecatedEditingOffset() >= caretMaxOffset(pos.deprecatedNode()) || !pos.deprecatedNode()->isTextNode()) {
insertNodeAt(nodeToInsert, pos);
setEndingSelection(VisibleSelection(positionInParentAfterNode(nodeToInsert), DOWNSTREAM, endingSelection().isDirectional()));
} else if (pos.deprecatedNode()->isTextNode()) {
@@ -173,7 +173,7 @@ void InsertLineBreakCommand::doApply()
// leaves and then comes back, new input will have the right style.
// FIXME: We shouldn't always apply the typing style to the line break here,
// see <rdar://problem/5794462>.
- applyStyle(typingStyle.get(), firstPositionInOrBeforeNode(nodeToInsert.raw()), lastPositionInOrAfterNode(nodeToInsert.raw()));
+ applyStyle(typingStyle.get(), firstPositionInOrBeforeNode(nodeToInsert), lastPositionInOrAfterNode(nodeToInsert));
// Even though this applyStyle operates on a Range, it still sets an endingSelection().
// It tries to set a VisibleSelection around the content it operated on. So, that VisibleSelection
// will either (a) select the line break we inserted, or it will (b) be a caret just

Powered by Google App Engine
This is Rietveld 408576698