mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-01 13:49:16 +00:00
LibWeb/CSS: Make font-stretch a legacy alias for new font-width
CSS Fonts level 4 renames font-stretch to font-width, with font-stretch being left as a legacy alias. Unfortunately the other specs have not yet been updated, so both terms are used in different places.
This commit is contained in:
parent
7c50a31402
commit
4a67b28600
Notes:
github-actions[bot]
2024-09-28 12:43:39 +00:00
Author: https://github.com/AtkinsSJ
Commit: 4a67b28600
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1554
10 changed files with 47 additions and 41 deletions
|
@ -58,10 +58,10 @@ public:
|
|||
auto& canvas_element = reinterpret_cast<IncludingClass&>(*this).canvas_element();
|
||||
auto& font_style = *font_style_value.longhand(CSS::PropertyID::FontStyle);
|
||||
auto& font_weight = *font_style_value.longhand(CSS::PropertyID::FontWeight);
|
||||
auto& font_stretch = *font_style_value.longhand(CSS::PropertyID::FontStretch);
|
||||
auto& font_width = *font_style_value.longhand(CSS::PropertyID::FontWidth);
|
||||
auto& font_size = *font_style_value.longhand(CSS::PropertyID::FontSize);
|
||||
auto& font_family = *font_style_value.longhand(CSS::PropertyID::FontFamily);
|
||||
auto font_list = canvas_element.document().style_computer().compute_font_for_style_values(&canvas_element, {}, font_family, font_size, font_style, font_weight, font_stretch);
|
||||
auto font_list = canvas_element.document().style_computer().compute_font_for_style_values(&canvas_element, {}, font_family, font_size, font_style, font_weight, font_width);
|
||||
my_drawing_state().current_font = font_list->first();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue