summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Playfair Cal2020-04-18 15:20:52 +1000
committerDaniel Playfair Cal2020-04-18 15:20:52 +1000
commit3c679f036143146ee23ce19a6fba7b3da1c406dc (patch)
tree801c6af7a3ccc13ffb22015e4a21b38637088830
parentd60157861037f70068f0b8c8a7427b8040230160 (diff)
parent6e1ddc6cbfee92bbe7eb99f0a60456e6137976a8 (diff)
downloadaur-3c679f036143146ee23ce19a6fba7b3da1c406dc.tar.gz
Merge branch 'dev' into beta
-rw-r--r--.SRCINFO28
-rw-r--r--0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch515
-rw-r--r--0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch595
-rw-r--r--0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch28
-rw-r--r--0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch60
-rw-r--r--0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch199
-rw-r--r--0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch244
-rw-r--r--0007-Add-missing-memory-header-in-trust_token_attribute_p.patch26
-rw-r--r--0008-Revert-FragmentItem-Two-fixes-for-outline.patch84
-rw-r--r--PKGBUILD50
-rw-r--r--rebuild-Linux-frame-button-cache-when-activation.patch62
-rw-r--r--rename-Relayout-in-DesktopWindowTreeHostPlatform.patch64
12 files changed, 1804 insertions, 151 deletions
diff --git a/.SRCINFO b/.SRCINFO
index f552ae4af1b2..4a949dff03ad 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = chromium-beta-ozone
pkgdesc = Chromium built with patches for wayland support via Ozone (beta channel)
- pkgver = 81.0.4044.91
+ pkgver = 83.0.4103.14
pkgrel = 1
url = https://www.chromium.org/Home
install = chromium.install
@@ -19,6 +19,7 @@ pkgbase = chromium-beta-ozone
makedepends = lld
makedepends = gn
makedepends = java-runtime-headless
+ makedepends = python2-setuptools
depends = gtk3
depends = nss
depends = alsa-lib
@@ -37,7 +38,6 @@ pkgbase = chromium-beta-ozone
depends = icu
depends = libxml2
depends = fontconfig
- depends = harfbuzz
depends = libvpx
depends = re2
depends = snappy
@@ -57,18 +57,30 @@ pkgbase = chromium-beta-ozone
conflicts = chromium
options = debug
options = !strip
- source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-81.0.4044.91.tar.xz
+ source = https://commondatastorage.googleapis.com/chromium-browser-official/chromium-83.0.4103.14.tar.xz
source = chromium-launcher-6.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v6.tar.gz
- source = rename-Relayout-in-DesktopWindowTreeHostPlatform.patch
- source = rebuild-Linux-frame-button-cache-when-activation.patch
source = chromium-widevine.patch
source = chromium-skia-harmony.patch
- sha256sums = cec9da1fe5c5a99e97e9ca29d0836b12239439ede40794e52a9a2fdef065d4ca
+ source = 0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch
+ source = 0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch
+ source = 0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch
+ source = 0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch
+ source = 0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch
+ source = 0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch
+ source = 0007-Add-missing-memory-header-in-trust_token_attribute_p.patch
+ source = 0008-Revert-FragmentItem-Two-fixes-for-outline.patch
+ sha256sums = 6e3d4853dcbd3c2375a1462a764102f6893c3b0505037e28c04bf90002e526e8
sha256sums = 04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1
- sha256sums = ae3bf107834bd8eda9a3ec7899fe35fde62e6111062e5def7d24bf49b53db3db
- sha256sums = 46f7fc9768730c460b27681ccf3dc2685c7e1fd22d70d3a82d9e57e3389bb014
sha256sums = 709e2fddba3c1f2ed4deb3a239fc0479bfa50c46e054e7f32db4fb1365fed070
sha256sums = 771292942c0901092a402cc60ee883877a99fb804cb54d568c8c6c94565a48e1
+ sha256sums = c53edc13ca335652608607e628284a79d91f5524d9b5e72a8f2d29b4d7618c75
+ sha256sums = cf27aa2a98bc71686e3e0f482b720d7d25017158ab2c7d93b548b3578c4b53e2
+ sha256sums = 9f2211edf347d54b8167a3b9d773e38aeabce5f98fb1932e7db1aeec845579f6
+ sha256sums = 5db92d614aba64e9eb684f35e06f36786b74d5a1456308d4d40a65f12e32f62b
+ sha256sums = 52b0129ac7db760078087a2839e257183f10df8e9f831ec07e6cfc8f5ba455eb
+ sha256sums = 2b594ff5bc731897274027ddb79a77d247a52ef0990d574ec815b36082ac093a
+ sha256sums = 91cc1ac6cd6568de8c45a3fb3c6b57fa9ea6e6ae6f2a05f1ff82677d0cdbdedb
+ sha256sums = 771b862e16ff42e0d43d6f0f5fd49d65210732bb0ae19cc4ea18c2220b4cb041
pkgname = chromium-beta-ozone
diff --git a/0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch b/0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch
new file mode 100644
index 000000000000..4f94b9cabbe8
--- /dev/null
+++ b/0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch
@@ -0,0 +1,515 @@
+From 806760e32fbde130c2ddbdd81a1838e02f2e9d59 Mon Sep 17 00:00:00 2001
+From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com>
+Date: Fri, 17 Apr 2020 00:37:18 +1000
+Subject: [PATCH 1/8] Revert "[RTCInsertableStreams] Make RTCEncodedAudioFrame
+ serializable"
+
+This reverts commit 7415e4fb52b66c115395e0b08eb79c7d10326130.
+---
+ .../core/v8/serialization/serialization_tag.h | 1 -
+ ...8_script_value_deserializer_for_modules.cc | 28 --------
+ ...v8_script_value_deserializer_for_modules.h | 2 -
+ .../v8_script_value_serializer_for_modules.cc | 28 --------
+ .../v8_script_value_serializer_for_modules.h | 2 -
+ .../renderer/modules/peerconnection/BUILD.gn | 2 -
+ .../peerconnection/rtc_encoded_audio_frame.cc | 51 +++++--------
+ .../peerconnection/rtc_encoded_audio_frame.h | 16 ++---
+ .../rtc_encoded_audio_frame_delegate.cc | 68 ------------------
+ .../rtc_encoded_audio_frame_delegate.h | 72 -------------------
+ .../rtc_encoded_audio_underlying_sink.cc | 3 +-
+ 11 files changed, 24 insertions(+), 249 deletions(-)
+ delete mode 100644 third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.cc
+ delete mode 100644 third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h
+
+diff --git a/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h b/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h
+index a0eaa09214de..cce273938fc2 100644
+--- a/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h
++++ b/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h
+@@ -102,7 +102,6 @@ enum SerializationTag {
+ // namedCurve:uint32_t
+ kRTCCertificateTag = 'k', // length:uint32_t, pemPrivateKey:WebCoreString,
+ // pemCertificate:WebCoreString
+- kRTCEncodedAudioFrameTag = 'A', // uint32_t -> transferred audio frame ID
+ kRTCEncodedVideoFrameTag = 'V', // uint32_t -> transferred video frame ID
+
+ // The following tags were used by the Shape Detection API implementation
+diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc
+index 7b07f6283073..684d40f0cee8 100644
+--- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc
++++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc
+@@ -18,8 +18,6 @@
+ #include "third_party/blink/renderer/modules/native_file_system/native_file_system_file_handle.h"
+ #include "third_party/blink/renderer/modules/peerconnection/rtc_certificate.h"
+ #include "third_party/blink/renderer/modules/peerconnection/rtc_certificate_generator.h"
+-#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h"
+-#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h"
+ #include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h"
+ #include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h"
+
+@@ -69,8 +67,6 @@ ScriptWrappable* V8ScriptValueDeserializerForModules::ReadDOMObject(
+ return nullptr;
+ return MakeGarbageCollected<RTCCertificate>(std::move(certificate));
+ }
+- case kRTCEncodedAudioFrameTag:
+- return ReadRTCEncodedAudioFrame();
+ case kRTCEncodedVideoFrameTag:
+ return ReadRTCEncodedVideoFrame();
+ default:
+@@ -377,30 +373,6 @@ V8ScriptValueDeserializerForModules::ReadNativeFileSystemHandle(
+ }
+ }
+
+-RTCEncodedAudioFrame*
+-V8ScriptValueDeserializerForModules::ReadRTCEncodedAudioFrame() {
+- if (!RuntimeEnabledFeatures::RTCInsertableStreamsEnabled(
+- ExecutionContext::From(GetScriptState()))) {
+- return nullptr;
+- }
+-
+- uint32_t index;
+- if (!ReadUint32(&index))
+- return nullptr;
+-
+- const auto* attachment =
+- GetSerializedScriptValue()
+- ->GetAttachmentIfExists<RTCEncodedAudioFramesAttachment>();
+- if (!attachment)
+- return nullptr;
+-
+- const auto& frames = attachment->EncodedAudioFrames();
+- if (index >= frames.size())
+- return nullptr;
+-
+- return MakeGarbageCollected<RTCEncodedAudioFrame>(frames[index]);
+-}
+-
+ RTCEncodedVideoFrame*
+ V8ScriptValueDeserializerForModules::ReadRTCEncodedVideoFrame() {
+ if (!RuntimeEnabledFeatures::RTCInsertableStreamsEnabled(
+diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h
+index fd08855f9bea..410fe5098096 100644
+--- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h
++++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h
+@@ -12,7 +12,6 @@ namespace blink {
+
+ class CryptoKey;
+ class NativeFileSystemHandle;
+-class RTCEncodedAudioFrame;
+ class RTCEncodedVideoFrame;
+
+ // Extends V8ScriptValueSerializer with support for modules/ types.
+@@ -46,7 +45,6 @@ class MODULES_EXPORT V8ScriptValueDeserializerForModules final
+ }
+ CryptoKey* ReadCryptoKey();
+ NativeFileSystemHandle* ReadNativeFileSystemHandle(SerializationTag tag);
+- RTCEncodedAudioFrame* ReadRTCEncodedAudioFrame();
+ RTCEncodedVideoFrame* ReadRTCEncodedVideoFrame();
+ };
+
+diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
+index 2e88d05de51c..6811770537b9 100644
+--- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
++++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
+@@ -18,10 +18,7 @@
+ #include "third_party/blink/renderer/bindings/modules/v8/v8_landmark.h"
+ #include "third_party/blink/renderer/bindings/modules/v8/v8_point_2d.h"
+ #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_certificate.h"
+-#include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_encoded_audio_frame.h"
+ #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_encoded_video_frame.h"
+-#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h"
+-#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h"
+ #include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h"
+ #include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h"
+ #include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
+@@ -80,17 +77,6 @@ bool V8ScriptValueSerializerForModules::WriteDOMObject(
+ WriteUTF8String(pem.certificate().c_str());
+ return true;
+ }
+- if (wrapper_type_info == V8RTCEncodedAudioFrame::GetWrapperTypeInfo() &&
+- RuntimeEnabledFeatures::RTCInsertableStreamsEnabled(
+- ExecutionContext::From(GetScriptState()))) {
+- if (IsForStorage()) {
+- exception_state.ThrowDOMException(DOMExceptionCode::kDataCloneError,
+- "An RTCEncodedAudioFrame cannot be "
+- "serialized for storage.");
+- return false;
+- }
+- return WriteRTCEncodedAudioFrame(wrappable->ToImpl<RTCEncodedAudioFrame>());
+- }
+ if (wrapper_type_info == V8RTCEncodedVideoFrame::GetWrapperTypeInfo() &&
+ RuntimeEnabledFeatures::RTCInsertableStreamsEnabled(
+ ExecutionContext::From(GetScriptState()))) {
+@@ -300,20 +286,6 @@ bool V8ScriptValueSerializerForModules::WriteNativeFileSystemHandle(
+ return true;
+ }
+
+-bool V8ScriptValueSerializerForModules::WriteRTCEncodedAudioFrame(
+- RTCEncodedAudioFrame* audio_frame) {
+- auto* attachment =
+- GetSerializedScriptValue()
+- ->GetOrCreateAttachment<RTCEncodedAudioFramesAttachment>();
+- auto& frames = attachment->EncodedAudioFrames();
+- frames.push_back(audio_frame->Delegate());
+- const uint32_t index = static_cast<uint32_t>(frames.size() - 1);
+-
+- WriteTag(kRTCEncodedAudioFrameTag);
+- WriteUint32(index);
+- return true;
+-}
+-
+ bool V8ScriptValueSerializerForModules::WriteRTCEncodedVideoFrame(
+ RTCEncodedVideoFrame* video_frame) {
+ auto* attachment =
+diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h
+index eda1434b359f..10ac32ca4f69 100644
+--- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h
++++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h
+@@ -12,7 +12,6 @@
+ namespace blink {
+
+ class NativeFileSystemHandle;
+-class RTCEncodedAudioFrame;
+ class RTCEncodedVideoFrame;
+ class WebCryptoKey;
+
+@@ -34,7 +33,6 @@ class MODULES_EXPORT V8ScriptValueSerializerForModules final
+ bool WriteNativeFileSystemHandle(
+ SerializationTag tag,
+ NativeFileSystemHandle* native_file_system_handle);
+- bool WriteRTCEncodedAudioFrame(RTCEncodedAudioFrame*);
+ bool WriteRTCEncodedVideoFrame(RTCEncodedVideoFrame*);
+ };
+
+diff --git a/third_party/blink/renderer/modules/peerconnection/BUILD.gn b/third_party/blink/renderer/modules/peerconnection/BUILD.gn
+index 27fe410a7319..4f9144ed30e0 100644
+--- a/third_party/blink/renderer/modules/peerconnection/BUILD.gn
++++ b/third_party/blink/renderer/modules/peerconnection/BUILD.gn
+@@ -78,8 +78,6 @@ blink_modules_sources("peerconnection") {
+ "rtc_dtmf_tone_change_event.h",
+ "rtc_encoded_audio_frame.cc",
+ "rtc_encoded_audio_frame.h",
+- "rtc_encoded_audio_frame_delegate.cc",
+- "rtc_encoded_audio_frame_delegate.h",
+ "rtc_encoded_audio_underlying_sink.cc",
+ "rtc_encoded_audio_underlying_sink.h",
+ "rtc_encoded_audio_underlying_source.cc",
+diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.cc
+index 6dbaa7fedf78..208b4bff2eb2 100644
+--- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.cc
++++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.cc
+@@ -4,10 +4,7 @@
+
+ #include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h"
+
+-#include <utility>
+-
+ #include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h"
+-#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h"
+ #include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
+ #include "third_party/webrtc/api/frame_transformer_interface.h"
+
+@@ -15,37 +12,30 @@ namespace blink {
+
+ RTCEncodedAudioFrame::RTCEncodedAudioFrame(
+ std::unique_ptr<webrtc::TransformableFrameInterface> webrtc_frame)
+- : delegate_(base::MakeRefCounted<RTCEncodedAudioFrameDelegate>(
+- std::move(webrtc_frame),
+- Vector<uint32_t>())) {}
++ : webrtc_frame_(std::move(webrtc_frame)) {}
+
+ RTCEncodedAudioFrame::RTCEncodedAudioFrame(
+ std::unique_ptr<webrtc::TransformableAudioFrameInterface>
+ webrtc_audio_frame) {
+- Vector<uint32_t> contributing_sources;
+ if (webrtc_audio_frame) {
+ wtf_size_t num_csrcs = webrtc_audio_frame->GetHeader().numCSRCs;
+- contributing_sources.ReserveInitialCapacity(num_csrcs);
++ contributing_sources_.ReserveInitialCapacity(num_csrcs);
+ for (wtf_size_t i = 0; i < num_csrcs; i++) {
+- contributing_sources.push_back(
++ contributing_sources_.push_back(
+ webrtc_audio_frame->GetHeader().arrOfCSRCs[i]);
+ }
+ }
+- delegate_ = base::MakeRefCounted<RTCEncodedAudioFrameDelegate>(
+- std::move(webrtc_audio_frame), std::move(contributing_sources));
++ webrtc_frame_ = std::move(webrtc_audio_frame);
+ }
+
+-RTCEncodedAudioFrame::RTCEncodedAudioFrame(
+- scoped_refptr<RTCEncodedAudioFrameDelegate> delegate)
+- : delegate_(std::move(delegate)) {}
+-
+ uint64_t RTCEncodedAudioFrame::timestamp() const {
+- return delegate_->Timestamp();
++ return webrtc_frame_ ? webrtc_frame_->GetTimestamp() : 0;
+ }
+
+ DOMArrayBuffer* RTCEncodedAudioFrame::data() const {
+- if (!frame_data_) {
+- frame_data_ = delegate_->CreateDataBuffer();
++ if (webrtc_frame_ && !frame_data_) {
++ frame_data_ = DOMArrayBuffer::Create(webrtc_frame_->GetData().data(),
++ webrtc_frame_->GetData().size());
+ }
+ return frame_data_;
+ }
+@@ -59,11 +49,11 @@ void RTCEncodedAudioFrame::setData(DOMArrayBuffer* data) {
+ }
+
+ uint32_t RTCEncodedAudioFrame::synchronizationSource() const {
+- return delegate_->Ssrc();
++ return webrtc_frame_ ? webrtc_frame_->GetSsrc() : 0;
+ }
+
+ Vector<uint32_t> RTCEncodedAudioFrame::contributingSources() const {
+- return delegate_->ContributingSources();
++ return webrtc_frame_ ? contributing_sources_ : Vector<uint32_t>();
+ }
+
+ String RTCEncodedAudioFrame::toString() const {
+@@ -76,20 +66,15 @@ String RTCEncodedAudioFrame::toString() const {
+ return sb.ToString();
+ }
+
+-void RTCEncodedAudioFrame::SyncDelegate() const {
+- delegate_->SetData(frame_data_);
+-}
+-
+-scoped_refptr<RTCEncodedAudioFrameDelegate> RTCEncodedAudioFrame::Delegate()
+- const {
+- SyncDelegate();
+- return delegate_;
+-}
+-
+ std::unique_ptr<webrtc::TransformableFrameInterface>
+-RTCEncodedAudioFrame::PassWebRtcFrame() {
+- SyncDelegate();
+- return delegate_->PassWebRtcFrame();
++RTCEncodedAudioFrame::PassDelegate() {
++ // Sync the delegate data with |frame_data_| if necessary.
++ if (webrtc_frame_ && frame_data_) {
++ webrtc_frame_->SetData(rtc::ArrayView<const uint8_t>(
++ static_cast<const uint8_t*>(frame_data_->Data()),
++ frame_data_->ByteLengthAsSizeT()));
++ }
++ return std::move(webrtc_frame_);
+ }
+
+ void RTCEncodedAudioFrame::Trace(Visitor* visitor) {
+diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h
+index 1e11e9ed04ee..7565e4b1ebc8 100644
+--- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h
++++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame.h
+@@ -20,7 +20,6 @@ class TransformableFrameInterface;
+ namespace blink {
+
+ class DOMArrayBuffer;
+-class RTCEncodedAudioFrameDelegate;
+
+ class MODULES_EXPORT RTCEncodedAudioFrame final : public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+@@ -30,8 +29,6 @@ class MODULES_EXPORT RTCEncodedAudioFrame final : public ScriptWrappable {
+ std::unique_ptr<webrtc::TransformableFrameInterface> webrtc_frame);
+ explicit RTCEncodedAudioFrame(
+ std::unique_ptr<webrtc::TransformableAudioFrameInterface> webrtc_frame);
+- explicit RTCEncodedAudioFrame(
+- scoped_refptr<RTCEncodedAudioFrameDelegate> delegate);
+
+ // rtc_encoded_audio_frame.idl implementation.
+ uint64_t timestamp() const;
+@@ -42,20 +39,17 @@ class MODULES_EXPORT RTCEncodedAudioFrame final : public ScriptWrappable {
+ Vector<uint32_t> contributingSources() const;
+ String toString() const;
+
+- scoped_refptr<RTCEncodedAudioFrameDelegate> Delegate() const;
+- void SyncDelegate() const;
+-
+ // Returns and transfers ownership of the internal WebRTC frame
+- // backing this RTCEncodedAudioFrame, neutering all RTCEncodedAudioFrames
+- // backed by that internal WebRTC frame.
+- std::unique_ptr<webrtc::TransformableFrameInterface> PassWebRtcFrame();
++ // backing this RTCEncodedVideoFrame, leaving the RTCEncodedVideoFrame
++ // without a delegate WebRTC frame.
++ std::unique_ptr<webrtc::TransformableFrameInterface> PassDelegate();
+
+ void Trace(Visitor*) override;
+
+ private:
+- scoped_refptr<RTCEncodedAudioFrameDelegate> delegate_;
+- Vector<uint32_t> contributing_sources_;
+ mutable Member<DOMArrayBuffer> frame_data_;
++ Vector<uint32_t> contributing_sources_;
++ std::unique_ptr<webrtc::TransformableFrameInterface> webrtc_frame_;
+ };
+
+ } // namespace blink
+diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.cc
+deleted file mode 100644
+index 2c71c02c5223..000000000000
+--- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.cc
++++ /dev/null
+@@ -1,68 +0,0 @@
+-// Copyright 2020 The Chromium Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style license that can be
+-// found in the LICENSE file.
+-
+-#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h"
+-
+-#include <utility>
+-
+-#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h"
+-
+-namespace blink {
+-
+-const void* RTCEncodedAudioFramesAttachment::kAttachmentKey;
+-
+-RTCEncodedAudioFrameDelegate::RTCEncodedAudioFrameDelegate(
+- std::unique_ptr<webrtc::TransformableFrameInterface> webrtc_frame,
+- Vector<uint32_t> contributing_sources)
+- : webrtc_frame_(std::move(webrtc_frame)),
+- contributing_sources_(std::move(contributing_sources)) {}
+-
+-uint64_t RTCEncodedAudioFrameDelegate::Timestamp() const {
+- MutexLocker lock(mutex_);
+- return webrtc_frame_ ? webrtc_frame_->GetTimestamp() : 0;
+-}
+-
+-DOMArrayBuffer* RTCEncodedAudioFrameDelegate::CreateDataBuffer() const {
+- ArrayBufferContents contents;
+- {
+- MutexLocker lock(mutex_);
+- if (!webrtc_frame_)
+- return nullptr;
+-
+- auto data = webrtc_frame_->GetData();
+- contents =
+- ArrayBufferContents(data.size(), 1, ArrayBufferContents::kNotShared,
+- ArrayBufferContents::kDontInitialize);
+- if (UNLIKELY(!contents.Data()))
+- OOM_CRASH(data.size());
+- memcpy(contents.Data(), data.data(), data.size());
+- }
+- return DOMArrayBuffer::Create(std::move(contents));
+-}
+-
+-void RTCEncodedAudioFrameDelegate::SetData(const DOMArrayBuffer* data) {
+- MutexLocker lock(mutex_);
+- if (webrtc_frame_ && data) {
+- webrtc_frame_->SetData(rtc::ArrayView<const uint8_t>(
+- static_cast<const uint8_t*>(data->Data()), data->ByteLengthAsSizeT()));
+- }
+-}
+-
+-uint32_t RTCEncodedAudioFrameDelegate::Ssrc() const {
+- MutexLocker lock(mutex_);
+- return webrtc_frame_ ? webrtc_frame_->GetSsrc() : 0;
+-}
+-
+-Vector<uint32_t> RTCEncodedAudioFrameDelegate::ContributingSources() const {
+- MutexLocker lock(mutex_);
+- return contributing_sources_;
+-}
+-
+-std::unique_ptr<webrtc::TransformableFrameInterface>
+-RTCEncodedAudioFrameDelegate::PassWebRtcFrame() {
+- MutexLocker lock(mutex_);
+- return std::move(webrtc_frame_);
+-}
+-
+-} // namespace blink
+diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h
+deleted file mode 100644
+index 90853ecfa325..000000000000
+--- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_frame_delegate.h
++++ /dev/null
+@@ -1,72 +0,0 @@
+-// Copyright 2020 The Chromium Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style license that can be
+-// found in the LICENSE file.
+-
+-#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_RTC_ENCODED_AUDIO_FRAME_DELEGATE_H_
+-#define THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_RTC_ENCODED_AUDIO_FRAME_DELEGATE_H_
+-
+-#include <stdint.h>
+-
+-#include <memory>
+-
+-#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h"
+-#include "third_party/blink/renderer/modules/modules_export.h"
+-#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"
+-#include "third_party/blink/renderer/platform/wtf/threading_primitives.h"
+-#include "third_party/webrtc/api/frame_transformer_interface.h"
+-
+-namespace blink {
+-
+-class DOMArrayBuffer;
+-
+-// This class wraps a WebRTC audio frame and allows making shallow
+-// copies. Its purpose is to support making RTCEncodedVideoFrames
+-// serializable in the same process.
+-class RTCEncodedAudioFrameDelegate
+- : public WTF::ThreadSafeRefCounted<RTCEncodedAudioFrameDelegate> {
+- public:
+- explicit RTCEncodedAudioFrameDelegate(
+- std::unique_ptr<webrtc::TransformableFrameInterface> webrtc_frame,
+- Vector<uint32_t> contributing_sources);
+-
+- uint64_t Timestamp() const;
+- DOMArrayBuffer* CreateDataBuffer() const;
+- void SetData(const DOMArrayBuffer* data);
+- uint32_t Ssrc() const;
+- Vector<uint32_t> ContributingSources() const;
+- std::unique_ptr<webrtc::TransformableFrameInterface> PassWebRtcFrame();
+-
+- private:
+- mutable Mutex mutex_;
+- std::unique_ptr<webrtc::TransformableFrameInterface> webrtc_frame_
+- GUARDED_BY(mutex_);
+- Vector<uint32_t> contributing_sources_;
+-};
+-
+-class MODULES_EXPORT RTCEncodedAudioFramesAttachment
+- : public SerializedScriptValue::Attachment {
+- public:
+- static const void* kAttachmentKey;
+- RTCEncodedAudioFramesAttachment() = default;
+- ~RTCEncodedAudioFramesAttachment() override = default;
+-
+- bool IsLockedToAgentCluster() const override {
+- return !encoded_audio_frames_.IsEmpty();
+- }
+-
+- Vector<scoped_refptr<RTCEncodedAudioFrameDelegate>>& EncodedAudioFrames() {
+- return encoded_audio_frames_;
+- }
+-
+- const Vector<scoped_refptr<RTCEncodedAudioFrameDelegate>>&
+- EncodedAudioFrames() const {
+- return encoded_audio_frames_;
+- }
+-
+- private:
+- Vector<scoped_refptr<RTCEncodedAudioFrameDelegate>> encoded_audio_frames_;
+-};
+-
+-} // namespace blink
+-
+-#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_RTC_ENCODED_AUDIO_FRAME_DELEGATE_H_
+diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_underlying_sink.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_underlying_sink.cc
+index c0e5fa9c6f44..2635b6348029 100644
+--- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_underlying_sink.cc
++++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_audio_underlying_sink.cc
+@@ -48,8 +48,7 @@ ScriptPromise RTCEncodedAudioUnderlyingSink::write(
+ return ScriptPromise();
+ }
+
+- transformer_callback_.Run()->SendFrameToSink(
+- encoded_frame->PassWebRtcFrame());
++ transformer_callback_.Run()->SendFrameToSink(encoded_frame->PassDelegate());
+ return ScriptPromise::CastUndefined(script_state);
+ }
+
+--
+2.26.1
+
diff --git a/0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch b/0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch
new file mode 100644
index 000000000000..18bff6ecd5f8
--- /dev/null
+++ b/0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch
@@ -0,0 +1,595 @@
+From 23bf04c1127da00d17bfa72794602e59b484ae76 Mon Sep 17 00:00:00 2001
+From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com>
+Date: Fri, 17 Apr 2020 00:41:46 +1000
+Subject: [PATCH 2/8] Revert "[RTCInsertableStreams] Make RTCEncodedVideoFrame
+ serializable"
+
+This reverts commit 283079bc066cc19c0d0d186500697ca95ca03c3f.
+---
+ .../core/v8/serialization/serialization_tag.h | 1 -
+ .../serialization/serialized_script_value.h | 31 +------
+ ...8_script_value_deserializer_for_modules.cc | 28 ------
+ ...v8_script_value_deserializer_for_modules.h | 2 -
+ .../v8_script_value_serializer_for_modules.cc | 28 ------
+ .../v8_script_value_serializer_for_modules.h | 2 -
+ .../renderer/modules/peerconnection/BUILD.gn | 2 -
+ .../peerconnection/rtc_encoded_video_frame.cc | 54 +++++------
+ .../peerconnection/rtc_encoded_video_frame.h | 19 ++--
+ .../rtc_encoded_video_frame_delegate.cc | 89 -------------------
+ .../rtc_encoded_video_frame_delegate.h | 72 ---------------
+ .../rtc_encoded_video_underlying_sink.cc | 3 +-
+ .../rtc_encoded_video_underlying_sink_test.cc | 2 +-
+ 13 files changed, 34 insertions(+), 299 deletions(-)
+ delete mode 100644 third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.cc
+ delete mode 100644 third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h
+
+diff --git a/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h b/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h
+index cce273938fc2..05e37ce90847 100644
+--- a/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h
++++ b/third_party/blink/renderer/bindings/core/v8/serialization/serialization_tag.h
+@@ -102,7 +102,6 @@ enum SerializationTag {
+ // namedCurve:uint32_t
+ kRTCCertificateTag = 'k', // length:uint32_t, pemPrivateKey:WebCoreString,
+ // pemCertificate:WebCoreString
+- kRTCEncodedVideoFrameTag = 'V', // uint32_t -> transferred video frame ID
+
+ // The following tags were used by the Shape Detection API implementation
+ // between M71 and M81. During these milestones, the API was always behind
+diff --git a/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h b/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h
+index bbf10ef3135b..1a80aa3b2356 100644
+--- a/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h
++++ b/third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h
+@@ -269,41 +269,13 @@ class CORE_EXPORT SerializedScriptValue
+
+ bool IsLockedToAgentCluster() const {
+ return !wasm_modules_.IsEmpty() ||
+- !shared_array_buffers_contents_.IsEmpty() ||
+- std::any_of(attachments_.begin(), attachments_.end(),
+- [](const auto& entry) {
+- return entry.value->IsLockedToAgentCluster();
+- });
++ !shared_array_buffers_contents_.IsEmpty();
+ }
+
+ // Returns true after serializing script values that remote origins cannot
+ // access.
+ bool IsOriginCheckRequired() const;
+
+- // Derive from Attachments to define collections of objects to serialize in
+- // modules. They can be registered using GetOrCreateAttachment().
+- class Attachment {
+- public:
+- virtual ~Attachment() = default;
+- virtual bool IsLockedToAgentCluster() const = 0;
+- };
+-
+- template <typename T>
+- T* GetOrCreateAttachment() {
+- auto result = attachments_.insert(&T::kAttachmentKey, std::unique_ptr<T>());
+- if (!result.stored_value->value)
+- result.stored_value->value = std::make_unique<T>();
+- return static_cast<T*>(result.stored_value->value.get());
+- }
+-
+- template <typename T>
+- const T* GetAttachmentIfExists() const {
+- auto it = attachments_.find(&T::kAttachmentKey);
+- if (it == attachments_.end())
+- return nullptr;
+- return static_cast<T*>(it->value.get());
+- }
+-
+ private:
+ friend class ScriptValueSerializer;
+ friend class V8ScriptValueSerializer;
+@@ -372,7 +344,6 @@ class CORE_EXPORT SerializedScriptValue
+ MojoScopedHandleArray mojo_handles_;
+ SharedArrayBufferContentsArray shared_array_buffers_contents_;
+ NativeFileSystemTokensArray native_file_system_tokens_;
+- HashMap<const void* const*, std::unique_ptr<Attachment>> attachments_;
+
+ bool has_registered_external_allocation_;
+ #if DCHECK_IS_ON()
+diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc
+index 684d40f0cee8..b5f07e85b7b2 100644
+--- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc
++++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.cc
+@@ -18,8 +18,6 @@
+ #include "third_party/blink/renderer/modules/native_file_system/native_file_system_file_handle.h"
+ #include "third_party/blink/renderer/modules/peerconnection/rtc_certificate.h"
+ #include "third_party/blink/renderer/modules/peerconnection/rtc_certificate_generator.h"
+-#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h"
+-#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h"
+
+ namespace blink {
+
+@@ -67,8 +65,6 @@ ScriptWrappable* V8ScriptValueDeserializerForModules::ReadDOMObject(
+ return nullptr;
+ return MakeGarbageCollected<RTCCertificate>(std::move(certificate));
+ }
+- case kRTCEncodedVideoFrameTag:
+- return ReadRTCEncodedVideoFrame();
+ default:
+ break;
+ }
+@@ -373,28 +369,4 @@ V8ScriptValueDeserializerForModules::ReadNativeFileSystemHandle(
+ }
+ }
+
+-RTCEncodedVideoFrame*
+-V8ScriptValueDeserializerForModules::ReadRTCEncodedVideoFrame() {
+- if (!RuntimeEnabledFeatures::RTCInsertableStreamsEnabled(
+- ExecutionContext::From(GetScriptState()))) {
+- return nullptr;
+- }
+-
+- uint32_t index;
+- if (!ReadUint32(&index))
+- return nullptr;
+-
+- const auto* attachment =
+- GetSerializedScriptValue()
+- ->GetAttachmentIfExists<RTCEncodedVideoFramesAttachment>();
+- if (!attachment)
+- return nullptr;
+-
+- const auto& frames = attachment->EncodedVideoFrames();
+- if (index >= frames.size())
+- return nullptr;
+-
+- return MakeGarbageCollected<RTCEncodedVideoFrame>(frames[index]);
+-}
+-
+ } // namespace blink
+diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h
+index 410fe5098096..15e5d35547b6 100644
+--- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h
++++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_deserializer_for_modules.h
+@@ -12,7 +12,6 @@ namespace blink {
+
+ class CryptoKey;
+ class NativeFileSystemHandle;
+-class RTCEncodedVideoFrame;
+
+ // Extends V8ScriptValueSerializer with support for modules/ types.
+ class MODULES_EXPORT V8ScriptValueDeserializerForModules final
+@@ -45,7 +44,6 @@ class MODULES_EXPORT V8ScriptValueDeserializerForModules final
+ }
+ CryptoKey* ReadCryptoKey();
+ NativeFileSystemHandle* ReadNativeFileSystemHandle(SerializationTag tag);
+- RTCEncodedVideoFrame* ReadRTCEncodedVideoFrame();
+ };
+
+ } // namespace blink
+diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
+index 6811770537b9..6f017cdd3eca 100644
+--- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
++++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.cc
+@@ -18,9 +18,6 @@
+ #include "third_party/blink/renderer/bindings/modules/v8/v8_landmark.h"
+ #include "third_party/blink/renderer/bindings/modules/v8/v8_point_2d.h"
+ #include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_certificate.h"
+-#include "third_party/blink/renderer/bindings/modules/v8/v8_rtc_encoded_video_frame.h"
+-#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h"
+-#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h"
+ #include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
+
+ namespace blink {
+@@ -77,17 +74,6 @@ bool V8ScriptValueSerializerForModules::WriteDOMObject(
+ WriteUTF8String(pem.certificate().c_str());
+ return true;
+ }
+- if (wrapper_type_info == V8RTCEncodedVideoFrame::GetWrapperTypeInfo() &&
+- RuntimeEnabledFeatures::RTCInsertableStreamsEnabled(
+- ExecutionContext::From(GetScriptState()))) {
+- if (IsForStorage()) {
+- exception_state.ThrowDOMException(DOMExceptionCode::kDataCloneError,
+- "An RTCEncodedVideoFrame cannot be "
+- "serialized for storage.");
+- return false;
+- }
+- return WriteRTCEncodedVideoFrame(wrappable->ToImpl<RTCEncodedVideoFrame>());
+- }
+ return false;
+ }
+
+@@ -286,18 +272,4 @@ bool V8ScriptValueSerializerForModules::WriteNativeFileSystemHandle(
+ return true;
+ }
+
+-bool V8ScriptValueSerializerForModules::WriteRTCEncodedVideoFrame(
+- RTCEncodedVideoFrame* video_frame) {
+- auto* attachment =
+- GetSerializedScriptValue()
+- ->GetOrCreateAttachment<RTCEncodedVideoFramesAttachment>();
+- auto& frames = attachment->EncodedVideoFrames();
+- frames.push_back(video_frame->Delegate());
+- const uint32_t index = static_cast<uint32_t>(frames.size() - 1);
+-
+- WriteTag(kRTCEncodedVideoFrameTag);
+- WriteUint32(index);
+- return true;
+-}
+-
+ } // namespace blink
+diff --git a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h
+index 10ac32ca4f69..6405202e0cb0 100644
+--- a/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h
++++ b/third_party/blink/renderer/bindings/modules/v8/serialization/v8_script_value_serializer_for_modules.h
+@@ -12,7 +12,6 @@
+ namespace blink {
+
+ class NativeFileSystemHandle;
+-class RTCEncodedVideoFrame;
+ class WebCryptoKey;
+
+ // Extends V8ScriptValueSerializer with support for modules/ types.
+@@ -33,7 +32,6 @@ class MODULES_EXPORT V8ScriptValueSerializerForModules final
+ bool WriteNativeFileSystemHandle(
+ SerializationTag tag,
+ NativeFileSystemHandle* native_file_system_handle);
+- bool WriteRTCEncodedVideoFrame(RTCEncodedVideoFrame*);
+ };
+
+ } // namespace blink
+diff --git a/third_party/blink/renderer/modules/peerconnection/BUILD.gn b/third_party/blink/renderer/modules/peerconnection/BUILD.gn
+index 4f9144ed30e0..5cf4876a3628 100644
+--- a/third_party/blink/renderer/modules/peerconnection/BUILD.gn
++++ b/third_party/blink/renderer/modules/peerconnection/BUILD.gn
+@@ -84,8 +84,6 @@ blink_modules_sources("peerconnection") {
+ "rtc_encoded_audio_underlying_source.h",
+ "rtc_encoded_video_frame.cc",
+ "rtc_encoded_video_frame.h",
+- "rtc_encoded_video_frame_delegate.cc",
+- "rtc_encoded_video_frame_delegate.h",
+ "rtc_encoded_video_underlying_sink.cc",
+ "rtc_encoded_video_underlying_sink.h",
+ "rtc_encoded_video_underlying_source.cc",
+diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.cc
+index 65593da51242..3f8676ddb290 100644
+--- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.cc
++++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.cc
+@@ -4,47 +4,46 @@
+
+ #include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h"
+
+-#include <utility>
+-
+ #include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h"
+-#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h"
+ #include "third_party/blink/renderer/platform/wtf/text/string_builder.h"
+ #include "third_party/webrtc/api/frame_transformer_interface.h"
+
+ namespace blink {
+
+ RTCEncodedVideoFrame::RTCEncodedVideoFrame(
+- std::unique_ptr<webrtc::TransformableVideoFrameInterface> webrtc_frame)
+- : delegate_(base::MakeRefCounted<RTCEncodedVideoFrameDelegate>(
+- std::move(webrtc_frame))) {}
+-
+-RTCEncodedVideoFrame::RTCEncodedVideoFrame(
+- scoped_refptr<RTCEncodedVideoFrameDelegate> delegate)
++ std::unique_ptr<webrtc::TransformableVideoFrameInterface> delegate)
+ : delegate_(std::move(delegate)) {}
+
+ String RTCEncodedVideoFrame::type() const {
+- return delegate_->Type();
++ if (!delegate_)
++ return "empty";
++
++ return delegate_->IsKeyFrame() ? "key" : "delta";
+ }
+
+ uint64_t RTCEncodedVideoFrame::timestamp() const {
+- return delegate_->Timestamp();
++ return delegate_ ? delegate_->GetTimestamp() : 0;
+ }
+
+ DOMArrayBuffer* RTCEncodedVideoFrame::data() const {
+- if (!frame_data_)
+- frame_data_ = delegate_->CreateDataBuffer();
++ if (delegate_ && !frame_data_) {
++ frame_data_ = DOMArrayBuffer::Create(delegate_->GetData().data(),
++ delegate_->GetData().size());
++ }
+ return frame_data_;
+ }
+
+ DOMArrayBuffer* RTCEncodedVideoFrame::additionalData() const {
+- if (!additional_data_)
+- additional_data_ = delegate_->CreateAdditionalDataBuffer();
+-
++ if (delegate_ && !additional_data_) {
++ auto additional_data = delegate_->GetAdditionalData();
++ additional_data_ =
++ DOMArrayBuffer::Create(additional_data.data(), additional_data.size());
++ }
+ return additional_data_;
+ }
+
+ uint32_t RTCEncodedVideoFrame::synchronizationSource() const {
+- return delegate_->Ssrc();
++ return delegate_ ? delegate_->GetSsrc() : 0;
+ }
+
+ void RTCEncodedVideoFrame::setData(DOMArrayBuffer* data) {
+@@ -66,20 +65,15 @@ String RTCEncodedVideoFrame::toString() const {
+ return sb.ToString();
+ }
+
+-void RTCEncodedVideoFrame::SyncDelegate() const {
+- delegate_->SetData(frame_data_);
+-}
+-
+-scoped_refptr<RTCEncodedVideoFrameDelegate> RTCEncodedVideoFrame::Delegate()
+- const {
+- SyncDelegate();
+- return delegate_;
+-}
+-
+ std::unique_ptr<webrtc::TransformableVideoFrameInterface>
+-RTCEncodedVideoFrame::PassWebRtcFrame() {
+- SyncDelegate();
+- return delegate_->PassWebRtcFrame();
++RTCEncodedVideoFrame::PassDelegate() {
++ // Sync the delegate data with |frame_data_| if necessary.
++ if (delegate_ && frame_data_) {
++ delegate_->SetData(rtc::ArrayView<const uint8_t>(
++ static_cast<const uint8_t*>(frame_data_->Data()),
++ frame_data_->ByteLengthAsSizeT()));
++ }
++ return std::move(delegate_);
+ }
+
+ void RTCEncodedVideoFrame::Trace(Visitor* visitor) {
+diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h
+index 5e13b07e9c14..67024c262e6e 100644
+--- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h
++++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame.h
+@@ -20,16 +20,13 @@ class TransformableVideoFrameInterface;
+ namespace blink {
+
+ class DOMArrayBuffer;
+-class RTCEncodedVideoFrameDelegate;
+
+ class MODULES_EXPORT RTCEncodedVideoFrame final : public ScriptWrappable {
+ DEFINE_WRAPPERTYPEINFO();
+
+ public:
+ explicit RTCEncodedVideoFrame(
+- std::unique_ptr<webrtc::TransformableVideoFrameInterface> webrtc_frame);
+- explicit RTCEncodedVideoFrame(
+- scoped_refptr<RTCEncodedVideoFrameDelegate> delegate);
++ std::unique_ptr<webrtc::TransformableVideoFrameInterface> delegate);
+
+ // rtc_encoded_video_frame.idl implementation.
+ String type() const;
+@@ -41,19 +38,17 @@ class MODULES_EXPORT RTCEncodedVideoFrame final : public ScriptWrappable {
+ uint32_t synchronizationSource() const;
+ String toString() const;
+
+- scoped_refptr<RTCEncodedVideoFrameDelegate> Delegate() const;
+- void SyncDelegate() const;
+-
++ // Internal API
++ bool HasDelegate() { return !!delegate_; }
+ // Returns and transfers ownership of the internal WebRTC frame
+- // backing this RTCEncodedVideoFrame, neutering all RTCEncodedVideoFrames
+- // backed by that internal WebRTC frame.
+- std::unique_ptr<webrtc::TransformableVideoFrameInterface> PassWebRtcFrame();
++ // backing this RTCEncodedVideoFrame, leaving the RTCEncodedVideoFrame
++ // without a delegate WebRTC frame.
++ std::unique_ptr<webrtc::TransformableVideoFrameInterface> PassDelegate();
+
+ void Trace(Visitor*) override;
+
+ private:
+- const scoped_refptr<RTCEncodedVideoFrameDelegate> delegate_;
+-
++ std::unique_ptr<webrtc::TransformableVideoFrameInterface> delegate_;
+ // Exposes encoded frame data from |delegate_|.
+ mutable Member<DOMArrayBuffer> frame_data_;
+ // Exposes additional data from |delegate_|.
+diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.cc
+deleted file mode 100644
+index 6d2de5b2b773..000000000000
+--- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.cc
++++ /dev/null
+@@ -1,89 +0,0 @@
+-// Copyright 2020 The Chromium Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style license that can be
+-// found in the LICENSE file.
+-
+-#include "third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h"
+-
+-#include <utility>
+-
+-#include "third_party/blink/renderer/core/typed_arrays/dom_array_buffer.h"
+-#include "third_party/webrtc/api/frame_transformer_interface.h"
+-
+-namespace blink {
+-
+-const void* const RTCEncodedVideoFramesAttachment::kAttachmentKey = nullptr;
+-
+-RTCEncodedVideoFrameDelegate::RTCEncodedVideoFrameDelegate(
+- std::unique_ptr<webrtc::TransformableVideoFrameInterface> webrtc_frame)
+- : webrtc_frame_(std::move(webrtc_frame)) {}
+-
+-String RTCEncodedVideoFrameDelegate::Type() const {
+- MutexLocker lock(mutex_);
+- if (!webrtc_frame_)
+- return "empty";
+-
+- return webrtc_frame_->IsKeyFrame() ? "key" : "delta";
+-}
+-
+-uint64_t RTCEncodedVideoFrameDelegate::Timestamp() const {
+- MutexLocker lock(mutex_);
+- return webrtc_frame_ ? webrtc_frame_->GetTimestamp() : 0;
+-}
+-
+-DOMArrayBuffer* RTCEncodedVideoFrameDelegate::CreateDataBuffer() const {
+- ArrayBufferContents contents;
+- {
+- MutexLocker lock(mutex_);
+- if (!webrtc_frame_)
+- return nullptr;
+-
+- auto data = webrtc_frame_->GetData();
+- contents =
+- ArrayBufferContents(data.size(), 1, ArrayBufferContents::kNotShared,
+- ArrayBufferContents::kDontInitialize);
+- if (UNLIKELY(!contents.Data()))
+- OOM_CRASH(data.size());
+- memcpy(contents.Data(), data.data(), data.size());
+- }
+- return DOMArrayBuffer::Create(std::move(contents));
+-}
+-
+-void RTCEncodedVideoFrameDelegate::SetData(const DOMArrayBuffer* data) {
+- MutexLocker lock(mutex_);
+- if (webrtc_frame_ && data) {
+- webrtc_frame_->SetData(rtc::ArrayView<const uint8_t>(
+- static_cast<const uint8_t*>(data->Data()), data->ByteLengthAsSizeT()));
+- }
+-}
+-
+-DOMArrayBuffer* RTCEncodedVideoFrameDelegate::CreateAdditionalDataBuffer()
+- const {
+- ArrayBufferContents contents;
+- {
+- MutexLocker lock(mutex_);
+- if (!webrtc_frame_)
+- return nullptr;
+-
+- auto additional_data = webrtc_frame_->GetAdditionalData();
+- contents = ArrayBufferContents(additional_data.size(), 1,
+- ArrayBufferContents::kNotShared,
+- ArrayBufferContents::kDontInitialize);
+- if (UNLIKELY(!contents.Data()))
+- OOM_CRASH(additional_data.size());
+- memcpy(contents.Data(), additional_data.data(), additional_data.size());
+- }
+- return DOMArrayBuffer::Create(std::move(contents));
+-}
+-
+-uint32_t RTCEncodedVideoFrameDelegate::Ssrc() const {
+- MutexLocker lock(mutex_);
+- return webrtc_frame_ ? webrtc_frame_->GetSsrc() : 0;
+-}
+-
+-std::unique_ptr<webrtc::TransformableVideoFrameInterface>
+-RTCEncodedVideoFrameDelegate::PassWebRtcFrame() {
+- MutexLocker lock(mutex_);
+- return std::move(webrtc_frame_);
+-}
+-
+-} // namespace blink
+diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h
+deleted file mode 100644
+index 5bc300b6e82c..000000000000
+--- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_frame_delegate.h
++++ /dev/null
+@@ -1,72 +0,0 @@
+-// Copyright 2020 The Chromium Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style license that can be
+-// found in the LICENSE file.
+-
+-#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_RTC_ENCODED_VIDEO_FRAME_DELEGATE_H_
+-#define THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_RTC_ENCODED_VIDEO_FRAME_DELEGATE_H_
+-
+-#include <stdint.h>
+-
+-#include <memory>
+-
+-#include "third_party/blink/renderer/bindings/core/v8/serialization/serialized_script_value.h"
+-#include "third_party/blink/renderer/modules/modules_export.h"
+-#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
+-#include "third_party/blink/renderer/platform/wtf/thread_safe_ref_counted.h"
+-#include "third_party/blink/renderer/platform/wtf/threading_primitives.h"
+-#include "third_party/webrtc/api/frame_transformer_interface.h"
+-
+-namespace blink {
+-
+-class DOMArrayBuffer;
+-
+-// This class wraps a WebRTC video frame and allows making shallow
+-// copies. Its purpose is to support making RTCEncodedVideoFrames
+-// serializable in the same process.
+-class RTCEncodedVideoFrameDelegate
+- : public WTF::ThreadSafeRefCounted<RTCEncodedVideoFrameDelegate> {
+- public:
+- explicit RTCEncodedVideoFrameDelegate(
+- std::unique_ptr<webrtc::TransformableVideoFrameInterface> webrtc_frame);
+-
+- String Type() const;
+- uint64_t Timestamp() const;
+- DOMArrayBuffer* CreateDataBuffer() const;
+- void SetData(const DOMArrayBuffer* data);
+- DOMArrayBuffer* CreateAdditionalDataBuffer() const;
+- uint32_t Ssrc() const;
+- std::unique_ptr<webrtc::TransformableVideoFrameInterface> PassWebRtcFrame();
+-
+- private:
+- mutable Mutex mutex_;
+- std::unique_ptr<webrtc::TransformableVideoFrameInterface> webrtc_frame_
+- GUARDED_BY(mutex_);
+-};
+-
+-class MODULES_EXPORT RTCEncodedVideoFramesAttachment
+- : public SerializedScriptValue::Attachment {
+- public:
+- static const void* const kAttachmentKey;
+- RTCEncodedVideoFramesAttachment() = default;
+- ~RTCEncodedVideoFramesAttachment() override = default;
+-
+- bool IsLockedToAgentCluster() const override {
+- return !encoded_video_frames_.IsEmpty();
+- }
+-
+- Vector<scoped_refptr<RTCEncodedVideoFrameDelegate>>& EncodedVideoFrames() {
+- return encoded_video_frames_;
+- }
+-
+- const Vector<scoped_refptr<RTCEncodedVideoFrameDelegate>>&
+- EncodedVideoFrames() const {
+- return encoded_video_frames_;
+- }
+-
+- private:
+- Vector<scoped_refptr<RTCEncodedVideoFrameDelegate>> encoded_video_frames_;
+-};
+-
+-} // namespace blink
+-
+-#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_PEERCONNECTION_RTC_ENCODED_VIDEO_FRAME_DELEGATE_H_
+diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink.cc
+index 4585483a1cb2..3762b10e6bc5 100644
+--- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink.cc
++++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink.cc
+@@ -48,8 +48,7 @@ ScriptPromise RTCEncodedVideoUnderlyingSink::write(
+ return ScriptPromise();
+ }
+
+- transformer_callback_.Run()->SendFrameToSink(
+- encoded_frame->PassWebRtcFrame());
++ transformer_callback_.Run()->SendFrameToSink(encoded_frame->PassDelegate());
+ return ScriptPromise::CastUndefined(script_state);
+ }
+
+diff --git a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink_test.cc b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink_test.cc
+index ea8a67a9cc5f..3d0dfbdbbe3e 100644
+--- a/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink_test.cc
++++ b/third_party/blink/renderer/modules/peerconnection/rtc_encoded_video_underlying_sink_test.cc
+@@ -68,7 +68,7 @@ class RTCEncodedVideoUnderlyingSinkTest : public testing::Test {
+
+ ScriptValue CreateEncodedVideoFrameChunk(ScriptState* script_state) {
+ RTCEncodedVideoFrame* frame = MakeGarbageCollected<RTCEncodedVideoFrame>(
+- std::unique_ptr<webrtc::TransformableVideoFrameInterface>());
++ /*frame_delegate=*/nullptr);
+ return ScriptValue(script_state->GetIsolate(),
+ ToV8(frame, script_state->GetContext()->Global(),
+ script_state->GetIsolate()));
+--
+2.26.1
+
diff --git a/0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch b/0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch
new file mode 100644
index 000000000000..9ee105ff31d4
--- /dev/null
+++ b/0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch
@@ -0,0 +1,28 @@
+From dba2a4aa61c021a46fa688efc989320763d3c738 Mon Sep 17 00:00:00 2001
+From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com>
+Date: Thu, 16 Apr 2020 20:11:28 +1000
+Subject: [PATCH 3/8] Add missing algorithm header in crx_install_error.cc
+
+This is needed for the use of std::find.
+
+Change-Id: I2dc43b3887c467986c5346be5a9e27a987e1e5b3
+---
+ extensions/browser/install/crx_install_error.cc | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/extensions/browser/install/crx_install_error.cc b/extensions/browser/install/crx_install_error.cc
+index a9765bb0a5a4..bd0d3e35a167 100644
+--- a/extensions/browser/install/crx_install_error.cc
++++ b/extensions/browser/install/crx_install_error.cc
+@@ -4,6 +4,8 @@
+
+ #include "extensions/browser/install/crx_install_error.h"
+
++#include <algorithm>
++
+ #include "base/logging.h"
+ #include "extensions/browser/install/sandboxed_unpacker_failure_reason.h"
+
+--
+2.26.1
+
diff --git a/0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch b/0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch
new file mode 100644
index 000000000000..7196e285c145
--- /dev/null
+++ b/0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch
@@ -0,0 +1,60 @@
+From ffa47b54c9dbed28a8b1b2b9428049073937b3fe Mon Sep 17 00:00:00 2001
+From: Stephan Hartmann <stha09@googlemail.com>
+Date: Sun, 5 Apr 2020 08:29:21 +0000
+Subject: [PATCH 4/8] libstdc++: fix incomplete-type in AXTree for
+ NodeSetSizePosInSetInfo
+
+std::unordered_map<T, U> requires U to be fully declared. ax_tree.h
+has only forward declaration of NodeSetSizePosInSetInfo. Therefore,
+move declaration from ax_tree.cc.
+Bug: 957519
+Change-Id: Ic1f4bf3ebfea229ece84251e46d4461b31873868
+---
+ ui/accessibility/ax_tree.cc | 10 ++--------
+ ui/accessibility/ax_tree.h | 9 ++++++++-
+ 2 files changed, 10 insertions(+), 9 deletions(-)
+
+diff --git a/ui/accessibility/ax_tree.cc b/ui/accessibility/ax_tree.cc
+index 7b8d9b1b1610..e9154028d664 100644
+--- a/ui/accessibility/ax_tree.cc
++++ b/ui/accessibility/ax_tree.cc
+@@ -567,14 +567,8 @@ struct AXTreeUpdateState {
+ const AXTree& tree;
+ };
+
+-struct AXTree::NodeSetSizePosInSetInfo {
+- NodeSetSizePosInSetInfo() = default;
+- ~NodeSetSizePosInSetInfo() = default;
+-
+- int32_t pos_in_set = 0;
+- int32_t set_size = 0;
+- base::Optional<int> lowest_hierarchical_level;
+-};
++AXTree::NodeSetSizePosInSetInfo::NodeSetSizePosInSetInfo() = default;
++AXTree::NodeSetSizePosInSetInfo::~NodeSetSizePosInSetInfo() = default;
+
+ struct AXTree::OrderedSetContent {
+ explicit OrderedSetContent(const AXNode* ordered_set = nullptr)
+diff --git a/ui/accessibility/ax_tree.h b/ui/accessibility/ax_tree.h
+index a51ca8de4c84..8c1c57517ac0 100644
+--- a/ui/accessibility/ax_tree.h
++++ b/ui/accessibility/ax_tree.h
+@@ -328,7 +328,14 @@ class AX_EXPORT AXTree : public AXNode::OwnerTree {
+ bool enable_extra_mac_nodes_ = false;
+
+ // Contains pos_in_set and set_size data for an AXNode.
+- struct NodeSetSizePosInSetInfo;
++ struct NodeSetSizePosInSetInfo {
++ NodeSetSizePosInSetInfo();
++ ~NodeSetSizePosInSetInfo();
++
++ int32_t pos_in_set = 0;
++ int32_t set_size = 0;
++ base::Optional<int> lowest_hierarchical_level;
++ };
+
+ // Represents the content of an ordered set which includes the ordered set
+ // items and the ordered set container if it exists.
+--
+2.26.1
+
diff --git a/0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch b/0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch
new file mode 100644
index 000000000000..bf89b54beefc
--- /dev/null
+++ b/0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch
@@ -0,0 +1,199 @@
+From 9c5607e39aaf34f866ca2b815196953ec3818098 Mon Sep 17 00:00:00 2001
+From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com>
+Date: Sat, 11 Apr 2020 12:32:25 +1000
+Subject: [PATCH 5/8] Revert "Trace ICU object creation in "ICU.CreateInstance"
+ UMA histogram"
+
+This reverts commit 928bcad29884064f83bf05ecadf82369f8b4622f.
+---
+ DEPS | 2 +-
+ base/i18n/icu_util.cc | 150 +++++++-----------------------------------
+ 2 files changed, 25 insertions(+), 127 deletions(-)
+
+diff --git a/DEPS b/DEPS
+index 95ff15cbf88c..fd23a935909f 100644
+--- a/DEPS
++++ b/DEPS
+@@ -1014,7 +1014,7 @@ deps = {
+ Var('chromium_git') + '/chromium/deps/hunspell_dictionaries.git' + '@' + '6fdad5388130757e1efb58a14b8e7f9494625691',
+
+ 'src/third_party/icu':
+- Var('chromium_git') + '/chromium/deps/icu.git' + '@' + '13cfcd5874f6c39c34ec57fa5295e7910ae90b8d',
++ Var('chromium_git') + '/chromium/deps/icu.git' + '@' + 'd7aff76cf6bb0fbef3afa6c07718f78a80a70f8f',
+
+ 'src/third_party/icu4j': {
+ 'packages': [
+diff --git a/base/i18n/icu_util.cc b/base/i18n/icu_util.cc
+index 82022d5f490e..425a0b2a6648 100644
+--- a/base/i18n/icu_util.cc
++++ b/base/i18n/icu_util.cc
+@@ -350,134 +350,32 @@ void InitializeIcuTimeZone() {
+ }
+
+ const char kICUDataFile[] = "ICU.DataFile";
+-const char kICUCreateInstance[] = "ICU.CreateInstance";
+-
+-enum class ICUCreateInstance {
+- kCharacterBreakIterator = 0,
+- kWordBreakIterator = 1,
+- kLineBreakIterator = 2,
+- kLineBreakIteratorTypeLoose = 3,
+- kLineBreakIteratorTypeNormal = 4,
+- kLineBreakIteratorTypeStrict = 5,
+- kSentenceBreakIterator = 6,
+- kTitleBreakIterator = 7,
+- kThaiBreakEngine = 8,
+- kLaoBreakEngine = 9,
+- kBurmeseBreakEngine = 10,
+- kKhmerBreakEngine = 11,
+- kChineseJapaneseBreakEngine = 12,
+-
+- kMaxValue = kChineseJapaneseBreakEngine
+-};
+-
+-// Callback functions to report the opening of ICU Data File, and creation of
+-// key objects to UMA. This help us to understand what built-in ICU data files
+-// are rarely used in the user's machines and the distribution of ICU usage.
+-static void U_CALLCONV TraceICUEntry(const void*, int32_t fn_number) {
+- switch (fn_number) {
+- case UTRACE_UBRK_CREATE_CHARACTER:
+- base::UmaHistogramEnumeration(kICUCreateInstance,
+- ICUCreateInstance::kCharacterBreakIterator);
+- break;
+- case UTRACE_UBRK_CREATE_SENTENCE:
+- base::UmaHistogramEnumeration(kICUCreateInstance,
+- ICUCreateInstance::kSentenceBreakIterator);
+- break;
+- case UTRACE_UBRK_CREATE_TITLE:
+- base::UmaHistogramEnumeration(kICUCreateInstance,
+- ICUCreateInstance::kTitleBreakIterator);
+- break;
+- case UTRACE_UBRK_CREATE_WORD:
+- base::UmaHistogramEnumeration(kICUCreateInstance,
+- ICUCreateInstance::kWordBreakIterator);
+- break;
+- default:
+- return;
+- }
+-}
+
+-static void U_CALLCONV TraceICUData(const void* context,
+- int32_t fn_number,
+- int32_t level,
+- const char* fmt,
+- va_list args) {
+- switch (fn_number) {
+- case UTRACE_UDATA_DATA_FILE: {
+- std::string icu_data_file_name(va_arg(args, const char*));
+- va_end(args);
+- // Skip icu version specified prefix if exist.
+- // path is prefixed with icu version prefix such as "icudt65l-".
+- // Histogram only the part after the -.
+- if (icu_data_file_name.find("icudt") == 0) {
+- size_t dash = icu_data_file_name.find("-");
+- if (dash != std::string::npos) {
+- icu_data_file_name = icu_data_file_name.substr(dash + 1);
+- }
+- }
+- // UmaHistogramSparse should track less than 100 values.
+- // We currently have about total 55 built-in data files inside ICU
+- // so it fit the UmaHistogramSparse usage.
+- int hash = base::HashMetricName(icu_data_file_name);
+- base::UmaHistogramSparse(kICUDataFile, hash);
+- return;
+- }
+- case UTRACE_UBRK_CREATE_LINE: {
+- const char* lb_type = va_arg(args, const char*);
+- va_end(args);
+- ICUCreateInstance value;
+- switch (lb_type[0]) {
+- case '\0':
+- value = ICUCreateInstance::kLineBreakIterator;
+- break;
+- case 'l':
+- DCHECK(strcmp(lb_type, "loose") == 0);
+- value = ICUCreateInstance::kLineBreakIteratorTypeLoose;
+- break;
+- case 'n':
+- DCHECK(strcmp(lb_type, "normal") == 0);
+- value = ICUCreateInstance::kLineBreakIteratorTypeNormal;
+- break;
+- case 's':
+- DCHECK(strcmp(lb_type, "strict") == 0);
+- value = ICUCreateInstance::kLineBreakIteratorTypeStrict;
+- break;
+- default:
+- return;
+- }
+- base::UmaHistogramEnumeration(kICUCreateInstance, value);
+- return;
+- }
+- case UTRACE_UBRK_CREATE_BREAK_ENGINE: {
+- const char* script = va_arg(args, const char*);
+- va_end(args);
+- ICUCreateInstance value;
+- switch (script[0]) {
+- case 'H':
+- DCHECK(strcmp(script, "Hani") == 0);
+- value = ICUCreateInstance::kChineseJapaneseBreakEngine;
+- break;
+- case 'K':
+- DCHECK(strcmp(script, "Khmr") == 0);
+- value = ICUCreateInstance::kKhmerBreakEngine;
+- break;
+- case 'L':
+- DCHECK(strcmp(script, "Laoo") == 0);
+- value = ICUCreateInstance::kLaoBreakEngine;
+- break;
+- case 'M':
+- DCHECK(strcmp(script, "Mymr") == 0);
+- value = ICUCreateInstance::kBurmeseBreakEngine;
+- break;
+- case 'T':
+- DCHECK(strcmp(script, "Thai") == 0);
+- value = ICUCreateInstance::kThaiBreakEngine;
+- break;
+- default:
+- return;
++// Callback function to report the opening of ICU Data File to UMA.
++// This help us to understand what built-in ICU data files are rarely used
++// in the user's machines.
++static void U_CALLCONV TraceICUDataFile(const void* context,
++ int32_t fn_number,
++ int32_t level,
++ const char* fmt,
++ va_list args) {
++ if (fn_number == UTRACE_UDATA_DATA_FILE) {
++ std::string icu_data_file_name(va_arg(args, const char*));
++ va_end(args);
++ // Skip icu version specified prefix if exist.
++ // path is prefixed with icu version prefix such as "icudt65l-".
++ // Histogram only the part after the -.
++ if (icu_data_file_name.find("icudt") == 0) {
++ size_t dash = icu_data_file_name.find("-");
++ if (dash != std::string::npos) {
++ icu_data_file_name = icu_data_file_name.substr(dash + 1);
+ }
+- base::UmaHistogramEnumeration(kICUCreateInstance, value);
+- return;
+ }
++ // UmaHistogramSparse should track less than 100 values.
++ // We currently have about total 55 built-in data files inside ICU
++ // so it fit the UmaHistogramSparse usage.
++ int hash = base::HashMetricName(icu_data_file_name);
++ base::UmaHistogramSparse(kICUDataFile, hash);
+ }
+ }
+
+@@ -491,7 +389,7 @@ bool DoCommonInitialization() {
+ InitializeIcuTimeZone();
+
+ const void* context = nullptr;
+- utrace_setFunctions(context, TraceICUEntry, nullptr, TraceICUData);
++ utrace_setFunctions(context, nullptr, nullptr, TraceICUDataFile);
+ utrace_setLevel(UTRACE_VERBOSE);
+ return true;
+ }
+--
+2.26.1
+
diff --git a/0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch b/0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch
new file mode 100644
index 000000000000..8901d446acb7
--- /dev/null
+++ b/0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch
@@ -0,0 +1,244 @@
+From 5794a8df921586417f6ffd6e05214b0258df7a00 Mon Sep 17 00:00:00 2001
+From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com>
+Date: Sat, 11 Apr 2020 13:01:16 +1000
+Subject: [PATCH 6/8] Revert "[PM] Add calculation of maximum simultaneous
+ load"
+
+This reverts commit b759260ca14691c4ffc386a4c64aef6f4b404618.
+---
+ chrome/browser/BUILD.gn | 2 -
+ .../policies/background_tab_loading_policy.cc | 19 -------
+ .../policies/background_tab_loading_policy.h | 4 --
+ .../background_tab_loading_policy_helpers.cc | 39 --------------
+ .../background_tab_loading_policy_helpers.h | 25 ---------
+ ...und_tab_loading_policy_helpers_unittest.cc | 54 -------------------
+ chrome/test/BUILD.gn | 1 -
+ 7 files changed, 144 deletions(-)
+ delete mode 100644 chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc
+ delete mode 100644 chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h
+ delete mode 100644 chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers_unittest.cc
+
+diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
+index 023024e81c99..61c2784bd4c7 100644
+--- a/chrome/browser/BUILD.gn
++++ b/chrome/browser/BUILD.gn
+@@ -3376,8 +3376,6 @@ jumbo_static_library("browser") {
+ "page_load_metrics/observers/session_restore_page_load_metrics_observer.h",
+ "performance_manager/graph/policies/background_tab_loading_policy.cc",
+ "performance_manager/graph/policies/background_tab_loading_policy.h",
+- "performance_manager/graph/policies/background_tab_loading_policy_helpers.cc",
+- "performance_manager/graph/policies/background_tab_loading_policy_helpers.h",
+ "performance_manager/graph/policies/urgent_page_discarding_policy.cc",
+ "performance_manager/graph/policies/urgent_page_discarding_policy.h",
+ "performance_manager/mechanisms/page_discarder.cc",
+diff --git a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.cc b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.cc
+index 7f68ad5c9c81..eb8c5a1ff489 100644
+--- a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.cc
++++ b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.cc
+@@ -4,8 +4,6 @@
+
+ #include "chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.h"
+
+-#include "base/system/sys_info.h"
+-#include "chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h"
+ #include "chrome/browser/performance_manager/mechanisms/page_loader.h"
+ #include "components/performance_manager/public/decorators/tab_properties_decorator.h"
+ #include "components/performance_manager/public/graph/policies/background_tab_loading_policy.h"
+@@ -16,21 +14,7 @@ namespace performance_manager {
+ namespace policies {
+
+ namespace {
+-
+-// Pointer to the instance of itself.
+ BackgroundTabLoadingPolicy* g_background_tab_loading_policy = nullptr;
+-
+-// Lower bound for the maximum number of tabs to load simultaneously.
+-uint32_t kMinSimultaneousTabLoads = 1;
+-
+-// Upper bound for the maximum number of tabs to load simultaneously.
+-// Setting to zero means no upper bound is applied.
+-uint32_t kMaxSimultaneousTabLoads = 4;
+-
+-// The number of CPU cores required per permitted simultaneous tab
+-// load. Setting to zero means no CPU core limit applies.
+-uint32_t kCoresPerSimultaneousTabLoad = 2;
+-
+ } // namespace
+
+ void ScheduleLoadForRestoredTabs(
+@@ -64,9 +48,6 @@ BackgroundTabLoadingPolicy::BackgroundTabLoadingPolicy()
+ : page_loader_(std::make_unique<mechanism::PageLoader>()) {
+ DCHECK(!g_background_tab_loading_policy);
+ g_background_tab_loading_policy = this;
+- simultaneous_tab_loads_ = CalculateMaxSimultaneousTabLoads(
+- kMinSimultaneousTabLoads, kMaxSimultaneousTabLoads,
+- kCoresPerSimultaneousTabLoad, base::SysInfo::NumberOfProcessors());
+ }
+
+ BackgroundTabLoadingPolicy::~BackgroundTabLoadingPolicy() {
+diff --git a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.h b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.h
+index e9ea7180444a..b9187bfb2ae8 100644
+--- a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.h
++++ b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy.h
+@@ -69,10 +69,6 @@ class BackgroundTabLoadingPolicy : public GraphOwned,
+
+ // The set of PageNodes that are currently loading.
+ std::vector<const PageNode*> page_nodes_loading_;
+-
+- // The number of simultaneous tab loads that are permitted by policy. This
+- // is computed based on the number of cores on the machine.
+- size_t simultaneous_tab_loads_;
+ };
+
+ } // namespace policies
+diff --git a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc
+deleted file mode 100644
+index 6ab117bc44c8..000000000000
+--- a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.cc
++++ /dev/null
+@@ -1,39 +0,0 @@
+-// Copyright 2020 The Chromium Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style license that can be
+-// found in the LICENSE file.
+-
+-#include "chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h"
+-#include "base/logging.h"
+-
+-namespace performance_manager {
+-
+-namespace policies {
+-
+-size_t CalculateMaxSimultaneousTabLoads(size_t lower_bound,
+- size_t upper_bound,
+- size_t cores_per_load,
+- size_t num_cores) {
+- DCHECK(upper_bound == 0 || lower_bound <= upper_bound);
+- DCHECK(num_cores > 0);
+-
+- size_t loads = 0;
+-
+- // Setting |cores_per_load| == 0 means that no per-core limit is applied.
+- if (cores_per_load == 0) {
+- loads = std::numeric_limits<size_t>::max();
+- } else {
+- loads = num_cores / cores_per_load;
+- }
+-
+- // If |upper_bound| isn't zero then apply the maximum that it implies.
+- if (upper_bound != 0)
+- loads = std::min(loads, upper_bound);
+-
+- loads = std::max(loads, lower_bound);
+-
+- return loads;
+-}
+-
+-} // namespace policies
+-
+-} // namespace performance_manager
+diff --git a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h
+deleted file mode 100644
+index fae53ab119bd..000000000000
+--- a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h
++++ /dev/null
+@@ -1,25 +0,0 @@
+-// Copyright 2020 The Chromium Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style license that can be
+-// found in the LICENSE file.
+-
+-#ifndef CHROME_BROWSER_PERFORMANCE_MANAGER_GRAPH_POLICIES_BACKGROUND_TAB_LOADING_POLICY_HELPERS_H_
+-#define CHROME_BROWSER_PERFORMANCE_MANAGER_GRAPH_POLICIES_BACKGROUND_TAB_LOADING_POLICY_HELPERS_H_
+-
+-#include <stddef.h>
+-
+-namespace performance_manager {
+-
+-namespace policies {
+-
+-// Helper function for BackgroundTabLoadingPolicy to compute the number of
+-// tabs that can load simultaneously.
+-size_t CalculateMaxSimultaneousTabLoads(size_t lower_bound,
+- size_t upper_bound,
+- size_t cores_per_load,
+- size_t num_cores);
+-
+-} // namespace policies
+-
+-} // namespace performance_manager
+-
+-#endif // CHROME_BROWSER_PERFORMANCE_MANAGER_GRAPH_POLICIES_BACKGROUND_TAB_LOADING_POLICY_HELPERS_H_
+diff --git a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers_unittest.cc b/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers_unittest.cc
+deleted file mode 100644
+index 4429a0e982f9..000000000000
+--- a/chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers_unittest.cc
++++ /dev/null
+@@ -1,54 +0,0 @@
+-// Copyright 2020 The Chromium Authors. All rights reserved.
+-// Use of this source code is governed by a BSD-style license that can be
+-// found in the LICENSE file.
+-
+-#include "chrome/browser/performance_manager/graph/policies/background_tab_loading_policy_helpers.h"
+-
+-#include "testing/gtest/include/gtest/gtest.h"
+-
+-namespace performance_manager {
+-
+-namespace policies {
+-
+-namespace {
+-
+-class BackgroundTabLoadingPolicyHelpersTest : public ::testing::Test {};
+-
+-} // namespace
+-
+-TEST_F(BackgroundTabLoadingPolicyHelpersTest,
+- CalculateMaxSimultaneousTabLoads) {
+- // Test the lower bound is enforced.
+- EXPECT_EQ(10u, CalculateMaxSimultaneousTabLoads(
+- 10 /* lower_bound */, 20 /* upper_bound */,
+- 1 /* cores_per_load */, 1 /* cores */));
+-
+- // Test the upper bound is enforced.
+- EXPECT_EQ(20u, CalculateMaxSimultaneousTabLoads(
+- 10 /* lower_bound */, 20 /* upper_bound */,
+- 1 /* cores_per_load */, 30 /* cores */));
+-
+- // Test the per-core calculation is correct.
+- EXPECT_EQ(15u, CalculateMaxSimultaneousTabLoads(
+- 10 /* lower_bound */, 20 /* upper_bound */,
+- 1 /* cores_per_load */, 15 /* cores */));
+- EXPECT_EQ(15u, CalculateMaxSimultaneousTabLoads(
+- 10 /* lower_bound */, 20 /* upper_bound */,
+- 2 /* cores_per_load */, 30 /* cores */));
+-
+- // If no per-core is specified then upper_bound is returned.
+- EXPECT_EQ(5u, CalculateMaxSimultaneousTabLoads(
+- 1 /* lower_bound */, 5 /* upper_bound */,
+- 0 /* cores_per_load */, 10 /* cores */));
+-
+- // If no per-core and no upper_bound is applied, then "upper_bound" is
+- // returned.
+- EXPECT_EQ(
+- std::numeric_limits<size_t>::max(),
+- CalculateMaxSimultaneousTabLoads(3 /* lower_bound */, 0 /* upper_bound */,
+- 0 /* cores_per_load */, 4 /* cores */));
+-}
+-
+-} // namespace policies
+-
+-} // namespace performance_manager
+diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
+index 2bce2f66a1ec..f7886e10f3eb 100644
+--- a/chrome/test/BUILD.gn
++++ b/chrome/test/BUILD.gn
+@@ -3991,7 +3991,6 @@ test("unit_tests") {
+ "../browser/performance_manager/graph/policies/urgent_page_discarding_policy_unittest.cc",
+
+ # Background tab loading from performance_manager isn't supported on Android.
+- "../browser/performance_manager/graph/policies/background_tab_loading_policy_helpers_unittest.cc",
+ "../browser/performance_manager/graph/policies/background_tab_loading_policy_unittest.cc",
+
+ # Android does not use the Message Center notification system.
+--
+2.26.1
+
diff --git a/0007-Add-missing-memory-header-in-trust_token_attribute_p.patch b/0007-Add-missing-memory-header-in-trust_token_attribute_p.patch
new file mode 100644
index 000000000000..8e919df96f48
--- /dev/null
+++ b/0007-Add-missing-memory-header-in-trust_token_attribute_p.patch
@@ -0,0 +1,26 @@
+From 71b4b6b16053ee3b6d2fb47a80007ca248caa0d7 Mon Sep 17 00:00:00 2001
+From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com>
+Date: Fri, 17 Apr 2020 02:14:15 +1000
+Subject: [PATCH 7/8] Add missing memory header in
+ trust_token_attribute_parsing.h
+
+---
+ .../blink/renderer/core/html/trust_token_attribute_parsing.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h b/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h
+index f5a7ab03892b..ef19cfaf680f 100644
+--- a/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h
++++ b/third_party/blink/renderer/core/html/trust_token_attribute_parsing.h
+@@ -5,6 +5,8 @@
+ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_HTML_TRUST_TOKEN_ATTRIBUTE_PARSING_H_
+ #define THIRD_PARTY_BLINK_RENDERER_CORE_HTML_TRUST_TOKEN_ATTRIBUTE_PARSING_H_
+
++#include <memory>
++
+ #include "base/optional.h"
+ #include "services/network/public/mojom/trust_tokens.mojom-blink-forward.h"
+ #include "third_party/blink/renderer/core/core_export.h"
+--
+2.26.1
+
diff --git a/0008-Revert-FragmentItem-Two-fixes-for-outline.patch b/0008-Revert-FragmentItem-Two-fixes-for-outline.patch
new file mode 100644
index 000000000000..66acc660bf4e
--- /dev/null
+++ b/0008-Revert-FragmentItem-Two-fixes-for-outline.patch
@@ -0,0 +1,84 @@
+From bcac6dec62f192996a5bc061c140da211fc7e8bf Mon Sep 17 00:00:00 2001
+From: Daniel Playfair Cal <daniel.playfair.cal@gmail.com>
+Date: Fri, 17 Apr 2020 02:30:27 +1000
+Subject: [PATCH 8/8] Revert "[FragmentItem] Two fixes for outline"
+
+This reverts commit a340aadc092315215068045d847516f985b6a9f3.
+---
+ .../layout/ng/layout_ng_block_flow_mixin.cc | 13 ++-----
+ .../ng/ng_physical_container_fragment.cc | 34 -------------------
+ 2 files changed, 2 insertions(+), 45 deletions(-)
+
+diff --git a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.cc b/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.cc
+index ef990b7ce3fd..4beb7958545c 100644
+--- a/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.cc
++++ b/third_party/blink/renderer/core/layout/ng/layout_ng_block_flow_mixin.cc
+@@ -110,18 +110,9 @@ void LayoutNGBlockFlowMixin<Base>::AddOutlineRects(
+ To<NGPhysicalBoxFragment>(PaintFragment()->PhysicalFragment())
+ .AddSelfOutlineRects(additional_offset, include_block_overflows,
+ &rects);
+- return;
+- }
+-
+- if (const NGPhysicalBoxFragment* fragment = CurrentFragment()) {
+- if (fragment->HasItems()) {
+- fragment->AddSelfOutlineRects(additional_offset, include_block_overflows,
+- &rects);
+- return;
+- }
++ } else {
++ Base::AddOutlineRects(rects, additional_offset, include_block_overflows);
+ }
+-
+- Base::AddOutlineRects(rects, additional_offset, include_block_overflows);
+ }
+
+ // Retrieve NGBaseline from the current fragment.
+diff --git a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.cc b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.cc
+index 82f57612ce45..a2f8092c791a 100644
+--- a/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.cc
++++ b/third_party/blink/renderer/core/layout/ng/ng_physical_container_fragment.cc
+@@ -90,40 +90,6 @@ void NGPhysicalContainerFragment::AddOutlineRectsForNormalChildren(
+ const PhysicalOffset& additional_offset,
+ NGOutlineType outline_type,
+ const LayoutBoxModelObject* containing_block) const {
+- if (const auto* box = DynamicTo<NGPhysicalBoxFragment>(this)) {
+- if (const NGFragmentItems* items = box->Items()) {
+- for (NGInlineCursor cursor(*items); cursor; cursor.MoveToNext()) {
+- DCHECK(cursor.Current().Item());
+- const NGFragmentItem& item = *cursor.Current().Item();
+- if (item.Type() == NGFragmentItem::kLine) {
+- AddOutlineRectsForDescendant(
+- {item.LineBoxFragment(), item.OffsetInContainerBlock()},
+- outline_rects, additional_offset, outline_type, containing_block);
+- continue;
+- }
+- if (item.Type() == NGFragmentItem::kBox) {
+- if (const NGPhysicalBoxFragment* child_box = item.BoxFragment()) {
+- DCHECK(!child_box->IsOutOfFlowPositioned());
+- AddOutlineRectsForDescendant(
+- {child_box, item.OffsetInContainerBlock()}, outline_rects,
+- additional_offset, outline_type, containing_block);
+- }
+- continue;
+- }
+- DCHECK(item.IsText());
+- }
+- // Don't add |Children()|. If |this| has |NGFragmentItems|, children are
+- // either line box, which we already handled in items, or OOF, which we
+- // should ignore.
+- DCHECK(std::all_of(PostLayoutChildren().begin(),
+- PostLayoutChildren().end(), [](const NGLink& child) {
+- return child->IsLineBox() ||
+- child->IsOutOfFlowPositioned();
+- }));
+- return;
+- }
+- }
+-
+ for (const auto& child : PostLayoutChildren()) {
+ // Outlines of out-of-flow positioned descendants are handled in
+ // NGPhysicalBoxFragment::AddSelfOutlineRects().
+--
+2.26.1
+
diff --git a/PKGBUILD b/PKGBUILD
index 5ee5fe0db4d0..fb310fe4d36a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,7 +5,7 @@
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
pkgname=chromium-beta-ozone
-pkgver=81.0.4044.91
+pkgver=83.0.4103.14
pkgrel=1
_launcher_ver=6
pkgdesc="Chromium built with patches for wayland support via Ozone (beta channel)"
@@ -19,7 +19,8 @@ depends=('gtk3' 'nss' 'alsa-lib' 'xdg-utils' 'libxss' 'libcups' 'libgcrypt'
provides=('chromium')
conflicts=('chromium')
makedepends=('python' 'python2' 'gperf' 'yasm' 'mesa' 'ninja' 'nodejs' 'git'
- 'libpipewire02' 'clang' 'lld' 'gn' 'java-runtime-headless')
+ 'libpipewire02' 'clang' 'lld' 'gn' 'java-runtime-headless'
+ 'python2-setuptools')
optdepends=('pepper-flash: support for Flash content'
'libpipewire02: WebRTC desktop sharing under Wayland'
'kdialog: needed for file dialogs in KDE'
@@ -28,16 +29,28 @@ optdepends=('pepper-flash: support for Flash content'
install=chromium.install
source=(https://commondatastorage.googleapis.com/chromium-browser-official/chromium-$pkgver.tar.xz
chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz
- rename-Relayout-in-DesktopWindowTreeHostPlatform.patch
- rebuild-Linux-frame-button-cache-when-activation.patch
chromium-widevine.patch
- chromium-skia-harmony.patch)
-sha256sums=('cec9da1fe5c5a99e97e9ca29d0836b12239439ede40794e52a9a2fdef065d4ca'
+ chromium-skia-harmony.patch
+ 0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch
+ 0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch
+ 0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch
+ 0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch
+ 0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch
+ 0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch
+ 0007-Add-missing-memory-header-in-trust_token_attribute_p.patch
+ 0008-Revert-FragmentItem-Two-fixes-for-outline.patch)
+sha256sums=('6e3d4853dcbd3c2375a1462a764102f6893c3b0505037e28c04bf90002e526e8'
'04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1'
- 'ae3bf107834bd8eda9a3ec7899fe35fde62e6111062e5def7d24bf49b53db3db'
- '46f7fc9768730c460b27681ccf3dc2685c7e1fd22d70d3a82d9e57e3389bb014'
'709e2fddba3c1f2ed4deb3a239fc0479bfa50c46e054e7f32db4fb1365fed070'
- '771292942c0901092a402cc60ee883877a99fb804cb54d568c8c6c94565a48e1')
+ '771292942c0901092a402cc60ee883877a99fb804cb54d568c8c6c94565a48e1'
+ 'c53edc13ca335652608607e628284a79d91f5524d9b5e72a8f2d29b4d7618c75'
+ 'cf27aa2a98bc71686e3e0f482b720d7d25017158ab2c7d93b548b3578c4b53e2'
+ '9f2211edf347d54b8167a3b9d773e38aeabce5f98fb1932e7db1aeec845579f6'
+ '5db92d614aba64e9eb684f35e06f36786b74d5a1456308d4d40a65f12e32f62b'
+ '52b0129ac7db760078087a2839e257183f10df8e9f831ec07e6cfc8f5ba455eb'
+ '2b594ff5bc731897274027ddb79a77d247a52ef0990d574ec815b36082ac093a'
+ '91cc1ac6cd6568de8c45a3fb3c6b57fa9ea6e6ae6f2a05f1ff82677d0cdbdedb'
+ '771b862e16ff42e0d43d6f0f5fd49d65210732bb0ae19cc4ea18c2220b4cb041')
# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
# Keys are the names in the above script; values are the dependencies in Arch
@@ -46,7 +59,7 @@ declare -gA _system_libs=(
[flac]=flac
[fontconfig]=fontconfig
[freetype]=freetype2
- [harfbuzz-ng]=harfbuzz
+ # [harfbuzz-ng]=harfbuzz
[icu]=icu
[libdrm]=
#[libjpeg]=libjpeg
@@ -74,7 +87,7 @@ _google_api_key=AIzaSyDwr302FpOSkGRpLlUpPThNTDPbXcIn_FM
_google_default_client_id=413772536636.apps.googleusercontent.com
_google_default_client_secret=0ZChLK6AxeA3Isu96MkwqDR4
-# Branch point: 737173
+# Branch point: 756066
# Extra commits related specifically to wayland support:
# These consist of the above commits and their dependencies
@@ -95,10 +108,6 @@ prepare() {
third_party/blink/renderer/core/xml/parser/xml_document_parser.cc \
third_party/libxml/chromium/*.cc
- # https://crbug.com/1049258
- patch -Np1 -i ../rename-Relayout-in-DesktopWindowTreeHostPlatform.patch
- patch -Np1 -i ../rebuild-Linux-frame-button-cache-when-activation.patch
-
# Load bundled Widevine CDM if available (see chromium-widevine in the AUR)
# M79 is supposed to download it as a component but it doesn't seem to work
patch -Np1 -i ../chromium-widevine.patch
@@ -106,6 +115,15 @@ prepare() {
# https://crbug.com/skia/6663#c10
patch -Np0 -i ../chromium-skia-harmony.patch
+ patch -Np1 -i ../0001-Revert-RTCInsertableStreams-Make-RTCEncodedAudioFram.patch
+ patch -Np1 -i ../0002-Revert-RTCInsertableStreams-Make-RTCEncodedVideoFram.patch
+ patch -Np1 -i ../0003-Add-missing-algorithm-header-in-crx_install_error.cc.patch
+ patch -Np1 -i ../0004-libstdc-fix-incomplete-type-in-AXTree-for-NodeSetSiz.patch
+ patch -Np1 -i ../0005-Revert-Trace-ICU-object-creation-in-ICU.CreateInstan.patch
+ patch -Np1 -i ../0006-Revert-PM-Add-calculation-of-maximum-simultaneous-lo.patch
+ patch -Np1 -i ../0007-Add-missing-memory-header-in-trust_token_attribute_p.patch
+ patch -Np1 -i ../0008-Revert-FragmentItem-Two-fixes-for-outline.patch
+
for PATCH in ${_bugfix_patches[@]}
do
echo "Applying $PATCH"
@@ -162,8 +180,6 @@ build() {
'ozone_auto_platforms=false'
'use_glib=true'
'use_system_libwayland=true'
- 'use_system_minigbm=true'
- 'use_system_libdrm=true'
'use_vaapi=false'
'use_jumbo_build=false'
'enable_nacl=false'
diff --git a/rebuild-Linux-frame-button-cache-when-activation.patch b/rebuild-Linux-frame-button-cache-when-activation.patch
deleted file mode 100644
index 40764b3ba7ab..000000000000
--- a/rebuild-Linux-frame-button-cache-when-activation.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From d10f885b9327399be9348b780967ebd6b7f2c4bc Mon Sep 17 00:00:00 2001
-From: Tom Anderson <thomasanderson@chromium.org>
-Date: Fri, 7 Feb 2020 22:44:54 +0000
-Subject: [PATCH] Rebuild Linux frame button cache when activation state
- changes
-
-This fixes an issue where the frame buttons would always render in an
-inactive state on Linux (see repro steps in bug 1049258).
-
-Bug: 1049258
-R=sky
-CC=pkasting
-
-Change-Id: Ic5af33199003e1d1cdf6cedf506e32388ea11fa9
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2044538
-Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
-Commit-Queue: Scott Violet <sky@chromium.org>
-Reviewed-by: Scott Violet <sky@chromium.org>
-Cr-Commit-Position: refs/heads/master@{#739585}
----
- .../ui/views/frame/desktop_linux_browser_frame_view.cc | 6 +++---
- .../desktop_aura/desktop_window_tree_host_platform.cc | 3 +++
- 2 files changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc b/chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc
-index 954e776057f..4f579955675 100644
---- a/chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc
-+++ b/chrome/browser/ui/views/frame/desktop_linux_browser_frame_view.cc
-@@ -22,13 +22,13 @@ DesktopLinuxBrowserFrameView::DesktopLinuxBrowserFrameView(
- : OpaqueBrowserFrameView(frame, browser_view, layout),
- nav_button_provider_(std::move(nav_button_provider)) {}
-
--DesktopLinuxBrowserFrameView::~DesktopLinuxBrowserFrameView() {}
-+DesktopLinuxBrowserFrameView::~DesktopLinuxBrowserFrameView() = default;
-
- void DesktopLinuxBrowserFrameView::Layout() {
- // Calling MaybeUpdateCachedFrameButtonImages() from Layout() is sufficient to
- // catch all cases that could update the appearance, since
-- // DesktopWindowTreeHostPlatform::OnWindowStateChanged() does a layout any
-- // time any properties change.
-+ // DesktopWindowTreeHostPlatform::On{Window,Activation}StateChanged() does a
-+ // layout any time the maximized and activation state changes, respectively.
- MaybeUpdateCachedFrameButtonImages();
- OpaqueBrowserFrameView::Layout();
- }
-diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
-index 9c695d8e5b1..9662f19aa90 100644
---- a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
-+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
-@@ -677,9 +677,12 @@ void DesktopWindowTreeHostPlatform::OnCloseRequest() {
- }
-
- void DesktopWindowTreeHostPlatform::OnActivationChanged(bool active) {
-+ if (is_active_ == active)
-+ return;
- is_active_ = active;
- aura::WindowTreeHostPlatform::OnActivationChanged(active);
- desktop_native_widget_aura_->HandleActivationChanged(active);
-+ ScheduleRelayout();
- }
-
- base::Optional<gfx::Size>
diff --git a/rename-Relayout-in-DesktopWindowTreeHostPlatform.patch b/rename-Relayout-in-DesktopWindowTreeHostPlatform.patch
deleted file mode 100644
index eda3cbdbaaf3..000000000000
--- a/rename-Relayout-in-DesktopWindowTreeHostPlatform.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 5a2cd2409c7d65c019ad9f4595a4e85315857ac4 Mon Sep 17 00:00:00 2001
-From: Tom Anderson <thomasanderson@chromium.org>
-Date: Mon, 3 Feb 2020 23:18:46 +0000
-Subject: [PATCH] Rename Relayout() in DesktopWindowTreeHostPlatform to
- ScheduleRelayout()
-
-R=sky
-
-Bug: None
-Change-Id: I680cafd25935e59a280e3b2baac754d3d5f13a35
-Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2036553
-Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
-Reviewed-by: Scott Violet <sky@chromium.org>
-Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
-Cr-Commit-Position: refs/heads/master@{#737974}
----
- .../desktop_aura/desktop_window_tree_host_platform.cc | 6 +++---
- .../widget/desktop_aura/desktop_window_tree_host_platform.h | 2 +-
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
-index 6c00d49eb3f..9c695d8e5b1 100644
---- a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
-+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.cc
-@@ -556,7 +556,7 @@ void DesktopWindowTreeHostPlatform::SetFullscreen(bool fullscreen) {
- DCHECK_EQ(fullscreen, IsFullscreen());
-
- if (IsFullscreen() == fullscreen)
-- Relayout();
-+ ScheduleRelayout();
- // Else: the widget will be relaid out either when the window bounds change
- // or when |platform_window|'s fullscreen state changes.
- }
-@@ -669,7 +669,7 @@ void DesktopWindowTreeHostPlatform::OnWindowStateChanged(
- // Now that we have different window properties, we may need to relayout the
- // window. (The windows code doesn't need this because their window change is
- // synchronous.)
-- Relayout();
-+ ScheduleRelayout();
- }
-
- void DesktopWindowTreeHostPlatform::OnCloseRequest() {
-@@ -712,7 +712,7 @@ gfx::Rect DesktopWindowTreeHostPlatform::ToPixelRect(
- return gfx::ToEnclosingRect(rect_in_pixels);
- }
-
--void DesktopWindowTreeHostPlatform::Relayout() {
-+void DesktopWindowTreeHostPlatform::ScheduleRelayout() {
- Widget* widget = native_widget_delegate_->AsWidget();
- NonClientView* non_client_view = widget->non_client_view();
- // non_client_view may be NULL, especially during creation.
-diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h
-index 89beb8d2245..75a401e02a7 100644
---- a/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h
-+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_platform.h
-@@ -129,7 +129,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostPlatform
- gfx::Rect ToPixelRect(const gfx::Rect& rect_in_dip) const;
-
- private:
-- void Relayout();
-+ void ScheduleRelayout();
-
- Widget* GetWidget();
- const Widget* GetWidget() const;