mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-07 21:59:54 +00:00
LibWeb/CSS: Take AbstractElement in font computation methods
This commit is contained in:
parent
263c51f6ac
commit
64c3319147
Notes:
github-actions[bot]
2025-09-11 16:48:19 +00:00
Author: https://github.com/AtkinsSJ
Commit: 64c3319147
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6118
4 changed files with 24 additions and 28 deletions
|
|
@ -103,9 +103,9 @@ public:
|
|||
auto font_list = font_source.visit(
|
||||
[&](DOM::Document* document) -> RefPtr<Gfx::FontCascadeList const> {
|
||||
if constexpr (SameAs<CanvasType, HTML::HTMLCanvasElement>) {
|
||||
return document->style_computer().compute_font_for_style_values(&canvas_element, {}, font_family, font_size, font_style, font_weight, font_width);
|
||||
return document->style_computer().compute_font_for_style_values(DOM::AbstractElement { canvas_element, {} }, font_family, font_size, font_style, font_weight, font_width);
|
||||
} else {
|
||||
return document->style_computer().compute_font_for_style_values(nullptr, {}, font_family, font_size, font_style, font_weight, font_width);
|
||||
return document->style_computer().compute_font_for_style_values({}, font_family, font_size, font_style, font_weight, font_width);
|
||||
}
|
||||
},
|
||||
[](HTML::WorkerGlobalScope*) -> RefPtr<Gfx::FontCascadeList const> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue