mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 03:09:08 +00:00
LibWeb: Implement CSSRule and CSSStyleDeclaration serialization
There are a handful of FIXME's here, but this seems generally good. Note that CSS *values* don't get serialized in a spec-compliant way since we currently rely on StyleValue::to_string() which is ad-hoc.
This commit is contained in:
@@ -579,4 +579,15 @@ bool ResolvedCSSStyleDeclaration::set_property(PropertyID, StringView)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
String ResolvedCSSStyleDeclaration::serialized() const
|
||||
{
|
||||
// https://drafts.csswg.org/cssom/#dom-cssstyledeclaration-csstext
|
||||
// If the computed flag is set, then return the empty string.
|
||||
|
||||
// NOTE: ResolvedCSSStyleDeclaration is something you would only get from window.getComputedStyle(),
|
||||
// which returns what the spec calls "resolved style". The "computed flag" is always set here.
|
||||
return String::empty();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user