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

Unified Diff: Source/core/editing/InsertParagraphSeparatorCommand.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/InsertParagraphSeparatorCommand.cpp
diff --git a/Source/core/editing/InsertParagraphSeparatorCommand.cpp b/Source/core/editing/InsertParagraphSeparatorCommand.cpp
index 7310b4a451588d8eebc4cfc6681f8550bac1147c..48ba3298defef74a30d01466ea676e14d727f39f 100644
--- a/Source/core/editing/InsertParagraphSeparatorCommand.cpp
+++ b/Source/core/editing/InsertParagraphSeparatorCommand.cpp
@@ -167,11 +167,11 @@ void InsertParagraphSeparatorCommand::doApply()
}
// FIXME: The parentAnchoredEquivalent conversion needs to be moved into enclosingBlock.
- Handle<Element> startBlock = enclosingBlock(insertionPosition.parentAnchoredEquivalent().containerNode().handle().raw());
+ Handle<Element> startBlock = enclosingBlock(insertionPosition.parentAnchoredEquivalent().containerNode());
Position canonicalPos = VisiblePosition(insertionPosition).deepEquivalent();
if (!startBlock
|| !startBlock->nonShadowBoundaryParentNode()
- || isTableCell(startBlock.raw())
+ || isTableCell(startBlock)
|| startBlock->hasTagName(formTag)
// FIXME: If the node is hidden, we don't have a canonical position so we will do the wrong thing for tables and <hr>. https://bugs.webkit.org/show_bug.cgi?id=40342
|| (!canonicalPos.isNull() && canonicalPos.deprecatedNode()->renderer() && canonicalPos.deprecatedNode()->renderer()->isTable())
@@ -229,8 +229,8 @@ void InsertParagraphSeparatorCommand::doApply()
// We can get here if we pasted a copied portion of a blockquote with a newline at the end and are trying to paste it
// into an unquoted area. We then don't want the newline within the blockquote or else it will also be quoted.
if (m_pasteBlockqutoeIntoUnquotedArea) {
- if (Node* highestBlockquote = highestEnclosingNodeOfType(canonicalPos, &isMailBlockquote))
- startBlock = adoptRawResult(toElement(highestBlockquote));
+ if (Handle<Node> highestBlockquote = highestEnclosingNodeOfType(canonicalPos, &isMailBlockquote))
+ startBlock = toElement(highestBlockquote);
}
// Most of the time we want to stay at the nesting level of the startBlock (e.g., when nesting within lists). However,
@@ -369,7 +369,7 @@ void InsertParagraphSeparatorCommand::doApply()
n = insertionPosition.computeNodeAfterPosition();
else {
Handle<Node> splitTo = insertionPosition.containerNode();
- if (splitTo->isTextNode() && insertionPosition.offsetInContainerNode() >= caretMaxOffset(splitTo.raw()))
+ if (splitTo->isTextNode() && insertionPosition.offsetInContainerNode() >= caretMaxOffset(splitTo))
splitTo = NodeTraversal::next(splitTo, startBlock);
ASSERT(splitTo);
splitTreeToNode(splitTo, startBlock);

Powered by Google App Engine
This is Rietveld 408576698