summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/Loader
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-03-07 16:14:04 +0100
committerAndreas Kling <kling@serenityos.org>2021-03-07 17:45:15 +0100
commitfefb05f6f3caa7b531c3981fb1c539e9396f74d4 (patch)
tree4e44e2c3ace9818d0c354da2cd96380388709d9c /Userland/Libraries/LibWeb/Loader
parent0af476266200a707770959173c9e7e2028235119 (diff)
downloadserenity-fefb05f6f3caa7b531c3981fb1c539e9396f74d4.zip
LibWeb: Split CSS::StyleSheet into StyleSheet and CSSStyleSheet
This is a little convoluted but matches the CSSOM specification.
Diffstat (limited to 'Userland/Libraries/LibWeb/Loader')
-rw-r--r--Userland/Libraries/LibWeb/Loader/CSSLoader.cpp4
-rw-r--r--Userland/Libraries/LibWeb/Loader/CSSLoader.h6
2 files changed, 5 insertions, 5 deletions
diff --git a/Userland/Libraries/LibWeb/Loader/CSSLoader.cpp b/Userland/Libraries/LibWeb/Loader/CSSLoader.cpp
index f73465b60a..ec49234d30 100644
--- a/Userland/Libraries/LibWeb/Loader/CSSLoader.cpp
+++ b/Userland/Libraries/LibWeb/Loader/CSSLoader.cpp
@@ -43,14 +43,14 @@ void CSSLoader::load_from_text(const String& text)
{
m_style_sheet = parse_css(CSS::ParsingContext(*m_document), text);
if (!m_style_sheet)
- m_style_sheet = CSS::StyleSheet::create({});
+ m_style_sheet = CSS::CSSStyleSheet::create({});
load_next_import_if_needed();
}
void CSSLoader::load_from_url(const URL& url)
{
- m_style_sheet = CSS::StyleSheet::create({});
+ m_style_sheet = CSS::CSSStyleSheet::create({});
LoadRequest request;
request.set_url(url);
diff --git a/Userland/Libraries/LibWeb/Loader/CSSLoader.h b/Userland/Libraries/LibWeb/Loader/CSSLoader.h
index 0263182938..01eb265433 100644
--- a/Userland/Libraries/LibWeb/Loader/CSSLoader.h
+++ b/Userland/Libraries/LibWeb/Loader/CSSLoader.h
@@ -27,7 +27,7 @@
#pragma once
#include <AK/Function.h>
-#include <LibWeb/CSS/StyleSheet.h>
+#include <LibWeb/CSS/CSSStyleSheet.h>
#include <LibWeb/Loader/Resource.h>
namespace Web {
@@ -41,7 +41,7 @@ public:
void load_next_import_if_needed();
- RefPtr<CSS::StyleSheet> style_sheet() const { return m_style_sheet; };
+ RefPtr<CSS::CSSStyleSheet> style_sheet() const { return m_style_sheet; };
Function<void()> on_load;
Function<void()> on_fail;
@@ -51,7 +51,7 @@ private:
virtual void resource_did_load() override;
virtual void resource_did_fail() override;
- RefPtr<CSS::StyleSheet> m_style_sheet;
+ RefPtr<CSS::CSSStyleSheet> m_style_sheet;
const DOM::Document* m_document;
};