Changeset 246632 in webkit


Ignore:
Timestamp:
Jun 20, 2019 4:08:29 AM (5 years ago)
Author:
Carlos Garcia Campos
Message:

[GTK] Remove support for GTK2 plugins
https://bugs.webkit.org/show_bug.cgi?id=199065

Reviewed by Sergio Villar Senin.

.:

  • Source/cmake/FindGDK2.cmake: Removed.
  • Source/cmake/FindGTK2.cmake: Removed.
  • Source/cmake/OptionsGTK.cmake:

PerformanceTests:

  • StitchMarker/wtf/Platform.h:

Source/WebCore:

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

Source/WebKit:

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

Source/WTF:

  • wtf/Platform.h:
  • wtf/glib/GTypedefs.h:

Tools:

  • EWSTools/ubuntu-ews-packages:
  • TestWebKitAPI/PlatformGTK.cmake:
  • WebKitTestRunner/PlatformGTK.cmake:
  • flatpak/org.webkit.GTK.yaml:
  • gtk/install-dependencies:
Location:
trunk
Files:
4 deleted
51 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r246547 r246632  
     12019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Remove support for GTK2 plugins
     4        https://bugs.webkit.org/show_bug.cgi?id=199065
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        * Source/cmake/FindGDK2.cmake: Removed.
     9        * Source/cmake/FindGTK2.cmake: Removed.
     10        * Source/cmake/OptionsGTK.cmake:
     11
    1122019-06-18  Adrian Perez de Castro  <aperez@igalia.com>
    213
  • trunk/PerformanceTests/ChangeLog

    r245063 r246632  
     12019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Remove support for GTK2 plugins
     4        https://bugs.webkit.org/show_bug.cgi?id=199065
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        * StitchMarker/wtf/Platform.h:
     9
    1102019-05-08  Caio Lima  <ticaiolima@gmail.com>
    211
  • trunk/PerformanceTests/StitchMarker/wtf/Platform.h

    r228590 r246632  
    525525#if PLATFORM(GTK)
    526526#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_36
    527 #endif
    528 
    529 #if PLATFORM(GTK) && !defined(GTK_API_VERSION_2)
    530527#define GDK_VERSION_MIN_REQUIRED GDK_VERSION_3_6
    531528#endif
  • trunk/Source/WTF/ChangeLog

    r246630 r246632  
     12019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Remove support for GTK2 plugins
     4        https://bugs.webkit.org/show_bug.cgi?id=199065
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        * wtf/Platform.h:
     9        * wtf/glib/GTypedefs.h:
     10
    1112019-06-19  Yusuke Suzuki  <ysuzuki@apple.com>
    212
  • trunk/Source/WTF/wtf/Platform.h

    r246616 r246632  
    584584#if PLATFORM(GTK)
    585585#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_36
     586#define GDK_VERSION_MIN_REQUIRED GDK_VERSION_3_6
    586587#endif
    587588
    588589#if PLATFORM(WPE)
    589590#define GLIB_VERSION_MIN_REQUIRED GLIB_VERSION_2_40
    590 #endif
    591 
    592 #if PLATFORM(GTK) && !defined(GTK_API_VERSION_2)
    593 #define GDK_VERSION_MIN_REQUIRED GDK_VERSION_3_6
    594591#endif
    595592
  • trunk/Source/WTF/wtf/glib/GTypedefs.h

    r194579 r246632  
    7676#endif
    7777
    78 #if USE(CLUTTER)
    79 typedef struct _ClutterActor ClutterActor;
    80 typedef struct _GraphicsLayerActor GraphicsLayerActor;
    81 #endif
    82 
    8378#if PLATFORM(GTK)
    8479typedef struct _GtkAction GtkAction;
     
    9792typedef struct _GtkWidget GtkWidget;
    9893typedef struct _GtkWindow GtkWindow;
    99 
    100 #ifdef GTK_API_VERSION_2
    101 typedef struct _GdkRectangle GdkRectangle;
    102 typedef struct _GdkDrawable GdkWindow;
    103 #else
    10494typedef struct _GdkWindow GdkWindow;
    10595typedef struct _GtkStyleContext GtkStyleContext;
     
    10797
    10898#endif
    109 
    110 #endif
    11199#endif // WTF_GTypedefs_h
  • trunk/Source/WebCore/ChangeLog

    r246631 r246632  
     12019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Remove support for GTK2 plugins
     4        https://bugs.webkit.org/show_bug.cgi?id=199065
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        * PlatformGTK.cmake:
     9        * SourcesGTK.txt:
     10        * SourcesWPE.txt:
     11        * platform/FreeType.cmake:
     12        * platform/SourcesGLib.txt:
     13        * platform/graphics/Color.h:
     14        * platform/graphics/PlatformDisplay.cpp:
     15        (WebCore::PlatformDisplay::createPlatformDisplay):
     16        * platform/graphics/gtk/ColorGtk.cpp:
     17        (WebCore::Color::operator GdkRGBA const):
     18        * platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp:
     19        (WebCore::onFrameClockUpdate):
     20        (WebCore::DisplayRefreshMonitorGtk::requestRefreshCallback):
     21        * platform/graphics/gtk/DisplayRefreshMonitorGtk.h:
     22        (WebCore::DisplayRefreshMonitorGtk::create):
     23        * platform/graphics/gtk/GdkCairoUtilities.cpp:
     24        * platform/gtk/GRefPtrGtk.cpp:
     25        * platform/gtk/GRefPtrGtk.h:
     26        * platform/gtk/GtkVersioning.c: Removed.
     27        * platform/gtk/GtkVersioning.h: Removed.
     28        * platform/gtk/PasteboardHelper.cpp:
     29        (WebCore::PasteboardHelper::getClipboardContents):
     30        * platform/gtk/PlatformKeyboardEventGtk.cpp:
     31        (WebCore::modifiersForGdkKeyEvent):
     32        (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
     33        * platform/gtk/PlatformMouseEventGtk.cpp:
     34        (WebCore::PlatformMouseEvent::PlatformMouseEvent):
     35        * platform/gtk/PlatformScreenGtk.cpp:
     36        (WebCore::screenIsTouchPrimaryInputDevice):
     37        * platform/gtk/PlatformWheelEventGtk.cpp:
     38        (WebCore::PlatformWheelEvent::PlatformWheelEvent):
     39        * platform/gtk/ScrollbarThemeGtk.cpp:
     40        * platform/gtk/ScrollbarThemeGtk.h:
     41        * platform/gtk/WidgetGtk.cpp:
     42        * rendering/RenderThemeGtk.cpp:
     43        * rendering/RenderThemeGtk.h:
     44
    1452019-06-19  Myles C. Maxfield  <mmaxfield@apple.com>
    246
  • trunk/Source/WebCore/PlatformGTK.cmake

    r245807 r246632  
    4343endif ()
    4444
    45 list(APPEND WebCorePlatformGTK_SOURCES
    46     editing/gtk/EditorGtk.cpp
    47 
    48     page/gtk/DragControllerGtk.cpp
    49 
    50     platform/glib/EventHandlerGLib.cpp
    51 
    52     platform/graphics/PlatformDisplay.cpp
    53 
    54     platform/graphics/gtk/ColorGtk.cpp
    55     platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp
    56     platform/graphics/gtk/GdkCairoUtilities.cpp
    57     platform/graphics/gtk/IconGtk.cpp
    58     platform/graphics/gtk/ImageBufferGtk.cpp
    59     platform/graphics/gtk/ImageGtk.cpp
    60 
    61     platform/gtk/CursorGtk.cpp
    62     platform/gtk/DragImageGtk.cpp
    63     platform/gtk/GRefPtrGtk.cpp
    64     platform/gtk/GtkUtilities.cpp
    65     platform/gtk/GtkVersioning.c
    66     platform/gtk/PasteboardHelper.cpp
    67     platform/gtk/PlatformKeyboardEventGtk.cpp
    68     platform/gtk/PlatformMouseEventGtk.cpp
    69     platform/gtk/PlatformPasteboardGtk.cpp
    70     platform/gtk/PlatformScreenGtk.cpp
    71     platform/gtk/PlatformWheelEventGtk.cpp
    72     platform/gtk/RenderThemeGadget.cpp
    73     platform/gtk/RenderThemeWidget.cpp
    74     platform/gtk/ScrollbarThemeGtk.cpp
    75     platform/gtk/WidgetGtk.cpp
    76 
    77     rendering/RenderThemeGtk.cpp
    78 )
    79 
    8045list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
    8146    platform/graphics/x11/PlatformDisplayX11.h
     
    8853    platform/gtk/GUniquePtrGtk.h
    8954    platform/gtk/GtkUtilities.h
    90     platform/gtk/GtkVersioning.h
    9155    platform/gtk/PasteboardHelper.h
    9256    platform/gtk/SelectionData.h
     
    11074    ${ATK_LIBRARIES}
    11175    ${ENCHANT_LIBRARIES}
     76    ${GDK_LIBRARIES}
    11277    ${GLIB_GIO_LIBRARIES}
    11378    ${GLIB_GMODULE_LIBRARIES}
    11479    ${GLIB_GOBJECT_LIBRARIES}
    11580    ${GLIB_LIBRARIES}
     81    ${GTK_LIBRARIES}
    11682    ${LIBSECCOMP_LIBRARIES}
    11783    ${LIBSECRET_LIBRARIES}
     
    136102    ${ATK_INCLUDE_DIRS}
    137103    ${ENCHANT_INCLUDE_DIRS}
     104    ${GDK_INCLUDE_DIRS}
    138105    ${GIO_UNIX_INCLUDE_DIRS}
    139106    ${GLIB_INCLUDE_DIRS}
     107    ${GTK_INCLUDE_DIRS}
    140108    ${LIBSECCOMP_INCLUDE_DIRS}
    141109    ${LIBSECRET_INCLUDE_DIRS}
     
    167135endif ()
    168136
    169 if (ENABLE_PLUGIN_PROCESS_GTK2)
    170     # WebKitPluginProcess2 needs a version of WebCore compiled against GTK+2, so we've isolated all the GTK+
    171     # dependent files into a separate library which can be used to construct a GTK+2 WebCore
    172     # for the plugin process.
    173     add_library(WebCorePlatformGTK2 ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
    174     add_dependencies(WebCorePlatformGTK2 WebCore)
    175     set_property(TARGET WebCorePlatformGTK2
    176         APPEND
    177         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
    178     )
    179     target_include_directories(WebCorePlatformGTK2 PRIVATE
    180         ${WebCore_INCLUDE_DIRECTORIES}
    181     )
    182     target_include_directories(WebCorePlatformGTK2 SYSTEM PRIVATE
    183         ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
    184         ${GTK2_INCLUDE_DIRS}
    185         ${GDK2_INCLUDE_DIRS}
    186     )
    187     target_link_libraries(WebCorePlatformGTK2
    188          ${WebCore_LIBRARIES}
    189          ${GTK2_LIBRARIES}
    190          ${GDK2_LIBRARIES}
    191     )
    192 endif ()
    193 
    194137if (ENABLE_WAYLAND_TARGET)
    195138    list(APPEND WebCore_PRIVATE_FRAMEWORK_HEADERS
     
    204147    )
    205148endif ()
    206 
    207 add_library(WebCorePlatformGTK ${WebCore_LIBRARY_TYPE} ${WebCorePlatformGTK_SOURCES})
    208 add_dependencies(WebCorePlatformGTK WebCore)
    209 target_include_directories(WebCorePlatformGTK PRIVATE
    210     ${WebCore_INCLUDE_DIRECTORIES}
    211     ${WebCore_PRIVATE_INCLUDE_DIRECTORIES}
    212 )
    213 target_include_directories(WebCorePlatformGTK SYSTEM PRIVATE
    214     ${WebCore_SYSTEM_INCLUDE_DIRECTORIES}
    215     ${GTK_INCLUDE_DIRS}
    216     ${GDK_INCLUDE_DIRS}
    217 )
    218 target_link_libraries(WebCorePlatformGTK
    219     ${WebCore_LIBRARIES}
    220     ${GTK_LIBRARIES}
    221     ${GDK_LIBRARIES}
    222 )
    223 
    224 include_directories(
    225     ${WebCore_INCLUDE_DIRECTORIES}
    226     ${WebCore_PRIVATE_INCLUDE_DIRECTORIES}
    227     "${WEBCORE_DIR}/bindings/gobject/"
    228 )
    229149
    230150include_directories(SYSTEM
  • trunk/Source/WebCore/SourcesGTK.txt

    r246199 r246632  
    4242editing/atk/FrameSelectionAtk.cpp
    4343
     44editing/gtk/EditorGtk.cpp
     45
    4446loader/soup/ResourceLoaderSoup.cpp
     47
     48page/gtk/DragControllerGtk.cpp
    4549
    4650page/linux/ResourceUsageOverlayLinux.cpp
     
    6468platform/graphics/GLContext.cpp @no-unify
    6569platform/graphics/GraphicsContext3DPrivate.cpp
     70platform/graphics/PlatformDisplay.cpp
    6671
    6772platform/graphics/cairo/BackingStoreBackendCairoX11.cpp @no-unify
     
    7378
    7479platform/graphics/glx/GLContextGLX.cpp
     80
     81platform/graphics/gtk/ColorGtk.cpp
     82platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp
     83platform/graphics/gtk/GdkCairoUtilities.cpp
     84platform/graphics/gtk/IconGtk.cpp
     85platform/graphics/gtk/ImageBufferGtk.cpp
     86platform/graphics/gtk/ImageGtk.cpp
    7587
    7688platform/graphics/gstreamer/ImageGStreamerCairo.cpp
     
    90102platform/graphics/x11/XUniqueResource.cpp @no-unify
    91103
     104platform/gtk/CursorGtk.cpp
    92105platform/gtk/DragDataGtk.cpp
     106platform/gtk/DragImageGtk.cpp
     107platform/gtk/GRefPtrGtk.cpp
     108platform/gtk/GtkUtilities.cpp
    93109platform/gtk/LocalizedStringsGtk.cpp
    94110platform/gtk/PasteboardGtk.cpp
     111platform/gtk/PasteboardHelper.cpp
     112platform/gtk/PlatformKeyboardEventGtk.cpp
     113platform/gtk/PlatformMouseEventGtk.cpp
     114platform/gtk/PlatformPasteboardGtk.cpp
     115platform/gtk/PlatformScreenGtk.cpp
     116platform/gtk/PlatformWheelEventGtk.cpp
     117platform/gtk/RenderThemeGadget.cpp
     118platform/gtk/RenderThemeWidget.cpp
     119platform/gtk/ScrollbarThemeGtk.cpp
    95120platform/gtk/SelectionData.cpp
     121platform/gtk/WidgetGtk.cpp
    96122
    97123platform/text/Hyphenation.cpp
     
    105131
    106132platform/xdg/MIMETypeRegistryXdg.cpp
     133
     134rendering/RenderThemeGtk.cpp
  • trunk/Source/WebCore/SourcesWPE.txt

    r245565 r246632  
    5959platform/UserAgentQuirks.cpp
    6060
    61 // This can't go into SourcesGLib.txt because it has to go into WebCorePlatformGTK.
    62 platform/glib/EventHandlerGLib.cpp
    63 
    6461platform/graphics/GLContext.cpp
    6562platform/graphics/GraphicsContext3DPrivate.cpp
  • trunk/Source/WebCore/platform/FreeType.cmake

    r244443 r246632  
    66
    77list(APPEND WebCore_SOURCES
     8    platform/graphics/freetype/FontCacheFreeType.cpp
    89    platform/graphics/freetype/FontCustomPlatformDataFreeType.cpp
    910    platform/graphics/freetype/FontPlatformDataFreeType.cpp
     
    2122    platform/graphics/harfbuzz/HbUniquePtr.h
    2223)
    23 
    24 if (PORT STREQUAL "GTK")
    25     list(APPEND WebCorePlatformGTK_SOURCES
    26         platform/graphics/freetype/FontCacheFreeType.cpp
    27 )
    28 else ()
    29     list(APPEND WebCore_SOURCES
    30         platform/graphics/freetype/FontCacheFreeType.cpp
    31 )
    32 endif ()
    3324
    3425if (USE_CAIRO)
  • trunk/Source/WebCore/platform/SourcesGLib.txt

    r240437 r246632  
    2424platform/audio/glib/AudioBusGLib.cpp
    2525
     26platform/glib/EventHandlerGLib.cpp
    2627platform/glib/EventLoopGlib.cpp
    2728platform/glib/FileMonitorGLib.cpp
  • trunk/Source/WebCore/platform/graphics/Color.h

    r241825 r246632  
    5050
    5151#if PLATFORM(GTK)
    52 typedef struct _GdkColor GdkColor;
    53 #ifndef GTK_API_VERSION_2
    5452typedef struct _GdkRGBA GdkRGBA;
    55 #endif
    5653#endif
    5754
     
    253250
    254251#if PLATFORM(GTK)
    255     Color(const GdkColor&);
    256     // We can't sensibly go back to GdkColor without losing the alpha value
    257 #ifndef GTK_API_VERSION_2
    258252    Color(const GdkRGBA&);
    259253    operator GdkRGBA() const;
    260 #endif
    261254#endif
    262255
  • trunk/Source/WebCore/platform/graphics/PlatformDisplay.cpp

    r245807 r246632  
    5555#endif
    5656
    57 #if PLATFORM(GTK) && PLATFORM(WAYLAND) && !defined(GTK_API_VERSION_2)
     57#if PLATFORM(GTK) && PLATFORM(WAYLAND)
    5858#include <gdk/gdkwayland.h>
    5959#endif
     
    7575{
    7676#if PLATFORM(GTK)
    77 #if defined(GTK_API_VERSION_2)
    78     return PlatformDisplayX11::create(GDK_DISPLAY_XDISPLAY(gdk_display_get_default()));
    79 #else
    8077    if (gtk_init_check(nullptr, nullptr)) {
    8178        GdkDisplay* display = gdk_display_manager_get_default_display(gdk_display_manager_get());
     
    8986#endif
    9087    }
    91 #endif
    9288#endif // PLATFORM(GTK)
    9389
  • trunk/Source/WebCore/platform/graphics/gtk/ColorGtk.cpp

    r211853 r246632  
    2626namespace WebCore {
    2727
    28 Color::Color(const GdkColor& c)
    29 {
    30     setRGB(makeRGB(c.red >> 8, c.green >> 8, c.blue >> 8));
    31 }
    32 
    33 #ifndef GTK_API_VERSION_2
    3428Color::Color(const GdkRGBA& c)
    3529{
     
    4943    return { red, green, blue, alpha };
    5044}
    51 #endif
    5245
    5346}
  • trunk/Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.cpp

    r233512 r246632  
    4545}
    4646
    47 #ifndef GTK_API_VERSION_2
    4847static void onFrameClockUpdate(GdkFrameClock*, DisplayRefreshMonitorGtk* monitor)
    4948{
    5049    monitor->displayLinkFired();
    5150}
    52 #endif
    5351
    5452bool DisplayRefreshMonitorGtk::requestRefreshCallback()
     
    5755        return false;
    5856
    59 #ifndef GTK_API_VERSION_2
    6057    if (!m_window) {
    6158        // GdkFrameClockIdle is private in GDK, so we need to create a toplevel to get its frame clock.
     
    7673    setIsScheduled(true);
    7774    return true;
    78 #else
    79     return false;
    80 #endif
    8175}
    8276
  • trunk/Source/WebCore/platform/graphics/gtk/DisplayRefreshMonitorGtk.h

    r233512 r246632  
    3838    static RefPtr<DisplayRefreshMonitorGtk> create(PlatformDisplayID displayID)
    3939    {
    40 #ifndef GTK_API_VERSION_2
    4140        return adoptRef(*new DisplayRefreshMonitorGtk(displayID));
    42 #else
    43         UNUSED_PARAM(displayID);
    44         return nullptr;
    45 #endif
    4641    }
    4742
  • trunk/Source/WebCore/platform/graphics/gtk/GdkCairoUtilities.cpp

    r222800 r246632  
    2828
    2929#include "GdkCairoUtilities.h"
    30 #include "GtkVersioning.h"
    3130#include "IntSize.h"
    3231#include <cairo.h>
  • trunk/Source/WebCore/platform/gtk/GRefPtrGtk.cpp

    r206731 r246632  
    6060#endif
    6161
    62 #ifdef GTK_API_VERSION_2
    63 template <> GdkCursor* refGPtr(GdkCursor* ptr)
    64 {
    65     if (ptr)
    66         gdk_cursor_ref(ptr);
    67     return ptr;
    68 }
    69 
    70 template <> void derefGPtr(GdkCursor* ptr)
    71 {
    72     if (ptr)
    73         gdk_cursor_unref(ptr);
    74 }
    75 
    76 #else
    77 
    7862template <> GtkWidgetPath* refGPtr(GtkWidgetPath* ptr)
    7963{
     
    8973}
    9074
    91 #endif
    92 
    9375}
  • trunk/Source/WebCore/platform/gtk/GRefPtrGtk.h

    r206731 r246632  
    1919 */
    2020
    21 #ifndef GRefPtrGtk_h
    22 #define GRefPtrGtk_h
     21#pragma once
    2322
    2423#include <wtf/glib/GRefPtr.h>
     
    3736#endif
    3837
    39 #ifdef GTK_API_VERSION_2
    40 template <> GdkCursor* refGPtr(GdkCursor* ptr);
    41 template <> void derefGPtr(GdkCursor* ptr);
    42 #else
    4338template <> GtkWidgetPath* refGPtr(GtkWidgetPath* ptr);
    4439template <> void derefGPtr(GtkWidgetPath* ptr);
    45 #endif
    4640
    4741}
    4842
    49 #endif
  • trunk/Source/WebCore/platform/gtk/PasteboardHelper.cpp

    r234278 r246632  
    2525
    2626#include "BitmapImage.h"
    27 #include "GtkVersioning.h"
    2827#include "SelectionData.h"
    2928#include <gtk/gtk.h>
     
    120119    }
    121120
    122 #ifndef GTK_API_VERSION_2
    123121    if (gtk_clipboard_wait_is_image_available(clipboard)) {
    124122        if (GRefPtr<GdkPixbuf> pixbuf = adoptGRef(gtk_clipboard_wait_for_image(clipboard))) {
     
    128126        }
    129127    }
    130 #endif
    131128
    132129    selection.setCanSmartReplace(gtk_clipboard_wait_is_target_available(clipboard, smartPasteAtom));
  • trunk/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp

    r246496 r246632  
    3232
    3333#include "GtkUtilities.h"
    34 #include "GtkVersioning.h"
    3534#include "NotImplemented.h"
    3635#include "TextEncoding.h"
     
    13351334{
    13361335    GdkModifierType state;
     1336    gdk_event_get_state(reinterpret_cast<GdkEvent*>(event), &state);
    13371337    guint keyval;
     1338    gdk_event_get_keyval(reinterpret_cast<GdkEvent*>(event), &keyval);
     1339
    13381340    OptionSet<PlatformEvent::Modifier> modifiers;
    1339     gdk_event_get_state(reinterpret_cast<GdkEvent*>(event), &state);
    1340 #ifndef GTK_API_VERSION_2
    1341     gdk_event_get_keyval(reinterpret_cast<GdkEvent*>(event), &keyval);
    1342 #else
    1343     keyval = event->keyval;
    1344 #endif
    13451341    if (state & GDK_SHIFT_MASK || keyval == GDK_KEY_3270_BackTab)
    13461342        modifiers.add(PlatformEvent::Modifier::ShiftKey);
     
    13661362{
    13671363    guint keyval;
     1364    gdk_event_get_keyval(reinterpret_cast<GdkEvent*>(event), &keyval);
    13681365    guint16 keycode;
    1369 #ifndef GTK_API_VERSION_2
    1370     gdk_event_get_keyval(reinterpret_cast<GdkEvent*>(event), &keyval);
    13711366    gdk_event_get_keycode(reinterpret_cast<GdkEvent*>(event), &keycode);
    1372 #else
    1373     keyval = event->keyval;
    1374     keycode = event->hardware_keycode;
    1375 #endif
    13761367
    13771368    m_text = compositionResults.simpleString.length() ? compositionResults.simpleString : singleCharacterString(keyval);
  • trunk/Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp

    r246496 r246632  
    4040PlatformMouseEvent::PlatformMouseEvent(GdkEventButton* event)
    4141{
    42     gdouble x, y, rootX, rootY;
     42    gdouble x, y;
     43    gdk_event_get_coords(reinterpret_cast<GdkEvent*>(event), &x, &y);
     44    gdouble rootX, rootY;
     45    gdk_event_get_root_coords(reinterpret_cast<GdkEvent*>(event), &rootX, &rootY);
    4346    GdkModifierType state;
     47    gdk_event_get_state(reinterpret_cast<GdkEvent*>(event), &state);
    4448    guint button;
    45 
    46     gdk_event_get_coords(reinterpret_cast<GdkEvent*>(event), &x, &y);
    47     gdk_event_get_root_coords(reinterpret_cast<GdkEvent*>(event), &rootX, &rootY);
    48     gdk_event_get_state(reinterpret_cast<GdkEvent*>(event), &state);
    49 #ifndef GTK_API_VERSION_2
    5049    gdk_event_get_button(reinterpret_cast<GdkEvent*>(event), &button);
    51 #else
    52     button = event->button;
    53 #endif
    5450
    5551    m_timestamp = wallTimeForEvent(event);
  • trunk/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp

    r246310 r246632  
    3434#include "FloatRect.h"
    3535#include "FrameView.h"
    36 #include "GtkVersioning.h"
    3736#include "HostWindow.h"
    3837#include "NotImplemented.h"
     
    221220
    222221#if ENABLE(TOUCH_EVENTS)
    223 #ifdef GTK_API_VERSION_2
    224 bool screenHasTouchDevice()
    225 {
    226     return false;
    227 }
    228 
    229 bool screenIsTouchPrimaryInputDevice()
    230 {
    231     return false;
    232 }
    233 #else // GTK_API_VERSION_2
    234222#if !GTK_CHECK_VERSION(3, 20, 0)
    235223static void deviceAddedCallback(GdkDeviceManager*, GdkDevice*);
     
    325313    return device ? gdk_device_get_source(device) == GDK_SOURCE_TOUCHSCREEN : true;
    326314}
    327 #endif // !GTK_API_VERSION_2
    328315#endif // ENABLE(TOUCH_EVENTS)
    329316
  • trunk/Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp

    r246496 r246632  
    6363    m_deltaY = 0;
    6464    GdkScrollDirection direction;
    65 #ifndef GTK_API_VERSION_2
    6665    if (!gdk_event_get_scroll_direction(reinterpret_cast<GdkEvent*>(event), &direction)) {
    6766        gdouble deltaX, deltaY;
     
    7170        }
    7271    }
    73 #else
    74     direction = event->direction;
    75 #endif
    7672
    7773    // Docs say an upwards scroll (away from the user) has a positive delta
     
    9894
    9995#if ENABLE(ASYNC_SCROLLING)
    100 #ifndef GTK_API_VERSION_2
    10196#if GTK_CHECK_VERSION(3, 20, 0)
    10297    m_phase = gdk_event_is_scroll_stop_event(reinterpret_cast<GdkEvent*>(event)) ?
     
    108103        PlatformWheelEventPhaseChanged;
    109104#endif
    110 #else
    111     m_phase = PlatformWheelEventPhaseChanged;
    112 #endif // GTK_API_VERSION_2
    113105#endif // ENABLE(ASYNC_SCROLLING)
    114106
  • trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp

    r241654 r246632  
    4747ScrollbarThemeGtk::~ScrollbarThemeGtk() = default;
    4848
    49 #ifndef GTK_API_VERSION_2
    5049static void themeChangedCallback()
    5150{
     
    837836}
    838837#endif
    839 
    840 #else // GTK_API_VERSION_2
    841 bool ScrollbarThemeGtk::hasThumb(Scrollbar&)
    842 {
    843     return false;
    844 }
    845 
    846 IntRect ScrollbarThemeGtk::backButtonRect(Scrollbar&, ScrollbarPart, bool)
    847 {
    848     return IntRect();
    849 }
    850 
    851 IntRect ScrollbarThemeGtk::forwardButtonRect(Scrollbar&, ScrollbarPart, bool)
    852 {
    853     return IntRect();
    854 }
    855 
    856 IntRect ScrollbarThemeGtk::trackRect(Scrollbar&, bool)
    857 {
    858     return IntRect();
    859 }
    860 
    861 bool ScrollbarThemeGtk::hasButtons(Scrollbar&)
    862 {
    863     return false;
    864 }
    865 #endif // GTK_API_VERSION_2
    866 
    867 }
     838}
  • trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.h

    r218799 r246632  
    2424 */
    2525
    26 #ifndef ScrollbarThemeGtk_h
    27 #define ScrollbarThemeGtk_h
     26#pragma once
    2827
    2928#include "ScrollbarThemeComposite.h"
     
    4342    IntRect trackRect(Scrollbar&, bool) override;
    4443
    45 #ifndef GTK_API_VERSION_2
    4644    ScrollbarThemeGtk();
    4745
     
    6765    bool m_hasBackButtonEndPart : 1;
    6866    bool m_usesOverlayScrollbars { false };
    69 #endif // GTK_API_VERSION_2
    7067};
    7168
    7269}
    7370
    74 #endif
  • trunk/Source/WebCore/platform/gtk/WidgetGtk.cpp

    r238336 r246632  
    3232#include "FrameView.h"
    3333#include "GraphicsContext.h"
    34 #include "GtkVersioning.h"
    3534#include "HostWindow.h"
    3635#include "IntRect.h"
  • trunk/Source/WebCore/rendering/RenderThemeGtk.cpp

    r244731 r246632  
    3434#include "Gradient.h"
    3535#include "GraphicsContext.h"
    36 #include "GtkVersioning.h"
    3736#include "HTMLInputElement.h"
    3837#include "HTMLMediaElement.h"
     
    125124}
    126125#endif
    127 
    128 #ifndef GTK_API_VERSION_2
    129126
    130127static void themeChangedCallback()
     
    20622059}
    20632060#endif // ENABLE(VIDEO)
    2064 
    2065 #endif // GTK_API_VERSION_2
    2066 }
     2061}
  • trunk/Source/WebCore/rendering/RenderThemeGtk.h

    r244635 r246632  
    4949
    5050public:
    51 #ifndef GTK_API_VERSION_2
    52 
    5351    // A method asking if the theme's controls actually care about redrawing when hovered.
    5452    bool supportsHover(const RenderStyle&) const override { return true; }
     
    190188
    191189    static IntRect calculateProgressRect(const RenderObject&, const IntRect&);
    192 #endif // GTK_API_VERSION_2
    193190};
    194191
  • trunk/Source/WebKit/ChangeLog

    r246626 r246632  
     12019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Remove support for GTK2 plugins
     4        https://bugs.webkit.org/show_bug.cgi?id=199065
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        * PlatformGTK.cmake:
     9        * Shared/Plugins/Netscape/NetscapePluginModule.cpp:
     10        (WebKit::moduleMixesGtkSymbols):
     11        * Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp:
     12        (WebKit::NetscapePluginModule::getPluginInfo):
     13        * Shared/Plugins/PluginModuleInfo.h:
     14        * Shared/gtk/WebEventFactory.cpp:
     15        (WebKit::isGdkKeyCodeFromKeyPad):
     16        (WebKit::buttonForEvent):
     17        (WebKit::WebEventFactory::createWebMouseEvent):
     18        (WebKit::WebEventFactory::createWebWheelEvent):
     19        (WebKit::WebEventFactory::createWebKeyboardEvent):
     20        (WebKit::WebEventFactory::createWebTouchEvent):
     21        * SourcesGTK.txt:
     22        * UIProcess/API/gtk/WebKitWebViewBase.cpp:
     23        * UIProcess/Launcher/glib/ProcessLauncherGLib.cpp:
     24        (WebKit::ProcessLauncher::launchProcess):
     25        * UIProcess/Plugins/PluginProcessProxy.h:
     26        * UIProcess/Plugins/gtk/PluginInfoCache.cpp:
     27        (WebKit::PluginInfoCache::getPluginInfo):
     28        (WebKit::PluginInfoCache::updatePluginInfo):
     29        * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
     30        (WebKit::PluginInfoStore::getPluginInfo):
     31        * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
     32        (WebKit::PluginProcessProxy::platformGetLaunchOptionsWithAttributes):
     33        (WebKit::PluginProcessProxy::scanPlugin):
     34        * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
     35
    1362019-06-19  Dean Jackson  <dino@apple.com>
    237
  • trunk/Source/WebKit/PlatformGTK.cmake

    r245807 r246632  
    423423    ${CAIRO_INCLUDE_DIRS}
    424424    ${ENCHANT_INCLUDE_DIRS}
     425    ${GLIB_INCLUDE_DIRS}
    425426    ${GSTREAMER_INCLUDE_DIRS}
    426427    ${GSTREAMER_PBUTILS_INCLUDE_DIRS}
     428    ${GTK_INCLUDE_DIRS}
     429    ${GTK_UNIX_PRINT_INCLUDE_DIRS}
    427430    ${HARFBUZZ_INCLUDE_DIRS}
    428431    ${LIBSOUP_INCLUDE_DIRS}
     
    448451set(WebKitCommonSystemIncludeDirectories ${WebKit_SYSTEM_INCLUDE_DIRECTORIES})
    449452
    450 list(APPEND WebKit_SYSTEM_INCLUDE_DIRECTORIES
    451     ${GLIB_INCLUDE_DIRS}
    452     ${GTK_INCLUDE_DIRS}
    453     ${GTK_UNIX_PRINT_INCLUDE_DIRS}
    454 )
    455 
    456453list(APPEND WebProcess_SOURCES
    457454    WebProcess/EntryPoint/unix/WebProcessMain.cpp
     
    467464
    468465list(APPEND WebKit_LIBRARIES
    469     PRIVATE
    470         WebCorePlatformGTK
    471         ${GTK_UNIX_PRINT_LIBRARIES}
    472 )
    473 
    474 # WebCore should be specifed before and after WebCorePlatformGTK
    475 list(APPEND WebKit_LIBRARIES PRIVATE WebCore)
     466    ${GTK_UNIX_PRINT_LIBRARIES}
     467)
    476468
    477469if (USE_WPE_RENDERER)
     
    570562    )
    571563endif ()
    572 
    573 if (ENABLE_PLUGIN_PROCESS_GTK2)
    574     set(PluginProcessGTK2_EXECUTABLE_NAME WebKitPluginProcess2)
    575 
    576     # FIXME: We should remove WebKitPluginProcess2 in 2020, once Flash is no longer supported.
    577     list(APPEND PluginProcessGTK2_SOURCES
    578         Platform/Logging.cpp
    579         Platform/Module.cpp
    580 
    581         Platform/IPC/ArgumentCoders.cpp
    582         Platform/IPC/Attachment.cpp
    583         Platform/IPC/Connection.cpp
    584         Platform/IPC/DataReference.cpp
    585         Platform/IPC/Decoder.cpp
    586         Platform/IPC/Encoder.cpp
    587         Platform/IPC/MessageReceiverMap.cpp
    588         Platform/IPC/MessageSender.cpp
    589         Platform/IPC/StringReference.cpp
    590 
    591         Platform/IPC/glib/GSocketMonitor.cpp
    592         Platform/IPC/unix/AttachmentUnix.cpp
    593         Platform/IPC/unix/ConnectionUnix.cpp
    594 
    595         Platform/glib/ModuleGlib.cpp
    596 
    597         Platform/unix/LoggingUnix.cpp
    598         Platform/unix/SharedMemoryUnix.cpp
    599 
    600         PluginProcess/PluginControllerProxy.cpp
    601         PluginProcess/PluginCreationParameters.cpp
    602         PluginProcess/PluginProcess.cpp
    603         PluginProcess/WebProcessConnection.cpp
    604 
    605         PluginProcess/EntryPoint/unix/PluginProcessMain.cpp
    606 
    607         PluginProcess/unix/PluginControllerProxyUnix.cpp
    608         PluginProcess/unix/PluginProcessMainUnix.cpp
    609         PluginProcess/unix/PluginProcessUnix.cpp
    610 
    611         Shared/ActivityAssertion.cpp
    612         Shared/AuxiliaryProcess.cpp
    613         Shared/BlobDataFileReferenceWithSandboxExtension.cpp
    614         Shared/ShareableBitmap.cpp
    615         Shared/WebCoreArgumentCoders.cpp
    616         Shared/WebEvent.cpp
    617         Shared/WebKeyboardEvent.cpp
    618         Shared/WebKit2Initialize.cpp
    619         Shared/WebMouseEvent.cpp
    620         Shared/WebPlatformTouchPoint.cpp
    621         Shared/WebTouchEvent.cpp
    622         Shared/WebWheelEvent.cpp
    623 
    624         Shared/Plugins/NPIdentifierData.cpp
    625         Shared/Plugins/NPObjectMessageReceiver.cpp
    626         Shared/Plugins/NPObjectProxy.cpp
    627         Shared/Plugins/NPRemoteObjectMap.cpp
    628         Shared/Plugins/NPVariantData.cpp
    629         Shared/Plugins/PluginProcessCreationParameters.cpp
    630 
    631         Shared/Plugins/Netscape/NetscapePluginModule.cpp
    632         Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp
    633 
    634         Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp
    635 
    636         Shared/cairo/ShareableBitmapCairo.cpp
    637 
    638         Shared/glib/ProcessExecutablePathGLib.cpp
    639 
    640         Shared/gtk/NativeWebKeyboardEventGtk.cpp
    641         Shared/gtk/NativeWebMouseEventGtk.cpp
    642         Shared/gtk/NativeWebTouchEventGtk.cpp
    643         Shared/gtk/NativeWebWheelEventGtk.cpp
    644         Shared/gtk/WebEventFactory.cpp
    645 
    646         Shared/soup/WebCoreArgumentCodersSoup.cpp
    647 
    648         Shared/unix/AuxiliaryProcessMain.cpp
    649 
    650         UIProcess/Launcher/ProcessLauncher.cpp
    651 
    652         UIProcess/Launcher/glib/BubblewrapLauncher.cpp
    653         UIProcess/Launcher/glib/FlatpakLauncher.cpp
    654         UIProcess/Launcher/glib/ProcessLauncherGLib.cpp
    655 
    656         UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
    657 
    658         WebProcess/Plugins/Plugin.cpp
    659 
    660         WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp
    661         WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
    662         WebProcess/Plugins/Netscape/NetscapePlugin.cpp
    663         WebProcess/Plugins/Netscape/NetscapePluginNone.cpp
    664         WebProcess/Plugins/Netscape/NetscapePluginStream.cpp
    665 
    666         WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp
    667         WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp
    668 
    669         ${WebKit_DERIVED_SOURCES_DIR}/AuxiliaryProcessMessageReceiver.cpp
    670         ${WebKit_DERIVED_SOURCES_DIR}/PluginControllerProxyMessageReceiver.cpp
    671         ${WebKit_DERIVED_SOURCES_DIR}/PluginProcessMessageReceiver.cpp
    672         ${WebKit_DERIVED_SOURCES_DIR}/NPObjectMessageReceiverMessageReceiver.cpp
    673         ${WebKit_DERIVED_SOURCES_DIR}/WebProcessConnectionMessageReceiver.cpp
    674     )
    675 
    676     add_executable(WebKitPluginProcess2 ${PluginProcessGTK2_SOURCES})
    677     ADD_WEBKIT_PREFIX_HEADER(WebKitPluginProcess2)
    678 
    679     # We need ENABLE_PLUGIN_PROCESS for all targets in this directory, but
    680     # we only want GTK_API_VERSION_2 for the plugin process target.
    681     set_property(
    682         TARGET WebKitPluginProcess2
    683         APPEND
    684         PROPERTY COMPILE_DEFINITIONS GTK_API_VERSION_2=1
    685     )
    686     target_include_directories(WebKitPluginProcess2 PRIVATE
    687         ${WebKitCommonIncludeDirectories}
    688     )
    689     target_include_directories(WebKitPluginProcess2 SYSTEM PRIVATE
    690          ${WebKitCommonSystemIncludeDirectories}
    691          ${GTK2_INCLUDE_DIRS}
    692          ${GDK2_INCLUDE_DIRS}
    693     )
    694 
    695     set(WebKitPluginProcess2_LIBRARIES
    696         ${SharedWebKitLibraries}
    697         PRIVATE WebCorePlatformGTK2
    698     )
    699     ADD_WHOLE_ARCHIVE_TO_LIBRARIES(WebKitPluginProcess2_LIBRARIES)
    700     target_link_libraries(WebKitPluginProcess2 ${WebKitPluginProcess2_LIBRARIES})
    701 
    702     add_dependencies(WebKitPluginProcess2 WebKit)
    703 
    704     install(TARGETS WebKitPluginProcess2 DESTINATION "${LIBEXEC_INSTALL_DIR}")
    705 
    706     if (COMPILER_IS_GCC_OR_CLANG)
    707         WEBKIT_ADD_TARGET_CXX_FLAGS(WebKitPluginProcess2 -Wno-unused-parameter)
    708     endif ()
    709 endif () # ENABLE_PLUGIN_PROCESS_GTK2
    710564
    711565# GTK3 PluginProcess
  • trunk/Source/WebKit/Shared/Plugins/Netscape/NetscapePluginModule.cpp

    r243163 r246632  
    201201static bool moduleMixesGtkSymbols(Module* module)
    202202{
    203 #ifdef GTK_API_VERSION_2
    204     return module->functionPointer<gpointer>("gtk_application_get_type");
    205 #else
    206203    return module->functionPointer<gpointer>("gtk_object_get_type");
    207 #endif
    208204}
    209205#endif
  • trunk/Source/WebKit/Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp

    r240437 r246632  
    164164    plugin.info.desc = metaData.description;
    165165    parseMIMEDescription(metaData.mimeDescription, plugin.info.mimes);
    166 #if PLATFORM(GTK)
    167     plugin.requiresGtk2 = metaData.requiresGtk2;
    168 #endif
    169166
    170167    return true;
  • trunk/Source/WebKit/Shared/Plugins/PluginModuleInfo.h

    r204462 r246632  
    5757    String shortVersionString;
    5858    bool hasSandboxProfile;
    59 #elif PLATFORM(GTK)
    60     bool requiresGtk2;
    6159#endif
    6260};
  • trunk/Source/WebKit/Shared/gtk/WebEventFactory.cpp

    r246597 r246632  
    3030
    3131#include <WebCore/GtkUtilities.h>
    32 #include <WebCore/GtkVersioning.h>
    3332#include <WebCore/PlatformKeyboardEvent.h>
    3433#include <WebCore/Scrollbar.h>
     
    4544static inline bool isGdkKeyCodeFromKeyPad(unsigned keyval)
    4645{
    47     return keyval >= GDK_KP_Space && keyval <= GDK_KP_9;
     46    return keyval >= GDK_KEY_KP_Space && keyval <= GDK_KEY_KP_9;
    4847}
    4948
     
    9796    case GDK_2BUTTON_PRESS:
    9897    case GDK_3BUTTON_PRESS:
    99     case GDK_BUTTON_RELEASE:
     98    case GDK_BUTTON_RELEASE: {
    10099        guint eventButton;
    101 #ifndef GTK_API_VERSION_2
    102100        gdk_event_get_button(event, &eventButton);
    103 #else
    104         eventButton = event->button.button;
    105 #endif
     101
    106102        if (eventButton == 1)
    107103            button = WebMouseEvent::LeftButton;
     
    111107            button = WebMouseEvent::RightButton;
    112108        break;
     109    }
    113110    default:
    114111        ASSERT_NOT_REACHED();
     
    153150
    154151    guint eventButton;
    155 #ifndef GTK_API_VERSION_2
    156152    gdk_event_get_button(event, &eventButton);
    157 #else
    158     eventButton = event->button.button;
    159 #endif
    160153
    161154    WebEvent::Type type = static_cast<WebEvent::Type>(0);
     
    205198WebWheelEvent WebEventFactory::createWebWheelEvent(const GdkEvent* event)
    206199{
    207 #ifndef GTK_API_VERSION_2
    208200#if GTK_CHECK_VERSION(3, 20, 0)
    209201    WebWheelEvent::Phase phase = gdk_event_is_scroll_stop_event(event) ?
     
    217209        WebWheelEvent::Phase::PhaseChanged;
    218210#endif
    219 #else
    220     WebWheelEvent::Phase phase = WebWheelEvent::Phase::PhaseChanged;
    221 #endif // GTK_API_VERSION_2
    222211
    223212    return createWebWheelEvent(event, phase, WebWheelEvent::Phase::PhaseNone);
     
    226215WebWheelEvent WebEventFactory::createWebWheelEvent(const GdkEvent* event, WebWheelEvent::Phase phase, WebWheelEvent::Phase momentumPhase)
    227216{
    228     double x, y, xRoot, yRoot;
     217    FloatSize wheelTicks = FloatSize(0, 0);
     218    double x, y;
     219    gdk_event_get_coords(event, &x, &y);
     220    double xRoot, yRoot;
     221    gdk_event_get_root_coords(event, &xRoot, &yRoot);
     222
    229223    GdkScrollDirection direction;
    230     FloatSize wheelTicks = FloatSize(0, 0);
    231     gdk_event_get_coords(event, &x, &y);
    232     gdk_event_get_root_coords(event, &xRoot, &yRoot);
    233 #ifndef GTK_API_VERSION_2
    234224    if (!gdk_event_get_scroll_direction(event, &direction)) {
    235225        double deltaX, deltaY;
     
    237227            wheelTicks = FloatSize(-deltaX, -deltaY);
    238228    }
    239 #else
    240     direction = event->scroll.direction;
    241 #endif
    242229
    243230    if (wheelTicks.isZero()) {
     
    280267{
    281268    guint keyval;
     269    gdk_event_get_keyval(event, &keyval);
    282270    guint16 keycode;
    283 #ifndef GTK_API_VERSION_2
    284     gdk_event_get_keyval(event, &keyval);
    285271    gdk_event_get_keycode(event, &keycode);
    286 #else
    287     keyval = event->key.keyval;
    288     keycode = event->key.hardware_keycode;
    289 #endif
     272
    290273#if GTK_CHECK_VERSION(3, 10, 0)
    291274    GdkEventType type = gdk_event_get_event_type(event);
     
    312295WebTouchEvent WebEventFactory::createWebTouchEvent(const GdkEvent* event, Vector<WebPlatformTouchPoint>&& touchPoints)
    313296{
    314 #ifndef GTK_API_VERSION_2
    315297    WebEvent::Type type = WebEvent::NoType;
    316298#if GTK_CHECK_VERSION(3, 10, 0)
     
    337319
    338320    return WebTouchEvent(type, WTFMove(touchPoints), modifiersForEvent(event), wallTimeForEvent(event));
    339 #else
    340     return WebTouchEvent();
    341 #endif // GTK_API_VERSION_2
    342321}
    343322#endif
  • trunk/Source/WebKit/SourcesGTK.txt

    r246388 r246632  
    2222// THE POSSIBILITY OF SUCH DAMAGE.
    2323
    24 // FIXME: Many of these files are built with @no-unify to avoid errors
    25 // linking PluginProcessGTK2. I don't know why this is necessary. These
    26 // annotations should be revisited after removing PluginProcessGTK2.
    27 
    2824NetworkProcess/Classifier/WebResourceLoadStatisticsStore.cpp
    2925NetworkProcess/Classifier/WebResourceLoadStatisticsTelemetry.cpp
     
    5046NetworkProcess/webrtc/NetworkRTCSocket.cpp
    5147
    52 Platform/IPC/glib/GSocketMonitor.cpp @no-unify
    53 Platform/IPC/unix/AttachmentUnix.cpp @no-unify
    54 Platform/IPC/unix/ConnectionUnix.cpp @no-unify
     48Platform/IPC/glib/GSocketMonitor.cpp
     49Platform/IPC/unix/AttachmentUnix.cpp
     50Platform/IPC/unix/ConnectionUnix.cpp
    5551
    5652Platform/classifier/ResourceLoadStatisticsClassifier.cpp
    5753
    58 Platform/glib/ModuleGlib.cpp @no-unify
    59 
    60 Platform/unix/LoggingUnix.cpp @no-unify
    61 Platform/unix/SharedMemoryUnix.cpp @no-unify
    62 
    63 PluginProcess/unix/PluginControllerProxyUnix.cpp @no-unify
    64 PluginProcess/unix/PluginProcessMainUnix.cpp @no-unify
    65 PluginProcess/unix/PluginProcessUnix.cpp @no-unify
     54Platform/glib/ModuleGlib.cpp
     55
     56Platform/unix/LoggingUnix.cpp
     57Platform/unix/SharedMemoryUnix.cpp
     58
     59PluginProcess/unix/PluginControllerProxyUnix.cpp
     60PluginProcess/unix/PluginProcessMainUnix.cpp
     61PluginProcess/unix/PluginProcessUnix.cpp
    6662
    6763Shared/API/c/cairo/WKImageCairo.cpp
     
    8177Shared/CoordinatedGraphics/threadedcompositor/ThreadedCompositor.cpp
    8278
    83 Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp @no-unify
    84 Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp @no-unify
     79Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp
     80Shared/Plugins/Netscape/unix/NetscapePluginModuleUnix.cpp
    8581
    8682Shared/Plugins/unix/PluginSearchPath.cpp
    8783
    88 Shared/cairo/ShareableBitmapCairo.cpp @no-unify
    89 
    90 Shared/glib/ProcessExecutablePathGLib.cpp @no-unify
     84Shared/cairo/ShareableBitmapCairo.cpp
     85
     86Shared/glib/ProcessExecutablePathGLib.cpp
    9187Shared/glib/WebContextMenuItemGlib.cpp
    9288
     
    10399Shared/linux/WebMemorySamplerLinux.cpp
    104100
    105 Shared/soup/WebCoreArgumentCodersSoup.cpp @no-unify
     101Shared/soup/WebCoreArgumentCodersSoup.cpp
    106102Shared/soup/WebErrorsSoup.cpp
    107103
    108 Shared/unix/AuxiliaryProcessMain.cpp @no-unify
     104Shared/unix/AuxiliaryProcessMain.cpp
    109105
    110106UIProcess/BackingStore.cpp
     
    112108UIProcess/LegacySessionStateCodingNone.cpp
    113109UIProcess/ViewGestureController.cpp
    114 UIProcess/ViewSnapshotStore.cpp @no-unify
     110UIProcess/ViewSnapshotStore.cpp
    115111UIProcess/WebGrammarDetail.cpp
    116 UIProcess/WebMemoryPressureHandler.cpp @no-unify
     112UIProcess/WebMemoryPressureHandler.cpp
    117113UIProcess/WebTextChecker.cpp
    118114UIProcess/WebTextCheckerClient.cpp
     
    221217UIProcess/linux/MemoryPressureMonitor.cpp
    222218
    223 UIProcess/Plugins/gtk/PluginInfoCache.cpp @no-unify
    224 
    225 UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp @no-unify
    226 UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp @no-unify
     219UIProcess/Plugins/gtk/PluginInfoCache.cpp
     220
     221UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp
     222UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp
    227223
    228224UIProcess/WebsiteData/soup/WebsiteDataStoreSoup.cpp
     
    238234UIProcess/gstreamer/WebPageProxyGStreamer.cpp
    239235
    240 UIProcess/gtk/AcceleratedBackingStore.cpp  @no-unify
     236UIProcess/gtk/AcceleratedBackingStore.cpp
    241237UIProcess/gtk/AcceleratedBackingStoreWayland.cpp @no-unify
    242238UIProcess/gtk/AcceleratedBackingStoreX11.cpp @no-unify
     
    244240UIProcess/gtk/GestureController.cpp
    245241UIProcess/gtk/HardwareAccelerationManager.cpp
    246 UIProcess/gtk/InputMethodFilter.cpp @no-unify
     242UIProcess/gtk/InputMethodFilter.cpp
    247243UIProcess/gtk/KeyBindingTranslator.cpp
    248 UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp @no-unify
     244UIProcess/gtk/RemoteWebInspectorProxyGtk.cpp
    249245UIProcess/gtk/TextCheckerGtk.cpp @no-unify
    250246UIProcess/gtk/ViewGestureControllerGtk.cpp @no-unify
    251 UIProcess/gtk/ViewSnapshotStoreGtk.cpp @no-unify
     247UIProcess/gtk/ViewSnapshotStoreGtk.cpp
    252248UIProcess/gtk/WaylandCompositor.cpp @no-unify
    253 UIProcess/gtk/WebColorPickerGtk.cpp @no-unify
     249UIProcess/gtk/WebColorPickerGtk.cpp
    254250UIProcess/gtk/WebContextMenuProxyGtk.cpp
    255251UIProcess/gtk/WebInspectorProxyGtk.cpp
     
    391387WebProcess/MediaCache/WebMediaKeyStorageManager.cpp
    392388
    393 WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp @no-unify
    394 WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp @no-unify
     389WebProcess/Plugins/Netscape/unix/NetscapePluginUnix.cpp
     390WebProcess/Plugins/Netscape/unix/PluginProxyUnix.cpp
    395391
    396392WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp @no-unify
  • trunk/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp

    r246592 r246632  
    5555#include <WebCore/GUniquePtrGtk.h>
    5656#include <WebCore/GtkUtilities.h>
    57 #include <WebCore/GtkVersioning.h>
    5857#include <WebCore/NotImplemented.h>
    5958#include <WebCore/PasteboardHelper.h>
  • trunk/Source/WebKit/UIProcess/Launcher/glib/ProcessLauncherGLib.cpp

    r241816 r246632  
    8888    case ProcessLauncher::ProcessType::Plugin32:
    8989        executablePath = executablePathOfPluginProcess();
    90 #if ENABLE(PLUGIN_PROCESS_GTK2)
    91         if (m_launchOptions.extraInitializationData.contains("requires-gtk2"))
    92             executablePath.append('2');
    93 #endif
    9490        pluginPath = m_launchOptions.extraInitializationData.get("plugin-path");
    9591        realPluginPath = FileSystem::fileSystemRepresentation(pluginPath);
  • trunk/Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h

    r243258 r246632  
    5454    String description;
    5555    String mimeDescription;
    56 
    57 #if PLATFORM(GTK)
    58     bool requiresGtk2;
    59 #endif
    6056};
    6157#endif
  • trunk/Source/WebKit/UIProcess/Plugins/gtk/PluginInfoCache.cpp

    r240437 r246632  
    134134#endif
    135135
    136     plugin.requiresGtk2 = g_key_file_get_boolean(m_cacheFile.get(), pluginGroup.data(), "requires-gtk2", nullptr);
    137 
    138136    return true;
    139137}
     
    155153#endif
    156154
    157     g_key_file_set_boolean(m_cacheFile.get(), pluginGroup.data(), "requires-gtk2", plugin.requiresGtk2);
    158 
    159155    if (m_cachePath && !m_readOnlyMode) {
    160156        // Save the cache file in an idle to make sure it happens in the main thread and
  • trunk/Source/WebKit/UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp

    r240437 r246632  
    7373{
    7474#if PLATFORM(GTK)
    75     if (PluginInfoCache::singleton().getPluginInfo(pluginPath, plugin)) {
    76 #if ENABLE(PLUGIN_PROCESS_GTK2)
    77         if (plugin.requiresGtk2) {
    78             if (PlatformDisplay::sharedDisplay().type() != PlatformDisplay::Type::X11)
    79                 return false;
    80             String pluginProcessPath = executablePathOfPluginProcess();
    81             pluginProcessPath.append('2');
    82             if (!FileSystem::fileExists(pluginProcessPath))
    83                 return false;
    84         }
    85 #endif
     75    if (PluginInfoCache::singleton().getPluginInfo(pluginPath, plugin))
    8676        return true;
    87     }
    8877
    8978    if (NetscapePluginModule::getPluginInfo(pluginPath, plugin)) {
  • trunk/Source/WebKit/UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp

    r240437 r246632  
    5454{
    5555    launchOptions.processType = ProcessLauncher::ProcessType::Plugin64;
    56 
    5756    launchOptions.extraInitializationData.add("plugin-path", pluginProcessAttributes.moduleInfo.path);
    58 #if PLATFORM(GTK)
    59     if (pluginProcessAttributes.moduleInfo.requiresGtk2)
    60         launchOptions.extraInitializationData.add("requires-gtk2", emptyString());
    61 #endif
    6257}
    6358
     
    8277
    8378#if PLATFORM(GTK)
    84     bool requiresGtk2 = pluginRequiresGtk2(pluginPath);
    85     if (requiresGtk2) {
    86 #if PLATFORM(WAYLAND)
    87         if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland)
    88             return false;
    89 #endif
    90 #if ENABLE(PLUGIN_PROCESS_GTK2)
    91         pluginProcessPath.append('2');
    92         if (!FileSystem::fileExists(pluginProcessPath))
    93             return false;
    94 #else
     79    if (pluginRequiresGtk2(pluginPath))
    9580        return false;
    96 #endif
    97     }
    9881#endif
    9982
     
    148131    result.description.swap(lines[1]);
    149132    result.mimeDescription.swap(lines[2]);
    150 #if PLATFORM(GTK)
    151     result.requiresGtk2 = requiresGtk2;
    152 #endif
    153133    return !result.mimeDescription.isEmpty();
    154134}
  • trunk/Source/WebKit/WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp

    r228521 r246632  
    4040#if PLATFORM(GTK)
    4141#include <gtk/gtk.h>
    42 #ifndef GTK_API_VERSION_2
    4342#include <gtk/gtkx.h>
    44 #endif
    45 #include <gdk/gdkx.h>
    46 #include <WebCore/GtkVersioning.h>
    4743#endif
    4844
  • trunk/Source/cmake/OptionsGTK.cmake

    r246495 r246632  
    7878WEBKIT_OPTION_DEFINE(ENABLE_INTROSPECTION "Whether to enable GObject introspection." PUBLIC ON)
    7979WEBKIT_OPTION_DEFINE(ENABLE_OPENGL "Whether to use OpenGL." PUBLIC ON)
    80 WEBKIT_OPTION_DEFINE(ENABLE_PLUGIN_PROCESS_GTK2 "Whether to build WebKitPluginProcess2 to load GTK2 based plugins." PUBLIC ON)
    8180WEBKIT_OPTION_DEFINE(ENABLE_QUARTZ_TARGET "Whether to enable support for the Quartz windowing target." PUBLIC ${GTK3_SUPPORTS_QUARTZ})
    8281WEBKIT_OPTION_DEFINE(ENABLE_X11_TARGET "Whether to enable support for the X11 windowing target." PUBLIC ${GTK3_SUPPORTS_X11})
     
    10099WEBKIT_OPTION_DEPEND(ENABLE_ASYNC_SCROLLING ENABLE_OPENGL)
    101100WEBKIT_OPTION_DEPEND(ENABLE_GLES2 ENABLE_OPENGL)
    102 WEBKIT_OPTION_DEPEND(ENABLE_PLUGIN_PROCESS_GTK2 ENABLE_X11_TARGET)
    103101WEBKIT_OPTION_DEPEND(ENABLE_WEBGL ENABLE_OPENGL)
    104102WEBKIT_OPTION_DEPEND(USE_WPE_RENDERER ENABLE_OPENGL)
     
    305303    SET_AND_EXPOSE_TO_BUILD(USE_COORDINATED_GRAPHICS TRUE)
    306304    SET_AND_EXPOSE_TO_BUILD(USE_NICOSIA TRUE)
    307 endif ()
    308 
    309 if (ENABLE_PLUGIN_PROCESS_GTK2)
    310     find_package(GTK2 2.24.10 REQUIRED)
    311     find_package(GDK2 2.24.10 REQUIRED)
    312305endif ()
    313306
  • trunk/Tools/ChangeLog

    r246630 r246632  
     12019-06-20  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        [GTK] Remove support for GTK2 plugins
     4        https://bugs.webkit.org/show_bug.cgi?id=199065
     5
     6        Reviewed by Sergio Villar Senin.
     7
     8        * EWSTools/ubuntu-ews-packages:
     9        * TestWebKitAPI/PlatformGTK.cmake:
     10        * WebKitTestRunner/PlatformGTK.cmake:
     11        * flatpak/org.webkit.GTK.yaml:
     12        * gtk/install-dependencies:
     13
    1142019-06-19  Yusuke Suzuki  <ysuzuki@apple.com>
    215
  • trunk/Tools/EWSTools/ubuntu-ews-packages

    r239553 r246632  
    2929libpam0g-dev
    3030libtool
    31 libgtk2.0-dev
    3231libpango1.0-dev
    3332libicu-dev
  • trunk/Tools/TestWebKitAPI/PlatformGTK.cmake

    r246590 r246632  
    4848    ${GDK3_LIBRARIES}
    4949    ${GTK3_LIBRARIES}
    50 
    51     WebCorePlatformGTK
    5250)
    5351ADD_WHOLE_ARCHIVE_TO_LIBRARIES(TestWebCore_LIBRARIES)
  • trunk/Tools/WebKitTestRunner/PlatformGTK.cmake

    r245968 r246632  
    3131    ${GLIB_LIBRARIES}
    3232    WebCore
    33     WebCorePlatformGTK
    3433)
    3534
  • trunk/Tools/flatpak/org.webkit.GTK.yaml

    r246256 r246632  
    8989    - --without-dtrace
    9090
    91 # Required for the GTK2 plugin process
    92 - name: gtk2
    93   sources:
    94   - type: archive
    95     url: https://download.gnome.org/sources/gtk+/2.24/gtk+-2.24.32.tar.xz
    96     sha256: b6c8a93ddda5eabe3bfee1eb39636c9a03d2a56c7b62828b359bf197943c582e
    97   - type: script
    98     commands:
    99       - "sed -i '1s/python$/&2/' gtk/gtk-builder-convert"
    100       - "sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool"
    101   config-opts:
    102     - --disable-gtk-doc
    103     - --disable-cups
    104     - --disable-papi
    105     - --enable-introspection=no
    106     - --with-gdktarget=x11
    107 
    10891# Required for run-gtk-tests
    10992- name: pycairo
  • trunk/Tools/gtk/install-dependencies

    r244214 r246632  
    113113        libgl1-mesa-dev \
    114114        libgl1-mesa-glx \
    115         libgtk2.0-dev \
    116115        libgtk-3-dev \
    117116        libgstreamer1.0-dev \
     
    283282        mesa \
    284283        mesa-libgl \
    285         gtk2 \
    286284        gtk3 \
    287285        libsystemd \
     
    435433        gstreamer1-plugins-base-devel \
    436434        gtk-doc \
    437         gtk2-devel \
    438435        gtk3-devel \
    439436        hyphen-devel \
Note: See TracChangeset for help on using the changeset viewer.