mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
Record first and last token type of custom property values.
This commit is contained in:
parent
b8fd51e940
commit
81dd1ab363
7 changed files with 129 additions and 90 deletions
|
@ -6,7 +6,7 @@
|
|||
|
||||
use std::ascii::AsciiExt;
|
||||
use std::borrow::ToOwned;
|
||||
use std::collections::{HashSet, HashMap};
|
||||
use std::collections::HashSet;
|
||||
use std::default::Default;
|
||||
use std::fmt;
|
||||
use std::fmt::Debug;
|
||||
|
@ -23,7 +23,6 @@ use util::logical_geometry::{LogicalMargin, PhysicalSide, WritingMode};
|
|||
use euclid::SideOffsets2D;
|
||||
use euclid::size::Size2D;
|
||||
use fnv::FnvHasher;
|
||||
use string_cache::Atom;
|
||||
|
||||
use computed_values;
|
||||
use parser::{ParserContext, log_css_error};
|
||||
|
@ -5604,7 +5603,7 @@ mod property_bit_field {
|
|||
% if property.derived_from is None:
|
||||
fn substitute_variables_${property.ident}<F, R>(
|
||||
value: &DeclaredValue<longhands::${property.ident}::SpecifiedValue>,
|
||||
custom_properties: &Option<Arc<HashMap<Atom, String>>>,
|
||||
custom_properties: &Option<Arc<::custom_properties::ComputedValuesMap>>,
|
||||
f: F)
|
||||
-> R
|
||||
where F: FnOnce(&DeclaredValue<longhands::${property.ident}::SpecifiedValue>) -> R
|
||||
|
@ -5827,7 +5826,7 @@ pub enum PropertyDeclaration {
|
|||
% for property in LONGHANDS:
|
||||
${property.camel_case}(DeclaredValue<longhands::${property.ident}::SpecifiedValue>),
|
||||
% endfor
|
||||
Custom(::custom_properties::Name, DeclaredValue<::custom_properties::Value>),
|
||||
Custom(::custom_properties::Name, DeclaredValue<::custom_properties::SpecifiedValue>),
|
||||
}
|
||||
|
||||
|
||||
|
@ -5988,7 +5987,7 @@ pub struct ComputedValues {
|
|||
% for style_struct in STYLE_STRUCTS:
|
||||
${style_struct.ident}: Arc<style_structs::${style_struct.name}>,
|
||||
% endfor
|
||||
custom_properties: Option<Arc<HashMap<::custom_properties::Name, String>>>,
|
||||
custom_properties: Option<Arc<::custom_properties::ComputedValuesMap>>,
|
||||
shareable: bool,
|
||||
pub writing_mode: WritingMode,
|
||||
pub root_font_size: Au,
|
||||
|
@ -6222,7 +6221,7 @@ fn cascade_with_cached_declarations(
|
|||
shareable: bool,
|
||||
parent_style: &ComputedValues,
|
||||
cached_style: &ComputedValues,
|
||||
custom_properties: Option<Arc<HashMap<Atom, String>>>,
|
||||
custom_properties: Option<Arc<::custom_properties::ComputedValuesMap>>,
|
||||
context: &computed::Context)
|
||||
-> ComputedValues {
|
||||
% for style_struct in STYLE_STRUCTS:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue