WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
76604
[windows] GDI DC isn't restored to default state before deleting/releasing.
https://bugs.webkit.org/show_bug.cgi?id=76604
Summary
[windows] GDI DC isn't restored to default state before deleting/releasing.
David Levin
Reported
2012-01-18 21:58:56 PST
When I was doing the fix for 76303, I noticed this issue in a few places:
http://trac.webkit.org/browser/trunk/Source/WebCore/platform/win/DragImageWin.cpp#L201
http://trac.webkit.org/browser/trunk/Source/WebKit/win/WebNodeHighlight.cpp#L157
There are a few things that could be done: 1. One could bake in SaveDC/RestoreDC into HWndDC and OwnPtr<HDC> -- likely OwnPtr<HDC> should become something else. Ideally paired with removing the code which restores state already. 2. One could put in checks into HWndDC and OwnPtr<HDC> to assert that the hdc is at its default state. (The state it was at when it was given to the class.) #1 seems the least error prone (and likely not very expensive these days). I'll leave this fix/decision up to people who work on this platform more often than I do.
Attachments
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug