mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Rearrange PropertyDeclaration to avoid embedding DeclaredValue.
From https://bugzilla.mozilla.org/show_bug.cgi?id=1347719 This effectively combines the discriminants of the two enums and reduces the size of PropertyDeclaration by one word. MozReview-Commit-ID: 9rCRiSVZTQT
This commit is contained in:
parent
e34aac03ff
commit
8cf331a498
14 changed files with 378 additions and 333 deletions
|
@ -329,7 +329,7 @@ pub fn cascade<'a>(custom_properties: &mut Option<HashMap<&'a Name, BorrowedSpec
|
|||
inherited: &'a Option<Arc<HashMap<Name, ComputedValue>>>,
|
||||
seen: &mut HashSet<&'a Name>,
|
||||
name: &'a Name,
|
||||
specified_value: &'a DeclaredValue<Box<SpecifiedValue>>) {
|
||||
specified_value: DeclaredValue<'a, Box<SpecifiedValue>>) {
|
||||
let was_already_present = !seen.insert(name);
|
||||
if was_already_present {
|
||||
return;
|
||||
|
@ -352,7 +352,7 @@ pub fn cascade<'a>(custom_properties: &mut Option<HashMap<&'a Name, BorrowedSpec
|
|||
custom_properties.as_mut().unwrap()
|
||||
}
|
||||
};
|
||||
match *specified_value {
|
||||
match specified_value {
|
||||
DeclaredValue::Value(ref specified_value) => {
|
||||
map.insert(name, BorrowedSpecifiedValue {
|
||||
css: &specified_value.css,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue