mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 21:45:20 +00:00
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.
34 lines
706 B
C++
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;
|
|
};
|
|
}
|