| Index: Source/core/editing/ApplyStyleCommand.cpp
|
| diff --git a/Source/core/editing/ApplyStyleCommand.cpp b/Source/core/editing/ApplyStyleCommand.cpp
|
| index c1570e5246359e2a4cc9cedf05c71b28aba68255..4b1ded9d2abd93d3fe38a8721bc5524e1112961a 100644
|
| --- a/Source/core/editing/ApplyStyleCommand.cpp
|
| +++ b/Source/core/editing/ApplyStyleCommand.cpp
|
| @@ -45,6 +45,7 @@
|
| #include "core/editing/htmlediting.h"
|
| #include "core/rendering/RenderObject.h"
|
| #include "core/rendering/RenderText.h"
|
| +#include "platform/heap/Handle.h"
|
| #include "wtf/StdLibExtras.h"
|
| #include "wtf/text/StringBuilder.h"
|
|
|
| @@ -254,8 +255,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 = visibleStart.deepEquivalent().deprecatedNode()->highestAncestor();
|
| - RefPtr<Range> startRange = Range::create(document(), firstPositionInNode(&scope), visibleStart.deepEquivalent().parentAnchoredEquivalent());
|
| - RefPtr<Range> endRange = Range::create(document(), firstPositionInNode(&scope), visibleEnd.deepEquivalent().parentAnchoredEquivalent());
|
| + RefPtrWillBeRawPtr<Range> startRange = Range::create(document(), firstPositionInNode(&scope), visibleStart.deepEquivalent().parentAnchoredEquivalent());
|
| + RefPtrWillBeRawPtr<Range> endRange = Range::create(document(), firstPositionInNode(&scope), visibleEnd.deepEquivalent().parentAnchoredEquivalent());
|
| int startIndex = TextIterator::rangeLength(startRange.get(), true);
|
| int endIndex = TextIterator::rangeLength(endRange.get(), true);
|
|
|
| @@ -701,7 +702,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);
|
| + RefPtrWillBeRawPtr<Range> range = Range::create(startNode->document(), start, end);
|
| Element* editableRoot = startNode->rootEditableElement();
|
| if (startNode != editableRoot) {
|
| while (editableRoot && startNode->parentNode() != editableRoot && isNodeVisiblyContainedWithin(*startNode->parentNode(), *range))
|
|
|