2024-09-02 11:45:25 -04:00
|
|
|
/*
|
|
|
|
* Copyright (c) 2024, Sam Atkins <sam@ladybird.org>
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <LibWeb/CSS/CSSRule.h>
|
|
|
|
|
|
|
|
namespace Web::CSS {
|
|
|
|
|
|
|
|
// https://drafts.csswg.org/css-cascade-5/#the-csslayerstatementrule-interface
|
|
|
|
class CSSLayerStatementRule final : public CSSRule {
|
|
|
|
WEB_PLATFORM_OBJECT(CSSLayerStatementRule, CSSRule);
|
2024-11-14 10:01:23 -05:00
|
|
|
GC_DECLARE_ALLOCATOR(CSSLayerStatementRule);
|
2024-09-02 11:45:25 -04:00
|
|
|
|
|
|
|
public:
|
2024-11-14 10:01:23 -05:00
|
|
|
[[nodiscard]] static GC::Ref<CSSLayerStatementRule> create(JS::Realm&, Vector<FlyString> name_list);
|
2024-09-02 11:45:25 -04:00
|
|
|
|
|
|
|
virtual ~CSSLayerStatementRule() = default;
|
|
|
|
|
|
|
|
// FIXME: Should be FrozenArray
|
|
|
|
ReadonlySpan<FlyString> name_list() const { return m_name_list; }
|
|
|
|
Vector<FlyString> internal_qualified_name_list(Badge<StyleComputer>) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
CSSLayerStatementRule(JS::Realm&, Vector<FlyString> name_list);
|
|
|
|
|
|
|
|
virtual void initialize(JS::Realm&) override;
|
|
|
|
virtual String serialized() const override;
|
|
|
|
|
|
|
|
Vector<FlyString> m_name_list;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|