Crash in previousLinePosition when moving into a root inline box without leaves
https://bugs.webkit.org/show_bug.cgi?id=76812
Reviewed by Enrica Casucci.
Source/WebCore:
The crash was caused by us assuming that every root inline box has at least one leaf,
which isn't true when we create inline boxes for an empty text run with margin, border, etc...
Test: editing/selection/move-into-empty-root-inline-box.html
* editing/visible_units.cpp:
(WebCore::previousLinePosition):
(WebCore::nextLinePosition):
LayoutTests:
Add a regression test for the crash. Unfortunately, we can only test previousLinePosition.
* editing/selection/move-into-empty-root-inline-box-expected.txt: Added.
* editing/selection/move-into-empty-root-inline-box.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@106298
268f45cc-cd09-0410-ab3c-
d52691b4dbfc