mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-12 01:46:46 +02:00
LibWeb: Move embedded content style invalidation into a helper
IFrame geometry changes and object representation changes directly selected style invalidation reasons from their HTML element classes. Move those mappings into a new CSS::Invalidation::EmbeddedContentInvalidator. The HTML elements continue to own their loading, representation, and layout-tree side effects. CSS invalidation now owns the style dirtiness associated with those embedded-content changes.
This commit is contained in:
committed by
Alexander Kalenik
parent
007dc28d16
commit
09aefc2cd5
Notes:
github-actions[bot]
2026-04-29 13:48:29 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/09aefc2cd51 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/9160
@@ -8,6 +8,7 @@
|
||||
#include <LibWeb/Bindings/HTMLObjectElement.h>
|
||||
#include <LibWeb/CSS/CascadedProperties.h>
|
||||
#include <LibWeb/CSS/ComputedProperties.h>
|
||||
#include <LibWeb/CSS/Invalidation/EmbeddedContentInvalidator.h>
|
||||
#include <LibWeb/CSS/StyleComputer.h>
|
||||
#include <LibWeb/CSS/StyleValues/DisplayStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/KeywordStyleValue.h>
|
||||
@@ -560,7 +561,7 @@ void HTMLObjectElement::update_layout_and_child_objects(Representation represent
|
||||
}
|
||||
|
||||
m_representation = representation;
|
||||
invalidate_style(DOM::StyleInvalidationReason::HTMLObjectElementUpdateLayoutAndChildObjects);
|
||||
CSS::Invalidation::invalidate_style_after_object_representation_change(*this);
|
||||
|
||||
if (auto parent_element = this->parent_element())
|
||||
parent_element->set_needs_layout_tree_update(true, DOM::SetNeedsLayoutTreeUpdateReason::HTMLObjectElementUpdateLayoutAndChildObjects);
|
||||
|
||||
Reference in New Issue
Block a user