Commit graph

4 commits

Author SHA1 Message Date
Tim Ledbetter
d1678e03ff LibWeb: Check parent node exists before checking its type 2025-07-15 18:37:50 +12:00
Shannon Booth
fc62a05c98 LibWeb/DOM: Set Document's origin in JS constructor
We were missing this spec step, which meant that the created
document had no origin, causing a crash when accessed for same-origin
checks.
2025-06-18 08:49:01 +02:00
Jelle Raaijmakers
b42c2c5e8f LibWeb: Use code unit offsets in Document::find_matching_text()
We were passing in byte offsets instead of UTF-16 code unit offsets,
which could lead to crashes if the offsets found exceeded the number of
code units in text fragments on the page.

Fixes #4908.

Co-authored-by: Tim Ledbetter <tim.ledbetter@ladybird.org>
2025-06-13 15:08:26 +02:00
Tim Ledbetter
ded19eaab8 Tests: Convert existing text test to crash test 2025-01-17 09:08:15 +01:00