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

LibWeb: Use new GeneralEnclosed class in Supports

This commit is contained in:
Sam Atkins 2021-11-24 14:20:59 +00:00 committed by Andreas Kling
parent e760263728
commit 99e18f40fb
3 changed files with 11 additions and 55 deletions

View file

@ -11,6 +11,7 @@
#include <AK/String.h>
#include <AK/Variant.h>
#include <AK/Vector.h>
#include <LibWeb/CSS/GeneralEnclosed.h>
#include <LibWeb/CSS/Parser/StyleDeclarationRule.h>
namespace Web::CSS {
@ -18,30 +19,7 @@ namespace Web::CSS {
class Supports final : public RefCounted<Supports> {
friend class Parser;
private:
enum class MatchResult {
False,
True,
Unknown,
};
static MatchResult negate(MatchResult value)
{
switch (value) {
case MatchResult::False:
return MatchResult::True;
case MatchResult::True:
return MatchResult::False;
case MatchResult::Unknown:
return MatchResult::Unknown;
}
VERIFY_NOT_REACHED();
}
public:
struct GeneralEnclosed {
};
struct Feature {
// FIXME: Using this internal parser class is a bit of a hack.
StyleDeclarationRule declaration;