mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-24 09:52:31 +00:00
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.
11 lines
269 B
Text
11 lines
269 B
Text
Before: "foobar"
|
|
After: "foo<br>bar"
|
|
Before: "<p style="white-space: pre">foobar</p>"
|
|
After: "<p style="white-space: pre">foo
|
|
bar</p>"
|
|
Before: "<p style="white-space: pre">foobar</p>"
|
|
After: "<p style="white-space: pre">foobar
|
|
|
|
</p>"
|
|
Before: "foo"
|
|
After: "foo<br><br>"
|