mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Handle correctly nested links.
Followup to #19935, since I'm dumb and missed that orange.
This commit is contained in:
parent
a0d9d3633b
commit
2e08ab1492
1 changed files with 8 additions and 1 deletions
|
@ -552,8 +552,15 @@ impl<'a, 'b: 'a> StyleAdjuster<'a, 'b> {
|
|||
self.style.pseudo.is_none() &&
|
||||
element.map_or(false, |e| e.is_link());
|
||||
|
||||
if is_link_element && element.unwrap().is_visited_link() {
|
||||
if !is_link_element {
|
||||
return;
|
||||
}
|
||||
|
||||
if element.unwrap().is_visited_link() {
|
||||
self.style.flags.insert(ComputedValueFlags::IS_RELEVANT_LINK_VISITED);
|
||||
} else {
|
||||
// Need to remove to handle unvisited link inside visited.
|
||||
self.style.flags.remove(ComputedValueFlags::IS_RELEVANT_LINK_VISITED);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue