mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix the situation when :any-link starts or stops matching to actually restyle correctly.
This commit is contained in:
parent
eeb1ee9723
commit
51cf50f20b
2 changed files with 4 additions and 2 deletions
|
@ -38,7 +38,9 @@
|
|||
* possible.
|
||||
*
|
||||
* $gecko_type can be either "_" or an ident in Gecko's CSSPseudoClassType.
|
||||
* $state can be either "_" or an expression of type ElementState.
|
||||
* $state can be either "_" or an expression of type ElementState. If present,
|
||||
* the semantics are that the pseudo-class matches if any of the bits in
|
||||
* $state are set on the element.
|
||||
* $flags can be either "_" or an expression of type NonTSPseudoClassFlag,
|
||||
* see selector_parser.rs for more details.
|
||||
*/
|
||||
|
|
|
@ -343,7 +343,7 @@ impl<'a, E> Element for ElementWrapper<'a, E>
|
|||
&mut |_, _| {})
|
||||
}
|
||||
match self.snapshot().and_then(|s| s.state()) {
|
||||
Some(snapshot_state) => snapshot_state.contains(flag),
|
||||
Some(snapshot_state) => snapshot_state.intersects(flag),
|
||||
None => {
|
||||
self.element.match_non_ts_pseudo_class(pseudo_class,
|
||||
relations,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue