+2011-08-02 Van Lam <vanlam@google.com>
+
+ --webkit-visual-word: ctrl-arrow is not able to reach the boundary of line
+ https://bugs.webkit.org/show_bug.cgi?id=61346
+
+ Reviewed by Ryosuke Niwa.
+
+ Updated test cases to check for visual word movement to the end-of-line
+ position.
+
+ * editing/selection/move-by-word-visually-multi-line-expected.txt:
+ * editing/selection/move-by-word-visually-multi-line.html:
+ * editing/selection/move-by-word-visually-multi-space-expected.txt:
+ * editing/selection/move-by-word-visually-multi-space.html:
+ * editing/selection/move-by-word-visually-single-space-inline-element-expected.txt:
+ * editing/selection/move-by-word-visually-single-space-inline-element.html:
+ * editing/selection/move-by-word-visually-single-space-one-element-expected.txt:
+ * editing/selection/move-by-word-visually-single-space-one-element.html:
+
2011-08-02 Zhenyao Mo <zmo@google.com>
Unreviewed, test expectations update, gardener stuff.
======== Move By Word ====
Test 1, LTR:
Move right by one word
-"abc def ghi jkl mn "[0, 4, 8, 12, 16], "opq rst uvw xyz"[0, 4, 8, 12]
+"abc def ghi jkl mn "[0, 4, 8, 12, 16, 19], "opq rst uvw xyz"[0, 4, 8, 12, 15]
Move left by one word
"opq rst uvw xyz"[15, 12, 8, 4, 0], "abc def ghi jkl mn "[16, 12, 8, 4, 0]
Test 2, LTR:
Move right by one word
-"abc def ghi jkl mn "[0, 4, 8, 12, 16], "opq rst uvw xyz"[0, 4, 8, 12]
+"abc def ghi jkl mn "[0, 4, 8, 12, 16, 18], "opq rst uvw xyz"[0, 4, 8, 12, 15]
Move left by one word
"opq rst uvw xyz"[15, 12, 8, 4, 0], "abc def ghi jkl mn "[16, 12, 8, 4, 0]
Test 3, LTR:
Move right by one word
-"AAA AAA AAA AAA "[0, 3, 8, 11], "AAA AAA AAA AAA"[0, 3, 8, 11]
+"AAA AAA AAA AAA "[0, 3, 8, 11, 16], "AAA AAA AAA AAA"[0, 3, 8, 11, 15]
Move left by one word
"AAA AAA AAA AAA"[15, 11, 8, 3, 0], "AAA AAA AAA AAA "[11, 8, 3, 0]
Test 4, LTR:
Move right by one word
-"AAA AAA AAA AAA "[0, 3, 8, 11], "AAA AAA AAA AAA"[0, 3, 8, 11]
+"AAA AAA AAA AAA "[0, 3, 8, 11, 16], "AAA AAA AAA AAA"[0, 3, 8, 11, 15]
Move left by one word
"AAA AAA AAA AAA"[15, 11, 8, 3, 0], "AAA AAA AAA AAA "[11, 8, 3, 0]
Test 5, LTR:
Move right by one word
-" abc def AAA AAA hij AAA AAA uvw xyz "[1, 5, 9, 12, 17, 21, 25, 29, 33], "AAA kj AAA mn opq AAA AAA"[0, 4, 7, 11, 14, 18, 22, 25]
+" abc def AAA AAA hij AAA AAA uvw xyz "[1, 5, 9, 12, 17, 21, 25, 29, 33, 37], "AAA kj AAA mn opq AAA AAA"[0, 4, 7, 11, 14, 18, 22, 25]
Move left by one word
"AAA kj AAA mn opq AAA AAA"[25, 22, 18, 14, 11, 7, 4, 0], " abc def AAA AAA hij AAA AAA uvw xyz "[33, 29, 25, 21, 17, 12, 9, 5, 1]
Test 6, LTR:
Move right by one word
-" abc def AAA AAA hij AAA AAA uvw xyz "[1, 5, 9, 12, 17, 21, 25, 29, 33], "AAA kj AAA mn opq AAA AAA"[0, 4, 7, 11, 14, 18, 22, 25]
+" abc def AAA AAA hij AAA AAA uvw xyz "[1, 5, 9, 12, 17, 21, 25, 29, 33, 36], "AAA kj AAA mn opq AAA AAA"[0, 4, 7, 11, 14, 18, 22, 25]
Move left by one word
"AAA kj AAA mn opq AAA AAA"[25, 22, 18, 14, 11, 7, 4, 0], " abc def AAA AAA hij AAA AAA uvw xyz "[33, 29, 25, 21, 17, 12, 9, 5, 1]
Test 7, RTL:
Move left by one word
-"abc def ghi jkl mn "[0, 3, 8, 11, 16], "opq rst uvw xyz"[0, 3, 8, 11]
+"abc def ghi jkl mn "[0, 3, 8, 11, 16, 19], "opq rst uvw xyz"[0, 3, 8, 11, 15]
Move right by one word
"opq rst uvw xyz"[15, 11, 8, 3, 0], "abc def ghi jkl mn "[16, 11, 8, 3, 0]
Test 8, RTL:
Move left by one word
-"abc def ghi jkl mn "[0, 3, 8, 11, 16, 18], "opq rst uvw xyz"[0, 3, 8, 11]
+"abc def ghi jkl mn "[0, 3, 8, 11, 16, 18], "opq rst uvw xyz"[0, 3, 8, 11, 15]
Move right by one word
"opq rst uvw xyz"[15, 11, 8, 3, 0], "abc def ghi jkl mn "[18, 16, 11, 8, 3, 0]
Test 9, RTL:
Move left by one word
-"AAA AAA AAA AAA "[0, 4, 8, 12], "AAA AAA AAA AAA"[0, 4, 8, 12]
+"AAA AAA AAA AAA "[0, 4, 8, 12, 16], "AAA AAA AAA AAA"[0, 4, 8, 12, 15]
Move right by one word
"AAA AAA AAA AAA"[15, 12, 8, 4, 0], "AAA AAA AAA AAA "[12, 8, 4, 0]
Test 10, RTL:
Move left by one word
-"AAA AAA AAA AAA "[0, 4, 8, 12], "AAA AAA AAA AAA"[0, 4, 8, 12]
+"AAA AAA AAA AAA "[0, 4, 8, 12, 16], "AAA AAA AAA AAA"[0, 4, 8, 12, 15]
Move right by one word
"AAA AAA AAA AAA"[15, 12, 8, 4, 0], "AAA AAA AAA AAA "[12, 8, 4, 0]
Test 11, RTL:
Move left by one word
-" abc def AAA AAA hij AAA AAA uvw xyz "[1, 4, 9, 13, 17, 21, 25, 29, 33], "AAA kj AAA mn opq AAA AAA"[0, 4, 7, 11, 14, 18, 22]
+" abc def AAA AAA hij AAA AAA uvw xyz "[1, 4, 9, 13, 17, 21, 25, 29, 33, 37], "AAA kj AAA mn opq AAA AAA"[0, 4, 7, 11, 14, 18, 22, 25]
Move right by one word
"AAA kj AAA mn opq AAA AAA"[25, 22, 18, 14, 11, 7, 4, 0], " abc def AAA AAA hij AAA AAA uvw xyz "[33, 29, 25, 21, 17, 13, 9, 4, 1]
Test 12, RTL:
Move left by one word
-" abc def AAA AAA hij AAA AAA uvw xyz "[1, 4, 9, 13, 17, 21, 25, 29, 33, 36], "AAA kj AAA mn opq AAA AAA"[0, 4, 7, 11, 14, 18, 22]
+" abc def AAA AAA hij AAA AAA uvw xyz "[1, 4, 9, 13, 17, 21, 25, 29, 33, 36], "AAA kj AAA mn opq AAA AAA"[0, 4, 7, 11, 14, 18, 22, 25]
Move right by one word
"AAA kj AAA mn opq AAA AAA"[25, 22, 18, 14, 11, 7, 4, 0], " abc def AAA AAA hij AAA AAA uvw xyz "[36, 33, 29, 25, 21, 17, 13, 9, 4, 1]
Test 13, LTR:
<!-- test multi-line -->
<div><span class="fix_width" id="span_size">אאא אאא</span></div>
-<div contenteditable dir=ltr id="ml_1" class="test_move_by_word fix_width" title="[ml_1, 0][ml_1, 4][ml_1, 8][ml_1, 12][ml_1, 16][ml_1, 0, 5][ml_1, 4, 5][ml_1, 8, 5][ml_1, 12, 5]|[ml_1, 15, 5][ml_1, 12, 5][ml_1, 8, 5][ml_1, 4, 5][ml_1, 0, 5][ml_1, 16][ml_1, 12][ml_1, 8][ml_1, 4][ml_1, 0]">abc def ghi jkl mn <br/><br/><br/>opq rst uvw xyz</div>
+<div contenteditable dir=ltr id="ml_1" class="test_move_by_word fix_width" title="[ml_1, 0][ml_1, 4][ml_1, 8][ml_1, 12][ml_1, 16][ml_1, 19][ml_1, 0, 5][ml_1, 4, 5][ml_1, 8, 5][ml_1, 12, 5][ml_1, 15, 5]|[ml_1, 15, 5][ml_1, 12, 5][ml_1, 8, 5][ml_1, 4, 5][ml_1, 0, 5][ml_1, 16][ml_1, 12][ml_1, 8][ml_1, 4][ml_1, 0]">abc def ghi jkl mn <br/><br/><br/>opq rst uvw xyz</div>
-<div contenteditable dir=ltr id="ml_2" class="test_move_by_word fix_width" title="[ml_2, 0][ml_2, 4][ml_2, 8][ml_2, 12][ml_2, 16][ml_2, 0, 5][ml_2, 4, 5][ml_2, 8, 5][ml_2, 12, 5]|[ml_2, 15, 5][ml_2, 12, 5][ml_2, 8, 5][ml_2, 4, 5][ml_2, 0, 5][ml_2, 16][ml_2, 12][ml_2, 8][ml_2, 4][ml_2, 0]">abc def ghi jkl mn <div><br/></div><div><br/></div><div><br/></div>opq rst uvw xyz</div>
+<div contenteditable dir=ltr id="ml_2" class="test_move_by_word fix_width" title="[ml_2, 0][ml_2, 4][ml_2, 8][ml_2, 12][ml_2, 16][ml_2, 18][ml_2, 0, 5][ml_2, 4, 5][ml_2, 8, 5][ml_2, 12, 5][ml_2, 15, 5]|[ml_2, 15, 5][ml_2, 12, 5][ml_2, 8, 5][ml_2, 4, 5][ml_2, 0, 5][ml_2, 16][ml_2, 12][ml_2, 8][ml_2, 4][ml_2, 0]">abc def ghi jkl mn <div><br/></div><div><br/></div><div><br/></div>opq rst uvw xyz</div>
-<div contenteditable dir=ltr id="ml_3" class="test_move_by_word fix_width" title="[ml_3, 0][ml_3, 3][ml_3, 8][ml_3, 11]][ml_3, 0, 5][ml_3, 3, 5][ml_3, 8, 5][ml_3, 11, 5]|[ml_3, 15, 5][ml_3, 11, 5][ml_3, 8, 5][ml_3, 3, 5][ml_3, 0, 5][ml_3, 11][ml_3, 8][ml_3, 3][ml_3, 0]">אאא אאא אאא אאא <br/><br/><br/>אאא אאא אאא אאא</div>
+<div contenteditable dir=ltr id="ml_3" class="test_move_by_word fix_width" title="[ml_3, 0][ml_3, 3][ml_3, 8][ml_3, 11]][ml_3, 16][ml_3, 0, 5][ml_3, 3, 5][ml_3, 8, 5][ml_3, 11, 5][ml_3, 15, 5]|[ml_3, 15, 5][ml_3, 11, 5][ml_3, 8, 5][ml_3, 3, 5][ml_3, 0, 5][ml_3, 11][ml_3, 8][ml_3, 3][ml_3, 0]">אאא אאא אאא אאא <br/><br/><br/>אאא אאא אאא אאא</div>
-<div contenteditable dir=ltr id="ml_4" class="test_move_by_word fix_width" title="[ml_4, 0][ml_4, 3][ml_4, 8][ml_4, 11][ml_4, 0, 5][ml_4, 3, 5][ml_4, 8, 5][ml_4, 11, 5]|[ml_4, 15, 5][ml_4, 11, 5][ml_4, 8, 5][ml_4, 3, 5][ml_4, 0, 5][ml_4, 11][ml_4, 8][ml_4, 3][ml_4, 0]">אאא אאא אאא אאא <div><br/></div><div><br/></div><div><br/></div>אאא אאא אאא אאא</div>
+<div contenteditable dir=ltr id="ml_4" class="test_move_by_word fix_width" title="[ml_4, 0][ml_4, 3][ml_4, 8][ml_4, 11][ml_4, 16][ml_4, 0, 5][ml_4, 3, 5][ml_4, 8, 5][ml_4, 11, 5][ml_4, 15, 5]|[ml_4, 15, 5][ml_4, 11, 5][ml_4, 8, 5][ml_4, 3, 5][ml_4, 0, 5][ml_4, 11][ml_4, 8][ml_4, 3][ml_4, 0]">אאא אאא אאא אאא <div><br/></div><div><br/></div><div><br/></div>אאא אאא אאא אאא</div>
-<div contenteditable dir=ltr id="ml_5" class="test_move_by_word fix_width" title="[ml_5, 1][ml_5, 5][ml_5, 9][ml_5, 12][ml_5, 17][ml_5, 21][ml_5, 25][ml_5, 29][ml_5, 33][ml_5, 0, 5][ml_5, 4, 5][ml_5, 7, 5][ml_5, 11, 5][ml_5, 14, 5][ml_5, 18, 5][ml_5, 22, 5][ml_5, 25, 5]|[ml_5, 25, 5][ml_5, 22, 5][ml_5, 18, 5][ml_5, 14, 5][ml_5, 11, 5][ml_5, 7, 5][ml_5, 4, 5][ml_5, 0, 5][ml_5, 33][ml_5, 29][ml_5, 25][ml_5, 21][ml_5, 17][ml_5, 12][ml_5, 9][ml_5, 5][ml_5, 1]"> abc def אאא אאא hij אאא אאא uvw xyz <br/><br/><br/>אאא kj אאא mn opq אאא אאא</div>
+<div contenteditable dir=ltr id="ml_5" class="test_move_by_word fix_width" title="[ml_5, 1][ml_5, 5][ml_5, 9][ml_5, 12][ml_5, 17][ml_5, 21][ml_5, 25][ml_5, 29][ml_5, 33][ml_5, 37][ml_5, 0, 5][ml_5, 4, 5][ml_5, 7, 5][ml_5, 11, 5][ml_5, 14, 5][ml_5, 18, 5][ml_5, 22, 5][ml_5, 25, 5]|[ml_5, 25, 5][ml_5, 22, 5][ml_5, 18, 5][ml_5, 14, 5][ml_5, 11, 5][ml_5, 7, 5][ml_5, 4, 5][ml_5, 0, 5][ml_5, 33][ml_5, 29][ml_5, 25][ml_5, 21][ml_5, 17][ml_5, 12][ml_5, 9][ml_5, 5][ml_5, 1]"> abc def אאא אאא hij אאא אאא uvw xyz <br/><br/><br/>אאא kj אאא mn opq אאא אאא</div>
-<div contenteditable dir=ltr id="ml_6" class="test_move_by_word fix_width" title="[ml_6, 1][ml_6, 5][ml_6, 9][ml_6, 12][ml_6, 17][ml_6, 21][ml_6, 25][ml_6, 29][ml_6, 33][ml_6, 0, 5][ml_6, 4, 5][ml_6, 7, 5][ml_6, 11, 5][ml_6, 14, 5][ml_6, 18, 5][ml_6, 22, 5][ml_6, 25, 5]|[ml_6, 25, 5][ml_6, 22, 5][ml_6, 18, 5][ml_6, 14, 5][ml_6, 11, 5][ml_6, 7, 5][ml_6, 4, 5][ml_6, 0, 5][ml_6, 33][ml_6, 29][ml_6, 25][ml_6, 21][ml_6, 17][ml_6, 12][ml_6, 9][ml_6, 5][ml_6, 1]"> abc def אאא אאא hij אאא אאא uvw xyz <div><br/></div><div><br/></div><div><br/></div>אאא kj אאא mn opq אאא אאא</div>
+<div contenteditable dir=ltr id="ml_6" class="test_move_by_word fix_width" title="[ml_6, 1][ml_6, 5][ml_6, 9][ml_6, 12][ml_6, 17][ml_6, 21][ml_6, 25][ml_6, 29][ml_6, 33][ml_6, 36][ml_6, 0, 5][ml_6, 4, 5][ml_6, 7, 5][ml_6, 11, 5][ml_6, 14, 5][ml_6, 18, 5][ml_6, 22, 5][ml_6, 25, 5]|[ml_6, 25, 5][ml_6, 22, 5][ml_6, 18, 5][ml_6, 14, 5][ml_6, 11, 5][ml_6, 7, 5][ml_6, 4, 5][ml_6, 0, 5][ml_6, 33][ml_6, 29][ml_6, 25][ml_6, 21][ml_6, 17][ml_6, 12][ml_6, 9][ml_6, 5][ml_6, 1]"> abc def אאא אאא hij אאא אאא uvw xyz <div><br/></div><div><br/></div><div><br/></div>אאא kj אאא mn opq אאא אאא</div>
-<div contenteditable dir=rtl id="ml_7" class="test_move_by_word fix_width" title="[ml_7, 15, 5][ml_7, 11, 5][ml_7, 8, 5][ml_7, 3, 5][ml_7, 0, 5][ml_7, 16][ml_7, 11][ml_7, 8][ml_7, 3][ml_7, 0]|[ml_7, 0][ml_7, 3][ml_7, 8][ml_7, 11][ml_7, 16][ml_7, 0, 5][ml_7, 3, 5][ml_7, 8, 5][ml_7, 11, 5]">abc def ghi jkl mn <br/><br/><br/>opq rst uvw xyz</div>
+<div contenteditable dir=rtl id="ml_7" class="test_move_by_word fix_width" title="[ml_7, 15, 5][ml_7, 11, 5][ml_7, 8, 5][ml_7, 3, 5][ml_7, 0, 5][ml_7, 16][ml_7, 11][ml_7, 8][ml_7, 3][ml_7, 0]|[ml_7, 0][ml_7, 3][ml_7, 8][ml_7, 11][ml_7, 16][ml_7, 19][ml_7, 0, 5][ml_7, 3, 5][ml_7, 8, 5][ml_7, 11, 5][ml_7, 15, 5]">abc def ghi jkl mn <br/><br/><br/>opq rst uvw xyz</div>
-<div contenteditable dir=rtl id="ml_8" class="test_move_by_word fix_width" title="[ml_8, 15, 5][ml_8, 11, 5][ml_8, 8, 5][ml_8, 3, 5][ml_8, 0, 5][ml_8, 18][ml_8, 16][ml_8, 11][ml_8, 8][ml_8, 3][ml_8, 0]|[ml_8, 0][ml_8, 3][ml_8, 8][ml_8, 11][ml_8, 16][ml_8, 18][ml_8, 0, 5][ml_8, 3, 5][ml_8, 8, 5][ml_8, 11, 5]">abc def ghi jkl mn <div><br/></div><div><br/></div><div><br/></div>opq rst uvw xyz</div>
+<div contenteditable dir=rtl id="ml_8" class="test_move_by_word fix_width" title="[ml_8, 15, 5][ml_8, 11, 5][ml_8, 8, 5][ml_8, 3, 5][ml_8, 0, 5][ml_8, 18][ml_8, 16][ml_8, 11][ml_8, 8][ml_8, 3][ml_8, 0]|[ml_8, 0][ml_8, 3][ml_8, 8][ml_8, 11][ml_8, 16][ml_8, 18][ml_8, 0, 5][ml_8, 3, 5][ml_8, 8, 5][ml_8, 11, 5][ml_8, 15, 5]">abc def ghi jkl mn <div><br/></div><div><br/></div><div><br/></div>opq rst uvw xyz</div>
-<div contenteditable dir=rtl id="ml_9" class="test_move_by_word fix_width" title="[ml_9, 15, 5][ml_9, 12, 5][ml_9, 8, 5][ml_9, 4, 5][ml_9, 0, 5][ml_9, 12][ml_9, 8][ml_9, 4][ml_9, 0]|[ml_9, 0][ml_9, 4][ml_9, 8][ml_9, 12][ml_9, 0, 5][ml_9, 4, 5][ml_9, 8, 5][ml_9, 12, 5]">אאא אאא אאא אאא <br/><br/><br/>אאא אאא אאא אאא</div>
+<div contenteditable dir=rtl id="ml_9" class="test_move_by_word fix_width" title="[ml_9, 15, 5][ml_9, 12, 5][ml_9, 8, 5][ml_9, 4, 5][ml_9, 0, 5][ml_9, 12][ml_9, 8][ml_9, 4][ml_9, 0]|[ml_9, 0][ml_9, 4][ml_9, 8][ml_9, 12][ml_9, 16][ml_9, 0, 5][ml_9, 4, 5][ml_9, 8, 5][ml_9, 12, 5][ml_9, 15, 5]">אאא אאא אאא אאא <br/><br/><br/>אאא אאא אאא אאא</div>
-<div contenteditable dir=rtl id="ml_10" class="test_move_by_word fix_width" title="[ml_10, 15, 5][ml_10, 12, 5][ml_10, 8, 5][ml_10, 4, 5][ml_10, 0, 5][ml_10, 12][ml_10, 8][ml_10, 4][ml_10, 0]|[ml_10, 0][ml_10, 4][ml_10, 8][ml_10, 12][ml_10, 0, 5][ml_10, 4, 5][ml_10, 8, 5][ml_10, 12, 5]">אאא אאא אאא אאא <div><br/></div><div><br/></div><div><br/></div>אאא אאא אאא אאא</div>
+<div contenteditable dir=rtl id="ml_10" class="test_move_by_word fix_width" title="[ml_10, 15, 5][ml_10, 12, 5][ml_10, 8, 5][ml_10, 4, 5][ml_10, 0, 5][ml_10, 12][ml_10, 8][ml_10, 4][ml_10, 0]|[ml_10, 0][ml_10, 4][ml_10, 8][ml_10, 12][ml_10, 16][ml_10, 0, 5][ml_10, 4, 5][ml_10, 8, 5][ml_10, 12, 5][ml_10, 15, 5]">אאא אאא אאא אאא <div><br/></div><div><br/></div><div><br/></div>אאא אאא אאא אאא</div>
<div contenteditable dir=rtl id="ml_11" class="test_move_by_word fix_width" title="
-[ml_11, 25, 5][ml_11, 22, 5][ml_11, 18, 5][ml_11, 14, 5][ml_11, 11, 5][ml_11, 7, 5][ml_11, 4, 5][ml_11, 0, 5][ml_11, 33][ml_11, 29][ml_11, 25][ml_11, 21][ml_11, 17][ml_11, 13][ml_11, 9][ml_11, 4][ml_11, 1]|[ml_11, 1][ml_11, 4][ml_11, 9][ml_11, 13][ml_11, 17][ml_11, 21][ml_11, 25][ml_11, 29][ml_11, 33][ml_11, 0, 5][ml_11, 4, 5][ml_11, 7, 5][ml_11, 11, 5][ml_11, 14, 5][ml_11, 18, 5][ml_11, 22, 5]
+[ml_11, 25, 5][ml_11, 22, 5][ml_11, 18, 5][ml_11, 14, 5][ml_11, 11, 5][ml_11, 7, 5][ml_11, 4, 5][ml_11, 0, 5][ml_11, 33][ml_11, 29][ml_11, 25][ml_11, 21][ml_11, 17][ml_11, 13][ml_11, 9][ml_11, 4][ml_11, 1]|[ml_11, 1][ml_11, 4][ml_11, 9][ml_11, 13][ml_11, 17][ml_11, 21][ml_11, 25][ml_11, 29][ml_11, 33][ml_11, 37][ml_11, 0, 5][ml_11, 4, 5][ml_11, 7, 5][ml_11, 11, 5][ml_11, 14, 5][ml_11, 18, 5][ml_11, 22, 5][ml_11, 25, 5]
"> abc def אאא אאא hij אאא אאא uvw xyz <br/><br/><br/>אאא kj אאא mn opq אאא אאא</div>
<div contenteditable dir=rtl id="ml_12" class="test_move_by_word fix_width" title="
-[ml_12, 25, 5][ml_12, 22, 5][ml_12, 18, 5][ml_12, 14, 5][ml_12, 11, 5][ml_12, 7, 5][ml_12, 4, 5][ml_12, 0, 5][ml_12, 36][ml_12, 33][ml_12, 29][ml_12, 25][ml_12, 21][ml_12, 17][ml_12, 13][ml_12, 9][ml_12, 4][ml_12, 1]|[ml_12, 1][ml_12, 4][ml_12, 9][ml_12, 13][ml_12, 17][ml_12, 21][ml_12, 25][ml_12, 29][ml_12, 33][ml_12, 36][ml_12, 0, 5][ml_12, 4, 5][ml_12, 7, 5][ml_12, 11, 5][ml_12, 14, 5][ml_12, 18, 5][ml_12, 22, 5]
+[ml_12, 25, 5][ml_12, 22, 5][ml_12, 18, 5][ml_12, 14, 5][ml_12, 11, 5][ml_12, 7, 5][ml_12, 4, 5][ml_12, 0, 5][ml_12, 36][ml_12, 33][ml_12, 29][ml_12, 25][ml_12, 21][ml_12, 17][ml_12, 13][ml_12, 9][ml_12, 4][ml_12, 1]|[ml_12, 1][ml_12, 4][ml_12, 9][ml_12, 13][ml_12, 17][ml_12, 21][ml_12, 25][ml_12, 29][ml_12, 33][ml_12, 36][ml_12, 0, 5][ml_12, 4, 5][ml_12, 7, 5][ml_12, 11, 5][ml_12, 14, 5][ml_12, 18, 5][ml_12, 22, 5][ml_12, 25, 5]
"> abc def אאא אאא hij אאא אאא uvw xyz <div><br/></div><div><br/></div><div><br/></div>אאא kj אאא mn opq אאא אאא</div>
<!-- mixed editability -->
======== Move By Word ====
Test 1, LTR:
Move right by one word
-"abc def hij opq"[0, 4, 8, 15]
+"abc def hij opq"[0, 4, 8, 15, 18]
Move left by one word
"abc def hij opq"[18, 15, 8, 4, 0]
Test 2, LTR:
Move right by one word
-" abc def hij opq "[4, 8, 15, 22]
+" abc def hij opq "[4, 8, 15, 22, 28]
Move left by one word
" abc def hij opq "[28, 22, 15, 8, 4]
Test 3, LTR:
Move right by one word
-" abc ABW def "[4, 8, 15]
+" abc ABW def "[4, 8, 15, 21]
Move left by one word
" abc ABW def "[21, 15, 8, 4]
Test 4, LTR:
Move right by one word
-" abc def ABW DDU hij opq "[4, 8, 15, 21, 29, 36]
+" abc def ABW DDU hij opq "[4, 8, 15, 21, 29, 36, 42]
Move left by one word
" abc def ABW DDU hij opq "[42, 36, 29, 21, 15, 8, 4]
Test 5, LTR:
Move right by one word
-" abc def hij ABW DSU EJH opq rst uvw "[4, 8, 15, 22, 35, 28, 43, 50, 57]
+" abc def hij ABW DSU EJH opq rst uvw "[4, 8, 15, 22, 35, 28, 43, 50, 57, 63]
Move left by one word
" abc def hij ABW DSU EJH opq rst uvw "[63, 57, 50, 43, 28, 35, 22, 15, 8, 4]
Test 6, LTR:
Move right by one word
-" ABW DSU HJH FUX "[4, 21, 14, 7]
+" ABW DSU HJH FUX "[4, 21, 14, 7, 28]
Move left by one word
" ABW DSU HJH FUX "[28, 7, 14, 21, 4]
Test 7, LTR:
Move right by one word
-" ABW abc DSU "[4, 8, 15, 21] FAIL expected: [4, 8, 15]
-" ABW abc DSU "[15, 21] FAIL expected to stay in the same position
-" ABW abc DSU "[20, 21] FAIL expected to stay in the same position
-" ABW abc DSU "[19, 21] FAIL expected to stay in the same position
+" ABW abc DSU "[4, 8, 15, 21]
Move left by one word
" ABW abc DSU "[21, 15, 8, 4]
Test 8, LTR:
Move right by one word
-" ABW DSU abc def HJH FUX "[4, 7, 15, 22, 28, 33]
+" ABW DSU abc def HJH FUX "[4, 7, 15, 22, 28, 33, 40]
Move left by one word
" ABW DSU abc def HJH FUX "[40, 33, 28, 22, 15, 7, 4]
Test 9, LTR:
Move right by one word
-" ABW DSU HJH abc def jih FUX FUX YR[ "[4, 14, 7, 22, 29, 35, 41, 51, 46]
+" ABW DSU HJH abc def jih FUX FUX YR[ "[4, 14, 7, 22, 29, 35, 41, 51, 46, 58]
Move left by one word
" ABW DSU HJH abc def jih FUX FUX YR[ "[58, 46, 51, 41, 35, 29, 22, 7, 14, 4]
Test 10, LTR:
Move right by one word
-"ABW DSU EJH FUX"[0, 14, 7, 3]
+"ABW DSU EJH FUX"[0, 14, 7, 3, 18]
Move left by one word
"ABW DSU EJH FUX"[18, 3, 7, 14, 0]
Test 11, LTR:
Move right by one word
-"ABW DSU EJH abc def hij"[0, 7, 3, 12, 19, 23]
+"ABW DSU EJH abc def hij"[0, 7, 3, 12, 19, 23, 26]
Move left by one word
"ABW DSU EJH abc def hij"[26, 23, 19, 12, 3, 7, 0]
Test 12, LTR:
Move right by one word
-"abc def hij ABW DSU EJH opq rst uvw"[0, 4, 8, 12, 22, 18, 27, 34, 38]
+"abc def hij ABW DSU EJH opq rst uvw"[0, 4, 8, 12, 22, 18, 27, 34, 38, 41]
Move left by one word
"abc def hij ABW DSU EJH opq rst uvw"[41, 38, 34, 27, 18, 22, 12, 8, 4, 0]
Test 13, RTL:
Move left by one word
-"abc def hij opq"[0, 14, 7, 3]
+"abc def hij opq"[0, 14, 7, 3, 18]
Move right by one word
"abc def hij opq"[18, 3, 7, 14, 0]
Test 14, RTL:
Move left by one word
-" abc def hij opq "[4, 21, 14, 7]
+" abc def hij opq "[4, 21, 14, 7, 28]
Move right by one word
" abc def hij opq "[28, 7, 14, 21, 4]
Test 15, RTL:
Move left by one word
-" abc ABW def "[4, 8, 15, 21] FAIL expected: [4, 8, 15]
-" abc ABW def "[15, 21] FAIL expected to stay in the same position
-" abc ABW def "[20, 21] FAIL expected to stay in the same position
-" abc ABW def "[19, 21] FAIL expected to stay in the same position
+" abc ABW def "[4, 8, 15, 21]
Move right by one word
" abc ABW def "[21, 15, 8, 4]
Test 16, RTL:
Move left by one word
-" abc def ABW DDU hij opq "[4, 7, 15, 22, 29, 35]
+" abc def ABW DDU hij opq "[4, 7, 15, 22, 29, 35, 42]
Move right by one word
" abc def ABW DDU hij opq "[42, 35, 29, 22, 15, 7, 4]
Test 17, RTL:
Move left by one word
-" abc def hij ABW DSU EJH opq rst uvw "[4, 14, 7, 22, 29, 36, 43, 56, 49]
+" abc def hij ABW DSU EJH opq rst uvw "[4, 14, 7, 22, 29, 36, 43, 56, 49, 63]
Move right by one word
" abc def hij ABW DSU EJH opq rst uvw "[63, 49, 56, 43, 36, 29, 22, 7, 14, 4]
Test 18, RTL:
Move left by one word
-" ABW DSU HJH FUX "[4, 8, 15, 22]
+" ABW DSU HJH FUX "[4, 8, 15, 22, 28]
Move right by one word
" ABW DSU HJH FUX "[28, 22, 15, 8, 4]
Test 19, RTL:
Move left by one word
-" ABW abc DSU "[4, 8, 15]
+" ABW abc DSU "[4, 8, 15, 21]
Move right by one word
" ABW abc DSU "[21, 15, 8, 4]
Test 20, RTL:
Move left by one word
-" ABW DSU abc def HJH FUX "[4, 8, 15, 21, 28, 34]
+" ABW DSU abc def HJH FUX "[4, 8, 15, 21, 28, 34, 40]
Move right by one word
" ABW DSU abc def HJH FUX "[40, 34, 28, 21, 15, 8, 4]
Test 21, RTL:
Move left by one word
-" ABW DSU HJH abc def jih FUX FUX YR[ "[4, 8, 15, 22, 34, 28, 41, 47, 52]
+" ABW DSU HJH abc def jih FUX FUX YR[ "[4, 8, 15, 22, 34, 28, 41, 47, 52, 58]
Move right by one word
" ABW DSU HJH abc def jih FUX FUX YR[ "[58, 52, 47, 41, 28, 34, 22, 15, 8, 4]
Test 22, LTR:
Move right by one word
-"abc def hij opq"[0, 4, 11, 15]
+"abc def hij opq"[0, 4, 11, 15, 18]
Move left by one word
"abc def hij opq"[18, 15, 11, 4, 0]
Test 23, LTR:
Move right by one word
-" abc def hij opq "[0, 4, 11, 18, 25]
+" abc def hij opq "[0, 4, 11, 18, 25, 32]
Move left by one word
" abc def hij opq "[32, 25, 18, 11, 4, 0]
Test 24, LTR:
Move right by one word
-" abc ABW def "[0, 4, 11, 18]
+" abc ABW def "[0, 4, 11, 18, 25]
Move left by one word
" abc ABW def "[25, 18, 11, 4, 0]
Test 25, LTR:
Move right by one word
-" abc def ABW DDU hij opq "[0, 4, 11, 18, 21, 32, 39]
+" abc def ABW DDU hij opq "[0, 4, 11, 18, 21, 32, 39, 46]
Move left by one word
" abc def ABW DDU hij opq "[46, 39, 32, 21, 18, 11, 4, 0]
Test 26, LTR:
Move right by one word
-" abc def hij ABW DSU EJH opq rst uvw "[0, 4, 11, 18, 25, 35, 28, 46, 53, 60]
+" abc def hij ABW DSU EJH opq rst uvw "[0, 4, 11, 18, 25, 35, 28, 46, 53, 60, 67]
Move left by one word
" abc def hij ABW DSU EJH opq rst uvw "[67, 60, 53, 46, 28, 35, 25, 18, 11, 4, 0]
Test 27, LTR:
Move right by one word
-" ABW DSU HJH FUX "[0, 4, 21, 14, 7]
+" ABW DSU HJH FUX "[0, 4, 21, 14, 7, 32]
Move left by one word
" ABW DSU HJH FUX "[32, 7, 14, 21, 4, 0]
Test 28, LTR:
Move right by one word
-" ABW abc DSU "[0, 4, 11, 18]
+" ABW abc DSU "[0, 4, 11, 18, 26]
Move left by one word
" ABW abc DSU "[26, 18, 11, 4, 0]
Test 29, LTR:
Move right by one word
-" ABW DSU abc def HJH FUX "[0, 4, 7, 18, 24, 30, 33]
+" ABW DSU abc def HJH FUX "[0, 4, 7, 18, 24, 30, 33, 44]
Move left by one word
" ABW DSU abc def HJH FUX "[44, 33, 30, 24, 18, 7, 4, 0]
Test 30, LTR:
Move right by one word
-" ABW DSU HJH abc def jih FUX FUX YR[ "[0, 4, 14, 7, 25, 31, 37, 43, 51, 46]
+" ABW DSU HJH abc def jih FUX FUX YR[ "[0, 4, 14, 7, 25, 31, 37, 43, 51, 46, 63]
Move left by one word
" ABW DSU HJH abc def jih FUX FUX YR[ "[63, 46, 51, 43, 37, 31, 25, 7, 14, 4, 0]
Test 31, LTR:
Move right by one word
-"ABW DSU EJH FUX"[0, 14, 7, 3]
+"ABW DSU EJH FUX"[0, 14, 7, 3, 18]
Move left by one word
"ABW DSU EJH FUX"[18, 3, 7, 14, 0]
Test 32, LTR:
Move right by one word
-"ABW DSU EJH abc def hij"[0, 7, 3, 15, 19, 23]
+"ABW DSU EJH abc def hij"[0, 7, 3, 15, 19, 23, 26]
Move left by one word
"ABW DSU EJH abc def hij"[26, 23, 19, 15, 3, 7, 0]
Test 33, LTR:
Move right by one word
-"abc def hij ABW DSU EJH opq rst uvw"[0, 4, 8, 15, 22, 18, 30, 34, 38]
+"abc def hij ABW DSU EJH opq rst uvw"[0, 4, 8, 15, 22, 18, 30, 34, 38, 41]
Move left by one word
"abc def hij ABW DSU EJH opq rst uvw"[41, 38, 34, 30, 18, 22, 15, 8, 4, 0]
Test 34, RTL:
Move left by one word
-"abc def hij opq"[0, 14, 7, 3]
+"abc def hij opq"[0, 14, 7, 3, 18]
Move right by one word
"abc def hij opq"[18, 3, 7, 14, 0]
Test 35, RTL:
Move left by one word
-" abc def hij opq "[0, 4, 21, 14, 7]
+" abc def hij opq "[0, 4, 21, 14, 7, 32]
Move right by one word
" abc def hij opq "[32, 7, 14, 21, 4, 0]
Test 36, RTL:
Move left by one word
-" abc ABW def "[0, 4, 11, 18]
+" abc ABW def "[0, 4, 11, 18, 25]
Move right by one word
" abc ABW def "[25, 18, 11, 4, 0]
Test 37, RTL:
Move left by one word
-" abc def ABW DDU hij opq "[0, 4, 7, 18, 25, 32, 35]
+" abc def ABW DDU hij opq "[0, 4, 7, 18, 25, 32, 35, 46]
Move right by one word
" abc def ABW DDU hij opq "[46, 35, 32, 25, 18, 7, 4, 0]
Test 38, RTL:
Move left by one word
-" abc def hij ABW DSU EJH opq rst uvw "[0, 4, 14, 7, 25, 32, 39, 46, 56, 49]
+" abc def hij ABW DSU EJH opq rst uvw "[0, 4, 14, 7, 25, 32, 39, 46, 56, 49, 67]
Move right by one word
" abc def hij ABW DSU EJH opq rst uvw "[67, 49, 56, 46, 39, 32, 25, 7, 14, 4, 0]
Test 39, RTL:
Move left by one word
-" ABW DSU HJH FUX "[0, 4, 11, 18, 25]
+" ABW DSU HJH FUX "[0, 4, 11, 18, 25, 32]
Move right by one word
" ABW DSU HJH FUX "[32, 25, 18, 11, 4, 0]
Test 40, RTL:
Move left by one word
-" ABW abc DSU "[0, 4, 11, 18]
+" ABW abc DSU "[0, 4, 11, 18, 26]
Move right by one word
" ABW abc DSU "[26, 18, 11, 4, 0]
Test 41, RTL:
Move left by one word
-" ABW DSU abc def HJH FUX "[0, 4, 11, 18, 21, 30, 37]
+" ABW DSU abc def HJH FUX "[0, 4, 11, 18, 21, 30, 37, 44]
Move right by one word
" ABW DSU abc def HJH FUX "[44, 37, 30, 21, 18, 11, 4, 0]
Test 42, RTL:
Move left by one word
-" ABW DSU HJH abc def jih FUX FUX YR[ "[0, 4, 11, 18, 25, 34, 28, 43, 48, 55]
+" ABW DSU HJH abc def jih FUX FUX YR[ "[0, 4, 11, 18, 25, 34, 28, 43, 48, 55, 63]
Move right by one word
" ABW DSU HJH abc def jih FUX FUX YR[ "[63, 55, 48, 43, 28, 34, 25, 18, 11, 4, 0]
Test 43, LTR:
Move right by one word
-"䤫䡱暘倎厘 疂崝烵 abc def"[0, 1, 2, 3, 4, 9, 10, 11, 17, 21]
+"䤫䡱暘倎厘 疂崝烵 abc def"[0, 1, 2, 3, 4, 9, 10, 11, 17, 21, 24]
Move left by one word
"䤫䡱暘倎厘 疂崝烵 abc def"[24, 21, 17, 11, 10, 9, 4, 3, 2, 1, 0]
-->
<!-- test multispaces -->
-<div dir=ltr class="test_move_by_word" title="0 4 8 15|18 15 8 4 0" contenteditable>abc def hij opq</div>
-<div dir=ltr class="test_move_by_word" title="4 8 15 22|28 22 15 8 4" contenteditable> abc def hij opq </div>
-<div dir=ltr class="test_move_by_word" title="4 8 15|21 15 8 4" contenteditable> abc אבצ def </div>
-<div dir=ltr class="test_move_by_word" title="4 8 15 21 29 36|42 36 29 21 15 8 4" contenteditable> abc def אבצ דדפ hij opq </div>
-<div dir=ltr class="test_move_by_word" title="4 8 15 22 35 28 43 50 57|63 57 50 43 28 35 22 15 8 4" contenteditable> abc def hij אבצ דעפ היח opq rst uvw </div>
-<div dir=ltr class="test_move_by_word" title="4 21 14 7|28 7 14 21 4" contenteditable> אבצ דעפ חיח ופק </div>
-<div dir=ltr class="test_move_by_word" title="4 8 15|21 15 8 4" contenteditable> אבצ abc דעפ </div>
-<div dir=ltr class="test_move_by_word" title="4 7 15 22 28 33|40 33 28 22 15 7 4" contenteditable> אבצ דעפ abc def חיח ופק </div>
-<div dir=ltr class="test_move_by_word" title="4 14 7 22 29 35 41 51 46|58 46 51 41 35 29 22 7 14 4" contenteditable> אבצ דעפ חיח abc def jih ופק ופק רסת </div>
+<div dir=ltr class="test_move_by_word" title="0 4 8 15 18|18 15 8 4 0" contenteditable>abc def hij opq</div>
+<div dir=ltr class="test_move_by_word" title="4 8 15 22 28|28 22 15 8 4" contenteditable> abc def hij opq </div>
+<div dir=ltr class="test_move_by_word" title="4 8 15 21|21 15 8 4" contenteditable> abc אבצ def </div>
+<div dir=ltr class="test_move_by_word" title="4 8 15 21 29 36 42|42 36 29 21 15 8 4" contenteditable> abc def אבצ דדפ hij opq </div>
+<div dir=ltr class="test_move_by_word" title="4 8 15 22 35 28 43 50 57 63|63 57 50 43 28 35 22 15 8 4" contenteditable> abc def hij אבצ דעפ היח opq rst uvw </div>
+<div dir=ltr class="test_move_by_word" title="4 21 14 7 28|28 7 14 21 4" contenteditable> אבצ דעפ חיח ופק </div>
+<div dir=ltr class="test_move_by_word" title="4 8 15 21|21 15 8 4" contenteditable> אבצ abc דעפ </div>
+<div dir=ltr class="test_move_by_word" title="4 7 15 22 28 33 40|40 33 28 22 15 7 4" contenteditable> אבצ דעפ abc def חיח ופק </div>
+<div dir=ltr class="test_move_by_word" title="4 14 7 22 29 35 41 51 46 58|58 46 51 41 35 29 22 7 14 4" contenteditable> אבצ דעפ חיח abc def jih ופק ופק רסת </div>
-<div dir=ltr class="test_move_by_word" title="0 14 7 3|18 3 7 14 0" contenteditable>אבצ דעפ היח ופק</div>
-<div dir=ltr class="test_move_by_word" title="0 7 3 12 19 23|26 23 19 12 3 7 0" contenteditable>אבצ דעפ היח abc def hij</div>
-<div dir=ltr class="test_move_by_word" title="0 4 8 12 22 18 27 34 38|41 38 34 27 18 22 12 8 4 0" contenteditable>abc def hij אבצ דעפ היח opq rst uvw</div>
+<div dir=ltr class="test_move_by_word" title="0 14 7 3 18|18 3 7 14 0" contenteditable>אבצ דעפ היח ופק</div>
+<div dir=ltr class="test_move_by_word" title="0 7 3 12 19 23 26|26 23 19 12 3 7 0" contenteditable>אבצ דעפ היח abc def hij</div>
+<div dir=ltr class="test_move_by_word" title="0 4 8 12 22 18 27 34 38 41|41 38 34 27 18 22 12 8 4 0" contenteditable>abc def hij אבצ דעפ היח opq rst uvw</div>
-<div dir=rtl class="test_move_by_word" title="18 3 7 14 0|0 14 7 3" contenteditable>abc def hij opq</div>
-<div dir=rtl class="test_move_by_word" title="28 7 14 21 4|4 21 14 7" contenteditable> abc def hij opq </div>
-<div dir=rtl class="test_move_by_word" title="21 15 8 4|4 8 15" contenteditable> abc אבצ def </div>
-<div dir=rtl class="test_move_by_word" title="42 35 29 22 15 7 4|4 7 15 22 29 35" contenteditable> abc def אבצ דדפ hij opq </div>
-<div dir=rtl class="test_move_by_word" title="63 49 56 43 36 29 22 7 14 4|4 14 7 22 29 36 43 56 49" contenteditable> abc def hij אבצ דעפ היח opq rst uvw </div>
-<div dir=rtl class="test_move_by_word" title="28 22 15 8 4|4 8 15 22" contenteditable> אבצ דעפ חיח ופק </div>
-<div dir=rtl class="test_move_by_word" title="21 15 8 4|4 8 15" contenteditable> אבצ abc דעפ </div>
-<div dir=rtl class="test_move_by_word" title="40 34 28 21 15 8 4|4 8 15 21 28 34" contenteditable> אבצ דעפ abc def חיח ופק </div>
-<div dir=rtl class="test_move_by_word" title="58 52 47 41 28 34 22 15 8 4|4 8 15 22 34 28 41 47 52" contenteditable> אבצ דעפ חיח abc def jih ופק ופק רסת </div>
+<div dir=rtl class="test_move_by_word" title="18 3 7 14 0|0 14 7 3 18" contenteditable>abc def hij opq</div>
+<div dir=rtl class="test_move_by_word" title="28 7 14 21 4|4 21 14 7 28" contenteditable> abc def hij opq </div>
+<div dir=rtl class="test_move_by_word" title="21 15 8 4|4 8 15 21" contenteditable> abc אבצ def </div>
+<div dir=rtl class="test_move_by_word" title="42 35 29 22 15 7 4|4 7 15 22 29 35 42" contenteditable> abc def אבצ דדפ hij opq </div>
+<div dir=rtl class="test_move_by_word" title="63 49 56 43 36 29 22 7 14 4|4 14 7 22 29 36 43 56 49 63" contenteditable> abc def hij אבצ דעפ היח opq rst uvw </div>
+<div dir=rtl class="test_move_by_word" title="28 22 15 8 4|4 8 15 22 28" contenteditable> אבצ דעפ חיח ופק </div>
+<div dir=rtl class="test_move_by_word" title="21 15 8 4|4 8 15 21" contenteditable> אבצ abc דעפ </div>
+<div dir=rtl class="test_move_by_word" title="40 34 28 21 15 8 4|4 8 15 21 28 34 40" contenteditable> אבצ דעפ abc def חיח ופק </div>
+<div dir=rtl class="test_move_by_word" title="58 52 47 41 28 34 22 15 8 4|4 8 15 22 34 28 41 47 52 58" contenteditable> אבצ דעפ חיח abc def jih ופק ופק רסת </div>
<!-- multispaces while preserving spaces -->
-<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 11 15|18 15 11 4 0" contenteditable>abc def hij opq</div>
-<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 11 18 25|32 25 18 11 4 0" contenteditable> abc def hij opq </div>
-<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 11 18|25 18 11 4 0" contenteditable> abc אבצ def </div>
-<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 11 18 21 32 39|46 39 32 21 18 11 4 0" contenteditable> abc def אבצ דדפ hij opq </div>
-<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 11 18 25 35 28 46 53 60|67 60 53 46 28 35 25 18 11 4 0" contenteditable> abc def hij אבצ דעפ היח opq rst uvw </div>
-<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 21 14 7|32 7 14 21 4 0" contenteditable> אבצ דעפ חיח ופק </div>
-<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 11 18|26 18 11 4 0" contenteditable> אבצ abc דעפ </div>
-<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 7 18 24 30 33|44 33 30 24 18 7 4 0" contenteditable> אבצ דעפ abc def חיח ופק </div>
-<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 14 7 25 31 37 43 51 46|63 46 51 43 37 31 25 7 14 4 0" contenteditable> אבצ דעפ חיח abc def jih ופק ופק רסת </div>
+<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 11 15 18|18 15 11 4 0" contenteditable>abc def hij opq</div>
+<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 11 18 25 32|32 25 18 11 4 0" contenteditable> abc def hij opq </div>
+<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 11 18 25|25 18 11 4 0" contenteditable> abc אבצ def </div>
+<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 11 18 21 32 39 46|46 39 32 21 18 11 4 0" contenteditable> abc def אבצ דדפ hij opq </div>
+<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 11 18 25 35 28 46 53 60 67|67 60 53 46 28 35 25 18 11 4 0" contenteditable> abc def hij אבצ דעפ היח opq rst uvw </div>
+<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 21 14 7 32|32 7 14 21 4 0" contenteditable> אבצ דעפ חיח ופק </div>
+<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 11 18 26|26 18 11 4 0" contenteditable> אבצ abc דעפ </div>
+<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 7 18 24 30 33 44|44 33 30 24 18 7 4 0" contenteditable> אבצ דעפ abc def חיח ופק </div>
+<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 14 7 25 31 37 43 51 46 63|63 46 51 43 37 31 25 7 14 4 0" contenteditable> אבצ דעפ חיח abc def jih ופק ופק רסת </div>
-<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 14 7 3|18 3 7 14 0" contenteditable>אבצ דעפ היח ופק</div>
-<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 7 3 15 19 23|26 23 19 15 3 7 0" contenteditable>אבצ דעפ היח abc def hij</div>
-<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 8 15 22 18 30 34 38|41 38 34 30 18 22 15 8 4 0" contenteditable>abc def hij אבצ דעפ היח opq rst uvw</div>
+<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 14 7 3 18|18 3 7 14 0" contenteditable>אבצ דעפ היח ופק</div>
+<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 7 3 15 19 23 26|26 23 19 15 3 7 0" contenteditable>אבצ דעפ היח abc def hij</div>
+<div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 4 8 15 22 18 30 34 38 41|41 38 34 30 18 22 15 8 4 0" contenteditable>abc def hij אבצ דעפ היח opq rst uvw</div>
-<div style="white-space:pre" dir=rtl class="test_move_by_word" title="18 3 7 14 0|0 14 7 3" contenteditable>abc def hij opq</div>
-<div style="white-space:pre" dir=rtl class="test_move_by_word" title="32 7 14 21 4 0|0 4 21 14 7" contenteditable> abc def hij opq </div>
-<div style="white-space:pre" dir=rtl class="test_move_by_word" title="25 18 11 4 0|0 4 11 18" contenteditable> abc אבצ def </div>
-<div style="white-space:pre" dir=rtl class="test_move_by_word" title="46 35 32 25 18 7 4 0|0 4 7 18 25 32 35" contenteditable> abc def אבצ דדפ hij opq </div>
-<div style="white-space:pre" dir=rtl class="test_move_by_word" title="67 49 56 46 39 32 25 7 14 4 0|0 4 14 7 25 32 39 46 56 49" contenteditable> abc def hij אבצ דעפ היח opq rst uvw </div>
-<div style="white-space:pre" dir=rtl class="test_move_by_word" title="32 25 18 11 4 0|0 4 11 18 25" contenteditable> אבצ דעפ חיח ופק </div>
-<div style="white-space:pre" dir=rtl class="test_move_by_word" title="26 18 11 4 0|0 4 11 18" contenteditable> אבצ abc דעפ </div>
-<div style="white-space:pre" dir=rtl class="test_move_by_word" title="44 37 30 21 18 11 4 0|0 4 11 18 21 30 37" contenteditable> אבצ דעפ abc def חיח ופק </div>
-<div style="white-space:pre" dir=rtl class="test_move_by_word" title="63 55 48 43 28 34 25 18 11 4 0|0 4 11 18 25 34 28 43 48 55" contenteditable> אבצ דעפ חיח abc def jih ופק ופק רסת </div>
+<div style="white-space:pre" dir=rtl class="test_move_by_word" title="18 3 7 14 0|0 14 7 3 18" contenteditable>abc def hij opq</div>
+<div style="white-space:pre" dir=rtl class="test_move_by_word" title="32 7 14 21 4 0|0 4 21 14 7 32" contenteditable> abc def hij opq </div>
+<div style="white-space:pre" dir=rtl class="test_move_by_word" title="25 18 11 4 0|0 4 11 18 25" contenteditable> abc אבצ def </div>
+<div style="white-space:pre" dir=rtl class="test_move_by_word" title="46 35 32 25 18 7 4 0|0 4 7 18 25 32 35 46" contenteditable> abc def אבצ דדפ hij opq </div>
+<div style="white-space:pre" dir=rtl class="test_move_by_word" title="67 49 56 46 39 32 25 7 14 4 0|0 4 14 7 25 32 39 46 56 49 67" contenteditable> abc def hij אבצ דעפ היח opq rst uvw </div>
+<div style="white-space:pre" dir=rtl class="test_move_by_word" title="32 25 18 11 4 0|0 4 11 18 25 32" contenteditable> אבצ דעפ חיח ופק </div>
+<div style="white-space:pre" dir=rtl class="test_move_by_word" title="26 18 11 4 0|0 4 11 18 26" contenteditable> אבצ abc דעפ </div>
+<div style="white-space:pre" dir=rtl class="test_move_by_word" title="44 37 30 21 18 11 4 0|0 4 11 18 21 30 37 44" contenteditable> אבצ דעפ abc def חיח ופק </div>
+<div style="white-space:pre" dir=rtl class="test_move_by_word" title="63 55 48 43 28 34 25 18 11 4 0|0 4 11 18 25 34 28 43 48 55 63" contenteditable> אבצ דעפ חיח abc def jih ופק ופק רסת </div>
<!-- test words not separated by spaces -->
-<div style="white-space:pre" contenteditable dir=ltr class="test_move_by_word" title="0 1 2 3 4 9 10 11 17 21|24 21 17 11 10 9 4 3 2 1 0">人一氧喝大 笑抬的 abc def</div>
+<div style="white-space:pre" contenteditable dir=ltr class="test_move_by_word" title="0 1 2 3 4 9 10 11 17 21 24|24 21 17 11 10 9 4 3 2 1 0">人一氧喝大 笑抬的 abc def</div>
</div>
<pre id="console"></pre>
======== Move By Word ====
Test 1, LTR:
Move right by one word
-"AAA "[0, 3]
+"AAA "[0, 3], "BB"[2]
Move left by one word
"BB"[2], "AAA "[3, 0]
Test 2, RTL:
Move left by one word
-"AAA "[0, 4]
+"AAA "[0, 4], "BB"[2]
Move right by one word
"BB"[2], "AAA "[4, 0]
Test 3, LTR:
Move right by one word
-"abc def "[0, 4, 8], "hij opq"[4], " rst uvw"[1, 5]
+"abc def "[0, 4, 8], "hij opq"[4], " rst uvw"[1, 5, 8]
Move left by one word
" rst uvw"[8, 5, 1], "hij opq"[4], "abc def "[8, 4, 0]
Test 4, RTL:
Move left by one word
-"abc def "[0], " rst uvw"[4], "hij opq"[3], "abc def "[7, 3] FAIL expected: ["abc def "[ 0, ]" rst uvw"[ 4, ]"hij opq"[ 7, 3, ]"abc def "[ 7, 3]
+"abc def "[0], " rst uvw"[4], "hij opq"[3], "abc def "[7, 3], " rst uvw"[8] FAIL expected: ["abc def "[ 0, ]" rst uvw"[ 4, ]"hij opq"[ 7, 3, ]"abc def "[ 7, 3, ]" rst uvw"[ 8]
" rst uvw"[4], "hij opq"[3] FAIL expected "hij opq"[ 7]
" rst uvw"[3], "hij opq"[3] FAIL expected "hij opq"[ 7]
" rst uvw"[2], "hij opq"[3] FAIL expected "hij opq"[ 7]
"hij opq"[6], " rst uvw"[4] FAIL expected "hij opq"[ 7]
Test 5, RTL:
Move left by one word
-"abc def "[0], " rst uvw"[4], "hij opq"[3], "abc def "[7, 3] FAIL expected: ["abc def "[ 0, ]" rst uvw"[ 4, ]"hij opq"[ 7, 3, ]"abc def "[ 7, 3]
+"abc def "[0], " rst uvw"[4], "hij opq"[3], "abc def "[7, 3], " rst uvw"[8] FAIL expected: ["abc def "[ 0, ]" rst uvw"[ 4, ]"hij opq"[ 7, 3, ]"abc def "[ 7, 3, ]" rst uvw"[ 8]
" rst uvw"[4], "hij opq"[3] FAIL expected "hij opq"[ 7]
" rst uvw"[3], "hij opq"[3] FAIL expected "hij opq"[ 7]
" rst uvw"[2], "hij opq"[3] FAIL expected "hij opq"[ 7]
"hij opq"[6], " rst uvw"[4] FAIL expected "hij opq"[ 7]
Test 6, LTR:
Move right by one word
-"abc def "[0, 4, 8], "hij opq"[4], " rst uvw"[1, 5]
+"abc def "[0, 4, 8], "hij opq"[4], " rst uvw"[1, 5, 8]
Move left by one word
" rst uvw"[8, 5, 1], "hij opq"[4], "abc def "[8, 4, 0]
Test 7, RTL:
Move left by one word
-"ABD DSU "[0, 4, 8], "EJH FUX"[4], "FFZ LIG"[4]
+"ABD DSU "[0, 4, 8], "EJH FUX"[4], "FFZ LIG"[4, 7]
Move right by one word
"FFZ LIG"[7, 4], "EJH FUX"[4], "ABD DSU "[8, 4, 0]
Test 8, LTR:
Move right by one word
-"ABD DSU "[0], "FFZ LIG"[3], "EJH FUX"[3], "ABD DSU "[7, 3]
+"ABD DSU "[0], "FFZ LIG"[3], "EJH FUX"[3], "ABD DSU "[7, 3], "FFZ LIG"[7]
Move left by one word
"FFZ LIG"[7], "ABD DSU "[3, 7], "EJH FUX"[3], "FFZ LIG"[3], "ABD DSU "[0]
Test 9, RTL:
Move left by one word
-"ABD DSU "[0, 4, 8], "EJH FUX"[4], "FFZ LIG"[4]
+"ABD DSU "[0, 4, 8], "EJH FUX"[4], "FFZ LIG"[4, 7]
Move right by one word
"FFZ LIG"[7, 4], "EJH FUX"[4], "ABD DSU "[8, 4, 0]
Test 10, LTR:
Move right by one word
-"ABD DSU "[0], "FFZ LIG"[3], "EJH FUX"[3], "ABD DSU "[7, 3]
+"ABD DSU "[0], "FFZ LIG"[3], "EJH FUX"[3], "ABD DSU "[7, 3], "FFZ LIG"[7]
Move left by one word
"FFZ LIG"[7], "ABD DSU "[3, 7], "EJH FUX"[3], "FFZ LIG"[3], "ABD DSU "[0]
Test 11, RTL:
Move left by one word
-"ABD DSU "[0, 4, 8], "abc def"[3], "FFZ LIG"[4]
+"ABD DSU "[0, 4, 8], "abc def"[3], "FFZ LIG"[4, 7]
Move right by one word
"FFZ LIG"[7, 4], "abc def"[3], "ABD DSU "[8, 4, 0]
Test 12, LTR:
Move right by one word
-"ABD DSU "[0], "FFZ LIG"[3], "ABD DSU "[8], "abc def"[4], "ABD DSU "[7, 3]
+"ABD DSU "[0], "FFZ LIG"[3], "ABD DSU "[8], "abc def"[4], "ABD DSU "[7, 3], "FFZ LIG"[7]
Move left by one word
"FFZ LIG"[7], "ABD DSU "[3, 7], "abc def"[4], "ABD DSU "[8], "FFZ LIG"[3] FAIL expected: ["FFZ LIG"[ 7, ]"ABD DSU "[ 3, 7, ]"abc def"[ 4, ]"ABD DSU "[ 8, ]"FFZ LIG"[ 3, ]"ABD DSU "[ 0]
"FFZ LIG"[3, 3] FAIL expected "ABD DSU "[ 0]
"FFZ LIG"[6, 6] FAIL expected "ABD DSU "[ 0]
Test 13, RTL:
Move left by one word
-"ABD DSU "[0, 4, 8], "abc def"[3], "FFZ LIG"[4]
+"ABD DSU "[0, 4, 8], "abc def"[3], "FFZ LIG"[4, 7]
Move right by one word
"FFZ LIG"[7, 4], "abc def"[3], "ABD DSU "[8, 4, 0]
Test 14, LTR:
Move right by one word
-"ABD DSU "[0, 3, 8], "abc def"[4], "FFZ LIG"[3]
+"ABD DSU "[0, 3, 8], "abc def"[4], "FFZ LIG"[3, 7]
Move left by one word
"FFZ LIG"[7, 3], "abc def"[4], "ABD DSU "[8, 3, 0]
Test 15, RTL:
Move left by one word
-"ABD opq DSU "[0, 4, 8, 12], "abc AAA def"[8, 4, 3], "FFZ rst LIG"[4, 8] FAIL expected: ["ABD opq DSU "[ 0, 4, 8, 12, ]"abc AAA def"[ 4, 3, ]"FFZ rst LIG"[ 4, 8]
+"ABD opq DSU "[0, 4, 8, 12], "abc AAA def"[8, 4, 3], "FFZ rst LIG"[4, 8, 11] FAIL expected: ["ABD opq DSU "[ 0, 4, 8, 12, ]"abc AAA def"[ 4, 3, ]"FFZ rst LIG"[ 4, 8, 11]
"ABD opq DSU "[12], "abc AAA def"[8] FAIL expected "abc AAA def"[ 4]
"abc AAA def"[10, 8] FAIL expected "abc AAA def"[ 4]
"abc AAA def"[9, 8] FAIL expected "abc AAA def"[ 4]
"FFZ rst LIG"[2], "ABD opq DSU "[4] FAIL expected "ABD opq DSU "[ 8]
Test 17, RTL:
Move left by one word
-"ABD opq DSU "[0, 4, 8, 12], "abc AAA def"[4, 8], "FFZ rst LIG"[4, 8]
+"ABD opq DSU "[0, 4, 8, 12], "abc AAA def"[4, 8], "FFZ rst LIG"[4, 8, 11]
Move right by one word
"FFZ rst LIG"[11, 8, 4], "abc AAA def"[8, 4], "ABD opq DSU "[12, 8, 4, 0]
Test 18, LTR:
"FFZ rst LIG"[11, 8, 4], "abc AAA def"[8, 4], "ABD opq DSU "[12, 8, 4, 0]
Test 19, LTR:
Move right by one word
-"aaa "[0, 4], "bbb AAA "[4, 7]
+"aaa "[0, 4], "bbb AAA "[4, 7], "FFZ"[3]
Move left by one word
"FFZ"[3], "bbb AAA "[7, 4], "aaa "[4, 0]
Test 20, RTL:
Move left by one word
-"ABD opq rst DSU "[0, 4, 7, 12, 16], "abc uvw AAA def lmn"[12, 8, 7, 3], "ABW hij xyz FXX"[4, 7, 12] FAIL expected: ["ABD opq rst DSU "[ 0, 4, 7, 12, 16, ]"abc uvw AAA def lmn"[ 15, 8, 7, 3, ]"ABW hij xyz FXX"[ 4, 7, 12]
+"ABD opq rst DSU "[0, 4, 7, 12, 16], "abc uvw AAA def lmn"[12, 8, 7, 3], "ABW hij xyz FXX"[4, 7, 12, 15] FAIL expected: ["ABD opq rst DSU "[ 0, 4, 7, 12, 16, ]"abc uvw AAA def lmn"[ 15, 8, 7, 3, ]"ABW hij xyz FXX"[ 4, 7, 12, 15]
"ABD opq rst DSU "[16], "abc uvw AAA def lmn"[12] FAIL expected "abc uvw AAA def lmn"[ 15]
"abc uvw AAA def lmn"[18, 12] FAIL expected "abc uvw AAA def lmn"[ 15]
"abc uvw AAA def lmn"[17, 12] FAIL expected "abc uvw AAA def lmn"[ 15]
where child_node_index is optional, default is the first child of the anchor node.
-->
<!-- Inline element -->
-<div dir=ltr id="d_1" class="test_move_by_word" title="[d_1, 0][d_1, 3]|[s_1, 2][d_1, 3][d_1,0]" contenteditable>אאא <span id="s_1">בב</span></div>
-<div dir=rtl id="d_2" class="test_move_by_word" title="[s_2, 2][d_2, 4][d_2, 0]|[d_2, 0][d_2, 4]" contenteditable>אאא <span id="s_2">בב</span></div>
+<div dir=ltr id="d_1" class="test_move_by_word" title="[d_1, 0][d_1, 3][s_1, 2]|[s_1, 2][d_1, 3][d_1,0]" contenteditable>אאא <span id="s_1">בב</span></div>
+<div dir=rtl id="d_2" class="test_move_by_word" title="[s_2, 2][d_2, 4][d_2, 0]|[d_2, 0][d_2, 4][s_2, 2]" contenteditable>אאא <span id="s_2">בב</span></div>
<!-- pure English in inline element with same or different directionality from its parent -->
-<div dir=ltr id="d_3" class="test_move_by_word" title="[d_3, 0][d_3, 4][d_3, 8][s_3, 4][d_3, 1, 3][d_3, 5, 3]|[d_3, 8, 3][d_3, 5, 3][d_3, 1, 3][s_3, 4][d_3, 8][d_3, 4][d_3, 0]" contenteditable>abc def <span id="s_3">hij opq</span> rst uvw</div>
+<div dir=ltr id="d_3" class="test_move_by_word" title="[d_3, 0][d_3, 4][d_3, 8][s_3, 4][d_3, 1, 3][d_3, 5, 3][d_3, 8, 3]|[d_3, 8, 3][d_3, 5, 3][d_3, 1, 3][s_3, 4][d_3, 8][d_3, 4][d_3, 0]" contenteditable>abc def <span id="s_3">hij opq</span> rst uvw</div>
<!-- FAILED -->
-<div dir=rtl id="d_4" class="test_move_by_word" title="[d_4, 8, 3][d_4, 3, 1][d_4, 7, 1][s_4, 3, 1][s_4, 7, 1][d_4, 4, 3][d_4, 0, 1]|[d_4, 0, 1][d_4, 4, 3][s_4, 7, 1][s_4, 3, 1][d_4, 7, 1][d_4, 3, 1]" contenteditable>abc def <span id="s_4">hij opq</span> rst uvw</div>
+<div dir=rtl id="d_4" class="test_move_by_word" title="[d_4, 8, 3][d_4, 3, 1][d_4, 7, 1][s_4, 3, 1][s_4, 7, 1][d_4, 4, 3][d_4, 0, 1]|[d_4, 0, 1][d_4, 4, 3][s_4, 7, 1][s_4, 3, 1][d_4, 7, 1][d_4, 3, 1][d_4, 8, 3]" contenteditable>abc def <span id="s_4">hij opq</span> rst uvw</div>
<!-- FAILED. The render result is the same as d_4. -->
-<div id="d_5" dir=rtl class="test_move_by_word" title="[d_5, 8, 3][d_5, 3, 1][d_5, 7, 1][s_5, 3, 1][s_5, 7, 1][d_5, 4, 3][d_5, 0, 1]|[d_5, 0, 1][d_5, 4, 3][s_5, 7, 1][s_5, 3, 1][d_5, 7, 1][d_5, 3, 1]"contenteditable>abc def <span dir=ltr id="s_5">hij opq</span> rst uvw</div>
+<div id="d_5" dir=rtl class="test_move_by_word" title="[d_5, 8, 3][d_5, 3, 1][d_5, 7, 1][s_5, 3, 1][s_5, 7, 1][d_5, 4, 3][d_5, 0, 1]|[d_5, 0, 1][d_5, 4, 3][s_5, 7, 1][s_5, 3, 1][d_5, 7, 1][d_5, 3, 1][d_5, 8, 3]"contenteditable>abc def <span dir=ltr id="s_5">hij opq</span> rst uvw</div>
-<div id="d_6" dir=ltr class="test_move_by_word" title="[d_6, 0, 1][d_6, 4, 1][d_6, 8, 1][s_6, 4, 1][d_6, 1, 3][d_6, 5, 3]|[d_6, 8, 3][d_6, 5, 3][d_6, 1, 3][s_6, 4, 1][d_6, 8, 1][d_6, 4, 1][d_6, 0, 1]" contenteditable>abc def <span dir=rtl id="s_6">hij opq</span> rst uvw</div>
+<div id="d_6" dir=ltr class="test_move_by_word" title="[d_6, 0, 1][d_6, 4, 1][d_6, 8, 1][s_6, 4, 1][d_6, 1, 3][d_6, 5, 3][d_6, 8, 3]|[d_6, 8, 3][d_6, 5, 3][d_6, 1, 3][s_6, 4, 1][d_6, 8, 1][d_6, 4, 1][d_6, 0, 1]" contenteditable>abc def <span dir=rtl id="s_6">hij opq</span> rst uvw</div>
<!-- pure Hebrew in inline element with same or different directionality from its parent -->
-<div id="d_7" dir=rtl class="test_move_by_word" title="[d_7, 7, 3][d_7, 4, 3][s_7, 4, 1][d_7, 8, 1][d_7, 4, 1][d_7, 0, 1]|[d_7, 0, 1][d_7, 4, 1][d_7, 8, 1][s_7, 4, 1][d_7, 4, 3]" contenteditable>אבד דעפ <span dir=ltr id="s_7">היח ופק</span>ווש כטז</div>
+<div id="d_7" dir=rtl class="test_move_by_word" title="[d_7, 7, 3][d_7, 4, 3][s_7, 4, 1][d_7, 8, 1][d_7, 4, 1][d_7, 0, 1]|[d_7, 0, 1][d_7, 4, 1][d_7, 8, 1][s_7, 4, 1][d_7, 4, 3][d_7, 7, 3]" contenteditable>אבד דעפ <span dir=ltr id="s_7">היח ופק</span>ווש כטז</div>
-<div id="d_8" dir=ltr class="test_move_by_word" title="[d_8, 0, 1][d_8, 3, 3][s_8, 3, 1][d_8, 7, 1][d_8, 3, 1]|[d_8, 7, 3][d_8, 3, 1][d_8, 7, 1][s_8, 3, 1][d_8, 3, 3][d_8, 0, 1]" contenteditable>אבד דעפ <span dir=rtl id="s_8">היח ופק</span>ווש כטז</div>
+<div id="d_8" dir=ltr class="test_move_by_word" title="[d_8, 0, 1][d_8, 3, 3][s_8, 3, 1][d_8, 7, 1][d_8, 3, 1][d_8, 7, 3]|[d_8, 7, 3][d_8, 3, 1][d_8, 7, 1][s_8, 3, 1][d_8, 3, 3][d_8, 0, 1]" contenteditable>אבד דעפ <span dir=rtl id="s_8">היח ופק</span>ווש כטז</div>
-<div id="d_9" dir=rtl class="test_move_by_word" title="[d_9, 7, 3][d_9, 4, 3][s_9, 4, 1][d_9, 8, 1][d_9, 4, 1][d_9, 0, 1]|[d_9, 0, 1][d_9, 4, 1][d_9, 8, 1][s_9, 4, 1][d_9, 4, 3]" contenteditable>אבד דעפ <span id="s_9">היח ופק</span>ווש כטז</div>
+<div id="d_9" dir=rtl class="test_move_by_word" title="[d_9, 7, 3][d_9, 4, 3][s_9, 4, 1][d_9, 8, 1][d_9, 4, 1][d_9, 0, 1]|[d_9, 0, 1][d_9, 4, 1][d_9, 8, 1][s_9, 4, 1][d_9, 4, 3][d_9, 7, 3]" contenteditable>אבד דעפ <span id="s_9">היח ופק</span>ווש כטז</div>
-<div id="d_10" dir=ltr class="test_move_by_word" title="[d_10, 0, 1][d_10, 3, 3][s_10, 3, 1][d_10, 7, 1][d_10, 3, 1]|[d_10, 7, 3][d_10, 3, 1][d_10, 7, 1][s_10, 3, 1][d_10, 3, 3][d_10, 0, 1]" contenteditable>אבד דעפ <span id="s_10">היח ופק</span>ווש כטז</div>
+<div id="d_10" dir=ltr class="test_move_by_word" title="[d_10, 0, 1][d_10, 3, 3][s_10, 3, 1][d_10, 7, 1][d_10, 3, 1][d_10, 7, 3]|[d_10, 7, 3][d_10, 3, 1][d_10, 7, 1][s_10, 3, 1][d_10, 3, 3][d_10, 0, 1]" contenteditable>אבד דעפ <span id="s_10">היח ופק</span>ווש כטז</div>
<!-- bidi in inline element with same or different directionality from its parent -->
-<div id="d_11" dir=rtl class="test_move_by_word" title="[d_11, 7, 3][d_11, 4, 3][s_11, 3, 1][d_11, 8, 1][d_11, 4, 1][d_11, 0, 1]|[d_11, 0, 1][d_11, 4, 1][d_11, 8, 1][s_11, 3, 1][d_11, 4, 3]" contenteditable>אבד דעפ <span dir=ltr id="s_11">abc def</span>ווש כטז</div>
+<div id="d_11" dir=rtl class="test_move_by_word" title="[d_11, 7, 3][d_11, 4, 3][s_11, 3, 1][d_11, 8, 1][d_11, 4, 1][d_11, 0, 1]|[d_11, 0, 1][d_11, 4, 1][d_11, 8, 1][s_11, 3, 1][d_11, 4, 3][d_11, 7, 3]" contenteditable>אבד דעפ <span dir=ltr id="s_11">abc def</span>ווש כטז</div>
<!-- FAIL -->
-<div id="d_12" dir=ltr class="test_move_by_word" title="[d_12, 0, 1][d_12, 3, 3][d_12, 8, 1][s_12, 4, 1][d_12, 7, 1][d_12, 3, 1]|[d_12, 7, 3][d_12, 3, 1][d_12, 7, 1][s_12, 4, 1][d_12, 8, 1][d_12, 3, 3][d_12, 0]" contenteditable>אבד דעפ <span dir=rtl id="s_12">abc def</span>ווש כטז</div>
+<div id="d_12" dir=ltr class="test_move_by_word" title="[d_12, 0, 1][d_12, 3, 3][d_12, 8, 1][s_12, 4, 1][d_12, 7, 1][d_12, 3, 1][d_12, 7, 3]|[d_12, 7, 3][d_12, 3, 1][d_12, 7, 1][s_12, 4, 1][d_12, 8, 1][d_12, 3, 3][d_12, 0]" contenteditable>אבד דעפ <span dir=rtl id="s_12">abc def</span>ווש כטז</div>
-<div id="d_13" dir=rtl class="test_move_by_word" title="[d_13, 7, 3][d_13, 4, 3][s_13, 3, 1][d_13, 8, 1][d_13, 4, 1][d_13, 0, 1]|[d_13, 0, 1][d_13, 4, 1][d_13, 8, 1][s_13, 3, 1][d_13, 4, 3]" contenteditable>אבד דעפ <span id="s_13">abc def</span>ווש כטז</div>
+<div id="d_13" dir=rtl class="test_move_by_word" title="[d_13, 7, 3][d_13, 4, 3][s_13, 3, 1][d_13, 8, 1][d_13, 4, 1][d_13, 0, 1]|[d_13, 0, 1][d_13, 4, 1][d_13, 8, 1][s_13, 3, 1][d_13, 4, 3][d_13, 7, 3]" contenteditable>אבד דעפ <span id="s_13">abc def</span>ווש כטז</div>
-<div id="d_14" dir=ltr class="test_move_by_word" title="[d_14, 0, 1][d_14, 3, 1][d_14, 8, 1][s_14, 4, 1][d_14, 3, 3]|[d_14, 7, 3][d_14, 3, 3][s_14, 4, 1][d_14, 8, 1][d_14, 3, 1][d_14, 0, 1]" contenteditable>אבד דעפ <span id="s_14">abc def</span>ווש כטז</div>
+<div id="d_14" dir=ltr class="test_move_by_word" title="[d_14, 0, 1][d_14, 3, 1][d_14, 8, 1][s_14, 4, 1][d_14, 3, 3][d_14, 7, 3]|[d_14, 7, 3][d_14, 3, 3][s_14, 4, 1][d_14, 8, 1][d_14, 3, 1][d_14, 0, 1]" contenteditable>אבד דעפ <span id="s_14">abc def</span>ווש כטז</div>
<!-- FAILED -->
-<div id="d_15" dir=rtl class="test_move_by_word" title="[d_15, 11, 3][d_15, 8, 3][d_15, 4, 3][s_15, 3, 1][s_15, 4, 1][d_15, 12, 1][d_15, 8, 1][d_15, 4, 1][d_15, 0, 1]|[d_15, 0, 1][d_15, 4, 1][d_15, 8, 1][d_15, 12, 1][s_15, 4, 1][s_15, 3, 1][d_15, 4, 3][d_15, 8, 3]" contenteditable>אבד opq דעפ <span dir=ltr id="s_15">abc אאא def</span>ווש rst כטז</div>
+<div id="d_15" dir=rtl class="test_move_by_word" title="[d_15, 11, 3][d_15, 8, 3][d_15, 4, 3][s_15, 3, 1][s_15, 4, 1][d_15, 12, 1][d_15, 8, 1][d_15, 4, 1][d_15, 0, 1]|[d_15, 0, 1][d_15, 4, 1][d_15, 8, 1][d_15, 12, 1][s_15, 4, 1][s_15, 3, 1][d_15, 4, 3][d_15, 8, 3][d_15, 11, 3]" contenteditable>אבד opq דעפ <span dir=ltr id="s_15">abc אאא def</span>ווש rst כטז</div>
<!-- FAILED, and wrong printing result -->
<div id="d_16" dir=ltr class="test_move_by_word" title="[d_16, 0, 1][d_16, 4, 1][d_16, 8, 1][s_16, 8, 1][s_16, 7, 1][d_16, 12, 1][d_16, 11, 1][d_16, 4, 3][d_16, 8, 3][d_16, 11, 3]|[d_16, 11, 3][d_16, 8, 3][d_16, 4, 3][d_16, 11, 1][d_16, 12, 1][s_16, 7, 1][s_16, 8, 1][d_16, 8, 1][d_16, 4, 1][d_16, 0, 1]" contenteditable>אבד opq דעפ <span dir=rtl id="s_16">abc אאא def</span>ווש rst כטז</div>
<!-- FAILED -->
-<div id="d_17" dir=rtl class="test_move_by_word" title="[d_17, 11, 3][d_17, 8, 3][d_17, 4, 3][s_17, 8, 1][s_17, 4, 1][d_17, 12, 1][d_17, 8, 1][d_17, 4, 1][d_17, 0, 1]|[d_17, 0, 1][d_17, 4, 1][d_17, 8, 1][d_17, 12, 1][s_17, 4, 1][s_17, 8, 1][d_17, 4, 3][d_17, 8, 3]" contenteditable>אבד opq דעפ <span id="s_17">abc אאא def</span>ווש rst כטז</div>
+<div id="d_17" dir=rtl class="test_move_by_word" title="[d_17, 11, 3][d_17, 8, 3][d_17, 4, 3][s_17, 8, 1][s_17, 4, 1][d_17, 12, 1][d_17, 8, 1][d_17, 4, 1][d_17, 0, 1]|[d_17, 0, 1][d_17, 4, 1][d_17, 8, 1][d_17, 12, 1][s_17, 4, 1][s_17, 8, 1][d_17, 4, 3][d_17, 8, 3][d_17, 11, 3]" contenteditable>אבד opq דעפ <span id="s_17">abc אאא def</span>ווש rst כטז</div>
<div id="d_18" dir=ltr class="test_move_by_word" title="[d_18, 0, 1][d_18, 4, 1][d_18, 8, 1][d_18, 12, 1][s_18, 4, 1][s_18, 8, 1][d_18, 4, 3][d_18, 8, 3][d_18, 11, 3]|[d_18, 11, 3][d_18, 8, 3][d_18, 4, 3][s_18, 8, 1][s_18, 4, 1][d_18, 12, 1][d_18, 8, 1][d_18, 4, 1][d_18, 0, 1]" contenteditable>אבד opq דעפ <span id="s_18">abc אאא def</span>ווש rst כטז</div>
-<div id="d_19" dir=ltr class="test_move_by_word" title="[d_19, 0, 1][d_19, 4, 1][s_19, 4, 1][s_19, 7, 1]|[d_19, 3, 3][s_19, 7, 1][s_19, 4, 1][d_19, 4, 1][d_19, 0, 1]" contenteditable>aaa <span id="s_19">bbb אאא </span>ווש</div>
+<div id="d_19" dir=ltr class="test_move_by_word" title="[d_19, 0, 1][d_19, 4, 1][s_19, 4, 1][s_19, 7, 1][d_19, 3, 3]|[d_19, 3, 3][s_19, 7, 1][s_19, 4, 1][d_19, 4, 1][d_19, 0, 1]" contenteditable>aaa <span id="s_19">bbb אאא </span>ווש</div>
-<div id="d_20" dir=rtl class="test_move_by_word" title="[d_20, 15, 3][d_20, 12, 3][d_20, 7, 3][d_20, 4, 3][s_20, 3, 1][s_20, 7, 1][s_20, 8, 1][s_20, 15, 1][d_20, 16, 1][d_20, 12, 1][d_20, 7, 1][d_20, 4, 1][d_20, 0, 1]|[d_20, 0, 1][d_20, 4, 1][d_20, 7, 1][d_20, 12, 1][d_20, 16, 1][s_20, 15, 1][s_20, 8, 1][s_20, 7, 1][s_20, 3, 1][d_20, 4, 3][d_20, 7, 3][d_20, 12, 3]" contenteditable>אבד opq rst דעפ <span dir=ltr id="s_20">abc uvw אאא def lmn</span>אבצ hij xyz וקק</div>
+<div id="d_20" dir=rtl class="test_move_by_word" title="[d_20, 15, 3][d_20, 12, 3][d_20, 7, 3][d_20, 4, 3][s_20, 3, 1][s_20, 7, 1][s_20, 8, 1][s_20, 15, 1][d_20, 16, 1][d_20, 12, 1][d_20, 7, 1][d_20, 4, 1][d_20, 0, 1]|[d_20, 0, 1][d_20, 4, 1][d_20, 7, 1][d_20, 12, 1][d_20, 16, 1][s_20, 15, 1][s_20, 8, 1][s_20, 7, 1][s_20, 3, 1][d_20, 4, 3][d_20, 7, 3][d_20, 12, 3][d_20, 15, 3]" contenteditable>אבד opq rst דעפ <span dir=ltr id="s_20">abc uvw אאא def lmn</span>אבצ hij xyz וקק</div>
</div>
<pre id="console"></pre>
======== Move By Word ====
Test 1, LTR:
Move right by one word
-"abc def hij opq rst"[0, 4, 8, 12, 16]
+"abc def hij opq rst"[0, 4, 8, 12, 16, 19]
Move left by one word
"abc def hij opq rst"[19, 16, 12, 8, 4, 0]
Test 2, RTL:
Move left by one word
-"abc def hij opq rst"[0, 15, 11, 7, 3]
+"abc def hij opq rst"[0, 15, 11, 7, 3, 19]
Move right by one word
"abc def hij opq rst"[19, 3, 7, 11, 15, 0]
Test 3, LTR:
Move right by one word
-"ZZZ QQQ BBB CCC XXX"[0, 15, 11, 7, 3]
+"ZZZ QQQ BBB CCC XXX"[0, 15, 11, 7, 3, 19]
Move left by one word
"ZZZ QQQ BBB CCC XXX"[19, 3, 7, 11, 15, 0]
Test 4, RTL:
Move left by one word
-"ZZZ QQQ BBB CCC XXX"[0, 4, 8, 12, 16]
+"ZZZ QQQ BBB CCC XXX"[0, 4, 8, 12, 16, 19]
Move right by one word
"ZZZ QQQ BBB CCC XXX"[19, 16, 12, 8, 4, 0]
Test 5, LTR:
Move right by one word
-"abc def hij AAA BBB WWW opr uvw xyz"[0, 4, 8, 12, 19, 15, 24, 28, 32]
+"abc def hij AAA BBB WWW opr uvw xyz"[0, 4, 8, 12, 19, 15, 24, 28, 32, 35]
Move left by one word
"abc def hij AAA BBB WWW opr uvw xyz"[35, 32, 28, 24, 15, 19, 12, 8, 4, 0]
Test 6, RTL:
Move left by one word
-"abc def hij AAA BBB WWW opr uvw xyz"[0, 7, 3, 12, 16, 20, 24, 31, 27]
+"abc def hij AAA BBB WWW opr uvw xyz"[0, 7, 3, 12, 16, 20, 24, 31, 27, 35]
Move right by one word
"abc def hij AAA BBB WWW opr uvw xyz"[35, 27, 31, 24, 20, 16, 12, 3, 7, 0]
Test 7, LTR:
Move right by one word
-"abc def ZQB RIG uvw xyz"[0, 4, 8, 11, 16, 20]
+"abc def ZQB RIG uvw xyz"[0, 4, 8, 11, 16, 20, 23]
Move left by one word
"abc def ZQB RIG uvw xyz"[23, 20, 16, 11, 8, 4, 0]
Test 8, RTL:
Move left by one word
-"abc def ZQB RIG uvw xyz"[0, 3, 8, 12, 16, 19]
+"abc def ZQB RIG uvw xyz"[0, 3, 8, 12, 16, 19, 23]
Move right by one word
"abc def ZQB RIG uvw xyz"[23, 19, 16, 12, 8, 3, 0]
Test 9, LTR:
Move right by one word
-"aaa AAA bbb"[0, 4, 8]
+"aaa AAA bbb"[0, 4, 8, 11]
Move left by one word
"aaa AAA bbb"[11, 8, 4, 0]
Test 10, RTL:
"aaa AAA bbb"[11, 8, 4, 0]
Test 11, LTR:
Move right by one word
-"AAA BBB WWW aaa bbb ccc DDD SSS UUU"[0, 7, 3, 12, 16, 20, 24, 31, 27]
+"AAA BBB WWW aaa bbb ccc DDD SSS UUU"[0, 7, 3, 12, 16, 20, 24, 31, 27, 35]
Move left by one word
"AAA BBB WWW aaa bbb ccc DDD SSS UUU"[35, 27, 31, 24, 20, 16, 12, 3, 7, 0]
Test 12, RTL:
Move left by one word
-"AAA BBB WWW aaa bbb ccc DDD SSS UUU"[0, 4, 8, 12, 19, 15, 24, 28, 32]
+"AAA BBB WWW aaa bbb ccc DDD SSS UUU"[0, 4, 8, 12, 19, 15, 24, 28, 32, 35]
Move right by one word
"AAA BBB WWW aaa bbb ccc DDD SSS UUU"[35, 32, 28, 24, 15, 19, 12, 8, 4, 0]
Test 13, LTR:
Move right by one word
-"AAA BBB aaa bbb WWW DDD"[0, 3, 8, 12, 16, 19]
+"AAA BBB aaa bbb WWW DDD"[0, 3, 8, 12, 16, 19, 23]
Move left by one word
"AAA BBB aaa bbb WWW DDD"[23, 19, 16, 12, 8, 3, 0]
Test 14, RTL:
Move left by one word
-"AAA BBB aaa bbb WWW DDD"[0, 4, 8, 11, 16, 20]
+"AAA BBB aaa bbb WWW DDD"[0, 4, 8, 11, 16, 20, 23]
Move right by one word
"AAA BBB aaa bbb WWW DDD"[23, 20, 16, 11, 8, 4, 0]
Test 15, LTR:
"ZQB abc RIG"[11, 8, 4, 0]
Test 16, RTL:
Move left by one word
-"ZQB abc RIG"[0, 4, 8]
+"ZQB abc RIG"[0, 4, 8, 11]
Move right by one word
"ZQB abc RIG"[11, 8, 4, 0]
where child_node_index is optional, default is the first child of the anchor node.
-->
<!-- pure English -->
-<div dir=ltr class="test_move_by_word" title="0 4 8 12 16|19 16 12 8 4 0" contenteditable>abc def hij opq rst</div>
-<div dir=rtl class="test_move_by_word" title="19 3 7 11 15 0|0 15 11 7 3" contenteditable>abc def hij opq rst</div>
+<div dir=ltr class="test_move_by_word" title="0 4 8 12 16 19|19 16 12 8 4 0" contenteditable>abc def hij opq rst</div>
+<div dir=rtl class="test_move_by_word" title="19 3 7 11 15 0|0 15 11 7 3 19" contenteditable>abc def hij opq rst</div>
<!-- pure Hebrew -->
-<div dir=ltr class="test_move_by_word" title="0 15 11 7 3|19 3 7 11 15 0" contenteditable>ששש נננ בבב גגג קקק</div>
-<div dir=rtl class="test_move_by_word" title="19 16 12 8 4 0|0 4 8 12 16" contenteditable>ששש נננ בבב גגג קקק</div>
+<div dir=ltr class="test_move_by_word" title="0 15 11 7 3 19|19 3 7 11 15 0" contenteditable>ששש נננ בבב גגג קקק</div>
+<div dir=rtl class="test_move_by_word" title="19 16 12 8 4 0|0 4 8 12 16 19" contenteditable>ששש נננ בבב גגג קקק</div>
<!-- bidi text -->
<!-- English Hebrew English -->
-<div dir=ltr class="test_move_by_word" title="0 4 8 12 19 15 24 28 32|35 32 28 24 15 19 12 8 4 0" contenteditable>abc def hij אאא בבב צצצ opr uvw xyz</div>
-<div dir=rtl class="test_move_by_word" title="35 27 31 24 20 16 12 3 7 0|0 7 3 12 16 20 24 31 27" contenteditable>abc def hij אאא בבב צצצ opr uvw xyz</div>
+<div dir=ltr class="test_move_by_word" title="0 4 8 12 19 15 24 28 32 35|35 32 28 24 15 19 12 8 4 0" contenteditable>abc def hij אאא בבב צצצ opr uvw xyz</div>
+<div dir=rtl class="test_move_by_word" title="35 27 31 24 20 16 12 3 7 0|0 7 3 12 16 20 24 31 27 35" contenteditable>abc def hij אאא בבב צצצ opr uvw xyz</div>
-<div dir=ltr class="test_move_by_word" title="0 4 8 11 16 20|23 20 16 11 8 4 0" contenteditable>abc def שנב סטז uvw xyz</div>
-<div dir=rtl class="test_move_by_word" title="23 19 16 12 8 3 0|0 3 8 12 16 19" contenteditable>abc def שנב סטז uvw xyz</div>
+<div dir=ltr class="test_move_by_word" title="0 4 8 11 16 20 23|23 20 16 11 8 4 0" contenteditable>abc def שנב סטז uvw xyz</div>
+<div dir=rtl class="test_move_by_word" title="23 19 16 12 8 3 0|0 3 8 12 16 19 23" contenteditable>abc def שנב סטז uvw xyz</div>
-<div dir=ltr class="test_move_by_word" title="0 4 8|11 8 4 0" contenteditable>aaa אאא bbb</div>
+<div dir=ltr class="test_move_by_word" title="0 4 8 11|11 8 4 0" contenteditable>aaa אאא bbb</div>
<div dir=rtl class="test_move_by_word" title="11 8 4 0|0 4 8 11" contenteditable>aaa אאא bbb</div>
<!-- Hebrew English Hebrew -->
-<div dir=ltr class="test_move_by_word" title="0 7 3 12 16 20 24 31 27|35 27 31 24 20 16 12 3 7 0" contenteditable>אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>
-<div dir=rtl class="test_move_by_word" title="35 32 28 24 15 19 12 8 4 0|0 4 8 12 19 15 24 28 32" contenteditable>אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>
+<div dir=ltr class="test_move_by_word" title="0 7 3 12 16 20 24 31 27 35|35 27 31 24 20 16 12 3 7 0" contenteditable>אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>
+<div dir=rtl class="test_move_by_word" title="35 32 28 24 15 19 12 8 4 0|0 4 8 12 19 15 24 28 32 35" contenteditable>אאא בבב צצצ aaa bbb ccc דדד עעע פפפ</div>
-<div dir=ltr class="test_move_by_word" title="0 3 8 12 16 19|23 19 16 12 8 3 0" contenteditable>אאא בבב aaa bbb צצצ דדד</div>
-<div dir=rtl class="test_move_by_word" title="23 20 16 11 8 4 0|0 4 8 11 16 20" contenteditable>אאא בבב aaa bbb צצצ דדד</div>
+<div dir=ltr class="test_move_by_word" title="0 3 8 12 16 19 23|23 19 16 12 8 3 0" contenteditable>אאא בבב aaa bbb צצצ דדד</div>
+<div dir=rtl class="test_move_by_word" title="23 20 16 11 8 4 0|0 4 8 11 16 20 23" contenteditable>אאא בבב aaa bbb צצצ דדד</div>
<div dir=ltr class="test_move_by_word" title="0 4 8 11|11 8 4 0" contenteditable>שנב abc סטז</div>
-<div dir=rtl class="test_move_by_word" title="11 8 4 0|0 4 8" contenteditable>שנב abc סטז</div>
+<div dir=rtl class="test_move_by_word" title="11 8 4 0|0 4 8 11" contenteditable>שנב abc סטז</div>
</div>
<pre id="console"></pre>
+2011-08-02 Van Lam <vanlam@google.com>
+
+ --webkit-visual-word: ctrl-arrow is not able to reach the boundary of line
+ https://bugs.webkit.org/show_bug.cgi?id=61346
+
+ Reviewed by Ryosuke Niwa.
+
+ When collecintg word boundaries in a box, explicitly check if the box
+ is at the end of line (so it should contain the end-of-line position)
+ and collect the end-of-line position.
+
+ * editing/visible_units.cpp:
+ (WebCore::isBoxVisuallyLastInLine):
+ (WebCore::appendPositionAtLogicalEndOfLine):
+ (WebCore::collectWordBreaksInBoxInsideBlockWithSameDirectionality):
+ (WebCore::collectWordBreaksInBoxInsideBlockWithDifferntDirectionality):
+
2011-08-02 Vsevolod Vlasov <vsevik@chromium.org>
Web Inspector: Should save scroll positions for network panel Response and Preview tabs.
static const int invalidOffset = -1;
+static bool isBoxVisuallyLastInLine(const InlineBox* box, TextDirection blockDirection)
+{
+ return blockDirection == LTR ? !box->nextLeafChild() || box->nextLeafChild()->renderer()->isBR()
+ : !box->prevLeafChild() || box->prevLeafChild()->renderer()->isBR();
+}
+
static bool positionIsInBox(const VisiblePosition& wordBreak, const InlineBox* box, int& offsetOfWordBreak)
{
if (wordBreak.isNull())
typedef Vector<WordBoundaryEntry, 50> WordBoundaryVector;
+static void appendPositionAtLogicalEndOfLine(const InlineBox* box, WordBoundaryVector& orderedWordBoundaries)
+{
+ VisiblePosition endOfBlock = logicalEndOfLine(createPositionAvoidingIgnoredNode(box->renderer()->node(), box->caretMaxOffset()));
+
+ int offsetOfEndOfBlock;
+ if (positionIsInBox(endOfBlock, box, offsetOfEndOfBlock))
+ orderedWordBoundaries.append(WordBoundaryEntry(endOfBlock, offsetOfEndOfBlock));
+}
+
static void collectWordBreaksInBoxInsideBlockWithSameDirectionality(const InlineBox* box, WordBoundaryVector& orderedWordBoundaries)
{
orderedWordBoundaries.clear();
+
+ if (!box->renderer()->isBR() && isBoxVisuallyLastInLine(box, box->direction()))
+ appendPositionAtLogicalEndOfLine(box, orderedWordBoundaries);
VisiblePosition wordBreak;
int offsetOfWordBreak = invalidOffset;
{
orderedWordBoundaries.clear();
+ if (!box->renderer()->isBR() && isBoxVisuallyLastInLine(box, box->direction() == LTR ? RTL : LTR))
+ appendPositionAtLogicalEndOfLine(box, orderedWordBoundaries);
+
VisiblePosition wordBreak;
int offsetOfWordBreak = invalidOffset;
bool isLastWordBreakInBox = false;