mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibWeb: Port Element::name to a cached FlyString
Also removing some handling of OOM while we are in the area.
This commit is contained in:
parent
cb9118efe3
commit
41f84deb9f
Notes:
sideshowbarker
2024-07-17 07:06:47 +09:00
Author: https://github.com/shannonbooth
Commit: 41f84deb9f
Pull-request: https://github.com/SerenityOS/serenity/pull/22732
6 changed files with 22 additions and 24 deletions
|
@ -459,6 +459,11 @@ void Element::attribute_changed(FlyString const& name, Optional<String> const& v
|
|||
m_id = {};
|
||||
else
|
||||
m_id = value_or_empty;
|
||||
} else if (name == HTML::AttributeNames::name) {
|
||||
if (!value.has_value())
|
||||
m_name = {};
|
||||
else
|
||||
m_name = value_or_empty;
|
||||
} else if (name == HTML::AttributeNames::class_) {
|
||||
auto new_classes = value_or_empty.bytes_as_string_view().split_view_if(Infra::is_ascii_whitespace);
|
||||
m_classes.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue