mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-05 23:59:53 +00:00
LibWeb/CSS: Implement CSSMathNegate
This commit is contained in:
parent
e21610180f
commit
f2ec04d20d
Notes:
github-actions[bot]
2025-08-29 09:59:42 +00:00
Author: https://github.com/AtkinsSJ
Commit: f2ec04d20d
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5955
Reviewed-by: https://github.com/trflynn89
8 changed files with 144 additions and 3 deletions
|
@ -7,6 +7,7 @@
|
|||
#include "CSSMathSum.h"
|
||||
#include <LibWeb/Bindings/CSSMathSumPrototype.h>
|
||||
#include <LibWeb/Bindings/Intrinsics.h>
|
||||
#include <LibWeb/CSS/CSSMathNegate.h>
|
||||
#include <LibWeb/CSS/CSSNumericArray.h>
|
||||
#include <LibWeb/WebIDL/DOMException.h>
|
||||
#include <LibWeb/WebIDL/ExceptionOr.h>
|
||||
|
@ -109,10 +110,9 @@ String CSSMathSum::serialize_math_value(Nested nested, Parens parens) const
|
|||
|
||||
// 1. If arg is a CSSMathNegate, append " - " to s, then serialize arg’s value internal slot with nested
|
||||
// set to true, and append the result to s.
|
||||
// FIXME: Detect CSSMathNegate once that's implemented.
|
||||
if (false) {
|
||||
if (auto* negate = as_if<CSSMathNegate>(*arg)) {
|
||||
s.append(" - "sv);
|
||||
s.append(arg->to_string({ .nested = true }));
|
||||
s.append(negate->value()->to_string({ .nested = true }));
|
||||
}
|
||||
|
||||
// 2. Otherwise, append " + " to s, then serialize arg with nested set to true, and append the result to s.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue