Bug 36870 - [Qt] WebKit crashes while input text through input method
Summary: [Qt] WebKit crashes while input text through input method
Status: CLOSED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit Qt (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC All
: P2 Critical
Assignee: Nobody
URL:
Keywords: Qt
Depends on:
Blocks: 35784
  Show dependency treegraph
 
Reported: 2010-03-30 22:28 PDT by Tasuku Suzuki
Modified: 2010-04-09 01:14 PDT (History)
3 users (show)

See Also:


Attachments
Minimal test case for this issue (1.92 KB, text/plain)
2010-03-30 22:28 PDT, Tasuku Suzuki
no flags Details
proposed patch (4.51 KB, patch)
2010-04-06 20:26 PDT, Joseph Ligman
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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