See https://github.com/whatwg/html/issues/1679 WebKit throws for <br>.innerText = "x" etc, The spec and Gecko do not. WebKit will update existing text node's data if element has just 1 text node. The HTML spec and Gecko always replace with a new text node. 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 at https://github.com/w3c/web-platform-tests/tree/master/innerText (these might get moved to html/ or something later)
Thanks, I'll take a look.
Also see https://github.com/w3c/web-platform-tests/pull/3491 https://github.com/w3c/web-platform-tests/pull/3492 https://github.com/w3c/web-platform-tests/pull/3493
Simon, unfortunately the bugs you are reporting do not seem to be covered by the web platforms tests under innerText/? WebKit is passing 100% of the innerText setter checks.
(In reply to comment #3) > Simon, unfortunately the bugs you are reporting do not seem to be covered by > the web platforms tests under innerText/? WebKit is passing 100% of the > innerText setter checks. Oh, I see now that you have PRs that have not landed yet and cover this.
Yep. :-) Feel free to review the PRs.
Looks like the reason <br>.innerText = "x" throws in WebKit because we were trying to match IE.
(In reply to comment #6) > Looks like the reason <br>.innerText = "x" throws in WebKit because we were > trying to match IE. Looks like Chrome agrees with us here.
Also see: innerText: include parentheses around <rt> if there's no <rp> https://github.com/whatwg/html/issues/1801
Tests have landed for innerText (and createContextualFragment) to remove the blocklist, per https://github.com/whatwg/html/issues/2222: - http://w3c-test.org/innerText/setter.html - http://w3c-test.org/domparsing/createContextualFragment.html We should probably continue to work on landing the rest of Simon's tests...
Created attachment 298798 [details] WIP Patch
Comment on attachment 298798 [details] WIP Patch Attachment 298798 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/2885038 New failing tests: imported/w3c/web-platform-tests/domparsing/createContextualFragment.html
Created attachment 298813 [details] Archive of layout-test-results from ews107 for mac-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews107 Port: mac-elcapitan-wk2 Platform: Mac OS X 10.11.6
Comment on attachment 298798 [details] WIP Patch Attachment 298798 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/2885089 New failing tests: imported/w3c/web-platform-tests/domparsing/createContextualFragment.html
Created attachment 298816 [details] Archive of layout-test-results from ews101 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 298798 [details] WIP Patch Attachment 298798 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/2885065 New failing tests: imported/w3c/web-platform-tests/domparsing/createContextualFragment.html
Created attachment 298817 [details] Archive of layout-test-results from ews115 for mac-elcapitan The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews115 Port: mac-elcapitan Platform: Mac OS X 10.11.6
Comment on attachment 298798 [details] WIP Patch Attachment 298798 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/2885076 New failing tests: imported/w3c/web-platform-tests/domparsing/createContextualFragment.html
Created attachment 298819 [details] Archive of layout-test-results from ews125 for ios-simulator-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews125 Port: ios-simulator-wk2 Platform: Mac OS X 10.11.6
Created attachment 298828 [details] Patch
Comment on attachment 298828 [details] Patch Clearing flags on attachment: 298828 Committed r210767: <http://trac.webkit.org/changeset/210767>
All reviewed patches have been landed. Closing bug.