Bug 1342197 part 4. Move GetSelectionRange from nsTextControlFrame to the editor state. r=ehsan

At this point, all this method does is ensure editor initialization and then ask
the editor state for various information.  Let's cut out the middleman.

MozReview-Commit-ID: p491umScJO
This commit is contained in:
Boris Zbarsky
2017-02-28 12:41:37 -05:00
parent d5ebea2922
commit f7b36aa0e6
10 changed files with 151 additions and 103 deletions

View File

@@ -109,6 +109,9 @@ public:
NS_IMETHOD_(void) InitializeKeyboardEventListeners() override;
NS_IMETHOD_(void) OnValueChanged(bool aNotify, bool aWasInteractiveUserChange) override;
NS_IMETHOD_(bool) HasCachedSelection() override;
NS_IMETHOD GetSelectionRange(int32_t* aSelectionStart,
int32_t* aSelectionEnd) override;
// nsIContent
virtual nsresult BindToTree(nsIDocument* aDocument, nsIContent* aParent,
@@ -347,8 +350,6 @@ protected:
*/
nsresult SetValueInternal(const nsAString& aValue, uint32_t aFlags);
nsresult GetSelectionRange(int32_t* aSelectionStart, int32_t* aSelectionEnd);
/**
* Common method to call from the various mutation observer methods.
* aContent is a content node that's either the one that changed or its