RESOLVED FIXED 160971
Align the innerText setter with the HTML spec and Gecko
https://bugs.webkit.org/show_bug.cgi?id=160971
Summary Align the innerText setter with the HTML spec and Gecko
Simon Pieters (:zcorpan)
Reported 2016-08-18 13:40:20 PDT
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)
Attachments
WIP Patch (5.53 KB, patch)
2017-01-13 15:41 PST, Chris Dumez
no flags
Archive of layout-test-results from ews107 for mac-elcapitan-wk2 (1.05 MB, application/zip)
2017-01-13 17:21 PST, Build Bot
no flags
Archive of layout-test-results from ews101 for mac-elcapitan (828.47 KB, application/zip)
2017-01-13 17:30 PST, Build Bot
no flags
Archive of layout-test-results from ews115 for mac-elcapitan (1.65 MB, application/zip)
2017-01-13 17:32 PST, Build Bot
no flags
Archive of layout-test-results from ews125 for ios-simulator-wk2 (deleted)
2017-01-13 17:38 PST, Build Bot
no flags
Patch (17.24 KB, patch)
2017-01-13 19:05 PST, Chris Dumez
no flags
Chris Dumez
Comment 1 2016-08-18 13:55:32 PDT
Thanks, I'll take a look.
Chris Dumez
Comment 3 2016-08-19 09:33:54 PDT
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.
Chris Dumez
Comment 4 2016-08-19 09:34:54 PDT
(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.
Simon Pieters (:zcorpan)
Comment 5 2016-08-22 01:25:00 PDT
Yep. :-) Feel free to review the PRs.
Chris Dumez
Comment 6 2016-09-15 10:46:29 PDT
Looks like the reason <br>.innerText = "x" throws in WebKit because we were trying to match IE.
Chris Dumez
Comment 7 2016-09-15 10:49:59 PDT
(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.
Simon Pieters (:zcorpan)
Comment 8 2016-11-29 04:38:21 PST
Also see: innerText: include parentheses around <rt> if there's no <rp> https://github.com/whatwg/html/issues/1801
Domenic Denicola
Comment 9 2017-01-10 14:17:40 PST
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...
Chris Dumez
Comment 10 2017-01-13 15:41:09 PST
Created attachment 298798 [details] WIP Patch
Build Bot
Comment 11 2017-01-13 17:21:27 PST
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
Build Bot
Comment 12 2017-01-13 17:21:30 PST
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
Build Bot
Comment 13 2017-01-13 17:30:14 PST
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
Build Bot
Comment 14 2017-01-13 17:30:18 PST
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
Build Bot
Comment 15 2017-01-13 17:32:42 PST
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
Build Bot
Comment 16 2017-01-13 17:32:45 PST
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
Build Bot
Comment 17 2017-01-13 17:38:25 PST
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
Build Bot
Comment 18 2017-01-13 17:38:30 PST
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
Chris Dumez
Comment 19 2017-01-13 19:05:38 PST
WebKit Commit Bot
Comment 20 2017-01-14 09:37:03 PST
Comment on attachment 298828 [details] Patch Clearing flags on attachment: 298828 Committed r210767: <http://trac.webkit.org/changeset/210767>
WebKit Commit Bot
Comment 21 2017-01-14 09:37:08 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.