1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 11:37:44 +00:00

LibWeb: Port Element::set_attribute_value from DeprecatedString

Removing the DeprecatedString / DeprecatedFlyString overloads of this
function.
This commit is contained in:
Shannon Booth 2023-11-05 12:57:54 +13:00 committed by Andreas Kling
parent 96463e947a
commit 673e3ec57d
5 changed files with 60 additions and 72 deletions

View file

@ -105,12 +105,7 @@ public:
DeprecatedString deprecated_get_attribute(StringView name) const;
DeprecatedString get_attribute_value(StringView local_name, DeprecatedFlyString const& namespace_ = {}) const;
WebIDL::ExceptionOr<void> set_attribute(DeprecatedFlyString const& name, DeprecatedString const& value);
WebIDL::ExceptionOr<void> set_attribute(DeprecatedFlyString const& name, String const& value);
WebIDL::ExceptionOr<void> set_attribute(FlyString const& name, String const& value)
{
return set_attribute(name.to_deprecated_fly_string(), value);
}
WebIDL::ExceptionOr<void> set_attribute(FlyString const& name, String const& value);
// FIXME: This should be taking an Optional<FlyString>
WebIDL::ExceptionOr<void> set_attribute_ns(Optional<String> const& namespace_, FlyString const& qualified_name, FlyString const& value);
@ -271,55 +266,55 @@ public:
}
// https://www.w3.org/TR/wai-aria-1.2/#accessibilityroleandproperties-correspondence
ARIA_IMPL(role, "role"sv);
ARIA_IMPL(aria_active_descendant, "aria-activedescendant"sv);
ARIA_IMPL(aria_atomic, "aria-atomic"sv);
ARIA_IMPL(aria_auto_complete, "aria-autocomplete"sv);
ARIA_IMPL(aria_busy, "aria-busy"sv);
ARIA_IMPL(aria_checked, "aria-checked"sv);
ARIA_IMPL(aria_col_count, "aria-colcount"sv);
ARIA_IMPL(aria_col_index, "aria-colindex"sv);
ARIA_IMPL(aria_col_span, "aria-colspan"sv);
ARIA_IMPL(aria_controls, "aria-controls"sv);
ARIA_IMPL(aria_current, "aria-current"sv);
ARIA_IMPL(aria_described_by, "aria-describedby"sv);
ARIA_IMPL(aria_details, "aria-details"sv);
ARIA_IMPL(aria_drop_effect, "aria-dropeffect"sv);
ARIA_IMPL(aria_error_message, "aria-errormessage"sv);
ARIA_IMPL(aria_disabled, "aria-disabled"sv);
ARIA_IMPL(aria_expanded, "aria-expanded"sv);
ARIA_IMPL(aria_flow_to, "aria-flowto"sv);
ARIA_IMPL(aria_grabbed, "aria-grabbed"sv);
ARIA_IMPL(aria_has_popup, "aria-haspopup"sv);
ARIA_IMPL(aria_hidden, "aria-hidden"sv);
ARIA_IMPL(aria_invalid, "aria-invalid"sv);
ARIA_IMPL(aria_key_shortcuts, "aria-keyshortcuts"sv);
ARIA_IMPL(aria_label, "aria-label"sv);
ARIA_IMPL(aria_labelled_by, "aria-labelledby"sv);
ARIA_IMPL(aria_level, "aria-level"sv);
ARIA_IMPL(aria_live, "aria-live"sv);
ARIA_IMPL(aria_modal, "aria-modal"sv);
ARIA_IMPL(aria_multi_line, "aria-multiline"sv);
ARIA_IMPL(aria_multi_selectable, "aria-multiselectable"sv);
ARIA_IMPL(aria_orientation, "aria-orientation"sv);
ARIA_IMPL(aria_owns, "aria-owns"sv);
ARIA_IMPL(aria_placeholder, "aria-placeholder"sv);
ARIA_IMPL(aria_pos_in_set, "aria-posinset"sv);
ARIA_IMPL(aria_pressed, "aria-pressed"sv);
ARIA_IMPL(aria_read_only, "aria-readonly"sv);
ARIA_IMPL(aria_relevant, "aria-relevant"sv);
ARIA_IMPL(aria_required, "aria-required"sv);
ARIA_IMPL(aria_role_description, "aria-roledescription"sv);
ARIA_IMPL(aria_row_count, "aria-rowcount"sv);
ARIA_IMPL(aria_row_index, "aria-rowindex"sv);
ARIA_IMPL(aria_row_span, "aria-rowspan"sv);
ARIA_IMPL(aria_selected, "aria-selected"sv);
ARIA_IMPL(aria_set_size, "aria-setsize"sv);
ARIA_IMPL(aria_sort, "aria-sort"sv);
ARIA_IMPL(aria_value_max, "aria-valuemax"sv);
ARIA_IMPL(aria_value_min, "aria-valuemin"sv);
ARIA_IMPL(aria_value_now, "aria-valuenow"sv);
ARIA_IMPL(aria_value_text, "aria-valuetext"sv);
ARIA_IMPL(role, "role"_fly_string);
ARIA_IMPL(aria_active_descendant, "aria-activedescendant"_fly_string);
ARIA_IMPL(aria_atomic, "aria-atomic"_fly_string);
ARIA_IMPL(aria_auto_complete, "aria-autocomplete"_fly_string);
ARIA_IMPL(aria_busy, "aria-busy"_fly_string);
ARIA_IMPL(aria_checked, "aria-checked"_fly_string);
ARIA_IMPL(aria_col_count, "aria-colcount"_fly_string);
ARIA_IMPL(aria_col_index, "aria-colindex"_fly_string);
ARIA_IMPL(aria_col_span, "aria-colspan"_fly_string);
ARIA_IMPL(aria_controls, "aria-controls"_fly_string);
ARIA_IMPL(aria_current, "aria-current"_fly_string);
ARIA_IMPL(aria_described_by, "aria-describedby"_fly_string);
ARIA_IMPL(aria_details, "aria-details"_fly_string);
ARIA_IMPL(aria_drop_effect, "aria-dropeffect"_fly_string);
ARIA_IMPL(aria_error_message, "aria-errormessage"_fly_string);
ARIA_IMPL(aria_disabled, "aria-disabled"_fly_string);
ARIA_IMPL(aria_expanded, "aria-expanded"_fly_string);
ARIA_IMPL(aria_flow_to, "aria-flowto"_fly_string);
ARIA_IMPL(aria_grabbed, "aria-grabbed"_fly_string);
ARIA_IMPL(aria_has_popup, "aria-haspopup"_fly_string);
ARIA_IMPL(aria_hidden, "aria-hidden"_fly_string);
ARIA_IMPL(aria_invalid, "aria-invalid"_fly_string);
ARIA_IMPL(aria_key_shortcuts, "aria-keyshortcuts"_fly_string);
ARIA_IMPL(aria_label, "aria-label"_fly_string);
ARIA_IMPL(aria_labelled_by, "aria-labelledby"_fly_string);
ARIA_IMPL(aria_level, "aria-level"_fly_string);
ARIA_IMPL(aria_live, "aria-live"_fly_string);
ARIA_IMPL(aria_modal, "aria-modal"_fly_string);
ARIA_IMPL(aria_multi_line, "aria-multiline"_fly_string);
ARIA_IMPL(aria_multi_selectable, "aria-multiselectable"_fly_string);
ARIA_IMPL(aria_orientation, "aria-orientation"_fly_string);
ARIA_IMPL(aria_owns, "aria-owns"_fly_string);
ARIA_IMPL(aria_placeholder, "aria-placeholder"_fly_string);
ARIA_IMPL(aria_pos_in_set, "aria-posinset"_fly_string);
ARIA_IMPL(aria_pressed, "aria-pressed"_fly_string);
ARIA_IMPL(aria_read_only, "aria-readonly"_fly_string);
ARIA_IMPL(aria_relevant, "aria-relevant"_fly_string);
ARIA_IMPL(aria_required, "aria-required"_fly_string);
ARIA_IMPL(aria_role_description, "aria-roledescription"_fly_string);
ARIA_IMPL(aria_row_count, "aria-rowcount"_fly_string);
ARIA_IMPL(aria_row_index, "aria-rowindex"_fly_string);
ARIA_IMPL(aria_row_span, "aria-rowspan"_fly_string);
ARIA_IMPL(aria_selected, "aria-selected"_fly_string);
ARIA_IMPL(aria_set_size, "aria-setsize"_fly_string);
ARIA_IMPL(aria_sort, "aria-sort"_fly_string);
ARIA_IMPL(aria_value_max, "aria-valuemax"_fly_string);
ARIA_IMPL(aria_value_min, "aria-valuemin"_fly_string);
ARIA_IMPL(aria_value_now, "aria-valuenow"_fly_string);
ARIA_IMPL(aria_value_text, "aria-valuetext"_fly_string);
#undef ARIA_IMPL