commit | fa583784527c3c1575f1145d31c79c6733176d38 | [log] [tgz] |
---|---|---|
author | Sunny <ratsunny@gmail.com> | Mon Oct 22 05:50:45 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Mon Oct 22 05:50:45 2018 |
tree | caea98bea2f557695784e223893007e21c85138a | |
parent | ffadc32258ea77bdb878a58556aeb30f5210bf2b [diff] |
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/1266728 Reviewed-by: Kent Tamura <tkent@chromium.org> Commit-Queue: Kent Tamura <tkent@chromium.org> Cr-Commit-Position: refs/heads/master@{#601480}
Chromium is an open-source browser project that aims to build a safer, faster, and more stable way for all users to experience the web.
The project's web site is https://www.chromium.org.
Documentation in the source is rooted in docs/README.md.
Learn how to Get Around the Chromium Source Code Directory Structure .