| Index: third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| index ede33f9f49e3b2e225b25d770ae9b9d2124324cc..587d7abae6b5be1c0952acc66259be1c5277dba8 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| +++ b/third_party/WebKit/Source/core/editing/commands/EditorCommand.cpp
|
| @@ -122,14 +122,14 @@ static bool applyCommandToFrame(LocalFrame& frame, EditorCommandSource source, E
|
|
|
| static bool executeApplyStyle(LocalFrame& frame, EditorCommandSource source, EditAction action, CSSPropertyID propertyID, const String& propertyValue)
|
| {
|
| - RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
|
| + RawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
|
| style->setProperty(propertyID, propertyValue);
|
| return applyCommandToFrame(frame, source, action, style.get());
|
| }
|
|
|
| static bool executeApplyStyle(LocalFrame& frame, EditorCommandSource source, EditAction action, CSSPropertyID propertyID, CSSValueID propertyValue)
|
| {
|
| - RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
|
| + RawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
|
| style->setProperty(propertyID, propertyValue);
|
| return applyCommandToFrame(frame, source, action, style.get());
|
| }
|
| @@ -139,14 +139,14 @@ static bool executeApplyStyle(LocalFrame& frame, EditorCommandSource source, Edi
|
| // until https://bugs.webkit.org/show_bug.cgi?id=27818 is resolved.
|
| static bool executeToggleStyleInList(LocalFrame& frame, EditorCommandSource source, EditAction action, CSSPropertyID propertyID, CSSValue* value)
|
| {
|
| - RefPtrWillBeRawPtr<EditingStyle> selectionStyle = EditingStyle::styleAtSelectionStart(frame.selection().selection());
|
| + RawPtr<EditingStyle> selectionStyle = EditingStyle::styleAtSelectionStart(frame.selection().selection());
|
| if (!selectionStyle || !selectionStyle->style())
|
| return false;
|
|
|
| - RefPtrWillBeRawPtr<CSSValue> selectedCSSValue = selectionStyle->style()->getPropertyCSSValue(propertyID);
|
| + RawPtr<CSSValue> selectedCSSValue = selectionStyle->style()->getPropertyCSSValue(propertyID);
|
| String newStyle("none");
|
| if (selectedCSSValue->isValueList()) {
|
| - RefPtrWillBeRawPtr<CSSValueList> selectedCSSValueList = toCSSValueList(selectedCSSValue.get());
|
| + RawPtr<CSSValueList> selectedCSSValueList = toCSSValueList(selectedCSSValue.get());
|
| if (!selectedCSSValueList->removeAll(value))
|
| selectedCSSValueList->append(value);
|
| if (selectedCSSValueList->length())
|
| @@ -157,7 +157,7 @@ static bool executeToggleStyleInList(LocalFrame& frame, EditorCommandSource sour
|
| }
|
|
|
| // FIXME: We shouldn't be having to convert new style into text. We should have setPropertyCSSValue.
|
| - RefPtrWillBeRawPtr<MutableStylePropertySet> newMutableStyle = MutableStylePropertySet::create(HTMLQuirksMode);
|
| + RawPtr<MutableStylePropertySet> newMutableStyle = MutableStylePropertySet::create(HTMLQuirksMode);
|
| newMutableStyle->setProperty(propertyID, newStyle);
|
| return applyCommandToFrame(frame, source, action, newMutableStyle.get());
|
| }
|
| @@ -174,13 +174,13 @@ static bool executeToggleStyle(LocalFrame& frame, EditorCommandSource source, Ed
|
| else
|
| styleIsPresent = frame.editor().selectionHasStyle(propertyID, onValue) == TrueTriState;
|
|
|
| - RefPtrWillBeRawPtr<EditingStyle> style = EditingStyle::create(propertyID, styleIsPresent ? offValue : onValue);
|
| + RawPtr<EditingStyle> style = EditingStyle::create(propertyID, styleIsPresent ? offValue : onValue);
|
| return applyCommandToFrame(frame, source, action, style->style());
|
| }
|
|
|
| static bool executeApplyParagraphStyle(LocalFrame& frame, EditorCommandSource source, EditAction action, CSSPropertyID propertyID, const String& propertyValue)
|
| {
|
| - RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
|
| + RawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
|
| style->setProperty(propertyID, propertyValue);
|
| // FIXME: We don't call shouldApplyStyle when the source is DOM; is there a good reason for that?
|
| switch (source) {
|
| @@ -195,16 +195,16 @@ static bool executeApplyParagraphStyle(LocalFrame& frame, EditorCommandSource so
|
| return false;
|
| }
|
|
|
| -static bool executeInsertFragment(LocalFrame& frame, PassRefPtrWillBeRawPtr<DocumentFragment> fragment)
|
| +static bool executeInsertFragment(LocalFrame& frame, RawPtr<DocumentFragment> fragment)
|
| {
|
| ASSERT(frame.document());
|
| return ReplaceSelectionCommand::create(*frame.document(), fragment, ReplaceSelectionCommand::PreventNesting, EditActionUnspecified)->apply();
|
| }
|
|
|
| -static bool executeInsertElement(LocalFrame& frame, PassRefPtrWillBeRawPtr<HTMLElement> content)
|
| +static bool executeInsertElement(LocalFrame& frame, RawPtr<HTMLElement> content)
|
| {
|
| ASSERT(frame.document());
|
| - RefPtrWillBeRawPtr<DocumentFragment> fragment = DocumentFragment::create(*frame.document());
|
| + RawPtr<DocumentFragment> fragment = DocumentFragment::create(*frame.document());
|
| TrackExceptionState exceptionState;
|
| fragment->appendChild(content, exceptionState);
|
| if (exceptionState.hadException())
|
| @@ -481,7 +481,7 @@ static bool executeFormatBlock(LocalFrame& frame, Event*, EditorCommandSource, c
|
| QualifiedName qualifiedTagName(prefix, localName, xhtmlNamespaceURI);
|
|
|
| ASSERT(frame.document());
|
| - RefPtrWillBeRawPtr<FormatBlockCommand> command = FormatBlockCommand::create(*frame.document(), qualifiedTagName);
|
| + RawPtr<FormatBlockCommand> command = FormatBlockCommand::create(*frame.document(), qualifiedTagName);
|
| command->apply();
|
| return command->didApply();
|
| }
|
| @@ -527,7 +527,7 @@ static bool executeInsertBacktab(LocalFrame& frame, Event* event, EditorCommandS
|
| static bool executeInsertHorizontalRule(LocalFrame& frame, Event*, EditorCommandSource, const String& value)
|
| {
|
| ASSERT(frame.document());
|
| - RefPtrWillBeRawPtr<HTMLHRElement> rule = HTMLHRElement::create(*frame.document());
|
| + RawPtr<HTMLHRElement> rule = HTMLHRElement::create(*frame.document());
|
| if (!value.isEmpty())
|
| rule->setIdAttribute(AtomicString(value));
|
| return executeInsertElement(frame, rule.release());
|
| @@ -542,7 +542,7 @@ static bool executeInsertHTML(LocalFrame& frame, Event*, EditorCommandSource, co
|
| static bool executeInsertImage(LocalFrame& frame, Event*, EditorCommandSource, const String& value)
|
| {
|
| ASSERT(frame.document());
|
| - RefPtrWillBeRawPtr<HTMLImageElement> image = HTMLImageElement::create(*frame.document());
|
| + RawPtr<HTMLImageElement> image = HTMLImageElement::create(*frame.document());
|
| if (!value.isEmpty())
|
| image->setSrc(value);
|
| return executeInsertElement(frame, image.release());
|
| @@ -628,7 +628,7 @@ static bool executeJustifyRight(LocalFrame& frame, Event*, EditorCommandSource s
|
|
|
| static bool executeMakeTextWritingDirectionLeftToRight(LocalFrame& frame, Event*, EditorCommandSource, const String&)
|
| {
|
| - RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
|
| + RawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
|
| style->setProperty(CSSPropertyUnicodeBidi, CSSValueIsolate);
|
| style->setProperty(CSSPropertyDirection, CSSValueLtr);
|
| frame.editor().applyStyle(style.get(), EditActionSetWritingDirection);
|
| @@ -637,7 +637,7 @@ static bool executeMakeTextWritingDirectionLeftToRight(LocalFrame& frame, Event*
|
|
|
| static bool executeMakeTextWritingDirectionNatural(LocalFrame& frame, Event*, EditorCommandSource, const String&)
|
| {
|
| - RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
|
| + RawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
|
| style->setProperty(CSSPropertyUnicodeBidi, CSSValueNormal);
|
| frame.editor().applyStyle(style.get(), EditActionSetWritingDirection);
|
| return true;
|
| @@ -645,7 +645,7 @@ static bool executeMakeTextWritingDirectionNatural(LocalFrame& frame, Event*, Ed
|
|
|
| static bool executeMakeTextWritingDirectionRightToLeft(LocalFrame& frame, Event*, EditorCommandSource, const String&)
|
| {
|
| - RefPtrWillBeRawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
|
| + RawPtr<MutableStylePropertySet> style = MutableStylePropertySet::create(HTMLQuirksMode);
|
| style->setProperty(CSSPropertyUnicodeBidi, CSSValueIsolate);
|
| style->setProperty(CSSPropertyDirection, CSSValueRtl);
|
| frame.editor().applyStyle(style.get(), EditActionSetWritingDirection);
|
| @@ -1103,7 +1103,7 @@ static bool executeSetMark(LocalFrame& frame, Event*, EditorCommandSource, const
|
|
|
| static bool executeStrikethrough(LocalFrame& frame, Event*, EditorCommandSource source, const String&)
|
| {
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> lineThrough = CSSPrimitiveValue::createIdentifier(CSSValueLineThrough);
|
| + RawPtr<CSSPrimitiveValue> lineThrough = CSSPrimitiveValue::createIdentifier(CSSValueLineThrough);
|
| return executeToggleStyleInList(frame, source, EditActionUnderline, CSSPropertyWebkitTextDecorationsInEffect, lineThrough.get());
|
| }
|
|
|
| @@ -1158,7 +1158,7 @@ static bool executeTranspose(LocalFrame& frame, Event*, EditorCommandSource, con
|
|
|
| static bool executeUnderline(LocalFrame& frame, Event*, EditorCommandSource source, const String&)
|
| {
|
| - RefPtrWillBeRawPtr<CSSPrimitiveValue> underline = CSSPrimitiveValue::createIdentifier(CSSValueUnderline);
|
| + RawPtr<CSSPrimitiveValue> underline = CSSPrimitiveValue::createIdentifier(CSSValueUnderline);
|
| return executeToggleStyleInList(frame, source, EditActionUnderline, CSSPropertyWebkitTextDecorationsInEffect, underline.get());
|
| }
|
|
|
| @@ -1756,7 +1756,7 @@ Editor::Command::Command()
|
| {
|
| }
|
|
|
| -Editor::Command::Command(const EditorInternalCommand* command, EditorCommandSource source, PassRefPtrWillBeRawPtr<LocalFrame> frame)
|
| +Editor::Command::Command(const EditorInternalCommand* command, EditorCommandSource source, RawPtr<LocalFrame> frame)
|
| : m_command(command)
|
| , m_source(source)
|
| , m_frame(command ? frame : nullptr)
|
|
|