From 004ae453d17a5d1d215d3c719fb199bed8919cb5 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Fri, 2 Jul 2021 20:25:13 +0100 Subject: 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. --- Userland/Libraries/LibWeb/Loader/CSSLoader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Userland/Libraries/LibWeb/Loader') 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; -- cgit v1.2.3