|
@@ -24,18 +24,21 @@ public:
|
|
String declaration;
|
|
String declaration;
|
|
[[nodiscard]] bool evaluate(JS::Realm&) const;
|
|
[[nodiscard]] bool evaluate(JS::Realm&) const;
|
|
String to_string() const;
|
|
String to_string() const;
|
|
|
|
+ void dump(StringBuilder&, int indent_levels = 0) const;
|
|
};
|
|
};
|
|
|
|
|
|
struct Selector {
|
|
struct Selector {
|
|
String selector;
|
|
String selector;
|
|
[[nodiscard]] bool evaluate(JS::Realm&) const;
|
|
[[nodiscard]] bool evaluate(JS::Realm&) const;
|
|
String to_string() const;
|
|
String to_string() const;
|
|
|
|
+ void dump(StringBuilder&, int indent_levels = 0) const;
|
|
};
|
|
};
|
|
|
|
|
|
struct Feature {
|
|
struct Feature {
|
|
Variant<Declaration, Selector> value;
|
|
Variant<Declaration, Selector> value;
|
|
[[nodiscard]] bool evaluate(JS::Realm&) const;
|
|
[[nodiscard]] bool evaluate(JS::Realm&) const;
|
|
String to_string() const;
|
|
String to_string() const;
|
|
|
|
+ void dump(StringBuilder&, int indent_levels = 0) const;
|
|
};
|
|
};
|
|
|
|
|
|
struct Condition;
|
|
struct Condition;
|
|
@@ -44,6 +47,7 @@ public:
|
|
|
|
|
|
[[nodiscard]] bool evaluate(JS::Realm&) const;
|
|
[[nodiscard]] bool evaluate(JS::Realm&) const;
|
|
String to_string() const;
|
|
String to_string() const;
|
|
|
|
+ void dump(StringBuilder&, int indent_levels = 0) const;
|
|
};
|
|
};
|
|
|
|
|
|
struct Condition {
|
|
struct Condition {
|
|
@@ -57,6 +61,7 @@ public:
|
|
|
|
|
|
[[nodiscard]] bool evaluate(JS::Realm&) const;
|
|
[[nodiscard]] bool evaluate(JS::Realm&) const;
|
|
String to_string() const;
|
|
String to_string() const;
|
|
|
|
+ void dump(StringBuilder&, int indent_levels = 0) const;
|
|
};
|
|
};
|
|
|
|
|
|
static NonnullRefPtr<Supports> create(JS::Realm& realm, NonnullOwnPtr<Condition>&& condition)
|
|
static NonnullRefPtr<Supports> create(JS::Realm& realm, NonnullOwnPtr<Condition>&& condition)
|
|
@@ -67,6 +72,8 @@ public:
|
|
bool matches() const { return m_matches; }
|
|
bool matches() const { return m_matches; }
|
|
String to_string() const;
|
|
String to_string() const;
|
|
|
|
|
|
|
|
+ void dump(StringBuilder&, int indent_levels = 0) const;
|
|
|
|
+
|
|
private:
|
|
private:
|
|
Supports(JS::Realm&, NonnullOwnPtr<Condition>&&);
|
|
Supports(JS::Realm&, NonnullOwnPtr<Condition>&&);
|
|
|
|
|