mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
Auto merge of #17804 - emilio:visited-comment, r=jryans
Add a comment about visited style inheritance. <!-- 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/17804) <!-- Reviewable:end -->
This commit is contained in:
commit
3c89486de2
1 changed files with 3 additions and 0 deletions
|
@ -474,6 +474,9 @@ where
|
|||
cascade_flags.insert(SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP);
|
||||
}
|
||||
if cascade_visited.visited_dependent_only() {
|
||||
// If this element is a link, we want its visited style to inherit
|
||||
// from the regular style of its parent, because only the
|
||||
// visitedness of the relevant link should influence style.
|
||||
if pseudo.is_some() || !self.element.is_link() {
|
||||
parent_style = parent_style.map(|s| {
|
||||
s.get_visited_style().unwrap_or(s)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue