Skip to content

Commit

Permalink
style: always re-cascade in native anonymous subtrees
Browse files Browse the repository at this point in the history
  • Loading branch information
heycam committed Jun 7, 2017
1 parent f388c0a commit a1093ea
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions components/style/traversal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,12 @@ pub fn recalc_style_at<E, D>(traversal: &D,
ChildCascadeRequirement::CanSkipCascade => {}
};

// We must always cascade native anonymous subtrees, since they inherit styles
// from their first non-NAC ancestor.
if element.is_native_anonymous() {
cascade_hint |= RECASCADE_SELF;
}

// If we're restyling this element to display:none, throw away all style
// data in the subtree, notify the caller to early-return.
if data.styles().is_display_none() {
Expand Down

0 comments on commit a1093ea

Please sign in to comment.