diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs index b0f296b9a53..8da1c8c9373 100644 --- a/components/script/dom/element.rs +++ b/components/script/dom/element.rs @@ -713,7 +713,7 @@ impl<'a> ElementHelpers<'a> for &'a Element { let (from, to) = if style_priority == StylePriority::Important { (&mut declarations.normal, &mut declarations.important) } else { - (&mut declarations.normal, &mut declarations.important) + (&mut declarations.important, &mut declarations.normal) }; // Usually, the reference counts of `from` and `to` will be 1 here. But transitions diff --git a/tests/wpt/mozilla/tests/css/setpropertypriority.html b/tests/wpt/mozilla/tests/css/setpropertypriority.html index 5cbceacef35..50fe54005bd 100644 --- a/tests/wpt/mozilla/tests/css/setpropertypriority.html +++ b/tests/wpt/mozilla/tests/css/setpropertypriority.html @@ -1,9 +1,20 @@ -

This text should be green.

+ +

This text should be green.

+

This text should be green.

+ +

This text should be green.

+

This text should be green.

+ diff --git a/tests/wpt/mozilla/tests/css/setpropertypriority_ref.html b/tests/wpt/mozilla/tests/css/setpropertypriority_ref.html index 97cd81b31bf..c526c2f371b 100644 --- a/tests/wpt/mozilla/tests/css/setpropertypriority_ref.html +++ b/tests/wpt/mozilla/tests/css/setpropertypriority_ref.html @@ -1 +1,4 @@

This text should be green. +

This text should be green. +

This text should be green. +

This text should be green.