Bug 63484

Summary: [Windows, WinCairo] Don't Attempt to Create Zero-Size DIB
Product: WebKit Reporter: Brent Fulgham <bfulgham>
Component: WebKit Misc.Assignee: Brent Fulgham <bfulgham>
Status: RESOLVED FIXED    
Severity: Normal CC: aroben, eric, jhoneycutt
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Windows 7   
Attachments:
Description Flags
Patch aroben: review+

Brent Fulgham
Reported 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.
Attachments
Patch (1.46 KB, patch)
2011-06-27 14:51 PDT, Brent Fulgham
aroben: review+
Brent Fulgham
Comment 1 2011-06-27 14:51:38 PDT
Adam Roben (:aroben)
Comment 2 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.
Brent Fulgham
Comment 3 2011-06-28 08:42:31 PDT
Note You need to log in before you can comment on or make changes to this bug.