mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-15 20:49:41 +00:00
LibWeb/CSS: Implement CSSNumericType.equals()
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
Some checks are pending
CI / macOS, arm64, Sanitizer, Clang (push) Waiting to run
CI / Linux, x86_64, Fuzzers, Clang (push) Waiting to run
CI / Linux, x86_64, Sanitizer, GNU (push) Waiting to run
CI / Linux, x86_64, Sanitizer, Clang (push) Waiting to run
Package the js repl as a binary artifact / Linux, arm64 (push) Waiting to run
Package the js repl as a binary artifact / macOS, arm64 (push) Waiting to run
Package the js repl as a binary artifact / Linux, x86_64 (push) Waiting to run
Run test262 and test-wasm / run_and_update_results (push) Waiting to run
Lint Code / lint (push) Waiting to run
Label PRs with merge conflicts / auto-labeler (push) Waiting to run
Push notes / build (push) Waiting to run
This commit is contained in:
parent
d29084997e
commit
7be645a091
Notes:
github-actions[bot]
2025-08-29 09:58:23 +00:00
Author: https://github.com/AtkinsSJ
Commit: 7be645a091
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5955
Reviewed-by: https://github.com/trflynn89
22 changed files with 181 additions and 16 deletions
|
@ -116,4 +116,18 @@ GC::Ref<CSSNumericArray> CSSMathMin::values() const
|
|||
return m_values;
|
||||
}
|
||||
|
||||
// https://drafts.css-houdini.org/css-typed-om-1/#equal-numeric-value
|
||||
bool CSSMathMin::is_equal_numeric_value(GC::Ref<CSSNumericValue> other) const
|
||||
{
|
||||
// NB: Only steps 1 and 3 are relevant.
|
||||
// 1. If value1 and value2 are not members of the same interface, return false.
|
||||
auto* other_min = as_if<CSSMathMin>(*other);
|
||||
if (!other_min)
|
||||
return false;
|
||||
|
||||
// 3. If value1 and value2 are both CSSMathSums, CSSMathProducts, CSSMathMins, or CSSMathMaxs:
|
||||
// NB: Substeps are implemented in CSSNumericArray.
|
||||
return m_values->is_equal_numeric_values(other_min->m_values);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue