diff options
author | Ben Murdoch <benm@google.com> | 2009-08-11 17:01:47 +0100 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2009-08-11 18:21:02 +0100 |
commit | 0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5 (patch) | |
tree | 2943df35f62d885c89d01063cc528dd73b480fea /WebCore/platform/graphics/win/IconWin.cpp | |
parent | 7e7a70bfa49a1122b2597a1e6367d89eb4035eca (diff) | |
download | external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.zip external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.gz external_webkit-0bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5.tar.bz2 |
Merge in WebKit r47029.
Diffstat (limited to 'WebCore/platform/graphics/win/IconWin.cpp')
-rw-r--r-- | WebCore/platform/graphics/win/IconWin.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/WebCore/platform/graphics/win/IconWin.cpp b/WebCore/platform/graphics/win/IconWin.cpp index c02b56e..61f1fd3 100644 --- a/WebCore/platform/graphics/win/IconWin.cpp +++ b/WebCore/platform/graphics/win/IconWin.cpp @@ -1,5 +1,6 @@ /* * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. +* Copyright (C) 2007-2009 Torch Mobile, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Library General Public @@ -26,6 +27,11 @@ #include <tchar.h> #include <windows.h> +#if PLATFORM(WINCE) +// SHGFI_SHELLICONSIZE is not available on WINCE +#define SHGFI_SHELLICONSIZE 0 +#endif + namespace WebCore { static const int shell32MultipleFileIconIndex = 54; @@ -55,6 +61,9 @@ PassRefPtr<Icon> Icon::createIconForFile(const String& filename) PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>&) { +#if PLATFORM(WINCE) + return 0; +#else TCHAR buffer[MAX_PATH]; UINT length = ::GetSystemDirectory(buffer, ARRAYSIZE(buffer)); if (!length) @@ -67,6 +76,7 @@ PassRefPtr<Icon> Icon::createIconForFiles(const Vector<String>&) if (!::ExtractIconEx(buffer, shell32MultipleFileIconIndex, 0, &hIcon, 1)) return 0; return adoptRef(new Icon(hIcon)); +#endif } void Icon::paint(GraphicsContext* context, const IntRect& r) @@ -74,11 +84,15 @@ void Icon::paint(GraphicsContext* context, const IntRect& r) if (context->paintingDisabled()) return; +#if PLATFORM(WINCE) + context->drawIcon(m_hIcon, r, DI_NORMAL); +#else HDC hdc = context->getWindowsContext(r); DrawIconEx(hdc, r.x(), r.y(), m_hIcon, r.width(), r.height(), 0, 0, DI_NORMAL); context->releaseWindowsContext(hdc, r); +#endif } } |