mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 17:19:13 +00:00
LibWeb: Invalidate layout for ol
-attributes that affect it
This commit is contained in:
parent
263b125782
commit
370098514a
Notes:
github-actions[bot]
2025-05-10 23:15:32 +00:00
Author: https://github.com/InvalidUsernameException
Commit: 370098514a
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4686
9 changed files with 78 additions and 0 deletions
|
@ -8,6 +8,7 @@
|
|||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/CSS/StyleValues/CSSKeywordValue.h>
|
||||
#include <LibWeb/DOM/Document.h>
|
||||
#include <LibWeb/HTML/AttributeNames.h>
|
||||
#include <LibWeb/HTML/HTMLOListElement.h>
|
||||
#include <LibWeb/HTML/Numbers.h>
|
||||
|
||||
|
@ -28,6 +29,15 @@ void HTMLOListElement::initialize(JS::Realm& realm)
|
|||
Base::initialize(realm);
|
||||
}
|
||||
|
||||
void HTMLOListElement::attribute_changed(FlyString const& local_name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_)
|
||||
{
|
||||
Base::attribute_changed(local_name, old_value, value, namespace_);
|
||||
|
||||
if (local_name.is_one_of(HTML::AttributeNames::reversed, HTML::AttributeNames::start, HTML::AttributeNames::type)) {
|
||||
set_needs_layout_tree_update(true, DOM::SetNeedsLayoutTreeUpdateReason::HTMLOListElementOrdinalValues);
|
||||
}
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/grouping-content.html#dom-ol-start
|
||||
WebIDL::Long HTMLOListElement::start()
|
||||
{
|
||||
|
|
|
@ -34,6 +34,7 @@ private:
|
|||
HTMLOListElement(DOM::Document&, DOM::QualifiedName);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual void attribute_changed(FlyString const& local_name, Optional<String> const& old_value, Optional<String> const& value, Optional<FlyString> const& namespace_) override;
|
||||
|
||||
virtual bool is_presentational_hint(FlyString const&) const override;
|
||||
virtual void apply_presentational_hints(GC::Ref<CSS::CascadedProperties>) const override;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue