mirror of
https://github.com/servo/servo.git
synced 2025-06-23 08:34:42 +01:00
Auto merge of #17801 - emilio:visited-inherited, r=jryans
style: Don't inherit from the parent visited style if we're a link. Bug: 1377469 Reviewed-by: jryans MozReview-Commit-ID: CoMj9KSb5w9
This commit is contained in:
commit
3d66cdeed4
1 changed files with 5 additions and 3 deletions
|
@ -474,9 +474,11 @@ where
|
|||
cascade_flags.insert(SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP);
|
||||
}
|
||||
if cascade_visited.visited_dependent_only() {
|
||||
parent_style = parent_style.map(|s| {
|
||||
s.get_visited_style().unwrap_or(s)
|
||||
});
|
||||
if pseudo.is_some() || !self.element.is_link() {
|
||||
parent_style = parent_style.map(|s| {
|
||||
s.get_visited_style().unwrap_or(s)
|
||||
});
|
||||
}
|
||||
cascade_flags.insert(VISITED_DEPENDENT_ONLY);
|
||||
}
|
||||
if self.element.is_native_anonymous() || pseudo.is_some() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue