mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-05-24 12:02:51 +00:00
LibWeb/CSS: Store @property
initial value as a style value
For now, it's the "raw" UnresolvedStyleValue. Later, we'll need to try to parse it into a "real" style value using the property's syntax.
This commit is contained in:
parent
9292b769ef
commit
a80408fea6
Notes:
github-actions[bot]
2025-04-08 09:00:42 +00:00
Author: https://github.com/AtkinsSJ
Commit: a80408fea6
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/4265
4 changed files with 24 additions and 19 deletions
|
@ -21,17 +21,17 @@ class CSSPropertyRule final : public CSSRule {
|
|||
GC_DECLARE_ALLOCATOR(CSSPropertyRule);
|
||||
|
||||
public:
|
||||
static GC::Ref<CSSPropertyRule> create(JS::Realm&, FlyString name, FlyString syntax, bool inherits, Optional<String> initial_value);
|
||||
static GC::Ref<CSSPropertyRule> create(JS::Realm&, FlyString name, FlyString syntax, bool inherits, RefPtr<CSSStyleValue> initial_value);
|
||||
|
||||
virtual ~CSSPropertyRule() = default;
|
||||
|
||||
FlyString const& name() const { return m_name; }
|
||||
FlyString const& syntax() const { return m_syntax; }
|
||||
bool inherits() const { return m_inherits; }
|
||||
Optional<String> initial_value() const { return m_initial_value; }
|
||||
Optional<String> initial_value() const;
|
||||
|
||||
private:
|
||||
CSSPropertyRule(JS::Realm&, FlyString name, FlyString syntax, bool inherits, Optional<String> initial_value);
|
||||
CSSPropertyRule(JS::Realm&, FlyString name, FlyString syntax, bool inherits, RefPtr<CSSStyleValue> initial_value);
|
||||
|
||||
virtual void initialize(JS::Realm&) override;
|
||||
virtual String serialized() const override;
|
||||
|
@ -39,8 +39,7 @@ private:
|
|||
FlyString m_name;
|
||||
FlyString m_syntax;
|
||||
bool m_inherits;
|
||||
// FIXME: This should hold an actual CSS value, matching the syntax
|
||||
Optional<String> m_initial_value;
|
||||
RefPtr<CSSStyleValue> m_initial_value;
|
||||
};
|
||||
|
||||
template<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue