summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Loader
diff options
context:
space:
mode:
authorSam Atkins <atkinssj@gmail.com>2021-07-02 20:25:13 +0100
committerAndreas Kling <kling@serenityos.org>2021-07-11 23:19:56 +0200
commit004ae453d17a5d1d215d3c719fb199bed8919cb5 (patch)
treea7cd01e6c05cb0b80b82b7952c55f0c18743049d /Userland/Libraries/LibWeb/Loader
parent390cc30a9707b36477b1042359249f7e448038c0 (diff)
downloadserenity-004ae453d17a5d1d215d3c719fb199bed8919cb5.zip
LibWeb: Add context to new CSS parser, and deprecate the old one
The new one is the same as the old one, just in the new Parser's source files. This isn't the most elegant solution but it seemed like the best option. And it's all temporary, after all.
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader')
-rw-r--r--Userland/Libraries/LibWeb/Loader/CSSLoader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/CSSLoader.cpp b/Userland/Libraries/LibWeb/Loader/CSSLoader.cpp
index 27cb13f661..bfb9597e32 100644
--- a/Userland/Libraries/LibWeb/Loader/CSSLoader.cpp
+++ b/Userland/Libraries/LibWeb/Loader/CSSLoader.cpp
@@ -23,7 +23,7 @@ CSSLoader::CSSLoader(DOM::Element& owner_element)
void CSSLoader::load_from_text(const String& text)
{
- m_style_sheet = parse_css(CSS::ParsingContext(m_owner_element.document()), text);
+ m_style_sheet = parse_css(CSS::DeprecatedParsingContext(m_owner_element.document()), text);
if (!m_style_sheet) {
m_style_sheet = CSS::CSSStyleSheet::create({});
m_style_sheet->set_owner_node(&m_owner_element);
@@ -51,7 +51,7 @@ void CSSLoader::resource_did_load()
dbgln_if(CSS_LOADER_DEBUG, "CSSLoader: Resource did load, has encoded data. URL: {}", resource()->url());
}
- auto sheet = parse_css(CSS::ParsingContext(m_owner_element.document()), resource()->encoded_data());
+ auto sheet = parse_css(CSS::DeprecatedParsingContext(m_owner_element.document()), resource()->encoded_data());
if (!sheet) {
dbgln_if(CSS_LOADER_DEBUG, "CSSLoader: Failed to parse stylesheet: {}", resource()->url());
return;