mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb: Absolutize StyleValues before computing font properties
We also avoid prematurely constructing CSSPixels when computing font-size which gains us a couple of test passes
This commit is contained in:
parent
ca9d107a1a
commit
28451b16c9
Notes:
github-actions[bot]
2025-10-20 15:14:19 +00:00
Author: https://github.com/Calme1709
Commit: 28451b16c9
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6426
Reviewed-by: https://github.com/AtkinsSJ ✅
5 changed files with 53 additions and 45 deletions
|
|
@ -112,6 +112,8 @@ public:
|
|||
// NOTE: The initial value here is non-standard as the default font is "10px sans-serif"
|
||||
auto inherited_font_size = CSSPixels { 10 };
|
||||
auto inherited_font_weight = CSS::InitialValues::font_weight();
|
||||
// FIXME: Investigate whether this is the correct resolution context (i.e. whether we should instead use
|
||||
// a font-size of 10px) for OffscreenCanvas
|
||||
auto length_resolution_context = CSS::Length::ResolutionContext::for_window(*document->window());
|
||||
|
||||
if constexpr (SameAs<CanvasType, HTML::HTMLCanvasElement>) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue