1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:18:11 +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

@ -12,9 +12,11 @@
namespace Web::CSS {
CSSStyleSheet::CSSStyleSheet(NonnullRefPtrVector<CSSRule> rules)
CSSStyleSheet::CSSStyleSheet(NonnullRefPtrVector<CSSRule> rules, Optional<AK::URL> location)
: m_rules(CSSRuleList::create(move(rules)))
{
if (location.has_value())
set_location(location->to_string());
}
// https://www.w3.org/TR/cssom/#dom-cssstylesheet-insertrule