commit | 72d438ee5563db3087ea1f6630834343bdb8fb65 | [log] [tgz] |
---|---|---|
author | Yoshifumi Inoue <yosin@chromium.org> | Fri Aug 24 08:17:29 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Aug 24 08:17:29 2018 |
tree | 1baa0b41ec6e4c265a3cdac8680274cfe30c282b | |
parent | 40f1a7556c25c113bf1f7fcd9b36cfe686051bc7 [diff] |
Implement Element#innerText to conform the spec NOT READY FOR COMMIT To commit this patch, I need to do: - Rebaseline 9500+ layout files for linux, mac, win, since existing implementation doesn't conform the spec[1] - Fix DOM distiller bug[3] It depends on textContent(true) to have newline for <br> https://github.com/chromium/dom-distiller/issues/10 WebTextTest.testGenerateOutputBRElements should have spec complaint test expectation - Fix CrSettingsSiteDetailsPermissionTest.All change expectations to have <option>s This patch implements Element#innerText to conform the spec[1]. Pass rate of WPT is changed from 78 failures to 6 failures for 213 test cases. The design doc is https://goo.gl/VW9xxe. The differences of current implementations are: - No more leading/training newlines - No more trailing whitespaces - At most two newlines between sequences of <p> and <div>. - Contents of <select>, <optgroup> and <option> in result. - No newline for <br> for disconnected element. Note: Handling of <select>, <optgroup> and <option> aren't conformed with the spec[1] since the spec[1] requires to implement Element#innerText specific CSS handling, ::first-line, ::first-letter, text-transform etc, for contents of <option>. I filed the issue[2]. [1] https://html.spec.whatwg.org/multipage/dom.html#the-innertext-idl-attribute [2] https://github.com/whatwg/html/issues/3797 innerText for <select>, <optgroup> and <option> TBR=alexmos@chromium.org TBR=dpapad@chromium.org TBR=dmazzoni@chromium.org TBR=skyostil@chromium.org Bug: 651764, 859410 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng Change-Id: I48a02db0347d8ebd189f3ef608b31a4a93d89e84 Reviewed-on: https://chromium-review.googlesource.com/1114673 Commit-Queue: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by: Sami Kyöstilä <skyostil@chromium.org> Reviewed-by: Yoshifumi Inoue <yosin@chromium.org> Reviewed-by: Kent Tamura <tkent@chromium.org> Reviewed-by: Yoichi Osato <yoichio@chromium.org> Cr-Commit-Position: refs/heads/master@{#585756}
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 .