mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibWeb: Add mechanism to invalidate only inherited styles
We can now mark an element as needing an "inherited style update" rather than a full "style update". This effectively means that the next style update will visit the element and pull all of its inherited properties from the relevant ancestor element. This is now used for descendants of elements with animated style.
This commit is contained in:
parent
92ac702c0c
commit
dc8343cc23
Notes:
github-actions[bot]
2024-12-23 16:06:18 +00:00
Author: https://github.com/awesomekling
Commit: dc8343cc23
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3023
7 changed files with 55 additions and 16 deletions
|
@ -175,6 +175,8 @@ public:
|
|||
|
||||
[[nodiscard]] GC::Ref<ComputedProperties> compute_properties(DOM::Element&, Optional<Selector::PseudoElement::Type>, CascadedProperties&) const;
|
||||
|
||||
void absolutize_values(ComputedProperties&) const;
|
||||
|
||||
private:
|
||||
enum class ComputeStyleMode {
|
||||
Normal,
|
||||
|
@ -194,7 +196,6 @@ private:
|
|||
void compute_math_depth(ComputedProperties&, DOM::Element const*, Optional<CSS::Selector::PseudoElement::Type>) const;
|
||||
void compute_defaulted_values(ComputedProperties&, DOM::Element const*, Optional<CSS::Selector::PseudoElement::Type>) const;
|
||||
void start_needed_transitions(ComputedProperties const& old_style, ComputedProperties& new_style, DOM::Element&, Optional<Selector::PseudoElement::Type>) const;
|
||||
void absolutize_values(ComputedProperties&) const;
|
||||
void resolve_effective_overflow_values(ComputedProperties&) const;
|
||||
void transform_box_type_if_needed(ComputedProperties&, DOM::Element const&, Optional<CSS::Selector::PseudoElement::Type>) const;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue