<?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>63484</bug_id>
          
          <creation_ts>2011-06-27 14:44:53 -0700</creation_ts>
          <short_desc>[Windows, WinCairo] Don&apos;t Attempt to Create Zero-Size DIB</short_desc>
          <delta_ts>2011-06-28 08:42:31 -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 Misc.</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows 7</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Brent Fulgham">bfulgham</reporter>
          <assigned_to name="Brent Fulgham">bfulgham</assigned_to>
          <cc>aroben</cc>
    
    <cc>eric</cc>
    
    <cc>jhoneycutt</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>428326</commentid>
    <comment_count>0</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2011-06-27 14:44:53 -0700</bug_when>
    <thetext>While investigating a separate issue, I noticed that I was hitting an assertion in the Cairo drawing layer because it was attempting to use an invalid HBITMAP created in the WebNodeHighlight::update method.  The underlying issue was that the CreateDIBSection function was failing, because it was being requested to create a section of zero height.

I think the attached patch would be safe for the CoreGraphics and Cairo ports, but wanted to see if anyone knew of a reason why it would be bad to exit early in the case of a zero height (or zero width) paint region.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>428334</commentid>
    <comment_count>1</comment_count>
      <attachid>98790</attachid>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2011-06-27 14:51:38 -0700</bug_when>
    <thetext>Created attachment 98790
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>428889</commentid>
    <comment_count>2</comment_count>
      <attachid>98790</attachid>
    <who name="Adam Roben (:aroben)">aroben</who>
    <bug_when>2011-06-28 08:10:55 -0700</bug_when>
    <thetext>Comment on attachment 98790
Patch

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

&gt; Source/WebKit/win/WebNodeHighlight.cpp:155
&gt; +    ASSERT_WITH_MESSAGE(hbmp.get(), &quot;::CreateDIBSection failed with error %lu&quot;, ::GetLastError());

No need for the .get() here.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>428910</commentid>
    <comment_count>3</comment_count>
    <who name="Brent Fulgham">bfulgham</who>
    <bug_when>2011-06-28 08:42:31 -0700</bug_when>
    <thetext>Committed r89932: &lt;http://trac.webkit.org/changeset/89932&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>98790</attachid>
            <date>2011-06-27 14:51:38 -0700</date>
            <delta_ts>2011-06-28 08:10:54 -0700</delta_ts>
            <desc>Patch</desc>
            <filename>bug-63484-20110627145137.patch</filename>
            <type>text/plain</type>
            <size>1500</size>
            <attacher name="Brent Fulgham">bfulgham</attacher>
            
              <data encoding="base64">SW5kZXg6IFNvdXJjZS9XZWJLaXQvd2luL0NoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBTb3VyY2Uv
V2ViS2l0L3dpbi9DaGFuZ2VMb2cJKHJldmlzaW9uIDg5ODYzKQorKysgU291cmNlL1dlYktpdC93
aW4vQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpC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ln
aHQgLSB3ZWJWaWV3UmVjdC5sZWZ0OwogICAgIHNpemUuY3kgPSB3ZWJWaWV3UmVjdC5ib3R0b20g
LSB3ZWJWaWV3UmVjdC50b3A7CiAKKyAgICBpZiAoIXNpemUuY3ggfHwgIXNpemUuY3kpCisgICAg
ICAgIHJldHVybjsKKwogICAgIEJpdG1hcEluZm8gYml0bWFwSW5mbyA9IEJpdG1hcEluZm86OmNy
ZWF0ZUJvdHRvbVVwKEludFNpemUoc2l6ZSkpOwogCiAgICAgdm9pZCogcGl4ZWxzID0gMDsKICAg
ICBPd25QdHI8SEJJVE1BUD4gaGJtcCA9IGFkb3B0UHRyKDo6Q3JlYXRlRElCU2VjdGlvbihoZGMs
ICZiaXRtYXBJbmZvLCBESUJfUkdCX0NPTE9SUywgJnBpeGVscywgMCwgMCkpOworICAgIEFTU0VS
VF9XSVRIX01FU1NBR0UoaGJtcC5nZXQoKSwgIjo6Q3JlYXRlRElCU2VjdGlvbiBmYWlsZWQgd2l0
aCBlcnJvciAlbHUiLCA6OkdldExhc3RFcnJvcigpKTsKIAogICAgIDo6U2VsZWN0T2JqZWN0KGhk
YywgaGJtcC5nZXQoKSk7CiAK
</data>
<flag name="review"
          id="93098"
          type_id="1"
          status="+"
          setter="aroben"
    />
          </attachment>
      

    </bug>

</bugzilla>