From 9c23594e74334bd56cb649a284cd55a2b753d099 Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Mon, 23 Oct 2017 17:33:49 +1100 Subject: [PATCH] Remove XBL as a separate cascading level in Stylo. In Gecko, we handle XBL rules like author rules everywhere, except that XBL rules are added and sorted in an independent step, behave as if it has a separate level. It is not clear to me why Stylo chose to add a separate level for XBL rules, but it doesn't seem that there is anything special to do with XBL rules. This bug happens because we don't handle XBL important rules which are handled as part of author rules in Gecko due to lack of the additional level there. We should just follow what Gecko does here and handle them all the same. --- components/style/rule_tree/mod.rs | 3 --- components/style/stylist.rs | 2 +- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/components/style/rule_tree/mod.rs b/components/style/rule_tree/mod.rs index 02c329257ac..e2a8cbc106e 100644 --- a/components/style/rule_tree/mod.rs +++ b/components/style/rule_tree/mod.rs @@ -488,8 +488,6 @@ pub enum CascadeLevel { PresHints, /// User normal rules. UserNormal, - /// XBL rules. - XBL, /// Author normal rules. AuthorNormal, /// Style attribute normal rules. @@ -1258,7 +1256,6 @@ impl StrongRuleNode { } // Author rules: CascadeLevel::PresHints | - CascadeLevel::XBL | CascadeLevel::AuthorNormal | CascadeLevel::StyleAttributeNormal | CascadeLevel::SMILOverride | diff --git a/components/style/stylist.rs b/components/style/stylist.rs index 038b7ceb888..33a4000172f 100644 --- a/components/style/stylist.rs +++ b/components/style/stylist.rs @@ -1309,7 +1309,7 @@ impl Stylist { &mut matching_context, stylist.quirks_mode, flags_setter, - CascadeLevel::XBL, + CascadeLevel::AuthorNormal, ); } });