Skip to content

Commit e9ddac6

Browse files
committed
Bug 1980539 - Restrict NonTSPseudoClass::Heading usage to Gecko. r=emilio,firefox-style-system-reviewers
This is a fixup for D255407, which added `NonTSPseudoClass::Heading` for Gecko but not for Servo, while still referencing it from both shared and Servo-specific code. Differential Revision: https://phabricator.services.mozilla.com/D259493
1 parent d504988 commit e9ddac6

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

style/invalidation/element/element_wrapper.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ where
225225
},
226226

227227
// :heading should match against snapshot before element
228+
#[cfg(feature = "gecko")]
228229
NonTSPseudoClass::Heading(ref levels) => {
229230
return levels.matches_state(
230231
self.snapshot()

style/servo/selector_parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ impl ToCss for NonTSPseudoClass {
384384
Self::UserValid => ":user-valid",
385385
Self::Valid => ":valid",
386386
Self::Visited => ":visited",
387-
Self::Lang(_) | Self::CustomState(_) | Self::Heading(_) => unreachable!(),
387+
Self::Lang(_) | Self::CustomState(_) => unreachable!(),
388388
})
389389
}
390390
}
@@ -427,7 +427,7 @@ impl NonTSPseudoClass {
427427
Self::UserValid => ElementState::USER_VALID,
428428
Self::Valid => ElementState::VALID,
429429
Self::Visited => ElementState::VISITED,
430-
Self::CustomState(_) | Self::Lang(_) | Self::Heading(_) | Self::ServoNonZeroBorder => ElementState::empty(),
430+
Self::CustomState(_) | Self::Lang(_) | Self::ServoNonZeroBorder => ElementState::empty(),
431431
}
432432
}
433433

0 commit comments

Comments
 (0)