TextInputController.firstRectForCharacterRange() returns the pixel-level rectangle for the specified character range. So, to use this function, we can write a layout test for Bug 28284. Unfortunately, this function is implemented only by Mac WebKit, i.e. the Chromium test_shell doesn't implement this function. So, we need to implement the function for the Chromium test_shell and write a layout test for WebKit Bug 28284.
Created attachment 42089 [details] A simple layout test I'm not sure I can send a review request for a change that only includes a layout test. Sorry if it is not allowed. Regards, Hironori Bono
Comment on attachment 42089 [details] A simple layout test Putting a patch up for review that is just a test is fine. > + // Insert a Thai character U+0E01. > + eventSender.keyDown(String.fromCharCode(0x0E01)); I believe there is a way to make this test work without using eventSender. See, for example, events/option-tab.html and forms/input-text-enter.html which create a keyboard event using the DOM. Please make a version that does not use eventSender, or explain why not. Otherwise, this test looks very good to me.
Created attachment 42206 [details] The second layout test (without eventSender) Thank you for your review and comments. > > + // Insert a Thai character U+0E01. > > + eventSender.keyDown(String.fromCharCode(0x0E01)); > > I believe there is a way to make this test work without using eventSender. See, > for example, events/option-tab.html and forms/input-text-enter.html which > create a keyboard event using the DOM. > > Please make a version that does not use eventSender, or explain why not. You are totally right. This test doesn't need eventSender at all. (Sorry, I used eventSender without deep consideration.) Bug #28284 happens when we insert a Thai character into a text node in some way, such as keyboard-typing, copy-and-paste, DOM events, etc. (I should have used "Node.innerText += String.fromCharCode(0x0E01);'.) I have updated this change to use "Node.innerText" instead of 'eventSender.keyDown()'. Would it be possible to review the updated change? Regards, Hironori Bono
Comment on attachment 42206 [details] The second layout test (without eventSender) LGTM too. Adding to the commit-queue.
Comment on attachment 42206 [details] The second layout test (without eventSender) Clearing flags on attachment: 42206 Committed r50388: <http://trac.webkit.org/changeset/50388>
All reviewed patches have been landed. Closing bug.