diff options
author | Nico Burns <nico@nicoburns.com> | 2025-03-25 23:45:40 +1300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-25 10:45:40 +0000 |
commit | cee84c824f49f020c1a820f978b2a49b55a7bec0 (patch) | |
tree | 1cf46d24d0e656c7d5b602f58feaa9ad1146d50d /components/fonts/tests | |
parent | b4a768cfc7c4c4fdef5c6454aeb4a124f303d40d (diff) | |
download | servo-cee84c824f49f020c1a820f978b2a49b55a7bec0.tar.gz servo-cee84c824f49f020c1a820f978b2a49b55a7bec0.zip |
Upgrade to Stylo e941241 (#36120)
* Upgrade to Stylo e941241
Signed-off-by: Nico Burns <nico@nicoburns.com>
* Make test less fragile
Signed-off-by: Nico Burns <nico@nicoburns.com>
---------
Signed-off-by: Nico Burns <nico@nicoburns.com>
Diffstat (limited to 'components/fonts/tests')
-rw-r--r-- | components/fonts/tests/font_context.rs | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/components/fonts/tests/font_context.rs b/components/fonts/tests/font_context.rs index 69ba4af479f..ed102069eee 100644 --- a/components/fonts/tests/font_context.rs +++ b/components/fonts/tests/font_context.rs @@ -29,11 +29,9 @@ mod font_context { use style::properties::longhands::font_variant_caps::computed_value::T as FontVariantCaps; use style::properties::style_structs::Font as FontStyleStruct; use style::values::computed::font::{ - FamilyName, FontFamily, FontFamilyList, FontFamilyNameSyntax, FontSize, FontStretch, - FontStyle, FontWeight, SingleFontFamily, + FamilyName, FontFamily, FontFamilyList, FontFamilyNameSyntax, FontStretch, FontStyle, + FontWeight, SingleFontFamily, }; - use style::values::computed::{FontLanguageOverride, XLang}; - use style::values::generics::font::LineHeight; use stylo_atoms::Atom; use webrender_api::{FontInstanceKey, FontKey, IdNamespace}; use webrender_traits::CrossProcessCompositorApi; @@ -194,18 +192,7 @@ mod font_context { } fn style() -> FontStyleStruct { - let mut style = FontStyleStruct { - font_family: FontFamily::serif(), - font_style: FontStyle::NORMAL, - font_variant_caps: FontVariantCaps::Normal, - font_weight: FontWeight::normal(), - font_size: FontSize::medium(), - font_stretch: FontStretch::hundred(), - hash: 0, - font_language_override: FontLanguageOverride::normal(), - line_height: LineHeight::Normal, - _x_lang: XLang::get_initial_value(), - }; + let mut style = FontStyleStruct::initial_values(); style.compute_font_hash(); style } |