style: Use an Atom to store pseudo-class string arguments.

Differential Revision: https://phabricator.services.mozilla.com/D4740
This commit is contained in:
Cameron McCormack 2018-08-31 17:05:56 +10:00 committed by Emilio Cobos Álvarez
parent 4ee3b56d54
commit 2af9264cfe
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 4 additions and 22 deletions

View file

@ -1721,10 +1721,6 @@ impl<'le> TElement for GeckoElement<'le> {
// Gecko supports :lang() from CSS Selectors 3, which only accepts a
// single language tag, and which performs simple dash-prefix matching
// on it.
debug_assert!(
value.len() > 0 && value[value.len() - 1] == 0,
"expected value to be null terminated"
);
let override_lang_ptr = match &override_lang {
&Some(Some(ref atom)) => atom.as_ptr(),
_ => ptr::null_mut(),
@ -1734,7 +1730,7 @@ impl<'le> TElement for GeckoElement<'le> {
self.0,
override_lang_ptr,
override_lang.is_some(),
value.as_ptr(),
value.as_slice().as_ptr(),
)
}
}