From 02364d7db7bdced35f1199d90f661c466a53f085 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Wed, 2 Oct 2013 01:19:36 +0100 Subject: [PATCH] Sorting on specificity needs to be stable for correctness of the cascade. --- src/components/script/style/selector_matching.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/script/style/selector_matching.rs b/src/components/script/style/selector_matching.rs index f365bdc894a..5d5296ee264 100644 --- a/src/components/script/style/selector_matching.rs +++ b/src/components/script/style/selector_matching.rs @@ -67,6 +67,7 @@ impl Stylist { append!(important, has_important_declarations); } + // These sorts need to be stable if has_normal_declarations { tim_sort(rules.normal) }