Bug 1495996 [wpt PR 13327] - Make Element#innerText to not collapse white space around inline-block, a=testonly
authorYoshifumi Inoue <yosin@chromium.org>
Tue, 09 Oct 2018 04:13:56 +0000
changeset 495951 46e32726905f0d7e7408388368495467091ad8df
parent 495950 b08a738d556ba5eea4309af21552f6384112c9a6
child 495952 b84c99548594141343dc0d4eb3153c16cad7f06b
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1495996, 13327, 890020, 1250825, 596485
milestone64.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 1495996 [wpt PR 13327] - Make Element#innerText to not collapse white space around inline-block, a=testonly Automatic update from web-platform-testsMake Element#innerText to not collapse white space around inline-block This patch makes |Element#innerText| not to collapse white space around inline- block for improving interop. Note: The spec doesn't explicitly mention about this. Changes of AX test expectations added missing space after <input>. TBR=dmazzoni@chromium.org Bug: 890020 Cq-Include-Trybots: luci.chromium.try‚Äč:linux_layout_tests_layout_ng Change-Id: I74a47fd5ba3a22ff17d9c36838a81b4277ac47cc Reviewed-on: https://chromium-review.googlesource.com/c/1250825 Reviewed-by: Xiaocheng Hu <xiaochengh@chromium.org> Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Cr-Commit-Position: refs/heads/master@{#596485} -- wpt-commits: a7d4565da88d4ebec1825279223fca9e7a4b2fac wpt-pr: 13327
testing/web-platform/tests/html/dom/elements/the-innertext-idl-attribute/getter-tests.js
--- a/testing/web-platform/tests/html/dom/elements/the-innertext-idl-attribute/getter-tests.js
+++ b/testing/web-platform/tests/html/dom/elements/the-innertext-idl-attribute/getter-tests.js
@@ -47,16 +47,19 @@ testText("<div style='white-space:pre-li
 testText("<div style='white-space:pre-line'>abc\rdef", "abc\ndef", "\\r converted to newline");
 testText("<div style='white-space:pre-line'>abc\tdef", "abc def", "\\t converted to space");
 
 /**** Collapsing whitespace across element boundaries ****/
 
 testText("<div><span>abc </span> def", "abc def", "Whitespace collapses across element boundaries");
 testText("<div><span>abc </span><span></span> def", "abc def", "Whitespace collapses across element boundaries");
 testText("<div><span>abc </span><span style='white-space:pre'></span> def", "abc def", "Whitespace collapses across element boundaries");
+testText("<div>abc <input> def", "abc  def", "Whitespace around <input> should not be collapsed");
+testText("<div>abc <span style='display:inline-block'></span> def", "abc  def", "Whitespace around inline-block should not be collapsed");
+testText("<div>abc <span style='display:inline-block'> def </span> ghi", "abc def ghi", "Trailing space at end of inline-block should be collapsed");
 
 /**** Soft line breaks ****/
 
 testText("<div style='width:0'>abc def", "abc def", "Soft line breaks ignored");
 testText("<div style='width:0'><span>abc</span> <span>def</span>", "abc def", "Whitespace text node preserved");
 
 /**** first-line/first-letter ****/