mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 16:37:35 +00:00
Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.
This commit is contained in:
parent
63814ffebf
commit
04b9dc2d30
328 changed files with 36 additions and 36 deletions
31
Libraries/LibHTML/CSS/StyleRule.h
Normal file
31
Libraries/LibHTML/CSS/StyleRule.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/NonnullRefPtrVector.h>
|
||||
#include <LibHTML/CSS/Selector.h>
|
||||
#include <LibHTML/CSS/StyleDeclaration.h>
|
||||
|
||||
class StyleRule : public RefCounted<StyleRule> {
|
||||
public:
|
||||
static NonnullRefPtr<StyleRule> create(Vector<Selector>&& selectors, NonnullRefPtrVector<StyleDeclaration>&& declarations)
|
||||
{
|
||||
return adopt(*new StyleRule(move(selectors), move(declarations)));
|
||||
}
|
||||
|
||||
~StyleRule();
|
||||
|
||||
const Vector<Selector>& selectors() const { return m_selectors; }
|
||||
const NonnullRefPtrVector<StyleDeclaration>& declarations() const { return m_declarations; }
|
||||
|
||||
template<typename C>
|
||||
void for_each_declaration(C callback) const
|
||||
{
|
||||
for (auto& declaration : m_declarations)
|
||||
callback(declaration);
|
||||
}
|
||||
|
||||
private:
|
||||
StyleRule(Vector<Selector>&&, NonnullRefPtrVector<StyleDeclaration>&&);
|
||||
|
||||
Vector<Selector> m_selectors;
|
||||
NonnullRefPtrVector<StyleDeclaration> m_declarations;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue