From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Anupam Snigdha <snianu@microsoft.com>
Date: Sat, 6 Feb 2021 00:56:07 +0000
Subject: Word break between space and alphanumeric.

This patch makes the position between whitespace and alphanumeric
characters as a valid word break position during word movement to the
right using CTRL+RIGHT on Windows.
e.g. 123| 456 789, after ctrl+right returns 123 |456 789.
On Mac, the word movement is different and it always ends up at the
end of the word when moving right so the behavior is unchanged after
this patch.

Bug: 1082768

Change-Id: Iaaed980e79b0a2c289de4d4cfc231eda68a9281a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2666008
Commit-Queue: Anupam Snigdha <snianu@microsoft.com>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#851372}

diff --git a/third_party/blink/renderer/core/editing/commands/move_commands_test.cc b/third_party/blink/renderer/core/editing/commands/move_commands_test.cc
index 41b4260caf9a246ebb026b813aace5174d39a5c8..385124efd603626f2770bfe29ccc55499db6ed99 100644
--- a/third_party/blink/renderer/core/editing/commands/move_commands_test.cc
+++ b/third_party/blink/renderer/core/editing/commands/move_commands_test.cc
@@ -9,6 +9,7 @@
 #include "third_party/blink/renderer/core/dom/element.h"
 #include "third_party/blink/renderer/core/dom/focus_params.h"
 #include "third_party/blink/renderer/core/editing/commands/move_commands.h"
+#include "third_party/blink/renderer/core/editing/editing_behavior.h"
 #include "third_party/blink/renderer/core/editing/editor.h"
 #include "third_party/blink/renderer/core/editing/frame_selection.h"
 #include "third_party/blink/renderer/core/editing/selection_template.h"
@@ -215,10 +216,19 @@ TEST_F(MoveCommandsTest, CaretBrowsingPositionAndFocusUpdate_MoveWordLeft) {
 }
 
 TEST_F(MoveCommandsTest, CaretBrowsingPositionAndFocusUpdate_MoveWordRight) {
+  bool should_skip_spaces = GetDocument()
+                                .GetFrame()
+                                ->GetEditor()
+                                .Behavior()
+                                .ShouldSkipSpaceWhenMovingRight();
   VerifyCaretBrowsingPositionAndFocusUpdate(
       "<div>a|<a href=\"foo\"> b</a></div>", "body",
-      MoveCommands::ExecuteMoveWordRight, "<div>a<a href=\"foo\"> b|</a></div>",
+      MoveCommands::ExecuteMoveWordRight,
+      should_skip_spaces ? "<div>a<a href=\"foo\"> |b</a></div>"
+                         : "<div>a<a href=\"foo\"> b|</a></div>",
       "a");
+  // MoveRight skips the beginning of the word when started after
+  // end of previous word, placing caret at different position for macOS.
 }
 
 // This test verifies that focus returns to the body after browsing out of a
diff --git a/third_party/blink/renderer/core/editing/visible_units_word.cc b/third_party/blink/renderer/core/editing/visible_units_word.cc
index 221835585579048ea8c7e4a225cea7b950def2ca..bd082c7cc02f5bc18c7cbdff5ececf73a923a488 100644
--- a/third_party/blink/renderer/core/editing/visible_units_word.cc
+++ b/third_party/blink/renderer/core/editing/visible_units_word.cc
@@ -134,11 +134,21 @@ PositionInFlatTree NextWordPositionInternal(
             return SkipWhitespaceIfNeeded(text, runner);
           continue;
         }
-        // We stop searching when the character preceding the break is
-        // alphanumeric or punctuations or underscore or linebreaks.
+        // We stop searching in the following conditions:
+        // 1. When the character preceding the break is
+        //    alphanumeric or punctuations or underscore or linebreaks.
+        // Only on Windows:
+        // 2. When the character preceding the break is a whitespace and
+        //    the character following it is an alphanumeric or punctuations
+        //    or underscore or linebreaks.
         if (static_cast<unsigned>(runner) < text.length() &&
             IsWordBreak(text[runner - 1]))
           return SkipWhitespaceIfNeeded(text, runner);
+        else if (platform_word_behavior_ ==
+                     PlatformWordBehavior::kWordSkipSpaces &&
+                 static_cast<unsigned>(runner) < text.length() &&
+                 IsWhitespace(text[runner - 1]) && IsWordBreak(text[runner]))
+          return SkipWhitespaceIfNeeded(text, runner);
       }
       if (text[text.length() - 1] != kNewlineCharacter)
         return Position::After(text.length() - 1);
diff --git a/third_party/blink/renderer/core/editing/visible_units_word_test.cc b/third_party/blink/renderer/core/editing/visible_units_word_test.cc
index bec9dae5d427ed0ba3735ce7d0f704d1f8f18187..4be0c65c8b319d5d256760a16000cd880e9f9257 100644
--- a/third_party/blink/renderer/core/editing/visible_units_word_test.cc
+++ b/third_party/blink/renderer/core/editing/visible_units_word_test.cc
@@ -513,7 +513,7 @@ TEST_P(ParameterizedVisibleUnitsWordTest, NextWordSkipSpacesBasic) {
             DoNextWordSkippingSpaces("<p> (|1) abc def</p>"));
   EXPECT_EQ("<p> (1) |abc def</p>",
             DoNextWordSkippingSpaces("<p> (1|) abc def</p>"));
-  EXPECT_EQ("<p> (1) abc |def</p>",
+  EXPECT_EQ("<p> (1) |abc def</p>",
             DoNextWordSkippingSpaces("<p> (1)| abc def</p>"));
   EXPECT_EQ("<p> (1) abc |def</p>",
             DoNextWordSkippingSpaces("<p> (1) |abc def</p>"));
@@ -521,7 +521,7 @@ TEST_P(ParameterizedVisibleUnitsWordTest, NextWordSkipSpacesBasic) {
             DoNextWordSkippingSpaces("<p> (1) a|bc def</p>"));
   EXPECT_EQ("<p> (1) abc |def</p>",
             DoNextWordSkippingSpaces("<p> (1) ab|c def</p>"));
-  EXPECT_EQ("<p> (1) abc def|</p>",
+  EXPECT_EQ("<p> (1) abc |def</p>",
             DoNextWordSkippingSpaces("<p> (1) abc| def</p>"));
   EXPECT_EQ("<p> (1) abc def|</p>",
             DoNextWordSkippingSpaces("<p> (1) abc |def</p>"));
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_ltr_forward_word.html
index 753b75c414ec970c2099373ef8b7c3116c9d47aa..7a3b6485653f5b988c1264fd36485455de47b237 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_ltr_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span style="direction: rtl">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span style="direction: rtl">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span style="direction: rtl">ipsum dolor sit</span> amet</div>',
   `${behavior} 1-5 ltr forward word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 1-11 ltr forward word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 1-17 ltr forward word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 1-21 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_ltr_right_word.html
index 218d4e3a293f03f9cbd82aed0d5189a2b4b5e932..cbe005fdccfedebf9f2ace73ef9115eb4d971ec6 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_ltr_right_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span style="direction: rtl">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span style="direction: rtl">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span style="direction: rtl">ipsum dolor sit</span> amet</div>',
   `${behavior} 1-5 ltr right word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 1-11 ltr right word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 1-17 ltr right word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: rtl">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 1-21 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_rtl_forward_word.html
index 28893bd743fac97d12b97c2081d743fcc166eaa0..e7e76b456bc9176a70402f505d04aba6e45a5868 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_rtl_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span style="direction: rtl">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span style="direction: rtl">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span style="direction: rtl">ipsum dolor sit</span> amet</div>',
   `${behavior} 1-5 rtl forward word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 1-11 rtl forward word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 1-17 rtl forward word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 1-21 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_rtl_left_word.html
index 83fb948ee09e29ecb9a6800023b23bebb2dd9d40..170ba7c8544264a54b304d38c0739d402633bc3c 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_01_rtl_left_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span style="direction: rtl">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span style="direction: rtl">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span style="direction: rtl">ipsum dolor sit</span> amet</div>',
   `${behavior} 1-5 rtl left word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 1-11 rtl left word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 1-17 rtl left word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: rtl">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 1-21 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_ltr_forward_word.html
index 2cefe25ef679db4e2f45e1993f935b4cb07645ef..835a1cf2b04eaf95d4b59cbfc21ee092c64268cf 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_ltr_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span dir="rtl">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span dir="rtl">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span dir="rtl">ipsum dolor sit</span> amet</div>',
   `${behavior} 2-5 ltr forward word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 2-11 ltr forward word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 2-17 ltr forward word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 2-21 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_ltr_right_word.html
index 758b1a85951bc129b7ef6beaaa578935400d9935..32cbd12eed248ebde0c3c821d0b7ef65c199fb4e 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_ltr_right_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span dir="rtl">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span dir="rtl">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span dir="rtl">ipsum dolor sit</span> amet</div>',
   `${behavior} 2-5 ltr right word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 2-11 ltr right word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 2-17 ltr right word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span dir="rtl">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 2-21 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_rtl_forward_word.html
index 19a6a2f5ebf23f1ea29b6ccc379ee4fa41ffc3fb..9fc814daf2e11276fa9a09c8650677460bf4ea05 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_rtl_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span dir="rtl">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span dir="rtl">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span dir="rtl">ipsum dolor sit</span> amet</div>',
   `${behavior} 2-5 rtl forward word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 2-11 rtl forward word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 2-17 rtl forward word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 2-21 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_rtl_left_word.html
index 0eed673b2e2cd591f4501e2938320e2c1af33226..6928dfd7c4eb65b6b363c1b80c38a78538cc3030 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_02_rtl_left_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span dir="rtl">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span dir="rtl">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span dir="rtl">ipsum dolor sit</span> amet</div>',
   `${behavior} 2-5 rtl left word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 2-11 rtl left word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 2-17 rtl left word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span dir="rtl">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 2-21 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_ltr_forward_word.html
index 10b34f9925d53c5a74dcbd2f053d38f4d247f91b..77ce0e6dbcfd490b0befbc1adce9903d4324d829 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_ltr_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span style="direction: ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span style="direction: ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span style="direction: ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 3-5 ltr forward word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 3-11 ltr forward word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 3-17 ltr forward word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 3-21 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_ltr_right_word.html
index 3c062297107ec11ad5cf3c994a33b7f66379504e..5a53b1d20c56a66c519e20a12aecfb492769d9ec 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_ltr_right_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span style="direction: ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span style="direction: ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span style="direction: ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 3-5 ltr right word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 3-11 ltr right word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 3-17 ltr right word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 3-21 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_rtl_forward_word.html
index b629952c4eb8418473249db4bac89394fc0da613..bdc4205e56a0aac5bb1c325554b5c2c45d632e5e 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_rtl_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span style="direction: ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span style="direction: ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span style="direction: ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 3-5 rtl forward word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 3-11 rtl forward word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 3-17 rtl forward word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 3-21 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_rtl_left_word.html
index 07e1224c1bcb086c8b540af177aff7046aba71bc..32f28b2f12715b1d29a3f7c89a0579571a3142a0 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_03_rtl_left_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span style="direction: ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span style="direction: ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span style="direction: ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 3-5 rtl left word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 3-11 rtl left word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 3-17 rtl left word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 3-21 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_ltr_forward_word.html
index 79714f3ab8b2b1f47ec9cd02f55775750b87e200..99b654a5009088e9a3088657f178b7f2178aa3cd 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_ltr_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span dir="ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span dir="ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span dir="ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 4-5 ltr forward word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 4-11 ltr forward word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 4-17 ltr forward word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 4-21 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_ltr_right_word.html
index e4bbb80dcf2be5fa522b32d6667babd21ed12bda..5afa2449242ca096a0f0b35736950379fb75c698 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_ltr_right_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span dir="ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span dir="ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span dir="ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 4-5 ltr right word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 4-11 ltr right word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 4-17 ltr right word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 4-21 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_rtl_forward_word.html
index a2976d4dfcc0657628a873d42dd57be373844680..27746844f6beae9218cd0ba50b125ce0b47a6ddd 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_rtl_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span dir="ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span dir="ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span dir="ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 4-5 rtl forward word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 4-11 rtl forward word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 4-17 rtl forward word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 4-21 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_rtl_left_word.html
index 9aac83ace4892cc1b1fbfff26e9b55acc3f7f4aa..293e226e0fe72e5240a1cf28542da981d6b8b3da 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_04_rtl_left_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span dir="ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span dir="ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span dir="ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 4-5 rtl left word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 4-11 rtl left word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 4-17 rtl left word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 4-21 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_ltr_forward_word.html
index 853b337aa6148a9bd3e712e42a7c870dfb8dab4d..d70990b930d8250310b51b695f1bc2ed21bdd134 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_ltr_forward_word.html
@@ -94,7 +94,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum^ dolor| sit</div> amett</div>'
-      : '<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum^ dolor |sit</div> amett</div>',
+      : '<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum^ |dolor sit</div> amett</div>',
   `${behavior} 5-11 ltr forward word`);
 
 selection_test(
@@ -140,7 +140,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <div  dir="rtl">ipsum dolor| sit</div> amett</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor^ sit|</div> amett</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor^ sit|</div> amett</div>'
+      : '<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor^ |sit</div> amett</div>',
   `${behavior} 5-17 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_ltr_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_ltr_left_word.html
index d9431e904f32a83741ef62616c7e0ae3ab4b7907..2d9b2829382b01dc01a0e63b1079b083ccd5360a 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_ltr_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_ltr_left_word.html
@@ -92,7 +92,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum^ dolor| sit</div> amett</div>'
-      : '<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum^ dolor |sit</div> amett</div>',
+      : '<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum^ |dolor sit</div> amett</div>',
   `${behavior} 5-11 ltr left word`);
 
 selection_test(
@@ -138,7 +138,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <div  dir="rtl">ipsum dolor| sit</div> amett</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor^ sit|</div> amett</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor^ sit|</div> amett</div>'
+      : '<div contenteditable dir="ltr">Lorem <div dir="rtl">ipsum dolor^ |sit</div> amett</div>',
   `${behavior} 5-17 ltr left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_rtl_forward_word.html
index a0cbc5fefe22f2f2b1c8b4ee0e0f8e656eeffd27..0ae39a66a25aac3c8d248bba0efa6e3cc342333e 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_rtl_forward_word.html
@@ -94,7 +94,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum^ dolor| sit</div> amett</div>'
-      : '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum^ dolor |sit</div> amett</div>',
+      : '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum^ |dolor sit</div> amett</div>',
   `${behavior} 5-11 rtl forward word`);
 
 selection_test(
@@ -140,7 +140,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <div  dir="rtl">ipsum dolor| sit</div> amett</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum dolor^ sit|</div> amett</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum dolor^ sit|</div> amett</div>'
+      : '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum dolor^ |sit</div> amett</div>',
   `${behavior} 5-17 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_rtl_left_word.html
index 03813ade140066f4b11c5e16e19ef70c652ffaea..e1ea22e459ea364c741b5b098fdaabdf8f533299 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_05_rtl_left_word.html
@@ -94,7 +94,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum^ dolor| sit</div> amett</div>'
-      : '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum^ dolor |sit</div> amett</div>',
+      : '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum^ |dolor sit</div> amett</div>',
   `${behavior} 5-11 rtl left word`);
 
 selection_test(
@@ -140,7 +140,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <div  dir="rtl">ipsum dolor| sit</div> amett</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum dolor^ sit|</div> amett</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum dolor^ sit|</div> amett</div>'
+      : '<div contenteditable dir="rtl">Lorem <div dir="rtl">ipsum dolor^ |sit</div> amett</div>',
   `${behavior} 5-17 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_ltr_forward_word.html
index e6c53a09538e0760656ece3065d7494a68bbd376..086550a251f607d812204db9cda9efe8c1acb2a9 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_ltr_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span style="direction: ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span style="direction: ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span style="direction: ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 6-5 ltr forward word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 6-11 ltr forward word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 6-17 ltr forward word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 6-21 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_ltr_right_word.html
index e2c11301bda867aabcb32016902cdd27e42f225f..a81fdb9b76950004f02c7b41290bf3319f680da1 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_ltr_right_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span style="direction: ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span style="direction: ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span style="direction: ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 6-5 ltr right word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 6-11 ltr right word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 6-17 ltr right word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 6-21 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_rtl_forward_word.html
index 244de92e7688b8b2ee891a13c35e113b71886bab..0009bb23a6fe86d17594ec0938ce69166f412350 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_rtl_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span style="direction: ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span style="direction: ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span style="direction: ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 6-5 rtl forward word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 6-11 rtl forward word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 6-17 rtl forward word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 6-21 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_rtl_left_word.html
index 94c370105cd7a0e79e357619b1d824750a0c9850..f62a6d034767741e8a14cefc2235cb3e1c57c7fb 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_06_rtl_left_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span style="direction: ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span style="direction: ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span style="direction: ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 6-5 rtl left word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 6-11 rtl left word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 6-17 rtl left word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 6-21 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_ltr_forward_word.html
index 730d6c726432cb72e7333f8483456ad85e3b9d44..1df593e42671882b94c9f0d6c6585666b3c5714b 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_ltr_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span style="direction: ltr">ipsum| dolor<div> just a test</div> sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span style="direction: ltr">ipsum |dolor<div> just a test</div> sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span> amet</div>',
   `${behavior} 7-5 ltr forward word`);
 
 selection_test(
@@ -102,7 +102,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum| dolor<div > just a test</div> sit</span> amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ dolor|<div> just a test</div> sit</span> amet</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ dolor|<div> just a test</div> sit</span> amet</div>'
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ |dolor<div> just a test</div> sit</span> amet</div>',
   `${behavior} 7-11 ltr forward word`);
 
 selection_test(
@@ -180,7 +182,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just^ a| test</div> sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just^ a |test</div> sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just^ |a test</div> sit</span> amet</div>',
   `${behavior} 7-22 ltr forward word`);
 
 selection_test(
@@ -194,7 +196,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div > just a| test</div> sit</span> amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just a^ test|</div> sit</span> amet</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just a^ test|</div> sit</span> amet</div>'
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just a^ |test</div> sit</span> amet</div>',
   `${behavior} 7-24 ltr forward word`);
 
 selection_test(
@@ -256,7 +260,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div > just a test</div> sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span>^ |amet</div>',
   `${behavior} 7-33 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_ltr_right_word.html
index 5f4b14c0715d72eba847bbf18bab3d5f3d4fc746..1f492a6607660df64d69a17d90478c7f15286327 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_ltr_right_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span style="direction: ltr">ipsum| dolor<div> just a test</div> sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span style="direction: ltr">ipsum |dolor<div> just a test</div> sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span> amet</div>',
   `${behavior} 7-5 ltr right word`);
 
 selection_test(
@@ -102,7 +102,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum| dolor<div > just a test</div> sit</span> amet</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ dolor|<div> just a test</div> sit</span> amet</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ dolor|<div> just a test</div> sit</span> amet</div>'
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum^ |dolor<div> just a test</div> sit</span> amet</div>',
   `${behavior} 7-11 ltr right word`);
 
 selection_test(
@@ -180,7 +182,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just^ a| test</div> sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just^ a |test</div> sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just^ |a test</div> sit</span> amet</div>',
   `${behavior} 7-22 ltr right word`);
 
 selection_test(
@@ -194,7 +196,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div > just a| test</div> sit</span> amet</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just a^ test|</div> sit</span> amet</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just a^ test|</div> sit</span> amet</div>'
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just a^ |test</div> sit</span> amet</div>',
   `${behavior} 7-24 ltr right word`);
 
 selection_test(
@@ -256,7 +260,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div > just a test</div> sit</span>| amet</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span>^ |amet</div>',
   `${behavior} 7-33 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_rtl_forward_word.html
index 725ae1642bc9deb04078b9d454201f30af8ec3af..1ea1c5fd8e3da9fe70e5268ac81f560d8f67b1a9 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_rtl_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span style="direction: ltr">ipsum| dolor<div> just a test</div> sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span style="direction: ltr">ipsum |dolor<div> just a test</div> sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span> amet</div>',
   `${behavior} 7-5 rtl forward word`);
 
 selection_test(
@@ -102,7 +102,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum| dolor<div > just a test</div> sit</span> amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ dolor|<div> just a test</div> sit</span> amet</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ dolor|<div> just a test</div> sit</span> amet</div>'
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ |dolor<div> just a test</div> sit</span> amet</div>',
   `${behavior} 7-11 rtl forward word`);
 
 selection_test(
@@ -180,7 +182,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just^ a| test</div> sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just^ a |test</div> sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just^ |a test</div> sit</span> amet</div>',
   `${behavior} 7-22 rtl forward word`);
 
 selection_test(
@@ -194,7 +196,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div > just a| test</div> sit</span> amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just a^ test|</div> sit</span> amet</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just a^ test|</div> sit</span> amet</div>'
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just a^ |test</div> sit</span> amet</div>',
   `${behavior} 7-24 rtl forward word`);
 
 selection_test(
@@ -256,7 +260,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div > just a test</div> sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span>^ |amet</div>',
   `${behavior} 7-33 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_rtl_left_word.html
index 09acd3234ad5e6065ecff9a0132a424d0ff16323..7846fce3ee35cfa8971d7b181dbbae8b45025ba9 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_rtl_left_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span style="direction: ltr">ipsum| dolor<div> just a test</div> sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span style="direction: ltr">ipsum |dolor<div> just a test</div> sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span> amet</div>',
   `${behavior} 7-5 rtl left word`);
 
 selection_test(
@@ -102,7 +102,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum| dolor<div > just a test</div> sit</span> amet</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ dolor|<div> just a test</div> sit</span> amet</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ dolor|<div> just a test</div> sit</span> amet</div>'
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum^ |dolor<div> just a test</div> sit</span> amet</div>',
   `${behavior} 7-11 rtl left word`);
 
 selection_test(
@@ -242,7 +244,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div > just a test</div> sit</span>| amet</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just a test</div> sit</span>^ |amet</div>',
   `${behavior} 7-33 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_rtl_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_rtl_right_word.html
index b18a966c0d1ed7fe73346b292c6ab7d9e3689177..c01d752624ce9a69f5439f95947b273923f79a00 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_rtl_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_07_rtl_right_word.html
@@ -158,7 +158,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just^ a| test</div> sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just^ a |test</div> sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just^ |a test</div> sit</span> amet</div>',
   `${behavior} 7-22 rtl right word`);
 
 selection_test(
@@ -172,7 +172,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div > just a| test</div> sit</span> amet</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just a^ test|</div> sit</span> amet</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just a^ test|</div> sit</span> amet</div>'
+      : '<div contenteditable dir="rtl">Lorem <span style="direction: ltr">ipsum dolor<div> just a^ |test</div> sit</span> amet</div>',
   `${behavior} 7-24 rtl right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_ltr_forward_word.html
index 82d8da8c43474cab6bf90d4a0839965c7043d0c2..b5010a07be8a6b7580a30ffebb94b7ab2a48e03b 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_ltr_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span dir="ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span dir="ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span dir="ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 8-5 ltr forward word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 8-11 ltr forward word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 8-17 ltr forward word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 8-21 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_ltr_right_word.html
index fb05b219dde760bd36455d8d93cff60557ea7950..b1e53cea68f107189187492a9b2fb45ade1cfb83 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_ltr_right_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem^ <span dir="ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem^ <span dir="ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem^ |<span dir="ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 8-5 ltr right word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 8-11 ltr right word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 8-17 ltr right word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="ltr">Lorem <span dir="ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 8-21 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_rtl_forward_word.html
index c3f072c53f5aa256a091a5f42af3b4cb7f41b858..512ef4179af38dd6873e530ce0f8ac38e484d938 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_rtl_forward_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span dir="ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span dir="ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span dir="ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 8-5 rtl forward word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 8-11 rtl forward word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 8-17 rtl forward word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 8-21 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_rtl_left_word.html
index 2c1103773dc72d5346cf8318fccb1674b1ae44c6..542507e193512d704690a2e2569dfa83196889fc 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_08_rtl_left_word.html
@@ -56,7 +56,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem^ <span dir="ltr">ipsum| dolor sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem^ <span dir="ltr">ipsum |dolor sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem^ |<span dir="ltr">ipsum dolor sit</span> amet</div>',
   `${behavior} 8-5 rtl left word`);
 
 selection_test(
@@ -104,7 +104,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum^ dolor| sit</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum^ dolor |sit</span> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum^ |dolor sit</span> amet</div>',
   `${behavior} 8-11 rtl left word`);
 
 selection_test(
@@ -152,7 +152,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor^ sit|</span> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor^ sit</span> |amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor^ |sit</span> amet</div>',
   `${behavior} 8-17 rtl left word`);
 
 selection_test(
@@ -182,7 +182,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>| amet</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>^ amet|</div>'
+      : '<div contenteditable dir="rtl">Lorem <span dir="ltr">ipsum dolor sit</span>^ |amet</div>',
   `${behavior} 8-21 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_ltr_forward_word.html
index f090170c87e3ec688de52b7287f6c1a1fabfacbc..a5dab17cbd9e516d954b68842363ac90ed8172f8 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_ltr_forward_word.html
@@ -94,7 +94,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <div dir="ltr">ipsum^ dolor| sit</div> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <div dir="ltr">ipsum^ dolor |sit</div> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <div dir="ltr">ipsum^ |dolor sit</div> amet</div>',
   `${behavior} 9-11 ltr forward word`);
 
 selection_test(
@@ -140,7 +140,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <div  dir="ltr">ipsum dolor| sit</div> amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">Lorem <div dir="ltr">ipsum dolor^ sit|</div> amet</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <div dir="ltr">ipsum dolor^ sit|</div> amet</div>'
+      : '<div contenteditable dir="ltr">Lorem <div dir="ltr">ipsum dolor^ |sit</div> amet</div>',
   `${behavior} 9-17 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_ltr_right_word.html
index 00c843081334d20ec7f18708ad14639b2120afdc..1d1acbf188a3bd886b67335b8bf0e23e3de4a2ca 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_ltr_right_word.html
@@ -94,7 +94,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">Lorem <div dir="ltr">ipsum^ dolor| sit</div> amet</div>'
-      : '<div contenteditable dir="ltr">Lorem <div dir="ltr">ipsum^ dolor |sit</div> amet</div>',
+      : '<div contenteditable dir="ltr">Lorem <div dir="ltr">ipsum^ |dolor sit</div> amet</div>',
   `${behavior} 9-11 ltr right word`);
 
 selection_test(
@@ -140,7 +140,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">Lorem <div  dir="ltr">ipsum dolor| sit</div> amet</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">Lorem <div dir="ltr">ipsum dolor^ sit|</div> amet</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">Lorem <div dir="ltr">ipsum dolor^ sit|</div> amet</div>'
+      : '<div contenteditable dir="ltr">Lorem <div dir="ltr">ipsum dolor^ |sit</div> amet</div>',
   `${behavior} 9-17 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_rtl_forward_word.html
index 8640f56d4ad074bd59e3a99344ae756f0106efd6..d2841208cae27b46ea721dffd335facc132b929d 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_rtl_forward_word.html
@@ -94,7 +94,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <div dir="ltr">ipsum^ dolor| sit</div> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <div dir="ltr">ipsum^ dolor |sit</div> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <div dir="ltr">ipsum^ |dolor sit</div> amet</div>',
   `${behavior} 9-11 rtl forward word`);
 
 selection_test(
@@ -140,7 +140,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <div  dir="ltr">ipsum dolor| sit</div> amet</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">Lorem <div dir="ltr">ipsum dolor^ sit|</div> amet</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <div dir="ltr">ipsum dolor^ sit|</div> amet</div>'
+      : '<div contenteditable dir="rtl">Lorem <div dir="ltr">ipsum dolor^ |sit</div> amet</div>',
   `${behavior} 9-17 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_rtl_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_rtl_right_word.html
index b8961c8868f8301b8dec3504cdb61a082365d48a..5484cdf0889d0f8a711c0f54f70db222033696b5 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_rtl_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_09_rtl_right_word.html
@@ -92,7 +92,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">Lorem <div dir="ltr">ipsum^ dolor| sit</div> amet</div>'
-      : '<div contenteditable dir="rtl">Lorem <div dir="ltr">ipsum^ dolor |sit</div> amet</div>',
+      : '<div contenteditable dir="rtl">Lorem <div dir="ltr">ipsum^ |dolor sit</div> amet</div>',
   `${behavior} 9-11 rtl right word`);
 
 selection_test(
@@ -138,7 +138,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">Lorem <div  dir="ltr">ipsum dolor| sit</div> amet</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="rtl">Lorem <div dir="ltr">ipsum dolor^ sit|</div> amet</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">Lorem <div dir="ltr">ipsum dolor^ sit|</div> amet</div>'
+      : '<div contenteditable dir="rtl">Lorem <div dir="ltr">ipsum dolor^ |sit</div> amet</div>',
   `${behavior} 9-17 rtl right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_ltr_forward_word.html
index 3dbad1bc3a4e8ce0f5cf673fe6c2914b1d61cddd..70c233b4a3fcd4ca48e2d9a97aaec4e3c0f5c44d 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_ltr_forward_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\nabc^ \u05D0\u05D1\u05D2| xyz\n</div>'
-      : '<div contenteditable dir="ltr">\nabc^ \u05D0\u05D1\u05D2 |xyz\n</div>',
+      : '<div contenteditable dir="ltr">\nabc^ |\u05D0\u05D1\u05D2 xyz\n</div>',
   `${behavior} 10-4 ltr forward word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\nabc \u05D0\u05D1\u05D2| xyz\n</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">\nabc \u05D0\u05D1\u05D2^ xyz|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\nabc \u05D0\u05D1\u05D2^ xyz|\n</div>'
+      : '<div contenteditable dir="ltr">\nabc \u05D0\u05D1\u05D2^ |xyz\n</div>',
   `${behavior} 10-8 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_ltr_right_word.html
index 85d27eba83643c3e5ba488c7a1a5d6304cbd67a3..ee99c2e5fc293595f17c83daba0d595e2d76ac5e 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_ltr_right_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\nabc^ \u05D0\u05D1\u05D2| xyz\n</div>'
-      : '<div contenteditable dir="ltr">\nabc^ \u05D0\u05D1\u05D2 |xyz\n</div>',
+      : '<div contenteditable dir="ltr">\nabc^ |\u05D0\u05D1\u05D2 xyz\n</div>',
   `${behavior} 10-4 ltr right word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\nabc \u05D0\u05D1\u05D2| xyz\n</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">\nabc \u05D0\u05D1\u05D2^ xyz|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\nabc \u05D0\u05D1\u05D2^ xyz|\n</div>'
+      : '<div contenteditable dir="ltr">\nabc \u05D0\u05D1\u05D2^ |xyz\n</div>',
   `${behavior} 10-8 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_rtl_forward_word.html
index 049bbba7e79163343786b47a712eaa9f9d89bf5d..33c56c70634501751f0a0d00f4f82b369b289da8 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_rtl_forward_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\nabc^ \u05D0\u05D1\u05D2| xyz\n</div>'
-      : '<div contenteditable dir="rtl">\nabc^ \u05D0\u05D1\u05D2 |xyz\n</div>',
+      : '<div contenteditable dir="rtl">\nabc^ |\u05D0\u05D1\u05D2 xyz\n</div>',
   `${behavior} 10-4 rtl forward word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\nabc \u05D0\u05D1\u05D2| xyz\n</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">\nabc \u05D0\u05D1\u05D2^ xyz|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\nabc \u05D0\u05D1\u05D2^ xyz|\n</div>'
+      : '<div contenteditable dir="rtl">\nabc \u05D0\u05D1\u05D2^ |xyz\n</div>',
   `${behavior} 10-8 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_rtl_left_word.html
index 78562ac08a1f53d3a129a0e7716f1475039aaccf..f2d8b4f19f70935bf3d048225f30e8968814608c 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_10_rtl_left_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\nabc^ \u05D0\u05D1\u05D2| xyz\n</div>'
-      : '<div contenteditable dir="rtl">\nabc^ \u05D0\u05D1\u05D2 |xyz\n</div>',
+      : '<div contenteditable dir="rtl">\nabc^ |\u05D0\u05D1\u05D2 xyz\n</div>',
   `${behavior} 10-4 rtl left word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\nabc \u05D0\u05D1\u05D2| xyz\n</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">\nabc \u05D0\u05D1\u05D2^ xyz|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\nabc \u05D0\u05D1\u05D2^ xyz|\n</div>'
+      : '<div contenteditable dir="rtl">\nabc \u05D0\u05D1\u05D2^ |xyz\n</div>',
   `${behavior} 10-8 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_ltr_forward_word.html
index 0c8250a234dad58a143b89eca7b2d6e0821430f5..e9d97e83906bdc962bc522cd0c0a080792905bfa 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_ltr_forward_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2^ xyz| \u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>'
-      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2^ xyz |\u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>',
+      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2^ |xyz \u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-4 ltr forward word`);
 
 selection_test(
@@ -80,7 +80,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz^ \u05D3\u05D4\u05D5| def \u05D6\u05D7\u05D8\n</div>'
-      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz^ \u05D3\u05D4\u05D5 |def \u05D6\u05D7\u05D8\n</div>',
+      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz^ |\u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-8 ltr forward word`);
 
 selection_test(
@@ -112,7 +112,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5^ def| \u05D6\u05D7\u05D8\n</div>'
-      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5^ def |\u05D6\u05D7\u05D8\n</div>',
+      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5^ |def \u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-12 ltr forward word`);
 
 selection_test(
@@ -142,7 +142,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def| \u05D6\u05D7\u05D8\n</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def^ \u05D6\u05D7\u05D8|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def^ \u05D6\u05D7\u05D8|\n</div>'
+      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def^ |\u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-16 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_ltr_right_word.html
index 01e30336a858c8d9c80e3fbe73eb2a15644d357e..73622c35ccb52bdf57d009d402a9edaea6c403e1 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_ltr_right_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2^ xyz| \u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>'
-      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2^ xyz |\u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>',
+      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2^ |xyz \u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-4 ltr right word`);
 
 selection_test(
@@ -80,7 +80,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz^ \u05D3\u05D4\u05D5| def \u05D6\u05D7\u05D8\n</div>'
-      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz^ \u05D3\u05D4\u05D5 |def \u05D6\u05D7\u05D8\n</div>',
+      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz^ |\u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-8 ltr right word`);
 
 selection_test(
@@ -112,7 +112,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5^ def| \u05D6\u05D7\u05D8\n</div>'
-      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5^ def |\u05D6\u05D7\u05D8\n</div>',
+      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5^ |def \u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-12 ltr right word`);
 
 selection_test(
@@ -142,7 +142,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def| \u05D6\u05D7\u05D8\n</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def^ \u05D6\u05D7\u05D8|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def^ \u05D6\u05D7\u05D8|\n</div>'
+      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def^ |\u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-16 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_rtl_forward_word.html
index e04c15728aedf3cb2dade30195cb8c4fa5cd6f79..da49d81d476ffd75091d2e4069970831cad3127a 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_rtl_forward_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2^ xyz| \u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>'
-      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2^ xyz |\u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>',
+      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2^ |xyz \u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-4 rtl forward word`);
 
 selection_test(
@@ -80,7 +80,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz^ \u05D3\u05D4\u05D5| def \u05D6\u05D7\u05D8\n</div>'
-      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz^ \u05D3\u05D4\u05D5 |def \u05D6\u05D7\u05D8\n</div>',
+      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz^ |\u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-8 rtl forward word`);
 
 selection_test(
@@ -112,7 +112,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5^ def| \u05D6\u05D7\u05D8\n</div>'
-      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5^ def |\u05D6\u05D7\u05D8\n</div>',
+      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5^ |def \u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-12 rtl forward word`);
 
 selection_test(
@@ -142,7 +142,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def| \u05D6\u05D7\u05D8\n</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def^ \u05D6\u05D7\u05D8|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def^ \u05D6\u05D7\u05D8|\n</div>'
+      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def^ |\u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-16 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_rtl_left_word.html
index 3de04727aa8ec98979fde73d7fd7d69b7e5ab193..922026b1852f6beb7893bf8fcd02aa084bc31535 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_11_rtl_left_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2^ xyz| \u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>'
-      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2^ xyz |\u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>',
+      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2^ |xyz \u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-4 rtl left word`);
 
 selection_test(
@@ -80,7 +80,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz^ \u05D3\u05D4\u05D5| def \u05D6\u05D7\u05D8\n</div>'
-      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz^ \u05D3\u05D4\u05D5 |def \u05D6\u05D7\u05D8\n</div>',
+      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz^ |\u05D3\u05D4\u05D5 def \u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-8 rtl left word`);
 
 selection_test(
@@ -112,7 +112,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5^ def| \u05D6\u05D7\u05D8\n</div>'
-      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5^ def |\u05D6\u05D7\u05D8\n</div>',
+      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5^ |def \u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-12 rtl left word`);
 
 selection_test(
@@ -142,7 +142,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def| \u05D6\u05D7\u05D8\n</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def^ \u05D6\u05D7\u05D8|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def^ \u05D6\u05D7\u05D8|\n</div>'
+      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 xyz \u05D3\u05D4\u05D5 def^ |\u05D6\u05D7\u05D8\n</div>',
   `${behavior} 11-16 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_ltr_forward_word.html
index 93a2e939303ef4b6e208c9c55b1f6b1daa22746d..5f1c2fa94a6694e83c70684e5ce0fca5141a2eb3 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_ltr_forward_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\n</div>'
-      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\n</div>',
+      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\n</div>',
   `${behavior} 12-4 ltr forward word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\n</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|\n</div>'
+      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\n</div>',
   `${behavior} 12-8 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_ltr_right_word.html
index 5d6071c58228daa30d52167f2486c44e1db0f78c..06a67a4227636544fb39afaf168ec30e6937c121 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_ltr_right_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\n</div>'
-      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\n</div>',
+      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\n</div>',
   `${behavior} 12-4 ltr right word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\n</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|\n</div>'
+      : '<div contenteditable dir="ltr">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\n</div>',
   `${behavior} 12-8 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_rtl_forward_word.html
index 1d049593882e1d78c261135cb3da545449af83cc..7befce71ac7bf5705ca24e5d286b29088c966430 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_rtl_forward_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\n</div>'
-      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\n</div>',
+      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\n</div>',
   `${behavior} 12-4 rtl forward word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\n</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|\n</div>'
+      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\n</div>',
   `${behavior} 12-8 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_rtl_left_word.html
index 54baf821e48f2781b70832787b86ab8ad8d93d67..b97074f2540bb711afa67b5c02149f096caf23af 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_12_rtl_left_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\n</div>'
-      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\n</div>',
+      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\n</div>',
   `${behavior} 12-4 rtl left word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\n</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|\n</div>'
+      : '<div contenteditable dir="rtl">\n\u05D0\u05D1\u05D2 \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\n</div>',
   `${behavior} 12-8 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_ltr_forward_word.html
index fc056dd9fbe4ee07a7bd6c257d2cfaf90c70c26e..2cddaf02007abd5721285d87ddd46e0d0c4df509 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_ltr_forward_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\nabc^ efd| dabeb\n</div>'
-      : '<div contenteditable dir="ltr">\nabc^ efd |dabeb\n</div>',
+      : '<div contenteditable dir="ltr">\nabc^ |efd dabeb\n</div>',
   `${behavior} 13-4 ltr forward word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\nabc efd| dabeb\n</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">\nabc efd^ dabeb|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\nabc efd^ dabeb|\n</div>'
+      : '<div contenteditable dir="ltr">\nabc efd^ |dabeb\n</div>',
   `${behavior} 13-8 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_ltr_right_word.html
index 1897377e525d1caf49d139d3b6e458b68354d6eb..423a8ca3e089217d8d929f54809caab4beeb5752 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_ltr_right_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\nabc^ efd| dabeb\n</div>'
-      : '<div contenteditable dir="ltr">\nabc^ efd |dabeb\n</div>',
+      : '<div contenteditable dir="ltr">\nabc^ |efd dabeb\n</div>',
   `${behavior} 13-4 ltr right word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\nabc efd| dabeb\n</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">\nabc efd^ dabeb|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\nabc efd^ dabeb|\n</div>'
+      : '<div contenteditable dir="ltr">\nabc efd^ |dabeb\n</div>',
   `${behavior} 13-8 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_rtl_forward_word.html
index 1713f7a514fcdaf88fb6360f8f0e912538fe4829..b742674b4e23205f50f9d93844198fb13af2eb56 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_rtl_forward_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\nabc^ efd| dabeb\n</div>'
-      : '<div contenteditable dir="rtl">\nabc^ efd |dabeb\n</div>',
+      : '<div contenteditable dir="rtl">\nabc^ |efd dabeb\n</div>',
   `${behavior} 13-4 rtl forward word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\nabc efd| dabeb\n</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">\nabc efd^ dabeb|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\nabc efd^ dabeb|\n</div>'
+      : '<div contenteditable dir="rtl">\nabc efd^ |dabeb\n</div>',
   `${behavior} 13-8 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_rtl_left_word.html
index 7988e68d72fbb59a07f27bc7fc4f7c19d4b0f71c..a5d78ba95e408d4e174a536df0278006d9c42692 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_13_rtl_left_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\nabc^ efd| dabeb\n</div>'
-      : '<div contenteditable dir="rtl">\nabc^ efd |dabeb\n</div>',
+      : '<div contenteditable dir="rtl">\nabc^ |efd dabeb\n</div>',
   `${behavior} 13-4 rtl left word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\nabc efd| dabeb\n</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">\nabc efd^ dabeb|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\nabc efd^ dabeb|\n</div>'
+      : '<div contenteditable dir="rtl">\nabc efd^ |dabeb\n</div>',
   `${behavior} 13-8 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_ltr_forward_word.html
index 8edccdde942a78a81169623312d221adc0f2f418..5ff92ec5df18d22f6a3fcb164ffb19ee8f636fa7 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_ltr_forward_word.html
@@ -64,7 +64,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n Just^\n <span>testing| \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>'
-      : '<div contenteditable dir="ltr">\n Just^\n <span>testing |\u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
+      : '<div contenteditable dir="ltr">\n Just^\n| <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
   `${behavior} 14-6 ltr forward word`);
 
 selection_test(
@@ -136,7 +136,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n Just\n <span>testing^ \u05E8\u05E7|</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>'
-      : '<div contenteditable dir="ltr">\n Just\n <span>testing^ \u05E8\u05E7</span>\n| \u05D1\u05D5\u05D3\u05E7\n</div>',
+      : '<div contenteditable dir="ltr">\n Just\n <span>testing^ |\u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
   `${behavior} 14-15 ltr forward word`);
 
 selection_test(
@@ -158,7 +158,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\n Just\n <span>testing \u05E8\u05E7</span>|\n \u05D1\u05D5\u05D3\u05E7\n</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">\n Just\n <span>testing \u05E8\u05E7</span>^\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\n Just\n <span>testing \u05E8\u05E7</span>^\n \u05D1\u05D5\u05D3\u05E7|\n</div>'
+      : '<div contenteditable dir="ltr">\n Just\n <span>testing \u05E8\u05E7</span>^\n| \u05D1\u05D5\u05D3\u05E7\n</div>',
   `${behavior} 14-18 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_ltr_right_word.html
index 9cef6d36ca614e155ca991c9edc76ac9b1f88d67..fc99f9003e3caf01cf4e7d7ac0caec3446ef0b0a 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_ltr_right_word.html
@@ -64,7 +64,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n Just^\n <span>testing| \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>'
-      : '<div contenteditable dir="ltr">\n Just^\n <span>testing |\u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
+      : '<div contenteditable dir="ltr">\n Just^\n| <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
   `${behavior} 14-6 ltr right word`);
 
 selection_test(
@@ -136,7 +136,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n Just\n <span>testing^ \u05E8\u05E7|</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>'
-      : '<div contenteditable dir="ltr">\n Just\n <span>testing^ \u05E8\u05E7</span>\n| \u05D1\u05D5\u05D3\u05E7\n</div>',
+      : '<div contenteditable dir="ltr">\n Just\n <span>testing^ |\u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
   `${behavior} 14-15 ltr right word`);
 
 selection_test(
@@ -158,7 +158,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\n Just\n <span>testing \u05E8\u05E7</span>|\n \u05D1\u05D5\u05D3\u05E7\n</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">\n Just\n <span>testing \u05E8\u05E7</span>^\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\n Just\n <span>testing \u05E8\u05E7</span>^\n \u05D1\u05D5\u05D3\u05E7|\n</div>'
+      : '<div contenteditable dir="ltr">\n Just\n <span>testing \u05E8\u05E7</span>^\n| \u05D1\u05D5\u05D3\u05E7\n</div>',
   `${behavior} 14-18 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_rtl_forward_word.html
index fd05c33587607f5c9c1bc7ea6bb8283c36a096ef..b1f9903bb87b83970e2a76619b2969feff035a24 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_rtl_forward_word.html
@@ -64,7 +64,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n Just^\n <span>testing| \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>'
-      : '<div contenteditable dir="rtl">\n Just^\n <span>testing |\u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
+      : '<div contenteditable dir="rtl">\n Just^\n| <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
   `${behavior} 14-6 rtl forward word`);
 
 selection_test(
@@ -136,7 +136,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n Just\n <span>testing^ \u05E8\u05E7|</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>'
-      : '<div contenteditable dir="rtl">\n Just\n <span>testing^ \u05E8\u05E7</span>\n| \u05D1\u05D5\u05D3\u05E7\n</div>',
+      : '<div contenteditable dir="rtl">\n Just\n <span>testing^ |\u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
   `${behavior} 14-15 rtl forward word`);
 
 selection_test(
@@ -158,7 +158,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>|\n \u05D1\u05D5\u05D3\u05E7\n</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>^\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>^\n \u05D1\u05D5\u05D3\u05E7|\n</div>'
+      : '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>^\n| \u05D1\u05D5\u05D3\u05E7\n</div>',
   `${behavior} 14-18 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_rtl_left_word.html
index fd0ac3fcad4e9104eb4baebc16806e207eeb74d1..44d52b4b2d8389312d4e5e437bcf9e46a7072910 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_14_rtl_left_word.html
@@ -64,7 +64,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n Just^\n <span>testing| \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>'
-      : '<div contenteditable dir="rtl">\n Just^\n <span>testing |\u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
+      : '<div contenteditable dir="rtl">\n Just^\n| <span>testing \u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
   `${behavior} 14-6 rtl left word`);
 
 selection_test(
@@ -136,7 +136,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n Just\n <span>testing^ \u05E8\u05E7|</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>'
-      : '<div contenteditable dir="rtl">\n Just\n <span>testing^ \u05E8\u05E7</span>\n| \u05D1\u05D5\u05D3\u05E7\n</div>',
+      : '<div contenteditable dir="rtl">\n Just\n <span>testing^ |\u05E8\u05E7</span>\n \u05D1\u05D5\u05D3\u05E7\n</div>',
   `${behavior} 14-15 rtl left word`);
 
 selection_test(
@@ -158,7 +158,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>|\n \u05D1\u05D5\u05D3\u05E7\n</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>^\n \u05D1\u05D5\u05D3\u05E7|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>^\n \u05D1\u05D5\u05D3\u05E7|\n</div>'
+      : '<div contenteditable dir="rtl">\n Just\n <span>testing \u05E8\u05E7</span>^\n| \u05D1\u05D5\u05D3\u05E7\n</div>',
   `${behavior} 14-18 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_ltr_forward_word.html
index 765ee5dcec8eee37fc3fe1904ae0d1e939b6a6f8..b1c45467e0cd1c6e3f55462b89ddea6dc856c9df 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_ltr_forward_word.html
@@ -64,7 +64,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n Just^\n <span>testing| what</span>\n ever\n</div>'
-      : '<div contenteditable dir="ltr">\n Just^\n <span>testing |what</span>\n ever\n</div>',
+      : '<div contenteditable dir="ltr">\n Just^\n| <span>testing what</span>\n ever\n</div>',
   `${behavior} 15-6 ltr forward word`);
 
 selection_test(
@@ -136,7 +136,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n Just\n <span>testing^ what|</span>\n ever\n</div>'
-      : '<div contenteditable dir="ltr">\n Just\n <span>testing^ what</span>\n| ever\n</div>',
+      : '<div contenteditable dir="ltr">\n Just\n <span>testing^ |what</span>\n ever\n</div>',
   `${behavior} 15-15 ltr forward word`);
 
 selection_test(
@@ -174,7 +174,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>|\n ever\n</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>^\n ever|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>^\n ever|\n</div>'
+      : '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>^\n| ever\n</div>',
   `${behavior} 15-20 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_ltr_right_word.html
index 3664b3095361145d6f92499191354fd738748259..98465138f928a32822f31073d5d0ab334ff2ffaf 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_ltr_right_word.html
@@ -64,7 +64,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n Just^\n <span>testing| what</span>\n ever\n</div>'
-      : '<div contenteditable dir="ltr">\n Just^\n <span>testing |what</span>\n ever\n</div>',
+      : '<div contenteditable dir="ltr">\n Just^\n| <span>testing what</span>\n ever\n</div>',
   `${behavior} 15-6 ltr right word`);
 
 selection_test(
@@ -136,7 +136,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\n Just\n <span>testing^ what|</span>\n ever\n</div>'
-      : '<div contenteditable dir="ltr">\n Just\n <span>testing^ what</span>\n| ever\n</div>',
+      : '<div contenteditable dir="ltr">\n Just\n <span>testing^ |what</span>\n ever\n</div>',
   `${behavior} 15-15 ltr right word`);
 
 selection_test(
@@ -174,7 +174,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>|\n ever\n</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>^\n ever|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>^\n ever|\n</div>'
+      : '<div contenteditable dir="ltr">\n Just\n <span>testing what</span>^\n| ever\n</div>',
   `${behavior} 15-20 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_rtl_forward_word.html
index dfb17b49134b2cefeb305987f81eff43af0eb076..6012fcb6c8d60a51aaebd4531da8d40511199f89 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_rtl_forward_word.html
@@ -64,7 +64,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n Just^\n <span>testing| what</span>\n ever\n</div>'
-      : '<div contenteditable dir="rtl">\n Just^\n <span>testing |what</span>\n ever\n</div>',
+      : '<div contenteditable dir="rtl">\n Just^\n| <span>testing what</span>\n ever\n</div>',
   `${behavior} 15-6 rtl forward word`);
 
 selection_test(
@@ -136,7 +136,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n Just\n <span>testing^ what|</span>\n ever\n</div>'
-      : '<div contenteditable dir="rtl">\n Just\n <span>testing^ what</span>\n| ever\n</div>',
+      : '<div contenteditable dir="rtl">\n Just\n <span>testing^ |what</span>\n ever\n</div>',
   `${behavior} 15-15 rtl forward word`);
 
 selection_test(
@@ -174,7 +174,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\n Just\n <span>testing what</span>|\n ever\n</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">\n Just\n <span>testing what</span>^\n ever|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\n Just\n <span>testing what</span>^\n ever|\n</div>'
+      : '<div contenteditable dir="rtl">\n Just\n <span>testing what</span>^\n| ever\n</div>',
   `${behavior} 15-20 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_rtl_left_word.html
index a0b49f2c959071f4a30b0c7592af4fffd98f71ec..77c03d2d23ecf6d31b9ca6f65524eb44f696bbaa 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_15_rtl_left_word.html
@@ -64,7 +64,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n Just^\n <span>testing| what</span>\n ever\n</div>'
-      : '<div contenteditable dir="rtl">\n Just^\n <span>testing |what</span>\n ever\n</div>',
+      : '<div contenteditable dir="rtl">\n Just^\n| <span>testing what</span>\n ever\n</div>',
   `${behavior} 15-6 rtl left word`);
 
 selection_test(
@@ -136,7 +136,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\n Just\n <span>testing^ what|</span>\n ever\n</div>'
-      : '<div contenteditable dir="rtl">\n Just\n <span>testing^ what</span>\n| ever\n</div>',
+      : '<div contenteditable dir="rtl">\n Just\n <span>testing^ |what</span>\n ever\n</div>',
   `${behavior} 15-15 rtl left word`);
 
 selection_test(
@@ -174,7 +174,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\n Just\n <span>testing what</span>|\n ever\n</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">\n Just\n <span>testing what</span>^\n ever|\n</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\n Just\n <span>testing what</span>^\n ever|\n</div>'
+      : '<div contenteditable dir="rtl">\n Just\n <span>testing what</span>^\n| ever\n</div>',
   `${behavior} 15-20 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_ltr_forward_word.html
index 47111eb65fc9339bcd9f19d1119d1e958dc66cf5..0b198786da9d904f948a832ea03b0499a18f2496 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_ltr_forward_word.html
@@ -40,7 +40,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">car^ means| \u05D0\u05D1\u05D2.</div>'
-      : '<div contenteditable dir="ltr">car^ means |\u05D0\u05D1\u05D2.</div>',
+      : '<div contenteditable dir="ltr">car^ |means \u05D0\u05D1\u05D2.</div>',
   `${behavior} 16-3 ltr forward word`);
 
 selection_test(
@@ -86,7 +86,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">car means| \u05D0\u05D1\u05D2.</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">car means^ \u05D0\u05D1\u05D2|.</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">car means^ \u05D0\u05D1\u05D2|.</div>'
+      : '<div contenteditable dir="ltr">car means^ |\u05D0\u05D1\u05D2.</div>',
   `${behavior} 16-9 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_ltr_right_word.html
index 9afc640c2f31163986d2f45a033a7b1b1668a134..5cfdd27b49d2474496436317ca191d883a6e9b42 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_ltr_right_word.html
@@ -40,7 +40,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">car^ means| \u05D0\u05D1\u05D2.</div>'
-      : '<div contenteditable dir="ltr">car^ means |\u05D0\u05D1\u05D2.</div>',
+      : '<div contenteditable dir="ltr">car^ |means \u05D0\u05D1\u05D2.</div>',
   `${behavior} 16-3 ltr right word`);
 
 selection_test(
@@ -86,7 +86,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">car means| \u05D0\u05D1\u05D2.</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">car means^ \u05D0\u05D1\u05D2|.</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">car means^ \u05D0\u05D1\u05D2|.</div>'
+      : '<div contenteditable dir="ltr">car means^ |\u05D0\u05D1\u05D2.</div>',
   `${behavior} 16-9 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_rtl_forward_word.html
index 6dcea6d04d6ba984a90664c37be27f0e885a621a..b1acbf8ee75dcf2ad9d05b66174996a523c080d9 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_rtl_forward_word.html
@@ -40,7 +40,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">car^ means| \u05D0\u05D1\u05D2.</div>'
-      : '<div contenteditable dir="rtl">car^ means |\u05D0\u05D1\u05D2.</div>',
+      : '<div contenteditable dir="rtl">car^ |means \u05D0\u05D1\u05D2.</div>',
   `${behavior} 16-3 rtl forward word`);
 
 selection_test(
@@ -86,7 +86,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">car means| \u05D0\u05D1\u05D2.</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">car means^ \u05D0\u05D1\u05D2|.</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">car means^ \u05D0\u05D1\u05D2|.</div>'
+      : '<div contenteditable dir="rtl">car means^ |\u05D0\u05D1\u05D2.</div>',
   `${behavior} 16-9 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_rtl_left_word.html
index 027d26dadb69424a7cfd0da5bda101f369f0b71e..10bfaec6b05291cff57ce0453b7a200d35a72d8e 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_16_rtl_left_word.html
@@ -40,7 +40,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">car^ means| \u05D0\u05D1\u05D2.</div>'
-      : '<div contenteditable dir="rtl">car^ means |\u05D0\u05D1\u05D2.</div>',
+      : '<div contenteditable dir="rtl">car^ |means \u05D0\u05D1\u05D2.</div>',
   `${behavior} 16-3 rtl left word`);
 
 selection_test(
@@ -86,7 +86,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">car means| \u05D0\u05D1\u05D2.</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">car means^ \u05D0\u05D1\u05D2|.</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">car means^ \u05D0\u05D1\u05D2|.</div>'
+      : '<div contenteditable dir="rtl">car means^ |\u05D0\u05D1\u05D2.</div>',
   `${behavior} 16-9 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_ltr_forward_word.html
index 385587b7c61312b1206eaddf301b162d6888e493..c095833f205f7bb99fad03772d4c20fc35d1b0c3 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_ltr_forward_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\u202Bcar^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2.\u202C</div>'
-      : '<div contenteditable dir="ltr">\u202Bcar^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2.\u202C</div>',
+      : '<div contenteditable dir="ltr">\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2.\u202C</div>',
   `${behavior} 17-4 ltr forward word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2.\u202C</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|.\u202C</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|.\u202C</div>'
+      : '<div contenteditable dir="ltr">\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2.\u202C</div>',
   `${behavior} 17-8 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_ltr_right_word.html
index bf5f3f74986cbc52a5fee3a05d0e06bca47c1955..9b8322148fba09ad73d2925df3bb8ae0f71beeeb 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_ltr_right_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\u202Bcar^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2.\u202C</div>'
-      : '<div contenteditable dir="ltr">\u202Bcar^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2.\u202C</div>',
+      : '<div contenteditable dir="ltr">\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2.\u202C</div>',
   `${behavior} 17-4 ltr right word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2.\u202C</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|.\u202C</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|.\u202C</div>'
+      : '<div contenteditable dir="ltr">\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2.\u202C</div>',
   `${behavior} 17-8 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_rtl_forward_word.html
index e5a9798225ab4c8e4b757104d4feecc0c0d2f0d4..e26de4441494628eafec5825d5152a3addfec177 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_rtl_forward_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\u202Bcar^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2.\u202C</div>'
-      : '<div contenteditable dir="rtl">\u202Bcar^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2.\u202C</div>',
+      : '<div contenteditable dir="rtl">\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2.\u202C</div>',
   `${behavior} 17-4 rtl forward word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2.\u202C</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|.\u202C</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|.\u202C</div>'
+      : '<div contenteditable dir="rtl">\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2.\u202C</div>',
   `${behavior} 17-8 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_rtl_left_word.html
index 9b6f6a5de14295192156ede3c0285811ac3048bd..7158d35fb6f72d8c3312083a053f5bccf248577c 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_17_rtl_left_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\u202Bcar^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2.\u202C</div>'
-      : '<div contenteditable dir="rtl">\u202Bcar^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2.\u202C</div>',
+      : '<div contenteditable dir="rtl">\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2.\u202C</div>',
   `${behavior} 17-4 rtl left word`);
 
 selection_test(
@@ -78,7 +78,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2.\u202C</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|.\u202C</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2|.\u202C</div>'
+      : '<div contenteditable dir="rtl">\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2.\u202C</div>',
   `${behavior} 17-8 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_ltr_forward_word.html
index 34f70041a59a5136d3337c67cbb8d6bb1b985029..428691d55d46737abea7c00c794b39b5c1637005 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_ltr_forward_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">they^ said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>'
-      : '<div contenteditable dir="ltr">they^ said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
+      : '<div contenteditable dir="ltr">they^ |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
   `${behavior} 18-4 ltr forward word`);
 
 selection_test(
@@ -136,7 +136,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">they said "\u202Bcar^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C."</div>'
-      : '<div contenteditable dir="ltr">they said "\u202Bcar^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C."</div>',
+      : '<div contenteditable dir="ltr">they said "\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
   `${behavior} 18-15 ltr forward word`);
 
 selection_test(
@@ -166,7 +166,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C."</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C."|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C."|</div>'
+      : '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\u202C."</div>',
   `${behavior} 18-19 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_ltr_right_word.html
index 92c25e84921b739407c69cce47d0aaeeb210052d..180801cf5acb33c534004a9a7b4a376ea6d7f505 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_ltr_right_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">they^ said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>'
-      : '<div contenteditable dir="ltr">they^ said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
+      : '<div contenteditable dir="ltr">they^ |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
   `${behavior} 18-4 ltr right word`);
 
 selection_test(
@@ -136,7 +136,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">they said "\u202Bcar^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C."</div>'
-      : '<div contenteditable dir="ltr">they said "\u202Bcar^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C."</div>',
+      : '<div contenteditable dir="ltr">they said "\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
   `${behavior} 18-15 ltr right word`);
 
 selection_test(
@@ -166,7 +166,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C."</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C."|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C."|</div>'
+      : '<div contenteditable dir="ltr">they said "\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\u202C."</div>',
   `${behavior} 18-19 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_rtl_forward_word.html
index e071df451ec17911a7edacf8d4f799faaf2e2c81..9477aa34e856a971cd94612d2cd1a404b6d50135 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_rtl_forward_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">they^ said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>'
-      : '<div contenteditable dir="rtl">they^ said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
+      : '<div contenteditable dir="rtl">they^ |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
   `${behavior} 18-4 rtl forward word`);
 
 selection_test(
@@ -136,7 +136,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">they said "\u202Bcar^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C."</div>'
-      : '<div contenteditable dir="rtl">they said "\u202Bcar^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C."</div>',
+      : '<div contenteditable dir="rtl">they said "\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
   `${behavior} 18-15 rtl forward word`);
 
 selection_test(
@@ -166,7 +166,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C."</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C."|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C."|</div>'
+      : '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\u202C."</div>',
   `${behavior} 18-19 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_rtl_left_word.html
index 39d6db16c559af1b27a9964787392d9cbd57d1f6..b83318e71aa36f8b60fc78170a86d32d23a9e168 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_18_rtl_left_word.html
@@ -48,7 +48,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">they^ said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>'
-      : '<div contenteditable dir="rtl">they^ said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
+      : '<div contenteditable dir="rtl">they^ |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
   `${behavior} 18-4 rtl left word`);
 
 selection_test(
@@ -136,7 +136,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">they said "\u202Bcar^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C."</div>'
-      : '<div contenteditable dir="rtl">they said "\u202Bcar^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C."</div>',
+      : '<div contenteditable dir="rtl">they said "\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C."</div>',
   `${behavior} 18-15 rtl left word`);
 
 selection_test(
@@ -166,7 +166,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C."</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C."|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C."|</div>'
+      : '<div contenteditable dir="rtl">they said "\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\u202C."</div>',
   `${behavior} 18-19 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_ltr_forward_word.html
index b11c266c7b1000b8bcf47c8525ddec2575154b41..28e13719496d4936e1affb7b09b751517cde8537 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_ltr_forward_word.html
@@ -42,7 +42,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ \u1497\u1498\u1499| \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ \u1497\u1498\u1499 |\u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ |\u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-3 ltr forward word`);
 
 selection_test(
@@ -74,7 +74,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ \u1500\u1501\u1502| \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ \u1500\u1501\u1502 |\'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ |\u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-7 ltr forward word`);
 
 selection_test(
@@ -162,7 +162,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-18 ltr forward word`);
 
 selection_test(
@@ -250,7 +250,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-29 ltr forward word`);
 
 selection_test(
@@ -280,7 +280,9 @@ selection_test(
 selection_test(
   `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   selection => selection.modify('extend', 'forward', 'word'),
-  `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C"\u202C\'?|</div>`,
+  behavior === 'mac'
+      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C"\u202C\'?|</div>`
+      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-33 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_ltr_right_word.html
index e26f2117b6ed693759fe9ce4d97b27837e061c7a..c44e3eeda34b145a54f4e0028754f80e44a08ad6 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_ltr_right_word.html
@@ -42,7 +42,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ \u1497\u1498\u1499| \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ \u1497\u1498\u1499 |\u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ |\u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-3 ltr right word`);
 
 selection_test(
@@ -74,7 +74,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ \u1500\u1501\u1502| \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ \u1500\u1501\u1502 |\'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ |\u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-7 ltr right word`);
 
 selection_test(
@@ -162,7 +162,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-18 ltr right word`);
 
 selection_test(
@@ -250,7 +250,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-29 ltr right word`);
 
 selection_test(
@@ -280,7 +280,9 @@ selection_test(
 selection_test(
   `<div contenteditable dir="ltr" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   selection => selection.modify('extend', 'right', 'word'),
-  `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C"\u202C\'?|</div>`,
+  behavior === 'mac'
+      ? `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C"\u202C\'?|</div>`
+      : `<div contenteditable dir="ltr" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-33 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_rtl_forward_word.html
index 76c1d1edb311636e630a0ca49d67f223d72f2bf4..526663a8482630346ed51fb700e280b8e9ac4bd4 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_rtl_forward_word.html
@@ -42,7 +42,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ \u1497\u1498\u1499| \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ \u1497\u1498\u1499 |\u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ |\u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-3 rtl forward word`);
 
 selection_test(
@@ -74,7 +74,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ \u1500\u1501\u1502| \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ \u1500\u1501\u1502 |\'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ |\u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-7 rtl forward word`);
 
 selection_test(
@@ -162,7 +162,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-18 rtl forward word`);
 
 selection_test(
@@ -250,7 +250,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-29 rtl forward word`);
 
 selection_test(
@@ -280,7 +280,9 @@ selection_test(
 selection_test(
   `<div contenteditable dir="rtl" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   selection => selection.modify('extend', 'forward', 'word'),
-  `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C"\u202C\'?|</div>`,
+  behavior === 'mac'
+      ? `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C"\u202C\'?|</div>`
+      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-33 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_rtl_left_word.html
index 565ba4b82916d5e9e14a07a37801db8bb074cc90..b043d5a41dad8d463757a5b3ec8339f4f19a5265 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_19_rtl_left_word.html
@@ -42,7 +42,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ \u1497\u1498\u1499| \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ \u1497\u1498\u1499 |\u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8^ |\u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-3 rtl left word`);
 
 selection_test(
@@ -74,7 +74,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ \u1500\u1501\u1502| \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ \u1500\u1501\u1502 |\'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499^ |\u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-7 rtl left word`);
 
 selection_test(
@@ -162,7 +162,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ said| "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ said |"\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey^ |said "\u202Bcar \u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-18 rtl left word`);
 
 selection_test(
@@ -250,7 +250,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`
-      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ \u05D3\u05D4\u05D5 |\u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
+      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar^ |\u05D3\u05D4\u05D5 \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-29 rtl left word`);
 
 selection_test(
@@ -280,7 +280,9 @@ selection_test(
 selection_test(
   `<div contenteditable dir="rtl" style="${kStyle}">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5| \u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   selection => selection.modify('extend', 'left', 'word'),
-  `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C"\u202C\'?|</div>`,
+  behavior === 'mac'
+      ? `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ \u05D0\u05D1\u05D2\u202C"\u202C\'?|</div>`
+      : `<div contenteditable dir="rtl" style="width: 600px; font: 20px monospace">\u05D6\u05D7\u05D8 \u1497\u1498\u1499 \u1500\u1501\u1502 \'\u202Athey said "\u202Bcar \u05D3\u05D4\u05D5^ |\u05D0\u05D1\u05D2\u202C"\u202C\'?</div>`,
   `${behavior} 19-33 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_ltr_forward_word.html
index e7c50b10cccc4ef456bed77e821ea38ce69ed304..524b3c2a7ced54d4d34367f95f50ca60bc6ded65 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_ltr_forward_word.html
@@ -41,7 +41,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2^ abc| \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>'
-      : '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2^ abc |\u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
+      : '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2^ |abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
   `${behavior} 20-3 ltr forward word`);
 
 selection_test(
@@ -71,7 +71,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc| \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc^ \u05D3\u05D4\u05D5|<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc^ \u05D3\u05D4\u05D5|<br>edf \u05D6\u05D7\u05D8 abrebg</div>'
+      : '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc^ |\u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
   `${behavior} 20-7 ltr forward word`);
 
 selection_test(
@@ -121,7 +123,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf^ \u05D6\u05D7\u05D8| abrebg</div>'
-      : '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf^ \u05D6\u05D7\u05D8 |abrebg</div>',
+      : '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf^ |\u05D6\u05D7\u05D8 abrebg</div>',
   `${behavior} 20-14 ltr forward word`);
 
 selection_test(
@@ -151,7 +153,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8| abrebg</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8^ abrebg|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8^ abrebg|</div>'
+      : '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8^ |abrebg</div>',
   `${behavior} 20-18 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_ltr_right_word.html
index fc5767817c667f6bde5777028e297ca4f73d5c01..e21adb3fbdc0e05fb88e19521c99b144356579fa 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_ltr_right_word.html
@@ -41,7 +41,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2^ abc| \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>'
-      : '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2^ abc |\u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
+      : '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2^ |abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
   `${behavior} 20-3 ltr right word`);
 
 selection_test(
@@ -71,7 +71,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc| \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc^ \u05D3\u05D4\u05D5|<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc^ \u05D3\u05D4\u05D5|<br>edf \u05D6\u05D7\u05D8 abrebg</div>'
+      : '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc^ |\u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
   `${behavior} 20-7 ltr right word`);
 
 selection_test(
@@ -121,7 +123,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf^ \u05D6\u05D7\u05D8| abrebg</div>'
-      : '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf^ \u05D6\u05D7\u05D8 |abrebg</div>',
+      : '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf^ |\u05D6\u05D7\u05D8 abrebg</div>',
   `${behavior} 20-14 ltr right word`);
 
 selection_test(
@@ -151,7 +153,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8| abrebg</div>',
   selection => selection.modify('extend', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8^ abrebg|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8^ abrebg|</div>'
+      : '<div contenteditable dir="ltr">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8^ |abrebg</div>',
   `${behavior} 20-18 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_rtl_forward_word.html
index 2a1fb52c3aa957eebccf85b71575a9cfb091ae07..f6bfbaa8ecdcc4c1fea47f9aa7e2cc090e1ebad4 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_rtl_forward_word.html
@@ -41,7 +41,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2^ abc| \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>'
-      : '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2^ abc |\u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
+      : '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2^ |abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
   `${behavior} 20-3 rtl forward word`);
 
 selection_test(
@@ -71,7 +71,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc| \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc^ \u05D3\u05D4\u05D5|<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc^ \u05D3\u05D4\u05D5|<br>edf \u05D6\u05D7\u05D8 abrebg</div>'
+      : '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc^ |\u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
   `${behavior} 20-7 rtl forward word`);
 
 selection_test(
@@ -121,7 +123,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf^ \u05D6\u05D7\u05D8| abrebg</div>'
-      : '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf^ \u05D6\u05D7\u05D8 |abrebg</div>',
+      : '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf^ |\u05D6\u05D7\u05D8 abrebg</div>',
   `${behavior} 20-14 rtl forward word`);
 
 selection_test(
@@ -151,7 +153,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8| abrebg</div>',
   selection => selection.modify('extend', 'forward', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8^ abrebg|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8^ abrebg|</div>'
+      : '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8^ |abrebg</div>',
   `${behavior} 20-18 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_rtl_left_word.html
index 7582ccc01f48580d01552476a0a28cc9f0190ac3..eacd4762de4b5a595dc3d978742c8dfbb3c1d6b6 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_20_rtl_left_word.html
@@ -41,7 +41,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2^ abc| \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>'
-      : '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2^ abc |\u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
+      : '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2^ |abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
   `${behavior} 20-3 rtl left word`);
 
 selection_test(
@@ -71,7 +71,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc| \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc^ \u05D3\u05D4\u05D5|<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc^ \u05D3\u05D4\u05D5|<br>edf \u05D6\u05D7\u05D8 abrebg</div>'
+      : '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc^ |\u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8 abrebg</div>',
   `${behavior} 20-7 rtl left word`);
 
 selection_test(
@@ -121,7 +123,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf^ \u05D6\u05D7\u05D8| abrebg</div>'
-      : '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf^ \u05D6\u05D7\u05D8 |abrebg</div>',
+      : '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf^ |\u05D6\u05D7\u05D8 abrebg</div>',
   `${behavior} 20-14 rtl left word`);
 
 selection_test(
@@ -151,7 +153,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8| abrebg</div>',
   selection => selection.modify('extend', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8^ abrebg|</div>',
+  behavior === 'mac'
+      ? '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8^ abrebg|</div>'
+      : '<div contenteditable dir="rtl">\u05D0\u05D1\u05D2 abc \u05D3\u05D4\u05D5<br>edf \u05D6\u05D7\u05D8^ |abrebg</div>',
   `${behavior} 20-18 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_ltr_forward_word.html
index 52db363019da37050501ce16061f34eed080c71f..2c2b97e618ea3f02502af3d854fb439acb077fc0 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_ltr_forward_word.html
@@ -58,7 +58,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1^ line2| a line3</div>`
-      : `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1^ line2 |a line3</div>`,
+      : `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1^ |line2 a line3</div>`,
   `${behavior} 21-5 ltr forward word`);
 
 selection_test(
@@ -106,7 +106,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2^ a| line3</div>`
-      : `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2^ a |line3</div>`,
+      : `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2^ |a line3</div>`,
   `${behavior} 21-11 ltr forward word`);
 
 selection_test(
@@ -120,7 +120,9 @@ selection_test(
 selection_test(
   `<div contenteditable dir="ltr" style="${kStyle}">line1 line2 a| line3</div>`,
   selection => selection.modify('extend', 'forward', 'word'),
-  `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2 a^ line3|</div>`,
+  behavior === 'mac'
+      ? `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2 a^ line3|</div>`
+      : `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2 a^ |line3</div>`,
   `${behavior} 21-13 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_ltr_right_word.html
index 84a54eaf7aeaec258d8026065b4e8c06d2d867e7..32d06ffd5848db2dd4ee4ed58341cbf9452ff749 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_ltr_right_word.html
@@ -58,7 +58,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1^ line2| a line3</div>`
-      : `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1^ line2 |a line3</div>`,
+      : `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1^ |line2 a line3</div>`,
   `${behavior} 21-5 ltr right word`);
 
 selection_test(
@@ -106,7 +106,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2^ a| line3</div>`
-      : `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2^ a |line3</div>`,
+      : `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2^ |a line3</div>`,
   `${behavior} 21-11 ltr right word`);
 
 selection_test(
@@ -120,7 +120,9 @@ selection_test(
 selection_test(
   `<div contenteditable dir="ltr" style="${kStyle}">line1 line2 a| line3</div>`,
   selection => selection.modify('extend', 'right', 'word'),
-  `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2 a^ line3|</div>`,
+  behavior === 'mac'
+      ? `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2 a^ line3|</div>`
+      : `<div contenteditable dir="ltr" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2 a^ |line3</div>`,
   `${behavior} 21-13 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_rtl_forward_word.html
index fd45de9e23e249c82b9273ae0d826393d6092d7f..2740f97e1af069bc834594d23608b37f10c36722 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_rtl_forward_word.html
@@ -58,7 +58,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1^ line2| a line3</div>`
-      : `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1^ line2 |a line3</div>`,
+      : `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1^ |line2 a line3</div>`,
   `${behavior} 21-5 rtl forward word`);
 
 selection_test(
@@ -106,7 +106,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2^ a| line3</div>`
-      : `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2^ a |line3</div>`,
+      : `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2^ |a line3</div>`,
   `${behavior} 21-11 rtl forward word`);
 
 selection_test(
@@ -120,7 +120,9 @@ selection_test(
 selection_test(
   `<div contenteditable dir="rtl" style="${kStyle}">line1 line2 a| line3</div>`,
   selection => selection.modify('extend', 'forward', 'word'),
-  `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2 a^ line3|</div>`,
+  behavior === 'mac'
+      ? `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2 a^ line3|</div>`
+      : `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2 a^ |line3</div>`,
   `${behavior} 21-13 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_rtl_left_word.html
index 31d29caa790e18cf2794ccb05ca56a7638d7ddce..2cf7227a545a56f52ed2c96c01fe31560dd66f61 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_21_rtl_left_word.html
@@ -58,7 +58,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1^ line2| a line3</div>`
-      : `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1^ line2 |a line3</div>`,
+      : `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1^ |line2 a line3</div>`,
   `${behavior} 21-5 rtl left word`);
 
 selection_test(
@@ -106,7 +106,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2^ a| line3</div>`
-      : `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2^ a |line3</div>`,
+      : `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2^ |a line3</div>`,
   `${behavior} 21-11 rtl left word`);
 
 selection_test(
@@ -120,7 +120,9 @@ selection_test(
 selection_test(
   `<div contenteditable dir="rtl" style="${kStyle}">line1 line2 a| line3</div>`,
   selection => selection.modify('extend', 'left', 'word'),
-  `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2 a^ line3|</div>`,
+  behavior === 'mac'
+      ? `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2 a^ line3|</div>`
+      : `<div contenteditable dir="rtl" style="line-break:before-white-space; width: 100px; font: 20px monospace;">line1 line2 a^ |line3</div>`,
   `${behavior} 21-13 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_ltr_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_ltr_forward_word.html
index fcb34d6ad3954175db3b021772dd795fc7552cf5..862435c466a2fb8aea8b6eb21e88f1f5f35c6042 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_ltr_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_ltr_forward_word.html
@@ -58,7 +58,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1^ line2| a line3</div>`
-      : `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1^ line2 |a line3</div>`,
+      : `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1^ |line2 a line3</div>`,
   `${behavior} 22-5 ltr forward word`);
 
 selection_test(
@@ -106,7 +106,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2^ a| line3</div>`
-      : `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2^ a |line3</div>`,
+      : `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2^ |a line3</div>`,
   `${behavior} 22-11 ltr forward word`);
 
 selection_test(
@@ -120,7 +120,9 @@ selection_test(
 selection_test(
   `<div contenteditable dir="ltr" style="${kStyle}">line1 line2 a| line3</div>`,
   selection => selection.modify('extend', 'forward', 'word'),
-  `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2 a^ line3|</div>`,
+  behavior === 'mac'
+      ? `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2 a^ line3|</div>`
+      : `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2 a^ |line3</div>`,
   `${behavior} 22-13 ltr forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_ltr_right_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_ltr_right_word.html
index ab8f4361f36497ce4707c862e7dc9feed14dabd1..e98177e46dab6fff6526ab3085c674c169386641 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_ltr_right_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_ltr_right_word.html
@@ -58,7 +58,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1^ line2| a line3</div>`
-      : `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1^ line2 |a line3</div>`,
+      : `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1^ |line2 a line3</div>`,
   `${behavior} 22-5 ltr right word`);
 
 selection_test(
@@ -106,7 +106,7 @@ selection_test(
   selection => selection.modify('extend', 'right', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2^ a| line3</div>`
-      : `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2^ a |line3</div>`,
+      : `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2^ |a line3</div>`,
   `${behavior} 22-11 ltr right word`);
 
 selection_test(
@@ -120,7 +120,9 @@ selection_test(
 selection_test(
   `<div contenteditable dir="ltr" style="${kStyle}">line1 line2 a| line3</div>`,
   selection => selection.modify('extend', 'right', 'word'),
-  `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2 a^ line3|</div>`,
+  behavior === 'mac'
+      ? `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2 a^ line3|</div>`
+      : `<div contenteditable dir="ltr" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2 a^ |line3</div>`,
   `${behavior} 22-13 ltr right word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_rtl_forward_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_rtl_forward_word.html
index aff2570f08a9a58c3e70a9ae3585ebfa974ee440..3d9193959d52bf3dbd26fab9d904884a6335179b 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_rtl_forward_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_rtl_forward_word.html
@@ -58,7 +58,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1^ line2| a line3</div>`
-      : `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1^ line2 |a line3</div>`,
+      : `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1^ |line2 a line3</div>`,
   `${behavior} 22-5 rtl forward word`);
 
 selection_test(
@@ -106,7 +106,7 @@ selection_test(
   selection => selection.modify('extend', 'forward', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2^ a| line3</div>`
-      : `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2^ a |line3</div>`,
+      : `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2^ |a line3</div>`,
   `${behavior} 22-11 rtl forward word`);
 
 selection_test(
@@ -120,7 +120,9 @@ selection_test(
 selection_test(
   `<div contenteditable dir="rtl" style="${kStyle}">line1 line2 a| line3</div>`,
   selection => selection.modify('extend', 'forward', 'word'),
-  `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2 a^ line3|</div>`,
+  behavior === 'mac'
+      ? `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2 a^ line3|</div>`
+      : `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2 a^ |line3</div>`,
   `${behavior} 22-13 rtl forward word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_rtl_left_word.html b/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_rtl_left_word.html
index d274c03b44288ee67f479abe7f3d5c1af6c63e70..302656dc6983986c673b806d5eece5081705614b 100644
--- a/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_rtl_left_word.html
+++ b/third_party/blink/web_tests/editing/selection/extend/extend_selection_22_rtl_left_word.html
@@ -58,7 +58,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1^ line2| a line3</div>`
-      : `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1^ line2 |a line3</div>`,
+      : `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1^ |line2 a line3</div>`,
   `${behavior} 22-5 rtl left word`);
 
 selection_test(
@@ -106,7 +106,7 @@ selection_test(
   selection => selection.modify('extend', 'left', 'word'),
   behavior === 'mac'
       ? `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2^ a| line3</div>`
-      : `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2^ a |line3</div>`,
+      : `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2^ |a line3</div>`,
   `${behavior} 22-11 rtl left word`);
 
 selection_test(
@@ -120,7 +120,9 @@ selection_test(
 selection_test(
   `<div contenteditable dir="rtl" style="${kStyle}">line1 line2 a| line3</div>`,
   selection => selection.modify('extend', 'left', 'word'),
-  `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2 a^ line3|</div>`,
+  behavior === 'mac'
+      ? `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2 a^ line3|</div>`
+      : `<div contenteditable dir="rtl" style="line-break:after-white-space; width:100px; font: 20px monospace;">line1 line2 a^ |line3</div>`,
   `${behavior} 22-13 rtl left word`);
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move-by-word-visually-crash-test-2.html b/third_party/blink/web_tests/editing/selection/modify_move/move-by-word-visually-crash-test-2.html
index 238900296dbfd85842735e7ceb9b322d053f479f..65504873074c4694deba363881837a2d4feea96d 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move-by-word-visually-crash-test-2.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move-by-word-visually-crash-test-2.html
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable><vkern></vkern><marquee><div>abc| def</div></marquee></div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable><vkern></vkern><marquee><div>abc def|</div></marquee></div>',
+  '<div contenteditable><vkern></vkern><marquee><div>abc |def</div></marquee></div>',
   '1-3 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_01_rtl_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_01_rtl_multi_line.html
index c43d6811e2ad338a2175a2d8db529eba5871341d..1d3a8414d31d3d38829d19efdc8b17e64f651bda 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_01_rtl_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_01_rtl_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc def|<br><br><br>uvw xyz</div>'
-      : '<div contenteditable dir="rtl">abc def|<br><br><br>uvw xyz</div>',
+      : '<div contenteditable dir="rtl">abc |def<br><br><br>uvw xyz</div>',
   '1-3 rtl left word');
 
 selection_test(
@@ -115,7 +115,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def<br><br><br>uvw| xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def<br><br><br>uvw xyz|</div>',
+  isMac
+      ? '<div contenteditable dir="rtl">abc def<br><br><br>uvw xyz|</div>'
+      : '<div contenteditable dir="rtl">abc def<br><br><br>uvw |xyz</div>',
   '1-13 rtl left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_02_rtl_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_02_rtl_multi_line.html
index 6446365c1e3e6f87c7a585f97fcd9b550e28b2c9..49fe430d5e7e7c6b56117f79a53f6f22be497ec1 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_02_rtl_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_02_rtl_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc def|<div><br></div><div><br></div><div><br></div>uvw xyz</div>'
-      : '<div contenteditable dir="rtl">abc def|<div><br></div><div><br></div><div><br></div>uvw xyz</div>',
+      : '<div contenteditable dir="rtl">abc |def<div><br></div><div><br></div><div><br></div>uvw xyz</div>',
   '2-3 rtl left word');
 
 selection_test(
@@ -163,7 +163,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def<div><br></div><div><br></div><div><br></div>uvw| xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def<div><br></div><div><br></div><div><br></div>uvw xyz|</div>',
+  isMac
+      ? '<div contenteditable dir="rtl">abc def<div><br></div><div><br></div><div><br></div>uvw xyz|</div>'
+      : '<div contenteditable dir="rtl">abc def<div><br></div><div><br></div><div><br></div>uvw |xyz</div>',
   '2-19 rtl left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_03_rtl_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_03_rtl_multi_line.html
index 353bc9ca12f349dc48a021439897190b38bb7248..a948ee80ab0b75c82e755ff1a43ec5248230e96a 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_03_rtl_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_03_rtl_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|<br><br><br>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|<br><br><br>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0<br><br><br>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '3-3 rtl left word');
 
 selection_test(
@@ -117,7 +117,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<br><br><br>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|</div>'
-      : '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<br><br><br>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|</div>',
+      : '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<br><br><br>\u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0</div>',
   '3-13 rtl left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_04_rtl_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_04_rtl_multi_line.html
index 3b43aec0fd03434c77cefa6afcfaab91b62391ca..9163002bef5d458c73d8c67911c0bc8074555d07 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_04_rtl_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_04_rtl_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|<div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|<div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0<div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '4-3 rtl left word');
 
 selection_test(
@@ -165,7 +165,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|</div>'
-      : '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|</div>',
+      : '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0</div>',
   '4-19 rtl left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_05_rtl_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_05_rtl_multi_line.html
index 237a5676f4702701e2d942ac2c0c72b52efdc752..4305d9858607672b0c1b8a937b4cf864d584e6a0 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_05_rtl_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_05_rtl_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0| hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 |hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc |\u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
   '5-3 rtl left word');
 
 selection_test(
@@ -69,7 +69,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij| \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij |\u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 |hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
   '5-7 rtl left word');
 
 selection_test(
@@ -101,7 +101,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0| xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 |xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij |\u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
   '5-11 rtl left word');
 
 selection_test(
@@ -133,7 +133,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz|<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz|<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 |xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
   '5-15 rtl left word');
 
 selection_test(
@@ -221,7 +221,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj| \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj |\u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 |kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
   '5-26 rtl left word');
 
 selection_test(
@@ -245,7 +245,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0| opq \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 |opq \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj |\u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
   '5-29 rtl left word');
 
 selection_test(
@@ -277,7 +277,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq| \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq |\u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 |opq \u05D0\u05D0\u05D0</div>',
   '5-33 rtl left word');
 
 selection_test(
@@ -309,7 +309,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0|</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0|</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq |\u05D0\u05D0\u05D0</div>',
   '5-37 rtl left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_06_rtl_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_06_rtl_multi_line.html
index 4b02f6dcde4f42a1c2cacfcb03e43d067bb7f593..1d6fd4bdaf3a90cb7f88cf1f6c5f0011a67d07a7 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_06_rtl_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_06_rtl_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0| hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 |hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc |\u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-3 rtl left word');
 
 selection_test(
@@ -69,7 +69,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij| \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij |\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 |hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-7 rtl left word');
 
 selection_test(
@@ -101,7 +101,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0| \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij |\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-11 rtl left word');
 
 selection_test(
@@ -133,7 +133,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0| uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 |uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-15 rtl left word');
 
 selection_test(
@@ -165,7 +165,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw| xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw |xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 |uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-19 rtl left word');
 
 selection_test(
@@ -197,7 +197,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz| <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz| <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw |xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-23 rtl left word');
 
 selection_test(
@@ -333,7 +333,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj| \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj |\u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 |kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-40 rtl left word');
 
 selection_test(
@@ -357,7 +357,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0| mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 |mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj |\u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-43 rtl left word');
 
 selection_test(
@@ -389,7 +389,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn| opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn |opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 |mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-47 rtl left word');
 
 selection_test(
@@ -413,7 +413,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq| \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq |\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn |opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-50 rtl left word');
 
 selection_test(
@@ -445,7 +445,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0| \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq |\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-54 rtl left word');
 
 selection_test(
@@ -477,7 +477,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|</div>'
-      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|</div>',
+      : '<div contenteditable dir="rtl">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0</div>',
   '6-58 rtl left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_07_rtl_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_07_rtl_multi_line.html
index 44e4a340a447df2b8ed7eeff38aa60d0df886cc9..d707dfcef1f0105bb36a77319798839c1fb208e5 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_07_rtl_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_07_rtl_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc ghi|<div></div><div></div><div></div>opq xyz</div>'
-      : '<div contenteditable dir="rtl">abc ghi|<div></div><div></div><div></div>opq xyz</div>',
+      : '<div contenteditable dir="rtl">abc |ghi<div></div><div></div><div></div>opq xyz</div>',
   '7-3 rtl left word');
 
 selection_test(
@@ -139,7 +139,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc ghi<div></div><div></div><div></div>opq| xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc ghi<div></div><div></div><div></div>opq xyz|</div>',
+  isMac
+      ? '<div contenteditable dir="rtl">abc ghi<div></div><div></div><div></div>opq xyz|</div>'
+      : '<div contenteditable dir="rtl">abc ghi<div></div><div></div><div></div>opq |xyz</div>',
   '7-16 rtl left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_08_rtl_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_08_rtl_multi_line.html
index f5e932258363dbbb6281f7f4d3a2c228f019f45a..867e88db73e4cfa0d3061b9af820a4949b1b6749 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_08_rtl_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_08_rtl_multi_line.html
@@ -35,7 +35,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc| ghi<div></div><div></div><div></div></div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc ghi|<div></div><div></div><div></div></div>',
+  isMac
+      ? '<div contenteditable dir="rtl">abc ghi|<div></div><div></div><div></div></div>'
+      : '<div contenteditable dir="rtl">abc |ghi<div></div><div></div><div></div></div>',
   '8-3 rtl left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_09_rtl_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_09_rtl_multi_line.html
index 38a5430d358a70c08a5ad60b74a2203e27a94ef1..17ce20dfdec1adcece70102ce2b406d4bc151cd0 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_09_rtl_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_09_rtl_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'left', 'word'),
   isMac
       ? '<div contenteditable dir="rtl">abc ghi|<div><img src="../../resources/abe.png"></div><div></div><div></div>opq rst</div>'
-      : '<div contenteditable dir="rtl">abc ghi|<div><img src="../../resources/abe.png"></div><div></div><div></div>opq rst</div>',
+      : '<div contenteditable dir="rtl">abc |ghi<div><img src="../../resources/abe.png"></div><div></div><div></div>opq rst</div>',
   '9-3 rtl left word');
 
 selection_test(
@@ -147,7 +147,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc ghi<div><img src=../../resources/abe.png></div><div></div><div></div>opq| rst</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc ghi<div><img src="../../resources/abe.png"></div><div></div><div></div>opq rst|</div>',
+  isMac
+      ? '<div contenteditable dir="rtl">abc ghi<div><img src="../../resources/abe.png"></div><div></div><div></div>opq rst|</div>'
+      : '<div contenteditable dir="rtl">abc ghi<div><img src="../../resources/abe.png"></div><div></div><div></div>opq |rst</div>',
   '9-17 rtl left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_13.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_13.html
index 272716e04e2ca59a4d6629ad1072625958fd94a7..99adccfc9765bef6dff81bd47db333ad44b842ad 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_13.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_13.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc| def    hij opq</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def |   hij opq</div>',
+  '<div contenteditable dir="rtl">abc |def    hij opq</div>',
   '13-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def|    hij opq</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def    hij |opq</div>',
+  '<div contenteditable dir="rtl">abc def |   hij opq</div>',
   '13-7 left word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def    hij| opq</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def    hij opq|</div>',
+  '<div contenteditable dir="rtl">abc def    hij |opq</div>',
   '13-14 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_14.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_14.html
index ce220abe6703e0c988136198051f87f3eb5d3b01..67deb1046a7682f60673bdb6633eaee0fd8309cb 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_14.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_14.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc|    def    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def |   hij    opq    </div>',
+  '<div contenteditable dir="rtl">    abc |   def    hij    opq    </div>',
   '14-7 left word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    def|    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def    hij |   opq    </div>',
+  '<div contenteditable dir="rtl">    abc    def |   hij    opq    </div>',
   '14-14 left word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    def    hij|    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def    hij    opq|    </div>',
+  '<div contenteditable dir="rtl">    abc    def    hij |   opq    </div>',
   '14-21 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_15.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_15.html
index 1c8c087dc496f2dc32a719274d6231d461d1877e..4135f67e266970f227e3937e5a86a5e887511356 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_15.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_15.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc|    אבצ    def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    \u05D0\u05D1\u05E6 |   def    </div>',
+  '<div contenteditable dir="rtl">    abc |   \u05D0\u05D1\u05E6    def    </div>',
   '15-7 left word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    אבצ|    def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    \u05D0\u05D1\u05E6    def|    </div>',
+  '<div contenteditable dir="rtl">    abc    \u05D0\u05D1\u05E6 |   def    </div>',
   '15-14 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_16.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_16.html
index e4792eeca7501954b1d4556b568ae4779b937673..dfd48d5513048a0f07a0f7978eda018a6bc558db 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_16.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_16.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc|    def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def |   אבצ    דדפ    hij    opq    </div>',
+  '<div contenteditable dir="rtl">    abc |   def    אבצ    דדפ    hij    opq    </div>',
   '16-7 left word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    def|    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def    \u05D0\u05D1\u05E6 |   \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="rtl">    abc    def |   \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '16-14 left word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    def    אבצ|    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4 |   hij    opq    </div>',
+  '<div contenteditable dir="rtl">    abc    def    \u05D0\u05D1\u05E6 |   \u05D3\u05D3\u05E4    hij    opq    </div>',
   '16-21 left word');
 
 selection_test(
@@ -177,7 +177,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    def    אבצ    דדפ|    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij |   opq    </div>',
+  '<div contenteditable dir="rtl">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4 |   hij    opq    </div>',
   '16-28 left word');
 
 selection_test(
@@ -219,7 +219,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    def    אבצ    דדפ    hij|    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def    אבצ    דדפ    hij    opq|    </div>',
+  '<div contenteditable dir="rtl">    abc    def    אבצ    דדפ    hij |   opq    </div>',
   '16-35 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_17.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_17.html
index 0b1eeef545d3360877ca40241c81e2029a08eac1..a5a60c49814429cbcf2a441d3f97264e7b7c4e3b 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_17.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_17.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc|    def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def |   hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl">    abc |   def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '17-7 left word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    def|    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def    hij |   \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl">    abc    def |   hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '17-14 left word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    def    hij|    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def    hij    \u05D0\u05D1\u05E6 |   \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl">    abc    def    hij |   \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '17-21 left word');
 
 selection_test(
@@ -177,7 +177,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    def    hij    אבצ|    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl">    abc    def    hij    \u05D0\u05D1\u05E6 |   \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '17-28 left word');
 
 selection_test(
@@ -219,7 +219,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    def    hij    אבצ    דעפ|    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 |   opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '17-35 left word');
 
 selection_test(
@@ -261,7 +261,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    def    hij    אבצ    דעפ    היח|    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq |   rst    uvw    </div>',
+  '<div contenteditable dir="rtl">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 |   opq    rst    uvw    </div>',
   '17-42 left word');
 
 selection_test(
@@ -303,7 +303,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    def    hij    אבצ    דעפ    היח    opq|    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst |   uvw    </div>',
+  '<div contenteditable dir="rtl">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq |   rst    uvw    </div>',
   '17-49 left word');
 
 selection_test(
@@ -345,7 +345,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    abc    def    hij    אבצ    דעפ    היח    opq    rst|    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw|    </div>',
+  '<div contenteditable dir="rtl">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst |   uvw    </div>',
   '17-56 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_18.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_18.html
index d96e92a43af5405c8ca7fb6d2197411158dc9757..d29475fe6bf5d92f533280320861372548199241 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_18.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_18.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ|    דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6 |   \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '18-7 left word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    דעפ|    חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7 |   \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '18-14 left word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    דעפ    חיח|    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7 |   \u05D5\u05E4\u05E7    </div>',
   '18-21 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_19.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_19.html
index c175ab798b2ee103f3244ea072563264d58a4212..31474942a24ea9ddc369de5849240b93508041c0 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_19.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_19.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ|    abc    דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    abc |   \u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6 |   abc    \u05D3\u05E2\u05E4     </div>',
   '19-7 left word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    abc|    דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4|     </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    abc |   \u05D3\u05E2\u05E4     </div>',
   '19-14 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_20.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_20.html
index 471b4ab58741385e612f30b65109bf0cd565331a..3de16b67ff9bd7d04727e309a8f367adcde402f2 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_20.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_20.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ|    דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6 |   \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '20-7 left word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    דעפ|    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc |  def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '20-14 left word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    דעפ    abc|   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    אבצ    דעפ    abc   def |  חיח    ופק    </div>',
+  '<div contenteditable dir="rtl">    אבצ    דעפ    abc |  def   חיח    ופק    </div>',
   '20-21 left word');
 
 selection_test(
@@ -171,7 +171,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    דעפ    abc   def|   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7 |   \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def |  \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '20-27 left word');
 
 selection_test(
@@ -207,7 +207,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    דעפ    abc   def   חיח|    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7 |   \u05D5\u05E4\u05E7    </div>',
   '20-33 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_21.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_21.html
index b059ef25c30088efee3b0694e081d66ef46a8b7a..6cc9c865b31eea7c25cd03357e93f964052358af 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_21.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_21.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ|    דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6 |   \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '21-7 left word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    דעפ|    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7 |   abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '21-14 left word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    דעפ    חיח|    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc |  def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7 |   abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '21-21 left word');
 
 selection_test(
@@ -177,7 +177,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    דעפ    חיח    abc|   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def |  jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc |  def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '21-28 left word');
 
 selection_test(
@@ -213,7 +213,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    דעפ    חיח    abc   def|   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih |  \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def |  jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '21-34 left word');
 
 selection_test(
@@ -249,7 +249,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    דעפ    חיח    abc   def   jih|   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7 | \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih |  \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '21-40 left word');
 
 selection_test(
@@ -285,7 +285,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    דעפ    חיח    abc   def   jih   ופק|  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7 |   \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7 | \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '21-46 left word');
 
 selection_test(
@@ -315,7 +315,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">    אבצ    דעפ    חיח    abc   def   jih   ופק  ופק|    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA|     </div>',
+  '<div contenteditable dir="rtl">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7 |   \u05E8\u05E1\u05EA     </div>',
   '21-51 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_34.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_34.html
index 818307cb4dc1c05a9185bd760c97602535a277ed..7db1f0f11305ab210ae380fa28749e4f983c27cc 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_34.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_34.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">abc| def    hij opq</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">abc def    |hij opq</div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">abc |def    hij opq</div>',
   '34-3 left word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">abc def|    hij opq</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">abc def    hij |opq</div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">abc def    |hij opq</div>',
   '34-7 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">abc def |   hij opq</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">abc def    hij |opq</div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">abc def    |hij opq</div>',
   '34-8 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">abc def  |  hij opq</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">abc def    hij |opq</div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">abc def    |hij opq</div>',
   '34-9 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">abc def   | hij opq</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">abc def    hij |opq</div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">abc def    |hij opq</div>',
   '34-10 left word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">abc def    hij| opq</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">abc def    hij opq|</div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">abc def    hij |opq</div>',
   '34-14 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_35.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_35.html
index f3d87922485ebe4ba243f25fcb9b106f68b88a4c..19437bfae90542a3aceebd4946ae1728281c3be6 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_35.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_35.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">|    abc    def    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    def    hij    opq    </div>',
   '35-0 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre"> |   abc    def    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    def    hij    opq    </div>',
   '35-1 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">  |  abc    def    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    def    hij    opq    </div>',
   '35-2 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">   | abc    def    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    def    hij    opq    </div>',
   '35-3 left word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc|    def    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    opq    </div>',
   '35-7 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc |   def    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    opq    </div>',
   '35-8 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc  |  def    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    opq    </div>',
   '35-9 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc   | def    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    opq    </div>',
   '35-10 left word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def|    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    opq    </div>',
   '35-14 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def |   hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    opq    </div>',
   '35-15 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def  |  hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    opq    </div>',
   '35-16 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def   | hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    opq    </div>',
   '35-17 left word');
 
 selection_test(
@@ -135,25 +135,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij|    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    opq|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |opq    </div>',
   '35-21 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij |   opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    opq|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |opq    </div>',
   '35-22 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij  |  opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    opq|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |opq    </div>',
   '35-23 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij   | opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    opq|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |opq    </div>',
   '35-24 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_36.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_36.html
index c36b8c4f491e2b64ddb3d1777b6c048d08011461..ab286a7794730d39f97302b2a3c7ee601cb37cfc 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_36.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_36.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">|    abc    אבצ    def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    \u05D0\u05D1\u05E6    def    </div>',
   '36-0 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre"> |   abc    אבצ    def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    \u05D0\u05D1\u05E6    def    </div>',
   '36-1 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">  |  abc    אבצ    def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    \u05D0\u05D1\u05E6    def    </div>',
   '36-2 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">   | abc    אבצ    def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    \u05D0\u05D1\u05E6    def    </div>',
   '36-3 left word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc|    אבצ    def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
   '36-7 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc |   אבצ    def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
   '36-8 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc  |  אבצ    def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
   '36-9 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc   | אבצ    def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
   '36-10 left word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    אבצ|    def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    def|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
   '36-14 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    אבצ |   def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    def|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
   '36-15 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    אבצ  |  def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    def|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
   '36-16 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    אבצ   | def    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    def|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
   '36-17 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_37.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_37.html
index 946d1882d503c4800d1954669a5d996a01a640ff..169139ab00c8032d9a30338b7499b2d6bfd807f7 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_37.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_37.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">|    abc    def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-0 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre"> |   abc    def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-1 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">  |  abc    def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-2 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">   | abc    def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-3 left word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc|    def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |אבצ    דדפ    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    אבצ    דדפ    hij    opq    </div>',
   '37-7 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc |   def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-8 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc  |  def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-9 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc   | def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-10 left word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def|    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-14 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def |   אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-15 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def  |  אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-16 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def   | אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-17 left word');
 
 selection_test(
@@ -135,25 +135,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ|    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-21 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ |   דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-22 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ  |  דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-23 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ   | דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
   '37-24 left word');
 
 selection_test(
@@ -177,25 +177,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ    דדפ|    hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
   '37-28 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ    דדפ |   hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
   '37-29 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ    דדפ  |  hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
   '37-30 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ    דדפ   | hij    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
   '37-31 left word');
 
 selection_test(
@@ -219,25 +219,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ    דדפ    hij|    opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ    דדפ    hij    opq|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ    דדפ    hij    |opq    </div>',
   '37-35 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ    דדפ    hij |   opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
   '37-36 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ    דדפ    hij  |  opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
   '37-37 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    אבצ    דדפ    hij   | opq    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
   '37-38 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_38.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_38.html
index c507994a8b6dec35e24dab13fec367453c9b4a07..86adfaeb5d27ee78954a8e7c172e2d762c4e18cb 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_38.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_38.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">|    abc    def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-0 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre"> |   abc    def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-1 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">  |  abc    def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-2 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">   | abc    def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-3 left word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc|    def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-7 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc |   def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-8 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc  |  def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-9 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc   | def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-10 left word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def|    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-14 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def |   hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-15 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def  |  hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-16 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def   | hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-17 left word');
 
 selection_test(
@@ -135,25 +135,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij|    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-21 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij |   אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-22 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij  |  אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-23 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij   | אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-24 left word');
 
 selection_test(
@@ -177,25 +177,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ|    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-28 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ |   דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-29 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ  |  דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-30 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ   | דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-31 left word');
 
 selection_test(
@@ -219,25 +219,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ|    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-35 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ |   היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-36 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ  |  היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-37 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ   | היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '38-38 left word');
 
 selection_test(
@@ -261,25 +261,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח|    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
   '38-42 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח |   opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
   '38-43 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח  |  opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
   '38-44 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח   | opq    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
   '38-45 left word');
 
 selection_test(
@@ -303,25 +303,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq|    rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
   '38-49 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq |   rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
   '38-50 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq  |  rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
   '38-51 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq   | rst    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
   '38-52 left word');
 
 selection_test(
@@ -345,25 +345,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq    rst|    uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
   '38-56 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq    rst |   uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
   '38-57 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq    rst  |  uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
   '38-58 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq    rst   | uvw    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
   '38-59 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_39.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_39.html
index c97966cd604458ac5e0cb63bdb00c32f573451d1..f226688ac0e34f244e4eb6f9566a6a08b9cf58bb 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_39.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_39.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">|    אבצ    דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '39-0 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre"> |   אבצ    דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '39-1 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">  |  אבצ    דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '39-2 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">   | אבצ    דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '39-3 left word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ|    דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '39-7 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ |   דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '39-8 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ  |  דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '39-9 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ   | דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '39-10 left word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ|    חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '39-14 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ |   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '39-15 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ  |  חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '39-16 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ   | חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '39-17 left word');
 
 selection_test(
@@ -135,25 +135,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח|    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '39-21 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח |   ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '39-22 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח  |  ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '39-23 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח   | ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '39-24 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_40.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_40.html
index 6cc8c8ce2ff47af71c7393adb940ea2595a6c121..662c2cf6ee27c31f6d62511029fe6a5d5c9d05fb 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_40.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_40.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">|    אבצ    abc    דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4     </div>',
   '40-0 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre"> |   אבצ    abc    דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4     </div>',
   '40-1 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">  |  אבצ    abc    דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4     </div>',
   '40-2 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">   | אבצ    abc    דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4     </div>',
   '40-3 left word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ|    abc    דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
   '40-7 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ |   abc    דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
   '40-8 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ  |  abc    דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
   '40-9 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ   | abc    דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
   '40-10 left word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    abc|    דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4|     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
   '40-14 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    abc |   דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4|     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
   '40-15 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    abc  |  דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4|     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
   '40-16 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    abc   | דעפ     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4|     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
   '40-17 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_41.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_41.html
index c7dbf4a9fbdbe23f950b8fb361286b1b80799925..217bfe49dc27e800bfa9e1764c39a0b94526e9f9 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_41.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_41.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">|    אבצ    דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-0 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre"> |   אבצ    דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-1 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">  |  אבצ    דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-2 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">   | אבצ    דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-3 left word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ|    דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-7 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ |   דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-8 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ  |  דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-9 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ   | דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-10 left word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ|    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   |def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-14 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ |   abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   |def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-15 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ  |  abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   |def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-16 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ   | abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   |def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-17 left word');
 
 selection_test(
@@ -135,19 +135,19 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    abc|   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    abc   def   |חיח    ופק    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    abc   |def   חיח    ופק    </div>',
   '41-21 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    abc |  def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   |def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-22 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    abc  | def   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   |def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-23 left word');
 
 selection_test(
@@ -171,19 +171,19 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    abc   def|   חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-27 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    abc   def |  חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-28 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    abc   def  | חיח    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '41-29 left word');
 
 selection_test(
@@ -207,25 +207,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    abc   def   חיח|    ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '41-33 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    abc   def   חיח |   ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '41-34 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    abc   def   חיח  |  ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '41-35 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    abc   def   חיח   | ופק    </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '41-36 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_42.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_42.html
index 75e0c64c73ac848d05032b1da798b2140005f30b..ea3c172ccb1d857ca26eaf741e2ee7c96947a8e2 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_42.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_multi_space_42.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">|    אבצ    דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-0 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre"> |   אבצ    דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-1 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">  |  אבצ    דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-2 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">   | אבצ    דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-3 left word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ|    דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-7 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ |   דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-8 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ  |  דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-9 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ   | דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-10 left word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ|    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-14 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ |   חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-15 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ  |  חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-16 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ   | חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-17 left word');
 
 selection_test(
@@ -135,25 +135,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח|    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-21 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח |   abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-22 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח  |  abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-23 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח   | abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-24 left word');
 
 selection_test(
@@ -177,19 +177,19 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc|   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   |jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-28 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc |  def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   |jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-29 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc  | def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   |jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-30 left word');
 
 selection_test(
@@ -213,19 +213,19 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc   def|   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   |\u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   |jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-34 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc   def |  jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   |\u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   |jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-35 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc   def  | jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   |\u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   |jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-36 left word');
 
 selection_test(
@@ -249,19 +249,19 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih|   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  |\u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   |\u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-40 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih |  ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  |\u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   |\u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-41 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih  | ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  |\u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   |\u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-42 left word');
 
 selection_test(
@@ -285,13 +285,13 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih   ופק|  ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    |\u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  |\u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-46 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih   ופק | ופק    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    |\u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  |\u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '42-47 left word');
 
 selection_test(
@@ -315,25 +315,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih   ופק  ופק|    רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA|     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    |\u05E8\u05E1\u05EA     </div>',
   '42-51 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih   ופק  ופק |   רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA|     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    |\u05E8\u05E1\u05EA     </div>',
   '42-52 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih   ופק  ופק  |  רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA|     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    |\u05E8\u05E1\u05EA     </div>',
   '42-53 left word');
 
 selection_test(
   '<div contenteditable dir="rtl" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih   ופק  ופק   | רסת     </div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA|     </div>',
+  '<div contenteditable dir="rtl" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    |\u05E8\u05E1\u05EA     </div>',
   '42-54 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_11.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_11.html
index a189427ff0275c6884d3687e655e65364aea1afe..bb8e945fd2c40001690671cd2da365a873614a7f 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_11.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_11.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד| דעפ <span dir="ltr">abc def</span>ווש כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span dir="ltr">abc def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 |\u05D3\u05E2\u05E4 <span dir="ltr">abc def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '11-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד דעפ| <span dir="ltr">abc def</span>ווש כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="ltr">abc |def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span dir="ltr">abc def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '11-7 left word');
 
 selection_test(
@@ -81,7 +81,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד דעפ <span dir="ltr">abc| def</span>ווש כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">אבד דעפ <span dir="ltr">abc def</span>ווש |כטז</div>',
+  '<div contenteditable dir="rtl">אבד דעפ <span dir="ltr">abc |def</span>ווש כטז</div>',
   '11-12 left word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד דעפ <span dir="ltr">abc def</span>ווש| כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="ltr">abc def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6|</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="ltr">abc def</span>\u05D5\u05D5\u05E9 |\u05DB\u05D8\u05D6</div>',
   '11-20 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_13.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_13.html
index f9541f54fe6444c4634420433b920ba7756f980f..913edbbcb3fb79363f4abc1059e5679089419df4 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_13.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_13.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד| דעפ <span>abc def</span>ווש כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span>abc def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 |\u05D3\u05E2\u05E4 <span>abc def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '13-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד דעפ| <span>abc def</span>ווש כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>abc |def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span>abc def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '13-7 left word');
 
 selection_test(
@@ -81,7 +81,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד דעפ <span>abc| def</span>ווש כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">אבד דעפ <span>abc def</span>ווש |כטז</div>',
+  '<div contenteditable dir="rtl">אבד דעפ <span>abc |def</span>ווש כטז</div>',
   '13-12 left word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד דעפ <span>abc def</span>ווש| כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>abc def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6|</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>abc def</span>\u05D5\u05D5\u05E9 |\u05DB\u05D8\u05D6</div>',
   '13-20 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_15.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_15.html
index 254ef60fb7fb8fa40b16db09aa0b25a0e16e961f..cf9dfc759f37b2e7a7845228c45ced6551a052dd 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_15.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_15.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד| opq דעפ <span dir="ltr">abc אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq |\u05D3\u05E2\u05E4 <span dir="ltr">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 |opq \u05D3\u05E2\u05E4 <span dir="ltr">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '15-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq| דעפ <span dir="ltr">abc אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 |<span dir="ltr">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq |\u05D3\u05E2\u05E4 <span dir="ltr">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '15-7 left word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq דעפ| <span dir="ltr">abc אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="ltr">abc |\u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 |<span dir="ltr">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '15-11 left word');
 
 selection_test(
@@ -105,7 +105,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq דעפ <span dir="ltr">abc| אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="ltr">abc \u05D0\u05D0\u05D0 |def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="ltr">abc |\u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '15-16 left word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq דעפ <span dir="ltr">abc אאא| def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="ltr">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 |rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="ltr">abc \u05D0\u05D0\u05D0 |def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '15-20 left word');
 
 selection_test(
@@ -177,7 +177,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq דעפ <span dir="ltr">abc אאא def</span>ווש| rst כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="ltr">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst |\u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="ltr">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 |rst \u05DB\u05D8\u05D6</div>',
   '15-28 left word');
 
 selection_test(
@@ -201,7 +201,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq דעפ <span dir="ltr">abc אאא def</span>ווש rst| כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="ltr">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6|</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="ltr">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst |\u05DB\u05D8\u05D6</div>',
   '15-32 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_17.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_17.html
index 491590ed72e1f490080f00bd1933f4a1f53fcb73..120dc6607cdd43d397d3621c9a4b7d75d81ec231 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_17.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_17.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד| opq דעפ <span>abc אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq |\u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 |opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '17-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq| דעפ <span>abc אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 |<span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq |\u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '17-7 left word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq דעפ| <span>abc אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc |\u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 |<span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '17-11 left word');
 
 selection_test(
@@ -105,7 +105,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq דעפ <span>abc| אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 |def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc |\u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '17-16 left word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq דעפ <span>abc אאא| def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 |rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 |def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '17-20 left word');
 
 selection_test(
@@ -177,7 +177,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq דעפ <span>abc אאא def</span>ווש| rst כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst |\u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 |rst \u05DB\u05D8\u05D6</div>',
   '17-28 left word');
 
 selection_test(
@@ -201,7 +201,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq דעפ <span>abc אאא def</span>ווש rst| כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6|</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst |\u05DB\u05D8\u05D6</div>',
   '17-32 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_2.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_2.html
index 15c4e233daafb7a321a07fa81a37fd5a4570f214..f38f903823c798caeb249f2c038c8edc319be744 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_2.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_2.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא| <span>בב</span></div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 <span>\u05D1\u05D1|</span></div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 |<span>\u05D1\u05D1</span></div>',
   '2-3 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_20.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_20.html
index a81539b28dcf1f5e1245abe5731809aac58b3926..b56185d005b5c83585ec1fc2c5facf8f296ad042 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_20.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_20.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד| opq rst דעפ <span dir="ltr">abc uvw אאא def lmn</span>אבצ hij xyz וקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq |rst \u05D3\u05E2\u05E4 <span dir="ltr">abc uvw \u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 |opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc uvw \u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7</div>',
   '20-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq| rst דעפ <span dir="ltr">abc uvw אאא def lmn</span>אבצ hij xyz וקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">אבד opq rst |דעפ <span dir="ltr">abc uvw אאא def lmn</span>אבצ hij xyz וקק</div>',
+  '<div contenteditable dir="rtl">אבד opq |rst דעפ <span dir="ltr">abc uvw אאא def lmn</span>אבצ hij xyz וקק</div>',
   '20-7 left word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq rst| דעפ <span dir="ltr">abc uvw אאא def lmn</span>אבצ hij xyz וקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 |<span dir="ltr">abc uvw \u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst |\u05D3\u05E2\u05E4 <span dir="ltr">abc uvw \u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7</div>',
   '20-11 left word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq rst דעפ| <span dir="ltr">abc uvw אאא def lmn</span>אבצ hij xyz וקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc |uvw \u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 |<span dir="ltr">abc uvw \u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7</div>',
   '20-15 left word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq rst דעפ <span dir="ltr">abc| uvw אאא def lmn</span>אבצ hij xyz וקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc uvw |\u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc |uvw \u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7</div>',
   '20-20 left word');
 
 selection_test(
@@ -153,7 +153,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq rst דעפ <span dir="ltr">abc uvw| אאא def lmn</span>אבצ hij xyz וקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc uvw \u05D0\u05D0\u05D0 |def lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc uvw |\u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7</div>',
   '20-24 left word');
 
 selection_test(
@@ -177,7 +177,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq rst דעפ <span dir="ltr">abc uvw אאא| def lmn</span>אבצ hij xyz וקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc uvw \u05D0\u05D0\u05D0 def |lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc uvw \u05D0\u05D0\u05D0 |def lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7</div>',
   '20-28 left word');
 
 selection_test(
@@ -201,7 +201,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq rst דעפ <span dir="ltr">abc uvw אאא def| lmn</span>אבצ hij xyz וקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc uvw \u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 |hij xyz \u05D5\u05E7\u05E7</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc uvw \u05D0\u05D0\u05D0 def |lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7</div>',
   '20-32 left word');
 
 selection_test(
@@ -249,7 +249,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq rst דעפ <span dir="ltr">abc uvw אאא def lmn</span>אבצ| hij xyz וקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc uvw \u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 hij |xyz \u05D5\u05E7\u05E7</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc uvw \u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 |hij xyz \u05D5\u05E7\u05E7</div>',
   '20-40 left word');
 
 selection_test(
@@ -273,7 +273,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq rst דעפ <span dir="ltr">abc uvw אאא def lmn</span>אבצ hij| xyz וקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">אבד opq rst דעפ <span dir="ltr">abc uvw אאא def lmn</span>אבצ hij xyz |וקק</div>',
+  '<div contenteditable dir="rtl">אבד opq rst דעפ <span dir="ltr">abc uvw אאא def lmn</span>אבצ hij |xyz וקק</div>',
   '20-44 left word');
 
 selection_test(
@@ -297,7 +297,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד opq rst דעפ <span dir="ltr">abc uvw אאא def lmn</span>אבצ hij xyz| וקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc uvw \u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 hij xyz \u05D5\u05E7\u05E7|</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 opq rst \u05D3\u05E2\u05E4 <span dir="ltr">abc uvw \u05D0\u05D0\u05D0 def lmn</span>\u05D0\u05D1\u05E6 hij xyz |\u05D5\u05E7\u05E7</div>',
   '20-48 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_4.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_4.html
index 46f20d36e9e7f9532b0b465aa379f9db103d224a..a14184a4bb6e2649dc769803c698d2abd48ef4f3 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_4.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_4.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc| def <span>hij opq</span> rst uvw</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def |<span>hij opq</span> rst uvw</div>',
+  '<div contenteditable dir="rtl">abc |def <span>hij opq</span> rst uvw</div>',
   '4-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def| <span>hij opq</span> rst uvw</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def <span>hij |opq</span> rst uvw</div>',
+  '<div contenteditable dir="rtl">abc def |<span>hij opq</span> rst uvw</div>',
   '4-7 left word');
 
 selection_test(
@@ -81,7 +81,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def <span>hij| opq</span> rst uvw</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def <span>hij opq</span> |rst uvw</div>',
+  '<div contenteditable dir="rtl">abc def <span>hij |opq</span> rst uvw</div>',
   '4-12 left word');
 
 selection_test(
@@ -105,13 +105,13 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def <span>hij opq|</span> rst uvw</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def <span>hij opq</span> rst |uvw</div>',
+  '<div contenteditable dir="rtl">abc def <span>hij opq</span> |rst uvw</div>',
   '4-16 left word');
 
 selection_test(
   '<div contenteditable dir="rtl">abc def <span>hij opq</span>| rst uvw</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def <span>hij opq</span> rst |uvw</div>',
+  '<div contenteditable dir="rtl">abc def <span>hij opq</span> |rst uvw</div>',
   '4-17 left word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def <span>hij opq</span> rst| uvw</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def <span>hij opq</span> rst uvw|</div>',
+  '<div contenteditable dir="rtl">abc def <span>hij opq</span> rst |uvw</div>',
   '4-21 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_5.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_5.html
index 33b0291c47eb1d7db323baf4f5f298945c247851..691d3c686f1276f86e108939756991a5f2c438df 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_5.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_5.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc| def <span dir="ltr">hij opq</span> rst uvw</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def |<span dir="ltr">hij opq</span> rst uvw</div>',
+  '<div contenteditable dir="rtl">abc |def <span dir="ltr">hij opq</span> rst uvw</div>',
   '5-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def| <span dir="ltr">hij opq</span> rst uvw</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def <span dir="ltr">hij |opq</span> rst uvw</div>',
+  '<div contenteditable dir="rtl">abc def |<span dir="ltr">hij opq</span> rst uvw</div>',
   '5-7 left word');
 
 selection_test(
@@ -81,7 +81,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def <span dir="ltr">hij| opq</span> rst uvw</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> |rst uvw</div>',
+  '<div contenteditable dir="rtl">abc def <span dir="ltr">hij |opq</span> rst uvw</div>',
   '5-12 left word');
 
 selection_test(
@@ -105,13 +105,13 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq|</span> rst uvw</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rst |uvw</div>',
+  '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> |rst uvw</div>',
   '5-16 left word');
 
 selection_test(
   '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span>| rst uvw</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rst |uvw</div>',
+  '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> |rst uvw</div>',
   '5-17 left word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rst| uvw</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rst uvw|</div>',
+  '<div contenteditable dir="rtl">abc def <span dir="ltr">hij opq</span> rst |uvw</div>',
   '5-21 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_7.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_7.html
index 154eebc7fd9f186c6f38b74aaa244e5dd06134e9..0df1809682d24068c2d2b9076e6a52db13b3e5d5 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_7.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_7.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד| דעפ <span dir="ltr">היח ופק</span>ווש כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span dir="ltr">\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 |\u05D3\u05E2\u05E4 <span dir="ltr">\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '7-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד דעפ| <span dir="ltr">היח ופק</span>ווש כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="ltr">\u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span dir="ltr">\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '7-7 left word');
 
 selection_test(
@@ -81,7 +81,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד דעפ <span dir="ltr">היח| ופק</span>ווש כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="ltr">\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 |\u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="ltr">\u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '7-12 left word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד דעפ <span dir="ltr">היח ופק</span>ווש| כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="ltr">\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6|</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="ltr">\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 |\u05DB\u05D8\u05D6</div>',
   '7-20 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_9.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_9.html
index 340d4e45f9a883e1048d1aa68e8ab0c1ab083dd8..7bc7dee05fb53da7c7ed6d5e1ee577184c5af4cc 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_9.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_inline_element_9.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד| דעפ <span>היח ופק</span>ווש כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span>\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 |\u05D3\u05E2\u05E4 <span>\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '9-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד דעפ| <span>היח ופק</span>ווש כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>\u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span>\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '9-7 left word');
 
 selection_test(
@@ -81,7 +81,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד דעפ <span>היח| ופק</span>ווש כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 |\u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>\u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '9-12 left word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אבד דעפ <span>היח ופק</span>ווש| כטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6|</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 |\u05DB\u05D8\u05D6</div>',
   '9-20 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_10.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_10.html
index 79c63cbeb3bc8532472a25d3928672aee1dd09d8..0ea04e4a5349c81db1467a81025eb22c085dfb51 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_10.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_10.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">aaa| אאא bbb</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">aaa \u05D0\u05D0\u05D0 |bbb</div>',
+  '<div contenteditable dir="rtl">aaa |\u05D0\u05D0\u05D0 bbb</div>',
   '10-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">aaa אאא| bbb</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">aaa \u05D0\u05D0\u05D0 bbb|</div>',
+  '<div contenteditable dir="rtl">aaa \u05D0\u05D0\u05D0 |bbb</div>',
   '10-7 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_12.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_12.html
index 30a4377b78d4d694a70d7639b77d4d6a13f9622d..96f8cdfd5ec8e498dde31c1b2a6c551e10b0bb5b 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_12.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_12.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 |\u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 |\u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '12-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 |aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 |\u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '12-7 left word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא בבב צצצ| aaa bbb ccc דדד עעע פפפ</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa |bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 |aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '12-11 left word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb |ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa |bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '12-15 left word');
 
 selection_test(
@@ -123,7 +123,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc |\u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb |ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '12-19 left word');
 
 selection_test(
@@ -147,7 +147,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc| דדד עעע פפפ</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 |\u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc |\u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '12-23 left word');
 
 selection_test(
@@ -171,7 +171,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד| עעע פפפ</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 |\u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 |\u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '12-27 left word');
 
 selection_test(
@@ -195,7 +195,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4|</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 |\u05E4\u05E4\u05E4</div>',
   '12-31 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_14.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_14.html
index 7f68652dc94da84644bb08ec3d317d7b12abe911..3d9bd05c6fbfad7ce7912ae515bcbcc908959f64 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_14.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_14.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא| בבב aaa bbb צצצ דדד</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 |aaa bbb \u05E6\u05E6\u05E6 \u05D3\u05D3\u05D3</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 |\u05D1\u05D1\u05D1 aaa bbb \u05E6\u05E6\u05E6 \u05D3\u05D3\u05D3</div>',
   '14-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא בבב| aaa bbb צצצ דדד</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 aaa |bbb \u05E6\u05E6\u05E6 \u05D3\u05D3\u05D3</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 |aaa bbb \u05E6\u05E6\u05E6 \u05D3\u05D3\u05D3</div>',
   '14-7 left word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא בבב aaa| bbb צצצ דדד</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">אאא בבב aaa bbb |צצצ דדד</div>',
+  '<div contenteditable dir="rtl">אאא בבב aaa |bbb צצצ דדד</div>',
   '14-11 left word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא בבב aaa bbb| צצצ דדד</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 aaa bbb \u05E6\u05E6\u05E6 |\u05D3\u05D3\u05D3</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 aaa bbb |\u05E6\u05E6\u05E6 \u05D3\u05D3\u05D3</div>',
   '14-15 left word');
 
 selection_test(
@@ -123,13 +123,13 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ| דדד</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 aaa bbb \u05E6\u05E6\u05E6 \u05D3\u05D3\u05D3|</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 aaa bbb \u05E6\u05E6\u05E6 |\u05D3\u05D3\u05D3</div>',
   '14-19 left word');
 
 selection_test(
   '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ |דדד</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">אאא בבב aaa bbb צצצ דדד|</div>',
+  '<div contenteditable dir="rtl">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 aaa bbb \u05E6\u05E6\u05E6 \u05D3\u05D3\u05D3|</div>',
   '14-20 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_16.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_16.html
index d8ba50381e3acdc620ae8511f7602b5016a7cc62..bbcdea2026422fa08577ea78051be7232e905ecb 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_16.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_16.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">שנב| abc סטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05E9\u05E0\u05D1 abc |\u05E1\u05D8\u05D6</div>',
+  '<div contenteditable dir="rtl">\u05E9\u05E0\u05D1 |abc \u05E1\u05D8\u05D6</div>',
   '16-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">שנב abc| סטז</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05E9\u05E0\u05D1 abc \u05E1\u05D8\u05D6|</div>',
+  '<div contenteditable dir="rtl">\u05E9\u05E0\u05D1 abc |\u05E1\u05D8\u05D6</div>',
   '16-7 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_2.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_2.html
index 78a7c787b29d96d37916c94fd373596150d82dff..8b958043a4b0c94e19ceb53b1d89710760caadd3 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_2.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_2.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc| def hij opq rst</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def |hij opq rst</div>',
+  '<div contenteditable dir="rtl">abc |def hij opq rst</div>',
   '2-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def| hij opq rst</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def hij |opq rst</div>',
+  '<div contenteditable dir="rtl">abc def |hij opq rst</div>',
   '2-7 left word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def hij| opq rst</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def hij opq |rst</div>',
+  '<div contenteditable dir="rtl">abc def hij |opq rst</div>',
   '2-11 left word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def hij opq| rst</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def hij opq rst|</div>',
+  '<div contenteditable dir="rtl">abc def hij opq |rst</div>',
   '2-15 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_4.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_4.html
index 5fafec3d7e284b000b8ab41525bfbb56f6c5b0f1..89764e9c360c31b21e32d1bd830559a0386883fe 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_4.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_4.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">ששש| נננ בבב גגג קקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 |\u05D1\u05D1\u05D1 \u05D2\u05D2\u05D2 \u05E7\u05E7\u05E7</div>',
+  '<div contenteditable dir="rtl">\u05E9\u05E9\u05E9 |\u05E0\u05E0\u05E0 \u05D1\u05D1\u05D1 \u05D2\u05D2\u05D2 \u05E7\u05E7\u05E7</div>',
   '4-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">ששש נננ| בבב גגג קקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 \u05D1\u05D1\u05D1 |\u05D2\u05D2\u05D2 \u05E7\u05E7\u05E7</div>',
+  '<div contenteditable dir="rtl">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 |\u05D1\u05D1\u05D1 \u05D2\u05D2\u05D2 \u05E7\u05E7\u05E7</div>',
   '4-7 left word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">ששש נננ בבב| גגג קקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 \u05D1\u05D1\u05D1 \u05D2\u05D2\u05D2 |\u05E7\u05E7\u05E7</div>',
+  '<div contenteditable dir="rtl">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 \u05D1\u05D1\u05D1 |\u05D2\u05D2\u05D2 \u05E7\u05E7\u05E7</div>',
   '4-11 left word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">ששש נננ בבב גגג| קקק</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 \u05D1\u05D1\u05D1 \u05D2\u05D2\u05D2 \u05E7\u05E7\u05E7|</div>',
+  '<div contenteditable dir="rtl">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 \u05D1\u05D1\u05D1 \u05D2\u05D2\u05D2 |\u05E7\u05E7\u05E7</div>',
   '4-15 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_6.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_6.html
index fb038497b7a04e2fbc32c8cf2fb65208f2d70f13..ac7f32aab189ca1b86b5ece9394a31019244d88c 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_6.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_6.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc| def hij אאא בבב צצצ opr uvw xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def |hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
+  '<div contenteditable dir="rtl">abc |def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
   '6-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def| hij אאא בבב צצצ opr uvw xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def hij |\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
+  '<div contenteditable dir="rtl">abc def |hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
   '6-7 left word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def hij| אאא בבב צצצ opr uvw xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def hij \u05D0\u05D0\u05D0 |\u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
+  '<div contenteditable dir="rtl">abc def hij |\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
   '6-11 left word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def hij אאא| בבב צצצ opr uvw xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 |\u05E6\u05E6\u05E6 opr uvw xyz</div>',
+  '<div contenteditable dir="rtl">abc def hij \u05D0\u05D0\u05D0 |\u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
   '6-15 left word');
 
 selection_test(
@@ -123,7 +123,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def hij אאא בבב| צצצ opr uvw xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 |opr uvw xyz</div>',
+  '<div contenteditable dir="rtl">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 |\u05E6\u05E6\u05E6 opr uvw xyz</div>',
   '6-19 left word');
 
 selection_test(
@@ -147,7 +147,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ| opr uvw xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr |uvw xyz</div>',
+  '<div contenteditable dir="rtl">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 |opr uvw xyz</div>',
   '6-23 left word');
 
 selection_test(
@@ -171,7 +171,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr| uvw xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw |xyz</div>',
+  '<div contenteditable dir="rtl">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr |uvw xyz</div>',
   '6-27 left word');
 
 selection_test(
@@ -195,7 +195,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def hij אאא בבב צצצ opr uvw| xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz|</div>',
+  '<div contenteditable dir="rtl">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw |xyz</div>',
   '6-31 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_8.html b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_8.html
index 60c653c6dccf04ef4bc20b418eededba4c878e6a..af05061616fd723972f8bafbe7d4fcd0c4ed2759 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_8.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_left_word_visually_single_space_one_element_8.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc| def שנב סטז uvw xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def |שנב סטז uvw xyz</div>',
+  '<div contenteditable dir="rtl">abc |def שנב סטז uvw xyz</div>',
   '8-3 left word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def| שנב סטז uvw xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def \u05E9\u05E0\u05D1 |\u05E1\u05D8\u05D6 uvw xyz</div>',
+  '<div contenteditable dir="rtl">abc def |\u05E9\u05E0\u05D1 \u05E1\u05D8\u05D6 uvw xyz</div>',
   '8-7 left word');
 
 selection_test(
@@ -75,13 +75,13 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def שנב| סטז uvw xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def \u05E9\u05E0\u05D1 \u05E1\u05D8\u05D6 |uvw xyz</div>',
+  '<div contenteditable dir="rtl">abc def \u05E9\u05E0\u05D1 |\u05E1\u05D8\u05D6 uvw xyz</div>',
   '8-11 left word');
 
 selection_test(
   '<div contenteditable dir="rtl">abc def שנב |סטז uvw xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def שנב סטז |uvw xyz</div>',
+  '<div contenteditable dir="rtl">abc def \u05E9\u05E0\u05D1 \u05E1\u05D8\u05D6 |uvw xyz</div>',
   '8-12 left word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def שנב סטז| uvw xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def \u05E9\u05E0\u05D1 \u05E1\u05D8\u05D6 uvw |xyz</div>',
+  '<div contenteditable dir="rtl">abc def \u05E9\u05E0\u05D1 \u05E1\u05D8\u05D6 |uvw xyz</div>',
   '8-15 left word');
 
 selection_test(
@@ -123,7 +123,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="rtl">abc def שנב סטז uvw| xyz</div>',
   selection => selection.modify('move', 'left', 'word'),
-  '<div contenteditable dir="rtl">abc def שנב סטז uvw xyz|</div>',
+  '<div contenteditable dir="rtl">abc def שנב סטז uvw |xyz</div>',
   '8-19 left word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_01_ltr_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_01_ltr_multi_line.html
index c4c20db19fe34b77f876d02d24117b0f82663de7..b3b4c8025b8ae8939c8f179323d58390504453ef 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_01_ltr_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_01_ltr_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc def|<br><br><br>uvw xyz</div>'
-      : '<div contenteditable dir="ltr">abc def|<br><br><br>uvw xyz</div>',
+      : '<div contenteditable dir="ltr">abc |def<br><br><br>uvw xyz</div>',
   '1-3 ltr right word');
 
 selection_test(
@@ -117,7 +117,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc def<br><br><br>uvw xyz|</div>'
-      : '<div contenteditable dir="ltr">abc def<br><br><br>uvw xyz|</div>',
+      : '<div contenteditable dir="ltr">abc def<br><br><br>uvw |xyz</div>',
   '1-13 ltr right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_02_ltr_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_02_ltr_multi_line.html
index 12c7d0f563b06792188778ea885938eb6ad95099..3e8a9cfe57067d5e141d8cfa15596de9a9ed926d 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_02_ltr_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_02_ltr_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc def|<div><br></div><div><br></div><div><br></div>uvw xyz</div>'
-      : '<div contenteditable dir="ltr">abc def|<div><br></div><div><br></div><div><br></div>uvw xyz</div>',
+      : '<div contenteditable dir="ltr">abc |def<div><br></div><div><br></div><div><br></div>uvw xyz</div>',
   '2-3 ltr right word');
 
 selection_test(
@@ -165,7 +165,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc def<div><br></div><div><br></div><div><br></div>uvw xyz|</div>'
-      : '<div contenteditable dir="ltr">abc def<div><br></div><div><br></div><div><br></div>uvw xyz|</div>',
+      : '<div contenteditable dir="ltr">abc def<div><br></div><div><br></div><div><br></div>uvw |xyz</div>',
   '2-19 ltr right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_03_ltr_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_03_ltr_multi_line.html
index b7b8634d8ed413a85e0b24b156fcb34620aaaf7b..50c937cc3caaba8e03be29b89585ea3944e3fb17 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_03_ltr_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_03_ltr_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|<br><br><br>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|<br><br><br>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0<br><br><br>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '3-3 ltr right word');
 
 selection_test(
@@ -115,7 +115,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<br><br><br>\u05D0\u05D0\u05D0| \u05D0\u05D0\u05D0</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<br><br><br>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|</div>',
+  isMac
+      ? '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<br><br><br>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|</div>'
+      : '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<br><br><br>\u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0</div>',
   '3-13 ltr right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_04_ltr_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_04_ltr_multi_line.html
index 4f21d8ccc055e95c375417ae791be3187b95d114..8544f4258e7e704706fa714cbde076bf0f62e245 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_04_ltr_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_04_ltr_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|<div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|<div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0<div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '4-3 ltr right word');
 
 selection_test(
@@ -163,7 +163,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0| \u05D0\u05D0\u05D0</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|</div>',
+  isMac
+      ? '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|</div>'
+      : '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0<div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0</div>',
   '4-19 ltr right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_05_ltr_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_05_ltr_multi_line.html
index 9c064bfa0e44845f39d604ea4cce61dcea20105d..c43c44d3ba01693ecd43e7fea400e69475a1347c 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_05_ltr_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_05_ltr_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0| hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 |hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc |\u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
   '5-3 ltr right word');
 
 selection_test(
@@ -69,7 +69,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij| \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij |\u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 |hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
   '5-7 ltr right word');
 
 selection_test(
@@ -101,7 +101,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0| xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 |xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij |\u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
   '5-11 ltr right word');
 
 selection_test(
@@ -133,7 +133,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz|<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz|<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 |xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
   '5-15 ltr right word');
 
 selection_test(
@@ -221,7 +221,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj| \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj |\u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 |kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
   '5-26 ltr right word');
 
 selection_test(
@@ -245,7 +245,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0| opq \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 |opq \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj |\u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0</div>',
   '5-29 ltr right word');
 
 selection_test(
@@ -277,7 +277,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq| \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq |\u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 |opq \u05D0\u05D0\u05D0</div>',
   '5-33 ltr right word');
 
 selection_test(
@@ -309,7 +309,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0|</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq \u05D0\u05D0\u05D0|</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 xyz<br><br><br>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 opq |\u05D0\u05D0\u05D0</div>',
   '5-37 ltr right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_06_ltr_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_06_ltr_multi_line.html
index bcc3cd3c278324ecee359adebd8d7decda001dc2..e5fd9ce8b896846ea12234aab6b14f709e0d8166 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_06_ltr_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_06_ltr_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0| hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 |hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc |\u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-3 ltr right word');
 
 selection_test(
@@ -69,7 +69,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij| \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij |\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 |hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-7 ltr right word');
 
 selection_test(
@@ -101,7 +101,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0| \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij |\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-11 ltr right word');
 
 selection_test(
@@ -133,7 +133,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0| uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 |uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-15 ltr right word');
 
 selection_test(
@@ -165,7 +165,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw| xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw |xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 |uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-19 ltr right word');
 
 selection_test(
@@ -197,7 +197,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz| <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz| <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw |xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-23 ltr right word');
 
 selection_test(
@@ -333,7 +333,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj| \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj |\u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 |kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-40 ltr right word');
 
 selection_test(
@@ -357,7 +357,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0| mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 |mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj |\u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-43 ltr right word');
 
 selection_test(
@@ -389,7 +389,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn| opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn |opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 |mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-47 ltr right word');
 
 selection_test(
@@ -413,7 +413,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq| \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq |\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn |opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-50 ltr right word');
 
 selection_test(
@@ -445,7 +445,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0| \u05D0\u05D0\u05D0</div>'
-      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0</div>',
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq |\u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0</div>',
   '6-54 ltr right word');
 
 selection_test(
@@ -475,7 +475,9 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0| \u05D0\u05D0\u05D0</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|</div>',
+  isMac
+      ? '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0|</div>'
+      : '<div contenteditable dir="ltr">abc \u05D0\u05D0\u05D0 hij \u05D0\u05D0\u05D0 \u05D0\u05D0\u05D0 uvw xyz <div><br></div><div><br></div><div><br></div>\u05D0\u05D0\u05D0 kj \u05D0\u05D0\u05D0 mn opq \u05D0\u05D0\u05D0 |\u05D0\u05D0\u05D0</div>',
   '6-58 ltr right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_07_ltr_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_07_ltr_multi_line.html
index 922e71eb7e2e23b41d7ccc25dab175cab1d2fd0d..5695c373ddec35828b2df5ca10441a62a09ee8f3 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_07_ltr_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_07_ltr_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc ghi|<div></div><div></div><div></div>opq xyz</div>'
-      : '<div contenteditable dir="ltr">abc ghi|<div></div><div></div><div></div>opq xyz</div>',
+      : '<div contenteditable dir="ltr">abc |ghi<div></div><div></div><div></div>opq xyz</div>',
   '7-3 ltr right word');
 
 selection_test(
@@ -141,7 +141,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc ghi<div></div><div></div><div></div>opq xyz|</div>'
-      : '<div contenteditable dir="ltr">abc ghi<div></div><div></div><div></div>opq xyz|</div>',
+      : '<div contenteditable dir="ltr">abc ghi<div></div><div></div><div></div>opq |xyz</div>',
   '7-16 ltr right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_08_ltr_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_08_ltr_multi_line.html
index 5169d2a48e229d57e69eee04fe4f3ae1f2a1dacc..73ef884840f60f5ae5500d97c847e453729ca308 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_08_ltr_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_08_ltr_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc ghi|<div></div><div></div><div></div></div>'
-      : '<div contenteditable dir="ltr">abc ghi|<div></div><div></div><div></div></div>',
+      : '<div contenteditable dir="ltr">abc |ghi<div></div><div></div><div></div></div>',
   '8-3 ltr right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_09_ltr_multi_line.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_09_ltr_multi_line.html
index ea9e0cbca365fba92d2dba5c6cf340a1eb40c994..58ed0b063bfff8e4b994c1a050c7f6ccd4dcc064 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_09_ltr_multi_line.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_09_ltr_multi_line.html
@@ -37,7 +37,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc ghi|<div><img src="../../resources/abe.png"></div><div></div><div></div>opq rst</div>'
-      : '<div contenteditable dir="ltr">abc ghi|<div><img src="../../resources/abe.png"></div><div></div><div></div>opq rst</div>',
+      : '<div contenteditable dir="ltr">abc |ghi<div><img src="../../resources/abe.png"></div><div></div><div></div>opq rst</div>',
   '9-3 ltr right word');
 
 selection_test(
@@ -149,7 +149,7 @@ selection_test(
   selection => selection.modify('move', 'right', 'word'),
   isMac
       ? '<div contenteditable dir="ltr">abc ghi<div><img src="../../resources/abe.png"></div><div></div><div></div>opq rst|</div>'
-      : '<div contenteditable dir="ltr">abc ghi<div><img src="../../resources/abe.png"></div><div></div><div></div>opq rst|</div>',
+      : '<div contenteditable dir="ltr">abc ghi<div><img src="../../resources/abe.png"></div><div></div><div></div>opq |rst</div>',
   '9-17 ltr right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_inline_block_positioned_element_1.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_inline_block_positioned_element_1.html
index 9593516d083b00628dd5107e725aa1d889ef7357..b2cab5070544b98a0b5fea1157f1ec91a6d07afc 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_inline_block_positioned_element_1.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_inline_block_positioned_element_1.html
@@ -39,7 +39,7 @@ selection_test(
 selection_test(
   '<div contenteditable style="width:2000px; height:2000px"><div>begin| start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable style="width:2000px; height:2000px"><div>begin start|</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
+  '<div contenteditable style="width:2000px; height:2000px"><div>begin |start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   '1-5 right word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc| def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def|</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
+  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc |def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   '1-15 right word');
 
 selection_test(
@@ -147,7 +147,7 @@ selection_test(
 selection_test(
   '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end| ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing|</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
+  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end |ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   '1-23 right word');
 
 selection_test(
@@ -201,7 +201,7 @@ selection_test(
 selection_test(
   '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this| is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is |float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
+  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this |is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   '1-32 right word');
 
 selection_test(
@@ -219,7 +219,7 @@ selection_test(
 selection_test(
   '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is| float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float|</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
+  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is |float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   '1-35 right word');
 
 selection_test(
@@ -285,7 +285,7 @@ selection_test(
 selection_test(
   '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this| is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is |fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
+  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this |is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   '1-46 right word');
 
 selection_test(
@@ -303,7 +303,7 @@ selection_test(
 selection_test(
   '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is| fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed|</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
+  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is |fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   '1-49 right word');
 
 selection_test(
@@ -369,7 +369,7 @@ selection_test(
 selection_test(
   '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this| is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is |relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
+  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this |is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   '1-60 right word');
 
 selection_test(
@@ -387,7 +387,7 @@ selection_test(
 selection_test(
   '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is| relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative|</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
+  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is |relative</div><div style="position:absolute; left:100px; top:150px">this is absolute</div></div>',
   '1-63 right word');
 
 selection_test(
@@ -471,7 +471,7 @@ selection_test(
 selection_test(
   '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this| is absolute</div></div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is |absolute</div></div>',
+  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this |is absolute</div></div>',
   '1-77 right word');
 
 selection_test(
@@ -489,7 +489,7 @@ selection_test(
 selection_test(
   '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is| absolute</div></div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is absolute|</div></div>',
+  '<div contenteditable style="width:2000px; height:2000px"><div>begin start</div><div style="display:inline-block">abc def</div><div>end ing</div><div style="float:left">this is float</div><div style="position:fixed; top:30px; right:5px">this is fixed</div><div style="position:relative; left:20px">this is relative</div><div style="position:absolute; left:100px; top:150px">this is |absolute</div></div>',
   '1-80 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_1.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_1.html
index 70f657e89efe79f679519b1cb171d8d013634a30..0beedceeb59a9739b6be61de66a28056229dab9d 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_1.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_1.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc| def    hij opq</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def |   hij opq</div>',
+  '<div contenteditable dir="ltr">abc |def    hij opq</div>',
   '1-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def|    hij opq</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def    hij |opq</div>',
+  '<div contenteditable dir="ltr">abc def |   hij opq</div>',
   '1-7 right word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def    hij| opq</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def    hij opq|</div>',
+  '<div contenteditable dir="ltr">abc def    hij |opq</div>',
   '1-14 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_10.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_10.html
index 04fba65ee8d00a74e3993c151a9156100e6f5db1..2b357523b93a2867057db87f61277ee8210d34ec 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_10.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_10.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבצ| דעפ    היח ופק</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |   \u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</div>',
   '10-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבצ דעפ|    היח ופק</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |   \u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</div>',
   '10-7 right word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבצ דעפ    היח| ופק</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7|</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</div>',
   '10-14 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_11.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_11.html
index ade95748fbd71c3fc67aa9fece8afa5b84329525..0e6677f68511ed63bc96f96257a21a8c41d17da4 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_11.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_11.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבצ| דעפ היח    abc def hij</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    abc def hij</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc def hij</div>',
   '11-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבצ דעפ| היח    abc def hij</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7 |   abc def hij</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    abc def hij</div>',
   '11-7 right word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבצ דעפ היח|    abc def hij</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc |def hij</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7 |   abc def hij</div>',
   '11-11 right word');
 
 selection_test(
@@ -117,7 +117,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבצ דעפ היח    abc| def hij</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc def |hij</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc |def hij</div>',
   '11-18 right word');
 
 selection_test(
@@ -141,7 +141,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבצ דעפ היח    abc def| hij</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc def hij|</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc def |hij</div>',
   '11-22 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_12.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_12.html
index d40815168999b3097fddcf8dd4f9893f4d558b9a..d3e4298d143d1195a359cfda4f782779411e28df 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_12.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_12.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc| def hij    אבצ דעפ היח    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def |hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
+  '<div contenteditable dir="ltr">abc |def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
   '12-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def| hij    אבצ דעפ היח    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij |   \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
+  '<div contenteditable dir="ltr">abc def |hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
   '12-7 right word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij|    אבצ דעפ היח    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij    \u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
+  '<div contenteditable dir="ltr">abc def hij |   \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
   '12-11 right word');
 
 selection_test(
@@ -117,7 +117,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij    אבצ| דעפ היח    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    opq rst uvw</div>',
+  '<div contenteditable dir="ltr">abc def hij    \u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
   '12-18 right word');
 
 selection_test(
@@ -141,7 +141,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij    אבצ דעפ| היח    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7 |   opq rst uvw</div>',
+  '<div contenteditable dir="ltr">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    opq rst uvw</div>',
   '12-22 right word');
 
 selection_test(
@@ -165,7 +165,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij    אבצ דעפ היח|    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq |rst uvw</div>',
+  '<div contenteditable dir="ltr">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7 |   opq rst uvw</div>',
   '12-26 right word');
 
 selection_test(
@@ -207,7 +207,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij    אבצ דעפ היח    opq| rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst |uvw</div>',
+  '<div contenteditable dir="ltr">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq |rst uvw</div>',
   '12-33 right word');
 
 selection_test(
@@ -231,7 +231,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij    אבצ דעפ היח    opq rst| uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw|</div>',
+  '<div contenteditable dir="ltr">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst |uvw</div>',
   '12-37 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_2.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_2.html
index 307c950f5fddaebf7d70dbd16f946dd0a70cc4f8..1e75ba55c3239e3ecc50f028925b47c1e04d323b 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_2.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_2.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc|    def    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def |   hij    opq    </div>',
+  '<div contenteditable dir="ltr">    abc |   def    hij    opq    </div>',
   '2-7 right word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    def|    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def    hij |   opq    </div>',
+  '<div contenteditable dir="ltr">    abc    def |   hij    opq    </div>',
   '2-14 right word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    def    hij|    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def    hij    opq|    </div>',
+  '<div contenteditable dir="ltr">    abc    def    hij |   opq    </div>',
   '2-21 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_22.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_22.html
index 9c9cf8565ca91b22cf5042b14e82e6c599379088..52c06b81912b99ffcebc5342bc7388d72d738278 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_22.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_22.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc| def    hij opq</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def    |hij opq</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc |def    hij opq</div>',
   '22-3 right word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def|    hij opq</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def    hij |opq</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def    |hij opq</div>',
   '22-7 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def |   hij opq</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def    hij |opq</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def    |hij opq</div>',
   '22-8 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def  |  hij opq</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def    hij |opq</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def    |hij opq</div>',
   '22-9 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def   | hij opq</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def    hij |opq</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def    |hij opq</div>',
   '22-10 right word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def    hij| opq</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def    hij opq|</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def    hij |opq</div>',
   '22-14 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_23.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_23.html
index 46e58a174e6871f88c85cbd70334cb3547d8a699..40cb39ecaeee759328cb0cfecf32a7d565d1a8e7 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_23.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_23.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">|    abc    def    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    hij    opq    </div>',
   '23-0 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre"> |   abc    def    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    hij    opq    </div>',
   '23-1 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">  |  abc    def    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    hij    opq    </div>',
   '23-2 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">   | abc    def    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    hij    opq    </div>',
   '23-3 right word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc|    def    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
   '23-7 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc |   def    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
   '23-8 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc  |  def    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
   '23-9 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc   | def    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    opq    </div>',
   '23-10 right word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def|    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
   '23-14 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def |   hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
   '23-15 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def  |  hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
   '23-16 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def   | hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    opq    </div>',
   '23-17 right word');
 
 selection_test(
@@ -135,25 +135,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij|    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
   '23-21 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij |   opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
   '23-22 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij  |  opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
   '23-23 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij   | opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    opq|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |opq    </div>',
   '23-24 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_24.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_24.html
index 18be46846c4be955abc83ce96d8e95e6e95ea300..d90589475424e621fa3a3390ce227d2a2fcb4347 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_24.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_24.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">|    abc    אבצ    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    \u05D0\u05D1\u05E6    def    </div>',
   '24-0 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre"> |   abc    אבצ    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    \u05D0\u05D1\u05E6    def    </div>',
   '24-1 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">  |  abc    אבצ    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    \u05D0\u05D1\u05E6    def    </div>',
   '24-2 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">   | abc    אבצ    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    \u05D0\u05D1\u05E6    def    </div>',
   '24-3 right word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc|    אבצ    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
   '24-7 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc |   אבצ    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
   '24-8 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc  |  אבצ    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
   '24-9 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc   | אבצ    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |\u05D0\u05D1\u05E6    def    </div>',
   '24-10 right word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    אבצ|    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    def|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
   '24-14 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    אבצ |   def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    def|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
   '24-15 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    אבצ  |  def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    def|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
   '24-16 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    אבצ   | def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    def|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    \u05D0\u05D1\u05E6    |def    </div>',
   '24-17 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_25.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_25.html
index 9bca85898c5fb745f0782d35b39e6279e61380bb..803bfc26aaa70475b89810b101651c32849b3fcb 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_25.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_25.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">|    abc    def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-0 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre"> |   abc    def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-1 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">  |  abc    def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-2 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">   | abc    def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-3 right word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc|    def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-7 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc |   def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-8 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc  |  def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-9 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc   | def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-10 right word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def|    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-14 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def |   אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-15 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def  |  אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-16 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def   | אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |\u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-17 right word');
 
 selection_test(
@@ -135,25 +135,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    אבצ|    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    אבצ    דדפ    |hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-21 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    אבצ |   דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-22 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    אבצ  |  דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-23 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    אבצ   | דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    |\u05D3\u05D3\u05E4    hij    opq    </div>',
   '25-24 right word');
 
 selection_test(
@@ -177,25 +177,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    אבצ    דדפ|    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
   '25-28 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    אבצ    דדפ |   hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
   '25-29 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    אבצ    דדפ  |  hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
   '25-30 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    אבצ    דדפ   | hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    |hij    opq    </div>',
   '25-31 right word');
 
 selection_test(
@@ -219,25 +219,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    אבצ    דדפ    hij|    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
   '25-35 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    אבצ    דדפ    hij |   opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
   '25-36 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    אבצ    דדפ    hij  |  opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
   '25-37 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    אבצ    דדפ    hij   | opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    |opq    </div>',
   '25-38 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_26.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_26.html
index 5e6526431a42e45db2829c5a56ce2e37534d53fc..4f80726218e25028807f75014cfb3075357b6212 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_26.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_26.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">|    abc    def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-0 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre"> |   abc    def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-1 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">  |  abc    def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-2 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">   | abc    def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-3 right word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc|    def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-7 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc |   def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-8 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc  |  def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-9 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc   | def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    |def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-10 right word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def|    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-14 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def |   hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-15 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def  |  hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-16 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def   | hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    |hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-17 right word');
 
 selection_test(
@@ -135,25 +135,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij|    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-21 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij |   אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-22 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij  |  אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-23 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij   | אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-24 right word');
 
 selection_test(
@@ -177,25 +177,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ|    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-28 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ |   דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-29 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ  |  דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-30 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ   | דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-31 right word');
 
 selection_test(
@@ -219,25 +219,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ|    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-35 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ |   היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-36 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ  |  היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-37 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ   | היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '26-38 right word');
 
 selection_test(
@@ -261,25 +261,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח|    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
   '26-42 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח |   opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
   '26-43 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח  |  opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
   '26-44 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח   | opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    |opq    rst    uvw    </div>',
   '26-45 right word');
 
 selection_test(
@@ -303,25 +303,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq|    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
   '26-49 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq |   rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
   '26-50 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq  |  rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
   '26-51 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq   | rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    |rst    uvw    </div>',
   '26-52 right word');
 
 selection_test(
@@ -345,25 +345,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq    rst|    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
   '26-56 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq    rst |   uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
   '26-57 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq    rst  |  uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
   '26-58 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    אבצ    דעפ    היח    opq    rst   | uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    |uvw    </div>',
   '26-59 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_27.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_27.html
index 83f6ecd3a9533b450b75f94ff20b5a8aae59635f..274348a5a08fc153729e3c0da0e181b8d09011f6 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_27.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_27.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">|    אבצ    דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '27-0 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre"> |   אבצ    דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '27-1 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">  |  אבצ    דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '27-2 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">   | אבצ    דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '27-3 right word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ|    דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '27-7 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ |   דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '27-8 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ  |  דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '27-9 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ   | דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '27-10 right word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ|    חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '27-14 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ |   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '27-15 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ  |  חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '27-16 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ   | חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '27-17 right word');
 
 selection_test(
@@ -135,25 +135,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח|    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '27-21 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח |   ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '27-22 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח  |  ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '27-23 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח   | ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '27-24 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_28.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_28.html
index 8e3aab766aba28b92b4b7573cf04fb252c2fc4fb..1d10d78e8aa7ae676d4075572e7d8a71d863a51a 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_28.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_28.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">|    אבצ    abc    דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4     </div>',
   '28-0 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre"> |   אבצ    abc    דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4     </div>',
   '28-1 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">  |  אבצ    abc    דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4     </div>',
   '28-2 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">   | אבצ    abc    דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4     </div>',
   '28-3 right word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ|    abc    דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
   '28-7 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ |   abc    דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
   '28-8 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ  |  abc    דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
   '28-9 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ   | abc    דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |abc    \u05D3\u05E2\u05E4     </div>',
   '28-10 right word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    abc|    דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4|     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
   '28-14 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    abc |   דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4|     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
   '28-15 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    abc  |  דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4|     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
   '28-16 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    abc   | דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4|     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    abc    |\u05D3\u05E2\u05E4     </div>',
   '28-17 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_29.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_29.html
index 1478d4ee6a202795b7096fb2f94c90b581ea2e5e..2b2d5a9327dc689cb522d97a1060c1a9c19ba47d 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_29.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_29.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">|    אבצ    דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-0 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre"> |   אבצ    דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-1 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">  |  אבצ    דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-2 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">   | אבצ    דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-3 right word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ|    דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    |abc   def   חיח    ופק    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   חיח    ופק    </div>',
   '29-7 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ |   דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-8 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ  |  דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-9 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ   | דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-10 right word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ|    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   |def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-14 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ |   abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   |def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-15 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ  |  abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   |def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-16 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ   | abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   |def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-17 right word');
 
 selection_test(
@@ -135,19 +135,19 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    abc|   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   |def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-21 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    abc |  def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   |def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-22 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    abc  | def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   |def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-23 right word');
 
 selection_test(
@@ -171,19 +171,19 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    abc   def|   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-27 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    abc   def |  חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-28 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    abc   def  | חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   |\u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '29-29 right word');
 
 selection_test(
@@ -207,25 +207,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    abc   def   חיח|    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    abc   def   חיח    ופק|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '29-33 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    abc   def   חיח |   ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '29-34 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    abc   def   חיח  |  ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '29-35 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    abc   def   חיח   | ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7    |\u05D5\u05E4\u05E7    </div>',
   '29-36 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_3.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_3.html
index a06c836b172dfaa016950da3771ab69ccb10adc2..e78397c5210c56f5a26e6aa6ea7c5f59bcaf2696 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_3.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_3.html
@@ -51,31 +51,31 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc|    אבצ    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    \u05D0\u05D1\u05E6 |   def    </div>',
+  '<div contenteditable dir="ltr">    abc |   \u05D0\u05D1\u05E6    def    </div>',
   '3-7 right word');
 
 selection_test(
   '<div contenteditable dir="ltr">    abc |   אבצ    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    אבצ |   def    </div>',
+  '<div contenteditable dir="ltr">    abc    \u05D0\u05D1\u05E6 |   def    </div>',
   '3-8 right word');
 
 selection_test(
   '<div contenteditable dir="ltr">    abc  |  אבצ    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    אבצ |   def    </div>',
+  '<div contenteditable dir="ltr">    abc    \u05D0\u05D1\u05E6 |   def    </div>',
   '3-9 right word');
 
 selection_test(
   '<div contenteditable dir="ltr">    abc   | אבצ    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    אבצ |   def    </div>',
+  '<div contenteditable dir="ltr">    abc    \u05D0\u05D1\u05E6 |   def    </div>',
   '3-10 right word');
 
 selection_test(
   '<div contenteditable dir="ltr">    abc    |אבצ    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    אבצ |   def    </div>',
+  '<div contenteditable dir="ltr">    abc    \u05D0\u05D1\u05E6 |   def    </div>',
   '3-11 right word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    אבצ|    def    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    \u05D0\u05D1\u05E6    def|    </div>',
+  '<div contenteditable dir="ltr">    abc    \u05D0\u05D1\u05E6 |   def    </div>',
   '3-14 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_30.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_30.html
index 6aad465c123a13a7ce968aae4c29a26c113bbd80..7bfe218145424763e74428f25bcd9f2c0ab240f5 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_30.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_30.html
@@ -9,25 +9,25 @@ if (window.internals)
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">|    אבצ    דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-0 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre"> |   אבצ    דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-1 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">  |  אבצ    דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-2 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">   | אבצ    דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    |\u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-3 right word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ|    דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-7 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ |   דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-8 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ  |  דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-9 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ   | דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    |\u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-10 right word');
 
 selection_test(
@@ -93,25 +93,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ|    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-14 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ |   חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-15 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ  |  חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-16 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ   | חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    |\u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-17 right word');
 
 selection_test(
@@ -135,25 +135,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח|    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-21 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח |   abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-22 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח  |  abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-23 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח   | abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    |abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-24 right word');
 
 selection_test(
@@ -177,19 +177,19 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc|   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   |jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-28 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc |  def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   |jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-29 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc  | def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   |jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   |def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-30 right word');
 
 selection_test(
@@ -213,19 +213,19 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc   def|   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   |\u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   |jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-34 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc   def |  jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   |\u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   |jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-35 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc   def  | jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   |\u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   |jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-36 right word');
 
 selection_test(
@@ -249,19 +249,19 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih|   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  |\u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   |\u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-40 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih |  ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  |\u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   |\u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-41 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih  | ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  |\u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   |\u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-42 right word');
 
 selection_test(
@@ -285,13 +285,13 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih   ופק|  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    |\u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  |\u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-46 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih   ופק | ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    |\u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  |\u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '30-47 right word');
 
 selection_test(
@@ -315,25 +315,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih   ופק  ופק|    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA|     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    |\u05E8\u05E1\u05EA     </div>',
   '30-51 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih   ופק  ופק |   רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA|     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    |\u05E8\u05E1\u05EA     </div>',
   '30-52 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih   ופק  ופק  |  רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA|     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    |\u05E8\u05E1\u05EA     </div>',
   '30-53 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">    אבצ    דעפ    חיח    abc   def   jih   ופק  ופק   | רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA|     </div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    |\u05E8\u05E1\u05EA     </div>',
   '30-54 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_31.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_31.html
index 8dae7f6b949615e3af6109fe616dbedea74a1786..569d404b58f914555182a807a0334c0c402ad841 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_31.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_31.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ| דעפ    היח ופק</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</div>',
   '31-3 right word');
 
 selection_test(
@@ -51,25 +51,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ דעפ|    היח ופק</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</div>',
   '31-7 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ דעפ |   היח ופק</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</div>',
   '31-8 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ דעפ  |  היח ופק</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</div>',
   '31-9 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ דעפ   | היח ופק</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    |\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</div>',
   '31-10 right word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ דעפ    היח| ופק</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7|</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</div>',
   '31-14 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_32.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_32.html
index e0a14b359ef26f7471e0a736bd339488bf384e5c..cc92576174d3ba086997cedfe1d4f19ffa659d80 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_32.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_32.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ| דעפ היח    abc def hij</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    abc def hij</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc def hij</div>',
   '32-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ דעפ| היח    abc def hij</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |abc def hij</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    abc def hij</div>',
   '32-7 right word');
 
 selection_test(
@@ -75,25 +75,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ דעפ היח|    abc def hij</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc |def hij</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |abc def hij</div>',
   '32-11 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ דעפ היח |   abc def hij</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc |def hij</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |abc def hij</div>',
   '32-12 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ דעפ היח  |  abc def hij</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc |def hij</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |abc def hij</div>',
   '32-13 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ דעפ היח   | abc def hij</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc |def hij</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |abc def hij</div>',
   '32-14 right word');
 
 selection_test(
@@ -117,7 +117,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ דעפ היח    abc| def hij</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc def |hij</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc |def hij</div>',
   '32-18 right word');
 
 selection_test(
@@ -141,7 +141,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">אבצ דעפ היח    abc def| hij</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc def hij|</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    abc def |hij</div>',
   '32-22 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_33.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_33.html
index 6af8e82a76e621984332e02a27bc4fb04c75e85f..cc451df50ec43bff8bd5e237d044e411caa3eb34 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_33.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_33.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc| def hij    אבצ דעפ היח    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def |hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc |def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
   '33-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def| hij    אבצ דעפ היח    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    |\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def |hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
   '33-7 right word');
 
 selection_test(
@@ -75,25 +75,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def hij|    אבצ דעפ היח    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    |\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
   '33-11 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def hij |   אבצ דעפ היח    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    |\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
   '33-12 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def hij  |  אבצ דעפ היח    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    |\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
   '33-13 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def hij   | אבצ דעפ היח    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    |\u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
   '33-14 right word');
 
 selection_test(
@@ -117,7 +117,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ| דעפ היח    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    opq rst uvw</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 |\u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw</div>',
   '33-18 right word');
 
 selection_test(
@@ -141,7 +141,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ| היח    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |opq rst uvw</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 |\u05D4\u05D9\u05D7    opq rst uvw</div>',
   '33-22 right word');
 
 selection_test(
@@ -165,25 +165,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח|    opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq |rst uvw</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |opq rst uvw</div>',
   '33-26 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח |   opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq |rst uvw</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |opq rst uvw</div>',
   '33-27 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח  |  opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq |rst uvw</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |opq rst uvw</div>',
   '33-28 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח   | opq rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq |rst uvw</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    |opq rst uvw</div>',
   '33-29 right word');
 
 selection_test(
@@ -207,7 +207,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq| rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst |uvw</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq |rst uvw</div>',
   '33-33 right word');
 
 selection_test(
@@ -231,7 +231,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    אבצ דעפ היח    opq rst| uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst uvw|</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">abc def hij    \u05D0\u05D1\u05E6 \u05D3\u05E2\u05E4 \u05D4\u05D9\u05D7    opq rst |uvw</div>',
   '33-37 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_4.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_4.html
index 86a6d7fea81c967bcf14c2fff0eb6adcc721839e..1d06abc8e52906cabebb89deaccb0397563e914f 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_4.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_4.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc|    def    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def |   \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr">    abc |   def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '4-7 right word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    def|    אבצ    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def    \u05D0\u05D1\u05E6 |   \u05D3\u05D3\u05E4    hij    opq    </div>',
+  '<div contenteditable dir="ltr">    abc    def |   \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq    </div>',
   '4-14 right word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    def    אבצ|    דדפ    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def    אבצ    דדפ |   hij    opq    </div>',
+  '<div contenteditable dir="ltr">    abc    def    \u05D0\u05D1\u05E6 |   \u05D3\u05D3\u05E4    hij    opq    </div>',
   '4-21 right word');
 
 selection_test(
@@ -177,7 +177,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    def    אבצ    דדפ|    hij    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij |   opq    </div>',
+  '<div contenteditable dir="ltr">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4 |   hij    opq    </div>',
   '4-28 right word');
 
 selection_test(
@@ -219,7 +219,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    def    אבצ    דדפ    hij|    opq    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij    opq|    </div>',
+  '<div contenteditable dir="ltr">    abc    def    \u05D0\u05D1\u05E6    \u05D3\u05D3\u05E4    hij |   opq    </div>',
   '4-35 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_43.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_43.html
index 7292d97b0981bc39da8f958c571bcf8ad3ee6463..386c300d63cfe41e184fc7c3e46e4f8d662d2521 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_43.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_43.html
@@ -39,25 +39,25 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">人一氧喝大|    笑抬的     abc def</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11|\u62AC\u7684     abc def</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    |\u7B11\u62AC\u7684     abc def</div>',
   '43-5 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">人一氧喝大 |   笑抬的     abc def</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11|\u62AC\u7684     abc def</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    |\u7B11\u62AC\u7684     abc def</div>',
   '43-6 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">人一氧喝大  |  笑抬的     abc def</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11|\u62AC\u7684     abc def</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    |\u7B11\u62AC\u7684     abc def</div>',
   '43-7 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">人一氧喝大   | 笑抬的     abc def</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11|\u62AC\u7684     abc def</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    |\u7B11\u62AC\u7684     abc def</div>',
   '43-8 right word');
 
 selection_test(
@@ -81,31 +81,31 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">人一氧喝大    笑抬的|     abc def</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11\u62AC\u7684     abc |def</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11\u62AC\u7684     |abc def</div>',
   '43-12 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">人一氧喝大    笑抬的 |    abc def</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11\u62AC\u7684     abc |def</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11\u62AC\u7684     |abc def</div>',
   '43-13 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">人一氧喝大    笑抬的  |   abc def</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11\u62AC\u7684     abc |def</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11\u62AC\u7684     |abc def</div>',
   '43-14 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">人一氧喝大    笑抬的   |  abc def</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11\u62AC\u7684     abc |def</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11\u62AC\u7684     |abc def</div>',
   '43-15 right word');
 
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">人一氧喝大    笑抬的    | abc def</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11\u62AC\u7684     abc |def</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11\u62AC\u7684     |abc def</div>',
   '43-16 right word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr" style="white-space:pre">人一氧喝大    笑抬的     abc| def</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11\u62AC\u7684     abc def|</div>',
+  '<div contenteditable dir="ltr" style="white-space:pre">\u4EBA\u4E00\u6C27\u559D\u5927    \u7B11\u62AC\u7684     abc |def</div>',
   '43-20 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_5.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_5.html
index 79cb0f9ab351509ad9111e3dd60adba093bc21da..058aaf06cc5e9de26f1b488609d48ef36955d386 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_5.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_5.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc|    def    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def |   hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr">    abc |   def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '5-7 right word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    def|    hij    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def    hij |   \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr">    abc    def |   hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '5-14 right word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    def    hij|    אבצ    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def    hij    \u05D0\u05D1\u05E6 |   \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr">    abc    def    hij |   \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '5-21 right word');
 
 selection_test(
@@ -177,7 +177,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    def    hij    אבצ|    דעפ    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr">    abc    def    hij    \u05D0\u05D1\u05E6 |   \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '5-28 right word');
 
 selection_test(
@@ -219,7 +219,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    def    hij    אבצ    דעפ|    היח    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 |   opq    rst    uvw    </div>',
+  '<div contenteditable dir="ltr">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   \u05D4\u05D9\u05D7    opq    rst    uvw    </div>',
   '5-35 right word');
 
 selection_test(
@@ -261,7 +261,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    def    hij    אבצ    דעפ    היח|    opq    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq |   rst    uvw    </div>',
+  '<div contenteditable dir="ltr">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7 |   opq    rst    uvw    </div>',
   '5-42 right word');
 
 selection_test(
@@ -303,7 +303,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    def    hij    אבצ    דעפ    היח    opq|    rst    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst |   uvw    </div>',
+  '<div contenteditable dir="ltr">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq |   rst    uvw    </div>',
   '5-49 right word');
 
 selection_test(
@@ -345,7 +345,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    abc    def    hij    אבצ    דעפ    היח    opq    rst|    uvw    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst    uvw|    </div>',
+  '<div contenteditable dir="ltr">    abc    def    hij    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D4\u05D9\u05D7    opq    rst |   uvw    </div>',
   '5-56 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_6.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_6.html
index 0785ec440031248032dc2ad73436f416d98df1e0..e6fa0773516664f219c4ae2b2e8e1f341bc9457d 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_6.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_6.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ|    דעפ    חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6 |   \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '6-7 right word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    דעפ|    חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7 |   \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '6-14 right word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    דעפ    חיח|    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7|    </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7 |   \u05D5\u05E4\u05E7    </div>',
   '6-21 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_7.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_7.html
index 39ad9edcc78c2a2f7ac539ec82ab5bf969a1f59c..ffcda8826dd7087ba779d975f1f43f32b50044c5 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_7.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_7.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ|    abc    דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    abc |   \u05D3\u05E2\u05E4     </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6 |   abc    \u05D3\u05E2\u05E4     </div>',
   '7-7 right word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    abc|    דעפ     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    abc    \u05D3\u05E2\u05E4|     </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    abc |   \u05D3\u05E2\u05E4     </div>',
   '7-14 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_8.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_8.html
index 878f9d5c6eb873312b0a96146b60c1dcec11dcca..ebb554fe6910b4dcc87ea7a09581a64d3518197d 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_8.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_8.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ|    דעפ    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    אבצ    דעפ |   abc   def   חיח    ופק    </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6 |   \u05D3\u05E2\u05E4    abc   def   חיח    ופק    </div>',
   '8-7 right word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    דעפ|    abc   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc |  def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   abc   def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '8-14 right word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    דעפ    abc|   def   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def |  \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc |  def   \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '8-21 right word');
 
 selection_test(
@@ -171,7 +171,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    דעפ    abc   def|   חיח    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def   \u05D7\u05D9\u05D7 |   \u05D5\u05E4\u05E7    </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    abc   def |  \u05D7\u05D9\u05D7    \u05D5\u05E4\u05E7    </div>',
   '8-27 right word');
 
 selection_test(
@@ -207,7 +207,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    דעפ    abc   def   חיח|    ופק    </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    אבצ    דעפ    abc   def   חיח    ופק|    </div>',
+  '<div contenteditable dir="ltr">    אבצ    דעפ    abc   def   \u05D7\u05D9\u05D7 |   \u05D5\u05E4\u05E7    </div>',
   '8-33 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_9.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_9.html
index e08bad2a12a6750ef91bfde832eafc3436507d5e..d4fde3e2aa2fff061e0910b5c3b35f705118f804 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_9.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_multi_space_9.html
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ|    דעפ    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6 |   \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '9-7 right word');
 
 selection_test(
@@ -93,7 +93,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    דעפ|    חיח    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7 |   abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4 |   \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '9-14 right word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    דעפ    חיח|    abc   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc |  def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7 |   abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '9-21 right word');
 
 selection_test(
@@ -177,7 +177,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    דעפ    חיח    abc|   def   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def |  jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc |  def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '9-28 right word');
 
 selection_test(
@@ -213,7 +213,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    דעפ    חיח    abc   def|   jih   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih |  \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def |  jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '9-34 right word');
 
 selection_test(
@@ -249,7 +249,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    דעפ    חיח    abc   def   jih|   ופק  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7 | \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih |  \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '9-40 right word');
 
 selection_test(
@@ -285,7 +285,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    דעפ    חיח    abc   def   jih   ופק|  ופק    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7 |   \u05E8\u05E1\u05EA     </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7 | \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA     </div>',
   '9-46 right word');
 
 selection_test(
@@ -315,7 +315,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">    אבצ    דעפ    חיח    abc   def   jih   ופק  ופק|    רסת     </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7    \u05E8\u05E1\u05EA|     </div>',
+  '<div contenteditable dir="ltr">    \u05D0\u05D1\u05E6    \u05D3\u05E2\u05E4    \u05D7\u05D9\u05D7    abc   def   jih   \u05D5\u05E4\u05E7  \u05D5\u05E4\u05E7 |   \u05E8\u05E1\u05EA     </div>',
   '9-51 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_1.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_1.html
index 101bd6aa61c0a5dff222546964233b0cf1c735bf..d4eb72a039d4c8fecf13cc8f374ee324f0a53bc4 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_1.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_1.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא| <span>בב</span></div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">אאא <span>בב|</span></div>',
+  '<div contenteditable dir="ltr">אאא |<span>בב</span></div>',
   '1-3 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_10.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_10.html
index 5b9bcf5fb3ba7f588aef2e5a1aaef73fdf16f710..6e184d4d1ffbeb34701b765ef071c95ee2f49d1d 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_10.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_10.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד| דעפ <span>היח ופק</span>ווש כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span>\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 |\u05D3\u05E2\u05E4 <span>\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '10-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד דעפ| <span>היח ופק</span>ווש כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>\u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span>\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '10-7 right word');
 
 selection_test(
@@ -81,7 +81,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד דעפ <span>היח| ופק</span>ווש כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 |\u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>\u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '10-12 right word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד דעפ <span>היח ופק</span>ווש| כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6|</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 |\u05DB\u05D8\u05D6</div>',
   '10-20 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_12.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_12.html
index bda68b0cbcfcd5759055deb997fa78afe236feed..faf5aef6ce10259768e6f7006be7b720cc630b30 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_12.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_12.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד| דעפ <span dir="rtl">abc def</span>ווש כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span dir="rtl">abc def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 |\u05D3\u05E2\u05E4 <span dir="rtl">abc def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '12-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד דעפ| <span dir="rtl">abc def</span>ווש כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="rtl">abc |def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span dir="rtl">abc def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '12-7 right word');
 
 selection_test(
@@ -81,7 +81,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד דעפ <span dir="rtl">abc| def</span>ווש כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="rtl">abc def</span>\u05D5\u05D5\u05E9 |\u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="rtl">abc |def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '12-12 right word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד דעפ <span dir="rtl">abc def</span>ווש| כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="rtl">abc def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6|</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="rtl">abc def</span>\u05D5\u05D5\u05E9 |\u05DB\u05D8\u05D6</div>',
   '12-20 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_14.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_14.html
index 6ca8abfee54392d867e0baa15b211aac8c8200b4..693c829c6c3c3d0b9030849efce93b3e40ff4cfa 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_14.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_14.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד| דעפ <span>abc def</span>ווש כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">אבד דעפ |<span>abc def</span>ווש כטז</div>',
+  '<div contenteditable dir="ltr">אבד |דעפ <span>abc def</span>ווש כטז</div>',
   '14-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד דעפ| <span>abc def</span>ווש כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>abc |def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span>abc def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '14-7 right word');
 
 selection_test(
@@ -81,7 +81,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד דעפ <span>abc| def</span>ווש כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>abc def</span>\u05D5\u05D5\u05E9 |\u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span>abc |def</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '14-12 right word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד דעפ <span>abc def</span>ווש| כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">אבד דעפ <span>abc def</span>ווש כטז|</div>',
+  '<div contenteditable dir="ltr">אבד דעפ <span>abc def</span>ווש |כטז</div>',
   '14-20 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_16.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_16.html
index 9ed26ab59c879619125e6b8927f87a2b0a4c5b50..31d99b260196215bd92f9e18763e13ba7067cf72 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_16.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_16.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד| opq דעפ <span dir="rtl">abc אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq |\u05D3\u05E2\u05E4 <span dir="rtl">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 |opq \u05D3\u05E2\u05E4 <span dir="rtl">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '16-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד opq| דעפ <span dir="rtl">abc אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 |<span dir="rtl">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq |\u05D3\u05E2\u05E4 <span dir="rtl">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '16-7 right word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד opq דעפ| <span dir="rtl">abc אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="rtl">abc |\u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 |<span dir="rtl">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '16-11 right word');
 
 selection_test(
@@ -105,7 +105,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד opq דעפ <span dir="rtl">abc| אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="rtl">abc \u05D0\u05D0\u05D0 |def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="rtl">abc |\u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '16-16 right word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד opq דעפ <span dir="rtl">abc אאא| def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="rtl">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 |rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="rtl">abc \u05D0\u05D0\u05D0 |def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '16-20 right word');
 
 selection_test(
@@ -177,7 +177,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד opq דעפ <span dir="rtl">abc אאא def</span>ווש| rst כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="rtl">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst |\u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="rtl">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 |rst \u05DB\u05D8\u05D6</div>',
   '16-28 right word');
 
 selection_test(
@@ -201,7 +201,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד opq דעפ <span dir="rtl">abc אאא def</span>ווש rst| כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="rtl">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6|</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span dir="rtl">abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst |\u05DB\u05D8\u05D6</div>',
   '16-32 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_18.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_18.html
index 909510a164ce5c87948a77c029c66b95f18826a8..9fd789e51e8b04f2a36b22294f39e7e1d80c5e0b 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_18.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_18.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד| opq דעפ <span>abc אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq |\u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 |opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '18-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד opq| דעפ <span>abc אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 |<span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq |\u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '18-7 right word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד opq דעפ| <span>abc אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc |\u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 |<span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '18-11 right word');
 
 selection_test(
@@ -105,7 +105,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד opq דעפ <span>abc| אאא def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 |def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc |\u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '18-16 right word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד opq דעפ <span>abc אאא| def</span>ווש rst כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 |rst \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 |def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6</div>',
   '18-20 right word');
 
 selection_test(
@@ -177,7 +177,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד opq דעפ <span>abc אאא def</span>ווש| rst כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst |\u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 |rst \u05DB\u05D8\u05D6</div>',
   '18-28 right word');
 
 selection_test(
@@ -201,7 +201,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד opq דעפ <span>abc אאא def</span>ווש rst| כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst \u05DB\u05D8\u05D6|</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 opq \u05D3\u05E2\u05E4 <span>abc \u05D0\u05D0\u05D0 def</span>\u05D5\u05D5\u05E9 rst |\u05DB\u05D8\u05D6</div>',
   '18-32 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_19.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_19.html
index 7d5b41923e04b543790e4e6e673dda3b4548e837..e1e62f1d44dfdfe669a8b6dbac50eb92855ba065 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_19.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_19.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">aaa| <span>bbb אאא </span>ווש</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">aaa <span>bbb |\u05D0\u05D0\u05D0 </span>\u05D5\u05D5\u05E9</div>',
+  '<div contenteditable dir="ltr">aaa |<span>bbb \u05D0\u05D0\u05D0 </span>\u05D5\u05D5\u05E9</div>',
   '19-3 right word');
 
 selection_test(
@@ -57,7 +57,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">aaa <span>bbb| אאא </span>ווש</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">aaa <span>bbb \u05D0\u05D0\u05D0 |</span>\u05D5\u05D5\u05E9</div>',
+  '<div contenteditable dir="ltr">aaa <span>bbb |\u05D0\u05D0\u05D0 </span>\u05D5\u05D5\u05E9</div>',
   '19-8 right word');
 
 selection_test(
@@ -81,7 +81,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">aaa <span>bbb אאא| </span>ווש</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">aaa <span>bbb אאא </span>ווש|</div>',
+  '<div contenteditable dir="ltr">aaa <span>bbb אאא |</span>ווש</div>',
   '19-12 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_3.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_3.html
index 905fa7165df677d82a7d1c0e4322802be871bb2f..cfe4a701cd0e1255bf9d29af8514a6a298f08ff5 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_3.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_3.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc| def <span>hij opq</span> rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def |<span>hij opq</span> rst uvw</div>',
+  '<div contenteditable dir="ltr">abc |def <span>hij opq</span> rst uvw</div>',
   '3-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def| <span>hij opq</span> rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def <span>hij |opq</span> rst uvw</div>',
+  '<div contenteditable dir="ltr">abc def |<span>hij opq</span> rst uvw</div>',
   '3-7 right word');
 
 selection_test(
@@ -81,7 +81,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def <span>hij| opq</span> rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def <span>hij opq</span> |rst uvw</div>',
+  '<div contenteditable dir="ltr">abc def <span>hij |opq</span> rst uvw</div>',
   '3-12 right word');
 
 selection_test(
@@ -105,13 +105,13 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def <span>hij opq|</span> rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def <span>hij opq</span> rst |uvw</div>',
+  '<div contenteditable dir="ltr">abc def <span>hij opq</span> |rst uvw</div>',
   '3-16 right word');
 
 selection_test(
   '<div contenteditable dir="ltr">abc def <span>hij opq</span>| rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def <span>hij opq</span> rst |uvw</div>',
+  '<div contenteditable dir="ltr">abc def <span>hij opq</span> |rst uvw</div>',
   '3-17 right word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def <span>hij opq</span> rst| uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def <span>hij opq</span> rst uvw|</div>',
+  '<div contenteditable dir="ltr">abc def <span>hij opq</span> rst |uvw</div>',
   '3-21 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_6.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_6.html
index a1aece4a7a98dfe9a930748993eaeb33d184fe91..e88a2529b2603da13c2bf4fd1592f08d6a49b0c0 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_6.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_6.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc| def <span dir="rtl">hij opq</span> rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def |<span dir="rtl">hij opq</span> rst uvw</div>',
+  '<div contenteditable dir="ltr">abc |def <span dir="rtl">hij opq</span> rst uvw</div>',
   '6-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def| <span dir="rtl">hij opq</span> rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def <span dir="rtl">hij |opq</span> rst uvw</div>',
+  '<div contenteditable dir="ltr">abc def |<span dir="rtl">hij opq</span> rst uvw</div>',
   '6-7 right word');
 
 selection_test(
@@ -81,7 +81,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def <span dir="rtl">hij| opq</span> rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def <span dir="rtl">hij opq</span> |rst uvw</div>',
+  '<div contenteditable dir="ltr">abc def <span dir="rtl">hij |opq</span> rst uvw</div>',
   '6-12 right word');
 
 selection_test(
@@ -105,13 +105,13 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def <span dir="rtl">hij opq|</span> rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def <span dir="rtl">hij opq</span> rst |uvw</div>',
+  '<div contenteditable dir="ltr">abc def <span dir="rtl">hij opq</span> |rst uvw</div>',
   '6-16 right word');
 
 selection_test(
   '<div contenteditable dir="ltr">abc def <span dir="rtl">hij opq</span>| rst uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def <span dir="rtl">hij opq</span> rst |uvw</div>',
+  '<div contenteditable dir="ltr">abc def <span dir="rtl">hij opq</span> |rst uvw</div>',
   '6-17 right word');
 
 selection_test(
@@ -135,7 +135,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def <span dir="rtl">hij opq</span> rst| uvw</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def <span dir="rtl">hij opq</span> rst uvw|</div>',
+  '<div contenteditable dir="ltr">abc def <span dir="rtl">hij opq</span> rst |uvw</div>',
   '6-21 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_8.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_8.html
index c6e8f95dff00809f271147d906ff24c451370660..3d1841868b6f8df92ae147675d8d6bdf938414dc 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_8.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_inline_element_8.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד| דעפ <span dir="rtl">היח ופק</span>ווש כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span dir="rtl">\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 |\u05D3\u05E2\u05E4 <span dir="rtl">\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '8-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד דעפ| <span dir="rtl">היח ופק</span>ווש כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="rtl">\u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 |<span dir="rtl">\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '8-7 right word');
 
 selection_test(
@@ -81,7 +81,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד דעפ <span dir="rtl">היח| ופק</span>ווש כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="rtl">\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 |\u05DB\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="rtl">\u05D4\u05D9\u05D7 |\u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6</div>',
   '8-12 right word');
 
 selection_test(
@@ -129,7 +129,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אבד דעפ <span dir="rtl">היח ופק</span>ווש| כטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="rtl">\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 \u05DB\u05D8\u05D6|</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D1\u05D3 \u05D3\u05E2\u05E4 <span dir="rtl">\u05D4\u05D9\u05D7 \u05D5\u05E4\u05E7</span>\u05D5\u05D5\u05E9 |\u05DB\u05D8\u05D6</div>',
   '8-20 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_1.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_1.html
index c1eee6a738ce4dc3360c43ff43c9bcce5666ba61..daea6bca6f70baa0cab01d481a8cc4228e05ab70 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_1.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_1.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc| def hij opq rst</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def |hij opq rst</div>',
+  '<div contenteditable dir="ltr">abc |def hij opq rst</div>',
   '1-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def| hij opq rst</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij |opq rst</div>',
+  '<div contenteditable dir="ltr">abc def |hij opq rst</div>',
   '1-7 right word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij| opq rst</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij opq |rst</div>',
+  '<div contenteditable dir="ltr">abc def hij |opq rst</div>',
   '1-11 right word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij opq| rst</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij opq rst|</div>',
+  '<div contenteditable dir="ltr">abc def hij opq |rst</div>',
   '1-15 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_11.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_11.html
index b6f75aa62c844e8653c78d074845125105e041c6..65a31c6946a944396b6e295bff96110e6acf4186 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_11.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_11.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא| בבב צצצ aaa bbb ccc דדד עעע פפפ</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 |\u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 |\u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '11-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא בבב| צצצ aaa bbb ccc דדד עעע פפפ</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 |aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 |\u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '11-7 right word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא בבב צצצ| aaa bbb ccc דדד עעע פפפ</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa |bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 |aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '11-11 right word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא בבב צצצ aaa| bbb ccc דדד עעע פפפ</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb |ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa |bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '11-15 right word');
 
 selection_test(
@@ -123,7 +123,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb| ccc דדד עעע פפפ</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc |\u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb |ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '11-19 right word');
 
 selection_test(
@@ -147,7 +147,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc| דדד עעע פפפ</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 |\u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc |\u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '11-23 right word');
 
 selection_test(
@@ -171,7 +171,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד| עעע פפפ</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 |\u05E4\u05E4\u05E4</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 |\u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4</div>',
   '11-27 right word');
 
 selection_test(
@@ -195,7 +195,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא בבב צצצ aaa bbb ccc דדד עעע| פפפ</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 \u05E4\u05E4\u05E4|</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 aaa bbb ccc \u05D3\u05D3\u05D3 \u05E2\u05E2\u05E2 |\u05E4\u05E4\u05E4</div>',
   '11-31 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_13.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_13.html
index 6d7a7f8f31dc8fbee2521194c0850ec774d6b382..06dfd37dd4ec6e588a005745541fac0733a5e316 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_13.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_13.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא| בבב aaa bbb צצצ דדד</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">אאא בבב |aaa bbb צצצ דדד</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 |\u05D1\u05D1\u05D1 aaa bbb צצצ דדד</div>',
   '13-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא בבב| aaa bbb צצצ דדד</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 aaa |bbb \u05E6\u05E6\u05E6 \u05D3\u05D3\u05D3</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 |aaa bbb \u05E6\u05E6\u05E6 \u05D3\u05D3\u05D3</div>',
   '13-7 right word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא בבב aaa| bbb צצצ דדד</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 aaa bbb |\u05E6\u05E6\u05E6 \u05D3\u05D3\u05D3</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 aaa |bbb \u05E6\u05E6\u05E6 \u05D3\u05D3\u05D3</div>',
   '13-11 right word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא בבב aaa bbb| צצצ דדד</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 aaa bbb \u05E6\u05E6\u05E6 |\u05D3\u05D3\u05D3</div>',
+  '<div contenteditable dir="ltr">\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 aaa bbb |\u05E6\u05E6\u05E6 \u05D3\u05D3\u05D3</div>',
   '13-15 right word');
 
 selection_test(
@@ -123,7 +123,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ| דדד</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">אאא בבב aaa bbb צצצ דדד|</div>',
+  '<div contenteditable dir="ltr">אאא בבב aaa bbb \u05E6\u05E6\u05E6 |\u05D3\u05D3\u05D3</div>',
   '13-19 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_15.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_15.html
index 7d72770b32eeb6048ec4db1816db035eee35404a..11c4527785c28177a1e2a43b325023a2c626755a 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_15.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_15.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">שנב| abc סטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05E9\u05E0\u05D1 abc |\u05E1\u05D8\u05D6</div>',
+  '<div contenteditable dir="ltr">\u05E9\u05E0\u05D1 |abc \u05E1\u05D8\u05D6</div>',
   '15-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">שנב abc| סטז</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05E9\u05E0\u05D1 abc \u05E1\u05D8\u05D6|</div>',
+  '<div contenteditable dir="ltr">\u05E9\u05E0\u05D1 abc |\u05E1\u05D8\u05D6</div>',
   '15-7 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_17.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_17.html
index 088bedfa78ab3f3312661a118529cbb3a59e9356..7d32177c240cac55329e83b27550721d9b9b35fd 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_17.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_17.html
@@ -57,37 +57,37 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc \u202Bבאד| def\u202C xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc \u202B\u05D1\u05D0\u05D3 def\u202C xyz|</div>',
+  '<div contenteditable dir="ltr">abc \u202B\u05D1\u05D0\u05D3 |def\u202C xyz</div>',
   '17-8 right word');
 
 selection_test(
   '<div contenteditable dir="ltr">abc \u202Bבאד |def\u202C xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc \u202B\u05D1\u05D0\u05D3 def\u202C xyz|</div>',
+  '<div contenteditable dir="ltr">abc \u202B\u05D1\u05D0\u05D3 def\u202C |xyz</div>',
   '17-9 right word');
 
 selection_test(
   '<div contenteditable dir="ltr">abc \u202Bבאד d|ef\u202C xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc \u202B\u05D1\u05D0\u05D3 def\u202C xyz|</div>',
+  '<div contenteditable dir="ltr">abc \u202B\u05D1\u05D0\u05D3 def\u202C |xyz</div>',
   '17-10 right word');
 
 selection_test(
   '<div contenteditable dir="ltr">abc \u202Bבאד de|f\u202C xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc \u202B\u05D1\u05D0\u05D3 def\u202C xyz|</div>',
+  '<div contenteditable dir="ltr">abc \u202B\u05D1\u05D0\u05D3 def\u202C |xyz</div>',
   '17-11 right word');
 
 selection_test(
   '<div contenteditable dir="ltr">abc \u202Bבאד def|\u202C xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc \u202B\u05D1\u05D0\u05D3 def\u202C xyz|</div>',
+  '<div contenteditable dir="ltr">abc \u202B\u05D1\u05D0\u05D3 def\u202C |xyz</div>',
   '17-12 right word');
 
 selection_test(
   '<div contenteditable dir="ltr">abc \u202Bבאד def\u202C| xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc \u202B\u05D1\u05D0\u05D3 def\u202C xyz|</div>',
+  '<div contenteditable dir="ltr">abc \u202B\u05D1\u05D0\u05D3 def\u202C |xyz</div>',
   '17-13 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_18.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_18.html
index f8ccb7da4344e742ecb5182e201249a9ab56608a..28bc17353eded8a051d858690c17edb62e5f1cdd 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_18.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_18.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc| def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
+  '<div contenteditable dir="ltr">abc |def hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
   '18-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def| hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij |<img src="../../../accessibility/resources/cake.png"> opq rst </div>',
+  '<div contenteditable dir="ltr">abc def |hij <img src="../../../accessibility/resources/cake.png"> opq rst </div>',
   '18-7 right word');
 
 selection_test(
@@ -87,7 +87,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png">| opq rst </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq |rst </div>',
+  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> |opq rst </div>',
   '18-13 right word');
 
 selection_test(
@@ -111,7 +111,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq| rst </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq rst| </div>',
+  '<div contenteditable dir="ltr">abc def hij <img src="../../../accessibility/resources/cake.png"> opq |rst </div>',
   '18-17 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_19.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_19.html
index 67c28d9d7b83aa0340f8c2097c46513e4d9813b2..0f729c23f86030ba1f3cac2f4193d30377729fde 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_19.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_19.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc| def this<span>is</span><span>one</span><span>word</span>end opq rst </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>',
+  '<div contenteditable dir="ltr">abc |def this<span>is</span><span>one</span><span>word</span>end opq rst </div>',
   '19-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def| this<span>is</span><span>one</span><span>word</span>end opq rst </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>',
+  '<div contenteditable dir="ltr">abc def |this<span>is</span><span>one</span><span>word</span>end opq rst </div>',
   '19-7 right word');
 
 selection_test(
@@ -177,7 +177,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end| opq rst </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq |rst </div>',
+  '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end |opq rst </div>',
   '19-28 right word');
 
 selection_test(
@@ -201,7 +201,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq| rst </div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq rst| </div>',
+  '<div contenteditable dir="ltr">abc def this<span>is</span><span>one</span><span>word</span>end opq |rst </div>',
   '19-32 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_3.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_3.html
index 42545a63d26a6ca93f6b4fb09e367749ed971678..a48aef43d5e125d2b97ce0b24e5775a20758fd06 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_3.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_3.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">ששש| נננ בבב גגג קקק</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 |\u05D1\u05D1\u05D1 \u05D2\u05D2\u05D2 \u05E7\u05E7\u05E7</div>',
+  '<div contenteditable dir="ltr">\u05E9\u05E9\u05E9 |\u05E0\u05E0\u05E0 \u05D1\u05D1\u05D1 \u05D2\u05D2\u05D2 \u05E7\u05E7\u05E7</div>',
   '3-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">ששש נננ| בבב גגג קקק</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 \u05D1\u05D1\u05D1 |\u05D2\u05D2\u05D2 \u05E7\u05E7\u05E7</div>',
+  '<div contenteditable dir="ltr">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 |\u05D1\u05D1\u05D1 \u05D2\u05D2\u05D2 \u05E7\u05E7\u05E7</div>',
   '3-7 right word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">ששש נננ בבב| גגג קקק</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 \u05D1\u05D1\u05D1 \u05D2\u05D2\u05D2 |\u05E7\u05E7\u05E7</div>',
+  '<div contenteditable dir="ltr">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 \u05D1\u05D1\u05D1 |\u05D2\u05D2\u05D2 \u05E7\u05E7\u05E7</div>',
   '3-11 right word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">ששש נננ בבב גגג| קקק</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 \u05D1\u05D1\u05D1 \u05D2\u05D2\u05D2 \u05E7\u05E7\u05E7|</div>',
+  '<div contenteditable dir="ltr">\u05E9\u05E9\u05E9 \u05E0\u05E0\u05E0 \u05D1\u05D1\u05D1 \u05D2\u05D2\u05D2 |\u05E7\u05E7\u05E7</div>',
   '3-15 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_5.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_5.html
index 043bf1e925f5293999faf7f5c8dddad6f22792ee..9bb03841bdf9df6541ac37fcd7ed65e283862640 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_5.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_5.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc| def hij אאא בבב צצצ opr uvw xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def |hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
+  '<div contenteditable dir="ltr">abc |def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
   '5-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def| hij אאא בבב צצצ opr uvw xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij |\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
+  '<div contenteditable dir="ltr">abc def |hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
   '5-7 right word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij| אאא בבב צצצ opr uvw xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij \u05D0\u05D0\u05D0 |\u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
+  '<div contenteditable dir="ltr">abc def hij |\u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
   '5-11 right word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij אאא| בבב צצצ opr uvw xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 |\u05E6\u05E6\u05E6 opr uvw xyz</div>',
+  '<div contenteditable dir="ltr">abc def hij \u05D0\u05D0\u05D0 |\u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz</div>',
   '5-15 right word');
 
 selection_test(
@@ -123,7 +123,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij אאא בבב| צצצ opr uvw xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 |opr uvw xyz</div>',
+  '<div contenteditable dir="ltr">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 |\u05E6\u05E6\u05E6 opr uvw xyz</div>',
   '5-19 right word');
 
 selection_test(
@@ -147,7 +147,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ| opr uvw xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr |uvw xyz</div>',
+  '<div contenteditable dir="ltr">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 |opr uvw xyz</div>',
   '5-23 right word');
 
 selection_test(
@@ -171,7 +171,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr| uvw xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw |xyz</div>',
+  '<div contenteditable dir="ltr">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr |uvw xyz</div>',
   '5-27 right word');
 
 selection_test(
@@ -195,7 +195,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def hij אאא בבב צצצ opr uvw| xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw xyz|</div>',
+  '<div contenteditable dir="ltr">abc def hij \u05D0\u05D0\u05D0 \u05D1\u05D1\u05D1 \u05E6\u05E6\u05E6 opr uvw |xyz</div>',
   '5-31 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_7.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_7.html
index 6e5633e1ba503f1bee2ed777c75d494f38bae181..d095c722aad94c6f5ccc8f9d56cf6b591c476ff6 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_7.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_7.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc| def שנב סטז uvw xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def |\u05E9\u05E0\u05D1 \u05E1\u05D8\u05D6 uvw xyz</div>',
+  '<div contenteditable dir="ltr">abc |def \u05E9\u05E0\u05D1 \u05E1\u05D8\u05D6 uvw xyz</div>',
   '7-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def| שנב סטז uvw xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def \u05E9\u05E0\u05D1 |\u05E1\u05D8\u05D6 uvw xyz</div>',
+  '<div contenteditable dir="ltr">abc def |\u05E9\u05E0\u05D1 \u05E1\u05D8\u05D6 uvw xyz</div>',
   '7-7 right word');
 
 selection_test(
@@ -75,7 +75,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def שנב| סטז uvw xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def שנב סטז |uvw xyz</div>',
+  '<div contenteditable dir="ltr">abc def \u05E9\u05E0\u05D1 |\u05E1\u05D8\u05D6 uvw xyz</div>',
   '7-11 right word');
 
 selection_test(
@@ -99,7 +99,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def שנב סטז| uvw xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def \u05E9\u05E0\u05D1 \u05E1\u05D8\u05D6 uvw |xyz</div>',
+  '<div contenteditable dir="ltr">abc def \u05E9\u05E0\u05D1 \u05E1\u05D8\u05D6 |uvw xyz</div>',
   '7-15 right word');
 
 selection_test(
@@ -123,7 +123,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">abc def שנב סטז uvw| xyz</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">abc def \u05E9\u05E0\u05D1 \u05E1\u05D8\u05D6 uvw xyz|</div>',
+  '<div contenteditable dir="ltr">abc def \u05E9\u05E0\u05D1 \u05E1\u05D8\u05D6 uvw |xyz</div>',
   '7-19 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_9.html b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_9.html
index 0bc12940a28d3278101c32f4e93033040b177b26..5ccb7cf91fce2e475088099387990de45afbbbb4 100644
--- a/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_9.html
+++ b/third_party/blink/web_tests/editing/selection/modify_move/move_right_word_visually_single_space_one_element_9.html
@@ -27,7 +27,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">aaa| אאא bbb</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">aaa \u05D0\u05D0\u05D0 |bbb</div>',
+  '<div contenteditable dir="ltr">aaa |\u05D0\u05D0\u05D0 bbb</div>',
   '9-3 right word');
 
 selection_test(
@@ -51,7 +51,7 @@ selection_test(
 selection_test(
   '<div contenteditable dir="ltr">aaa אאא| bbb</div>',
   selection => selection.modify('move', 'right', 'word'),
-  '<div contenteditable dir="ltr">aaa \u05D0\u05D0\u05D0 bbb|</div>',
+  '<div contenteditable dir="ltr">aaa \u05D0\u05D0\u05D0 |bbb</div>',
   '9-7 right word');
 
 selection_test(
diff --git a/third_party/blink/web_tests/editing/selection/thai-word-at-document-end.html b/third_party/blink/web_tests/editing/selection/thai-word-at-document-end.html
index db69e84e397f834d78da4708a2595706b11f333b..deafe73d3875fefdcbd6a8c3ec745a52ec73de4c 100644
--- a/third_party/blink/web_tests/editing/selection/thai-word-at-document-end.html
+++ b/third_party/blink/web_tests/editing/selection/thai-word-at-document-end.html
@@ -5,6 +5,7 @@
 <script>
 // Thai word selection misbehaves for the last sentence in the document.
 // rdar://problem/6764359
+const isMac = navigator.platform.indexOf('Mac') === 0;
 
 const kSegment0 = '\u0E04\u0E27\u0E32\u0E21';
 const kSegment1 = '\u0E2B\u0E21\u0E32\u0E22';
@@ -39,7 +40,9 @@ selection_test(
 selection_test(
   `<div conntenteditable>${kSegment0}${kSegment1}${kSegment2}|${kSegment3} ${kSentence1}.</div>`,
   selection => selection.modify('move', 'forward', 'word'),
-  `<div conntenteditable>${kSentence0} ${kSegment4}|${kSegment5}${kSegment6}${kSegment7}.</div>`,
+  isMac
+      ? `<div conntenteditable>${kSentence0} ${kSegment4}|${kSegment5}${kSegment6}${kSegment7}.</div>`
+      : `<div conntenteditable>${kSentence0} |${kSegment4}${kSegment5}${kSegment6}${kSegment7}.</div>`,
   '4 Move forward word with period');
 
 selection_test(
@@ -94,7 +97,9 @@ selection_test(
 selection_test(
   `<div conntenteditable>${kSegment0}${kSegment1}${kSegment2}|${kSegment3} ${kSentence1}</div>`,
   selection => selection.modify('move', 'forward', 'word'),
-  `<div conntenteditable>${kSentence0} ${kSegment4}|${kSegment5}${kSegment6}${kSegment7}</div>`,
+  isMac
+      ? `<div conntenteditable>${kSentence0} ${kSegment4}|${kSegment5}${kSegment6}${kSegment7}</div>`
+      : `<div conntenteditable>${kSentence0} |${kSegment4}${kSegment5}${kSegment6}${kSegment7}</div>`,
   '4 Move forward word without period');
 
 selection_test(
