HWndDC should be in platform/win instead of wtf.
authorlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 15 Jan 2012 03:14:07 +0000 (03:14 +0000)
committerlevin@chromium.org <levin@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 15 Jan 2012 03:14:07 +0000 (03:14 +0000)
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):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@105028 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp
Source/JavaScriptCore/JavaScriptCore.gypi
Source/WebCore/ChangeLog
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.vcproj/WebCore.vcproj
Source/WebCore/platform/win/HWndDC.h [moved from Source/JavaScriptCore/wtf/win/HWndDCWin.h with 91% similarity]
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/src/win/WebScreenInfoFactory.cpp

index 1245a7a..613d4cb 100644 (file)
@@ -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.
index 00f8129..259bd08 100644 (file)
             ['include', 'Thread(ing|Specific)Win\\.cpp$'],
             ['exclude', 'OSAllocatorPosix\\.cpp$'],
             ['include', 'OSAllocatorWin\\.cpp$'],
-            ['include', 'win/HWndDCWin\\.h$'],
           ],
           'include_dirs!': [
             '<(SHARED_INTERMEDIATE_DIR)/webkit',
index b70860a..c936791 100644 (file)
             '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',
index b17e37a..e7af233 100644 (file)
@@ -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
index c9e596a..96b854d 100644 (file)
             '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',
index 5bdba81..6b5c1b3 100755 (executable)
                                        >
                                </File>
                                <File
+                                       RelativePath="..\platform\win\HWndDC.h"
+                                       >
+                               </File>
+                               <File
                                        RelativePath="..\platform\win\ImportedFunctionsEnumerator.cpp"
                                        >
                                </File>
similarity index 91%
rename from Source/JavaScriptCore/wtf/win/HWndDCWin.h
rename to Source/WebCore/platform/win/HWndDC.h
index 78df4a0..11dc332 100644 (file)
  * 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 @@ private:
     HDC m_hdc;
 };
 
-}
+} // namespace WebCore
 
-using WTF::HWndDC;
-
-#endif // WTF_HWndDCWin_h
+#endif // HWndDC_h
index 3a25106..3dd3eaf 100644 (file)
@@ -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.
index 2d940bc..5a6c112 100644 (file)
 #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;