| Index: third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.h
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.h b/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.h
|
| index 97bf2e7eecf9413ae982660818df04c942c510ea..d5fa0eb879d785f7f9fbb968efb7b9e6793fcc83 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.h
|
| +++ b/third_party/WebKit/Source/core/editing/commands/ApplyStyleCommand.h
|
| @@ -48,21 +48,21 @@ public:
|
| enum EAddStyledElement { AddStyledElement, DoNotAddStyledElement };
|
| typedef bool (*IsInlineElementToRemoveFunction)(const Element*);
|
|
|
| - static PassRefPtrWillBeRawPtr<ApplyStyleCommand> create(Document& document, const EditingStyle* style, EditAction action = EditActionChangeAttributes, EPropertyLevel level = PropertyDefault)
|
| + static RawPtr<ApplyStyleCommand> create(Document& document, const EditingStyle* style, EditAction action = EditActionChangeAttributes, EPropertyLevel level = PropertyDefault)
|
| {
|
| - return adoptRefWillBeNoop(new ApplyStyleCommand(document, style, action, level));
|
| + return (new ApplyStyleCommand(document, style, action, level));
|
| }
|
| - static PassRefPtrWillBeRawPtr<ApplyStyleCommand> create(Document& document, const EditingStyle* style, const Position& start, const Position& end, EditAction action = EditActionChangeAttributes, EPropertyLevel level = PropertyDefault)
|
| + static RawPtr<ApplyStyleCommand> create(Document& document, const EditingStyle* style, const Position& start, const Position& end, EditAction action = EditActionChangeAttributes, EPropertyLevel level = PropertyDefault)
|
| {
|
| - return adoptRefWillBeNoop(new ApplyStyleCommand(document, style, start, end, action, level));
|
| + return (new ApplyStyleCommand(document, style, start, end, action, level));
|
| }
|
| - static PassRefPtrWillBeRawPtr<ApplyStyleCommand> create(PassRefPtrWillBeRawPtr<Element> element, bool removeOnly = false, EditAction action = EditActionChangeAttributes)
|
| + static RawPtr<ApplyStyleCommand> create(RawPtr<Element> element, bool removeOnly = false, EditAction action = EditActionChangeAttributes)
|
| {
|
| - return adoptRefWillBeNoop(new ApplyStyleCommand(element, removeOnly, action));
|
| + return (new ApplyStyleCommand(element, removeOnly, action));
|
| }
|
| - static PassRefPtrWillBeRawPtr<ApplyStyleCommand> create(Document& document, const EditingStyle* style, IsInlineElementToRemoveFunction isInlineElementToRemoveFunction, EditAction action = EditActionChangeAttributes)
|
| + static RawPtr<ApplyStyleCommand> create(Document& document, const EditingStyle* style, IsInlineElementToRemoveFunction isInlineElementToRemoveFunction, EditAction action = EditActionChangeAttributes)
|
| {
|
| - return adoptRefWillBeNoop(new ApplyStyleCommand(document, style, isInlineElementToRemoveFunction, action));
|
| + return (new ApplyStyleCommand(document, style, isInlineElementToRemoveFunction, action));
|
| }
|
|
|
| DECLARE_VIRTUAL_TRACE();
|
| @@ -70,7 +70,7 @@ public:
|
| private:
|
| ApplyStyleCommand(Document&, const EditingStyle*, EditAction, EPropertyLevel);
|
| ApplyStyleCommand(Document&, const EditingStyle*, const Position& start, const Position& end, EditAction, EPropertyLevel);
|
| - ApplyStyleCommand(PassRefPtrWillBeRawPtr<Element>, bool removeOnly, EditAction);
|
| + ApplyStyleCommand(RawPtr<Element>, bool removeOnly, EditAction);
|
| ApplyStyleCommand(Document&, const EditingStyle*, bool (*isInlineElementToRemove)(const Element*), EditAction);
|
|
|
| void doApply() override;
|
| @@ -79,8 +79,8 @@ private:
|
| // style-removal helpers
|
| bool isStyledInlineElementToRemove(Element*) const;
|
| bool shouldApplyInlineStyleToRun(EditingStyle*, Node* runStart, Node* pastEndNode);
|
| - void removeConflictingInlineStyleFromRun(EditingStyle*, RefPtrWillBeMember<Node>& runStart, RefPtrWillBeMember<Node>& runEnd, PassRefPtrWillBeRawPtr<Node> pastEndNode);
|
| - bool removeInlineStyleFromElement(EditingStyle*, PassRefPtrWillBeRawPtr<HTMLElement>, InlineStyleRemovalMode = RemoveIfNeeded, EditingStyle* extractedStyle = nullptr);
|
| + void removeConflictingInlineStyleFromRun(EditingStyle*, Member<Node>& runStart, Member<Node>& runEnd, RawPtr<Node> pastEndNode);
|
| + bool removeInlineStyleFromElement(EditingStyle*, RawPtr<HTMLElement>, InlineStyleRemovalMode = RemoveIfNeeded, EditingStyle* extractedStyle = nullptr);
|
| inline bool shouldRemoveInlineStyleFromElement(EditingStyle* style, HTMLElement* element) {return removeInlineStyleFromElement(style, element, RemoveNone);}
|
| void replaceWithSpanOrRemoveIfWithoutAttributes(HTMLElement*);
|
| bool removeImplicitlyStyledElement(EditingStyle*, HTMLElement*, InlineStyleRemovalMode, EditingStyle* extractedStyle);
|
| @@ -96,11 +96,11 @@ private:
|
| void applyRelativeFontStyleChange(EditingStyle*);
|
| void applyInlineStyle(EditingStyle*);
|
| void fixRangeAndApplyInlineStyle(EditingStyle*, const Position& start, const Position& end);
|
| - void applyInlineStyleToNodeRange(EditingStyle*, PassRefPtrWillBeRawPtr<Node> startNode, PassRefPtrWillBeRawPtr<Node> pastEndNode);
|
| + void applyInlineStyleToNodeRange(EditingStyle*, RawPtr<Node> startNode, RawPtr<Node> pastEndNode);
|
| void addBlockStyle(const StyleChange&, HTMLElement*);
|
| - void addInlineStyleIfNeeded(EditingStyle*, PassRefPtrWillBeRawPtr<Node> start, PassRefPtrWillBeRawPtr<Node> end, EAddStyledElement = AddStyledElement);
|
| - Position positionToComputeInlineStyleChange(PassRefPtrWillBeRawPtr<Node>, RefPtrWillBeMember<HTMLSpanElement>& dummyElement);
|
| - void applyInlineStyleChange(PassRefPtrWillBeRawPtr<Node> startNode, PassRefPtrWillBeRawPtr<Node> endNode, StyleChange&, EAddStyledElement);
|
| + void addInlineStyleIfNeeded(EditingStyle*, RawPtr<Node> start, RawPtr<Node> end, EAddStyledElement = AddStyledElement);
|
| + Position positionToComputeInlineStyleChange(RawPtr<Node>, Member<HTMLSpanElement>& dummyElement);
|
| + void applyInlineStyleChange(RawPtr<Node> startNode, RawPtr<Node> endNode, StyleChange&, EAddStyledElement);
|
| void splitTextAtStart(const Position& start, const Position& end);
|
| void splitTextAtEnd(const Position& start, const Position& end);
|
| void splitTextElementAtStart(const Position& start, const Position& end);
|
| @@ -111,7 +111,7 @@ private:
|
| bool mergeEndWithNextIfIdentical(const Position& start, const Position& end);
|
| void cleanupUnstyledAppleStyleSpans(ContainerNode* dummySpanAncestor);
|
|
|
| - void surroundNodeRangeWithElement(PassRefPtrWillBeRawPtr<Node> start, PassRefPtrWillBeRawPtr<Node> end, PassRefPtrWillBeRawPtr<Element>);
|
| + void surroundNodeRangeWithElement(RawPtr<Node> start, RawPtr<Node> end, RawPtr<Element>);
|
| float computedFontSize(Node*);
|
| void joinChildTextNodes(ContainerNode*, const Position& start, const Position& end);
|
|
|
| @@ -122,13 +122,13 @@ private:
|
| Position startPosition();
|
| Position endPosition();
|
|
|
| - RefPtrWillBeMember<EditingStyle> m_style;
|
| + Member<EditingStyle> m_style;
|
| EditAction m_editingAction;
|
| EPropertyLevel m_propertyLevel;
|
| Position m_start;
|
| Position m_end;
|
| bool m_useEndingSelection;
|
| - RefPtrWillBeMember<Element> m_styledInlineElement;
|
| + Member<Element> m_styledInlineElement;
|
| bool m_removeOnly;
|
| IsInlineElementToRemoveFunction m_isInlineElementToRemoveFunction;
|
| };
|
|
|