aboutsummaryrefslogtreecommitdiffstats
path: root/components/style/gecko/wrapper.rs
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2023-06-14 21:08:22 +0000
committerMartin Robinson <mrobinson@igalia.com>2023-11-24 08:57:14 +0100
commit3da2db1c53402cca97234712b8e69ccfc3495d58 (patch)
tree21e742d4994fec6bd88585f51869e142fb0fe79d /components/style/gecko/wrapper.rs
parent54a783db1746efe4e5c8775cc7cfb69e765c2fb5 (diff)
downloadservo-3da2db1c53402cca97234712b8e69ccfc3495d58.tar.gz
servo-3da2db1c53402cca97234712b8e69ccfc3495d58.zip
style: Remove the never_matches field from attr selectors
It's an extra branch which in practice we almost never take, plus extra checks during parsing. Differential Revision: https://phabricator.services.mozilla.com/D180529
Diffstat (limited to 'components/style/gecko/wrapper.rs')
-rw-r--r--components/style/gecko/wrapper.rs15
1 files changed, 7 insertions, 8 deletions
diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs
index a4d35df4274..9616a5f2753 100644
--- a/components/style/gecko/wrapper.rs
+++ b/components/style/gecko/wrapper.rs
@@ -1866,54 +1866,53 @@ impl<'le> ::selectors::Element for GeckoElement<'le> {
AttrSelectorOperation::WithValue {
operator,
case_sensitivity,
- expected_value,
+ value,
} => {
let ignore_case = match case_sensitivity {
CaseSensitivity::CaseSensitive => false,
CaseSensitivity::AsciiCaseInsensitive => true,
};
- // FIXME: case sensitivity for operators other than Equal
match operator {
AttrSelectorOperator::Equal => bindings::Gecko_AttrEquals(
self.0,
ns.atom_or_null(),
local_name.as_ptr(),
- expected_value.as_ptr(),
+ value.as_ptr(),
ignore_case,
),
AttrSelectorOperator::Includes => bindings::Gecko_AttrIncludes(
self.0,
ns.atom_or_null(),
local_name.as_ptr(),
- expected_value.as_ptr(),
+ value.as_ptr(),
ignore_case,
),
AttrSelectorOperator::DashMatch => bindings::Gecko_AttrDashEquals(
self.0,
ns.atom_or_null(),
local_name.as_ptr(),
- expected_value.as_ptr(),
+ value.as_ptr(),
ignore_case,
),
AttrSelectorOperator::Prefix => bindings::Gecko_AttrHasPrefix(
self.0,
ns.atom_or_null(),
local_name.as_ptr(),
- expected_value.as_ptr(),
+ value.as_ptr(),
ignore_case,
),
AttrSelectorOperator::Suffix => bindings::Gecko_AttrHasSuffix(
self.0,
ns.atom_or_null(),
local_name.as_ptr(),
- expected_value.as_ptr(),
+ value.as_ptr(),
ignore_case,
),
AttrSelectorOperator::Substring => bindings::Gecko_AttrHasSubstring(
self.0,
ns.atom_or_null(),
local_name.as_ptr(),
- expected_value.as_ptr(),
+ value.as_ptr(),
ignore_case,
),
}