mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 21:59:07 +00:00
LibWeb: Only create backdrop when originating element is invalidated
This commit is contained in:
parent
6dd2a4c945
commit
bbf4f546af
Notes:
github-actions[bot]
2025-04-16 15:02:08 +00:00
Author: https://github.com/Gingeh
Commit: bbf4f546af
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4339
Reviewed-by: https://github.com/ADKaster ✅
3 changed files with 42 additions and 0 deletions
|
@ -570,6 +570,9 @@ void TreeBuilder::update_layout_tree(DOM::Node& dom_node, TreeBuilder::Context&
|
|||
if (top_layer_element->rendered_in_top_layer()) {
|
||||
// Each element rendered in the top layer has a ::backdrop pseudo-element, for which it is the originating element.
|
||||
[&]() {
|
||||
if (!should_create_layout_node && !top_layer_element->needs_layout_tree_update())
|
||||
return;
|
||||
|
||||
if (top_layer_element->has_inclusive_ancestor_with_display_none())
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue