Bug 1343886. Handle input or textarea elements having a non-textcontrol frame better. r=ehsan

MozReview-Commit-ID: FRzdvTLMAID
This commit is contained in:
Boris Zbarsky
2017-03-06 10:29:38 -05:00
parent 0a51742afe
commit ae27c86ae2
7 changed files with 27 additions and 18 deletions

View File

@@ -6615,14 +6615,6 @@ HTMLInputElement::GetSelectionRange(int32_t* aSelectionStart,
if (IsInComposedDoc()) {
GetComposedDoc()->FlushPendingNotifications(FlushType::Frames);
}
if (!GetPrimaryFrame()) {
// Can we return a selection range anyway here, now that it lives on our
// state? In fact, could we make this behave more like
// GetSelectionDirection, in the sense of working even when we have no
// frame, by just delegating entirely to mState? And then, do we really
// need the flush?
return NS_ERROR_FAILURE;
}
nsTextEditorState* state = GetEditorState();
if (!state) {