mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2026-04-19 02:10:26 +00:00
LibWeb: Use unsafe_layout_node() when handling alt attribute changes
The layout node is only accessed to clear the cached alt value, so the layout tree doesn't need to be up to date in this case.
This commit is contained in:
parent
711fb81808
commit
a4f6ce3662
Notes:
github-actions[bot]
2026-03-17 08:08:06 +00:00
Author: https://github.com/tcl3
Commit: a4f6ce3662
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8462
Reviewed-by: https://github.com/gmta ✅
2 changed files with 9 additions and 2 deletions
|
|
@ -1543,8 +1543,8 @@ void HTMLInputElement::form_associated_element_attribute_changed(FlyString const
|
|||
} else if (name == HTML::AttributeNames::src) {
|
||||
handle_src_attribute(value.value_or({})).release_value_but_fixme_should_propagate_errors();
|
||||
} else if (name == HTML::AttributeNames::alt) {
|
||||
if (layout_node() && type_state() == TypeAttributeState::ImageButton)
|
||||
did_update_alt_text(as<Layout::ImageBox>(*layout_node()));
|
||||
if (unsafe_layout_node() && type_state() == TypeAttributeState::ImageButton)
|
||||
did_update_alt_text(as<Layout::ImageBox>(*unsafe_layout_node()));
|
||||
} else if (name == HTML::AttributeNames::maxlength) {
|
||||
handle_maxlength_attribute();
|
||||
} else if (name == HTML::AttributeNames::multiple) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue