mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
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:
parent
e92a79619e
commit
17ec634665
1 changed files with 9 additions and 5 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue