[css-text-decor] Serialize text-decoration-line in canonical order

text-decoration-line's keywords (none, underline, overline,
line-through, blink) now serialize in canonical order:
https://drafts.csswg.org/css-text-decor-3/#text-decoration-line-property

Passing most of the tests in text-decoration-line-valid.html
except the ones related to unsupported keywords.
Updated test results for external/wpt/editing/run/underline.html.

BUG=952860
TEST=external/wpt/css/css-text-decor/parsing/text-decoration-line-valid.html

Change-Id: I0bf5a764858cbb1ea7722616a44b3b891a6c919f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1567768
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Commit-Queue: Manuel Rego <rego@igalia.com>
Cr-Commit-Position: refs/heads/master@{#651195}
diff --git a/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc b/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
index 3f37993..7d033e8 100644
--- a/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
+++ b/third_party/blink/renderer/core/css/properties/css_parsing_utils.cc
@@ -2390,23 +2390,41 @@
   return shape;
 }
 
+// none | [ underline || overline || line-through || blink ]
 CSSValue* ConsumeTextDecorationLine(CSSParserTokenRange& range) {
   CSSValueID id = range.Peek().Id();
   if (id == CSSValueID::kNone)
     return css_property_parser_helpers::ConsumeIdent(range);
 
-  CSSValueList* list = CSSValueList::CreateSpaceSeparated();
+  CSSIdentifierValue* underline = nullptr;
+  CSSIdentifierValue* overline = nullptr;
+  CSSIdentifierValue* line_through = nullptr;
+  CSSIdentifierValue* blink = nullptr;
+
   while (true) {
-    CSSIdentifierValue* ident = css_property_parser_helpers::ConsumeIdent<
-        CSSValueID::kBlink, CSSValueID::kUnderline, CSSValueID::kOverline,
-        CSSValueID::kLineThrough>(range);
-    if (!ident)
+    id = range.Peek().Id();
+    if (id == CSSValueID::kUnderline && !underline)
+      underline = css_property_parser_helpers::ConsumeIdent(range);
+    else if (id == CSSValueID::kOverline && !overline)
+      overline = css_property_parser_helpers::ConsumeIdent(range);
+    else if (id == CSSValueID::kLineThrough && !line_through)
+      line_through = css_property_parser_helpers::ConsumeIdent(range);
+    else if (id == CSSValueID::kBlink && !blink)
+      blink = css_property_parser_helpers::ConsumeIdent(range);
+    else
       break;
-    if (list->HasValue(*ident))
-      return nullptr;
-    list->Append(*ident);
   }
 
+  CSSValueList* list = CSSValueList::CreateSpaceSeparated();
+  if (underline)
+    list->Append(*underline);
+  if (overline)
+    list->Append(*overline);
+  if (line_through)
+    list->Append(*line_through);
+  if (blink)
+    list->Append(*blink);
+
   if (!list->length())
     return nullptr;
   return list;
diff --git a/third_party/blink/web_tests/external/wpt/css/css-text-decor/parsing/text-decoration-line-valid-expected.txt b/third_party/blink/web_tests/external/wpt/css/css-text-decor/parsing/text-decoration-line-valid-expected.txt
index caf82fb..fcd3f1b 100644
--- a/third_party/blink/web_tests/external/wpt/css/css-text-decor/parsing/text-decoration-line-valid-expected.txt
+++ b/third_party/blink/web_tests/external/wpt/css/css-text-decor/parsing/text-decoration-line-valid-expected.txt
@@ -1,70 +1,70 @@
 This is a testharness.js-based test.
-Found 67 tests; 16 PASS, 51 FAIL, 0 TIMEOUT, 0 NOTRUN.
+Found 67 tests; 65 PASS, 2 FAIL, 0 TIMEOUT, 0 NOTRUN.
 PASS e.style['text-decoration-line'] = "none" should set the property value
 PASS e.style['text-decoration-line'] = "underline" should set the property value
 PASS e.style['text-decoration-line'] = "overline" should set the property value
 PASS e.style['text-decoration-line'] = "line-through" should set the property value
 PASS e.style['text-decoration-line'] = "blink" should set the property value
 PASS e.style['text-decoration-line'] = "underline overline" should set the property value
-FAIL e.style['text-decoration-line'] = "overline underline" should set the property value assert_equals: serialization should be canonical expected "underline overline" but got "overline underline"
+PASS e.style['text-decoration-line'] = "overline underline" should set the property value
 PASS e.style['text-decoration-line'] = "underline line-through" should set the property value
-FAIL e.style['text-decoration-line'] = "line-through underline" should set the property value assert_equals: serialization should be canonical expected "underline line-through" but got "line-through underline"
+PASS e.style['text-decoration-line'] = "line-through underline" should set the property value
 PASS e.style['text-decoration-line'] = "underline blink" should set the property value
-FAIL e.style['text-decoration-line'] = "blink underline" should set the property value assert_equals: serialization should be canonical expected "underline blink" but got "blink underline"
+PASS e.style['text-decoration-line'] = "blink underline" should set the property value
 PASS e.style['text-decoration-line'] = "overline line-through" should set the property value
-FAIL e.style['text-decoration-line'] = "line-through overline" should set the property value assert_equals: serialization should be canonical expected "overline line-through" but got "line-through overline"
+PASS e.style['text-decoration-line'] = "line-through overline" should set the property value
 PASS e.style['text-decoration-line'] = "overline blink" should set the property value
-FAIL e.style['text-decoration-line'] = "blink overline" should set the property value assert_equals: serialization should be canonical expected "overline blink" but got "blink overline"
+PASS e.style['text-decoration-line'] = "blink overline" should set the property value
 PASS e.style['text-decoration-line'] = "line-through blink" should set the property value
-FAIL e.style['text-decoration-line'] = "blink line-through" should set the property value assert_equals: serialization should be canonical expected "line-through blink" but got "blink line-through"
+PASS e.style['text-decoration-line'] = "blink line-through" should set the property value
 PASS e.style['text-decoration-line'] = "underline overline line-through" should set the property value
-FAIL e.style['text-decoration-line'] = "underline line-through overline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through" but got "underline line-through overline"
-FAIL e.style['text-decoration-line'] = "overline underline line-through" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through" but got "overline underline line-through"
-FAIL e.style['text-decoration-line'] = "overline line-through underline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through" but got "overline line-through underline"
-FAIL e.style['text-decoration-line'] = "line-through underline overline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through" but got "line-through underline overline"
-FAIL e.style['text-decoration-line'] = "line-through overline underline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through" but got "line-through overline underline"
+PASS e.style['text-decoration-line'] = "underline line-through overline" should set the property value
+PASS e.style['text-decoration-line'] = "overline underline line-through" should set the property value
+PASS e.style['text-decoration-line'] = "overline line-through underline" should set the property value
+PASS e.style['text-decoration-line'] = "line-through underline overline" should set the property value
+PASS e.style['text-decoration-line'] = "line-through overline underline" should set the property value
 PASS e.style['text-decoration-line'] = "underline overline blink" should set the property value
-FAIL e.style['text-decoration-line'] = "underline blink overline" should set the property value assert_equals: serialization should be canonical expected "underline overline blink" but got "underline blink overline"
-FAIL e.style['text-decoration-line'] = "overline underline blink" should set the property value assert_equals: serialization should be canonical expected "underline overline blink" but got "overline underline blink"
-FAIL e.style['text-decoration-line'] = "overline blink underline" should set the property value assert_equals: serialization should be canonical expected "underline overline blink" but got "overline blink underline"
-FAIL e.style['text-decoration-line'] = "blink underline overline" should set the property value assert_equals: serialization should be canonical expected "underline overline blink" but got "blink underline overline"
-FAIL e.style['text-decoration-line'] = "blink overline underline" should set the property value assert_equals: serialization should be canonical expected "underline overline blink" but got "blink overline underline"
+PASS e.style['text-decoration-line'] = "underline blink overline" should set the property value
+PASS e.style['text-decoration-line'] = "overline underline blink" should set the property value
+PASS e.style['text-decoration-line'] = "overline blink underline" should set the property value
+PASS e.style['text-decoration-line'] = "blink underline overline" should set the property value
+PASS e.style['text-decoration-line'] = "blink overline underline" should set the property value
 PASS e.style['text-decoration-line'] = "underline line-through blink" should set the property value
-FAIL e.style['text-decoration-line'] = "underline blink line-through" should set the property value assert_equals: serialization should be canonical expected "underline line-through blink" but got "underline blink line-through"
-FAIL e.style['text-decoration-line'] = "line-through underline blink" should set the property value assert_equals: serialization should be canonical expected "underline line-through blink" but got "line-through underline blink"
-FAIL e.style['text-decoration-line'] = "line-through blink underline" should set the property value assert_equals: serialization should be canonical expected "underline line-through blink" but got "line-through blink underline"
-FAIL e.style['text-decoration-line'] = "blink underline line-through" should set the property value assert_equals: serialization should be canonical expected "underline line-through blink" but got "blink underline line-through"
-FAIL e.style['text-decoration-line'] = "blink line-through underline" should set the property value assert_equals: serialization should be canonical expected "underline line-through blink" but got "blink line-through underline"
+PASS e.style['text-decoration-line'] = "underline blink line-through" should set the property value
+PASS e.style['text-decoration-line'] = "line-through underline blink" should set the property value
+PASS e.style['text-decoration-line'] = "line-through blink underline" should set the property value
+PASS e.style['text-decoration-line'] = "blink underline line-through" should set the property value
+PASS e.style['text-decoration-line'] = "blink line-through underline" should set the property value
 PASS e.style['text-decoration-line'] = "overline line-through blink" should set the property value
-FAIL e.style['text-decoration-line'] = "overline blink line-through" should set the property value assert_equals: serialization should be canonical expected "overline line-through blink" but got "overline blink line-through"
-FAIL e.style['text-decoration-line'] = "line-through overline blink" should set the property value assert_equals: serialization should be canonical expected "overline line-through blink" but got "line-through overline blink"
-FAIL e.style['text-decoration-line'] = "line-through blink overline" should set the property value assert_equals: serialization should be canonical expected "overline line-through blink" but got "line-through blink overline"
-FAIL e.style['text-decoration-line'] = "blink overline line-through" should set the property value assert_equals: serialization should be canonical expected "overline line-through blink" but got "blink overline line-through"
-FAIL e.style['text-decoration-line'] = "blink line-through overline" should set the property value assert_equals: serialization should be canonical expected "overline line-through blink" but got "blink line-through overline"
+PASS e.style['text-decoration-line'] = "overline blink line-through" should set the property value
+PASS e.style['text-decoration-line'] = "line-through overline blink" should set the property value
+PASS e.style['text-decoration-line'] = "line-through blink overline" should set the property value
+PASS e.style['text-decoration-line'] = "blink overline line-through" should set the property value
+PASS e.style['text-decoration-line'] = "blink line-through overline" should set the property value
 PASS e.style['text-decoration-line'] = "underline overline line-through blink" should set the property value
-FAIL e.style['text-decoration-line'] = "underline overline blink line-through" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "underline overline blink line-through"
-FAIL e.style['text-decoration-line'] = "underline line-through overline blink" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "underline line-through overline blink"
-FAIL e.style['text-decoration-line'] = "underline line-through blink overline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "underline line-through blink overline"
-FAIL e.style['text-decoration-line'] = "underline blink overline line-through" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "underline blink overline line-through"
-FAIL e.style['text-decoration-line'] = "underline blink line-through overline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "underline blink line-through overline"
-FAIL e.style['text-decoration-line'] = "overline underline line-through blink" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "overline underline line-through blink"
-FAIL e.style['text-decoration-line'] = "overline underline blink line-through" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "overline underline blink line-through"
-FAIL e.style['text-decoration-line'] = "overline line-through underline blink" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "overline line-through underline blink"
-FAIL e.style['text-decoration-line'] = "overline line-through blink underline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "overline line-through blink underline"
-FAIL e.style['text-decoration-line'] = "overline blink underline line-through" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "overline blink underline line-through"
-FAIL e.style['text-decoration-line'] = "overline blink line-through underline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "overline blink line-through underline"
-FAIL e.style['text-decoration-line'] = "line-through underline overline blink" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "line-through underline overline blink"
-FAIL e.style['text-decoration-line'] = "line-through underline blink overline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "line-through underline blink overline"
-FAIL e.style['text-decoration-line'] = "line-through overline underline blink" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "line-through overline underline blink"
-FAIL e.style['text-decoration-line'] = "line-through overline blink underline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "line-through overline blink underline"
-FAIL e.style['text-decoration-line'] = "line-through blink underline overline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "line-through blink underline overline"
-FAIL e.style['text-decoration-line'] = "line-through blink overline underline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "line-through blink overline underline"
-FAIL e.style['text-decoration-line'] = "blink underline overline line-through" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "blink underline overline line-through"
-FAIL e.style['text-decoration-line'] = "blink underline line-through overline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "blink underline line-through overline"
-FAIL e.style['text-decoration-line'] = "blink overline underline line-through" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "blink overline underline line-through"
-FAIL e.style['text-decoration-line'] = "blink overline line-through underline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "blink overline line-through underline"
-FAIL e.style['text-decoration-line'] = "blink line-through underline overline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "blink line-through underline overline"
-FAIL e.style['text-decoration-line'] = "blink line-through overline underline" should set the property value assert_equals: serialization should be canonical expected "underline overline line-through blink" but got "blink line-through overline underline"
+PASS e.style['text-decoration-line'] = "underline overline blink line-through" should set the property value
+PASS e.style['text-decoration-line'] = "underline line-through overline blink" should set the property value
+PASS e.style['text-decoration-line'] = "underline line-through blink overline" should set the property value
+PASS e.style['text-decoration-line'] = "underline blink overline line-through" should set the property value
+PASS e.style['text-decoration-line'] = "underline blink line-through overline" should set the property value
+PASS e.style['text-decoration-line'] = "overline underline line-through blink" should set the property value
+PASS e.style['text-decoration-line'] = "overline underline blink line-through" should set the property value
+PASS e.style['text-decoration-line'] = "overline line-through underline blink" should set the property value
+PASS e.style['text-decoration-line'] = "overline line-through blink underline" should set the property value
+PASS e.style['text-decoration-line'] = "overline blink underline line-through" should set the property value
+PASS e.style['text-decoration-line'] = "overline blink line-through underline" should set the property value
+PASS e.style['text-decoration-line'] = "line-through underline overline blink" should set the property value
+PASS e.style['text-decoration-line'] = "line-through underline blink overline" should set the property value
+PASS e.style['text-decoration-line'] = "line-through overline underline blink" should set the property value
+PASS e.style['text-decoration-line'] = "line-through overline blink underline" should set the property value
+PASS e.style['text-decoration-line'] = "line-through blink underline overline" should set the property value
+PASS e.style['text-decoration-line'] = "line-through blink overline underline" should set the property value
+PASS e.style['text-decoration-line'] = "blink underline overline line-through" should set the property value
+PASS e.style['text-decoration-line'] = "blink underline line-through overline" should set the property value
+PASS e.style['text-decoration-line'] = "blink overline underline line-through" should set the property value
+PASS e.style['text-decoration-line'] = "blink overline line-through underline" should set the property value
+PASS e.style['text-decoration-line'] = "blink line-through underline overline" should set the property value
+PASS e.style['text-decoration-line'] = "blink line-through overline underline" should set the property value
 FAIL e.style['text-decoration-line'] = "spelling-error" should set the property value assert_not_equals: property should be set got disallowed value ""
 FAIL e.style['text-decoration-line'] = "grammar-error" should set the property value assert_not_equals: property should be set got disallowed value ""
 Harness: the test ran to completion.
diff --git a/third_party/blink/web_tests/external/wpt/editing/run/underline_1-1000-expected.txt b/third_party/blink/web_tests/external/wpt/editing/run/underline_1-1000-expected.txt
index 50da34b..bb4758d 100644
--- a/third_party/blink/web_tests/external/wpt/editing/run/underline_1-1000-expected.txt
+++ b/third_party/blink/web_tests/external/wpt/editing/run/underline_1-1000-expected.txt
@@ -720,7 +720,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s>bar</s></span>baz" but got "foo<span style=\"text-decoration-line:line-through underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s>bar</s></span>baz" but got "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" queryCommandValue("stylewithcss") before
@@ -752,7 +752,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><span style=\"text-decoration:line-through\">bar</span></span>baz" but got "foo<span style=\"text-decoration-line:line-through underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><span style=\"text-decoration:line-through\">bar</span></span>baz" but got "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" queryCommandValue("stylewithcss") before
@@ -944,7 +944,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:line-through\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:line-through\">foo</span><span style=\"text-decoration-line:line-through underline\">bar</span><span style=\"text-decoration-line:line-through\">baz</span></p>"
+FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:line-through\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:line-through\">foo</span><span style=\"text-decoration-line:underline line-through\">bar</span><span style=\"text-decoration-line:line-through\">baz</span></p>"
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" queryCommandValue("stylewithcss") before
@@ -976,7 +976,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><strike>bar</strike></span>baz" but got "foo<span style=\"text-decoration-line:line-through underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><strike>bar</strike></span>baz" but got "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" queryCommandValue("stylewithcss") before
diff --git a/third_party/blink/web_tests/platform/mac/external/wpt/editing/run/underline-expected.txt b/third_party/blink/web_tests/platform/mac/external/wpt/editing/run/underline-expected.txt
index 947a706..007c82b4 100644
--- a/third_party/blink/web_tests/platform/mac/external/wpt/editing/run/underline-expected.txt
+++ b/third_party/blink/web_tests/platform/mac/external/wpt/editing/run/underline-expected.txt
@@ -720,7 +720,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s>bar</s></span>baz" but got "foo<span style=\"text-decoration-line:line-through underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s>bar</s></span>baz" but got "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" queryCommandValue("stylewithcss") before
@@ -752,7 +752,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><span style=\"text-decoration:line-through\">bar</span></span>baz" but got "foo<span style=\"text-decoration-line:line-through underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><span style=\"text-decoration:line-through\">bar</span></span>baz" but got "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" queryCommandValue("stylewithcss") before
@@ -944,7 +944,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:line-through\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:line-through\">foo</span><span style=\"text-decoration-line:line-through underline\">bar</span><span style=\"text-decoration-line:line-through\">baz</span></p>"
+FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:line-through\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:line-through\">foo</span><span style=\"text-decoration-line:underline line-through\">bar</span><span style=\"text-decoration-line:line-through\">baz</span></p>"
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" queryCommandValue("stylewithcss") before
@@ -976,7 +976,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><strike>bar</strike></span>baz" but got "foo<span style=\"text-decoration-line:line-through underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><strike>bar</strike></span>baz" but got "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" queryCommandValue("stylewithcss") before
@@ -1519,7 +1519,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:line-through\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:line-through underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:line-through\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" queryCommandValue("stylewithcss") before
@@ -1551,7 +1551,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:line-through\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:line-through\">b</u><span style=\"text-decoration-line:line-through underline\">a</span><u style=\"text-decoration:line-through\">r</u>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:line-through\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:line-through\">b</u><span style=\"text-decoration-line:underline line-through\">a</span><u style=\"text-decoration:line-through\">r</u>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" queryCommandValue("stylewithcss") before
@@ -1583,7 +1583,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s style=\"text-decoration:overline\">bar</s></span>baz" but got "foo<span style=\"text-decoration-line:overline underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s style=\"text-decoration:overline\">bar</s></span>baz" but got "foo<span style=\"text-decoration-line:underline overline\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" queryCommandValue("stylewithcss") before
@@ -1615,7 +1615,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<s style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</s>baz" but got "foo<s style=\"text-decoration:overline\">b</s><span style=\"text-decoration-line:overline underline\">a</span><s style=\"text-decoration:overline\">r</s>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<s style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</s>baz" but got "foo<s style=\"text-decoration:overline\">b</s><span style=\"text-decoration-line:underline overline\">a</span><s style=\"text-decoration:overline\">r</s>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" queryCommandValue("stylewithcss") before
@@ -1647,7 +1647,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:overline\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:overline underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:overline\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:underline overline\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" queryCommandValue("stylewithcss") before
@@ -1679,7 +1679,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:overline\">b</u><span style=\"text-decoration-line:overline underline\">a</span><u style=\"text-decoration:overline\">r</u>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:overline\">b</u><span style=\"text-decoration-line:underline overline\">a</span><u style=\"text-decoration:overline\">r</u>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" queryCommandValue("stylewithcss") before
@@ -1711,7 +1711,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:overline\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:overline\">foo</span><span style=\"text-decoration-line:overline underline\">bar</span><span style=\"text-decoration-line:overline\">baz</span></p>"
+FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:overline\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:overline\">foo</span><span style=\"text-decoration-line:underline overline\">bar</span><span style=\"text-decoration-line:overline\">baz</span></p>"
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" queryCommandValue("stylewithcss") before
diff --git a/third_party/blink/web_tests/platform/mac/external/wpt/editing/run/underline_1001-2000-expected.txt b/third_party/blink/web_tests/platform/mac/external/wpt/editing/run/underline_1001-2000-expected.txt
index 70506ff..2277ea2 100644
--- a/third_party/blink/web_tests/platform/mac/external/wpt/editing/run/underline_1001-2000-expected.txt
+++ b/third_party/blink/web_tests/platform/mac/external/wpt/editing/run/underline_1001-2000-expected.txt
@@ -519,7 +519,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:line-through\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:line-through underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:line-through\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" queryCommandValue("stylewithcss") before
@@ -551,7 +551,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:line-through\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:line-through\">b</u><span style=\"text-decoration-line:line-through underline\">a</span><u style=\"text-decoration:line-through\">r</u>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:line-through\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:line-through\">b</u><span style=\"text-decoration-line:underline line-through\">a</span><u style=\"text-decoration:line-through\">r</u>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" queryCommandValue("stylewithcss") before
@@ -583,7 +583,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s style=\"text-decoration:overline\">bar</s></span>baz" but got "foo<span style=\"text-decoration-line:overline underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s style=\"text-decoration:overline\">bar</s></span>baz" but got "foo<span style=\"text-decoration-line:underline overline\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" queryCommandValue("stylewithcss") before
@@ -615,7 +615,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<s style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</s>baz" but got "foo<s style=\"text-decoration:overline\">b</s><span style=\"text-decoration-line:overline underline\">a</span><s style=\"text-decoration:overline\">r</s>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<s style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</s>baz" but got "foo<s style=\"text-decoration:overline\">b</s><span style=\"text-decoration-line:underline overline\">a</span><s style=\"text-decoration:overline\">r</s>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" queryCommandValue("stylewithcss") before
@@ -647,7 +647,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:overline\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:overline underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:overline\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:underline overline\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" queryCommandValue("stylewithcss") before
@@ -679,7 +679,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:overline\">b</u><span style=\"text-decoration-line:overline underline\">a</span><u style=\"text-decoration:overline\">r</u>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:overline\">b</u><span style=\"text-decoration-line:underline overline\">a</span><u style=\"text-decoration:overline\">r</u>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" queryCommandValue("stylewithcss") before
@@ -711,7 +711,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:overline\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:overline\">foo</span><span style=\"text-decoration-line:overline underline\">bar</span><span style=\"text-decoration-line:overline\">baz</span></p>"
+FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:overline\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:overline\">foo</span><span style=\"text-decoration-line:underline overline\">bar</span><span style=\"text-decoration-line:overline\">baz</span></p>"
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" queryCommandValue("stylewithcss") before
diff --git a/third_party/blink/web_tests/platform/win/external/wpt/editing/run/underline-expected.txt b/third_party/blink/web_tests/platform/win/external/wpt/editing/run/underline-expected.txt
index 3dc1bcb..5d383c9 100644
--- a/third_party/blink/web_tests/platform/win/external/wpt/editing/run/underline-expected.txt
+++ b/third_party/blink/web_tests/platform/win/external/wpt/editing/run/underline-expected.txt
@@ -720,7 +720,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s>bar</s></span>baz" but got "foo<span style=\"text-decoration-line:line-through underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s>bar</s></span>baz" but got "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s>[bar]</s>baz" queryCommandValue("stylewithcss") before
@@ -752,7 +752,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><span style=\"text-decoration:line-through\">bar</span></span>baz" but got "foo<span style=\"text-decoration-line:line-through underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><span style=\"text-decoration:line-through\">bar</span></span>baz" but got "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<span style=\"text-decoration: line-through\">[bar]</span>baz" queryCommandValue("stylewithcss") before
@@ -944,7 +944,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:line-through\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:line-through\">foo</span><span style=\"text-decoration-line:line-through underline\">bar</span><span style=\"text-decoration-line:line-through\">baz</span></p>"
+FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:line-through\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:line-through\">foo</span><span style=\"text-decoration-line:underline line-through\">bar</span><span style=\"text-decoration-line:line-through\">baz</span></p>"
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: line-through\">foo[bar]baz</p>" queryCommandValue("stylewithcss") before
@@ -976,7 +976,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><strike>bar</strike></span>baz" but got "foo<span style=\"text-decoration-line:line-through underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><strike>bar</strike></span>baz" but got "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<strike>[bar]</strike>baz" queryCommandValue("stylewithcss") before
@@ -1519,7 +1519,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:line-through\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:line-through underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:line-through\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" queryCommandValue("stylewithcss") before
@@ -1551,7 +1551,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:line-through\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:line-through\">b</u><span style=\"text-decoration-line:line-through underline\">a</span><u style=\"text-decoration:line-through\">r</u>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:line-through\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:line-through\">b</u><span style=\"text-decoration-line:underline line-through\">a</span><u style=\"text-decoration:line-through\">r</u>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" queryCommandValue("stylewithcss") before
@@ -1583,7 +1583,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s style=\"text-decoration:overline\">bar</s></span>baz" but got "foo<span style=\"text-decoration-line:overline underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s style=\"text-decoration:overline\">bar</s></span>baz" but got "foo<span style=\"text-decoration-line:underline overline\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" queryCommandValue("stylewithcss") before
@@ -1615,7 +1615,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<s style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</s>baz" but got "foo<s style=\"text-decoration:overline\">b</s><span style=\"text-decoration-line:overline underline\">a</span><s style=\"text-decoration:overline\">r</s>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<s style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</s>baz" but got "foo<s style=\"text-decoration:overline\">b</s><span style=\"text-decoration-line:underline overline\">a</span><s style=\"text-decoration:overline\">r</s>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" queryCommandValue("stylewithcss") before
@@ -1647,7 +1647,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:overline\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:overline underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:overline\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:underline overline\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" queryCommandValue("stylewithcss") before
@@ -1679,7 +1679,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:overline\">b</u><span style=\"text-decoration-line:overline underline\">a</span><u style=\"text-decoration:overline\">r</u>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:overline\">b</u><span style=\"text-decoration-line:underline overline\">a</span><u style=\"text-decoration:overline\">r</u>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" queryCommandValue("stylewithcss") before
@@ -1711,7 +1711,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:overline\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:overline\">foo</span><span style=\"text-decoration-line:overline underline\">bar</span><span style=\"text-decoration-line:overline\">baz</span></p>"
+FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:overline\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:overline\">foo</span><span style=\"text-decoration-line:underline overline\">bar</span><span style=\"text-decoration-line:overline\">baz</span></p>"
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" queryCommandValue("stylewithcss") before
diff --git a/third_party/blink/web_tests/platform/win/external/wpt/editing/run/underline_1001-2000-expected.txt b/third_party/blink/web_tests/platform/win/external/wpt/editing/run/underline_1001-2000-expected.txt
index 85b1d9a..f70a3c5 100644
--- a/third_party/blink/web_tests/platform/win/external/wpt/editing/run/underline_1001-2000-expected.txt
+++ b/third_party/blink/web_tests/platform/win/external/wpt/editing/run/underline_1001-2000-expected.txt
@@ -519,7 +519,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:line-through\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:line-through underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:line-through\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:underline line-through\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">[bar]</u>baz" queryCommandValue("stylewithcss") before
@@ -551,7 +551,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:line-through\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:line-through\">b</u><span style=\"text-decoration-line:line-through underline\">a</span><u style=\"text-decoration:line-through\">r</u>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:line-through\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:line-through\">b</u><span style=\"text-decoration-line:underline line-through\">a</span><u style=\"text-decoration:line-through\">r</u>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: line-through\">b[a]r</u>baz" queryCommandValue("stylewithcss") before
@@ -583,7 +583,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s style=\"text-decoration:overline\">bar</s></span>baz" but got "foo<span style=\"text-decoration-line:overline underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><s style=\"text-decoration:overline\">bar</s></span>baz" but got "foo<span style=\"text-decoration-line:underline overline\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">[bar]</s>baz" queryCommandValue("stylewithcss") before
@@ -615,7 +615,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<s style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</s>baz" but got "foo<s style=\"text-decoration:overline\">b</s><span style=\"text-decoration-line:overline underline\">a</span><s style=\"text-decoration:overline\">r</s>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<s style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</s>baz" but got "foo<s style=\"text-decoration:overline\">b</s><span style=\"text-decoration-line:underline overline\">a</span><s style=\"text-decoration:overline\">r</s>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<s style=\"text-decoration: overline\">b[a]r</s>baz" queryCommandValue("stylewithcss") before
@@ -647,7 +647,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:overline\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:overline underline\">bar</span>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<span style=\"text-decoration:underline\"><u style=\"text-decoration:overline\">bar</u></span>baz" but got "foo<span style=\"text-decoration-line:underline overline\">bar</span>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">[bar]</u>baz" queryCommandValue("stylewithcss") before
@@ -679,7 +679,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:overline\">b</u><span style=\"text-decoration-line:overline underline\">a</span><u style=\"text-decoration:overline\">r</u>baz"
+FAIL [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "foo<u style=\"text-decoration:overline\">b<span style=\"text-decoration:underline\">a</span>r</u>baz" but got "foo<u style=\"text-decoration:overline\">b</u><span style=\"text-decoration-line:underline overline\">a</span><u style=\"text-decoration:overline\">r</u>baz"
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "foo<u style=\"text-decoration: overline\">b[a]r</u>baz" queryCommandValue("stylewithcss") before
@@ -711,7 +711,7 @@
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>": execCommand("stylewithcss", false, "true") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>": execCommand("underline", false, "") return value
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" checks for modifications to non-editable content
-FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:overline\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:overline\">foo</span><span style=\"text-decoration-line:overline underline\">bar</span><span style=\"text-decoration-line:overline\">baz</span></p>"
+FAIL [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" compare innerHTML assert_equals: Unexpected innerHTML (after normalizing inline style) expected "<p style=\"text-decoration:overline\">foo<span style=\"text-decoration:underline\">bar</span>baz</p>" but got "<p style=\"\"><span style=\"text-decoration-line:overline\">foo</span><span style=\"text-decoration-line:underline overline\">bar</span><span style=\"text-decoration-line:overline\">baz</span></p>"
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" queryCommandIndeterm("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" queryCommandState("stylewithcss") before
 PASS [["stylewithcss","true"],["underline",""]] "<p style=\"text-decoration: overline\">foo[bar]baz</p>" queryCommandValue("stylewithcss") before