Pavel Shliak
e02fd4ca8c
Tests: Reimport Event-constants WPT
...
I reimported and rebaselined it using the latest version
of our WPT importer. Now it passes.
2024-12-01 22:01:48 +01:00
Netanel Haber
d743fcb376
LibWeb: Take namespace into account when matching attribute
2024-11-30 16:47:14 +00:00
Pavel Shliak
f2a406f8cc
Tests: Import WPTs to prevent optional string argument regressions
2024-11-29 20:23:01 +00:00
Milo van der Tier
15741350ba
LibWeb: Make replaceData create new surrogate pairs
...
When inserting a new utf-16 surrogate next to an existing surrogate
with replaceData, the surrogates would not get merged correctly into a
single code point. This is because internally the text data is stored
as utf-8, and the two surrogates would be converted seperately. This
has now been fixed by first recreating the whole string in utf-16 and
then converting it back to utf-8.
It's not the most efficient solution, but this fixes at least 6 WPT
subtests.
2024-11-24 13:04:06 +00:00
Tim Ledbetter
f378f41526
LibWeb: Use correct comparison logic in NamedNodeMap::get_attribute()
...
Previously, we were doing a case insensitive comparison, which could
return the wrong result if the attribute name was uppercase.
2024-11-23 21:19:28 +00:00
Gingeh
bb5678a175
LibWeb: Don't allow trailing commas in selector lists
...
comma-separated list != #-multiplier
2024-11-23 09:49:33 +01:00
Timothy Flynn
488034477a
Revert "LibWeb: Set doctype node immediately while parsing XML document"
...
This reverts commit cd446e5e9c .
This broke about 20k WPT subtests, all related to XML parsing. See:
https://wpt.fyi/results/html/the-xhtml-syntax/parsing-xhtml-documents?diff=&filter=ADC&run_id=5154815472828416&run_id=5090731742199808
2024-11-20 19:11:56 -05:00
Andreas Kling
4203b7823f
LibWeb: Fix incorrect exception on replaceChild() with doctypes
...
We were checking for presence of the wrong child in the parent.
2024-11-20 16:10:57 +01:00
Andreas Kling
cd446e5e9c
LibWeb: Set doctype node immediately while parsing XML document
...
Instead of deferring it to the end of parsing, where scripts that
were expecting to look at the doctype may have already run.
2024-11-20 16:10:57 +01:00
Andreas Kling
ab0dc83d28
LibWeb: Make Node.normalize() ignore CDATASection nodes
...
We hadn't modeled the "exclusive text node" concept correctly.
2024-11-20 16:10:57 +01:00
Andreas Kling
6ffc7ea36d
LibWeb: Make Node::is_text() return true for CDATASection nodes
...
CDATASection inherits from Text, and so it was incorrect for them to
claim not to be Text nodes.
This fixes at least two WPT subtests. :^)
It also exposed a bug in the DOM Parsing and Serialization spec,
where we're not told how to serialize CDATASection nodes.
Spec bug: https://github.com/w3c/DOM-Parsing/issues/38
2024-11-19 19:24:37 +00:00
Andreas Kling
564dc0a434
LibWeb: Use correct factory function when cloning a Document node
...
Cloning an XMLDocument should produce a new XMLDocument. Same for
HTMLDocument.
This fixes at least one WPT test, which we're also importing. :^)
2024-11-19 19:24:37 +00:00
Shannon Booth
061ac1f8c7
Tests: Import WPT test for DOMTokenList coverage on attributes
2024-11-17 22:12:29 +01:00
Andreas Kling
aa9ed71ff3
Tests: Import a bunch of WPT tests from /dom/events
2024-11-17 14:56:35 +01:00
Gingeh
f88f41cf1e
LibWeb: Reject invalid processing instructions
2024-11-06 18:48:50 +01:00