style: Make a Servo-only assertion apply to Gecko too.

MozReview-Commit-ID: CWhSfDQ8naE
This commit is contained in:
Emilio Cobos Álvarez 2017-11-24 14:30:35 +01:00
parent 269077f317
commit 09c11d49d5
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -256,8 +256,10 @@ pub trait DomTraversal<E: TElement> : Sync {
parent: E, parent: E,
parent_data: &ElementData, parent_data: &ElementData,
) -> bool { ) -> bool {
debug_assert!(cfg!(feature = "gecko") || debug_assert!(parent.has_current_styles_for_traversal(
parent.has_current_styles_for_traversal(parent_data, context.shared.traversal_flags)); parent_data,
context.shared.traversal_flags,
));
// If the parent computed display:none, we don't style the subtree. // If the parent computed display:none, we don't style the subtree.
if parent_data.styles.is_display_none() { if parent_data.styles.is_display_none() {