| Index: third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
|
| index 352c1e1201ed42de09afa3419dd5e8cc75d6fd3d..42ef107f2cb0f4822e3981363e3794711c6adc2d 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/TypingCommand.cpp
|
| @@ -69,7 +69,7 @@ public:
|
| }
|
|
|
| private:
|
| - RawPtrWillBeMember<TypingCommand> m_typingCommand;
|
| + Member<TypingCommand> m_typingCommand;
|
| bool m_selectInsertedText;
|
| const String& m_text;
|
| };
|
| @@ -99,7 +99,7 @@ void TypingCommand::deleteSelection(Document& document, Options options)
|
| if (!frame->selection().isRange())
|
| return;
|
|
|
| - if (RefPtrWillBeRawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(frame)) {
|
| + if (RawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(frame)) {
|
| updateSelectionIfDifferentFromCurrentSelection(lastTypingCommand.get(), frame);
|
|
|
| lastTypingCommand->setShouldPreventSpellChecking(options & PreventSpellChecking);
|
| @@ -114,7 +114,7 @@ void TypingCommand::deleteKeyPressed(Document& document, Options options, TextGr
|
| {
|
| if (granularity == CharacterGranularity) {
|
| LocalFrame* frame = document.frame();
|
| - if (RefPtrWillBeRawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(frame)) {
|
| + if (RawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(frame)) {
|
| // If the last typing command is not Delete, open a new typing command.
|
| // We need to group continuous delete commands alone in a single typing command.
|
| if (lastTypingCommand->commandTypeOfOpenCommand() == DeleteKey) {
|
| @@ -134,7 +134,7 @@ void TypingCommand::forwardDeleteKeyPressed(Document& document, Options options,
|
| // FIXME: Forward delete in TextEdit appears to open and close a new typing command.
|
| if (granularity == CharacterGranularity) {
|
| LocalFrame* frame = document.frame();
|
| - if (RefPtrWillBeRawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(frame)) {
|
| + if (RawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(frame)) {
|
| updateSelectionIfDifferentFromCurrentSelection(lastTypingCommand.get(), frame);
|
| lastTypingCommand->setShouldPreventSpellChecking(options & PreventSpellChecking);
|
| lastTypingCommand->forwardDeleteKeyPressed(granularity, options & KillRing);
|
| @@ -170,7 +170,7 @@ void TypingCommand::insertText(Document& document, const String& text, Options o
|
| // FIXME: We shouldn't need to take selectionForInsertion. It should be identical to FrameSelection's current selection.
|
| void TypingCommand::insertText(Document& document, const String& text, const VisibleSelection& selectionForInsertion, Options options, TextCompositionType compositionType)
|
| {
|
| - RefPtrWillBeRawPtr<LocalFrame> frame = document.frame();
|
| + RawPtr<LocalFrame> frame = document.frame();
|
| ASSERT(frame);
|
|
|
| VisibleSelection currentSelection = frame->selection().selection();
|
| @@ -180,7 +180,7 @@ void TypingCommand::insertText(Document& document, const String& text, const Vis
|
| // Set the starting and ending selection appropriately if we are using a selection
|
| // that is different from the current selection. In the future, we should change EditCommand
|
| // to deal with custom selections in a general way that can be used by all of the commands.
|
| - if (RefPtrWillBeRawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(frame.get())) {
|
| + if (RawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(frame.get())) {
|
| if (!equalSelectionsInDOMTree(lastTypingCommand->endingSelection(), selectionForInsertion)) {
|
| lastTypingCommand->setStartingSelection(selectionForInsertion);
|
| lastTypingCommand->setEndingSelection(selectionForInsertion);
|
| @@ -193,13 +193,13 @@ void TypingCommand::insertText(Document& document, const String& text, const Vis
|
| return;
|
| }
|
|
|
| - RefPtrWillBeRawPtr<TypingCommand> cmd = TypingCommand::create(document, InsertText, newText, options, compositionType);
|
| + RawPtr<TypingCommand> cmd = TypingCommand::create(document, InsertText, newText, options, compositionType);
|
| applyTextInsertionCommand(frame.get(), cmd, selectionForInsertion, currentSelection);
|
| }
|
|
|
| void TypingCommand::insertLineBreak(Document& document, Options options)
|
| {
|
| - if (RefPtrWillBeRawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(document.frame())) {
|
| + if (RawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(document.frame())) {
|
| lastTypingCommand->setShouldRetainAutocorrectionIndicator(options & RetainAutocorrectionIndicator);
|
| lastTypingCommand->insertLineBreak();
|
| return;
|
| @@ -210,7 +210,7 @@ void TypingCommand::insertLineBreak(Document& document, Options options)
|
|
|
| void TypingCommand::insertParagraphSeparatorInQuotedContent(Document& document)
|
| {
|
| - if (RefPtrWillBeRawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(document.frame())) {
|
| + if (RawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(document.frame())) {
|
| lastTypingCommand->insertParagraphSeparatorInQuotedContent();
|
| return;
|
| }
|
| @@ -220,7 +220,7 @@ void TypingCommand::insertParagraphSeparatorInQuotedContent(Document& document)
|
|
|
| void TypingCommand::insertParagraphSeparator(Document& document, Options options)
|
| {
|
| - if (RefPtrWillBeRawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(document.frame())) {
|
| + if (RawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(document.frame())) {
|
| lastTypingCommand->setShouldRetainAutocorrectionIndicator(options & RetainAutocorrectionIndicator);
|
| lastTypingCommand->insertParagraphSeparator();
|
| return;
|
| @@ -229,11 +229,11 @@ void TypingCommand::insertParagraphSeparator(Document& document, Options options
|
| TypingCommand::create(document, InsertParagraphSeparator, "", options)->apply();
|
| }
|
|
|
| -PassRefPtrWillBeRawPtr<TypingCommand> TypingCommand::lastTypingCommandIfStillOpenForTyping(LocalFrame* frame)
|
| +RawPtr<TypingCommand> TypingCommand::lastTypingCommandIfStillOpenForTyping(LocalFrame* frame)
|
| {
|
| ASSERT(frame);
|
|
|
| - RefPtrWillBeRawPtr<CompositeEditCommand> lastEditCommand = frame->editor().lastEditCommand();
|
| + RawPtr<CompositeEditCommand> lastEditCommand = frame->editor().lastEditCommand();
|
| if (!lastEditCommand || !lastEditCommand->isTypingCommand() || !static_cast<TypingCommand*>(lastEditCommand.get())->isOpenForMoreTyping())
|
| return nullptr;
|
|
|
| @@ -242,7 +242,7 @@ PassRefPtrWillBeRawPtr<TypingCommand> TypingCommand::lastTypingCommandIfStillOpe
|
|
|
| void TypingCommand::closeTyping(LocalFrame* frame)
|
| {
|
| - if (RefPtrWillBeRawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(frame))
|
| + if (RawPtr<TypingCommand> lastTypingCommand = lastTypingCommandIfStillOpenForTyping(frame))
|
| lastTypingCommand->closeTyping();
|
| }
|
|
|
| @@ -346,7 +346,7 @@ void TypingCommand::insertText(const String &text, bool selectInsertedText)
|
|
|
| void TypingCommand::insertTextRunWithoutNewlines(const String &text, bool selectInsertedText)
|
| {
|
| - RefPtrWillBeRawPtr<InsertTextCommand> command = InsertTextCommand::create(document(), text, selectInsertedText,
|
| + RawPtr<InsertTextCommand> command = InsertTextCommand::create(document(), text, selectInsertedText,
|
| m_compositionType == TextCompositionNone ? InsertTextCommand::RebalanceLeadingAndTrailingWhitespaces : InsertTextCommand::RebalanceAllWhitespaces);
|
|
|
| applyCommandToComposite(command, endingSelection());
|
| @@ -432,7 +432,7 @@ void TypingCommand::deleteKeyPressed(TextGranularity granularity, bool killRing)
|
|
|
| m_smartDelete = false;
|
|
|
| - OwnPtrWillBeRawPtr<FrameSelection> selection = FrameSelection::create();
|
| + RawPtr<FrameSelection> selection = FrameSelection::create();
|
| selection->setSelection(endingSelection());
|
| selection->modify(FrameSelection::AlterationExtend, DirectionBackward, granularity);
|
| if (killRing && selection->isCaret() && granularity != CharacterGranularity)
|
| @@ -535,7 +535,7 @@ void TypingCommand::forwardDeleteKeyPressed(TextGranularity granularity, bool ki
|
| // Handle delete at beginning-of-block case.
|
| // Do nothing in the case that the caret is at the start of a
|
| // root editable element or at the start of a document.
|
| - OwnPtrWillBeRawPtr<FrameSelection> selection = FrameSelection::create();
|
| + RawPtr<FrameSelection> selection = FrameSelection::create();
|
| selection->setSelection(endingSelection());
|
| selection->modify(FrameSelection::AlterationExtend, DirectionForward, granularity);
|
| if (killRing && selection->isCaret() && granularity != CharacterGranularity)
|
|
|