mirror of
https://github.com/servo/servo.git
synced 2025-08-16 10:55:34 +01:00
style: Handle correctly document state invalidation inside negation.
This commit is contained in:
parent
bccb757bcd
commit
e74fad6259
3 changed files with 32 additions and 3 deletions
|
@ -2111,7 +2111,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
|
|||
NonTSPseudoClass::MozWindowInactive => {
|
||||
let state_bit = DocumentState::NS_DOCUMENT_STATE_WINDOW_INACTIVE;
|
||||
if context.extra_data.document_state.intersects(state_bit) {
|
||||
return true;
|
||||
return !context.in_negation();
|
||||
}
|
||||
|
||||
self.document_state().contains(state_bit)
|
||||
|
@ -2132,7 +2132,7 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
|
|||
if context.extra_data.document_state.intersects(state_bit) {
|
||||
// NOTE(emilio): We could still return false for
|
||||
// Direction::Other(..), but we don't bother.
|
||||
return true;
|
||||
return !context.in_negation();
|
||||
}
|
||||
|
||||
let doc_is_rtl = self.document_state().contains(state_bit);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue