mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-20 19:45:12 +00:00
LibWeb: Remove unintentional recursion in ValidityState::valid
This commit is contained in:
parent
8e3798b25e
commit
dd8cca180f
Notes:
github-actions[bot]
2025-02-18 20:59:34 +00:00
Author: https://github.com/tcl3 Commit: https://github.com/LadybirdBrowser/ladybird/commit/dd8cca180ff Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3618 Reviewed-by: https://github.com/gmta ✅
2 changed files with 7 additions and 1 deletions
|
@ -109,7 +109,7 @@ bool ValidityState::custom_error() const
|
|||
// https://html.spec.whatwg.org/multipage/form-control-infrastructure.html#dom-validitystate-valid
|
||||
bool ValidityState::valid() const
|
||||
{
|
||||
return !(value_missing() || type_mismatch() || pattern_mismatch() || too_long() || too_short() || range_underflow() || range_overflow() || step_mismatch() || bad_input() || custom_error() || valid());
|
||||
return !(value_missing() || type_mismatch() || pattern_mismatch() || too_long() || too_short() || range_underflow() || range_overflow() || step_mismatch() || bad_input() || custom_error());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
6
Tests/LibWeb/Crash/HTML/validity-attribute.html
Normal file
6
Tests/LibWeb/Crash/HTML/validity-attribute.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<input>
|
||||
<script>
|
||||
const input = document.querySelector('input');
|
||||
const isValid = input.validity.valid;
|
||||
</script>
|
Loading…
Add table
Reference in a new issue