summaryrefslogtreecommitdiff
path: root/Source/WebKit/win/WebIconDatabase.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-02-03 09:55:33 +0100
committerSimon Hausmann <simon.hausmann@nokia.com>2012-02-03 09:55:33 +0100
commitcd44dc59cdfc39534aef4d417e9f3c412e3be139 (patch)
tree8d89889ba95ed6ec9322e733846cc9cce9d7dff1 /Source/WebKit/win/WebIconDatabase.cpp
parentd11f84f5b5cdc0d92a08af01b13472fdd5f9acb9 (diff)
downloadqtwebkit-cd44dc59cdfc39534aef4d417e9f3c412e3be139.tar.gz
Imported WebKit commit fce473cb4d55aa9fe9d0b0322a2fffecb731b961 (http://svn.webkit.org/repository/webkit/trunk@106560)
Diffstat (limited to 'Source/WebKit/win/WebIconDatabase.cpp')
-rw-r--r--Source/WebKit/win/WebIconDatabase.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/WebKit/win/WebIconDatabase.cpp b/Source/WebKit/win/WebIconDatabase.cpp
index d817f6975..f428bfc76 100644
--- a/Source/WebKit/win/WebIconDatabase.cpp
+++ b/Source/WebKit/win/WebIconDatabase.cpp
@@ -34,6 +34,7 @@
#include <WebCore/BString.h>
#include <WebCore/COMPtr.h>
#include <WebCore/FileSystem.h>
+#include <WebCore/HWndDC.h>
#include <WebCore/IconDatabase.h>
#include <WebCore/Image.h>
#include <WebCore/PlatformString.h>
@@ -284,11 +285,8 @@ HBITMAP createDIB(LPSIZE size)
{
BitmapInfo bmInfo = BitmapInfo::create(IntSize(*size));
- HDC dc = GetDC(0);
- HBITMAP result = CreateDIBSection(dc, &bmInfo, DIB_RGB_COLORS, 0, 0, 0);
- ReleaseDC(0, dc);
-
- return result;
+ HWndDC dc(0);
+ return CreateDIBSection(dc, &bmInfo, DIB_RGB_COLORS, 0, 0, 0);
}
HBITMAP WebIconDatabase::getOrCreateSharedBitmap(LPSIZE size)