<?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>18218</bug_id>
          
          <creation_ts>2008-03-30 09:16:36 -0700</creation_ts>
          <short_desc>[Gtk] segfault when clicking on a disabled button</short_desc>
          <delta_ts>2008-04-18 04:16:15 -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>WebKitGTK</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</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Zoltan Dome">islandofcalmness</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>alp</cc>
    
    <cc>jchaffraix</cc>
    
    <cc>jmalonzo</cc>
    
    <cc>zuh</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>75824</commentid>
    <comment_count>0</comment_count>
    <who name="Zoltan Dome">islandofcalmness</who>
    <bug_when>2008-03-30 09:16:36 -0700</bug_when>
    <thetext>Webkit segfaults when clicking on a disabled button.

This only happens when the disabled button is on the first page loaded by the engine AND is the first thing clicked on.

So, for example, if I start GtkLauncher with a test-file and click the button, it crashes, but it doesn&apos;t crash if I click somewhere else on the page first.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>75825</commentid>
    <comment_count>1</comment_count>
      <attachid>20212</attachid>
    <who name="Zoltan Dome">islandofcalmness</who>
    <bug_when>2008-03-30 09:17:59 -0700</bug_when>
    <thetext>Created attachment 20212
test file for bug</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76727</commentid>
    <comment_count>2</comment_count>
    <who name="Julien Chaffraix">jchaffraix</who>
    <bug_when>2008-04-09 08:56:08 -0700</bug_when>
    <thetext>Confirmed on ToT.

The cause is in webkit_web_view_button_release_event (webkitwebview.cpp) when focusFrame is null. There is no null check so we call one of focusFrame&apos;s methods which results in a crash.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77443</commentid>
    <comment_count>3</comment_count>
      <attachid>20511</attachid>
    <who name="Jan Alonzo">jmalonzo</who>
    <bug_when>2008-04-13 19:30:34 -0700</bug_when>
    <thetext>Created attachment 20511
Add a null check before using the focused frame

The patch checks for a null focusedFrame before calling the event handler. Thanks jchaffraix for the hint.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>77906</commentid>
    <comment_count>4</comment_count>
    <who name="Kalle Vahlman">zuh</who>
    <bug_when>2008-04-17 04:02:12 -0700</bug_when>
    <thetext>Apparently this bug is also an issue with having a &quot;mousedown&quot; event handler that calls event.preventDefault().

I tested Jan&apos;s patch, and it fixes things for both cases.
</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78084</commentid>
    <comment_count>5</comment_count>
      <attachid>20511</attachid>
    <who name="Alp Toker">alp</who>
    <bug_when>2008-04-18 04:01:31 -0700</bug_when>
    <thetext>Comment on attachment 20511
Add a null check before using the focused frame

r-

The correct fix is to use the main frame for mouse events since it has the logic to bubble the event to the correct owner.

I&apos;ll take care of this one.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78085</commentid>
    <comment_count>6</comment_count>
    <who name="Alp Toker">alp</who>
    <bug_when>2008-04-18 04:16:15 -0700</bug_when>
    <thetext>(Different) fix landed in r32203.

Thanks for tracking this issue Jan!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>20212</attachid>
            <date>2008-03-30 09:17:59 -0700</date>
            <delta_ts>2008-03-30 09:17:59 -0700</delta_ts>
            <desc>test file for bug</desc>
            <filename>crash_test.html</filename>
            <type>text/html</type>
            <size>32</size>
            <attacher name="Zoltan Dome">islandofcalmness</attacher>
            
              <data encoding="base64">PGJ1dHRvbiBkaXNhYmxlZD5jcmFzaDwvYnV0dG9uPgo=
</data>

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>20511</attachid>
            <date>2008-04-13 19:30:34 -0700</date>
            <delta_ts>2008-04-18 04:01:31 -0700</delta_ts>
            <desc>Add a null check before using the focused frame</desc>
            <filename>webkitgtk-nullcheck-focusedframe.patch</filename>
            <type>text/plain</type>
            <size>1302</size>
            <attacher name="Jan Alonzo">jmalonzo</attacher>
            
              <data encoding="base64">ZGlmZiAtLWdpdCBhL1dlYktpdC9ndGsvQ2hhbmdlTG9nIGIvV2ViS2l0L2d0ay9DaGFuZ2VMb2cK
aW5kZXggZThmYTZhMC4uMzBiYTk2YiAxMDA2NDQKLS0tIGEvV2ViS2l0L2d0ay9DaGFuZ2VMb2cK
KysrIGIvV2ViS2l0L2d0ay9DaGFuZ2VMb2cKQEAgLTEsMyArMSwxMyBAQAorMjAwOC0wNC0xMyAg
SmFuIE1pY2hhZWwgQWxvbnpvICA8am1hbG9uem9AdW5wbHVnZ2FibGUuY29tPgorCisgICAgICAg
IFJldmlld2VkIGJ5IE5PQk9EWSAoT09QUyEpLgorCisgICAgICAgIGh0dHA6Ly9idWdzLndlYmtp
dC5vcmcvc2hvd19idWcuY2dpP2lkPTE4MjE4CisgICAgICAgIFtHdGtdIHNlZ2ZhdWx0IHdoZW4g
Y2xpY2tpbmcgb24gYSBkaXNhYmxlZCBidXR0b24KKworICAgICAgICAqIHdlYmtpdC93ZWJraXR3
ZWJ2aWV3LmNwcDogY2hlY2sgZm9yIGEgbnVsbCBmcmFtZSBiZWZvcmUgY2FsbGluZworICA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saWVudF93aW5kb3co
cHJpdi0+aW1Db250ZXh0LCB3aW5kb3cpOwogI2lmZGVmIE1BRU1PX0NIQU5HRVMK
</data>
<flag name="review"
          id="8935"
          type_id="1"
          status="-"
          setter="alp"
    />
          </attachment>
      

    </bug>

</bugzilla>