The last-child css selector will in some way interfere with paste in Chrome 8,Safari 5 and Chromium. It is not possible to paste text into a textbox that has existing data in it if the :last-child selector is present on the page. This works better with Chromium but the problem still exists in some cases. See attachements.
Created attachment 76020 [details] For chrome 8 and Safari 5
Created attachment 76021 [details] For chromium
Created attachment 78916 [details] Two input fields to demonstrate that the first field works as expected It's only the last input field that is affected as you can see from the new attachment but It gets even weirder; 1) Select part of the word Chrome. 2) Paste in first field works. Paste in last field does not work. 3) Select the whole word Chrome by double clicking it. 4) Both first and last field pasting works!
The chromium attachment seems to work as expected in Chromium 10, so it's possible all issues have been fixed.
Confirmed that this bug reproduces on Safari 5 but doesn't reproduce on TOT.
Created attachment 85237 [details] adds regression tests
Comment on attachment 85237 [details] adds regression tests View in context: https://bugs.webkit.org/attachment.cgi?id=85237&action=review > LayoutTests/editing/input/div-first-child-rule-input.html:11 > +// The bug only reproduces on Safari 5 when input is the last element in body Nit: mentioning a specific Safari version is not useful. All layout tests only reproduce in some previous Safari version. Just because this test was committed after doesn't change what the comment should say. All I'm saying is s/on Safari 5//. > LayoutTests/editing/input/div-first-child-rule-textarea.html:11 > +// The bug only reproduces on Safari 5 when textarea is the last element in body Ditto > LayoutTests/editing/input/div-first-child-rule-textarea.html:22 > + if (input.value == 'hello world') > + input.parentNode.insertBefore(document.createTextNode('PASS'), input); > + else > + input.parentNode.insertBefore(document.createTextNode('FAIL'), input); While I'm nitpicking, it would be more readable to do: var success = (input.value == 'hello world') ? 'PASS' : 'FAIL'; input.parentNode.insertBefore(document.createTextNode(success), input);
Thanks for the review! Will fix both issues before landing it.
Committed r80737: <http://trac.webkit.org/changeset/80737>
http://trac.webkit.org/changeset/80737 might have broken GTK Linux 32-bit Debug and GTK Linux 64-bit Debug The following tests are not passing: fast/js/large-expressions.html jquery/effects.html