| Index: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
|
| diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
|
| index d3875cc619e55a54eb0d3e5ed8aa3764f0a590ae..b3a54e0a04590088469dc4e08b59cfaf7204d4d1 100644
|
| --- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
|
| +++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
|
| @@ -43,7 +43,7 @@ class Text;
|
|
|
| class EditCommandComposition final : public UndoStep {
|
| public:
|
| - static PassRefPtrWillBeRawPtr<EditCommandComposition> create(Document*, const VisibleSelection&, const VisibleSelection&, EditAction);
|
| + static RawPtr<EditCommandComposition> create(Document*, const VisibleSelection&, const VisibleSelection&, EditAction);
|
|
|
| bool belongsTo(const LocalFrame&) const override;
|
| void unapply() override;
|
| @@ -63,12 +63,12 @@ public:
|
| private:
|
| EditCommandComposition(Document*, const VisibleSelection& startingSelection, const VisibleSelection& endingSelection, EditAction);
|
|
|
| - RefPtrWillBeMember<Document> m_document;
|
| + Member<Document> m_document;
|
| VisibleSelection m_startingSelection;
|
| VisibleSelection m_endingSelection;
|
| - WillBeHeapVector<RefPtrWillBeMember<SimpleEditCommand>> m_commands;
|
| - RefPtrWillBeMember<Element> m_startingRootEditableElement;
|
| - RefPtrWillBeMember<Element> m_endingRootEditableElement;
|
| + HeapVector<Member<SimpleEditCommand>> m_commands;
|
| + Member<Element> m_startingRootEditableElement;
|
| + Member<Element> m_endingRootEditableElement;
|
| EditAction m_editAction;
|
| };
|
|
|
| @@ -96,63 +96,63 @@ protected:
|
| //
|
| // sugary-sweet convenience functions to help create and apply edit commands in composite commands
|
| //
|
| - void appendNode(PassRefPtrWillBeRawPtr<Node>, PassRefPtrWillBeRawPtr<ContainerNode> parent, EditingState*);
|
| - void applyCommandToComposite(PassRefPtrWillBeRawPtr<EditCommand>, EditingState*);
|
| - void applyCommandToComposite(PassRefPtrWillBeRawPtr<CompositeEditCommand>, const VisibleSelection&, EditingState*);
|
| + void appendNode(RawPtr<Node>, RawPtr<ContainerNode> parent, EditingState*);
|
| + void applyCommandToComposite(RawPtr<EditCommand>, EditingState*);
|
| + void applyCommandToComposite(RawPtr<CompositeEditCommand>, const VisibleSelection&, EditingState*);
|
| void applyStyle(const EditingStyle*, EditingState*);
|
| void applyStyle(const EditingStyle*, const Position& start, const Position& end, EditingState*);
|
| - void applyStyledElement(PassRefPtrWillBeRawPtr<Element>, EditingState*);
|
| - void removeStyledElement(PassRefPtrWillBeRawPtr<Element>, EditingState*);
|
| + void applyStyledElement(RawPtr<Element>, EditingState*);
|
| + void removeStyledElement(RawPtr<Element>, EditingState*);
|
| void deleteSelection(EditingState*, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool expandForSpecialElements = true, bool sanitizeMarkup = true);
|
| void deleteSelection(const VisibleSelection&, EditingState*, bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool expandForSpecialElements = true, bool sanitizeMarkup = true);
|
| - virtual void deleteTextFromNode(PassRefPtrWillBeRawPtr<Text>, unsigned offset, unsigned count);
|
| + virtual void deleteTextFromNode(RawPtr<Text>, unsigned offset, unsigned count);
|
| bool isRemovableBlock(const Node*);
|
| - void insertNodeAfter(PassRefPtrWillBeRawPtr<Node>, PassRefPtrWillBeRawPtr<Node> refChild, EditingState*);
|
| - void insertNodeAt(PassRefPtrWillBeRawPtr<Node>, const Position&, EditingState*);
|
| - void insertNodeAtTabSpanPosition(PassRefPtrWillBeRawPtr<Node>, const Position&, EditingState*);
|
| - void insertNodeBefore(PassRefPtrWillBeRawPtr<Node>, PassRefPtrWillBeRawPtr<Node> refChild, EditingState*, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable);
|
| + void insertNodeAfter(RawPtr<Node>, RawPtr<Node> refChild, EditingState*);
|
| + void insertNodeAt(RawPtr<Node>, const Position&, EditingState*);
|
| + void insertNodeAtTabSpanPosition(RawPtr<Node>, const Position&, EditingState*);
|
| + void insertNodeBefore(RawPtr<Node>, RawPtr<Node> refChild, EditingState*, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable);
|
| void insertParagraphSeparator(EditingState*, bool useDefaultParagraphElement = false, bool pasteBlockqutoeIntoUnquotedArea = false);
|
| - void insertTextIntoNode(PassRefPtrWillBeRawPtr<Text>, unsigned offset, const String& text);
|
| - void mergeIdenticalElements(PassRefPtrWillBeRawPtr<Element>, PassRefPtrWillBeRawPtr<Element>, EditingState*);
|
| + void insertTextIntoNode(RawPtr<Text>, unsigned offset, const String& text);
|
| + void mergeIdenticalElements(RawPtr<Element>, RawPtr<Element>, EditingState*);
|
| void rebalanceWhitespace();
|
| void rebalanceWhitespaceAt(const Position&);
|
| - void rebalanceWhitespaceOnTextSubstring(PassRefPtrWillBeRawPtr<Text>, int startOffset, int endOffset);
|
| + void rebalanceWhitespaceOnTextSubstring(RawPtr<Text>, int startOffset, int endOffset);
|
| void prepareWhitespaceAtPositionForSplit(Position&);
|
| void replaceCollapsibleWhitespaceWithNonBreakingSpaceIfNeeded(const VisiblePosition&);
|
| bool canRebalance(const Position&) const;
|
| bool shouldRebalanceLeadingWhitespaceFor(const String&) const;
|
| - void removeCSSProperty(PassRefPtrWillBeRawPtr<Element>, CSSPropertyID);
|
| - void removeElementAttribute(PassRefPtrWillBeRawPtr<Element>, const QualifiedName& attribute);
|
| - void removeChildrenInRange(PassRefPtrWillBeRawPtr<Node>, unsigned from, unsigned to, EditingState*);
|
| - virtual void removeNode(PassRefPtrWillBeRawPtr<Node>, EditingState*, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable);
|
| - HTMLSpanElement* replaceElementWithSpanPreservingChildrenAndAttributes(PassRefPtrWillBeRawPtr<HTMLElement>);
|
| - void removeNodePreservingChildren(PassRefPtrWillBeRawPtr<Node>, EditingState*, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable);
|
| - void removeNodeAndPruneAncestors(PassRefPtrWillBeRawPtr<Node>, EditingState*, Node* excludeNode = nullptr);
|
| - void moveRemainingSiblingsToNewParent(Node*, Node* pastLastNodeToMove, PassRefPtrWillBeRawPtr<Element> prpNewParent, EditingState*);
|
| + void removeCSSProperty(RawPtr<Element>, CSSPropertyID);
|
| + void removeElementAttribute(RawPtr<Element>, const QualifiedName& attribute);
|
| + void removeChildrenInRange(RawPtr<Node>, unsigned from, unsigned to, EditingState*);
|
| + virtual void removeNode(RawPtr<Node>, EditingState*, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable);
|
| + HTMLSpanElement* replaceElementWithSpanPreservingChildrenAndAttributes(RawPtr<HTMLElement>);
|
| + void removeNodePreservingChildren(RawPtr<Node>, EditingState*, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable);
|
| + void removeNodeAndPruneAncestors(RawPtr<Node>, EditingState*, Node* excludeNode = nullptr);
|
| + void moveRemainingSiblingsToNewParent(Node*, Node* pastLastNodeToMove, RawPtr<Element> prpNewParent, EditingState*);
|
| void updatePositionForNodeRemovalPreservingChildren(Position&, Node&);
|
| - void prune(PassRefPtrWillBeRawPtr<Node>, EditingState*, Node* excludeNode = nullptr);
|
| - void replaceTextInNode(PassRefPtrWillBeRawPtr<Text>, unsigned offset, unsigned count, const String& replacementText);
|
| + void prune(RawPtr<Node>, EditingState*, Node* excludeNode = nullptr);
|
| + void replaceTextInNode(RawPtr<Text>, unsigned offset, unsigned count, const String& replacementText);
|
| Position replaceSelectedTextInNode(const String&);
|
| - void replaceTextInNodePreservingMarkers(PassRefPtrWillBeRawPtr<Text>, unsigned offset, unsigned count, const String& replacementText);
|
| + void replaceTextInNodePreservingMarkers(RawPtr<Text>, unsigned offset, unsigned count, const String& replacementText);
|
| Position positionOutsideTabSpan(const Position&);
|
| - void setNodeAttribute(PassRefPtrWillBeRawPtr<Element>, const QualifiedName& attribute, const AtomicString& value);
|
| - void splitElement(PassRefPtrWillBeRawPtr<Element>, PassRefPtrWillBeRawPtr<Node> atChild);
|
| - void splitTextNode(PassRefPtrWillBeRawPtr<Text>, unsigned offset);
|
| - void splitTextNodeContainingElement(PassRefPtrWillBeRawPtr<Text>, unsigned offset);
|
| - void wrapContentsInDummySpan(PassRefPtrWillBeRawPtr<Element>);
|
| + void setNodeAttribute(RawPtr<Element>, const QualifiedName& attribute, const AtomicString& value);
|
| + void splitElement(RawPtr<Element>, RawPtr<Node> atChild);
|
| + void splitTextNode(RawPtr<Text>, unsigned offset);
|
| + void splitTextNodeContainingElement(RawPtr<Text>, unsigned offset);
|
| + void wrapContentsInDummySpan(RawPtr<Element>);
|
|
|
| - void deleteInsignificantText(PassRefPtrWillBeRawPtr<Text>, unsigned start, unsigned end);
|
| + void deleteInsignificantText(RawPtr<Text>, unsigned start, unsigned end);
|
| void deleteInsignificantText(const Position& start, const Position& end);
|
| void deleteInsignificantTextDownstream(const Position&);
|
|
|
| - PassRefPtrWillBeRawPtr<HTMLBRElement> appendBlockPlaceholder(PassRefPtrWillBeRawPtr<Element>, EditingState*);
|
| - PassRefPtrWillBeRawPtr<HTMLBRElement> insertBlockPlaceholder(const Position&, EditingState*);
|
| - PassRefPtrWillBeRawPtr<HTMLBRElement> addBlockPlaceholderIfNeeded(Element*, EditingState*);
|
| + RawPtr<HTMLBRElement> appendBlockPlaceholder(RawPtr<Element>, EditingState*);
|
| + RawPtr<HTMLBRElement> insertBlockPlaceholder(const Position&, EditingState*);
|
| + RawPtr<HTMLBRElement> addBlockPlaceholderIfNeeded(Element*, EditingState*);
|
| void removePlaceholderAt(const Position&);
|
|
|
| - PassRefPtrWillBeRawPtr<HTMLElement> insertNewDefaultParagraphElementAt(const Position&, EditingState*);
|
| + RawPtr<HTMLElement> insertNewDefaultParagraphElementAt(const Position&, EditingState*);
|
|
|
| - PassRefPtrWillBeRawPtr<HTMLElement> moveParagraphContentsToNewBlockIfNecessary(const Position&, EditingState*);
|
| + RawPtr<HTMLElement> moveParagraphContentsToNewBlockIfNecessary(const Position&, EditingState*);
|
|
|
| void pushAnchorElementDown(Element*, EditingState*);
|
|
|
| @@ -168,14 +168,14 @@ protected:
|
|
|
| Position positionAvoidingSpecialElementBoundary(const Position&, EditingState*);
|
|
|
| - PassRefPtrWillBeRawPtr<Node> splitTreeToNode(Node*, Node*, bool splitAncestor = false);
|
| + RawPtr<Node> splitTreeToNode(Node*, Node*, bool splitAncestor = false);
|
|
|
| - WillBeHeapVector<RefPtrWillBeMember<EditCommand>> m_commands;
|
| + HeapVector<Member<EditCommand>> m_commands;
|
|
|
| private:
|
| bool isCompositeEditCommand() const final { return true; }
|
|
|
| - RefPtrWillBeMember<EditCommandComposition> m_composition;
|
| + Member<EditCommandComposition> m_composition;
|
| };
|
|
|
| DEFINE_TYPE_CASTS(CompositeEditCommand, EditCommand, command, command->isCompositeEditCommand(), command.isCompositeEditCommand());
|
|
|