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

Unified Diff: Source/core/editing/StyledMarkupSerializer.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/SpellChecker.cpp ('k') | Source/core/editing/VisiblePosition.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/editing/StyledMarkupSerializer.cpp
diff --git a/Source/core/editing/StyledMarkupSerializer.cpp b/Source/core/editing/StyledMarkupSerializer.cpp
index 0560103f6e144c4f4bb3238a99360fff9191e51c..70ff999aaff5f7a5cb8d58e11aafde743ea63fc4 100644
--- a/Source/core/editing/StyledMarkupSerializer.cpp
+++ b/Source/core/editing/StyledMarkupSerializer.cpp
@@ -137,8 +137,8 @@ StyledMarkupSerializer<Strategy>::StyledMarkupSerializer(EAbsoluteURLs shouldRes
static bool needInterchangeNewlineAfter(const VisiblePosition& v)
{
VisiblePosition next = v.next();
- Node* upstreamNode = next.deepEquivalent().upstream().deprecatedNode();
- Node* downstreamNode = v.deepEquivalent().downstream().deprecatedNode();
+ Node* upstreamNode = next.deepEquivalent().upstream().anchorNode();
+ Node* downstreamNode = v.deepEquivalent().downstream().anchorNode();
// Add an interchange newline if a paragraph break is selected and a br won't already be added to the markup to represent it.
return isEndOfParagraph(v) && isStartOfParagraph(next) && !(isHTMLBRElement(*upstreamNode) && upstreamNode == downstreamNode);
}
@@ -182,7 +182,7 @@ String StyledMarkupSerializer<Strategy>::createMarkup()
if (visibleStart == visibleEnd.previous())
return markupAccumulator.takeResults();
- firstNode = visibleStart.next().deepEquivalent().deprecatedNode();
+ firstNode = visibleStart.next().deepEquivalent().anchorNode();
if (pastEnd && PositionAlgorithm<Strategy>::beforeNode(firstNode).compareTo(PositionAlgorithm<Strategy>::beforeNode(pastEnd)) >= 0) {
// This condition hits in editing/pasteboard/copy-display-none.html.
« no previous file with comments | « Source/core/editing/SpellChecker.cpp ('k') | Source/core/editing/VisiblePosition.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698