mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-16 21:20:18 +00:00
LibWeb: Move to_font_slope
from StyleValue
to FontStyleStyleValue
This method only operated on `FontStyleStyleValue`s anyway so this is a better place to have it
This commit is contained in:
parent
425b7de44a
commit
10793aef56
Notes:
github-actions[bot]
2025-09-19 09:07:50 +00:00
Author: https://github.com/Calme1709
Commit: 10793aef56
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6072
Reviewed-by: https://github.com/AtkinsSJ ✅
6 changed files with 33 additions and 26 deletions
|
@ -52,6 +52,7 @@
|
|||
#include <LibWeb/CSS/StyleValues/DisplayStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/EasingStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/FilterValueListStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/FontStyleStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/FrequencyStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/GridTrackPlacementStyleValue.h>
|
||||
#include <LibWeb/CSS/StyleValues/GridTrackSizeListStyleValue.h>
|
||||
|
@ -1856,7 +1857,7 @@ RefPtr<Gfx::FontCascadeList const> StyleComputer::compute_font_for_style_values(
|
|||
// FIXME: We round to int here as that is what is expected by our font infrastructure below
|
||||
auto weight = round_to<int>(font_weight);
|
||||
|
||||
auto slope = font_style.to_font_slope();
|
||||
auto slope = font_style.as_font_style().to_font_slope();
|
||||
|
||||
// FIXME: Implement the full font-matching algorithm: https://www.w3.org/TR/css-fonts-4/#font-matching-algorithm
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue