From 14d60a7e891407f67b5f921bb3323b92e9940618 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 27 Aug 2017 18:55:40 +0200 Subject: [PATCH] style: Really only resolve applicable ::before / ::after. MozReview-Commit-ID: 4dIykkUdIxZ --- components/style/style_resolver.rs | 5 +++++ tests/wpt/mozilla/meta/MANIFEST.json | 2 +- tests/wpt/mozilla/tests/mozilla/getComputedStyle.html | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/components/style/style_resolver.rs b/components/style/style_resolver.rs index 53add177b2c..bd47d356b9a 100644 --- a/components/style/style_resolver.rs +++ b/components/style/style_resolver.rs @@ -194,7 +194,12 @@ where &primary_style, layout_parent_style_for_pseudo ); + if let Some(style) = pseudo_style { + if !matches!(self.pseudo_resolution, PseudoElementResolution::Force) && + eager_pseudo_is_definitely_not_generated(&pseudo, &style) { + return; + } pseudo_styles.set(&pseudo, style); } }) diff --git a/tests/wpt/mozilla/meta/MANIFEST.json b/tests/wpt/mozilla/meta/MANIFEST.json index 683409fb6cc..bdda2fd8eb1 100644 --- a/tests/wpt/mozilla/meta/MANIFEST.json +++ b/tests/wpt/mozilla/meta/MANIFEST.json @@ -27152,7 +27152,7 @@ "testharness" ], "mozilla/getComputedStyle.html": [ - "17a1592664bdc9518786673683b9c43412fe9424", + "0cb74e3ff46837ccc308fac608f6924f101a0da6", "testharness" ], "mozilla/getPropertyPriority.html": [ diff --git a/tests/wpt/mozilla/tests/mozilla/getComputedStyle.html b/tests/wpt/mozilla/tests/mozilla/getComputedStyle.html index 5f4dc5d2876..2d902c2fd0a 100644 --- a/tests/wpt/mozilla/tests/mozilla/getComputedStyle.html +++ b/tests/wpt/mozilla/tests/mozilla/getComputedStyle.html @@ -6,6 +6,7 @@