mirror of
https://github.com/servo/servo
synced 2026-04-25 17:15:48 +02:00
script: Skip clearing subtree layout boxes of detached element when attaching shadow to it (#44052)
There is no layout boxes to clear in this case. For the example in #43998, this skips the traversal many times. Testing: Should not change visible behaviour. [Try](https://github.com/servo/servo/actions/runs/24131782865). --------- Signed-off-by: Euclid Ye <yezhizhenjiakang@gmail.com>
This commit is contained in:
@@ -365,7 +365,7 @@ impl Node {
|
||||
}
|
||||
|
||||
/// Clear this [`Node`]'s layout data and also clear the layout data of all children.
|
||||
/// Note that clears layout data from all non-flat tree descendants and flat tree
|
||||
/// Note that this clears layout data from all non-flat tree descendants and flat tree
|
||||
/// descendants.
|
||||
pub(crate) fn remove_layout_boxes_from_subtree(&self) {
|
||||
for node in self.traverse_preorder(ShadowIncluding::Yes) {
|
||||
|
||||
Reference in New Issue
Block a user