Version in base suite: 2.30.5-1~deb10u1 Base version: webkit2gtk_2.30.5-1~deb10u1 Target version: webkit2gtk_2.30.6-1~deb10u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/w/webkit2gtk/webkit2gtk_2.30.5-1~deb10u1.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/w/webkit2gtk/webkit2gtk_2.30.6-1~deb10u1.dsc NEWS | 9 + Source/JavaScriptCore/dfg/DFGPreciseLocalClobberize.h | 50 +++--- Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.h | 5 Source/WTF/wtf/URL.cpp | 8 + Source/WebCore/CMakeLists.txt | 1 Source/WebCore/DerivedSources-input.xcfilelist | 1 Source/WebCore/DerivedSources-output.xcfilelist | 2 Source/WebCore/DerivedSources.make | 1 Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp | 12 + Source/WebCore/Modules/mediastream/RTCPeerConnection.h | 2 Source/WebCore/Modules/mediastream/RTCPeerConnection.idl | 2 Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.cpp | 68 +++++++++ Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.h | 73 ++++++++++ Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.idl | 46 ++++++ Source/WebCore/Sources.txt | 2 Source/WebCore/bindings/js/WebCoreBuiltinNames.h | 1 Source/WebCore/css/MediaQueryMatcher.cpp | 6 Source/WebCore/dom/Document.cpp | 18 +- Source/WebCore/dom/EventNames.h | 1 Source/WebCore/dom/EventNames.in | 2 Source/WebCore/dom/EventTarget.cpp | 9 - Source/WebCore/dom/UserGestureIndicator.cpp | 43 +++++ Source/WebCore/dom/UserGestureIndicator.h | 16 +- Source/WebCore/page/FrameView.cpp | 25 ++- Source/WebCore/page/Page.h | 6 Source/WebCore/page/Quirks.cpp | 40 +++++ Source/WebCore/page/Quirks.h | 2 Source/WebCore/platform/UserAgentQuirks.cpp | 48 ------ Source/WebCore/platform/glib/UserAgentGLib.cpp | 6 Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp | 9 + Source/WebKit/UIProcess/Network/NetworkProcessProxy.h | 3 Source/WebKit/UIProcess/WebPageProxy.cpp | 4 Source/WebKit/UIProcess/WebPageProxy.h | 2 Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp | 2 Source/WebKit/WebProcess/WebPage/WebPage.cpp | 6 Source/WebKit/WebProcess/WebPage/WebPage.h | 2 Source/WebKit/WebProcess/WebPage/WebPage.messages.in | 2 Source/WebKit/gtk/NEWS | 9 + Source/cmake/OptionsGTK.cmake | 6 Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp | 37 ----- debian/changelog | 20 ++ debian/control | 5 debian/patches/include-libwpe.patch | 27 +++ debian/patches/series | 1 44 files changed, 474 insertions(+), 166 deletions(-) diff -Nru webkit2gtk-2.30.5/NEWS webkit2gtk-2.30.6/NEWS --- webkit2gtk-2.30.5/NEWS 2021-02-11 09:35:16.000000000 +0000 +++ webkit2gtk-2.30.6/NEWS 2021-03-18 11:19:12.000000000 +0000 @@ -1,4 +1,13 @@ ================ +WebKitGTK 2.30.6 +================ + +What's new in WebKitGTK 2.30.6? + + - Update user agent quirks again for Google Docs and Google Drive + - Fix several crashes and rendering issues. + +================ WebKitGTK 2.30.5 ================ diff -Nru webkit2gtk-2.30.5/Source/JavaScriptCore/dfg/DFGPreciseLocalClobberize.h webkit2gtk-2.30.6/Source/JavaScriptCore/dfg/DFGPreciseLocalClobberize.h --- webkit2gtk-2.30.5/Source/JavaScriptCore/dfg/DFGPreciseLocalClobberize.h 2020-08-12 09:17:52.000000000 +0000 +++ webkit2gtk-2.30.6/Source/JavaScriptCore/dfg/DFGPreciseLocalClobberize.h 2021-03-18 10:59:50.000000000 +0000 @@ -105,6 +105,30 @@ void readTop() { + auto readWorld = [&] (Node* node) { + // All of the outermost arguments, except this, are read in sloppy mode. + if (!m_graph.m_codeBlock->ownerExecutable()->isInStrictContext()) { + for (unsigned i = m_graph.m_codeBlock->numParameters(); i--;) + m_read(virtualRegisterForArgumentIncludingThis(i)); + } + + // The stack header is read. + for (unsigned i = 0; i < CallFrameSlot::thisArgument; ++i) + m_read(VirtualRegister(i)); + + // Read all of the inline arguments and call frame headers that we didn't already capture. + for (InlineCallFrame* inlineCallFrame = node->origin.semantic.inlineCallFrame(); inlineCallFrame; inlineCallFrame = inlineCallFrame->getCallerInlineFrameSkippingTailCalls()) { + if (!inlineCallFrame->isInStrictContext()) { + for (unsigned i = inlineCallFrame->argumentsWithFixup.size(); i--;) + m_read(VirtualRegister(inlineCallFrame->stackOffset + virtualRegisterForArgumentIncludingThis(i).offset())); + } + if (inlineCallFrame->isClosureCall) + m_read(VirtualRegister(inlineCallFrame->stackOffset + CallFrameSlot::callee)); + if (inlineCallFrame->isVarargs()) + m_read(VirtualRegister(inlineCallFrame->stackOffset + CallFrameSlot::argumentCountIncludingThis)); + } + }; + auto readFrame = [&] (InlineCallFrame* inlineCallFrame, unsigned numberOfArgumentsToSkip) { if (!inlineCallFrame) { // Read the outermost arguments and argument count. @@ -122,8 +146,10 @@ auto readSpread = [&] (Node* spread) { ASSERT(spread->op() == Spread || spread->op() == PhantomSpread); - if (!spread->child1()->isPhantomAllocation()) + if (!spread->child1()->isPhantomAllocation()) { + readWorld(spread); return; + } ASSERT(spread->child1()->op() == PhantomCreateRest || spread->child1()->op() == PhantomNewArrayBuffer); if (spread->child1()->op() == PhantomNewArrayBuffer) { @@ -238,27 +264,7 @@ } default: { - // All of the outermost arguments, except this, are read in sloppy mode. - if (!m_graph.m_codeBlock->ownerExecutable()->isInStrictContext()) { - for (unsigned i = m_graph.m_codeBlock->numParameters(); i--;) - m_read(virtualRegisterForArgumentIncludingThis(i)); - } - - // The stack header is read. - for (unsigned i = 0; i < CallFrameSlot::thisArgument; ++i) - m_read(VirtualRegister(i)); - - // Read all of the inline arguments and call frame headers that we didn't already capture. - for (InlineCallFrame* inlineCallFrame = m_node->origin.semantic.inlineCallFrame(); inlineCallFrame; inlineCallFrame = inlineCallFrame->getCallerInlineFrameSkippingTailCalls()) { - if (!inlineCallFrame->isInStrictContext()) { - for (unsigned i = inlineCallFrame->argumentsWithFixup.size(); i--;) - m_read(VirtualRegister(inlineCallFrame->stackOffset + virtualRegisterForArgumentIncludingThis(i).offset())); - } - if (inlineCallFrame->isClosureCall) - m_read(VirtualRegister(inlineCallFrame->stackOffset + CallFrameSlot::callee)); - if (inlineCallFrame->isVarargs()) - m_read(VirtualRegister(inlineCallFrame->stackOffset + CallFrameSlot::argumentCountIncludingThis)); - } + readWorld(m_node); break; } } } diff -Nru webkit2gtk-2.30.5/Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.h webkit2gtk-2.30.6/Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.h --- webkit2gtk-2.30.5/Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.h 2020-08-12 09:17:53.000000000 +0000 +++ webkit2gtk-2.30.6/Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.h 2021-03-18 10:45:25.000000000 +0000 @@ -141,6 +141,11 @@ bool successfullyNormalizedChain = normalizePrototypeChain(globalObject, base, sawPolyProto) != InvalidPrototypeChain; Structure* structureAfterGettingPropertyNames = base->structure(vm); + if (!structureAfterGettingPropertyNames->canAccessPropertiesQuicklyForEnumeration()) { + indexedLength = 0; + numberStructureProperties = 0; + } + enumerator = JSPropertyNameEnumerator::create(vm, structureAfterGettingPropertyNames, indexedLength, numberStructureProperties, WTFMove(propertyNames)); if (!indexedLength && successfullyNormalizedChain && structureAfterGettingPropertyNames == structure) { enumerator->setCachedPrototypeChain(vm, structure->prototypeChain(globalObject, base)); diff -Nru webkit2gtk-2.30.5/Source/WTF/wtf/URL.cpp webkit2gtk-2.30.6/Source/WTF/wtf/URL.cpp --- webkit2gtk-2.30.5/Source/WTF/wtf/URL.cpp 2020-11-20 09:33:35.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WTF/wtf/URL.cpp 2021-03-18 09:59:35.000000000 +0000 @@ -873,6 +873,7 @@ 42, // name 43, // nicname 53, // domain + 69, // TFTP 77, // priv-rjs 79, // finger 87, // ttylink @@ -890,8 +891,10 @@ 119, // nntp 123, // NTP 135, // loc-srv / epmap + 137, // NetBIOS 139, // netbios 143, // IMAP2 + 161, // SNMP 179, // BGP 389, // LDAP 427, // SLP (Also used by Apple Filing Protocol) @@ -906,6 +909,7 @@ 532, // netnews 540, // UUCP 548, // afpovertcp [Apple addition] + 554, // rtsp 556, // remotefs 563, // NNTP+SSL 587, // ESMTP @@ -913,6 +917,9 @@ 636, // LDAP+SSL 993, // IMAP+SSL 995, // POP3+SSL + 1719, // H323 (RAS) + 1720, // H323 (Q931) + 1723, // H323 (H245) 2049, // NFS 3659, // apple-sasl / PasswordServer [Apple addition] 4045, // lockd @@ -920,6 +927,7 @@ 5060, // SIP 5061, // SIPS 6000, // X11 + 6566, // SANE 6665, // Alternate IRC [Apple addition] 6666, // Alternate IRC [Apple addition] 6667, // Standard IRC [Apple addition] diff -Nru webkit2gtk-2.30.5/Source/WebCore/CMakeLists.txt webkit2gtk-2.30.6/Source/WebCore/CMakeLists.txt --- webkit2gtk-2.30.5/Source/WebCore/CMakeLists.txt 2020-08-12 09:17:54.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/CMakeLists.txt 2021-03-18 09:56:54.000000000 +0000 @@ -370,6 +370,7 @@ Modules/mediastream/RTCOfferAnswerOptions.idl Modules/mediastream/RTCOfferOptions.idl Modules/mediastream/RTCPeerConnection.idl + Modules/mediastream/RTCPeerConnectionIceErrorEvent.idl Modules/mediastream/RTCPeerConnectionIceEvent.idl Modules/mediastream/RTCPeerConnectionState.idl Modules/mediastream/RTCPriorityType.idl diff -Nru webkit2gtk-2.30.5/Source/WebCore/DerivedSources-input.xcfilelist webkit2gtk-2.30.6/Source/WebCore/DerivedSources-input.xcfilelist --- webkit2gtk-2.30.5/Source/WebCore/DerivedSources-input.xcfilelist 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/DerivedSources-input.xcfilelist 2021-03-18 09:56:53.000000000 +0000 @@ -200,6 +200,7 @@ $(PROJECT_DIR)/Modules/mediastream/RTCOfferOptions.idl $(PROJECT_DIR)/Modules/mediastream/RTCPeerConnection.idl $(PROJECT_DIR)/Modules/mediastream/RTCPeerConnection.js +$(PROJECT_DIR)/Modules/mediastream/RTCPeerConnectionIceErrorEvent.idl $(PROJECT_DIR)/Modules/mediastream/RTCPeerConnectionIceEvent.idl $(PROJECT_DIR)/Modules/mediastream/RTCPeerConnectionInternals.js $(PROJECT_DIR)/Modules/mediastream/RTCPeerConnectionState.idl diff -Nru webkit2gtk-2.30.5/Source/WebCore/DerivedSources-output.xcfilelist webkit2gtk-2.30.6/Source/WebCore/DerivedSources-output.xcfilelist --- webkit2gtk-2.30.5/Source/WebCore/DerivedSources-output.xcfilelist 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/DerivedSources-output.xcfilelist 2021-03-18 09:56:53.000000000 +0000 @@ -1430,6 +1430,8 @@ $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCOfferOptions.h $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCPeerConnection.cpp $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCPeerConnection.h +$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCPeerConnectionIceErrorEvent.cpp +$(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCPeerConnectionIceErrorEvent.h $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCPeerConnectionIceEvent.cpp $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCPeerConnectionIceEvent.h $(BUILT_PRODUCTS_DIR)/DerivedSources/WebCore/JSRTCPeerConnectionState.cpp diff -Nru webkit2gtk-2.30.5/Source/WebCore/DerivedSources.make webkit2gtk-2.30.6/Source/WebCore/DerivedSources.make --- webkit2gtk-2.30.5/Source/WebCore/DerivedSources.make 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/DerivedSources.make 2021-03-18 09:56:53.000000000 +0000 @@ -300,6 +300,7 @@ $(WebCore)/Modules/mediastream/RTCOfferOptions.idl \ $(WebCore)/Modules/mediastream/RTCPeerConnection.idl \ $(WebCore)/Modules/mediastream/RTCPeerConnectionIceEvent.idl \ + $(WebCore)/Modules/mediastream/RTCPeerConnectionIceErrorEvent.idl \ $(WebCore)/Modules/mediastream/RTCPeerConnectionState.idl \ $(WebCore)/Modules/mediastream/RTCPriorityType.idl \ $(WebCore)/Modules/mediastream/RTCRtpCapabilities.idl \ diff -Nru webkit2gtk-2.30.5/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp webkit2gtk-2.30.6/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp --- webkit2gtk-2.30.5/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/Modules/mediastream/RTCPeerConnection.cpp 2021-03-18 09:58:32.000000000 +0000 @@ -51,6 +51,7 @@ #include "RTCController.h" #include "RTCDataChannel.h" #include "RTCIceCandidate.h" +#include "RTCPeerConnectionIceErrorEvent.h" #include "RTCPeerConnectionIceEvent.h" #include "RTCSessionDescription.h" #include "Settings.h" @@ -279,7 +280,7 @@ } // Implementation of https://w3c.github.io/webrtc-pc/#set-pc-configuration -static inline ExceptionOr> iceServersFromConfiguration(RTCConfiguration& newConfiguration, const RTCConfiguration* existingConfiguration, bool isLocalDescriptionSet) +ExceptionOr> RTCPeerConnection::iceServersFromConfiguration(RTCConfiguration& newConfiguration, const RTCConfiguration* existingConfiguration, bool isLocalDescriptionSet) { if (existingConfiguration && newConfiguration.bundlePolicy != existingConfiguration->bundlePolicy) return Exception { InvalidModificationError, "BundlePolicy does not match existing policy" }; @@ -301,8 +302,13 @@ urls = WTFMove(vector); }); - urls.removeAllMatching([](auto& url) { - return URL { URL { }, url }.path().endsWithIgnoringASCIICase(".local"); + urls.removeAllMatching([&](auto& urlString) { + URL url { URL { }, urlString }; + if (url.path().endsWithIgnoringASCIICase(".local") || !portAllowed(url)) { + queueTaskToDispatchEvent(*this, TaskSource::MediaElement, RTCPeerConnectionIceErrorEvent::create(Event::CanBubble::No, Event::IsCancelable::No, { }, { }, WTFMove(urlString), 701, "URL is not allowed"_s)); + return true; + } + return false; }); auto serverURLs = WTF::map(urls, [](auto& url) -> URL { diff -Nru webkit2gtk-2.30.5/Source/WebCore/Modules/mediastream/RTCPeerConnection.h webkit2gtk-2.30.6/Source/WebCore/Modules/mediastream/RTCPeerConnection.h --- webkit2gtk-2.30.5/Source/WebCore/Modules/mediastream/RTCPeerConnection.h 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/Modules/mediastream/RTCPeerConnection.h 2021-03-18 09:56:53.000000000 +0000 @@ -217,6 +217,8 @@ ExceptionOr> certificatesFromConfiguration(const RTCConfiguration&); + ExceptionOr> iceServersFromConfiguration(RTCConfiguration& newConfiguration, const RTCConfiguration* existingConfiguration, bool isLocalDescriptionSet); + bool m_isStopped { false }; RTCSignalingState m_signalingState { RTCSignalingState::Stable }; RTCIceGatheringState m_iceGatheringState { RTCIceGatheringState::New }; diff -Nru webkit2gtk-2.30.5/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl webkit2gtk-2.30.6/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl --- webkit2gtk-2.30.5/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl 2021-03-18 09:56:53.000000000 +0000 @@ -116,7 +116,7 @@ attribute EventHandler oniceconnectionstatechange; attribute EventHandler onicegatheringstatechange; attribute EventHandler onconnectionstatechange; - // FIXME 169644: missing onfingerprintfailure and onicecandidateerror + attribute EventHandler onicecandidateerror; // Private API used to implement the overloaded operations above. Queued functions are called by runQueuedOperation(). // See RTCPeerConnectionInternals.js. diff -Nru webkit2gtk-2.30.5/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.cpp webkit2gtk-2.30.6/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.cpp --- webkit2gtk-2.30.5/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.cpp 1970-01-01 00:00:00.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.cpp 2021-03-18 09:56:49.000000000 +0000 @@ -0,0 +1,68 @@ +/* + * Copyright (C) 2020 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include "config.h" +#include "RTCPeerConnectionIceErrorEvent.h" + +#if ENABLE(WEB_RTC) + +#include "EventNames.h" +#include + +namespace WebCore { + +WTF_MAKE_ISO_ALLOCATED_IMPL(RTCPeerConnectionIceErrorEvent); + +Ref RTCPeerConnectionIceErrorEvent::create(CanBubble canBubble, IsCancelable isCancelable, String&& address, Optional port, String&& url, uint16_t errorCode, String&& errorText) +{ + return adoptRef(*new RTCPeerConnectionIceErrorEvent(eventNames().icecandidateerrorEvent, canBubble, isCancelable, WTFMove(address), port, WTFMove(url), errorCode, WTFMove(errorText))); +} + +Ref RTCPeerConnectionIceErrorEvent::create(const AtomString& type, Init&& init) +{ + return adoptRef(*new RTCPeerConnectionIceErrorEvent(type, init.bubbles ? CanBubble::Yes : CanBubble::No, + init.cancelable ? IsCancelable::Yes : IsCancelable::No, WTFMove(init.address), init.port, WTFMove(init.url), WTFMove(init.errorCode), WTFMove(init.errorText))); +} + +RTCPeerConnectionIceErrorEvent::RTCPeerConnectionIceErrorEvent(const AtomString& type, CanBubble canBubble, IsCancelable cancelable, String&& address, Optional port, String&& url, uint16_t errorCode, String&& errorText) + : Event(type, canBubble, cancelable) + , m_address(WTFMove(address)) + , m_port(port) + , m_url(WTFMove(url)) + , m_errorCode(errorCode) + , m_errorText(WTFMove(errorText)) +{ +} + +RTCPeerConnectionIceErrorEvent::~RTCPeerConnectionIceErrorEvent() = default; + +EventInterface RTCPeerConnectionIceErrorEvent::eventInterface() const +{ + return RTCPeerConnectionIceErrorEventInterfaceType; +} + +} // namespace WebCore + +#endif // ENABLE(WEB_RTC) diff -Nru webkit2gtk-2.30.5/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.h webkit2gtk-2.30.6/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.h --- webkit2gtk-2.30.5/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.h 1970-01-01 00:00:00.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.h 2021-03-18 09:56:49.000000000 +0000 @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2020 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#pragma once + +#if ENABLE(WEB_RTC) + +#include "Event.h" +#include +#include + +namespace WebCore { +class RTCIceCandidate; + +class RTCPeerConnectionIceErrorEvent final : public Event { + WTF_MAKE_ISO_ALLOCATED(RTCPeerConnectionIceErrorEvent); +public: + virtual ~RTCPeerConnectionIceErrorEvent(); + + struct Init : EventInit { + String address; + Optional port; + String url; + uint16_t errorCode { 0 }; + String errorText; + }; + + static Ref create(const AtomString& type, Init&&); + static Ref create(CanBubble, IsCancelable, String&& address, Optional port, String&& url, uint16_t errorCode, String&& errorText); + + const String& address() const { return m_address; } + Optional port() const { return m_port; } + const String& url() const { return m_url; } + uint16_t errorCode() const { return m_errorCode; } + const String& errorText() const { return m_errorText; } + + virtual EventInterface eventInterface() const; + +private: + RTCPeerConnectionIceErrorEvent(const AtomString& type, CanBubble, IsCancelable, String&& address, Optional port, String&& url, uint16_t errorCode, String&& errorText); + + String m_address; + Optional m_port; + String m_url; + uint16_t m_errorCode { 0 }; + String m_errorText; +}; + +} // namespace WebCore + +#endif // ENABLE(WEB_RTC) diff -Nru webkit2gtk-2.30.5/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.idl webkit2gtk-2.30.6/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.idl --- webkit2gtk-2.30.5/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.idl 1970-01-01 00:00:00.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/Modules/mediastream/RTCPeerConnectionIceErrorEvent.idl 2021-03-18 09:56:49.000000000 +0000 @@ -0,0 +1,46 @@ +/* + * Copyright (C) 2020 Apple Inc. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +dictionary RTCPeerConnectionIceErrorEventInit : EventInit { + DOMString? address; + unsigned short? port; + DOMString url; + required unsigned short errorCode; + USVString errorText; +}; + +[ + Conditional=WEB_RTC, + EnabledAtRuntime=PeerConnection, + Exposed=Window +] interface RTCPeerConnectionIceErrorEvent : Event { + constructor(DOMString type, RTCPeerConnectionIceErrorEventInit eventInitDict); + + readonly attribute DOMString? address; + readonly attribute unsigned short? port; + readonly attribute DOMString url; + readonly attribute unsigned short errorCode; + readonly attribute USVString errorText; +}; diff -Nru webkit2gtk-2.30.5/Source/WebCore/Sources.txt webkit2gtk-2.30.6/Source/WebCore/Sources.txt --- webkit2gtk-2.30.5/Source/WebCore/Sources.txt 2020-09-01 09:26:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/Sources.txt 2021-03-18 09:56:53.000000000 +0000 @@ -161,6 +161,7 @@ Modules/mediastream/RTCIceTransport.cpp Modules/mediastream/RTCPeerConnection.cpp Modules/mediastream/RTCPeerConnectionIceEvent.cpp +Modules/mediastream/RTCPeerConnectionIceErrorEvent.cpp Modules/mediastream/RTCRtpReceiver.cpp Modules/mediastream/RTCRtpSender.cpp Modules/mediastream/RTCRtpTransceiver.cpp @@ -3231,6 +3232,7 @@ JSRTCOfferOptions.cpp JSRTCPeerConnection.cpp JSRTCPeerConnectionIceEvent.cpp +JSRTCPeerConnectionIceErrorEvent.cpp JSRTCPeerConnectionState.cpp JSRTCPriorityType.cpp JSRTCRtpCapabilities.cpp diff -Nru webkit2gtk-2.30.5/Source/WebCore/bindings/js/WebCoreBuiltinNames.h webkit2gtk-2.30.6/Source/WebCore/bindings/js/WebCoreBuiltinNames.h --- webkit2gtk-2.30.5/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2021-03-18 09:56:53.000000000 +0000 @@ -208,6 +208,7 @@ macro(RTCIceTransport) \ macro(RTCPeerConnection) \ macro(RTCPeerConnectionIceEvent) \ + macro(RTCPeerConnectionIceErrorEvent) \ macro(RTCRtpReceiver) \ macro(RTCRtpSender) \ macro(RTCRtpTransceiver) \ diff -Nru webkit2gtk-2.30.5/Source/WebCore/css/MediaQueryMatcher.cpp webkit2gtk-2.30.6/Source/WebCore/css/MediaQueryMatcher.cpp --- webkit2gtk-2.30.5/Source/WebCore/css/MediaQueryMatcher.cpp 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/css/MediaQueryMatcher.cpp 2021-03-18 09:27:47.000000000 +0000 @@ -125,8 +125,12 @@ continue; bool notify; list->evaluate(evaluator, notify); - if (notify) + if (notify) { + if (m_document && m_document->quirks().shouldSilenceMediaQueryListChangeEvents()) + continue; + list->dispatchEvent(MediaQueryListEvent::create(eventNames().changeEvent, list->media(), list->matches())); + } } } diff -Nru webkit2gtk-2.30.5/Source/WebCore/dom/Document.cpp webkit2gtk-2.30.6/Source/WebCore/dom/Document.cpp --- webkit2gtk-2.30.5/Source/WebCore/dom/Document.cpp 2020-08-14 06:22:37.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/dom/Document.cpp 2021-03-18 10:24:42.000000000 +0000 @@ -3457,8 +3457,11 @@ if (!isSandboxed(SandboxTopNavigation) && &targetFrame == &m_frame->tree().top()) return true; + // The user gesture only relaxes permissions for the purpose of navigating if its impacts the current document. + bool isProcessingUserGestureForDocument = UserGestureIndicator::processingUserGesture(m_frame->document()); + // ii. A frame can navigate its top ancestor when its 'allow-top-navigation-by-user-activation' flag is set and navigation is triggered by user activation. - if (!isSandboxed(SandboxTopNavigationByUserActivation) && UserGestureIndicator::processingUserGesture() && &targetFrame == &m_frame->tree().top()) + if (!isSandboxed(SandboxTopNavigationByUserActivation) && isProcessingUserGestureForDocument && &targetFrame == &m_frame->tree().top()) return true; // iii. A sandboxed frame can always navigate its descendants. @@ -3475,14 +3478,13 @@ // 2. Otherwise, if B is a top-level browsing context, and is one of the ancestor browsing contexts of A, then: if (m_frame != &targetFrame && &targetFrame == &m_frame->tree().top()) { - bool triggeredByUserActivation = UserGestureIndicator::processingUserGesture(); // 1. If this algorithm is triggered by user activation and A's active document's active sandboxing flag set has its sandboxed top-level navigation with user activation browsing context flag set, then abort these steps negatively. - if (triggeredByUserActivation && isSandboxed(SandboxTopNavigationByUserActivation)) { + if (isProcessingUserGestureForDocument && isSandboxed(SandboxTopNavigationByUserActivation)) { printNavigationErrorMessage(targetFrame, url(), "The frame attempting navigation of the top-level window is sandboxed, but the 'allow-top-navigation-by-user-activation' flag is not set and navigation is not triggered by user activation."_s); return false; } // 2. Otherwise, If this algorithm is not triggered by user activation and A's active document's active sandboxing flag set has its sandboxed top-level navigation without user activation browsing context flag set, then abort these steps negatively. - if (!triggeredByUserActivation && isSandboxed(SandboxTopNavigation)) { + if (!isProcessingUserGestureForDocument && isSandboxed(SandboxTopNavigation)) { printNavigationErrorMessage(targetFrame, url(), "The frame attempting navigation of the top-level window is sandboxed, but the 'allow-top-navigation' flag is not set."_s); return false; } @@ -3556,8 +3558,12 @@ // Only prevent navigations by unsandboxed iframes. Such navigations by unsandboxed iframes would have already been blocked unless // "allow-top-navigation" / "allow-top-navigation-by-user-activation" was explicitly specified. - if (sandboxFlags() != SandboxNone) - return false; + if (sandboxFlags() != SandboxNone) { + // Navigation is only allowed if the parent of the sandboxed iframe is first-party. + auto* parentDocument = m_frame->tree().parent() ? m_frame->tree().parent()->document() : nullptr; + if (parentDocument && canAccessAncestor(parentDocument->securityOrigin(), &targetFrame)) + return false; + } // Only prevent navigations by third-party iframes or untrusted first-party iframes. bool isUntrustedIframe = m_hasLoadedThirdPartyScript && m_hasLoadedThirdPartyFrame; diff -Nru webkit2gtk-2.30.5/Source/WebCore/dom/EventNames.h webkit2gtk-2.30.6/Source/WebCore/dom/EventNames.h --- webkit2gtk-2.30.5/Source/WebCore/dom/EventNames.h 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/dom/EventNames.h 2021-03-18 09:56:53.000000000 +0000 @@ -144,6 +144,7 @@ macro(gotpointercapture) \ macro(hashchange) \ macro(icecandidate) \ + macro(icecandidateerror) \ macro(iceconnectionstatechange) \ macro(icegatheringstatechange) \ macro(inactive) \ diff -Nru webkit2gtk-2.30.5/Source/WebCore/dom/EventNames.in webkit2gtk-2.30.6/Source/WebCore/dom/EventNames.in --- webkit2gtk-2.30.5/Source/WebCore/dom/EventNames.in 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/dom/EventNames.in 2021-03-18 09:56:53.000000000 +0000 @@ -57,10 +57,10 @@ MerchantValidationEvent conditional=PAYMENT_REQUEST PaymentMethodChangeEvent conditional=PAYMENT_REQUEST PaymentRequestUpdateEvent conditional=PAYMENT_REQUEST +RTCPeerConnectionIceErrorEvent conditional=WEB_RTC RTCPeerConnectionIceEvent conditional=WEB_RTC RTCDataChannelEvent conditional=WEB_RTC RTCDTMFToneChangeEvent conditional=WEB_RTC -RTCPeerConnectionIceEvent conditional=WEB_RTC RTCTrackEvent conditional=WEB_RTC SpeechSynthesisEvent conditional=SPEECH_SYNTHESIS WebGLContextEvent conditional=WEBGL diff -Nru webkit2gtk-2.30.5/Source/WebCore/dom/EventTarget.cpp webkit2gtk-2.30.6/Source/WebCore/dom/EventTarget.cpp --- webkit2gtk-2.30.5/Source/WebCore/dom/EventTarget.cpp 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/dom/EventTarget.cpp 2021-03-18 09:27:47.000000000 +0000 @@ -258,15 +258,6 @@ if (!data) return; - // FIXME: Remove once is fixed. - if (is(scriptExecutionContext())) { - auto* page = downcast(*scriptExecutionContext()).page(); - if (page && !page->shouldFireEvents()) { - RELEASE_LOG_IF(page->isAlwaysOnLoggingAllowed(), Events, "%p - EventTarget::fireEventListeners: Not firing %{public}s event because events are temporarily disabled for this page", this, event.type().string().utf8().data()); - return; - } - } - SetForScope firingEventListenersScope(data->isFiringEventListeners, true); if (auto* listenersVector = data->eventListenerMap.find(event.type())) { diff -Nru webkit2gtk-2.30.5/Source/WebCore/dom/UserGestureIndicator.cpp webkit2gtk-2.30.6/Source/WebCore/dom/UserGestureIndicator.cpp --- webkit2gtk-2.30.5/Source/WebCore/dom/UserGestureIndicator.cpp 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/dom/UserGestureIndicator.cpp 2021-03-18 10:24:27.000000000 +0000 @@ -30,6 +30,7 @@ #include "Document.h" #include "Frame.h" #include "ResourceLoadObserver.h" +#include "SecurityOrigin.h" #include #include #include @@ -43,6 +44,34 @@ return token; } +UserGestureToken::UserGestureToken(ProcessingUserGestureState state, UserGestureType gestureType, Document* document) + : m_state(state) + , m_gestureType(gestureType) +{ + if (!document || !processingUserGesture()) + return; + + // User gesture is valid for the document that received the user gesture, all of its ancestors + // as well as all same-origin documents on the page. + m_documentsImpactedByUserGesture.add(*document); + + auto* documentFrame = document->frame(); + if (!documentFrame) + return; + + for (auto* ancestorFrame = documentFrame->tree().parent(); ancestorFrame; ancestorFrame = ancestorFrame->tree().parent()) { + if (auto* ancestorDocument = ancestorFrame->document()) + m_documentsImpactedByUserGesture.add(ancestorDocument); + } + + auto& documentOrigin = document->securityOrigin(); + for (auto* frame = &documentFrame->tree().top(); frame; frame = frame->tree().traverseNext()) { + auto* frameDocument = frame->document(); + if (frameDocument && documentOrigin.canAccess(frameDocument->securityOrigin())) + m_documentsImpactedByUserGesture.add(*frameDocument); + } +} + UserGestureToken::~UserGestureToken() { for (auto& observer : m_destructionObservers) @@ -60,13 +89,18 @@ maxIntervalForUserGestureForwardingForFetch = WTFMove(value); } +bool UserGestureToken::isValidForDocument(Document& document) const +{ + return m_documentsImpactedByUserGesture.contains(document); +} + UserGestureIndicator::UserGestureIndicator(Optional state, Document* document, UserGestureType gestureType, ProcessInteractionStyle processInteractionStyle) : m_previousToken { currentToken() } { ASSERT(isMainThread()); if (state) - currentToken() = UserGestureToken::create(state.value(), gestureType); + currentToken() = UserGestureToken::create(state.value(), gestureType, document); if (document && currentToken()->processingUserGesture() && state) { document->updateLastHandledUserGestureTimestamp(currentToken()->startTime()); @@ -123,12 +157,15 @@ return currentToken(); } -bool UserGestureIndicator::processingUserGesture() +bool UserGestureIndicator::processingUserGesture(Document* document) { if (!isMainThread()) return false; - return currentToken() ? currentToken()->processingUserGesture() : false; + if (!currentToken() || !currentToken()->processingUserGesture()) + return false; + + return !document || currentToken()->isValidForDocument(*document); } bool UserGestureIndicator::processingUserGestureForMedia() diff -Nru webkit2gtk-2.30.5/Source/WebCore/dom/UserGestureIndicator.h webkit2gtk-2.30.6/Source/WebCore/dom/UserGestureIndicator.h --- webkit2gtk-2.30.5/Source/WebCore/dom/UserGestureIndicator.h 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/dom/UserGestureIndicator.h 2021-03-18 10:24:27.000000000 +0000 @@ -31,6 +31,7 @@ #include #include #include +#include #include namespace WebCore { @@ -51,9 +52,9 @@ static const Seconds& maximumIntervalForUserGestureForwardingForFetch(); WEBCORE_EXPORT static void setMaximumIntervalForUserGestureForwardingForFetchForTesting(Seconds); - static Ref create(ProcessingUserGestureState state, UserGestureType gestureType) + static Ref create(ProcessingUserGestureState state, UserGestureType gestureType, Document* document = nullptr) { - return adoptRef(*new UserGestureToken(state, gestureType)); + return adoptRef(*new UserGestureToken(state, gestureType, document)); } WEBCORE_EXPORT ~UserGestureToken(); @@ -101,16 +102,15 @@ MonotonicTime startTime() const { return m_startTime; } + bool isValidForDocument(Document&) const; + private: - UserGestureToken(ProcessingUserGestureState state, UserGestureType gestureType) - : m_state(state) - , m_gestureType(gestureType) - { - } + UserGestureToken(ProcessingUserGestureState, UserGestureType, Document*); ProcessingUserGestureState m_state = NotProcessingUserGesture; Vector> m_destructionObservers; UserGestureType m_gestureType; + WeakHashSet m_documentsImpactedByUserGesture; DOMPasteAccessPolicy m_domPasteAccessPolicy { DOMPasteAccessPolicy::NotRequestedYet }; GestureScope m_scope { GestureScope::All }; MonotonicTime m_startTime { MonotonicTime::now() }; @@ -123,7 +123,7 @@ public: WEBCORE_EXPORT static RefPtr currentUserGesture(); - WEBCORE_EXPORT static bool processingUserGesture(); + WEBCORE_EXPORT static bool processingUserGesture(Document* = nullptr); WEBCORE_EXPORT static bool processingUserGestureForMedia(); // If a document is provided, its last known user gesture timestamp is updated. diff -Nru webkit2gtk-2.30.5/Source/WebCore/page/FrameView.cpp webkit2gtk-2.30.6/Source/WebCore/page/FrameView.cpp --- webkit2gtk-2.30.5/Source/WebCore/page/FrameView.cpp 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/page/FrameView.cpp 2021-03-18 09:55:54.000000000 +0000 @@ -72,6 +72,7 @@ #include "Page.h" #include "PageOverlayController.h" #include "ProgressTracker.h" +#include "Quirks.h" #include "RenderEmbeddedObject.h" #include "RenderFullScreen.h" #include "RenderIFrame.h" @@ -2206,12 +2207,12 @@ auto& document = *frame().document(); RELEASE_ASSERT(document.haveStylesheetsLoaded()); - Element* anchorElement = document.findAnchor(fragmentIdentifier); + auto anchorElement = makeRefPtr(document.findAnchor(fragmentIdentifier)); - LOG(Scrolling, " anchorElement is %p", anchorElement); + LOG(Scrolling, " anchorElement is %p", anchorElement.get()); // Setting to null will clear the current target. - document.setCSSTarget(anchorElement); + document.setCSSTarget(anchorElement.get()); if (is(document)) { if (fragmentIdentifier.isEmpty()) @@ -2228,18 +2229,18 @@ return false; } - ContainerNode* scrollPositionAnchor = anchorElement; + RefPtr scrollPositionAnchor = anchorElement; if (!scrollPositionAnchor) scrollPositionAnchor = frame().document(); - maintainScrollPositionAtAnchor(scrollPositionAnchor); + maintainScrollPositionAtAnchor(scrollPositionAnchor.get()); // If the anchor accepts keyboard focus, move focus there to aid users relying on keyboard navigation. if (anchorElement) { if (anchorElement->isFocusable()) - document.setFocusedElement(anchorElement); + document.setFocusedElement(anchorElement.get()); else { document.setFocusedElement(nullptr); - document.setFocusNavigationStartingNode(anchorElement); + document.setFocusNavigationStartingNode(anchorElement.get()); } } @@ -3391,8 +3392,14 @@ } #endif - LOG_WITH_STREAM(Events, stream << "FrameView" << this << "sendResizeEventIfNeeded scheduling resize event for document" << frame().document() << ", size " << currentSize); - frame().document()->setNeedsDOMWindowResizeEvent(); + auto* document = frame().document(); + if (document->quirks().shouldSilenceWindowResizeEvents()) { + FRAMEVIEW_RELEASE_LOG_IF_ALLOWED(Events, "sendResizeEventIfNeeded: Not firing resize events because they are temporarily disabled for this page"); + return; + } + + LOG_WITH_STREAM(Events, stream << "FrameView" << this << "sendResizeEventIfNeeded scheduling resize event for document" << document << ", size " << currentSize); + document->setNeedsDOMWindowResizeEvent(); bool isMainFrame = frame().isMainFrame(); if (InspectorInstrumentation::hasFrontends() && isMainFrame) { diff -Nru webkit2gtk-2.30.5/Source/WebCore/page/Page.h webkit2gtk-2.30.6/Source/WebCore/page/Page.h --- webkit2gtk-2.30.5/Source/WebCore/page/Page.h 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/page/Page.h 2021-03-18 09:27:47.000000000 +0000 @@ -773,8 +773,8 @@ WEBCORE_EXPORT void injectUserStyleSheet(UserStyleSheet&); WEBCORE_EXPORT void removeInjectedUserStyleSheet(UserStyleSheet&); - bool shouldFireEvents() const { return m_shouldFireEvents; } - void setShouldFireEvents(bool shouldFireEvents) { m_shouldFireEvents = shouldFireEvents; } + bool isTakingSnapshotsForApplicationSuspension() const { return m_isTakingSnapshotsForApplicationSuspension; } + void setIsTakingSnapshotsForApplicationSuspension(bool isTakingSnapshotsForApplicationSuspension) { m_isTakingSnapshotsForApplicationSuspension = isTakingSnapshotsForApplicationSuspension; } bool hasBeenNotifiedToInjectUserScripts() const { return m_hasBeenNotifiedToInjectUserScripts; } WEBCORE_EXPORT void notifyToInjectUserScripts(); @@ -1067,7 +1067,7 @@ Vector m_corsDisablingPatterns; Vector m_userStyleSheetsPendingInjection; - bool m_shouldFireEvents { true }; + bool m_isTakingSnapshotsForApplicationSuspension { false }; bool m_loadsSubresources { true }; bool m_loadsFromNetwork { true }; bool m_canUseCredentialStorage { true }; diff -Nru webkit2gtk-2.30.5/Source/WebCore/page/Quirks.cpp webkit2gtk-2.30.6/Source/WebCore/page/Quirks.cpp --- webkit2gtk-2.30.5/Source/WebCore/page/Quirks.cpp 2020-08-12 09:17:55.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/page/Quirks.cpp 2021-03-18 09:27:48.000000000 +0000 @@ -638,6 +638,46 @@ #endif } +bool Quirks::shouldSilenceWindowResizeEvents() const +{ +#if PLATFORM(IOS) + if (!needsQuirks()) + return false; + + // We silence window resize events during the 'homing out' snapshot sequence when on nytimes.com + // to address , and on twitter.com to address & + // . + auto* page = m_document->page(); + if (!page || !page->isTakingSnapshotsForApplicationSuspension()) + return false; + + auto host = m_document->topDocument().url().host(); + return equalLettersIgnoringASCIICase(host, "nytimes.com") || host.endsWithIgnoringASCIICase(".nytimes.com") + || equalLettersIgnoringASCIICase(host, "twitter.com") || host.endsWithIgnoringASCIICase(".twitter.com"); +#else + return false; +#endif +} + +bool Quirks::shouldSilenceMediaQueryListChangeEvents() const +{ +#if PLATFORM(IOS) + if (!needsQuirks()) + return false; + + // We silence MediaQueryList's change events during the 'homing out' snapshot sequence when on twitter.com + // to address & . + auto* page = m_document->page(); + if (!page || !page->isTakingSnapshotsForApplicationSuspension()) + return false; + + auto host = m_document->topDocument().url().host(); + return equalLettersIgnoringASCIICase(host, "twitter.com") || host.endsWithIgnoringASCIICase(".twitter.com"); +#else + return false; +#endif +} + bool Quirks::shouldAvoidScrollingWhenFocusedContentIsVisible() const { if (!needsQuirks()) diff -Nru webkit2gtk-2.30.5/Source/WebCore/page/Quirks.h webkit2gtk-2.30.6/Source/WebCore/page/Quirks.h --- webkit2gtk-2.30.5/Source/WebCore/page/Quirks.h 2020-08-14 06:05:09.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/page/Quirks.h 2021-03-18 09:27:47.000000000 +0000 @@ -44,6 +44,8 @@ Quirks(Document&); ~Quirks(); + bool shouldSilenceWindowResizeEvents() const; + bool shouldSilenceMediaQueryListChangeEvents() const; bool shouldIgnoreInvalidSignal() const; bool needsFormControlToBeMouseFocusable() const; bool needsAutoplayPlayPauseEvents() const; diff -Nru webkit2gtk-2.30.5/Source/WebCore/platform/UserAgentQuirks.cpp webkit2gtk-2.30.6/Source/WebCore/platform/UserAgentQuirks.cpp --- webkit2gtk-2.30.5/Source/WebCore/platform/UserAgentQuirks.cpp 2021-02-01 09:36:05.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/platform/UserAgentQuirks.cpp 2021-03-18 09:18:40.000000000 +0000 @@ -81,6 +81,10 @@ if (baseDomain == "bankofamerica.com") return true; + // Google Docs shows an unsupported browser warning with WebKitGTK's + // standard user agent. + if (domain == "docs.google.com") + return true; return false; } @@ -101,31 +105,6 @@ return false; } -static bool urlRequiresInternetExplorerBrowser(const URL& url) -{ - String domain = url.host().toString(); - - // This quirk actually has nothing to do with YouTube. It's needed to avoid - // unsupported browser warnings on Google Docs. Why do we need this weird - // quirk? We cannot use Chrome or Firefox quirks because Google then uses - // features that don't work in WebKit. And we can't use our macOS platform - // quirk because Google then expects command keys and doesn't support basic - // keyboard shortcuts. We could pretend to be Edge, but adding Chromium is - // likely to break in the same way as a Chrome quirk. So that leaves us - // with IE browser as the final reasonable option. This will break - // eventually, but hopefully not for a long time, because we are probably - // out of options when it does. - if (domain == "accounts.youtube.com" || domain == "docs.google.com") - return true; - - // Google Drive shows an unsupported browser warning with WebKitGTK's - // standard user agent. - if (domain == "drive.google.com") - return true; - - return false; -} - static bool urlRequiresMacintoshPlatform(const URL& url) { String domain = url.host().toString(); @@ -163,14 +142,9 @@ return false; } -static bool urlRequiresWindowsPlatform(const URL& url) -{ - return urlRequiresInternetExplorerBrowser(url); -} - static bool urlRequiresLinuxDesktopPlatform(const URL& url) { - return isGoogle(url) && !urlRequiresInternetExplorerBrowser(url) && chassisType() != WTF::ChassisType::Mobile; + return isGoogle(url) && chassisType() != WTF::ChassisType::Mobile; } UserAgentQuirks UserAgentQuirks::quirksForURL(const URL& url) @@ -183,13 +157,9 @@ quirks.add(UserAgentQuirks::NeedsChromeBrowser); else if (urlRequiresFirefoxBrowser(url)) quirks.add(UserAgentQuirks::NeedsFirefoxBrowser); - else if (urlRequiresInternetExplorerBrowser(url)) - quirks.add(UserAgentQuirks::NeedsInternetExplorerBrowser); if (urlRequiresMacintoshPlatform(url)) quirks.add(UserAgentQuirks::NeedsMacintoshPlatform); - else if (urlRequiresWindowsPlatform(url)) - quirks.add(UserAgentQuirks::NeedsWindowsPlatform); else if (urlRequiresLinuxDesktopPlatform(url)) quirks.add(UserAgentQuirks::NeedsLinuxDesktopPlatform); @@ -201,15 +171,11 @@ switch (quirk) { case NeedsChromeBrowser: // Get versions from https://chromium.googlesource.com/chromium/src.git - return "Chrome/86.0.4208.2"_s; + return "Chrome/90.0.4419.1"_s; case NeedsFirefoxBrowser: - return "; rv:80.0) Gecko/20100101 Firefox/80.0"_s; - case NeedsInternetExplorerBrowser: - return "; Trident/7.0; rv:11.0) like Gecko"_s; + return "; rv:87.0) Gecko/20100101 Firefox/87.0"_s; case NeedsMacintoshPlatform: return "Macintosh; Intel Mac OS X 10_15"_s; - case NeedsWindowsPlatform: - return "Windows NT 10.0"_s; case NeedsLinuxDesktopPlatform: return "X11; Linux x86_64"_s; case NumUserAgentQuirks: diff -Nru webkit2gtk-2.30.5/Source/WebCore/platform/glib/UserAgentGLib.cpp webkit2gtk-2.30.6/Source/WebCore/platform/glib/UserAgentGLib.cpp --- webkit2gtk-2.30.5/Source/WebCore/platform/glib/UserAgentGLib.cpp 2021-02-01 09:36:09.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebCore/platform/glib/UserAgentGLib.cpp 2021-03-18 09:18:40.000000000 +0000 @@ -89,8 +89,6 @@ if (quirks.contains(UserAgentQuirks::NeedsMacintoshPlatform)) uaString.append(UserAgentQuirks::stringForQuirk(UserAgentQuirks::NeedsMacintoshPlatform)); - else if (quirks.contains(UserAgentQuirks::NeedsWindowsPlatform)) - uaString.append(UserAgentQuirks::stringForQuirk(UserAgentQuirks::NeedsWindowsPlatform)); else if (quirks.contains(UserAgentQuirks::NeedsLinuxDesktopPlatform)) uaString.append(UserAgentQuirks::stringForQuirk(UserAgentQuirks::NeedsLinuxDesktopPlatform)); else { @@ -106,10 +104,6 @@ uaString.append(UserAgentQuirks::stringForQuirk(UserAgentQuirks::NeedsFirefoxBrowser)); return uaString.toString(); } - if (quirks.contains(UserAgentQuirks::NeedsInternetExplorerBrowser)) { - uaString.append(UserAgentQuirks::stringForQuirk(UserAgentQuirks::NeedsInternetExplorerBrowser)); - return uaString.toString(); - } uaString.appendLiteral(") AppleWebKit/"); uaString.append(versionForUAString()); diff -Nru webkit2gtk-2.30.5/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp webkit2gtk-2.30.6/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp --- webkit2gtk-2.30.5/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2020-08-12 09:17:56.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp 2021-03-18 09:52:59.000000000 +0000 @@ -1273,6 +1273,8 @@ void NetworkProcessProxy::addSession(Ref&& store) { + m_sessionIDs.add(store->sessionID()); + if (canSendMessage()) send(Messages::NetworkProcess::AddWebsiteDataStore { store->parameters() }, 0); auto sessionID = store->sessionID(); @@ -1283,8 +1285,15 @@ } } +bool NetworkProcessProxy::hasSession(PAL::SessionID sessionID) const +{ + return m_sessionIDs.contains(sessionID); +} + void NetworkProcessProxy::removeSession(PAL::SessionID sessionID) { + m_sessionIDs.remove(sessionID); + if (canSendMessage()) send(Messages::NetworkProcess::DestroySession { sessionID }, 0); } diff -Nru webkit2gtk-2.30.5/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h webkit2gtk-2.30.6/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h --- webkit2gtk-2.30.5/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h 2020-08-12 09:17:56.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h 2021-03-18 09:52:59.000000000 +0000 @@ -212,6 +212,7 @@ #endif void addSession(Ref&&); + bool hasSession(PAL::SessionID) const; void removeSession(PAL::SessionID); #if ENABLE(INDEXED_DATABASE) @@ -347,6 +348,8 @@ WeakPtr m_networkProcess; }; #endif + + HashSet m_sessionIDs; }; } // namespace WebKit diff -Nru webkit2gtk-2.30.5/Source/WebKit/UIProcess/WebPageProxy.cpp webkit2gtk-2.30.6/Source/WebKit/UIProcess/WebPageProxy.cpp --- webkit2gtk-2.30.5/Source/WebKit/UIProcess/WebPageProxy.cpp 2020-10-23 08:14:18.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebKit/UIProcess/WebPageProxy.cpp 2021-03-18 09:27:48.000000000 +0000 @@ -10156,9 +10156,9 @@ send(Messages::WebPage::SetOverriddenMediaType(mediaType)); } -void WebPageProxy::setShouldFireEvents(bool shouldFireEvents) +void WebPageProxy::setIsTakingSnapshotsForApplicationSuspension(bool isTakingSnapshotsForApplicationSuspension) { - send(Messages::WebPage::SetShouldFireEvents(shouldFireEvents)); + send(Messages::WebPage::SetIsTakingSnapshotsForApplicationSuspension(isTakingSnapshotsForApplicationSuspension)); } void WebPageProxy::setNeedsDOMWindowResizeEvent() diff -Nru webkit2gtk-2.30.5/Source/WebKit/UIProcess/WebPageProxy.h webkit2gtk-2.30.6/Source/WebKit/UIProcess/WebPageProxy.h --- webkit2gtk-2.30.5/Source/WebKit/UIProcess/WebPageProxy.h 2020-09-04 06:25:12.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebKit/UIProcess/WebPageProxy.h 2021-03-18 09:27:48.000000000 +0000 @@ -1757,7 +1757,7 @@ void grantAccessToPreferenceService(); #endif - void setShouldFireEvents(bool); + void setIsTakingSnapshotsForApplicationSuspension(bool); void setNeedsDOMWindowResizeEvent(); void isNavigatingToAppBoundDomainTesting(CompletionHandler&&); diff -Nru webkit2gtk-2.30.5/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp webkit2gtk-2.30.6/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp --- webkit2gtk-2.30.5/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2020-08-12 09:17:56.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebKit/UIProcess/WebsiteData/WebsiteDataStore.cpp 2021-03-18 09:53:01.000000000 +0000 @@ -1995,6 +1995,8 @@ { if (auto* processPoolDataStore = processPool.websiteDataStore()) return processPoolDataStore == this; + if (auto* networkProcessProxy = processPool.networkProcess()) + return networkProcessProxy->hasSession(m_sessionID); return false; } diff -Nru webkit2gtk-2.30.5/Source/WebKit/WebProcess/WebPage/WebPage.cpp webkit2gtk-2.30.6/Source/WebKit/WebProcess/WebPage/WebPage.cpp --- webkit2gtk-2.30.5/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2020-08-12 09:17:56.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebKit/WebProcess/WebPage/WebPage.cpp 2021-03-18 09:27:47.000000000 +0000 @@ -3372,12 +3372,12 @@ send(Messages::WebPageProxy::ShowPage()); } -void WebPage::setShouldFireEvents(bool shouldFireEvents) +void WebPage::setIsTakingSnapshotsForApplicationSuspension(bool isTakingSnapshotsForApplicationSuspension) { - RELEASE_LOG_IF_ALLOWED(Resize, "setShouldFireEvents(%d)", shouldFireEvents); + RELEASE_LOG_IF_ALLOWED(Resize, "setIsTakingSnapshotsForApplicationSuspension(%d)", isTakingSnapshotsForApplicationSuspension); if (m_page) - m_page->setShouldFireEvents(shouldFireEvents); + m_page->setIsTakingSnapshotsForApplicationSuspension(isTakingSnapshotsForApplicationSuspension); } void WebPage::setNeedsDOMWindowResizeEvent() diff -Nru webkit2gtk-2.30.5/Source/WebKit/WebProcess/WebPage/WebPage.h webkit2gtk-2.30.6/Source/WebKit/WebProcess/WebPage/WebPage.h --- webkit2gtk-2.30.5/Source/WebKit/WebProcess/WebPage/WebPage.h 2020-08-12 09:17:56.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebKit/WebProcess/WebPage/WebPage.h 2021-03-18 09:27:47.000000000 +0000 @@ -1731,7 +1731,7 @@ void urlSchemeTaskDidReceiveData(uint64_t handlerIdentifier, uint64_t taskIdentifier, const IPC::SharedBufferDataReference&); void urlSchemeTaskDidComplete(uint64_t handlerIdentifier, uint64_t taskIdentifier, const WebCore::ResourceError&); - void setShouldFireEvents(bool); + void setIsTakingSnapshotsForApplicationSuspension(bool); void setNeedsDOMWindowResizeEvent(); void setIsSuspended(bool); diff -Nru webkit2gtk-2.30.5/Source/WebKit/WebProcess/WebPage/WebPage.messages.in webkit2gtk-2.30.6/Source/WebKit/WebProcess/WebPage/WebPage.messages.in --- webkit2gtk-2.30.5/Source/WebKit/WebProcess/WebPage/WebPage.messages.in 2020-08-12 09:17:56.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebKit/WebProcess/WebPage/WebPage.messages.in 2021-03-18 09:27:47.000000000 +0000 @@ -605,7 +605,7 @@ UpdateCORSDisablingPatterns(Vector patterns) - SetShouldFireEvents(bool shouldFireEvents) + SetIsTakingSnapshotsForApplicationSuspension(bool isTakingSnapshotsForApplicationSuspension) SetNeedsDOMWindowResizeEvent() SetHasResourceLoadClient(bool has) diff -Nru webkit2gtk-2.30.5/Source/WebKit/gtk/NEWS webkit2gtk-2.30.6/Source/WebKit/gtk/NEWS --- webkit2gtk-2.30.5/Source/WebKit/gtk/NEWS 2021-02-11 09:35:16.000000000 +0000 +++ webkit2gtk-2.30.6/Source/WebKit/gtk/NEWS 2021-03-18 11:19:12.000000000 +0000 @@ -1,4 +1,13 @@ ================ +WebKitGTK 2.30.6 +================ + +What's new in WebKitGTK 2.30.6? + + - Update user agent quirks again for Google Docs and Google Drive + - Fix several crashes and rendering issues. + +================ WebKitGTK 2.30.5 ================ diff -Nru webkit2gtk-2.30.5/Source/cmake/OptionsGTK.cmake webkit2gtk-2.30.6/Source/cmake/OptionsGTK.cmake --- webkit2gtk-2.30.5/Source/cmake/OptionsGTK.cmake 2021-02-11 09:32:02.000000000 +0000 +++ webkit2gtk-2.30.6/Source/cmake/OptionsGTK.cmake 2021-03-18 11:17:28.000000000 +0000 @@ -4,7 +4,7 @@ WEBKIT_OPTION_BEGIN() WEBKIT_OPTION_DEFINE(USE_GTK4 "Whether to enable usage of GTK4 instead of GTK3." PUBLIC OFF) -SET_PROJECT_VERSION(2 30 5) +SET_PROJECT_VERSION(2 30 6) if (USE_GTK4) set(WEBKITGTK_API_VERSION 5.0) @@ -13,10 +13,10 @@ else () set(WEBKITGTK_API_VERSION 4.0) set(GTK_MINIMUM_VERSION 3.22.0) - CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT 86 9 49) + CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(WEBKIT 86 10 49) endif () -CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(JAVASCRIPTCORE 35 13 17) +CALCULATE_LIBRARY_VERSIONS_FROM_LIBTOOL_TRIPLE(JAVASCRIPTCORE 35 14 17) # These are shared variables, but we special case their definition so that we can use the # CMAKE_INSTALL_* variables that are populated by the GNUInstallDirs macro. diff -Nru webkit2gtk-2.30.5/Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp webkit2gtk-2.30.6/Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp --- webkit2gtk-2.30.5/Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp 2021-02-01 09:36:05.000000000 +0000 +++ webkit2gtk-2.30.6/Tools/TestWebKitAPI/Tests/WebCore/UserAgentQuirks.cpp 2021-03-18 09:21:27.000000000 +0000 @@ -41,7 +41,6 @@ EXPECT_FALSE(uaString.contains("Chromium")); EXPECT_FALSE(uaString.contains("Firefox")); EXPECT_FALSE(uaString.contains("Version")); - EXPECT_FALSE(uaString.contains("Trident")); } static void assertUserAgentForURLHasFirefoxBrowserQuirk(const char* url) @@ -53,19 +52,6 @@ EXPECT_FALSE(uaString.contains("Chromium")); EXPECT_TRUE(uaString.contains("Firefox")); EXPECT_FALSE(uaString.contains("Version")); - EXPECT_FALSE(uaString.contains("Trident")); -} - -static void assertUserAgentForURLHasInternetExplorerBrowserQuirk(const char* url) -{ - String uaString = standardUserAgentForURL(URL({ }, url)); - - EXPECT_FALSE(uaString.contains("Chrome")); - EXPECT_FALSE(uaString.contains("Safari")); - EXPECT_FALSE(uaString.contains("Chromium")); - EXPECT_FALSE(uaString.contains("Firefox")); - EXPECT_FALSE(uaString.contains("Version")); - EXPECT_TRUE(uaString.contains("Trident")); } static void assertUserAgentForURLHasLinuxPlatformQuirk(const char* url) @@ -75,19 +61,6 @@ EXPECT_TRUE(uaString.contains("Linux")); EXPECT_FALSE(uaString.contains("Macintosh")); EXPECT_FALSE(uaString.contains("Mac OS X")); - EXPECT_FALSE(uaString.contains("Windows")); - EXPECT_FALSE(uaString.contains("Chrome")); - EXPECT_FALSE(uaString.contains("FreeBSD")); -} - -static void assertUserAgentForURLHasWindowsPlatformQuirk(const char* url) -{ - String uaString = standardUserAgentForURL(URL({ }, url)); - - EXPECT_FALSE(uaString.contains("Macintosh")); - EXPECT_FALSE(uaString.contains("Mac OS X")); - EXPECT_FALSE(uaString.contains("Linux")); - EXPECT_TRUE(uaString.contains("Windows")); EXPECT_FALSE(uaString.contains("Chrome")); EXPECT_FALSE(uaString.contains("FreeBSD")); } @@ -99,7 +72,6 @@ EXPECT_TRUE(uaString.contains("Macintosh")); EXPECT_TRUE(uaString.contains("Mac OS X")); EXPECT_FALSE(uaString.contains("Linux")); - EXPECT_FALSE(uaString.contains("Windows")); EXPECT_FALSE(uaString.contains("Chrome")); EXPECT_FALSE(uaString.contains("FreeBSD")); } @@ -120,17 +92,10 @@ assertUserAgentForURLHasChromeBrowserQuirk("http://typekit.net/"); assertUserAgentForURLHasChromeBrowserQuirk("http://auth.mayohr.com/"); assertUserAgentForURLHasChromeBrowserQuirk("http://bankofamerica.com/"); + assertUserAgentForURLHasChromeBrowserQuirk("http://docs.google.com/"); assertUserAgentForURLHasFirefoxBrowserQuirk("http://bugzilla.redhat.com/"); - assertUserAgentForURLHasInternetExplorerBrowserQuirk("http://accounts.youtube.com/"); - assertUserAgentForURLHasInternetExplorerBrowserQuirk("http://docs.google.com/"); - assertUserAgentForURLHasInternetExplorerBrowserQuirk("http://drive.google.com/"); - - assertUserAgentForURLHasWindowsPlatformQuirk("http://accounts.youtube.com/"); - assertUserAgentForURLHasWindowsPlatformQuirk("http://docs.google.com/"); - assertUserAgentForURLHasWindowsPlatformQuirk("http://drive.google.com/"); - assertUserAgentForURLHasLinuxPlatformQuirk("http://www.google.com/"); assertUserAgentForURLHasLinuxPlatformQuirk("http://www.google.es/"); assertUserAgentForURLHasLinuxPlatformQuirk("http://calendar.google.com/"); diff -Nru webkit2gtk-2.30.5/debian/changelog webkit2gtk-2.30.6/debian/changelog --- webkit2gtk-2.30.5/debian/changelog 2021-02-17 10:07:36.000000000 +0000 +++ webkit2gtk-2.30.6/debian/changelog 2021-03-26 10:56:39.000000000 +0000 @@ -1,6 +1,11 @@ -webkit2gtk (2.30.5-1~deb10u1) buster-security; urgency=medium +webkit2gtk (2.30.6-1~deb10u1) buster-security; urgency=medium * Rebuild for buster-security. + * The WebKitGTK security advisory WSA-2021-0002 lists the following + security fixes in the latest versions of WebKitGTK: + + CVE-2020-9947 (fixed in 2.30.0). + + CVE-2020-27918, CVE-2020-29623, CVE-2021-1765, CVE-2021-1789, + CVE-2021-1799, CVE-2021-1801, CVE-2021-1870 (fixed in 2.30.6). * debian/patches/force-single-process.patch: + Force the single-process mode in Evolution and Geary * debian/control: @@ -10,7 +15,18 @@ + Switch build dependencies on libgl-dev and libgles-dev with libgl1-mesa-dev and libgles2-mesa-dev. - -- Alberto Garcia Wed, 17 Feb 2021 11:07:36 +0100 + -- Alberto Garcia Fri, 26 Mar 2021 11:56:39 +0100 + +webkit2gtk (2.30.6-1) unstable; urgency=high + + * New upstream release. + * debian/control: + + Remove references to browser-plugin-freshplayer-pepperflash, this + package is no longer available, see #966474. + * debian/patches/include-libwpe.patch: + + Fix build with wpebackend-fdo 1.8.1. + + -- Alberto Garcia Thu, 18 Mar 2021 16:05:45 +0100 webkit2gtk (2.30.5-1) unstable; urgency=high diff -Nru webkit2gtk-2.30.5/debian/control webkit2gtk-2.30.6/debian/control --- webkit2gtk-2.30.5/debian/control 2021-02-17 10:07:36.000000000 +0000 +++ webkit2gtk-2.30.6/debian/control 2021-03-26 10:56:39.000000000 +0000 @@ -238,13 +238,10 @@ Architecture: all Multi-Arch: foreign Depends: ${misc:Depends} -Suggests: browser-plugin-freshplayer-pepperflash Description: Transitional dummy package This is a transitional dummy package, it can be safely removed. . - WebKitGTK no longer supports plugins that depend on GTK 2. If you - still need to use the Adobe Flash Player then you can install - browser-plugin-freshplayer-pepperflash. + WebKitGTK no longer supports plugins that depend on GTK 2. Package: webkit2gtk-driver Architecture: linux-any diff -Nru webkit2gtk-2.30.5/debian/patches/include-libwpe.patch webkit2gtk-2.30.6/debian/patches/include-libwpe.patch --- webkit2gtk-2.30.5/debian/patches/include-libwpe.patch 1970-01-01 00:00:00.000000000 +0000 +++ webkit2gtk-2.30.6/debian/patches/include-libwpe.patch 2021-03-26 10:56:39.000000000 +0000 @@ -0,0 +1,27 @@ +From: Carlos Garcia Campos +Subject: Fix build with wpebackend-fdo 1.8.1 +Origin: https://trac.webkit.org/changeset/273376 +Index: webkitgtk/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp +=================================================================== +--- webkitgtk.orig/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp ++++ webkitgtk/Source/WebKit/UIProcess/API/glib/WebKitProtocolHandler.cpp +@@ -42,6 +42,7 @@ + #include + + #if PLATFORM(WAYLAND) && USE(WPE_RENDERER) ++#include + #include + #endif + #endif +Index: webkitgtk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp +=================================================================== +--- webkitgtk.orig/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp ++++ webkitgtk/Source/WebKit/UIProcess/gtk/AcceleratedBackingStoreWayland.cpp +@@ -50,6 +50,7 @@ + #endif + + #if USE(WPE_RENDERER) ++#include + #include + #if WPE_FDO_CHECK_VERSION(1, 7, 0) + #include diff -Nru webkit2gtk-2.30.5/debian/patches/series webkit2gtk-2.30.6/debian/patches/series --- webkit2gtk-2.30.5/debian/patches/series 2021-02-17 10:07:36.000000000 +0000 +++ webkit2gtk-2.30.6/debian/patches/series 2021-03-26 10:56:39.000000000 +0000 @@ -6,4 +6,5 @@ dont-detect-sse2.patch reduce-memory-overheads.patch fix-mips-page-size.patch +include-libwpe.patch force-single-process.patch