summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h
diff options
context:
space:
mode:
authorSviatoslav Peleshko <speles@mail.ua>2021-02-21 18:44:17 +0200
committerAndreas Kling <kling@serenityos.org>2021-02-28 10:27:32 +0100
commit183ebaee91a6a5b7ca2b8a91395e562070630c48 (patch)
tree7509b85619e44dcbe7d6330b3e4fc19c52a9e7a4 /Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h
parent54617e1a9109b28b00599a247de2f9607152c129 (diff)
downloadserenity-183ebaee91a6a5b7ca2b8a91395e562070630c48.zip
LibWeb: Add actual document loading for the CSS (at)import rule
Diffstat (limited to 'Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h')
-rw-r--r--Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h15
1 files changed, 4 insertions, 11 deletions
diff --git a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h
index d225cf8bbd..f9d4434cd0 100644
--- a/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h
+++ b/Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
+ * Copyright (c) 2021, the SerenityOS developers.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,13 +28,11 @@
#pragma once
#include <LibWeb/HTML/HTMLElement.h>
-#include <LibWeb/Loader/Resource.h>
+#include <LibWeb/Loader/CSSLoader.h>
namespace Web::HTML {
-class HTMLLinkElement final
- : public HTMLElement
- , public ResourceClient {
+class HTMLLinkElement final : public HTMLElement {
public:
using WrapperType = Bindings::HTMLLinkElementWrapper;
@@ -47,14 +46,8 @@ public:
String href() const { return attribute(HTML::AttributeNames::href); }
private:
- // ^ResourceClient
- virtual void resource_did_fail() override;
- virtual void resource_did_load() override;
-
void parse_attribute(const FlyString&, const String&) override;
- void load_stylesheet(const URL&);
-
struct Relationship {
enum {
Alternate = 1 << 0,
@@ -63,7 +56,7 @@ private:
};
unsigned m_relationship { 0 };
- RefPtr<CSS::StyleSheet> m_style_sheet;
+ CSSLoader m_css_loader;
};
}