stylo: Fix has_author_specified_rules() for rules in XBL stylesheets (bug 1372062) draft
authorTing-Yu Lin <tlin@mozilla.com>
Mon, 19 Jun 2017 18:35:07 +0800
changeset 596594 37a8c8d5be8a7f52601fd1b53f2180b21e9a4405
parent 596219 95543bdc59bd038a3d5d084b85a4fec493c349ee
child 596595 a11e0d3a6e742682536e28af2869016ba2c72d26
push id64688
push userbmo:tlin@mozilla.com
push dateMon, 19 Jun 2017 14:02:40 +0000
bugs1372062
milestone56.0a1
stylo: Fix has_author_specified_rules() for rules in XBL stylesheets (bug 1372062) MozReview-Commit-ID: GBFgr5pqROk
servo/components/style/rule_tree/mod.rs
--- a/servo/components/style/rule_tree/mod.rs
+++ b/servo/components/style/rule_tree/mod.rs
@@ -1095,18 +1095,17 @@ impl StrongRuleNode {
                         }
                     });
 
                 match node.cascade_level() {
                     // Non-author rules:
                     CascadeLevel::UANormal |
                     CascadeLevel::UAImportant |
                     CascadeLevel::UserNormal |
-                    CascadeLevel::UserImportant |
-                    CascadeLevel::XBL => {
+                    CascadeLevel::UserImportant  => {
                         for (id, declaration) in longhands {
                             if properties.contains(id) {
                                 // This property was set by a non-author rule.
                                 // Stop looking for it in this element's rule
                                 // nodes.
                                 properties.remove(id);
 
                                 // However, if it is inherited, then it might be
@@ -1119,16 +1118,17 @@ impl StrongRuleNode {
                                     have_explicit_ua_inherit = true;
                                     inherited_properties.insert(id);
                                 }
                             }
                         }
                     }
                     // Author rules:
                     CascadeLevel::PresHints |
+                    CascadeLevel::XBL |
                     CascadeLevel::AuthorNormal |
                     CascadeLevel::StyleAttributeNormal |
                     CascadeLevel::SMILOverride |
                     CascadeLevel::Animations |
                     CascadeLevel::AuthorImportant |
                     CascadeLevel::StyleAttributeImportant |
                     CascadeLevel::Transitions => {
                         for (id, declaration) in longhands {