script: Fix panic in htmlimageelement.rs using str::find() to find character boundaries. (#32980)

* fix loop with chars().enumerate() by using find()

Signed-off-by: Kopanov Anton <anton.kopanov@ya.ru>

* Add documentation to parser and fix some small issues

- Rename the properties of `Descriptor` so that they are full words
- Use the Rust-parser to parse doubles
- Add documentation and restructure parser to be more readable

Signed-off-by: Martin Robinson <mrobinson@igalia.com>

---------

Signed-off-by: Kopanov Anton <anton.kopanov@ya.ru>
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
This commit is contained in:
Kopanov Anton 2024-08-24 11:22:39 +03:00 committed by GitHub
parent e85491b5fc
commit ad45fa0a19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 285 additions and 195 deletions

View file

@ -1,2 +0,0 @@
[sizes-auto-rendering-2.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[sizes-auto-rendering-3.html]
expected: FAIL

View file

@ -0,0 +1,2 @@
[sizes-auto-rendering.html]
expected: FAIL

View file

@ -1,3 +0,0 @@
[fail-to-resolve.html]
[<img srcset="//[, /images/red.png">]
expected: FAIL

View file

@ -1,7 +1,4 @@
[update-the-source-set.html]
[<img src="data:,a" srcset="data:,b 1e0x" data-expect="data:,b">]
expected: FAIL
[<picture><source srcset="data:,b" type=""><img src="data:,a" data-expect="data:,b"></picture>]
expected: FAIL