mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:35:08 +00:00
LibWeb: Merge did_remove_attribute() into attribute_changed()
Instead of having two virtuals for attribute change notifications, there is now only one. When the attribute is removed, the value is null.
This commit is contained in:
parent
5a74486b59
commit
21260ea2ef
18 changed files with 86 additions and 152 deletions
|
@ -46,16 +46,12 @@ void HTMLVideoElement::attribute_changed(DeprecatedFlyString const& name, Deprec
|
|||
{
|
||||
Base::attribute_changed(name, value);
|
||||
|
||||
if (name == HTML::AttributeNames::poster)
|
||||
determine_element_poster_frame(value).release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
|
||||
void HTMLVideoElement::did_remove_attribute(DeprecatedFlyString const& name)
|
||||
{
|
||||
Base::did_remove_attribute(name);
|
||||
|
||||
if (name == HTML::AttributeNames::poster)
|
||||
determine_element_poster_frame({}).release_value_but_fixme_should_propagate_errors();
|
||||
if (name == HTML::AttributeNames::poster) {
|
||||
if (value.is_null())
|
||||
determine_element_poster_frame({}).release_value_but_fixme_should_propagate_errors();
|
||||
else
|
||||
determine_element_poster_frame(value).release_value_but_fixme_should_propagate_errors();
|
||||
}
|
||||
}
|
||||
|
||||
JS::GCPtr<Layout::Node> HTMLVideoElement::create_layout_node(NonnullRefPtr<CSS::StyleProperties> style)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue