mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
style: Avoid overriding the root font size from a getDefaultComputedStyle call.
MozReview-Commit-ID: 2WFyGj868fJ
This commit is contained in:
parent
5d03ba3cbe
commit
c2cc6b08f8
1 changed files with 6 additions and 3 deletions
|
@ -553,9 +553,12 @@ trait PrivateMatchMethods: TElement {
|
||||||
None);
|
None);
|
||||||
|
|
||||||
// Handle root font-size changes.
|
// Handle root font-size changes.
|
||||||
if self.is_root() && !self.is_native_anonymous() {
|
//
|
||||||
// The new root font-size has already been updated on the Device
|
// TODO(emilio): This should arguably be outside of the path for
|
||||||
// in properties::apply_declarations.
|
// getComputedStyle/getDefaultComputedStyle, but it's unclear how to
|
||||||
|
// do it without duplicating a bunch of code.
|
||||||
|
if self.is_root() && !self.is_native_anonymous() &&
|
||||||
|
!context.shared.traversal_flags.for_default_styles() {
|
||||||
let device = context.shared.stylist.device();
|
let device = context.shared.stylist.device();
|
||||||
let new_font_size = new_values.get_font().clone_font_size();
|
let new_font_size = new_values.get_font().clone_font_size();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue