| Index: Source/core/editing/ApplyStyleCommand.cpp
|
| diff --git a/Source/core/editing/ApplyStyleCommand.cpp b/Source/core/editing/ApplyStyleCommand.cpp
|
| index d825478324f62d0c3ecb5317af6bf915478c6df6..5c43b913a346961fafdd00d840aa945b7f6f948a 100644
|
| --- a/Source/core/editing/ApplyStyleCommand.cpp
|
| +++ b/Source/core/editing/ApplyStyleCommand.cpp
|
| @@ -253,8 +253,8 @@ void ApplyStyleCommand::applyBlockStyle(EditingStyle *style)
|
| // addBlockStyleIfNeeded may moveParagraphs, which can remove these endpoints.
|
| // Calculate start and end indices from the start of the tree that they're in.
|
| Node* scope = highestAncestor(visibleStart.deepEquivalent().deprecatedNode());
|
| - RefPtr<Range> startRange = Range::create(&document(), firstPositionInNode(scope), visibleStart.deepEquivalent().parentAnchoredEquivalent());
|
| - RefPtr<Range> endRange = Range::create(&document(), firstPositionInNode(scope), visibleEnd.deepEquivalent().parentAnchoredEquivalent());
|
| + RefPtr<Range> startRange = Range::create(document(), firstPositionInNode(scope), visibleStart.deepEquivalent().parentAnchoredEquivalent());
|
| + RefPtr<Range> endRange = Range::create(document(), firstPositionInNode(scope), visibleEnd.deepEquivalent().parentAnchoredEquivalent());
|
| int startIndex = TextIterator::rangeLength(startRange.get(), true);
|
| int endIndex = TextIterator::rangeLength(endRange.get(), true);
|
|
|
| @@ -690,7 +690,7 @@ void ApplyStyleCommand::fixRangeAndApplyInlineStyle(EditingStyle* style, const P
|
| // Start from the highest fully selected ancestor so that we can modify the fully selected node.
|
| // e.g. When applying font-size: large on <font color="blue">hello</font>, we need to include the font element in our run
|
| // to generate <font color="blue" size="4">hello</font> instead of <font color="blue"><font size="4">hello</font></font>
|
| - RefPtr<Range> range = Range::create(&startNode->document(), start, end);
|
| + RefPtr<Range> range = Range::create(startNode->document(), start, end);
|
| Element* editableRoot = startNode->rootEditableElement();
|
| if (startNode != editableRoot) {
|
| while (editableRoot && startNode->parentNode() != editableRoot && isNodeVisiblyContainedWithin(startNode->parentNode(), range.get()))
|
|
|