style: Make some removed assertions Servo-only instead.

This commit is contained in:
Emilio Cobos Álvarez 2016-12-13 08:35:57 +01:00
parent 87f7b29d65
commit 864fe8a9a7
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
2 changed files with 10 additions and 0 deletions

View file

@ -733,6 +733,13 @@ pub trait MatchMethods : TElement {
// Get our parent's style.
let parent_data = parent.as_ref().map(|x| x.borrow_data().unwrap());
let parent_style = parent_data.as_ref().map(|d| {
// Sometimes Gecko eagerly styles things without processing pending
// restyles first. In general we'd like to avoid this, but there can
// be good reasons (for example, needing to construct a frame for
// some small piece of newly-added content in order to do something
// specific with that frame, but not wanting to flush all of
// layout).
debug_assert!(cfg!(gecko) || d.has_current_styles());
&d.styles().primary.values
});