Open Bug 1476215 Opened 7 years ago Updated 3 years ago

[wpt-sync] Sync PR 12016 - Implement Element#innerText to conform the spec

Categories

(Core :: DOM: Core & HTML, enhancement, P4)

enhancement

Tracking

()

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 12016 into mozilla-central (this bug is closed when the sync is complete). PR: https://github.com/web-platform-tests/wpt/pull/12016 Details from upstream follow. Yoshifumi Inoue <yosin@chromium.org> wrote: > 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> > > Bug: 651764 > Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng > Change-Id: I48a02db0347d8ebd189f3ef608b31a4a93d89e84 > Reviewed-on: https://chromium-review.googlesource.com/1114673 > WPT-Export-Revision: 2f6d7e3c21b9aab44f7202efc409a27144c0c475
Component: web-platform-tests → DOM
Product: Testing → Core
Component: DOM → DOM: Core & HTML
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.