Bug 1729358 - Part 1: Move FocusState to TextControlElement; r=smaug

And convert FocusTristate to enum class.

Differential Revision: https://phabricator.services.mozilla.com/D124693
This commit is contained in:
Edgar Chen
2021-09-07 09:47:09 +00:00
parent f68ccfbe70
commit cd1f327b86
6 changed files with 26 additions and 24 deletions

View File

@@ -3023,7 +3023,7 @@ void HTMLInputElement::Select() {
TextControlState* state = GetEditorState();
MOZ_ASSERT(state, "Single line text controls are expected to have a state");
if (FocusState() != eUnfocusable) {
if (FocusState() != FocusTristate::eUnfocusable) {
RefPtr<nsFrameSelection> fs = state->GetConstFrameSelection();
if (fs && fs->MouseDownRecorded()) {
// This means that we're being called while the frame selection has a