Allow the ComputedValues in ComputedStyle to be null.

This is necessary to start synthesizing the styles in match_element and avoid
round-tripping them through the caller.
This commit is contained in:
Bobby Holley 2017-02-08 15:13:21 -08:00
parent 1c530f9279
commit 5873de3fb6
8 changed files with 53 additions and 32 deletions

View file

@ -246,7 +246,7 @@ pub trait DomTraversal<E: TElement> : Sync {
// recursively drops Servo ElementData when the XBL insertion parent of
// an Element is changed.
if cfg!(feature = "gecko") && thread_local.is_initial_style() &&
parent_data.styles().primary.values.has_moz_binding() {
parent_data.styles().primary.values().has_moz_binding() {
if log.allow() { debug!("Parent {:?} has XBL binding, deferring traversal", parent); }
return false;
}
@ -552,7 +552,7 @@ fn compute_style<E, D>(_traversal: &D,
context.thread_local
.style_sharing_candidate_cache
.insert_if_possible(&element,
&data.styles().primary.values,
data.styles().primary.values(),
match_results.relations);
}
}