mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
style: Introduce a generic way of gathering information from the cascade, and use it for viewport units.
This commit is contained in:
parent
40c04b4c6b
commit
9e88a495c8
12 changed files with 205 additions and 23 deletions
|
@ -230,6 +230,7 @@ impl Stylist {
|
|||
&declarations, false,
|
||||
parent.map(|p| &**p),
|
||||
None,
|
||||
None,
|
||||
Box::new(StdoutErrorReporter));
|
||||
Some(Arc::new(computed))
|
||||
} else {
|
||||
|
@ -242,8 +243,9 @@ impl Stylist {
|
|||
pseudo: &PseudoElement,
|
||||
parent: &Arc<ComputedValues>)
|
||||
-> Option<Arc<ComputedValues>>
|
||||
where E: Element<Impl=TheSelectorImpl> +
|
||||
PresentationalHintsSynthetizer {
|
||||
where E: Element<Impl=TheSelectorImpl> +
|
||||
PresentationalHintsSynthetizer
|
||||
{
|
||||
debug_assert!(TheSelectorImpl::pseudo_element_cascade_type(pseudo).is_lazy());
|
||||
if self.pseudos_map.get(pseudo).is_none() {
|
||||
return None;
|
||||
|
@ -262,8 +264,10 @@ impl Stylist {
|
|||
let (computed, _) =
|
||||
properties::cascade(self.device.au_viewport_size(),
|
||||
&declarations, false,
|
||||
Some(&**parent), None,
|
||||
Some(&**parent), None, None,
|
||||
Box::new(StdoutErrorReporter));
|
||||
|
||||
|
||||
Some(Arc::new(computed))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue