| Index: Source/core/editing/BreakBlockquoteCommand.cpp
|
| diff --git a/Source/core/editing/BreakBlockquoteCommand.cpp b/Source/core/editing/BreakBlockquoteCommand.cpp
|
| index c2f9ee54218eb57b22552778a079eb958762ac4b..eacdd406719dca0f7f05799bf69a2a9a5ffa19e5 100644
|
| --- a/Source/core/editing/BreakBlockquoteCommand.cpp
|
| +++ b/Source/core/editing/BreakBlockquoteCommand.cpp
|
| @@ -67,7 +67,7 @@ void BreakBlockquoteCommand::doApply()
|
| Position pos = endingSelection().start().downstream();
|
|
|
| // Find the top-most blockquote from the start.
|
| - Handle<Node> topBlockquote = adoptRawResult(highestEnclosingNodeOfType(pos, isMailBlockquote));
|
| + Handle<Node> topBlockquote = highestEnclosingNodeOfType(pos, isMailBlockquote);
|
| if (!topBlockquote || !topBlockquote->parentNode() || !topBlockquote->isElementNode())
|
| return;
|
|
|
| @@ -100,8 +100,12 @@ void BreakBlockquoteCommand::doApply()
|
| pos = pos.next();
|
|
|
| // Adjust the position so we don't split at the beginning of a quote.
|
| - while (isFirstVisiblePositionInNode(VisiblePosition(pos), enclosingNodeOfType(pos, isMailBlockquote)))
|
| + while (true) {
|
| + HandleScope scope;
|
| + if (!isFirstVisiblePositionInNode(VisiblePosition(pos), enclosingNodeOfType(pos, isMailBlockquote).handle().raw()))
|
| + break;
|
| pos = pos.previous();
|
| + }
|
|
|
| // startNode is the first node that we need to move to the new blockquote.
|
| Handle<Node> startNode = pos.deprecatedNode();
|
| @@ -122,7 +126,7 @@ void BreakBlockquoteCommand::doApply()
|
|
|
| // If there's nothing inside topBlockquote to move, we're finished.
|
| if (!startNode->isDescendantOf(topBlockquote.raw())) {
|
| - setEndingSelection(VisibleSelection(VisiblePosition(firstPositionInOrBeforeNode(startNode.raw())), endingSelection().isDirectional()));
|
| + setEndingSelection(VisibleSelection(VisiblePosition(firstPositionInOrBeforeNode(startNode)), endingSelection().isDirectional()));
|
| return;
|
| }
|
|
|
|
|