1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:57:45 +00:00

LibWeb: Support CSSRule.type

We already had the CSSRule::Type enum, but the values were not aligned
with the CSSOM spec. This patch takes care of that, and then exposes
the type of a CSSRule to JavaScript via the "type" attribute.
This commit is contained in:
Andreas Kling 2022-04-11 21:04:47 +02:00
parent a0ba49a50a
commit f4f850aaf2
4 changed files with 19 additions and 13 deletions

View file

@ -24,13 +24,13 @@ public:
virtual ~CSSRule() = default;
enum class Type : u32 {
Style,
Import,
Media,
Supports,
FontFace,
__Count,
// https://drafts.csswg.org/cssom/#dom-cssrule-type
enum class Type : u16 {
Style = 1,
Import = 3,
Media = 4,
FontFace = 5,
Supports = 12,
};
virtual StringView class_name() const = 0;