Chromium Code Reviews| Index: third_party/WebKit/Source/core/editing/FrameSelection.h |
| diff --git a/third_party/WebKit/Source/core/editing/FrameSelection.h b/third_party/WebKit/Source/core/editing/FrameSelection.h |
| index c42ffccd2a9c27dfead8acfa945598d4a8bc8194..1bce8b9a3a778d2cd9409bdb69af3616755a6d39 100644 |
| --- a/third_party/WebKit/Source/core/editing/FrameSelection.h |
| +++ b/third_party/WebKit/Source/core/editing/FrameSelection.h |
| @@ -93,6 +93,9 @@ public: |
| return static_cast<EUserTriggered>(options & UserTriggered); |
| } |
| + bool isAvailable() const { return m_document; } |
| + const Document& document() const; |
|
tkent
2016/06/07 23:41:59
We should add a comment like |This function must n
|
| + Document& document(); |
| LocalFrame* frame() const { return m_frame; } |
| Element* rootEditableElement() const { return selection().rootEditableElement(); } |
| Element* rootEditableElementOrDocumentElement() const; |
| @@ -121,7 +124,6 @@ public: |
| bool setSelectedRange(const EphemeralRange&, TextAffinity, SelectionDirectionalMode = SelectionDirectionalMode::NonDirectional, FrameSelection::SetSelectionOptions = CloseTyping | ClearTypingStyle); |
| void selectAll(); |
| void clear(); |
| - void prepareForDestruction(); |
| // Call this after doing user-triggered selections to make it easy to delete the frame you entirely selected. |
| void selectFrameElementInParentIfFullySelected(); |
| @@ -168,6 +170,8 @@ public: |
| // the return value from underlying VisibleSelection's firstRange() is returned. |
| Range* firstRange() const; |
| + void documentAttached(Document*); |
| + void documentDetached(const Document&); |
| void nodeWillBeRemoved(Node&); |
| void dataWillChange(const CharacterData& node); |
| void didUpdateCharacterData(CharacterData*, unsigned offset, unsigned oldLength, unsigned newLength); |
| @@ -280,6 +284,7 @@ private: |
| bool shouldPaintCaretForTesting() const; |
| bool isPreviousCaretDirtyForTesting() const; |
| + Member<Document> m_document; |
| Member<LocalFrame> m_frame; |
| const Member<PendingSelection> m_pendingSelection; |
| const Member<SelectionEditor> m_selectionEditor; |