mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Auto merge of #17762 - emilio:visited-nested, r=jryans
style: Cascade the visited style with the normal rules if we didn't find a relevant link. <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/17762) <!-- Reviewable:end -->
This commit is contained in:
commit
e122ea65fd
1 changed files with 2 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue