mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:37:43 +00:00
LibHTML: More work on the CSS object model.
This commit is contained in:
parent
d343fb2429
commit
02e02ca3a5
6 changed files with 41 additions and 12 deletions
|
@ -3,15 +3,21 @@
|
|||
#include <AK/AKString.h>
|
||||
#include <LibHTML/CSS/StyleValue.h>
|
||||
|
||||
class StyleDeclaration {
|
||||
class StyleDeclaration : public RefCounted<StyleDeclaration> {
|
||||
public:
|
||||
StyleDeclaration();
|
||||
NonnullRefPtr<StyleDeclaration> create(const String& property_name, NonnullRefPtr<StyleValue>&& value)
|
||||
{
|
||||
return adopt(*new StyleDeclaration(property_name, move(value)));
|
||||
}
|
||||
|
||||
~StyleDeclaration();
|
||||
|
||||
const String& property_name() const { return m_property_name; }
|
||||
const StyleValue& value() const { return *m_value; }
|
||||
|
||||
public:
|
||||
StyleDeclaration(const String& property_name, NonnullRefPtr<StyleValue>&&);
|
||||
|
||||
String m_property_name;
|
||||
RefPtr<StyleValue> m_value;
|
||||
NonnullRefPtr<StyleValue> m_value;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue