1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:17:44 +00:00

LibWeb: Split CSS::StyleSheet into StyleSheet and CSSStyleSheet

This is a little convoluted but matches the CSSOM specification.
This commit is contained in:
Andreas Kling 2021-03-07 16:14:04 +01:00
parent 0af4762662
commit fefb05f6f3
17 changed files with 162 additions and 82 deletions

View file

@ -46,18 +46,18 @@ public:
const URL& url() const { return m_url; }
bool has_import_result() const { return !m_style_sheet.is_null(); }
RefPtr<StyleSheet> loaded_style_sheet() { return m_style_sheet; }
const RefPtr<StyleSheet> loaded_style_sheet() const { return m_style_sheet; }
RefPtr<CSSStyleSheet> loaded_style_sheet() { return m_style_sheet; }
const RefPtr<CSSStyleSheet> loaded_style_sheet() const { return m_style_sheet; }
void set_style_sheet(const RefPtr<StyleSheet>& style_sheet) { m_style_sheet = style_sheet; }
virtual StringView class_name() const { return "CSSImportRule"; };
virtual Type type() const { return Type::Import; };
private:
CSSImportRule(URL);
explicit CSSImportRule(URL);
URL m_url;
RefPtr<StyleSheet> m_style_sheet;
RefPtr<CSSStyleSheet> m_style_sheet;
};
}