LibWeb: Do not rely on the layout tree for collapsed line breaks

The editing command that relies the most on this, `insertLinebreak`,
did not perform a layout update after inserting a `<br>` which caused
this algorithm to always return false. But instead of actually building
the layout tree needlessly, we can check the DOM tree instead.
This commit is contained in:
Jelle Raaijmakers 2025-05-01 12:27:42 +02:00 committed by Alexander Kalenik
commit 295b78f7d3
Notes: github-actions[bot] 2025-05-01 12:45:22 +00:00
3 changed files with 17 additions and 9 deletions

View file

@ -7,3 +7,5 @@ Before: "<p style="white-space: pre">foobar</p>"
After: "<p style="white-space: pre">foobar
</p>"
Before: "foo"
After: "foo<br><br>"