mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
style: Fix ElementWrapper::is_link.
And do a full restyle only when the state goes from visited to unvisited or vice versa. That is, use regular invalidation for addition or removals of href attributes, for example. Differential Revision: https://phabricator.services.mozilla.com/D50821
This commit is contained in:
parent
d68d6f7c56
commit
d797b0e475
3 changed files with 7 additions and 9 deletions
|
@ -270,7 +270,10 @@ where
|
|||
}
|
||||
|
||||
fn is_link(&self) -> bool {
|
||||
self.element.is_link()
|
||||
match self.snapshot().and_then(|s| s.state()) {
|
||||
Some(state) => state.intersects(ElementState::IN_VISITED_OR_UNVISITED_STATE),
|
||||
None => self.element.is_link(),
|
||||
}
|
||||
}
|
||||
|
||||
fn opaque(&self) -> OpaqueElement {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue