mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-05 02:33:03 +00:00
LibWeb: Make Element::has_attribute take a StringView
It calls Element::get_attribute which takes a StringView. Ultimately, this should be taking a FlyString, but to help in porting away from DeprecatedString, just leave a FIXME for that for now.
This commit is contained in:
parent
52fccae654
commit
79f97da4b4
Notes:
sideshowbarker
2024-07-16 20:05:14 +09:00
Author: https://github.com/shannonbooth
Commit: 79f97da4b4
Pull-request: https://github.com/SerenityOS/serenity/pull/21174
Reviewed-by: https://github.com/awesomekling
5 changed files with 8 additions and 5 deletions
|
@ -164,9 +164,9 @@ String const& HTMLSelectElement::type() const
|
|||
Optional<ARIA::Role> HTMLSelectElement::default_role() const
|
||||
{
|
||||
// https://www.w3.org/TR/html-aria/#el-select-multiple-or-size-greater-1
|
||||
if (has_attribute("multiple"))
|
||||
if (has_attribute(AttributeNames::multiple))
|
||||
return ARIA::Role::listbox;
|
||||
if (has_attribute("size")) {
|
||||
if (has_attribute(AttributeNames::size)) {
|
||||
auto size_attribute = deprecated_attribute("size").to_int();
|
||||
if (size_attribute.has_value() && size_attribute.value() > 1)
|
||||
return ARIA::Role::listbox;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue