diff --git a/Libraries/LibWeb/DOM/Element.cpp b/Libraries/LibWeb/DOM/Element.cpp index 36ca42019a2..12b8c28912e 100644 --- a/Libraries/LibWeb/DOM/Element.cpp +++ b/Libraries/LibWeb/DOM/Element.cpp @@ -1970,13 +1970,12 @@ ErrorOr Element::scroll_into_view(Optional const& old_value, Optional const& new_value) { + Vector changed_properties; + ForceSelfStyleInvalidation force_self_invalidation = ForceSelfStyleInvalidation::No; if (is_presentational_hint(attribute_name)) { - invalidate_style(StyleInvalidationReason::ElementAttributeChange); - return; + force_self_invalidation = ForceSelfStyleInvalidation::Yes; } - Vector changed_properties; - ForceSelfStyleInvalidation force_self_invalidation = ForceSelfStyleInvalidation::No; if (attribute_name == HTML::AttributeNames::style) { force_self_invalidation = ForceSelfStyleInvalidation::Yes; changed_properties.append({ .type = CSS::InvalidationSet::Property::Type::Attribute, .value = HTML::AttributeNames::style });