TimvdLippe · GitHub

@TimvdLippe

There were two separate issues that I uncovered:
1. For insertParagraph, the `block_extend` implementation
was wrong. I wrongly concluded that the third substep was
also the while condition. But I didn't read correctly. They
are two separate block conditions
2. Update all modifications of the selection object to use
the current range. As it turns out, all of those `Collapse`
and `Extend` calls would set a new range on the selection
object. That means that the `active_range` that all those
algorithms use would be the old range. Hence, some of the
checks wouldn't look at the new range, but the old one.
However we shouldn't even update the range. Thus we use
the current range to make the logic work.
Also adds a formatting output for `Range`, since I was copy
pasting range printlns too often.
Part of servo#25005
Signed-off-by: Tim van der Lippe <tvanderlippe@gmail.com>

Read the original on github.com ↗