Index: Source/core/editing/commands/ApplyStyleCommand.cpp |
diff --git a/Source/core/editing/commands/ApplyStyleCommand.cpp b/Source/core/editing/commands/ApplyStyleCommand.cpp |
index 8ed28c4947c7b86555a122cac76ed2b1fe1e57af..933df8398fe0a67a0f555f3bfa293582bc7e62d9 100644 |
--- a/Source/core/editing/commands/ApplyStyleCommand.cpp |
+++ b/Source/core/editing/commands/ApplyStyleCommand.cpp |
@@ -266,8 +266,8 @@ void ApplyStyleCommand::applyBlockStyle(EditingStyle *style) |
int endIndex = TextIterator::rangeLength(endRange->startPosition(), endRange->endPosition(), true); |
VisiblePosition paragraphStart(startOfParagraph(visibleStart)); |
- VisiblePosition nextParagraphStart(endOfParagraph(paragraphStart).next()); |
- VisiblePosition beyondEnd(endOfParagraph(visibleEnd).next()); |
+ VisiblePosition nextParagraphStart(nextPositionOf(endOfParagraph(paragraphStart))); |
+ VisiblePosition beyondEnd(nextPositionOf(endOfParagraph(visibleEnd))); |
while (paragraphStart.isNotNull() && paragraphStart.deepEquivalent() != beyondEnd.deepEquivalent()) { |
StyleChange styleChange(style, paragraphStart.deepEquivalent()); |
if (styleChange.cssStyle().length() || m_removeOnly) { |
@@ -285,11 +285,11 @@ void ApplyStyleCommand::applyBlockStyle(EditingStyle *style) |
} |
if (nextParagraphStart.isOrphan()) |
- nextParagraphStart = endOfParagraph(paragraphStart).next(); |
+ nextParagraphStart = nextPositionOf(endOfParagraph(paragraphStart)); |
} |
paragraphStart = nextParagraphStart; |
- nextParagraphStart = endOfParagraph(paragraphStart).next(); |
+ nextParagraphStart = nextPositionOf(endOfParagraph(paragraphStart)); |
} |
EphemeralRange startEphemeralRange = PlainTextRange(startIndex).createRangeForSelection(toContainerNode(scope)); |