From 1d8e06938922b5334e4c96271b5d247f404f6b51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emilio=20Cobos=20=C3=81lvarez?= Date: Sun, 16 Jul 2017 16:14:33 +0200 Subject: [PATCH] style: Cascade the visited style with the normal rules if we didn't find a relevant link. MozReview-Commit-ID: HbfZs0jnusn --- components/style/style_resolver.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/style/style_resolver.rs b/components/style/style_resolver.rs index 1dc38baa975..0a98e563e76 100644 --- a/components/style/style_resolver.rs +++ b/components/style/style_resolver.rs @@ -121,7 +121,7 @@ where if should_compute_visited_style { visited_style = Some(self.cascade_style( - visited_rules.as_ref(), + visited_rules.as_ref().or(Some(&primary_results.rule_node)), /* style_if_visited = */ None, parent_style, layout_parent_style, @@ -223,7 +223,7 @@ where if parent_style.map_or(false, |s| s.get_visited_style().is_some()) || inputs.visited_rules.is_some() { style_if_visited = Some(self.cascade_style( - inputs.visited_rules.as_ref(), + inputs.visited_rules.as_ref().or(inputs.rules.as_ref()), /* style_if_visited = */ None, parent_style, layout_parent_style,