WebKit Bugzilla
Attachment 372607 Details for
Bug 199094
: [WPE][GTK] Bump minimum versions of GLib, GTK, libsoup, ATK, GStreamer, and Cairo
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-199094-20190620203039.patch (text/plain), 206.70 KB, created by
Michael Catanzaro
on 2019-06-20 18:30:40 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Michael Catanzaro
Created:
2019-06-20 18:30:40 PDT
Size:
206.70 KB
patch
obsolete
>Subversion Revision: 246662 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 3ab049d81845fc7502cdd23dd2fb63a6a0cd6eb7..c1a2f0fd6a80ae2eb777a5ac4dc874cf1c9f0c88 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,123 @@ >+2019-06-20 Michael Catanzaro <mcatanzaro@igalia.com> >+ >+ [WPE][GTK] Bump minimum versions of GLib, GTK, libsoup, ATK, GStreamer, and Cairo >+ https://bugs.webkit.org/show_bug.cgi?id=199094 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * accessibility/atk/AXObjectCacheAtk.cpp: >+ (WebCore::AXObjectCache::postPlatformNotification): >+ * accessibility/atk/WebKitAccessible.cpp: >+ (atkRole): >+ (setAtkStateSetFromCoreObject): >+ (interfaceMaskFromObject): >+ * accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp: >+ * accessibility/atk/WebKitAccessibleInterfaceTableCell.h: >+ * accessibility/atk/WebKitAccessibleInterfaceText.cpp: >+ (webkitAccessibleTextGetStringAtOffset): >+ (webkitAccessibleTextInterfaceInit): >+ * accessibility/atk/WebKitAccessibleInterfaceValue.cpp: >+ (webkitAccessibleValueInterfaceInit): >+ * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp: >+ (WebCore::AudioTrackPrivateGStreamer::kind const): >+ * platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h: >+ * platform/graphics/gstreamer/GRefPtrGStreamer.cpp: >+ (WTF::derefGPtr<GstStreamCollection>): >+ * platform/graphics/gstreamer/GRefPtrGStreamer.h: >+ * platform/graphics/gstreamer/GStreamerCommon.cpp: >+ (WebCore::initializeGStreamerAndRegisterWebKitElements): >+ * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp: >+ (WebCore::InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer): >+ * platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h: >+ (WebCore::InbandTextTrackPrivateGStreamer::create): >+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp: >+ (WebCore::MediaPlayerPrivateGStreamer::load): >+ (WebCore::MediaPlayerPrivateGStreamer::updateTracks): >+ (WebCore::MediaPlayerPrivateGStreamer::enableTrack): >+ (WebCore::MediaPlayerPrivateGStreamer::handleMessage): >+ (WebCore::MediaPlayerPrivateGStreamer::sourceSetup): >+ (WebCore::MediaPlayerPrivateGStreamer::handleSyncMessage): >+ (WebCore::MediaPlayerPrivateGStreamer::supportsType): >+ (WebCore::MediaPlayerPrivateGStreamer::createGSTPlayBin): >+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h: >+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp: >+ (WebCore::MediaPlayerPrivateGStreamerBase::requestGLContext): >+ * platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h: >+ * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp: >+ (WebCore::TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer): >+ (WebCore::TrackPrivateBaseGStreamer::disconnect): >+ (WebCore::TrackPrivateBaseGStreamer::tagsChanged): >+ * platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h: >+ (WebCore::TrackPrivateBaseGStreamer::stream): >+ * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp: >+ (WebCore::VideoTrackPrivateGStreamer::kind const): >+ * platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h: >+ * platform/gtk/PlatformKeyboardEventGtk.cpp: >+ (WebCore::eventTypeForGdkKeyEvent): >+ * platform/gtk/PlatformMouseEventGtk.cpp: >+ (WebCore::PlatformMouseEvent::PlatformMouseEvent): >+ * platform/gtk/PlatformScreenGtk.cpp: >+ (WebCore::screenRect): >+ (WebCore::screenAvailableRect): >+ (WebCore::screenHasTouchDevice): >+ (WebCore::screenIsTouchPrimaryInputDevice): >+ (WebCore::getScreen): Deleted. >+ (): Deleted. >+ (WebCore::isTouchDevice): Deleted. >+ (WebCore::deviceAddedCallback): Deleted. >+ (WebCore::deviceRemovedCallback): Deleted. >+ * platform/gtk/PlatformWheelEventGtk.cpp: >+ (WebCore::PlatformWheelEvent::PlatformWheelEvent): >+ * platform/gtk/RenderThemeGadget.cpp: >+ * platform/gtk/RenderThemeGadget.h: >+ * platform/gtk/RenderThemeWidget.cpp: >+ * platform/gtk/RenderThemeWidget.h: >+ * platform/gtk/ScrollbarThemeGtk.cpp: >+ (WebCore::ScrollbarThemeGtk::ScrollbarThemeGtk): >+ (WebCore::ScrollbarThemeGtk::themeChanged): >+ (WebCore::ScrollbarThemeGtk::updateThemeProperties): >+ (WebCore::ScrollbarThemeGtk::trackRect): >+ (WebCore::ScrollbarThemeGtk::forwardButtonRect): >+ (WebCore::ScrollbarThemeGtk::paint): >+ (WebCore::ScrollbarThemeGtk::scrollbarThickness): >+ (WebCore::createStyleContext): Deleted. >+ (WebCore::createChildStyleContext): Deleted. >+ (WebCore::paintStepper): Deleted. >+ (WebCore::adjustRectAccordingToMargin): Deleted. >+ * platform/mediastream/gstreamer/GStreamerCapturer.cpp: >+ * platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp: >+ * platform/network/soup/ResourceRequest.h: >+ (WebCore::toSoupMessagePriority): >+ * platform/network/soup/SoupNetworkSession.cpp: >+ (WebCore::SoupNetworkSession::SoupNetworkSession): >+ * rendering/RenderThemeGtk.cpp: >+ (WebCore::themePartStateFlags): >+ (WebCore::paintToggle): >+ (WebCore::RenderThemeGtk::paintButton): >+ (WebCore::menuListColor): >+ (WebCore::RenderThemeGtk::paintMenuList): >+ (WebCore::RenderThemeGtk::paintTextField): >+ (WebCore::adjustSearchFieldIconStyle): >+ (WebCore::RenderThemeGtk::paintSearchFieldCancelButton): >+ (WebCore::RenderThemeGtk::paintSliderThumb): >+ (WebCore::RenderThemeGtk::paintProgressBar): >+ (WebCore::RenderThemeGtk::paintInnerSpinButton): >+ (WebCore::styleColor): >+ (WebCore::RenderThemeGtk::systemColor const): >+ (WebCore::RenderThemeGtk::paintMediaButton): >+ (WebCore::createStyleContext): Deleted. >+ (WebCore::loadThemedIcon): Deleted. >+ (WebCore::gtkTextDirection): Deleted. >+ (WebCore::gtkIconStateFlags): Deleted. >+ (WebCore::adjustRectForFocus): Deleted. >+ (WebCore::renderButton): Deleted. >+ (WebCore::getIconSizeForPixelSize): Deleted. >+ (WebCore::paintIcon): Deleted. >+ (WebCore::paintEntryIcon): Deleted. >+ (WebCore::centerRectVerticallyInParentInputElement): Deleted. >+ (WebCore::spinButtonArrowSize): Deleted. >+ (WebCore::paintSpinArrowButton): Deleted. >+ > 2019-06-20 Greg Doolittle <gr3g@apple.com> > > Web Inspector: AXI: Audit: image label test is throwing spurious errors on elements with existing alt attr, but no value: <img alt> >diff --git a/Source/WebKit/ChangeLog b/Source/WebKit/ChangeLog >index 759c75f3d1a067c73de6549e62cd2c26495a0d2e..a6ae657ff7cd1b56d3016915be32ffaedb7e3b40 100644 >--- a/Source/WebKit/ChangeLog >+++ b/Source/WebKit/ChangeLog >@@ -1,3 +1,86 @@ >+2019-06-20 Michael Catanzaro <mcatanzaro@igalia.com> >+ >+ [WPE][GTK] Bump minimum versions of GLib, GTK, libsoup, ATK, GStreamer, and Cairo >+ https://bugs.webkit.org/show_bug.cgi?id=199094 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * NetworkProcess/soup/NetworkDataTaskSoup.cpp: >+ (WebKit::NetworkDataTaskSoup::createRequest): >+ (WebKit::NetworkDataTaskSoup::writeDownloadCallback): >+ (WebKit::NetworkDataTaskSoup::writeDownload): >+ (WebKit::NetworkDataTaskSoup::startingCallback): >+ (WebKit::NetworkDataTaskSoup::requestStartedCallback): Deleted. >+ * Shared/gtk/WebEventFactory.cpp: >+ (WebKit::buttonForEvent): >+ (WebKit::WebEventFactory::createWebMouseEvent): >+ (WebKit::WebEventFactory::createWebWheelEvent): >+ (WebKit::WebEventFactory::createWebKeyboardEvent): >+ (WebKit::WebEventFactory::createWebTouchEvent): >+ * UIProcess/API/gtk/PageClientImpl.cpp: >+ (WebKit::PageClientImpl::doneWithTouchEvent): >+ * UIProcess/API/gtk/WebKitWebViewBase.cpp: >+ (ClickCounter::currentClickCountForGdkButtonEvent): >+ (webkitWebViewBaseRealize): >+ (webkitWebViewBaseHandleMouseEvent): >+ (webkitWebViewBaseGetTouchPointsForEvent): >+ (webkitWebViewBaseTouchEvent): >+ (webkitWebViewBaseGestureController): >+ (webkitWebViewBaseEvent): >+ (deviceScaleFactorChanged): >+ (webkitWebViewBaseCreateWebPage): >+ (webkitWebViewBaseTakeViewSnapshot): >+ * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: >+ * UIProcess/API/gtk/WebKitWebViewDialog.cpp: >+ (webkitWebViewDialogDraw): >+ (webkitWebViewDialogConstructed): >+ (webkit_web_view_dialog_class_init): >+ * UIProcess/API/gtk/WebKitWebViewGtk.cpp: >+ (fileChooserDialogResponseCallback): >+ (webkitWebViewRunFileChooser): >+ * UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp: >+ (WebKit::doMouseEvent): >+ (WebKit::doMotionEvent): >+ (WebKit::doKeyStrokeEvent): >+ * UIProcess/WebPageProxy.h: >+ * UIProcess/gtk/AcceleratedBackingStoreWayland.cpp: >+ (WebKit::AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland): >+ (WebKit::AcceleratedBackingStoreWayland::tryEnsureGLContext): >+ (WebKit::AcceleratedBackingStoreWayland::makeContextCurrent): >+ (WebKit::AcceleratedBackingStoreWayland::paint): >+ * UIProcess/gtk/AcceleratedBackingStoreWayland.h: >+ * UIProcess/gtk/DragAndDropHandler.cpp: >+ (WebKit::DragAndDropHandler::startDrag): >+ (WebKit::DragAndDropHandler::fillDragData): >+ (WebKit::DragAndDropHandler::finishDrag): >+ * UIProcess/gtk/DragAndDropHandler.h: >+ * UIProcess/gtk/GestureController.cpp: >+ (WebKit::GestureController::handleEvent): >+ * UIProcess/gtk/GestureController.h: >+ * UIProcess/gtk/InputMethodFilter.cpp: >+ (WebKit::InputMethodFilter::filterKeyEvent): >+ (WebKit::InputMethodFilter::logHandleKeyboardEventForTesting): >+ (WebKit::InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting): >+ * UIProcess/gtk/ViewGestureControllerGtk.cpp: >+ (WebKit::isEventStop): >+ (WebKit::createScrollEvent): >+ * UIProcess/gtk/WebContextMenuProxyGtk.cpp: >+ (WebKit::WebContextMenuProxyGtk::append): >+ (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): >+ (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): >+ * UIProcess/gtk/WebKitInspectorWindow.cpp: >+ (webkit_inspector_window_init): >+ (webkitInspectorWindowSetSubtitle): >+ * UIProcess/gtk/WebPageProxyGtk.cpp: >+ (WebKit::WebPageProxy::getCenterForZoomGesture): >+ * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: >+ (WebKit::WebPopupMenuProxyGtk::showPopupMenu): >+ (WebKit::WebPopupMenuProxyGtk::hidePopupMenu): >+ * WebProcess/WebPage/WebPage.h: >+ * WebProcess/WebPage/WebPage.messages.in: >+ * WebProcess/WebPage/gtk/WebPageGtk.cpp: >+ (WebKit::WebPage::getCenterForZoomGesture): >+ > 2019-06-20 Brady Eidson <beidson@apple.com> > > WebURLSchemeHandlerProxy::loadSynchronously crash with sync request. >diff --git a/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp b/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp >index a05ec17970ad1ef6759f54a54fe15d8752b62a27..6c652f47610070d4ba976b98cb75c8e624861719 100644 >--- a/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp >+++ b/Source/WebCore/accessibility/atk/AXObjectCacheAtk.cpp >@@ -240,13 +240,10 @@ void AXObjectCache::postPlatformNotification(AccessibilityObject* coreObject, AX > propertyValues.property_name = "accessible-value"; > > memset(&propertyValues.new_value, 0, sizeof(GValue)); >-#if ATK_CHECK_VERSION(2,11,92) >+ > double value; > atk_value_get_value_and_text(ATK_VALUE(axObject), &value, nullptr); > g_value_set_double(g_value_init(&propertyValues.new_value, G_TYPE_DOUBLE), value); >-#else >- atk_value_get_current_value(ATK_VALUE(axObject), &propertyValues.new_value); >-#endif > > g_signal_emit_by_name(axObject, "property-change::accessible-value", &propertyValues, NULL); > } >@@ -288,9 +285,7 @@ void AXObjectCache::postPlatformNotification(AccessibilityObject* coreObject, AX > break; > > case AXReadOnlyStatusChanged: >-#if ATK_CHECK_VERSION(2,15,3) > atk_object_notify_state_change(axObject, ATK_STATE_READ_ONLY, !coreObject->canSetValueAttribute()); >-#endif > break; > > case AXRequiredStatusChanged: >diff --git a/Source/WebCore/accessibility/atk/WebKitAccessible.cpp b/Source/WebCore/accessibility/atk/WebKitAccessible.cpp >index 9c77a04a4ce9a0440daaa0036786c0d19503d0a2..f47efc52f7656dd2081a4f76c2bc6b5d2fa6394f 100644 >--- a/Source/WebCore/accessibility/atk/WebKitAccessible.cpp >+++ b/Source/WebCore/accessibility/atk/WebKitAccessible.cpp >@@ -586,14 +586,9 @@ static AtkRole atkRole(AccessibilityObject* coreObject) > case AccessibilityRole::Unknown: > return ATK_ROLE_UNKNOWN; > case AccessibilityRole::Audio: >-#if ATK_CHECK_VERSION(2, 11, 3) > return ATK_ROLE_AUDIO; >-#endif > case AccessibilityRole::Video: >-#if ATK_CHECK_VERSION(2, 11, 3) > return ATK_ROLE_VIDEO; >-#endif >- return ATK_ROLE_EMBEDDED; > case AccessibilityRole::Button: > return ATK_ROLE_PUSH_BUTTON; > case AccessibilityRole::Switch: >@@ -613,11 +608,7 @@ static AtkRole atkRole(AccessibilityObject* coreObject) > case AccessibilityRole::SearchField: > return ATK_ROLE_ENTRY; > case AccessibilityRole::StaticText: >-#if ATK_CHECK_VERSION(2, 15, 2) > return ATK_ROLE_STATIC; >-#else >- return ATK_ROLE_TEXT; >-#endif > case AccessibilityRole::Outline: > case AccessibilityRole::Tree: > return ATK_ROLE_TREE; >@@ -658,8 +649,8 @@ static AtkRole atkRole(AccessibilityObject* coreObject) > return ATK_ROLE_SPLIT_PANE; > case AccessibilityRole::Splitter: > return ATK_ROLE_SEPARATOR; >- case AccessibilityRole::ColorWell: > #if PLATFORM(GTK) >+ case AccessibilityRole::ColorWell: > // ATK_ROLE_COLOR_CHOOSER is defined as a dialog (i.e. it's what appears when you push the button). > return ATK_ROLE_PUSH_BUTTON; > #endif >@@ -706,9 +697,7 @@ static AtkRole atkRole(AccessibilityObject* coreObject) > case AccessibilityRole::ListMarker: > return ATK_ROLE_TEXT; > case AccessibilityRole::DocumentArticle: >-#if ATK_CHECK_VERSION(2, 11, 3) > return ATK_ROLE_ARTICLE; >-#endif > case AccessibilityRole::Document: > case AccessibilityRole::GraphicsDocument: > return ATK_ROLE_DOCUMENT_FRAME; >@@ -729,11 +718,9 @@ static AtkRole atkRole(AccessibilityObject* coreObject) > case AccessibilityRole::Legend: > return ATK_ROLE_LABEL; > case AccessibilityRole::Blockquote: >-#if ATK_CHECK_VERSION(2, 11, 3) > return ATK_ROLE_BLOCK_QUOTE; >-#endif >- case AccessibilityRole::Footnote: > #if ATK_CHECK_VERSION(2, 25, 2) >+ case AccessibilityRole::Footnote: > return ATK_ROLE_FOOTNOTE; > #endif > case AccessibilityRole::ApplicationTextGroup: >@@ -745,10 +732,8 @@ static AtkRole atkRole(AccessibilityObject* coreObject) > case AccessibilityRole::Footer: > return ATK_ROLE_FOOTER; > case AccessibilityRole::Form: >-#if ATK_CHECK_VERSION(2, 11, 3) > if (coreObject->ariaRoleAttribute() != AccessibilityRole::Unknown) > return ATK_ROLE_LANDMARK; >-#endif > return ATK_ROLE_FORM; > case AccessibilityRole::Canvas: > return ATK_ROLE_CANVAS; >@@ -764,7 +749,6 @@ static AtkRole atkRole(AccessibilityObject* coreObject) > return ATK_ROLE_DOCUMENT_WEB; > case AccessibilityRole::WebApplication: > return ATK_ROLE_EMBEDDED; >-#if ATK_CHECK_VERSION(2, 11, 3) > case AccessibilityRole::ApplicationLog: > return ATK_ROLE_LOG; > case AccessibilityRole::ApplicationMarquee: >@@ -786,7 +770,6 @@ static AtkRole atkRole(AccessibilityObject* coreObject) > return ATK_ROLE_TABLE_CELL; > if (coreObject->isMathSubscriptSuperscript() || coreObject->isMathMultiscript()) > return ATK_ROLE_SECTION; >-#if ATK_CHECK_VERSION(2, 15, 4) > if (coreObject->isMathFraction()) > return ATK_ROLE_MATH_FRACTION; > if (coreObject->isMathSquareRoot() || coreObject->isMathRoot()) >@@ -797,11 +780,8 @@ static AtkRole atkRole(AccessibilityObject* coreObject) > if (coreObject->isMathScriptObject(AccessibilityMathScriptObjectType::Superscript) > || coreObject->isMathMultiscriptObject(AccessibilityMathMultiscriptObjectType::PreSuperscript) || coreObject->isMathMultiscriptObject(AccessibilityMathMultiscriptObjectType::PostSuperscript)) > return ATK_ROLE_SUPERSCRIPT; >-#endif >-#if ATK_CHECK_VERSION(2, 15, 2) > if (coreObject->isMathToken()) > return ATK_ROLE_STATIC; >-#endif > return ATK_ROLE_UNKNOWN; > case AccessibilityRole::LandmarkBanner: > case AccessibilityRole::LandmarkComplementary: >@@ -812,8 +792,6 @@ static AtkRole atkRole(AccessibilityObject* coreObject) > case AccessibilityRole::LandmarkRegion: > case AccessibilityRole::LandmarkSearch: > return ATK_ROLE_LANDMARK; >-#endif >-#if ATK_CHECK_VERSION(2, 11, 4) > case AccessibilityRole::DescriptionList: > return ATK_ROLE_DESCRIPTION_LIST; > case AccessibilityRole::Term: >@@ -821,21 +799,16 @@ static AtkRole atkRole(AccessibilityObject* coreObject) > return ATK_ROLE_DESCRIPTION_TERM; > case AccessibilityRole::DescriptionListDetail: > return ATK_ROLE_DESCRIPTION_VALUE; >-#endif > case AccessibilityRole::Inline: >-#if ATK_CHECK_VERSION(2, 15, 4) > if (coreObject->isSubscriptStyleGroup()) > return ATK_ROLE_SUBSCRIPT; > if (coreObject->isSuperscriptStyleGroup()) > return ATK_ROLE_SUPERSCRIPT; >-#endif >-#if ATK_CHECK_VERSION(2, 15, 2) > return ATK_ROLE_STATIC; > case AccessibilityRole::SVGTextPath: > case AccessibilityRole::SVGTSpan: > case AccessibilityRole::Time: > return ATK_ROLE_STATIC; >-#endif > default: > return ATK_ROLE_UNKNOWN; > } >@@ -898,10 +871,8 @@ static void setAtkStateSetFromCoreObject(AccessibilityObject* coreObject, AtkSta > if (coreObject->isBusy()) > atk_state_set_add_state(stateSet, ATK_STATE_BUSY); > >-#if ATK_CHECK_VERSION(2,11,2) > if (coreObject->supportsChecked() && coreObject->canSetValueAttribute()) > atk_state_set_add_state(stateSet, ATK_STATE_CHECKABLE); >-#endif > > if (coreObject->isChecked()) > atk_state_set_add_state(stateSet, ATK_STATE_CHECKED); >@@ -963,10 +934,8 @@ static void setAtkStateSetFromCoreObject(AccessibilityObject* coreObject, AtkSta > if (coreObject->isPressed()) > atk_state_set_add_state(stateSet, ATK_STATE_PRESSED); > >-#if ATK_CHECK_VERSION(2,15,3) > if (!coreObject->canSetValueAttribute() && (coreObject->supportsReadOnly())) > atk_state_set_add_state(stateSet, ATK_STATE_READ_ONLY); >-#endif > > if (coreObject->isRequired()) > atk_state_set_add_state(stateSet, ATK_STATE_REQUIRED); >@@ -1112,9 +1081,7 @@ static const GInterfaceInfo atkInterfacesInitFunctions[] = { > {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleComponentInterfaceInit)), nullptr, nullptr}, > {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleImageInterfaceInit)), nullptr, nullptr}, > {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleTableInterfaceInit)), nullptr, nullptr}, >-#if ATK_CHECK_VERSION(2,11,90) > {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleTableCellInterfaceInit)), nullptr, nullptr}, >-#endif > {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleHypertextInterfaceInit)), nullptr, nullptr}, > {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleHyperlinkImplInterfaceInit)), nullptr, nullptr}, > {reinterpret_cast<GInterfaceInitFunc>(reinterpret_cast<GCallback>(webkitAccessibleDocumentInterfaceInit)), nullptr, nullptr}, >@@ -1129,9 +1096,7 @@ enum WAIType { > WAIComponent, > WAIImage, > WAITable, >-#if ATK_CHECK_VERSION(2,11,90) > WAITableCell, >-#endif > WAIHypertext, > WAIHyperlink, > WAIDocument, >@@ -1155,10 +1120,8 @@ static GType atkInterfaceTypeFromWAIType(WAIType type) > return ATK_TYPE_IMAGE; > case WAITable: > return ATK_TYPE_TABLE; >-#if ATK_CHECK_VERSION(2,11,90) > case WAITableCell: > return ATK_TYPE_TABLE_CELL; >-#endif > case WAIHypertext: > return ATK_TYPE_HYPERTEXT; > case WAIHyperlink: >@@ -1249,10 +1212,8 @@ static guint16 interfaceMaskFromObject(AccessibilityObject* coreObject) > if (coreObject->isTable()) > interfaceMask |= 1 << WAITable; > >-#if ATK_CHECK_VERSION(2,11,90) > if (role == AccessibilityRole::Cell || role == AccessibilityRole::GridCell || role == AccessibilityRole::ColumnHeader || role == AccessibilityRole::RowHeader) > interfaceMask |= 1 << WAITableCell; >-#endif > > // Document > if (role == AccessibilityRole::WebArea) >diff --git a/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp b/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp >index e341dc298f2961efcc07c477c1384075e2a8699c..98e361109bb1ec3ceb66a4e75f65e5f23cef005e 100644 >--- a/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp >+++ b/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.cpp >@@ -21,7 +21,7 @@ > #include "WebKitAccessibleInterfaceTableCell.h" > > #if HAVE(ACCESSIBILITY) >-#if ATK_CHECK_VERSION(2,11,90) >+ > #include "AccessibilityObject.h" > #include "AccessibilityTable.h" > #include "AccessibilityTableCell.h" >@@ -166,5 +166,4 @@ void webkitAccessibleTableCellInterfaceInit(AtkTableCellIface* iface) > iface->get_table = webkitAccessibleTableCellGetTable; > } > >-#endif // ATK_CHECK_VERSION(2,11,90) > #endif // HAVE(ACCESSIBILITY) >diff --git a/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.h b/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.h >index d2f58c6fb519f80f3f0984ca7501132821031364..9d28957e7d1f8e1c35e4e5651b10f9178417c0a0 100644 >--- a/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.h >+++ b/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceTableCell.h >@@ -25,8 +25,6 @@ > > #include <atk/atk.h> > >-#if ATK_CHECK_VERSION(2,11,90) > void webkitAccessibleTableCellInterfaceInit(AtkTableCellIface*); >-#endif > > #endif // HAVE(ACCESSIBILITY) >diff --git a/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp b/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp >index 369e96e19484f7a81fb94987d58a244f675aef6d..084e2f67b2d71658c03c9243a4dc2cf14c714e89 100644 >--- a/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp >+++ b/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceText.cpp >@@ -1207,7 +1207,6 @@ static gboolean webkitAccessibleTextSetCaretOffset(AtkText* text, gint offset) > return webkitAccessibleTextSetSelection(text, 0, offset, offset); > } > >-#if ATK_CHECK_VERSION(2, 10, 0) > static gchar* webkitAccessibleTextGetStringAtOffset(AtkText* text, gint offset, AtkTextGranularity granularity, gint* startOffset, gint* endOffset) > { > // This new API has been designed to simplify the AtkText interface and it has been >@@ -1247,7 +1246,6 @@ static gchar* webkitAccessibleTextGetStringAtOffset(AtkText* text, gint offset, > > return webkitAccessibleTextGetTextForOffset(text, offset, boundaryType, GetTextPositionAt, startOffset, endOffset); > } >-#endif > > void webkitAccessibleTextInterfaceInit(AtkTextIface* iface) > { >@@ -1269,10 +1267,7 @@ void webkitAccessibleTextInterfaceInit(AtkTextIface* iface) > iface->remove_selection = webkitAccessibleTextRemoveSelection; > iface->set_selection = webkitAccessibleTextSetSelection; > iface->set_caret_offset = webkitAccessibleTextSetCaretOffset; >- >-#if ATK_CHECK_VERSION(2, 10, 0) > iface->get_string_at_offset = webkitAccessibleTextGetStringAtOffset; >-#endif > } > > #endif >diff --git a/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceValue.cpp b/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceValue.cpp >index a6b15f8f9bf5d90313877310edd6cbfa17d1643d..73077384a57f96ab2addba331c335392160e5bd3 100644 >--- a/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceValue.cpp >+++ b/Source/WebCore/accessibility/atk/WebKitAccessibleInterfaceValue.cpp >@@ -64,7 +64,6 @@ static float webkitAccessibleGetIncrementValue(AccessibilityObject* coreObject) > return step < 1 ? 1 : step; > } > >-#if ATK_CHECK_VERSION(2,11,92) > static void webkitAccessibleGetValueAndText(AtkValue* value, gdouble* currentValue, gchar** alternativeText) > { > g_return_if_fail(ATK_VALUE(value)); >@@ -114,7 +113,7 @@ static AtkRange* webkitAccessibleGetRange(AtkValue* value) > gchar* valueDescription = g_strdup_printf("%s", coreObject->valueDescription().utf8().data()); > return atk_range_new(minValue, maxValue, valueDescription); > } >-#endif >+ > static void webkitAccessibleValueGetCurrentValue(AtkValue* value, GValue* gValue) > { > g_return_if_fail(ATK_VALUE(value)); >@@ -187,12 +186,10 @@ static void webkitAccessibleValueGetMinimumIncrement(AtkValue* value, GValue* gV > > void webkitAccessibleValueInterfaceInit(AtkValueIface* iface) > { >-#if ATK_CHECK_VERSION(2,11,92) > iface->get_value_and_text = webkitAccessibleGetValueAndText; > iface->get_increment = webkitAccessibleGetIncrement; > iface->set_value = webkitAccessibleSetValue; > iface->get_range = webkitAccessibleGetRange; >-#endif > iface->get_current_value = webkitAccessibleValueGetCurrentValue; > iface->get_maximum_value = webkitAccessibleValueGetMaximumValue; > iface->get_minimum_value = webkitAccessibleValueGetMinimumValue; >diff --git a/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp >index 051d3be423c25e1f4ff44a04042f414be9005fe6..a456af64af13ba1007fb48d3efa242a57caf6ae7 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.cpp >@@ -43,7 +43,6 @@ AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivat > notifyTrackOfActiveChanged(); > } > >-#if GST_CHECK_VERSION(1, 10, 0) > AudioTrackPrivateGStreamer::AudioTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer> player, gint index, GRefPtr<GstStream> stream) > : TrackPrivateBaseGStreamer(this, index, stream) > , m_player(player) >@@ -70,7 +69,6 @@ AudioTrackPrivate::Kind AudioTrackPrivateGStreamer::kind() const > > return AudioTrackPrivate::kind(); > } >-#endif > > void AudioTrackPrivateGStreamer::disconnect() > { >diff --git a/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h >index 4d98dd48b19a435d73fac0cf99ed6d2f25e7e857..70b6b02fe99ab1cb046fbdf37651bd0833e7eb18 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h >+++ b/Source/WebCore/platform/graphics/gstreamer/AudioTrackPrivateGStreamer.h >@@ -43,14 +43,12 @@ public: > return adoptRef(*new AudioTrackPrivateGStreamer(player, index, pad)); > } > >-#if GST_CHECK_VERSION(1, 10, 0) > static RefPtr<AudioTrackPrivateGStreamer> create(WeakPtr<MediaPlayerPrivateGStreamer> player, gint index, GRefPtr<GstStream> stream) > { > return adoptRef(*new AudioTrackPrivateGStreamer(player, index, stream)); > } > > Kind kind() const final; >-#endif > > void disconnect() override; > >@@ -66,9 +64,7 @@ public: > > private: > AudioTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, gint index, GRefPtr<GstPad>); >-#if GST_CHECK_VERSION(1, 10, 0) > AudioTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, gint index, GRefPtr<GstStream>); >-#endif > > AtomString m_id; > WeakPtr<MediaPlayerPrivateGStreamer> m_player; >diff --git a/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp >index 26014d2ec19b6fbb6daf150c8f61d3c39367780d..b15f7f32801910c8d46a9208262a9d38d16a3827 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.cpp >@@ -353,7 +353,6 @@ template <> void derefGPtr<GstQuery>(GstQuery* ptr) > gst_query_unref(ptr); > } > >-#if GST_CHECK_VERSION(1, 10, 0) > template <> GRefPtr<GstStream> adoptGRef(GstStream* ptr) > { > return GRefPtr<GstStream>(ptr, GRefPtrAdopt); >@@ -391,7 +390,6 @@ template <> void derefGPtr<GstStreamCollection>(GstStreamCollection* ptr) > if (ptr) > gst_object_unref(ptr); > } >-#endif > > template <> GRefPtr<WebKitVideoSink> adoptGRef(WebKitVideoSink* ptr) > { >diff --git a/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h >index b2dee472d736229c2bc583d1cd859951b86ca977..a1965d45842aa1ba380246289c21d7ed1a622fe5 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h >+++ b/Source/WebCore/platform/graphics/gstreamer/GRefPtrGStreamer.h >@@ -111,7 +111,6 @@ GRefPtr<WebKitWebSrc> ensureGRef(WebKitWebSrc* ptr); > template<> WebKitWebSrc* refGPtr<WebKitWebSrc>(WebKitWebSrc* ptr); > template<> void derefGPtr<WebKitWebSrc>(WebKitWebSrc* ptr); > >-#if GST_CHECK_VERSION(1, 10, 0) > template<> GRefPtr<GstStream> adoptGRef(GstStream*); > template<> GstStream* refGPtr<GstStream>(GstStream*); > template<> void derefGPtr<GstStream>(GstStream*); >@@ -119,7 +118,6 @@ template<> void derefGPtr<GstStream>(GstStream*); > template<> GRefPtr<GstStreamCollection> adoptGRef(GstStreamCollection*); > template<> GstStreamCollection* refGPtr<GstStreamCollection>(GstStreamCollection*); > template<> void derefGPtr<GstStreamCollection>(GstStreamCollection*); >-#endif > > #if USE(GSTREAMER_GL) > template<> GRefPtr<GstGLDisplay> adoptGRef(GstGLDisplay* ptr); >diff --git a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp >index ce38d50c89041d74a7a7e5bb5fb36abd474f54ef..a5cc706a442285846b1f49dc02dc5233f18e5d55 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/GStreamerCommon.cpp >@@ -43,7 +43,7 @@ > #include "WebKitMediaSourceGStreamer.h" > #endif > >-#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0) >+#if ENABLE(MEDIA_STREAM) > #include "GStreamerMediaStreamSource.h" > #endif > >@@ -269,7 +269,7 @@ bool initializeGStreamerAndRegisterWebKitElements() > gst_element_register(nullptr, "webkitclearkey", GST_RANK_PRIMARY + 100, WEBKIT_TYPE_MEDIA_CK_DECRYPT); > #endif > >-#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0) >+#if ENABLE(MEDIA_STREAM) > if (webkitGstCheckVersion(1, 10, 0)) > gst_element_register(nullptr, "mediastreamsrc", GST_RANK_PRIMARY, WEBKIT_TYPE_MEDIA_STREAM_SRC); > #endif >diff --git a/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp >index fbffee601cf936e71fd2857759dd34bb393cb825..63485896b66a3ac93317b5bd5f60382bc89b825a 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.cpp >@@ -58,7 +58,6 @@ InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer(gint index, GRe > notifyTrackOfStreamChanged(); > } > >-#if GST_CHECK_VERSION(1, 10, 0) > InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer(gint index, GRefPtr<GstStream> stream) > : InbandTextTrackPrivate(WebVTT) > , TrackPrivateBaseGStreamer(this, index, stream) >@@ -66,7 +65,6 @@ InbandTextTrackPrivateGStreamer::InbandTextTrackPrivateGStreamer(gint index, GRe > m_streamId = gst_stream_get_stream_id(stream.get()); > GST_INFO("Track %d got stream start for stream %s.", m_index, m_streamId.utf8().data()); > } >-#endif > > void InbandTextTrackPrivateGStreamer::disconnect() > { >diff --git a/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h >index f4e2a9789db0761caad40a1c5b63f632e9b15a10..200d542ee2f4ad0d0693068c6c84e38d325de6d6 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h >+++ b/Source/WebCore/platform/graphics/gstreamer/InbandTextTrackPrivateGStreamer.h >@@ -44,12 +44,10 @@ public: > return adoptRef(*new InbandTextTrackPrivateGStreamer(index, pad)); > } > >-#if GST_CHECK_VERSION(1, 10, 0) > static Ref<InbandTextTrackPrivateGStreamer> create(gint index, GRefPtr<GstStream> stream) > { > return adoptRef(*new InbandTextTrackPrivateGStreamer(index, stream)); > } >-#endif > > void disconnect() override; > >@@ -63,9 +61,7 @@ public: > > private: > InbandTextTrackPrivateGStreamer(gint index, GRefPtr<GstPad>); >-#if GST_CHECK_VERSION(1, 10, 0) > InbandTextTrackPrivateGStreamer(gint index, GRefPtr<GstStream>); >-#endif > > void streamChanged(); > >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >index 15cdd4be50a13492af13226124cce1ec55266367..c540d3d6626c7b2e879e6038c36dad7dfe5246a2 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp >@@ -53,7 +53,7 @@ > #include <wtf/text/CString.h> > #include <wtf/text/StringConcatenateNumbers.h> > >-#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0) >+#if ENABLE(MEDIA_STREAM) > #include "GStreamerMediaStreamSource.h" > #endif > >@@ -324,7 +324,6 @@ void MediaPlayerPrivateGStreamer::load(const String&, MediaSourcePrivateClient*) > #if ENABLE(MEDIA_STREAM) > void MediaPlayerPrivateGStreamer::load(MediaStreamPrivate& stream) > { >-#if GST_CHECK_VERSION(1, 10, 0) > m_streamPrivate = &stream; > static Atomic<uint32_t> pipelineId; > auto pipelineName = makeString("mediastream-", >@@ -338,12 +337,6 @@ void MediaPlayerPrivateGStreamer::load(MediaStreamPrivate& stream) > ensureGLVideoSinkContext(); > #endif > m_player->play(); >-#else >- // Properly fail so the global MediaPlayer tries to fallback to the next MediaPlayerPrivate. >- m_networkState = MediaPlayer::FormatError; >- m_player->networkStateChanged(); >- notImplemented(); >-#endif > } > #endif > >@@ -672,7 +665,6 @@ bool MediaPlayerPrivateGStreamer::seeking() const > return m_seeking; > } > >-#if GST_CHECK_VERSION(1, 10, 0) > #define CLEAR_TRACKS(tracks, method) \ > for (auto& track : tracks.values())\ > method(*track);\ >@@ -762,7 +754,6 @@ void MediaPlayerPrivateGStreamer::updateTracks() > > m_player->client().mediaPlayerEngineUpdated(m_player); > } >-#endif // GST_CHECK_VERSION(1, 10, 0) > > void MediaPlayerPrivateGStreamer::enableTrack(TrackPrivateBaseGStreamer::TrackType trackType, unsigned index) > { >@@ -777,7 +768,6 @@ void MediaPlayerPrivateGStreamer::enableTrack(TrackPrivateBaseGStreamer::TrackTy > Vector<String> selectedStreams; > String selectedStreamId; > >-#if GST_CHECK_VERSION(1, 10, 0) > GstStream* stream = nullptr; > > if (!m_isLegacyPlaybin) { >@@ -789,7 +779,6 @@ void MediaPlayerPrivateGStreamer::enableTrack(TrackPrivateBaseGStreamer::TrackTy > selectedStreamId = String::fromUTF8(gst_stream_get_stream_id(stream)); > selectedStreams.append(selectedStreamId); > } >-#endif // GST_CHECK_VERSION(1,0,0) > > switch (trackType) { > case TrackPrivateBaseGStreamer::TrackType::Audio: >@@ -839,7 +828,6 @@ void MediaPlayerPrivateGStreamer::enableTrack(TrackPrivateBaseGStreamer::TrackTy > GST_INFO_OBJECT(pipeline(), "Enabling %s track with index: %u", trackTypeAsString, index); > if (m_isLegacyPlaybin) > g_object_set(m_pipeline.get(), propertyName, index, nullptr); >-#if GST_CHECK_VERSION(1, 10, 0) > else { > GList* selectedStreamsList = nullptr; > >@@ -850,7 +838,6 @@ void MediaPlayerPrivateGStreamer::enableTrack(TrackPrivateBaseGStreamer::TrackTy > gst_element_send_event(m_pipeline.get(), gst_event_new_select_streams(selectedStreamsList)); > g_list_free_full(selectedStreamsList, reinterpret_cast<GDestroyNotify>(g_free)); > } >-#endif > } > > void MediaPlayerPrivateGStreamer::videoChangedCallback(MediaPlayerPrivateGStreamer* player) >@@ -1413,7 +1400,6 @@ void MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message) > gst_tag_list_unref(tags); > break; > } >-#if GST_CHECK_VERSION(1, 10, 0) > case GST_MESSAGE_STREAMS_SELECTED: { > GRefPtr<GstStreamCollection> collection; > gst_message_parse_streams_selected(message, &collection.outPtr()); >@@ -1456,7 +1442,6 @@ void MediaPlayerPrivateGStreamer::handleMessage(GstMessage* message) > } > break; > } >-#endif > default: > GST_DEBUG_OBJECT(pipeline(), "Unhandled GStreamer message type: %s", GST_MESSAGE_TYPE_NAME(message)); > break; >@@ -1827,7 +1812,7 @@ void MediaPlayerPrivateGStreamer::sourceSetup(GstElement* sourceElement) > if (WEBKIT_IS_WEB_SRC(m_source.get())) { > webKitWebSrcSetMediaPlayer(WEBKIT_WEB_SRC(m_source.get()), m_player); > g_signal_connect(GST_ELEMENT_PARENT(m_source.get()), "element-added", G_CALLBACK(uriDecodeBinElementAddedCallback), this); >-#if ENABLE(MEDIA_STREAM) && GST_CHECK_VERSION(1, 10, 0) >+#if ENABLE(MEDIA_STREAM) > } else if (WEBKIT_IS_MEDIA_STREAM_SRC(sourceElement)) { > auto stream = m_streamPrivate.get(); > ASSERT(stream); >@@ -2066,7 +2051,6 @@ void MediaPlayerPrivateGStreamer::updateStates() > > bool MediaPlayerPrivateGStreamer::handleSyncMessage(GstMessage* message) > { >-#if GST_CHECK_VERSION(1, 10, 0) > if (GST_MESSAGE_TYPE(message) == GST_MESSAGE_STREAM_COLLECTION && !m_isLegacyPlaybin) { > GRefPtr<GstStreamCollection> collection; > gst_message_parse_stream_collection(message, &collection.outPtr()); >@@ -2078,7 +2062,6 @@ bool MediaPlayerPrivateGStreamer::handleSyncMessage(GstMessage* message) > }); > } > } >-#endif > > return MediaPlayerPrivateGStreamerBase::handleSyncMessage(message); > } >@@ -2251,7 +2234,7 @@ MediaPlayer::SupportsType MediaPlayerPrivateGStreamer::supportsType(const MediaE > return result; > #endif > >-#if !ENABLE(MEDIA_STREAM) || !GST_CHECK_VERSION(1, 10, 0) >+#if !ENABLE(MEDIA_STREAM) > if (parameters.isMediaStream) > return result; > #endif >@@ -2364,10 +2347,8 @@ void MediaPlayerPrivateGStreamer::createGSTPlayBin(const URL& url, const String& > // MSE doesn't support playbin3. Mediastream requires playbin3. Regular > // playback can use playbin3 on-demand with the WEBKIT_GST_USE_PLAYBIN3 > // environment variable. >-#if GST_CHECK_VERSION(1, 10, 0) > if ((!isMediaSource() && g_getenv("WEBKIT_GST_USE_PLAYBIN3")) || url.protocolIs("mediastream")) > playbinName = "playbin3"; >-#endif > > if (m_pipeline) { > if (!g_strcmp0(GST_OBJECT_NAME(gst_element_get_factory(m_pipeline.get())), playbinName)) { >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h >index 2ed7c8989575eeda2f6a7acfcf1bc0160a376827..8e257e6230320b93bbacdc826f90f11c325eb45c 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h >@@ -182,10 +182,8 @@ private: > void setPlaybinURL(const URL& urlString); > void loadFull(const String& url, const String& pipelineName); > >-#if GST_CHECK_VERSION(1, 10, 0) > void updateTracks(); > void clearTracks(); >-#endif > > protected: > bool m_buffering; >@@ -260,13 +258,11 @@ private: > bool m_preservesPitch; > mutable Optional<Seconds> m_lastQueryTime; > bool m_isLegacyPlaybin; >-#if GST_CHECK_VERSION(1, 10, 0) > GRefPtr<GstStreamCollection> m_streamCollection; > FloatSize naturalSize() const final; > #if ENABLE(MEDIA_STREAM) > RefPtr<MediaStreamPrivate> m_streamPrivate; >-#endif // ENABLE(MEDIA_STREAM) >-#endif // GST_CHECK_VERSION(1, 10, 0) >+#endif > String m_currentAudioStreamId; > String m_currentVideoStreamId; > String m_currentTextStreamId; >@@ -284,7 +280,7 @@ private: > #if USE(GSTREAMER_MPEGTS) > HashMap<AtomString, RefPtr<InbandMetadataTextTrackPrivateGStreamer>> m_metadataTracks; > #endif >-#endif >+#endif // ENABLE(VIDEO_TRACK) > virtual bool isMediaSource() const { return false; } > > uint64_t m_httpResponseTotalSize { 0 }; >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >index 6ea36580f2d50e8b380f7d515c6a4017343aa8fd..3a34679dfd18eb8fe2050120cfdb526017ac0cef 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.cpp >@@ -399,11 +399,7 @@ GstContext* MediaPlayerPrivateGStreamerBase::requestGLContext(const char* contex > if (!g_strcmp0(contextType, "gst.gl.app_context")) { > GstContext* appContext = gst_context_new("gst.gl.app_context", TRUE); > GstStructure* structure = gst_context_writable_structure(appContext); >-#if GST_CHECK_VERSION(1, 11, 0) > gst_structure_set(structure, "context", GST_TYPE_GL_CONTEXT, gstGLContext(), nullptr); >-#else >- gst_structure_set(structure, "context", GST_GL_TYPE_CONTEXT, gstGLContext(), nullptr); >-#endif > return appContext; > } > >diff --git a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h >index 47bc427896cfd4052f79f104bfda6401d12b71b5..59afdfcc01b609b5c595484fd0fc76575e90c9ef 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h >+++ b/Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamerBase.h >@@ -237,9 +237,7 @@ protected: > TextChanged = 1 << 5, > #endif > SizeChanged = 1 << 6, >-#if GST_CHECK_VERSION(1, 10, 0) > StreamCollectionChanged = 1 << 7 >-#endif > }; > > Ref<MainThreadNotifier<MainThreadNotification>> m_notifier; >diff --git a/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp >index 6da49518bda11c470ca0ab47293f09120a4eb967..df705b94971d02600eac2017b1b150eab3084691 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.cpp >@@ -58,7 +58,6 @@ TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer(TrackPrivateBase* owner, gi > tagsChanged(); > } > >-#if GST_CHECK_VERSION(1, 10, 0) > TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer(TrackPrivateBase* owner, gint index, GRefPtr<GstStream> stream) > : m_notifier(MainThreadNotifier<MainThreadNotification>::create()) > , m_index(index) >@@ -70,7 +69,6 @@ TrackPrivateBaseGStreamer::TrackPrivateBaseGStreamer(TrackPrivateBase* owner, gi > // We can't call notifyTrackOfTagsChanged() directly, because we need tagsChanged() to setup m_tags. > tagsChanged(); > } >-#endif > > TrackPrivateBaseGStreamer::~TrackPrivateBaseGStreamer() > { >@@ -82,10 +80,8 @@ void TrackPrivateBaseGStreamer::disconnect() > { > m_tags.clear(); > >-#if GST_CHECK_VERSION(1, 10, 0) > if (m_stream) > m_stream.clear(); >-#endif > > m_notifier->cancelPendingNotifications(); > >@@ -115,10 +111,8 @@ void TrackPrivateBaseGStreamer::tagsChanged() > else > tags = adoptGRef(gst_tag_list_new_empty()); > } >-#if GST_CHECK_VERSION(1, 10, 0) > else if (m_stream) > tags = adoptGRef(gst_stream_get_tags(m_stream.get())); >-#endif > else > tags = adoptGRef(gst_tag_list_new_empty()); > >diff --git a/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h >index c8cfeb54358510fa1b3c57f919c3748be9e7d466..dcd8b35474244994084a4be8b1ea1866c6869ed7 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h >+++ b/Source/WebCore/platform/graphics/gstreamer/TrackPrivateBaseGStreamer.h >@@ -56,18 +56,15 @@ public: > > void setIndex(int index) { m_index = index; } > >-#if GST_CHECK_VERSION(1, 10, 0) > GstStream* stream() > { > return m_stream.get(); > } >-#endif > > protected: > TrackPrivateBaseGStreamer(TrackPrivateBase* owner, gint index, GRefPtr<GstPad>); >-#if GST_CHECK_VERSION(1, 10, 0) > TrackPrivateBaseGStreamer(TrackPrivateBase* owner, gint index, GRefPtr<GstStream>); >-#endif >+ > void notifyTrackOfActiveChanged(); > void notifyTrackOfTagsChanged(); > >@@ -83,9 +80,7 @@ protected: > AtomString m_label; > AtomString m_language; > GRefPtr<GstPad> m_pad; >-#if GST_CHECK_VERSION(1, 10, 0) > GRefPtr<GstStream> m_stream; >-#endif > > private: > bool getLanguageCode(GstTagList* tags, AtomString& value); >diff --git a/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp b/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp >index e1f09964db61b75fe02af7961ba3f9158234eb31..6766ab5f955e164a3a519c3ebed707f12b327f06 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp >+++ b/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.cpp >@@ -43,7 +43,6 @@ VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivat > notifyTrackOfActiveChanged(); > } > >-#if GST_CHECK_VERSION(1, 10, 0) > VideoTrackPrivateGStreamer::VideoTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer> player, gint index, GRefPtr<GstStream> stream) > : TrackPrivateBaseGStreamer(this, index, stream) > , m_player(player) >@@ -69,7 +68,6 @@ VideoTrackPrivate::Kind VideoTrackPrivateGStreamer::kind() const > > return VideoTrackPrivate::kind(); > } >-#endif > > void VideoTrackPrivateGStreamer::disconnect() > { >diff --git a/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h b/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h >index 6e7188b345371bd449cb90ea205f7bd0bf5bc24f..4af2e8a87e439a63dbfc8fb64f8958b36ae4cb46 100644 >--- a/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h >+++ b/Source/WebCore/platform/graphics/gstreamer/VideoTrackPrivateGStreamer.h >@@ -43,13 +43,13 @@ public: > { > return adoptRef(*new VideoTrackPrivateGStreamer(player, index, pad)); > } >-#if GST_CHECK_VERSION(1, 10, 0) >+ > static Ref<VideoTrackPrivateGStreamer> create(WeakPtr<MediaPlayerPrivateGStreamer> player, gint index, GRefPtr<GstStream> stream) > { > return adoptRef(*new VideoTrackPrivateGStreamer(player, index, stream)); > } >+ > Kind kind() const final; >-#endif > > void disconnect() override; > >@@ -65,9 +65,8 @@ public: > > private: > VideoTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, gint index, GRefPtr<GstPad>); >-#if GST_CHECK_VERSION(1, 10, 0) > VideoTrackPrivateGStreamer(WeakPtr<MediaPlayerPrivateGStreamer>, gint index, GRefPtr<GstStream>); >-#endif >+ > AtomString m_id; > WeakPtr<MediaPlayerPrivateGStreamer> m_player; > }; >diff --git a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp >index fb937668050330bdda805c548bacbd0d31334760..5c52dfda38097be3f2b058e6e51abb74f53f1dcf 100644 >--- a/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp >+++ b/Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp >@@ -1323,11 +1323,7 @@ String PlatformKeyboardEvent::singleCharacterString(unsigned val) > > static PlatformEvent::Type eventTypeForGdkKeyEvent(GdkEventKey* event) > { >-#if GTK_CHECK_VERSION(3, 10, 0) > return gdk_event_get_event_type(reinterpret_cast<GdkEvent*>(event)) == GDK_KEY_RELEASE ? PlatformEvent::KeyUp : PlatformEvent::KeyDown; >-#else >- return event->type == GDK_KEY_RELEASE ? PlatformEvent::KeyUp : PlatformEvent::KeyDown; >-#endif > } > > static OptionSet<PlatformEvent::Modifier> modifiersForGdkKeyEvent(GdkEventKey* event) >diff --git a/Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp b/Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp >index de1a8dc23e1a12328137a289ac7cb6700a434042..e940142ef0578a6f3547c3c548e13fd46128e596 100644 >--- a/Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp >+++ b/Source/WebCore/platform/gtk/PlatformMouseEventGtk.cpp >@@ -66,12 +66,7 @@ PlatformMouseEvent::PlatformMouseEvent(GdkEventButton* event) > if (PlatformKeyboardEvent::modifiersContainCapsLock(state)) > m_modifiers.add(PlatformEvent::Modifier::CapsLockKey); > >-#if GTK_CHECK_VERSION(3, 10, 0) > GdkEventType type = gdk_event_get_event_type(reinterpret_cast<GdkEvent*>(event)); >-#else >- GdkEventType type = event->type; >-#endif >- > switch (type) { > case GDK_BUTTON_PRESS: > case GDK_2BUTTON_PRESS: >@@ -126,12 +121,7 @@ PlatformMouseEvent::PlatformMouseEvent(GdkEventMotion* motion) > if (PlatformKeyboardEvent::modifiersContainCapsLock(state)) > m_modifiers.add(PlatformEvent::Modifier::CapsLockKey); > >-#if GTK_CHECK_VERSION(3, 10, 0) > GdkEventType type = gdk_event_get_event_type(reinterpret_cast<GdkEvent*>(motion)); >-#else >- GdkEventType type = motion->type; >-#endif >- > switch (type) { > case GDK_MOTION_NOTIFY: > m_type = PlatformEvent::MouseMoved; >diff --git a/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp b/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp >index bd47b7396674363591e1de20c53daf871c1ee6aa..557e80682935f30d46ce5c61049c519b8b2947c5 100644 >--- a/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp >+++ b/Source/WebCore/platform/gtk/PlatformScreenGtk.cpp >@@ -149,13 +149,6 @@ void setScreenDPIObserverHandler(Function<void()>&& handler, void* context) > } > } > >-#if !GTK_CHECK_VERSION(3, 22, 0) >-static GdkScreen* getScreen(GtkWidget* widget) >-{ >- return gtk_widget_has_screen(widget) ? gtk_widget_get_screen(widget) : gdk_screen_get_default(); >-} >-#endif >- > FloatRect screenRect(Widget* widget) > { > GtkWidget* container = widget ? GTK_WIDGET(widget->root()->hostWindow()->platformPageClient()) : 0; >@@ -163,24 +156,12 @@ FloatRect screenRect(Widget* widget) > container = getToplevel(container); > > GdkRectangle geometry; >-#if GTK_CHECK_VERSION(3, 22, 0) > GdkDisplay* display = container ? gtk_widget_get_display(container) : gdk_display_get_default(); > if (!display) > return FloatRect(); > > GdkMonitor* monitor = container ? gdk_display_get_monitor_at_window(display, gtk_widget_get_window(container)) : gdk_display_get_monitor(display, 0); >- > gdk_monitor_get_geometry(monitor, &geometry); >-#else >- GdkScreen* screen = container ? getScreen(container) : gdk_screen_get_default(); >- if (!screen) >- return FloatRect(); >- >- gint monitor = container ? gdk_screen_get_monitor_at_window(screen, gtk_widget_get_window(container)) : 0; >- >- gdk_screen_get_monitor_geometry(screen, monitor, &geometry); >-#endif // !GTK_CHECK_VERSION(3, 22, 0) >- > return FloatRect(geometry.x, geometry.y, geometry.width, geometry.height); > } > >@@ -191,24 +172,12 @@ FloatRect screenAvailableRect(Widget* widget) > return screenRect(widget); > > GdkRectangle workArea; >-#if GTK_CHECK_VERSION(3, 22, 0) > GdkDisplay* display = container ? gtk_widget_get_display(container) : gdk_display_get_default(); > if (!display) > return FloatRect(); > > GdkMonitor* monitor = container ? gdk_display_get_monitor_at_window(display, gtk_widget_get_window(container)) : gdk_display_get_monitor(display, 0); >- > gdk_monitor_get_workarea(monitor, &workArea); >-#else >- GdkScreen* screen = container ? getScreen(container) : gdk_screen_get_default(); >- if (!screen) >- return FloatRect(); >- >- gint monitor = container ? gdk_screen_get_monitor_at_window(screen, gtk_widget_get_window(container)) : 0; >- >- gdk_screen_get_monitor_workarea(screen, monitor, &workArea); >-#endif // !GTK_CHECK_VERSION(3, 22, 0) >- > return FloatRect(workArea.x, workArea.y, workArea.width, workArea.height); > > } >@@ -219,75 +188,14 @@ bool screenSupportsExtendedColor(Widget*) > } > > #if ENABLE(TOUCH_EVENTS) >-#if !GTK_CHECK_VERSION(3, 20, 0) >-static void deviceAddedCallback(GdkDeviceManager*, GdkDevice*); >-static void deviceRemovedCallback(GdkDeviceManager*, GdkDevice*); >- >-static HashSet<GdkDevice*>& touchDevices() >-{ >- static LazyNeverDestroyed<HashSet<GdkDevice*>> touchDeviceSet; >- static std::once_flag onceKey; >- std::call_once(onceKey, [] { >- touchDeviceSet.construct(); >- >- auto* display = gdk_display_get_default(); >- if (!display) >- return; >- >- auto* deviceManager = gdk_display_get_device_manager(display); >- if (!deviceManager) >- return; >- >- GUniquePtr<GList> devices(gdk_device_manager_list_devices(deviceManager, GDK_DEVICE_TYPE_SLAVE)); >- for (GList* it = devices.get(); it; it = g_list_next(it)) { >- auto* device = GDK_DEVICE(it->data); >- if (gdk_device_get_source(device) == GDK_SOURCE_TOUCHSCREEN) >- touchDeviceSet->add(device); >- } >- >- g_signal_connect(deviceManager, "device-added", G_CALLBACK(deviceAddedCallback), nullptr); >- g_signal_connect(deviceManager, "device-removed", G_CALLBACK(deviceRemovedCallback), nullptr); >- }); >- >- return touchDeviceSet; >-} >- >-static inline bool isTouchDevice(GdkDevice* device) >-{ >- return gdk_device_get_device_type(device) == GDK_DEVICE_TYPE_SLAVE && gdk_device_get_source(device) == GDK_SOURCE_TOUCHSCREEN; >-} >- >-static void deviceAddedCallback(GdkDeviceManager*, GdkDevice* device) >-{ >- if (!isTouchDevice(device)) >- return; >- >- ASSERT(!touchDevices().contains(device)); >- touchDevices().add(device); >-} >- >-static void deviceRemovedCallback(GdkDeviceManager*, GdkDevice* device) >-{ >- if (!isTouchDevice(device)) >- return; >- >- ASSERT(touchDevices().contains(device)); >- touchDevices().remove(device); >-} >-#endif // !GTK_CHECK_VERSION(3, 20, 0) >- > bool screenHasTouchDevice() > { >-#if GTK_CHECK_VERSION(3, 20, 0) > auto* display = gdk_display_get_default(); > if (!display) > return true; > > auto* seat = gdk_display_get_default_seat(display); > return seat ? gdk_seat_get_capabilities(seat) & GDK_SEAT_CAPABILITY_TOUCH : true; >-#else >- return !touchDevices().isEmpty(); >-#endif > } > > bool screenIsTouchPrimaryInputDevice() >@@ -296,20 +204,11 @@ bool screenIsTouchPrimaryInputDevice() > if (!display) > return true; > >-#if GTK_CHECK_VERSION(3, 20, 0) > auto* seat = gdk_display_get_default_seat(display); > if (!seat) > return true; > > auto* device = gdk_seat_get_pointer(seat); >-#else >- auto* deviceManager = gdk_display_get_device_manager(display); >- if (!deviceManager) >- return true; >- >- auto* device = gdk_device_manager_get_client_pointer(deviceManager); >-#endif >- > return device ? gdk_device_get_source(device) == GDK_SOURCE_TOUCHSCREEN : true; > } > #endif // ENABLE(TOUCH_EVENTS) >diff --git a/Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp b/Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp >index 93efbc65147019ec5cf1c211b7c92e10c78b9d75..0c018743ed69ab7c30854b0b69ada0b31d0ab652 100644 >--- a/Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp >+++ b/Source/WebCore/platform/gtk/PlatformWheelEventGtk.cpp >@@ -93,15 +93,9 @@ PlatformWheelEvent::PlatformWheelEvent(GdkEventScroll* event) > m_wheelTicksY = m_deltaY; > > #if ENABLE(ASYNC_SCROLLING) >-#if GTK_CHECK_VERSION(3, 20, 0) > m_phase = gdk_event_is_scroll_stop_event(reinterpret_cast<GdkEvent*>(event)) ? > PlatformWheelEventPhaseEnded : > PlatformWheelEventPhaseChanged; >-#else >- m_phase = direction == GDK_SCROLL_SMOOTH && !m_deltaX && !m_deltaY ? >- PlatformWheelEventPhaseEnded : >- PlatformWheelEventPhaseChanged; >-#endif > #endif // ENABLE(ASYNC_SCROLLING) > > gdouble x, y, rootX, rootY; >diff --git a/Source/WebCore/platform/gtk/RenderThemeGadget.cpp b/Source/WebCore/platform/gtk/RenderThemeGadget.cpp >index d4e5e0ad9df577ceec99c314160b5500f491fb95..bdcc99e859d4975078ff3c5e2ebc385d9b95b952 100644 >--- a/Source/WebCore/platform/gtk/RenderThemeGadget.cpp >+++ b/Source/WebCore/platform/gtk/RenderThemeGadget.cpp >@@ -26,8 +26,6 @@ > #include "config.h" > #include "RenderThemeGadget.h" > >-#if GTK_CHECK_VERSION(3, 20, 0) >- > #include "FloatRect.h" > #include "GRefPtrGtk.h" > >@@ -400,5 +398,3 @@ IntSize RenderThemeButtonGadget::minimumSize() const > } > > } // namespace WebCore >- >-#endif // GTK_CHECK_VERSION(3, 20, 0) >diff --git a/Source/WebCore/platform/gtk/RenderThemeGadget.h b/Source/WebCore/platform/gtk/RenderThemeGadget.h >index 32f2602c1ddf938a2520263b0127b24857aa7d80..cc18f89d6eb214ea7e2026d0f5d6760908fa45c6 100644 >--- a/Source/WebCore/platform/gtk/RenderThemeGadget.h >+++ b/Source/WebCore/platform/gtk/RenderThemeGadget.h >@@ -25,12 +25,9 @@ > > #pragma once > >-#include <gtk/gtk.h> >- >-#if GTK_CHECK_VERSION(3, 20, 0) >- > #include "Color.h" > #include "IntSize.h" >+#include <gtk/gtk.h> > #include <wtf/OptionSet.h> > #include <wtf/Vector.h> > #include <wtf/glib/GRefPtr.h> >@@ -178,5 +175,3 @@ public: > }; > > } // namespace WebCore >- >-#endif // GTK_CHECK_VERSION(3, 20, 0) >diff --git a/Source/WebCore/platform/gtk/RenderThemeWidget.cpp b/Source/WebCore/platform/gtk/RenderThemeWidget.cpp >index 0d1726d55122b67fe9a57a28c15574dbc2cc134f..05d12dd9eafbef02a459ca5276417a5b9b0e8976 100644 >--- a/Source/WebCore/platform/gtk/RenderThemeWidget.cpp >+++ b/Source/WebCore/platform/gtk/RenderThemeWidget.cpp >@@ -26,8 +26,6 @@ > #include "config.h" > #include "RenderThemeWidget.h" > >-#if GTK_CHECK_VERSION(3, 20, 0) >- > #include <wtf/HashMap.h> > #include <wtf/NeverDestroyed.h> > >@@ -301,5 +299,3 @@ RenderThemeWindow::RenderThemeWindow() > } > > } // namepsace WebCore >- >-#endif // GTK_CHECK_VERSION(3, 20, 0) >diff --git a/Source/WebCore/platform/gtk/RenderThemeWidget.h b/Source/WebCore/platform/gtk/RenderThemeWidget.h >index a6686db302a0b818e91a08d75e0e4152b8770d63..433e0048f1effecabd756aa4fbefa7cae59eb35c 100644 >--- a/Source/WebCore/platform/gtk/RenderThemeWidget.h >+++ b/Source/WebCore/platform/gtk/RenderThemeWidget.h >@@ -27,8 +27,6 @@ > > #include <gtk/gtk.h> > >-#if GTK_CHECK_VERSION(3, 20, 0) >- > #include "RenderThemeGadget.h" > > namespace WebCore { >@@ -247,5 +245,3 @@ private: > }; > > } // namespace WebCore >- >-#endif // GTK_CHECK_VERSION(3, 20, 0) >diff --git a/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp b/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp >index 3e6af49c1b67890275df51eb59d073fa2f33541a..408b1b9f5799c9340a0008ed701573b14a1a3589 100644 >--- a/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp >+++ b/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp >@@ -53,9 +53,8 @@ static void themeChangedCallback() > > ScrollbarThemeGtk::ScrollbarThemeGtk() > { >-#if GTK_CHECK_VERSION(3, 20, 0) > m_usesOverlayScrollbars = g_strcmp0(g_getenv("GTK_OVERLAY_SCROLLING"), "0"); >-#endif >+ > static bool themeMonitorInitialized = false; > if (!themeMonitorInitialized) { > g_signal_connect(gtk_settings_get_default(), "notify::gtk-theme-name", G_CALLBACK(themeChangedCallback), nullptr); >@@ -64,42 +63,12 @@ ScrollbarThemeGtk::ScrollbarThemeGtk() > } > } > >-#if !GTK_CHECK_VERSION(3, 20, 0) >-static GRefPtr<GtkStyleContext> createStyleContext(Scrollbar* scrollbar = nullptr) >-{ >- GRefPtr<GtkStyleContext> styleContext = adoptGRef(gtk_style_context_new()); >- GRefPtr<GtkWidgetPath> path = adoptGRef(gtk_widget_path_new()); >- gtk_widget_path_append_type(path.get(), GTK_TYPE_SCROLLBAR); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_SCROLLBAR); >- gtk_widget_path_iter_add_class(path.get(), -1, scrollbar && scrollbar->orientation() == HorizontalScrollbar ? "horizontal" : "vertical"); >- gtk_style_context_set_path(styleContext.get(), path.get()); >- return styleContext; >-} >- >-static GRefPtr<GtkStyleContext> createChildStyleContext(GtkStyleContext* parent, const char* className) >-{ >- ASSERT(parent); >- GRefPtr<GtkWidgetPath> path = adoptGRef(gtk_widget_path_copy(gtk_style_context_get_path(parent))); >- gtk_widget_path_append_type(path.get(), GTK_TYPE_SCROLLBAR); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_SCROLLBAR); >- gtk_widget_path_iter_add_class(path.get(), -1, className); >- >- GRefPtr<GtkStyleContext> styleContext = adoptGRef(gtk_style_context_new()); >- gtk_style_context_set_path(styleContext.get(), path.get()); >- gtk_style_context_set_parent(styleContext.get(), parent); >- return styleContext; >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) >- > void ScrollbarThemeGtk::themeChanged() > { >-#if GTK_CHECK_VERSION(3, 20, 0) > RenderThemeWidget::clearCache(); >-#endif > updateThemeProperties(); > } > >-#if GTK_CHECK_VERSION(3, 20, 0) > void ScrollbarThemeGtk::updateThemeProperties() > { > auto& scrollbar = static_cast<RenderThemeScrollbar&>(RenderThemeWidget::getOrCreate(RenderThemeWidget::Type::VerticalScrollbarRight)); >@@ -108,29 +77,12 @@ void ScrollbarThemeGtk::updateThemeProperties() > m_hasBackButtonEndPart = scrollbar.stepper(RenderThemeScrollbarGadget::Steppers::SecondaryBackward); > m_hasForwardButtonStartPart = scrollbar.stepper(RenderThemeScrollbarGadget::Steppers::SecondaryForward); > } >-#else >-void ScrollbarThemeGtk::updateThemeProperties() >-{ >- gboolean hasBackButtonStartPart, hasForwardButtonEndPart, hasBackButtonEndPart, hasForwardButtonStartPart; >- gtk_style_context_get_style(createStyleContext().get(), >- "has-backward-stepper", &hasBackButtonStartPart, >- "has-forward-stepper", &hasForwardButtonEndPart, >- "has-secondary-backward-stepper", &hasBackButtonEndPart, >- "has-secondary-forward-stepper", &hasForwardButtonStartPart, >- nullptr); >- m_hasBackButtonStartPart = hasBackButtonStartPart; >- m_hasForwardButtonEndPart = hasForwardButtonEndPart; >- m_hasBackButtonEndPart = hasBackButtonEndPart; >- m_hasForwardButtonStartPart = hasForwardButtonStartPart; >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) > > bool ScrollbarThemeGtk::hasButtons(Scrollbar& scrollbar) > { > return scrollbar.enabled() && (m_hasBackButtonStartPart || m_hasForwardButtonEndPart || m_hasBackButtonEndPart || m_hasForwardButtonStartPart); > } > >-#if GTK_CHECK_VERSION(3, 20, 0) > static GtkStateFlags scrollbarPartStateFlags(Scrollbar& scrollbar, ScrollbarPart part, bool painting = false) > { > unsigned stateFlags = 0; >@@ -242,49 +194,6 @@ IntRect ScrollbarThemeGtk::trackRect(Scrollbar& scrollbar, bool /*painting*/) > > return scrollbar.width() < rect.width() ? IntRect() : rect; > } >-#else >-IntRect ScrollbarThemeGtk::trackRect(Scrollbar& scrollbar, bool /*painting*/) >-{ >- GRefPtr<GtkStyleContext> styleContext = createStyleContext(&scrollbar); >- // The padding along the thumb movement axis includes the trough border >- // plus the size of stepper spacing (the space between the stepper and >- // the place where the thumb stops). There is often no stepper spacing. >- int stepperSpacing, stepperSize, troughBorderWidth, thumbFat; >- gtk_style_context_get_style(styleContext.get(), "stepper-spacing", &stepperSpacing, "stepper-size", &stepperSize, "trough-border", >- &troughBorderWidth, "slider-width", &thumbFat, nullptr); >- >- // The fatness of the scrollbar on the non-movement axis. >- int thickness = thumbFat + 2 * troughBorderWidth; >- >- int startButtonsOffset = 0; >- int buttonsWidth = 0; >- if (m_hasForwardButtonStartPart) { >- startButtonsOffset += stepperSize; >- buttonsWidth += stepperSize; >- } >- if (m_hasBackButtonStartPart) { >- startButtonsOffset += stepperSize; >- buttonsWidth += stepperSize; >- } >- if (m_hasBackButtonEndPart) >- buttonsWidth += stepperSize; >- if (m_hasForwardButtonEndPart) >- buttonsWidth += stepperSize; >- >- if (scrollbar.orientation() == HorizontalScrollbar) { >- // Once the scrollbar becomes smaller than the natural size of the two buttons and the thumb, the track disappears. >- if (scrollbar.width() < buttonsWidth + minimumThumbLength(scrollbar)) >- return IntRect(); >- return IntRect(scrollbar.x() + troughBorderWidth + stepperSpacing + startButtonsOffset, scrollbar.y(), >- scrollbar.width() - (2 * troughBorderWidth) - (2 * stepperSpacing) - buttonsWidth, thickness); >- } >- >- if (scrollbar.height() < buttonsWidth + minimumThumbLength(scrollbar)) >- return IntRect(); >- return IntRect(scrollbar.x(), scrollbar.y() + troughBorderWidth + stepperSpacing + startButtonsOffset, >- thickness, scrollbar.height() - (2 * troughBorderWidth) - (2 * stepperSpacing) - buttonsWidth); >-} >-#endif > > bool ScrollbarThemeGtk::hasThumb(Scrollbar& scrollbar) > { >@@ -293,7 +202,6 @@ bool ScrollbarThemeGtk::hasThumb(Scrollbar& scrollbar) > return thumbLength(scrollbar) > 0; > } > >-#if GTK_CHECK_VERSION(3, 20, 0) > IntRect ScrollbarThemeGtk::backButtonRect(Scrollbar& scrollbar, ScrollbarPart part, bool /*painting*/) > { > ASSERT(part == BackButtonStartPart || part == BackButtonEndPart); >@@ -393,59 +301,7 @@ IntRect ScrollbarThemeGtk::forwardButtonRect(Scrollbar& scrollbar, ScrollbarPart > > return IntRect(rect.location(), preferredSize); > } >-#else >-IntRect ScrollbarThemeGtk::backButtonRect(Scrollbar& scrollbar, ScrollbarPart part, bool /*painting*/) >-{ >- if ((part == BackButtonEndPart && !m_hasBackButtonEndPart) || (part == BackButtonStartPart && !m_hasBackButtonStartPart)) >- return IntRect(); >- >- GRefPtr<GtkStyleContext> styleContext = createStyleContext(&scrollbar); >- int troughBorderWidth, stepperSize, thumbFat; >- gtk_style_context_get_style(styleContext.get(), "trough-border", &troughBorderWidth, "stepper-size", &stepperSize, "slider-width", &thumbFat, nullptr); >- int x = scrollbar.x() + troughBorderWidth; >- int y = scrollbar.y() + troughBorderWidth; >- if (part == BackButtonStartPart) { >- if (scrollbar.orientation() == HorizontalScrollbar) >- return IntRect(x, y, stepperSize, thumbFat); >- return IntRect(x, y, thumbFat, stepperSize); >- } >- >- // BackButtonEndPart (alternate button) >- if (scrollbar.orientation() == HorizontalScrollbar) >- return IntRect(scrollbar.x() + scrollbar.width() - troughBorderWidth - (2 * stepperSize), y, stepperSize, thumbFat); >- >- // VerticalScrollbar alternate button >- return IntRect(x, scrollbar.y() + scrollbar.height() - troughBorderWidth - (2 * stepperSize), thumbFat, stepperSize); >-} > >-IntRect ScrollbarThemeGtk::forwardButtonRect(Scrollbar& scrollbar, ScrollbarPart part, bool /*painting*/) >-{ >- if ((part == ForwardButtonStartPart && !m_hasForwardButtonStartPart) || (part == ForwardButtonEndPart && !m_hasForwardButtonEndPart)) >- return IntRect(); >- >- GRefPtr<GtkStyleContext> styleContext = createStyleContext(&scrollbar); >- int troughBorderWidth, stepperSize, thumbFat; >- gtk_style_context_get_style(styleContext.get(), "trough-border", &troughBorderWidth, "stepper-size", &stepperSize, "slider-width", &thumbFat, nullptr); >- if (scrollbar.orientation() == HorizontalScrollbar) { >- int y = scrollbar.y() + troughBorderWidth; >- if (part == ForwardButtonEndPart) >- return IntRect(scrollbar.x() + scrollbar.width() - stepperSize - troughBorderWidth, y, stepperSize, thumbFat); >- >- // ForwardButtonStartPart (alternate button) >- return IntRect(scrollbar.x() + troughBorderWidth + stepperSize, y, stepperSize, thumbFat); >- } >- >- // VerticalScrollbar >- int x = scrollbar.x() + troughBorderWidth; >- if (part == ForwardButtonEndPart) >- return IntRect(x, scrollbar.y() + scrollbar.height() - stepperSize - troughBorderWidth, thumbFat, stepperSize); >- >- // ForwardButtonStartPart (alternate button) >- return IntRect(x, scrollbar.y() + troughBorderWidth + stepperSize, thumbFat, stepperSize); >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) >- >-#if GTK_CHECK_VERSION(3, 20, 0) > bool ScrollbarThemeGtk::paint(Scrollbar& scrollbar, GraphicsContext& graphicsContext, const IntRect& damageRect) > { > if (graphicsContext.paintingDisabled()) >@@ -608,166 +464,6 @@ bool ScrollbarThemeGtk::paint(Scrollbar& scrollbar, GraphicsContext& graphicsCon > > return true; > } >-#else >-static void paintStepper(GtkStyleContext* parentContext, GraphicsContext& context, Scrollbar& scrollbar, const IntRect& rect, ScrollbarPart part) >-{ >- ScrollbarOrientation orientation = scrollbar.orientation(); >- GRefPtr<GtkStyleContext> styleContext = createChildStyleContext(parentContext, "button"); >- >- unsigned flags = 0; >- if ((BackButtonStartPart == part && scrollbar.currentPos()) >- || (BackButtonEndPart == part && scrollbar.currentPos()) >- || (ForwardButtonEndPart == part && scrollbar.currentPos() != scrollbar.maximum()) >- || (ForwardButtonStartPart == part && scrollbar.currentPos() != scrollbar.maximum())) { >- if (part == scrollbar.pressedPart()) >- flags |= GTK_STATE_FLAG_ACTIVE; >- if (part == scrollbar.hoveredPart()) >- flags |= GTK_STATE_FLAG_PRELIGHT; >- } else >- flags |= GTK_STATE_FLAG_INSENSITIVE; >- gtk_style_context_set_state(styleContext.get(), static_cast<GtkStateFlags>(flags)); >- >- gtk_render_background(styleContext.get(), context.platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height()); >- gtk_render_frame(styleContext.get(), context.platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height()); >- >- gfloat arrowScaling; >- gtk_style_context_get_style(styleContext.get(), "arrow-scaling", &arrowScaling, nullptr); >- >- double arrowSize = std::min(rect.width(), rect.height()) * arrowScaling; >- FloatPoint arrowPoint(rect.x() + (rect.width() - arrowSize) / 2, rect.y() + (rect.height() - arrowSize) / 2); >- >- if (flags & GTK_STATE_FLAG_ACTIVE) { >- gint arrowDisplacementX, arrowDisplacementY; >- gtk_style_context_get_style(styleContext.get(), "arrow-displacement-x", &arrowDisplacementX, "arrow-displacement-y", &arrowDisplacementY, nullptr); >- arrowPoint.move(arrowDisplacementX, arrowDisplacementY); >- } >- >- gdouble angle; >- if (orientation == VerticalScrollbar) >- angle = (part == ForwardButtonEndPart || part == ForwardButtonStartPart) ? G_PI : 0; >- else >- angle = (part == ForwardButtonEndPart || part == ForwardButtonStartPart) ? G_PI / 2 : 3 * (G_PI / 2); >- >- gtk_render_arrow(styleContext.get(), context.platformContext()->cr(), angle, arrowPoint.x(), arrowPoint.y(), arrowSize); >-} >- >-static void adjustRectAccordingToMargin(GtkStyleContext* context, IntRect& rect) >-{ >- GtkBorder margin; >- gtk_style_context_get_margin(context, gtk_style_context_get_state(context), &margin); >- rect.move(margin.left, margin.top); >- rect.contract(margin.left + margin.right, margin.top + margin.bottom); >-} >- >-bool ScrollbarThemeGtk::paint(Scrollbar& scrollbar, GraphicsContext& graphicsContext, const IntRect& damageRect) >-{ >- if (graphicsContext.paintingDisabled()) >- return false; >- >- GRefPtr<GtkStyleContext> styleContext = createStyleContext(&scrollbar); >- >- // Create the ScrollbarControlPartMask based on the damageRect >- ScrollbarControlPartMask scrollMask = NoPart; >- >- IntRect backButtonStartPaintRect; >- IntRect backButtonEndPaintRect; >- IntRect forwardButtonStartPaintRect; >- IntRect forwardButtonEndPaintRect; >- if (hasButtons(scrollbar)) { >- backButtonStartPaintRect = backButtonRect(scrollbar, BackButtonStartPart, true); >- if (damageRect.intersects(backButtonStartPaintRect)) >- scrollMask |= BackButtonStartPart; >- backButtonEndPaintRect = backButtonRect(scrollbar, BackButtonEndPart, true); >- if (damageRect.intersects(backButtonEndPaintRect)) >- scrollMask |= BackButtonEndPart; >- forwardButtonStartPaintRect = forwardButtonRect(scrollbar, ForwardButtonStartPart, true); >- if (damageRect.intersects(forwardButtonStartPaintRect)) >- scrollMask |= ForwardButtonStartPart; >- forwardButtonEndPaintRect = forwardButtonRect(scrollbar, ForwardButtonEndPart, true); >- if (damageRect.intersects(forwardButtonEndPaintRect)) >- scrollMask |= ForwardButtonEndPart; >- } >- >- IntRect trackPaintRect = trackRect(scrollbar, true); >- if (damageRect.intersects(trackPaintRect)) >- scrollMask |= TrackBGPart; >- >- gboolean troughUnderSteppers; >- gtk_style_context_get_style(styleContext.get(), "trough-under-steppers", &troughUnderSteppers, nullptr); >- if (troughUnderSteppers && (scrollMask & BackButtonStartPart >- || scrollMask & BackButtonEndPart >- || scrollMask & ForwardButtonStartPart >- || scrollMask & ForwardButtonEndPart)) >- scrollMask |= TrackBGPart; >- >- IntRect currentThumbRect; >- if (hasThumb(scrollbar)) { >- IntRect track = trackRect(scrollbar, false); >- IntRect trackRect = constrainTrackRectToTrackPieces(scrollbar, track); >- int thumbFat; >- gtk_style_context_get_style(styleContext.get(), "slider-width", &thumbFat, nullptr); >- if (scrollbar.orientation() == HorizontalScrollbar) >- currentThumbRect = IntRect(trackRect.x() + thumbPosition(scrollbar), trackRect.y() + (trackRect.height() - thumbFat) / 2, thumbLength(scrollbar), thumbFat); >- else >- currentThumbRect = IntRect(trackRect.x() + (trackRect.width() - thumbFat) / 2, trackRect.y() + thumbPosition(scrollbar), thumbFat, thumbLength(scrollbar)); >- if (damageRect.intersects(currentThumbRect)) >- scrollMask |= ThumbPart; >- } >- >- if (scrollMask == NoPart) >- return true; >- >- ScrollbarControlPartMask allButtons = BackButtonStartPart | BackButtonEndPart | ForwardButtonStartPart | ForwardButtonEndPart; >- >- // Paint the track background. If the trough-under-steppers property is true, this >- // should be the full size of the scrollbar, but if is false, it should only be the >- // track rect. >- GRefPtr<GtkStyleContext> troughStyleContext = createChildStyleContext(styleContext.get(), "trough"); >- if (scrollMask & TrackBGPart || scrollMask & ThumbPart || scrollMask & allButtons) { >- IntRect fullScrollbarRect = trackPaintRect; >- if (troughUnderSteppers) >- fullScrollbarRect = scrollbar.frameRect(); >- >- IntRect adjustedRect = fullScrollbarRect; >- adjustRectAccordingToMargin(styleContext.get(), adjustedRect); >- gtk_render_background(styleContext.get(), graphicsContext.platformContext()->cr(), adjustedRect.x(), adjustedRect.y(), adjustedRect.width(), adjustedRect.height()); >- gtk_render_frame(styleContext.get(), graphicsContext.platformContext()->cr(), adjustedRect.x(), adjustedRect.y(), adjustedRect.width(), adjustedRect.height()); >- >- adjustedRect = fullScrollbarRect; >- adjustRectAccordingToMargin(troughStyleContext.get(), adjustedRect); >- gtk_render_background(troughStyleContext.get(), graphicsContext.platformContext()->cr(), adjustedRect.x(), adjustedRect.y(), adjustedRect.width(), adjustedRect.height()); >- gtk_render_frame(troughStyleContext.get(), graphicsContext.platformContext()->cr(), adjustedRect.x(), adjustedRect.y(), adjustedRect.width(), adjustedRect.height()); >- } >- >- // Paint the back and forward buttons. >- if (scrollMask & BackButtonStartPart) >- paintStepper(styleContext.get(), graphicsContext, scrollbar, backButtonStartPaintRect, BackButtonStartPart); >- if (scrollMask & BackButtonEndPart) >- paintStepper(styleContext.get(), graphicsContext, scrollbar, backButtonEndPaintRect, BackButtonEndPart); >- if (scrollMask & ForwardButtonStartPart) >- paintStepper(styleContext.get(), graphicsContext, scrollbar, forwardButtonStartPaintRect, ForwardButtonStartPart); >- if (scrollMask & ForwardButtonEndPart) >- paintStepper(styleContext.get(), graphicsContext, scrollbar, forwardButtonEndPaintRect, ForwardButtonEndPart); >- >- // Paint the thumb. >- if (scrollMask & ThumbPart) { >- GRefPtr<GtkStyleContext> thumbStyleContext = createChildStyleContext(troughStyleContext.get(), "slider"); >- unsigned flags = 0; >- if (scrollbar.pressedPart() == ThumbPart) >- flags |= GTK_STATE_FLAG_ACTIVE; >- if (scrollbar.hoveredPart() == ThumbPart) >- flags |= GTK_STATE_FLAG_PRELIGHT; >- gtk_style_context_set_state(thumbStyleContext.get(), static_cast<GtkStateFlags>(flags)); >- >- IntRect thumbRect(currentThumbRect); >- adjustRectAccordingToMargin(thumbStyleContext.get(), thumbRect); >- gtk_render_slider(thumbStyleContext.get(), graphicsContext.platformContext()->cr(), thumbRect.x(), thumbRect.y(), thumbRect.width(), thumbRect.height(), >- scrollbar.orientation() == VerticalScrollbar ? GTK_ORIENTATION_VERTICAL : GTK_ORIENTATION_HORIZONTAL); >- } >- >- return true; >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) > > ScrollbarButtonPressAction ScrollbarThemeGtk::handleMousePressEvent(Scrollbar&, const PlatformMouseEvent& event, ScrollbarPart pressedPart) > { >@@ -800,7 +496,6 @@ ScrollbarButtonPressAction ScrollbarThemeGtk::handleMousePressEvent(Scrollbar&, > return ScrollbarButtonPressAction::None; > } > >-#if GTK_CHECK_VERSION(3, 20, 0) > int ScrollbarThemeGtk::scrollbarThickness(ScrollbarControlSize, ScrollbarExpansionState) > { > auto& scrollbarWidget = static_cast<RenderThemeScrollbar&>(RenderThemeWidget::getOrCreate(RenderThemeWidget::Type::VerticalScrollbarRight)); >@@ -810,16 +505,7 @@ int ScrollbarThemeGtk::scrollbarThickness(ScrollbarControlSize, ScrollbarExpansi > IntSize preferredSize = contentsPreferredSize + scrollbarWidget.scrollbar().preferredSize() - scrollbarWidget.scrollbar().minimumSize(); > return preferredSize.width(); > } >-#else >-int ScrollbarThemeGtk::scrollbarThickness(ScrollbarControlSize, ScrollbarExpansionState) >-{ >- int thumbFat, troughBorderWidth; >- gtk_style_context_get_style(createStyleContext().get(), "slider-width", &thumbFat, "trough-border", &troughBorderWidth, nullptr); >- return thumbFat + 2 * troughBorderWidth; >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) > >-#if GTK_CHECK_VERSION(3, 20, 0) > int ScrollbarThemeGtk::minimumThumbLength(Scrollbar& scrollbar) > { > auto& scrollbarWidget = static_cast<RenderThemeScrollbar&>(RenderThemeWidget::getOrCreate(RenderThemeWidget::Type::VerticalScrollbarRight)); >@@ -827,12 +513,5 @@ int ScrollbarThemeGtk::minimumThumbLength(Scrollbar& scrollbar) > IntSize minSize = scrollbarWidget.slider().minimumSize(); > return scrollbar.orientation() == VerticalScrollbar ? minSize.height() : minSize.width(); > } >-#else >-int ScrollbarThemeGtk::minimumThumbLength(Scrollbar& scrollbar) >-{ >- int minThumbLength = 0; >- gtk_style_context_get_style(createStyleContext(&scrollbar).get(), "min-slider-length", &minThumbLength, nullptr); >- return minThumbLength; >-} >-#endif >-} >+ >+} // namespace WebCore >diff --git a/Source/WebCore/platform/mediastream/gstreamer/GStreamerCapturer.cpp b/Source/WebCore/platform/mediastream/gstreamer/GStreamerCapturer.cpp >index 2933eea450c365fa3afca488e2c3b512dbeb8f38..617b75dd8f326c1beb97fb2888e3e2bacc7adaf1 100644 >--- a/Source/WebCore/platform/mediastream/gstreamer/GStreamerCapturer.cpp >+++ b/Source/WebCore/platform/mediastream/gstreamer/GStreamerCapturer.cpp >@@ -29,8 +29,6 @@ > #include <mutex> > #include <webrtc/api/mediastreaminterface.h> > >-#if GST_CHECK_VERSION(1, 10, 0) >- > GST_DEBUG_CATEGORY(webkit_capturer_debug); > #define GST_CAT_DEFAULT webkit_capturer_debug > >@@ -186,5 +184,4 @@ void GStreamerCapturer::stop() > > } // namespace WebCore > >-#endif // GST_CHECK_VERSION(1, 10, 0) > #endif // ENABLE(VIDEO) && ENABLE(MEDIA_STREAM) && USE(LIBWEBRTC) && USE(GSTREAMER) >diff --git a/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp b/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp >index a87d26d25dcb21ddc0848e6d5a59453c06693482..b3af35af82488dd4cf821cd3eeae63d9cf1acd84 100644 >--- a/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp >+++ b/Source/WebCore/platform/mediastream/gstreamer/GStreamerMediaStreamSource.cpp >@@ -34,8 +34,6 @@ > #include <gst/app/gstappsrc.h> > #include <gst/base/gstflowcombiner.h> > >-#if GST_CHECK_VERSION(1, 10, 0) >- > namespace WebCore { > > static void webkitMediaStreamSrcPushVideoSample(WebKitMediaStreamSrc* self, GstSample* gstsample); >@@ -614,5 +612,5 @@ GstElement* webkitMediaStreamSrcNew(void) > } > > } // WebCore >-#endif // GST_CHECK_VERSION(1, 10, 0) >+ > #endif // ENABLE(VIDEO) && ENABLE(MEDIA_STREAM) && USE(LIBWEBRTC) >diff --git a/Source/WebCore/platform/network/soup/ResourceRequest.h b/Source/WebCore/platform/network/soup/ResourceRequest.h >index 01cc03a2e5c2cd883446d16a22862aeb8e6ad17a..31c6a0e4ebabca622c79ea36aa17d8715f5a9774 100644 >--- a/Source/WebCore/platform/network/soup/ResourceRequest.h >+++ b/Source/WebCore/platform/network/soup/ResourceRequest.h >@@ -166,8 +166,6 @@ bool ResourceRequest::decodeWithPlatformData(Decoder& decoder) > return true; > } > >- >-#if SOUP_CHECK_VERSION(2, 43, 1) > inline SoupMessagePriority toSoupMessagePriority(ResourceLoadPriority priority) > { > switch (priority) { >@@ -186,7 +184,6 @@ inline SoupMessagePriority toSoupMessagePriority(ResourceLoadPriority priority) > ASSERT_NOT_REACHED(); > return SOUP_MESSAGE_PRIORITY_VERY_LOW; > } >-#endif > > } // namespace WebCore > >diff --git a/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp b/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp >index 073407316e04d256908e255b35008a564cdf53f3..6124f46c24d3102d6c13d2ca77d4238ae008eb26 100644 >--- a/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp >+++ b/Source/WebCore/platform/network/soup/SoupNetworkSession.cpp >@@ -136,15 +136,11 @@ SoupNetworkSession::SoupNetworkSession(PAL::SessionID sessionID, SoupCookieJar* > if (!initialAcceptLanguages().isNull()) > setAcceptLanguages(initialAcceptLanguages()); > >-#if SOUP_CHECK_VERSION(2, 53, 92) > if (soup_auth_negotiate_supported() && !sessionID.isEphemeral()) { > g_object_set(m_soupSession.get(), > SOUP_SESSION_ADD_FEATURE_BY_TYPE, SOUP_TYPE_AUTH_NEGOTIATE, > nullptr); > } >-#else >- UNUSED_PARAM(sessionID); >-#endif > > if (proxySettings().mode != SoupNetworkProxySettings::Mode::Default) > setupProxy(); >diff --git a/Source/WebCore/rendering/RenderThemeGtk.cpp b/Source/WebCore/rendering/RenderThemeGtk.cpp >index f444c5a1ad9d6beabdad472c45f11404cbad91f4..04487ddb9f258c48898273b2c35b51a32e72c999 100644 >--- a/Source/WebCore/rendering/RenderThemeGtk.cpp >+++ b/Source/WebCore/rendering/RenderThemeGtk.cpp >@@ -164,137 +164,9 @@ enum RenderThemePart { > #if ENABLE(VIDEO) > MediaButton, > #endif >-#if GTK_CHECK_VERSION(3, 20, 0) > Window, >-#endif > }; > >-#if !GTK_CHECK_VERSION(3, 20, 0) >-// This is the default value defined by GTK+, where it was defined as MIN_ARROW_SIZE in gtkarrow.c. >-static const int minArrowSize = 15; >-// This is the default value defined by GTK+, where it was defined as MIN_ARROW_WIDTH in gtkspinbutton.c. >-static const int minSpinButtonArrowSize = 6; >- >-static GRefPtr<GtkStyleContext> createStyleContext(RenderThemePart themePart, GtkStyleContext* parent = nullptr) >-{ >- GRefPtr<GtkWidgetPath> path = adoptGRef(parent ? gtk_widget_path_copy(gtk_style_context_get_path(parent)) : gtk_widget_path_new()); >- >- switch (themePart) { >- case Entry: >- case EntrySelection: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_ENTRY); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_ENTRY); >- break; >- case EntryIconLeft: >- case EntryIconRight: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_ENTRY); >- break; >- case Button: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_BUTTON); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_BUTTON); >- gtk_widget_path_iter_add_class(path.get(), -1, "text-button"); >- break; >- case CheckButton: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_CHECK_BUTTON); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_CHECK); >- break; >- case RadioButton: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_RADIO_BUTTON); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_RADIO); >- break; >- case ComboBox: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_COMBO_BOX); >- break; >- case ComboBoxButton: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_BUTTON); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_BUTTON); >- gtk_widget_path_iter_add_class(path.get(), -1, "text-button"); >- gtk_widget_path_iter_add_class(path.get(), -1, "combo"); >- break; >- case ComboBoxArrow: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_ARROW); >- gtk_widget_path_iter_add_class(path.get(), -1, "arrow"); >- break; >- case Scale: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_SCALE); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_SCALE); >- break; >- case ScaleTrough: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_SCALE); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_SCALE); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_TROUGH); >- break; >- case ScaleSlider: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_SCALE); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_SCALE); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_SLIDER); >- break; >- case ProgressBar: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_PROGRESS_BAR); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_PROGRESSBAR); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_HORIZONTAL); >- break; >- case ProgressBarTrough: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_PROGRESS_BAR); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_TROUGH); >- break; >- case ProgressBarProgress: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_PROGRESS_BAR); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_PROGRESSBAR); >- break; >- case ListBox: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_TREE_VIEW); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_VIEW); >- break; >- case SpinButton: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_SPIN_BUTTON); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_SPINBUTTON); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_HORIZONTAL); >- break; >- case SpinButtonUpButton: >- case SpinButtonDownButton: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_SPIN_BUTTON); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_SPINBUTTON); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_BUTTON); >- break; >-#if ENABLE(VIDEO) >- case MediaButton: >- gtk_widget_path_append_type(path.get(), GTK_TYPE_IMAGE); >- gtk_widget_path_iter_add_class(path.get(), -1, GTK_STYLE_CLASS_IMAGE); >- break; >-#endif // ENABLE(VIDEO) >- default: >- ASSERT_NOT_REACHED(); >- break; >- } >- >- GRefPtr<GtkStyleContext> context = adoptGRef(gtk_style_context_new()); >- gtk_style_context_set_path(context.get(), path.get()); >- gtk_style_context_set_parent(context.get(), parent); >- return context; >-} >- >-static GRefPtr<GdkPixbuf> loadThemedIcon(GtkStyleContext* context, const char* iconName, GtkIconSize iconSize) >-{ >- GRefPtr<GIcon> icon = adoptGRef(g_themed_icon_new(iconName)); >- unsigned lookupFlags = GTK_ICON_LOOKUP_USE_BUILTIN | GTK_ICON_LOOKUP_FORCE_SIZE | GTK_ICON_LOOKUP_FORCE_SVG; >-#if GTK_CHECK_VERSION(3, 14, 0) >- GtkTextDirection direction = gtk_style_context_get_direction(context); >- if (direction & GTK_TEXT_DIR_LTR) >- lookupFlags |= GTK_ICON_LOOKUP_DIR_LTR; >- else if (direction & GTK_TEXT_DIR_RTL) >- lookupFlags |= GTK_ICON_LOOKUP_DIR_RTL; >-#endif >- int width, height; >- gtk_icon_size_lookup(iconSize, &width, &height); >- GRefPtr<GtkIconInfo> iconInfo = adoptGRef(gtk_icon_theme_lookup_by_gicon(gtk_icon_theme_get_default(), icon.get(), std::min(width, height), static_cast<GtkIconLookupFlags>(lookupFlags))); >- if (!iconInfo) >- return nullptr; >- >- return adoptGRef(gtk_icon_info_load_symbolic_for_context(iconInfo.get(), context, nullptr, nullptr)); >-} >-#endif // !GTK_CHECK_VERSION(3, 20, 0) >- > #if ENABLE(VIDEO) > static bool nodeHasPseudo(Node& node, const char* pseudo) > { >@@ -354,7 +226,6 @@ int RenderThemeGtk::baselinePosition(const RenderBox& box) const > return RenderTheme::baselinePosition(box); > } > >-#if GTK_CHECK_VERSION(3, 20, 0) > void RenderThemeGtk::adjustRepaintRect(const RenderObject&, FloatRect&) > { > } >@@ -418,82 +289,6 @@ static GtkStateFlags themePartStateFlags(const RenderThemeGtk& theme, RenderThem > > return static_cast<GtkStateFlags>(stateFlags); > } >-#else >-static GtkTextDirection gtkTextDirection(TextDirection direction) >-{ >- switch (direction) { >- case TextDirection::RTL: >- return GTK_TEXT_DIR_RTL; >- case TextDirection::LTR: >- return GTK_TEXT_DIR_LTR; >- default: >- return GTK_TEXT_DIR_NONE; >- } >-} >- >-static GtkStateFlags gtkIconStateFlags(RenderTheme* theme, const RenderObject& renderObject) >-{ >- if (!theme->isEnabled(renderObject)) >- return GTK_STATE_FLAG_INSENSITIVE; >- if (theme->isPressed(renderObject)) >- return GTK_STATE_FLAG_ACTIVE; >- if (theme->isHovered(renderObject)) >- return GTK_STATE_FLAG_PRELIGHT; >- >- return GTK_STATE_FLAG_NORMAL; >-} >- >-static void adjustRectForFocus(GtkStyleContext* context, FloatRect& rect) >-{ >- gint focusWidth, focusPad; >- gtk_style_context_get_style(context, "focus-line-width", &focusWidth, "focus-padding", &focusPad, nullptr); >- rect.inflate(focusWidth + focusPad); >-} >- >-void RenderThemeGtk::adjustRepaintRect(const RenderObject& renderObject, FloatRect& rect) >-{ >- GRefPtr<GtkStyleContext> context; >- bool checkInteriorFocus = false; >- ControlPart part = renderObject.style().appearance(); >- switch (part) { >- case CheckboxPart: >- case RadioPart: >- context = createStyleContext(part == CheckboxPart ? CheckButton : RadioButton); >- >- gint indicatorSpacing; >- gtk_style_context_get_style(context.get(), "indicator-spacing", &indicatorSpacing, nullptr); >- rect.inflate(indicatorSpacing); >- >- return; >- case SliderVerticalPart: >- case SliderHorizontalPart: >- context = createStyleContext(ScaleSlider); >- break; >- case ButtonPart: >- case MenulistButtonPart: >- case MenulistPart: >- context = createStyleContext(Button); >- checkInteriorFocus = true; >- break; >- case TextFieldPart: >- case TextAreaPart: >- context = createStyleContext(Entry); >- checkInteriorFocus = true; >- break; >- default: >- return; >- } >- >- ASSERT(context); >- if (checkInteriorFocus) { >- gboolean interiorFocus; >- gtk_style_context_get_style(context.get(), "interior-focus", &interiorFocus, nullptr); >- if (interiorFocus) >- return; >- } >- adjustRectForFocus(context.get(), rect); >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) > > void RenderThemeGtk::adjustButtonStyle(StyleResolver&, RenderStyle& style, const Element*) const > { >@@ -515,7 +310,6 @@ static void shrinkToMinimumSizeAndCenterRectangle(FloatRect& rect, const IntSize > } > } > >-#if GTK_CHECK_VERSION(3, 20, 0) > static void setToggleSize(RenderThemePart themePart, RenderStyle& style) > { > ASSERT(themePart == CheckButton || themePart == RadioButton); >@@ -560,75 +354,6 @@ static void paintToggle(const RenderThemeGtk* theme, RenderThemePart themePart, > if (theme->isFocused(renderObject)) > toggleWidget.button().renderFocus(paintInfo.context().platformContext()->cr(), rect); > } >-#else >-static void setToggleSize(RenderThemePart themePart, RenderStyle& style) >-{ >- // The width and height are both specified, so we shouldn't change them. >- if (!style.width().isIntrinsicOrAuto() && !style.height().isAuto()) >- return; >- >- GRefPtr<GtkStyleContext> context = createStyleContext(themePart); >- // Other ports hard-code this to 13. GTK+ users tend to demand the native look. >- gint indicatorSize; >- gtk_style_context_get_style(context.get(), "indicator-size", &indicatorSize, nullptr); >- >- if (style.width().isIntrinsicOrAuto()) >- style.setWidth(Length(indicatorSize, Fixed)); >- >- if (style.height().isAuto()) >- style.setHeight(Length(indicatorSize, Fixed)); >-} >- >-static void paintToggle(const RenderThemeGtk* theme, RenderThemePart themePart, const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& fullRect) >-{ >- GRefPtr<GtkStyleContext> context = createStyleContext(themePart); >- gtk_style_context_set_direction(context.get(), static_cast<GtkTextDirection>(gtkTextDirection(renderObject.style().direction()))); >- >- unsigned flags = 0; >- if (!theme->isEnabled(renderObject)) >- flags |= GTK_STATE_FLAG_INSENSITIVE; >- else if (theme->isHovered(renderObject)) >- flags |= GTK_STATE_FLAG_PRELIGHT; >- if (theme->isIndeterminate(renderObject)) >- flags |= GTK_STATE_FLAG_INCONSISTENT; >- else if (theme->isChecked(renderObject)) >-#if GTK_CHECK_VERSION(3, 13, 7) >- flags |= GTK_STATE_FLAG_CHECKED; >-#else >- flags |= GTK_STATE_FLAG_ACTIVE; >-#endif >- if (theme->isPressed(renderObject)) >- flags |= GTK_STATE_FLAG_SELECTED; >- gtk_style_context_set_state(context.get(), static_cast<GtkStateFlags>(flags)); >- >- // Some themes do not render large toggle buttons properly, so we simply >- // shrink the rectangle back down to the default size and then center it >- // in the full toggle button region. The reason for not simply forcing toggle >- // buttons to be a smaller size is that we don't want to break site layouts. >- FloatRect rect(fullRect); >- gint indicatorSize; >- gtk_style_context_get_style(context.get(), "indicator-size", &indicatorSize, nullptr); >- IntSize minSize(indicatorSize, indicatorSize); >- shrinkToMinimumSizeAndCenterRectangle(rect, minSize); >- >- gtk_render_background(context.get(), paintInfo.context().platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height()); >- gtk_render_frame(context.get(), paintInfo.context().platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height()); >- >- if (themePart == CheckButton) >- gtk_render_check(context.get(), paintInfo.context().platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height()); >- else >- gtk_render_option(context.get(), paintInfo.context().platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height()); >- >- if (theme->isFocused(renderObject)) { >- IntRect indicatorRect(rect); >- gint indicatorSpacing; >- gtk_style_context_get_style(context.get(), "indicator-spacing", &indicatorSpacing, nullptr); >- indicatorRect.inflate(indicatorSpacing); >- gtk_render_focus(context.get(), paintInfo.context().platformContext()->cr(), indicatorRect.x(), indicatorRect.y(), >- indicatorRect.width(), indicatorRect.height()); >- } >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) > > void RenderThemeGtk::setCheckboxSize(RenderStyle& style) const > { >@@ -652,7 +377,6 @@ bool RenderThemeGtk::paintRadio(const RenderObject& renderObject, const PaintInf > return false; > } > >-#if GTK_CHECK_VERSION(3, 20, 0) > bool RenderThemeGtk::paintButton(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect) > { > auto& buttonWidget = static_cast<RenderThemeButton&>(RenderThemeWidget::getOrCreate(isDefault(renderObject) ? RenderThemeWidget::Type::ButtonDefault : RenderThemeWidget::Type::Button)); >@@ -662,99 +386,14 @@ bool RenderThemeGtk::paintButton(const RenderObject& renderObject, const PaintIn > buttonWidget.button().renderFocus(paintInfo.context().platformContext()->cr(), rect); > return false; > } >-#else >-static void renderButton(RenderTheme* theme, GtkStyleContext* context, const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect) >-{ >- IntRect buttonRect(rect); >- >- guint flags = 0; >- if (!theme->isEnabled(renderObject)) >- flags |= GTK_STATE_FLAG_INSENSITIVE; >- else if (theme->isHovered(renderObject)) >- flags |= GTK_STATE_FLAG_PRELIGHT; >- if (theme->isPressed(renderObject)) >- flags |= GTK_STATE_FLAG_ACTIVE; >- gtk_style_context_set_state(context, static_cast<GtkStateFlags>(flags)); >- >- if (theme->isDefault(renderObject)) { >- GtkBorder* borderPtr = 0; >- GtkBorder border = { 1, 1, 1, 1 }; >- >- gtk_style_context_get_style(context, "default-border", &borderPtr, nullptr); >- if (borderPtr) { >- border = *borderPtr; >- gtk_border_free(borderPtr); >- } >- >- buttonRect.move(border.left, border.top); >- buttonRect.setWidth(buttonRect.width() - (border.left + border.right)); >- buttonRect.setHeight(buttonRect.height() - (border.top + border.bottom)); >- >- gtk_style_context_add_class(context, GTK_STYLE_CLASS_DEFAULT); >- } >- >- gtk_render_background(context, paintInfo.context().platformContext()->cr(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height()); >- gtk_render_frame(context, paintInfo.context().platformContext()->cr(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height()); >- >- if (theme->isFocused(renderObject)) { >- gint focusWidth, focusPad; >- gboolean displaceFocus, interiorFocus; >- gtk_style_context_get_style( >- context, >- "focus-line-width", &focusWidth, >- "focus-padding", &focusPad, >- "interior-focus", &interiorFocus, >- "displace-focus", &displaceFocus, >- nullptr); >- >- if (interiorFocus) { >- GtkBorder borderWidth; >- gtk_style_context_get_border(context, gtk_style_context_get_state(context), &borderWidth); >- >- buttonRect = IntRect( >- buttonRect.x() + borderWidth.left + focusPad, >- buttonRect.y() + borderWidth.top + focusPad, >- buttonRect.width() - (2 * focusPad + borderWidth.left + borderWidth.right), >- buttonRect.height() - (2 * focusPad + borderWidth.top + borderWidth.bottom)); >- } else >- buttonRect.inflate(focusWidth + focusPad); >- >- if (displaceFocus && theme->isPressed(renderObject)) { >- gint childDisplacementX; >- gint childDisplacementY; >- gtk_style_context_get_style(context, "child-displacement-x", &childDisplacementX, "child-displacement-y", &childDisplacementY, nullptr); >- buttonRect.move(childDisplacementX, childDisplacementY); >- } >- >- gtk_render_focus(context, paintInfo.context().platformContext()->cr(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height()); >- } >-} >-bool RenderThemeGtk::paintButton(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect) >-{ >- GRefPtr<GtkStyleContext> context = createStyleContext(Button); >- gtk_style_context_set_direction(context.get(), static_cast<GtkTextDirection>(gtkTextDirection(renderObject.style().direction()))); >- renderButton(this, context.get(), renderObject, paintInfo, rect); >- return false; >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) > > static Color menuListColor(const Element* element) > { >-#if GTK_CHECK_VERSION(3, 20, 0) > auto& comboWidget = static_cast<RenderThemeComboBox&>(RenderThemeWidget::getOrCreate(RenderThemeWidget::Type::ComboBox)); > GtkStateFlags state = element->isDisabledFormControl() ? GTK_STATE_FLAG_INSENSITIVE : GTK_STATE_FLAG_NORMAL; > comboWidget.comboBox().setState(state); > comboWidget.button().setState(state); > return comboWidget.button().color(); >-#else >- GRefPtr<GtkStyleContext> parentStyleContext = createStyleContext(ComboBox); >- GRefPtr<GtkStyleContext> buttonStyleContext = createStyleContext(ComboBoxButton, parentStyleContext.get()); >- gtk_style_context_set_state(buttonStyleContext.get(), element->isDisabledFormControl() ? GTK_STATE_FLAG_INSENSITIVE : GTK_STATE_FLAG_NORMAL); >- >- GdkRGBA gdkRGBAColor; >- gtk_style_context_get_color(buttonStyleContext.get(), gtk_style_context_get_state(buttonStyleContext.get()), &gdkRGBAColor); >- return gdkRGBAColor; >-#endif // GTK_CHECK_VERSION(3, 20, 0) > } > > void RenderThemeGtk::adjustMenuListStyle(StyleResolver&, RenderStyle& style, const Element* element) const >@@ -774,7 +413,6 @@ void RenderThemeGtk::adjustMenuListButtonStyle(StyleResolver& styleResolver, Ren > adjustMenuListStyle(styleResolver, style, e); > } > >-#if GTK_CHECK_VERSION(3, 20, 0) > /* > * GtkComboBox gadgets tree > * >@@ -830,104 +468,12 @@ bool RenderThemeGtk::paintMenuList(const RenderObject& renderObject, const Paint > > return false; > } >-#else >-LengthBox RenderThemeGtk::popupInternalPaddingBox(const RenderStyle& style) const >-{ >- if (style.appearance() == NoControlPart) >- return { 0, 0, 0, 0 }; >- >- GRefPtr<GtkStyleContext> parentContext = createStyleContext(ComboBox); >- GRefPtr<GtkStyleContext> context = createStyleContext(ComboBoxButton, parentContext.get()); >- gtk_style_context_set_direction(context.get(), static_cast<GtkTextDirection>(gtkTextDirection(style.direction()))); >- gtk_style_context_set_state(context.get(), static_cast<GtkStateFlags>(0)); >- GtkBorder borderWidth = { 0, 0, 0, 0 }; >- gtk_style_context_get_border(context.get(), gtk_style_context_get_state(context.get()), &borderWidth); >- >- gboolean interiorFocus; >- gint focusWidth, focusPad; >- gtk_style_context_get_style(context.get(), "interior-focus", &interiorFocus, "focus-line-width", &focusWidth, "focus-padding", &focusPad, nullptr); >- focusWidth = interiorFocus ? focusWidth + focusPad : 0; >- >- return { borderWidth.top + focusWidth, borderWidth.right + focusWidth + (style.direction() == TextDirection::LTR ? minArrowSize : 0), >- borderWidth.bottom + focusWidth, borderWidth.left + focusWidth + (style.direction() == TextDirection::RTL ? minArrowSize : 0) }; >-} >- >-bool RenderThemeGtk::paintMenuList(const RenderObject& renderObject, const PaintInfo& paintInfo, const FloatRect& r) >-{ >- // FIXME: adopt subpixel themes. >- IntRect rect = IntRect(r); >- >- cairo_t* cairoContext = paintInfo.context().platformContext()->cr(); >- GtkTextDirection direction = static_cast<GtkTextDirection>(gtkTextDirection(renderObject.style().direction())); >- >- GRefPtr<GtkStyleContext> parentStyleContext = createStyleContext(ComboBox); >- >- // Paint the button. >- GRefPtr<GtkStyleContext> buttonStyleContext = createStyleContext(ComboBoxButton, parentStyleContext.get()); >- gtk_style_context_set_direction(buttonStyleContext.get(), direction); >- renderButton(this, buttonStyleContext.get(), renderObject, paintInfo, rect); >- >- // Get the inner rectangle. >- gint focusWidth, focusPad; >- GtkBorder* innerBorderPtr = 0; >- GtkBorder innerBorder = { 1, 1, 1, 1 }; >- gtk_style_context_get_style(buttonStyleContext.get(), "inner-border", &innerBorderPtr, "focus-line-width", &focusWidth, "focus-padding", &focusPad, nullptr); >- if (innerBorderPtr) { >- innerBorder = *innerBorderPtr; >- gtk_border_free(innerBorderPtr); >- } >- >- GtkBorder borderWidth; >- GtkStateFlags state = gtk_style_context_get_state(buttonStyleContext.get()); >- gtk_style_context_get_border(buttonStyleContext.get(), state, &borderWidth); >- >- focusWidth += focusPad; >- IntRect innerRect( >- rect.x() + innerBorder.left + borderWidth.left + focusWidth, >- rect.y() + innerBorder.top + borderWidth.top + focusWidth, >- rect.width() - borderWidth.left - borderWidth.right - innerBorder.left - innerBorder.right - (2 * focusWidth), >- rect.height() - borderWidth.top - borderWidth.bottom - innerBorder.top - innerBorder.bottom - (2 * focusWidth)); >- >- if (isPressed(renderObject)) { >- gint childDisplacementX; >- gint childDisplacementY; >- gtk_style_context_get_style(buttonStyleContext.get(), "child-displacement-x", &childDisplacementX, "child-displacement-y", &childDisplacementY, nullptr); >- innerRect.move(childDisplacementX, childDisplacementY); >- } >- innerRect.setWidth(std::max(1, innerRect.width())); >- innerRect.setHeight(std::max(1, innerRect.height())); >- >- // Paint the arrow. >- GRefPtr<GtkStyleContext> arrowStyleContext = createStyleContext(ComboBoxArrow, buttonStyleContext.get()); >- gtk_style_context_set_direction(arrowStyleContext.get(), direction); >- >- gfloat arrowScaling; >- gtk_style_context_get_style(parentStyleContext.get(), "arrow-scaling", &arrowScaling, nullptr); >- >- IntSize arrowSize(minArrowSize, innerRect.height()); >- FloatPoint arrowPosition(innerRect.location()); >- if (direction == GTK_TEXT_DIR_LTR) >- arrowPosition.move(innerRect.width() - arrowSize.width(), 0); >- >- // GTK+ actually fetches the xalign and valign values from the widget, but since we >- // don't have a widget here, we are just using the default xalign and valign values of 0.5. >- gint extent = std::min(arrowSize.width(), arrowSize.height()) * arrowScaling; >- arrowPosition.move((arrowSize.width() - extent) / 2, (arrowSize.height() - extent) / 2); >- >- gtk_style_context_set_state(arrowStyleContext.get(), state); >- gtk_render_arrow(arrowStyleContext.get(), cairoContext, G_PI, arrowPosition.x(), arrowPosition.y(), extent); >- >- return false; >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) > > bool RenderThemeGtk::paintMenuListButtonDecorations(const RenderBox& object, const PaintInfo& info, const FloatRect& rect) > { > return paintMenuList(object, info, rect); > } > >-#if GTK_CHECK_VERSION(3, 20, 0) >- > static IntSize spinButtonSize() > { > auto& spinButtonWidget = static_cast<RenderThemeSpinButton&>(RenderThemeWidget::getOrCreate(RenderThemeWidget::Type::SpinButton)); >@@ -977,42 +523,7 @@ bool RenderThemeGtk::paintTextField(const RenderObject& renderObject, const Pain > } > return false; > } >-#else >-void RenderThemeGtk::adjustTextFieldStyle(StyleResolver&, RenderStyle&, const Element*) const >-{ >-} >- >-bool RenderThemeGtk::paintTextField(const RenderObject& renderObject, const PaintInfo& paintInfo, const FloatRect& rect) >-{ >- GRefPtr<GtkStyleContext> context = createStyleContext(Entry); >- gtk_style_context_set_direction(context.get(), static_cast<GtkTextDirection>(gtkTextDirection(renderObject.style().direction()))); >- >- guint flags = 0; >- if (!isEnabled(renderObject) || isReadOnlyControl(renderObject)) >- flags |= GTK_STATE_FLAG_INSENSITIVE; >- else if (isFocused(renderObject)) >- flags |= GTK_STATE_FLAG_FOCUSED; >- gtk_style_context_set_state(context.get(), static_cast<GtkStateFlags>(flags)); >- >- gtk_render_background(context.get(), paintInfo.context().platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height()); >- gtk_render_frame(context.get(), paintInfo.context().platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height()); >- >- if (isFocused(renderObject) && isEnabled(renderObject)) { >- gboolean interiorFocus; >- gint focusWidth, focusPad; >- gtk_style_context_get_style(context.get(), "interior-focus", &interiorFocus, "focus-line-width", &focusWidth, "focus-padding", &focusPad, nullptr); >- if (!interiorFocus) { >- IntRect focusRect(rect); >- focusRect.inflate(focusWidth + focusPad); >- gtk_render_focus(context.get(), paintInfo.context().platformContext()->cr(), focusRect.x(), focusRect.y(), focusRect.width(), focusRect.height()); >- } >- } > >- return false; >-} >-#endif >- >-#if GTK_CHECK_VERSION(3, 20, 0) > static void adjustSearchFieldIconStyle(RenderThemePart themePart, RenderStyle& style) > { > ASSERT(themePart == EntryIconLeft || themePart == EntryIconRight); >@@ -1033,55 +544,6 @@ static void adjustSearchFieldIconStyle(RenderThemePart themePart, RenderStyle& s > style.setWidth(Length(preferredSize.width(), Fixed)); > style.setHeight(Length(preferredSize.height(), Fixed)); > } >-#else >-// Defined in GTK+ (gtk/gtkiconfactory.c) >-static const gint gtkIconSizeMenu = 16; >-static const gint gtkIconSizeSmallToolbar = 18; >-static const gint gtkIconSizeButton = 20; >-static const gint gtkIconSizeLargeToolbar = 24; >-static const gint gtkIconSizeDnd = 32; >-static const gint gtkIconSizeDialog = 48; >- >-static GtkIconSize getIconSizeForPixelSize(gint pixelSize) >-{ >- if (pixelSize < gtkIconSizeSmallToolbar) >- return GTK_ICON_SIZE_MENU; >- if (pixelSize >= gtkIconSizeSmallToolbar && pixelSize < gtkIconSizeButton) >- return GTK_ICON_SIZE_SMALL_TOOLBAR; >- if (pixelSize >= gtkIconSizeButton && pixelSize < gtkIconSizeLargeToolbar) >- return GTK_ICON_SIZE_BUTTON; >- if (pixelSize >= gtkIconSizeLargeToolbar && pixelSize < gtkIconSizeDnd) >- return GTK_ICON_SIZE_LARGE_TOOLBAR; >- if (pixelSize >= gtkIconSizeDnd && pixelSize < gtkIconSizeDialog) >- return GTK_ICON_SIZE_DND; >- >- return GTK_ICON_SIZE_DIALOG; >-} >- >-static void adjustSearchFieldIconStyle(RenderThemePart themePart, RenderStyle& style) >-{ >- style.resetBorder(); >- style.resetPadding(); >- >- GRefPtr<GtkStyleContext> parentContext = createStyleContext(Entry); >- GRefPtr<GtkStyleContext> context = createStyleContext(themePart, parentContext.get()); >- >- GtkBorder padding; >- gtk_style_context_get_padding(context.get(), gtk_style_context_get_state(context.get()), &padding); >- >- // Get the icon size based on the font size. >- int fontSize = style.computedFontPixelSize(); >- if (fontSize < gtkIconSizeMenu) { >- style.setWidth(Length(fontSize + (padding.left + padding.right), Fixed)); >- style.setHeight(Length(fontSize + (padding.top + padding.bottom), Fixed)); >- return; >- } >- gint width = 0, height = 0; >- gtk_icon_size_lookup(getIconSizeForPixelSize(fontSize), &width, &height); >- style.setWidth(Length(width + (padding.left + padding.right), Fixed)); >- style.setHeight(Length(height + (padding.top + padding.bottom), Fixed)); >-} >-#endif > > bool RenderThemeGtk::paintTextArea(const RenderObject& o, const PaintInfo& i, const FloatRect& r) > { >@@ -1108,7 +570,6 @@ void RenderThemeGtk::adjustSearchFieldCancelButtonStyle(StyleResolver&, RenderSt > adjustSearchFieldIconStyle(EntryIconRight, style); > } > >-#if GTK_CHECK_VERSION(3, 20, 0) > static bool paintSearchFieldIcon(RenderThemeGtk* theme, RenderThemePart themePart, const RenderBox& renderObject, const PaintInfo& paintInfo, const IntRect& rect) > { > ASSERT(themePart == EntryIconLeft || themePart == EntryIconRight); >@@ -1135,72 +596,6 @@ bool RenderThemeGtk::paintSearchFieldCancelButton(const RenderBox& renderObject, > { > return paintSearchFieldIcon(this, EntryIconRight, renderObject, paintInfo, rect); > } >-#else >-static bool paintIcon(GtkStyleContext* context, GraphicsContext& graphicsContext, const IntRect& rect, const char* iconName) >-{ >- GRefPtr<GdkPixbuf> icon = loadThemedIcon(context, iconName, getIconSizeForPixelSize(rect.height())); >- if (!icon) >- return false; >- >- if (gdk_pixbuf_get_width(icon.get()) > rect.width() || gdk_pixbuf_get_height(icon.get()) > rect.height()) >- icon = adoptGRef(gdk_pixbuf_scale_simple(icon.get(), rect.width(), rect.height(), GDK_INTERP_BILINEAR)); >- >- gtk_render_icon(context, graphicsContext.platformContext()->cr(), icon.get(), rect.x(), rect.y()); >- return true; >-} >- >-static bool paintEntryIcon(RenderThemePart themePart, const char* iconName, GraphicsContext& graphicsContext, const IntRect& rect, GtkTextDirection direction, GtkStateFlags state) >-{ >- GRefPtr<GtkStyleContext> parentContext = createStyleContext(Entry); >- GRefPtr<GtkStyleContext> context = createStyleContext(themePart, parentContext.get()); >- gtk_style_context_set_direction(context.get(), direction); >- gtk_style_context_set_state(context.get(), state); >- return paintIcon(context.get(), graphicsContext, rect, iconName); >-} >- >-static IntRect centerRectVerticallyInParentInputElement(const RenderObject& renderObject, const IntRect& rect) >-{ >- if (!renderObject.node()) >- return IntRect(); >- >- // Get the renderer of <input> element. >- Node* input = renderObject.node()->shadowHost(); >- if (!input) >- input = renderObject.node(); >- if (!is<RenderBox>(*input->renderer())) >- return IntRect(); >- >- // If possible center the y-coordinate of the rect vertically in the parent input element. >- // We also add one pixel here to ensure that the y coordinate is rounded up for box heights >- // that are even, which looks in relation to the box text. >- IntRect inputContentBox = downcast<RenderBox>(*input->renderer()).absoluteContentBox(); >- >- // Make sure the scaled decoration stays square and will fit in its parent's box. >- int iconSize = std::min(inputContentBox.width(), std::min(inputContentBox.height(), rect.height())); >- IntRect scaledRect(rect.x(), inputContentBox.y() + (inputContentBox.height() - iconSize + 1) / 2, iconSize, iconSize); >- return scaledRect; >-} >- >-bool RenderThemeGtk::paintSearchFieldResultsDecorationPart(const RenderBox& renderObject, const PaintInfo& paintInfo, const IntRect& rect) >-{ >- IntRect iconRect = centerRectVerticallyInParentInputElement(renderObject, rect); >- if (iconRect.isEmpty()) >- return true; >- >- return !paintEntryIcon(EntryIconLeft, "edit-find-symbolic", paintInfo.context(), iconRect, gtkTextDirection(renderObject.style().direction()), >- gtkIconStateFlags(this, renderObject)); >-} >- >-bool RenderThemeGtk::paintSearchFieldCancelButton(const RenderBox& renderObject, const PaintInfo& paintInfo, const IntRect& rect) >-{ >- IntRect iconRect = centerRectVerticallyInParentInputElement(renderObject, rect); >- if (iconRect.isEmpty()) >- return true; >- >- return !paintEntryIcon(EntryIconRight, "edit-clear-symbolic", paintInfo.context(), iconRect, gtkTextDirection(renderObject.style().direction()), >- gtkIconStateFlags(this, renderObject)); >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) > > void RenderThemeGtk::adjustSearchFieldStyle(StyleResolver&, RenderStyle& style, const Element*) const > { >@@ -1230,7 +625,6 @@ void RenderThemeGtk::adjustSliderThumbStyle(StyleResolver& styleResolver, Render > style.setBoxShadow(nullptr); > } > >-#if GTK_CHECK_VERSION(3, 20, 0) > /* > * GtkScale > * >@@ -1358,98 +752,7 @@ bool RenderThemeGtk::paintSliderThumb(const RenderObject& renderObject, const Pa > slider.render(paintInfo.context().platformContext()->cr(), sliderRect); > return false; > } >-#else >-bool RenderThemeGtk::paintSliderTrack(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect) >-{ >- ControlPart part = renderObject.style().appearance(); >- ASSERT(part == SliderHorizontalPart || part == SliderVerticalPart); >- >- GRefPtr<GtkStyleContext> parentContext = createStyleContext(Scale); >- gtk_style_context_add_class(parentContext.get(), part == SliderHorizontalPart ? GTK_STYLE_CLASS_HORIZONTAL : GTK_STYLE_CLASS_VERTICAL); >- GRefPtr<GtkStyleContext> context = createStyleContext(ScaleTrough, parentContext.get()); >- gtk_style_context_set_direction(context.get(), gtkTextDirection(renderObject.style().direction())); >- >- if (!isEnabled(renderObject)) >- gtk_style_context_set_state(context.get(), GTK_STATE_FLAG_INSENSITIVE); >- >- IntRect sliderRect = rect; >- // GTK+ uses the slider thumb size and margins to calculate the trough size, but in WebKit we render the thumb and >- // the slider track separately and the track rectangle we receive here can't be used to apply the GTK+ CSS sizes >- // and margins. So we use a maximum fixed size for the trough to match at least Adwaita, but that should look >- // good in other themes as well. >- static const int sliderSize = 4; >- >- if (part == SliderHorizontalPart) { >- sliderRect.setHeight(std::min(rect.height(), sliderSize)); >- sliderRect.move(0, (rect.height() - sliderRect.height()) / 2); >- } else { >- sliderRect.setWidth(std::min(rect.width(), sliderSize)); >- sliderRect.move((rect.width() - sliderRect.width()) / 2, 0); >- } >- >- gtk_render_background(context.get(), paintInfo.context().platformContext()->cr(), sliderRect.x(), sliderRect.y(), sliderRect.width(), sliderRect.height()); >- gtk_render_frame(context.get(), paintInfo.context().platformContext()->cr(), sliderRect.x(), sliderRect.y(), sliderRect.width(), sliderRect.height()); >- >- if (isFocused(renderObject)) { >- gint focusWidth, focusPad; >- gtk_style_context_get_style(context.get(), "focus-line-width", &focusWidth, "focus-padding", &focusPad, nullptr); >- IntRect focusRect(sliderRect); >- focusRect.inflate(focusWidth + focusPad); >- gtk_render_focus(context.get(), paintInfo.context().platformContext()->cr(), focusRect.x(), focusRect.y(), focusRect.width(), focusRect.height()); >- } >- >- return false; >-} >- >-void RenderThemeGtk::adjustSliderThumbSize(RenderStyle& style, const Element*) const >-{ >- ControlPart part = style.appearance(); >- if (part != SliderThumbHorizontalPart && part != SliderThumbVerticalPart) >- return; >- >- GRefPtr<GtkStyleContext> context = createStyleContext(Scale); >- gint sliderWidth, sliderLength; >- gtk_style_context_get_style(context.get(), "slider-width", &sliderWidth, "slider-length", &sliderLength, nullptr); >- >- if (part == SliderThumbHorizontalPart) { >- style.setWidth(Length(sliderLength, Fixed)); >- style.setHeight(Length(sliderWidth, Fixed)); >- return; >- } >- ASSERT(part == SliderThumbVerticalPart); >- style.setWidth(Length(sliderWidth, Fixed)); >- style.setHeight(Length(sliderLength, Fixed)); >-} >- >-bool RenderThemeGtk::paintSliderThumb(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect) >-{ >- ControlPart part = renderObject.style().appearance(); >- ASSERT(part == SliderThumbHorizontalPart || part == SliderThumbVerticalPart); >- >- // FIXME: The entire slider is too wide, stretching the thumb into an oval rather than a circle. >- GRefPtr<GtkStyleContext> parentContext = createStyleContext(Scale); >- gtk_style_context_add_class(parentContext.get(), part == SliderThumbHorizontalPart ? GTK_STYLE_CLASS_HORIZONTAL : GTK_STYLE_CLASS_VERTICAL); >- GRefPtr<GtkStyleContext> troughContext = createStyleContext(ScaleTrough, parentContext.get()); >- GRefPtr<GtkStyleContext> context = createStyleContext(ScaleSlider, troughContext.get()); >- gtk_style_context_set_direction(context.get(), gtkTextDirection(renderObject.style().direction())); >- >- guint flags = 0; >- if (!isEnabled(renderObject)) >- flags |= GTK_STATE_FLAG_INSENSITIVE; >- else if (isHovered(renderObject)) >- flags |= GTK_STATE_FLAG_PRELIGHT; >- if (isPressed(renderObject)) >- flags |= GTK_STATE_FLAG_ACTIVE; >- gtk_style_context_set_state(context.get(), static_cast<GtkStateFlags>(flags)); >- >- gtk_render_slider(context.get(), paintInfo.context().platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height(), >- part == SliderThumbHorizontalPart ? GTK_ORIENTATION_HORIZONTAL : GTK_ORIENTATION_VERTICAL); >- >- return false; >-} >-#endif > >-#if GTK_CHECK_VERSION(3, 20, 0) > IntRect RenderThemeGtk::progressBarRectForBounds(const RenderObject& renderObject, const IntRect& bounds) const > { > const auto& renderProgress = downcast<RenderProgress>(renderObject); >@@ -1472,49 +775,7 @@ bool RenderThemeGtk::paintProgressBar(const RenderObject& renderObject, const Pa > progressBarWidget.progress().render(paintInfo.context().platformContext()->cr(), calculateProgressRect(renderObject, rect)); > return false; > } >-#else >-IntRect RenderThemeGtk::progressBarRectForBounds(const RenderObject&, const IntRect& bounds) const >-{ >- return bounds; >-} >- >-bool RenderThemeGtk::paintProgressBar(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect) >-{ >- if (!renderObject.isProgress()) >- return true; >- >- GRefPtr<GtkStyleContext> parentContext = createStyleContext(ProgressBar); >- GRefPtr<GtkStyleContext> troughContext = createStyleContext(ProgressBarTrough, parentContext.get()); >- GRefPtr<GtkStyleContext> context = createStyleContext(ProgressBarProgress, troughContext.get()); >- >- gtk_render_background(troughContext.get(), paintInfo.context().platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height()); >- gtk_render_frame(troughContext.get(), paintInfo.context().platformContext()->cr(), rect.x(), rect.y(), rect.width(), rect.height()); >- >- gtk_style_context_set_state(context.get(), static_cast<GtkStateFlags>(0)); >- >- GtkBorder padding; >- gtk_style_context_get_padding(context.get(), gtk_style_context_get_state(context.get()), &padding); >- IntRect progressRect( >- rect.x() + padding.left, >- rect.y() + padding.top, >- rect.width() - (padding.left + padding.right), >- rect.height() - (padding.top + padding.bottom)); >- progressRect = RenderThemeGtk::calculateProgressRect(renderObject, progressRect); >- >- if (!progressRect.isEmpty()) { >-#if GTK_CHECK_VERSION(3, 13, 7) >- gtk_render_background(context.get(), paintInfo.context().platformContext()->cr(), progressRect.x(), progressRect.y(), progressRect.width(), progressRect.height()); >- gtk_render_frame(context.get(), paintInfo.context().platformContext()->cr(), progressRect.x(), progressRect.y(), progressRect.width(), progressRect.height()); >-#else >- gtk_render_activity(context.get(), paintInfo.context().platformContext()->cr(), progressRect.x(), progressRect.y(), progressRect.width(), progressRect.height()); >-#endif >- } >- >- return false; >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) > >-#if GTK_CHECK_VERSION(3, 20, 0) > RenderTheme::InnerSpinButtonLayout RenderThemeGtk::innerSpinButtonLayout(const RenderObject& renderObject) const > { > return renderObject.style().direction() == TextDirection::RTL ? InnerSpinButtonLayout::HorizontalUpLeft : InnerSpinButtonLayout::HorizontalUpRight; >@@ -1551,114 +812,6 @@ bool RenderThemeGtk::paintInnerSpinButton(const RenderObject& renderObject, cons > > return false; > } >-#else >-RenderTheme::InnerSpinButtonLayout RenderThemeGtk::innerSpinButtonLayout(const RenderObject&) const >-{ >- return InnerSpinButtonLayout::Vertical; >-} >-static gint spinButtonArrowSize(GtkStyleContext* context) >-{ >- PangoFontDescription* fontDescription; >- gtk_style_context_get(context, gtk_style_context_get_state(context), "font", &fontDescription, nullptr); >- gint fontSize = pango_font_description_get_size(fontDescription); >- gint arrowSize = std::max(PANGO_PIXELS(fontSize), minSpinButtonArrowSize); >- pango_font_description_free(fontDescription); >- >- return arrowSize - arrowSize % 2; // Force even. >-} >- >-void RenderThemeGtk::adjustInnerSpinButtonStyle(StyleResolver&, RenderStyle& style, const Element*) const >-{ >- GRefPtr<GtkStyleContext> context = createStyleContext(SpinButton); >- >- GtkBorder padding; >- gtk_style_context_get_padding(context.get(), gtk_style_context_get_state(context.get()), &padding); >- >- int width = spinButtonArrowSize(context.get()) + padding.left + padding.right; >- style.setWidth(Length(width, Fixed)); >- style.setMinWidth(Length(width, Fixed)); >-} >- >-static void paintSpinArrowButton(RenderTheme* theme, GtkStyleContext* parentContext, const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect, GtkArrowType arrowType) >-{ >- ASSERT(arrowType == GTK_ARROW_UP || arrowType == GTK_ARROW_DOWN); >- >- GRefPtr<GtkStyleContext> context = createStyleContext(arrowType == GTK_ARROW_UP ? SpinButtonUpButton : SpinButtonDownButton, parentContext); >- GtkTextDirection direction = gtk_style_context_get_direction(context.get()); >- guint state = static_cast<guint>(gtk_style_context_get_state(context.get())); >- if (!(state & GTK_STATE_FLAG_INSENSITIVE)) { >- if (theme->isPressed(renderObject)) { >- if ((arrowType == GTK_ARROW_UP && theme->isSpinUpButtonPartPressed(renderObject)) >- || (arrowType == GTK_ARROW_DOWN && !theme->isSpinUpButtonPartPressed(renderObject))) >- state |= GTK_STATE_FLAG_ACTIVE; >- } else if (theme->isHovered(renderObject)) { >- if ((arrowType == GTK_ARROW_UP && theme->isSpinUpButtonPartHovered(renderObject)) >- || (arrowType == GTK_ARROW_DOWN && !theme->isSpinUpButtonPartHovered(renderObject))) >- state |= GTK_STATE_FLAG_PRELIGHT; >- } >- } >- gtk_style_context_set_state(context.get(), static_cast<GtkStateFlags>(state)); >- >- // Paint button. >- IntRect buttonRect(rect); >- guint junction = gtk_style_context_get_junction_sides(context.get()); >- if (arrowType == GTK_ARROW_UP) >- junction |= GTK_JUNCTION_BOTTOM; >- else { >- junction |= GTK_JUNCTION_TOP; >- buttonRect.move(0, rect.height() / 2); >- } >- buttonRect.setHeight(rect.height() / 2); >- gtk_style_context_set_junction_sides(context.get(), static_cast<GtkJunctionSides>(junction)); >- >- gtk_render_background(context.get(), paintInfo.context().platformContext()->cr(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height()); >- gtk_render_frame(context.get(), paintInfo.context().platformContext()->cr(), buttonRect.x(), buttonRect.y(), buttonRect.width(), buttonRect.height()); >- >- // Paint arrow centered inside button. >- // This code is based on gtkspinbutton.c code. >- IntRect arrowRect; >- gdouble angle; >- if (arrowType == GTK_ARROW_UP) { >- angle = 0; >- arrowRect.setY(rect.y()); >- arrowRect.setHeight(rect.height() / 2 - 2); >- } else { >- angle = G_PI; >- arrowRect.setY(rect.y() + buttonRect.y()); >- arrowRect.setHeight(rect.height() - arrowRect.y() - 2); >- } >- arrowRect.setWidth(rect.width() - 3); >- if (direction == GTK_TEXT_DIR_LTR) >- arrowRect.setX(rect.x() + 1); >- else >- arrowRect.setX(rect.x() + 2); >- >- gint width = arrowRect.width() / 2; >- width -= width % 2 - 1; // Force odd. >- gint height = (width + 1) / 2; >- >- arrowRect.move((arrowRect.width() - width) / 2, (arrowRect.height() - height) / 2); >- gtk_render_arrow(context.get(), paintInfo.context().platformContext()->cr(), angle, arrowRect.x(), arrowRect.y(), width); >-} >- >-bool RenderThemeGtk::paintInnerSpinButton(const RenderObject& renderObject, const PaintInfo& paintInfo, const IntRect& rect) >-{ >- GRefPtr<GtkStyleContext> context = createStyleContext(SpinButton); >- gtk_style_context_set_direction(context.get(), gtkTextDirection(renderObject.style().direction())); >- >- guint flags = 0; >- if (!isEnabled(renderObject) || isReadOnlyControl(renderObject)) >- flags |= GTK_STATE_FLAG_INSENSITIVE; >- else if (isFocused(renderObject)) >- flags |= GTK_STATE_FLAG_FOCUSED; >- gtk_style_context_set_state(context.get(), static_cast<GtkStateFlags>(flags)); >- >- paintSpinArrowButton(this, context.get(), renderObject, paintInfo, rect, GTK_ARROW_UP); >- paintSpinArrowButton(this, context.get(), renderObject, paintInfo, rect, GTK_ARROW_DOWN); >- >- return false; >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) > > Seconds RenderThemeGtk::caretBlinkInterval() const > { >@@ -1677,7 +830,6 @@ Seconds RenderThemeGtk::caretBlinkInterval() const > > enum StyleColorType { StyleColorBackground, StyleColorForeground }; > >-#if GTK_CHECK_VERSION(3, 20, 0) > static Color styleColor(RenderThemePart themePart, GtkStateFlags state, StyleColorType colorType) > { > RenderThemeGadget* gadget = nullptr; >@@ -1706,20 +858,6 @@ static Color styleColor(RenderThemePart themePart, GtkStateFlags state, StyleCol > gadget->setState(state); > return colorType == StyleColorBackground ? gadget->backgroundColor() : gadget->color(); > } >-#else >-static Color styleColor(RenderThemePart themePart, GtkStateFlags state, StyleColorType colorType) >-{ >- GRefPtr<GtkStyleContext> context = createStyleContext(themePart); >- gtk_style_context_set_state(context.get(), state); >- >- GdkRGBA gdkRGBAColor; >- if (colorType == StyleColorBackground) >- gtk_style_context_get_background_color(context.get(), state, &gdkRGBAColor); >- else >- gtk_style_context_get_color(context.get(), state, &gdkRGBAColor); >- return gdkRGBAColor; >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) > > Color RenderThemeGtk::platformActiveSelectionBackgroundColor(OptionSet<StyleColor::Options>) const > { >@@ -1779,7 +917,6 @@ Color RenderThemeGtk::systemColor(CSSValueID cssValueId, OptionSet<StyleColor::O > return styleColor(Entry, GTK_STATE_FLAG_INSENSITIVE, StyleColorForeground); > case CSSValueWebkitControlBackground: > return styleColor(Entry, GTK_STATE_FLAG_ACTIVE, StyleColorBackground); >-#if GTK_CHECK_VERSION(3, 20, 0) > case CSSValueWindow: { > // Only get window color from the theme in dark mode. > gboolean preferDarkTheme = FALSE; >@@ -1789,7 +926,6 @@ Color RenderThemeGtk::systemColor(CSSValueID cssValueId, OptionSet<StyleColor::O > return styleColor(Window, GTK_STATE_FLAG_ACTIVE, StyleColorBackground); > break; > } >-#endif > default: > break; > } >@@ -1815,7 +951,6 @@ String RenderThemeGtk::extraFullScreenStyleSheet() > } > #endif > >-#if GTK_CHECK_VERSION(3, 20, 0) > bool RenderThemeGtk::paintMediaButton(const RenderObject& renderObject, GraphicsContext& graphicsContext, const IntRect& rect, const char* iconName) > { > auto& iconWidget = static_cast<RenderThemeIcon&>(RenderThemeWidget::getOrCreate(RenderThemeWidget::Type::Icon)); >@@ -1825,17 +960,6 @@ bool RenderThemeGtk::paintMediaButton(const RenderObject& renderObject, Graphics > icon.setIconName(iconName); > return !icon.render(graphicsContext.platformContext()->cr(), rect); > } >-#else >-bool RenderThemeGtk::paintMediaButton(const RenderObject& renderObject, GraphicsContext& graphicsContext, const IntRect& rect, const char* iconName) >-{ >- GRefPtr<GtkStyleContext> context = createStyleContext(MediaButton); >- gtk_style_context_set_direction(context.get(), gtkTextDirection(renderObject.style().direction())); >- gtk_style_context_set_state(context.get(), gtkIconStateFlags(this, renderObject)); >- static const unsigned mediaIconSize = 16; >- IntRect iconRect(rect.x() + (rect.width() - mediaIconSize) / 2, rect.y() + (rect.height() - mediaIconSize) / 2, mediaIconSize, mediaIconSize); >- return !paintIcon(context.get(), graphicsContext, iconRect, iconName); >-} >-#endif // GTK_CHECK_VERSION(3, 20, 0) > > bool RenderThemeGtk::hasOwnDisabledStateHandlingFor(ControlPart part) const > { >diff --git a/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp b/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp >index 3be648c00c14ad140008257dc8363613efe545e3..8fcfbcacee04dce9bec8b40a4ab18952045c3f99 100644 >--- a/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp >+++ b/Source/WebKit/NetworkProcess/soup/NetworkDataTaskSoup.cpp >@@ -157,10 +157,7 @@ void NetworkDataTaskSoup::createRequest(ResourceRequest&& request) > soup_message_headers_set_content_length(soupMessage->request_headers, 0); > > soup_message_set_flags(soupMessage.get(), static_cast<SoupMessageFlags>(soup_message_get_flags(soupMessage.get()) | messageFlags)); >- >-#if SOUP_CHECK_VERSION(2, 43, 1) > soup_message_set_priority(soupMessage.get(), toSoupMessagePriority(m_currentRequest.priority())); >-#endif > > m_soupRequest = WTFMove(soupRequest); > m_soupMessage = WTFMove(soupMessage); >@@ -170,11 +167,7 @@ void NetworkDataTaskSoup::createRequest(ResourceRequest&& request) > g_signal_connect(static_cast<NetworkSessionSoup&>(m_session.get()).soupSession(), "authenticate", G_CALLBACK(authenticateCallback), this); > g_signal_connect(m_soupMessage.get(), "network-event", G_CALLBACK(networkEventCallback), this); > g_signal_connect(m_soupMessage.get(), "restarted", G_CALLBACK(restartedCallback), this); >-#if SOUP_CHECK_VERSION(2, 49, 91) > g_signal_connect(m_soupMessage.get(), "starting", G_CALLBACK(startingCallback), this); >-#else >- g_signal_connect(static_cast<NetworkSessionSoup&>(m_session.get()).soupSession(), "request-started", G_CALLBACK(requestStartedCallback), this); >-#endif > } > > void NetworkDataTaskSoup::clearRequest() >@@ -921,13 +914,7 @@ void NetworkDataTaskSoup::writeDownloadCallback(GOutputStream* outputStream, GAs > > GUniqueOutPtr<GError> error; > gsize bytesWritten; >-#if GLIB_CHECK_VERSION(2, 44, 0) > g_output_stream_write_all_finish(outputStream, result, &bytesWritten, &error.outPtr()); >-#else >- gssize writeTaskResult = g_task_propagate_int(G_TASK(result), &error.outPtr()); >- if (writeTaskResult != -1) >- bytesWritten = writeTaskResult; >-#endif > if (error) > task->didFailDownload(downloadDestinationError(task->m_response, error->message)); > else >@@ -937,31 +924,8 @@ void NetworkDataTaskSoup::writeDownloadCallback(GOutputStream* outputStream, GAs > void NetworkDataTaskSoup::writeDownload() > { > RefPtr<NetworkDataTaskSoup> protectedThis(this); >-#if GLIB_CHECK_VERSION(2, 44, 0) > g_output_stream_write_all_async(m_downloadOutputStream.get(), m_readBuffer.data(), m_readBuffer.size(), RunLoopSourcePriority::AsyncIONetwork, m_cancellable.get(), > reinterpret_cast<GAsyncReadyCallback>(writeDownloadCallback), protectedThis.leakRef()); >-#else >- GRefPtr<GTask> writeTask = adoptGRef(g_task_new(m_downloadOutputStream.get(), m_cancellable.get(), >- reinterpret_cast<GAsyncReadyCallback>(writeDownloadCallback), protectedThis.leakRef())); >- g_task_set_task_data(writeTask.get(), this, nullptr); >- g_task_run_in_thread(writeTask.get(), [](GTask* writeTask, gpointer source, gpointer userData, GCancellable* cancellable) { >- auto* task = static_cast<NetworkDataTaskSoup*>(userData); >- GOutputStream* outputStream = G_OUTPUT_STREAM(source); >- RELEASE_ASSERT(task->m_downloadOutputStream.get() == outputStream); >- RELEASE_ASSERT(task->m_cancellable.get() == cancellable); >- GError* error = nullptr; >- if (g_cancellable_set_error_if_cancelled(cancellable, &error)) { >- g_task_return_error(writeTask, error); >- return; >- } >- >- gsize bytesWritten; >- if (g_output_stream_write_all(outputStream, task->m_readBuffer.data(), task->m_readBuffer.size(), &bytesWritten, cancellable, &error)) >- g_task_return_int(writeTask, bytesWritten); >- else >- g_task_return_error(writeTask, error); >- }); >-#endif > } > > void NetworkDataTaskSoup::didWriteDownload(gsize bytesWritten) >@@ -1084,7 +1048,6 @@ void NetworkDataTaskSoup::networkEvent(GSocketClientEvent event, GIOStream* stre > } > } > >-#if SOUP_CHECK_VERSION(2, 49, 91) > void NetworkDataTaskSoup::startingCallback(SoupMessage* soupMessage, NetworkDataTaskSoup* task) > { > if (task->state() == State::Canceling || task->state() == State::Completed || !task->m_client) >@@ -1093,19 +1056,6 @@ void NetworkDataTaskSoup::startingCallback(SoupMessage* soupMessage, NetworkData > ASSERT(task->m_soupMessage.get() == soupMessage); > task->didStartRequest(); > } >-#else >-void NetworkDataTaskSoup::requestStartedCallback(SoupSession* session, SoupMessage* soupMessage, SoupSocket*, NetworkDataTaskSoup* task) >-{ >- ASSERT(session == static_cast<NetworkSessionSoup&>(task->m_session.get()).soupSession()); >- if (soupMessage != task->m_soupMessage.get()) >- return; >- >- if (task->state() == State::Canceling || task->state() == State::Completed || !task->m_client) >- return; >- >- task->didStartRequest(); >-} >-#endif > > void NetworkDataTaskSoup::didStartRequest() > { >diff --git a/Source/WebKit/Shared/gtk/WebEventFactory.cpp b/Source/WebKit/Shared/gtk/WebEventFactory.cpp >index aab75a59091589a3de665e551fa6c330d03742cc..daea1526f38b4cd72e9efdacc37b3378e0f14abd 100644 >--- a/Source/WebKit/Shared/gtk/WebEventFactory.cpp >+++ b/Source/WebKit/Shared/gtk/WebEventFactory.cpp >@@ -72,11 +72,7 @@ static inline OptionSet<WebEvent::Modifier> modifiersForEvent(const GdkEvent* ev > static inline WebMouseEvent::Button buttonForEvent(const GdkEvent* event) > { > unsigned button = 0; >-#if GTK_CHECK_VERSION(3, 10, 0) > GdkEventType type = gdk_event_get_event_type(event); >-#else >- GdkEventType type = event->type; >-#endif > switch (type) { > case GDK_ENTER_NOTIFY: > case GDK_LEAVE_NOTIFY: >@@ -153,11 +149,7 @@ WebMouseEvent WebEventFactory::createWebMouseEvent(const GdkEvent* event, int cu > > WebEvent::Type type = static_cast<WebEvent::Type>(0); > >-#if GTK_CHECK_VERSION(3, 10, 0) > GdkEventType eventType = gdk_event_get_event_type(event); >-#else >- GdkEventType eventType = event->type; >-#endif > switch (eventType) { > case GDK_MOTION_NOTIFY: > case GDK_ENTER_NOTIFY: >@@ -197,18 +189,9 @@ WebMouseEvent WebEventFactory::createWebMouseEvent(const GdkEvent* event, int cu > > WebWheelEvent WebEventFactory::createWebWheelEvent(const GdkEvent* event) > { >-#if GTK_CHECK_VERSION(3, 20, 0) > WebWheelEvent::Phase phase = gdk_event_is_scroll_stop_event(event) ? > WebWheelEvent::Phase::PhaseEnded : > WebWheelEvent::Phase::PhaseChanged; >-#else >- double deltaX, deltaY; >- gdk_event_get_scroll_deltas(event, &deltaX, &deltaY); >- WebWheelEvent::Phase phase = event->scroll.direction == GDK_SCROLL_SMOOTH && !deltaX && !deltaY ? >- WebWheelEvent::Phase::PhaseEnded : >- WebWheelEvent::Phase::PhaseChanged; >-#endif >- > return createWebWheelEvent(event, phase, WebWheelEvent::Phase::PhaseNone); > } > >@@ -269,12 +252,7 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(const GdkEvent* event, > gdk_event_get_keyval(event, &keyval); > guint16 keycode; > gdk_event_get_keycode(event, &keycode); >- >-#if GTK_CHECK_VERSION(3, 10, 0) > GdkEventType type = gdk_event_get_event_type(event); >-#else >- GdkEventType type = event->type; >-#endif > > return WebKeyboardEvent( > type == GDK_KEY_RELEASE ? WebEvent::KeyUp : WebEvent::KeyDown, >@@ -295,11 +273,7 @@ WebKeyboardEvent WebEventFactory::createWebKeyboardEvent(const GdkEvent* event, > WebTouchEvent WebEventFactory::createWebTouchEvent(const GdkEvent* event, Vector<WebPlatformTouchPoint>&& touchPoints) > { > WebEvent::Type type = WebEvent::NoType; >-#if GTK_CHECK_VERSION(3, 10, 0) > GdkEventType eventType = gdk_event_get_event_type(event); >-#else >- GdkEventType eventType = event->type; >-#endif > switch (eventType) { > case GDK_TOUCH_BEGIN: > type = WebEvent::TouchStart; >diff --git a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp >index 6482298f37b1396173de83b0ec2c955c142c8521..628cd2a726a782faaa72716bc2be539f5b612d7f 100644 >--- a/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp >+++ b/Source/WebKit/UIProcess/API/gtk/PageClientImpl.cpp >@@ -376,14 +376,12 @@ void PageClientImpl::doneWithTouchEvent(const NativeWebTouchEvent& event, bool w > { > const GdkEvent* touchEvent = event.nativeEvent(); > >-#if HAVE(GTK_GESTURES) > GestureController& gestureController = webkitWebViewBaseGestureController(WEBKIT_WEB_VIEW_BASE(m_viewWidget)); > if (wasEventHandled) { > gestureController.reset(); > return; > } > wasEventHandled = gestureController.handleEvent(const_cast<GdkEvent*>(event.nativeEvent())); >-#endif > > if (wasEventHandled) > return; >diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp >index 9be93ca49af88f17627db1902ee574c8eb0d0c53..0992f363be5d58b4caef47e90d3c0e7d7dfc3d8f 100644 >--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp >+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBase.cpp >@@ -79,10 +79,6 @@ > #include <gdk/gdkx.h> > #endif > >-// gtk_widget_get_scale_factor() appeared in GTK 3.10, but we also need >-// to make sure we have cairo new enough to support cairo_surface_set_device_scale >-#define HAVE_GTK_SCALE_FACTOR HAVE_CAIRO_SURFACE_SET_DEVICE_SCALE && GTK_CHECK_VERSION(3, 10, 0) >- > using namespace WebKit; > using namespace WebCore; > >@@ -122,11 +118,8 @@ public: > double x, y; > gdk_event_get_coords(event, &x, &y); > gdk_event_get_button(event, &button); >-#if GTK_CHECK_VERSION(3, 10, 0) > type = gdk_event_get_event_type(event); >-#else >- type = event->type; >-#endif >+ > if ((type == GDK_2BUTTON_PRESS || type == GDK_3BUTTON_PRESS) > || ((std::abs(x - previousClickPoint.x()) < doubleClickDistance) > && (std::abs(y - previousClickPoint.y()) < doubleClickDistance) >@@ -227,9 +220,7 @@ struct _WebKitWebViewBasePrivate { > std::unique_ptr<DragAndDropHandler> dragAndDropHandler; > #endif > >-#if HAVE(GTK_GESTURES) > std::unique_ptr<GestureController> gestureController; >-#endif > std::unique_ptr<ViewGestureController> viewGestureController; > bool isBackForwardNavigationGestureEnabled { false }; > >@@ -422,9 +413,7 @@ static void webkitWebViewBaseRealize(GtkWidget* widget) > | GDK_BUTTON2_MOTION_MASK > | GDK_BUTTON3_MOTION_MASK > | GDK_TOUCH_MASK; >-#if HAVE(GTK_GESTURES) > attributes.event_mask |= GDK_TOUCHPAD_GESTURE_MASK; >-#endif > > gint attributesMask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL; > >@@ -821,11 +810,7 @@ static void webkitWebViewBaseHandleMouseEvent(WebKitWebViewBase* webViewBase, Gd > ASSERT(!priv->dialog); > > int clickCount = 0; >-#if GTK_CHECK_VERSION(3, 10, 0) > GdkEventType eventType = gdk_event_get_event_type(event); >-#else >- GdkEventType eventType = event->type; >-#endif > switch (eventType) { > case GDK_BUTTON_PRESS: > case GDK_2BUTTON_PRESS: >@@ -1056,11 +1041,7 @@ static inline WebPlatformTouchPoint::TouchPointState touchPointStateForEvents(co > static void webkitWebViewBaseGetTouchPointsForEvent(WebKitWebViewBase* webViewBase, GdkEvent* event, Vector<WebPlatformTouchPoint>& touchPoints) > { > WebKitWebViewBasePrivate* priv = webViewBase->priv; >-#if GTK_CHECK_VERSION(3, 10, 0) > GdkEventType type = gdk_event_get_event_type(event); >-#else >- GdkEventType type = event->type; >-#endif > bool touchEnd = (type == GDK_TOUCH_END) || (type == GDK_TOUCH_CANCEL); > touchPoints.reserveInitialCapacity(touchEnd ? priv->touchEvents.size() + 1 : priv->touchEvents.size()); > >@@ -1083,11 +1064,7 @@ static gboolean webkitWebViewBaseTouchEvent(GtkWidget* widget, GdkEventTouch* ev > GdkEvent* touchEvent = reinterpret_cast<GdkEvent*>(event); > uint32_t sequence = GPOINTER_TO_UINT(gdk_event_get_event_sequence(touchEvent)); > >-#if GTK_CHECK_VERSION(3, 10, 0) > GdkEventType type = gdk_event_get_event_type(touchEvent); >-#else >- GdkEventType type = touchEvent->type >-#endif > switch (type) { > case GDK_TOUCH_BEGIN: { > ASSERT(!priv->touchEvents.contains(sequence)); >@@ -1119,7 +1096,6 @@ static gboolean webkitWebViewBaseTouchEvent(GtkWidget* widget, GdkEventTouch* ev > } > #endif // ENABLE(TOUCH_EVENTS) > >-#if HAVE(GTK_GESTURES) > class TouchGestureController final : public GestureControllerClient { > WTF_MAKE_FAST_ALLOCATED; > >@@ -1142,11 +1118,7 @@ private: > scrollEvent->scroll.delta_x = delta.x(); > scrollEvent->scroll.delta_y = delta.y(); > scrollEvent->scroll.state = event->state; >-#if GTK_CHECK_VERSION(3, 20, 0) > scrollEvent->scroll.is_stop = isStop; >-#else >- UNUSED_PARAM(isStop); >-#endif > scrollEvent->scroll.window = event->window ? GDK_WINDOW(g_object_ref(event->window)) : nullptr; > auto* touchEvent = reinterpret_cast<GdkEvent*>(event); > gdk_event_set_screen(scrollEvent.get(), gdk_event_get_screen(touchEvent)); >@@ -1244,7 +1216,6 @@ GestureController& webkitWebViewBaseGestureController(WebKitWebViewBase* webView > priv->gestureController = std::make_unique<GestureController>(GTK_WIDGET(webViewBase), std::make_unique<TouchGestureController>(webViewBase)); > return *priv->gestureController; > } >-#endif > > void webkitWebViewBaseSetEnableBackForwardNavigationGesture(WebKitWebViewBase* webViewBase, bool enabled) > { >@@ -1325,15 +1296,8 @@ static void webkitWebViewBaseDragDataReceived(GtkWidget* widget, GdkDragContext* > > static gboolean webkitWebViewBaseEvent(GtkWidget* widget, GdkEvent* event) > { >-#if HAVE(GTK_GESTURES) >-#if GTK_CHECK_VERSION(3, 10, 0) > if (gdk_event_get_event_type(event) == GDK_TOUCHPAD_PINCH) >-#else >- if (event->type == GDK_TOUCHPAD_PINCH) >-#endif // GTK_CHECK_VERSION(3, 10, 0) > webkitWebViewBaseGestureController(WEBKIT_WEB_VIEW_BASE(widget)).handleEvent(event); >-#endif // HAVE(GTK_GESTURES) >- > return GDK_EVENT_PROPAGATE; > } > >@@ -1486,12 +1450,10 @@ WebPageProxy* webkitWebViewBaseGetPage(WebKitWebViewBase* webkitWebViewBase) > return webkitWebViewBase->priv->pageProxy.get(); > } > >-#if HAVE(GTK_SCALE_FACTOR) > static void deviceScaleFactorChanged(WebKitWebViewBase* webkitWebViewBase) > { > webkitWebViewBase->priv->pageProxy->setIntrinsicDeviceScaleFactor(gtk_widget_get_scale_factor(GTK_WIDGET(webkitWebViewBase))); > } >-#endif // HAVE(GTK_SCALE_FACTOR) > > void webkitWebViewBaseCreateWebPage(WebKitWebViewBase* webkitWebViewBase, Ref<API::PageConfiguration>&& configuration) > { >@@ -1503,11 +1465,9 @@ void webkitWebViewBaseCreateWebPage(WebKitWebViewBase* webkitWebViewBase, Ref<AP > > priv->inputMethodFilter.setPage(priv->pageProxy.get()); > >-#if HAVE(GTK_SCALE_FACTOR) > // We attach this here, because changes in scale factor are passed directly to the page proxy. > priv->pageProxy->setIntrinsicDeviceScaleFactor(gtk_widget_get_scale_factor(GTK_WIDGET(webkitWebViewBase))); > g_signal_connect(webkitWebViewBase, "notify::scale-factor", G_CALLBACK(deviceScaleFactorChanged), nullptr); >-#endif > } > > void webkitWebViewBaseSetTooltipText(WebKitWebViewBase* webViewBase, const char* tooltip) >@@ -1754,16 +1714,11 @@ RefPtr<WebKit::ViewSnapshot> webkitWebViewBaseTakeViewSnapshot(WebKitWebViewBase > > IntSize size = page->viewSize(); > >-#if HAVE_GTK_SCALE_FACTOR > float deviceScale = page->deviceScaleFactor(); > size.scale(deviceScale); >-#endif > > RefPtr<cairo_surface_t> surface = adoptRef(cairo_image_surface_create(CAIRO_FORMAT_RGB24, size.width(), size.height())); >- >-#if HAVE_GTK_SCALE_FACTOR > cairoSurfaceSetDeviceScale(surface.get(), deviceScale, deviceScale); >-#endif > > RefPtr<cairo_t> cr = adoptRef(cairo_create(surface.get())); > webkitWebViewBaseDraw(GTK_WIDGET(webkitWebViewBase), cr.get()); >diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h >index 33cf7c543920fb3a25d27cf40f96691adb49f2b4..c6bed3e30b382bc59cb6d5140dcbd3ebbf2180f1 100644 >--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h >+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewBasePrivate.h >@@ -80,9 +80,7 @@ void webkitWebViewBasePageClosed(WebKitWebViewBase*); > WebKit::DragAndDropHandler& webkitWebViewBaseDragAndDropHandler(WebKitWebViewBase*); > #endif > >-#if HAVE(GTK_GESTURES) > WebKit::GestureController& webkitWebViewBaseGestureController(WebKitWebViewBase*); >-#endif > > RefPtr<WebKit::ViewSnapshot> webkitWebViewBaseTakeViewSnapshot(WebKitWebViewBase*); > >diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewDialog.cpp b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewDialog.cpp >index 53b51d1f564e9d283e34d044a04534ca8e828de6..70e6d394b2a14ec802dad143ce04311c798db229 100644 >--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewDialog.cpp >+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewDialog.cpp >@@ -24,9 +24,6 @@ > #include <wtf/glib/WTFGType.h> > > struct _WebKitWebViewDialogPrivate { >-#if !GTK_CHECK_VERSION(3, 20, 0) >- GRefPtr<GtkStyleContext> styleContext; >-#endif > }; > > WEBKIT_DEFINE_ABSTRACT_TYPE(WebKitWebViewDialog, webkit_web_view_dialog, GTK_TYPE_EVENT_BOX) >@@ -41,11 +38,7 @@ static gboolean webkitWebViewDialogDraw(GtkWidget* widget, cairo_t* cr) > GtkAllocation allocation; > gtk_widget_get_allocation(child, &allocation); > >-#if GTK_CHECK_VERSION(3, 20, 0) > GtkStyleContext* styleContext = gtk_widget_get_style_context(widget); >-#else >- GtkStyleContext* styleContext = WEBKIT_WEB_VIEW_DIALOG(widget)->priv->styleContext.get(); >-#endif > gtk_render_background(styleContext, cr, allocation.x, allocation.y, allocation.width, allocation.height); > } > >@@ -81,20 +74,8 @@ static void webkitWebViewDialogConstructed(GObject* object) > > gtk_widget_set_app_paintable(GTK_WIDGET(object), TRUE); > >-#if GTK_CHECK_VERSION(3, 20, 0) > gtk_style_context_add_class(gtk_widget_get_style_context(GTK_WIDGET(object)), GTK_STYLE_CLASS_CSD); > gtk_style_context_add_class(gtk_widget_get_style_context(GTK_WIDGET(object)), GTK_STYLE_CLASS_BACKGROUND); >-#else >- WebKitWebViewDialogPrivate* priv = WEBKIT_WEB_VIEW_DIALOG(object)->priv; >- priv->styleContext = adoptGRef(gtk_style_context_new()); >- GtkWidgetPath* path = gtk_widget_path_new(); >- gtk_widget_path_append_type(path, GTK_TYPE_WINDOW); >- gtk_style_context_add_class(priv->styleContext.get(), GTK_STYLE_CLASS_BACKGROUND); >- gtk_style_context_add_class(priv->styleContext.get(), GTK_STYLE_CLASS_TITLEBAR); >- gtk_style_context_add_class(priv->styleContext.get(), GTK_STYLE_CLASS_CSD); >- gtk_style_context_set_path(priv->styleContext.get(), path); >- gtk_widget_path_free(path); >-#endif > } > > static void webkit_web_view_dialog_class_init(WebKitWebViewDialogClass* klass) >@@ -106,7 +87,5 @@ static void webkit_web_view_dialog_class_init(WebKitWebViewDialogClass* klass) > widgetClass->draw = webkitWebViewDialogDraw; > widgetClass->size_allocate = webkitWebViewDialogSizeAllocate; > >-#if GTK_CHECK_VERSION(3, 20, 0) > gtk_widget_class_set_css_name(widgetClass, "messagedialog"); >-#endif > } >diff --git a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp >index 4f0e151c0db048c911abe7292c3fbac7b7b915af..af71e3b4d9e33cb134aeb44577081683d240cc08 100644 >--- a/Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp >+++ b/Source/WebKit/UIProcess/API/gtk/WebKitWebViewGtk.cpp >@@ -62,11 +62,7 @@ static void fileChooserDialogResponseCallback(GtkFileChooser* dialog, gint respo > } else > webkit_file_chooser_request_cancel(adoptedRequest.get()); > >-#if GTK_CHECK_VERSION(3, 20, 0) > g_object_unref(dialog); >-#else >- gtk_widget_destroy(GTK_WIDGET(dialog)); >-#endif > } > > gboolean webkitWebViewRunFileChooser(WebKitWebView* webView, WebKitFileChooserRequest* request) >@@ -77,21 +73,10 @@ gboolean webkitWebViewRunFileChooser(WebKitWebView* webView, WebKitFileChooserRe > > gboolean allowsMultipleSelection = webkit_file_chooser_request_get_select_multiple(request); > >-#if GTK_CHECK_VERSION(3, 20, 0) > GtkFileChooserNative* dialog = gtk_file_chooser_native_new(allowsMultipleSelection ? _("Select Files") : _("Select File"), > toplevel ? GTK_WINDOW(toplevel) : nullptr, GTK_FILE_CHOOSER_ACTION_OPEN, nullptr, nullptr); > if (toplevel) > gtk_native_dialog_set_modal(GTK_NATIVE_DIALOG(dialog), TRUE); >-#else >- GtkWidget* dialog = gtk_file_chooser_dialog_new(allowsMultipleSelection ? _("Select Files") : _("Select File"), >- toplevel ? GTK_WINDOW(toplevel) : nullptr, >- GTK_FILE_CHOOSER_ACTION_OPEN, >- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, >- GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, >- nullptr); >- if (toplevel) >- gtk_window_set_modal(GTK_WINDOW(dialog), TRUE); >-#endif > > if (GtkFileFilter* filter = webkit_file_chooser_request_get_mime_types_filter(request)) > gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(dialog), filter); >@@ -102,11 +87,7 @@ gboolean webkitWebViewRunFileChooser(WebKitWebView* webView, WebKitFileChooserRe > > g_signal_connect(dialog, "response", G_CALLBACK(fileChooserDialogResponseCallback), g_object_ref(request)); > >-#if GTK_CHECK_VERSION(3, 20, 0) > gtk_native_dialog_show(GTK_NATIVE_DIALOG(dialog)); >-#else >- gtk_widget_show(dialog); >-#endif > > return TRUE; > } >diff --git a/Source/WebKit/UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp b/Source/WebKit/UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp >index ce92b0722499dbad52f5f87819df0838d5eeaf6a..7eae8b2b6df6578bc3a67213dd418bb6cf799064 100644 >--- a/Source/WebKit/UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp >+++ b/Source/WebKit/UIProcess/Automation/gtk/WebAutomationSessionGtk.cpp >@@ -75,11 +75,7 @@ static void doMouseEvent(GdkEventType type, GtkWidget* widget, const WebCore::In > event->button.axes = 0; > event->button.state = state; > event->button.button = button; >-#if GTK_CHECK_VERSION(3, 20, 0) > event->button.device = gdk_seat_get_pointer(gdk_display_get_default_seat(gtk_widget_get_display(widget))); >-#else >- event->button.device = gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(widget))); >-#endif > int xRoot, yRoot; > gdk_window_get_root_coords(gtk_widget_get_window(widget), location.x(), location.y(), &xRoot, &yRoot); > event->button.x_root = xRoot; >@@ -97,11 +93,7 @@ static void doMotionEvent(GtkWidget* widget, const WebCore::IntPoint& location, > event->motion.y = location.y(); > event->motion.axes = 0; > event->motion.state = state; >-#if GTK_CHECK_VERSION(3, 20, 0) > event->motion.device = gdk_seat_get_pointer(gdk_display_get_default_seat(gtk_widget_get_display(widget))); >-#else >- event->motion.device = gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(widget))); >-#endif > int xRoot, yRoot; > gdk_window_get_root_coords(gtk_widget_get_window(widget), location.x(), location.y(), &xRoot, &yRoot); > event->motion.x_root = xRoot; >@@ -151,11 +143,7 @@ static void doKeyStrokeEvent(GdkEventType type, GtkWidget* widget, unsigned keyV > event->key.window = gtk_widget_get_window(widget); > g_object_ref(event->key.window); > >-#if GTK_CHECK_VERSION(3, 20, 0) > gdk_event_set_device(event.get(), gdk_seat_get_pointer(gdk_display_get_default_seat(gtk_widget_get_display(widget)))); >-#else >- gdk_event_set_device(event.get(), gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gtk_widget_get_display(widget)))); >-#endif > event->key.state = state; > > // When synthesizing an event, an invalid hardware_keycode value can cause it to be badly processed by GTK+. >diff --git a/Source/WebKit/UIProcess/WebPageProxy.h b/Source/WebKit/UIProcess/WebPageProxy.h >index 5dd623b4732d0d55ed55340d963ee10e6aff9808..86e065a2031b20ca29efc7853d6bdd43fef32948 100644 >--- a/Source/WebKit/UIProcess/WebPageProxy.h >+++ b/Source/WebKit/UIProcess/WebPageProxy.h >@@ -749,13 +749,9 @@ public: > void setComposition(const String& text, Vector<WebCore::CompositionUnderline> underlines, uint64_t selectionStart, uint64_t selectionEnd, uint64_t replacementRangeStart, uint64_t replacementRangeEnd); > void confirmComposition(const String& compositionString, int64_t selectionStart, int64_t selectionLength); > void cancelComposition(); >-#endif > >-#if PLATFORM(GTK) > void setInputMethodState(bool enabled); >-#endif > >-#if PLATFORM (GTK) && HAVE(GTK_GESTURES) > void getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, WebCore::IntPoint& center); > #endif > >diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp >index d243beb538b2adef4719be6ca5a6b6a5c8cd9021..ca18b81ca13ac6d1b9c9c6e3af988cb352265b99 100644 >--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp >+++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp >@@ -138,10 +138,8 @@ AcceleratedBackingStoreWayland::~AcceleratedBackingStoreWayland() > WaylandCompositor::singleton().unregisterWebPage(m_webPage); > #endif > >-#if GTK_CHECK_VERSION(3, 16, 0) > if (m_gdkGLContext && m_gdkGLContext.get() == gdk_gl_context_get_current()) > gdk_gl_context_clear_current(); >-#endif > } > > void AcceleratedBackingStoreWayland::tryEnsureGLContext() >@@ -151,7 +149,6 @@ void AcceleratedBackingStoreWayland::tryEnsureGLContext() > > m_glContextInitialized = true; > >-#if GTK_CHECK_VERSION(3, 16, 0) > GUniqueOutPtr<GError> error; > m_gdkGLContext = adoptGRef(gdk_window_create_gl_context(gtk_widget_get_window(m_webPage.viewWidget()), &error.outPtr())); > if (m_gdkGLContext) { >@@ -162,7 +159,6 @@ void AcceleratedBackingStoreWayland::tryEnsureGLContext() > } > > g_warning("GDK is not able to create a GL context, falling back to glReadPixels (slow!): %s", error->message); >-#endif > > m_glContext = GLContext::createOffscreenContext(); > } >@@ -171,13 +167,10 @@ bool AcceleratedBackingStoreWayland::makeContextCurrent() > { > tryEnsureGLContext(); > >-#if GTK_CHECK_VERSION(3, 16, 0) > if (m_gdkGLContext) { > gdk_gl_context_make_current(m_gdkGLContext.get()); > return true; > } >-#endif >- > return m_glContext ? m_glContext->makeContextCurrent() : false; > } > >@@ -262,13 +255,11 @@ bool AcceleratedBackingStoreWayland::paint(cairo_t* cr, const IntRect& clipRect) > > cairo_save(cr); > >-#if GTK_CHECK_VERSION(3, 16, 0) > if (m_gdkGLContext) { > gdk_cairo_draw_from_gl(cr, gtk_widget_get_window(m_webPage.viewWidget()), texture, GL_TEXTURE, m_webPage.deviceScaleFactor(), 0, 0, textureSize.width(), textureSize.height()); > cairo_restore(cr); > return true; > } >-#endif > > ASSERT(m_glContext); > >diff --git a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.h b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.h >index b697d683de07134b69e1b1ebde2d504c5e975610..41e80de21bdd1abcce3b2af5fb63b94bd767d311 100644 >--- a/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.h >+++ b/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.h >@@ -72,9 +72,7 @@ private: > > RefPtr<cairo_surface_t> m_surface; > bool m_glContextInitialized { false }; >-#if GTK_CHECK_VERSION(3, 16, 0) > GRefPtr<GdkGLContext> m_gdkGLContext; >-#endif > std::unique_ptr<WebCore::GLContext> m_glContext; > > #if USE(WPE_RENDERER) >diff --git a/Source/WebKit/UIProcess/gtk/DragAndDropHandler.cpp b/Source/WebKit/UIProcess/gtk/DragAndDropHandler.cpp >index c29c3fa72a90eb34d5e5c856f38a33c26b8471b5..e9ae6552a7a2d862c4bd4ee10ed2ec36e92f831d 100644 >--- a/Source/WebKit/UIProcess/gtk/DragAndDropHandler.cpp >+++ b/Source/WebKit/UIProcess/gtk/DragAndDropHandler.cpp >@@ -106,7 +106,6 @@ static inline DragOperation gdkDragActionToDragOperation(GdkDragAction gdkAction > > void DragAndDropHandler::startDrag(Ref<SelectionData>&& selection, DragOperation dragOperation, RefPtr<ShareableBitmap>&& dragImage) > { >-#if GTK_CHECK_VERSION(3, 16, 0) > // WebCore::EventHandler does not support more than one DnD operation at the same time for > // a given page, so we should cancel any previous operation whose context we might have > // stored, should we receive a new startDrag event before finishing a previous DnD operation. >@@ -117,22 +116,12 @@ void DragAndDropHandler::startDrag(Ref<SelectionData>&& selection, DragOperation > > m_draggingSelectionData = WTFMove(selection); > GRefPtr<GtkTargetList> targetList = PasteboardHelper::singleton().targetListForSelectionData(*m_draggingSelectionData); >-#else >- RefPtr<SelectionData> selectionData = WTFMove(selection); >- GRefPtr<GtkTargetList> targetList = PasteboardHelper::singleton().targetListForSelectionData(*selectionData); >-#endif > > GUniquePtr<GdkEvent> currentEvent(gtk_get_current_event()); > GdkDragContext* context = gtk_drag_begin(m_page.viewWidget(), targetList.get(), dragOperationToGdkDragActions(dragOperation), > GDK_BUTTON_PRIMARY, currentEvent.get()); > >-#if GTK_CHECK_VERSION(3, 16, 0) > m_dragContext = context; >-#else >- // We don't have gtk_drag_cancel() in GTK+ < 3.16, so we use the old code. >- // See https://bugs.webkit.org/show_bug.cgi?id=138468 >- m_draggingSelectionDataMap.set(context, WTFMove(selectionData)); >-#endif > > if (dragImage) { > RefPtr<cairo_surface_t> image(dragImage->createCairoSurface()); >@@ -145,7 +134,6 @@ void DragAndDropHandler::startDrag(Ref<SelectionData>&& selection, DragOperation > > void DragAndDropHandler::fillDragData(GdkDragContext* context, GtkSelectionData* selectionData, unsigned info) > { >-#if GTK_CHECK_VERSION(3, 16, 0) > // This can happen when attempting to call finish drag from webkitWebViewBaseDragDataGet() > // for a obsolete DnD operation that got previously cancelled in startDrag(). > if (m_dragContext.get() != context) >@@ -153,15 +141,10 @@ void DragAndDropHandler::fillDragData(GdkDragContext* context, GtkSelectionData* > > ASSERT(m_draggingSelectionData); > PasteboardHelper::singleton().fillSelectionData(*m_draggingSelectionData, info, selectionData); >-#else >- if (auto* selection = m_draggingSelectionDataMap.get(context)) >- PasteboardHelper::singleton().fillSelectionData(*selection, info, selectionData); >-#endif > } > > void DragAndDropHandler::finishDrag(GdkDragContext* context) > { >-#if GTK_CHECK_VERSION(3, 16, 0) > // This can happen when attempting to call finish drag from webkitWebViewBaseDragEnd() > // for a obsolete DnD operation that got previously cancelled in startDrag(). > if (m_dragContext.get() != context) >@@ -172,10 +155,6 @@ void DragAndDropHandler::finishDrag(GdkDragContext* context) > > m_dragContext = nullptr; > m_draggingSelectionData = nullptr; >-#else >- if (!m_draggingSelectionDataMap.remove(context)) >- return; >-#endif > > GdkDevice* device = gdk_drag_context_get_device(context); > int x = 0, y = 0; >diff --git a/Source/WebKit/UIProcess/gtk/DragAndDropHandler.h b/Source/WebKit/UIProcess/gtk/DragAndDropHandler.h >index 1c1ea3a93e990c20139ebc7e955e7af3f00e172f..525420371f61bd4b8f3c1a399b7b8261b994ea10 100644 >--- a/Source/WebKit/UIProcess/gtk/DragAndDropHandler.h >+++ b/Source/WebKit/UIProcess/gtk/DragAndDropHandler.h >@@ -78,15 +78,8 @@ private: > > WebPageProxy& m_page; > HashMap<GdkDragContext*, std::unique_ptr<DroppingContext>> m_droppingContexts; >- >-#if GTK_CHECK_VERSION(3, 16, 0) > GRefPtr<GdkDragContext> m_dragContext; > RefPtr<WebCore::SelectionData> m_draggingSelectionData; >-#else >- // We don't have gtk_drag_cancel() in GTK+ < 3.16, so we use the old code. >- // See https://bugs.webkit.org/show_bug.cgi?id=138468 >- HashMap<GdkDragContext*, RefPtr<WebCore::SelectionData>> m_draggingSelectionDataMap; >-#endif > }; > > } // namespace WebKit >diff --git a/Source/WebKit/UIProcess/gtk/GestureController.cpp b/Source/WebKit/UIProcess/gtk/GestureController.cpp >index 39fa737d40a838b3ccc7ec3a3845b8fb6388a86e..9e8be1f3747491f47b536713d80aa12b68ff7f2c 100644 >--- a/Source/WebKit/UIProcess/gtk/GestureController.cpp >+++ b/Source/WebKit/UIProcess/gtk/GestureController.cpp >@@ -26,8 +26,6 @@ > #include "config.h" > #include "GestureController.h" > >-#if HAVE(GTK_GESTURES) >- > #include <WebCore/Scrollbar.h> > #include <gtk/gtk.h> > >@@ -53,11 +51,7 @@ bool GestureController::handleEvent(GdkEvent* event) > m_swipeGesture.handleEvent(event); > m_zoomGesture.handleEvent(event); > m_longpressGesture.handleEvent(event); >-#if GTK_CHECK_VERSION(3, 10, 0) > touchEnd = (gdk_event_get_event_type(event) == GDK_TOUCH_END) || (gdk_event_get_event_type(event) == GDK_TOUCH_CANCEL); >-#else >- touchEnd = (event->type == GDK_TOUCH_END) || (event->type == GDK_TOUCH_CANCEL); >-#endif > return touchEnd ? wasProcessingGestures : isProcessingGestures(); > } > >@@ -263,5 +257,3 @@ GestureController::LongPressGesture::LongPressGesture(GtkWidget* widget, Gesture > } > > } // namespace WebKit >- >-#endif // HAVE(GTK_GESTURES) >diff --git a/Source/WebKit/UIProcess/gtk/GestureController.h b/Source/WebKit/UIProcess/gtk/GestureController.h >index bbd338a5900cefa22395163371b865695d91da7e..c7105bf5342816ce0837e073eb85c33280a262d8 100644 >--- a/Source/WebKit/UIProcess/gtk/GestureController.h >+++ b/Source/WebKit/UIProcess/gtk/GestureController.h >@@ -25,8 +25,6 @@ > > #pragma once > >-#if HAVE(GTK_GESTURES) >- > #include <WebCore/FloatPoint.h> > #include <wtf/Noncopyable.h> > #include <wtf/RunLoop.h> >@@ -157,5 +155,3 @@ private: > }; > > } // namespace WebKit >- >-#endif // HAVE(GTK_GESTURES) >diff --git a/Source/WebKit/UIProcess/gtk/InputMethodFilter.cpp b/Source/WebKit/UIProcess/gtk/InputMethodFilter.cpp >index 323a1185be5b2015aeea5dbc457fbb72e596bf2d..4847e6021940147cc4012e8339f61ce863936ae4 100644 >--- a/Source/WebKit/UIProcess/gtk/InputMethodFilter.cpp >+++ b/Source/WebKit/UIProcess/gtk/InputMethodFilter.cpp >@@ -200,11 +200,8 @@ void InputMethodFilter::filterKeyEvent(GdkEventKey* event, FilterKeyEventComplet > m_justSentFakeKeyUp = false; > guint keyval; > gdk_event_get_keyval(reinterpret_cast<GdkEvent*>(event), &keyval); >-#if GTK_CHECK_VERSION(3, 10, 0) > GdkEventType type = gdk_event_get_event_type(reinterpret_cast<GdkEvent*>(event)); >-#else >- GdkEventType type = event->type; >-#endif >+ > if (justSentFakeKeyUp && type == GDK_KEY_RELEASE) > return; > >@@ -452,11 +449,7 @@ void InputMethodFilter::logHandleKeyboardEventForTesting(GdkEventKey* event, con > { > guint keyval; > gdk_event_get_keyval(reinterpret_cast<GdkEvent*>(event), &keyval); >-#if GTK_CHECK_VERSION(3, 10, 0) > const char* eventType = gdk_event_get_event_type(reinterpret_cast<GdkEvent*>(event)) == GDK_KEY_RELEASE ? "release" : "press"; >-#else >- const char* eventType = event->type == GDK_KEY_RELEASE ? "release" : "press"; >-#endif > const char* fakedString = faked == EventFaked ? " (faked)" : ""; > if (!eventString.isNull()) > m_events.append(makeString("sendSimpleKeyEvent type=", eventType, " keycode=", hex(keyval), " text='", eventString, '\'', fakedString)); >@@ -468,11 +461,7 @@ void InputMethodFilter::logHandleKeyboardEventWithCompositionResultsForTesting(G > { > guint keyval; > gdk_event_get_keyval(reinterpret_cast<GdkEvent*>(event), &keyval); >-#if GTK_CHECK_VERSION(3, 10, 0) > const char* eventType = gdk_event_get_event_type(reinterpret_cast<GdkEvent*>(event)) == GDK_KEY_RELEASE ? "release" : "press"; >-#else >- const char* eventType = event->type == GDK_KEY_RELEASE ? "release" : "press"; >-#endif > const char* fakedString = faked == EventFaked ? " (faked)" : ""; > m_events.append(makeString("sendKeyEventWithCompositionResults type=", eventType, " keycode=", hex(keyval), fakedString)); > >diff --git a/Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp b/Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp >index aeae32bbbe911f265cc4c3e4bc96ba182066b4cf..827022df898356919d6e017ddbc2e893d6a81786 100644 >--- a/Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp >+++ b/Source/WebKit/UIProcess/gtk/ViewGestureControllerGtk.cpp >@@ -54,11 +54,7 @@ static const double swipeOverlayShadowGradientAlpha[] = { 1, 0.99, 0.98, 0.95, 0 > > static bool isEventStop(GdkEventScroll* event) > { >-#if GTK_CHECK_VERSION(3, 20, 0) > return gdk_event_is_scroll_stop_event(reinterpret_cast<GdkEvent*>(event)); >-#else >- return !event->delta_x && !event->delta_y; >-#endif > } > > void ViewGestureController::platformTeardown() >@@ -432,9 +428,7 @@ static GUniquePtr<GdkEvent> createScrollEvent(GtkWidget* widget, double xDelta, > event->scroll.delta_x = xDelta; > event->scroll.delta_y = yDelta; > event->scroll.state = 0; >-#if GTK_CHECK_VERSION(3, 20, 0) > event->scroll.is_stop = !xDelta && !yDelta; >-#endif > event->scroll.window = GDK_WINDOW(g_object_ref(window)); > gdk_event_set_screen(event.get(), gdk_window_get_screen(window)); > gdk_event_set_device(event.get(), gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(gdk_window_get_display(window)))); >diff --git a/Source/WebKit/UIProcess/gtk/WebContextMenuProxyGtk.cpp b/Source/WebKit/UIProcess/gtk/WebContextMenuProxyGtk.cpp >index 89a7a464a7a31f5784cedaa278984d601802ec09..5fad2ff7f341bf88705bec61f850ddceea7dab43 100644 >--- a/Source/WebKit/UIProcess/gtk/WebContextMenuProxyGtk.cpp >+++ b/Source/WebKit/UIProcess/gtk/WebContextMenuProxyGtk.cpp >@@ -67,11 +67,7 @@ void WebContextMenuProxyGtk::append(GMenu* menu, const WebContextMenuItemGlib& m > GRefPtr<GMenuItem> gMenuItem; > GAction* action = menuItem.gAction(); > ASSERT(action); >-#if GTK_CHECK_VERSION(3, 16, 0) > g_action_map_add_action(G_ACTION_MAP(gtk_widget_get_action_group(GTK_WIDGET(m_menu), gContextMenuItemGroup)), action); >-#else >- g_action_map_add_action(G_ACTION_MAP(g_object_get_data(G_OBJECT(m_menu), gContextMenuItemGroup)), action); >-#endif > > switch (menuItem.type()) { > case ActionType: >@@ -201,9 +197,6 @@ WebContextMenuProxyGtk::WebContextMenuProxyGtk(GtkWidget* webView, WebPageProxy& > { > GRefPtr<GSimpleActionGroup> group = adoptGRef(g_simple_action_group_new()); > gtk_widget_insert_action_group(GTK_WIDGET(m_menu), gContextMenuItemGroup, G_ACTION_GROUP(group.get())); >-#if !GTK_CHECK_VERSION(3, 16, 0) >- g_object_set_data(G_OBJECT(m_menu), gContextMenuItemGroup, group.get()); >-#endif > webkitWebViewBaseSetActiveContextMenuProxy(WEBKIT_WEB_VIEW_BASE(m_webView), this); > } > >@@ -216,9 +209,6 @@ WebContextMenuProxyGtk::~WebContextMenuProxyGtk() > m_signalHandlers.clear(); > > gtk_widget_insert_action_group(GTK_WIDGET(m_menu), gContextMenuItemGroup, nullptr); >-#if !GTK_CHECK_VERSION(3, 16, 0) >- g_object_set_data(G_OBJECT(m_menu), gContextMenuItemGroup, nullptr); >-#endif > gtk_widget_destroy(GTK_WIDGET(m_menu)); > } > >diff --git a/Source/WebKit/UIProcess/gtk/WebKitInspectorWindow.cpp b/Source/WebKit/UIProcess/gtk/WebKitInspectorWindow.cpp >index ef939fadc1d93d71f1792da3fafc88f168cd71f0..1490f0e6f30f83cc674ad877120d9a89aa7795fe 100644 >--- a/Source/WebKit/UIProcess/gtk/WebKitInspectorWindow.cpp >+++ b/Source/WebKit/UIProcess/gtk/WebKitInspectorWindow.cpp >@@ -35,9 +35,7 @@ using namespace WebKit; > struct _WebKitInspectorWindow { > GtkWindow parent; > >-#if GTK_CHECK_VERSION(3, 10, 0) > GtkWidget* headerBar; >-#endif > }; > > struct _WebKitInspectorWindowClass { >@@ -52,15 +50,11 @@ static void webkit_inspector_window_class_init(WebKitInspectorWindowClass*) > > static void webkit_inspector_window_init(WebKitInspectorWindow* window) > { >-#if GTK_CHECK_VERSION(3, 10, 0) > window->headerBar = gtk_header_bar_new(); > gtk_header_bar_set_title(GTK_HEADER_BAR(window->headerBar), _("Web Inspector")); > gtk_header_bar_set_show_close_button(GTK_HEADER_BAR(window->headerBar), TRUE); > gtk_window_set_titlebar(GTK_WINDOW(window), window->headerBar); > gtk_widget_show(window->headerBar); >-#else >- gtk_window_set_title(GTK_WINDOW(window), _("Web Inspector")); >-#endif > } > > GtkWidget* webkitInspectorWindowNew(GtkWindow* parent) >@@ -73,14 +67,5 @@ void webkitInspectorWindowSetSubtitle(WebKitInspectorWindow* window, const char* > { > g_return_if_fail(WEBKIT_IS_INSPECTOR_WINDOW(window)); > >-#if GTK_CHECK_VERSION(3, 10, 0) > gtk_header_bar_set_subtitle(GTK_HEADER_BAR(window->headerBar), subtitle); >-#else >- if (subtitle) { >- GUniquePtr<gchar> title(g_strdup_printf("%s - %s", _("Web Inspector"), subtitle)); >- gtk_window_set_title(GTK_WINDOW(window), title.get()); >- } else >- gtk_window_set_title(GTK_WINDOW(window), _("Web Inspector")); >-#endif > } >- >diff --git a/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp b/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp >index 520aac92c01f4fa8fc690539ee91b3e715f61ca5..389198a2033d737eb0234757688d29bf29f5dfe5 100644 >--- a/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp >+++ b/Source/WebKit/UIProcess/gtk/WebPageProxyGtk.cpp >@@ -151,12 +151,10 @@ void WebPageProxy::setInputMethodState(bool enabled) > webkitWebViewBaseSetInputMethodState(WEBKIT_WEB_VIEW_BASE(viewWidget()), enabled); > } > >-#if HAVE(GTK_GESTURES) > void WebPageProxy::getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, WebCore::IntPoint& center) > { > process().sendSync(Messages::WebPage::GetCenterForZoomGesture(centerInViewCoordinates), Messages::WebPage::GetCenterForZoomGesture::Reply(center), m_pageID); > } >-#endif > > bool WebPageProxy::makeGLContextCurrent() > { >diff --git a/Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp b/Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp >index afb86af2075f5ba2bd6970db3b3c494aef007939..b6138bd1755b707cbd4d1a9ea5102200d4b27ab3 100644 >--- a/Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp >+++ b/Source/WebKit/UIProcess/gtk/WebPopupMenuProxyGtk.cpp >@@ -253,16 +253,9 @@ void WebPopupMenuProxyGtk::showPopupMenu(const IntRect& rect, TextDirection, dou > return; > > auto* display = gtk_widget_get_display(m_webView); >-#if GTK_CHECK_VERSION(3, 22, 0) > auto* monitor = gdk_display_get_monitor_at_window(display, gtk_widget_get_window(m_webView)); > GdkRectangle area; > gdk_monitor_get_workarea(monitor, &area); >-#else >- auto* screen = gtk_widget_get_screen(m_webView); >- gint monitor = gdk_screen_get_monitor_at_window(screen, gtk_widget_get_window(m_webView)); >- GdkRectangle area; >- gdk_screen_get_monitor_workarea(screen, monitor, &area); >-#endif > int width = std::min(rect.width(), area.width); > size_t itemCount = std::min<size_t>(items.size(), (area.height / 3) / itemHeight); > >@@ -305,28 +298,16 @@ void WebPopupMenuProxyGtk::showPopupMenu(const IntRect& rect, TextDirection, dou > m_device = gtk_get_current_event_device(); > if (m_device && gdk_device_get_display(m_device) != display) > m_device = nullptr; >-#if GTK_CHECK_VERSION(3, 20, 0) > if (!m_device) > m_device = gdk_seat_get_pointer(gdk_display_get_default_seat(display)); >-#else >- if (!m_device) >- m_device = gdk_device_manager_get_client_pointer(gdk_display_get_device_manager(display)); >-#endif > ASSERT(m_device); > if (gdk_device_get_source(m_device) == GDK_SOURCE_KEYBOARD) > m_device = gdk_device_get_associated_device(m_device); > >-#if GTK_CHECK_VERSION(3, 20, 0) > gtk_grab_add(m_popup); > auto grabResult = gdk_seat_grab(gdk_device_get_seat(m_device), gtk_widget_get_window(m_popup), GDK_SEAT_CAPABILITY_ALL, TRUE, nullptr, nullptr, [](GdkSeat*, GdkWindow*, gpointer userData) { > static_cast<WebPopupMenuProxyGtk*>(userData)->show(); > }, this); >-#else >- gtk_device_grab_add(m_popup, m_device, TRUE); >- auto grabResult = gdk_device_grab(m_device, gtk_widget_get_window(m_popup), GDK_OWNERSHIP_WINDOW, TRUE, >- static_cast<GdkEventMask>(GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK), nullptr, GDK_CURRENT_TIME); >- show(); >-#endif > > // PopupMenu can fail to open when there is no mouse grab. > // Ensure WebCore does not go into some pesky state. >@@ -342,13 +323,8 @@ void WebPopupMenuProxyGtk::hidePopupMenu() > return; > > if (m_device) { >-#if GTK_CHECK_VERSION(3, 20, 0) > gdk_seat_ungrab(gdk_device_get_seat(m_device)); > gtk_grab_remove(m_popup); >-#else >- gdk_device_ungrab(m_device, GDK_CURRENT_TIME); >- gtk_device_grab_remove(m_popup, m_device); >-#endif > gtk_window_set_transient_for(GTK_WINDOW(m_popup), nullptr); > gtk_window_set_attached_to(GTK_WINDOW(m_popup), nullptr); > m_device = nullptr; >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.h b/Source/WebKit/WebProcess/WebPage/WebPage.h >index 0bba97df8b6db5fcfa11121d9bdc06c88f86315c..ea36885e8ab10eeb227d9ded181b4a3de1c1f611 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.h >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.h >@@ -768,9 +768,7 @@ public: > > void collapseSelectionInFrame(uint64_t frameID); > void showEmojiPicker(WebCore::Frame&); >-#endif > >-#if PLATFORM (GTK) && HAVE(GTK_GESTURES) > void getCenterForZoomGesture(const WebCore::IntPoint& centerInViewCoordinates, CompletionHandler<void(WebCore::IntPoint&&)>&&); > #endif > >diff --git a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in >index 6f9f97243ba4b57bedc3a480f0fd14a28049cc98..d9822d3880b88a5e5584698fe96accb737b80454 100644 >--- a/Source/WebKit/WebProcess/WebPage/WebPage.messages.in >+++ b/Source/WebKit/WebProcess/WebPage/WebPage.messages.in >@@ -409,9 +409,7 @@ GenerateSyntheticEditingCommand(enum:uint8_t WebKit::SyntheticEditingCommandType > CancelComposition() > > CollapseSelectionInFrame(uint64_t frameID) >-#endif > >-#if PLATFORM (GTK) && HAVE(GTK_GESTURES) > GetCenterForZoomGesture(WebCore::IntPoint centerInViewCoordinates) -> (WebCore::IntPoint center) Synchronous > #endif > >diff --git a/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp b/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp >index 6ed5b33e6b27f661d516d4e560e05df5d7b11e01..6a957cb79a7203d5a2707f6d27e44c8cbee0dc42 100644 >--- a/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp >+++ b/Source/WebKit/WebProcess/WebPage/gtk/WebPageGtk.cpp >@@ -166,7 +166,6 @@ String WebPage::platformUserAgent(const URL& url) const > return WebCore::standardUserAgentForURL(url); > } > >-#if HAVE(GTK_GESTURES) > void WebPage::getCenterForZoomGesture(const IntPoint& centerInViewCoordinates, CompletionHandler<void(WebCore::IntPoint&&)>&& completionHandler) > { > IntPoint result = mainFrameView()->rootViewToContents(centerInViewCoordinates); >@@ -174,7 +173,6 @@ void WebPage::getCenterForZoomGesture(const IntPoint& centerInViewCoordinates, C > result.scale(1 / scale, 1 / scale); > completionHandler(WTFMove(result)); > } >-#endif > > void WebPage::setInputMethodState(bool enabled) > { >diff --git a/Source/cmake/FindGTK3.cmake b/Source/cmake/FindGTK3.cmake >index 8ce5433906ffea1e85f1ca398da0058c5acd59d5..885a0bad44c871be4a54bb5a442e4278fa0f147a 100644 >--- a/Source/cmake/FindGTK3.cmake >+++ b/Source/cmake/FindGTK3.cmake >@@ -4,7 +4,6 @@ > # GTK3_FOUND - system has GTK+ 3. > # GTK3_INCLUDE_DIRS - the GTK+ 3. include directories > # GTK3_LIBRARIES - link these to use GTK+ 3. >-# GTK3_SUPPORTS_GESTURES - GTK+ supports gestures (GTK+ >= 3.14) > # GTK3_SUPPORTS_QUARTZ - GTK+ supports Quartz backend > # GTK3_SUPPORTS_X11 - GTK+ supports X11 backend > # GTK3_SUPPORTS_WAYLAND - GTK+ supports Wayland backend >@@ -70,12 +69,6 @@ if (GTK3_VERSION AND VERSION_OK) > else () > set(GTK3_SUPPORTS_WAYLAND FALSE) > endif () >- >- if (NOT("${GTK3_VERSION}" VERSION_LESS "3.14.0")) >- set(GTK3_SUPPORTS_GESTURES ON) >- else () >- set(GTK3_SUPPORTS_GESTURES OFF) >- endif () > endif () > > include(FindPackageHandleStandardArgs) >diff --git a/Source/cmake/GStreamerChecks.cmake b/Source/cmake/GStreamerChecks.cmake >index 43947c66258c5c95ac16dae7b6f203ec66edbf70..18b12f82a8d28c3423f3e6f314738898c1f6476c 100644 >--- a/Source/cmake/GStreamerChecks.cmake >+++ b/Source/cmake/GStreamerChecks.cmake >@@ -10,7 +10,7 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO) > SET_AND_EXPOSE_TO_BUILD(USE_WEBAUDIO_GSTREAMER TRUE) > endif () > >- find_package(GStreamer 1.8.3 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS}) >+ find_package(GStreamer 1.10.0 REQUIRED COMPONENTS ${GSTREAMER_COMPONENTS}) > > if (ENABLE_WEB_AUDIO) > if (NOT PC_GSTREAMER_AUDIO_FOUND OR NOT PC_GSTREAMER_FFT_FOUND) >@@ -26,39 +26,24 @@ if (ENABLE_VIDEO OR ENABLE_WEB_AUDIO) > endif () > endif () > >- if (USE_GSTREAMER_MPEGTS) >- if (NOT PC_GSTREAMER_MPEGTS_FOUND) >- message(FATAL_ERROR "GStreamer MPEG-TS is needed for USE_GSTREAMER_MPEGTS.") >- endif () >+ if (USE_GSTREAMER_MPEGTS AND NOT PC_GSTREAMER_MPEGTS_FOUND) >+ message(FATAL_ERROR "GStreamer MPEG-TS is needed for USE_GSTREAMER_MPEGTS.") > endif () > >- if (USE_GSTREAMER_GL) >- if (PC_GSTREAMER_VERSION VERSION_LESS "1.10") >- message(FATAL_ERROR "GStreamer 1.10 is needed for USE_GSTREAMER_GL.") >- else () >- if (NOT PC_GSTREAMER_GL_FOUND) >- message(FATAL_ERROR "GStreamerGL is needed for USE_GSTREAMER_GL.") >- endif () >- endif () >+ if (USE_GSTREAMER_GL AND NOT PC_GSTREAMER_GL_FOUND) >+ message(FATAL_ERROR "GStreamerGL is needed for USE_GSTREAMER_GL.") > endif () > > SET_AND_EXPOSE_TO_BUILD(USE_GSTREAMER TRUE) > endif () > >-if (ENABLE_MEDIA_SOURCE) >- if (PC_GSTREAMER_VERSION VERSION_LESS "1.14") >- message(FATAL_ERROR "GStreamer 1.14 is needed for ENABLE_MEDIA_SOURCE.") >- endif () >+if (ENABLE_MEDIA_SOURCE AND PC_GSTREAMER_VERSION VERSION_LESS "1.14") >+ message(FATAL_ERROR "GStreamer 1.14 is needed for ENABLE_MEDIA_SOURCE.") > endif () > > if (ENABLE_MEDIA_STREAM OR ENABLE_WEB_RTC) >- if (PC_GSTREAMER_VERSION VERSION_LESS "1.10") >- SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC FALSE) >- SET_AND_EXPOSE_TO_BUILD(WEBRTC_WEBKIT_BUILD FALSE) >- else () >- SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC TRUE) >- SET_AND_EXPOSE_TO_BUILD(WEBRTC_WEBKIT_BUILD TRUE) >- endif () >+ SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC TRUE) >+ SET_AND_EXPOSE_TO_BUILD(WEBRTC_WEBKIT_BUILD TRUE) > else () > SET_AND_EXPOSE_TO_BUILD(USE_LIBWEBRTC FALSE) > SET_AND_EXPOSE_TO_BUILD(WEBRTC_WEBKIT_BUILD FALSE) >diff --git a/Source/cmake/OptionsGTK.cmake b/Source/cmake/OptionsGTK.cmake >index 06c83bd4f3d38aae17a3ccc235c8a9ccfc4af834..af7ba644fa5504326906241588935e4785f2e8cb 100644 >--- a/Source/cmake/OptionsGTK.cmake >+++ b/Source/cmake/OptionsGTK.cmake >@@ -17,22 +17,23 @@ set(WEBKITGTK_HEADER_INSTALL_DIR "${CMAKE_INSTALL_INCLUDEDIR}/webkitgtk-${WEBKIT > set(INTROSPECTION_INSTALL_GIRDIR "${CMAKE_INSTALL_FULL_DATADIR}/gir-1.0") > set(INTROSPECTION_INSTALL_TYPELIBDIR "${LIB_INSTALL_DIR}/girepository-1.0") > >-find_package(Cairo 1.10.2 REQUIRED) >+find_package(Cairo 1.14.0 REQUIRED) > find_package(Fontconfig 2.8.0 REQUIRED) > find_package(Freetype 2.4.2 REQUIRED) > find_package(LibGcrypt 1.6.0 REQUIRED) >-find_package(GTK3 3.6.0 REQUIRED) >-find_package(GDK3 3.6.0 REQUIRED) >+find_package(GLIB 2.44.0 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule) >+find_package(GTK3 3.22.0 REQUIRED) >+find_package(GDK3 3.22.0 REQUIRED) > find_package(HarfBuzz 0.9.2 REQUIRED) > find_package(ICU REQUIRED COMPONENTS data i18n uc) > find_package(JPEG REQUIRED) >-find_package(LibSoup 2.42.0 REQUIRED) >+find_package(LibSoup 2.54.0 REQUIRED) > find_package(LibXml2 2.8.0 REQUIRED) > find_package(PNG REQUIRED) > find_package(Sqlite REQUIRED) > find_package(Threads REQUIRED) > find_package(ZLIB REQUIRED) >-find_package(ATK REQUIRED) >+find_package(ATK 2.16.0 REQUIRED) > find_package(WebP REQUIRED) > find_package(ATSPI 2.5.3) > find_package(EGL) >@@ -70,7 +71,7 @@ if (NOT OPENGL_FOUND AND OPENGLES2_FOUND) > set(ENABLE_GLES2_DEFAULT ON) > endif () > >-# Public options specific to the GTK+ port. Do not add any options here unless >+# Public options specific to the GTK port. Do not add any options here unless > # there is a strong reason we should support changing the value of the option, > # and the option is not relevant to any other WebKit ports. > WEBKIT_OPTION_DEFINE(ENABLE_GLES2 "Whether to enable OpenGL ES 2.0." PUBLIC ${ENABLE_GLES2_DEFAULT}) >@@ -87,7 +88,7 @@ WEBKIT_OPTION_DEFINE(USE_OPENJPEG "Whether to enable support for JPEG2000 images > WEBKIT_OPTION_DEFINE(USE_WOFF2 "Whether to enable support for WOFF2 Web Fonts." PUBLIC ON) > WEBKIT_OPTION_DEFINE(USE_WPE_RENDERER "Whether to enable WPE rendering" PUBLIC ON) > >-# Private options specific to the GTK+ port. Changing these options is >+# Private options specific to the GTK port. Changing these options is > # completely unsupported. They are intended for use only by WebKit developers. > WEBKIT_OPTION_DEFINE(USE_OPENVR "Whether to use OpenVR as WebVR backend." PRIVATE OFF) > >@@ -134,7 +135,7 @@ if (("${PC_CAIRO_VERSION}" VERSION_GREATER "1.16.0" OR "${PC_CAIRO_VERSION}" STR > endif () > > # Public options shared with other WebKit ports. Do not add any options here >-# without approval from a GTK+ reviewer. There must be strong reason to support >+# without approval from a GTK reviewer. There must be strong reason to support > # changing the value of the option. > WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ACCELERATED_2D_CANVAS PUBLIC OFF) > WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ASYNC_SCROLLING PRIVATE OFF) >@@ -192,13 +193,9 @@ set(GTK_INCLUDE_DIRS ${GTK3_INCLUDE_DIRS}) > set(GDK_LIBRARIES ${GDK3_LIBRARIES}) > set(GDK_INCLUDE_DIRS ${GDK3_INCLUDE_DIRS}) > >-SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_GESTURES ${GTK3_SUPPORTS_GESTURES}) > SET_AND_EXPOSE_TO_BUILD(HAVE_GTK_UNIX_PRINTING ${GTKUnixPrint_FOUND}) > SET_AND_EXPOSE_TO_BUILD(HAVE_OS_DARK_MODE_SUPPORT 1) > >-set(glib_components gio gio-unix gobject gthread gmodule) >-find_package(GLIB 2.36 REQUIRED COMPONENTS ${glib_components}) >- > if (USE_WPE_RENDERER) > find_package(WPE 1.3.0) > if (NOT WPE_FOUND) >@@ -254,14 +251,6 @@ if (ENABLE_WEB_CRYPTO) > endif () > > if (ENABLE_WEBDRIVER) >- # WebDriver requires newer versions of GLib and Soup. >- if (PC_GLIB_VERSION VERSION_LESS "2.40") >- message(FATAL_ERROR "GLib 2.40 is required to enable WebDriver support.") >- endif () >- if (PC_LIBSOUP_VERSION VERSION_LESS "2.48") >- message(FATAL_ERROR "libsoup 2.48 is required to enable WebDriver support.") >- endif () >- > SET_AND_EXPOSE_TO_BUILD(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS ON) > SET_AND_EXPOSE_TO_BUILD(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS ON) > SET_AND_EXPOSE_TO_BUILD(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS OFF) >@@ -313,13 +302,13 @@ endif () > > if (ENABLE_QUARTZ_TARGET) > if (NOT GTK3_SUPPORTS_QUARTZ) >- message(FATAL_ERROR "Recompile GTK+ with Quartz backend to use ENABLE_QUARTZ_TARGET") >+ message(FATAL_ERROR "Recompile GTK with Quartz backend to use ENABLE_QUARTZ_TARGET") > endif () > endif () > > if (ENABLE_X11_TARGET) > if (NOT GTK3_SUPPORTS_X11) >- message(FATAL_ERROR "Recompile GTK+ with X11 backend to use ENABLE_X11_TARGET") >+ message(FATAL_ERROR "Recompile GTK with X11 backend to use ENABLE_X11_TARGET") > endif () > > find_package(X11 REQUIRED) >@@ -336,11 +325,7 @@ endif () > > if (ENABLE_WAYLAND_TARGET) > if (NOT GTK3_SUPPORTS_WAYLAND) >- message(FATAL_ERROR "Recompile GTK+ with Wayland backend to use ENABLE_WAYLAND_TARGET") >- endif () >- >- if (GTK3_VERSION VERSION_LESS 3.12) >- message(FATAL_ERROR "GTK+ 3.12 is required to use ENABLE_WAYLAND_TARGET") >+ message(FATAL_ERROR "Recompile GTK with Wayland backend to use ENABLE_WAYLAND_TARGET") > endif () > > if (NOT EGL_FOUND) >diff --git a/Source/cmake/OptionsWPE.cmake b/Source/cmake/OptionsWPE.cmake >index 494980608fa1d87bfcbde21335767a7631aa648b..6cb8c0c2af1c269c07c3388143c19d1e4fa6384a 100644 >--- a/Source/cmake/OptionsWPE.cmake >+++ b/Source/cmake/OptionsWPE.cmake >@@ -12,16 +12,16 @@ set(LIB_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBDIR}" CACHE PATH "Absolute path to > set(EXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_BINDIR}" CACHE PATH "Absolute path to executable installation directory") > set(LIBEXEC_INSTALL_DIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/wpe-webkit-${WPE_API_VERSION}" CACHE PATH "Absolute path to install executables executed by the library") > >-find_package(Cairo 1.10.2 REQUIRED) >+find_package(Cairo 1.14.0 REQUIRED) > find_package(Fontconfig 2.8.0 REQUIRED) > find_package(Freetype 2.4.2 REQUIRED) >-find_package(GLIB 2.40.0 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule) >+find_package(GLIB 2.44.0 REQUIRED COMPONENTS gio gio-unix gobject gthread gmodule) > find_package(HarfBuzz 0.9.18 REQUIRED) > find_package(ICU REQUIRED COMPONENTS data i18n uc) > find_package(JPEG REQUIRED) > find_package(LibEpoxy 1.4.0 REQUIRED) > find_package(LibGcrypt 1.6.0 REQUIRED) >-find_package(LibSoup 2.42.0 REQUIRED) >+find_package(LibSoup 2.54.0 REQUIRED) > find_package(LibXml2 2.8.0 REQUIRED) > find_package(PNG REQUIRED) > find_package(Sqlite REQUIRED) >@@ -109,7 +109,7 @@ include(GStreamerDependencies) > WEBKIT_OPTION_END() > > if (ENABLE_ACCESSIBILITY) >- find_package(ATK) >+ find_package(ATK 2.16.0) > if (NOT ATK_FOUND) > message(FATAL_ERROR "atk is needed for ENABLE_ACCESSIBILITY") > endif () >@@ -151,14 +151,6 @@ if (ENABLE_WEB_CRYPTO) > endif () > > if (ENABLE_WEBDRIVER) >- # WebDriver requires newer versions of GLib and Soup. >- if (PC_GLIB_VERSION VERSION_LESS "2.40") >- message(FATAL_ERROR "GLib 2.40 is required to enable WebDriver support.") >- endif () >- if (PC_LIBSOUP_VERSION VERSION_LESS "2.48") >- message(FATAL_ERROR "libsoup 2.48 is required to enable WebDriver support.") >- endif () >- > SET_AND_EXPOSE_TO_BUILD(ENABLE_WEBDRIVER_KEYBOARD_INTERACTIONS ON) > SET_AND_EXPOSE_TO_BUILD(ENABLE_WEBDRIVER_MOUSE_INTERACTIONS ON) > SET_AND_EXPOSE_TO_BUILD(ENABLE_WEBDRIVER_TOUCH_INTERACTIONS OFF) >diff --git a/Tools/ChangeLog b/Tools/ChangeLog >index 983eb8fab31929fb7b6cdd3dc7f6babd9f793fd1..b8ee9d6dd9da2c3634156e917876157b2c9cddb8 100644 >--- a/Tools/ChangeLog >+++ b/Tools/ChangeLog >@@ -1,3 +1,37 @@ >+2019-06-20 Michael Catanzaro <mcatanzaro@igalia.com> >+ >+ [WPE][GTK] Bump minimum versions of GLib, GTK, libsoup, ATK, GStreamer, and Cairo >+ https://bugs.webkit.org/show_bug.cgi?id=199094 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * MiniBrowser/gtk/BrowserTab.c: >+ (runColorChooserCallback): >+ (browserTabConstructed): >+ * TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp: >+ (testWebViewSyncRequestOnMaxConns): >+ (beforeAll): >+ * TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp: >+ (testWebSocketTLSErrors): >+ (beforeAll): >+ * TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp: >+ (WebKitTestServer::~WebKitTestServer): >+ (WebKitTestServer::getWebSocketURIForPath const): >+ * WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp: >+ (WTR::AccessibilityUIElement::rowHeaders const): >+ (WTR::AccessibilityUIElement::columnHeaders const): >+ (WTR::AccessibilityUIElement::isAttributeSettable): >+ (WTR::AccessibilityUIElement::x): >+ (WTR::AccessibilityUIElement::y): >+ (WTR::AccessibilityUIElement::width): >+ (WTR::AccessibilityUIElement::height): >+ (WTR::AccessibilityUIElement::clickPointX): >+ (WTR::AccessibilityUIElement::clickPointY): >+ (WTR::AccessibilityUIElement::intValue const): >+ (WTR::AccessibilityUIElement::minValue): >+ (WTR::AccessibilityUIElement::maxValue): >+ (WTR::stringAtOffset): >+ > 2019-06-20 Dean Johnson <dean_johnson@apple.com> > > test-webkitpy is broken on macOS Catalina >diff --git a/Tools/MiniBrowser/gtk/BrowserTab.c b/Tools/MiniBrowser/gtk/BrowserTab.c >index 29ecae9ebfeb54b982e05f28292fcf6108cbe42c..66d115a03ce7d22eead64a27e68591c1c582b788 100644 >--- a/Tools/MiniBrowser/gtk/BrowserTab.c >+++ b/Tools/MiniBrowser/gtk/BrowserTab.c >@@ -279,7 +279,6 @@ static gboolean decidePermissionRequest(WebKitWebView *webView, WebKitPermission > return TRUE; > } > >-#if GTK_CHECK_VERSION(3, 12, 0) > static void colorChooserRGBAChanged(GtkColorChooser *colorChooser, GParamSpec *paramSpec, WebKitColorChooserRequest *request) > { > GdkRGBA rgba; >@@ -322,7 +321,6 @@ static gboolean runColorChooserCallback(WebKitWebView *webView, WebKitColorChoos > > return TRUE; > } >-#endif /* GTK_CHECK_VERSION(3, 12, 0) */ > > static gboolean inspectorOpenedInWindow(WebKitWebInspector *inspector, BrowserTab *tab) > { >@@ -431,9 +429,7 @@ static void browserTabConstructed(GObject *gObject) > g_signal_connect(tab->webView, "load-changed", G_CALLBACK(loadChanged), tab); > g_signal_connect(tab->webView, "load-failed-with-tls-errors", G_CALLBACK(loadFailedWithTLSerrors), tab); > g_signal_connect(tab->webView, "permission-request", G_CALLBACK(decidePermissionRequest), tab); >-#if GTK_CHECK_VERSION(3, 12, 0) > g_signal_connect(tab->webView, "run-color-chooser", G_CALLBACK(runColorChooserCallback), tab); >-#endif > > WebKitWebInspector *inspector = webkit_web_view_get_inspector(tab->webView); > g_signal_connect(inspector, "open-window", G_CALLBACK(inspectorOpenedInWindow), tab); >diff --git a/Tools/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp b/Tools/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp >index b4741e0c6faef0b7fe7cdd4581baa086f82ed44d..53d325e549d279b8d656611910c029f254005bc6 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp >+++ b/Tools/TestWebKitAPI/Tests/WebKitGLib/TestResources.cpp >@@ -751,7 +751,6 @@ public: > unsigned m_resourcesToStartPending; > }; > >-#if SOUP_CHECK_VERSION(2, 49, 91) > static void testWebViewSyncRequestOnMaxConns(SyncRequestOnMaxConnsTest* test, gconstpointer) > { > WTF::GMutexLocker<GMutex> lock(s_serverMutex); >@@ -786,7 +785,6 @@ static void testWebViewSyncRequestOnMaxConns(SyncRequestOnMaxConnsTest* test, gc > if (context.unlockServerSourceID) > g_source_remove(context.unlockServerSourceID); > } >-#endif > > static void addCacheHTTPHeadersToResponse(SoupMessage* message) > { >@@ -923,9 +921,7 @@ void beforeAll() > Test::add("WebKitWebResource", "get-data-empty", testWebResourceGetDataEmpty); > SingleResourceLoadTest::add("WebKitWebView", "history-cache", testWebViewResourcesHistoryCache); > SendRequestTest::add("WebKitWebPage", "send-request", testWebResourceSendRequest); >-#if SOUP_CHECK_VERSION(2, 49, 91) > SyncRequestOnMaxConnsTest::add("WebKitWebView", "sync-request-on-max-conns", testWebViewSyncRequestOnMaxConns); >-#endif > } > > void afterAll() >diff --git a/Tools/TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp b/Tools/TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp >index 2644680e173e1f3d75fdd963eb3dd8ae5bf18e0d..12290e2eb4fbed270d1ae33b01aa3c3fd4b2c0fd 100644 >--- a/Tools/TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp >+++ b/Tools/TestWebKitAPI/Tests/WebKitGLib/TestSSL.cpp >@@ -339,7 +339,6 @@ static void testSubresourceLoadFailedWithTLSErrors(TLSSubresourceTest* test, gco > assertIfSSLRequestProcessed = false; > } > >-#if SOUP_CHECK_VERSION(2, 50, 0) > class WebSocketTest : public WebViewTest { > public: > MAKE_GLIB_TEST_FIXTURE(WebSocketTest); >@@ -439,7 +438,6 @@ static void testWebSocketTLSErrors(WebSocketTest* test, gconstpointer) > > webkit_web_context_set_tls_errors_policy(context, originalPolicy); > } >-#endif > > static void httpsServerCallback(SoupServer* server, SoupMessage* message, const char* path, GHashTable*, SoupClientContext*, gpointer) > { >@@ -527,9 +525,7 @@ void beforeAll() > SSLTest::add("WebKitWebView", "tls-http-auth", testTLSErrorsHTTPAuth); > TLSSubresourceTest::add("WebKitWebView", "tls-subresource", testSubresourceLoadFailedWithTLSErrors); > TLSErrorsTest::add("WebKitWebView", "load-failed-with-tls-errors", testLoadFailedWithTLSErrors); >-#if SOUP_CHECK_VERSION(2, 50, 0) > WebSocketTest::add("WebKitWebView", "web-socket-tls-errors", testWebSocketTLSErrors); >-#endif > } > > void afterAll() >diff --git a/Tools/TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp b/Tools/TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp >index 782fe393c8f584ceb5a0277df56e4b358c1e416e..69ac6c46039e88c7c4699073e4d5fb872737e738 100644 >--- a/Tools/TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp >+++ b/Tools/TestWebKitAPI/glib/WebKitGLib/WebKitTestServer.cpp >@@ -53,10 +53,8 @@ WebKitTestServer::WebKitTestServer(ServerOptions options) > WebKitTestServer::~WebKitTestServer() > { > soup_uri_free(m_baseURI); >-#if SOUP_CHECK_VERSION(2, 50, 0) > if (m_baseWebSocketURI) > soup_uri_free(m_baseWebSocketURI); >-#endif > } > > void WebKitTestServer::run(SoupServerCallback serverCallback) >@@ -72,7 +70,6 @@ void WebKitTestServer::run(SoupServerCallback serverCallback) > } > } > >-#if SOUP_CHECK_VERSION(2, 50, 0) > void WebKitTestServer::addWebSocketHandler(SoupServerWebsocketCallback callback, gpointer userData) > { > m_baseWebSocketURI = soup_uri_new_with_base(m_baseURI, "/websocket/"); >@@ -108,7 +105,6 @@ CString WebKitTestServer::getWebSocketURIForPath(const char* path) const > soup_uri_free(uri); > return uriString.get(); > } >-#endif // SOUP_CHECK_VERSION(2, 50, 0) > > CString WebKitTestServer::getURIForPath(const char* path) const > { >diff --git a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp >index 32d164b0813cf3e3254fbbf95252af60ee920fdb..4e8173ce6c4b995a98eb891e14eecc7ab8420d13 100644 >--- a/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp >+++ b/Tools/WebKitTestRunner/InjectedBundle/atk/AccessibilityUIElementAtk.cpp >@@ -35,9 +35,7 @@ > #include <JavaScriptCore/JSStringRef.h> > #include <JavaScriptCore/OpaqueJSString.h> > #include <WebCore/NotImplemented.h> >-#if ATK_CHECK_VERSION(2,11,90) > #include <WebKit/WKBundleFrame.h> >-#endif > #include <atk/atk.h> > #include <wtf/Assertions.h> > #include <wtf/glib/GRefPtr.h> >@@ -50,12 +48,10 @@ namespace WTR { > > namespace { > >-#if ATK_CHECK_VERSION(2,11,92) > enum RangeLimit { > RangeLimitMinimum, > RangeLimitMaximum > }; >-#endif > > enum AtkAttributeType { > ObjectAttributeType, >@@ -124,7 +120,6 @@ static const Attributes& attributesMap() > return attributes.get(); > } > >-#if ATK_CHECK_VERSION(2, 11, 3) > const char* landmarkStringBanner = "AXLandmarkBanner"; > const char* landmarkStringComplementary = "AXLandmarkComplementary"; > const char* landmarkStringContentinfo = "AXLandmarkContentInfo"; >@@ -133,7 +128,6 @@ const char* landmarkStringMain = "AXLandmarkMain"; > const char* landmarkStringNavigation = "AXLandmarkNavigation"; > const char* landmarkStringRegion = "AXLandmarkRegion"; > const char* landmarkStringSearch = "AXLandmarkSearch"; >-#endif > > String jsStringToWTFString(JSStringRef attribute) > { >@@ -256,35 +250,14 @@ bool checkElementState(PlatformUIElement element, AtkStateType stateType) > JSStringRef indexRangeInTable(PlatformUIElement element, bool isRowRange) > { > GUniquePtr<gchar> rangeString(g_strdup("{0, 0}")); >-#if ATK_CHECK_VERSION(2,11,90) > if (!ATK_IS_TABLE_CELL(element.get())) > return JSStringCreateWithUTF8CString(rangeString.get()); >-#else >- if (!ATK_IS_OBJECT(element.get())) >- return JSStringCreateWithUTF8CString(rangeString.get()); >- >- AtkObject* axTable = atk_object_get_parent(ATK_OBJECT(element.get())); >- if (!axTable || !ATK_IS_TABLE(axTable)) >- return JSStringCreateWithUTF8CString(rangeString.get()); >- >- // Look for the cell in the table. >- gint indexInParent = atk_object_get_index_in_parent(ATK_OBJECT(element.get())); >- if (indexInParent == -1) >- return JSStringCreateWithUTF8CString(rangeString.get()); >-#endif > > gint row = -1; > gint column = -1; > gint rowSpan = -1; > gint columnSpan = -1; >-#if ATK_CHECK_VERSION(2,11,90) > atk_table_cell_get_row_column_span(ATK_TABLE_CELL(element.get()), &row, &column, &rowSpan, &columnSpan); >-#else >- row = atk_table_get_row_at_index(ATK_TABLE(axTable), indexInParent); >- column = atk_table_get_column_at_index(ATK_TABLE(axTable), indexInParent); >- rowSpan = atk_table_get_row_extent_at(ATK_TABLE(axTable), row, column); >- columnSpan = atk_table_get_column_extent_at(ATK_TABLE(axTable), row, column); >-#endif > > // Get the actual values, if row and columns are valid values. > if (row != -1 && column != -1) { >@@ -308,29 +281,11 @@ void alterCurrentValue(PlatformUIElement element, int factor) > if (!ATK_IS_VALUE(element.get())) > return; > >-#if ATK_CHECK_VERSION(2,11,92) > double currentValue; > atk_value_get_value_and_text(ATK_VALUE(element.get()), ¤tValue, nullptr); > > double increment = atk_value_get_increment(ATK_VALUE(element.get())); > atk_value_set_value(ATK_VALUE(element.get()), currentValue + factor * increment); >-#else >- GValue currentValue = G_VALUE_INIT; >- atk_value_get_current_value(ATK_VALUE(element.get()), ¤tValue); >- >- GValue increment = G_VALUE_INIT; >- atk_value_get_minimum_increment(ATK_VALUE(element.get()), &increment); >- >- GValue newValue = G_VALUE_INIT; >- g_value_init(&newValue, G_TYPE_FLOAT); >- >- g_value_set_float(&newValue, g_value_get_float(¤tValue) + factor * g_value_get_float(&increment)); >- atk_value_set_current_value(ATK_VALUE(element.get()), &newValue); >- >- g_value_unset(&newValue); >- g_value_unset(&increment); >- g_value_unset(¤tValue); >-#endif > } > > gchar* replaceCharactersForResults(gchar* str) >@@ -353,7 +308,6 @@ const gchar* roleToString(AtkObject* object) > { > AtkRole role = atk_object_get_role(object); > >-#if ATK_CHECK_VERSION(2, 11, 3) > if (role == ATK_ROLE_LANDMARK) { > String xmlRolesValue = getAttributeSetValueForId(object, ObjectAttributeType, "xml-roles"); > if (equalLettersIgnoringASCIICase(xmlRolesValue, "banner")) >@@ -413,7 +367,6 @@ const gchar* roleToString(AtkObject* object) > if (equalLettersIgnoringASCIICase(xmlRolesValue, "search")) > return landmarkStringSearch; > } >-#endif > > switch (role) { > case ATK_ROLE_ALERT: >@@ -538,7 +491,6 @@ const gchar* roleToString(AtkObject* object) > return "AXWindow"; > case ATK_ROLE_UNKNOWN: > return "AXUnknown"; >-#if ATK_CHECK_VERSION(2, 11, 3) > case ATK_ROLE_ARTICLE: > return "AXArticle"; > case ATK_ROLE_AUDIO: >@@ -557,20 +509,14 @@ const gchar* roleToString(AtkObject* object) > return "AXTimer"; > case ATK_ROLE_VIDEO: > return "AXVideo"; >-#endif >-#if ATK_CHECK_VERSION(2, 11, 4) > case ATK_ROLE_DESCRIPTION_LIST: > return "AXDescriptionList"; > case ATK_ROLE_DESCRIPTION_TERM: > return "AXDescriptionTerm"; > case ATK_ROLE_DESCRIPTION_VALUE: > return "AXDescriptionValue"; >-#endif >-#if ATK_CHECK_VERSION(2, 15, 2) > case ATK_ROLE_STATIC: > return "AXStatic"; >-#endif >-#if ATK_CHECK_VERSION(2, 15, 4) > case ATK_ROLE_MATH_FRACTION: > return "AXMathFraction"; > case ATK_ROLE_MATH_ROOT: >@@ -579,7 +525,6 @@ const gchar* roleToString(AtkObject* object) > return "AXSubscript"; > case ATK_ROLE_SUPERSCRIPT: > return "AXSuperscript"; >-#endif > #if ATK_CHECK_VERSION(2, 25, 2) > case ATK_ROLE_FOOTNOTE: > return "AXFootnote"; >@@ -763,7 +708,6 @@ static Vector<RefPtr<AccessibilityUIElement> > getVisibleCells(AccessibilityUIEl > return visibleCells; > } > >-#if ATK_CHECK_VERSION(2,11,90) > static Vector<RefPtr<AccessibilityUIElement>> convertGPtrArrayToVector(const GPtrArray* array) > { > Vector<RefPtr<AccessibilityUIElement>> cells; >@@ -786,9 +730,7 @@ static JSValueRef convertToJSObjectArray(const Vector<RefPtr<AccessibilityUIElem > > return JSObjectMakeArray(context, elementCount, valueElements.get(), nullptr); > } >-#endif > >-#if ATK_CHECK_VERSION(2,11,92) > static double rangeMinMaxValue(AtkValue* atkValue, RangeLimit rangeLimit) > { > AtkRange* range = atk_value_get_range(atkValue); >@@ -808,7 +750,6 @@ static double rangeMinMaxValue(AtkValue* atkValue, RangeLimit rangeLimit) > atk_range_free(range); > return rangeValue; > } >-#endif > > } // namespace > >@@ -1210,10 +1151,8 @@ JSValueRef AccessibilityUIElement::rowHeaders() const > if (!ATK_IS_TABLE_CELL(m_element.get())) > return convertToJSObjectArray(headers); > >-#if ATK_CHECK_VERSION(2,11,90) > if (GRefPtr<GPtrArray> array = adoptGRef(atk_table_cell_get_row_header_cells(ATK_TABLE_CELL(m_element.get())))) > headers = convertGPtrArrayToVector(array.get()); >-#endif > return convertToJSObjectArray(headers); > } > >@@ -1226,10 +1165,8 @@ JSValueRef AccessibilityUIElement::columnHeaders() const > if (!ATK_IS_TABLE_CELL(m_element.get())) > return convertToJSObjectArray(headers); > >-#if ATK_CHECK_VERSION(2,11,90) > if (GRefPtr<GPtrArray> array = adoptGRef(atk_table_cell_get_column_header_cells(ATK_TABLE_CELL(m_element.get())))) > headers = convertGPtrArrayToVector(array.get()); >-#endif > return convertToJSObjectArray(headers); > } > >@@ -1313,17 +1250,13 @@ bool AccessibilityUIElement::isAttributeSettable(JSStringRef attribute) > if (checkElementState(m_element.get(), ATK_STATE_EDITABLE)) > return true; > >-#if ATK_CHECK_VERSION(2,11,2) > // This state is applicable to checkboxes, radiobuttons, switches, etc. > if (checkElementState(m_element.get(), ATK_STATE_CHECKABLE)) > return true; >-#endif > >-#if ATK_CHECK_VERSION(2,15,3) > // This state is expected to be present only for controls and only if explicitly set. > if (checkElementState(m_element.get(), ATK_STATE_READ_ONLY)) > return false; >-#endif > > // We expose an object attribute to ATs when there is an author-provided ARIA property > // and also when there is a supported ARIA role but no author-provided value. >@@ -1519,11 +1452,7 @@ double AccessibilityUIElement::x() > return 0; > > int x; >-#if ATK_CHECK_VERSION(2,11,90) > atk_component_get_extents(ATK_COMPONENT(m_element.get()), &x, nullptr, nullptr, nullptr, ATK_XY_SCREEN); >-#else >- atk_component_get_position(ATK_COMPONENT(m_element.get()), &x, nullptr, ATK_XY_SCREEN); >-#endif > return x; > } > >@@ -1533,11 +1462,7 @@ double AccessibilityUIElement::y() > return 0; > > int y; >-#if ATK_CHECK_VERSION(2,11,90) > atk_component_get_extents(ATK_COMPONENT(m_element.get()), nullptr, &y, nullptr, nullptr, ATK_XY_SCREEN); >-#else >- atk_component_get_position(ATK_COMPONENT(m_element.get()), nullptr, &y, ATK_XY_SCREEN); >-#endif > return y; > } > >@@ -1547,11 +1472,7 @@ double AccessibilityUIElement::width() > return 0; > > int width; >-#if ATK_CHECK_VERSION(2,11,90) > atk_component_get_extents(ATK_COMPONENT(m_element.get()), nullptr, nullptr, &width, nullptr, ATK_XY_WINDOW); >-#else >- atk_component_get_size(ATK_COMPONENT(m_element.get()), &width, nullptr); >-#endif > return width; > } > >@@ -1561,11 +1482,7 @@ double AccessibilityUIElement::height() > return 0; > > int height; >-#if ATK_CHECK_VERSION(2,11,90) > atk_component_get_extents(ATK_COMPONENT(m_element.get()), nullptr, nullptr, nullptr, &height, ATK_XY_WINDOW); >-#else >- atk_component_get_size(ATK_COMPONENT(m_element.get()), nullptr, &height); >-#endif > return height; > } > >@@ -1575,13 +1492,7 @@ double AccessibilityUIElement::clickPointX() > return 0; > > int x, width; >-#if ATK_CHECK_VERSION(2,11,90) > atk_component_get_extents(ATK_COMPONENT(m_element.get()), &x, nullptr, &width, nullptr, ATK_XY_WINDOW); >-#else >- atk_component_get_position(ATK_COMPONENT(m_element.get()), &x, nullptr, ATK_XY_WINDOW); >- atk_component_get_size(ATK_COMPONENT(m_element.get()), &width, nullptr); >-#endif >- > return x + width / 2.0; > } > >@@ -1591,13 +1502,7 @@ double AccessibilityUIElement::clickPointY() > return 0; > > int y, height; >-#if ATK_CHECK_VERSION(2,11,90) > atk_component_get_extents(ATK_COMPONENT(m_element.get()), nullptr, &y, nullptr, &height, ATK_XY_WINDOW); >-#else >- atk_component_get_position(ATK_COMPONENT(m_element.get()), nullptr, &y, ATK_XY_WINDOW); >- atk_component_get_size(ATK_COMPONENT(m_element.get()), nullptr, &height); >-#endif >- > return y + height / 2.0; > } > >@@ -1607,17 +1512,9 @@ double AccessibilityUIElement::intValue() const > return 0; > > if (ATK_IS_VALUE(m_element.get())) { >-#if ATK_CHECK_VERSION(2,11,92) > double value; > atk_value_get_value_and_text(ATK_VALUE(m_element.get()), &value, nullptr); > return value; >-#else >- GValue value = G_VALUE_INIT; >- atk_value_get_current_value(ATK_VALUE(m_element.get()), &value); >- if (!G_VALUE_HOLDS_FLOAT(&value)) >- return 0; >- return g_value_get_float(&value); >-#endif > } > > // Consider headings as an special case when returning the "int value" of >@@ -1638,16 +1535,8 @@ double AccessibilityUIElement::minValue() > { > if (!ATK_IS_VALUE(m_element.get())) > return 0; >-#if ATK_CHECK_VERSION(2,11,92) >- return rangeMinMaxValue(ATK_VALUE(m_element.get()), RangeLimitMinimum); >-#else >- GValue value = G_VALUE_INIT; >- atk_value_get_minimum_value(ATK_VALUE(m_element.get()), &value); >- if (!G_VALUE_HOLDS_FLOAT(&value)) >- return 0; > >- return g_value_get_float(&value); >-#endif >+ return rangeMinMaxValue(ATK_VALUE(m_element.get()), RangeLimitMinimum); > } > > double AccessibilityUIElement::maxValue() >@@ -1655,16 +1544,7 @@ double AccessibilityUIElement::maxValue() > if (!ATK_IS_VALUE(m_element.get())) > return 0; > >-#if ATK_CHECK_VERSION(2,11,92) > return rangeMinMaxValue(ATK_VALUE(m_element.get()), RangeLimitMaximum); >-#else >- GValue value = G_VALUE_INIT; >- atk_value_get_maximum_value(ATK_VALUE(m_element.get()), &value); >- if (!G_VALUE_HOLDS_FLOAT(&value)) >- return 0; >- >- return g_value_get_float(&value); >-#endif > } > > JSRetainPtr<JSStringRef> AccessibilityUIElement::valueDescription() >@@ -2393,7 +2273,6 @@ JSRetainPtr<JSStringRef> stringAtOffset(PlatformUIElement element, AtkTextBounda > gint startOffset, endOffset; > StringBuilder builder; > >-#if ATK_CHECK_VERSION(2, 10, 0) > AtkTextGranularity granularity; > switch (boundary) { > case ATK_TEXT_BOUNDARY_CHAR: >@@ -2413,9 +2292,7 @@ JSRetainPtr<JSStringRef> stringAtOffset(PlatformUIElement element, AtkTextBounda > } > > builder.append(atk_text_get_string_at_offset(ATK_TEXT(element.get()), offset, granularity, &startOffset, &endOffset)); >-#else >- builder.append(atk_text_get_text_at_offset(ATK_TEXT(element.get()), offset, boundary, &startOffset, &endOffset)); >-#endif >+ > builder.appendLiteral(", "); > builder.appendNumber(startOffset); > builder.appendLiteral(", "); >diff --git a/ChangeLog b/ChangeLog >index d0f079fe26ba8a68c5fef91ae312cf55035363b9..ff4eabbf33f05ccd347ed9dd714deb0a68240b28 100644 >--- a/ChangeLog >+++ b/ChangeLog >@@ -1,3 +1,15 @@ >+2019-06-20 Michael Catanzaro <mcatanzaro@igalia.com> >+ >+ [WPE][GTK] Bump minimum versions of GLib, GTK, libsoup, ATK, GStreamer, and Cairo >+ https://bugs.webkit.org/show_bug.cgi?id=199094 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * Source/cmake/FindGTK3.cmake: >+ * Source/cmake/GStreamerChecks.cmake: >+ * Source/cmake/OptionsGTK.cmake: >+ * Source/cmake/OptionsWPE.cmake: >+ > 2019-06-20 Carlos Garcia Campos <cgarcia@igalia.com> > > [GTK] Remove support for GTK2 plugins
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:
cgarcia
:
review+
pnormand
:
commit-queue-
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 199094
: 372607