WebKit Bugzilla
Attachment 372549 Details for
Bug 199065
: [GTK] Remove support for GTK2 plugins
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
wk2-remove-flash.diff (text/plain), 80.81 KB, created by
Carlos Garcia Campos
on 2019-06-20 02:46:17 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Carlos Garcia Campos
Created:
2019-06-20 02:46:17 PDT
Size:
80.81 KB
patch
obsolete
>diff --git a/ChangeLog b/ChangeLog >index 2afe89cd2f8..ead1c89b46a 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,14 @@ >+2019-06-20 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] Remove support for GTK2 plugins >+ https://bugs.webkit.org/show_bug.cgi?id=199065 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Source/cmake/FindGDK2.cmake: Removed. >+ * Source/cmake/FindGTK2.cmake: Removed. >+ * Source/cmake/OptionsGTK.cmake: >+ > 2019-06-18 Adrian Perez de Castro <aperez@igalia.com> > > Unreviewed. Update OptionsWPE.cmake and NEWS for the 2.25.1 release >diff --git a/PerformanceTests/ChangeLog b/PerformanceTests/ChangeLog >index e35516fc0f5..ee19ae23eb7 100644 >--- a/PerformanceTests/ChangeLog >+++ b/PerformanceTests/ChangeLog >@@ -1,3 +1,12 @@ >+2019-06-20 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] Remove support for GTK2 plugins >+ https://bugs.webkit.org/show_bug.cgi?id=199065 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * StitchMarker/wtf/Platform.h: >+ > 2019-05-08 Caio Lima <ticaiolima@gmail.com> > > [BigInt] Add ValueMod into DFG >diff --git a/PerformanceTests/StitchMarker/wtf/Platform.h b/PerformanceTests/StitchMarker/wtf/Platform.h >index 44b1840fc6c..072bb9bea05 100644 >--- a/PerformanceTests/StitchMarker/wtf/Platform.h >+++ b/PerformanceTests/StitchMarker/wtf/Platform.h >@@ -524,9 +524,6 @@ > > #if PLATFORM(GTK) > #define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_36 >-#endif >- >-#if PLATFORM(GTK) && !defined(GTK_API_VERSION_2) > #define GDK_VERSION_MIN_REQUIRED GDK_VERSION_3_6 > #endif > >diff --git a/Source/WTF/ChangeLog b/Source/WTF/ChangeLog >index a591add9113..e83877dae62 100644 >--- a/Source/WTF/ChangeLog >+++ b/Source/WTF/ChangeLog >@@ -1,3 +1,13 @@ >+2019-06-20 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] Remove support for GTK2 plugins >+ https://bugs.webkit.org/show_bug.cgi?id=199065 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * wtf/Platform.h: >+ * wtf/glib/GTypedefs.h: >+ > 2019-06-19 Yusuke Suzuki <ysuzuki@apple.com> > > [bmalloc] IsoHeap's initialization is racy with IsoHeap::isInitialized >diff --git a/Source/WTF/wtf/Platform.h b/Source/WTF/wtf/Platform.h >index 5d236e034b0..5a6ef3adaaf 100644 >--- a/Source/WTF/wtf/Platform.h >+++ b/Source/WTF/wtf/Platform.h >@@ -583,16 +583,13 @@ > > #if PLATFORM(GTK) > #define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_36 >+#define GDK_VERSION_MIN_REQUIRED GDK_VERSION_3_6 > #endif > > #if PLATFORM(WPE) > #define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_40 > #endif > >-#if PLATFORM(GTK) && !defined(GTK_API_VERSION_2) >-#define GDK_VERSION_MIN_REQUIRED GDK_VERSION_3_6 >-#endif >- > #if USE(SOUP) > #define SOUP_VERSION_MIN_REQUIRED SOUP_VERSION_2_42 > #endif >diff --git a/Source/WTF/wtf/glib/GTypedefs.h b/Source/WTF/wtf/glib/GTypedefs.h >index 51053c03d86..e94790e73e0 100644 >--- a/Source/WTF/wtf/glib/GTypedefs.h >+++ b/Source/WTF/wtf/glib/GTypedefs.h >@@ -75,11 +75,6 @@ typedef struct _cairo_surface cairo_surface_t; > typedef struct _cairo_rectangle_int cairo_rectangle_int_t; > #endif > >-#if USE(CLUTTER) >-typedef struct _ClutterActor ClutterActor; >-typedef struct _GraphicsLayerActor GraphicsLayerActor; >-#endif >- > #if PLATFORM(GTK) > typedef struct _GtkAction GtkAction; > typedef struct _GtkAdjustment GtkAdjustment; >@@ -96,16 +91,9 @@ typedef struct _GtkTargetList GtkTargetList; > typedef struct _GtkThemeParts GtkThemeParts; > typedef struct _GtkWidget GtkWidget; > typedef struct _GtkWindow GtkWindow; >- >-#ifdef GTK_API_VERSION_2 >-typedef struct _GdkRectangle GdkRectangle; >-typedef struct _GdkDrawable GdkWindow; >-#else > typedef struct _GdkWindow GdkWindow; > typedef struct _GtkStyleContext GtkStyleContext; > #endif > >-#endif >- > #endif > #endif // WTF_GTypedefs_h >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 96f4f2abacf..f1484c11f7f 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,47 @@ >+2019-06-20 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] Remove support for GTK2 plugins >+ https://bugs.webkit.org/show_bug.cgi?id=199065 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * PlatformGTK.cmake: >+ * SourcesGTK.txt: >+ * SourcesWPE.txt: >+ * platform/FreeType.cmake: >+ * platform/SourcesGLib.txt: >+ * platform/graphics/Color.h: >+ * platform/graphics/PlatformDisplay.cpp: >+ (WebCore::PlatformDisplay::createPlatformDisplay): >+ * platform/graphics/gtk/ColorGtk.cpp: >+ (WebCore::Color::operator GdkRGBA const): >+ * platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp: >+ (WebCore::onFrameClockUpdate): >+ (WebCore::DisplayRefreshMonitorGtk::requestRefreshCallback): >+ * platform/graphics/gtk/DisplayRefreshMonitorGtk.h: >+ (WebCore::DisplayRefreshMonitorGtk::create): >+ * platform/graphics/gtk/GdkCairoUtilities.cpp: >+ * platform/gtk/GRefPtrGtk.cpp: >+ * platform/gtk/GRefPtrGtk.h: >+ * platform/gtk/GtkVersioning.c: Removed. >+ * platform/gtk/GtkVersioning.h: Removed. >+ * platform/gtk/PasteboardHelper.cpp: >+ (WebCore::PasteboardHelper::getClipboardContents): >+ * platform/gtk/PlatformKeyboardEventGtk.cpp: >+ (WebCore::modifiersForGdkKeyEvent): >+ (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent): >+ * platform/gtk/PlatformMouseEventGtk.cpp: >+ (WebCore::PlatformMouseEvent::PlatformMouseEvent): >+ * platform/gtk/PlatformScreenGtk.cpp: >+ (WebCore::screenIsTouchPrimaryInputDevice): >+ * platform/gtk/PlatformWheelEventGtk.cpp: >+ (WebCore::PlatformWheelEvent::PlatformWheelEvent): >+ * platform/gtk/ScrollbarThemeGtk.cpp: >+ * platform/gtk/ScrollbarThemeGtk.h: >+ * platform/gtk/WidgetGtk.cpp: >+ * rendering/RenderThemeGtk.cpp: >+ * rendering/RenderThemeGtk.h: >+ > 2019-06-19 Justin Fan <justin_fan@apple.com> > > [WHLSL] Create a shading language test harness >diff --git a/Source/WebCore/PlatformGTK.cmake b/Source/WebCore/PlatformGTK.cmake >index d9edf019d15..2f0da5b76ce 100644 >--- a/Source/WebCore/PlatformGTK.cmake >+++ b/Source/WebCore/PlatformGTK.cmake >@@ -42,41 +42,6 @@ if (USE_WPE_RENDERER) > ) > endif () > >-list(APPEND WebCorePlatformGTK_SOURCES >- editing/gtk/EditorGtk.cpp >- >- page/gtk/DragControllerGtk.cpp >- >- platform/glib/EventHandlerGLib.cpp >- >- platform/graphics/PlatformDisplay.cpp >- >- platform/graphics/gtk/ColorGtk.cpp >- platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp >- platform/graphics/gtk/GdkCairoUtilities.cpp >- platform/graphics/gtk/IconGtk.cpp >- platform/graphics/gtk/ImageBufferGtk.cpp >- platform/graphics/gtk/ImageGtk.cpp >- >- platform/gtk/CursorGtk.cpp >- platform/gtk/DragImageGtk.cpp >- platform/gtk/GRefPtrGtk.cpp >- platform/gtk/GtkUtilities.cpp >- platform/gtk/GtkVersioning.c >- platform/gtk/PasteboardHelper.cpp >- platform/gtk/PlatformKeyboardEventGtk.cpp >- platform/gtk/PlatformMouseEventGtk.cpp >- platform/gtk/PlatformPasteboardGtk.cpp >- platform/gtk/PlatformScreenGtk.cpp >- platform/gtk/PlatformWheelEventGtk.cpp >- platform/gtk/RenderThemeGadget.cpp >- platform/gtk/RenderThemeWidget.cpp >- platform/gtk/ScrollbarThemeGtk.cpp >- platform/gtk/WidgetGtk.cpp >- >- rendering/RenderThemeGtk.cpp >-) >- > list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS > platform/graphics/x11/PlatformDisplayX11.h > platform/graphics/x11/XErrorTrapper.h >@@ -87,7 +52,6 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS > platform/gtk/GRefPtrGtk.h > platform/gtk/GUniquePtrGtk.h > platform/gtk/GtkUtilities.h >- platform/gtk/GtkVersioning.h > platform/gtk/PasteboardHelper.h > platform/gtk/SelectionData.h > >@@ -109,10 +73,12 @@ set(WebCore_USER_AGENT_SCRIPTS_DEPENDENCIES ${WEBCORE_DIR}/platform/gtk/RenderTh > list(APPEND WebCore_LIBRARIES > ${ATK_LIBRARIES} > ${ENCHANT_LIBRARIES} >+ ${GDK_LIBRARIES} > ${GLIB_GIO_LIBRARIES} > ${GLIB_GMODULE_LIBRARIES} > ${GLIB_GOBJECT_LIBRARIES} > ${GLIB_LIBRARIES} >+ ${GTK_LIBRARIES} > ${LIBSECCOMP_LIBRARIES} > ${LIBSECRET_LIBRARIES} > ${LIBTASN1_LIBRARIES} >@@ -135,8 +101,10 @@ endif () > list(APPEND WebCore_SYSTEM_INCLUDE_DIRECTORIES > ${ATK_INCLUDE_DIRS} > ${ENCHANT_INCLUDE_DIRS} >+ ${GDK_INCLUDE_DIRS} > ${GIO_UNIX_INCLUDE_DIRS} > ${GLIB_INCLUDE_DIRS} >+ ${GTK_INCLUDE_DIRS} > ${LIBSECCOMP_INCLUDE_DIRS} > ${LIBSECRET_INCLUDE_DIRS} > ${LIBTASN1_INCLUDE_DIRS} >@@ -166,31 +134,6 @@ if (USE_OPENGL) > ) > endif () > >-if (ENABLE_PLUGIN_PROCESS_GTK2) >- # WebKitPluginProcess2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+ >- # dependent files into a separate library which can be used to construct a GTK+2 WebCore >- # for the plugin process. >- add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES}) >- add_dependencies(WebCorePlatformGTK2 WebCore) >- set_property(TARGET WebCorePlatformGTK2 >- APPEND >- PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1 >- ) >- target_include_directories(WebCorePlatformGTK2 PRIVATE >- ${WebCore_INCLUDE_DIRECTORIES} >- ) >- target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE >- ${WebCore_SYSTEM_INCLUDE_DIRECTORIES} >- ${GTK2_INCLUDE_DIRS} >- ${GDK2_INCLUDE_DIRS} >- ) >- target_link_libraries(WebCorePlatformGTK2 >- ${WebCore_LIBRARIES} >- ${GTK2_LIBRARIES} >- ${GDK2_LIBRARIES} >- ) >-endif () >- > if (ENABLE_WAYLAND_TARGET) > list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS > platform/graphics/wayland/PlatformDisplayWayland.h >@@ -204,29 +147,6 @@ if (ENABLE_WAYLAND_TARGET) > ) > endif () > >-add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES}) >-add_dependencies(WebCorePlatformGTK WebCore) >-target_include_directories(WebCorePlatformGTK PRIVATE >- ${WebCore_INCLUDE_DIRECTORIES} >- ${WebCore_PRIVATE_INCLUDE_DIRECTORIES} >-) >-target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE >- ${WebCore_SYSTEM_INCLUDE_DIRECTORIES} >- ${GTK_INCLUDE_DIRS} >- ${GDK_INCLUDE_DIRS} >-) >-target_link_libraries(WebCorePlatformGTK >- ${WebCore_LIBRARIES} >- ${GTK_LIBRARIES} >- ${GDK_LIBRARIES} >-) >- >-include_directories( >- ${WebCore_INCLUDE_DIRECTORIES} >- ${WebCore_PRIVATE_INCLUDE_DIRECTORIES} >- "${WEBCORE_DIR}/bindings/gobject/" >-) >- > include_directories(SYSTEM > ${WebCore_SYSTEM_INCLUDE_DIRECTORIES} > ) >diff --git a/Source/WebCore/SourcesGTK.txt b/Source/WebCore/SourcesGTK.txt >index 9ce669a558b..33430f903c8 100644 >--- a/Source/WebCore/SourcesGTK.txt >+++ b/Source/WebCore/SourcesGTK.txt >@@ -41,8 +41,12 @@ accessibility/atk/WebKitAccessibleUtil.cpp > > editing/atk/FrameSelectionAtk.cpp > >+editing/gtk/EditorGtk.cpp >+ > loader/soup/ResourceLoaderSoup.cpp > >+page/gtk/DragControllerGtk.cpp >+ > page/linux/ResourceUsageOverlayLinux.cpp > page/linux/ResourceUsageThreadLinux.cpp > >@@ -63,6 +67,7 @@ platform/generic/ScrollAnimatorGeneric.cpp > > platform/graphics/GLContext.cpp @no-unify > platform/graphics/GraphicsContext3DPrivate.cpp >+platform/graphics/PlatformDisplay.cpp > > platform/graphics/cairo/BackingStoreBackendCairoX11.cpp @no-unify > >@@ -73,6 +78,13 @@ platform/graphics/egl/GLContextEGLX11.cpp @no-unify > > platform/graphics/glx/GLContextGLX.cpp > >+platform/graphics/gtk/ColorGtk.cpp >+platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp >+platform/graphics/gtk/GdkCairoUtilities.cpp >+platform/graphics/gtk/IconGtk.cpp >+platform/graphics/gtk/ImageBufferGtk.cpp >+platform/graphics/gtk/ImageGtk.cpp >+ > platform/graphics/gstreamer/ImageGStreamerCairo.cpp > > platform/graphics/libwpe/PlatformDisplayLibWPE.cpp >@@ -89,10 +101,24 @@ platform/graphics/x11/PlatformDisplayX11.cpp @no-unify > platform/graphics/x11/XErrorTrapper.cpp @no-unify > platform/graphics/x11/XUniqueResource.cpp @no-unify > >+platform/gtk/CursorGtk.cpp > platform/gtk/DragDataGtk.cpp >+platform/gtk/DragImageGtk.cpp >+platform/gtk/GRefPtrGtk.cpp >+platform/gtk/GtkUtilities.cpp > platform/gtk/LocalizedStringsGtk.cpp > platform/gtk/PasteboardGtk.cpp >+platform/gtk/PasteboardHelper.cpp >+platform/gtk/PlatformKeyboardEventGtk.cpp >+platform/gtk/PlatformMouseEventGtk.cpp >+platform/gtk/PlatformPasteboardGtk.cpp >+platform/gtk/PlatformScreenGtk.cpp >+platform/gtk/PlatformWheelEventGtk.cpp >+platform/gtk/RenderThemeGadget.cpp >+platform/gtk/RenderThemeWidget.cpp >+platform/gtk/ScrollbarThemeGtk.cpp > platform/gtk/SelectionData.cpp >+platform/gtk/WidgetGtk.cpp > > platform/text/Hyphenation.cpp > platform/text/LocaleICU.cpp >@@ -104,3 +130,5 @@ platform/text/hyphen/HyphenationLibHyphen.cpp > platform/unix/LoggingUnix.cpp > > platform/xdg/MIMETypeRegistryXdg.cpp >+ >+rendering/RenderThemeGtk.cpp >diff --git a/Source/WebCore/SourcesWPE.txt b/Source/WebCore/SourcesWPE.txt >index dbbd995ae49..2f98ffebf02 100644 >--- a/Source/WebCore/SourcesWPE.txt >+++ b/Source/WebCore/SourcesWPE.txt >@@ -58,9 +58,6 @@ page/scrolling/generic/ScrollingThreadGeneric.cpp > > platform/UserAgentQuirks.cpp > >-// This can't go into SourcesGLib.txt because it has to go into WebCorePlatformGTK. >-platform/glib/EventHandlerGLib.cpp >- > platform/graphics/GLContext.cpp > platform/graphics/GraphicsContext3DPrivate.cpp > platform/graphics/PlatformDisplay.cpp >diff --git a/Source/WebCore/platform/FreeType.cmake b/Source/WebCore/platform/FreeType.cmake >index f1d3a162e28..d0c2be27aa9 100644 >--- a/Source/WebCore/platform/FreeType.cmake >+++ b/Source/WebCore/platform/FreeType.cmake >@@ -5,6 +5,7 @@ list(APPEND WebCore_PRIVATE_INCLUDE_DIRECTORIES > ) > > list(APPEND WebCore_SOURCES >+ platform/graphics/freetype/FontCacheFreeType.cpp > platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp > platform/graphics/freetype/FontPlatformDataFreeType.cpp > platform/graphics/freetype/GlyphPageTreeNodeFreeType.cpp >@@ -21,16 +22,6 @@ list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS > platform/graphics/harfbuzz/HbUniquePtr.h > ) > >-if (PORT STREQUAL "GTK") >- list(APPEND WebCorePlatformGTK_SOURCES >- platform/graphics/freetype/FontCacheFreeType.cpp >-) >-else () >- list(APPEND WebCore_SOURCES >- platform/graphics/freetype/FontCacheFreeType.cpp >-) >-endif () >- > if (USE_CAIRO) > list(APPEND WebCore_SOURCES > platform/graphics/cairo/FontCairoHarfbuzzNG.cpp >diff --git a/Source/WebCore/platform/SourcesGLib.txt b/Source/WebCore/platform/SourcesGLib.txt >index 090b84a48c1..756d0702834 100644 >--- a/Source/WebCore/platform/SourcesGLib.txt >+++ b/Source/WebCore/platform/SourcesGLib.txt >@@ -23,6 +23,7 @@ > > platform/audio/glib/AudioBusGLib.cpp > >+platform/glib/EventHandlerGLib.cpp > platform/glib/EventLoopGlib.cpp > platform/glib/FileMonitorGLib.cpp > platform/glib/KeyedDecoderGlib.cpp >diff --git a/Source/WebCore/platform/graphics/Color.h b/Source/WebCore/platform/graphics/Color.h >index d6915c0cc7a..a75e7d104ec 100644 >--- a/Source/WebCore/platform/graphics/Color.h >+++ b/Source/WebCore/platform/graphics/Color.h >@@ -49,11 +49,8 @@ typedef D2D_VECTOR_4F D2D1_VECTOR_4F; > #endif > > #if PLATFORM(GTK) >-typedef struct _GdkColor GdkColor; >-#ifndef GTK_API_VERSION_2 > typedef struct _GdkRGBA GdkRGBA; > #endif >-#endif > > namespace WTF { > class TextStream; >@@ -252,13 +249,9 @@ public: > bool isSemantic() const { return !isExtended() && (m_colorData.rgbaAndFlags & isSemanticRBGAColorBit); } > > #if PLATFORM(GTK) >- Color(const GdkColor&); >- // We can't sensibly go back to GdkColor without losing the alpha value >-#ifndef GTK_API_VERSION_2 > Color(const GdkRGBA&); > operator GdkRGBA() const; > #endif >-#endif > > #if USE(CG) > WEBCORE_EXPORT Color(CGColorRef); >diff --git a/Source/WebCore/platform/graphics/PlatformDisplay.cpp b/Source/WebCore/platform/graphics/PlatformDisplay.cpp >index 6f9a039f334..028be1a8032 100644 >--- a/Source/WebCore/platform/graphics/PlatformDisplay.cpp >+++ b/Source/WebCore/platform/graphics/PlatformDisplay.cpp >@@ -54,7 +54,7 @@ > #include <gdk/gdkx.h> > #endif > >-#if PLATFORM(GTK) && PLATFORM(WAYLAND) && !defined(GTK_API_VERSION_2) >+#if PLATFORM(GTK) && PLATFORM(WAYLAND) > #include <gdk/gdkwayland.h> > #endif > >@@ -74,9 +74,6 @@ namespace WebCore { > std::unique_ptr<PlatformDisplay> PlatformDisplay::createPlatformDisplay() > { > #if PLATFORM(GTK) >-#if defined(GTK_API_VERSION_2) >- return PlatformDisplayX11::create(GDK_DISPLAY_XDISPLAY(gdk_display_get_default())); >-#else > if (gtk_init_check(nullptr, nullptr)) { > GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get()); > #if PLATFORM(X11) >@@ -88,7 +85,6 @@ std::unique_ptr<PlatformDisplay> PlatformDisplay::createPlatformDisplay() > return PlatformDisplayWayland::create(gdk_wayland_display_get_wl_display(display)); > #endif > } >-#endif > #endif // PLATFORM(GTK) > > #if USE(WPE_RENDERER) >diff --git a/Source/WebCore/platform/graphics/gtk/ColorGtk.cpp b/Source/WebCore/platform/graphics/gtk/ColorGtk.cpp >index 4d94a69470d..d6684a72179 100644 >--- a/Source/WebCore/platform/graphics/gtk/ColorGtk.cpp >+++ b/Source/WebCore/platform/graphics/gtk/ColorGtk.cpp >@@ -25,12 +25,6 @@ > > namespace WebCore { > >-Color::Color(const GdkColor& c) >-{ >- setRGB(makeRGB(c.red >> 8, c.green >> 8, c.blue >> 8)); >-} >- >-#ifndef GTK_API_VERSION_2 > Color::Color(const GdkRGBA& c) > { > setRGB(makeRGBA(static_cast<int>(c.red * 255), >@@ -48,7 +42,6 @@ Color::operator GdkRGBA() const > getRGBA(red, green, blue, alpha); > return { red, green, blue, alpha }; > } >-#endif > > } > >diff --git a/Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp b/Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp >index 1052a628f9f..125fe4b536f 100644 >--- a/Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp >+++ b/Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp >@@ -44,19 +44,16 @@ DisplayRefreshMonitorGtk::~DisplayRefreshMonitorGtk() > gtk_widget_destroy(m_window); > } > >-#ifndef GTK_API_VERSION_2 > static void onFrameClockUpdate(GdkFrameClock*, DisplayRefreshMonitorGtk* monitor) > { > monitor->displayLinkFired(); > } >-#endif > > bool DisplayRefreshMonitorGtk::requestRefreshCallback() > { > if (!isActive()) > return false; > >-#ifndef GTK_API_VERSION_2 > if (!m_window) { > // GdkFrameClockIdle is private in GDK, so we need to create a toplevel to get its frame clock. > m_window = gtk_offscreen_window_new(); >@@ -75,9 +72,6 @@ bool DisplayRefreshMonitorGtk::requestRefreshCallback() > LockHolder lock(mutex()); > setIsScheduled(true); > return true; >-#else >- return false; >-#endif > } > > void DisplayRefreshMonitorGtk::displayLinkFired() >diff --git a/Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.h b/Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.h >index 15963758039..9bd1357aa3e 100644 >--- a/Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.h >+++ b/Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.h >@@ -37,12 +37,7 @@ class DisplayRefreshMonitorGtk : public DisplayRefreshMonitor { > public: > static RefPtr<DisplayRefreshMonitorGtk> create(PlatformDisplayID displayID) > { >-#ifndef GTK_API_VERSION_2 > return adoptRef(*new DisplayRefreshMonitorGtk(displayID)); >-#else >- UNUSED_PARAM(displayID); >- return nullptr; >-#endif > } > > virtual ~DisplayRefreshMonitorGtk(); >diff --git a/Source/WebCore/platform/graphics/gtk/GdkCairoUtilities.cpp b/Source/WebCore/platform/graphics/gtk/GdkCairoUtilities.cpp >index ef5089ecbb6..d2b40caadd3 100644 >--- a/Source/WebCore/platform/graphics/gtk/GdkCairoUtilities.cpp >+++ b/Source/WebCore/platform/graphics/gtk/GdkCairoUtilities.cpp >@@ -27,7 +27,6 @@ > #include "CairoUtilities.h" > > #include "GdkCairoUtilities.h" >-#include "GtkVersioning.h" > #include "IntSize.h" > #include <cairo.h> > #include <gtk/gtk.h> >diff --git a/Source/WebCore/platform/gtk/GRefPtrGtk.cpp b/Source/WebCore/platform/gtk/GRefPtrGtk.cpp >index fed7a8f0091..b768c8fde68 100644 >--- a/Source/WebCore/platform/gtk/GRefPtrGtk.cpp >+++ b/Source/WebCore/platform/gtk/GRefPtrGtk.cpp >@@ -59,22 +59,6 @@ template <> void derefGPtr(SecretValue* ptr) > } > #endif > >-#ifdef GTK_API_VERSION_2 >-template <> GdkCursor* refGPtr(GdkCursor* ptr) >-{ >- if (ptr) >- gdk_cursor_ref(ptr); >- return ptr; >-} >- >-template <> void derefGPtr(GdkCursor* ptr) >-{ >- if (ptr) >- gdk_cursor_unref(ptr); >-} >- >-#else >- > template <> GtkWidgetPath* refGPtr(GtkWidgetPath* ptr) > { > if (ptr) >@@ -88,6 +72,4 @@ template <> void derefGPtr(GtkWidgetPath* ptr) > gtk_widget_path_unref(ptr); > } > >-#endif >- > } >diff --git a/Source/WebCore/platform/gtk/GRefPtrGtk.h b/Source/WebCore/platform/gtk/GRefPtrGtk.h >index ba1d6d1207b..d26b055da83 100644 >--- a/Source/WebCore/platform/gtk/GRefPtrGtk.h >+++ b/Source/WebCore/platform/gtk/GRefPtrGtk.h >@@ -18,8 +18,7 @@ > * Boston, MA 02110-1301, USA. > */ > >-#ifndef GRefPtrGtk_h >-#define GRefPtrGtk_h >+#pragma once > > #include <wtf/glib/GRefPtr.h> > >@@ -36,14 +35,8 @@ template <> SecretValue* refGPtr(SecretValue* ptr); > template <> void derefGPtr(SecretValue* ptr); > #endif > >-#ifdef GTK_API_VERSION_2 >-template <> GdkCursor* refGPtr(GdkCursor* ptr); >-template <> void derefGPtr(GdkCursor* ptr); >-#else > template <> GtkWidgetPath* refGPtr(GtkWidgetPath* ptr); > template <> void derefGPtr(GtkWidgetPath* ptr); >-#endif > > } > >-#endif >diff --git a/Source/WebCore/platform/gtk/GtkVersioning.c b/Source/WebCore/platform/gtk/GtkVersioning.c >deleted file mode 100644 >index 01e586319f1..00000000000 >--- a/Source/WebCore/platform/gtk/GtkVersioning.c >+++ /dev/null >@@ -1,287 +0,0 @@ >-/* >- * Copyright (C) 2010 Collabora Ltd. >- * Copyright (C) 2010 Igalia, S.L. >- * >- * This library is free software; you can redistribute it and/or >- * modify it under the terms of the GNU Library General Public >- * License as published by the Free Software Foundation; either >- * version 2 of the License, or (at your option) any later version. >- * >- * This library is distributed in the hope that it will be useful, >- * but WITHOUT ANY WARRANTY; without even the implied warranty of >- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >- * Library General Public License for more details. >- * >- * You should have received a copy of the GNU Library General Public License >- * along with this library; see the file COPYING.LIB. If not, write to >- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >- * Boston, MA 02110-1301, USA. >- */ >- >-#include "config.h" >-#include "GtkVersioning.h" >- >-#include <gtk/gtk.h> >- >-#if PLATFORM(X11) && defined(GDK_WINDOWING_X11) >-#include <X11/Xatom.h> >-#include <gdk/gdkx.h> >-#endif >- >-GdkDevice *getDefaultGDKPointerDevice(GdkWindow* window) >-{ >-#if GTK_CHECK_VERSION(3, 20, 0) >- return gdk_seat_get_pointer(gdk_display_get_default_seat(gdk_window_get_display(window))); >-#elif !defined(GTK_API_VERSION_2) >- GdkDeviceManager *manager = gdk_display_get_device_manager(gdk_window_get_display(window)); >- return gdk_device_manager_get_client_pointer(manager); >-#else >- UNUSED_PARAM(window); >- return gdk_device_get_core_pointer(); >-#endif // GTK_API_VERSION_2 >-} >- >-#ifdef GTK_API_VERSION_2 >-static cairo_format_t >-gdk_cairo_format_for_content(cairo_content_t content) >-{ >- switch (content) { >- case CAIRO_CONTENT_COLOR: >- return CAIRO_FORMAT_RGB24; >- case CAIRO_CONTENT_ALPHA: >- return CAIRO_FORMAT_A8; >- case CAIRO_CONTENT_COLOR_ALPHA: >- default: >- return CAIRO_FORMAT_ARGB32; >- } >-} >- >-static cairo_surface_t* >-gdk_cairo_surface_coerce_to_image(cairo_surface_t* surface, >- cairo_content_t content, >- int width, >- int height) >-{ >- cairo_surface_t * copy; >- cairo_t * cr; >- >- if (cairo_surface_get_type(surface) == CAIRO_SURFACE_TYPE_IMAGE >- && cairo_surface_get_content(surface) == content >- && cairo_image_surface_get_width(surface) >= width >- && cairo_image_surface_get_height(surface) >= height) >- return cairo_surface_reference(surface); >- >- copy = cairo_image_surface_create(gdk_cairo_format_for_content(content), >- width, >- height); >- >- cr = cairo_create(copy); >- cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE); >- cairo_set_source_surface(cr, surface, 0, 0); >- cairo_paint(cr); >- cairo_destroy(cr); >- >- return copy; >-} >- >-static void >-convert_alpha(guchar * destData, int destStride, >- guchar * srcData, int srcStride, >- int srcX, int srcY, int width, int height) >-{ >- UNUSED_PARAM(srcX); >- >- int x, y; >- >- srcData += srcStride * srcY + srcY * 4; >- >- for (y = 0; y < height; y++) { >- guint32 * src = (guint32 *) srcData; >- >- for (x = 0; x < width; x++) { >- guint alpha = src[x] >> 24; >- >- if (!alpha) { >- destData[x * 4 + 0] = 0; >- destData[x * 4 + 1] = 0; >- destData[x * 4 + 2] = 0; >- } else { >- destData[x * 4 + 0] = (((src[x] & 0xff0000) >> 16) * 255 + alpha / 2) / alpha; >- destData[x * 4 + 1] = (((src[x] & 0x00ff00) >> 8) * 255 + alpha / 2) / alpha; >- destData[x * 4 + 2] = (((src[x] & 0x0000ff) >> 0) * 255 + alpha / 2) / alpha; >- } >- destData[x * 4 + 3] = alpha; >- } >- >- srcData += srcStride; >- destData += destStride; >- } >-} >- >-static void >-convert_no_alpha(guchar * destData, int destStride, guchar * srcData, >- int srcStride, int srcX, int srcY, >- int width, int height) >-{ >- int x, y; >- >- srcData += srcStride * srcY + srcX * 4; >- >- for (y = 0; y < height; y++) { >- guint32 * src = (guint32 *) srcData; >- >- for (x = 0; x < width; x++) { >- destData[x * 3 + 0] = src[x] >> 16; >- destData[x * 3 + 1] = src[x] >> 8; >- destData[x * 3 + 2] = src[x]; >- } >- >- srcData += srcStride; >- destData += destStride; >- } >-} >- >-/** >- * gdk_pixbuf_get_from_surface: >- * @surface: surface to copy from >- * @src_x: Source X coordinate within @surface >- * @src_y: Source Y coordinate within @surface >- * @width: Width in pixels of region to get >- * @height: Height in pixels of region to get >- * >- * Transfers image data from a #cairo_surface_t and converts it to an RGB(A) >- * representation inside a #GdkPixbuf. This allows you to efficiently read >- * individual pixels from cairo surfaces. For #GdkWindows, use >- * gdk_pixbuf_get_from_window() instead. >- * >- * This function will create an RGB pixbuf with 8 bits per channel. The pixbuf >- * will contain an alpha channel if the @surface contains one. >- * >- * Return value: (transfer full): A newly-created pixbuf with a reference count >- * of 1, or %NULL on error >- **/ >-GdkPixbuf* >-gdk_pixbuf_get_from_surface(cairo_surface_t * surface, >- int srcX, int srcY, >- int width, int height) >-{ >- cairo_content_t content; >- GdkPixbuf * dest; >- >- /* General sanity checks */ >- g_return_val_if_fail(surface, NULL); >- g_return_val_if_fail(srcX >= 0 && srcY >= 0, NULL); >- g_return_val_if_fail(width > 0 && height > 0, NULL); >- >- content = cairo_surface_get_content(surface) | CAIRO_CONTENT_COLOR; >- dest = gdk_pixbuf_new(GDK_COLORSPACE_RGB, >- !!(content & CAIRO_CONTENT_ALPHA), >- 8, >- width, height); >- >- surface = gdk_cairo_surface_coerce_to_image(surface, content, srcX + width, srcY + height); >- cairo_surface_flush(surface); >- if (cairo_surface_status(surface) || !dest) { >- cairo_surface_destroy(surface); >- return NULL; >- } >- >- if (gdk_pixbuf_get_has_alpha(dest)) >- convert_alpha(gdk_pixbuf_get_pixels(dest), >- gdk_pixbuf_get_rowstride(dest), >- cairo_image_surface_get_data(surface), >- cairo_image_surface_get_stride(surface), >- srcX, srcY, >- width, height); >- else >- convert_no_alpha(gdk_pixbuf_get_pixels(dest), >- gdk_pixbuf_get_rowstride(dest), >- cairo_image_surface_get_data(surface), >- cairo_image_surface_get_stride(surface), >- srcX, srcY, >- width, height); >- >- cairo_surface_destroy(surface); >- return dest; >-} >- >-#if PLATFORM(X11) && defined(GDK_WINDOWING_X11) >-static int getScreenCurrentDesktop(GdkScreen *screen) >-{ >- Display *display = GDK_DISPLAY_XDISPLAY(gdk_screen_get_display(screen)); >- Window rootWindow = XRootWindow(display, GDK_SCREEN_XNUMBER(screen)); >- Atom currentDesktop = XInternAtom(display, "_NET_CURRENT_DESKTOP", True); >- >- Atom type; >- int format; >- unsigned long itemsCount, bytesAfter; >- unsigned char *returnedData = NULL; >- XGetWindowProperty(display, rootWindow, currentDesktop, 0, G_MAXLONG, False, XA_CARDINAL, >- &type, &format, &itemsCount, &bytesAfter, &returnedData); >- >- int workspace = 0; >- if (type == XA_CARDINAL && format == 32 && itemsCount > 0) >- workspace = (int)returnedData[0]; >- >- if (returnedData) >- XFree(returnedData); >- >- return workspace; >-} >- >-static void getScreenWorkArea(GdkScreen *screen, GdkRectangle *area) >-{ >- Display *display = GDK_DISPLAY_XDISPLAY(gdk_screen_get_display(screen)); >- Atom workArea = XInternAtom(display, "_NET_WORKAREA", True); >- >- /* Defaults in case of error. */ >-#if GTK_CHECK_VERSION(3, 22, 0) >- GdkRectangle geom; >- GdkMonitor *monitor = gdk_display_get_primary_monitor(display); >- gdk_monitor_get_geometry(monitor, &geom); >- area->x = geom.x; >- area->y = geom.y; >- area->width = geom.width; >- area->height = geom.height; >-#else >- area->x = 0; >- area->y = 0; >- area->width = gdk_screen_get_width(screen); >- area->height = gdk_screen_get_height(screen); >-#endif >- >- if (workArea == None) >- return; >- >- Window rootWindow = XRootWindow(display, GDK_SCREEN_XNUMBER(screen)); >- Atom type; >- int format; >- unsigned long itemsCount, bytesAfter; >- unsigned char *returnedData = 0; >- int result = XGetWindowProperty(display, rootWindow, workArea, 0, 4 * 32 /* Max length */, False, AnyPropertyType, >- &type, &format, &itemsCount, &bytesAfter, &returnedData); >- if (result != Success || type == None || !format || bytesAfter || itemsCount % 4) >- return; >- >- int desktop = getScreenCurrentDesktop(screen); >- long *workAreas = (long *)returnedData; >- area->x = workAreas[desktop * 4]; >- area->y = workAreas[desktop * 4 + 1]; >- area->width = workAreas[desktop * 4 + 2]; >- area->height = workAreas[desktop * 4 + 3]; >- >- XFree(returnedData); >-} >-#endif // PLATFORM(X11) && defined(GDK_WINDOWING_X11) >- >-void gdk_screen_get_monitor_workarea(GdkScreen *screen, int monitor, GdkRectangle *area) >-{ >- gdk_screen_get_monitor_geometry(screen, monitor, area); >- >-#if PLATFORM(X11) && defined(GDK_WINDOWING_X11) >- GdkRectangle workArea; >- getScreenWorkArea(screen, &workArea); >- gdk_rectangle_intersect(&workArea, area, area); >-#endif >-} >-#endif // GTK_API_VERSION_2 >diff --git a/Source/WebCore/platform/gtk/GtkVersioning.h b/Source/WebCore/platform/gtk/GtkVersioning.h >deleted file mode 100644 >index f114a9105e0..00000000000 >--- a/Source/WebCore/platform/gtk/GtkVersioning.h >+++ /dev/null >@@ -1,57 +0,0 @@ >-/* >- * Copyright (C) 2010 Collabora Ltd. >- * Copyright (C) 2010 Igalia, S.L. >- * >- * This library is free software; you can redistribute it and/or >- * modify it under the terms of the GNU Library General Public >- * License as published by the Free Software Foundation; either >- * version 2 of the License, or (at your option) any later version. >- * >- * This library is distributed in the hope that it will be useful, >- * but WITHOUT ANY WARRANTY; without even the implied warranty of >- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >- * Library General Public License for more details. >- * >- * You should have received a copy of the GNU Library General Public License >- * along with this library; see the file COPYING.LIB. If not, write to >- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, >- * Boston, MA 02110-1301, USA. >- */ >- >-#ifndef GtkVersioning_h >-#define GtkVersioning_h >- >-#include <gtk/gtk.h> >- >-#ifndef GTK_API_VERSION_2 >-#include <gdk/gdkkeysyms-compat.h> >-#endif >- >-G_BEGIN_DECLS >- >-// Macros to avoid deprecation checking churn >-#ifndef GTK_API_VERSION_2 >-#define GDK_WINDOW_XWINDOW(window) (gdk_x11_window_get_xid(window)) >-#else >-GdkPixbuf* gdk_pixbuf_get_from_surface(cairo_surface_t* surface, int srcX, int srcY, >- int width, int height); >-void gdk_screen_get_monitor_workarea(GdkScreen *, int monitor, GdkRectangle *area); >-// Define GDK_IS_X11_DISPLAY dummy for GTK+ 2.0 compatibility. >-#ifdef GDK_WINDOWING_X11 >-#define GDK_IS_X11_DISPLAY(display) 1 >-#else >-#define GDK_IS_X11_DISPLAY(display) 0 >-#endif >-#endif >- >-GdkDevice* getDefaultGDKPointerDevice(GdkWindow* window); >- >-// gtk_widget_get_preferred_size() appeared only in GTK 3.0. >-#if !GTK_CHECK_VERSION (2, 91, 0) // gtk_widget_get_preferred_size appeared about then. >-#define gtk_widget_get_preferred_size(widget, minimumSize, naturalSize) \ >- (gtk_widget_size_request((widget), ((minimumSize)))) >-#endif >- >-G_END_DECLS >- >-#endif // GtkVersioning_h >diff --git a/Source/WebCore/platform/gtk/PasteboardHelper.cpp b/Source/WebCore/platform/gtk/PasteboardHelper.cpp >index c15ad061cb1..490371ad89e 100644 >--- a/Source/WebCore/platform/gtk/PasteboardHelper.cpp >+++ b/Source/WebCore/platform/gtk/PasteboardHelper.cpp >@@ -24,7 +24,6 @@ > #include "PasteboardHelper.h" > > #include "BitmapImage.h" >-#include "GtkVersioning.h" > #include "SelectionData.h" > #include <gtk/gtk.h> > #include <wtf/SetForScope.h> >@@ -119,7 +118,6 @@ void PasteboardHelper::getClipboardContents(GtkClipboard* clipboard, SelectionDa > } > } > >-#ifndef GTK_API_VERSION_2 > if (gtk_clipboard_wait_is_image_available(clipboard)) { > if (GRefPtr<GdkPixbuf> pixbuf = adoptGRef(gtk_clipboard_wait_for_image(clipboard))) { > RefPtr<cairo_surface_t> surface = adoptRef(gdk_cairo_surface_create_from_pixbuf(pixbuf.get(), 1, nullptr)); >@@ -127,7 +125,6 @@ void PasteboardHelper::getClipboardContents(GtkClipboard* clipboard, SelectionDa > selection.setImage(image.ptr()); > } > } >-#endif > > selection.setCanSmartReplace(gtk_clipboard_wait_is_target_available(clipboard, smartPasteAtom)); > } >diff --git a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp >index 81a74726adc..fb937668050 100644 >--- a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp >+++ b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp >@@ -31,7 +31,6 @@ > #include "PlatformKeyboardEvent.h" > > #include "GtkUtilities.h" >-#include "GtkVersioning.h" > #include "NotImplemented.h" > #include "TextEncoding.h" > #include "WindowsKeyboardCodes.h" >@@ -1334,14 +1333,11 @@ static PlatformEvent::Type eventTypeForGdkKeyEvent(GdkEventKey* event) > static OptionSet<PlatformEvent::Modifier> modifiersForGdkKeyEvent(GdkEventKey* event) > { > GdkModifierType state; >- guint keyval; >- OptionSet<PlatformEvent::Modifier> modifiers; > gdk_event_get_state(reinterpret_cast<GdkEvent*>(event), &state); >-#ifndef GTK_API_VERSION_2 >+ guint keyval; > gdk_event_get_keyval(reinterpret_cast<GdkEvent*>(event), &keyval); >-#else >- keyval = event->keyval; >-#endif >+ >+ OptionSet<PlatformEvent::Modifier> modifiers; > if (state & GDK_SHIFT_MASK || keyval == GDK_KEY_3270_BackTab) > modifiers.add(PlatformEvent::Modifier::ShiftKey); > if (state & GDK_CONTROL_MASK) >@@ -1365,14 +1361,9 @@ PlatformKeyboardEvent::PlatformKeyboardEvent(GdkEventKey* event, const Compositi > , m_compositionResults(compositionResults) > { > guint keyval; >- guint16 keycode; >-#ifndef GTK_API_VERSION_2 > gdk_event_get_keyval(reinterpret_cast<GdkEvent*>(event), &keyval); >+ guint16 keycode; > gdk_event_get_keycode(reinterpret_cast<GdkEvent*>(event), &keycode); >-#else >- keyval = event->keyval; >- keycode = event->hardware_keycode; >-#endif > > m_text = compositionResults.simpleString.length() ? compositionResults.simpleString : singleCharacterString(keyval); > m_unmodifiedText = m_text; >diff --git a/Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp b/Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp >index 8ee2be4f355..de1a8dc23e1 100644 >--- a/Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp >+++ b/Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp >@@ -39,18 +39,14 @@ namespace WebCore { > // Keep this in sync with the other platform event constructors > PlatformMouseEvent::PlatformMouseEvent(GdkEventButton* event) > { >- gdouble x, y, rootX, rootY; >- GdkModifierType state; >- guint button; >- >+ gdouble x, y; > gdk_event_get_coords(reinterpret_cast<GdkEvent*>(event), &x, &y); >+ gdouble rootX, rootY; > gdk_event_get_root_coords(reinterpret_cast<GdkEvent*>(event), &rootX, &rootY); >+ GdkModifierType state; > gdk_event_get_state(reinterpret_cast<GdkEvent*>(event), &state); >-#ifndef GTK_API_VERSION_2 >+ guint button; > gdk_event_get_button(reinterpret_cast<GdkEvent*>(event), &button); >-#else >- button = event->button; >-#endif > > m_timestamp = wallTimeForEvent(event); > m_position = IntPoint(static_cast<int>(x), static_cast<int>(y)); >diff --git a/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp b/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp >index 731ca7de69b..bd47b739667 100644 >--- a/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp >+++ b/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp >@@ -33,7 +33,6 @@ > > #include "FloatRect.h" > #include "FrameView.h" >-#include "GtkVersioning.h" > #include "HostWindow.h" > #include "NotImplemented.h" > #include "Widget.h" >@@ -220,17 +219,6 @@ bool screenSupportsExtendedColor(Widget*) > } > > #if ENABLE(TOUCH_EVENTS) >-#ifdef GTK_API_VERSION_2 >-bool screenHasTouchDevice() >-{ >- return false; >-} >- >-bool screenIsTouchPrimaryInputDevice() >-{ >- return false; >-} >-#else // GTK_API_VERSION_2 > #if !GTK_CHECK_VERSION(3, 20, 0) > static void deviceAddedCallback(GdkDeviceManager*, GdkDevice*); > static void deviceRemovedCallback(GdkDeviceManager*, GdkDevice*); >@@ -324,7 +312,6 @@ bool screenIsTouchPrimaryInputDevice() > > return device ? gdk_device_get_source(device) == GDK_SOURCE_TOUCHSCREEN : true; > } >-#endif // !GTK_API_VERSION_2 > #endif // ENABLE(TOUCH_EVENTS) > > } // namespace WebCore >diff --git a/Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp b/Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp >index 84b5b4eadad..93efbc65147 100644 >--- a/Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp >+++ b/Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp >@@ -62,7 +62,6 @@ PlatformWheelEvent::PlatformWheelEvent(GdkEventScroll* event) > m_deltaX = 0; > m_deltaY = 0; > GdkScrollDirection direction; >-#ifndef GTK_API_VERSION_2 > if (!gdk_event_get_scroll_direction(reinterpret_cast<GdkEvent*>(event), &direction)) { > gdouble deltaX, deltaY; > if (gdk_event_get_scroll_deltas(reinterpret_cast<GdkEvent*>(event), &deltaX, &deltaY)) { >@@ -70,9 +69,6 @@ PlatformWheelEvent::PlatformWheelEvent(GdkEventScroll* event) > m_deltaY = -deltaY; > } > } >-#else >- direction = event->direction; >-#endif > > // Docs say an upwards scroll (away from the user) has a positive delta > if (!m_deltaX && !m_deltaY) { >@@ -97,7 +93,6 @@ PlatformWheelEvent::PlatformWheelEvent(GdkEventScroll* event) > m_wheelTicksY = m_deltaY; > > #if ENABLE(ASYNC_SCROLLING) >-#ifndef GTK_API_VERSION_2 > #if GTK_CHECK_VERSION(3, 20, 0) > m_phase = gdk_event_is_scroll_stop_event(reinterpret_cast<GdkEvent*>(event)) ? > PlatformWheelEventPhaseEnded : >@@ -107,9 +102,6 @@ PlatformWheelEvent::PlatformWheelEvent(GdkEventScroll* event) > PlatformWheelEventPhaseEnded : > PlatformWheelEventPhaseChanged; > #endif >-#else >- m_phase = PlatformWheelEventPhaseChanged; >-#endif // GTK_API_VERSION_2 > #endif // ENABLE(ASYNC_SCROLLING) > > gdouble x, y, rootX, rootY; >diff --git a/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp b/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp >index 209af7b55db..3e6af49c1b6 100644 >--- a/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp >+++ b/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp >@@ -46,7 +46,6 @@ ScrollbarTheme& ScrollbarTheme::nativeTheme() > > ScrollbarThemeGtk::~ScrollbarThemeGtk() = default; > >-#ifndef GTK_API_VERSION_2 > static void themeChangedCallback() > { > ScrollbarTheme::theme().themeChanged(); >@@ -836,32 +835,4 @@ int ScrollbarThemeGtk::minimumThumbLength(Scrollbar& scrollbar) > return minThumbLength; > } > #endif >- >-#else // GTK_API_VERSION_2 >-bool ScrollbarThemeGtk::hasThumb(Scrollbar&) >-{ >- return false; >-} >- >-IntRect ScrollbarThemeGtk::backButtonRect(Scrollbar&, ScrollbarPart, bool) >-{ >- return IntRect(); >-} >- >-IntRect ScrollbarThemeGtk::forwardButtonRect(Scrollbar&, ScrollbarPart, bool) >-{ >- return IntRect(); >-} >- >-IntRect ScrollbarThemeGtk::trackRect(Scrollbar&, bool) >-{ >- return IntRect(); >-} >- >-bool ScrollbarThemeGtk::hasButtons(Scrollbar&) >-{ >- return false; >-} >-#endif // GTK_API_VERSION_2 >- > } >diff --git a/Source/WebCore/platform/gtk/ScrollbarThemeGtk.h b/Source/WebCore/platform/gtk/ScrollbarThemeGtk.h >index 808ae091dea..31ab63fe653 100644 >--- a/Source/WebCore/platform/gtk/ScrollbarThemeGtk.h >+++ b/Source/WebCore/platform/gtk/ScrollbarThemeGtk.h >@@ -23,8 +23,7 @@ > * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. > */ > >-#ifndef ScrollbarThemeGtk_h >-#define ScrollbarThemeGtk_h >+#pragma once > > #include "ScrollbarThemeComposite.h" > >@@ -42,7 +41,6 @@ public: > IntRect forwardButtonRect(Scrollbar&, ScrollbarPart, bool) override; > IntRect trackRect(Scrollbar&, bool) override; > >-#ifndef GTK_API_VERSION_2 > ScrollbarThemeGtk(); > > bool paint(Scrollbar&, GraphicsContext&, const IntRect& damageRect) override; >@@ -66,9 +64,7 @@ private: > bool m_hasBackButtonStartPart : 1; > bool m_hasBackButtonEndPart : 1; > bool m_usesOverlayScrollbars { false }; >-#endif // GTK_API_VERSION_2 > }; > > } > >-#endif >diff --git a/Source/WebCore/platform/gtk/WidgetGtk.cpp b/Source/WebCore/platform/gtk/WidgetGtk.cpp >index e49e3ea9386..73616fb6277 100644 >--- a/Source/WebCore/platform/gtk/WidgetGtk.cpp >+++ b/Source/WebCore/platform/gtk/WidgetGtk.cpp >@@ -31,7 +31,6 @@ > #include "Cursor.h" > #include "FrameView.h" > #include "GraphicsContext.h" >-#include "GtkVersioning.h" > #include "HostWindow.h" > #include "IntRect.h" > >diff --git a/Source/WebCore/rendering/RenderThemeGtk.cpp b/Source/WebCore/rendering/RenderThemeGtk.cpp >index 9286cf6b5b6..f444c5a1ad9 100644 >--- a/Source/WebCore/rendering/RenderThemeGtk.cpp >+++ b/Source/WebCore/rendering/RenderThemeGtk.cpp >@@ -33,7 +33,6 @@ > #include "GUniquePtrGtk.h" > #include "Gradient.h" > #include "GraphicsContext.h" >-#include "GtkVersioning.h" > #include "HTMLInputElement.h" > #include "HTMLMediaElement.h" > #include "LocalizedStrings.h" >@@ -125,8 +124,6 @@ int RenderThemeGtk::sliderTickOffsetFromTrackCenter() const > } > #endif > >-#ifndef GTK_API_VERSION_2 >- > static void themeChangedCallback() > { > Page::updateStyleForAllPagesAfterGlobalChangeInEnvironment(); >@@ -2061,6 +2058,4 @@ String RenderThemeGtk::mediaControlsScript() > return scriptBuilder.toString(); > } > #endif // ENABLE(VIDEO) >- >-#endif // GTK_API_VERSION_2 > } >diff --git a/Source/WebCore/rendering/RenderThemeGtk.h b/Source/WebCore/rendering/RenderThemeGtk.h >index 967b8f79248..e1476d22263 100644 >--- a/Source/WebCore/rendering/RenderThemeGtk.h >+++ b/Source/WebCore/rendering/RenderThemeGtk.h >@@ -48,8 +48,6 @@ private: > void updateCachedSystemFontDescription(CSSValueID, FontCascadeDescription&) const override; > > public: >-#ifndef GTK_API_VERSION_2 >- > // A method asking if the theme's controls actually care about redrawing when hovered. > bool supportsHover(const RenderStyle&) const override { return true; } > >@@ -189,7 +187,6 @@ private: > #endif > > static IntRect calculateProgressRect(const RenderObject&, const IntRect&); >-#endif // GTK_API_VERSION_2 > }; > > } // namespace WebCore >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 59b8c976aeb..4f45d433c08 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,38 @@ >+2019-06-20 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] Remove support for GTK2 plugins >+ https://bugs.webkit.org/show_bug.cgi?id=199065 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * PlatformGTK.cmake: >+ * Shared/Plugins/Netscape/NetscapePluginModule.cpp: >+ (WebKit::moduleMixesGtkSymbols): >+ * Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp: >+ (WebKit::NetscapePluginModule::getPluginInfo): >+ * Shared/Plugins/PluginModuleInfo.h: >+ * Shared/gtk/WebEventFactory.cpp: >+ (WebKit::isGdkKeyCodeFromKeyPad): >+ (WebKit::buttonForEvent): >+ (WebKit::WebEventFactory::createWebMouseEvent): >+ (WebKit::WebEventFactory::createWebWheelEvent): >+ (WebKit::WebEventFactory::createWebKeyboardEvent): >+ (WebKit::WebEventFactory::createWebTouchEvent): >+ * SourcesGTK.txt: >+ * UIProcess/API/gtk/WebKitWebViewBase.cpp: >+ * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp: >+ (WebKit::ProcessLauncher::launchProcess): >+ * UIProcess/Plugins/PluginProcessProxy.h: >+ * UIProcess/Plugins/gtk/PluginInfoCache.cpp: >+ (WebKit::PluginInfoCache::getPluginInfo): >+ (WebKit::PluginInfoCache::updatePluginInfo): >+ * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: >+ (WebKit::PluginInfoStore::getPluginInfo): >+ * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: >+ (WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes): >+ (WebKit::PluginProcessProxy::scanPlugin): >+ * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: >+ > 2019-06-19 Dean Jackson <dino@apple.com> > > No menu pop-up when long pressing on a link in Firefox app >diff --git a/Source/WebKit/PlatformGTK.cmake b/Source/WebKit/PlatformGTK.cmake >index b18db404895..633d9051ebb 100644 >--- a/Source/WebKit/PlatformGTK.cmake >+++ b/Source/WebKit/PlatformGTK.cmake >@@ -422,8 +422,11 @@ list(APPEND WebKit_INCLUDE_DIRECTORIES > list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES > ${CAIRO_INCLUDE_DIRS} > ${ENCHANT_INCLUDE_DIRS} >+ ${GLIB_INCLUDE_DIRS} > ${GSTREAMER_INCLUDE_DIRS} > ${GSTREAMER_PBUTILS_INCLUDE_DIRS} >+ ${GTK_INCLUDE_DIRS} >+ ${GTK_UNIX_PRINT_INCLUDE_DIRS} > ${HARFBUZZ_INCLUDE_DIRS} > ${LIBSOUP_INCLUDE_DIRS} > ) >@@ -447,12 +450,6 @@ endif () > set(WebKitCommonIncludeDirectories ${WebKit_INCLUDE_DIRECTORIES}) > set(WebKitCommonSystemIncludeDirectories ${WebKit_SYSTEM_INCLUDE_DIRECTORIES}) > >-list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES >- ${GLIB_INCLUDE_DIRS} >- ${GTK_INCLUDE_DIRS} >- ${GTK_UNIX_PRINT_INCLUDE_DIRS} >-) >- > list(APPEND WebProcess_SOURCES > WebProcess/EntryPoint/unix/WebProcessMain.cpp > ) >@@ -466,14 +463,9 @@ set(SharedWebKitLibraries > ) > > list(APPEND WebKit_LIBRARIES >- PRIVATE >- WebCorePlatformGTK >- ${GTK_UNIX_PRINT_LIBRARIES} >+ ${GTK_UNIX_PRINT_LIBRARIES} > ) > >-# WebCore should be specifed before and after WebCorePlatformGTK >-list(APPEND WebKit_LIBRARIES PRIVATE WebCore) >- > if (USE_WPE_RENDERER) > list(APPEND WebKit_LIBRARIES > ${WPE_LIBRARIES} >@@ -570,144 +562,6 @@ if (ENABLE_WAYLAND_TARGET) > ) > endif () > >-if (ENABLE_PLUGIN_PROCESS_GTK2) >- set(PluginProcessGTK2_EXECUTABLE_NAME WebKitPluginProcess2) >- >- # FIXME: We should remove WebKitPluginProcess2 in 2020, once Flash is no longer supported. >- list(APPEND PluginProcessGTK2_SOURCES >- Platform/Logging.cpp >- Platform/Module.cpp >- >- Platform/IPC/ArgumentCoders.cpp >- Platform/IPC/Attachment.cpp >- Platform/IPC/Connection.cpp >- Platform/IPC/DataReference.cpp >- Platform/IPC/Decoder.cpp >- Platform/IPC/Encoder.cpp >- Platform/IPC/MessageReceiverMap.cpp >- Platform/IPC/MessageSender.cpp >- Platform/IPC/StringReference.cpp >- >- Platform/IPC/glib/GSocketMonitor.cpp >- Platform/IPC/unix/AttachmentUnix.cpp >- Platform/IPC/unix/ConnectionUnix.cpp >- >- Platform/glib/ModuleGlib.cpp >- >- Platform/unix/LoggingUnix.cpp >- Platform/unix/SharedMemoryUnix.cpp >- >- PluginProcess/PluginControllerProxy.cpp >- PluginProcess/PluginCreationParameters.cpp >- PluginProcess/PluginProcess.cpp >- PluginProcess/WebProcessConnection.cpp >- >- PluginProcess/EntryPoint/unix/PluginProcessMain.cpp >- >- PluginProcess/unix/PluginControllerProxyUnix.cpp >- PluginProcess/unix/PluginProcessMainUnix.cpp >- PluginProcess/unix/PluginProcessUnix.cpp >- >- Shared/ActivityAssertion.cpp >- Shared/AuxiliaryProcess.cpp >- Shared/BlobDataFileReferenceWithSandboxExtension.cpp >- Shared/ShareableBitmap.cpp >- Shared/WebCoreArgumentCoders.cpp >- Shared/WebEvent.cpp >- Shared/WebKeyboardEvent.cpp >- Shared/WebKit2Initialize.cpp >- Shared/WebMouseEvent.cpp >- Shared/WebPlatformTouchPoint.cpp >- Shared/WebTouchEvent.cpp >- Shared/WebWheelEvent.cpp >- >- Shared/Plugins/NPIdentifierData.cpp >- Shared/Plugins/NPObjectMessageReceiver.cpp >- Shared/Plugins/NPObjectProxy.cpp >- Shared/Plugins/NPRemoteObjectMap.cpp >- Shared/Plugins/NPVariantData.cpp >- Shared/Plugins/PluginProcessCreationParameters.cpp >- >- Shared/Plugins/Netscape/NetscapePluginModule.cpp >- Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp >- >- Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp >- >- Shared/cairo/ShareableBitmapCairo.cpp >- >- Shared/glib/ProcessExecutablePathGLib.cpp >- >- Shared/gtk/NativeWebKeyboardEventGtk.cpp >- Shared/gtk/NativeWebMouseEventGtk.cpp >- Shared/gtk/NativeWebTouchEventGtk.cpp >- Shared/gtk/NativeWebWheelEventGtk.cpp >- Shared/gtk/WebEventFactory.cpp >- >- Shared/soup/WebCoreArgumentCodersSoup.cpp >- >- Shared/unix/AuxiliaryProcessMain.cpp >- >- UIProcess/Launcher/ProcessLauncher.cpp >- >- UIProcess/Launcher/glib/BubblewrapLauncher.cpp >- UIProcess/Launcher/glib/FlatpakLauncher.cpp >- UIProcess/Launcher/glib/ProcessLauncherGLib.cpp >- >- UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp >- >- WebProcess/Plugins/Plugin.cpp >- >- WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp >- WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp >- WebProcess/Plugins/Netscape/NetscapePlugin.cpp >- WebProcess/Plugins/Netscape/NetscapePluginNone.cpp >- WebProcess/Plugins/Netscape/NetscapePluginStream.cpp >- >- WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp >- WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp >- >- ${WebKit_DERIVED_SOURCES_DIR}/AuxiliaryProcessMessageReceiver.cpp >- ${WebKit_DERIVED_SOURCES_DIR}/PluginControllerProxyMessageReceiver.cpp >- ${WebKit_DERIVED_SOURCES_DIR}/PluginProcessMessageReceiver.cpp >- ${WebKit_DERIVED_SOURCES_DIR}/NPObjectMessageReceiverMessageReceiver.cpp >- ${WebKit_DERIVED_SOURCES_DIR}/WebProcessConnectionMessageReceiver.cpp >- ) >- >- add_executable(WebKitPluginProcess2 ${PluginProcessGTK2_SOURCES}) >- ADD_WEBKIT_PREFIX_HEADER(WebKitPluginProcess2) >- >- # We need ENABLE_PLUGIN_PROCESS for all targets in this directory, but >- # we only want GTK_API_VERSION_2 for the plugin process target. >- set_property( >- TARGET WebKitPluginProcess2 >- APPEND >- PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1 >- ) >- target_include_directories(WebKitPluginProcess2 PRIVATE >- ${WebKitCommonIncludeDirectories} >- ) >- target_include_directories(WebKitPluginProcess2 SYSTEM PRIVATE >- ${WebKitCommonSystemIncludeDirectories} >- ${GTK2_INCLUDE_DIRS} >- ${GDK2_INCLUDE_DIRS} >- ) >- >- set(WebKitPluginProcess2_LIBRARIES >- ${SharedWebKitLibraries} >- PRIVATE WebCorePlatformGTK2 >- ) >- ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKitPluginProcess2_LIBRARIES) >- target_link_libraries(WebKitPluginProcess2 ${WebKitPluginProcess2_LIBRARIES}) >- >- add_dependencies(WebKitPluginProcess2 WebKit) >- >- install(TARGETS WebKitPluginProcess2 DESTINATION "${LIBEXEC_INSTALL_DIR}") >- >- if (COMPILER_IS_GCC_OR_CLANG) >- WEBKIT_ADD_TARGET_CXX_FLAGS(WebKitPluginProcess2 -Wno-unused-parameter) >- endif () >-endif () # ENABLE_PLUGIN_PROCESS_GTK2 >- > # GTK3 PluginProcess > list(APPEND PluginProcess_SOURCES > PluginProcess/EntryPoint/unix/PluginProcessMain.cpp >diff --git a/Source/WebKit/Shared/Plugins/Netscape/NetscapePluginModule.cpp b/Source/WebKit/Shared/Plugins/Netscape/NetscapePluginModule.cpp >index 25cc0e94d7d..7b02b5e12f3 100644 >--- a/Source/WebKit/Shared/Plugins/Netscape/NetscapePluginModule.cpp >+++ b/Source/WebKit/Shared/Plugins/Netscape/NetscapePluginModule.cpp >@@ -200,11 +200,7 @@ bool NetscapePluginModule::load() > #if PLATFORM(GTK) > static bool moduleMixesGtkSymbols(Module* module) > { >-#ifdef GTK_API_VERSION_2 >- return module->functionPointer<gpointer>("gtk_application_get_type"); >-#else > return module->functionPointer<gpointer>("gtk_object_get_type"); >-#endif > } > #endif > >diff --git a/Source/WebKit/Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp b/Source/WebKit/Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp >index eec476115c8..460ee4ee8b1 100644 >--- a/Source/WebKit/Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp >+++ b/Source/WebKit/Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp >@@ -163,9 +163,6 @@ bool NetscapePluginModule::getPluginInfo(const String& pluginPath, PluginModuleI > plugin.info.name = metaData.name; > plugin.info.desc = metaData.description; > parseMIMEDescription(metaData.mimeDescription, plugin.info.mimes); >-#if PLATFORM(GTK) >- plugin.requiresGtk2 = metaData.requiresGtk2; >-#endif > > return true; > } >diff --git a/Source/WebKit/Shared/Plugins/PluginModuleInfo.h b/Source/WebKit/Shared/Plugins/PluginModuleInfo.h >index e5360f8d47c..22163c9c5b7 100644 >--- a/Source/WebKit/Shared/Plugins/PluginModuleInfo.h >+++ b/Source/WebKit/Shared/Plugins/PluginModuleInfo.h >@@ -56,8 +56,6 @@ struct PluginModuleInfo { > String versionString; > String shortVersionString; > bool hasSandboxProfile; >-#elif PLATFORM(GTK) >- bool requiresGtk2; > #endif > }; > >diff --git a/Source/WebKit/Shared/gtk/WebEventFactory.cpp b/Source/WebKit/Shared/gtk/WebEventFactory.cpp >index 54cdf62a75a..aab75a59091 100644 >--- a/Source/WebKit/Shared/gtk/WebEventFactory.cpp >+++ b/Source/WebKit/Shared/gtk/WebEventFactory.cpp >@@ -29,7 +29,6 @@ > #include "WebEventFactory.h" > > #include <WebCore/GtkUtilities.h> >-#include <WebCore/GtkVersioning.h> > #include <WebCore/PlatformKeyboardEvent.h> > #include <WebCore/Scrollbar.h> > #include <WebCore/WindowsKeyboardCodes.h> >@@ -44,7 +43,7 @@ using namespace WebCore; > > static inline bool isGdkKeyCodeFromKeyPad(unsigned keyval) > { >- return keyval >= GDK_KP_Space && keyval <= GDK_KP_9; >+ return keyval >= GDK_KEY_KP_Space && keyval <= GDK_KEY_KP_9; > } > > static inline OptionSet<WebEvent::Modifier> modifiersForEvent(const GdkEvent* event) >@@ -96,13 +95,10 @@ static inline WebMouseEvent::Button buttonForEvent(const GdkEvent* event) > case GDK_BUTTON_PRESS: > case GDK_2BUTTON_PRESS: > case GDK_3BUTTON_PRESS: >- case GDK_BUTTON_RELEASE: >+ case GDK_BUTTON_RELEASE: { > guint eventButton; >-#ifndef GTK_API_VERSION_2 > gdk_event_get_button(event, &eventButton); >-#else >- eventButton = event->button.button; >-#endif >+ > if (eventButton == 1) > button = WebMouseEvent::LeftButton; > else if (eventButton == 2) >@@ -110,6 +106,7 @@ static inline WebMouseEvent::Button buttonForEvent(const GdkEvent* event) > else if (eventButton == 3) > button = WebMouseEvent::RightButton; > break; >+ } > default: > ASSERT_NOT_REACHED(); > } >@@ -152,11 +149,7 @@ WebMouseEvent WebEventFactory::createWebMouseEvent(const GdkEvent* event, int cu > gdk_event_get_state(event, &state); > > guint eventButton; >-#ifndef GTK_API_VERSION_2 > gdk_event_get_button(event, &eventButton); >-#else >- eventButton = event->button.button; >-#endif > > WebEvent::Type type = static_cast<WebEvent::Type>(0); > >@@ -204,7 +197,6 @@ WebMouseEvent WebEventFactory::createWebMouseEvent(const GdkEvent* event, int cu > > WebWheelEvent WebEventFactory::createWebWheelEvent(const GdkEvent* event) > { >-#ifndef GTK_API_VERSION_2 > #if GTK_CHECK_VERSION(3, 20, 0) > WebWheelEvent::Phase phase = gdk_event_is_scroll_stop_event(event) ? > WebWheelEvent::Phase::PhaseEnded : >@@ -216,29 +208,24 @@ WebWheelEvent WebEventFactory::createWebWheelEvent(const GdkEvent* event) > WebWheelEvent::Phase::PhaseEnded : > WebWheelEvent::Phase::PhaseChanged; > #endif >-#else >- WebWheelEvent::Phase phase = WebWheelEvent::Phase::PhaseChanged; >-#endif // GTK_API_VERSION_2 > > return createWebWheelEvent(event, phase, WebWheelEvent::Phase::PhaseNone); > } > > WebWheelEvent WebEventFactory::createWebWheelEvent(const GdkEvent* event, WebWheelEvent::Phase phase, WebWheelEvent::Phase momentumPhase) > { >- double x, y, xRoot, yRoot; >- GdkScrollDirection direction; > FloatSize wheelTicks = FloatSize(0, 0); >+ double x, y; > gdk_event_get_coords(event, &x, &y); >+ double xRoot, yRoot; > gdk_event_get_root_coords(event, &xRoot, &yRoot); >-#ifndef GTK_API_VERSION_2 >+ >+ GdkScrollDirection direction; > if (!gdk_event_get_scroll_direction(event, &direction)) { > double deltaX, deltaY; > if (gdk_event_get_scroll_deltas(event, &deltaX, &deltaY)) > wheelTicks = FloatSize(-deltaX, -deltaY); > } >-#else >- direction = event->scroll.direction; >-#endif > > if (wheelTicks.isZero()) { > switch (direction) { >@@ -279,14 +266,10 @@ WebWheelEvent WebEventFactory::createWebWheelEvent(const GdkEvent* event, WebWhe > WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(const GdkEvent* event, const WebCore::CompositionResults& compositionResults, Vector<String>&& commands) > { > guint keyval; >- guint16 keycode; >-#ifndef GTK_API_VERSION_2 > gdk_event_get_keyval(event, &keyval); >+ guint16 keycode; > gdk_event_get_keycode(event, &keycode); >-#else >- keyval = event->key.keyval; >- keycode = event->key.hardware_keycode; >-#endif >+ > #if GTK_CHECK_VERSION(3, 10, 0) > GdkEventType type = gdk_event_get_event_type(event); > #else >@@ -311,7 +294,6 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(const GdkEvent* event, > #if ENABLE(TOUCH_EVENTS) > WebTouchEvent WebEventFactory::createWebTouchEvent(const GdkEvent* event, Vector<WebPlatformTouchPoint>&& touchPoints) > { >-#ifndef GTK_API_VERSION_2 > WebEvent::Type type = WebEvent::NoType; > #if GTK_CHECK_VERSION(3, 10, 0) > GdkEventType eventType = gdk_event_get_event_type(event); >@@ -336,9 +318,6 @@ WebTouchEvent WebEventFactory::createWebTouchEvent(const GdkEvent* event, Vector > } > > return WebTouchEvent(type, WTFMove(touchPoints), modifiersForEvent(event), wallTimeForEvent(event)); >-#else >- return WebTouchEvent(); >-#endif // GTK_API_VERSION_2 > } > #endif > >diff --git a/Source/WebKit/SourcesGTK.txt b/Source/WebKit/SourcesGTK.txt >index fbad27de99a..17b90035a57 100644 >--- a/Source/WebKit/SourcesGTK.txt >+++ b/Source/WebKit/SourcesGTK.txt >@@ -21,10 +21,6 @@ > // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF > // THE POSSIBILITY OF SUCH DAMAGE. > >-// FIXME: Many of these files are built with @no-unify to avoid errors >-// linking PluginProcessGTK2. I don't know why this is necessary. These >-// annotations should be revisited after removing PluginProcessGTK2. >- > NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp > NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp > >@@ -49,20 +45,20 @@ NetworkProcess/webrtc/NetworkRTCMonitor.cpp > NetworkProcess/webrtc/NetworkRTCProvider.cpp > NetworkProcess/webrtc/NetworkRTCSocket.cpp > >-Platform/IPC/glib/GSocketMonitor.cpp @no-unify >-Platform/IPC/unix/AttachmentUnix.cpp @no-unify >-Platform/IPC/unix/ConnectionUnix.cpp @no-unify >+Platform/IPC/glib/GSocketMonitor.cpp >+Platform/IPC/unix/AttachmentUnix.cpp >+Platform/IPC/unix/ConnectionUnix.cpp > > Platform/classifier/ResourceLoadStatisticsClassifier.cpp > >-Platform/glib/ModuleGlib.cpp @no-unify >+Platform/glib/ModuleGlib.cpp > >-Platform/unix/LoggingUnix.cpp @no-unify >-Platform/unix/SharedMemoryUnix.cpp @no-unify >+Platform/unix/LoggingUnix.cpp >+Platform/unix/SharedMemoryUnix.cpp > >-PluginProcess/unix/PluginControllerProxyUnix.cpp @no-unify >-PluginProcess/unix/PluginProcessMainUnix.cpp @no-unify >-PluginProcess/unix/PluginProcessUnix.cpp @no-unify >+PluginProcess/unix/PluginControllerProxyUnix.cpp >+PluginProcess/unix/PluginProcessMainUnix.cpp >+PluginProcess/unix/PluginProcessUnix.cpp > > Shared/API/c/cairo/WKImageCairo.cpp > >@@ -80,14 +76,14 @@ Shared/CoordinatedGraphics/threadedcompositor/CompositingRunLoop.cpp > Shared/CoordinatedGraphics/threadedcompositor/ThreadedDisplayRefreshMonitor.cpp > Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp > >-Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp @no-unify >-Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp @no-unify >+Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp >+Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp > > Shared/Plugins/unix/PluginSearchPath.cpp > >-Shared/cairo/ShareableBitmapCairo.cpp @no-unify >+Shared/cairo/ShareableBitmapCairo.cpp > >-Shared/glib/ProcessExecutablePathGLib.cpp @no-unify >+Shared/glib/ProcessExecutablePathGLib.cpp > Shared/glib/WebContextMenuItemGlib.cpp > > Shared/gtk/ArgumentCodersGtk.cpp >@@ -102,18 +98,18 @@ Shared/gtk/WebSelectionData.cpp > > Shared/linux/WebMemorySamplerLinux.cpp > >-Shared/soup/WebCoreArgumentCodersSoup.cpp @no-unify >+Shared/soup/WebCoreArgumentCodersSoup.cpp > Shared/soup/WebErrorsSoup.cpp > >-Shared/unix/AuxiliaryProcessMain.cpp @no-unify >+Shared/unix/AuxiliaryProcessMain.cpp > > UIProcess/BackingStore.cpp > UIProcess/DefaultUndoController.cpp > UIProcess/LegacySessionStateCodingNone.cpp > UIProcess/ViewGestureController.cpp >-UIProcess/ViewSnapshotStore.cpp @no-unify >+UIProcess/ViewSnapshotStore.cpp > UIProcess/WebGrammarDetail.cpp >-UIProcess/WebMemoryPressureHandler.cpp @no-unify >+UIProcess/WebMemoryPressureHandler.cpp > UIProcess/WebTextChecker.cpp > UIProcess/WebTextCheckerClient.cpp > UIProcess/WebViewportAttributes.cpp >@@ -220,10 +216,10 @@ UIProcess/Network/CustomProtocols/LegacyCustomProtocolManagerProxy.cpp > > UIProcess/linux/MemoryPressureMonitor.cpp > >-UIProcess/Plugins/gtk/PluginInfoCache.cpp @no-unify >+UIProcess/Plugins/gtk/PluginInfoCache.cpp > >-UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp @no-unify >-UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp @no-unify >+UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp >+UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp > > UIProcess/WebsiteData/soup/WebsiteDataStoreSoup.cpp > UIProcess/WebsiteData/unix/WebsiteDataStoreUnix.cpp >@@ -237,20 +233,20 @@ UIProcess/glib/WebProcessProxyGLib.cpp > UIProcess/gstreamer/InstallMissingMediaPluginsPermissionRequest.cpp > UIProcess/gstreamer/WebPageProxyGStreamer.cpp > >-UIProcess/gtk/AcceleratedBackingStore.cpp @no-unify >+UIProcess/gtk/AcceleratedBackingStore.cpp > UIProcess/gtk/AcceleratedBackingStoreWayland.cpp @no-unify > UIProcess/gtk/AcceleratedBackingStoreX11.cpp @no-unify > UIProcess/gtk/DragAndDropHandler.cpp > UIProcess/gtk/GestureController.cpp > UIProcess/gtk/HardwareAccelerationManager.cpp >-UIProcess/gtk/InputMethodFilter.cpp @no-unify >+UIProcess/gtk/InputMethodFilter.cpp > UIProcess/gtk/KeyBindingTranslator.cpp >-UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp @no-unify >+UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp > UIProcess/gtk/TextCheckerGtk.cpp @no-unify > UIProcess/gtk/ViewGestureControllerGtk.cpp @no-unify >-UIProcess/gtk/ViewSnapshotStoreGtk.cpp @no-unify >+UIProcess/gtk/ViewSnapshotStoreGtk.cpp > UIProcess/gtk/WaylandCompositor.cpp @no-unify >-UIProcess/gtk/WebColorPickerGtk.cpp @no-unify >+UIProcess/gtk/WebColorPickerGtk.cpp > UIProcess/gtk/WebContextMenuProxyGtk.cpp > UIProcess/gtk/WebInspectorProxyGtk.cpp > UIProcess/gtk/WebKitInspectorWindow.cpp >@@ -390,8 +386,8 @@ WebProcess/InjectedBundle/glib/InjectedBundleGlib.cpp > > WebProcess/MediaCache/WebMediaKeyStorageManager.cpp > >-WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp @no-unify >-WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp @no-unify >+WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp >+WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp > > WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp @no-unify > >diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp >index 77e04143130..d8db1094524 100644 >--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp >+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp >@@ -54,7 +54,6 @@ > #include <WebCore/CairoUtilities.h> > #include <WebCore/GUniquePtrGtk.h> > #include <WebCore/GtkUtilities.h> >-#include <WebCore/GtkVersioning.h> > #include <WebCore/NotImplemented.h> > #include <WebCore/PasteboardHelper.h> > #include <WebCore/PlatformDisplay.h> >diff --git a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp >index 34028e68035..11ce1dff38f 100644 >--- a/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp >+++ b/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp >@@ -87,10 +87,6 @@ void ProcessLauncher::launchProcess() > case ProcessLauncher::ProcessType::Plugin64: > case ProcessLauncher::ProcessType::Plugin32: > executablePath = executablePathOfPluginProcess(); >-#if ENABLE(PLUGIN_PROCESS_GTK2) >- if (m_launchOptions.extraInitializationData.contains("requires-gtk2")) >- executablePath.append('2'); >-#endif > pluginPath = m_launchOptions.extraInitializationData.get("plugin-path"); > realPluginPath = FileSystem::fileSystemRepresentation(pluginPath); > break; >diff --git a/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h b/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h >index f30df937935..87b3f50ea4b 100644 >--- a/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h >+++ b/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h >@@ -53,10 +53,6 @@ struct RawPluginMetaData { > String name; > String description; > String mimeDescription; >- >-#if PLATFORM(GTK) >- bool requiresGtk2; >-#endif > }; > #endif > >diff --git a/Source/WebKit/UIProcess/Plugins/gtk/PluginInfoCache.cpp b/Source/WebKit/UIProcess/Plugins/gtk/PluginInfoCache.cpp >index a28a00a386c..ec93f6d82ff 100644 >--- a/Source/WebKit/UIProcess/Plugins/gtk/PluginInfoCache.cpp >+++ b/Source/WebKit/UIProcess/Plugins/gtk/PluginInfoCache.cpp >@@ -133,8 +133,6 @@ bool PluginInfoCache::getPluginInfo(const String& pluginPath, PluginModuleInfo& > NetscapePluginModule::parseMIMEDescription(String::fromUTF8(stringValue.get()), plugin.info.mimes); > #endif > >- plugin.requiresGtk2 = g_key_file_get_boolean(m_cacheFile.get(), pluginGroup.data(), "requires-gtk2", nullptr); >- > return true; > } > >@@ -154,8 +152,6 @@ void PluginInfoCache::updatePluginInfo(const String& pluginPath, const PluginMod > g_key_file_set_string(m_cacheFile.get(), pluginGroup.data(), "mime-description", mimeDescription.utf8().data()); > #endif > >- g_key_file_set_boolean(m_cacheFile.get(), pluginGroup.data(), "requires-gtk2", plugin.requiresGtk2); >- > if (m_cachePath && !m_readOnlyMode) { > // Save the cache file in an idle to make sure it happens in the main thread and > // it's done only once when this is called multiple times in a very short time. >diff --git a/Source/WebKit/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp b/Source/WebKit/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp >index aa094736816..76c8621f108 100644 >--- a/Source/WebKit/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp >+++ b/Source/WebKit/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp >@@ -72,19 +72,8 @@ Vector<String> PluginInfoStore::individualPluginPaths() > bool PluginInfoStore::getPluginInfo(const String& pluginPath, PluginModuleInfo& plugin) > { > #if PLATFORM(GTK) >- if (PluginInfoCache::singleton().getPluginInfo(pluginPath, plugin)) { >-#if ENABLE(PLUGIN_PROCESS_GTK2) >- if (plugin.requiresGtk2) { >- if (PlatformDisplay::sharedDisplay().type() != PlatformDisplay::Type::X11) >- return false; >- String pluginProcessPath = executablePathOfPluginProcess(); >- pluginProcessPath.append('2'); >- if (!FileSystem::fileExists(pluginProcessPath)) >- return false; >- } >-#endif >+ if (PluginInfoCache::singleton().getPluginInfo(pluginPath, plugin)) > return true; >- } > > if (NetscapePluginModule::getPluginInfo(pluginPath, plugin)) { > PluginInfoCache::singleton().updatePluginInfo(pluginPath, plugin); >diff --git a/Source/WebKit/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp b/Source/WebKit/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp >index c500c0fcea6..f6f479b1e03 100644 >--- a/Source/WebKit/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp >+++ b/Source/WebKit/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp >@@ -53,12 +53,7 @@ using namespace WebCore; > void PluginProcessProxy::platformGetLaunchOptionsWithAttributes(ProcessLauncher::LaunchOptions& launchOptions, const PluginProcessAttributes& pluginProcessAttributes) > { > launchOptions.processType = ProcessLauncher::ProcessType::Plugin64; >- > launchOptions.extraInitializationData.add("plugin-path", pluginProcessAttributes.moduleInfo.path); >-#if PLATFORM(GTK) >- if (pluginProcessAttributes.moduleInfo.requiresGtk2) >- launchOptions.extraInitializationData.add("requires-gtk2", emptyString()); >-#endif > } > > void PluginProcessProxy::platformInitializePluginProcess(PluginProcessCreationParameters&) >@@ -81,21 +76,9 @@ bool PluginProcessProxy::scanPlugin(const String& pluginPath, RawPluginMetaData& > String pluginProcessPath = executablePathOfPluginProcess(); > > #if PLATFORM(GTK) >- bool requiresGtk2 = pluginRequiresGtk2(pluginPath); >- if (requiresGtk2) { >-#if PLATFORM(WAYLAND) >- if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland) >- return false; >-#endif >-#if ENABLE(PLUGIN_PROCESS_GTK2) >- pluginProcessPath.append('2'); >- if (!FileSystem::fileExists(pluginProcessPath)) >- return false; >-#else >+ if (pluginRequiresGtk2(pluginPath)) > return false; > #endif >- } >-#endif > > CString binaryPath = FileSystem::fileSystemRepresentation(pluginProcessPath); > CString pluginPathCString = FileSystem::fileSystemRepresentation(pluginPath); >@@ -147,9 +130,6 @@ bool PluginProcessProxy::scanPlugin(const String& pluginPath, RawPluginMetaData& > result.name.swap(lines[0]); > result.description.swap(lines[1]); > result.mimeDescription.swap(lines[2]); >-#if PLATFORM(GTK) >- result.requiresGtk2 = requiresGtk2; >-#endif > return !result.mimeDescription.isEmpty(); > } > #endif // PLUGIN_ARCHITECTURE(UNIX) >diff --git a/Source/WebKit/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp b/Source/WebKit/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp >index 3a6d66cf772..44d11b57c3e 100644 >--- a/Source/WebKit/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp >+++ b/Source/WebKit/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp >@@ -39,12 +39,8 @@ > > #if PLATFORM(GTK) > #include <gtk/gtk.h> >-#ifndef GTK_API_VERSION_2 > #include <gtk/gtkx.h> > #endif >-#include <gdk/gdkx.h> >-#include <WebCore/GtkVersioning.h> >-#endif > > #if USE(CAIRO) > #include <WebCore/PlatformContextCairo.h> >diff --git a/Source/cmake/FindGDK2.cmake b/Source/cmake/FindGDK2.cmake >deleted file mode 100644 >index 421c902eb08..00000000000 >--- a/Source/cmake/FindGDK2.cmake >+++ /dev/null >@@ -1,49 +0,0 @@ >-# - Try to find GDK 2 >-# Once done, this will define >-# >-# GDK2_FOUND - system has GDK 2 >-# GDK2_INCLUDE_DIRS - the GDK 2 include directories >-# GDK2_LIBRARIES - link these to use GDK 2 >-# >-# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org> >-# Copyright (C) 2013 Igalia S.L. >-# >-# 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 THE COPYRIGHT HOLDER 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 THE COPYRIGHT HOLDER 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. >- >-find_package(PkgConfig) >-pkg_check_modules(GDK2 gdk-2.0) >- >-set(VERSION_OK TRUE) >-if (GDK2_VERSION) >- if (GDK2_FIND_VERSION_EXACT) >- if (NOT("${GDK2_FIND_VERSION}" VERSION_EQUAL "${GDK2_VERSION}")) >- set(VERSION_OK FALSE) >- endif () >- else () >- if ("${GDK2_VERSION}" VERSION_LESS "${GDK2_FIND_VERSION}") >- set(VERSION_OK FALSE) >- endif () >- endif () >-endif () >- >-include(FindPackageHandleStandardArgs) >-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDK2 DEFAULT_MSG GDK2_INCLUDE_DIRS GDK2_LIBRARIES VERSION_OK) >diff --git a/Source/cmake/FindGTK2.cmake b/Source/cmake/FindGTK2.cmake >deleted file mode 100644 >index 8bd5688a778..00000000000 >--- a/Source/cmake/FindGTK2.cmake >+++ /dev/null >@@ -1,49 +0,0 @@ >-# - Try to find GTK+ 2 >-# Once done, this will define >-# >-# GTK2_FOUND - system has GTK+ 2. >-# GTK2_INCLUDE_DIRS - the GTK+ 2. include directories >-# GTK2_LIBRARIES - link these to use GTK+ 2. >-# >-# Copyright (C) 2012 Raphael Kubo da Costa <rakuco@webkit.org> >-# Copyright (C) 2013 Igalia S.L. >-# >-# 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 THE COPYRIGHT HOLDER 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 THE COPYRIGHT HOLDER 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. >- >-find_package(PkgConfig) >-pkg_check_modules(GTK2 gtk+-2.0) >- >-set(VERSION_OK TRUE) >-if (GTK2_VERSION) >- if (GTK2_FIND_VERSION_EXACT) >- if (NOT("${GTK2_FIND_VERSION}" VERSION_EQUAL "${GTK2_VERSION}")) >- set(VERSION_OK FALSE) >- endif () >- else () >- if ("${GTK2_VERSION}" VERSION_LESS "${GTK2_FIND_VERSION}") >- set(VERSION_OK FALSE) >- endif () >- endif () >-endif () >- >-include(FindPackageHandleStandardArgs) >-FIND_PACKAGE_HANDLE_STANDARD_ARGS(GTK2 DEFAULT_MSG GTK2_INCLUDE_DIRS GTK2_LIBRARIES VERSION_OK) >diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake >index 55547b8f91f..06c83bd4f3d 100644 >--- a/Source/cmake/OptionsGTK.cmake >+++ b/Source/cmake/OptionsGTK.cmake >@@ -77,7 +77,6 @@ WEBKIT_OPTION_DEFINE(ENABLE_GLES2 "Whether to enable OpenGL ES 2.0." PUBLIC ${EN > WEBKIT_OPTION_DEFINE(ENABLE_GTKDOC "Whether or not to use generate gtkdoc." PUBLIC OFF) > WEBKIT_OPTION_DEFINE(ENABLE_INTROSPECTION "Whether to enable GObject introspection." PUBLIC ON) > WEBKIT_OPTION_DEFINE(ENABLE_OPENGL "Whether to use OpenGL." PUBLIC ON) >-WEBKIT_OPTION_DEFINE(ENABLE_PLUGIN_PROCESS_GTK2 "Whether to build WebKitPluginProcess2 to load GTK2 based plugins." PUBLIC ON) > WEBKIT_OPTION_DEFINE(ENABLE_QUARTZ_TARGET "Whether to enable support for the Quartz windowing target." PUBLIC ${GTK3_SUPPORTS_QUARTZ}) > WEBKIT_OPTION_DEFINE(ENABLE_X11_TARGET "Whether to enable support for the X11 windowing target." PUBLIC ${GTK3_SUPPORTS_X11}) > WEBKIT_OPTION_DEFINE(ENABLE_WAYLAND_TARGET "Whether to enable support for the Wayland windowing target." PUBLIC ${GTK3_SUPPORTS_WAYLAND}) >@@ -99,7 +98,6 @@ WEBKIT_OPTION_DEPEND(ENABLE_3D_TRANSFORMS ENABLE_OPENGL) > WEBKIT_OPTION_DEPEND(ENABLE_ACCELERATED_2D_CANVAS ENABLE_OPENGL) > WEBKIT_OPTION_DEPEND(ENABLE_ASYNC_SCROLLING ENABLE_OPENGL) > WEBKIT_OPTION_DEPEND(ENABLE_GLES2 ENABLE_OPENGL) >-WEBKIT_OPTION_DEPEND(ENABLE_PLUGIN_PROCESS_GTK2 ENABLE_X11_TARGET) > WEBKIT_OPTION_DEPEND(ENABLE_WEBGL ENABLE_OPENGL) > WEBKIT_OPTION_DEPEND(USE_WPE_RENDERER ENABLE_OPENGL) > WEBKIT_OPTION_DEPEND(USE_WPE_RENDERER ENABLE_WAYLAND_TARGET) >@@ -306,11 +304,6 @@ if (ENABLE_OPENGL) > SET_AND_EXPOSE_TO_BUILD(USE_NICOSIA TRUE) > endif () > >-if (ENABLE_PLUGIN_PROCESS_GTK2) >- find_package(GTK2 2.24.10 REQUIRED) >- find_package(GDK2 2.24.10 REQUIRED) >-endif () >- > if (ENABLE_SPELLCHECK) > find_package(Enchant) > if (NOT PC_ENCHANT_FOUND) >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index bf9b4d538dd..9ac44e77ee9 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,16 @@ >+2019-06-20 Carlos Garcia Campos <cgarcia@igalia.com> >+ >+ [GTK] Remove support for GTK2 plugins >+ https://bugs.webkit.org/show_bug.cgi?id=199065 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * EWSTools/ubuntu-ews-packages: >+ * TestWebKitAPI/PlatformGTK.cmake: >+ * WebKitTestRunner/PlatformGTK.cmake: >+ * flatpak/org.webkit.GTK.yaml: >+ * gtk/install-dependencies: >+ > 2019-06-19 Yusuke Suzuki <ysuzuki@apple.com> > > [bmalloc] IsoHeap's initialization is racy with IsoHeap::isInitialized >diff --git a/Tools/EWSTools/ubuntu-ews-packages b/Tools/EWSTools/ubuntu-ews-packages >index 55e4507319f..a18dc2c114a 100644 >--- a/Tools/EWSTools/ubuntu-ews-packages >+++ b/Tools/EWSTools/ubuntu-ews-packages >@@ -28,7 +28,6 @@ libnspr4-dev > libnss3-dev > libpam0g-dev > libtool >-libgtk2.0-dev > libpango1.0-dev > libicu-dev > libxslt-dev >diff --git a/Tools/TestWebKitAPI/PlatformGTK.cmake b/Tools/TestWebKitAPI/PlatformGTK.cmake >index 153fffb2fa5..afb306a17a8 100644 >--- a/Tools/TestWebKitAPI/PlatformGTK.cmake >+++ b/Tools/TestWebKitAPI/PlatformGTK.cmake >@@ -47,8 +47,6 @@ list(APPEND TestWebCore_SYSTEM_INCLUDE_DIRECTORIES > list(APPEND TestWebCore_LIBRARIES > ${GDK3_LIBRARIES} > ${GTK3_LIBRARIES} >- >- WebCorePlatformGTK > ) > ADD_WHOLE_ARCHIVE_TO_LIBRARIES(TestWebCore_LIBRARIES) > >diff --git a/Tools/WebKitTestRunner/PlatformGTK.cmake b/Tools/WebKitTestRunner/PlatformGTK.cmake >index beda87bc229..2029fb0bf1a 100644 >--- a/Tools/WebKitTestRunner/PlatformGTK.cmake >+++ b/Tools/WebKitTestRunner/PlatformGTK.cmake >@@ -30,7 +30,6 @@ list(APPEND WebKitTestRunner_LIBRARIES > ${GTK3_LIBRARIES} > ${GLIB_LIBRARIES} > WebCore >- WebCorePlatformGTK > ) > > set(WebKitTestRunnerInjectedBundle_LIBRARIES >diff --git a/Tools/flatpak/org.webkit.GTK.yaml b/Tools/flatpak/org.webkit.GTK.yaml >index d31d6dc256f..963b5604408 100644 >--- a/Tools/flatpak/org.webkit.GTK.yaml >+++ b/Tools/flatpak/org.webkit.GTK.yaml >@@ -88,23 +88,6 @@ > - --disable-local-transport > - --without-dtrace > >-# Required for the GTK2 plugin process >-- name: gtk2 >- sources: >- - type: archive >- url: https://download.gnome.org/sources/gtk+/2.24/gtk+-2.24.32.tar.xz >- sha256: b6c8a93ddda5eabe3bfee1eb39636c9a03d2a56c7b62828b359bf197943c582e >- - type: script >- commands: >- - "sed -i '1s/python$/&2/' gtk/gtk-builder-convert" >- - "sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool" >- config-opts: >- - --disable-gtk-doc >- - --disable-cups >- - --disable-papi >- - --enable-introspection=no >- - --with-gdktarget=x11 >- > # Required for run-gtk-tests > - name: pycairo > buildsystem: simple >diff --git a/Tools/gtk/install-dependencies b/Tools/gtk/install-dependencies >index bd7efd19bc8..f43c1ca9956 100755 >--- a/Tools/gtk/install-dependencies >+++ b/Tools/gtk/install-dependencies >@@ -112,7 +112,6 @@ function installDependenciesWithApt { > libgirepository1.0-dev \ > libgl1-mesa-dev \ > libgl1-mesa-glx \ >- libgtk2.0-dev \ > libgtk-3-dev \ > libgstreamer1.0-dev \ > libgstreamer-plugins-bad1.0-dev \ >@@ -282,7 +281,6 @@ function installDependenciesWithPacman { > gobject-introspection \ > mesa \ > mesa-libgl \ >- gtk2 \ > gtk3 \ > libsystemd \ > libjpeg-turbo \ >@@ -434,7 +432,6 @@ function installDependenciesWithDnf { > gstreamer1-plugins-bad-free-devel \ > gstreamer1-plugins-base-devel \ > gtk-doc \ >- gtk2-devel \ > gtk3-devel \ > hyphen-devel \ > intltool \
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Flags:
svillar
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199065
: 372549