This is a follow-up bug for Bug 106533. It seems no one didn't ensure Position of enclosingTextFormControl() points ShadowDOM in input or textarea. We would like to have some ASSERT or something.
toTextFormControl() returns 0 if it's not TextFormControl. I don't think this function aligns recent coding convention... It would be better to rewrite it.
Created attachment 183360 [details] Patch
Comment on attachment 183360 [details] Patch Attachment 183360 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/15943318
Comment on attachment 183360 [details] Patch Attachment 183360 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/15943349
Ah some WebKit ports uses toTextFormControl()... :-(
Created attachment 183375 [details] Patch
Comment on attachment 183375 [details] Patch Attachment 183375 [details] did not pass qt-ews (qt): Output: http://queues.webkit.org/results/15946266
Comment on attachment 183375 [details] Patch Attachment 183375 [details] did not pass qt-wk2-ews (qt): Output: http://queues.webkit.org/results/15937548
Created attachment 183383 [details] Patch
Comment on attachment 183383 [details] Patch Looks ok. Please watch buildbots especially GTK bots after landing this.
Comment on attachment 183383 [details] Patch Clearing flags on attachment: 183383 Committed r140215: <http://trac.webkit.org/changeset/140215>
All reviewed patches have been landed. Closing bug.