mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-04 23:29:52 +00:00
LibWeb/CSS: Implement CSSKeywordValue
CSSStyleValue is adjusted to allow for subclasses. Serialization for CSSKeywordValue is implemented differently than the spec says because of a spec bug: https://github.com/w3c/csswg-drafts/issues/12545
This commit is contained in:
parent
030e670fcb
commit
a93c6a347f
Notes:
github-actions[bot]
2025-08-21 09:23:30 +00:00
Author: https://github.com/AtkinsSJ
Commit: a93c6a347f
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5901
14 changed files with 150 additions and 21 deletions
|
@ -18,6 +18,11 @@ GC::Ref<CSSStyleValue> CSSStyleValue::create(JS::Realm& realm, String associated
|
|||
return realm.create<CSSStyleValue>(realm, move(associated_property), move(constructed_from_string));
|
||||
}
|
||||
|
||||
CSSStyleValue::CSSStyleValue(JS::Realm& realm)
|
||||
: PlatformObject(realm)
|
||||
{
|
||||
}
|
||||
|
||||
CSSStyleValue::CSSStyleValue(JS::Realm& realm, String associated_property, String constructed_from_string)
|
||||
: PlatformObject(realm)
|
||||
, m_associated_property(move(associated_property))
|
||||
|
@ -39,9 +44,10 @@ String CSSStyleValue::to_string() const
|
|||
// the serialization is the USVString from which the value was constructed.
|
||||
return m_constructed_from_string.value();
|
||||
}
|
||||
// FIXME: otherwise, if the value was constructed using an IDL constructor
|
||||
// otherwise, if the value was constructed using an IDL constructor
|
||||
{
|
||||
// the serialization is specified in the sections below.
|
||||
// NB: This is handled by subclasses overriding this to_string() method.
|
||||
}
|
||||
// FIXME: otherwise, if the value was extracted from the CSSOM
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue