diff options
Diffstat (limited to 'chromium/third_party/WebKit/Source/core/editing/InsertParagraphSeparatorCommand.h')
-rw-r--r-- | chromium/third_party/WebKit/Source/core/editing/InsertParagraphSeparatorCommand.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/chromium/third_party/WebKit/Source/core/editing/InsertParagraphSeparatorCommand.h b/chromium/third_party/WebKit/Source/core/editing/InsertParagraphSeparatorCommand.h index 57f32b3292c..9eb51922ac4 100644 --- a/chromium/third_party/WebKit/Source/core/editing/InsertParagraphSeparatorCommand.h +++ b/chromium/third_party/WebKit/Source/core/editing/InsertParagraphSeparatorCommand.h @@ -32,28 +32,30 @@ namespace WebCore { class EditingStyle; -class InsertParagraphSeparatorCommand : public CompositeEditCommand { +class InsertParagraphSeparatorCommand FINAL : public CompositeEditCommand { public: - static PassRefPtr<InsertParagraphSeparatorCommand> create(Document& document, bool useDefaultParagraphElement = false, bool pasteBlockqutoeIntoUnquotedArea = false) + static PassRefPtrWillBeRawPtr<InsertParagraphSeparatorCommand> create(Document& document, bool useDefaultParagraphElement = false, bool pasteBlockqutoeIntoUnquotedArea = false) { - return adoptRef(new InsertParagraphSeparatorCommand(document, useDefaultParagraphElement, pasteBlockqutoeIntoUnquotedArea)); + return adoptRefWillBeNoop(new InsertParagraphSeparatorCommand(document, useDefaultParagraphElement, pasteBlockqutoeIntoUnquotedArea)); } + virtual void trace(Visitor*) OVERRIDE; + private: InsertParagraphSeparatorCommand(Document&, bool useDefaultParagraphElement, bool pasteBlockqutoeIntoUnquotedArea); - virtual void doApply(); + virtual void doApply() OVERRIDE; void calculateStyleBeforeInsertion(const Position&); void applyStyleAfterInsertion(Node* originalEnclosingBlock); - void getAncestorsInsideBlock(const Node* insertionNode, Element* outerBlock, Vector<RefPtr<Element> >& ancestors); - PassRefPtr<Element> cloneHierarchyUnderNewBlock(const Vector<RefPtr<Element> >& ancestors, PassRefPtr<Element> blockToInsert); + void getAncestorsInsideBlock(const Node* insertionNode, Element* outerBlock, WillBeHeapVector<RefPtrWillBeMember<Element> >& ancestors); + PassRefPtrWillBeRawPtr<Element> cloneHierarchyUnderNewBlock(const WillBeHeapVector<RefPtrWillBeMember<Element> >& ancestors, PassRefPtrWillBeRawPtr<Element> blockToInsert); bool shouldUseDefaultParagraphElement(Node*) const; - virtual bool preservesTypingStyle() const; + virtual bool preservesTypingStyle() const OVERRIDE; - RefPtr<EditingStyle> m_style; + RefPtrWillBeMember<EditingStyle> m_style; bool m_mustUseDefaultParagraphElement; bool m_pasteBlockqutoeIntoUnquotedArea; |