1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 16:47:36 +00:00

LibWeb: Spec-comment parse_a_stylesheet()

Also introduce a `location` parameter when parsing a CSSStyleSheet. This
is not provided by anyone yet.
This commit is contained in:
Sam Atkins 2022-03-29 16:51:31 +01:00 committed by Andreas Kling
parent 05bd0ca3ee
commit 87b125dcb9
4 changed files with 29 additions and 14 deletions

View file

@ -24,9 +24,9 @@ class CSSStyleSheet final
public:
using WrapperType = Bindings::CSSStyleSheetWrapper;
static NonnullRefPtr<CSSStyleSheet> create(NonnullRefPtrVector<CSSRule> rules)
static NonnullRefPtr<CSSStyleSheet> create(NonnullRefPtrVector<CSSRule> rules, Optional<AK::URL> location)
{
return adopt_ref(*new CSSStyleSheet(move(rules)));
return adopt_ref(*new CSSStyleSheet(move(rules), move(location)));
}
virtual ~CSSStyleSheet() override = default;
@ -53,7 +53,7 @@ public:
void set_style_sheet_list(Badge<StyleSheetList>, StyleSheetList*);
private:
explicit CSSStyleSheet(NonnullRefPtrVector<CSSRule>);
explicit CSSStyleSheet(NonnullRefPtrVector<CSSRule>, Optional<AK::URL> location);
NonnullRefPtr<CSSRuleList> m_rules;