Bug 1154336 - Convert nsTextEditorState::mRestoringSelection into a strong reference; r=baku

This commit is contained in:
Ehsan Akhgari 2015-04-14 12:26:56 -04:00
Родитель 9f353d5140
Коммит e7830328c1
2 изменённых файлов: 8 добавлений и 3 удалений

Просмотреть файл

@ -977,7 +977,6 @@ nsTextInputListener::UpdateTextInputCommands(const nsAString& commandsToUpdate,
nsTextEditorState::nsTextEditorState(nsITextControlElement* aOwningElement)
: mTextCtrlElement(aOwningElement),
mRestoringSelection(nullptr),
mBoundFrame(nullptr),
mEverInited(false),
mEditorInitialized(false),
@ -1452,6 +1451,12 @@ nsTextEditorState::PrepareEditor(const nsAString *aValue)
return rv;
}
void
nsTextEditorState::FinishedRestoringSelection()
{
mRestoringSelection = nullptr;
}
bool
nsTextEditorState::IsSelectionCached() const
{

Просмотреть файл

@ -239,7 +239,7 @@ private:
nsresult InitializeRootNode();
void FinishedRestoringSelection() { mRestoringSelection = nullptr; }
void FinishedRestoringSelection();
mozilla::dom::HTMLInputElement* GetParentNumberControl(nsFrame* aFrame) const;
@ -271,7 +271,7 @@ private:
nsITextControlElement* const mTextCtrlElement;
nsRefPtr<nsTextInputSelectionImpl> mSelCon;
RestoreSelectionState* mRestoringSelection;
nsRefPtr<RestoreSelectionState> mRestoringSelection;
nsCOMPtr<nsIEditor> mEditor;
nsCOMPtr<mozilla::dom::Element> mRootNode;
nsCOMPtr<mozilla::dom::Element> mPlaceholderDiv;