| 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 e85532bc813cdd65e91ae6b3a0a084a3cf793fbb..ef9aa38619ca0c7e660aeefaa97bda058fb75337 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/FormatBlockCommand.cpp
|
| @@ -139,18 +139,17 @@ void FormatBlockCommand::formatRange(const Position& start,
|
| insertBlockPlaceholder(lastParagraphInBlockNode, editingState);
|
| }
|
|
|
| -Element* FormatBlockCommand::elementForFormatBlockCommand(Range* range) {
|
| - if (!range)
|
| - return 0;
|
| -
|
| - Node* commonAncestor = range->commonAncestorContainer();
|
| +Element* FormatBlockCommand::elementForFormatBlockCommand(
|
| + const EphemeralRange& range) {
|
| + Node* commonAncestor = range.commonAncestorContainer();
|
| while (commonAncestor && !isElementForFormatBlock(commonAncestor))
|
| commonAncestor = commonAncestor->parentNode();
|
|
|
| if (!commonAncestor)
|
| return 0;
|
|
|
| - Element* element = rootEditableElement(*range->startContainer());
|
| + Element* element =
|
| + rootEditableElement(*range.startPosition().computeContainerNode());
|
| if (!element || commonAncestor->contains(element))
|
| return 0;
|
|
|
|
|