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

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

Issue 1245843003: [CodeHealth] Use Position::anchorNode instead of deprecatedNode. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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/Editor.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/FormatBlockCommand.cpp
diff --git a/Source/core/editing/FormatBlockCommand.cpp b/Source/core/editing/FormatBlockCommand.cpp
index 8e91f2643dffaf60c0d07fa68d5922bb1a54f40c..fde2ec2d862c5e29137e8ff4b40e8b92ec13afea 100644
--- a/Source/core/editing/FormatBlockCommand.cpp
+++ b/Source/core/editing/FormatBlockCommand.cpp
@@ -68,8 +68,8 @@ void FormatBlockCommand::formatRange(const Position& start, const Position& end,
if (!root || !refElement)
return;
- Node* nodeToSplitTo = enclosingBlockToSplitTreeTo(start.deprecatedNode());
- RefPtrWillBeRawPtr<Node> outerBlock = (start.deprecatedNode() == nodeToSplitTo) ? start.deprecatedNode() : splitTreeToNode(start.deprecatedNode(), nodeToSplitTo).get();
+ Node* nodeToSplitTo = enclosingBlockToSplitTreeTo(start.anchorNode());
+ RefPtrWillBeRawPtr<Node> outerBlock = (start.anchorNode() == nodeToSplitTo) ? start.anchorNode() : splitTreeToNode(start.anchorNode(), nodeToSplitTo).get();
RefPtrWillBeRawPtr<Node> nodeAfterInsertionPosition = outerBlock;
RefPtrWillBeRawPtr<Range> range = Range::create(document(), start, endOfSelection);
« no previous file with comments | « Source/core/editing/Editor.cpp ('k') | Source/core/editing/FrameSelection.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698