Elements in a table are incorrectly selected in JavaScript.
rdar://69916897
Created attachment 417576 [details] Patch
Created attachment 417587 [details] Patch
Created attachment 417663 [details] Patch
Created attachment 417909 [details] Patch
Comment on attachment 417909 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=417909&action=review > LayoutTests/editing/selection/editable-table-cell-selection.html:13 > + if (!testRunner.runUIScript) I don't see any (direct or indirect) uses of runUIScript in this test…can we just remove this early return and make the test manually runnable? > LayoutTests/editing/selection/editable-table-cell-selection.html:18 > + function select( element ) { Nit - lots of extra spaces in function calls in runTest(). > LayoutTests/editing/selection/editable-table-cell-selection.html:21 > + range.setStartBefore( element ); (Ditto) > LayoutTests/editing/selection/editable-table-cell-selection.html:22 > + range.setEndAfter( element ); (Ditto) > LayoutTests/editing/selection/editable-table-cell-selection.html:27 > + selection.addRange( range ); (Ditto) > LayoutTests/editing/selection/editable-table-cell-selection.html:30 > + select( document.querySelector( 'thead tr' ) ); (Ditto) > LayoutTests/editing/selection/editable-table-cell-selection.html:37 > + const lastHeadCell = [ ...document.querySelectorAll( 'thead th' ) ].pop(); (Ditto) > LayoutTests/editing/selection/editable-table-cell-selection.html:38 > + select( lastHeadCell ); (Ditto) > LayoutTests/editing/selection/editable-table-cell-selection.html:45 > + select( document.querySelector( 'tbody tr' ) ); (Ditto) > LayoutTests/editing/selection/editable-table-cell-selection.html:47 > + output += 'PASS: Correctly Selects row in tboyd'; Nit - tbody. > LayoutTests/editing/selection/editable-table-cell-selection.html:52 > + const lastBodyCell = [ ...document.querySelectorAll( 'tbody td' ) ].pop(); (Ditto) > LayoutTests/editing/selection/editable-table-cell-selection.html:53 > + select( lastBodyCell ); (Ditto) > LayoutTests/editing/selection/editable-table-cell-selection.html:123 > + This test requires UIScriptController to run. Hm…is this true? I don't see any UIScriptController bits in this test.
Created attachment 417931 [details] Patch for landing
Committed r271635: <https://trac.webkit.org/changeset/271635> All reviewed patches have been landed. Closing bug and clearing flags on attachment 417931 [details].