Bug 1539527 [wpt PR 16069] - [Editing] Preserve inserted content's original style when inserted into an empty block, a=testonly
authorXiaocheng Hu <xiaochengh@chromium.org>
Thu, 18 Apr 2019 11:55:05 +0000
changeset 529912 32f73f4858c270acac364b70e1a34747e4472223
parent 529911 d280b802b1d6d341a97996c6eed8bf4bb6ff46ca
child 529913 8eb9c2619cc8b42114483876e7e7b497b9e00ec4
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1539527, 16069, 818888, 1531683, 644200
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1539527 [wpt PR 16069] - [Editing] Preserve inserted content's original style when inserted into an empty block, a=testonly Automatic update from web-platform-tests [Editing] Preserve inserted content's original style when inserted into an empty block https://crrev.com/2072093002 introduced a behavior that, when content is inserted into a block, the content's original style is removed to match the block's style. This results in a regression that the content's style is lost when the block is empty and has nothing to match. Therefore, this patch preserves the content's original style when the block is empty. This also ensures style preservation when the insertion is an internal operation of a higher level formatting command, e.g. outdent. Note: this patch introduces a minor regression that, 'text-indent' CSS property appears in a wrapper span after outdent command. This seems harmless, though, as 'text-indent' applies only to block elements, so the wrapper span doesn't have any effect in this case. This will be cleaned up in a followup patch. Bug: 818888 Change-Id: I2a6302cd5aa033339a8b857e3183dc5a2a261b4a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1531683 Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org> Cr-Commit-Position: refs/heads/master@{#644200} -- wpt-commits: ee4b086658e4633927ac88f9b3a1c7f471fc5618 wpt-pr: 16069
testing/web-platform/tests/editing/data/outdent.js
--- a/testing/web-platform/tests/editing/data/outdent.js
+++ b/testing/web-platform/tests/editing/data/outdent.js
@@ -869,10 +869,15 @@ var browserTests = [
     [["defaultparagraphseparator","p"],["outdent",""]],
     "<p>[]a</p><table><tbody><tr><td><br></td></tr></tbody></table>",
     [true,true],
     {"defaultparagraphseparator":[false,false,"div",false,false,"p"],"outdent":[false,false,"",false,false,""]}],
 ["<blockquote><span>foo<br>[bar]</span></blockquote>",
     [["outdent",""]],
     "<blockquote>foo</blockquote><span>[bar]</span>",
     [true],
+    {"outdent":[false,false,"",false,false,""]}],
+["<ul><ul><li><span style=\"color:rgb(255, 0, 0)\">[]foo</span></li></ul></ul>",
+    [["outdent",""]],
+    "<ul><li><span style=\"color:rgb(255, 0, 0)\">[]foo</span></li></ul>",
+    [true],
     {"outdent":[false,false,"",false,false,""]}]
 ]