mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +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);
|
||||
|
||||
// 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
|
||||
// in properties::apply_declarations.
|
||||
//
|
||||
// TODO(emilio): This should arguably be outside of the path for
|
||||
// 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 new_font_size = new_values.get_font().clone_font_size();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue