mirror of
https://github.com/servo/servo.git
synced 2025-08-12 00:45:33 +01:00
stylo: System font support for keyword font longhands
This commit is contained in:
parent
c1c4c8fa59
commit
b0dcb72722
7 changed files with 193 additions and 75 deletions
|
@ -4,6 +4,8 @@
|
|||
|
||||
<%namespace name="helpers" file="/helpers.mako.rs" />
|
||||
|
||||
<% from data import SYSTEM_FONT_LONGHANDS %>
|
||||
|
||||
use app_units::Au;
|
||||
use cssparser::{Color as CSSParserColor, Parser, RGBA};
|
||||
use euclid::{Point2D, Size2D};
|
||||
|
@ -418,11 +420,11 @@ impl AnimationValue {
|
|||
% for prop in data.longhands:
|
||||
% if prop.animatable:
|
||||
PropertyDeclaration::${prop.camel_case}(ref val) => {
|
||||
% if prop.ident in "font_size font_family".split() and product == "gecko":
|
||||
if let Some(sf) = val.get_system() {
|
||||
longhands::system_font::resolve_system_font(sf, context);
|
||||
}
|
||||
% endif
|
||||
% if prop.ident in SYSTEM_FONT_LONGHANDS and product == "gecko":
|
||||
if let Some(sf) = val.get_system() {
|
||||
longhands::system_font::resolve_system_font(sf, context);
|
||||
}
|
||||
% endif
|
||||
Some(AnimationValue::${prop.camel_case}(val.to_computed_value(context)))
|
||||
},
|
||||
% endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue