mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 07:22:21 +00:00
LibWeb: Invalidate layout tree on CSS position property change
When position changes, we may need to make larger structural updates to the layout tree. A simple relayout is not sufficient. This was a source of flakiness in the engine, and gives us at least +28 new WPT subtest passes.
This commit is contained in:
parent
f66c55138b
commit
821d54de7f
Notes:
github-actions[bot]
2025-05-20 11:29:55 +00:00
Author: https://github.com/awesomekling
Commit: 821d54de7f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4823
2 changed files with 32 additions and 32 deletions
|
@ -18,9 +18,9 @@ RequiredInvalidationAfterStyleChange compute_property_invalidation(CSS::Property
|
|||
if (!property_value_changed)
|
||||
return invalidation;
|
||||
|
||||
// NOTE: If the computed CSS display, content, or content-visibility property changes, we have to rebuild the entire layout tree.
|
||||
// NOTE: If the computed CSS display, position, content, or content-visibility property changes, we have to rebuild the entire layout tree.
|
||||
// In the future, we should figure out ways to rebuild a smaller part of the tree.
|
||||
if (AK::first_is_one_of(property_id, CSS::PropertyID::Display, CSS::PropertyID::Content, CSS::PropertyID::ContentVisibility)) {
|
||||
if (AK::first_is_one_of(property_id, CSS::PropertyID::Display, CSS::PropertyID::Position, CSS::PropertyID::Content, CSS::PropertyID::ContentVisibility)) {
|
||||
return RequiredInvalidationAfterStyleChange::full();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue