mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Add string_cache override for geckolib based on gecko atoms.
The work in these patches is based on Ms2ger's gecko-atom crate.
This commit is contained in:
parent
825f610dec
commit
b521c293dc
25 changed files with 5153 additions and 185 deletions
|
@ -478,7 +478,7 @@ impl PartialEq<str> for PropertyDeclarationName {
|
|||
match *self {
|
||||
PropertyDeclarationName::Longhand(n) => n == other,
|
||||
PropertyDeclarationName::Custom(ref n) => {
|
||||
::custom_properties::parse_name(other) == Ok(&**n)
|
||||
n.with_str(|s| ::custom_properties::parse_name(other) == Ok(s))
|
||||
}
|
||||
PropertyDeclarationName::Internal => false,
|
||||
}
|
||||
|
@ -491,7 +491,7 @@ impl fmt::Display for PropertyDeclarationName {
|
|||
PropertyDeclarationName::Longhand(n) => f.write_str(n),
|
||||
PropertyDeclarationName::Custom(ref n) => {
|
||||
try!(f.write_str("--"));
|
||||
f.write_str(n)
|
||||
n.with_str(|s| f.write_str(s))
|
||||
}
|
||||
PropertyDeclarationName::Internal => Ok(()),
|
||||
}
|
||||
|
@ -575,7 +575,7 @@ impl PropertyDeclaration {
|
|||
% endif
|
||||
% endfor
|
||||
PropertyDeclaration::Custom(ref declaration_name, _) => {
|
||||
::custom_properties::parse_name(name) == Ok(&**declaration_name)
|
||||
declaration_name.with_str(|s| ::custom_properties::parse_name(name) == Ok(s))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue