Changeset 92223 in webkit


Ignore:
Timestamp:
Aug 2, 2011 1:38:04 PM (13 years ago)
Author:
commit-queue@webkit.org
Message:

--webkit-visual-word: ctrl-arrow is not able to reach the boundary of line
https://bugs.webkit.org/show_bug.cgi?id=61346

Patch by Van Lam <vanlam@google.com> on 2011-08-02
Reviewed by Ryosuke Niwa.

Source/WebCore:

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):

LayoutTests:

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:
Location:
trunk
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r92222 r92223  
     12011-08-02  Van Lam  <vanlam@google.com>
     2
     3        --webkit-visual-word: ctrl-arrow is not able to reach the boundary of line
     4        https://bugs.webkit.org/show_bug.cgi?id=61346
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Updated test cases to check for visual word movement to the end-of-line
     9        position.
     10
     11        * editing/selection/move-by-word-visually-multi-line-expected.txt:
     12        * editing/selection/move-by-word-visually-multi-line.html:
     13        * editing/selection/move-by-word-visually-multi-space-expected.txt:
     14        * editing/selection/move-by-word-visually-multi-space.html:
     15        * editing/selection/move-by-word-visually-single-space-inline-element-expected.txt:
     16        * editing/selection/move-by-word-visually-single-space-inline-element.html:
     17        * editing/selection/move-by-word-visually-single-space-one-element-expected.txt:
     18        * editing/selection/move-by-word-visually-single-space-one-element.html:
     19
    1202011-08-02  Zhenyao Mo  <zmo@google.com>
    221
  • trunk/LayoutTests/editing/selection/move-by-word-visually-multi-line-expected.txt

    r91864 r92223  
    33Test 1, LTR:
    44Move right by one word
    5 "abc def ghi jkl mn "[0, 4, 8, 12, 16], "opq rst uvw xyz"[0, 4, 8, 12]
     5"abc def ghi jkl mn "[0, 4, 8, 12, 16, 19], "opq rst uvw xyz"[0, 4, 8, 12, 15]
    66Move left by one word
    77"opq rst uvw xyz"[15, 12, 8, 4, 0], "abc def ghi jkl mn "[16, 12, 8, 4, 0]
    88Test 2, LTR:
    99Move right by one word
    10 "abc def ghi jkl mn "[0, 4, 8, 12, 16], "opq rst uvw xyz"[0, 4, 8, 12]
     10"abc def ghi jkl mn "[0, 4, 8, 12, 16, 18], "opq rst uvw xyz"[0, 4, 8, 12, 15]
    1111Move left by one word
    1212"opq rst uvw xyz"[15, 12, 8, 4, 0], "abc def ghi jkl mn "[16, 12, 8, 4, 0]
    1313Test 3, LTR:
    1414Move right by one word
    15 "AAA AAA AAA AAA "[0, 3, 8, 11], "AAA AAA AAA AAA"[0, 3, 8, 11]
     15"AAA AAA AAA AAA "[0, 3, 8, 11, 16], "AAA AAA AAA AAA"[0, 3, 8, 11, 15]
    1616Move left by one word
    1717"AAA AAA AAA AAA"[15, 11, 8, 3, 0], "AAA AAA AAA AAA "[11, 8, 3, 0]
    1818Test 4, LTR:
    1919Move right by one word
    20 "AAA AAA AAA AAA "[0, 3, 8, 11], "AAA AAA AAA AAA"[0, 3, 8, 11]
     20"AAA AAA AAA AAA "[0, 3, 8, 11, 16], "AAA AAA AAA AAA"[0, 3, 8, 11, 15]
    2121Move left by one word
    2222"AAA AAA AAA AAA"[15, 11, 8, 3, 0], "AAA AAA AAA AAA "[11, 8, 3, 0]
    2323Test 5, LTR:
    2424Move right by one word
    25 " 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]
     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]
    2626Move left by one word
    2727"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]
    2828Test 6, LTR:
    2929Move right by one word
    30 " 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]
     30" 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]
    3131Move left by one word
    3232"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]
    3333Test 7, RTL:
    3434Move left by one word
    35 "abc def ghi jkl mn "[0, 3, 8, 11, 16], "opq rst uvw xyz"[0, 3, 8, 11]
     35"abc def ghi jkl mn "[0, 3, 8, 11, 16, 19], "opq rst uvw xyz"[0, 3, 8, 11, 15]
    3636Move right by one word
    3737"opq rst uvw xyz"[15, 11, 8, 3, 0], "abc def ghi jkl mn "[16, 11, 8, 3, 0]
    3838Test 8, RTL:
    3939Move left by one word
    40 "abc def ghi jkl mn "[0, 3, 8, 11, 16, 18], "opq rst uvw xyz"[0, 3, 8, 11]
     40"abc def ghi jkl mn "[0, 3, 8, 11, 16, 18], "opq rst uvw xyz"[0, 3, 8, 11, 15]
    4141Move right by one word
    4242"opq rst uvw xyz"[15, 11, 8, 3, 0], "abc def ghi jkl mn "[18, 16, 11, 8, 3, 0]
    4343Test 9, RTL:
    4444Move left by one word
    45 "AAA AAA AAA AAA "[0, 4, 8, 12], "AAA AAA AAA AAA"[0, 4, 8, 12]
     45"AAA AAA AAA AAA "[0, 4, 8, 12, 16], "AAA AAA AAA AAA"[0, 4, 8, 12, 15]
    4646Move right by one word
    4747"AAA AAA AAA AAA"[15, 12, 8, 4, 0], "AAA AAA AAA AAA "[12, 8, 4, 0]
    4848Test 10, RTL:
    4949Move left by one word
    50 "AAA AAA AAA AAA "[0, 4, 8, 12], "AAA AAA AAA AAA"[0, 4, 8, 12]
     50"AAA AAA AAA AAA "[0, 4, 8, 12, 16], "AAA AAA AAA AAA"[0, 4, 8, 12, 15]
    5151Move right by one word
    5252"AAA AAA AAA AAA"[15, 12, 8, 4, 0], "AAA AAA AAA AAA "[12, 8, 4, 0]
    5353Test 11, RTL:
    5454Move left by one word
    55 " 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]
     55" 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]
    5656Move right by one word
    5757"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]
    5858Test 12, RTL:
    5959Move left by one word
    60 " 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]
     60" 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]
    6161Move right by one word
    6262"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]
  • trunk/LayoutTests/editing/selection/move-by-word-visually-multi-line.html

    r91864 r92223  
    3838<!-- test multi-line -->
    3939<div><span class="fix_width" id="span_size">אאא אאא</span></div>
    40 <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>
     40<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>
    4141
    42 <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>
     42<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>
    4343
    44 <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>
     44<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>
    4545
    46 <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>
     46<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>
    4747
    48 <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>
     48<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>
    4949
    50 <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>
     50<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>
    5151
    5252
    53 <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>
     53<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>
    5454
    55 <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>
     55<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>
    5656
    57 <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>
     57<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>
    5858
    59 <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>
     59<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>
    6060
    6161<div contenteditable dir=rtl id="ml_11" class="test_move_by_word fix_width" title="
    62 [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]
     62[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]
    6363"> abc def אאא אאא hij אאא אאא uvw xyz <br/><br/><br/>אאא kj אאא mn opq אאא אאא</div>
    6464
    6565<div contenteditable dir=rtl id="ml_12" class="test_move_by_word fix_width" title="
    66 [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]
     66[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]
    6767"> abc def אאא אאא hij אאא אאא uvw xyz <div><br/></div><div><br/></div><div><br/></div>אאא kj אאא mn opq אאא אאא</div>
    6868
  • trunk/LayoutTests/editing/selection/move-by-word-visually-multi-space-expected.txt

    r91864 r92223  
    33Test 1, LTR:
    44Move right by one word
    5 "abc def    hij opq"[0, 4, 8, 15]
     5"abc def    hij opq"[0, 4, 8, 15, 18]
    66Move left by one word
    77"abc def    hij opq"[18, 15, 8, 4, 0]
    88Test 2, LTR:
    99Move right by one word
    10 "    abc    def    hij    opq    "[4, 8, 15, 22]
     10"    abc    def    hij    opq    "[4, 8, 15, 22, 28]
    1111Move left by one word
    1212"    abc    def    hij    opq    "[28, 22, 15, 8, 4]
    1313Test 3, LTR:
    1414Move right by one word
    15 "    abc    ABW    def    "[4, 8, 15]
     15"    abc    ABW    def    "[4, 8, 15, 21]
    1616Move left by one word
    1717"    abc    ABW    def    "[21, 15, 8, 4]
    1818Test 4, LTR:
    1919Move right by one word
    20 "    abc    def    ABW    DDU    hij    opq    "[4, 8, 15, 21, 29, 36]
     20"    abc    def    ABW    DDU    hij    opq    "[4, 8, 15, 21, 29, 36, 42]
    2121Move left by one word
    2222"    abc    def    ABW    DDU    hij    opq    "[42, 36, 29, 21, 15, 8, 4]
    2323Test 5, LTR:
    2424Move right by one word
    25 "    abc    def    hij    ABW    DSU    EJH    opq    rst    uvw    "[4, 8, 15, 22, 35, 28, 43, 50, 57]
     25"    abc    def    hij    ABW    DSU    EJH    opq    rst    uvw    "[4, 8, 15, 22, 35, 28, 43, 50, 57, 63]
    2626Move left by one word
    2727"    abc    def    hij    ABW    DSU    EJH    opq    rst    uvw    "[63, 57, 50, 43, 28, 35, 22, 15, 8, 4]
    2828Test 6, LTR:
    2929Move right by one word
    30 "    ABW    DSU    HJH    FUX    "[4, 21, 14, 7]
     30"    ABW    DSU    HJH    FUX    "[4, 21, 14, 7, 28]
    3131Move left by one word
    3232"    ABW    DSU    HJH    FUX    "[28, 7, 14, 21, 4]
    3333Test 7, LTR:
    3434Move right by one word
    35 "    ABW    abc    DSU     "[4, 8, 15, 21]    FAIL expected: [4, 8, 15]
    36 "    ABW    abc    DSU     "[15, 21]   FAIL expected to stay in the same position
    37 "    ABW    abc    DSU     "[20, 21]   FAIL expected to stay in the same position
    38 "    ABW    abc    DSU     "[19, 21]   FAIL expected to stay in the same position
     35"    ABW    abc    DSU     "[4, 8, 15, 21]
    3936Move left by one word
    4037"    ABW    abc    DSU     "[21, 15, 8, 4]
    4138Test 8, LTR:
    4239Move right by one word
    43 "    ABW    DSU    abc   def   HJH    FUX    "[4, 7, 15, 22, 28, 33]
     40"    ABW    DSU    abc   def   HJH    FUX    "[4, 7, 15, 22, 28, 33, 40]
    4441Move left by one word
    4542"    ABW    DSU    abc   def   HJH    FUX    "[40, 33, 28, 22, 15, 7, 4]
    4643Test 9, LTR:
    4744Move right by one word
    48 "    ABW    DSU    HJH    abc   def   jih   FUX  FUX    YR[     "[4, 14, 7, 22, 29, 35, 41, 51, 46]
     45"    ABW    DSU    HJH    abc   def   jih   FUX  FUX    YR[     "[4, 14, 7, 22, 29, 35, 41, 51, 46, 58]
    4946Move left by one word
    5047"    ABW    DSU    HJH    abc   def   jih   FUX  FUX    YR[     "[58, 46, 51, 41, 35, 29, 22, 7, 14, 4]
    5148Test 10, LTR:
    5249Move right by one word
    53 "ABW DSU    EJH FUX"[0, 14, 7, 3]
     50"ABW DSU    EJH FUX"[0, 14, 7, 3, 18]
    5451Move left by one word
    5552"ABW DSU    EJH FUX"[18, 3, 7, 14, 0]
    5653Test 11, LTR:
    5754Move right by one word
    58 "ABW DSU EJH    abc def hij"[0, 7, 3, 12, 19, 23]
     55"ABW DSU EJH    abc def hij"[0, 7, 3, 12, 19, 23, 26]
    5956Move left by one word
    6057"ABW DSU EJH    abc def hij"[26, 23, 19, 12, 3, 7, 0]
    6158Test 12, LTR:
    6259Move right by one word
    63 "abc def hij    ABW DSU EJH    opq rst uvw"[0, 4, 8, 12, 22, 18, 27, 34, 38]
     60"abc def hij    ABW DSU EJH    opq rst uvw"[0, 4, 8, 12, 22, 18, 27, 34, 38, 41]
    6461Move left by one word
    6562"abc def hij    ABW DSU EJH    opq rst uvw"[41, 38, 34, 27, 18, 22, 12, 8, 4, 0]
    6663Test 13, RTL:
    6764Move left by one word
    68 "abc def    hij opq"[0, 14, 7, 3]
     65"abc def    hij opq"[0, 14, 7, 3, 18]
    6966Move right by one word
    7067"abc def    hij opq"[18, 3, 7, 14, 0]
    7168Test 14, RTL:
    7269Move left by one word
    73 "    abc    def    hij    opq    "[4, 21, 14, 7]
     70"    abc    def    hij    opq    "[4, 21, 14, 7, 28]
    7471Move right by one word
    7572"    abc    def    hij    opq    "[28, 7, 14, 21, 4]
    7673Test 15, RTL:
    7774Move left by one word
    78 "    abc    ABW    def    "[4, 8, 15, 21]    FAIL expected: [4, 8, 15]
    79 "    abc    ABW    def    "[15, 21]   FAIL expected to stay in the same position
    80 "    abc    ABW    def    "[20, 21]   FAIL expected to stay in the same position
    81 "    abc    ABW    def    "[19, 21]   FAIL expected to stay in the same position
     75"    abc    ABW    def    "[4, 8, 15, 21]
    8276Move right by one word
    8377"    abc    ABW    def    "[21, 15, 8, 4]
    8478Test 16, RTL:
    8579Move left by one word
    86 "    abc    def    ABW    DDU    hij    opq    "[4, 7, 15, 22, 29, 35]
     80"    abc    def    ABW    DDU    hij    opq    "[4, 7, 15, 22, 29, 35, 42]
    8781Move right by one word
    8882"    abc    def    ABW    DDU    hij    opq    "[42, 35, 29, 22, 15, 7, 4]
    8983Test 17, RTL:
    9084Move left by one word
    91 "    abc    def    hij    ABW    DSU    EJH    opq    rst    uvw    "[4, 14, 7, 22, 29, 36, 43, 56, 49]
     85"    abc    def    hij    ABW    DSU    EJH    opq    rst    uvw    "[4, 14, 7, 22, 29, 36, 43, 56, 49, 63]
    9286Move right by one word
    9387"    abc    def    hij    ABW    DSU    EJH    opq    rst    uvw    "[63, 49, 56, 43, 36, 29, 22, 7, 14, 4]
    9488Test 18, RTL:
    9589Move left by one word
    96 "    ABW    DSU    HJH    FUX    "[4, 8, 15, 22]
     90"    ABW    DSU    HJH    FUX    "[4, 8, 15, 22, 28]
    9791Move right by one word
    9892"    ABW    DSU    HJH    FUX    "[28, 22, 15, 8, 4]
    9993Test 19, RTL:
    10094Move left by one word
    101 "    ABW    abc    DSU     "[4, 8, 15]
     95"    ABW    abc    DSU     "[4, 8, 15, 21]
    10296Move right by one word
    10397"    ABW    abc    DSU     "[21, 15, 8, 4]
    10498Test 20, RTL:
    10599Move left by one word
    106 "    ABW    DSU    abc   def   HJH    FUX    "[4, 8, 15, 21, 28, 34]
     100"    ABW    DSU    abc   def   HJH    FUX    "[4, 8, 15, 21, 28, 34, 40]
    107101Move right by one word
    108102"    ABW    DSU    abc   def   HJH    FUX    "[40, 34, 28, 21, 15, 8, 4]
    109103Test 21, RTL:
    110104Move left by one word
    111 "    ABW    DSU    HJH    abc   def   jih   FUX  FUX    YR[     "[4, 8, 15, 22, 34, 28, 41, 47, 52]
     105"    ABW    DSU    HJH    abc   def   jih   FUX  FUX    YR[     "[4, 8, 15, 22, 34, 28, 41, 47, 52, 58]
    112106Move right by one word
    113107"    ABW    DSU    HJH    abc   def   jih   FUX  FUX    YR[     "[58, 52, 47, 41, 28, 34, 22, 15, 8, 4]
    114108Test 22, LTR:
    115109Move right by one word
    116 "abc def    hij opq"[0, 4, 11, 15]
     110"abc def    hij opq"[0, 4, 11, 15, 18]
    117111Move left by one word
    118112"abc def    hij opq"[18, 15, 11, 4, 0]
    119113Test 23, LTR:
    120114Move right by one word
    121 "    abc    def    hij    opq    "[0, 4, 11, 18, 25]
     115"    abc    def    hij    opq    "[0, 4, 11, 18, 25, 32]
    122116Move left by one word
    123117"    abc    def    hij    opq    "[32, 25, 18, 11, 4, 0]
    124118Test 24, LTR:
    125119Move right by one word
    126 "    abc    ABW    def    "[0, 4, 11, 18]
     120"    abc    ABW    def    "[0, 4, 11, 18, 25]
    127121Move left by one word
    128122"    abc    ABW    def    "[25, 18, 11, 4, 0]
    129123Test 25, LTR:
    130124Move right by one word
    131 "    abc    def    ABW    DDU    hij    opq    "[0, 4, 11, 18, 21, 32, 39]
     125"    abc    def    ABW    DDU    hij    opq    "[0, 4, 11, 18, 21, 32, 39, 46]
    132126Move left by one word
    133127"    abc    def    ABW    DDU    hij    opq    "[46, 39, 32, 21, 18, 11, 4, 0]
    134128Test 26, LTR:
    135129Move right by one word
    136 "    abc    def    hij    ABW    DSU    EJH    opq    rst    uvw    "[0, 4, 11, 18, 25, 35, 28, 46, 53, 60]
     130"    abc    def    hij    ABW    DSU    EJH    opq    rst    uvw    "[0, 4, 11, 18, 25, 35, 28, 46, 53, 60, 67]
    137131Move left by one word
    138132"    abc    def    hij    ABW    DSU    EJH    opq    rst    uvw    "[67, 60, 53, 46, 28, 35, 25, 18, 11, 4, 0]
    139133Test 27, LTR:
    140134Move right by one word
    141 "    ABW    DSU    HJH    FUX    "[0, 4, 21, 14, 7]
     135"    ABW    DSU    HJH    FUX    "[0, 4, 21, 14, 7, 32]
    142136Move left by one word
    143137"    ABW    DSU    HJH    FUX    "[32, 7, 14, 21, 4, 0]
    144138Test 28, LTR:
    145139Move right by one word
    146 "    ABW    abc    DSU     "[0, 4, 11, 18]
     140"    ABW    abc    DSU     "[0, 4, 11, 18, 26]
    147141Move left by one word
    148142"    ABW    abc    DSU     "[26, 18, 11, 4, 0]
    149143Test 29, LTR:
    150144Move right by one word
    151 "    ABW    DSU    abc   def   HJH    FUX    "[0, 4, 7, 18, 24, 30, 33]
     145"    ABW    DSU    abc   def   HJH    FUX    "[0, 4, 7, 18, 24, 30, 33, 44]
    152146Move left by one word
    153147"    ABW    DSU    abc   def   HJH    FUX    "[44, 33, 30, 24, 18, 7, 4, 0]
    154148Test 30, LTR:
    155149Move right by one word
    156 "    ABW    DSU    HJH    abc   def   jih   FUX  FUX    YR[     "[0, 4, 14, 7, 25, 31, 37, 43, 51, 46]
     150"    ABW    DSU    HJH    abc   def   jih   FUX  FUX    YR[     "[0, 4, 14, 7, 25, 31, 37, 43, 51, 46, 63]
    157151Move left by one word
    158152"    ABW    DSU    HJH    abc   def   jih   FUX  FUX    YR[     "[63, 46, 51, 43, 37, 31, 25, 7, 14, 4, 0]
    159153Test 31, LTR:
    160154Move right by one word
    161 "ABW DSU    EJH FUX"[0, 14, 7, 3]
     155"ABW DSU    EJH FUX"[0, 14, 7, 3, 18]
    162156Move left by one word
    163157"ABW DSU    EJH FUX"[18, 3, 7, 14, 0]
    164158Test 32, LTR:
    165159Move right by one word
    166 "ABW DSU EJH    abc def hij"[0, 7, 3, 15, 19, 23]
     160"ABW DSU EJH    abc def hij"[0, 7, 3, 15, 19, 23, 26]
    167161Move left by one word
    168162"ABW DSU EJH    abc def hij"[26, 23, 19, 15, 3, 7, 0]
    169163Test 33, LTR:
    170164Move right by one word
    171 "abc def hij    ABW DSU EJH    opq rst uvw"[0, 4, 8, 15, 22, 18, 30, 34, 38]
     165"abc def hij    ABW DSU EJH    opq rst uvw"[0, 4, 8, 15, 22, 18, 30, 34, 38, 41]
    172166Move left by one word
    173167"abc def hij    ABW DSU EJH    opq rst uvw"[41, 38, 34, 30, 18, 22, 15, 8, 4, 0]
    174168Test 34, RTL:
    175169Move left by one word
    176 "abc def    hij opq"[0, 14, 7, 3]
     170"abc def    hij opq"[0, 14, 7, 3, 18]
    177171Move right by one word
    178172"abc def    hij opq"[18, 3, 7, 14, 0]
    179173Test 35, RTL:
    180174Move left by one word
    181 "    abc    def    hij    opq    "[0, 4, 21, 14, 7]
     175"    abc    def    hij    opq    "[0, 4, 21, 14, 7, 32]
    182176Move right by one word
    183177"    abc    def    hij    opq    "[32, 7, 14, 21, 4, 0]
    184178Test 36, RTL:
    185179Move left by one word
    186 "    abc    ABW    def    "[0, 4, 11, 18]
     180"    abc    ABW    def    "[0, 4, 11, 18, 25]
    187181Move right by one word
    188182"    abc    ABW    def    "[25, 18, 11, 4, 0]
    189183Test 37, RTL:
    190184Move left by one word
    191 "    abc    def    ABW    DDU    hij    opq    "[0, 4, 7, 18, 25, 32, 35]
     185"    abc    def    ABW    DDU    hij    opq    "[0, 4, 7, 18, 25, 32, 35, 46]
    192186Move right by one word
    193187"    abc    def    ABW    DDU    hij    opq    "[46, 35, 32, 25, 18, 7, 4, 0]
    194188Test 38, RTL:
    195189Move left by one word
    196 "    abc    def    hij    ABW    DSU    EJH    opq    rst    uvw    "[0, 4, 14, 7, 25, 32, 39, 46, 56, 49]
     190"    abc    def    hij    ABW    DSU    EJH    opq    rst    uvw    "[0, 4, 14, 7, 25, 32, 39, 46, 56, 49, 67]
    197191Move right by one word
    198192"    abc    def    hij    ABW    DSU    EJH    opq    rst    uvw    "[67, 49, 56, 46, 39, 32, 25, 7, 14, 4, 0]
    199193Test 39, RTL:
    200194Move left by one word
    201 "    ABW    DSU    HJH    FUX    "[0, 4, 11, 18, 25]
     195"    ABW    DSU    HJH    FUX    "[0, 4, 11, 18, 25, 32]
    202196Move right by one word
    203197"    ABW    DSU    HJH    FUX    "[32, 25, 18, 11, 4, 0]
    204198Test 40, RTL:
    205199Move left by one word
    206 "    ABW    abc    DSU     "[0, 4, 11, 18]
     200"    ABW    abc    DSU     "[0, 4, 11, 18, 26]
    207201Move right by one word
    208202"    ABW    abc    DSU     "[26, 18, 11, 4, 0]
    209203Test 41, RTL:
    210204Move left by one word
    211 "    ABW    DSU    abc   def   HJH    FUX    "[0, 4, 11, 18, 21, 30, 37]
     205"    ABW    DSU    abc   def   HJH    FUX    "[0, 4, 11, 18, 21, 30, 37, 44]
    212206Move right by one word
    213207"    ABW    DSU    abc   def   HJH    FUX    "[44, 37, 30, 21, 18, 11, 4, 0]
    214208Test 42, RTL:
    215209Move left by one word
    216 "    ABW    DSU    HJH    abc   def   jih   FUX  FUX    YR[     "[0, 4, 11, 18, 25, 34, 28, 43, 48, 55]
     210"    ABW    DSU    HJH    abc   def   jih   FUX  FUX    YR[     "[0, 4, 11, 18, 25, 34, 28, 43, 48, 55, 63]
    217211Move right by one word
    218212"    ABW    DSU    HJH    abc   def   jih   FUX  FUX    YR[     "[63, 55, 48, 43, 28, 34, 25, 18, 11, 4, 0]
    219213Test 43, LTR:
    220214Move right by one word
    221 "䤫䡱暘倎厘    疂崝烵     abc def"[0, 1, 2, 3, 4, 9, 10, 11, 17, 21]
     215"䤫䡱暘倎厘    疂崝烵     abc def"[0, 1, 2, 3, 4, 9, 10, 11, 17, 21, 24]
    222216Move left by one word
    223217"䤫䡱暘倎厘    疂崝烵     abc def"[24, 21, 17, 11, 10, 9, 4, 3, 2, 1, 0]
  • trunk/LayoutTests/editing/selection/move-by-word-visually-multi-space.html

    r91864 r92223  
    3737
    3838<!-- test multispaces -->
    39 <div dir=ltr class="test_move_by_word" title="0 4 8 15|18 15 8 4 0" contenteditable>abc def    hij opq</div>
    40 <div dir=ltr class="test_move_by_word" title="4 8 15 22|28 22 15 8 4" contenteditable>    abc    def    hij    opq    </div>
    41 <div dir=ltr class="test_move_by_word" title="4 8 15|21 15 8 4" contenteditable>    abc    אבצ    def    </div>
    42 <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>
    43 <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>
    44 <div dir=ltr class="test_move_by_word" title="4 21 14 7|28 7 14 21 4" contenteditable>    אבצ    דעפ    חיח    ופק    </div>
    45 <div dir=ltr class="test_move_by_word" title="4 8 15|21 15 8 4" contenteditable>    אבצ    abc    דעפ     </div>
    46 <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>
    47 <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>
     39<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>
     40<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>
     41<div dir=ltr class="test_move_by_word" title="4 8 15 21|21 15 8 4" contenteditable>    abc    אבצ    def    </div>
     42<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>
     43<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>
     44<div dir=ltr class="test_move_by_word" title="4 21 14 7 28|28 7 14 21 4" contenteditable>    אבצ    דעפ    חיח    ופק    </div>
     45<div dir=ltr class="test_move_by_word" title="4 8 15 21|21 15 8 4" contenteditable>    אבצ    abc    דעפ     </div>
     46<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>
     47<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>
    4848
    49 <div dir=ltr class="test_move_by_word" title="0 14 7 3|18 3 7 14 0" contenteditable>אבצ דעפ    היח ופק</div>
    50 <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>
    51 <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>
     49<div dir=ltr class="test_move_by_word" title="0 14 7 3 18|18 3 7 14 0" contenteditable>אבצ דעפ    היח ופק</div>
     50<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>
     51<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>
    5252
    53 <div dir=rtl class="test_move_by_word" title="18 3 7 14 0|0 14 7 3" contenteditable>abc def    hij opq</div>
    54 <div dir=rtl class="test_move_by_word" title="28 7 14 21 4|4 21 14 7" contenteditable>    abc    def    hij    opq    </div>
    55 <div dir=rtl class="test_move_by_word" title="21 15 8 4|4 8 15" contenteditable>    abc    אבצ    def    </div>
    56 <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>
    57 <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>
    58 <div dir=rtl class="test_move_by_word" title="28 22 15 8 4|4 8 15 22" contenteditable>    אבצ    דעפ    חיח    ופק    </div>
    59 <div dir=rtl class="test_move_by_word" title="21 15 8 4|4 8 15" contenteditable>    אבצ    abc    דעפ     </div>
    60 <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>
    61 <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>
     53<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>
     54<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>
     55<div dir=rtl class="test_move_by_word" title="21 15 8 4|4 8 15 21" contenteditable>    abc    אבצ    def    </div>
     56<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>
     57<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>
     58<div dir=rtl class="test_move_by_word" title="28 22 15 8 4|4 8 15 22 28" contenteditable>    אבצ    דעפ    חיח    ופק    </div>
     59<div dir=rtl class="test_move_by_word" title="21 15 8 4|4 8 15 21" contenteditable>    אבצ    abc    דעפ     </div>
     60<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>
     61<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>
    6262
    6363<!-- multispaces while preserving spaces -->
    64 <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>
    65 <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>
    66 <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>
    67 <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>
    68 <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>
    69 <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>
    70 <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>
    71 <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>
    72 <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>
     64<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>
     65<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>
     66<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>
     67<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>
     68<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>
     69<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>
     70<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>
     71<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>
     72<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>
    7373
    74 <div style="white-space:pre" dir=ltr class="test_move_by_word" title="0 14 7 3|18 3 7 14 0" contenteditable>אבצ דעפ    היח ופק</div>
    75 <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>
    76 <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>
     74<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>
     75<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>
     76<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>
    7777
    78 <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>
    79 <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>
    80 <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>
    81 <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>
    82 <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>
    83 <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>
    84 <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>
    85 <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>
    86 <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>
     78<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>
     79<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>
     80<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>
     81<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>
     82<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>
     83<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>
     84<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>
     85<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>
     86<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>
    8787
    8888<!-- test words not separated by spaces -->
    89 <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>
     89<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>
    9090
    9191</div>
  • trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-inline-element-expected.txt

    r91864 r92223  
    33Test 1, LTR:
    44Move right by one word
    5 "AAA "[0, 3]
     5"AAA "[0, 3], "BB"[2]
    66Move left by one word
    77"BB"[2], "AAA "[3, 0]
    88Test 2, RTL:
    99Move left by one word
    10 "AAA "[0, 4]
     10"AAA "[0, 4], "BB"[2]
    1111Move right by one word
    1212"BB"[2], "AAA "[4, 0]
    1313Test 3, LTR:
    1414Move right by one word
    15 "abc def "[0, 4, 8], "hij opq"[4], " rst uvw"[1, 5]
     15"abc def "[0, 4, 8], "hij opq"[4], " rst uvw"[1, 5, 8]
    1616Move left by one word
    1717" rst uvw"[8, 5, 1], "hij opq"[4], "abc def "[8, 4, 0]
    1818Test 4, RTL:
    1919Move left by one word
    20 "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]
     20"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]
    2121" rst uvw"[4], "hij opq"[3]   FAIL expected "hij opq"[ 7]
    2222" rst uvw"[3], "hij opq"[3]   FAIL expected "hij opq"[ 7]
     
    3131Test 5, RTL:
    3232Move left by one word
    33 "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]
     33"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]
    3434" rst uvw"[4], "hij opq"[3]   FAIL expected "hij opq"[ 7]
    3535" rst uvw"[3], "hij opq"[3]   FAIL expected "hij opq"[ 7]
     
    4444Test 6, LTR:
    4545Move right by one word
    46 "abc def "[0, 4, 8], "hij opq"[4], " rst uvw"[1, 5]
     46"abc def "[0, 4, 8], "hij opq"[4], " rst uvw"[1, 5, 8]
    4747Move left by one word
    4848" rst uvw"[8, 5, 1], "hij opq"[4], "abc def "[8, 4, 0]
    4949Test 7, RTL:
    5050Move left by one word
    51 "ABD DSU "[0, 4, 8], "EJH FUX"[4], "FFZ LIG"[4]
     51"ABD DSU "[0, 4, 8], "EJH FUX"[4], "FFZ LIG"[4, 7]
    5252Move right by one word
    5353"FFZ LIG"[7, 4], "EJH FUX"[4], "ABD DSU "[8, 4, 0]
    5454Test 8, LTR:
    5555Move right by one word
    56 "ABD DSU "[0], "FFZ LIG"[3], "EJH FUX"[3], "ABD DSU "[7, 3]
     56"ABD DSU "[0], "FFZ LIG"[3], "EJH FUX"[3], "ABD DSU "[7, 3], "FFZ LIG"[7]
    5757Move left by one word
    5858"FFZ LIG"[7], "ABD DSU "[3, 7], "EJH FUX"[3], "FFZ LIG"[3], "ABD DSU "[0]
    5959Test 9, RTL:
    6060Move left by one word
    61 "ABD DSU "[0, 4, 8], "EJH FUX"[4], "FFZ LIG"[4]
     61"ABD DSU "[0, 4, 8], "EJH FUX"[4], "FFZ LIG"[4, 7]
    6262Move right by one word
    6363"FFZ LIG"[7, 4], "EJH FUX"[4], "ABD DSU "[8, 4, 0]
    6464Test 10, LTR:
    6565Move right by one word
    66 "ABD DSU "[0], "FFZ LIG"[3], "EJH FUX"[3], "ABD DSU "[7, 3]
     66"ABD DSU "[0], "FFZ LIG"[3], "EJH FUX"[3], "ABD DSU "[7, 3], "FFZ LIG"[7]
    6767Move left by one word
    6868"FFZ LIG"[7], "ABD DSU "[3, 7], "EJH FUX"[3], "FFZ LIG"[3], "ABD DSU "[0]
    6969Test 11, RTL:
    7070Move left by one word
    71 "ABD DSU "[0, 4, 8], "abc def"[3], "FFZ LIG"[4]
     71"ABD DSU "[0, 4, 8], "abc def"[3], "FFZ LIG"[4, 7]
    7272Move right by one word
    7373"FFZ LIG"[7, 4], "abc def"[3], "ABD DSU "[8, 4, 0]
    7474Test 12, LTR:
    7575Move right by one word
    76 "ABD DSU "[0], "FFZ LIG"[3], "ABD DSU "[8], "abc def"[4], "ABD DSU "[7, 3]
     76"ABD DSU "[0], "FFZ LIG"[3], "ABD DSU "[8], "abc def"[4], "ABD DSU "[7, 3], "FFZ LIG"[7]
    7777Move left by one word
    7878"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]
     
    8383Test 13, RTL:
    8484Move left by one word
    85 "ABD DSU "[0, 4, 8], "abc def"[3], "FFZ LIG"[4]
     85"ABD DSU "[0, 4, 8], "abc def"[3], "FFZ LIG"[4, 7]
    8686Move right by one word
    8787"FFZ LIG"[7, 4], "abc def"[3], "ABD DSU "[8, 4, 0]
    8888Test 14, LTR:
    8989Move right by one word
    90 "ABD DSU "[0, 3, 8], "abc def"[4], "FFZ LIG"[3]
     90"ABD DSU "[0, 3, 8], "abc def"[4], "FFZ LIG"[3, 7]
    9191Move left by one word
    9292"FFZ LIG"[7, 3], "abc def"[4], "ABD DSU "[8, 3, 0]
    9393Test 15, RTL:
    9494Move left by one word
    95 "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]
     95"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]
    9696"ABD opq DSU "[12], "abc AAA def"[8]   FAIL expected "abc AAA def"[ 4]
    9797"abc AAA def"[10, 8]   FAIL expected "abc AAA def"[ 4]
     
    121121Test 17, RTL:
    122122Move left by one word
    123 "ABD opq DSU "[0, 4, 8, 12], "abc AAA def"[4, 8], "FFZ rst LIG"[4, 8]
     123"ABD opq DSU "[0, 4, 8, 12], "abc AAA def"[4, 8], "FFZ rst LIG"[4, 8, 11]
    124124Move right by one word
    125125"FFZ rst LIG"[11, 8, 4], "abc AAA def"[8, 4], "ABD opq DSU "[12, 8, 4, 0]
     
    131131Test 19, LTR:
    132132Move right by one word
    133 "aaa "[0, 4], "bbb AAA "[4, 7]
     133"aaa "[0, 4], "bbb AAA "[4, 7], "FFZ"[3]
    134134Move left by one word
    135135"FFZ"[3], "bbb AAA "[7, 4], "aaa "[4, 0]
    136136Test 20, RTL:
    137137Move left by one word
    138 "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]
     138"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]
    139139"ABD opq rst DSU "[16], "abc uvw AAA def lmn"[12]   FAIL expected "abc uvw AAA def lmn"[ 15]
    140140"abc uvw AAA def lmn"[18, 12]   FAIL expected "abc uvw AAA def lmn"[ 15]
  • trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-inline-element.html

    r91864 r92223  
    3636-->
    3737<!-- Inline element -->
    38 <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>
    39 <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>
     38<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>
     39<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>
    4040
    4141<!-- pure English in inline element with same or different directionality from its parent -->
    42 <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>
     42<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>
    4343
    4444<!-- FAILED -->
    45 <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>
     45<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>
    4646
    4747<!-- FAILED. The render result is the same as d_4. -->
    48 <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>
     48<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>
    4949
    50 <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>
     50<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>
    5151
    5252<!-- pure Hebrew in inline element with same or different directionality from its parent -->
    5353
    54 <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>
     54<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>
    5555
    56 <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>
     56<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>
    5757
    58 <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>
     58<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>
    5959
    60 <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>
     60<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>
    6161
    6262<!-- bidi in inline element with same or different directionality from its parent -->
    63 <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>
     63<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>
    6464
    6565<!-- FAIL -->
    66 <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>
     66<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>
    6767
    68 <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>
     68<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>
    6969
    70 <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>
     70<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>
    7171
    7272<!-- FAILED -->
    73 <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>
     73<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>
    7474
    7575<!-- FAILED, and wrong printing result -->
     
    7777
    7878<!-- FAILED -->
    79 <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>
     79<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>
    8080
    8181<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>
    8282
    83 <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>
     83<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>
    8484
    85 <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>
     85<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>
    8686
    8787</div>
  • trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-one-element-expected.txt

    r91864 r92223  
    33Test 1, LTR:
    44Move right by one word
    5 "abc def hij opq rst"[0, 4, 8, 12, 16]
     5"abc def hij opq rst"[0, 4, 8, 12, 16, 19]
    66Move left by one word
    77"abc def hij opq rst"[19, 16, 12, 8, 4, 0]
    88Test 2, RTL:
    99Move left by one word
    10 "abc def hij opq rst"[0, 15, 11, 7, 3]
     10"abc def hij opq rst"[0, 15, 11, 7, 3, 19]
    1111Move right by one word
    1212"abc def hij opq rst"[19, 3, 7, 11, 15, 0]
    1313Test 3, LTR:
    1414Move right by one word
    15 "ZZZ QQQ BBB CCC XXX"[0, 15, 11, 7, 3]
     15"ZZZ QQQ BBB CCC XXX"[0, 15, 11, 7, 3, 19]
    1616Move left by one word
    1717"ZZZ QQQ BBB CCC XXX"[19, 3, 7, 11, 15, 0]
    1818Test 4, RTL:
    1919Move left by one word
    20 "ZZZ QQQ BBB CCC XXX"[0, 4, 8, 12, 16]
     20"ZZZ QQQ BBB CCC XXX"[0, 4, 8, 12, 16, 19]
    2121Move right by one word
    2222"ZZZ QQQ BBB CCC XXX"[19, 16, 12, 8, 4, 0]
    2323Test 5, LTR:
    2424Move right by one word
    25 "abc def hij AAA BBB WWW opr uvw xyz"[0, 4, 8, 12, 19, 15, 24, 28, 32]
     25"abc def hij AAA BBB WWW opr uvw xyz"[0, 4, 8, 12, 19, 15, 24, 28, 32, 35]
    2626Move left by one word
    2727"abc def hij AAA BBB WWW opr uvw xyz"[35, 32, 28, 24, 15, 19, 12, 8, 4, 0]
    2828Test 6, RTL:
    2929Move left by one word
    30 "abc def hij AAA BBB WWW opr uvw xyz"[0, 7, 3, 12, 16, 20, 24, 31, 27]
     30"abc def hij AAA BBB WWW opr uvw xyz"[0, 7, 3, 12, 16, 20, 24, 31, 27, 35]
    3131Move right by one word
    3232"abc def hij AAA BBB WWW opr uvw xyz"[35, 27, 31, 24, 20, 16, 12, 3, 7, 0]
    3333Test 7, LTR:
    3434Move right by one word
    35 "abc def ZQB RIG uvw xyz"[0, 4, 8, 11, 16, 20]
     35"abc def ZQB RIG uvw xyz"[0, 4, 8, 11, 16, 20, 23]
    3636Move left by one word
    3737"abc def ZQB RIG uvw xyz"[23, 20, 16, 11, 8, 4, 0]
    3838Test 8, RTL:
    3939Move left by one word
    40 "abc def ZQB RIG uvw xyz"[0, 3, 8, 12, 16, 19]
     40"abc def ZQB RIG uvw xyz"[0, 3, 8, 12, 16, 19, 23]
    4141Move right by one word
    4242"abc def ZQB RIG uvw xyz"[23, 19, 16, 12, 8, 3, 0]
    4343Test 9, LTR:
    4444Move right by one word
    45 "aaa AAA bbb"[0, 4, 8]
     45"aaa AAA bbb"[0, 4, 8, 11]
    4646Move left by one word
    4747"aaa AAA bbb"[11, 8, 4, 0]
     
    5353Test 11, LTR:
    5454Move right by one word
    55 "AAA BBB WWW aaa bbb ccc DDD SSS UUU"[0, 7, 3, 12, 16, 20, 24, 31, 27]
     55"AAA BBB WWW aaa bbb ccc DDD SSS UUU"[0, 7, 3, 12, 16, 20, 24, 31, 27, 35]
    5656Move left by one word
    5757"AAA BBB WWW aaa bbb ccc DDD SSS UUU"[35, 27, 31, 24, 20, 16, 12, 3, 7, 0]
    5858Test 12, RTL:
    5959Move left by one word
    60 "AAA BBB WWW aaa bbb ccc DDD SSS UUU"[0, 4, 8, 12, 19, 15, 24, 28, 32]
     60"AAA BBB WWW aaa bbb ccc DDD SSS UUU"[0, 4, 8, 12, 19, 15, 24, 28, 32, 35]
    6161Move right by one word
    6262"AAA BBB WWW aaa bbb ccc DDD SSS UUU"[35, 32, 28, 24, 15, 19, 12, 8, 4, 0]
    6363Test 13, LTR:
    6464Move right by one word
    65 "AAA BBB aaa bbb WWW DDD"[0, 3, 8, 12, 16, 19]
     65"AAA BBB aaa bbb WWW DDD"[0, 3, 8, 12, 16, 19, 23]
    6666Move left by one word
    6767"AAA BBB aaa bbb WWW DDD"[23, 19, 16, 12, 8, 3, 0]
    6868Test 14, RTL:
    6969Move left by one word
    70 "AAA BBB aaa bbb WWW DDD"[0, 4, 8, 11, 16, 20]
     70"AAA BBB aaa bbb WWW DDD"[0, 4, 8, 11, 16, 20, 23]
    7171Move right by one word
    7272"AAA BBB aaa bbb WWW DDD"[23, 20, 16, 11, 8, 4, 0]
     
    7878Test 16, RTL:
    7979Move left by one word
    80 "ZQB abc RIG"[0, 4, 8]
     80"ZQB abc RIG"[0, 4, 8, 11]
    8181Move right by one word
    8282"ZQB abc RIG"[11, 8, 4, 0]
  • trunk/LayoutTests/editing/selection/move-by-word-visually-single-space-one-element.html

    r91864 r92223  
    3636-->
    3737<!-- pure English -->
    38 <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>
    39 <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>
     38<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>
     39<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>
    4040
    4141<!-- pure Hebrew -->
    42 <div dir=ltr class="test_move_by_word" title="0 15 11 7 3|19 3 7 11 15 0" contenteditable>ששש נננ בבב גגג קקק</div>
    43 <div dir=rtl class="test_move_by_word" title="19 16 12 8 4 0|0 4 8 12 16" contenteditable>ששש נננ בבב גגג קקק</div>
     42<div dir=ltr class="test_move_by_word" title="0 15 11 7 3 19|19 3 7 11 15 0" contenteditable>ששש נננ בבב גגג קקק</div>
     43<div dir=rtl class="test_move_by_word" title="19 16 12 8 4 0|0 4 8 12 16 19" contenteditable>ששש נננ בבב גגג קקק</div>
    4444
    4545<!-- bidi text -->
    4646<!-- English Hebrew English -->
    47 <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>
    48 <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>
     47<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>
     48<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>
    4949
    50 <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>
    51 <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>
     50<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>
     51<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>
    5252
    53 <div dir=ltr class="test_move_by_word" title="0 4 8|11 8 4 0" contenteditable>aaa אאא bbb</div>
     53<div dir=ltr class="test_move_by_word" title="0 4 8 11|11 8 4 0" contenteditable>aaa אאא bbb</div>
    5454<div dir=rtl class="test_move_by_word" title="11 8 4 0|0 4 8 11" contenteditable>aaa אאא bbb</div>
    5555
    5656<!-- Hebrew English Hebrew -->
    57 <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>
    58 <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>
     57<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>
     58<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>
    5959
    60 <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>
    61 <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>
     60<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>
     61<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>
    6262
    6363<div dir=ltr class="test_move_by_word" title="0 4 8 11|11 8 4 0" contenteditable>שנב abc סטז</div>
    64 <div dir=rtl class="test_move_by_word" title="11 8 4 0|0 4 8" contenteditable>שנב abc סטז</div>
     64<div dir=rtl class="test_move_by_word" title="11 8 4 0|0 4 8 11" contenteditable>שנב abc סטז</div>
    6565
    6666</div>
  • trunk/Source/WebCore/ChangeLog

    r92221 r92223  
     12011-08-02  Van Lam  <vanlam@google.com>
     2
     3        --webkit-visual-word: ctrl-arrow is not able to reach the boundary of line
     4        https://bugs.webkit.org/show_bug.cgi?id=61346
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        When collecintg word boundaries in a box, explicitly check if the box
     9        is at the end of line (so it should contain the end-of-line position)
     10        and collect the end-of-line position.
     11
     12        * editing/visible_units.cpp:
     13        (WebCore::isBoxVisuallyLastInLine):
     14        (WebCore::appendPositionAtLogicalEndOfLine):
     15        (WebCore::collectWordBreaksInBoxInsideBlockWithSameDirectionality):
     16        (WebCore::collectWordBreaksInBoxInsideBlockWithDifferntDirectionality):
     17
    1182011-08-02  Vsevolod Vlasov  <vsevik@chromium.org>
    219
  • trunk/Source/WebCore/editing/visible_units.cpp

    r91788 r92223  
    11741174static const int invalidOffset = -1;
    11751175
     1176static bool isBoxVisuallyLastInLine(const InlineBox* box, TextDirection blockDirection)
     1177{
     1178    return blockDirection == LTR ? !box->nextLeafChild() || box->nextLeafChild()->renderer()->isBR()
     1179        : !box->prevLeafChild() || box->prevLeafChild()->renderer()->isBR();
     1180}
     1181
    11761182static bool positionIsInBox(const VisiblePosition& wordBreak, const InlineBox* box, int& offsetOfWordBreak)
    11771183{
     
    13601366typedef Vector<WordBoundaryEntry, 50> WordBoundaryVector;
    13611367   
     1368static void appendPositionAtLogicalEndOfLine(const InlineBox* box, WordBoundaryVector& orderedWordBoundaries)
     1369{
     1370    VisiblePosition endOfBlock = logicalEndOfLine(createPositionAvoidingIgnoredNode(box->renderer()->node(), box->caretMaxOffset()));
     1371
     1372    int offsetOfEndOfBlock;
     1373    if (positionIsInBox(endOfBlock, box, offsetOfEndOfBlock))
     1374        orderedWordBoundaries.append(WordBoundaryEntry(endOfBlock, offsetOfEndOfBlock));
     1375}
     1376   
    13621377static void collectWordBreaksInBoxInsideBlockWithSameDirectionality(const InlineBox* box, WordBoundaryVector& orderedWordBoundaries)
    13631378{
    13641379    orderedWordBoundaries.clear();
     1380
     1381    if (!box->renderer()->isBR() && isBoxVisuallyLastInLine(box, box->direction()))
     1382        appendPositionAtLogicalEndOfLine(box, orderedWordBoundaries);
    13651383   
    13661384    VisiblePosition wordBreak;
     
    13781396{
    13791397    orderedWordBoundaries.clear();
     1398   
     1399    if (!box->renderer()->isBR() && isBoxVisuallyLastInLine(box, box->direction() == LTR ? RTL : LTR))
     1400        appendPositionAtLogicalEndOfLine(box, orderedWordBoundaries);
    13801401   
    13811402    VisiblePosition wordBreak;
Note: See TracChangeset for help on using the changeset viewer.