Guard inheriting font-size with what we actually need.

MozReview-Commit-ID: C4QaV5cNLh5
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
Emilio Cobos Álvarez 2017-05-01 21:22:28 +02:00
parent e92a79619e
commit 17ec634665
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C

View file

@ -2535,13 +2535,16 @@ pub fn apply_declarations<'a, F, I>(device: &Device,
&mut cacheable,
&mut cascade_info,
error_reporter);
} else {
// Font size must be explicitly inherited to handle keyword
// sizes and scriptlevel
% if product == "gecko":
// Font size must be explicitly inherited to handle lang changes and
// scriptlevel changes.
} else if seen.contains(LonghandId::XLang) ||
seen.contains(LonghandId::MozScriptLevel) ||
font_family.is_some() {
let discriminant = LonghandId::FontSize as usize;
let size = PropertyDeclaration::CSSWideKeyword(
LonghandId::FontSize, CSSWideKeyword::Inherit
);
LonghandId::FontSize, CSSWideKeyword::Inherit);
(CASCADE_PROPERTY[discriminant])(&size,
inherited_style,
default_style,
@ -2549,6 +2552,7 @@ pub fn apply_declarations<'a, F, I>(device: &Device,
&mut cacheable,
&mut cascade_info,
error_reporter);
% endif
}
% endif
% endfor