<?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>63249</bug_id>
          
          <creation_ts>2011-06-23 05:33:57 -0700</creation_ts>
          <short_desc>[UNIX] Fix compile warnings in NetscapePluginX11.cpp</short_desc>
          <delta_ts>2011-06-23 09:42:06 -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>WebKit2</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Gtk, Qt</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Carlos Garcia Campos">cgarcia</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>426099</commentid>
    <comment_count>0</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2011-06-23 05:33:57 -0700</bug_when>
    <thetext>../Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: In function ‘void WebKit::setXButtonEventFields(XEvent&amp;, const WebKit::WebMouseEvent&amp;, const WebCore::IntPoint&amp;)’:
../Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:405:12: warning: enumeration value ‘NoButton’ not handled in switch
../Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: In member function ‘bool WebKit::NetscapePlugin::platformHandleMouseEvent(const WebKit::WebMouseEvent&amp;)’:
../Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:457:12: warning: enumeration value ‘NoType’ not handled in switch
../Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:457:12: warning: enumeration value ‘Wheel’ not handled in switch
../Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:457:12: warning: enumeration value ‘KeyDown’ not handled in switch
../Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:457:12: warning: enumeration value ‘KeyUp’ not handled in switch
../Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:457:12: warning: enumeration value ‘RawKeyDown’ not handled in switch
../Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:457:12: warning: enumeration value ‘Char’ not handled in switch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>426100</commentid>
    <comment_count>1</comment_count>
      <attachid>98337</attachid>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2011-06-23 05:35:31 -0700</bug_when>
    <thetext>Created attachment 98337
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>426185</commentid>
    <comment_count>2</comment_count>
      <attachid>98337</attachid>
    <who name="Martin Robinson">mrobinson</who>
    <bug_when>2011-06-23 08:10:41 -0700</bug_when>
    <thetext>Comment on attachment 98337
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=98337&amp;action=review

Looks good, but I have a few minor requests before landing.

&gt; Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:362
&gt; +    case WebMouseEvent::LeftButton:
&gt; +    default:
&gt; +        xButton.button = Button1;
&gt; +        break;

If we are receiving other types of events shouldn&apos;t we be passing them properly to the plugin. I think it&apos;s more correct to simply have ASSERT_NOT_REACHED() for default:. This makes me wonder whether wheel events are supported or not.

&gt; Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:414
&gt; +    default:
&gt; +        return false;

I would rather you list them explicitly here. Do you mind changing that before landing?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>426198</commentid>
    <comment_count>3</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2011-06-23 08:25:30 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; (From update of attachment 98337 [details])
&gt; View in context: https://bugs.webkit.org/attachment.cgi?id=98337&amp;action=review
&gt; 
&gt; Looks good, but I have a few minor requests before landing.
&gt; 
&gt; &gt; Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:362
&gt; &gt; +    case WebMouseEvent::LeftButton:
&gt; &gt; +    default:
&gt; &gt; +        xButton.button = Button1;
&gt; &gt; +        break;
&gt; 
&gt; If we are receiving other types of events shouldn&apos;t we be passing them properly to the plugin. I think it&apos;s more correct to simply have ASSERT_NOT_REACHED() for default:. This makes me wonder whether wheel events are supported or not.

Since this code is shared between Gtk and Qt ports I looked at current WebKi1 code of both ports and followed it. There&apos;s another method for wheel events platformHandleWheelEvent().

&gt; &gt; Source/WebKit2/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:414
&gt; &gt; +    default:
&gt; &gt; +        return false;
&gt; 
&gt; I would rather you list them explicitly here. Do you mind changing that before landing?

Sure. Thanks for reviewing.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>426232</commentid>
    <comment_count>4</comment_count>
    <who name="Carlos Garcia Campos">cgarcia</who>
    <bug_when>2011-06-23 09:42:06 -0700</bug_when>
    <thetext>Committed r89580: &lt;http://trac.webkit.org/changeset/89580&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>98337</attachid>
            <date>2011-06-23 05:35:31 -0700</date>
            <delta_ts>2011-06-23 08:10:41 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>wk2-compile-warnings.diff</filename>
            <type>text/plain</type>
            <size>1898</size>
            <attacher name="Carlos Garcia Campos">cgarcia</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQyL0NoYW5nZUxvZyBiL1NvdXJjZS9XZWJLaXQyL0No
YW5nZUxvZwppbmRleCA5Mzc2MDcyLi5jNmM0M2Q1IDEwMDY0NAotLS0gYS9Tb3VyY2UvV2ViS2l0
Mi9DaGFuZ2VMb2cKKysrIGIvU291cmNlL1dlYktpdDIvQ2hhbmdlTG9nCkBAIC0xLDMgKzEsMTQg
QEAKKzIwMTEtMDYtMjMgIENhcmxvcyBHYXJjaWEgQ2FtcG9zICA8Y2dhcmNpYUBpZ2FsaWEuY29t
PgorCisgICAgICAgIFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIFtVTklY
XSBGaXggY29tcGlsZSB3YXJuaW5ncyBpbiBOZXRzY2FwZVBsdWdpblgxMS5jcHAKKyAgICAgICAg
aHR0cHM6Ly9idWdzLndlYmtpdC5vcmcvc2hvd19idWcuY2dpP2lkPTYzMjQ5CisKKyAgICAgICAg
KiBXZWJQcm9jZXNzL1BsdWdpbnMvTmV0c2NhcGUveDExL05ldHNjYXBlUGx1Z2luWDExLmNwcDoK
KyAgICAgICAgKFdlYktpdDo6c2V0WEJ1dHRvbkV2ZW50RmllbGRzKToKKyAgICAgICAgKFdlYktp
dDo6TmV0c2NhcGVQbHVnaW46OnBsYXRmb3JtSGFuZGxlTW91c2VFdmVudCk6CisKIDIwMTEtMDYt
MjIgIENhcmxvcyBHYXJjaWEgQ2FtcG9zICA8Y2dhcmNpYUBpZ2FsaWEuY29tPgogCiAgICAgICAg
IFJldmlld2VkIGJ5IE1hcnRpbiBSb2JpbnNvbi4KZGlmZiAtLWdpdCBhL1NvdXJjZS9XZWJLaXQy
L1dlYlByb2Nlc3MvUGx1Z2lucy9OZXRzY2FwZS94MTEvTmV0c2NhcGVQbHVnaW5YMTEuY3BwIGIv
U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ICAgICAgeEJ1dHRvbi5idXR0b24gPSBCdXR0b24xOworICAgICAgICBicmVhazsKICAgICB9
CiB9CiAKQEAgLTQwOSw2ICs0MTAsOCBAQCBib29sIE5ldHNjYXBlUGx1Z2luOjpwbGF0Zm9ybUhh
bmRsZU1vdXNlRXZlbnQoY29uc3QgV2ViTW91c2VFdmVudCYgZXZlbnQpCiAgICAgY2FzZSBXZWJF
dmVudDo6TW91c2VNb3ZlOgogICAgICAgICBzZXRYTW90aW9uRXZlbnRGaWVsZHMoeEV2ZW50LCBl
dmVudCwgbV9mcmFtZVJlY3QubG9jYXRpb24oKSk7CiAgICAgICAgIGJyZWFrOworICAgIGRlZmF1
bHQ6CisgICAgICAgIHJldHVybiBmYWxzZTsKICAgICB9CiAKICAgICByZXR1cm4gTlBQX0hhbmRs
ZUV2ZW50KCZ4RXZlbnQpOwo=
</data>
<flag name="review"
          id="92539"
          type_id="1"
          status="+"
          setter="mrobinson"
    />
          </attachment>
      

    </bug>

</bugzilla>