Auto merge of #16682 - emilio:font-size-inherit, r=bholley

Guard inheriting font-size with what we actually need.

See https://bugzilla.mozilla.org/show_bug.cgi?id=1361126

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16682)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-05-01 17:45:43 -05:00 committed by GitHub
commit 4f13bc3829

View file

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