diff --git a/Userland/Libraries/LibWeb/DOM/DOMTokenList.cpp b/Userland/Libraries/LibWeb/DOM/DOMTokenList.cpp index 68bcb90584..3fc75d3f72 100644 --- a/Userland/Libraries/LibWeb/DOM/DOMTokenList.cpp +++ b/Userland/Libraries/LibWeb/DOM/DOMTokenList.cpp @@ -76,7 +76,7 @@ void DOMTokenList::associated_attribute_changed(StringView value) if (value.is_empty()) return; - auto split_values = value.split_view(Infra::ASCII_WHITESPACE); + auto split_values = value.split_view_if(Infra::is_ascii_whitespace); for (auto const& split_value : split_values) append_to_ordered_set(m_token_set, split_value); } diff --git a/Userland/Libraries/LibWeb/DOM/Element.cpp b/Userland/Libraries/LibWeb/DOM/Element.cpp index e01a160d52..3da9d40dd8 100644 --- a/Userland/Libraries/LibWeb/DOM/Element.cpp +++ b/Userland/Libraries/LibWeb/DOM/Element.cpp @@ -518,7 +518,7 @@ bool Element::is_active() const JS::NonnullGCPtr Element::get_elements_by_class_name(FlyString const& class_names) { Vector list_of_class_names; - for (auto& name : class_names.view().split_view(Infra::ASCII_WHITESPACE)) { + for (auto& name : class_names.view().split_view_if(Infra::is_ascii_whitespace)) { list_of_class_names.append(name); } return HTMLCollection::create(*this, [list_of_class_names = move(list_of_class_names), quirks_mode = document().in_quirks_mode()](Element const& element) {