mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 17:37:37 +00: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
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