@@ -183,14 +183,14 @@ void TextFieldInputType::setValue(const String& sanitizedValue, bool valueChange
183
183
184
184
void TextFieldInputType::handleClickEvent (MouseEvent&)
185
185
{
186
- if (element ()->focused () && element ()->list ())
186
+ if (element ()->focused () && element ()->hasDataList ())
187
187
displaySuggestions (DataListSuggestionActivationType::ControlClicked);
188
188
}
189
189
190
190
void TextFieldInputType::showPicker ()
191
191
{
192
192
#if !PLATFORM(IOS_FAMILY)
193
- if (element ()->list ())
193
+ if (element ()->hasDataList ())
194
194
displaySuggestions (DataListSuggestionActivationType::ControlClicked);
195
195
#endif
196
196
}
@@ -334,7 +334,7 @@ void TextFieldInputType::createShadowSubtree()
334
334
bool shouldHaveSpinButton = this ->shouldHaveSpinButton ();
335
335
bool shouldHaveCapsLockIndicator = this ->shouldHaveCapsLockIndicator ();
336
336
bool shouldDrawAutoFillButton = this ->shouldDrawAutoFillButton ();
337
- bool hasDataList = element ()->list ();
337
+ bool hasDataList = element ()->hasDataList ();
338
338
bool createsContainer = shouldHaveSpinButton || shouldHaveCapsLockIndicator || shouldDrawAutoFillButton || hasDataList || needsContainer ();
339
339
340
340
Ref innerText = TextControlInnerTextElement::create (document, element ()->isInnerTextElementEditable ());
@@ -698,7 +698,7 @@ void TextFieldInputType::didSetValueByUserEdit()
698
698
return ;
699
699
if (RefPtr frame = element ()->document ().frame ())
700
700
frame->editor ().textDidChangeInTextField (*element ());
701
- if (element ()->list ())
701
+ if (element ()->hasDataList ())
702
702
displaySuggestions (DataListSuggestionActivationType::TextChanged);
703
703
}
704
704
@@ -897,7 +897,7 @@ void TextFieldInputType::dataListMayHaveChanged()
897
897
if (!element ())
898
898
return ;
899
899
m_dataListDropdownIndicator->setInlineStyleProperty (CSSPropertyDisplay, element ()->list () ? CSSValueBlock : CSSValueNone, IsImportant::Yes);
900
- if (element ()->list () && element ()->focused ())
900
+ if (element ()->hasDataList () && element ()->focused ())
901
901
displaySuggestions (DataListSuggestionActivationType::DataListMayHaveChanged);
902
902
}
903
903
@@ -909,7 +909,7 @@ HTMLElement* TextFieldInputType::dataListButtonElement() const
909
909
void TextFieldInputType::dataListButtonElementWasClicked ()
910
910
{
911
911
Ref<HTMLInputElement> input (*element ());
912
- if (input->list ()) {
912
+ if (input->hasDataList ()) {
913
913
m_isFocusingWithDataListDropdown = true ;
914
914
unsigned max = visibleValue ().length ();
915
915
input->setSelectionRange (max, max);
0 commit comments