mirror of
https://github.com/servo/servo.git
synced 2025-09-10 23:18:20 +01:00
Bug 1294572 - Avoid traversing children of XBL-bound elements during initial styling. r=heycam
MozReview-Commit-ID: JHABvLnMYco
This commit is contained in:
parent
7c7dd0f965
commit
652e891d0d
6 changed files with 73 additions and 14 deletions
|
@ -131,7 +131,7 @@ fn traverse_subtree(element: GeckoElement, raw_data: RawServoStyleSetBorrowed,
|
|||
// When new content is inserted in a display:none subtree, we will call into
|
||||
// servo to try to style it. Detect that here and bail out.
|
||||
if let Some(parent) = element.parent_element() {
|
||||
if parent.get_data().is_none() || parent.is_display_none() {
|
||||
if parent.borrow_data().map_or(true, |d| d.styles().is_display_none()) {
|
||||
debug!("{:?} has unstyled parent - ignoring call to traverse_subtree", parent);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue