Index: third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp |
diff --git a/third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp b/third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp |
index ef9aa38619ca0c7e660aeefaa97bda058fb75337..24a81d210d3e7d6d00d819e412bb1cede8eef6c7 100644 |
--- a/third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp |
+++ b/third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp |
@@ -84,7 +84,7 @@ void FormatBlockCommand::formatRange(const Position& start, |
? start.anchorNode() |
: splitTreeToNode(start.anchorNode(), nodeToSplitTo); |
Node* nodeAfterInsertionPosition = outerBlock; |
- Range* range = Range::create(document(), start, endOfSelection); |
+ const EphemeralRange range = EphemeralRange(start, endOfSelection); |
document().updateStyleAndLayoutIgnorePendingStylesheets(); |
if (isElementForFormatBlock(refElement->tagQName()) && |
@@ -92,7 +92,7 @@ void FormatBlockCommand::formatRange(const Position& start, |
startOfBlock(createVisiblePosition(start)).deepEquivalent() && |
(createVisiblePosition(end).deepEquivalent() == |
endOfBlock(createVisiblePosition(end)).deepEquivalent() || |
- isNodeVisiblyContainedWithin(*refElement, *range)) && |
+ isNodeVisiblyContainedWithin(*refElement, range)) && |
refElement != root && !root->isDescendantOf(refElement)) { |
// Already in a block element that only contains the current paragraph |
if (refElement->hasTagName(tagName())) |