mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 01:35:08 +02: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:
committed by
Jelle Raaijmakers
parent
711fb81808
commit
a4f6ce3662
Notes:
github-actions[bot]
2026-03-17 08:08:06 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/a4f6ce3662d Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/8462 Reviewed-by: https://github.com/gmta ✅
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user