From 183ebaee91a6a5b7ca2b8a91395e562070630c48 Mon Sep 17 00:00:00 2001 From: Sviatoslav Peleshko Date: Sun, 21 Feb 2021 18:44:17 +0200 Subject: LibWeb: Add actual document loading for the CSS (at)import rule --- Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) (limited to 'Userland/Libraries/LibWeb/HTML/HTMLLinkElement.h') 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 + * 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 -#include +#include 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 m_style_sheet; + CSSLoader m_css_loader; }; } -- cgit v1.2.3