WebCore/ChangeLog

 12010-04-18 Ruben Van Boxem <vanboxem.ruben@gmail.com>
 2
 3 Reviewed by NOBODY (OOPS!).
 4
 5 Fixes for Win64 compilation under gcc (mingw-w64)
 6
 7 * WebCore/bridge/npapi.h: for win64 compatibility, mirroring mozilla-central, see Mozilla bug 560298
 8 * WebCore/platform/Arena.h: uword is used to cast from pointers here. unsigned long is 32-bit on Windows (but 64-bit on mac), and too small to hold a pointer. uintptr_t is 32-bit on 32-bit systems (mac, linux and windows) and 64-bit on all 64-bit systems
 9 * WebCore/platform/graphics/transforms/TransformationMatrix.h: let mingw-w64/w32 use MSVC codepath
 10 * WebCore/platform/text/TextStream.cpp: let mingw-w64 use MSVC codepath
 11 * WebCore/platform/text/TextStream.h: let mingw-w64 use MSVC codepath
 12 * WebCore/plugins/PluginView.cpp: fix pointer casts on WIN64 and let mingw-w64 use MSVC codepath
 13 * WebCore/plugins/win/PluginViewWin.cpp: fix pointer casts on WIN64
 14
1152010-04-17 Yaar Schnitman <yaar@chromium.org>
216
317 Reviewed by Adam Barth.
57788

WebCore/bridge/npapi.h

@@typedef QEvent NPEvent;
590590typedef struct _NPEvent
591591{
592592 uint16 event;
593  uint32 wParam;
594  uint32 lParam;
 593 uintptr_t wParam;
 594 uintptr_t lParam;
595595} NPEvent;
596596#elif defined (XP_UNIX)
597597typedef XEvent NPEvent;
57788

WebCore/platform/Arena.h

4444
4545namespace WebCore {
4646
47 typedef unsigned long uword;
 47typedef uintptr_t uword;
4848
4949struct Arena {
5050 Arena* next; // next arena
57788

WebCore/platform/graphics/transforms/TransformationMatrix.h

4747#endif
4848
4949#if PLATFORM(WIN) || (PLATFORM(QT) && OS(WINDOWS)) || (PLATFORM(WX) && OS(WINDOWS))
50 #if COMPILER(MINGW)
 50#if COMPILER(MINGW) && !COMPILER(MINGW64)
5151typedef struct _XFORM XFORM;
5252#else
5353typedef struct tagXFORM XFORM;
57788

WebCore/platform/text/TextStream.cpp

@@String TextStream::release()
108108 return String::adopt(m_text);
109109}
110110
111 #if OS(WINDOWS) && CPU(X86_64) && COMPILER(MSVC)
 111#if OS(WINDOWS) && CPU(X86_64)
112112TextStream& TextStream::operator<<(__int64 i)
113113{
114114 char buffer[printBufferSize];
57788

WebCore/platform/text/TextStream.h

@@public:
4545 TextStream& operator<<(const char*);
4646 TextStream& operator<<(const void*);
4747 TextStream& operator<<(const String&);
48 #if OS(WINDOWS) && CPU(X86_64) && COMPILER(MSVC)
 48#if OS(WINDOWS) && CPU(X86_64)
4949 TextStream& operator<<(unsigned __int64);
5050 TextStream& operator<<(__int64);
5151#endif
57788

WebCore/plugins/PluginView.cpp

@@void PluginView::stop()
345345 WNDPROC currentWndProc = (WNDPROC)GetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC);
346346
347347 if (currentWndProc == PluginViewWndProc)
348  SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (LONG)m_pluginWndProc);
 348 SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (LONG_PTR)m_pluginWndProc);
349349#endif
350350 }
351351#endif // XP_WIN
57788

WebCore/plugins/win/PluginViewWin.cpp

@@void PluginView::paintIntoTransformedCon
544544
545545 NPEvent npEvent;
546546 npEvent.event = WM_WINDOWPOSCHANGED;
547  npEvent.lParam = reinterpret_cast<uint32>(&windowpos);
 547 npEvent.lParam = reinterpret_cast<uintptr_t>(&windowpos);
548548 npEvent.wParam = 0;
549549
550550 dispatchNPEvent(npEvent);

@@void PluginView::paintIntoTransformedCon
552552 setNPWindowRect(frameRect());
553553
554554 npEvent.event = WM_PAINT;
555  npEvent.wParam = reinterpret_cast<uint32>(hdc);
 555 npEvent.wParam = reinterpret_cast<uintptr_t>(hdc);
556556
557557 // This is supposed to be a pointer to the dirty rect, but it seems that the Flash plugin
558558 // ignores it so we just pass null.

@@void PluginView::setNPWindowRect(const I
829829#else
830830 WNDPROC currentWndProc = (WNDPROC)GetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC);
831831 if (currentWndProc != PluginViewWndProc)
832  m_pluginWndProc = (WNDPROC)SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (LONG)PluginViewWndProc);
 832 m_pluginWndProc = (WNDPROC)SetWindowLongPtr(platformPluginWidget(), GWLP_WNDPROC, (LONG_PTR)PluginViewWndProc);
833833#endif
834834 }
835835}

@@bool PluginView::platformStart()
978978
979979 // Calling SetWindowLongPtrA here makes the window proc ASCII, which is required by at least
980980 // the Shockwave Director plug-in.
981 #if OS(WINDOWS) && CPU(X86_64) && COMPILER(MSVC)
 981#if OS(WINDOWS) && CPU(X86_64)
982982 ::SetWindowLongPtrA(platformPluginWidget(), GWLP_WNDPROC, (LONG_PTR)DefWindowProcA);
983983#elif OS(WINCE)
984984 ::SetWindowLong(platformPluginWidget(), GWL_WNDPROC, (LONG)DefWindowProc);
57788