Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(643)

Unified Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 16ad1a2f026107be4cb1742a01bf859406ba13b0..944f82ce9c32f47a3d9048b169654cc9aa19fae2 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.h
@@ -42,7 +42,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;
@@ -62,12 +62,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;
};
@@ -94,63 +94,63 @@ protected:
//
// sugary-sweet convenience functions to help create and apply edit commands in composite commands
//
- void appendNode(PassRefPtrWillBeRawPtr<Node>, PassRefPtrWillBeRawPtr<ContainerNode> parent);
- void applyCommandToComposite(PassRefPtrWillBeRawPtr<EditCommand>);
- void applyCommandToComposite(PassRefPtrWillBeRawPtr<CompositeEditCommand>, const VisibleSelection&);
+ void appendNode(RawPtr<Node>, RawPtr<ContainerNode> parent);
+ void applyCommandToComposite(RawPtr<EditCommand>);
+ void applyCommandToComposite(RawPtr<CompositeEditCommand>, const VisibleSelection&);
void applyStyle(const EditingStyle*, EditAction = EditActionChangeAttributes);
void applyStyle(const EditingStyle*, const Position& start, const Position& end, EditAction = EditActionChangeAttributes);
- void applyStyledElement(PassRefPtrWillBeRawPtr<Element>);
- void removeStyledElement(PassRefPtrWillBeRawPtr<Element>);
+ void applyStyledElement(RawPtr<Element>);
+ void removeStyledElement(RawPtr<Element>);
void deleteSelection(bool smartDelete = false, bool mergeBlocksAfterDelete = true, bool expandForSpecialElements = true, bool sanitizeMarkup = true);
void deleteSelection(const VisibleSelection&, 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);
- void insertNodeAt(PassRefPtrWillBeRawPtr<Node>, const Position&);
- void insertNodeAtTabSpanPosition(PassRefPtrWillBeRawPtr<Node>, const Position&);
- void insertNodeBefore(PassRefPtrWillBeRawPtr<Node>, PassRefPtrWillBeRawPtr<Node> refChild, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable);
+ void insertNodeAfter(RawPtr<Node>, RawPtr<Node> refChild);
+ void insertNodeAt(RawPtr<Node>, const Position&);
+ void insertNodeAtTabSpanPosition(RawPtr<Node>, const Position&);
+ void insertNodeBefore(RawPtr<Node>, RawPtr<Node> refChild, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable);
void insertParagraphSeparator(bool useDefaultParagraphElement = false, bool pasteBlockqutoeIntoUnquotedArea = false);
- void insertTextIntoNode(PassRefPtrWillBeRawPtr<Text>, unsigned offset, const String& text);
- void mergeIdenticalElements(PassRefPtrWillBeRawPtr<Element>, PassRefPtrWillBeRawPtr<Element>);
+ void insertTextIntoNode(RawPtr<Text>, unsigned offset, const String& text);
+ void mergeIdenticalElements(RawPtr<Element>, RawPtr<Element>);
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);
- virtual void removeNode(PassRefPtrWillBeRawPtr<Node>, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable);
- HTMLSpanElement* replaceElementWithSpanPreservingChildrenAndAttributes(PassRefPtrWillBeRawPtr<HTMLElement>);
- void removeNodePreservingChildren(PassRefPtrWillBeRawPtr<Node>, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable);
- void removeNodeAndPruneAncestors(PassRefPtrWillBeRawPtr<Node>, Node* excludeNode = nullptr);
- void moveRemainingSiblingsToNewParent(Node*, Node* pastLastNodeToMove, PassRefPtrWillBeRawPtr<Element> prpNewParent);
+ void removeCSSProperty(RawPtr<Element>, CSSPropertyID);
+ void removeElementAttribute(RawPtr<Element>, const QualifiedName& attribute);
+ void removeChildrenInRange(RawPtr<Node>, unsigned from, unsigned to);
+ virtual void removeNode(RawPtr<Node>, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable);
+ HTMLSpanElement* replaceElementWithSpanPreservingChildrenAndAttributes(RawPtr<HTMLElement>);
+ void removeNodePreservingChildren(RawPtr<Node>, ShouldAssumeContentIsAlwaysEditable = DoNotAssumeContentIsAlwaysEditable);
+ void removeNodeAndPruneAncestors(RawPtr<Node>, Node* excludeNode = nullptr);
+ void moveRemainingSiblingsToNewParent(Node*, Node* pastLastNodeToMove, RawPtr<Element> prpNewParent);
void updatePositionForNodeRemovalPreservingChildren(Position&, Node&);
- void prune(PassRefPtrWillBeRawPtr<Node>, Node* excludeNode = nullptr);
- void replaceTextInNode(PassRefPtrWillBeRawPtr<Text>, unsigned offset, unsigned count, const String& replacementText);
+ void prune(RawPtr<Node>, 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>);
- PassRefPtrWillBeRawPtr<HTMLBRElement> insertBlockPlaceholder(const Position&);
- PassRefPtrWillBeRawPtr<HTMLBRElement> addBlockPlaceholderIfNeeded(Element*);
+ RawPtr<HTMLBRElement> appendBlockPlaceholder(RawPtr<Element>);
+ RawPtr<HTMLBRElement> insertBlockPlaceholder(const Position&);
+ RawPtr<HTMLBRElement> addBlockPlaceholderIfNeeded(Element*);
void removePlaceholderAt(const Position&);
- PassRefPtrWillBeRawPtr<HTMLElement> insertNewDefaultParagraphElementAt(const Position&);
+ RawPtr<HTMLElement> insertNewDefaultParagraphElementAt(const Position&);
- PassRefPtrWillBeRawPtr<HTMLElement> moveParagraphContentsToNewBlockIfNecessary(const Position&);
+ RawPtr<HTMLElement> moveParagraphContentsToNewBlockIfNecessary(const Position&);
void pushAnchorElementDown(Element*);
@@ -166,14 +166,14 @@ protected:
Position positionAvoidingSpecialElementBoundary(const Position&);
- 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());

Powered by Google App Engine
This is Rietveld 408576698