mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:07:34 +00:00
LibWeb: Rename parse_css()
-> parse_css_stylesheet()
This commit is contained in:
parent
820a653725
commit
05bd0ca3ee
6 changed files with 7 additions and 7 deletions
|
@ -73,7 +73,7 @@ void CSSImportRule::resource_did_load()
|
|||
dbgln_if(CSS_LOADER_DEBUG, "CSSImportRule: Resource did load, has encoded data. URL: {}", resource()->url());
|
||||
}
|
||||
|
||||
auto sheet = parse_css(CSS::ParsingContext(*m_document, resource()->url()), resource()->encoded_data());
|
||||
auto sheet = parse_css_stylesheet(CSS::ParsingContext(*m_document, resource()->url()), resource()->encoded_data());
|
||||
if (!sheet) {
|
||||
dbgln_if(CSS_LOADER_DEBUG, "CSSImportRule: Failed to parse stylesheet: {}", resource()->url());
|
||||
return;
|
||||
|
|
|
@ -5224,7 +5224,7 @@ TimePercentage Parser::Dimension::time_percentage() const
|
|||
|
||||
namespace Web {
|
||||
|
||||
RefPtr<CSS::CSSStyleSheet> parse_css(CSS::ParsingContext const& context, StringView css)
|
||||
RefPtr<CSS::CSSStyleSheet> parse_css_stylesheet(CSS::ParsingContext const& context, StringView css)
|
||||
{
|
||||
if (css.is_empty())
|
||||
return CSS::CSSStyleSheet::create({});
|
||||
|
|
|
@ -361,7 +361,7 @@ private:
|
|||
|
||||
namespace Web {
|
||||
|
||||
RefPtr<CSS::CSSStyleSheet> parse_css(CSS::ParsingContext const&, StringView);
|
||||
RefPtr<CSS::CSSStyleSheet> parse_css_stylesheet(CSS::ParsingContext const&, StringView);
|
||||
RefPtr<CSS::ElementInlineCSSStyleDeclaration> parse_css_style_attribute(CSS::ParsingContext const&, StringView, DOM::Element&);
|
||||
RefPtr<CSS::StyleValue> parse_css_value(CSS::ParsingContext const&, StringView, CSS::PropertyID property_id = CSS::PropertyID::Invalid);
|
||||
Optional<CSS::SelectorList> parse_selector(CSS::ParsingContext const&, StringView);
|
||||
|
|
|
@ -80,7 +80,7 @@ static StyleSheet& default_stylesheet()
|
|||
if (!sheet) {
|
||||
extern char const default_stylesheet_source[];
|
||||
String css = default_stylesheet_source;
|
||||
sheet = parse_css(CSS::ParsingContext(), css).leak_ref();
|
||||
sheet = parse_css_stylesheet(CSS::ParsingContext(), css).leak_ref();
|
||||
}
|
||||
return *sheet;
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ static StyleSheet& quirks_mode_stylesheet()
|
|||
if (!sheet) {
|
||||
extern char const quirks_mode_stylesheet_source[];
|
||||
String css = quirks_mode_stylesheet_source;
|
||||
sheet = parse_css(CSS::ParsingContext(), css).leak_ref();
|
||||
sheet = parse_css_stylesheet(CSS::ParsingContext(), css).leak_ref();
|
||||
}
|
||||
return *sheet;
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ void HTMLLinkElement::resource_did_load()
|
|||
}
|
||||
}
|
||||
|
||||
auto sheet = parse_css(CSS::ParsingContext(document(), resource()->url()), resource()->encoded_data());
|
||||
auto sheet = parse_css_stylesheet(CSS::ParsingContext(document(), resource()->url()), resource()->encoded_data());
|
||||
if (!sheet) {
|
||||
dbgln_if(CSS_LOADER_DEBUG, "HTMLLinkElement: Failed to parse stylesheet: {}", resource()->url());
|
||||
return;
|
||||
|
|
|
@ -126,7 +126,7 @@ void HTMLStyleElement::update_a_style_block()
|
|||
|
||||
// FIXME: This is a bit awkward, as the spec doesn't actually tell us when to parse the CSS text,
|
||||
// so we just do it here and pass the parsed sheet to create_a_css_style_sheet().
|
||||
auto sheet = parse_css(CSS::ParsingContext(document()), text_content());
|
||||
auto sheet = parse_css_stylesheet(CSS::ParsingContext(document()), text_content());
|
||||
if (!sheet)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue