Align some set innerText behavior with standard
According to spec[1], when a string starts with CR/LF set as innerText, the first child node should not be an empty text node. So we adjust the logic in HTMLElement::TextToFragment to make sure it follows the spec. Besides, same in spec[1], there is no special procedure for setting innerText when the element is being rendered and styled as preserving new line, so corresponding code was removed in this commit. 15 failed wpt tests could be passed after this change. [1] https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute Bug: 573309, 705478 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng;luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: I6765601a14c2e95cec3841e084046da79aca065c Reviewed-on: https://chromium-review.googlesource.com/c/1266728Reviewed-by:Kent Tamura <tkent@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#601480}
Showing
Please register or sign in to comment