Bug 1294572 - Avoid traversing children of XBL-bound elements during initial styling. r=heycam

MozReview-Commit-ID: JHABvLnMYco
This commit is contained in:
Bobby Holley 2016-12-13 15:35:15 -08:00
parent 7c7dd0f965
commit 652e891d0d
6 changed files with 73 additions and 14 deletions

View file

@ -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;
}