|Summary:||[Windows, WinCairo] Don't Attempt to Create Zero-Size DIB|
|Product:||WebKit||Reporter:||Brent Fulgham <bfulgham>|
|Component:||WebKit Misc.||Assignee:||Brent Fulgham <bfulgham>|
|Severity:||Normal||CC:||aroben, eric, jhoneycutt|
|Version:||528+ (Nightly build)|
Description Brent Fulgham 2011-06-27 14:44:53 PDT
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.
Comment 2 Adam Roben (:aroben) 2011-06-28 08:10:55 PDT
Comment on attachment 98790 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=98790&action=review > Source/WebKit/win/WebNodeHighlight.cpp:155 > + ASSERT_WITH_MESSAGE(hbmp.get(), "::CreateDIBSection failed with error %lu", ::GetLastError()); No need for the .get() here.