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

@@ -1553,11 +1553,13 @@ nsresult
nsTextEditorState::GetSelectionRange(int32_t* aSelectionStart,
int32_t* aSelectionEnd)
{
MOZ_ASSERT(mBoundFrame,
"Caller didn't flush out frames and check for a frame?");
MOZ_ASSERT(aSelectionStart);
MOZ_ASSERT(aSelectionEnd);
if (!mBoundFrame) {
return NS_ERROR_FAILURE;
}
// It's not clear that all the checks here are needed, but the previous
// version of this code in nsTextControlFrame was doing them, so we keep them
// for now.