mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Auto merge of #19941 - emilio:cleanup-style-builder, r=emilio
style: Handle correctly nested links. Followup to #19935, since I'm dumb and missed some orange in my try run. <!-- 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/19941) <!-- Reviewable:end -->
This commit is contained in:
commit
2f8cd0fe22
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