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

Unified Diff: third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp

Issue 2366693005: Mark paragraph-related functions deprecated in VisibleUnits (Closed)
Patch Set: Add output for DCHECK Created 4 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: third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp b/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
index 91e25fc68f4c58e7ae8d798e945d5c9b3930f34f..90fc1901a175eec07cdd468e7b7ba82aff5efb72 100644
--- a/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.cpp
@@ -271,9 +271,9 @@ void ApplyStyleCommand::applyBlockStyle(EditingStyle *style, EditingState* editi
int startIndex = TextIterator::rangeLength(startRange->startPosition(), startRange->endPosition(), true);
int endIndex = TextIterator::rangeLength(endRange->startPosition(), endRange->endPosition(), true);
- VisiblePosition paragraphStart(startOfParagraph(visibleStart));
- VisiblePosition nextParagraphStart(nextPositionOf(endOfParagraph(paragraphStart)));
- VisiblePosition beyondEnd(nextPositionOf(endOfParagraph(visibleEnd)));
+ VisiblePosition paragraphStart(startOfParagraphDeprecated(visibleStart));
+ VisiblePosition nextParagraphStart(nextPositionOf(endOfParagraphDeprecated(paragraphStart)));
+ VisiblePosition beyondEnd(nextPositionOf(endOfParagraphDeprecated(visibleEnd)));
while (paragraphStart.isNotNull() && paragraphStart.deepEquivalent() != beyondEnd.deepEquivalent()) {
DCHECK(!paragraphStart.isOrphan()) << paragraphStart;
StyleChange styleChange(style, paragraphStart.deepEquivalent());
@@ -304,12 +304,12 @@ void ApplyStyleCommand::applyBlockStyle(EditingStyle *style, EditingState* editi
DCHECK(!paragraphStart.isOrphan()) << paragraphStart;
if (nextParagraphStart.isOrphan())
- nextParagraphStart = nextPositionOf(endOfParagraph(paragraphStart));
+ nextParagraphStart = nextPositionOf(endOfParagraphDeprecated(paragraphStart));
}
DCHECK(!nextParagraphStart.isOrphan()) << nextParagraphStart;
paragraphStart = nextParagraphStart;
- nextParagraphStart = nextPositionOf(endOfParagraph(paragraphStart));
+ nextParagraphStart = nextPositionOf(endOfParagraphDeprecated(paragraphStart));
}
// Update style and layout again, since added or removed styles could have

Powered by Google App Engine
This is Rietveld 408576698