Changeset 120956 in webkit
- Timestamp:
- Jun 21, 2012 12:20:00 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r120927 r120956 1 2012-06-21 Kalev Lember <kalevlember@gmail.com> 2 3 [GTK] Fix NPAPI plugins on Windows 4 https://bugs.webkit.org/show_bug.cgi?id=54531 5 6 Reviewed by Martin Robinson. 7 8 Define XP_WIN on Windows for plugin support. 9 10 * GNUmakefile.am: 11 1 12 2012-06-21 Ryuan Choi <ryuan.choi@gmail.com> 2 13 -
trunk/GNUmakefile.am
r120012 r120956 162 162 163 163 # For the Gtk port we want to use XP_UNIX both in X11 and Mac 164 if !TARGET_WIN32 164 if TARGET_WIN32 165 global_cppflags += \ 166 -DXP_WIN 167 else 165 168 global_cppflags += \ 166 169 -DXP_UNIX -
trunk/Source/WTF/ChangeLog
r120922 r120956 1 2012-06-21 Kalev Lember <kalevlember@gmail.com> 2 3 [GTK] Fix NPAPI plugins on Windows 4 https://bugs.webkit.org/show_bug.cgi?id=54531 5 6 Reviewed by Martin Robinson. 7 8 Define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH for the GTK+ port, and 9 include OwnPtrWin.cpp in the list of files built on Windows. 10 11 * GNUmakefile.am: 12 * GNUmakefile.list.am: 13 * wtf/Platform.h: 14 1 15 2012-06-21 Balazs Kelemen <kbalazs@webkit.org> 2 16 -
trunk/Source/WTF/GNUmakefile.am
r111788 r120956 16 16 -lpthread 17 17 18 if TARGET_WIN32 19 # OwnPtrWin.cpp needs the symbols from gdi32 dll 20 libWTF_la_LIBADD += -lgdi32 21 endif 22 18 23 libWTF_la_CXXFLAGS = \ 19 24 $(global_cxxflags) \ -
trunk/Source/WTF/GNUmakefile.list.am
r119981 r120956 228 228 Source/WTF/wtf/ThreadFunctionInvocation.h \ 229 229 Source/WTF/wtf/ThreadingWin.cpp \ 230 Source/WTF/wtf/ThreadSpecificWin.cpp 230 Source/WTF/wtf/ThreadSpecificWin.cpp \ 231 Source/WTF/wtf/win/OwnPtrWin.cpp 231 232 else 232 233 wtf_sources += \ -
trunk/Source/WTF/wtf/Platform.h
r120745 r120956 1027 1027 #endif 1028 1028 1029 #if !ENABLE(NETSCAPE_PLUGIN_API) || (ENABLE(NETSCAPE_PLUGIN_API) && ((OS(UNIX) && (PLATFORM( QT) || PLATFORM(WX))) || PLATFORM(GTK) || PLATFORM(EFL)))1029 #if !ENABLE(NETSCAPE_PLUGIN_API) || (ENABLE(NETSCAPE_PLUGIN_API) && ((OS(UNIX) && (PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WX))) || PLATFORM(EFL))) 1030 1030 #define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1 1031 1031 #endif -
trunk/Source/WebCore/ChangeLog
r120954 r120956 1 2012-06-21 Kalev Lember <kalevlember@gmail.com> 2 3 [GTK] Fix NPAPI plugins on Windows 4 https://bugs.webkit.org/show_bug.cgi?id=54531 5 6 Reviewed by Martin Robinson. 7 8 Switch to using PluginPackageWin.cpp and PluginViewWin.cpp on Windows 9 platform, and leave plugins/gtk/ only for XP_UNIX platforms. With this 10 we can share a lot of code with other ports and don't have to 11 reimplement all the Windows-specific code in plugins/gtk/. 12 13 * GNUmakefile.am: 14 * GNUmakefile.list.am: 15 * platform/FileSystem.h: 16 (WebCore): 17 * platform/graphics/GraphicsContext.h: 18 (GraphicsContext): 19 * platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h: 20 (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate): 21 (GraphicsContextPlatformPrivate): 22 * platform/graphics/transforms/TransformationMatrix.h: 23 (TransformationMatrix): 24 * platform/graphics/win/GraphicsContextCairoWin.cpp: 25 (WebCore): 26 * platform/graphics/win/GraphicsContextWin.cpp: 27 (WebCore): 28 * platform/gtk/FileSystemGtk.cpp: 29 (WebCore::unloadModule): 30 * plugins/PluginView.h: 31 (PluginView): 32 * plugins/win/PluginViewWin.cpp: 33 (windowHandleForPageClient): 34 (WebCore::registerPluginView): 35 (WebCore::PluginView::paint): 36 (WebCore::PluginView::handleMouseEvent): 37 (WebCore::PluginView::platformStart): 38 (WebCore::PluginView::snapshot): 39 1 40 2012-06-21 Brady Eidson <beidson@apple.com> 2 41 -
trunk/Source/WebCore/GNUmakefile.am
r120228 r120956 156 156 endif # END USE_PANGO 157 157 158 # --- 159 # Windows plugin support 160 # --- 161 if TARGET_WIN32 162 webcoregtk_cppflags += \ 163 -I$(srcdir)/Source/WebCore/platform/graphics/win 164 endif # END TARGET_WIN32 165 158 166 # ---- 159 167 # HTML Details Element … … 965 973 $(XRENDER_CFLAGS) \ 966 974 $(XT_CFLAGS) 975 976 if TARGET_WIN32 977 # PluginPackageWin.cpp needs the symbols from version dll 978 libWebCore_la_LIBADD = -lversion 979 endif 967 980 968 981 libWebCoreModules_la_SOURCES = \ -
trunk/Source/WebCore/GNUmakefile.list.am
r120929 r120956 4819 4819 Source/WebCore/platform/gtk/WidgetGtk.cpp \ 4820 4820 Source/WebCore/platform/gtk/WidgetRenderingContext.cpp \ 4821 Source/WebCore/platform/gtk/WidgetRenderingContext.h \ 4822 Source/WebCore/plugins/gtk/PluginPackageGtk.cpp \ 4823 Source/WebCore/plugins/gtk/PluginViewGtk.cpp 4821 Source/WebCore/platform/gtk/WidgetRenderingContext.h 4824 4822 4825 4823 if TARGET_X11 … … 4837 4835 if TARGET_WIN32 4838 4836 webcore_sources += \ 4837 Source/WebCore/platform/graphics/win/DIBPixelData.cpp \ 4838 Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp \ 4839 Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp \ 4840 Source/WebCore/platform/graphics/win/LocalWindowsContext.h \ 4841 Source/WebCore/platform/graphics/win/TransformationMatrixWin.cpp \ 4842 Source/WebCore/platform/win/BitmapInfo.cpp \ 4843 Source/WebCore/platform/win/BitmapInfo.h \ 4839 4844 Source/WebCore/platform/win/SystemInfo.cpp \ 4840 4845 Source/WebCore/platform/win/SystemInfo.h \ 4846 Source/WebCore/platform/win/WebCoreInstanceHandle.cpp \ 4847 Source/WebCore/platform/win/WebCoreInstanceHandle.h \ 4841 4848 Source/WebCore/plugins/win/PluginDatabaseWin.cpp \ 4842 4849 Source/WebCore/plugins/win/PluginMessageThrottlerWin.cpp \ 4843 Source/WebCore/plugins/win/PluginMessageThrottlerWin.h 4850 Source/WebCore/plugins/win/PluginMessageThrottlerWin.h \ 4851 Source/WebCore/plugins/win/PluginPackageWin.cpp 4844 4852 webcoregtk_sources += \ 4845 Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp 4853 Source/WebCore/platform/cairo/WidgetBackingStoreCairo.cpp \ 4854 Source/WebCore/plugins/win/PluginViewWin.cpp 4855 else 4856 webcoregtk_sources += \ 4857 Source/WebCore/plugins/gtk/PluginPackageGtk.cpp \ 4858 Source/WebCore/plugins/gtk/PluginViewGtk.cpp 4846 4859 endif 4847 4860 -
trunk/Source/WebCore/platform/FileSystem.h
r120282 r120956 75 75 76 76 // PlatformModule 77 #if PLATFORM(GTK) 77 #if OS(WINDOWS) 78 typedef HMODULE PlatformModule; 79 #elif PLATFORM(GTK) 78 80 typedef GModule* PlatformModule; 79 #elif OS(WINDOWS)80 typedef HMODULE PlatformModule;81 81 #elif PLATFORM(QT) 82 82 #if defined(Q_WS_MAC) -
trunk/Source/WebCore/platform/graphics/GraphicsContext.h
r119706 r120956 489 489 #endif 490 490 491 #if (PLATFORM( QT) && OS(WINDOWS)) || (PLATFORM(WX) && OS(WINDOWS))491 #if (PLATFORM(GTK) && OS(WINDOWS)) || (PLATFORM(QT) && OS(WINDOWS)) || (PLATFORM(WX) && OS(WINDOWS)) 492 492 HDC getWindowsContext(const IntRect&, bool supportAlphaBlend = true, bool mayCreateBitmap = true); 493 493 void releaseWindowsContext(HDC, const IntRect&, bool supportAlphaBlend = true, bool mayCreateBitmap = true); -
trunk/Source/WebCore/platform/graphics/cairo/GraphicsContextPlatformPrivateCairo.h
r119392 r120956 53 53 #if PLATFORM(GTK) 54 54 , expose(0) 55 #elif PLATFORM(WIN) 55 #endif 56 #if PLATFORM(WIN) || (PLATFORM(GTK) && OS(WINDOWS)) 56 57 // NOTE: These may note be needed: review and remove once Cairo implementation is complete 57 58 , m_hdc(0) … … 98 99 #if PLATFORM(GTK) 99 100 GdkEventExpose* expose; 100 #elif PLATFORM(WIN) 101 #endif 102 #if PLATFORM(WIN) || (PLATFORM(GTK) && OS(WINDOWS)) 101 103 HDC m_hdc; 102 104 bool m_shouldIncludeChildWindows; -
trunk/Source/WebCore/platform/graphics/transforms/TransformationMatrix.h
r118572 r120956 51 51 #endif 52 52 53 #if PLATFORM(WIN) || (PLATFORM( QT) && OS(WINDOWS)) || (PLATFORM(WX) && OS(WINDOWS))53 #if PLATFORM(WIN) || (PLATFORM(GTK) && OS(WINDOWS)) || (PLATFORM(QT) && OS(WINDOWS)) || (PLATFORM(WX) && OS(WINDOWS)) 54 54 #if COMPILER(MINGW) && !COMPILER(MINGW64) 55 55 typedef struct _XFORM XFORM; … … 342 342 #endif 343 343 344 #if PLATFORM(WIN) || (PLATFORM( QT) && OS(WINDOWS)) || (PLATFORM(WX) && OS(WINDOWS))344 #if PLATFORM(WIN) || (PLATFORM(GTK) && OS(WINDOWS)) || (PLATFORM(QT) && OS(WINDOWS)) || (PLATFORM(WX) && OS(WINDOWS)) 345 345 operator XFORM() const; 346 346 #endif -
trunk/Source/WebCore/platform/graphics/win/GraphicsContextCairoWin.cpp
r95901 r120956 28 28 29 29 #include "AffineTransform.h" 30 #include "DIBPixelData.h" 30 31 #include "Path.h" 31 32 … … 37 38 namespace WebCore { 38 39 40 #if PLATFORM(WIN) 39 41 static cairo_t* createCairoContextWithHDC(HDC hdc, bool hasAlpha) 40 42 { … … 88 90 } 89 91 } 92 #endif 90 93 91 94 static void setRGBABitmapAlpha(unsigned char* bytes, size_t length, unsigned char level) … … 150 153 } 151 154 155 #if PLATFORM(WIN) 152 156 void GraphicsContext::drawWindowsBitmap(WindowsBitmap* bitmap, const IntPoint& point) 153 157 { … … 172 176 cairo_surface_destroy(surface); 173 177 } 178 #endif 174 179 175 180 } -
trunk/Source/WebCore/platform/graphics/win/GraphicsContextWin.cpp
r94897 r120956 52 52 } 53 53 54 #if PLATFORM(WIN) 54 55 void GraphicsContext::setShouldIncludeChildWindows(bool include) 55 56 { … … 95 96 return adoptPtr(new WindowsBitmap(m_data->m_hdc, size)); 96 97 } 98 #endif 97 99 98 100 HDC GraphicsContext::getWindowsContext(const IntRect& dstRect, bool supportAlphaBlend, bool mayCreateBitmap) … … 134 136 } 135 137 138 #if PLATFORM(WIN) 136 139 void GraphicsContextPlatformPrivate::save() 137 140 { … … 203 206 SetWorldTransform(m_hdc, &xform); 204 207 } 205 206 } 208 #endif 209 210 } -
trunk/Source/WebCore/platform/gtk/FileSystemGtk.cpp
r120950 r120956 357 357 bool unloadModule(PlatformModule module) 358 358 { 359 #if OS(WINDOWS) 360 return ::FreeLibrary(module); 361 #else 359 362 return g_module_close(module); 360 } 361 } 363 #endif 364 } 365 } -
trunk/Source/WebCore/plugins/PluginView.h
r116403 r120956 48 48 #endif 49 49 50 #if OS(WINDOWS) && (PLATFORM( QT) || PLATFORM(WX))50 #if OS(WINDOWS) && (PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WX)) 51 51 typedef struct HWND__* HWND; 52 52 typedef HWND PlatformPluginWidget; … … 377 377 #endif 378 378 379 #if ((PLATFORM( QT) || PLATFORM(WX)) && OS(WINDOWS)) || defined(XP_MACOSX) || PLATFORM(EFL)379 #if ((PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WX)) && OS(WINDOWS)) || defined(XP_MACOSX) || PLATFORM(EFL) 380 380 // On Mac OSX and Qt/Windows the plugin does not have its own native widget, 381 381 // but is using the containing window as its reference for positioning/painting. -
trunk/Source/WebCore/plugins/win/PluginViewWin.cpp
r119927 r120956 87 87 #endif 88 88 89 #if PLATFORM(GTK) 90 #include <gdk/gdkwin32.h> 91 #include <gtk/gtk.h> 92 #endif 93 89 94 #if PLATFORM(QT) 90 95 #include "QWebPageClient.h" … … 103 108 static inline HWND windowHandleForPageClient(PlatformPageClient client) 104 109 { 105 #if PLATFORM(QT) 110 #if PLATFORM(GTK) 111 if (!client) 112 return 0; 113 if (GdkWindow* window = gtk_widget_get_window(client)) 114 return static_cast<HWND>(GDK_WINDOW_HWND(window)); 115 return 0; 116 #elif PLATFORM(QT) 106 117 if (!client) 107 118 return 0; … … 301 312 haveRegisteredWindowClass = true; 302 313 303 #if PLATFORM( QT)304 WebCore::setInstanceHandle((HINSTANCE)( qWinAppInst()));314 #if PLATFORM(GTK) || PLATFORM(QT) 315 WebCore::setInstanceHandle((HINSTANCE)(GetModuleHandle(0))); 305 316 #endif 306 317 … … 643 654 // On Safari/Windows without transparency layers the GraphicsContext returns the HDC 644 655 // of the window and the plugin expects that the passed in DC has window coordinates. 645 // In the Qt port we always draw in an offscreen buffer and therefore need to preserve646 // t he translation set in getWindowsContext.647 #if !PLATFORM( QT) && !OS(WINCE)656 // In the GTK and Qt ports we always draw in an offscreen buffer and therefore need 657 // to preserve the translation set in getWindowsContext. 658 #if !PLATFORM(GTK) && !PLATFORM(QT) && !OS(WINCE) 648 659 if (!context->isInTransparencyLayer()) { 649 660 XFORM transform; … … 753 764 event->setDefaultHandled(); 754 765 755 #if !PLATFORM( QT) && !PLATFORM(WX) && !OS(WINCE)766 #if !PLATFORM(GTK) && !PLATFORM(QT) && !PLATFORM(WX) && !OS(WINCE) 756 767 // Currently, Widget::setCursor is always called after this function in EventHandler.cpp 757 768 // and since we don't want that we set ignoreNextSetCursor to true here to prevent that. … … 998 1009 0, 0, 0, 0, parentWindowHandle, 0, WebCore::instanceHandle(), 0); 999 1010 1000 #if OS(WINDOWS) && (PLATFORM( QT) || PLATFORM(WX))1011 #if OS(WINDOWS) && (PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WX)) 1001 1012 m_window = window; 1002 1013 #else … … 1041 1052 PassRefPtr<Image> PluginView::snapshot() 1042 1053 { 1043 #if !PLATFORM( WX) && !OS(WINCE)1054 #if !PLATFORM(GTK) && !PLATFORM(WX) && !OS(WINCE) 1044 1055 OwnPtr<HDC> hdc = adoptPtr(CreateCompatibleDC(0)); 1045 1056
Note: See TracChangeset
for help on using the changeset viewer.