mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-21 01:31:55 +00:00
LibWeb: Rename CSS::FontFace to CSS::ParsedFontFace
This implementation detail of CSSFontFaceRule is hogging the name of a Web API from CSS Font Loading Module Level 3.
This commit is contained in:
parent
3f113e728f
commit
3a5eabc43b
Notes:
sideshowbarker
2024-07-16 21:42:29 +09:00
Author: https://github.com/ADKaster
Commit: 3a5eabc43b
Pull-request: https://github.com/SerenityOS/serenity/pull/24255
Issue: https://github.com/SerenityOS/serenity/issues/22014
8 changed files with 23 additions and 23 deletions
|
@ -4448,7 +4448,7 @@ CSSRule* Parser::parse_font_face_rule(TokenStream<ComponentValue>& tokens)
|
|||
auto declarations_and_at_rules = parse_a_list_of_declarations(tokens);
|
||||
|
||||
Optional<FlyString> font_family;
|
||||
Vector<FontFace::Source> src;
|
||||
Vector<ParsedFontFace::Source> src;
|
||||
Vector<Gfx::UnicodeRange> unicode_range;
|
||||
Optional<int> weight;
|
||||
Optional<int> slope;
|
||||
|
@ -4520,7 +4520,7 @@ CSSRule* Parser::parse_font_face_rule(TokenStream<ComponentValue>& tokens)
|
|||
}
|
||||
if (declaration.name().equals_ignoring_ascii_case("src"sv)) {
|
||||
TokenStream token_stream { declaration.values() };
|
||||
Vector<FontFace::Source> supported_sources = parse_font_face_src(token_stream);
|
||||
Vector<ParsedFontFace::Source> supported_sources = parse_font_face_src(token_stream);
|
||||
if (!supported_sources.is_empty())
|
||||
src = move(supported_sources);
|
||||
continue;
|
||||
|
@ -4560,10 +4560,10 @@ CSSRule* Parser::parse_font_face_rule(TokenStream<ComponentValue>& tokens)
|
|||
unicode_range.empend(0x0u, 0x10FFFFu);
|
||||
}
|
||||
|
||||
return CSSFontFaceRule::create(m_context.realm(), FontFace { font_family.release_value(), weight, slope, move(src), move(unicode_range) });
|
||||
return CSSFontFaceRule::create(m_context.realm(), ParsedFontFace { font_family.release_value(), weight, slope, move(src), move(unicode_range) });
|
||||
}
|
||||
|
||||
Vector<FontFace::Source> Parser::parse_font_face_src(TokenStream<ComponentValue>& component_values)
|
||||
Vector<ParsedFontFace::Source> Parser::parse_font_face_src(TokenStream<ComponentValue>& component_values)
|
||||
{
|
||||
// FIXME: Get this information from the system somehow?
|
||||
// Format-name table: https://www.w3.org/TR/css-fonts-4/#font-format-definitions
|
||||
|
@ -4574,7 +4574,7 @@ Vector<FontFace::Source> Parser::parse_font_face_src(TokenStream<ComponentValue>
|
|||
return false;
|
||||
};
|
||||
|
||||
Vector<FontFace::Source> supported_sources;
|
||||
Vector<ParsedFontFace::Source> supported_sources;
|
||||
|
||||
auto list_of_source_token_lists = parse_a_comma_separated_list_of_component_values(component_values);
|
||||
for (auto const& source_token_list : list_of_source_token_lists) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue