style: Be more strict when setting the root font size.

Before this commit, we assumed that if the element had no parent element, it was
the root of the document, which is plain false, since we can arrive there from,
let's say, getComputedStyle on a detached node.

Bug: 1374062
Reviewed-By: heycam
MozReview-Commit-ID: 65DxdzXgd0J
This commit is contained in:
Emilio Cobos Álvarez 2017-06-21 12:16:43 +02:00
parent 82884050be
commit 1b2fd3fe85
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 26 additions and 29 deletions

View file

@ -502,7 +502,6 @@ fn compute_style_for_animation_step(context: &SharedStyleContext,
// as existing browsers don't appear to animate visited styles.
let computed =
properties::apply_declarations(context.stylist.device(),
/* is_root = */ false,
iter,
previous_style,
previous_style,