Bug 30902 - Need a layout test for Bug 28284
Summary: Need a layout test for Bug 28284
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-29 03:10 PDT by Hironori Bono
Modified: 2009-11-01 08:18 PST (History)
3 users (show)

See Also:


Attachments
A simple layout test (4.90 KB, patch)
2009-10-29 03:46 PDT, Hironori Bono
darin: review-
Details | Formatted Diff | Diff
The second layout test (without eventSender) (4.87 KB, patch)
2009-10-30 04:44 PDT, Hironori Bono
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hironori Bono 2009-10-29 03:10:31 PDT
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.
Comment 1 Hironori Bono 2009-10-29 03:46:51 PDT
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 2 Darin Adler 2009-10-29 08:23:27 PDT
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.
Comment 3 Hironori Bono 2009-10-30 04:44:55 PDT
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 4 Eric Seidel (no email) 2009-10-30 15:26:53 PDT
Comment on attachment 42206 [details]
The second layout test (without eventSender)

LGTM too. Adding to the commit-queue.
Comment 5 WebKit Commit Bot 2009-11-01 08:18:45 PST
Comment on attachment 42206 [details]
The second layout test (without eventSender)

Clearing flags on attachment: 42206

Committed r50388: <http://trac.webkit.org/changeset/50388>
Comment 6 WebKit Commit Bot 2009-11-01 08:18:49 PST
All reviewed patches have been landed.  Closing bug.