<?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>20191</bug_id>
          
          <creation_ts>2008-07-27 22:02:00 -0700</creation_ts>
          <short_desc>[Qt] Hitting enter/return doesn&apos;t create new list items as in other WebKit ports.</short_desc>
          <delta_ts>2008-08-05 06:42:32 -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>All</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc>http://rtef.info/demo.htm or http://tinymce.moxiecode.com/example_full.php?example=true</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Qt</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Erik L. Bunce">elbunce</reporter>
          <assigned_to name="Tor Arne Vestbø">vestbo</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>87105</commentid>
    <comment_count>0</comment_count>
    <who name="Erik L. Bunce">elbunce</who>
    <bug_when>2008-07-27 22:02:00 -0700</bug_when>
    <thetext>This problem still exists in SVN r35406.

Creating either an ordered or unordered list in (TinyMCE, RTEF, or otherwise) doesn&apos;t work as expected using the Qt build of WebKit.  In Safari and using the Mac OS X native build, Enter/Return result in a new list item being created, however it inserts a line break.

This is caused by the VK_RETURN handling in Qt WebKit  calling the InsertLineBreak instead of InsertNewline command.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87106</commentid>
    <comment_count>1</comment_count>
      <attachid>22516</attachid>
    <who name="Erik L. Bunce">elbunce</who>
    <bug_when>2008-07-27 22:03:04 -0700</bug_when>
    <thetext>Created attachment 22516
Patch to change VK_RETURN handling from InsertLineBreak to InsertNewline</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87153</commentid>
    <comment_count>2</comment_count>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2008-07-28 07:30:13 -0700</bug_when>
    <thetext>This should probably be handled in QWebPage::editorActionForKeyEvent(), but might require changes in Qt. I&apos;m looking into it.

We also need to make sure we exec InsertLineBreak when the shift modifier is pressed (ctrl on mac).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87164</commentid>
    <comment_count>3</comment_count>
    <who name="Erik L. Bunce">elbunce</who>
    <bug_when>2008-07-28 09:54:40 -0700</bug_when>
    <thetext>I agree about the Shift / CTRL modifier.  Also that long-term a lot of EditorClientQt::handleKeyboardEvent() should be refactored, and that comparison/dispatch using QKeySequence would be a better way to go. However, I&apos;m not sure wholesale moving it to use QWebPage::editorActionForKeyEvent() is the correct solution either, unless you wish to expose most / all of the necessary commands as QWebPage::WebActions.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87167</commentid>
    <comment_count>4</comment_count>
      <attachid>22523</attachid>
    <who name="Erik L. Bunce">elbunce</who>
    <bug_when>2008-07-28 10:22:56 -0700</bug_when>
    <thetext>Created attachment 22523
Improved patch handles Shift + Return properly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87245</commentid>
    <comment_count>5</comment_count>
    <who name="Erik L. Bunce">elbunce</who>
    <bug_when>2008-07-28 22:38:48 -0700</bug_when>
    <thetext>Looking at the sequences in question, making them QPage::WebActions might not be a bad idea.

I&apos;d still probably separate the edit vs. &apos;nav&apos; action lookups.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87256</commentid>
    <comment_count>6</comment_count>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2008-07-29 04:48:17 -0700</bug_when>
    <thetext>Preliminary patch (requires a &gt; 1. August Qt snapshot):

http://code.staikos.net/cgi-bin/gitweb.cgi?p=webkit;a=commitdiff;h=fb313a86b2565637593c8b5b497c28b9ae763b1a
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87262</commentid>
    <comment_count>7</comment_count>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2008-07-29 06:17:08 -0700</bug_when>
    <thetext>Updated patch. This one should build against Qt 4.4 too (by using the approach of patch 22523). Thanks for contributing!

http://code.staikos.net/cgi-bin/gitweb.cgi?p=webkit;a=commitdiff;h=7d2f6e54672ca4d0c3fd4541ad59e4f32db981cc</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87358</commentid>
    <comment_count>8</comment_count>
    <who name="Erik L. Bunce">elbunce</who>
    <bug_when>2008-07-29 21:55:12 -0700</bug_when>
    <thetext>Heh, the one correction I&apos;d make is that my name is Erik with a k at the end.  ;-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87862</commentid>
    <comment_count>9</comment_count>
    <who name="Tor Arne Vestbø">vestbo</who>
    <bug_when>2008-08-05 06:42:32 -0700</bug_when>
    <thetext>Landed in r35558, with a k at the end :)

Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="1"
              ispatch="1"
              isprivate="0"
          >
            <attachid>22516</attachid>
            <date>2008-07-27 22:03:04 -0700</date>
            <delta_ts>2008-07-28 10:22:56 -0700</delta_ts>
            <desc>Patch to change VK_RETURN handling from InsertLineBreak to InsertNewline</desc>
            <filename>insertnewline.patch.txt</filename>
            <type>text/plain</type>
            <size>1349</size>
            <attacher name="Erik L. Bunce">elbunce</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC9xdC9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gV2ViS2l0L3F0L0NoYW5n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dG9yQ2xpZW50UXQ6OmhhbmRsZUtleWJvYXJkRXZlbnQKICAgICBpZiAoc3RhcnQtPmlz
Q29udGVudEVkaXRhYmxlKCkpIHsKICAgICAgICAgc3dpdGNoIChrZXZlbnQtPndpbmRvd3NWaXJ0
dWFsS2V5Q29kZSgpKSB7CiAgICAgICAgICAgICBjYXNlIFZLX1JFVFVSTjoKLSAgICAgICAgICAg
ICAgICBmcmFtZS0+ZWRpdG9yKCktPmNvbW1hbmQoIkluc2VydExpbmVCcmVhayIpLmV4ZWN1dGUo
KTsKKyAgICAgICAgICAgICAgICBmcmFtZS0+ZWRpdG9yKCktPmNvbW1hbmQoIkluc2VydE5ld2xp
bmUiKS5leGVjdXRlKCk7CiAgICAgICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgICAgICBjYXNl
IFZLX0JBQ0s6CiAgICAgICAgICAgICAgICAgZnJhbWUtPmVkaXRvcigpLT5kZWxldGVXaXRoRGly
ZWN0aW9uKFNlbGVjdGlvbkNvbnRyb2xsZXI6OkJBQ0tXQVJELAo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>22523</attachid>
            <date>2008-07-28 10:22:56 -0700</date>
            <delta_ts>2008-07-28 10:22:56 -0700</delta_ts>
            <desc>Improved patch handles Shift + Return properly.</desc>
            <filename>insertnewline.patch.txt</filename>
            <type>text/plain</type>
            <size>1471</size>
            <attacher name="Erik L. Bunce">elbunce</attacher>
            
              <data encoding="base64">SW5kZXg6IFdlYktpdC9xdC9DaGFuZ2VMb2cKPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gV2ViS2l0L3F0L0NoYW5n
ZUxvZwkocmV2aXNpb24gMzU0MDYpCisrKyBXZWJLaXQvcXQvQ2hhbmdlTG9nCSh3b3JraW5nIGNv
cHkpCkBAIC0xLDMgKzEsMTIgQEAKKzIwMDgtMDctMjcgIEVyaWs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Rvd3NWaXJ0
dWFsS2V5Q29kZSgpKSB7CiAgICAgICAgICAgICBjYXNlIFZLX1JFVFVSTjoKLSAgICAgICAgICAg
ICAgICBmcmFtZS0+ZWRpdG9yKCktPmNvbW1hbmQoIkluc2VydExpbmVCcmVhayIpLmV4ZWN1dGUo
KTsKKyAgICAgICAgICAgICAgICBpZiAoa2V2ZW50LT5zaGlmdEtleSgpKQorICAgICAgICAgICAg
ICAgICAgICBmcmFtZS0+ZWRpdG9yKCktPmNvbW1hbmQoIkluc2VydExpbmVCcmVhayIpLmV4ZWN1
dGUoKTsKKyAgICAgICAgICAgICAgICBlbHNlIGZyYW1lLT5lZGl0b3IoKS0+Y29tbWFuZCgiSW5z
ZXJ0TmV3bGluZSIpLmV4ZWN1dGUoKTsKICAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAg
ICAgIGNhc2UgVktfQkFDSzoKICAgICAgICAgICAgICAgICBmcmFtZS0+ZWRpdG9yKCktPmRlbGV0
ZVdpdGhEaXJlY3Rpb24oU2VsZWN0aW9uQ29udHJvbGxlcjo6QkFDS1dBUkQsCg==
</data>

          </attachment>
      

    </bug>

</bugzilla>