LibWeb: Don't crash when encountering a resolution in a calculation
calc() seems to support resolutions by now. The change allows us to pass this WPT test: http://wpt.live/css/css-values/round-mod-rem-invalid.html
This commit is contained in:
parent
7ed08a401f
commit
3804c4dea1
Notes:
github-actions[bot]
2024-10-13 04:23:56 +00:00
Author: https://github.com/skyz1 Commit: https://github.com/LadybirdBrowser/ladybird/commit/3804c4dea1a Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1757 Reviewed-by: https://github.com/AtkinsSJ ✅
1 changed files with 3 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
|||
* Copyright (c) 2024, Shannon Booth <shannon@serenityos.org>
|
||||
* Copyright (c) 2024, Tommy van der Vorst <tommy@pixelspark.nl>
|
||||
* Copyright (c) 2024, Matthew Olsson <mattco@serenityos.org>
|
||||
* Copyright (c) 2024, Glenn Skrzypczak <glenn.skrzypczak@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -8437,7 +8438,8 @@ OwnPtr<CalculationNode> Parser::parse_a_calculation(Vector<ComponentValue> const
|
|||
values.append({ NumericCalculationNode::create(dimension->length()) });
|
||||
else if (dimension->is_percentage())
|
||||
values.append({ NumericCalculationNode::create(dimension->percentage()) });
|
||||
// FIXME: Resolutions, once calc() supports them.
|
||||
else if (dimension->is_resolution())
|
||||
values.append({ NumericCalculationNode::create(dimension->resolution()) });
|
||||
else if (dimension->is_time())
|
||||
values.append({ NumericCalculationNode::create(dimension->time()) });
|
||||
else if (dimension->is_flex()) {
|
||||
|
|
Loading…
Add table
Reference in a new issue