1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-19 20:05:07 +00:00
serenity/Userland/Libraries/LibWeb/CSS/Parser/QualifiedStyleRule.h
Sam Atkins 89bfde29dc LibWeb: Convert some CSS parser *Rule classes to using pointers
Previously these were all passed around by value, but some of them
(StyleComponentValueRule and StyleBlockRule) want to include each
other as fields, so this had to change.
2021-07-11 23:19:56 +02:00

33 lines
710 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/Vector.h>
#include <LibWeb/CSS/Parser/StyleBlockRule.h>
#include <LibWeb/CSS/Parser/StyleComponentValueRule.h>
namespace Web::CSS {
class QualifiedStyleRule {
friend class Parser;
public:
QualifiedStyleRule();
~QualifiedStyleRule();
Vector<StyleComponentValueRule> const& prelude() const { return m_prelude; }
StyleBlockRule const& block() const { return *m_block; }
String to_string() const;
private:
Vector<StyleComponentValueRule> m_prelude;
RefPtr<StyleBlockRule> m_block;
};
}