Bug 1637335 - Make MozEditableElement.editor flush frames if needed. r=smaug

URLBarInput relies on it being non-null when created, but that may not
happen if we construct frames lazily without this patch.

Differential Revision: https://phabricator.services.mozilla.com/D74891
This commit is contained in:
Emilio Cobos Álvarez
2020-05-12 22:32:18 +00:00
parent 78163a5dde
commit fa2644fb5c
6 changed files with 20 additions and 12 deletions

View File

@@ -214,6 +214,13 @@ bool HTMLTextAreaElement::ValueEquals(const nsAString& aValue) const {
return mState->ValueEquals(aValue);
}
nsIEditor* HTMLTextAreaElement::GetEditorForBindings() {
if (!GetPrimaryFrame()) {
GetPrimaryFrame(FlushType::Frames);
}
return GetTextEditor();
}
TextEditor* HTMLTextAreaElement::GetTextEditor() {
MOZ_ASSERT(mState);
return mState->GetTextEditor();