1
Fork 0
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:
Andreas Kling 2019-06-25 06:31:47 +02:00
parent 048705e1c2
commit 6469d7f043
3 changed files with 42 additions and 1 deletions

View file

@ -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>>&&);