mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Use an Atom to store pseudo-class string arguments.
Differential Revision: https://phabricator.services.mozilla.com/D4740
This commit is contained in:
parent
4ee3b56d54
commit
2af9264cfe
2 changed files with 4 additions and 22 deletions
|
@ -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(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue