aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/servo/selector_parser.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2019-04-18 09:44:15 -0400
committerGitHub <noreply@github.com>2019-04-18 09:44:15 -0400
commit9e6f84958d9023f15bfb7a017cc16ca6580d7098 (patch)
treebc4a089ac039fe1d843473d8b0e5b40afd389873 /components/style/servo/selector_parser.rs
parent04c93c511b021a1e76512f997992667540657c4e (diff)
parent8d7fe68ac3fc3eb6ec6caf4a6356c4b57bf06243 (diff)
downloadservo-9e6f84958d9023f15bfb7a017cc16ca6580d7098.tar.gz
servo-9e6f84958d9023f15bfb7a017cc16ca6580d7098.zip
Auto merge of #23228 - KwanEsq:remove-servo-case-sensitive-type-attr, r=SimonSapin
Remove :-servo-case-sensitive-type-attr() No longer needed now that the case-sensitive flag for attributes selectors is supported. Update user-agent CSS sheet to use the standard flag. Mostly just a (manual) backout of 7149a6a29de6d1c351eedf1404369aa5f9efbd09. (7149a6a29de6d1c351eedf1404369aa5f9efbd09 also implemented PartialEq for AttrValue which I've left for now:) https://github.com/servo/servo/blob/7149a6a29de6d1c351eedf1404369aa5f9efbd09/components/style/attr.rs#L382-L389 --- - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix #23227 - [x] There are tests for these changes (wpt html/rendering/non-replaced-elements/lists) <!-- 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/23228) <!-- Reviewable:end -->
Diffstat (limited to 'components/style/servo/selector_parser.rs')
-rw-r--r--components/style/servo/selector_parser.rs32
1 files changed, 6 insertions, 26 deletions
diff --git a/components/style/servo/selector_parser.rs b/components/style/servo/selector_parser.rs
index 2c316b2deed..9d94c467b58 100644
--- a/components/style/servo/selector_parser.rs
+++ b/components/style/servo/selector_parser.rs
@@ -282,7 +282,6 @@ pub enum NonTSPseudoClass {
ReadWrite,
ReadOnly,
ServoNonZeroBorder,
- ServoCaseSensitiveTypeAttr(Atom),
Target,
Visited,
}
@@ -302,18 +301,10 @@ impl ToCss for NonTSPseudoClass {
W: fmt::Write,
{
use self::NonTSPseudoClass::*;
- match *self {
- Lang(ref lang) => {
- dest.write_str(":lang(")?;
- serialize_identifier(lang, dest)?;
- return dest.write_str(")");
- },
- ServoCaseSensitiveTypeAttr(ref value) => {
- dest.write_str(":-servo-case-sensitive-type-attr(")?;
- serialize_identifier(value, dest)?;
- return dest.write_str(")");
- },
- _ => {},
+ if let Lang(ref lang) = *self {
+ dest.write_str(":lang(")?;
+ serialize_identifier(lang, dest)?;
+ return dest.write_str(")");
}
dest.write_str(match *self {
@@ -333,7 +324,7 @@ impl ToCss for NonTSPseudoClass {
ServoNonZeroBorder => ":-servo-nonzero-border",
Target => ":target",
Visited => ":visited",
- Lang(_) | ServoCaseSensitiveTypeAttr(_) => unreachable!(),
+ Lang(_) => unreachable!(),
})
}
}
@@ -367,12 +358,7 @@ impl NonTSPseudoClass {
PlaceholderShown => ElementState::IN_PLACEHOLDER_SHOWN_STATE,
Target => ElementState::IN_TARGET_STATE,
- AnyLink |
- Lang(_) |
- Link |
- Visited |
- ServoNonZeroBorder |
- ServoCaseSensitiveTypeAttr(_) => ElementState::empty(),
+ AnyLink | Lang(_) | Link | Visited | ServoNonZeroBorder => ElementState::empty(),
}
}
@@ -464,12 +450,6 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
"lang" => {
Lang(parser.expect_ident_or_string()?.as_ref().into())
}
- "-servo-case-sensitive-type-attr" => {
- if !self.in_user_agent_stylesheet() {
- return Err(parser.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone())));
- }
- ServoCaseSensitiveTypeAttr(Atom::from(parser.expect_ident()?.as_ref()))
- }
_ => return Err(parser.new_custom_error(SelectorParseErrorKind::UnexpectedIdent(name.clone())))
};