[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.22-985-g3c00f00
bdakin at apple.com
bdakin at apple.com
Wed Mar 17 18:17:54 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit 54c9f73949b5bbdab6f165c4ec34a28055652343
Author: bdakin at apple.com <bdakin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Thu Mar 4 20:08:38 2010 +0000
WebCore: This fixes the layering violation I committed yesterday by moving
Page::instanceHandle into its own file just in the WebCore
namespace.
Reviewed by Anders Carlsson.
Added WebCoreInstanceHandle.h + .cpp and removed PageWin.cpp
* WebCore.vcproj/WebCore.vcproj:
* page/win/PageWin.cpp: Removed.
Remove all instance handle code from Page.
* page/Page.h:
New files.
* platform/win/WebCoreInstanceHandle.cpp: Added.
* platform/win/WebCoreInstanceHandle.h: Added.
(WebCore::setInstanceHandle):
(WebCore::instanceHandle):
Switch to WebCore::instanceHandle() instead of
Page::instanceHandle() and include the new header.
* platform/graphics/win/WKCACFLayerRenderer.cpp:
(WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable):
* platform/win/PasteboardWin.cpp:
(WebCore::Pasteboard::Pasteboard):
* platform/win/PopupMenuWin.cpp:
(WebCore::PopupMenu::show):
(WebCore::PopupMenu::registerClass):
* platform/win/SharedTimerWin.cpp:
(WebCore::initializeOffScreenTimerWindow):
* plugins/win/PluginViewWin.cpp:
(WebCore::registerPluginView):
(WebCore::PluginView::platformStart):
WebKit/win: WebCore::Page::setInstanceHandle() is now just
WebCore::setInstanceHandle()
Reviewed by Anders Carlsson.
* WebKitDLL.cpp:
(DllMain):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55542 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 95dceb1..7dea1d0 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,39 @@
+2010-03-04 Beth Dakin <bdakin at apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ This fixes the layering violation I committed yesterday by moving
+ Page::instanceHandle into its own file just in the WebCore
+ namespace.
+
+ Added WebCoreInstanceHandle.h + .cpp and removed PageWin.cpp
+ * WebCore.vcproj/WebCore.vcproj:
+ * page/win/PageWin.cpp: Removed.
+
+ Remove all instance handle code from Page.
+ * page/Page.h:
+
+ New files.
+ * platform/win/WebCoreInstanceHandle.cpp: Added.
+ * platform/win/WebCoreInstanceHandle.h: Added.
+ (WebCore::setInstanceHandle):
+ (WebCore::instanceHandle):
+
+ Switch to WebCore::instanceHandle() instead of
+ Page::instanceHandle() and include the new header.
+ * platform/graphics/win/WKCACFLayerRenderer.cpp:
+ (WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable):
+ * platform/win/PasteboardWin.cpp:
+ (WebCore::Pasteboard::Pasteboard):
+ * platform/win/PopupMenuWin.cpp:
+ (WebCore::PopupMenu::show):
+ (WebCore::PopupMenu::registerClass):
+ * platform/win/SharedTimerWin.cpp:
+ (WebCore::initializeOffScreenTimerWindow):
+ * plugins/win/PluginViewWin.cpp:
+ (WebCore::registerPluginView):
+ (WebCore::PluginView::platformStart):
+
2010-03-04 Antonio Gomes <tonikitoo at webkit.org>
Unreviewed build fix.
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 58b94eb..636cf99 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -21095,10 +21095,6 @@
RelativePath="..\page\win\FrameWin.h"
>
</File>
- <File
- RelativePath="..\page\win\PageWin.cpp"
- >
- </File>
</Filter>
</Filter>
<Filter
@@ -22270,6 +22266,14 @@
>
</File>
<File
+ RelativePath="..\platform\win\WebCoreInstanceHandle.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\platform\win\WebCoreInstanceHandle.h"
+ >
+ </File>
+ <File
RelativePath="..\WebCorePrefix.cpp"
>
<FileConfiguration
diff --git a/WebCore/page/Page.h b/WebCore/page/Page.h
index 2a90ca7..f698287 100644
--- a/WebCore/page/Page.h
+++ b/WebCore/page/Page.h
@@ -31,10 +31,6 @@
#include "SchedulePair.h"
#endif
-#if PLATFORM(WIN) || (PLATFORM(WX) && OS(WINDOWS)) || (PLATFORM(QT) && defined(Q_WS_WIN))
-typedef struct HINSTANCE__* HINSTANCE;
-#endif
-
namespace JSC {
class Debugger;
}
@@ -207,12 +203,6 @@ namespace WebCore {
void setDebugger(JSC::Debugger*);
JSC::Debugger* debugger() const { return m_debugger; }
-#if PLATFORM(WIN) || (PLATFORM(WX) && OS(WINDOWS)) || (PLATFORM(QT) && defined(Q_WS_WIN))
- // The global DLL or application instance used for all windows.
- static void setInstanceHandle(HINSTANCE instanceHandle) { s_instanceHandle = instanceHandle; }
- static HINSTANCE instanceHandle() { return s_instanceHandle; }
-#endif
-
static void removeAllVisitedLinks();
static void allVisitedStateChanged(PageGroup*);
@@ -322,10 +312,6 @@ namespace WebCore {
RefPtr<StorageNamespace> m_sessionStorage;
#endif
-#if PLATFORM(WIN) || (PLATFORM(WX) && defined(__WXMSW__)) || (PLATFORM(QT) && defined(Q_WS_WIN))
- static HINSTANCE s_instanceHandle;
-#endif
-
#if ENABLE(WML)
OwnPtr<WMLPageState> m_wmlPageState;
#endif
diff --git a/WebCore/page/win/PageWin.cpp b/WebCore/page/win/PageWin.cpp
deleted file mode 100644
index 3ef7728..0000000
--- a/WebCore/page/win/PageWin.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "Page.h"
-
-namespace WebCore {
-
-HINSTANCE Page::s_instanceHandle = 0;
-
-} // namespace WebCore
diff --git a/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp b/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
index 64a9313..382c117 100644
--- a/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
+++ b/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp
@@ -29,9 +29,9 @@
#include "WKCACFLayerRenderer.h"
-#include "Page.h"
#include "WKCACFContextFlusher.h"
#include "WKCACFLayer.h"
+#include "WebCoreInstanceHandle.h"
#include <CoreGraphics/CGSRegion.h>
#include <QuartzCore/CACFContext.h>
#include <QuartzCore/CARenderOGL.h>
@@ -152,7 +152,7 @@ bool WKCACFLayerRenderer::acceleratedCompositingAvailable()
WNDCLASSEX wcex = { 0 };
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.lpfnWndProc = DefWindowProc;
- wcex.hInstance = Page::instanceHandle();
+ wcex.hInstance = WebCore::instanceHandle();
wcex.lpszClassName = L"CoreAnimationTesterWindowClass";
::RegisterClassEx(&wcex);
HWND testWindow = ::CreateWindow(L"CoreAnimationTesterWindowClass", L"CoreAnimationTesterWindow", WS_POPUP, -500, -500, 0, 0, 0, 0, 0, 0);
diff --git a/WebCore/platform/win/PasteboardWin.cpp b/WebCore/platform/win/PasteboardWin.cpp
index ffafd02..4edcabe 100644
--- a/WebCore/platform/win/PasteboardWin.cpp
+++ b/WebCore/platform/win/PasteboardWin.cpp
@@ -40,6 +40,7 @@
#include "Range.h"
#include "RenderImage.h"
#include "TextEncoding.h"
+#include "WebCoreInstanceHandle.h"
#include "markup.h"
namespace WebCore {
@@ -88,7 +89,7 @@ Pasteboard::Pasteboard()
WNDCLASSEX wcex = {0};
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.lpfnWndProc = PasteboardOwnerWndProc;
- wcex.hInstance = Page::instanceHandle();
+ wcex.hInstance = WebCore::instanceHandle();
wcex.lpszClassName = L"PasteboardOwnerWindowClass";
::RegisterClassEx(&wcex);
diff --git a/WebCore/platform/win/PopupMenuWin.cpp b/WebCore/platform/win/PopupMenuWin.cpp
index 4ba5e30..44141f2 100644
--- a/WebCore/platform/win/PopupMenuWin.cpp
+++ b/WebCore/platform/win/PopupMenuWin.cpp
@@ -39,6 +39,7 @@
#include "Scrollbar.h"
#include "ScrollbarTheme.h"
#include "SimpleFontData.h"
+#include "WebCoreInstanceHandle.h"
#include <tchar.h>
#include <windows.h>
#include <windowsx.h>
@@ -140,7 +141,7 @@ void PopupMenu::show(const IntRect& r, FrameView* view, int index)
m_popup = ::CreateWindowEx(exStyle, kPopupWindowClassName, _T("PopupMenu"),
WS_POPUP | WS_BORDER,
m_windowRect.x(), m_windowRect.y(), m_windowRect.width(), m_windowRect.height(),
- hostWindow, 0, Page::instanceHandle(), this);
+ hostWindow, 0, WebCore::instanceHandle(), this);
if (!m_popup)
return;
@@ -723,7 +724,7 @@ void PopupMenu::registerClass()
wcex.lpfnWndProc = PopupMenuWndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = sizeof(PopupMenu*); // For the PopupMenu pointer
- wcex.hInstance = Page::instanceHandle();
+ wcex.hInstance = WebCore::instanceHandle();
wcex.hIcon = 0;
wcex.hCursor = LoadCursor(0, IDC_ARROW);
wcex.hbrBackground = 0;
diff --git a/WebCore/platform/win/SharedTimerWin.cpp b/WebCore/platform/win/SharedTimerWin.cpp
index bc634f9..b7367aa 100644
--- a/WebCore/platform/win/SharedTimerWin.cpp
+++ b/WebCore/platform/win/SharedTimerWin.cpp
@@ -28,6 +28,7 @@
#include "Page.h"
#include "Settings.h"
+#include "WebCoreInstanceHandle.h"
#include "Widget.h"
#include <wtf/Assertions.h>
#include <wtf/CurrentTime.h>
@@ -125,12 +126,12 @@ static void initializeOffScreenTimerWindow()
memset(&wcex, 0, sizeof(WNDCLASSEX));
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.lpfnWndProc = TimerWindowWndProc;
- wcex.hInstance = Page::instanceHandle();
+ wcex.hInstance = WebCore::instanceHandle();
wcex.lpszClassName = kTimerWindowClassName;
RegisterClassEx(&wcex);
timerWindowHandle = CreateWindow(kTimerWindowClassName, 0, 0,
- CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, Page::instanceHandle(), 0);
+ CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, WebCore::instanceHandle(), 0);
timerFiredMessage = RegisterWindowMessage(L"com.apple.WebKit.TimerFired");
}
diff --git a/WebCore/platform/win/WebCoreInstanceHandle.cpp b/WebCore/platform/win/WebCoreInstanceHandle.cpp
new file mode 100644
index 0000000..33ef931
--- /dev/null
+++ b/WebCore/platform/win/WebCoreInstanceHandle.cpp
@@ -0,0 +1,33 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebCoreInstanceHandle.h"
+
+namespace WebCore {
+
+HINSTANCE WebCore::s_instanceHandle;
+
+} // namespace WebCore
diff --git a/WebCore/platform/win/WebCoreInstanceHandle.h b/WebCore/platform/win/WebCoreInstanceHandle.h
new file mode 100644
index 0000000..81f4571
--- /dev/null
+++ b/WebCore/platform/win/WebCoreInstanceHandle.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2010 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebCoreInstanceHandle_h
+#define WebCoreInstanceHandle_h
+
+typedef struct HINSTANCE__* HINSTANCE;
+
+namespace WebCore {
+
+ // The global DLL or application instance used for all windows.
+ extern HINSTANCE s_instanceHandle;
+
+ static void setInstanceHandle(HINSTANCE instanceHandle) { s_instanceHandle = instanceHandle; }
+ static HINSTANCE instanceHandle() { return s_instanceHandle; }
+
+}
+
+#endif // WebCoreInstanceHandle_h
diff --git a/WebCore/plugins/win/PluginViewWin.cpp b/WebCore/plugins/win/PluginViewWin.cpp
index 15f39a9..01e425f 100644
--- a/WebCore/plugins/win/PluginViewWin.cpp
+++ b/WebCore/plugins/win/PluginViewWin.cpp
@@ -60,6 +60,7 @@
#include "RenderWidget.h"
#include "ScriptController.h"
#include "Settings.h"
+#include "WebCoreInstanceHandle.h"
#include "c_instance.h"
#include "npruntime_impl.h"
#include "runtime_root.h"
@@ -288,10 +289,10 @@ static bool registerPluginView()
haveRegisteredWindowClass = true;
#if PLATFORM(QT)
- Page::setInstanceHandle((HINSTANCE)(qWinAppInst()));
+ WebCore::setInstanceHandle((HINSTANCE)(qWinAppInst()));
#endif
- ASSERT(Page::instanceHandle());
+ ASSERT(WebCore::instanceHandle());
#if OS(WINCE)
WNDCLASS wcex = { 0 };
@@ -308,7 +309,7 @@ static bool registerPluginView()
wcex.lpfnWndProc = DefWindowProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
- wcex.hInstance = Page::instanceHandle();
+ wcex.hInstance = WebCore::instanceHandle();
wcex.hIcon = 0;
wcex.hCursor = LoadCursor(0, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)COLOR_WINDOW;
@@ -967,7 +968,7 @@ bool PluginView::platformStart()
HWND parentWindowHandle = windowHandleForPageClient(m_parentFrame->view()->hostWindow()->platformPageClient());
HWND window = ::CreateWindowEx(0, kWebPluginViewdowClassName, 0, flags,
- 0, 0, 0, 0, parentWindowHandle, 0, Page::instanceHandle(), 0);
+ 0, 0, 0, 0, parentWindowHandle, 0, WebCore::instanceHandle(), 0);
#if OS(WINDOWS) && (PLATFORM(QT) || PLATFORM(WX))
m_window = window;
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 4ac19fa..68133ff 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,13 @@
+2010-03-04 Beth Dakin <bdakin at apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ WebCore::Page::setInstanceHandle() is now just
+ WebCore::setInstanceHandle()
+
+ * WebKitDLL.cpp:
+ (DllMain):
+
2010-03-03 Alice Liu <alice.liu at apple.com>
Reviewed by Jon Honeycutt.
diff --git a/WebKit/win/WebKitDLL.cpp b/WebKit/win/WebKitDLL.cpp
index 9f4eaeb..f8aa261 100644
--- a/WebKit/win/WebKitDLL.cpp
+++ b/WebKit/win/WebKitDLL.cpp
@@ -36,6 +36,7 @@
#include <WebCore/PageGroup.h>
#include <WebCore/RenderThemeWin.h>
#include <WebCore/SharedBuffer.h>
+#include <WebCore/WebCoreInstanceHandle.h>
#include <WebCore/Widget.h>
#include <wtf/Vector.h>
#include <tchar.h>
@@ -60,7 +61,7 @@ STDAPI_(BOOL) DllMain( HMODULE hModule, DWORD ul_reason_for_call, LPVOID /*lpRe
case DLL_PROCESS_ATTACH:
gLockCount = gClassCount = 0;
gInstance = hModule;
- WebCore::Page::setInstanceHandle(hModule);
+ WebCore::setInstanceHandle(hModule);
return TRUE;
case DLL_PROCESS_DETACH:
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list