Changeset 55542 in webkit


Ignore:
Timestamp:
Mar 4, 2010 12:08:38 PM (14 years ago)
Author:
Beth Dakin
Message:

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):

Location:
trunk
Files:
2 added
1 deleted
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r55540 r55542  
     12010-03-04  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        This fixes the layering violation I committed yesterday by moving
     6        Page::instanceHandle into its own file just in the WebCore
     7        namespace.
     8
     9        Added WebCoreInstanceHandle.h + .cpp and removed PageWin.cpp
     10        * WebCore.vcproj/WebCore.vcproj:
     11        * page/win/PageWin.cpp: Removed.
     12
     13        Remove all instance handle code from Page.
     14        * page/Page.h:
     15
     16        New files.
     17        * platform/win/WebCoreInstanceHandle.cpp: Added.
     18        * platform/win/WebCoreInstanceHandle.h: Added.
     19        (WebCore::setInstanceHandle):
     20        (WebCore::instanceHandle):
     21
     22        Switch to WebCore::instanceHandle() instead of
     23        Page::instanceHandle() and include the new header.
     24        * platform/graphics/win/WKCACFLayerRenderer.cpp:
     25        (WebCore::WKCACFLayerRenderer::acceleratedCompositingAvailable):
     26        * platform/win/PasteboardWin.cpp:
     27        (WebCore::Pasteboard::Pasteboard):
     28        * platform/win/PopupMenuWin.cpp:
     29        (WebCore::PopupMenu::show):
     30        (WebCore::PopupMenu::registerClass):
     31        * platform/win/SharedTimerWin.cpp:
     32        (WebCore::initializeOffScreenTimerWindow):
     33        * plugins/win/PluginViewWin.cpp:
     34        (WebCore::registerPluginView):
     35        (WebCore::PluginView::platformStart):
     36
    1372010-03-04  Antonio Gomes  <tonikitoo@webkit.org>
    238
  • trunk/WebCore/WebCore.vcproj/WebCore.vcproj

    r55522 r55542  
    2109621096                                        >
    2109721097                                </File>
    21098                                 <File
    21099                                         RelativePath="..\page\win\PageWin.cpp"
    21100                                         >
    21101                                 </File>
    2110221098                        </Filter>
    2110321099                </Filter>
     
    2226822264                                <File
    2226922265                                        RelativePath="..\platform\win\WCDataObject.h"
     22266                                        >
     22267                                </File>
     22268                                <File
     22269                                        RelativePath="..\platform\win\WebCoreInstanceHandle.cpp"
     22270                                        >
     22271                                </File>
     22272                                <File
     22273                                        RelativePath="..\platform\win\WebCoreInstanceHandle.h"
    2227022274                                        >
    2227122275                                </File>
  • trunk/WebCore/page/Page.h

    r55433 r55542  
    3030#if PLATFORM(MAC)
    3131#include "SchedulePair.h"
    32 #endif
    33 
    34 #if PLATFORM(WIN) || (PLATFORM(WX) && OS(WINDOWS)) || (PLATFORM(QT) && defined(Q_WS_WIN))
    35 typedef struct HINSTANCE__* HINSTANCE;
    3632#endif
    3733
     
    208204        JSC::Debugger* debugger() const { return m_debugger; }
    209205
    210 #if PLATFORM(WIN) || (PLATFORM(WX) && OS(WINDOWS)) || (PLATFORM(QT) && defined(Q_WS_WIN))
    211         // The global DLL or application instance used for all windows.
    212         static void setInstanceHandle(HINSTANCE instanceHandle) { s_instanceHandle = instanceHandle; }
    213         static HINSTANCE instanceHandle() { return s_instanceHandle; }
    214 #endif
    215 
    216206        static void removeAllVisitedLinks();
    217207
     
    323313#endif
    324314
    325 #if PLATFORM(WIN) || (PLATFORM(WX) && defined(__WXMSW__)) || (PLATFORM(QT) && defined(Q_WS_WIN))
    326         static HINSTANCE s_instanceHandle;
    327 #endif
    328 
    329315#if ENABLE(WML)
    330316        OwnPtr<WMLPageState> m_wmlPageState;
  • trunk/WebCore/platform/graphics/win/WKCACFLayerRenderer.cpp

    r55442 r55542  
    3030#include "WKCACFLayerRenderer.h"
    3131
    32 #include "Page.h"
    3332#include "WKCACFContextFlusher.h"
    3433#include "WKCACFLayer.h"
     34#include "WebCoreInstanceHandle.h"
    3535#include <CoreGraphics/CGSRegion.h>
    3636#include <QuartzCore/CACFContext.h>
     
    153153    wcex.cbSize = sizeof(WNDCLASSEX);
    154154    wcex.lpfnWndProc = DefWindowProc;
    155     wcex.hInstance = Page::instanceHandle();
     155    wcex.hInstance = WebCore::instanceHandle();
    156156    wcex.lpszClassName = L"CoreAnimationTesterWindowClass";
    157157    ::RegisterClassEx(&wcex);
  • trunk/WebCore/platform/win/PasteboardWin.cpp

    r55029 r55542  
    4141#include "RenderImage.h"
    4242#include "TextEncoding.h"
     43#include "WebCoreInstanceHandle.h"
    4344#include "markup.h"
    4445
     
    8990    wcex.cbSize = sizeof(WNDCLASSEX);
    9091    wcex.lpfnWndProc    = PasteboardOwnerWndProc;
    91     wcex.hInstance      = Page::instanceHandle();
     92    wcex.hInstance      = WebCore::instanceHandle();
    9293    wcex.lpszClassName  = L"PasteboardOwnerWindowClass";
    9394    ::RegisterClassEx(&wcex);
  • trunk/WebCore/platform/win/PopupMenuWin.cpp

    r53716 r55542  
    4040#include "ScrollbarTheme.h"
    4141#include "SimpleFontData.h"
     42#include "WebCoreInstanceHandle.h"
    4243#include <tchar.h>
    4344#include <windows.h>
     
    141142            WS_POPUP | WS_BORDER,
    142143            m_windowRect.x(), m_windowRect.y(), m_windowRect.width(), m_windowRect.height(),
    143             hostWindow, 0, Page::instanceHandle(), this);
     144            hostWindow, 0, WebCore::instanceHandle(), this);
    144145
    145146        if (!m_popup)
     
    724725    wcex.cbClsExtra     = 0;
    725726    wcex.cbWndExtra     = sizeof(PopupMenu*); // For the PopupMenu pointer
    726     wcex.hInstance      = Page::instanceHandle();
     727    wcex.hInstance      = WebCore::instanceHandle();
    727728    wcex.hIcon          = 0;
    728729    wcex.hCursor        = LoadCursor(0, IDC_ARROW);
  • trunk/WebCore/platform/win/SharedTimerWin.cpp

    r48308 r55542  
    2929#include "Page.h"
    3030#include "Settings.h"
     31#include "WebCoreInstanceHandle.h"
    3132#include "Widget.h"
    3233#include <wtf/Assertions.h>
     
    126127    wcex.cbSize = sizeof(WNDCLASSEX);
    127128    wcex.lpfnWndProc    = TimerWindowWndProc;
    128     wcex.hInstance      = Page::instanceHandle();
     129    wcex.hInstance      = WebCore::instanceHandle();
    129130    wcex.lpszClassName  = kTimerWindowClassName;
    130131    RegisterClassEx(&wcex);
    131132
    132133    timerWindowHandle = CreateWindow(kTimerWindowClassName, 0, 0,
    133        CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, Page::instanceHandle(), 0);
     134       CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, HWND_MESSAGE, 0, WebCore::instanceHandle(), 0);
    134135    timerFiredMessage = RegisterWindowMessage(L"com.apple.WebKit.TimerFired");
    135136}
  • trunk/WebCore/plugins/win/PluginViewWin.cpp

    r55432 r55542  
    6161#include "ScriptController.h"
    6262#include "Settings.h"
     63#include "WebCoreInstanceHandle.h"
    6364#include "c_instance.h"
    6465#include "npruntime_impl.h"
     
    289290
    290291#if PLATFORM(QT)
    291     Page::setInstanceHandle((HINSTANCE)(qWinAppInst()));
    292 #endif
    293 
    294     ASSERT(Page::instanceHandle());
     292    WebCore::setInstanceHandle((HINSTANCE)(qWinAppInst()));
     293#endif
     294
     295    ASSERT(WebCore::instanceHandle());
    295296
    296297#if OS(WINCE)
     
    309310    wcex.cbClsExtra     = 0;
    310311    wcex.cbWndExtra     = 0;
    311     wcex.hInstance      = Page::instanceHandle();
     312    wcex.hInstance      = WebCore::instanceHandle();
    312313    wcex.hIcon          = 0;
    313314    wcex.hCursor        = LoadCursor(0, IDC_ARROW);
     
    968969        HWND parentWindowHandle = windowHandleForPageClient(m_parentFrame->view()->hostWindow()->platformPageClient());
    969970        HWND window = ::CreateWindowEx(0, kWebPluginViewdowClassName, 0, flags,
    970                                        0, 0, 0, 0, parentWindowHandle, 0, Page::instanceHandle(), 0);
     971                                       0, 0, 0, 0, parentWindowHandle, 0, WebCore::instanceHandle(), 0);
    971972
    972973#if OS(WINDOWS) && (PLATFORM(QT) || PLATFORM(WX))
  • trunk/WebKit/win/ChangeLog

    r55503 r55542  
     12010-03-04  Beth Dakin  <bdakin@apple.com>
     2
     3        Reviewed by Anders Carlsson.
     4
     5        WebCore::Page::setInstanceHandle() is now just
     6        WebCore::setInstanceHandle()
     7
     8        * WebKitDLL.cpp:
     9        (DllMain):
     10
    1112010-03-03  Alice Liu  <alice.liu@apple.com>
    212
  • trunk/WebKit/win/WebKitDLL.cpp

    r52998 r55542  
    3737#include <WebCore/RenderThemeWin.h>
    3838#include <WebCore/SharedBuffer.h>
     39#include <WebCore/WebCoreInstanceHandle.h>
    3940#include <WebCore/Widget.h>
    4041#include <wtf/Vector.h>
     
    6162            gLockCount = gClassCount = 0;
    6263            gInstance = hModule;
    63             WebCore::Page::setInstanceHandle(hModule);
     64            WebCore::setInstanceHandle(hModule);
    6465            return TRUE;
    6566
Note: See TracChangeset for help on using the changeset viewer.