ladybird/Userland/Libraries/LibWeb/CSS/Parser/StyleFunctionRule.h
Sam Atkins ffc81cbfad LibWeb: Use Selectors instead of a String for :not() selectors
Rather than parsing the selector every time we want to check it, we
now parse it once at the beginning.

A bonus effect of this is that we now support a selector list in
:not(), instead of just a single selector, though only when using
the new parser.
2021-07-14 13:31:00 +02:00

34 lines
706 B
C++

/*
* Copyright (c) 2020-2021, the SerenityOS developers.
* Copyright (c) 2021, Sam Atkins <atkinssj@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/RefCounted.h>
#include <AK/String.h>
#include <AK/Vector.h>
namespace Web::CSS {
class StyleComponentValueRule;
class StyleFunctionRule : public RefCounted<StyleFunctionRule> {
friend class Parser;
public:
StyleFunctionRule(String name);
~StyleFunctionRule();
String const& name() const { return m_name; }
Vector<StyleComponentValueRule> const& values() const { return m_values; }
String to_string() const;
private:
String m_name;
Vector<StyleComponentValueRule> m_values;
};
}