mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-19 15:32:31 +00:00
LibWeb/CSS: Use CSS::URL for font-fetching
ParsedFontFace and FontLoader now both keep track of which CSSStyleSheet (if any) was the source of the font-face, so the URLs can be completed correctly.
This commit is contained in:
parent
14fb567a0f
commit
9e2e796f2d
Notes:
github-actions[bot]
2025-05-03 11:02:47 +00:00
Author: https://github.com/AtkinsSJ
Commit: 9e2e796f2d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4536
9 changed files with 38 additions and 31 deletions
|
@ -3813,10 +3813,6 @@ RefPtr<FontSourceStyleValue const> Parser::parse_font_source_value(TokenStream<C
|
|||
auto url = parse_url_function(tokens);
|
||||
if (!url.has_value())
|
||||
return nullptr;
|
||||
// FIXME: Stop completing the URL here
|
||||
auto completed_url = complete_url(url->url());
|
||||
if (!completed_url.has_value())
|
||||
return nullptr;
|
||||
|
||||
Optional<FlyString> format;
|
||||
|
||||
|
@ -3859,7 +3855,7 @@ RefPtr<FontSourceStyleValue const> Parser::parse_font_source_value(TokenStream<C
|
|||
// FIXME: [ tech( <font-tech>#)]?
|
||||
|
||||
transaction.commit();
|
||||
return FontSourceStyleValue::create(completed_url.release_value(), move(format));
|
||||
return FontSourceStyleValue::create(url.release_value(), move(format));
|
||||
}
|
||||
|
||||
NonnullRefPtr<CSSStyleValue const> Parser::resolve_unresolved_style_value(ParsingParams const& context, DOM::Element& element, Optional<PseudoElement> pseudo_element, PropertyID property_id, UnresolvedStyleValue const& unresolved)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue