+++ This bug was initially created as a clone of Bug #160971 +++ <!DOCTYPE html> <body> <script>document.body.innerText = '\nfoo'</script> The body will have 3 children (empty text node, <br>, text node "foo"), expect 2 (<br>, text node "foo"). If the assigned value starts with a newline, WebKit/Chromium inserts an empty text node, the spec/Gecko/IE don't. Spec at https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute Tests: https://github.com/w3c/web-platform-tests/pull/3492 Fail Start with CR assert_not_equals: Should not have empty text nodes got disallowed value "" Fail Start with LF assert_not_equals: Should not have empty text nodes got disallowed value "" Fail Start with CRLF assert_not_equals: Should not have empty text nodes got disallowed value ""
http://w3c-test.org/innerText/setter.html
Created attachment 304806 [details] WIP patch
Created attachment 304810 [details] Patch
Comment on attachment 304810 [details] Patch Clearing flags on attachment: 304810 Committed r214136: <http://trac.webkit.org/changeset/214136>
All reviewed patches have been landed. Closing bug.