Index: webkitgtk-2.46.5/Source/cmake/WebKitCommon.cmake
===================================================================
--- webkitgtk-2.46.5.orig/Source/cmake/WebKitCommon.cmake
+++ webkitgtk-2.46.5/Source/cmake/WebKitCommon.cmake
@@ -71,8 +71,8 @@ if (NOT HAS_RUN_WEBKIT_COMMON)
     endif ()
 
     if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
-        if (${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "11.2.0")
-            message(FATAL_ERROR "GCC 11.2 or newer is required to build WebKit. Use a newer GCC version or Clang.")
+        if (${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS "10.0.0")
+            message(FATAL_ERROR "GCC 10.0 or newer is required to build WebKit. Use a newer GCC version or Clang.")
         endif ()
     endif ()
 
Index: webkitgtk-2.46.5/Source/JavaScriptCore/runtime/PureNaN.h
===================================================================
--- webkitgtk-2.46.5.orig/Source/JavaScriptCore/runtime/PureNaN.h
+++ webkitgtk-2.46.5/Source/JavaScriptCore/runtime/PureNaN.h
@@ -71,7 +71,7 @@ namespace JSC {
 // the docs appear to imply that quiet_NaN could even return a double with the
 // signaling bit set on hardware that doesn't do signaling. That would probably
 // never happen, but it's healthy to be paranoid.
-static constexpr double PNaN { std::bit_cast<double>(0x7ff8000000000000ll) };
+static const double PNaN { std::bit_cast<double>(0x7ff8000000000000ll) };
 
 inline constexpr bool isImpureNaN(double value)
 {
Index: webkitgtk-2.46.5/Source/WTF/wtf/HashMap.h
===================================================================
--- webkitgtk-2.46.5.orig/Source/WTF/wtf/HashMap.h
+++ webkitgtk-2.46.5/Source/WTF/wtf/HashMap.h
@@ -420,7 +420,7 @@ template<typename KeyArg, typename Mappe
 template<typename K, typename V>
 ALWAYS_INLINE auto HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg, TableTraitsArg>::inlineAdd(K&& key, V&& value) -> AddResult
 {
-    return m_impl.template add<HashMapTranslator<KeyValuePairTraits, HashFunctions>>(std::forward<K>(key), [&] () ALWAYS_INLINE_LAMBDA -> MappedType { return std::forward<V>(value); });
+    return m_impl.template add<HashMapTranslator<KeyValuePairTraits, HashFunctions>>(std::forward<K>(key), [&] () -> MappedType { return std::forward<V>(value); });
 }
 
 template<typename KeyArg, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg, typename TableTraitsArg>
@@ -455,7 +455,7 @@ template<typename KeyArg, typename Mappe
 template<typename HashTranslator, typename K, typename V>
 auto HashMap<KeyArg, MappedArg, HashArg, KeyTraitsArg, MappedTraitsArg, TableTraitsArg>::add(K&& key, V&& value) -> AddResult
 {
-    return m_impl.template addPassingHashCode<HashMapTranslatorAdapter<KeyValuePairTraits, HashTranslator>>(std::forward<K>(key), [&] () ALWAYS_INLINE_LAMBDA -> MappedType { return std::forward<V>(value); });
+    return m_impl.template addPassingHashCode<HashMapTranslatorAdapter<KeyValuePairTraits, HashTranslator>>(std::forward<K>(key), [&] () -> MappedType { return std::forward<V>(value); });
 }
 
 template<typename KeyArg, typename MappedArg, typename HashArg, typename KeyTraitsArg, typename MappedTraitsArg, typename TableTraitsArg>
Index: webkitgtk-2.46.5/Source/WTF/wtf/Vector.h
===================================================================
--- webkitgtk-2.46.5.orig/Source/WTF/wtf/Vector.h
+++ webkitgtk-2.46.5/Source/WTF/wtf/Vector.h
@@ -904,12 +904,14 @@ public:
     void remove(size_t position);
     void remove(size_t position, size_t length);
     bool removeFirst(const auto&);
-    bool removeFirstMatching(const Invocable<bool(T&)> auto&, size_t startIndex = 0);
+    bool removeFirstMatching(const Invocable<bool(T&)> auto&, size_t startIndex);
+    template <typename I> ALWAYS_INLINE bool removeFirstMatching(I&& invocable) { return removeFirstMatching(std::forward<I>(invocable), 0); }
     bool removeLast(const auto&);
     bool removeLastMatching(const Invocable<bool(T&)> auto&);
     bool removeLastMatching(const Invocable<bool(T&)> auto&, size_t startIndex);
     unsigned removeAll(const auto&);
-    unsigned removeAllMatching(const Invocable<bool(T&)> auto&, size_t startIndex = 0);
+    unsigned removeAllMatching(const Invocable<bool(T&)> auto&, size_t startIndex);
+    template <typename I> ALWAYS_INLINE unsigned removeAllMatching(I&& invocable) { return removeAllMatching(std::forward<I>(invocable), 0); }
 
     void removeLast()
     {
Index: webkitgtk-2.46.5/Source/WebCore/page/EventHandler.cpp
===================================================================
--- webkitgtk-2.46.5.orig/Source/WebCore/page/EventHandler.cpp
+++ webkitgtk-2.46.5/Source/WebCore/page/EventHandler.cpp
@@ -2283,7 +2283,7 @@ bool EventHandler::swallowAnyClickEvent(
     if (!m_clickCount)
         return false;
 
-    auto nodeToClick = [&] -> RefPtr<Node> {
+    auto nodeToClick = [&] () -> RefPtr<Node> {
         if (ignoreAncestorNodesForClickEvent == IgnoreAncestorNodesForClickEvent::Yes) {
             if (mouseEvent.targetNode() != m_clickNode)
                 return nullptr;
Index: webkitgtk-2.46.5/Source/WTF/wtf/StdLibExtras.h
===================================================================
--- webkitgtk-2.46.5.orig/Source/WTF/wtf/StdLibExtras.h
+++ webkitgtk-2.46.5/Source/WTF/wtf/StdLibExtras.h
@@ -595,6 +595,14 @@ ALWAYS_INLINE constexpr typename remove_
     return move(forward<T>(value));
 }
 
+#if defined(__GNUC__) && !defined(__clang__) && __GNUC__ < 11
+template<class ToType, class FromType>
+constexpr inline ToType bit_cast(FromType from)
+{
+    return WTF::bitwise_cast<ToType>(from);
+}
+#endif
+
 } // namespace std
 
 namespace WTF {
Index: webkitgtk-2.46.5/Source/WebCore/platform/graphics/gbm/DRMDeviceManager.cpp
===================================================================
--- webkitgtk-2.46.5.orig/Source/WebCore/platform/graphics/gbm/DRMDeviceManager.cpp
+++ webkitgtk-2.46.5/Source/WebCore/platform/graphics/gbm/DRMDeviceManager.cpp
@@ -118,7 +118,7 @@ RefPtr<DRMDeviceNode> DRMDeviceManager::
     if (filename.isNull())
         return nullptr;
 
-    auto node = [&] -> RefPtr<DRMDeviceNode> {
+    auto node = [&] () -> RefPtr<DRMDeviceNode> {
         if (m_mainDevice.primaryNode && m_mainDevice.primaryNode->filename() == filename)
             return m_mainDevice.primaryNode;
 
Index: webkitgtk-2.46.5/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp
===================================================================
--- webkitgtk-2.46.5.orig/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp
+++ webkitgtk-2.46.5/Source/WebCore/rendering/updating/RenderTreeUpdaterGeneratedContent.cpp
@@ -318,7 +318,7 @@ void RenderTreeUpdater::GeneratedContent
 
     auto textWithoutSuggestion = nodeBeforeWritingSuggestionsTextRenderer->text();
 
-    auto [prefix, suffix] = [&] -> std::pair<String, String> {
+    auto [prefix, suffix] = [&] () -> std::pair<String, String> {
         if (!writingSuggestionData->supportsSuffix())
             return { textWithoutSuggestion, emptyString() };
 
Index: webkitgtk-2.46.5/Source/WebKit/WebProcess/WebPage/WebPage.cpp
===================================================================
--- webkitgtk-2.46.5.orig/Source/WebKit/WebProcess/WebPage/WebPage.cpp
+++ webkitgtk-2.46.5/Source/WebKit/WebProcess/WebPage/WebPage.cpp
@@ -9887,7 +9887,7 @@ void WebPage::simulateClickOverFirstMatc
 
         searchRange.start = range.end;
 
-        RefPtr target = [&] -> RefPtr<HTMLElement> {
+        RefPtr target = [&] () -> RefPtr<HTMLElement> {
             for (RefPtr ancestor = range.start.container.ptr(); ancestor; ancestor = ancestor->parentElementInComposedTree()) {
                 RefPtr element = dynamicDowncast<HTMLElement>(*ancestor);
                 if (!element)
Index: webkitgtk-2.46.5/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayerSkia.cpp
===================================================================
--- webkitgtk-2.46.5.orig/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayerSkia.cpp
+++ webkitgtk-2.46.5/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsLayerSkia.cpp
@@ -103,7 +103,7 @@ Ref<Nicosia::Buffer> CoordinatedGraphics
         auto recordingContext = makeUnique<DisplayList::DrawingContext>(tileRect.size());
         paintIntoGraphicsContext(recordingContext->context());
 
-        workerPool->postTask([buffer = Ref { buffer }, recordingContext = WTFMove(recordingContext), tileRect] mutable {
+        workerPool->postTask([buffer = Ref { buffer }, recordingContext = WTFMove(recordingContext), tileRect] () mutable {
             RELEASE_ASSERT(buffer->surface());
             if (auto* canvas = buffer->surface()->getCanvas()) {
                 WTFBeginSignpost(canvas, PaintTile, "Skia unaccelerated multithread, dirty region %ix%i+%i+%i", tileRect.x(), tileRect.y(), tileRect.width(), tileRect.height());
Index: webkitgtk-2.46.5/Source/WebKit/UIProcess/WebPageProxy.cpp
===================================================================
--- webkitgtk-2.46.5.orig/Source/WebKit/UIProcess/WebPageProxy.cpp
+++ webkitgtk-2.46.5/Source/WebKit/UIProcess/WebPageProxy.cpp
@@ -1800,7 +1800,7 @@ void WebPageProxy::maybeInitializeSandbo
     }
 
     if (createdExtension)
-        process.assumeReadAccessToBaseURL(*this, baseURL.string(), [sandboxExtensionHandle = WTFMove(sandboxExtensionHandle), completionHandler = WTFMove(completionHandler)] mutable {
+        process.assumeReadAccessToBaseURL(*this, baseURL.string(), [sandboxExtensionHandle = WTFMove(sandboxExtensionHandle), completionHandler = WTFMove(completionHandler)] () mutable {
             completionHandler(WTFMove(sandboxExtensionHandle));
         });
 }
Index: webkitgtk-2.46.5/Source/WebKit/UIProcess/WebProcessProxy.cpp
===================================================================
--- webkitgtk-2.46.5.orig/Source/WebKit/UIProcess/WebProcessProxy.cpp
+++ webkitgtk-2.46.5/Source/WebKit/UIProcess/WebProcessProxy.cpp
@@ -946,7 +946,7 @@ void WebProcessProxy::assumeReadAccessTo
     RefPtr dataStore = websiteDataStore();
     if (!dataStore)
         return completionHandler();
-    auto afterAllowAccess = [weakThis = WeakPtr { *this }, weakPage = WeakPtr { page }, path, completionHandler = WTFMove(completionHandler)] mutable {
+    auto afterAllowAccess = [weakThis = WeakPtr { *this }, weakPage = WeakPtr { page }, path, completionHandler = WTFMove(completionHandler)] () mutable {
         if (!weakThis || !weakPage)
             return completionHandler();
 
@@ -983,7 +983,7 @@ void WebProcessProxy::assumeReadAccessTo
     if (!paths.size())
         return completionHandler();
 
-    dataStore->networkProcess().sendWithAsyncReply(Messages::NetworkProcess::AllowFilesAccessFromWebProcess(coreProcessIdentifier(), WTFMove(paths)), [weakThis = WeakPtr { *this }, weakPage = WeakPtr { page }, paths, completionHandler = WTFMove(completionHandler)] mutable {
+    dataStore->networkProcess().sendWithAsyncReply(Messages::NetworkProcess::AllowFilesAccessFromWebProcess(coreProcessIdentifier(), WTFMove(paths)), [weakThis = WeakPtr { *this }, weakPage = WeakPtr { page }, paths, completionHandler = WTFMove(completionHandler)] () mutable {
         if (!weakThis || !weakPage)
             return completionHandler();
 
