Граф коммитов

6 Коммитов

Автор SHA1 Сообщение Дата
Aryeh Gregor dfe0b2fb6c Bug 1265800 part 3 - Move cursor into all adjacent nodes after delete; r=masayuki
When deleting, we previously would only move the cursor back into the
previous block if the last leaf node was a text node, for some reason.
We should move into the previous block in other cases as well, like if
the leaf node is a collapsed <br>.  (Probably it's not correct to move
backward into tables, but that already was happening if the table had
text at the end.  There may be other cases where this is wrong.)

MozReview-Commit-ID: 8e0dTU3lNYO
2016-08-22 14:27:17 +03:00
Aryeh Gregor 2a778fda0b Bug 1265800 part 2 - Don't place cursor after invisible break; r=masayuki
If the user tries to insert text without moving the cursor, the
invisible break will become visible, which from the user's perspective
means an extra line break was inserted for no reason.

The IsVisBreak change here is a bit scary, because it may result in
unexpected behavior changes, but it seems to improve correctness.  If it
turns out to cause problems, it can be added as a special case to
GetGoodSelPointForNode instead.

MozReview-Commit-ID: 7SRQYHYtJvF
2016-08-22 14:27:08 +03:00
Sebastian Hengst 9df7aba907 Backed out changeset bba587e03e0b (bug 1265800) 2016-08-21 23:42:45 +02:00
Sebastian Hengst 73836dc023 Backed out changeset da1cdd000993 (bug 1265800) 2016-08-21 23:42:41 +02:00
Aryeh Gregor aeca189ce4 Bug 1265800 part 3 - Move cursor into all adjacent nodes after delete; r=masayuki
When deleting, we previously would only move the cursor back into the
previous block if the last leaf node was a text node, for some reason.
We should move into the previous block in other cases as well, like if
the leaf node is a collapsed <br>.  (Probably it's not correct to move
backward into tables, but that already was happening if the table had
text at the end.  There may be other cases where this is wrong.)

MozReview-Commit-ID: 8e0dTU3lNYO
2016-08-21 18:13:49 +03:00
Aryeh Gregor c0a463e1dd Bug 1265800 part 2 - Don't place cursor after invisible break; r=masayuki
If the user tries to insert text without moving the cursor, the
invisible break will become visible, which from the user's perspective
means an extra line break was inserted for no reason.

The IsVisBreak change here is a bit scary, because it may result in
unexpected behavior changes, but it seems to improve correctness.  If it
turns out to cause problems, it can be added as a special case to
GetGoodSelPointForNode instead.

MozReview-Commit-ID: 7SRQYHYtJvF
2016-08-21 18:13:49 +03:00