Skip to content
Permalink
Browse files
Using ICU break iterator to simplify visual word movement implementat…
…ion.

https://bugs.webkit.org/show_bug.cgi?id=78856

Reviewed by Ryosuke Niwa.

Source/WebCore:

This patch relies on ICU word break iterator and cursor visual movement by character to get the word break
position in visual order. It reduces the complexity of old implementation.

Test: editing/selection/move-by-word-visually-wrong-left-right.html

* editing/FrameSelection.cpp: Exclude WinCE from visual word movement since isWordTextBreak is not implemented.
(WebCore::FrameSelection::modifyMovingRight):
(WebCore::FrameSelection::modifyMovingLeft):
* editing/visible_units.cpp:
(WebCore):
(WebCore::previousLeafWithSameEditability): Just moving to the top without functionality change.
(WebCore::enclosingNodeWithNonInlineRenderer): ditto.
(WebCore::nextLeafWithSameEditability): ditto.
(WebCore::previousRootInlineBox): return previous RootInlineBox which is in different renderer.
(WebCore::nextRootInlineBox): return next RootInlineBox which is in different renderer.
(WebCore::boxIndexInVector):
(WebCore::previousBoxInLine): returns logically previous box in one line.
(WebCore::logicallyPreviousBox): returns logically previous box.
(WebCore::nextBoxInLine): returns logically next box in one line.
(WebCore::logicallyNextBox): returns logically next box.
(WebCore::wordBreakIteratorForMinOffsetBoundary): create word break iterator for position that is a box's min offset.
(WebCore::wordBreakIteratorForMaxOffsetBoundary): create word break iterator for position that is a box's max offset.
(WebCore::isLogicalStartOfWord): return whether a position is logically start of word.
(WebCore::islogicalEndOfWord): return whether a position is logically end of word.
(WebCore::visualWordPosition): returns the visual left or right word position.
(WebCore::leftWordPosition):
(WebCore::rightWordPosition):
* platform/text/TextBreakIterator.h: Add isWordTextBreak().
(WebCore):
* platform/text/TextBreakIteratorICU.cpp:
(WebCore::isWordTextBreak):
(WebCore):
* platform/text/gtk/TextBreakIteratorGtk.cpp:
(WebCore::isWordTextBreak):
(WebCore):
* platform/text/qt/TextBreakIteratorQt.cpp:
(WebCore::isWordTextBreak):
(WebCore):
* platform/text/wince/TextBreakIteratorWinCE.cpp:
(WebCore::isWordTextBreak):
(WebCore):

LayoutTests:

* editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt:
* editing/selection/move-by-word-visually-inline-block-positioned-element.html:
  The word break stops at the beginning of fixed positioned element, which is correct and consistent behavior.

* editing/selection/move-by-word-visually-multi-line-expected.txt:
* editing/selection/move-by-word-visually-multi-line.html:
  The word break does not stop at the end of a text if there is next line of text available under the same
  editable root, which is a consistent behavior cross the board.
  Add more test cases, including one with non InlineTextBox.

* editing/selection/move-by-word-visually-single-space-inline-element-expected.txt:
  Fixing of previously missing or extra word break positions.

* editing/selection/move-by-word-visually-single-space-one-element-expected.txt:
* editing/selection/move-by-word-visually-single-space-one-element.html:
  Add a test case including bidi control character which renders wrong result since right-arrow could not reach
  a position which is the word break position.
  Add another test case containing non InlineTextBox.

* editing/selection/move-by-word-visually-wrong-left-right-expected.txt: Added.
* editing/selection/move-by-word-visually-wrong-left-right.html: Added.
  Add a test case which renders wrong result due to left/right-arrow returns wrong result.

* editing/selection/resources/move-by-word-visually.js:
(moveByWordOnEveryChar): Handle a special case when left/right arrow missing certain position.


Canonical link: https://commits.webkit.org/98524@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@110965 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Xiaomei Ji committed Mar 16, 2012
1 parent 821a7c5 commit 4500b4f2028186c49a6ce97961d1d7be37884f22
@@ -1,3 +1,36 @@
2012-03-16 Xiaomei Ji <xji@chromium.org>

Using ICU break iterator to simplify visual word movement implementation.
https://bugs.webkit.org/show_bug.cgi?id=78856

Reviewed by Ryosuke Niwa.

* editing/selection/move-by-word-visually-inline-block-positioned-element-expected.txt:
* editing/selection/move-by-word-visually-inline-block-positioned-element.html:
The word break stops at the beginning of fixed positioned element, which is correct and consistent behavior.

* editing/selection/move-by-word-visually-multi-line-expected.txt:
* editing/selection/move-by-word-visually-multi-line.html:
The word break does not stop at the end of a text if there is next line of text available under the same
editable root, which is a consistent behavior cross the board.
Add more test cases, including one with non InlineTextBox.

* editing/selection/move-by-word-visually-single-space-inline-element-expected.txt:
Fixing of previously missing or extra word break positions.

* editing/selection/move-by-word-visually-single-space-one-element-expected.txt:
* editing/selection/move-by-word-visually-single-space-one-element.html:
Add a test case including bidi control character which renders wrong result since right-arrow could not reach
a position which is the word break position.
Add another test case containing non InlineTextBox.

* editing/selection/move-by-word-visually-wrong-left-right-expected.txt: Added.
* editing/selection/move-by-word-visually-wrong-left-right.html: Added.
Add a test case which renders wrong result due to left/right-arrow returns wrong result.

* editing/selection/resources/move-by-word-visually.js:
(moveByWordOnEveryChar): Handle a special case when left/right arrow missing certain position.

2012-03-16 Mike Reed <reed@google.com>

make test for rebaselining after skia 3398 lands
@@ -2,37 +2,37 @@
======== Move By Word ====
Test 1, LTR:
Move right by one word
"begin start"[0, 6], "abc def"[0, 4], "end ing"[0, 4], "this is float"[0, 5, 8], "this is fixed"[5, 8], "this is relative"[0, 5, 8], "this is absolute"[0, 5, 8, 16]
"begin start"[0, 6], "abc def"[0, 4], "end ing"[0, 4], "this is float"[0, 5, 8], "this is fixed"[0, 5, 8], "this is relative"[0, 5, 8], "this is absolute"[0, 5, 8, 16]
Move left by one word
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5, 0], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
Test 2, LTR:
Move right by one word
"abc def"[0, 4], "end ing"[0, 4], "this is float"[0, 5, 8], "this is fixed"[5, 8], "this is relative"[0, 5, 8], "this is absolute"[0, 5, 8, 16]
"abc def"[0, 4], "end ing"[0, 4], "this is float"[0, 5, 8], "this is fixed"[0, 5, 8], "this is relative"[0, 5, 8], "this is absolute"[0, 5, 8, 16]
Move left by one word
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5, 0], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
Test 3, LTR:
Move right by one word
"end ing"[0, 4], "this is float"[0, 5, 8], "this is fixed"[5, 8], "this is relative"[0, 5, 8], "this is absolute"[0, 5, 8, 16]
"end ing"[0, 4], "this is float"[0, 5, 8], "this is fixed"[0, 5, 8], "this is relative"[0, 5, 8], "this is absolute"[0, 5, 8, 16]
Move left by one word
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5, 0], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
Test 4, LTR:
Move right by one word
"this is float"[0, 5, 8], "this is fixed"[5, 8], "this is relative"[0, 5, 8], "this is absolute"[0, 5, 8, 16]
"this is float"[0, 5, 8], "this is fixed"[0, 5, 8], "this is relative"[0, 5, 8], "this is absolute"[0, 5, 8, 16]
Move left by one word
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5, 0], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
Test 5, LTR:
Move right by one word
"this is fixed"[0, 5, 8], "this is relative"[0, 5, 8], "this is absolute"[0, 5, 8, 16]
Move left by one word
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5, 0], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
Test 6, LTR:
Move right by one word
"this is relative"[0, 5, 8], "this is absolute"[0, 5, 8, 16]
Move left by one word
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5, 0], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
Test 7, LTR:
Move right by one word
"this is absolute"[0, 5, 8, 16]
Move left by one word
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]
"this is absolute"[16, 8, 5, 0], "this is relative"[8, 5, 0], "this is fixed"[8, 5, 0], "this is float"[8, 5, 0], "end ing"[4, 0], "abc def"[4, 0], "begin start"[6, 0]

@@ -17,38 +17,38 @@

<div id="testMoveByWord" contenteditable style="width:2000px; height:2000px">
<div id="d_1" dir=ltr
title="[d_1, 0][d_1, 6][d_2, 0][d_2, 4][d_3, 0][d_3, 4][d_4, 0][d_4, 5][d_4, 8][d_5, 5][d_5, 8][d_6, 0][d_6, 5][d_6, 8][d_7, 0][d_7, 5][d_7, 8][d_7, 16]|
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
title="[d_1, 0][d_1, 6][d_2, 0][d_2, 4][d_3, 0][d_3, 4][d_4, 0][d_4, 5][d_4, 8][d_5, 0][d_5, 5][d_5, 8][d_6, 0][d_6, 5][d_6, 8][d_7, 0][d_7, 5][d_7, 8][d_7, 16]|
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_5, 0][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
class="test_move_by_word">begin start</div>

<div id="d_2" dir=ltr
title="[d_2, 0][d_2, 4][d_3, 0][d_3, 4][d_4, 0][d_4, 5][d_4, 8][d_5, 5][d_5, 8][d_6, 0][d_6, 5][d_6, 8][d_7, 0][d_7, 5][d_7, 8][d_7, 16]|
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
title="[d_2, 0][d_2, 4][d_3, 0][d_3, 4][d_4, 0][d_4, 5][d_4, 8][d_5, 0][d_5, 5][d_5, 8][d_6, 0][d_6, 5][d_6, 8][d_7, 0][d_7, 5][d_7, 8][d_7, 16]|
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_5, 0][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
class="test_move_by_word" style="display:inline-block">abc def</div>

<div id="d_3" dir=ltr
title="[d_3, 0][d_3, 4][d_4, 0][d_4, 5][d_4, 8][d_5, 5][d_5, 8][d_6, 0][d_6, 5][d_6, 8][d_7, 0][d_7, 5][d_7, 8][d_7, 16]|
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
title="[d_3, 0][d_3, 4][d_4, 0][d_4, 5][d_4, 8][d_5, 0][d_5, 5][d_5, 8][d_6, 0][d_6, 5][d_6, 8][d_7, 0][d_7, 5][d_7, 8][d_7, 16]|
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_5, 0][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
class="test_move_by_word">end ing</div>

<div id="d_4" dir=ltr
title="[d_4, 0][d_4, 5][d_4, 8][d_5, 5][d_5, 8][d_6, 0][d_6, 5][d_6, 8][d_7, 0][d_7, 5][d_7, 8][d_7, 16]|
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
title="[d_4, 0][d_4, 5][d_4, 8][d_5, 0][d_5, 5][d_5, 8][d_6, 0][d_6, 5][d_6, 8][d_7, 0][d_7, 5][d_7, 8][d_7, 16]|
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_5, 0][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
class="test_move_by_word" style="float:left">this is float</div>

<div id="d_5" dir=ltr
title="[d_5, 0][d_5, 5][d_5, 8][d_6, 0][d_6, 5][d_6, 8][d_7, 0][d_7, 5][d_7, 8][d_7, 16]|
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_5, 0][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
class="test_move_by_word" style="position:fixed; top:30px; right:5px">this is fixed</div>

<div id="d_6" dir=ltr
title="[d_6, 0][d_6, 5][d_6, 8][d_7, 0][d_7, 5][d_7, 8][d_7, 16]|
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_5, 0][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
class="test_move_by_word" style="position:relative; left:20px">this is relative</div>

<div id="d_7" dir=ltr
title="[d_7, 0][d_7, 5][d_7, 8][d_7, 16]|
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
[d_7, 16][d_7, 8][d_7, 5][d_7, 0][d_6, 8][d_6, 5][d_6, 0][d_5, 8][d_5, 5][d_5, 0][d_4, 8][d_4, 5][d_4, 0][d_3, 4][d_3, 0][d_2, 4][d_2, 0][d_1, 6][d_1, 0]"
class="test_move_by_word" style="position:absolute; left:100px; top:150px">this is absolute</div>

</div>
@@ -37,11 +37,9 @@ 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, 15] FAIL expected: ["abc def ghi jkl mn "[ 0, 3, 8, 11, 16, ]"opq rst uvw xyz"[ 0, 3, 8, 11, 15]
"abc def ghi jkl mn "[16, 18] FAIL expected "opq rst uvw xyz"[ 0]
"abc def ghi jkl mn "[17, 18] FAIL expected "opq rst uvw xyz"[ 0]
"abc def ghi jkl mn "[0, 3, 8, 11, 16], "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]
"opq rst uvw xyz"[15, 11, 8, 3, 0], "abc def ghi jkl mn "[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, 15]
@@ -59,23 +57,35 @@ 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, 25] FAIL expected: [" 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, 25]
" abc def AAA AAA hij AAA AAA uvw xyz "[33, 36] FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
" abc def AAA AAA hij AAA AAA uvw xyz "[35, 36] FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
" abc def AAA AAA hij AAA AAA uvw xyz "[34, 36] FAIL expected "AAA kj AAA mn opq AAA AAA"[ 0]
" 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, 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]
"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 13, LTR:
Move right by one word
"abc def "[0, 4]
"abc def ghi jkl mn "[0, 4, 8, 12, 16], "opq rst uvw xyz"[0, 4, 8, 12, 15]
Move left by one word
" hij opq"[8, 5, 1]
"opq rst uvw xyz"[15, 12, 8, 4, 0], "abc def ghi jkl mn "[16, 12, 8, 4, 0]
Test 14, LTR:
Move right by one word
"abc def ghi jkl mn "[0, 4, 8, 12, 16, 18]
Move left by one word
"abc def ghi jkl mn "[18, 16, 12, 8, 4, 0]
Test 15, LTR:
Move right by one word
"abc def ghi jkl mn "[0, 4, 8, 12, 16], "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 16, LTR:
Move right by one word
"abc def "[0, 4, 8]
Move left by one word
" hij opq"[8, 5, 1]
Test 17, LTR:
Move right by one word
<DIV>[0]
Move left by one word
<DIV>[0]
Test 15, LTR:
Test 18, LTR:
Move right by one word
"\n00"[3]
Move left by one word
@@ -54,7 +54,7 @@

<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][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, 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_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, 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, 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][ml_9, 15, 5]">אאא אאא אאא אאא <br/><br/><br/>אאא אאא אאא אאא</div>

@@ -65,11 +65,17 @@
"> 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, 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, 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, 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, 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>

<div contenteditable dir=ltr id="ml_13" class="test_move_by_word fix_width" title="[ml_13, 0][ml_13, 4][ml_13, 8][ml_13, 12][ml_13, 16][ml_13, 0, 5][ml_13, 4, 5][ml_13, 8, 5][ml_13, 12, 5][ml_13, 15, 5]|[ml_13, 15, 5][ml_13, 12, 5][ml_13, 8, 5][ml_13, 4, 5][ml_13, 0, 5][ml_13, 16][ml_13, 12][ml_13, 8][ml_13, 4][ml_13, 0]">abc def ghi jkl mn <div></div><div></div><div></div>opq rst uvw xyz</div>

<div contenteditable dir=ltr id="ml_14" class="test_move_by_word fix_width" title="[ml_14, 0][ml_14, 4][ml_14, 8][ml_14, 12][ml_14, 16][ml_14, 18]|[ml_14, 18][ml_14, 16][ml_14, 12][ml_14, 8][ml_14, 4][ml_14, 0]">abc def ghi jkl mn <div></div><div></div><div></div></div>

<div contenteditable dir=ltr id="ml_15" class="test_move_by_word fix_width" title="[ml_15, 0][ml_15, 4][ml_15, 8][ml_15, 12][ml_15, 16][ml_15, 0, 5][ml_15, 4, 5][ml_15, 8, 5][ml_15, 12, 5][ml_15, 15, 5]|[ml_15, 15, 5][ml_15, 12, 5][ml_15, 8, 5][ml_15, 4, 5][ml_15, 0, 5][ml_15, 16][ml_15, 12][ml_15, 8][ml_15, 4][ml_15, 0]">abc def ghi jkl mn <div><img src=../../accessibility/resources/cake.png></div><div></div><div></div>opq rst uvw xyz</div>

<!-- mixed editability -->
<div dir=ltr class="test_move_by_word" title="0 4|8 5 1">abc def <span contenteditable> inside span </span> hij opq</div>
<div dir=ltr class="test_move_by_word" title="0 4 8|8 5 1">abc def <span contenteditable> inside span </span> hij opq</div>

<div class="test_move_by_word" contenteditable dir=ltr title="0|0"></div>

0 comments on commit 4500b4f

Please sign in to comment.