Changeset 221609 in webkit
- Timestamp:
- Sep 5, 2017 12:16:51 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 1 deleted
- 26 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r221547 r221609 1 2017-09-05 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Wrong use of PLUGIN_ARCHITECTURE(X11) in several places 4 https://bugs.webkit.org/show_bug.cgi?id=176329 5 6 Reviewed by Michael Catanzaro. 7 8 Only define MOZ_X11 if X11 target is enabled and always define XP_UNIX if NETSCAPE_PLUGIN_API is enabled. 9 10 * Source/cmake/OptionsGTK.cmake: 11 1 12 2017-09-03 Sam Weinig <sam@webkit.org> 2 13 -
trunk/Source/WebKit/ChangeLog
r221595 r221609 1 2017-09-05 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Wrong use of PLUGIN_ARCHITECTURE(X11) in several places 4 https://bugs.webkit.org/show_bug.cgi?id=176329 5 6 Reviewed by Michael Catanzaro. 7 8 We are using PLUGIN_ARCHITECTURE(X11) in several places where we should actually be using PLATFORM(X11). This is 9 confusing because PLUGIN_ARCHITECTURE(X11) is no longer specific to X11, it will be renamed as UNIX in a follow 10 up patch. Because of this we only support plugins in Wayland when building with both X11 and Wayland targets 11 enabled. 12 13 * PluginProcess/PluginControllerProxy.cpp: 14 * PluginProcess/PluginControllerProxy.h: 15 * PluginProcess/unix/PluginProcessMainUnix.cpp: 16 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: 17 (WebKit::NetscapePluginModule::determineQuirks): 18 * Shared/Plugins/PluginQuirks.h: 19 * UIProcess/WebPageProxy.h: 20 * UIProcess/WebPageProxy.messages.in: 21 * UIProcess/gtk/WebPageProxyGtk.cpp: 22 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: 23 (WebKit::NPN_GetValue): 24 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: 25 (WebKit::NetscapePlugin::shouldLoadSrcURL): 26 (WebKit::NetscapePlugin::initialize): 27 * WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp: 28 (WebKit::NetscapePlugin::platformHandleMouseEvent): 29 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: 30 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.h: 31 * WebProcess/Plugins/PluginController.h: 32 * WebProcess/Plugins/PluginProxy.cpp: 33 * WebProcess/Plugins/PluginProxy.h: 34 * WebProcess/Plugins/PluginProxy.messages.in: 35 * WebProcess/Plugins/PluginView.cpp: 36 * WebProcess/Plugins/PluginView.h: 37 1 38 2017-09-04 Wenson Hsieh <wenson_hsieh@apple.com> 2 39 -
trunk/Source/WebKit/PluginProcess/PluginControllerProxy.cpp
r216448 r221609 647 647 } 648 648 649 #if PL UGIN_ARCHITECTURE(X11)649 #if PLATFORM(X11) 650 650 uint64_t PluginControllerProxy::createPluginContainer() 651 651 { -
trunk/Source/WebKit/PluginProcess/PluginControllerProxy.h
r216448 r221609 115 115 void protectPluginFromDestruction() override; 116 116 void unprotectPluginFromDestruction() override; 117 #if PL UGIN_ARCHITECTURE(X11)117 #if PLATFORM(X11) 118 118 uint64_t createPluginContainer() override; 119 119 void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID) override; -
trunk/Source/WebKit/PluginProcess/unix/PluginProcessMainUnix.cpp
r212557 r221609 42 42 #endif 43 43 44 #if defined(XP_UNIX)44 #if PLATFORM(X11) 45 45 #include <WebCore/PlatformDisplayX11.h> 46 46 #include <WebCore/XErrorTrapper.h> … … 49 49 namespace WebKit { 50 50 51 #if defined(XP_UNIX)51 #if PLATFORM(X11) 52 52 static std::unique_ptr<WebCore::XErrorTrapper> xErrorTrapper; 53 #endif // XP_UNIX53 #endif 54 54 55 55 class PluginProcessMain final: public ChildProcessMainBase { … … 77 77 #endif 78 78 79 #if defined(XP_UNIX)79 #if PLATFORM(X11) 80 80 if (WebCore::PlatformDisplay::sharedDisplay().type() == WebCore::PlatformDisplay::Type::X11) { 81 81 auto* display = downcast<WebCore::PlatformDisplayX11>(WebCore::PlatformDisplay::sharedDisplay()).native(); -
trunk/Source/WebKit/Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp
r212557 r221609 182 182 Vector<MimeClassInfo> mimeTypes; 183 183 parseMIMEDescription(metaData.mimeDescription, mimeTypes); 184 185 #if PLATFORM(X11) 184 186 for (size_t i = 0; i < mimeTypes.size(); ++i) { 185 187 if (mimeTypes[i].type == "application/x-shockwave-flash") { … … 191 193 } 192 194 } 195 #endif // PLATFORM(X11) 193 196 } 194 197 -
trunk/Source/WebKit/Shared/Plugins/PluginQuirks.h
r179175 r221609 80 80 81 81 // X11 specific quirks: 82 #elif PL UGIN_ARCHITECTURE(X11)82 #elif PLATFORM(X11) 83 83 // Flash and npwrapper ask the browser about which GTK version does it use 84 84 // and refuse to load and work if it is not GTK 2 so we need to fake it in -
trunk/Source/WebKit/UIProcess/WebPageProxy.h
r221503 r221609 1558 1558 void setRenderTreeSize(uint64_t treeSize) { m_renderTreeSize = treeSize; } 1559 1559 1560 #if PL UGIN_ARCHITECTURE(X11)1560 #if PLATFORM(X11) 1561 1561 void createPluginContainer(uint64_t& windowID); 1562 1562 void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID); -
trunk/Source/WebKit/UIProcess/WebPageProxy.messages.in
r221503 r221609 374 374 #endif 375 375 376 #if PL UGIN_ARCHITECTURE(X11)376 #if PLATFORM(X11) 377 377 # X11 windowed plugin messages 378 378 CreatePluginContainer() -> (uint64_t windowID) -
trunk/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp
r218740 r221609 92 92 } 93 93 94 #if PL UGIN_ARCHITECTURE(X11)94 #if PLATFORM(X11) 95 95 typedef HashMap<uint64_t, GtkWidget* > PluginWindowMap; 96 96 static PluginWindowMap& pluginWindowMap() … … 145 145 gtk_widget_hide(plugin); 146 146 } 147 #endif // PL UGIN_ARCHITECTURE(X11)147 #endif // PLATFORM(X11) 148 148 149 149 void WebPageProxy::setInputMethodState(bool enabled) -
trunk/Source/WebKit/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
r209399 r221609 46 46 #endif 47 47 48 #if PL UGIN_ARCHITECTURE(X11)48 #if PLATFORM(X11) 49 49 #include <WebCore/PlatformDisplayX11.h> 50 50 #endif … … 508 508 break; 509 509 #endif 510 #elif PL UGIN_ARCHITECTURE(X11)510 #elif PLATFORM(X11) 511 511 case NPNVxDisplay: { 512 512 if (!npp) -
trunk/Source/WebKit/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
r221068 r221609 547 547 bool NetscapePlugin::shouldLoadSrcURL() 548 548 { 549 #if PL UGIN_ARCHITECTURE(X11)549 #if PLATFORM(X11) 550 550 // Flash crashes when NPP_GetValue is called for NPPVpluginCancelSrcStream in windowed mode. 551 551 if (m_isWindowed && m_pluginModule->pluginQuirks().contains(PluginQuirks::DoNotCancelSrcStreamInWindowedMode)) … … 645 645 } 646 646 647 #if PL UGIN_ARCHITECTURE(X11)647 #if PLATFORM(X11) 648 648 if (equalLettersIgnoringASCIICase(parameters.mimeType, "application/x-shockwave-flash")) { 649 649 size_t wmodeIndex = parameters.names.find("wmode"); -
trunk/Source/WebKit/WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp
r201921 r221609 25 25 26 26 #include "config.h" 27 #include "NetscapePlugin .h"27 #include "NetscapePluginUnix.h" 28 28 29 29 #if PLUGIN_ARCHITECTURE(X11) && ENABLE(NETSCAPE_PLUGIN_API) 30 30 31 #include "NetscapePlugin X11.h"31 #include "NetscapePlugin.h" 32 32 #include "WebEvent.h" 33 33 #include <WebCore/NotImplemented.h> 34 34 #include <WebCore/PlatformDisplay.h> 35 36 #if PLATFORM(X11) 37 #include "NetscapePluginX11.h" 38 #endif 35 39 36 40 using namespace WebCore; … … 107 111 return false; 108 112 113 #if PLATFORM(X11) 109 114 if ((event.type() == WebEvent::MouseDown || event.type() == WebEvent::MouseUp) 110 115 && event.button() == WebMouseEvent::RightButton 111 116 && quirks().contains(PluginQuirks::IgnoreRightClickInWindowlessMode)) 112 117 return false; 118 #endif 113 119 114 120 return m_impl->handleMouseEvent(event); -
trunk/Source/WebKit/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
r214412 r221609 28 28 #include "NetscapePluginX11.h" 29 29 30 #if PL UGIN_ARCHITECTURE(X11) && ENABLE(NETSCAPE_PLUGIN_API)30 #if PLATFORM(X11) && ENABLE(NETSCAPE_PLUGIN_API) 31 31 32 32 #include "NetscapePlugin.h" … … 541 541 } // namespace WebKit 542 542 543 #endif // PL UGIN_ARCHITECTURE(X11) && ENABLE(NETSCAPE_PLUGIN_API)543 #endif // PLATFORM(X11) && ENABLE(NETSCAPE_PLUGIN_API) -
trunk/Source/WebKit/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.h
r214412 r221609 28 28 #define NetscapePluginX11_h 29 29 30 #if PL UGIN_ARCHITECTURE(X11) && ENABLE(NETSCAPE_PLUGIN_API)30 #if PLATFORM(X11) && ENABLE(NETSCAPE_PLUGIN_API) 31 31 32 32 #include "NetscapePluginUnix.h" … … 71 71 } // namespace WebKit 72 72 73 #endif // PL UGIN_ARCHITECTURE(X11) && ENABLE(NETSCAPE_PLUGIN_API)73 #endif // PLATFORM(X11) && ENABLE(NETSCAPE_PLUGIN_API) 74 74 75 75 #endif // NetscapePluginX11_h -
trunk/Source/WebKit/WebProcess/Plugins/PluginController.h
r196505 r221609 144 144 virtual void unprotectPluginFromDestruction() = 0; 145 145 146 #if PL UGIN_ARCHITECTURE(X11)146 #if PLATFORM(X11) 147 147 // Create a plugin container for windowed plugins 148 148 virtual uint64_t createPluginContainer() = 0; -
trunk/Source/WebKit/WebProcess/Plugins/PluginProxy.cpp
r221068 r221609 696 696 } 697 697 698 #if PL UGIN_ARCHITECTURE(X11)698 #if PLATFORM(X11) 699 699 void PluginProxy::createPluginContainer(uint64_t& windowID) 700 700 { -
trunk/Source/WebKit/WebProcess/Plugins/PluginProxy.h
r208329 r221609 175 175 void setLayerHostingContextID(uint32_t); 176 176 #endif 177 #if PL UGIN_ARCHITECTURE(X11)177 #if PLATFORM(X11) 178 178 void createPluginContainer(uint64_t& windowID); 179 179 void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID); -
trunk/Source/WebKit/WebProcess/Plugins/PluginProxy.messages.in
r187886 r221609 71 71 #endif 72 72 73 #if PL UGIN_ARCHITECTURE(X11)73 #if PLATFORM(X11) 74 74 # Create the plugin container for windowed plugins 75 75 CreatePluginContainer() -> (uint64_t windowID) -
trunk/Source/WebKit/WebProcess/Plugins/PluginView.cpp
r219743 r221609 73 73 #include <wtf/text/StringBuilder.h> 74 74 75 #if PL UGIN_ARCHITECTURE(X11)75 #if PLATFORM(X11) 76 76 #include <WebCore/PlatformDisplay.h> 77 77 #endif … … 1681 1681 } 1682 1682 1683 #if PL UGIN_ARCHITECTURE(X11)1683 #if PLATFORM(X11) 1684 1684 uint64_t PluginView::createPluginContainer() 1685 1685 { -
trunk/Source/WebKit/WebProcess/Plugins/PluginView.h
r219743 r221609 225 225 void protectPluginFromDestruction() override; 226 226 void unprotectPluginFromDestruction() override; 227 #if PL UGIN_ARCHITECTURE(X11)227 #if PLATFORM(X11) 228 228 uint64_t createPluginContainer() override; 229 229 void windowedPluginGeometryDidChange(const WebCore::IntRect& frameRect, const WebCore::IntRect& clipRect, uint64_t windowID) override; -
trunk/Source/cmake/OptionsGTK.cmake
r221372 r221609 179 179 SET_AND_EXPOSE_TO_BUILD(WTF_PLATFORM_WAYLAND ${ENABLE_WAYLAND_TARGET}) 180 180 181 # MOZ_X11 and XP_UNIX are required by npapi.h. Their value is not checked; 182 # only their definedness is. They should only be defined in the true case. 183 if (${ENABLE_X11_TARGET}) 184 SET_AND_EXPOSE_TO_BUILD(MOZ_X11 1) 181 if (ENABLE_NETSCAPE_PLUGIN_API) 182 # MOZ_X11 and XP_UNIX are required by npapi.h. Their value is not checked; 183 # only their definedness is. They should only be defined in the true case. 184 if (ENABLE_X11_TARGET) 185 SET_AND_EXPOSE_TO_BUILD(MOZ_X11 1) 186 endif () 185 187 SET_AND_EXPOSE_TO_BUILD(XP_UNIX 1) 186 188 endif () -
trunk/Tools/CMakeLists.txt
r219865 r221609 8 8 add_subdirectory(TestWebKitAPI/glib) 9 9 endif () 10 if (ENABLE_ X11_TARGET)10 if (ENABLE_NETSCAPE_PLUGIN_API) 11 11 add_subdirectory(DumpRenderTree/TestNetscapePlugIn) 12 12 endif () -
trunk/Tools/ChangeLog
r221606 r221609 1 2017-09-05 Carlos Garcia Campos <cgarcia@igalia.com> 2 3 [GTK] Wrong use of PLUGIN_ARCHITECTURE(X11) in several places 4 https://bugs.webkit.org/show_bug.cgi?id=176329 5 6 Reviewed by Michael Catanzaro. 7 8 * CMakeLists.txt: Build TestNetscapePlugIn when NETSCAPE_PLUGIN_API is enabled and only link to X11 libraries 9 when building the X11 target. 10 * DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt: 11 * DumpRenderTree/TestNetscapePlugIn/Tests/unix/CallInvalidateRectWithNullNPPArgument.cpp: Renamed from Tools/DumpRenderTree/TestNetscapePlugIn/Tests/x11/CallInvalidateRectWithNullNPPArgument.cpp. 12 * DumpRenderTree/TestNetscapePlugIn/main.cpp: 13 (NP_Initialize): 14 (NPP_HandleEvent): 15 (NPP_GetValue): 16 1 17 2017-09-04 Eric Carlson <eric.carlson@apple.com> 2 18 -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/CMakeLists.txt
r220403 r221609 28 28 ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/ToStringAndValueOfObject.cpp 29 29 ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/URLRedirect.cpp 30 ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/x11/CallInvalidateRectWithNullNPPArgument.cpp31 30 ) 32 31 … … 38 37 ) 39 38 40 set(WebKitTestNetscapePlugIn_SYSTEM_INCLUDE_DIRECTORIES 41 ${X11_INCLUDE_DIR} 42 ) 39 if (MOZ_X11) 40 set(WebKitTestNetscapePlugIn_SYSTEM_INCLUDE_DIRECTORIES 41 ${X11_INCLUDE_DIR} 42 ) 43 44 set(WebKitTestNetscapePlugIn_LIBRARIES 45 ${X11_LIBRARIES} 46 ) 47 48 add_definitions(-DMOZ_X11) 49 endif () 50 51 if (XP_UNIX) 52 list(APPEND WebKitTestNetscapePlugIn_SOURCES 53 ${WEBKIT_TESTNETSCAPEPLUGIN_DIR}/Tests/unix/CallInvalidateRectWithNullNPPArgument.cpp 54 ) 55 56 add_definitions(-DXP_UNIX) 57 endif () 43 58 44 59 include_directories(${WebKitTestNetscapePlugIn_INCLUDE_DIRECTORIES}) 45 60 include_directories(SYSTEM ${WebKitTestNetscapePlugIn_SYSTEM_INCLUDE_DIRECTORIES}) 46 47 set(WebKitTestNetscapePlugIn_LIBRARIES48 ${X11_LIBRARIES}49 )50 51 if (WTF_OS_UNIX)52 add_definitions(-DXP_UNIX)53 endif ()54 61 55 62 add_library(TestNetscapePlugIn SHARED ${WebKitTestNetscapePlugIn_SOURCES}) -
trunk/Tools/DumpRenderTree/TestNetscapePlugIn/main.cpp
r217847 r221609 31 31 #include <string> 32 32 33 #if def XP_UNIX33 #if defined(MOZ_X11) 34 34 #include <X11/Xlib.h> 35 35 #include <X11/Xutil.h> … … 64 64 extern "C" 65 65 NPError STDCALL NP_Initialize(NPNetscapeFuncs *browserFuncs 66 #if def XP_UNIX66 #if defined(XP_UNIX) 67 67 , NPPluginFuncs *pluginFuncs 68 68 #endif … … 79 79 browser = browserFuncs; 80 80 81 #if def XP_UNIX81 #if defined(XP_UNIX) 82 82 return NP_GetEntryPoints(pluginFuncs); 83 83 #else … … 642 642 #endif // XP_MACOSX 643 643 644 #ifdef XP_UNIX 645 644 #if defined(MOZ_X11) 646 645 static char keyEventToChar(XKeyEvent* event) 647 646 { … … 708 707 return 0; 709 708 } 710 #endif // XP_UNIX709 #endif // MOZ_X11 711 710 712 711 #ifdef XP_WIN … … 777 776 assert(obj->eventModel == NPEventModelCocoa); 778 777 return handleEventCocoa(instance, obj, static_cast<NPCocoaEvent*>(event)); 779 #elif defined( XP_UNIX)778 #elif defined(MOZ_X11) 780 779 return handleEventX11(instance, obj, static_cast<XEvent*>(event)); 781 780 #elif defined(XP_WIN) … … 807 806 NPError NPP_GetValue(NPP instance, NPPVariable variable, void *value) 808 807 { 809 #if def XP_UNIX808 #if defined(XP_UNIX) 810 809 if (variable == NPPVpluginNameString) { 811 810 *((char **)value) = const_cast<char*>("WebKit Test PlugIn"); … … 816 815 return NPERR_NO_ERROR; 817 816 } 817 #endif 818 819 #if defined(MOZ_X11) 818 820 if (variable == NPPVpluginNeedsXEmbed) { 819 821 *((NPBool *)value) = TRUE; … … 858 860 } 859 861 860 #if def XP_UNIX862 #if defined(XP_UNIX) 861 863 extern "C" 862 864 const char* NP_GetMIMEDescription(void)
Note: See TracChangeset
for help on using the changeset viewer.