Changeset 89932 in webkit


Ignore:
Timestamp:
Jun 28, 2011 8:42:04 AM (13 years ago)
Author:
bfulgham@webkit.org
Message:

2011-06-27 Brent Fulgham <bfulgham@webkit.org>

Reviewed by Adam Roben.

Avoid attempt to create a zero-size DIB.
https://bugs.webkit.org/show_bug.cgi?id=63484.

  • WebNodeHighlight.cpp: (WebNodeHighlight::update): Check for zero-height (or zero-width) region for DIB, and exit early if attempting to create a zero-size DIB/BITMAP.
Location:
trunk/Source/WebKit/win
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/win/ChangeLog

    r89733 r89932  
     12011-06-27  Brent Fulgham  <bfulgham@webkit.org>
     2
     3        Reviewed by Adam Roben.
     4
     5        Avoid attempt to create a zero-size DIB.
     6        https://bugs.webkit.org/show_bug.cgi?id=63484.
     7
     8        * WebNodeHighlight.cpp:
     9        (WebNodeHighlight::update): Check for zero-height (or zero-width)
     10        region for DIB, and exit early if attempting to create a zero-size
     11        DIB/BITMAP.
     12
    1132011-06-24  Dan Bernstein  <mitz@apple.com>
    214
  • trunk/Source/WebKit/win/WebNodeHighlight.cpp

    r85420 r89932  
    146146    size.cy = webViewRect.bottom - webViewRect.top;
    147147
     148    if (!size.cx || !size.cy)
     149        return;
     150
    148151    BitmapInfo bitmapInfo = BitmapInfo::createBottomUp(IntSize(size));
    149152
    150153    void* pixels = 0;
    151154    OwnPtr<HBITMAP> hbmp = adoptPtr(::CreateDIBSection(hdc, &bitmapInfo, DIB_RGB_COLORS, &pixels, 0, 0));
     155    ASSERT_WITH_MESSAGE(hbmp, "::CreateDIBSection failed with error %lu", ::GetLastError());
    152156
    153157    ::SelectObject(hdc, hbmp.get());
Note: See TracChangeset for help on using the changeset viewer.