Skip to content
Permalink
Browse files
HWndDC should be in platform/win instead of wtf.
https://bugs.webkit.org/show_bug.cgi?id=76314

Reviewed by Sam Weinig.

Source/JavaScriptCore:

* JavaScriptCore.gyp/JavaScriptCore.gyp:
* JavaScriptCore.gypi:

Source/WebCore:

No new functionality, so no new tests.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* platform/win/HWndDC.h: Renamed from Source/JavaScriptCore/wtf/win/HWndDCWin.h.
I also made the class non-copyable.
(WebCore::HWndDC::HWndDC):
(WebCore::HWndDC::~HWndDC):
(WebCore::HWndDC::operator HDC):

Source/WebKit/chromium:

* src/win/WebScreenInfoFactory.cpp:
(WebKit::WebScreenInfoFactory::screenInfo):


Canonical link: https://commits.webkit.org/93161@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@105028 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
David Levin committed Jan 15, 2012
1 parent e5bc58b commit 5564d31f3f8481c6087f0dbbaf66658bb4c06546
@@ -1,3 +1,13 @@
2012-01-14 David Levin <levin@chromium.org>

HWndDC should be in platform/win instead of wtf.
https://bugs.webkit.org/show_bug.cgi?id=76314

Reviewed by Sam Weinig.

* JavaScriptCore.gyp/JavaScriptCore.gyp:
* JavaScriptCore.gypi:

2012-01-13 David Levin <levin@chromium.org>

check-webkit-style: should encourage the use of Own* classes for Windows DC.
@@ -173,7 +173,6 @@
['include', 'Thread(ing|Specific)Win\\.cpp$'],
['exclude', 'OSAllocatorPosix\\.cpp$'],
['include', 'OSAllocatorWin\\.cpp$'],
['include', 'win/HWndDCWin\\.h$'],
],
'include_dirs!': [
'<(SHARED_INTERMEDIATE_DIR)/webkit',
@@ -648,7 +648,6 @@
'wtf/unicode/wince/UnicodeWinCE.cpp',
'wtf/unicode/wince/UnicodeWinCE.h',
'wtf/win/MainThreadWin.cpp',
'wtf/win/HWndDCWin.h',
'wtf/win/OwnPtrWin.cpp',
'wtf/wince/FastMallocWinCE.h',
'wtf/wince/MemoryManager.cpp',
@@ -1,3 +1,20 @@
2012-01-14 David Levin <levin@chromium.org>

HWndDC should be in platform/win instead of wtf.
https://bugs.webkit.org/show_bug.cgi?id=76314

Reviewed by Sam Weinig.

No new functionality, so no new tests.

* WebCore.gypi:
* WebCore.vcproj/WebCore.vcproj:
* platform/win/HWndDC.h: Renamed from Source/JavaScriptCore/wtf/win/HWndDCWin.h.
I also made the class non-copyable.
(WebCore::HWndDC::HWndDC):
(WebCore::HWndDC::~HWndDC):
(WebCore::HWndDC::operator HDC):

2012-01-14 Adam Treat <atreat@rim.com>

https://bugs.webkit.org/show_bug.cgi?id=76339
@@ -4509,6 +4509,7 @@
'platform/win/FileSystemWin.cpp',
'platform/win/GDIObjectCounter.cpp',
'platform/win/GDIObjectCounter.h',
'platform/win/HWndDC.h',
'platform/win/KeyEventWin.cpp',
'platform/win/LanguageWin.cpp',
'platform/win/LoggingWin.cpp',
@@ -26980,6 +26980,10 @@
RelativePath="..\platform\win\GDIObjectCounter.h"
>
</File>
<File
RelativePath="..\platform\win\HWndDC.h"
>
</File>
<File
RelativePath="..\platform\win\ImportedFunctionsEnumerator.cpp"
>
@@ -23,14 +23,16 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/

#ifndef WTF_HWndDCWin_h
#define WTF_HWndDCWin_h
#ifndef HWndDC_h
#define HWndDC_h

#include <windows.h>
#include <wtf/NonCopyable.h>

namespace WTF {
namespace WebCore {

class HWndDC {
WTF_MAKE_NONCOPYABLE(HWndDC);
public:
explicit HWndDC(HWND hwnd)
: m_hwnd(hwnd)
@@ -60,8 +62,6 @@ class HWndDC {
HDC m_hdc;
};

}
} // namespace WebCore

using WTF::HWndDC;

#endif // WTF_HWndDCWin_h
#endif // HWndDC_h
@@ -1,3 +1,13 @@
2012-01-14 David Levin <levin@chromium.org>

HWndDC should be in platform/win instead of wtf.
https://bugs.webkit.org/show_bug.cgi?id=76314

Reviewed by Sam Weinig.

* src/win/WebScreenInfoFactory.cpp:
(WebKit::WebScreenInfoFactory::screenInfo):

2012-01-14 Dmitry Lomov <dslomov@google.com>

[Chromium] Remove WebKit::WebWorker class.
@@ -31,10 +31,9 @@
#include "config.h"
#include "WebScreenInfoFactory.h"

#include "HWndDC.h"
#include "WebScreenInfo.h"

#include <wtf/win/HWndDCWin.h>

#include <windows.h>

namespace WebKit {
@@ -62,7 +61,7 @@ WebScreenInfo WebScreenInfoFactory::screenInfo(HWND window)
devMode.dmDriverExtra = 0;
EnumDisplaySettings(monitorInfo.szDevice, ENUM_CURRENT_SETTINGS, &devMode);

HWndDC hdc(0);
WebCore::HWndDC hdc(0);
ASSERT(hdc);

WebScreenInfo results;

0 comments on commit 5564d31

Please sign in to comment.