Jonatan Klemets
9812031a02
LibWeb: Implement spec-compliant integer parsing
...
We have code inside LibWeb that uses the
`AK::StringUtils::convert_to_uint`and `AK::StringUtils::convert_to_int`
methods for parsing integers. This works well for the most part, but
according to the spec, trailing characters are allowed and should be
ignored, but this is not how the `StringUtil` methods are implemented.
This patch adds two new methods named `parse_integer` and
`parse_non_negative_integer` inside the `Web::HTML` namespace that uses
`StringUtils` under the hood but adds a bit more logic to make it spec
compliant.
2023-08-24 22:26:53 +01:00
..
2023-08-22 17:51:48 +01:00
2023-08-23 20:21:09 +02:00
2023-08-19 17:34:22 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-24 11:03:57 -06:00
2023-08-23 20:14:20 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-24 11:03:57 -06:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-24 11:03:57 -06:00
2023-08-13 15:38:42 +02:00
2023-08-19 17:34:22 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-19 17:34:22 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-19 17:34:22 +02:00
2023-08-20 11:04:03 +02:00
2023-08-20 11:04:03 +02:00
2023-08-20 11:04:03 +02:00
2023-08-19 17:34:22 +02:00
2023-08-14 16:26:34 +02:00
2023-08-13 15:38:42 +02:00
2023-08-23 20:14:20 +02:00
2023-08-23 20:14:20 +02:00
2023-08-19 17:34:22 +02:00
2023-08-13 15:38:42 +02:00
2023-08-19 17:34:22 +02:00
2023-08-19 15:12:00 +02:00
2023-08-13 15:38:42 +02:00
2023-08-18 15:42:44 +02:00
2023-08-18 15:42:44 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-19 17:34:22 +02:00
2023-08-19 17:34:22 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-19 17:34:22 +02:00
2023-08-23 15:40:41 +02:00
2023-08-23 08:06:25 +02:00
2023-08-24 15:49:49 +02:00
2023-08-23 15:40:41 +02:00
2023-08-19 17:34:22 +02:00
2023-08-23 08:06:25 +02:00
2023-08-13 15:38:42 +02:00
2023-08-23 08:06:25 +02:00
2023-08-13 15:38:42 +02:00
2023-08-19 15:12:00 +02:00
2023-08-13 15:38:42 +02:00
2023-08-18 15:42:44 +02:00
2023-08-18 15:42:44 +02:00
2023-08-22 20:30:06 +02:00
2023-08-22 20:30:06 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-23 19:49:26 +02:00
2023-08-14 17:46:46 +02:00
2023-08-14 17:46:46 +02:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 05:13:18 +02:00
2023-08-24 22:26:53 +01:00
2023-08-24 22:26:53 +01:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-14 17:46:46 +02:00
2023-08-19 15:12:00 +02:00
2023-08-18 15:42:44 +02:00
2023-08-21 13:56:18 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-22 13:08:08 +02:00
2023-08-22 13:08:08 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00
2023-08-22 20:30:06 +02:00
2023-08-22 20:30:06 +02:00
2023-08-13 15:38:42 +02:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-24 11:03:57 -06:00
2023-08-17 09:07:44 +02:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:03:53 -06:00
2023-08-13 15:38:42 +02:00
2023-08-13 15:38:42 +02:00