mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 01:58:12 +00:00
LibHTML: Flesh out the code to dump a StyleSheet object graph.
This commit is contained in:
parent
048705e1c2
commit
6469d7f043
3 changed files with 42 additions and 1 deletions
|
@ -13,6 +13,16 @@ public:
|
|||
|
||||
~StyleRule();
|
||||
|
||||
const Vector<Selector>& selectors() const { return m_selectors; }
|
||||
const Vector<NonnullRefPtr<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>&&, Vector<NonnullRefPtr<StyleDeclaration>>&&);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue