use_system_icu on f32+
drop upstreamed patches
This commit is contained in:
Rex Dieter 2020-03-25 11:17:16 -05:00
parent 52761a3da1
commit f9cf1a6ce6
12 changed files with 98 additions and 712 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@
/qtwebengine-everywhere-src-5.12.5-clean.tar.xz
/qtwebengine-everywhere-src-5.12.6-clean.tar.xz
/qtwebengine-everywhere-src-5.13.2-clean.tar.xz
/qtwebengine-everywhere-src-5.14.1-clean.tar.xz

View File

@ -155,12 +155,14 @@ header_files=" libavutil/x86/asm.h \
libavcodec/old_codec_ids.h \
libavcodec/options_table.h \
libavcodec/opus_celt.h \
libavcodec/opusdsp.h \
libavcodec/opus_pvq.h \
libavcodec/opus_rc.h \
libavcodec/pcm_tablegen.h \
libavcodec/pel_template.c \
libavcodec/pixblockdsp.h \
libavcodec/pixels.h \
libavcodec/png.h \
libavcodec/pthread_internal.h \
libavcodec/put_bits.h \
libavcodec/qpeldsp.h \
@ -178,6 +180,7 @@ header_files=" libavutil/x86/asm.h \
libavcodec/vorbisdsp.h \
libavcodec/vp3data.h \
libavcodec/vp3dsp.h \
libavcodec/vp4data.h \
libavcodec/vp56.h \
libavcodec/vp56dsp.h \
libavcodec/vp8data.h \

View File

@ -13,6 +13,11 @@
# need libwebp >= 0.6.0
%global use_system_libwebp 1
%if 0%{?fedora} > 31
# need libicu >= 64, only currently available on f32+
%global use_system_libicu 1
%endif
# NEON support on ARM (detected at runtime) - disable this if you are hitting
# FTBFS due to e.g. GCC bug https://bugzilla.redhat.com/show_bug.cgi?id=1282495
#global arm_neon 1
@ -43,17 +48,17 @@
Summary: Qt5 - QtWebEngine components
Name: qt5-qtwebengine
Version: 5.13.2
Release: 4%{?dist}
Version: 5.14.1
Release: 1%{?dist}
# See LICENSE.GPL LICENSE.LGPL LGPL_EXCEPTION.txt, for details
# See also http://qt-project.org/doc/qt-5.0/qtdoc/licensing.html
# The other licenses are from Chromium and the code it bundles
License: (LGPLv2 with exceptions or GPLv3 with exceptions) and BSD and LGPLv2+ and ASL 2.0 and IJG and MIT and GPLv2+ and ISC and OpenSSL and (MPLv1.1 or GPLv2 or LGPLv2)
URL: http://www.qt.io
# cleaned tarball with patent-encumbered codecs removed from the bundled FFmpeg
# wget http://download.qt.io/official_releases/qt/5.12/5.12.6/submodules/qtwebengine-everywhere-src-5.12.6.tar.xz
# ./clean_qtwebengine.sh 5.12.6
# leaned tarball with patent-encumbered codecs removed from the bundled FFmpeg
# wget http://download.qt.io/official_releases/qt/5.14/5.14.1/submodules/qtwebengine-everywhere-src-5.14.1.tar.xz
# ./clean_qtwebengine.sh 5.14.1
Source0: qtwebengine-everywhere-src-%{version}-clean.tar.xz
# cleanup scripts used above
Source1: clean_qtwebengine.sh
@ -80,25 +85,20 @@ Patch2: qtwebengine-opensource-src-5.12.4-fix-extractcflag.patch
Patch3: qtwebengine-opensource-src-5.9.0-no-neon.patch
# workaround FTBFS against kernel-headers-5.2.0+
Patch4: qtwebengine-SIOCGSTAMP.patch
# fix build when using qt < 5.14
Patch5: qtwebengine-5.14-1-QT_DEPRECATED_VERSION.patch
# remove Android dependencies from openmax_dl ARM NEON detection (detect.c)
Patch10: qtwebengine-opensource-src-5.9.0-openmax-dl-neon.patch
# Force verbose output from the GN bootstrap process
Patch21: qtwebengine-everywhere-src-5.12.0-gn-bootstrap-verbose.patch
# Fix/workaround FTBFS on aarch64 with newer glibc
Patch24: qtwebengine-everywhere-src-5.11.3-aarch64-new-stat.patch
# Fix missing semicolon in Blink
Patch25: qtwebengine-everywhere-5.13.2-missing-semicolon-in-blink.patch
# Use Python2
Patch26: qtwebengine-everywhere-5.13.2-use-python2.patch
# Fix missing include in chromium
Patch27: qtwebengine-everywhere-5.13.2-fix-chromium-headers.patch
# Fix for clock_nanosleep
# https://bugreports.qt.io/browse/QTBUG-81313
# https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/292352
# Qt: https://codereview.qt-project.org/gitweb?p=qt/qtwebengine-chromium.git;a=patch;h=2c37da9ad4fe7d5b1911ba991798e508c81ba5ef
# Chromium: https://chromium.googlesource.com/chromium/src/+/54407b422a9cbf775a68c1d57603c0ecac8ce0d7%5E%21/#F0
# Didn't apply cleanly, manually ported
Patch28: qtwebengine-everywhere-5.13.2-allow-restricted-clock_nanosleep-in-Linux-sandbox-manual.patch
# Fix gcc10 FTBFS
Patch29: qtwebengine-everywhere-5.14.1-gcc10.patch
## Upstream patches:
# qtwebengine-chromium
@ -128,7 +128,9 @@ BuildRequires: libstdc++-static
BuildRequires: git-core
BuildRequires: gperf
BuildRequires: krb5-devel
BuildRequires: libicu-devel
%if 0%{?use_system_libicu}
BuildRequires: libicu-devel >= 64
%endif
BuildRequires: libjpeg-devel
BuildRequires: re2-devel
BuildRequires: snappy-devel
@ -370,24 +372,25 @@ pushd src/3rdparty/chromium
popd
%patch0 -p1 -b .linux-pri
%if 0%{?use_system_libicu}
%patch1 -p1 -b .no-icudtl-dat
%endif
%patch2 -p1 -b .fix-extractcflag
%if !0%{?arm_neon}
%patch3 -p1 -b .no-neon
%endif
%patch4 -p1 -b .SIOCGSTAMP
%patch5 -p1 -b .QT_DEPRECATED_VERSION
## upstream patches
%patch10 -p1 -b .openmax-dl-neon
#patch10 -p1 -b .openmax-dl-neon
## NEEDSWORK
#patch21 -p1 -b .gn-bootstrap-verbose
%patch24 -p1 -b .aarch64-new-stat
%patch25 -p1 -b .missing-semicolon-in-blink
%patch26 -p1 -b .use-python2
%patch27 -p1 -b .fix-chromium
%patch28 -p0 -b .allow-clock_nanosleep
%patch29 -p1 -b .gcc10
# the xkbcommon config/feature was renamed in 5.12, so need to adjust QT_CONFIG references
# when building on older Qt releases
@ -444,12 +447,12 @@ export NINJA_PATH=%{__ninja}
%{qmake_qt5} \
%{?debug_config:CONFIG+="%{debug_config}}" \
CONFIG+="link_pulseaudio" \
QMAKE_EXTRA_ARGS+="-system-webengine-icu" \
%{?use_system_libicu:QMAKE_EXTRA_ARGS+="-system-webengine-icu"} \
QMAKE_EXTRA_ARGS+="-webengine-kerberos" \
.
# avoid %%make_build for now, the -O flag buffers output from intermediate build steps done via ninja
make %{?_smp_mflags}
make %{?_smp_mflags} -k
%if 0%{?docs}
%make_build docs
@ -524,6 +527,9 @@ done
%{_qt5_libdir}/qt5/libexec/QtWebEngineProcess
%{_qt5_plugindir}/designer/libqwebengineview.so
%dir %{_qt5_datadir}/resources/
%if ! 0%{?use_system_libicu}
%{_qt5_datadir}/resources/icudtl.dat
%endif
%{_qt5_datadir}/resources/qtwebengine_resources_100p.pak
%{_qt5_datadir}/resources/qtwebengine_resources_200p.pak
%{_qt5_datadir}/resources/qtwebengine_resources.pak
@ -606,6 +612,11 @@ done
%changelog
* Wed Mar 25 2020 Rex Dieter <rdieter@fedoraproject.org> - 5.14.1-1
- 5.14.1
- use_system_icu on f32+
- drop upstreamed patches
* Wed Mar 25 2020 Ankur Sinha <ankursinha AT fedoraproject DOT org> - 5.13.2-4
- Add patch to allow clock_nanosleep in Linux sandbox (Chromium)

View File

@ -0,0 +1,17 @@
diff -up qtwebengine-everywhere-src-5.14.1.orig/src/webenginewidgets/api/qwebenginedownloaditem.h.QT_DEPRECATED qtwebengine-everywhere-src-5.14.1.orig/src/webenginewidgets/api/qwebenginedownloaditem.h
--- qtwebengine-everywhere-src-5.14.1.orig/src/webenginewidgets/api/qwebenginedownloaditem.h.QT_DEPRECATED 2020-01-20 05:17:16.000000000 -0600
+++ qtwebengine-everywhere-src-5.14.1.orig/src/webenginewidgets/api/qwebenginedownloaditem.h 2020-03-24 15:42:03.558394148 -0500
@@ -119,9 +119,13 @@ public:
QUrl url() const;
QString mimeType() const;
#if QT_DEPRECATED_SINCE(5, 14)
+#if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
QT_DEPRECATED_VERSION_X(5, 14, "Use downloadDirectory() and downloadFileName() instead")
+#endif
QString path() const;
+#if QT_VERSION >= QT_VERSION_CHECK(5,14,0)
QT_DEPRECATED_VERSION_X(5, 14, "Use setDownloadDirectory() and setDownloadFileName() instead")
+#endif
void setPath(QString path);
#endif
bool isFinished() const;

View File

@ -1,129 +0,0 @@
diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc
--- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2020-03-25 12:57:05.214021490 +0000
+++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy.cc 2020-03-25 12:58:35.813396054 +0000
@@ -137,7 +137,7 @@
return Allow();
#endif
- if (sysno == __NR_clock_gettime) {
+ if (sysno == __NR_clock_gettime || sysno == __NR_clock_nanosleep) {
return RestrictClockID();
}
diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc
--- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc 2020-03-25 12:57:05.214021490 +0000
+++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/baseline_policy_unittest.cc 2020-03-25 13:01:05.971702078 +0000
@@ -393,6 +393,18 @@
syscall(SYS_clock_gettime, CLOCK_MONOTONIC_RAW, &ts);
}
+BPF_DEATH_TEST_C(BaselinePolicy,
+ ClockNanosleepWithDisallowedClockCrashes,
+ DEATH_SEGV_MESSAGE(GetErrorMessageContentForTests()),
+ BaselinePolicy) {
+ struct timespec ts;
+ struct timespec out_ts;
+ ts.tv_sec = 0;
+ ts.tv_nsec = 0;
+ syscall(SYS_clock_nanosleep, (~0) | CLOCKFD, 0, &ts, &out_ts);
+}
+
+
#if !defined(GRND_RANDOM)
#define GRND_RANDOM 2
#endif
diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h
--- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h 2020-03-25 12:57:05.213021508 +0000
+++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.h 2020-03-25 13:03:32.058081155 +0000
@@ -86,12 +86,13 @@
// process).
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictGetrusage();
-// Restrict |clk_id| for clock_getres(), clock_gettime() and clock_settime().
-// We allow accessing only CLOCK_MONOTONIC, CLOCK_PROCESS_CPUTIME_ID,
-// CLOCK_REALTIME, and CLOCK_THREAD_CPUTIME_ID. In particular, this disallows
-// access to arbitrary per-{process,thread} CPU-time clock IDs (such as those
-// returned by {clock,pthread}_getcpuclockid), which can leak information
-// about the state of the host OS.
+// Restrict |clk_id| for clock_getres(), clock_gettime(), clock_settime(), and
+// clock_nanosleep(). We allow accessing only CLOCK_BOOTTIME,
+// CLOCK_MONOTONIC{,_RAW,_COARSE}, CLOCK_PROCESS_CPUTIME_ID,
+// CLOCK_REALTIME{,_COARSE}, and CLOCK_THREAD_CPUTIME_ID. In particular, on
+// non-Android platforms this disallows access to arbitrary per-{process,thread}
+// CPU-time clock IDs (such as those returned by {clock,pthread}_getcpuclockid),
+// which can leak information about the state of the host OS.
SANDBOX_EXPORT bpf_dsl::ResultExpr RestrictClockID();
// Restrict the flags argument to getrandom() to allow only no flags, or
diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc
--- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc 2020-03-25 12:57:05.213021508 +0000
+++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions_unittests.cc 2020-03-25 13:06:05.643325692 +0000
@@ -59,6 +59,7 @@
switch (sysno) {
case __NR_clock_gettime:
case __NR_clock_getres:
+ case __NR_clock_nanosleep:
return RestrictClockID();
default:
return Allow();
@@ -99,6 +100,25 @@
#endif
}
+void CheckClockNanosleep(clockid_t clockid) {
+ struct timespec ts;
+ struct timespec out_ts;
+ ts.tv_sec = 0;
+ ts.tv_nsec = 0;
+ clock_nanosleep(clockid, 0, &ts, &out_ts);
+}
+
+BPF_TEST_C(ParameterRestrictions,
+ clock_nanosleep_allowed,
+ RestrictClockIdPolicy) {
+ CheckClockNanosleep(CLOCK_MONOTONIC);
+ CheckClockNanosleep(CLOCK_MONOTONIC_COARSE);
+ CheckClockNanosleep(CLOCK_MONOTONIC_RAW);
+ CheckClockNanosleep(CLOCK_BOOTTIME);
+ CheckClockNanosleep(CLOCK_REALTIME);
+ CheckClockNanosleep(CLOCK_REALTIME_COARSE);
+}
+
BPF_DEATH_TEST_C(ParameterRestrictions,
clock_gettime_crash_monotonic_raw,
DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()),
@@ -107,6 +127,17 @@
syscall(SYS_clock_gettime, CLOCK_MONOTONIC_RAW, &ts);
}
+BPF_DEATH_TEST_C(ParameterRestrictions,
+ clock_nanosleep_crash_clock_fd,
+ DEATH_SEGV_MESSAGE(sandbox::GetErrorMessageContentForTests()),
+ RestrictClockIdPolicy) {
+ struct timespec ts;
+ struct timespec out_ts;
+ ts.tv_sec = 0;
+ ts.tv_nsec = 0;
+ syscall(SYS_clock_nanosleep, (~0) | CLOCKFD, 0, &ts, &out_ts);
+}
+
#if !defined(OS_ANDROID)
BPF_DEATH_TEST_C(ParameterRestrictions,
clock_gettime_crash_cpu_clock,
diff -ur ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc
--- ../qtwebengine-everywhere-src-5.13.2.orig/src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2020-03-25 12:57:05.213021508 +0000
+++ ./src/3rdparty/chromium/sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc 2020-03-25 13:06:50.881514077 +0000
@@ -35,9 +35,10 @@
return true;
case __NR_adjtimex: // Privileged.
case __NR_clock_adjtime: // Privileged.
- case __NR_clock_getres: // Could be allowed.
- case __NR_clock_gettime:
- case __NR_clock_nanosleep: // Could be allowed.
+ case __NR_clock_getres: // Allowed only on Android with parameters
+ // filtered by RestrictClokID().
+ case __NR_clock_gettime: // Parameters filtered by RestrictClockID().
+ case __NR_clock_nanosleep: // Parameters filtered by RestrictClockID().
case __NR_clock_settime: // Privileged.
#if defined(__i386__) || \
(defined(ARCH_CPU_MIPS_FAMILY) && defined(ARCH_CPU_32_BITS))

View File

@ -10,545 +10,6 @@ Subject: [PATCH] fix chromium headers
.../modules/video_coding/decoding_state.h | 1 +
4 files changed, 256 insertions(+), 250 deletions(-)
diff --git a/src/3rdparty/chromium/cc/base/list_container_helper.cc b/src/3rdparty/chromium/cc/base/list_container_helper.cc
index 380ad3dd1..c4a9245d9 100644
--- a/src/3rdparty/chromium/cc/base/list_container_helper.cc
+++ b/src/3rdparty/chromium/cc/base/list_container_helper.cc
@@ -13,258 +13,8 @@
#include "base/macros.h"
#include "base/memory/aligned_memory.h"
-namespace {
-const size_t kDefaultNumElementTypesToReserve = 32;
-} // namespace
-
namespace cc {
-// CharAllocator
-////////////////////////////////////////////////////
-// This class deals only with char* and void*. It does allocation and passing
-// out raw pointers, as well as memory deallocation when being destroyed.
-class ListContainerHelper::CharAllocator {
- public:
- // CharAllocator::InnerList
- /////////////////////////////////////////////
- // This class holds the raw memory chunk, as well as information about its
- // size and availability.
- struct InnerList {
- std::unique_ptr<char[], base::AlignedFreeDeleter> data;
- // The number of elements in total the memory can hold. The difference
- // between capacity and size is the how many more elements this list can
- // hold.
- size_t capacity;
- // The number of elements have been put into this list.
- size_t size;
- // The size of each element is in bytes. This is used to move from between
- // elements' memory locations.
- size_t step;
-
- InnerList() : capacity(0), size(0), step(0) {}
-
- void Erase(char* position) {
- // Confident that destructor is called by caller of this function. Since
- // CharAllocator does not handle construction after
- // allocation, it doesn't handle desctrution before deallocation.
- DCHECK_LE(position, LastElement());
- DCHECK_GE(position, Begin());
- char* start = position + step;
- std::copy(start, End(), position);
-
- --size;
- // Decrease capacity to avoid creating not full not last InnerList.
- --capacity;
- }
-
- void InsertBefore(size_t alignment, char** position, size_t count) {
- DCHECK_LE(*position, LastElement() + step);
- DCHECK_GE(*position, Begin());
-
- // Adjust the size and capacity
- size_t old_size = size;
- size += count;
- capacity = size;
-
- // Allocate the new data and update the iterator's pointer.
- std::unique_ptr<char[], base::AlignedFreeDeleter> new_data(
- static_cast<char*>(base::AlignedAlloc(size * step, alignment)));
- size_t position_offset = *position - Begin();
- *position = new_data.get() + position_offset;
-
- // Copy the data before the inserted segment
- memcpy(new_data.get(), data.get(), position_offset);
- // Copy the data after the inserted segment.
- memcpy(new_data.get() + position_offset + count * step,
- data.get() + position_offset, old_size * step - position_offset);
- data = std::move(new_data);
- }
-
- bool IsEmpty() const { return !size; }
- bool IsFull() { return capacity == size; }
- size_t NumElementsAvailable() const { return capacity - size; }
-
- void* AddElement() {
- DCHECK_LT(size, capacity);
- ++size;
- return LastElement();
- }
-
- void RemoveLast() {
- DCHECK(!IsEmpty());
- --size;
- }
-
- char* Begin() const { return data.get(); }
- char* End() const { return data.get() + size * step; }
- char* LastElement() const { return data.get() + (size - 1) * step; }
- char* ElementAt(size_t index) const { return data.get() + index * step; }
-
- private:
- DISALLOW_COPY_AND_ASSIGN(InnerList);
- };
-
- CharAllocator(size_t alignment, size_t element_size, size_t element_count)
- // base::AlignedAlloc does not accept alignment less than sizeof(void*).
- : alignment_(std::max(sizeof(void*), alignment)),
- element_size_(element_size),
- size_(0),
- last_list_index_(0),
- last_list_(nullptr) {
- // If this fails, then alignment of elements after the first could be wrong,
- // and we need to pad sizes to fix that.
- DCHECK_EQ(element_size % alignment, 0u);
- AllocateNewList(element_count > 0 ? element_count
- : kDefaultNumElementTypesToReserve);
- last_list_ = storage_[last_list_index_].get();
- }
-
- ~CharAllocator() = default;
-
- void* Allocate() {
- if (last_list_->IsFull()) {
- // Only allocate a new list if there isn't a spare one still there from
- // previous usage.
- if (last_list_index_ + 1 >= storage_.size())
- AllocateNewList(last_list_->capacity * 2);
-
- ++last_list_index_;
- last_list_ = storage_[last_list_index_].get();
- }
-
- ++size_;
- return last_list_->AddElement();
- }
-
- size_t alignment() const { return alignment_; }
- size_t element_size() const { return element_size_; }
- size_t list_count() const { return storage_.size(); }
- size_t size() const { return size_; }
- bool IsEmpty() const { return size() == 0; }
-
- size_t Capacity() const {
- size_t capacity_sum = 0;
- for (const auto& inner_list : storage_)
- capacity_sum += inner_list->capacity;
- return capacity_sum;
- }
-
- void Clear() {
- // Remove all except for the first InnerList.
- DCHECK(!storage_.empty());
- storage_.erase(storage_.begin() + 1, storage_.end());
- last_list_index_ = 0;
- last_list_ = storage_[0].get();
- last_list_->size = 0;
- size_ = 0;
- }
-
- void RemoveLast() {
- DCHECK(!IsEmpty());
- last_list_->RemoveLast();
- if (last_list_->IsEmpty() && last_list_index_ > 0) {
- --last_list_index_;
- last_list_ = storage_[last_list_index_].get();
-
- // If there are now two empty inner lists, free one of them.
- if (last_list_index_ + 2 < storage_.size())
- storage_.pop_back();
- }
- --size_;
- }
-
- void Erase(PositionInCharAllocator* position) {
- DCHECK_EQ(this, position->ptr_to_container);
-
- // Update |position| to point to the element after the erased element.
- InnerList* list = storage_[position->vector_index].get();
- char* item_iterator = position->item_iterator;
- if (item_iterator == list->LastElement())
- position->Increment();
-
- list->Erase(item_iterator);
- // TODO(weiliangc): Free the InnerList if it is empty.
- --size_;
- }
-
- void InsertBefore(ListContainerHelper::Iterator* position, size_t count) {
- if (!count)
- return;
-
- // If |position| is End(), then append |count| elements at the end. This
- // will happen to not invalidate any iterators or memory.
- if (!position->item_iterator) {
- // Set |position| to be the first inserted element.
- Allocate();
- position->vector_index = storage_.size() - 1;
- position->item_iterator = storage_[position->vector_index]->LastElement();
- // Allocate the rest.
- for (size_t i = 1; i < count; ++i)
- Allocate();
- } else {
- storage_[position->vector_index]->InsertBefore(
- alignment_, &position->item_iterator, count);
- size_ += count;
- }
- }
-
- InnerList* InnerListById(size_t id) const {
- DCHECK_LT(id, storage_.size());
- return storage_[id].get();
- }
-
- size_t FirstInnerListId() const {
- // |size_| > 0 means that at least one vector in |storage_| will be
- // non-empty.
- DCHECK_GT(size_, 0u);
- size_t id = 0;
- while (storage_[id]->size == 0)
- ++id;
- return id;
- }
-
- size_t LastInnerListId() const {
- // |size_| > 0 means that at least one vector in |storage_| will be
- // non-empty.
- DCHECK_GT(size_, 0u);
- size_t id = storage_.size() - 1;
- while (storage_[id]->size == 0)
- --id;
- return id;
- }
-
- size_t NumAvailableElementsInLastList() const {
- return last_list_->NumElementsAvailable();
- }
-
- private:
- void AllocateNewList(size_t list_size) {
- std::unique_ptr<InnerList> new_list(new InnerList);
- new_list->capacity = list_size;
- new_list->size = 0;
- new_list->step = element_size_;
- new_list->data.reset(static_cast<char*>(
- base::AlignedAlloc(list_size * element_size_, alignment_)));
- storage_.push_back(std::move(new_list));
- }
-
- std::vector<std::unique_ptr<InnerList>> storage_;
- const size_t alignment_;
- const size_t element_size_;
-
- // The number of elements in the list.
- size_t size_;
-
- // The index of the last list to have had elements added to it, or the only
- // list if the container has not had elements added since being cleared.
- size_t last_list_index_;
-
- // This is equivalent to |storage_[last_list_index_]|.
- InnerList* last_list_;
-
- DISALLOW_COPY_AND_ASSIGN(CharAllocator);
-};
-
// PositionInCharAllocator
//////////////////////////////////////////////////////
ListContainerHelper::PositionInCharAllocator::PositionInCharAllocator(
diff --git a/src/3rdparty/chromium/cc/base/list_container_helper.h b/src/3rdparty/chromium/cc/base/list_container_helper.h
index c79cf1f18..a44ecb4de 100644
--- a/src/3rdparty/chromium/cc/base/list_container_helper.h
+++ b/src/3rdparty/chromium/cc/base/list_container_helper.h
@@ -8,10 +8,18 @@
#include <stddef.h>
#include <memory>
+#include <algorithm>
+#include <vector>
+#include "base/logging.h"
#include "base/macros.h"
+#include "base/memory/aligned_memory.h"
#include "cc/base/base_export.h"
+namespace {
+const size_t kDefaultNumElementTypesToReserve = 32;
+} // namespace
+
namespace cc {
// Helper class for ListContainer non-templated logic. All methods are private,
@@ -174,6 +182,252 @@ class CC_BASE_EXPORT ListContainerHelper final {
DISALLOW_COPY_AND_ASSIGN(ListContainerHelper);
};
+// CharAllocator
+////////////////////////////////////////////////////
+// This class deals only with char* and void*. It does allocation and passing
+// out raw pointers, as well as memory deallocation when being destroyed.
+class ListContainerHelper::CharAllocator {
+ public:
+ // CharAllocator::InnerList
+ /////////////////////////////////////////////
+ // This class holds the raw memory chunk, as well as information about its
+ // size and availability.
+ struct InnerList {
+ std::unique_ptr<char[], base::AlignedFreeDeleter> data;
+ // The number of elements in total the memory can hold. The difference
+ // between capacity and size is the how many more elements this list can
+ // hold.
+ size_t capacity;
+ // The number of elements have been put into this list.
+ size_t size;
+ // The size of each element is in bytes. This is used to move from between
+ // elements' memory locations.
+ size_t step;
+
+ InnerList() : capacity(0), size(0), step(0) {}
+
+ void Erase(char* position) {
+ // Confident that destructor is called by caller of this function. Since
+ // CharAllocator does not handle construction after
+ // allocation, it doesn't handle desctrution before deallocation.
+ DCHECK_LE(position, LastElement());
+ DCHECK_GE(position, Begin());
+ char* start = position + step;
+ std::copy(start, End(), position);
+
+ --size;
+ // Decrease capacity to avoid creating not full not last InnerList.
+ --capacity;
+ }
+
+ void InsertBefore(size_t alignment, char** position, size_t count) {
+ DCHECK_LE(*position, LastElement() + step);
+ DCHECK_GE(*position, Begin());
+
+ // Adjust the size and capacity
+ size_t old_size = size;
+ size += count;
+ capacity = size;
+
+ // Allocate the new data and update the iterator's pointer.
+ std::unique_ptr<char[], base::AlignedFreeDeleter> new_data(
+ static_cast<char*>(base::AlignedAlloc(size * step, alignment)));
+ size_t position_offset = *position - Begin();
+ *position = new_data.get() + position_offset;
+
+ // Copy the data before the inserted segment
+ memcpy(new_data.get(), data.get(), position_offset);
+ // Copy the data after the inserted segment.
+ memcpy(new_data.get() + position_offset + count * step,
+ data.get() + position_offset, old_size * step - position_offset);
+ data = std::move(new_data);
+ }
+
+ bool IsEmpty() const { return !size; }
+ bool IsFull() { return capacity == size; }
+ size_t NumElementsAvailable() const { return capacity - size; }
+
+ void* AddElement() {
+ DCHECK_LT(size, capacity);
+ ++size;
+ return LastElement();
+ }
+
+ void RemoveLast() {
+ DCHECK(!IsEmpty());
+ --size;
+ }
+
+ char* Begin() const { return data.get(); }
+ char* End() const { return data.get() + size * step; }
+ char* LastElement() const { return data.get() + (size - 1) * step; }
+ char* ElementAt(size_t index) const { return data.get() + index * step; }
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(InnerList);
+ };
+
+ CharAllocator(size_t alignment, size_t element_size, size_t element_count)
+ // base::AlignedAlloc does not accept alignment less than sizeof(void*).
+ : alignment_(std::max(sizeof(void*), alignment)),
+ element_size_(element_size),
+ size_(0),
+ last_list_index_(0),
+ last_list_(nullptr) {
+ // If this fails, then alignment of elements after the first could be wrong,
+ // and we need to pad sizes to fix that.
+ DCHECK_EQ(element_size % alignment, 0u);
+ AllocateNewList(element_count > 0 ? element_count
+ : kDefaultNumElementTypesToReserve);
+ last_list_ = storage_[last_list_index_].get();
+ }
+
+ ~CharAllocator() = default;
+
+ void* Allocate() {
+ if (last_list_->IsFull()) {
+ // Only allocate a new list if there isn't a spare one still there from
+ // previous usage.
+ if (last_list_index_ + 1 >= storage_.size())
+ AllocateNewList(last_list_->capacity * 2);
+
+ ++last_list_index_;
+ last_list_ = storage_[last_list_index_].get();
+ }
+
+ ++size_;
+ return last_list_->AddElement();
+ }
+
+ size_t alignment() const { return alignment_; }
+ size_t element_size() const { return element_size_; }
+ size_t list_count() const { return storage_.size(); }
+ size_t size() const { return size_; }
+ bool IsEmpty() const { return size() == 0; }
+
+ size_t Capacity() const {
+ size_t capacity_sum = 0;
+ for (const auto& inner_list : storage_)
+ capacity_sum += inner_list->capacity;
+ return capacity_sum;
+ }
+
+ void Clear() {
+ // Remove all except for the first InnerList.
+ DCHECK(!storage_.empty());
+ storage_.erase(storage_.begin() + 1, storage_.end());
+ last_list_index_ = 0;
+ last_list_ = storage_[0].get();
+ last_list_->size = 0;
+ size_ = 0;
+ }
+
+ void RemoveLast() {
+ DCHECK(!IsEmpty());
+ last_list_->RemoveLast();
+ if (last_list_->IsEmpty() && last_list_index_ > 0) {
+ --last_list_index_;
+ last_list_ = storage_[last_list_index_].get();
+
+ // If there are now two empty inner lists, free one of them.
+ if (last_list_index_ + 2 < storage_.size())
+ storage_.pop_back();
+ }
+ --size_;
+ }
+
+ void Erase(PositionInCharAllocator* position) {
+ DCHECK_EQ(this, position->ptr_to_container);
+
+ // Update |position| to point to the element after the erased element.
+ InnerList* list = storage_[position->vector_index].get();
+ char* item_iterator = position->item_iterator;
+ if (item_iterator == list->LastElement())
+ position->Increment();
+
+ list->Erase(item_iterator);
+ // TODO(weiliangc): Free the InnerList if it is empty.
+ --size_;
+ }
+
+ void InsertBefore(ListContainerHelper::Iterator* position, size_t count) {
+ if (!count)
+ return;
+
+ // If |position| is End(), then append |count| elements at the end. This
+ // will happen to not invalidate any iterators or memory.
+ if (!position->item_iterator) {
+ // Set |position| to be the first inserted element.
+ Allocate();
+ position->vector_index = storage_.size() - 1;
+ position->item_iterator = storage_[position->vector_index]->LastElement();
+ // Allocate the rest.
+ for (size_t i = 1; i < count; ++i)
+ Allocate();
+ } else {
+ storage_[position->vector_index]->InsertBefore(
+ alignment_, &position->item_iterator, count);
+ size_ += count;
+ }
+ }
+
+ InnerList* InnerListById(size_t id) const {
+ DCHECK_LT(id, storage_.size());
+ return storage_[id].get();
+ }
+
+ size_t FirstInnerListId() const {
+ // |size_| > 0 means that at least one vector in |storage_| will be
+ // non-empty.
+ DCHECK_GT(size_, 0u);
+ size_t id = 0;
+ while (storage_[id]->size == 0)
+ ++id;
+ return id;
+ }
+
+ size_t LastInnerListId() const {
+ // |size_| > 0 means that at least one vector in |storage_| will be
+ // non-empty.
+ DCHECK_GT(size_, 0u);
+ size_t id = storage_.size() - 1;
+ while (storage_[id]->size == 0)
+ --id;
+ return id;
+ }
+
+ size_t NumAvailableElementsInLastList() const {
+ return last_list_->NumElementsAvailable();
+ }
+
+ private:
+ void AllocateNewList(size_t list_size) {
+ std::unique_ptr<InnerList> new_list(new InnerList);
+ new_list->capacity = list_size;
+ new_list->size = 0;
+ new_list->step = element_size_;
+ new_list->data.reset(static_cast<char*>(
+ base::AlignedAlloc(list_size * element_size_, alignment_)));
+ storage_.push_back(std::move(new_list));
+ }
+
+ std::vector<std::unique_ptr<InnerList>> storage_;
+ const size_t alignment_;
+ const size_t element_size_;
+
+ // The number of elements in the list.
+ size_t size_;
+
+ // The index of the last list to have had elements added to it, or the only
+ // list if the container has not had elements added since being cleared.
+ size_t last_list_index_;
+
+ // This is equivalent to |storage_[last_list_index_]|.
+ InnerList* last_list_;
+
+ DISALLOW_COPY_AND_ASSIGN(CharAllocator);
+};
+
} // namespace cc
#endif // CC_BASE_LIST_CONTAINER_HELPER_H_
diff --git a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h b/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h
index 22528c948..69e624e8b 100644
--- a/src/3rdparty/chromium/third_party/webrtc/modules/audio_processing/aec3/clockdrift_detector.h

View File

@ -1,13 +0,0 @@
diff --git a/src/3rdparty/chromium/third_party/blink/renderer/core/dom/document.cc b/src/3rdparty/chromium/third_party/blink/renderer/core/dom/document.cc
index 18100c7b7..542f9bd11 100644
--- a/src/3rdparty/chromium/third_party/blink/renderer/core/dom/document.cc
+++ b/src/3rdparty/chromium/third_party/blink/renderer/core/dom/document.cc
@@ -5710,7 +5710,7 @@ static ParseQualifiedNameResult ParseQualifiedNameInternal(
for (unsigned i = 0; i < length;) {
UChar32 c;
- U16_NEXT(characters, i, length, c)
+ U16_NEXT(characters, i, length, c);
if (c == ':') {
if (saw_colon)
return ParseQualifiedNameResult(kQNMultipleColons);

View File

@ -0,0 +1,35 @@
diff -up qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.cc.gcc10 qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.cc
diff -up qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h.gcc10 qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h.gcc10 2020-01-20 04:37:42.000000000 -0600
+++ qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/media/cdm/supported_cdm_versions.h 2020-03-25 08:19:35.628534572 -0500
@@ -6,6 +6,7 @@
#define MEDIA_CDM_SUPPORTED_CDM_VERSIONS_H_
#include <array>
+#include <cstdlib>
#include "media/base/media_export.h"
#include "media/cdm/api/content_decryption_module.h"
diff -up qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h.gcc10 qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h.gcc10 2020-01-20 04:37:42.000000000 -0600
+++ qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/base/task_runner.h 2020-03-17 16:59:11.432193734 -0500
@@ -18,6 +18,7 @@
#define INCLUDE_PERFETTO_BASE_TASK_RUNNER_H_
#include <functional>
+#include <cstdint>
#include "perfetto/base/export.h"
diff -up qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h.gcc10 qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h
--- qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h.gcc10 2020-01-20 04:37:42.000000000 -0600
+++ qtwebengine-everywhere-src-5.14.1.orig/src/3rdparty/chromium/third_party/webrtc/call/rtx_receive_stream.h 2020-03-25 09:37:13.373280961 -0500
@@ -11,6 +11,8 @@
#ifndef CALL_RTX_RECEIVE_STREAM_H_
#define CALL_RTX_RECEIVE_STREAM_H_
+#include <cstdlib>
+#include <cstdint>
#include <map>
#include "call/rtp_packet_sink_interface.h"

View File

@ -1,6 +1,6 @@
diff -ur qtwebengine-everywhere-src-5.10.0/src/core/config/linux.pri qtwebengine-everywhere-src-5.10.0-linux-pri/src/core/config/linux.pri
--- qtwebengine-everywhere-src-5.10.0/src/core/config/linux.pri 2017-11-29 09:42:29.000000000 +0100
+++ qtwebengine-everywhere-src-5.10.0-linux-pri/src/core/config/linux.pri 2017-12-25 12:07:40.262411459 +0100
diff -ur qtwebengine-everywhere-src-5.10.0/src/buildtools/config/linux.pri qtwebengine-everywhere-src-5.10.0-linux-pri/src/buildtools/config/linux.pri
--- qtwebengine-everywhere-src-5.10.0/src/buildtools/config/linux.pri 2017-11-29 09:42:29.000000000 +0100
+++ qtwebengine-everywhere-src-5.10.0-linux-pri/src/buildtools/config/linux.pri 2017-12-25 12:07:40.262411459 +0100
@@ -157,3 +157,19 @@
#qtConfig(webengine-system-jsoncpp): gn_args += use_system_jsoncpp=true
#qtConfig(webengine-system-libsrtp: gn_args += use_system_libsrtp=true

View File

@ -1,7 +1,7 @@
diff --git a/src/core/config/functions.pri b/src/core/config/functions.pri
diff --git a/src/buildtools/config/functions.pri b/src/buildtools/config/functions.pri
index 8c11faa16..191d3d623 100644
--- a/src/core/config/functions.pri
+++ b/src/core/config/functions.pri
--- a/src/buildtools/config/functions.pri
+++ b/src/buildrools/config/functions.pri
@@ -1,5 +1,5 @@
defineReplace(qtwebengine_extractCFlag) {
- CFLAGS = $$QMAKE_CC $$QMAKE_CFLAGS

View File

@ -1,7 +1,7 @@
diff --git a/src/core/config/linux.pri b/src/core/config/linux.pri
diff --git a/src/buildtools/config/linux.pri b/src/buildtools/config/linux.pri
index f45c418fe..f6c7b714e 100644
--- a/src/core/config/linux.pri
+++ b/src/core/config/linux.pri
--- a/src/buildtools/config/linux.pri
+++ b/src/buildtools/config/linux.pri
@@ -87,7 +87,9 @@ contains(QT_ARCH, "arm") {
gn_args += arm_use_neon=false
# If the toolchain does not explicitly specify to use NEON instructions

View File

@ -1,2 +1,2 @@
SHA512 (qtwebengine-everywhere-src-5.13.2-clean.tar.xz) = 1797f1e67ac02e3f8277698cc308bdf6ebffcf646c89121d12353a42a9b6392f2180bfe3e5d051d1a5e205ece182c183a3914376c547e6239a71f2c64f2fe775
SHA512 (pulseaudio-12.2-headers.tar.gz) = a5a9bcbb16030b3bc83cc0cc8f5e7f90e0723d3e83258a5c77eacb32eaa267118a73fa7814fbcc99a24e4907916a2b371ebb6dedc4f45541c3acf6c834fd35be
SHA512 (qtwebengine-everywhere-src-5.14.1-clean.tar.xz) = a5c8334e87bc7bf42249b0c1afbf658438de8d05b519d681f3fe3639d65ffd7c3113792cc2f89bed73d9704ac520e15eff94dd5e4a5d36359ac77b4cedc6643f