<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>47273</bug_id>
          
          <creation_ts>2010-10-06 09:19:59 -0700</creation_ts>
          <short_desc>[Qt][S60] Junk text is shown in textbox when text is highlighted</short_desc>
          <delta_ts>2010-11-01 06:37:22 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>WebKit Qt</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>S60 Hardware</rep_platform>
          <op_sys>S60 3rd edition</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>39625</dup_id>
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Major</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>39625</dependson>
          
          <everconfirmed>0</everconfirmed>
          <reporter name="Ankur Baranwal">ankur.baranwal</reporter>
          <assigned_to name="QtWebKit Unassigned">webkit-qt-unassigned</assigned_to>
          <cc>amit.rai</cc>
    
    <cc>ankur.baranwal</cc>
    
    <cc>kling</cc>
    
    <cc>neelkanth.nidgundi</cc>
    
    <cc>pragya.kaundal</cc>
    
    <cc>ramesh.hegde</cc>
    
    <cc>robert</cc>
    
    <cc>suresh.voruganti</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>290352</commentid>
    <comment_count>0</comment_count>
    <who name="Ankur Baranwal">ankur.baranwal</who>
    <bug_when>2010-10-06 09:19:59 -0700</bug_when>
    <thetext>Qt: 4.7
QtWebkit: 2.1
OS: Symbian^3

Steps to reproduce the error -
1. Open www.google.com in Anomaly Browser.
2. Select the search text box. Virtual keypad opens.
3. Enter &quot;hello&quot; and highlight the word.
4. Now press ok button on virtual keypad.

Expected Result -
After step 4, &quot;hello&quot; word is displayed in text box.

Actual Result -
After step 4, &quot;hellohello&quot; is displayed in the text box.

Additional Info -
This bug is not reproducible on native applications and in sample Qt application.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>291571</commentid>
    <comment_count>1</comment_count>
    <who name="Ramesh">ramesh.hegde</who>
    <bug_when>2010-10-08 05:18:21 -0700</bug_when>
    <thetext>This is a Blocker issue for us.Can you raise this priority to P0-Blocker and work on it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>292496</commentid>
    <comment_count>2</comment_count>
    <who name="Suresh Voruganti">suresh.voruganti</who>
    <bug_when>2010-10-11 08:38:55 -0700</bug_when>
    <thetext>This error is moved from wrt team Boston Defect -6537
 and the analysis in 6537 doesnt prove that it is Qtwebkit error. Wrt team need to analyse and prove that it is Qtwebkit error, so ignoring the error as now. Re-open the error after analysis if the problem seems to be in QtWebkit.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>294019</commentid>
    <comment_count>3</comment_count>
    <who name="Ankur Baranwal">ankur.baranwal</who>
    <bug_when>2010-10-14 02:00:33 -0700</bug_when>
    <thetext>This bug is reproducible using QtTestBrowser.

I debugged this further and found that following piece of code which, it seems, was introduced in Webkit2.1. Whenever control passes through this code, text is getting repeated.

void QWebPagePrivate::inputMethodEvent(QInputMethodEvent *ev)
{
...
...

#if QT_VERSION &gt;= 0x040600
        if (hasSelection) {
            QString text = (renderTextControl) ? QString(renderTextControl-&gt;text()) : QString();
            if (preedit.isEmpty() &amp;&amp; selection.start + selection.length &gt; 0)
                preedit = text;
            editor-&gt;setComposition(preedit, underlines,
                                   (selection.length &lt; 0) ? selection.start + selection.length : selection.start,
                                   (selection.length &lt; 0) ? selection.start : selection.start + selection.length);
        } else
#endif
...
...
}

It seems text is getting appended to older string every time in QString(renderTextControl-&gt;text()).

Also, this happens even if we simply click on empty area in the virtual keypad.

This behavior is not seen with the Address bar text field. It happens only within the html text field.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>294091</commentid>
    <comment_count>4</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2010-10-14 07:04:40 -0700</bug_when>
    <thetext>CC&apos;ing Robert since he introduced this code block in &lt;http://trac.webkit.org/changeset/58218&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>294103</commentid>
    <comment_count>5</comment_count>
    <who name="Suresh Voruganti">suresh.voruganti</who>
    <bug_when>2010-10-14 07:20:05 -0700</bug_when>
    <thetext>Adding dependency to 39121 as it is top issue for services.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>294211</commentid>
    <comment_count>6</comment_count>
    <who name="Robert Hogan">robert</who>
    <bug_when>2010-10-14 11:15:56 -0700</bug_when>
    <thetext>(In reply to comment #4)
&gt; CC&apos;ing Robert since he introduced this code block in &lt;http://trac.webkit.org/changeset/58218&gt;

What we need to do is outlined by Simon in:

https://bugs.webkit.org/show_bug.cgi?id=39625#c15

Unfortunately I never got round to implementing it. I can look at it this weekend, but if the priority needs to be higher then someone should do it before me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295230</commentid>
    <comment_count>7</comment_count>
    <who name="Robert Hogan">robert</who>
    <bug_when>2010-10-17 10:10:30 -0700</bug_when>
    <thetext>There is a patch up for review at:

https://bugs.webkit.org/show_bug.cgi?id=39625

Let me know if it works for you.

Also, as someone who only has the unit tests to go on, can you provide a unit test for this case similar to those in tst_qwebpage?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295399</commentid>
    <comment_count>8</comment_count>
    <who name="neelkanth">neelkanth.nidgundi</who>
    <bug_when>2010-10-18 01:36:35 -0700</bug_when>
    <thetext>Please provide the LE?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>295428</commentid>
    <comment_count>9</comment_count>
    <who name="Andreas Kling">kling</who>
    <bug_when>2010-10-18 03:41:15 -0700</bug_when>
    <thetext>(In reply to comment #8)
&gt; Please provide the LE?

Please refrain from using Nokia jargon on public issue trackers.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>298112</commentid>
    <comment_count>10</comment_count>
    <who name="Robert Hogan">robert</who>
    <bug_when>2010-10-22 12:36:52 -0700</bug_when>
    <thetext>Hi Ankur,

Is this fixed for you in trunk now?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>302282</commentid>
    <comment_count>11</comment_count>
    <who name="Ankur Baranwal">ankur.baranwal</who>
    <bug_when>2010-10-30 04:05:30 -0700</bug_when>
    <thetext>Hi Robert, the problem is fixed in trunk now. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>302638</commentid>
    <comment_count>12</comment_count>
    <who name="Suresh Voruganti">suresh.voruganti</who>
    <bug_when>2010-11-01 06:36:15 -0700</bug_when>
    <thetext>Duplicating this error to 39625
as the patch for 39625 fixed this issue.

*** This bug has been marked as a duplicate of bug 39625 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>