Bug 36870

Summary: [Qt] WebKit crashes while input text through input method
Product: WebKit Reporter: Tasuku Suzuki <tasuku.suzuki>
Component: WebKit QtAssignee: Nobody <webkit-unassigned>
Status: CLOSED FIXED    
Severity: Critical CC: commit-queue, hausmann, joseph.ligman
Priority: P2 Keywords: Qt
Version: 528+ (Nightly build)   
Hardware: PC   
OS: All   
Bug Depends on:    
Bug Blocks: 35784    
Attachments:
Description Flags
Minimal test case for this issue
none
proposed patch none

Description Tasuku Suzuki 2010-03-30 22:28:03 PDT
Created attachment 52128 [details]
Minimal test case for this issue

QtWebKit crashes when I input text through input method on Windows 7, Mac OS X and Ubuntu Linux.

1. Launch Demo Browser in Qt.
2. Open google.com
3. Input "aiueo" in Japanese with Japanese IME
4. Translate it to Kanji.

I'm sure this is not a language specific. Please see and run the minimal test case attached.
Comment 1 Joseph Ligman 2010-04-06 20:26:51 PDT
Created attachment 52697 [details]
proposed patch

I did some debugging with your test case and noticed that the problem could be with the underline start and end offset.
Comment 2 Tasuku Suzuki 2010-04-07 01:26:55 PDT
(In reply to comment #1)
> Created an attachment (id=52697) [details]
> proposed patch
> 
> I did some debugging with your test case and noticed that the problem could be
> with the underline start and end offset.

I see that the problem was QWebPage passed start and length to CompositionUnderline instead of start and end.
As far as I tested for a while, your patch works for me on Windows 7, Mac OS X(10.6) and Gentoo Linux.
Comment 3 Joseph Ligman 2010-04-07 06:44:54 PDT
(In reply to comment #2)
> (In reply to comment #1)
> > Created an attachment (id=52697) [details] [details]
> > proposed patch
> > 
> > I did some debugging with your test case and noticed that the problem could be
> > with the underline start and end offset.
> 
> I see that the problem was QWebPage passed start and length to
> CompositionUnderline instead of start and end.
> As far as I tested for a while, your patch works for me on Windows 7, Mac OS
> X(10.6) and Gentoo Linux.

Thanks. I will set the patch for review.
Comment 4 Simon Hausmann 2010-04-08 06:11:13 PDT
Comment on attachment 52697 [details]
proposed patch

r=me
Comment 5 WebKit Commit Bot 2010-04-08 06:24:32 PDT
Comment on attachment 52697 [details]
proposed patch

Clearing flags on attachment: 52697

Committed r57270: <http://trac.webkit.org/changeset/57270>
Comment 6 WebKit Commit Bot 2010-04-08 06:24:37 PDT
All reviewed patches have been landed.  Closing bug.
Comment 7 Simon Hausmann 2010-04-09 01:14:07 PDT
Revision r57270 cherry-picked into qtwebkit-2.0 with commit b607ff42345b89dfcd328c95740491e8f9eeb367