aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/element.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/script/dom/element.rs')
-rw-r--r--components/script/dom/element.rs15
1 files changed, 14 insertions, 1 deletions
diff --git a/components/script/dom/element.rs b/components/script/dom/element.rs
index f99bd564dbe..d1db97128f0 100644
--- a/components/script/dom/element.rs
+++ b/components/script/dom/element.rs
@@ -71,7 +71,7 @@ use std::sync::Arc;
use string_cache::{Atom, Namespace, QualName};
use style::legacy::{UnsignedIntegerAttribute, from_declaration};
use style::properties::DeclaredValue;
-use style::properties::longhands::{self, background_image, border_spacing, font_family};
+use style::properties::longhands::{self, background_image, border_spacing, font_family, font_size};
use style::properties::{PropertyDeclaration, PropertyDeclarationBlock, parse_style_attribute};
use style::values::CSSFloat;
use style::values::specified::{self, CSSColor, CSSRGBA};
@@ -302,6 +302,19 @@ impl RawLayoutElementHelpers for Element {
font_family)])))));
}
+ let font_size = if let Some(this) = HTMLFontElementCast::to_ref(self) {
+ this.get_size()
+ } else {
+ None
+ };
+
+ if let Some(font_size) = font_size {
+ hints.push(from_declaration(
+ PropertyDeclaration::FontSize(
+ DeclaredValue::Value(
+ font_size::SpecifiedValue(font_size)))))
+ }
+
let cellspacing = if let Some(this) = HTMLTableElementCast::to_ref(self) {
this.get_cellspacing()
} else {