pull/1/head
changed/i9/chromium-114.0.5735.133-1.el9.inferit
commit
0373901a11
@ -0,0 +1 @@
|
||||
e96e84c0380e47a928d7e62b3e64360fad9c8183 SOURCES/chromium-114.0.5735.133-clean.tar.xz
|
@ -0,0 +1 @@
|
||||
SOURCES/chromium-114.0.5735.133-clean.tar.xz
|
@ -0,0 +1,131 @@
|
||||
diff -urN chromium-114.0.5735.133.orig/components/search_engines/prepopulated_engines.json chromium-114.0.5735.133/components/search_engines/prepopulated_engines.json
|
||||
--- chromium-114.0.5735.133.orig/components/search_engines/prepopulated_engines.json 2023-06-30 16:00:39.781216875 +0300
|
||||
+++ chromium-114.0.5735.133/components/search_engines/prepopulated_engines.json 2023-06-30 16:10:06.030718785 +0300
|
||||
@@ -560,7 +560,7 @@
|
||||
"suggest_url": "https://suggest.yandex.by/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
|
||||
"image_url": "https://yandex.by/images/search/?rpt=imageview",
|
||||
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
|
||||
- "new_tab_url": "https://www.yandex.by/chrome/newtab",
|
||||
+ "new_tab_url": "chrome://new-tab-page",
|
||||
"type": "SEARCH_ENGINE_YANDEX",
|
||||
"id": 15
|
||||
},
|
||||
@@ -573,6 +573,7 @@
|
||||
"suggest_url": "https://suggest.yandex.com/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}&uil=en&v=3&sn=5",
|
||||
"image_url": "https://yandex.com/images/search?rpt=imageview",
|
||||
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
|
||||
+ "new_tab_url": "chrome://new-tab-page",
|
||||
"type": "SEARCH_ENGINE_YANDEX",
|
||||
"id": 15
|
||||
},
|
||||
@@ -586,7 +587,7 @@
|
||||
"suggest_url": "https://suggest.yandex.kz/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
|
||||
"image_url": "https://yandex.kz/images/search/?rpt=imageview",
|
||||
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
|
||||
- "new_tab_url": "https://www.yandex.kz/chrome/newtab",
|
||||
+ "new_tab_url": "chrome://new-tab-page",
|
||||
"type": "SEARCH_ENGINE_YANDEX",
|
||||
"id": 15
|
||||
},
|
||||
@@ -600,7 +601,7 @@
|
||||
"suggest_url": "https://suggest.yandex.ru/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
|
||||
"image_url": "https://yandex.ru/images/search/?rpt=imageview",
|
||||
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
|
||||
- "new_tab_url": "https://www.yandex.ru/chrome/newtab",
|
||||
+ "new_tab_url": "chrome://new-tab-page",
|
||||
"type": "SEARCH_ENGINE_YANDEX",
|
||||
"id": 15
|
||||
},
|
||||
@@ -613,7 +614,7 @@
|
||||
"suggest_url": "https://suggest.yandex.com.tr/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
|
||||
"image_url": "https://yandex.com.tr/gorsel/search?rpt=imageview",
|
||||
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
|
||||
- "new_tab_url": "https://www.yandex.com.tr/chrome/newtab",
|
||||
+ "new_tab_url": "chrome://new-tab-page",
|
||||
"type": "SEARCH_ENGINE_YANDEX",
|
||||
"id": 15
|
||||
},
|
||||
@@ -627,7 +628,7 @@
|
||||
"suggest_url": "https://suggest.yandex.ua/suggest-ff.cgi?part={searchTerms}&{google:cursorPosition}",
|
||||
"image_url": "https://yandex.ua/images/search/?rpt=imageview",
|
||||
"image_url_post_params": "upfile={google:imageThumbnail},original_width={google:imageOriginalWidth},original_height={google:imageOriginalHeight},prg=1",
|
||||
- "new_tab_url": "https://www.yandex.ua/chrome/newtab",
|
||||
+ "new_tab_url": "chrome://new-tab-page",
|
||||
"type": "SEARCH_ENGINE_YANDEX",
|
||||
"id": 15
|
||||
},
|
||||
diff -urN chromium-114.0.5735.133.orig/components/search_engines/template_url_prepopulate_data.cc chromium-114.0.5735.133/components/search_engines/template_url_prepopulate_data.cc
|
||||
--- chromium-114.0.5735.133.orig/components/search_engines/template_url_prepopulate_data.cc 2023-06-30 16:00:39.780216890 +0300
|
||||
+++ chromium-114.0.5735.133/components/search_engines/template_url_prepopulate_data.cc 2023-06-30 16:12:58.769100093 +0300
|
||||
@@ -29,6 +29,7 @@
|
||||
|
||||
// Default (for countries with no better engine set)
|
||||
const PrepopulatedEngine* const engines_default[] = {
|
||||
+ &yandex_com,
|
||||
&google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
@@ -156,8 +157,8 @@
|
||||
|
||||
// Belarus
|
||||
const PrepopulatedEngine* const engines_BY[] = {
|
||||
- &google,
|
||||
&yandex_by,
|
||||
+ &google,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -435,10 +436,10 @@
|
||||
|
||||
// Iraq
|
||||
const PrepopulatedEngine* const engines_IQ[] = {
|
||||
+ &yandex_tr,
|
||||
&google,
|
||||
&bing,
|
||||
&yahoo,
|
||||
- &yandex_tr,
|
||||
&petal_search,
|
||||
};
|
||||
|
||||
@@ -525,8 +526,8 @@
|
||||
|
||||
// Kazakhstan
|
||||
const PrepopulatedEngine* const engines_KZ[] = {
|
||||
- &google,
|
||||
&yandex_kz,
|
||||
+ &google,
|
||||
&mail_ru,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -894,8 +895,8 @@
|
||||
|
||||
// Turkey
|
||||
const PrepopulatedEngine* const engines_TR[] = {
|
||||
- &google,
|
||||
&yandex_tr,
|
||||
+ &google,
|
||||
&yahoo_tr,
|
||||
&bing,
|
||||
&duckduckgo,
|
||||
@@ -1382,12 +1383,15 @@
|
||||
t_urls = GetPrepopulationSetFromCountryID(
|
||||
country_codes::GetCountryIDFromPrefs(prefs));
|
||||
}
|
||||
- if (default_search_provider_index) {
|
||||
- const auto itr =
|
||||
- base::ranges::find(t_urls, google.id, &TemplateURLData::prepopulate_id);
|
||||
- *default_search_provider_index =
|
||||
- itr == t_urls.end() ? 0 : std::distance(t_urls.begin(), itr);
|
||||
- }
|
||||
+ /* Making yandex_ru be the first in "const PrepopulatedEngine* const engines_RU[]"
|
||||
+ * makes it be the first item in chrome://settings/search,
|
||||
+ * but Google is still chosen by default.
|
||||
+ * Removed code calculated the distance between 0 and Google's position
|
||||
+ * and assign that position to default_search_provider_index,
|
||||
+ * so that Google still was the default search engine.
|
||||
+ * Instead, just use the first search engine as the default one.
|
||||
+ */
|
||||
+ if (default_search_provider_index) *default_search_provider_index = 0;
|
||||
return t_urls;
|
||||
}
|
||||
|
@ -0,0 +1,9 @@
|
||||
- Widevine is not a free library and cannot be shipped in fedora.
|
||||
You have to get it from Google first and install it under
|
||||
/usr/lib64/chromium-browser or /opt/google/chrome if you want
|
||||
Chromium to use widevine.
|
||||
|
||||
- Chromium uses the system ffmpeg-free library which is included in
|
||||
fedora >= 36 and centos-stream 9. This library contains free video
|
||||
codecs. If you want Chromium to use non-free video codecs, you need
|
||||
to install libavcodec-freeworld from rpmfusion-free.
|
After Width: | Height: | Size: 1011 B |
@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description="Chrome Remote Desktop host daemon"
|
||||
|
||||
[Service]
|
||||
User=%i
|
||||
Environment=HOME=%h
|
||||
ExecStart=@@CRD_PATH@@/chrome-remote-desktop --start --foreground
|
||||
ExecStop=@@CRD_PATH@@/chrome-remote-desktop --stop
|
||||
ExecReload=@@CRD_PATH@@/chrome-remote-desktop --reload
|
||||
Restart=always
|
||||
TimeoutStopSec=10
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-101.0.4951.41/content/common/user_agent.cc.fedora-user-agent chromium-101.0.4951.41/content/common/user_agent.cc
|
||||
--- chromium-101.0.4951.41/content/common/user_agent.cc.fedora-user-agent 2022-04-27 20:03:36.913767022 +0000
|
||||
+++ chromium-101.0.4951.41/content/common/user_agent.cc 2022-04-27 20:04:30.591942420 +0000
|
||||
@@ -34,7 +34,7 @@ std::string GetUserAgentPlatform() {
|
||||
#elif BUILDFLAG(IS_MAC)
|
||||
return "Macintosh; ";
|
||||
#elif BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)
|
||||
- return "X11; "; // strange, but that's what Firefox uses
|
||||
+ return "X11; Fedora; "; // strange, but that's what Firefox uses
|
||||
#elif BUILDFLAG(IS_ANDROID)
|
||||
return "Linux; ";
|
||||
#elif BUILDFLAG(IS_FUCHSIA)
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,134 @@
|
||||
diff -up chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py
|
||||
--- chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py.116 2022-07-05 13:31:29.434673638 +0000
|
||||
+++ chromium-103.0.5060.53/third_party/catapult/third_party/six/six.py 2022-07-05 21:52:01.884578748 +0000
|
||||
@@ -29,7 +29,7 @@ import sys
|
||||
import types
|
||||
|
||||
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
||||
-__version__ = "1.15.0"
|
||||
+__version__ = "1.16.0"
|
||||
|
||||
|
||||
# Useful for very coarse version differentiation.
|
||||
@@ -71,6 +71,11 @@ else:
|
||||
MAXSIZE = int((1 << 63) - 1)
|
||||
del X
|
||||
|
||||
+if PY34:
|
||||
+ from importlib.util import spec_from_loader
|
||||
+else:
|
||||
+ spec_from_loader = None
|
||||
+
|
||||
|
||||
def _add_doc(func, doc):
|
||||
"""Add documentation to a function."""
|
||||
@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
|
||||
return self
|
||||
return None
|
||||
|
||||
+ def find_spec(self, fullname, path, target=None):
|
||||
+ if fullname in self.known_modules:
|
||||
+ return spec_from_loader(fullname, self)
|
||||
+ return None
|
||||
+
|
||||
def __get_module(self, fullname):
|
||||
try:
|
||||
return self.known_modules[fullname]
|
||||
@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object):
|
||||
return None
|
||||
get_source = get_code # same as get_code
|
||||
|
||||
+ def create_module(self, spec):
|
||||
+ return self.load_module(spec.name)
|
||||
+
|
||||
+ def exec_module(self, module):
|
||||
+ pass
|
||||
+
|
||||
_importer = _SixMetaPathImporter(__name__)
|
||||
|
||||
|
||||
diff -up chromium-103.0.5060.53/third_party/six/src/six.py.116 chromium-103.0.5060.53/third_party/six/src/six.py
|
||||
--- chromium-103.0.5060.53/third_party/six/src/six.py.116 2022-07-05 13:32:28.916687658 +0000
|
||||
+++ chromium-103.0.5060.53/third_party/six/src/six.py 2022-07-05 21:59:42.561240407 +0000
|
||||
@@ -29,7 +29,7 @@ import sys
|
||||
import types
|
||||
|
||||
__author__ = "Benjamin Peterson <benjamin@python.org>"
|
||||
-__version__ = "1.14.0"
|
||||
+__version__ = "1.16.0"
|
||||
|
||||
|
||||
# Useful for very coarse version differentiation.
|
||||
@@ -71,6 +71,11 @@ else:
|
||||
MAXSIZE = int((1 << 63) - 1)
|
||||
del X
|
||||
|
||||
+if PY34:
|
||||
+ from importlib.util import spec_from_loader
|
||||
+else:
|
||||
+ spec_from_loader = None
|
||||
+
|
||||
|
||||
def _add_doc(func, doc):
|
||||
"""Add documentation to a function."""
|
||||
@@ -186,6 +191,11 @@ class _SixMetaPathImporter(object):
|
||||
return self
|
||||
return None
|
||||
|
||||
+ def find_spec(self, fullname, path, target=None):
|
||||
+ if fullname in self.known_modules:
|
||||
+ return spec_from_loader(fullname, self)
|
||||
+ return None
|
||||
+
|
||||
def __get_module(self, fullname):
|
||||
try:
|
||||
return self.known_modules[fullname]
|
||||
@@ -223,6 +233,12 @@ class _SixMetaPathImporter(object):
|
||||
return None
|
||||
get_source = get_code # same as get_code
|
||||
|
||||
+ def create_module(self, spec):
|
||||
+ return self.load_module(spec.name)
|
||||
+
|
||||
+ def exec_module(self, module):
|
||||
+ pass
|
||||
+
|
||||
_importer = _SixMetaPathImporter(__name__)
|
||||
|
||||
|
||||
@@ -890,12 +906,11 @@ def ensure_binary(s, encoding='utf-8', e
|
||||
- `str` -> encoded to `bytes`
|
||||
- `bytes` -> `bytes`
|
||||
"""
|
||||
+ if isinstance(s, binary_type):
|
||||
+ return s
|
||||
if isinstance(s, text_type):
|
||||
return s.encode(encoding, errors)
|
||||
- elif isinstance(s, binary_type):
|
||||
- return s
|
||||
- else:
|
||||
- raise TypeError("not expecting type '%s'" % type(s))
|
||||
+ raise TypeError("not expecting type '%s'" % type(s))
|
||||
|
||||
|
||||
def ensure_str(s, encoding='utf-8', errors='strict'):
|
||||
@@ -909,12 +924,15 @@ def ensure_str(s, encoding='utf-8', erro
|
||||
- `str` -> `str`
|
||||
- `bytes` -> decoded to `str`
|
||||
"""
|
||||
- if not isinstance(s, (text_type, binary_type)):
|
||||
- raise TypeError("not expecting type '%s'" % type(s))
|
||||
+ # Optimization: Fast return for the common case.
|
||||
+ if type(s) is str:
|
||||
+ return s
|
||||
if PY2 and isinstance(s, text_type):
|
||||
- s = s.encode(encoding, errors)
|
||||
+ return s.encode(encoding, errors)
|
||||
elif PY3 and isinstance(s, binary_type):
|
||||
- s = s.decode(encoding, errors)
|
||||
+ return s.decode(encoding, errors)
|
||||
+ elif not isinstance(s, (text_type, binary_type)):
|
||||
+ raise TypeError("not expecting type '%s'" % type(s))
|
||||
return s
|
||||
|
||||
|
@ -0,0 +1,16 @@
|
||||
diff -up chromium-107.0.5304.121/media/filters/audio_file_reader.cc.me chromium-107.0.5304.121/media/filters/audio_file_reader.cc
|
||||
--- chromium-107.0.5304.121/media/filters/audio_file_reader.cc.me 2022-12-17 08:27:12.204753071 +0100
|
||||
+++ chromium-107.0.5304.121/media/filters/audio_file_reader.cc 2022-12-17 08:28:40.908211808 +0100
|
||||
@@ -243,10 +243,10 @@ bool AudioFileReader::OnNewFrame(
|
||||
// silence from being output. In the case where we are also discarding some
|
||||
// portion of the packet (as indicated by a negative pts), we further want to
|
||||
// adjust the duration downward by however much exists before zero.
|
||||
- if (audio_codec_ == AudioCodec::kAAC && frame->duration) {
|
||||
+ if (audio_codec_ == AudioCodec::kAAC && frame->pkt_duration) {
|
||||
const base::TimeDelta pkt_duration = ConvertFromTimeBase(
|
||||
glue_->format_context()->streams[stream_index_]->time_base,
|
||||
- frame->duration + std::min(static_cast<int64_t>(0), frame->pts));
|
||||
+ frame->pkt_duration + std::min(static_cast<int64_t>(0), frame->pts));
|
||||
const base::TimeDelta frame_duration =
|
||||
base::Seconds(frames_read / static_cast<double>(sample_rate_));
|
||||
|
@ -0,0 +1,16 @@
|
||||
diff -up chromium-107.0.5304.121/media/BUILD.gn.me chromium-107.0.5304.121/media/BUILD.gn
|
||||
--- chromium-107.0.5304.121/media/BUILD.gn.me 2022-12-17 12:35:44.546779129 +0100
|
||||
+++ chromium-107.0.5304.121/media/BUILD.gn 2022-12-17 12:35:59.296047028 +0100
|
||||
@@ -64,12 +64,6 @@ buildflag_header("media_buildflags") {
|
||||
}
|
||||
}
|
||||
|
||||
-if (proprietary_codecs && media_use_ffmpeg) {
|
||||
- assert(
|
||||
- ffmpeg_branding != "Chromium",
|
||||
- "proprietary codecs and ffmpeg_branding set to Chromium are incompatible")
|
||||
-}
|
||||
-
|
||||
# Common configuration for targets in the media directory; these must not be
|
||||
# exported since things like USE_NEON and USE_CRAS have different meanings
|
||||
# elsewhere in the code base.
|
@ -0,0 +1,39 @@
|
||||
diff -up chromium-105.0.5195.52/build/linux/unbundle/libusb.gn.gnsystem chromium-105.0.5195.52/build/linux/unbundle/libusb.gn
|
||||
--- chromium-105.0.5195.52/build/linux/unbundle/libusb.gn.gnsystem 2022-09-01 12:23:27.557313611 +0000
|
||||
+++ chromium-105.0.5195.52/build/linux/unbundle/libusb.gn 2022-09-01 12:23:27.557313611 +0000
|
||||
@@ -0,0 +1,24 @@
|
||||
+# Copyright 2016 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.
|
||||
+
|
||||
+import("//build/config/linux/pkg_config.gni")
|
||||
+import("//build/shim_headers.gni")
|
||||
+
|
||||
+pkg_config("system_libusb") {
|
||||
+ packages = [ "libusb-1.0" ]
|
||||
+}
|
||||
+
|
||||
+shim_headers("libusb_shim") {
|
||||
+ root_path = "src/libusb"
|
||||
+ headers = [
|
||||
+ "libusb.h",
|
||||
+ ]
|
||||
+}
|
||||
+
|
||||
+source_set("libusb") {
|
||||
+ deps = [
|
||||
+ ":libusb_shim",
|
||||
+ ]
|
||||
+ public_configs = [ ":system_libusb" ]
|
||||
+}
|
||||
diff -up chromium-105.0.5195.52/build/linux/unbundle/replace_gn_files.py.gnsystem chromium-105.0.5195.52/build/linux/unbundle/replace_gn_files.py
|
||||
--- chromium-105.0.5195.52/build/linux/unbundle/replace_gn_files.py.gnsystem 2022-09-01 12:23:27.558313577 +0000
|
||||
+++ chromium-105.0.5195.52/build/linux/unbundle/replace_gn_files.py 2022-09-01 12:36:01.870847125 +0000
|
||||
@@ -52,6 +52,7 @@ REPLACEMENTS = {
|
||||
'libjpeg': 'third_party/libjpeg.gni',
|
||||
'libjxl' : 'third_party/libjxl/BUILD.gn',
|
||||
'libpng': 'third_party/libpng/BUILD.gn',
|
||||
+ 'libusb': 'third_party/libusb/BUILD.gn',
|
||||
'libvpx': 'third_party/libvpx/BUILD.gn',
|
||||
'libwebp': 'third_party/libwebp/BUILD.gn',
|
||||
'libxml': 'third_party/libxml/BUILD.gn',
|
@ -0,0 +1,36 @@
|
||||
diff -up chromium-108.0.5359.124/third_party/wayland/src/src/wayland-shm.c.me chromium-108.0.5359.124/third_party/wayland/src/src/wayland-shm.c
|
||||
--- chromium-108.0.5359.124/third_party/wayland/src/src/wayland-shm.c.me 2022-12-24 11:08:03.212333476 +0100
|
||||
+++ chromium-108.0.5359.124/third_party/wayland/src/src/wayland-shm.c 2022-12-24 11:08:18.316606155 +0100
|
||||
@@ -44,7 +44,7 @@
|
||||
#include <signal.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
-#include <fcntl.h>
|
||||
+#include <linux/fcntl.h>
|
||||
|
||||
#include "wayland-os.h"
|
||||
#include "wayland-util.h"
|
||||
diff -up chromium-102.0.5005.115/v8/src/base/platform/platform-posix.cc.el7-memfd-include chromium-102.0.5005.115/v8/src/base/platform/platform-posix.cc
|
||||
--- chromium-102.0.5005.115/v8/src/base/platform/platform-posix.cc.el7-memfd-include 2022-06-15 10:52:49.553817031 -0400
|
||||
+++ chromium-102.0.5005.115/v8/src/base/platform/platform-posix.cc 2022-06-15 10:56:15.775173013 -0400
|
||||
@@ -56,6 +56,7 @@
|
||||
|
||||
#if V8_OS_LINUX
|
||||
#include <sys/prctl.h> // for prctl
|
||||
+#include <linux/memfd.h> // for MFD_CLOEXEC
|
||||
#endif
|
||||
|
||||
#if defined(V8_OS_FUCHSIA)
|
||||
diff -up iridium-browser-2022.12.108.1/third_party/wayland/src/cursor/os-compatibility.c.me iridium-browser-2022.12.108.1/third_party/wayland/src/cursor/os-compatibility.c
|
||||
--- iridium-browser-2022.12.108.1/third_party/wayland/src/cursor/os-compatibility.c.me 2022-12-08 21:59:43.502200984 +0100
|
||||
+++ iridium-browser-2022.12.108.1/third_party/wayland/src/cursor/os-compatibility.c 2022-12-08 22:13:53.375653343 +0100
|
||||
@@ -29,7 +29,8 @@
|
||||
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
-#include <fcntl.h>
|
||||
+#include <linux/fcntl.h> // for F_SEAL_SHRINK, F_ADD_SEALS, F_SEAL_SEAL
|
||||
+#include <linux/memfd.h> // for MFD_CLOEXEC
|
||||
#include <errno.h>
|
||||
#include <signal.h>
|
||||
#include <string.h>
|
@ -0,0 +1,11 @@
|
||||
diff -up chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c.me chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c
|
||||
--- chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c.me 2022-12-27 16:14:22.507496575 +0100
|
||||
+++ chromium-108.0.5359.124/third_party/wayland/src/src/scanner.c 2022-12-27 16:35:17.617573610 +0100
|
||||
@@ -26,6 +26,7 @@
|
||||
*/
|
||||
|
||||
#include "wayland-version.h"
|
||||
+#include "config.h" // HAVE_STRNDUP
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
@ -0,0 +1,294 @@
|
||||
diff -up chromium-108.0.5359.124/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc
|
||||
--- chromium-108.0.5359.124/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/cdm/library_cdm/clear_key_cdm/ffmpeg_cdm_audio_decoder.cc 2023-01-04 21:44:23.098276796 +0100
|
||||
@@ -74,7 +74,7 @@ void CdmAudioDecoderConfigToAVCodecConte
|
||||
codec_context->sample_fmt = AV_SAMPLE_FMT_NONE;
|
||||
}
|
||||
|
||||
- codec_context->ch_layout.nb_channels = config.channel_count;
|
||||
+ codec_context->channels = config.channel_count;
|
||||
codec_context->sample_rate = config.samples_per_second;
|
||||
|
||||
if (config.extra_data) {
|
||||
@@ -124,8 +124,8 @@ void CopySamples(cdm::AudioFormat cdm_fo
|
||||
case cdm::kAudioFormatPlanarS16:
|
||||
case cdm::kAudioFormatPlanarF32: {
|
||||
const int decoded_size_per_channel =
|
||||
- decoded_audio_size / av_frame.ch_layout.nb_channels;
|
||||
- for (int i = 0; i < av_frame.ch_layout.nb_channels; ++i) {
|
||||
+ decoded_audio_size / av_frame.channels;
|
||||
+ for (int i = 0; i < av_frame.channels; ++i) {
|
||||
memcpy(output_buffer, av_frame.extended_data[i],
|
||||
decoded_size_per_channel);
|
||||
output_buffer += decoded_size_per_channel;
|
||||
@@ -185,14 +185,13 @@ bool FFmpegCdmAudioDecoder::Initialize(
|
||||
// Success!
|
||||
decoding_loop_ = std::make_unique<FFmpegDecodingLoop>(codec_context_.get());
|
||||
samples_per_second_ = config.samples_per_second;
|
||||
- bytes_per_frame_ =
|
||||
- codec_context_->ch_layout.nb_channels * config.bits_per_channel / 8;
|
||||
+ bytes_per_frame_ = codec_context_->channels * config.bits_per_channel / 8;
|
||||
output_timestamp_helper_ =
|
||||
std::make_unique<AudioTimestampHelper>(config.samples_per_second);
|
||||
is_initialized_ = true;
|
||||
|
||||
// Store initial values to guard against midstream configuration changes.
|
||||
- channels_ = codec_context_->ch_layout.nb_channels;
|
||||
+ channels_ = codec_context_->channels;
|
||||
av_sample_format_ = codec_context_->sample_fmt;
|
||||
|
||||
return true;
|
||||
@@ -292,19 +291,17 @@ cdm::Status FFmpegCdmAudioDecoder::Decod
|
||||
for (auto& frame : audio_frames) {
|
||||
int decoded_audio_size = 0;
|
||||
if (frame->sample_rate != samples_per_second_ ||
|
||||
- frame->ch_layout.nb_channels != channels_ ||
|
||||
- frame->format != av_sample_format_) {
|
||||
+ frame->channels != channels_ || frame->format != av_sample_format_) {
|
||||
DLOG(ERROR) << "Unsupported midstream configuration change!"
|
||||
<< " Sample Rate: " << frame->sample_rate << " vs "
|
||||
- << samples_per_second_
|
||||
- << ", Channels: " << frame->ch_layout.nb_channels << " vs "
|
||||
- << channels_ << ", Sample Format: " << frame->format << " vs "
|
||||
- << av_sample_format_;
|
||||
+ << samples_per_second_ << ", Channels: " << frame->channels
|
||||
+ << " vs " << channels_ << ", Sample Format: " << frame->format
|
||||
+ << " vs " << av_sample_format_;
|
||||
return cdm::kDecodeError;
|
||||
}
|
||||
|
||||
decoded_audio_size = av_samples_get_buffer_size(
|
||||
- nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples,
|
||||
+ nullptr, codec_context_->channels, frame->nb_samples,
|
||||
codec_context_->sample_fmt, 1);
|
||||
if (!decoded_audio_size)
|
||||
continue;
|
||||
@@ -323,9 +320,9 @@ bool FFmpegCdmAudioDecoder::OnNewFrame(
|
||||
size_t* total_size,
|
||||
std::vector<std::unique_ptr<AVFrame, ScopedPtrAVFreeFrame>>* audio_frames,
|
||||
AVFrame* frame) {
|
||||
- *total_size += av_samples_get_buffer_size(
|
||||
- nullptr, codec_context_->ch_layout.nb_channels, frame->nb_samples,
|
||||
- codec_context_->sample_fmt, 1);
|
||||
+ *total_size += av_samples_get_buffer_size(nullptr, codec_context_->channels,
|
||||
+ frame->nb_samples,
|
||||
+ codec_context_->sample_fmt, 1);
|
||||
audio_frames->emplace_back(av_frame_clone(frame));
|
||||
return true;
|
||||
}
|
||||
diff -up chromium-108.0.5359.124/media/ffmpeg/ffmpeg_common.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/ffmpeg/ffmpeg_common.cc
|
||||
--- chromium-108.0.5359.124/media/ffmpeg/ffmpeg_common.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/ffmpeg/ffmpeg_common.cc 2023-01-04 21:52:59.674165082 +0100
|
||||
@@ -353,11 +353,9 @@ bool AVCodecContextToAudioDecoderConfig(
|
||||
codec_context->sample_fmt, codec_context->codec_id);
|
||||
|
||||
ChannelLayout channel_layout =
|
||||
- codec_context->ch_layout.nb_channels > 8
|
||||
+ codec_context->channels > 8
|
||||
? CHANNEL_LAYOUT_DISCRETE
|
||||
- : ChannelLayoutToChromeChannelLayout(
|
||||
- codec_context->ch_layout.u.mask,
|
||||
- codec_context->ch_layout.nb_channels);
|
||||
+ : ChannelLayoutToChromeChannelLayout(codec_context->channel_layout, codec_context->channels);
|
||||
|
||||
switch (codec) {
|
||||
// For AC3/EAC3 we enable only demuxing, but not decoding, so FFmpeg does
|
||||
@@ -409,7 +407,7 @@ bool AVCodecContextToAudioDecoderConfig(
|
||||
extra_data, encryption_scheme, seek_preroll,
|
||||
codec_context->delay);
|
||||
if (channel_layout == CHANNEL_LAYOUT_DISCRETE)
|
||||
- config->SetChannelsForDiscrete(codec_context->ch_layout.nb_channels);
|
||||
+ config->SetChannelsForDiscrete(codec_context->channels);
|
||||
|
||||
#if BUILDFLAG(ENABLE_PLATFORM_AC3_EAC3_AUDIO)
|
||||
// These are bitstream formats unknown to ffmpeg, so they don't have
|
||||
@@ -478,7 +476,7 @@ void AudioDecoderConfigToAVCodecContext(
|
||||
|
||||
// TODO(scherkus): should we set |channel_layout|? I'm not sure if FFmpeg uses
|
||||
// said information to decode.
|
||||
- codec_context->ch_layout.nb_channels = config.channels();
|
||||
+ codec_context->channels = config.channels();
|
||||
codec_context->sample_rate = config.samples_per_second();
|
||||
|
||||
if (config.extra_data().empty()) {
|
||||
diff -up chromium-108.0.5359.124/media/filters/audio_file_reader.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/audio_file_reader.cc
|
||||
--- chromium-108.0.5359.124/media/filters/audio_file_reader.cc.revert-new-channel-layout-api 2023-01-04 21:44:23.095276762 +0100
|
||||
+++ chromium-108.0.5359.124/media/filters/audio_file_reader.cc 2023-01-04 21:44:23.098276796 +0100
|
||||
@@ -113,15 +113,14 @@ bool AudioFileReader::OpenDecoder() {
|
||||
|
||||
// Verify the channel layout is supported by Chrome. Acts as a sanity check
|
||||
// against invalid files. See http://crbug.com/171962
|
||||
- if (ChannelLayoutToChromeChannelLayout(
|
||||
- codec_context_->ch_layout.u.mask,
|
||||
- codec_context_->ch_layout.nb_channels) ==
|
||||
+ if (ChannelLayoutToChromeChannelLayout(codec_context_->channel_layout,
|
||||
+ codec_context_->channels) ==
|
||||
CHANNEL_LAYOUT_UNSUPPORTED) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Store initial values to guard against midstream configuration changes.
|
||||
- channels_ = codec_context_->ch_layout.nb_channels;
|
||||
+ channels_ = codec_context_->channels;
|
||||
audio_codec_ = CodecIDToAudioCodec(codec_context_->codec_id);
|
||||
sample_rate_ = codec_context_->sample_rate;
|
||||
av_sample_format_ = codec_context_->sample_fmt;
|
||||
@@ -224,7 +223,7 @@ bool AudioFileReader::OnNewFrame(
|
||||
if (frames_read < 0)
|
||||
return false;
|
||||
|
||||
- const int channels = frame->ch_layout.nb_channels;
|
||||
+ const int channels = frame->channels;
|
||||
if (frame->sample_rate != sample_rate_ || channels != channels_ ||
|
||||
frame->format != av_sample_format_) {
|
||||
DLOG(ERROR) << "Unsupported midstream configuration change!"
|
||||
diff -up chromium-108.0.5359.124/media/filters/audio_file_reader_unittest.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/audio_file_reader_unittest.cc
|
||||
--- chromium-108.0.5359.124/media/filters/audio_file_reader_unittest.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/filters/audio_file_reader_unittest.cc 2023-01-04 21:44:23.098276796 +0100
|
||||
@@ -121,11 +121,11 @@ class AudioFileReaderTest : public testi
|
||||
EXPECT_FALSE(reader_->Open());
|
||||
}
|
||||
|
||||
- void RunTestFailingDecode(const char* fn, int expect_read = 0) {
|
||||
+ void RunTestFailingDecode(const char* fn) {
|
||||
Initialize(fn);
|
||||
EXPECT_TRUE(reader_->Open());
|
||||
std::vector<std::unique_ptr<AudioBus>> decoded_audio_packets;
|
||||
- EXPECT_EQ(reader_->Read(&decoded_audio_packets), expect_read);
|
||||
+ EXPECT_EQ(reader_->Read(&decoded_audio_packets), 0);
|
||||
}
|
||||
|
||||
void RunTestPartialDecode(const char* fn) {
|
||||
@@ -219,7 +219,7 @@ TEST_F(AudioFileReaderTest, AAC_ADTS) {
|
||||
}
|
||||
|
||||
TEST_F(AudioFileReaderTest, MidStreamConfigChangesFail) {
|
||||
- RunTestFailingDecode("midstream_config_change.mp3", 42624);
|
||||
+ RunTestFailingDecode("midstream_config_change.mp3");
|
||||
}
|
||||
#endif
|
||||
|
||||
diff -up chromium-108.0.5359.124/media/filters/audio_video_metadata_extractor.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/audio_video_metadata_extractor.cc
|
||||
--- chromium-108.0.5359.124/media/filters/audio_video_metadata_extractor.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/filters/audio_video_metadata_extractor.cc 2023-01-04 21:44:23.098276796 +0100
|
||||
@@ -113,15 +113,6 @@ bool AudioVideoMetadataExtractor::Extrac
|
||||
if (!stream)
|
||||
continue;
|
||||
|
||||
- void* display_matrix =
|
||||
- av_stream_get_side_data(stream, AV_PKT_DATA_DISPLAYMATRIX, nullptr);
|
||||
- if (display_matrix) {
|
||||
- rotation_ = VideoTransformation::FromFFmpegDisplayMatrix(
|
||||
- static_cast<int32_t*>(display_matrix))
|
||||
- .rotation;
|
||||
- info.tags["rotate"] = base::NumberToString(rotation_);
|
||||
- }
|
||||
-
|
||||
// Extract dictionary from streams also. Needed for containers that attach
|
||||
// metadata to contained streams instead the container itself, like OGG.
|
||||
ExtractDictionary(stream->metadata, &info.tags);
|
||||
@@ -264,6 +255,8 @@ void AudioVideoMetadataExtractor::Extrac
|
||||
if (raw_tags->find(tag->key) == raw_tags->end())
|
||||
(*raw_tags)[tag->key] = tag->value;
|
||||
|
||||
+ if (ExtractInt(tag, "rotate", &rotation_))
|
||||
+ continue;
|
||||
if (ExtractString(tag, "album", &album_))
|
||||
continue;
|
||||
if (ExtractString(tag, "artist", &artist_))
|
||||
diff -up chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter.cc
|
||||
--- chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter.cc 2023-01-04 21:44:23.099276807 +0100
|
||||
@@ -195,15 +195,14 @@ bool FFmpegAACBitstreamConverter::Conver
|
||||
if (!header_generated_ || codec_ != stream_codec_parameters_->codec_id ||
|
||||
audio_profile_ != stream_codec_parameters_->profile ||
|
||||
sample_rate_index_ != sample_rate_index ||
|
||||
- channel_configuration_ !=
|
||||
- stream_codec_parameters_->ch_layout.nb_channels ||
|
||||
+ channel_configuration_ != stream_codec_parameters_->channels ||
|
||||
frame_length_ != header_plus_packet_size) {
|
||||
header_generated_ =
|
||||
GenerateAdtsHeader(stream_codec_parameters_->codec_id,
|
||||
0, // layer
|
||||
stream_codec_parameters_->profile, sample_rate_index,
|
||||
0, // private stream
|
||||
- stream_codec_parameters_->ch_layout.nb_channels,
|
||||
+ stream_codec_parameters_->channels,
|
||||
0, // originality
|
||||
0, // home
|
||||
0, // copyrighted_stream
|
||||
@@ -215,7 +214,7 @@ bool FFmpegAACBitstreamConverter::Conver
|
||||
codec_ = stream_codec_parameters_->codec_id;
|
||||
audio_profile_ = stream_codec_parameters_->profile;
|
||||
sample_rate_index_ = sample_rate_index;
|
||||
- channel_configuration_ = stream_codec_parameters_->ch_layout.nb_channels;
|
||||
+ channel_configuration_ = stream_codec_parameters_->channels;
|
||||
frame_length_ = header_plus_packet_size;
|
||||
}
|
||||
|
||||
diff -up chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc
|
||||
--- chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/filters/ffmpeg_aac_bitstream_converter_unittest.cc 2023-01-04 21:44:23.099276807 +0100
|
||||
@@ -34,7 +34,7 @@ class FFmpegAACBitstreamConverterTest :
|
||||
memset(&test_parameters_, 0, sizeof(AVCodecParameters));
|
||||
test_parameters_.codec_id = AV_CODEC_ID_AAC;
|
||||
test_parameters_.profile = FF_PROFILE_AAC_MAIN;
|
||||
- test_parameters_.ch_layout.nb_channels = 2;
|
||||
+ test_parameters_.channels = 2;
|
||||
test_parameters_.extradata = extradata_header_;
|
||||
test_parameters_.extradata_size = sizeof(extradata_header_);
|
||||
}
|
||||
diff -up chromium-108.0.5359.124/media/filters/ffmpeg_audio_decoder.cc.revert-new-channel-layout-api chromium-108.0.5359.124/media/filters/ffmpeg_audio_decoder.cc
|
||||
--- chromium-108.0.5359.124/media/filters/ffmpeg_audio_decoder.cc.revert-new-channel-layout-api 2022-12-14 01:39:52.000000000 +0100
|
||||
+++ chromium-108.0.5359.124/media/filters/ffmpeg_audio_decoder.cc 2023-01-04 21:44:23.099276807 +0100
|
||||
@@ -28,7 +28,7 @@ namespace media {
|
||||
|
||||
// Return the number of channels from the data in |frame|.
|
||||
static inline int DetermineChannels(AVFrame* frame) {
|
||||
- return frame->ch_layout.nb_channels;
|
||||
+ return frame->channels;
|
||||
}
|
||||
|
||||
// Called by FFmpeg's allocation routine to allocate a buffer. Uses
|
||||
@@ -233,7 +233,7 @@ bool FFmpegAudioDecoder::OnNewFrame(cons
|
||||
// Translate unsupported into discrete layouts for discrete configurations;
|
||||
// ffmpeg does not have a labeled discrete configuration internally.
|
||||
ChannelLayout channel_layout = ChannelLayoutToChromeChannelLayout(
|
||||
- codec_context_->ch_layout.u.mask, codec_context_->ch_layout.nb_channels);
|
||||
+ codec_context_->channel_layout, codec_context_->channels);
|
||||
if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED &&
|
||||
config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE) {
|
||||
channel_layout = CHANNEL_LAYOUT_DISCRETE;
|
||||
@@ -350,11 +350,11 @@ bool FFmpegAudioDecoder::ConfigureDecode
|
||||
// Success!
|
||||
av_sample_format_ = codec_context_->sample_fmt;
|
||||
|
||||
- if (codec_context_->ch_layout.nb_channels != config.channels()) {
|
||||
+ if (codec_context_->channels != config.channels()) {
|
||||
MEDIA_LOG(ERROR, media_log_)
|
||||
<< "Audio configuration specified " << config.channels()
|
||||
<< " channels, but FFmpeg thinks the file contains "
|
||||
- << codec_context_->ch_layout.nb_channels << " channels";
|
||||
+ << codec_context_->channels << " channels";
|
||||
ReleaseFFmpegResources();
|
||||
state_ = DecoderState::kUninitialized;
|
||||
return false;
|
||||
@@ -405,7 +405,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(s
|
||||
if (frame->nb_samples <= 0)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
- if (s->ch_layout.nb_channels != channels) {
|
||||
+ if (s->channels != channels) {
|
||||
DLOG(ERROR) << "AVCodecContext and AVFrame disagree on channel count.";
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
@@ -438,8 +438,7 @@ int FFmpegAudioDecoder::GetAudioBuffer(s
|
||||
ChannelLayout channel_layout =
|
||||
config_.channel_layout() == CHANNEL_LAYOUT_DISCRETE
|
||||
? CHANNEL_LAYOUT_DISCRETE
|
||||
- : ChannelLayoutToChromeChannelLayout(s->ch_layout.u.mask,
|
||||
- s->ch_layout.nb_channels);
|
||||
+ : ChannelLayoutToChromeChannelLayout(s->channel_layout, s->channels);
|
||||
|
||||
if (channel_layout == CHANNEL_LAYOUT_UNSUPPORTED) {
|
||||
DLOG(ERROR) << "Unsupported channel layout.";
|
@ -0,0 +1,36 @@
|
||||
diff -up chromium-108.0.5359.124/net/filter/brotli_source_stream.cc.me chromium-108.0.5359.124/net/filter/brotli_source_stream.cc
|
||||
--- chromium-108.0.5359.124/net/filter/brotli_source_stream.cc.me 2022-12-30 16:00:58.320318310 +0100
|
||||
+++ chromium-108.0.5359.124/net/filter/brotli_source_stream.cc 2022-12-30 16:01:24.928581631 +0100
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "net/base/io_buffer.h"
|
||||
-#include "third_party/brotli/include/brotli/decode.h"
|
||||
+#include <brotli/decode.h>
|
||||
|
||||
namespace net {
|
||||
|
||||
diff -up chromium-108.0.5359.124/net/ssl/cert_compression.cc.me chromium-108.0.5359.124/net/ssl/cert_compression.cc
|
||||
--- chromium-108.0.5359.124/net/ssl/cert_compression.cc.me 2022-12-30 15:57:59.859543993 +0100
|
||||
+++ chromium-108.0.5359.124/net/ssl/cert_compression.cc 2022-12-30 16:00:48.560221723 +0100
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "third_party/boringssl/src/include/openssl/ssl.h"
|
||||
|
||||
#if !defined(NET_DISABLE_BROTLI)
|
||||
-#include "third_party/brotli/include/brotli/decode.h"
|
||||
+#include <brotli/decode.h>
|
||||
#endif
|
||||
|
||||
namespace net {
|
||||
diff -up chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc.me chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc
|
||||
--- chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc.me 2022-12-30 21:12:27.058346797 +0100
|
||||
+++ chromium-108.0.5359.124/ui/base/resource/resource_bundle.cc 2022-12-30 21:13:58.363183795 +0100
|
||||
@@ -31,7 +31,7 @@
|
||||
#include "build/build_config.h"
|
||||
#include "net/filter/gzip_header.h"
|
||||
#include "skia/ext/image_operations.h"
|
||||
-#include "third_party/brotli/include/brotli/decode.h"
|
||||
+#include <brotli/decode.h>
|
||||
#include "third_party/skia/include/core/SkBitmap.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "third_party/zlib/google/compression_utils.h"
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-108.0.5359.124/media/audio/audio_opus_encoder.h.me chromium-108.0.5359.124/media/audio/audio_opus_encoder.h
|
||||
--- chromium-108.0.5359.124/media/audio/audio_opus_encoder.h.me 2022-12-31 09:49:17.100277502 +0100
|
||||
+++ chromium-108.0.5359.124/media/audio/audio_opus_encoder.h 2022-12-31 09:49:57.101016710 +0100
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "media/base/audio_converter.h"
|
||||
#include "media/base/audio_encoder.h"
|
||||
#include "media/base/audio_timestamp_helper.h"
|
||||
-#include "third_party/opus/src/include/opus.h"
|
||||
+#include <opus/opus.h>
|
||||
|
||||
namespace media {
|
||||
|
@ -0,0 +1,32 @@
|
||||
diff -up chromium-108.0.5359.124/chrome/common/chrome_paths.cc.widevine-other-locations chromium-108.0.5359.124/chrome/common/chrome_paths.cc
|
||||
--- chromium-108.0.5359.124/chrome/common/chrome_paths.cc.widevine-other-locations 2023-01-02 11:10:03.951330305 +0100
|
||||
+++ chromium-108.0.5359.124/chrome/common/chrome_paths.cc 2023-01-02 13:42:26.781022150 +0100
|
||||
@@ -319,6 +319,16 @@ bool PathProvider(int key, base::FilePat
|
||||
|
||||
#if BUILDFLAG(ENABLE_WIDEVINE)
|
||||
case chrome::DIR_BUNDLED_WIDEVINE_CDM:
|
||||
+ base::PathService::Get(base::DIR_HOME, &cur);
|
||||
+ cur = cur.Append(FILE_PATH_LITERAL(".config/chromium/WidevineCdm"));
|
||||
+ if (base::PathExists(cur)) {
|
||||
+ break;
|
||||
+ }
|
||||
+ // Yes, this has an arch hardcoded in the path, but at this time, it is the only place to find libwidevinecdm.so
|
||||
+ if (base::PathExists(base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm/_platform_specific/linux_x64/libwidevinecdm.so")))) {
|
||||
+ cur = base::FilePath(FILE_PATH_LITERAL("/opt/google/chrome/WidevineCdm"));
|
||||
+ break;
|
||||
+ }
|
||||
if (!GetComponentDirectory(&cur))
|
||||
return false;
|
||||
cur = cur.AppendASCII(kWidevineCdmBaseDirectory);
|
||||
diff -up chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn.widevine-other-locations chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn
|
||||
--- chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn.widevine-other-locations 2023-01-02 11:10:45.953114153 +0100
|
||||
+++ chromium-108.0.5359.124/third_party/widevine/cdm/BUILD.gn 2023-01-02 11:10:45.953114153 +0100
|
||||
@@ -22,7 +22,7 @@ buildflag_header("buildflags") {
|
||||
|
||||
flags = [
|
||||
"ENABLE_WIDEVINE=$enable_widevine",
|
||||
- "BUNDLE_WIDEVINE_CDM=$bundle_widevine_cdm",
|
||||
+ "BUNDLE_WIDEVINE_CDM=true",
|
||||
"ENABLE_WIDEVINE_CDM_COMPONENT=$enable_widevine_cdm_component",
|
||||
"ENABLE_MEDIA_FOUNDATION_WIDEVINE_CDM=$enable_media_foundation_widevine_cdm",
|
||||
]
|
@ -0,0 +1,64 @@
|
||||
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc
|
||||
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc.system-minizip 2023-01-04 20:20:37.000000000 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_extractor.cc 2023-01-08 15:48:08.654793086 +0100
|
||||
@@ -27,8 +27,8 @@ limitations under the License.
|
||||
#include "tensorflow_lite_support/cc/port/status_macros.h"
|
||||
#include "tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.h"
|
||||
#include "tensorflow_lite_support/metadata/metadata_schema_generated.h"
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
-#include "third_party/zlib/contrib/minizip/unzip.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
+#include <minizip/unzip.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
||||
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc
|
||||
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc.system-minizip 2023-01-04 20:20:37.000000000 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/metadata_populator.cc 2023-01-08 15:48:08.655793097 +0100
|
||||
@@ -26,8 +26,8 @@ limitations under the License.
|
||||
#include "tensorflow_lite_support/cc/port/statusor.h"
|
||||
#include "tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h"
|
||||
#include "tensorflow_lite_support/metadata/metadata_schema_generated.h"
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
-#include "third_party/zlib/contrib/minizip/unzip.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
+#include <minizip/zip.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
||||
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc
|
||||
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc.system-minizip 2023-01-08 15:48:08.655793097 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_readonly_mem_file.cc 2023-01-08 15:53:17.498329640 +0100
|
||||
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
#include <cstdio>
|
||||
|
||||
#include "absl/strings/string_view.h" // from @com_google_absl
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
||||
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc
|
||||
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc.system-minizip 2023-01-04 20:20:37.000000000 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.cc 2023-01-08 15:48:08.655793097 +0100
|
||||
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
#include <cstdio>
|
||||
|
||||
#include "absl/strings/string_view.h" // from @com_google_absl
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
||||
diff -up chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h
|
||||
--- chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h.system-minizip 2023-01-04 20:20:37.000000000 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/tflite_support/src/tensorflow_lite_support/metadata/cc/utils/zip_writable_mem_file.h 2023-01-08 15:48:08.655793097 +0100
|
||||
@@ -19,7 +19,7 @@ limitations under the License.
|
||||
#include <cstdlib>
|
||||
|
||||
#include "absl/strings/string_view.h" // from @com_google_absl
|
||||
-#include "third_party/zlib/contrib/minizip/ioapi.h"
|
||||
+#include <minizip/ioapi.h>
|
||||
|
||||
namespace tflite {
|
||||
namespace metadata {
|
@ -0,0 +1,141 @@
|
||||
diff -up chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc.me chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc
|
||||
--- chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc.me 2023-02-08 20:34:02.700010846 +0100
|
||||
+++ chromium-110.0.5481.77/sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.cc 2023-02-08 20:35:30.455580670 +0100
|
||||
@@ -4,7 +4,9 @@
|
||||
|
||||
#include "sandbox/policy/linux/bpf_hardware_video_decoding_policy_linux.h"
|
||||
|
||||
-#include <linux/kcmp.h>
|
||||
+#ifndef KCMP_FILE
|
||||
+#define KCMP_FILE 0
|
||||
+#endif
|
||||
|
||||
#include "media/gpu/buildflags.h"
|
||||
#include "sandbox/linux/seccomp-bpf-helpers/sigsys_handlers.h"
|
||||
diff -up chromium-99.0.4844.51/mojo/core/channel_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/mojo/core/channel_linux.cc
|
||||
--- chromium-99.0.4844.51/mojo/core/channel_linux.cc.epel7-header-workarounds 2022-02-28 19:05:54.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/mojo/core/channel_linux.cc 2022-03-05 14:50:49.876812909 -0500
|
||||
@@ -44,6 +44,25 @@
|
||||
#include "base/android/build_info.h"
|
||||
#endif
|
||||
|
||||
+#ifndef F_LINUX_SPECIFIC_BASE
|
||||
+#define F_LINUX_SPECIFIC_BASE 1024
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SEAL
|
||||
+#define F_SEAL_SEAL 0x0001
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SHRINK
|
||||
+#define F_SEAL_SHRINK 0x0002
|
||||
+#endif
|
||||
+#ifndef F_SEAL_GROW
|
||||
+#define F_SEAL_GROW 0x0004
|
||||
+#endif
|
||||
+#ifndef F_ADD_SEALS
|
||||
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
|
||||
+#endif
|
||||
+#ifndef F_GET_SEALS
|
||||
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
|
||||
+#endif
|
||||
+
|
||||
#ifndef EFD_ZERO_ON_WAKE
|
||||
#define EFD_ZERO_ON_WAKE O_NOFOLLOW
|
||||
#endif
|
||||
diff -up chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc.epel7-header-workarounds chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc
|
||||
--- chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc.epel7-header-workarounds 2022-03-05 14:50:49.877812915 -0500
|
||||
+++ chromium-99.0.4844.51/sandbox/linux/seccomp-bpf-helpers/syscall_parameters_restrictions.cc 2022-03-05 15:15:02.536867009 -0500
|
||||
@@ -53,6 +53,25 @@
|
||||
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
||||
+#ifndef F_LINUX_SPECIFIC_BASE
|
||||
+#define F_LINUX_SPECIFIC_BASE 1024
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SEAL
|
||||
+#define F_SEAL_SEAL 0x0001
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SHRINK
|
||||
+#define F_SEAL_SHRINK 0x0002
|
||||
+#endif
|
||||
+#ifndef F_SEAL_GROW
|
||||
+#define F_SEAL_GROW 0x0004
|
||||
+#endif
|
||||
+#ifndef F_ADD_SEALS
|
||||
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
|
||||
+#endif
|
||||
+#ifndef F_GET_SEALS
|
||||
+#define F_GET_SEALS (F_LINUX_SPECIFIC_BASE + 10)
|
||||
+#endif
|
||||
+
|
||||
#if defined(__arm__) && !defined(MAP_STACK)
|
||||
#define MAP_STACK 0x20000 // Daisy build environment has old headers.
|
||||
#endif
|
||||
diff -up chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc
|
||||
--- chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc.epel7-header-workarounds 2022-02-28 19:05:55.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/sandbox/policy/linux/bpf_cros_amd_gpu_policy_linux.cc 2022-03-05 14:50:49.877812915 -0500
|
||||
@@ -6,7 +6,24 @@
|
||||
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
-#include <linux/kcmp.h>
|
||||
+#ifndef KCMP_FILE
|
||||
+#define KCMP_FILE 0
|
||||
+#endif
|
||||
+#ifndef F_LINUX_SPECIFIC_BASE
|
||||
+#define F_LINUX_SPECIFIC_BASE 1024
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SEAL
|
||||
+#define F_SEAL_SEAL 0x0001
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SHRINK
|
||||
+#define F_SEAL_SHRINK 0x0002
|
||||
+#endif
|
||||
+#ifndef F_SEAL_GROW
|
||||
+#define F_SEAL_GROW 0x0004
|
||||
+#endif
|
||||
+#ifndef F_ADD_SEALS
|
||||
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
|
||||
+#endif
|
||||
#include <sys/socket.h>
|
||||
|
||||
// Some arch's (arm64 for instance) unistd.h don't pull in symbols used here
|
||||
diff -up chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc.epel7-header-workarounds chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc
|
||||
--- chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc.epel7-header-workarounds 2022-02-28 19:05:55.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/sandbox/policy/linux/bpf_gpu_policy_linux.cc 2022-03-05 14:50:49.877812915 -0500
|
||||
@@ -22,6 +22,22 @@
|
||||
#include "sandbox/policy/linux/sandbox_linux.h"
|
||||
#include "sandbox/policy/linux/sandbox_seccomp_bpf_linux.h"
|
||||
|
||||
+#ifndef F_LINUX_SPECIFIC_BASE
|
||||
+#define F_LINUX_SPECIFIC_BASE 1024
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SEAL
|
||||
+#define F_SEAL_SEAL 0x0001
|
||||
+#endif
|
||||
+#ifndef F_SEAL_SHRINK
|
||||
+#define F_SEAL_SHRINK 0x0002
|
||||
+#endif
|
||||
+#ifndef F_SEAL_GROW
|
||||
+#define F_SEAL_GROW 0x0004
|
||||
+#endif
|
||||
+#ifndef F_ADD_SEALS
|
||||
+#define F_ADD_SEALS (F_LINUX_SPECIFIC_BASE + 9)
|
||||
+#endif
|
||||
+
|
||||
using sandbox::bpf_dsl::AllOf;
|
||||
using sandbox::bpf_dsl::Allow;
|
||||
using sandbox::bpf_dsl::Arg;
|
||||
diff -up chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc.epel7-header-workarounds chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc
|
||||
--- chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc.epel7-header-workarounds 2022-02-28 19:06:49.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/ui/events/ozone/evdev/event_converter_evdev_impl.cc 2022-03-05 14:50:49.877812915 -0500
|
||||
@@ -23,6 +23,10 @@
|
||||
#include "ui/events/ozone/evdev/numberpad_metrics.h"
|
||||
#endif
|
||||
|
||||
+#ifndef SW_PEN_INSERTED
|
||||
+#define SW_PEN_INSERTED 0x0f /* set = pen inserted */
|
||||
+#endif
|
||||
+
|
||||
namespace ui {
|
||||
|
||||
namespace {
|
@ -0,0 +1,11 @@
|
||||
diff -up chromium-110.0.5481.177/base/memory/ref_counted.h.me chromium-110.0.5481.177/base/memory/ref_counted.h
|
||||
--- chromium-110.0.5481.177/base/memory/ref_counted.h.me 2023-02-23 13:34:33.174817255 -0500
|
||||
+++ chromium-110.0.5481.177/base/memory/ref_counted.h 2023-02-23 13:42:28.646052469 -0500
|
||||
@@ -6,6 +6,7 @@
|
||||
#define BASE_MEMORY_REF_COUNTED_H_
|
||||
|
||||
#include <stddef.h>
|
||||
+#include <limits>
|
||||
|
||||
#include <utility>
|
||||
|
@ -0,0 +1,120 @@
|
||||
From 2aef9000a1c8d76d3072365ffcb471ebffa20d3d Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Schneider <asn@cryptomilk.org>
|
||||
Date: Tue, 15 Mar 2022 14:26:16 +0100
|
||||
Subject: [PATCH] Track first_dts instead of using non-upstream functions
|
||||
|
||||
The function av_stream_get_first_dts() is not an upstream ffmpeg function and
|
||||
is not available if you build with system ffmpeg. We can easily track the
|
||||
first_dts on our own.
|
||||
|
||||
See also
|
||||
https://ffmpeg.org/pipermail/ffmpeg-devel/2021-September/285401.html
|
||||
|
||||
Bug: 1306560
|
||||
|
||||
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
|
||||
Change-Id: I90ba3cf2f2e16f56a0b405f26c67f911349fb71d
|
||||
---
|
||||
media/filters/ffmpeg_demuxer.cc | 18 ++++++++++++------
|
||||
media/filters/ffmpeg_demuxer.h | 3 +++
|
||||
3 files changed, 16 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/media/filters/ffmpeg_demuxer.cc b/media/filters/ffmpeg_demuxer.cc
|
||||
index 111899b661..799fc6e941 100644
|
||||
--- a/media/filters/ffmpeg_demuxer.cc
|
||||
+++ b/media/filters/ffmpeg_demuxer.cc
|
||||
@@ -97,7 +97,7 @@ static base::TimeDelta FramesToTimeDelta(int frames, double sample_rate) {
|
||||
sample_rate);
|
||||
}
|
||||
|
||||
-static base::TimeDelta ExtractStartTime(AVStream* stream) {
|
||||
+static base::TimeDelta ExtractStartTime(AVStream* stream, int64_t first_dts) {
|
||||
// The default start time is zero.
|
||||
base::TimeDelta start_time;
|
||||
|
||||
@@ -107,12 +107,12 @@ static base::TimeDelta ExtractStartTime(AVStream* stream) {
|
||||
|
||||
// Next try to use the first DTS value, for codecs where we know PTS == DTS
|
||||
// (excludes all H26x codecs). The start time must be returned in PTS.
|
||||
- if (av_stream_get_first_dts(stream) != kNoFFmpegTimestamp &&
|
||||
+ if (first_dts != AV_NOPTS_VALUE &&
|
||||
stream->codecpar->codec_id != AV_CODEC_ID_HEVC &&
|
||||
stream->codecpar->codec_id != AV_CODEC_ID_H264 &&
|
||||
stream->codecpar->codec_id != AV_CODEC_ID_MPEG4) {
|
||||
const base::TimeDelta first_pts =
|
||||
- ConvertFromTimeBase(stream->time_base, av_stream_get_first_dts(stream));
|
||||
+ ConvertFromTimeBase(stream->time_base, first_dts);
|
||||
if (first_pts < start_time)
|
||||
start_time = first_pts;
|
||||
}
|
||||
@@ -283,6 +283,7 @@ FFmpegDemuxerStream::FFmpegDemuxerStream(
|
||||
fixup_negative_timestamps_(false),
|
||||
fixup_chained_ogg_(false),
|
||||
num_discarded_packet_warnings_(0),
|
||||
+ first_dts_(AV_NOPTS_VALUE),
|
||||
last_packet_pos_(AV_NOPTS_VALUE),
|
||||
last_packet_dts_(AV_NOPTS_VALUE) {
|
||||
DCHECK(demuxer_);
|
||||
@@ -349,6 +350,10 @@ void FFmpegDemuxerStream::EnqueuePacket(ScopedAVPacket packet) {
|
||||
int64_t packet_dts =
|
||||
packet->dts == AV_NOPTS_VALUE ? packet->pts : packet->dts;
|
||||
|
||||
+ if (first_dts_ == AV_NOPTS_VALUE) {
|
||||
+ first_dts_ = packet_dts;
|
||||
+ }
|
||||
+
|
||||
// Chained ogg files have non-monotonically increasing position and time stamp
|
||||
// values, which prevents us from using them to determine if a packet should
|
||||
// be dropped. Since chained ogg is only allowed on single track audio only
|
||||
@@ -1442,7 +1447,8 @@ void FFmpegDemuxer::OnFindStreamInfoDone(int result) {
|
||||
|
||||
max_duration = std::max(max_duration, streams_[i]->duration());
|
||||
|
||||
- base::TimeDelta start_time = ExtractStartTime(stream);
|
||||
+ base::TimeDelta start_time =
|
||||
+ ExtractStartTime(stream, streams_[i]->first_dts());
|
||||
|
||||
// Note: This value is used for seeking, so we must take the true value and
|
||||
// not the one possibly clamped to zero below.
|
||||
@@ -1599,7 +1605,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::FindStreamWithLowestStartTimestamp(
|
||||
for (const auto& stream : streams_) {
|
||||
if (!stream || stream->IsEnabled() != enabled)
|
||||
continue;
|
||||
- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
|
||||
+ if (stream->first_dts() == AV_NOPTS_VALUE)
|
||||
continue;
|
||||
if (!lowest_start_time_stream ||
|
||||
stream->start_time() < lowest_start_time_stream->start_time()) {
|
||||
@@ -1620,7 +1626,7 @@ FFmpegDemuxerStream* FFmpegDemuxer::FindPreferredStreamForSeeking(
|
||||
if (stream->type() != DemuxerStream::VIDEO)
|
||||
continue;
|
||||
|
||||
- if (av_stream_get_first_dts(stream->av_stream()) == kInvalidPTSMarker)
|
||||
+ if (stream->first_dts() == AV_NOPTS_VALUE)
|
||||
continue;
|
||||
|
||||
if (!stream->IsEnabled())
|
||||
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
|
||||
index c147309d6f..48a8f6ad8c 100644
|
||||
--- a/media/filters/ffmpeg_demuxer.h
|
||||
+++ b/media/filters/ffmpeg_demuxer.h
|
||||
@@ -151,6 +151,8 @@ class MEDIA_EXPORT FFmpegDemuxerStream : public DemuxerStream {
|
||||
base::TimeDelta start_time() const { return start_time_; }
|
||||
void set_start_time(base::TimeDelta time) { start_time_ = time; }
|
||||
|
||||
+ int64_t first_dts() const { return first_dts_; }
|
||||
+
|
||||
private:
|
||||
friend class FFmpegDemuxerTest;
|
||||
|
||||
@@ -208,6 +210,7 @@ class MEDIA_EXPORT FFmpegDemuxerStream : public DemuxerStream {
|
||||
bool fixup_chained_ogg_;
|
||||
|
||||
int num_discarded_packet_warnings_;
|
||||
+ int64_t first_dts_;
|
||||
int64_t last_packet_pos_;
|
||||
int64_t last_packet_dts_;
|
||||
};
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-113.0.5672.24/chrome/browser/media/router/media_router_feature.cc.disable-GlobalMediaControlsCastStartStop chromium-113.0.5672.24/chrome/browser/media/router/media_router_feature.cc
|
||||
--- chromium-113.0.5672.24/chrome/browser/media/router/media_router_feature.cc.disable-GlobalMediaControlsCastStartStop 2023-04-07 13:54:52.562292026 +0200
|
||||
+++ chromium-113.0.5672.24/chrome/browser/media/router/media_router_feature.cc 2023-04-07 13:57:41.470414086 +0200
|
||||
@@ -68,7 +68,7 @@ BASE_FEATURE(kGlobalMediaControlsCastSta
|
||||
#else
|
||||
BASE_FEATURE(kGlobalMediaControlsCastStartStop,
|
||||
"GlobalMediaControlsCastStartStop",
|
||||
- base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
+ base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS)
|
||||
#endif // BUILDFLAG(IS_ANDROID)
|
||||
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-113.0.5672.24/components/os_crypt/sync/features.gni.disblegnomekeyring chromium-113.0.5672.24/components/os_crypt/sync/features.gni
|
||||
--- chromium-113.0.5672.24/components/os_crypt/sync/features.gni.disblegnomekeyring 2023-04-07 14:23:11.083985460 +0200
|
||||
+++ chromium-113.0.5672.24/components/os_crypt/sync/features.gni 2023-04-07 14:23:44.276599353 +0200
|
||||
@@ -8,7 +8,7 @@ import("//build/config/ui.gni")
|
||||
declare_args() {
|
||||
# Whether to use libgnome-keyring (deprecated by libsecret).
|
||||
# See http://crbug.com/466975 and http://crbug.com/355223.
|
||||
- use_gnome_keyring = is_linux && use_glib
|
||||
+ use_gnome_keyring = false
|
||||
|
||||
# Whether to make account and service names for the crypto key storage
|
||||
# configurable at runtime for embedders.
|
@ -0,0 +1,545 @@
|
||||
commit 75f4b48eb71d4872ba3ac6c9fc3662a60eb4175d
|
||||
Author: Tom Anderson <thomasanderson@chromium.org>
|
||||
Date: Thu Apr 27 02:21:34 2023 +0000
|
||||
|
||||
Add QT6 LinuxUi backend
|
||||
|
||||
- Enable QT6 by default on KDE6
|
||||
- If QT6 load fails, fallback to QT5 (and vice versa)
|
||||
- Add use_qt6 build flag for packager control
|
||||
- Add --qt-version runtime flag for user control
|
||||
|
||||
R=thestig
|
||||
|
||||
Change-Id: Ib1d9f6183663ecf7b9ddfe9d7f3e3442e534ccda
|
||||
Fixed: 1434754
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4475369
|
||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1136295}
|
||||
|
||||
diff --git a/chrome/installer/linux/BUILD.gn b/chrome/installer/linux/BUILD.gn
|
||||
index 5639b9ffc996e..3bacd3398d4a2 100644
|
||||
--- a/chrome/installer/linux/BUILD.gn
|
||||
+++ b/chrome/installer/linux/BUILD.gn
|
||||
@@ -109,6 +109,9 @@ if (use_qt) {
|
||||
# to prevent a hard dependency on QT for the package.
|
||||
packaging_files += [ "$root_out_dir/libqt5_shim.so" ]
|
||||
}
|
||||
+if (use_qt6) {
|
||||
+ packaging_files += [ "$root_out_dir/libqt6_shim.so" ]
|
||||
+}
|
||||
|
||||
action_foreach("calculate_deb_dependencies") {
|
||||
deps = [ ":installer_deps" ]
|
||||
@@ -249,6 +252,12 @@ if (use_qt) {
|
||||
deps = [ "//ui/qt:qt5_shim" ]
|
||||
}
|
||||
}
|
||||
+if (use_qt6) {
|
||||
+ strip_binary("strip_qt6_shim") {
|
||||
+ binary_input = "$root_out_dir/libqt6_shim.so"
|
||||
+ deps = [ "//ui/qt:qt6_shim" ]
|
||||
+ }
|
||||
+}
|
||||
|
||||
# This target builds all "normal" Linux installers. You must set
|
||||
# is_component_build=false before building this target.
|
||||
@@ -447,6 +456,12 @@ group("installer_deps") {
|
||||
"//ui/qt:qt5_shim",
|
||||
]
|
||||
}
|
||||
+ if (use_qt6) {
|
||||
+ public_deps += [
|
||||
+ ":strip_qt6_shim",
|
||||
+ "//ui/qt:qt6_shim",
|
||||
+ ]
|
||||
+ }
|
||||
}
|
||||
|
||||
# Creates .deb and .rpm (RPM for non-ChromeOS only) installer packages.
|
||||
diff --git a/chrome/installer/linux/common/installer.include b/chrome/installer/linux/common/installer.include
|
||||
index 8d76f1f280b01..439ef5ccb0f52 100644
|
||||
--- a/chrome/installer/linux/common/installer.include
|
||||
+++ b/chrome/installer/linux/common/installer.include
|
||||
@@ -254,6 +254,11 @@ stage_install_common() {
|
||||
strippedfile="${OUTPUTDIR}/${file}.stripped"
|
||||
install -m ${SHLIB_PERMS} "${strippedfile}" "${STAGEDIR}/${INSTALLDIR}/${file}"
|
||||
fi
|
||||
+ if [ -f "${OUTPUTDIR}/libqt6_shim.so" ]; then
|
||||
+ file="libqt6_shim.so"
|
||||
+ strippedfile="${OUTPUTDIR}/${file}.stripped"
|
||||
+ install -m ${SHLIB_PERMS} "${strippedfile}" "${STAGEDIR}/${INSTALLDIR}/${file}"
|
||||
+ fi
|
||||
|
||||
# libc++
|
||||
if [ -f "${OUTPUTDIR}/lib/libc++.so" ]; then
|
||||
diff --git a/ui/qt/BUILD.gn b/ui/qt/BUILD.gn
|
||||
index bbede00daa4d0..6a67961edc2f7 100644
|
||||
--- a/ui/qt/BUILD.gn
|
||||
+++ b/ui/qt/BUILD.gn
|
||||
@@ -11,13 +11,6 @@ assert(use_qt)
|
||||
assert(is_linux)
|
||||
assert(!is_castos)
|
||||
|
||||
-pkg_config("qt5_config") {
|
||||
- packages = [
|
||||
- "Qt5Core",
|
||||
- "Qt5Widgets",
|
||||
- ]
|
||||
-}
|
||||
-
|
||||
config("qt_internal_config") {
|
||||
if (is_clang) {
|
||||
# libstdc++ headers are incompatible with -fcomplete-member-pointers.
|
||||
@@ -56,40 +49,57 @@ if (!use_sysroot) {
|
||||
}
|
||||
}
|
||||
|
||||
-shared_library("qt5_shim") {
|
||||
- visibility = [
|
||||
- ":qt",
|
||||
- "//chrome/installer/linux:*",
|
||||
- ]
|
||||
-
|
||||
- # Since qt_shim is a shared library even in non-component builds, it shouldn't
|
||||
- # depend on any other targets since that would duplicate code between binaries
|
||||
- # leading to increased size and potential issues from duplicated global state.
|
||||
- no_default_deps = true
|
||||
- assert_no_deps = [
|
||||
- "//base",
|
||||
- "//buildtools/third_party/libc++",
|
||||
- ]
|
||||
- deps = [ ":qt_interface" ]
|
||||
-
|
||||
- configs -= [ "//build/config/compiler:runtime_library" ]
|
||||
- configs += [
|
||||
- ":qt_internal_config",
|
||||
- ":qt5_config",
|
||||
- ]
|
||||
+template("qt_shim") {
|
||||
+ pkg_config("qt" + invoker.qt_version + "_config") {
|
||||
+ packages = [
|
||||
+ "Qt" + invoker.qt_version + "Core",
|
||||
+ "Qt" + invoker.qt_version + "Widgets",
|
||||
+ ]
|
||||
+ }
|
||||
|
||||
- public = []
|
||||
- sources = [
|
||||
- "qt_shim.cc",
|
||||
- "qt_shim.h",
|
||||
- ]
|
||||
- if (use_sysroot) {
|
||||
- # This file is generated with gen_qt_shim_moc.sh on an amd64 system to
|
||||
- # avoid a build-time dependency on `moc` when using the sysroot.
|
||||
- sources += [ "qt_shim_moc.cc" ]
|
||||
- } else {
|
||||
- sources += get_target_outputs(":generate_moc")
|
||||
- deps += [ ":generate_moc" ]
|
||||
+ shared_library(target_name) {
|
||||
+ visibility = [
|
||||
+ ":qt",
|
||||
+ "//chrome/installer/linux:*",
|
||||
+ ]
|
||||
+
|
||||
+ # Since qt_shim is a shared library even in non-component builds, it shouldn't
|
||||
+ # depend on any other targets since that would duplicate code between binaries
|
||||
+ # leading to increased size and potential issues from duplicated global state.
|
||||
+ no_default_deps = true
|
||||
+ assert_no_deps = [
|
||||
+ "//base",
|
||||
+ "//buildtools/third_party/libc++",
|
||||
+ ]
|
||||
+ deps = [ ":qt_interface" ]
|
||||
+
|
||||
+ configs -= [ "//build/config/compiler:runtime_library" ]
|
||||
+ configs += [
|
||||
+ ":qt_internal_config",
|
||||
+ ":qt" + invoker.qt_version + "_config",
|
||||
+ ]
|
||||
+
|
||||
+ public = []
|
||||
+ sources = [
|
||||
+ "qt_shim.cc",
|
||||
+ "qt_shim.h",
|
||||
+ ]
|
||||
+ if (use_sysroot) {
|
||||
+ # This file is generated with gen_qt_shim_moc.sh on an amd64 system to
|
||||
+ # avoid a build-time dependency on `moc` when using the sysroot.
|
||||
+ sources += [ "qt" + invoker.qt_version + "_shim_moc.cc" ]
|
||||
+ } else {
|
||||
+ sources += get_target_outputs(":generate_moc")
|
||||
+ deps += [ ":generate_moc" ]
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+qt_shim("qt5_shim") {
|
||||
+ qt_version = "5"
|
||||
+}
|
||||
+if (use_qt6) {
|
||||
+ qt_shim("qt6_shim") {
|
||||
+ qt_version = "6"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -100,6 +110,9 @@ component("qt") {
|
||||
|
||||
# qt_shim is in data_deps since we want to load it manually.
|
||||
data_deps = [ ":qt5_shim" ]
|
||||
+ if (use_qt6) {
|
||||
+ data_deps += [ ":qt6_shim" ]
|
||||
+ }
|
||||
deps = [
|
||||
":qt_interface",
|
||||
"//base",
|
||||
diff --git a/ui/qt/gen_qt_shim_moc.sh b/ui/qt/gen_qt_shim_moc.sh
|
||||
index 74272d5611dab..9d02c2dfcb12f 100755
|
||||
--- a/ui/qt/gen_qt_shim_moc.sh
|
||||
+++ b/ui/qt/gen_qt_shim_moc.sh
|
||||
@@ -6,11 +6,15 @@
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
|
||||
-URL="http://archive.debian.org/debian/pool/main/q/qtbase-opensource-src"
|
||||
-PACKAGE="qtbase5-dev-tools_5.3.2+dfsg-4+deb8u2_amd64.deb"
|
||||
-SHA256="7703754f2c230ce6b8b6030b6c1e7e030899aa9f45a415498df04bd5ec061a76"
|
||||
-SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
+URL5="http://archive.debian.org/debian/pool/main/q/qtbase-opensource-src"
|
||||
+PACKAGE5="qtbase5-dev-tools_5.3.2+dfsg-4+deb8u2_amd64.deb"
|
||||
+SHA256_5="7703754f2c230ce6b8b6030b6c1e7e030899aa9f45a415498df04bd5ec061a76"
|
||||
+
|
||||
+URL6="http://archive.ubuntu.com/ubuntu/pool/universe/q/qt6-base"
|
||||
+PACKAGE6="qt6-base-dev-tools_6.2.4+dfsg-2ubuntu1_amd64.deb"
|
||||
+SHA256_6="8dddfc79e7743185b07c478ca0f96a4ccc13d48ecccc42f44d2578c33c7d9b8b"
|
||||
|
||||
+SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
TMP_DIR=$(mktemp -d -p "$SCRIPT_DIR")
|
||||
function cleanup {
|
||||
rm -rf "$TMP_DIR"
|
||||
@@ -18,16 +22,22 @@ function cleanup {
|
||||
trap cleanup EXIT
|
||||
|
||||
cd "$TMP_DIR"
|
||||
-wget "$URL/$PACKAGE"
|
||||
-echo "$SHA256 $PACKAGE" | shasum -a 256 -c
|
||||
-dpkg -x "$PACKAGE" .
|
||||
-cat > ../qt_shim_moc.cc <<EOF
|
||||
-// Copyright 2022 The Chromium Authors
|
||||
+wget "$URL5/$PACKAGE5"
|
||||
+echo "$SHA256_5 $PACKAGE5" | shasum -a 256 -c
|
||||
+dpkg -x "$PACKAGE5" .
|
||||
+wget "$URL6/$PACKAGE6"
|
||||
+echo "$SHA256_6 $PACKAGE6" | shasum -a 256 -c
|
||||
+dpkg -x "$PACKAGE6" .
|
||||
+cat > ../qt5_shim_moc.cc <<EOF
|
||||
+// Copyright 2023 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
EOF
|
||||
cd "$SCRIPT_DIR/../.."
|
||||
+cp ui/qt/qt5_shim_moc.cc ui/qt/qt6_shim_moc.cc
|
||||
"$TMP_DIR/usr/lib/x86_64-linux-gnu/qt5/bin/moc" ui/qt/qt_shim.h \
|
||||
- >> ui/qt/qt_shim_moc.cc
|
||||
-git cl format ui/qt/qt_shim_moc.cc
|
||||
+ >> ui/qt/qt5_shim_moc.cc
|
||||
+"$TMP_DIR//usr/lib/qt6/libexec/moc" ui/qt/qt_shim.h \
|
||||
+ >> ui/qt/qt6_shim_moc.cc
|
||||
+git cl format ui/qt/qt5_shim_moc.cc ui/qt/qt6_shim_moc.cc
|
||||
diff --git a/ui/qt/qt.gni b/ui/qt/qt.gni
|
||||
index 27bb6375880b7..f45823270cb91 100644
|
||||
--- a/ui/qt/qt.gni
|
||||
+++ b/ui/qt/qt.gni
|
||||
@@ -4,9 +4,17 @@
|
||||
|
||||
import("//build/config/chromecast_build.gni")
|
||||
import("//build/config/sanitizers/sanitizers.gni")
|
||||
+import("//build/config/sysroot.gni")
|
||||
|
||||
declare_args() {
|
||||
# TODO(https://crbug.com/1424435): Allow QT in MSAN builds once QT is
|
||||
# added to the instrumented libraries.
|
||||
use_qt = is_linux && !is_castos && !is_msan
|
||||
}
|
||||
+
|
||||
+declare_args() {
|
||||
+ use_qt6 = use_qt && use_sysroot
|
||||
+}
|
||||
+
|
||||
+# use_qt6 => use_qt
|
||||
+assert(!use_qt6 || use_qt)
|
||||
diff --git a/ui/qt/qt_shim_moc.cc b/ui/qt/qt5_shim_moc.cc
|
||||
similarity index 95%
|
||||
rename from ui/qt/qt_shim_moc.cc
|
||||
rename to ui/qt/qt5_shim_moc.cc
|
||||
index dafbfadce56ba..8f8b6b57784a8 100644
|
||||
--- a/ui/qt/qt_shim_moc.cc
|
||||
+++ b/ui/qt/qt5_shim_moc.cc
|
||||
@@ -1,4 +1,4 @@
|
||||
-// Copyright 2022 The Chromium Authors
|
||||
+// Copyright 2023 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
@@ -89,26 +89,32 @@ const QMetaObject* qt::QtShim::metaObject() const {
|
||||
}
|
||||
|
||||
void* qt::QtShim::qt_metacast(const char* _clname) {
|
||||
- if (!_clname)
|
||||
+ if (!_clname) {
|
||||
return 0;
|
||||
- if (!strcmp(_clname, qt_meta_stringdata_qt__QtShim.stringdata))
|
||||
+ }
|
||||
+ if (!strcmp(_clname, qt_meta_stringdata_qt__QtShim.stringdata)) {
|
||||
return static_cast<void*>(const_cast<QtShim*>(this));
|
||||
- if (!strcmp(_clname, "QtInterface"))
|
||||
+ }
|
||||
+ if (!strcmp(_clname, "QtInterface")) {
|
||||
return static_cast<QtInterface*>(const_cast<QtShim*>(this));
|
||||
+ }
|
||||
return QObject::qt_metacast(_clname);
|
||||
}
|
||||
|
||||
int qt::QtShim::qt_metacall(QMetaObject::Call _c, int _id, void** _a) {
|
||||
_id = QObject::qt_metacall(_c, _id, _a);
|
||||
- if (_id < 0)
|
||||
+ if (_id < 0) {
|
||||
return _id;
|
||||
+ }
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
- if (_id < 2)
|
||||
+ if (_id < 2) {
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
+ }
|
||||
_id -= 2;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
- if (_id < 2)
|
||||
+ if (_id < 2) {
|
||||
*reinterpret_cast<int*>(_a[0]) = -1;
|
||||
+ }
|
||||
_id -= 2;
|
||||
}
|
||||
return _id;
|
||||
diff --git a/ui/qt/qt6_shim_moc.cc b/ui/qt/qt6_shim_moc.cc
|
||||
new file mode 100644
|
||||
index 0000000000000..6d02ca317b65d
|
||||
--- /dev/null
|
||||
+++ b/ui/qt/qt6_shim_moc.cc
|
||||
@@ -0,0 +1,143 @@
|
||||
+// Copyright 2023 The Chromium Authors
|
||||
+// Use of this source code is governed by a BSD-style license that can be
|
||||
+// found in the LICENSE file.
|
||||
+
|
||||
+/****************************************************************************
|
||||
+** Meta object code from reading C++ file 'qt_shim.h'
|
||||
+**
|
||||
+** Created by: The Qt Meta Object Compiler version 68 (Qt 6.2.4)
|
||||
+**
|
||||
+** WARNING! All changes made in this file will be lost!
|
||||
+*****************************************************************************/
|
||||
+
|
||||
+#include <QtCore/qbytearray.h>
|
||||
+#include <QtCore/qmetatype.h>
|
||||
+#include <memory>
|
||||
+#include "ui/qt/qt_shim.h"
|
||||
+#if !defined(Q_MOC_OUTPUT_REVISION)
|
||||
+#error "The header file 'qt_shim.h' doesn't include <QObject>."
|
||||
+#elif Q_MOC_OUTPUT_REVISION != 68
|
||||
+#error "This file was generated using the moc from 6.2.4. It"
|
||||
+#error "cannot be used with the include files from this version of Qt."
|
||||
+#error "(The moc has changed too much.)"
|
||||
+#endif
|
||||
+
|
||||
+QT_BEGIN_MOC_NAMESPACE
|
||||
+QT_WARNING_PUSH
|
||||
+QT_WARNING_DISABLE_DEPRECATED
|
||||
+struct qt_meta_stringdata_qt__QtShim_t {
|
||||
+ const uint offsetsAndSize[12];
|
||||
+ char stringdata0[52];
|
||||
+};
|
||||
+#define QT_MOC_LITERAL(ofs, len) \
|
||||
+ uint(offsetof(qt_meta_stringdata_qt__QtShim_t, stringdata0) + ofs), len
|
||||
+static const qt_meta_stringdata_qt__QtShim_t qt_meta_stringdata_qt__QtShim = {
|
||||
+ {
|
||||
+ QT_MOC_LITERAL(0, 10), // "qt::QtShim"
|
||||
+ QT_MOC_LITERAL(11, 11), // "FontChanged"
|
||||
+ QT_MOC_LITERAL(23, 0), // ""
|
||||
+ QT_MOC_LITERAL(24, 4), // "font"
|
||||
+ QT_MOC_LITERAL(29, 14), // "PaletteChanged"
|
||||
+ QT_MOC_LITERAL(44, 7) // "palette"
|
||||
+
|
||||
+ },
|
||||
+ "qt::QtShim\0FontChanged\0\0font\0"
|
||||
+ "PaletteChanged\0palette"};
|
||||
+#undef QT_MOC_LITERAL
|
||||
+
|
||||
+static const uint qt_meta_data_qt__QtShim[] = {
|
||||
+
|
||||
+ // content:
|
||||
+ 10, // revision
|
||||
+ 0, // classname
|
||||
+ 0, 0, // classinfo
|
||||
+ 2, 14, // methods
|
||||
+ 0, 0, // properties
|
||||
+ 0, 0, // enums/sets
|
||||
+ 0, 0, // constructors
|
||||
+ 0, // flags
|
||||
+ 0, // signalCount
|
||||
+
|
||||
+ // slots: name, argc, parameters, tag, flags, initial metatype offsets
|
||||
+ 1, 1, 26, 2, 0x08, 1 /* Private */, 4, 1, 29, 2, 0x08, 3 /* Private */,
|
||||
+
|
||||
+ // slots: parameters
|
||||
+ QMetaType::Void, QMetaType::QFont, 3, QMetaType::Void, QMetaType::QPalette,
|
||||
+ 5,
|
||||
+
|
||||
+ 0 // eod
|
||||
+};
|
||||
+
|
||||
+void qt::QtShim::qt_static_metacall(QObject* _o,
|
||||
+ QMetaObject::Call _c,
|
||||
+ int _id,
|
||||
+ void** _a) {
|
||||
+ if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
+ auto* _t = static_cast<QtShim*>(_o);
|
||||
+ (void)_t;
|
||||
+ switch (_id) {
|
||||
+ case 0:
|
||||
+ _t->FontChanged((*reinterpret_cast<std::add_pointer_t<QFont>>(_a[1])));
|
||||
+ break;
|
||||
+ case 1:
|
||||
+ _t->PaletteChanged(
|
||||
+ (*reinterpret_cast<std::add_pointer_t<QPalette>>(_a[1])));
|
||||
+ break;
|
||||
+ default:;
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+const QMetaObject qt::QtShim::staticMetaObject = {
|
||||
+ {QMetaObject::SuperData::link<QObject::staticMetaObject>(),
|
||||
+ qt_meta_stringdata_qt__QtShim.offsetsAndSize, qt_meta_data_qt__QtShim,
|
||||
+ qt_static_metacall, nullptr,
|
||||
+ qt_incomplete_metaTypeArray<
|
||||
+ qt_meta_stringdata_qt__QtShim_t,
|
||||
+ QtPrivate::TypeAndForceComplete<QtShim, std::true_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<const QFont&, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<const QPalette&, std::false_type>
|
||||
+
|
||||
+ >,
|
||||
+ nullptr}};
|
||||
+
|
||||
+const QMetaObject* qt::QtShim::metaObject() const {
|
||||
+ return QObject::d_ptr->metaObject ? QObject::d_ptr->dynamicMetaObject()
|
||||
+ : &staticMetaObject;
|
||||
+}
|
||||
+
|
||||
+void* qt::QtShim::qt_metacast(const char* _clname) {
|
||||
+ if (!_clname) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ if (!strcmp(_clname, qt_meta_stringdata_qt__QtShim.stringdata0)) {
|
||||
+ return static_cast<void*>(this);
|
||||
+ }
|
||||
+ if (!strcmp(_clname, "QtInterface")) {
|
||||
+ return static_cast<QtInterface*>(this);
|
||||
+ }
|
||||
+ return QObject::qt_metacast(_clname);
|
||||
+}
|
||||
+
|
||||
+int qt::QtShim::qt_metacall(QMetaObject::Call _c, int _id, void** _a) {
|
||||
+ _id = QObject::qt_metacall(_c, _id, _a);
|
||||
+ if (_id < 0) {
|
||||
+ return _id;
|
||||
+ }
|
||||
+ if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
+ if (_id < 2) {
|
||||
+ qt_static_metacall(this, _c, _id, _a);
|
||||
+ }
|
||||
+ _id -= 2;
|
||||
+ } else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
+ if (_id < 2) {
|
||||
+ *reinterpret_cast<QMetaType*>(_a[0]) = QMetaType();
|
||||
+ }
|
||||
+ _id -= 2;
|
||||
+ }
|
||||
+ return _id;
|
||||
+}
|
||||
+QT_WARNING_POP
|
||||
+QT_END_MOC_NAMESPACE
|
||||
diff --git a/ui/qt/qt_ui.cc b/ui/qt/qt_ui.cc
|
||||
index d4052b7e8bc3d..6a3b58e9f930b 100644
|
||||
--- a/ui/qt/qt_ui.cc
|
||||
+++ b/ui/qt/qt_ui.cc
|
||||
@@ -14,7 +14,9 @@
|
||||
#include "base/check.h"
|
||||
#include "base/command_line.h"
|
||||
#include "base/compiler_specific.h"
|
||||
+#include "base/environment.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
+#include "base/nix/xdg_util.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/path_service.h"
|
||||
#include "base/time/time.h"
|
||||
@@ -47,6 +49,45 @@ namespace qt {
|
||||
|
||||
namespace {
|
||||
|
||||
+const char kQtVersionFlag[] = "qt-version";
|
||||
+
|
||||
+void* LoadLibrary(const base::FilePath& path) {
|
||||
+ return dlopen(path.value().c_str(), RTLD_NOW | RTLD_GLOBAL);
|
||||
+}
|
||||
+
|
||||
+void* LoadLibraryOrFallback(const base::FilePath& path,
|
||||
+ const char* preferred,
|
||||
+ const char* fallback) {
|
||||
+ if (void* library = LoadLibrary(path.Append(preferred))) {
|
||||
+ return library;
|
||||
+ }
|
||||
+ return LoadLibrary(path.Append(fallback));
|
||||
+}
|
||||
+
|
||||
+bool PreferQt6() {
|
||||
+ auto* cmd = base::CommandLine::ForCurrentProcess();
|
||||
+ if (cmd->HasSwitch(kQtVersionFlag)) {
|
||||
+ std::string qt_version_string = cmd->GetSwitchValueASCII(kQtVersionFlag);
|
||||
+ unsigned int qt_version = 0;
|
||||
+ if (base::StringToUint(qt_version_string, &qt_version)) {
|
||||
+ switch (qt_version) {
|
||||
+ case 5:
|
||||
+ return false;
|
||||
+ case 6:
|
||||
+ return true;
|
||||
+ default:
|
||||
+ LOG(ERROR) << "Unsupported QT version " << qt_version;
|
||||
+ }
|
||||
+ } else {
|
||||
+ LOG(ERROR) << "Unable to parse QT version " << qt_version_string;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ auto env = base::Environment::Create();
|
||||
+ auto desktop = base::nix::GetDesktopEnvironment(env.get());
|
||||
+ return desktop == base::nix::DESKTOP_ENVIRONMENT_KDE6;
|
||||
+}
|
||||
+
|
||||
int QtWeightToCssWeight(int weight) {
|
||||
struct {
|
||||
int qt_weight;
|
||||
@@ -179,8 +220,10 @@ bool QtUi::Initialize() {
|
||||
base::FilePath path;
|
||||
if (!base::PathService::Get(base::DIR_MODULE, &path))
|
||||
return false;
|
||||
- path = path.Append("libqt5_shim.so");
|
||||
- void* libqt_shim = dlopen(path.value().c_str(), RTLD_NOW | RTLD_GLOBAL);
|
||||
+ void* libqt_shim =
|
||||
+ PreferQt6()
|
||||
+ ? LoadLibraryOrFallback(path, "libqt6_shim.so", "libqt5_shim.so")
|
||||
+ : LoadLibraryOrFallback(path, "libqt5_shim.so", "libqt6_shim.so");
|
||||
if (!libqt_shim)
|
||||
return false;
|
||||
void* create_qt_interface = dlsym(libqt_shim, "CreateQtInterface");
|
@ -0,0 +1,21 @@
|
||||
diff -up chromium-114.0.5735.26/components/omnibox/browser/omnibox_edit_model.cc.me chromium-114.0.5735.26/components/omnibox/browser/omnibox_edit_model.cc
|
||||
--- chromium-114.0.5735.26/components/omnibox/browser/omnibox_edit_model.cc.me 2023-05-14 09:14:10.886314480 +0200
|
||||
+++ chromium-114.0.5735.26/components/omnibox/browser/omnibox_edit_model.cc 2023-05-14 09:16:59.380054720 +0200
|
||||
@@ -79,7 +79,7 @@
|
||||
#include "ui/gfx/vector_icon_types.h"
|
||||
#endif
|
||||
|
||||
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
+#ifdef GOOGLE_CHROME_BRANDING
|
||||
#include "components/vector_icons/vector_icons.h" // nogncheck
|
||||
#endif
|
||||
|
||||
@@ -628,7 +628,7 @@ bool OmniboxEditModel::ShouldShowCurrent
|
||||
}
|
||||
|
||||
ui::ImageModel OmniboxEditModel::GetSuperGIcon(int image_size, bool dark_mode) {
|
||||
-#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
|
||||
+#ifdef GOOGLE_CHROME_BRANDING
|
||||
if (dark_mode) {
|
||||
return ui::ImageModel::FromVectorIcon(
|
||||
vector_icons::kGoogleGLogoMonochromeIcon, ui::kColorRefPrimary100,
|
@ -0,0 +1,62 @@
|
||||
diff -up chromium-114.0.5735.26/components/version_info/version_info.cc.constexpr-el7 chromium-114.0.5735.26/components/version_info/version_info.cc
|
||||
diff -up chromium-114.0.5735.26/components/version_info/version_info.h.constexpr-el7 chromium-114.0.5735.26/components/version_info/version_info.h
|
||||
--- chromium-114.0.5735.26/components/version_info/version_info.h.constexpr-el7 2023-05-11 03:36:19.000000000 +0200
|
||||
+++ chromium-114.0.5735.26/components/version_info/version_info.h 2023-05-14 10:59:19.921578645 +0200
|
||||
@@ -27,18 +27,18 @@ const std::string GetProductNameAndVersi
|
||||
const std::string& build_version);
|
||||
|
||||
// Returns the product name, e.g. "Chromium" or "Google Chrome".
|
||||
-constexpr std::string GetProductName() {
|
||||
+static const std::string GetProductName() {
|
||||
return PRODUCT_NAME;
|
||||
}
|
||||
|
||||
// Returns the version number, e.g. "6.0.490.1".
|
||||
-constexpr std::string GetVersionNumber() {
|
||||
+static const std::string GetVersionNumber() {
|
||||
return PRODUCT_VERSION;
|
||||
}
|
||||
|
||||
// Returns the product name and version information for the User-Agent header,
|
||||
// in the format: Chrome/<major_version>.<minor_version>.<build>.<patch>.
|
||||
-constexpr std::string GetProductNameAndVersionForUserAgent() {
|
||||
+static const std::string GetProductNameAndVersionForUserAgent() {
|
||||
return "Chrome/" + GetVersionNumber();
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ std::string GetMajorVersionNumber();
|
||||
const base::Version& GetVersion();
|
||||
|
||||
// Returns a version control specific identifier of this release.
|
||||
-constexpr std::string GetLastChange() {
|
||||
+static const std::string GetLastChange() {
|
||||
return LAST_CHANGE;
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ constexpr bool IsOfficialBuild() {
|
||||
}
|
||||
|
||||
// Returns the OS type, e.g. "Windows", "Linux", "FreeBSD", ...
|
||||
-constexpr std::string GetOSType() {
|
||||
+static const std::string GetOSType() {
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
return "Windows";
|
||||
#elif BUILDFLAG(IS_IOS)
|
||||
@@ -97,7 +97,7 @@ constexpr std::string GetOSType() {
|
||||
|
||||
// Returns a string equivalent of |channel|, independent of whether the build
|
||||
// is branded or not and without any additional modifiers.
|
||||
-constexpr std::string GetChannelString(Channel channel) {
|
||||
+static const std::string GetChannelString(Channel channel) {
|
||||
switch (channel) {
|
||||
case Channel::STABLE:
|
||||
return "stable";
|
||||
@@ -114,7 +114,7 @@ constexpr std::string GetChannelString(C
|
||||
}
|
||||
|
||||
// Returns a list of sanitizers enabled in this build.
|
||||
-constexpr std::string GetSanitizerList() {
|
||||
+static const std::string GetSanitizerList() {
|
||||
return ""
|
||||
#if defined(ADDRESS_SANITIZER)
|
||||
"address "
|
@ -0,0 +1,389 @@
|
||||
diff -up chromium-109.0.5414.74/base/check_op.h.me chromium-109.0.5414.74/base/check_op.h
|
||||
--- chromium-109.0.5414.74/base/check_op.h.me 2023-01-17 17:39:27.620875883 +0100
|
||||
+++ chromium-109.0.5414.74/base/check_op.h 2023-01-17 17:39:42.546060957 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef BASE_CHECK_OP_H_
|
||||
#define BASE_CHECK_OP_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <string>
|
||||
#include <type_traits>
|
||||
diff -up chromium-109.0.5414.74/base/debug/profiler.h.me chromium-109.0.5414.74/base/debug/profiler.h
|
||||
--- chromium-109.0.5414.74/base/debug/profiler.h.me 2023-01-17 16:29:26.368090073 +0100
|
||||
+++ chromium-109.0.5414.74/base/debug/profiler.h 2023-01-17 16:59:41.190628679 +0100
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "base/base_export.h"
|
||||
diff -up chromium-109.0.5414.74/components/viz/common/view_transition_element_resource_id.h.me chromium-109.0.5414.74/components/viz/common/view_transition_element_resource_id.h
|
||||
--- chromium-109.0.5414.74/components/viz/common/view_transition_element_resource_id.h.me 2023-01-17 19:03:10.920014806 +0100
|
||||
+++ chromium-109.0.5414.74/components/viz/common/view_transition_element_resource_id.h 2023-01-17 19:03:48.736395274 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_VIZ_COMMON_VIEW_TRANSITION_ELEMENT_RESOURCE_ID_H_
|
||||
#define COMPONENTS_VIZ_COMMON_VIEW_TRANSITION_ELEMENT_RESOURCE_ID_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
diff -up chromium-109.0.5414.74/gpu/config/gpu_feature_info.h.me chromium-109.0.5414.74/gpu/config/gpu_feature_info.h
|
||||
--- chromium-109.0.5414.74/gpu/config/gpu_feature_info.h.me 2023-01-17 19:06:53.530675129 +0100
|
||||
+++ chromium-109.0.5414.74/gpu/config/gpu_feature_info.h 2023-01-17 19:07:08.874849879 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef GPU_CONFIG_GPU_FEATURE_INFO_H_
|
||||
#define GPU_CONFIG_GPU_FEATURE_INFO_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
diff -up chromium-109.0.5414.74/net/base/net_export.h.me chromium-109.0.5414.74/net/base/net_export.h
|
||||
--- chromium-109.0.5414.74/net/base/net_export.h.me 2023-01-17 18:16:34.133854615 +0100
|
||||
+++ chromium-109.0.5414.74/net/base/net_export.h 2023-01-17 18:16:15.945623153 +0100
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef NET_BASE_NET_EXPORT_H_
|
||||
#define NET_BASE_NET_EXPORT_H_
|
||||
|
||||
+#include <cstdint>
|
||||
+
|
||||
// Defines NET_EXPORT so that functionality implemented by the net module can
|
||||
// be exported to consumers, and NET_EXPORT_PRIVATE that allows unit tests to
|
||||
// access features not intended to be used directly by real consumers.
|
||||
diff -up chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h.me chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h
|
||||
--- chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h.me 2023-01-17 17:12:34.184686515 +0100
|
||||
+++ chromium-109.0.5414.74/sandbox/linux/syscall_broker/broker_file_permission.h 2023-01-17 17:13:16.537162420 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_
|
||||
#define SANDBOX_LINUX_SYSCALL_BROKER_BROKER_FILE_PERMISSION_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <bitset>
|
||||
#include <string>
|
||||
|
||||
diff -up chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h.me chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h
|
||||
--- chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h.me 2023-01-17 17:33:20.895717307 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/abseil-cpp/absl/strings/string_view.h 2023-01-17 17:34:03.456185365 +0100
|
||||
@@ -27,6 +27,7 @@
|
||||
#ifndef ABSL_STRINGS_STRING_VIEW_H_
|
||||
#define ABSL_STRINGS_STRING_VIEW_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <algorithm>
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
diff -up chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h.me chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h
|
||||
--- chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h.me 2023-01-17 17:36:15.017616250 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/angle/include/GLSLANG/ShaderVars.h 2023-01-17 17:36:48.960982195 +0100
|
||||
@@ -10,6 +10,7 @@
|
||||
#ifndef GLSLANG_SHADERVARS_H_
|
||||
#define GLSLANG_SHADERVARS_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
#include <string>
|
||||
diff -up chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.me chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h
|
||||
--- chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h.me 2023-01-17 19:17:40.480876171 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/blink/public/common/bluetooth/web_bluetooth_device_id.h 2023-01-17 19:17:46.803958320 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef THIRD_PARTY_BLINK_PUBLIC_COMMON_BLUETOOTH_WEB_BLUETOOTH_DEVICE_ID_H_
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_COMMON_BLUETOOTH_WEB_BLUETOOTH_DEVICE_ID_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <array>
|
||||
#include <string>
|
||||
|
||||
diff -up chromium-109.0.5414.74/third_party/dawn/src/tint/reader/spirv/namer.h.me chromium-109.0.5414.74/third_party/dawn/src/tint/reader/spirv/namer.h
|
||||
--- chromium-109.0.5414.74/third_party/dawn/src/tint/reader/spirv/namer.h.me 2023-01-17 18:02:44.681538107 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/dawn/src/tint/reader/spirv/namer.h 2023-01-17 18:02:57.208679140 +0100
|
||||
@@ -15,6 +15,7 @@
|
||||
#ifndef SRC_TINT_READER_SPIRV_NAMER_H_
|
||||
#define SRC_TINT_READER_SPIRV_NAMER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
diff -up chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.me chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h
|
||||
--- chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h.me 2023-01-18 15:22:38.472940648 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/openscreen/src/discovery/dnssd/public/dns_sd_txt_record.h 2023-01-18 15:23:09.380255101 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef DISCOVERY_DNSSD_PUBLIC_DNS_SD_TXT_RECORD_H_
|
||||
#define DISCOVERY_DNSSD_PUBLIC_DNS_SD_TXT_RECORD_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <functional>
|
||||
#include <map>
|
||||
#include <set>
|
||||
diff -up chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp.me chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp
|
||||
--- chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp.me 2023-01-17 15:37:48.530626516 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/swiftshader/src/System/LRUCache.hpp 2023-01-17 16:57:46.025548092 +0100
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include "System/Debug.hpp"
|
||||
|
||||
+#include <cstdint>
|
||||
#include <cstddef>
|
||||
#include <functional>
|
||||
#include <unordered_set>
|
||||
diff -up chromium-109.0.5414.74/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h.me chromium-109.0.5414.74/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h
|
||||
--- chromium-109.0.5414.74/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h.me 2023-01-17 15:40:23.854386206 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/vulkan_memory_allocator/include/vk_mem_alloc.h 2023-01-17 16:58:19.397862885 +0100
|
||||
@@ -2388,6 +2388,7 @@ VMA_CALL_PRE void VMA_CALL_POST vmaFreeV
|
||||
#ifdef VMA_IMPLEMENTATION
|
||||
#undef VMA_IMPLEMENTATION
|
||||
|
||||
+#include <cstdio>
|
||||
#include <cstdint>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
diff -up chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h.me chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h
|
||||
--- chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h.me 2023-01-17 18:08:25.745491353 +0100
|
||||
+++ chromium-109.0.5414.74/ui/gfx/geometry/linear_gradient.h 2023-01-17 18:08:35.777667632 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef UI_GFX_LINEAR_GRADIENT_H_
|
||||
#define UI_GFX_LINEAR_GRADIENT_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <array>
|
||||
#include <string>
|
||||
|
||||
diff -up chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h.me chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h
|
||||
--- chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h.me 2023-01-19 10:10:21.287876736 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/ruy/src/ruy/profiler/instrumentation.h 2023-01-19 10:11:21.714778896 +0100
|
||||
@@ -17,6 +17,7 @@ limitations under the License.
|
||||
#define RUY_RUY_PROFILER_INSTRUMENTATION_H_
|
||||
|
||||
#ifdef RUY_PROFILER
|
||||
+#include <string>
|
||||
#include <cstdio>
|
||||
#include <mutex>
|
||||
#include <vector>
|
||||
diff -up chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.me chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h
|
||||
--- chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h.me 2023-01-19 10:30:27.533861985 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/tflite/src/tensorflow/lite/kernels/internal/spectrogram.h 2023-01-19 10:31:12.585554183 +0100
|
||||
@@ -31,6 +31,7 @@ limitations under the License.
|
||||
#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
|
||||
#define TENSORFLOW_LITE_KERNELS_INTERNAL_SPECTROGRAM_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <complex>
|
||||
#include <deque>
|
||||
#include <vector>
|
||||
diff -up chromium-109.0.5414.74/base/containers/flat_map.h.mee chromium-109.0.5414.74/base/containers/flat_map.h
|
||||
--- chromium-109.0.5414.74/base/containers/flat_map.h.mee 2023-01-19 10:59:52.214957773 +0100
|
||||
+++ chromium-109.0.5414.74/base/containers/flat_map.h 2023-01-19 11:00:06.415215309 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef BASE_CONTAINERS_FLAT_MAP_H_
|
||||
#define BASE_CONTAINERS_FLAT_MAP_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <functional>
|
||||
#include <tuple>
|
||||
#include <utility>
|
||||
diff -up chromium-109.0.5414.74/components/crash/core/app/crash_reporter_client.h.mee chromium-109.0.5414.74/components/crash/core/app/crash_reporter_client.h
|
||||
--- chromium-109.0.5414.74/components/crash/core/app/crash_reporter_client.h.mee 2023-01-19 10:36:40.571422826 +0100
|
||||
+++ chromium-109.0.5414.74/components/crash/core/app/crash_reporter_client.h 2023-01-19 10:36:49.343565294 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_
|
||||
#define COMPONENTS_CRASH_CORE_APP_CRASH_REPORTER_CLIENT_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "build/build_config.h"
|
||||
diff -up chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h.mee chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h
|
||||
--- chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h.mee 2023-01-19 11:45:15.953159755 +0100
|
||||
+++ chromium-109.0.5414.74/ui/base/prediction/kalman_filter.h 2023-01-19 11:45:22.320246241 +0100
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef UI_BASE_PREDICTION_KALMAN_FILTER_H_
|
||||
#define UI_BASE_PREDICTION_KALMAN_FILTER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
+
|
||||
#include "base/component_export.h"
|
||||
#include "ui/gfx/geometry/matrix3_f.h"
|
||||
|
||||
diff -up chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h.me chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h
|
||||
--- chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h.me 2023-01-19 15:20:07.620987949 +0100
|
||||
+++ chromium-109.0.5414.74/components/password_manager/core/browser/generation/password_generator.h 2023-01-19 15:20:18.324173702 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_GENERATION_PASSWORD_GENERATOR_H_
|
||||
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_GENERATION_PASSWORD_GENERATOR_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
|
||||
diff -up chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h.me chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h
|
||||
--- chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h.me 2023-01-19 16:00:14.350186515 +0100
|
||||
+++ chromium-109.0.5414.74/components/feature_engagement/internal/event_storage_validator.h 2023-01-19 16:00:21.643307993 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_EVENT_STORAGE_VALIDATOR_H_
|
||||
#define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_EVENT_STORAGE_VALIDATOR_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace feature_engagement {
|
||||
diff -up chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h.me chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h
|
||||
--- chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h.me 2023-01-19 15:59:18.210239416 +0100
|
||||
+++ chromium-109.0.5414.74/components/feature_engagement/internal/never_event_storage_validator.h 2023-01-19 15:59:34.513515030 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
|
||||
#define COMPONENTS_FEATURE_ENGAGEMENT_INTERNAL_NEVER_EVENT_STORAGE_VALIDATOR_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "components/feature_engagement/internal/event_storage_validator.h"
|
||||
diff -up chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h.me chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h
|
||||
--- chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h.me 2023-01-19 16:06:17.548272878 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/Signals.h 2023-01-19 16:06:25.685410592 +0100
|
||||
@@ -14,6 +14,7 @@
|
||||
#ifndef LLVM_SUPPORT_SIGNALS_H
|
||||
#define LLVM_SUPPORT_SIGNALS_H
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
namespace llvm {
|
||||
diff -up chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.me chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc
|
||||
--- chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc.me 2023-01-19 16:09:29.216477182 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/swiftshader/third_party/llvm-10.0/llvm/lib/Support/Unix/Signals.inc 2023-01-19 16:10:05.657089208 +0100
|
||||
@@ -45,6 +45,7 @@
|
||||
#include "llvm/Support/SaveAndRestore.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include <algorithm>
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <sysexits.h>
|
||||
#ifdef HAVE_BACKTRACE
|
||||
diff -up chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h.me chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h
|
||||
--- chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h.me 2023-01-19 16:32:05.338160131 +0100
|
||||
+++ chromium-109.0.5414.74/chrome/browser/privacy_budget/encountered_surface_tracker.h 2023-01-19 16:32:16.213326798 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef CHROME_BROWSER_PRIVACY_BUDGET_ENCOUNTERED_SURFACE_TRACKER_H_
|
||||
#define CHROME_BROWSER_PRIVACY_BUDGET_ENCOUNTERED_SURFACE_TRACKER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <map>
|
||||
|
||||
#include "base/containers/flat_set.h"
|
||||
diff -up chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h.me chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h
|
||||
--- chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h.me 2023-01-19 16:47:55.548571102 +0100
|
||||
+++ chromium-109.0.5414.74/components/autofill/core/browser/autofill_ablation_study.h 2023-01-19 16:48:29.214146529 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ABLATION_STUDY_H_
|
||||
#define COMPONENTS_AUTOFILL_CORE_BROWSER_AUTOFILL_ABLATION_STUDY_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
class GURL;
|
||||
diff -up chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h.me chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h
|
||||
--- chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h.me 2023-01-19 16:57:29.525372814 +0100
|
||||
+++ chromium-109.0.5414.74/components/omnibox/browser/on_device_head_model.h 2023-01-19 16:58:02.667979288 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_OMNIBOX_BROWSER_ON_DEVICE_HEAD_MODEL_H_
|
||||
#define COMPONENTS_OMNIBOX_BROWSER_ON_DEVICE_HEAD_MODEL_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
diff -up chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h.me chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h
|
||||
--- chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h.me 2023-01-19 17:02:45.258544665 +0100
|
||||
+++ chromium-109.0.5414.74/components/payments/content/utility/fingerprint_parser.h 2023-01-19 17:02:52.577611757 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_
|
||||
#define COMPONENTS_PAYMENTS_CONTENT_UTILITY_FINGERPRINT_PARSER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <stddef.h>
|
||||
|
||||
#include <string>
|
||||
diff -up chromium-109.0.5414.74/pdf/document_attachment_info.h.me chromium-109.0.5414.74/pdf/document_attachment_info.h
|
||||
--- chromium-109.0.5414.74/pdf/document_attachment_info.h.me 2023-01-19 17:28:28.552063534 +0100
|
||||
+++ chromium-109.0.5414.74/pdf/document_attachment_info.h 2023-01-19 17:28:48.072379953 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef PDF_DOCUMENT_ATTACHMENT_INFO_H_
|
||||
#define PDF_DOCUMENT_ATTACHMENT_INFO_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
|
||||
diff -up chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h.me chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h
|
||||
--- chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h.me 2023-01-19 18:25:47.648193710 +0100
|
||||
+++ chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h 2023-01-19 18:26:11.488593556 +0100
|
||||
@@ -5,6 +5,8 @@
|
||||
#ifndef CONSTANTS_ANNOTATION_FLAGS_H_
|
||||
#define CONSTANTS_ANNOTATION_FLAGS_H_
|
||||
|
||||
+#include <cstdint>
|
||||
+
|
||||
namespace pdfium {
|
||||
namespace annotation_flags {
|
||||
|
||||
diff -up chromium-109.0.5414.74/base/cpu.h.me chromium-109.0.5414.74/base/cpu.h
|
||||
--- chromium-109.0.5414.74/base/cpu.h.me 2023-01-19 21:31:02.905062987 +0100
|
||||
+++ chromium-109.0.5414.74/base/cpu.h 2023-01-19 21:31:32.298573267 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
#ifndef BASE_CPU_H_
|
||||
#define BASE_CPU_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
#include "base/base_export.h"
|
||||
diff -up chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.me chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h
|
||||
--- chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h.me 2023-04-15 16:44:55.344305412 +0200
|
||||
+++ chromium-113.0.5672.24/third_party/vulkan-deps/vulkan-validation-layers/src/layers/external/vma/vk_mem_alloc.h 2023-04-15 16:47:09.028666995 +0200
|
||||
@@ -2854,6 +2854,7 @@ static void vma_aligned_free(void* VMA_N
|
||||
|
||||
// Define this macro to 1 to enable functions: vmaBuildStatsString, vmaFreeStatsString.
|
||||
#if VMA_STATS_STRING_ENABLED
|
||||
+#include <stdio.h>
|
||||
static inline void VmaUint32ToStr(char* VMA_NOT_NULL outStr, size_t strLen, uint32_t num)
|
||||
{
|
||||
snprintf(outStr, strLen, "%u", static_cast<unsigned int>(num));
|
||||
diff -up chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h.me chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h
|
||||
--- chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h.me 2023-04-18 15:55:44.774916319 +0200
|
||||
+++ chromium-113.0.5672.37/chrome/browser/webauthn/authenticator_request_dialog_model.h 2023-04-18 15:55:54.441085882 +0200
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
+#include <variant>
|
||||
|
||||
#include "base/containers/span.h"
|
||||
#include "base/functional/callback_forward.h"
|
||||
diff -up chromium-113.0.5672.37/gin/time_clamper.h.me chromium-113.0.5672.37/gin/time_clamper.h
|
||||
--- chromium-113.0.5672.37/gin/time_clamper.h.me 2023-04-18 16:38:41.180437467 +0200
|
||||
+++ chromium-113.0.5672.37/gin/time_clamper.h 2023-04-18 16:39:43.857049432 +0200
|
||||
@@ -48,7 +48,7 @@ class GIN_EXPORT TimeClamper {
|
||||
const int64_t micros = now_micros % 1000;
|
||||
// abs() is necessary for devices with times before unix-epoch (most likely
|
||||
// configured incorrectly).
|
||||
- if (abs(micros) + kResolutionMicros < 1000) {
|
||||
+ if (std::abs(micros) + kResolutionMicros < 1000) {
|
||||
return now_micros / 1000;
|
||||
}
|
||||
return ClampTimeResolution(now_micros) / 1000;
|
||||
diff -up chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc.me chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc
|
||||
--- chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc.me 2023-04-21 08:07:55.362714544 +0200
|
||||
+++ chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc 2023-04-21 08:14:35.424158693 +0200
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <queue>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
+#include <cstring>
|
||||
|
||||
#include "base/check.h"
|
||||
#include "base/files/file_path.h"
|
@ -0,0 +1,105 @@
|
||||
diff -up chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc
|
||||
--- chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc.nounrar 2023-05-18 00:37:47.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/chrome/browser/safe_browsing/download_protection/file_analyzer.cc 2023-05-21 18:12:30.368425080 +0200
|
||||
@@ -77,8 +77,6 @@ void FileAnalyzer::Start(const base::Fil
|
||||
|
||||
if (inspection_type == DownloadFileType::ZIP) {
|
||||
StartExtractZipFeatures();
|
||||
- } else if (inspection_type == DownloadFileType::RAR) {
|
||||
- StartExtractRarFeatures();
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
} else if (inspection_type == DownloadFileType::DMG) {
|
||||
StartExtractDmgFeatures();
|
||||
diff -up chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc
|
||||
--- chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/chrome/common/safe_browsing/archive_analyzer.cc 2023-05-21 18:11:14.870058635 +0200
|
||||
@@ -8,7 +8,6 @@
|
||||
#include "build/build_config.h"
|
||||
#include "build/buildflag.h"
|
||||
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
|
||||
-#include "chrome/common/safe_browsing/rar_analyzer.h"
|
||||
#include "chrome/common/safe_browsing/seven_zip_analyzer.h"
|
||||
#include "chrome/common/safe_browsing/zip_analyzer.h"
|
||||
#include "components/safe_browsing/content/common/proto/download_file_types.pb.h"
|
||||
@@ -23,9 +22,7 @@ namespace safe_browsing {
|
||||
// static
|
||||
std::unique_ptr<ArchiveAnalyzer> ArchiveAnalyzer::CreateForArchiveType(
|
||||
DownloadFileType_InspectionType file_type) {
|
||||
- if (file_type == DownloadFileType::RAR) {
|
||||
- return std::make_unique<RarAnalyzer>();
|
||||
- } else if (file_type == DownloadFileType::ZIP) {
|
||||
+ if (file_type == DownloadFileType::ZIP) {
|
||||
return std::make_unique<ZipAnalyzer>();
|
||||
} else if (file_type == DownloadFileType::SEVEN_ZIP) {
|
||||
return std::make_unique<SevenZipAnalyzer>();
|
||||
diff -up chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn.nounrar chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn
|
||||
--- chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/chrome/common/safe_browsing/BUILD.gn 2023-05-21 18:11:14.869058617 +0200
|
||||
@@ -145,8 +145,6 @@ source_set("safe_browsing") {
|
||||
"protobuf_message_log_macros.h",
|
||||
"protobuf_message_read_macros.h",
|
||||
"protobuf_message_write_macros.h",
|
||||
- "rar_analyzer.cc",
|
||||
- "rar_analyzer.h",
|
||||
"seven_zip_analyzer.cc",
|
||||
"seven_zip_analyzer.h",
|
||||
"zip_analyzer.cc",
|
||||
@@ -162,7 +160,6 @@ source_set("safe_browsing") {
|
||||
"//components/safe_browsing/content/common:file_type_policies",
|
||||
"//components/safe_browsing/core/common",
|
||||
"//third_party/lzma_sdk/google:seven_zip_reader",
|
||||
- "//third_party/unrar:unrar",
|
||||
]
|
||||
|
||||
if (is_linux) {
|
||||
diff -up chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc
|
||||
--- chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/chrome/common/safe_browsing/zip_analyzer.cc 2023-05-21 18:11:14.869058617 +0200
|
||||
@@ -18,7 +18,6 @@
|
||||
#include "base/time/time.h"
|
||||
#include "build/build_config.h"
|
||||
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
|
||||
-#include "chrome/common/safe_browsing/rar_analyzer.h"
|
||||
#include "components/safe_browsing/content/common/file_type_policies.h"
|
||||
#include "components/safe_browsing/core/common/features.h"
|
||||
#include "components/safe_browsing/core/common/proto/csd.pb.h"
|
||||
diff -up chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc.nounrar chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc
|
||||
--- chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.cc 2023-05-21 18:11:14.870058635 +0200
|
||||
@@ -71,6 +71,7 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
|
||||
base::File rar_file,
|
||||
mojo::PendingRemote<chrome::mojom::TemporaryFileGetter> temp_file_getter,
|
||||
AnalyzeRarFileCallback callback) {
|
||||
+#if 0
|
||||
DCHECK(rar_file.IsValid());
|
||||
temp_file_getter_.Bind(std::move(temp_file_getter));
|
||||
callback_ = std::move(callback);
|
||||
@@ -86,6 +87,9 @@ void SafeArchiveAnalyzer::AnalyzeRarFile
|
||||
rar_analyzer_.Analyze(std::move(rar_file), base::FilePath(),
|
||||
std::move(analysis_finished_callback),
|
||||
std::move(temp_file_getter_callback), &results_);
|
||||
+#else
|
||||
+ NOTREACHED();
|
||||
+#endif
|
||||
}
|
||||
|
||||
void SafeArchiveAnalyzer::AnalyzeSevenZipFile(
|
||||
diff -up chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h.nounrar chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h
|
||||
--- chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h.nounrar 2023-05-18 00:37:48.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/chrome/services/file_util/safe_archive_analyzer.h 2023-05-21 18:11:14.870058635 +0200
|
||||
@@ -6,7 +6,6 @@
|
||||
#define CHROME_SERVICES_FILE_UTIL_SAFE_ARCHIVE_ANALYZER_H_
|
||||
|
||||
#include "chrome/common/safe_browsing/archive_analyzer_results.h"
|
||||
-#include "chrome/common/safe_browsing/rar_analyzer.h"
|
||||
#include "chrome/common/safe_browsing/seven_zip_analyzer.h"
|
||||
#include "chrome/common/safe_browsing/zip_analyzer.h"
|
||||
#include "chrome/services/file_util/public/mojom/safe_archive_analyzer.mojom.h"
|
||||
@@ -63,7 +62,6 @@ class SafeArchiveAnalyzer : public chrom
|
||||
void Timeout();
|
||||
|
||||
safe_browsing::ZipAnalyzer zip_analyzer_;
|
||||
- safe_browsing::RarAnalyzer rar_analyzer_;
|
||||
safe_browsing::SevenZipAnalyzer seven_zip_analyzer_;
|
||||
#if BUILDFLAG(IS_MAC)
|
||||
safe_browsing::dmg::DMGAnalyzer dmg_analyzer_;
|
@ -0,0 +1,21 @@
|
||||
diff --git a/ui/qt/qt_ui.cc b/ui/qt/qt_ui.cc
|
||||
index bac5245a..a97fa8b 100644
|
||||
--- a/ui/qt/qt_ui.cc
|
||||
+++ b/ui/qt/qt_ui.cc
|
||||
@@ -422,12 +422,14 @@
|
||||
auto desc = shim_->GetFontDescription();
|
||||
|
||||
font_family_ = desc.family.c_str();
|
||||
+ // Points are defined at 72 DPI and pixels are 96 DPI by default.
|
||||
+ constexpr double kPointToPixelRatio = 96.0 / 72.0;
|
||||
if (desc.size_pixels > 0) {
|
||||
font_size_pixels_ = desc.size_pixels;
|
||||
- font_size_points_ = font_size_pixels_ / GetDeviceScaleFactor();
|
||||
+ font_size_points_ = std::round(font_size_pixels_ / kPointToPixelRatio);
|
||||
} else {
|
||||
font_size_points_ = desc.size_points;
|
||||
- font_size_pixels_ = font_size_points_ * GetDeviceScaleFactor();
|
||||
+ font_size_pixels_ = std::round(font_size_points_ * kPointToPixelRatio);
|
||||
}
|
||||
font_style_ = desc.is_italic ? gfx::Font::ITALIC : gfx::Font::NORMAL;
|
||||
font_weight_ = QtWeightToCssWeight(desc.weight);
|
@ -0,0 +1,574 @@
|
||||
commit c51d6447fd0d124903d16bf5952efccbf9e1ca92
|
||||
Author: Tom Anderson <thomasanderson@chromium.org>
|
||||
Date: Wed May 24 22:53:20 2023 +0000
|
||||
|
||||
[Qt] Handle scale factor changes
|
||||
|
||||
This is a speculative fix for https://crbug.com/1439149. I suspect
|
||||
the scale factor is not set immediately on QT initialization, but
|
||||
is set asynchronously shortly after. This CL adds a listener for
|
||||
QT scale changes.
|
||||
|
||||
R=thestig
|
||||
|
||||
Low-Coverage-Reason: No QT tests currently
|
||||
Change-Id: I7dea23e16a6bb26237564af2dc4e43480f6aea9f
|
||||
Bug: 1439149
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4559732
|
||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Auto-Submit: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1148805}
|
||||
|
||||
diff --git a/ui/qt/qt5_shim_moc.cc b/ui/qt/qt5_shim_moc.cc
|
||||
index 8f8b6b57784a8..6e504f23c603a 100644
|
||||
--- a/ui/qt/qt5_shim_moc.cc
|
||||
+++ b/ui/qt/qt5_shim_moc.cc
|
||||
@@ -23,8 +23,8 @@
|
||||
|
||||
QT_BEGIN_MOC_NAMESPACE
|
||||
struct qt_meta_stringdata_qt__QtShim_t {
|
||||
- QByteArrayData data[6];
|
||||
- char stringdata[52];
|
||||
+ QByteArrayData data[13];
|
||||
+ char stringdata[151];
|
||||
};
|
||||
#define QT_MOC_LITERAL(idx, ofs, len) \
|
||||
Q_STATIC_BYTE_ARRAY_DATA_HEADER_INITIALIZER_WITH_OFFSET( \
|
||||
@@ -33,9 +33,16 @@ struct qt_meta_stringdata_qt__QtShim_t {
|
||||
static const qt_meta_stringdata_qt__QtShim_t qt_meta_stringdata_qt__QtShim = {
|
||||
{QT_MOC_LITERAL(0, 0, 10), QT_MOC_LITERAL(1, 11, 11),
|
||||
QT_MOC_LITERAL(2, 23, 0), QT_MOC_LITERAL(3, 24, 4),
|
||||
- QT_MOC_LITERAL(4, 29, 14), QT_MOC_LITERAL(5, 44, 7)},
|
||||
+ QT_MOC_LITERAL(4, 29, 14), QT_MOC_LITERAL(5, 44, 7),
|
||||
+ QT_MOC_LITERAL(6, 52, 11), QT_MOC_LITERAL(7, 64, 8),
|
||||
+ QT_MOC_LITERAL(8, 73, 6), QT_MOC_LITERAL(9, 80, 13),
|
||||
+ QT_MOC_LITERAL(10, 94, 25), QT_MOC_LITERAL(11, 120, 3),
|
||||
+ QT_MOC_LITERAL(12, 124, 26)},
|
||||
"qt::QtShim\0FontChanged\0\0font\0"
|
||||
- "PaletteChanged\0palette"};
|
||||
+ "PaletteChanged\0palette\0ScreenAdded\0"
|
||||
+ "QScreen*\0screen\0ScreenRemoved\0"
|
||||
+ "LogicalDotsPerInchChanged\0dpi\0"
|
||||
+ "PhysicalDotsPerInchChanged"};
|
||||
#undef QT_MOC_LITERAL
|
||||
|
||||
static const uint qt_meta_data_qt__QtShim[] = {
|
||||
@@ -44,7 +51,7 @@ static const uint qt_meta_data_qt__QtShim[] = {
|
||||
7, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
- 2, 14, // methods
|
||||
+ 6, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
@@ -52,11 +59,15 @@ static const uint qt_meta_data_qt__QtShim[] = {
|
||||
0, // signalCount
|
||||
|
||||
// slots: name, argc, parameters, tag, flags
|
||||
- 1, 1, 24, 2, 0x08 /* Private */, 4, 1, 27, 2, 0x08 /* Private */,
|
||||
+ 1, 1, 44, 2, 0x08 /* Private */, 4, 1, 47, 2, 0x08 /* Private */, 6, 1, 50,
|
||||
+ 2, 0x08 /* Private */, 9, 1, 53, 2, 0x08 /* Private */, 10, 1, 56, 2,
|
||||
+ 0x08 /* Private */, 12, 1, 59, 2, 0x08 /* Private */,
|
||||
|
||||
// slots: parameters
|
||||
QMetaType::Void, QMetaType::QFont, 3, QMetaType::Void, QMetaType::QPalette,
|
||||
- 5,
|
||||
+ 5, QMetaType::Void, 0x80000000 | 7, 8, QMetaType::Void, 0x80000000 | 7, 8,
|
||||
+ QMetaType::Void, QMetaType::QReal, 11, QMetaType::Void, QMetaType::QReal,
|
||||
+ 11,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
@@ -74,6 +85,18 @@ void qt::QtShim::qt_static_metacall(QObject* _o,
|
||||
case 1:
|
||||
_t->PaletteChanged((*reinterpret_cast<const QPalette(*)>(_a[1])));
|
||||
break;
|
||||
+ case 2:
|
||||
+ _t->ScreenAdded((*reinterpret_cast<QScreen*(*)>(_a[1])));
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ _t->ScreenRemoved((*reinterpret_cast<QScreen*(*)>(_a[1])));
|
||||
+ break;
|
||||
+ case 4:
|
||||
+ _t->LogicalDotsPerInchChanged((*reinterpret_cast<qreal(*)>(_a[1])));
|
||||
+ break;
|
||||
+ case 5:
|
||||
+ _t->PhysicalDotsPerInchChanged((*reinterpret_cast<qreal(*)>(_a[1])));
|
||||
+ break;
|
||||
default:;
|
||||
}
|
||||
}
|
||||
@@ -107,15 +130,15 @@ int qt::QtShim::qt_metacall(QMetaObject::Call _c, int _id, void** _a) {
|
||||
return _id;
|
||||
}
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
- if (_id < 2) {
|
||||
+ if (_id < 6) {
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
}
|
||||
- _id -= 2;
|
||||
+ _id -= 6;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
- if (_id < 2) {
|
||||
+ if (_id < 6) {
|
||||
*reinterpret_cast<int*>(_a[0]) = -1;
|
||||
}
|
||||
- _id -= 2;
|
||||
+ _id -= 6;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
diff --git a/ui/qt/qt6_shim_moc.cc b/ui/qt/qt6_shim_moc.cc
|
||||
index 6d02ca317b65d..a16515008d892 100644
|
||||
--- a/ui/qt/qt6_shim_moc.cc
|
||||
+++ b/ui/qt/qt6_shim_moc.cc
|
||||
@@ -26,8 +26,8 @@ QT_BEGIN_MOC_NAMESPACE
|
||||
QT_WARNING_PUSH
|
||||
QT_WARNING_DISABLE_DEPRECATED
|
||||
struct qt_meta_stringdata_qt__QtShim_t {
|
||||
- const uint offsetsAndSize[12];
|
||||
- char stringdata0[52];
|
||||
+ const uint offsetsAndSize[26];
|
||||
+ char stringdata0[151];
|
||||
};
|
||||
#define QT_MOC_LITERAL(ofs, len) \
|
||||
uint(offsetof(qt_meta_stringdata_qt__QtShim_t, stringdata0) + ofs), len
|
||||
@@ -38,11 +38,21 @@ static const qt_meta_stringdata_qt__QtShim_t qt_meta_stringdata_qt__QtShim = {
|
||||
QT_MOC_LITERAL(23, 0), // ""
|
||||
QT_MOC_LITERAL(24, 4), // "font"
|
||||
QT_MOC_LITERAL(29, 14), // "PaletteChanged"
|
||||
- QT_MOC_LITERAL(44, 7) // "palette"
|
||||
+ QT_MOC_LITERAL(44, 7), // "palette"
|
||||
+ QT_MOC_LITERAL(52, 11), // "ScreenAdded"
|
||||
+ QT_MOC_LITERAL(64, 8), // "QScreen*"
|
||||
+ QT_MOC_LITERAL(73, 6), // "screen"
|
||||
+ QT_MOC_LITERAL(80, 13), // "ScreenRemoved"
|
||||
+ QT_MOC_LITERAL(94, 25), // "LogicalDotsPerInchChanged"
|
||||
+ QT_MOC_LITERAL(120, 3), // "dpi"
|
||||
+ QT_MOC_LITERAL(124, 26) // "PhysicalDotsPerInchChanged"
|
||||
|
||||
},
|
||||
"qt::QtShim\0FontChanged\0\0font\0"
|
||||
- "PaletteChanged\0palette"};
|
||||
+ "PaletteChanged\0palette\0ScreenAdded\0"
|
||||
+ "QScreen*\0screen\0ScreenRemoved\0"
|
||||
+ "LogicalDotsPerInchChanged\0dpi\0"
|
||||
+ "PhysicalDotsPerInchChanged"};
|
||||
#undef QT_MOC_LITERAL
|
||||
|
||||
static const uint qt_meta_data_qt__QtShim[] = {
|
||||
@@ -51,7 +61,7 @@ static const uint qt_meta_data_qt__QtShim[] = {
|
||||
10, // revision
|
||||
0, // classname
|
||||
0, 0, // classinfo
|
||||
- 2, 14, // methods
|
||||
+ 6, 14, // methods
|
||||
0, 0, // properties
|
||||
0, 0, // enums/sets
|
||||
0, 0, // constructors
|
||||
@@ -59,11 +69,15 @@ static const uint qt_meta_data_qt__QtShim[] = {
|
||||
0, // signalCount
|
||||
|
||||
// slots: name, argc, parameters, tag, flags, initial metatype offsets
|
||||
- 1, 1, 26, 2, 0x08, 1 /* Private */, 4, 1, 29, 2, 0x08, 3 /* Private */,
|
||||
+ 1, 1, 50, 2, 0x08, 1 /* Private */, 4, 1, 53, 2, 0x08, 3 /* Private */, 6,
|
||||
+ 1, 56, 2, 0x08, 5 /* Private */, 9, 1, 59, 2, 0x08, 7 /* Private */, 10, 1,
|
||||
+ 62, 2, 0x08, 9 /* Private */, 12, 1, 65, 2, 0x08, 11 /* Private */,
|
||||
|
||||
// slots: parameters
|
||||
QMetaType::Void, QMetaType::QFont, 3, QMetaType::Void, QMetaType::QPalette,
|
||||
- 5,
|
||||
+ 5, QMetaType::Void, 0x80000000 | 7, 8, QMetaType::Void, 0x80000000 | 7, 8,
|
||||
+ QMetaType::Void, QMetaType::QReal, 11, QMetaType::Void, QMetaType::QReal,
|
||||
+ 11,
|
||||
|
||||
0 // eod
|
||||
};
|
||||
@@ -83,6 +97,22 @@ void qt::QtShim::qt_static_metacall(QObject* _o,
|
||||
_t->PaletteChanged(
|
||||
(*reinterpret_cast<std::add_pointer_t<QPalette>>(_a[1])));
|
||||
break;
|
||||
+ case 2:
|
||||
+ _t->ScreenAdded(
|
||||
+ (*reinterpret_cast<std::add_pointer_t<QScreen*>>(_a[1])));
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ _t->ScreenRemoved(
|
||||
+ (*reinterpret_cast<std::add_pointer_t<QScreen*>>(_a[1])));
|
||||
+ break;
|
||||
+ case 4:
|
||||
+ _t->LogicalDotsPerInchChanged(
|
||||
+ (*reinterpret_cast<std::add_pointer_t<qreal>>(_a[1])));
|
||||
+ break;
|
||||
+ case 5:
|
||||
+ _t->PhysicalDotsPerInchChanged(
|
||||
+ (*reinterpret_cast<std::add_pointer_t<qreal>>(_a[1])));
|
||||
+ break;
|
||||
default:;
|
||||
}
|
||||
}
|
||||
@@ -98,7 +128,15 @@ const QMetaObject qt::QtShim::staticMetaObject = {
|
||||
QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
QtPrivate::TypeAndForceComplete<const QFont&, std::false_type>,
|
||||
QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
- QtPrivate::TypeAndForceComplete<const QPalette&, std::false_type>
|
||||
+ QtPrivate::TypeAndForceComplete<const QPalette&, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<QScreen*, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<QScreen*, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<qreal, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<void, std::false_type>,
|
||||
+ QtPrivate::TypeAndForceComplete<qreal, std::false_type>
|
||||
|
||||
>,
|
||||
nullptr}};
|
||||
@@ -127,15 +165,15 @@ int qt::QtShim::qt_metacall(QMetaObject::Call _c, int _id, void** _a) {
|
||||
return _id;
|
||||
}
|
||||
if (_c == QMetaObject::InvokeMetaMethod) {
|
||||
- if (_id < 2) {
|
||||
+ if (_id < 6) {
|
||||
qt_static_metacall(this, _c, _id, _a);
|
||||
}
|
||||
- _id -= 2;
|
||||
+ _id -= 6;
|
||||
} else if (_c == QMetaObject::RegisterMethodArgumentMetaType) {
|
||||
- if (_id < 2) {
|
||||
+ if (_id < 6) {
|
||||
*reinterpret_cast<QMetaType*>(_a[0]) = QMetaType();
|
||||
}
|
||||
- _id -= 2;
|
||||
+ _id -= 6;
|
||||
}
|
||||
return _id;
|
||||
}
|
||||
diff --git a/ui/qt/qt_interface.h b/ui/qt/qt_interface.h
|
||||
index 6a362bc66c0e3..28dfc6603544f 100644
|
||||
--- a/ui/qt/qt_interface.h
|
||||
+++ b/ui/qt/qt_interface.h
|
||||
@@ -118,6 +118,7 @@ class QtInterface {
|
||||
|
||||
virtual void FontChanged() = 0;
|
||||
virtual void ThemeChanged() = 0;
|
||||
+ virtual void ScaleFactorMaybeChanged() = 0;
|
||||
};
|
||||
|
||||
QtInterface() = default;
|
||||
diff --git a/ui/qt/qt_shim.cc b/ui/qt/qt_shim.cc
|
||||
index 74d34ad196f18..0aec9c3aed4ad 100644
|
||||
--- a/ui/qt/qt_shim.cc
|
||||
+++ b/ui/qt/qt_shim.cc
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <QMimeType>
|
||||
#include <QPainter>
|
||||
#include <QPalette>
|
||||
+#include <QScreen>
|
||||
#include <QStyle>
|
||||
#include <QStyleOptionTitleBar>
|
||||
|
||||
@@ -52,8 +53,9 @@ FontHinting QtHintingToFontHinting(QFont::HintingPreference hinting) {
|
||||
// Obtain the average color of a gradient.
|
||||
SkColor GradientColor(const QGradient& gradient) {
|
||||
QGradientStops stops = gradient.stops();
|
||||
- if (stops.empty())
|
||||
+ if (stops.empty()) {
|
||||
return qRgba(0, 0, 0, 0);
|
||||
+ }
|
||||
|
||||
float a = 0;
|
||||
float r = 0;
|
||||
@@ -86,11 +88,13 @@ SkColor GradientColor(const QGradient& gradient) {
|
||||
// Obtain the average color of a texture.
|
||||
SkColor TextureColor(QImage image) {
|
||||
size_t size = image.width() * image.height();
|
||||
- if (!size)
|
||||
+ if (!size) {
|
||||
return qRgba(0, 0, 0, 0);
|
||||
+ }
|
||||
|
||||
- if (image.format() != QImage::Format_ARGB32_Premultiplied)
|
||||
+ if (image.format() != QImage::Format_ARGB32_Premultiplied) {
|
||||
image = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);
|
||||
+ }
|
||||
|
||||
size_t a = 0;
|
||||
size_t r = 0;
|
||||
@@ -203,6 +207,13 @@ QtShim::QtShim(QtInterface::Delegate* delegate, int* argc, char** argv)
|
||||
SLOT(FontChanged(const QFont&)));
|
||||
connect(&app_, SIGNAL(paletteChanged(const QPalette&)), this,
|
||||
SLOT(PaletteChanged(const QPalette&)));
|
||||
+ connect(&app_, SIGNAL(screenAdded(QScreen*)), this,
|
||||
+ SLOT(ScreenAdded(QScreen*)));
|
||||
+ connect(&app_, SIGNAL(screenRemoved(QScreen*)), this,
|
||||
+ SLOT(ScreenRemoved(QScreen*)));
|
||||
+ for (QScreen* screen : app_.screens()) {
|
||||
+ ScreenAdded(screen);
|
||||
+ }
|
||||
}
|
||||
|
||||
QtShim::~QtShim() = default;
|
||||
@@ -241,8 +252,9 @@ Image QtShim::GetIconForContentType(const String& content_type,
|
||||
auto icon = QIcon::fromTheme(name);
|
||||
auto pixmap = icon.pixmap(size);
|
||||
auto image = pixmap.toImage();
|
||||
- if (image.format() != QImage::Format_ARGB32_Premultiplied)
|
||||
+ if (image.format() != QImage::Format_ARGB32_Premultiplied) {
|
||||
image = image.convertToFormat(QImage::Format_ARGB32_Premultiplied);
|
||||
+ }
|
||||
if (auto bytes = image.sizeInBytes()) {
|
||||
return {image.width(), image.height(),
|
||||
static_cast<float>(image.devicePixelRatio()),
|
||||
@@ -283,6 +295,30 @@ void QtShim::PaletteChanged(const QPalette& palette) {
|
||||
delegate_->ThemeChanged();
|
||||
}
|
||||
|
||||
+DISABLE_CFI_VCALL
|
||||
+void QtShim::ScreenAdded(QScreen* screen) {
|
||||
+ connect(screen, SIGNAL(logicalDotsPerInchChanged(qreal)), this,
|
||||
+ SLOT(LogicalDotsPerInchChanged(qreal)));
|
||||
+ connect(screen, SIGNAL(physicalDotsPerInchChanged(qreal)), this,
|
||||
+ SLOT(PhysicalDotsPerInchChanged(qreal)));
|
||||
+ delegate_->ScaleFactorMaybeChanged();
|
||||
+}
|
||||
+
|
||||
+DISABLE_CFI_VCALL
|
||||
+void QtShim::ScreenRemoved(QScreen* screen) {
|
||||
+ delegate_->ScaleFactorMaybeChanged();
|
||||
+}
|
||||
+
|
||||
+DISABLE_CFI_VCALL
|
||||
+void QtShim::LogicalDotsPerInchChanged(qreal dpi) {
|
||||
+ delegate_->ScaleFactorMaybeChanged();
|
||||
+}
|
||||
+
|
||||
+DISABLE_CFI_VCALL
|
||||
+void QtShim::PhysicalDotsPerInchChanged(qreal dpi) {
|
||||
+ delegate_->ScaleFactorMaybeChanged();
|
||||
+}
|
||||
+
|
||||
Image QtShim::DrawHeader(int width,
|
||||
int height,
|
||||
SkColor default_color,
|
||||
@@ -309,8 +345,9 @@ QImage QtShim::DrawHeaderImpl(int width,
|
||||
QStyleOptionTitleBar opt;
|
||||
opt.rect = QRect(-kBorderWidth, -kBorderWidth, width + 2 * kBorderWidth,
|
||||
height + 2 * kBorderWidth);
|
||||
- if (state == ColorState::kNormal)
|
||||
+ if (state == ColorState::kNormal) {
|
||||
opt.titleBarState = QStyle::State_Active;
|
||||
+ }
|
||||
app_.style()->drawComplexControl(QStyle::CC_TitleBar, &opt, &painter,
|
||||
nullptr);
|
||||
} else {
|
||||
diff --git a/ui/qt/qt_shim.h b/ui/qt/qt_shim.h
|
||||
index 607e6fe22dfc0..d979c47d589d4 100644
|
||||
--- a/ui/qt/qt_shim.h
|
||||
+++ b/ui/qt/qt_shim.h
|
||||
@@ -42,6 +42,10 @@ class QtShim : public QObject, public QtInterface {
|
||||
private slots:
|
||||
void FontChanged(const QFont& font);
|
||||
void PaletteChanged(const QPalette& palette);
|
||||
+ void ScreenAdded(QScreen* screen);
|
||||
+ void ScreenRemoved(QScreen* screen);
|
||||
+ void LogicalDotsPerInchChanged(qreal dpi);
|
||||
+ void PhysicalDotsPerInchChanged(qreal dpi);
|
||||
|
||||
private:
|
||||
QImage DrawHeaderImpl(int width,
|
||||
diff --git a/ui/qt/qt_ui.cc b/ui/qt/qt_ui.cc
|
||||
index 6a3b58e9f930b..bac5245a069f9 100644
|
||||
--- a/ui/qt/qt_ui.cc
|
||||
+++ b/ui/qt/qt_ui.cc
|
||||
@@ -19,6 +19,7 @@
|
||||
#include "base/nix/xdg_util.h"
|
||||
#include "base/notreached.h"
|
||||
#include "base/path_service.h"
|
||||
+#include "base/task/single_thread_task_runner.h"
|
||||
#include "base/time/time.h"
|
||||
#include "cc/paint/paint_canvas.h"
|
||||
#include "chrome/browser/themes/theme_properties.h" // nogncheck
|
||||
@@ -36,6 +37,7 @@
|
||||
#include "ui/gfx/image/image.h"
|
||||
#include "ui/gfx/image/image_skia_rep.h"
|
||||
#include "ui/gfx/image/image_skia_source.h"
|
||||
+#include "ui/linux/device_scale_factor_observer.h"
|
||||
#include "ui/linux/linux_ui.h"
|
||||
#include "ui/linux/nav_button_provider.h"
|
||||
#include "ui/native_theme/native_theme_aura.h"
|
||||
@@ -194,16 +196,21 @@ void QtUi::GetDefaultFontDescription(std::string* family_out,
|
||||
int* style_out,
|
||||
int* weight_out,
|
||||
gfx::FontRenderParams* params_out) const {
|
||||
- if (family_out)
|
||||
+ if (family_out) {
|
||||
*family_out = font_family_;
|
||||
- if (size_pixels_out)
|
||||
+ }
|
||||
+ if (size_pixels_out) {
|
||||
*size_pixels_out = font_size_pixels_;
|
||||
- if (style_out)
|
||||
+ }
|
||||
+ if (style_out) {
|
||||
*style_out = font_style_;
|
||||
- if (weight_out)
|
||||
+ }
|
||||
+ if (weight_out) {
|
||||
*weight_out = font_weight_;
|
||||
- if (params_out)
|
||||
+ }
|
||||
+ if (params_out) {
|
||||
*params_out = font_params_;
|
||||
+ }
|
||||
}
|
||||
|
||||
ui::SelectFileDialog* QtUi::CreateSelectFileDialog(
|
||||
@@ -236,6 +245,7 @@ bool QtUi::Initialize() {
|
||||
ui::ColorProviderManager::Get().AppendColorProviderInitializer(
|
||||
base::BindRepeating(&QtUi::AddNativeColorMixer, base::Unretained(this)));
|
||||
FontChanged();
|
||||
+ scale_factor_ = shim_->GetScaleFactor();
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -246,8 +256,9 @@ ui::NativeTheme* QtUi::GetNativeTheme() const {
|
||||
|
||||
bool QtUi::GetColor(int id, SkColor* color, bool use_custom_frame) const {
|
||||
auto value = GetColor(id, use_custom_frame);
|
||||
- if (value)
|
||||
+ if (value) {
|
||||
*color = *value;
|
||||
+ }
|
||||
return value.has_value();
|
||||
}
|
||||
|
||||
@@ -297,8 +308,9 @@ gfx::Image QtUi::GetIconForContentType(const std::string& content_type,
|
||||
float scale) const {
|
||||
Image image =
|
||||
shim_->GetIconForContentType(String(content_type.c_str()), size * scale);
|
||||
- if (!image.data_argb.size())
|
||||
+ if (!image.data_argb.size()) {
|
||||
return {};
|
||||
+ }
|
||||
|
||||
SkImageInfo image_info = SkImageInfo::Make(
|
||||
image.width, image.height, kBGRA_8888_SkColorType, kPremul_SkAlphaType);
|
||||
@@ -345,14 +357,16 @@ bool QtUi::AnimationsEnabled() const {
|
||||
|
||||
void QtUi::AddWindowButtonOrderObserver(
|
||||
ui::WindowButtonOrderObserver* observer) {
|
||||
- if (fallback_linux_ui_)
|
||||
+ if (fallback_linux_ui_) {
|
||||
fallback_linux_ui_->AddWindowButtonOrderObserver(observer);
|
||||
+ }
|
||||
}
|
||||
|
||||
void QtUi::RemoveWindowButtonOrderObserver(
|
||||
ui::WindowButtonOrderObserver* observer) {
|
||||
- if (fallback_linux_ui_)
|
||||
+ if (fallback_linux_ui_) {
|
||||
fallback_linux_ui_->RemoveWindowButtonOrderObserver(observer);
|
||||
+ }
|
||||
}
|
||||
|
||||
std::unique_ptr<ui::NavButtonProvider> QtUi::CreateNavButtonProvider() {
|
||||
@@ -441,11 +455,24 @@ void QtUi::ThemeChanged() {
|
||||
native_theme_->ThemeChanged(PreferDarkTheme());
|
||||
}
|
||||
|
||||
+void QtUi::ScaleFactorMaybeChanged() {
|
||||
+ // This gets called whenever the monitor configuration changes. Handle the
|
||||
+ // scale change asynchronously to allow the change to propagate to QT's scale
|
||||
+ // factor. This also coalesces scale change events together.
|
||||
+ if (!scale_factor_task_active_) {
|
||||
+ scale_factor_task_active_ = true;
|
||||
+ base::SingleThreadTaskRunner::GetCurrentDefault()->PostTask(
|
||||
+ FROM_HERE, base::BindOnce(&QtUi::ScaleFactorMaybeChangedImpl,
|
||||
+ weak_factory_.GetWeakPtr()));
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
DISABLE_CFI_VCALL
|
||||
void QtUi::AddNativeColorMixer(ui::ColorProvider* provider,
|
||||
const ui::ColorProviderManager::Key& key) {
|
||||
- if (key.system_theme != ui::SystemTheme::kQt)
|
||||
+ if (key.system_theme != ui::SystemTheme::kQt) {
|
||||
return;
|
||||
+ }
|
||||
|
||||
ui::ColorMixer& mixer = provider->AddMixer();
|
||||
// These color constants are required by native_chrome_color_mixer_linux.cc
|
||||
@@ -494,8 +521,9 @@ void QtUi::AddNativeColorMixer(ui::ColorProvider* provider,
|
||||
ColorState::kInactive},
|
||||
{ui::kColorNativeToolbarBackground, ColorType::kButtonBg},
|
||||
};
|
||||
- for (const auto& map : kMaps)
|
||||
+ for (const auto& map : kMaps) {
|
||||
mixer[map.id] = {shim_->GetColor(map.role, map.state)};
|
||||
+ }
|
||||
|
||||
const bool use_custom_frame =
|
||||
key.frame_type == ui::ColorProviderManager::FrameType::kChromium;
|
||||
@@ -578,6 +606,20 @@ absl::optional<SkColor> QtUi::GetColor(int id, bool use_custom_frame) const {
|
||||
}
|
||||
}
|
||||
|
||||
+DISABLE_CFI_VCALL
|
||||
+void QtUi::ScaleFactorMaybeChangedImpl() {
|
||||
+ scale_factor_task_active_ = false;
|
||||
+ double scale = shim_->GetScaleFactor();
|
||||
+ if (scale == scale_factor_) {
|
||||
+ return;
|
||||
+ }
|
||||
+ scale_factor_ = scale;
|
||||
+ for (ui::DeviceScaleFactorObserver& observer :
|
||||
+ device_scale_factor_observer_list()) {
|
||||
+ observer.OnDeviceScaleFactorChanged();
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
std::unique_ptr<ui::LinuxUiAndTheme> CreateQtUi(
|
||||
ui::LinuxUi* fallback_linux_ui) {
|
||||
return std::make_unique<QtUi>(fallback_linux_ui);
|
||||
diff --git a/ui/qt/qt_ui.h b/ui/qt/qt_ui.h
|
||||
index b53ed93240708..3319edf1ea9bc 100644
|
||||
--- a/ui/qt/qt_ui.h
|
||||
+++ b/ui/qt/qt_ui.h
|
||||
@@ -8,6 +8,7 @@
|
||||
#include <memory>
|
||||
|
||||
#include "base/component_export.h"
|
||||
+#include "base/memory/weak_ptr.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
#include "ui/color/color_provider.h"
|
||||
@@ -88,11 +89,14 @@ class QtUi : public ui::LinuxUiAndTheme, QtInterface::Delegate {
|
||||
// QtInterface::Delegate:
|
||||
void FontChanged() override;
|
||||
void ThemeChanged() override;
|
||||
+ void ScaleFactorMaybeChanged() override;
|
||||
|
||||
private:
|
||||
void AddNativeColorMixer(ui::ColorProvider* provider,
|
||||
const ui::ColorProviderManager::Key& key);
|
||||
|
||||
+ void ScaleFactorMaybeChangedImpl();
|
||||
+
|
||||
absl::optional<SkColor> GetColor(int id, bool use_custom_frame) const;
|
||||
|
||||
// TODO(https://crbug.com/1317782): This is a fallback for any unimplemented
|
||||
@@ -114,6 +118,11 @@ class QtUi : public ui::LinuxUiAndTheme, QtInterface::Delegate {
|
||||
std::unique_ptr<QtInterface> shim_;
|
||||
|
||||
std::unique_ptr<QtNativeTheme> native_theme_;
|
||||
+
|
||||
+ bool scale_factor_task_active_ = false;
|
||||
+ double scale_factor_ = 1.0;
|
||||
+
|
||||
+ base::WeakPtrFactory<QtUi> weak_factory_{this};
|
||||
};
|
||||
|
||||
// This should be the only symbol exported from this component.
|
@ -0,0 +1,46 @@
|
||||
commit 7b1d747a599a752e493e34e7bbf841d8b4c7882f
|
||||
Author: Tomasz Śniatowski <tomasz.sniatowski@xperi.com>
|
||||
Date: Thu May 25 16:09:27 2023 +0000
|
||||
|
||||
Dep on //printing in //ui/qt if printing is enabled
|
||||
|
||||
qt_ui.h can use printing/printing_context_linux.h, and needs to dep
|
||||
on //printing if it does, to avoid a missing dependency build break.
|
||||
|
||||
Without this fix, a clean build can fail on obj/ui/qt/qt/qt_ui.o with
|
||||
In file included from ../../ui/qt/qt_ui.cc:8:
|
||||
In file included from ../../ui/qt/qt_ui.h:21:
|
||||
../../printing/printing_context_linux.h:12:10: fatal error:
|
||||
'printing/mojom/print.mojom.h' file not found
|
||||
|
||||
(the #include is a // NOGNCHECK one, which is how this came to be)
|
||||
|
||||
Change-Id: I70af37071e232ffbf462a05e026051efae044b69
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4566944
|
||||
Reviewed-by: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Auto-Submit: Tomasz Śniatowski <tomasz.sniatowski@xperi.com>
|
||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1149138}
|
||||
|
||||
diff --git a/ui/qt/BUILD.gn b/ui/qt/BUILD.gn
|
||||
index 6a67961edc2f7..89fffcf3089f9 100644
|
||||
--- a/ui/qt/BUILD.gn
|
||||
+++ b/ui/qt/BUILD.gn
|
||||
@@ -5,6 +5,7 @@
|
||||
import("//build/config/chromecast_build.gni")
|
||||
import("//build/config/linux/pkg_config.gni")
|
||||
import("//build/config/sysroot.gni")
|
||||
+import("//printing/buildflags/buildflags.gni")
|
||||
import("//ui/qt/qt.gni")
|
||||
|
||||
assert(use_qt)
|
||||
@@ -127,6 +128,9 @@ component("qt") {
|
||||
"//ui/views",
|
||||
]
|
||||
public_deps = [ "//skia" ]
|
||||
+ if (enable_printing) {
|
||||
+ public_deps += [ "//printing" ]
|
||||
+ }
|
||||
|
||||
sources = [
|
||||
"qt_ui.cc",
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-114.0.5735.106/ui/linux/linux_ui_factory.cc.me chromium-114.0.5735.106/ui/linux/linux_ui_factory.cc
|
||||
--- chromium-114.0.5735.106/ui/linux/linux_ui_factory.cc.me 2023-06-11 18:47:09.742886578 +0200
|
||||
+++ chromium-114.0.5735.106/ui/linux/linux_ui_factory.cc 2023-06-11 18:48:42.231584886 +0200
|
||||
@@ -127,7 +127,7 @@ LinuxUiAndTheme* GetDefaultLinuxUiAndThe
|
||||
|
||||
} // namespace
|
||||
|
||||
-BASE_FEATURE(kAllowQt, "AllowQt", base::FEATURE_DISABLED_BY_DEFAULT);
|
||||
+BASE_FEATURE(kAllowQt, "AllowQt", base::FEATURE_ENABLED_BY_DEFAULT);
|
||||
|
||||
LinuxUi* GetDefaultLinuxUi() {
|
||||
auto* linux_ui = GetDefaultLinuxUiAndTheme();
|
@ -0,0 +1,59 @@
|
||||
commit ff39a278ddccf61716a7dbcb575415801bbf8ded
|
||||
Author: Tom Anderson <thomasanderson@chromium.org>
|
||||
Date: Wed May 31 18:31:09 2023 +0000
|
||||
|
||||
[QT] Account for logical scale factor
|
||||
|
||||
Previously we were only using the device pixel ratio. But QT UI
|
||||
scales with both the device pixel ratio and the logical DPI. This CL
|
||||
sets Chrome's scale factor to be the product of these two.
|
||||
|
||||
R=thestig
|
||||
CC=jkummerow
|
||||
|
||||
Change-Id: I9bd414046058e741450fabae4913d47a16ca48c3
|
||||
Bug: 1439149
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4575572
|
||||
Reviewed-by: Lei Zhang <thestig@chromium.org>
|
||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1151380}
|
||||
|
||||
diff --git a/ui/qt/qt_shim.cc b/ui/qt/qt_shim.cc
|
||||
index 0aec9c3aed4ad..3780f8c3988b4 100644
|
||||
--- a/ui/qt/qt_shim.cc
|
||||
+++ b/ui/qt/qt_shim.cc
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "ui/qt/qt_shim.h"
|
||||
|
||||
-#include <stdio.h>
|
||||
+#include <cmath>
|
||||
|
||||
#include <QApplication>
|
||||
#include <QFont>
|
||||
@@ -219,7 +219,24 @@ QtShim::QtShim(QtInterface::Delegate* delegate, int* argc, char** argv)
|
||||
QtShim::~QtShim() = default;
|
||||
|
||||
double QtShim::GetScaleFactor() const {
|
||||
- return app_.devicePixelRatio();
|
||||
+ constexpr double kDefaultPixelDpi = 96.0;
|
||||
+ // Use the largest scale factor across all displays as the global scale
|
||||
+ // factor. This matches the behavior of `app_.devicePixelRatio()`, except
|
||||
+ // this also takes into account the logical DPI.
|
||||
+ // TODO(https://crbug.com/1450301): Unlike GTK, QT supports per-display
|
||||
+ // scaling. Use this instead of the max scale factor.
|
||||
+ double scale = 0.0;
|
||||
+ for (QScreen* screen : app_.screens()) {
|
||||
+ scale =
|
||||
+ std::max(scale, screen->devicePixelRatio() *
|
||||
+ screen->logicalDotsPerInch() / kDefaultPixelDpi);
|
||||
+ }
|
||||
+ // Round to the nearest 16th so that UI can losslessly multiply and divide
|
||||
+ // by the scale factor using floating point arithmetic. GtkUi also rounds
|
||||
+ // in this way, but to 1/64th. 1/16th is chosen here since that's what
|
||||
+ // KDE settings uses.
|
||||
+ scale = std::round(scale * 16) / 16;
|
||||
+ return scale > 0 ? scale : 1.0;
|
||||
}
|
||||
|
||||
FontRenderParams QtShim::GetFontRenderParams() const {
|
@ -0,0 +1,87 @@
|
||||
diff -up chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc.me chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc
|
||||
--- chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc.me 2023-05-21 10:05:00.357860329 +0200
|
||||
+++ chromium-114.0.5735.35/media/gpu/vaapi/vaapi_video_encode_accelerator.cc 2023-05-21 10:18:09.665432735 +0200
|
||||
@@ -41,7 +41,6 @@
|
||||
#include "media/gpu/gpu_video_encode_accelerator_helpers.h"
|
||||
#include "media/gpu/h264_dpb.h"
|
||||
#include "media/gpu/macros.h"
|
||||
-#include "media/gpu/vaapi/av1_vaapi_video_encoder_delegate.h"
|
||||
#include "media/gpu/vaapi/h264_vaapi_video_encoder_delegate.h"
|
||||
#include "media/gpu/vaapi/va_surface.h"
|
||||
#include "media/gpu/vaapi/vaapi_common.h"
|
||||
@@ -200,7 +199,7 @@ bool VaapiVideoEncodeAccelerator::Initia
|
||||
|
||||
const VideoCodec codec = VideoCodecProfileToVideoCodec(config.output_profile);
|
||||
if (codec != VideoCodec::kH264 && codec != VideoCodec::kVP8 &&
|
||||
- codec != VideoCodec::kVP9 && codec != VideoCodec::kAV1) {
|
||||
+ codec != VideoCodec::kVP9) {
|
||||
MEDIA_LOG(ERROR, media_log.get())
|
||||
<< "Unsupported profile: " << GetProfileName(config.output_profile);
|
||||
return false;
|
||||
@@ -293,7 +292,6 @@ void VaapiVideoEncodeAccelerator::Initia
|
||||
break;
|
||||
case VideoCodec::kVP8:
|
||||
case VideoCodec::kVP9:
|
||||
- case VideoCodec::kAV1:
|
||||
mode = VaapiWrapper::kEncodeConstantQuantizationParameter;
|
||||
break;
|
||||
default:
|
||||
@@ -356,12 +354,6 @@ void VaapiVideoEncodeAccelerator::Initia
|
||||
vaapi_wrapper_, error_cb);
|
||||
}
|
||||
break;
|
||||
- case VideoCodec::kAV1:
|
||||
- if (!IsConfiguredForTesting()) {
|
||||
- encoder_ = std::make_unique<AV1VaapiVideoEncoderDelegate>(
|
||||
- vaapi_wrapper_, error_cb);
|
||||
- }
|
||||
- break;
|
||||
default:
|
||||
NOTREACHED() << "Unsupported codec type " << GetCodecName(output_codec_);
|
||||
return;
|
||||
@@ -835,10 +827,6 @@ VaapiVideoEncodeAccelerator::CreateEncod
|
||||
case VideoCodec::kVP9:
|
||||
picture = new VaapiVP9Picture(std::move(reconstructed_surface));
|
||||
break;
|
||||
- case VideoCodec::kAV1:
|
||||
- picture = new VaapiAV1Picture(/*display_va_surface=*/nullptr,
|
||||
- std::move(reconstructed_surface));
|
||||
- break;
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
diff -up chromium-114.0.5735.35/media/gpu/BUILD.gn.revert-av1enc chromium-114.0.5735.35/media/gpu/BUILD.gn
|
||||
--- chromium-114.0.5735.35/media/gpu/BUILD.gn.revert-av1enc 2023-05-18 00:37:57.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/media/gpu/BUILD.gn 2023-05-20 13:14:10.755183630 +0200
|
||||
@@ -373,10 +373,7 @@ source_set("common") {
|
||||
"vp9_svc_layers.h",
|
||||
]
|
||||
configs += [ "//third_party/libvpx:libvpx_config" ]
|
||||
- deps += [
|
||||
- "//third_party/libaom:libaomrc",
|
||||
- "//third_party/libvpx:libvpxrc",
|
||||
- ]
|
||||
+ deps += [ "//third_party/libvpx:libvpxrc" ]
|
||||
}
|
||||
if (use_libgav1_parser) {
|
||||
sources += [
|
||||
diff -up chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn.revert-av1enc chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn
|
||||
--- chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn.revert-av1enc 2023-05-18 00:37:57.000000000 +0200
|
||||
+++ chromium-114.0.5735.35/media/gpu/vaapi/BUILD.gn 2023-05-20 13:14:10.756183626 +0200
|
||||
@@ -38,8 +38,6 @@ source_set("vaapi") {
|
||||
sources = [
|
||||
"av1_vaapi_video_decoder_delegate.cc",
|
||||
"av1_vaapi_video_decoder_delegate.h",
|
||||
- "av1_vaapi_video_encoder_delegate.cc",
|
||||
- "av1_vaapi_video_encoder_delegate.h",
|
||||
"h264_vaapi_video_decoder_delegate.cc",
|
||||
"h264_vaapi_video_decoder_delegate.h",
|
||||
"h264_vaapi_video_encoder_delegate.cc",
|
||||
@@ -107,7 +105,6 @@ source_set("vaapi") {
|
||||
"//media/gpu/chromeos:common",
|
||||
"//media/parsers",
|
||||
"//mojo/public/cpp/bindings",
|
||||
- "//third_party/libaom:libaomrc",
|
||||
"//third_party/libvpx:libvpxrc",
|
||||
"//third_party/libyuv",
|
||||
"//ui/gfx",
|
@ -0,0 +1,62 @@
|
||||
diff -up chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.cc.me chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.cc
|
||||
--- chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.cc.me 2023-05-03 17:46:37.194000834 +0200
|
||||
+++ chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.cc 2023-05-03 17:48:05.170317575 +0200
|
||||
@@ -87,7 +87,7 @@ ItemSortKey GetSortKey(const Item& item)
|
||||
// Helper to get an iterator to the last element in the cache. The cache
|
||||
// must not be empty.
|
||||
template <typename Item>
|
||||
-SortedItems<Item>::iterator GetLastIter(SortedItems<Item>& cache) {
|
||||
+typename SortedItems<Item>::iterator GetLastIter(SortedItems<Item>& cache) {
|
||||
CHECK(!cache.empty());
|
||||
auto it = cache.end();
|
||||
return std::prev(it);
|
||||
@@ -789,9 +789,9 @@ bool DownloadBubbleUpdateService::Remove
|
||||
}
|
||||
|
||||
template <typename Id, typename Item>
|
||||
-SortedItems<Item>::iterator
|
||||
+typename SortedItems<Item>::iterator
|
||||
DownloadBubbleUpdateService::RemoveItemFromCacheByIter(
|
||||
- SortedItems<Item>::iterator iter,
|
||||
+ typename SortedItems<Item>::iterator iter,
|
||||
SortedItems<Item>& cache,
|
||||
IterMap<Id, Item>& iter_map) {
|
||||
CHECK(iter != cache.end());
|
||||
diff -up chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.h.me chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.h
|
||||
--- chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.h.me 2023-05-03 17:48:14.079551820 +0200
|
||||
+++ chromium-113.0.5672.63/chrome/browser/download/bubble/download_bubble_update_service.h 2023-05-03 17:49:24.702387180 +0200
|
||||
@@ -208,8 +208,8 @@ class DownloadBubbleUpdateService
|
||||
|
||||
// Removes item if we already have the iterator to it. Returns next iterator.
|
||||
template <typename Id, typename Item>
|
||||
- SortedItems<Item>::iterator RemoveItemFromCacheByIter(
|
||||
- SortedItems<Item>::iterator iter,
|
||||
+ typename SortedItems<Item>::iterator RemoveItemFromCacheByIter(
|
||||
+ typename SortedItems<Item>::iterator iter,
|
||||
SortedItems<Item>& cache,
|
||||
IterMap<Id, Item>& iter_map);
|
||||
|
||||
diff -up chromium-114.0.5735.26/chrome/browser/printing/print_backend_service_manager.h.me chromium-114.0.5735.26/chrome/browser/printing/print_backend_service_manager.h
|
||||
--- chromium-114.0.5735.26/chrome/browser/printing/print_backend_service_manager.h.me 2023-05-14 00:03:48.455961696 +0200
|
||||
+++ chromium-114.0.5735.26/chrome/browser/printing/print_backend_service_manager.h 2023-05-14 00:04:24.776589164 +0200
|
||||
@@ -587,7 +587,7 @@ class PrintBackendServiceManager {
|
||||
template <class... T>
|
||||
void RunSavedCallbacks(RemoteSavedCallbacks<T...>& saved_callbacks,
|
||||
const RemoteId& remote_id,
|
||||
- std::remove_reference<T>::type... result);
|
||||
+ typename std::remove_reference<T>::type... result);
|
||||
|
||||
// Test support for client ID management.
|
||||
static void SetClientsForTesting(
|
||||
diff -up chromium-114.0.5735.26/chrome/browser/printing/print_backend_service_manager.cc.me chromium-114.0.5735.26/chrome/browser/printing/print_backend_service_manager.cc
|
||||
--- chromium-114.0.5735.26/chrome/browser/printing/print_backend_service_manager.cc.me 2023-05-14 12:40:29.555926646 +0200
|
||||
+++ chromium-114.0.5735.26/chrome/browser/printing/print_backend_service_manager.cc 2023-05-14 12:41:12.150471791 +0200
|
||||
@@ -1477,7 +1477,7 @@ template <class... T>
|
||||
void PrintBackendServiceManager::RunSavedCallbacks(
|
||||
RemoteSavedCallbacks<T...>& saved_callbacks,
|
||||
const RemoteId& remote_id,
|
||||
- std::remove_reference<T>::type... result) {
|
||||
+ typename std::remove_reference<T>::type... result) {
|
||||
auto found_callbacks_map = saved_callbacks.find(remote_id);
|
||||
if (found_callbacks_map == saved_callbacks.end())
|
||||
return; // No callbacks to run.
|
@ -0,0 +1,22 @@
|
||||
diff -up chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc.me chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc
|
||||
--- chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc.me 2023-05-13 12:09:44.423727385 +0200
|
||||
+++ chromium-114.0.5735.26/sandbox/policy/linux/bpf_network_policy_linux.cc 2023-05-13 17:52:19.934347246 +0200
|
||||
@@ -11,7 +11,6 @@
|
||||
#include <linux/net.h>
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/sockios.h>
|
||||
-#include <linux/wireless.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <sys/inotify.h>
|
||||
@@ -48,6 +47,10 @@ using sandbox::syscall_broker::BrokerPro
|
||||
#define F2FS_IOC_GET_FEATURES _IOR(0xf5, 12, uint32_t)
|
||||
#endif
|
||||
|
||||
+#if !defined(SIOCGIWNAME)
|
||||
+#define SIOCGIWNAME 0x8B01
|
||||
+#endif
|
||||
+
|
||||
namespace sandbox::policy {
|
||||
|
||||
namespace {
|
@ -0,0 +1,81 @@
|
||||
diff -up chromium-114.0.5735.26/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.workaround_clang_bug-structured_binding chromium-114.0.5735.26/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc
|
||||
--- chromium-114.0.5735.26/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc.workaround_clang_bug-structured_binding 2023-05-11 03:36:27.000000000 +0200
|
||||
+++ chromium-114.0.5735.26/third_party/blink/renderer/core/layout/ng/grid/ng_grid_layout_algorithm.cc 2023-05-14 11:49:42.558129164 +0200
|
||||
@@ -238,7 +238,10 @@ const NGLayoutResult* NGGridLayoutAlgori
|
||||
: BuildGridSizingTree(&oof_children);
|
||||
|
||||
LayoutUnit intrinsic_block_size;
|
||||
- auto& [grid_items, layout_data, tree_size] = grid_sizing_tree.TreeRootData();
|
||||
+ auto& [g_i, l_d, t_s] = grid_sizing_tree.TreeRootData();
|
||||
+ auto& grid_items = g_i;
|
||||
+ auto& layout_data = l_d;
|
||||
+ auto& tree_size = t_s;
|
||||
|
||||
if (IsBreakInside(BreakToken())) {
|
||||
// TODO(layout-dev): When we support variable inline-size fragments we'll
|
||||
@@ -520,8 +523,10 @@ wtf_size_t NGGridLayoutAlgorithm::BuildG
|
||||
row_auto_repetitions);
|
||||
|
||||
bool has_nested_subgrid = false;
|
||||
- auto& [grid_items, layout_data, subtree_size] =
|
||||
- sizing_tree->CreateSizingData(opt_subgrid_data);
|
||||
+ auto& [g_i, l_d, s_s] = sizing_tree->CreateSizingData(opt_subgrid_data);
|
||||
+ auto& grid_items = g_i;
|
||||
+ auto& layout_data = l_d;
|
||||
+ auto& subtree_size = s_s;
|
||||
|
||||
if (!must_ignore_children) {
|
||||
// Construct grid items that are not subgridded.
|
||||
@@ -650,8 +655,10 @@ NGGridSizingTree NGGridLayoutAlgorithm::
|
||||
NGGridSizingTree sizing_tree;
|
||||
|
||||
if (const auto* layout_subtree = ConstraintSpace().GridLayoutSubtree()) {
|
||||
- auto& [grid_items, layout_data, subtree_size] =
|
||||
- sizing_tree.CreateSizingData();
|
||||
+ auto& [g_i, l_d, s_s] = sizing_tree.CreateSizingData();
|
||||
+ auto& grid_items = g_i;
|
||||
+ auto& layout_data = l_d;
|
||||
+ auto& subtree_size = s_s;
|
||||
|
||||
const auto& node = Node();
|
||||
grid_items =
|
||||
@@ -1640,8 +1647,10 @@ void NGGridLayoutAlgorithm::InitializeTr
|
||||
const absl::optional<GridTrackSizingDirection>& opt_track_direction) const {
|
||||
DCHECK(sizing_subtree);
|
||||
|
||||
- auto& [grid_items, layout_data, subtree_size] =
|
||||
- sizing_subtree.SubtreeRootData();
|
||||
+ auto& [g_i, l_d, s_s] = sizing_subtree.SubtreeRootData();
|
||||
+ auto& grid_items = g_i;
|
||||
+ auto& layout_data = l_d;
|
||||
+ auto& subtree_size = s_s;
|
||||
|
||||
auto InitAndCacheTrackSizes = [&](GridTrackSizingDirection track_direction) {
|
||||
InitializeTrackCollection(opt_subgrid_data, track_direction, &layout_data);
|
||||
@@ -1825,8 +1834,10 @@ void NGGridLayoutAlgorithm::CompleteTrac
|
||||
bool* opt_needs_additional_pass) const {
|
||||
DCHECK(sizing_subtree);
|
||||
|
||||
- auto& [grid_items, layout_data, subtree_size] =
|
||||
- sizing_subtree.SubtreeRootData();
|
||||
+ auto& [g_i, l_d, s_s] = sizing_subtree.SubtreeRootData();
|
||||
+ auto& grid_items = g_i;
|
||||
+ auto& layout_data = l_d;
|
||||
+ auto& subtree_size = s_s;
|
||||
|
||||
const bool is_for_columns = track_direction == kForColumns;
|
||||
const bool has_non_definite_track =
|
||||
diff -up chromium-114.0.5735.26/media/base/cdm_promise_adapter.cc.me chromium-114.0.5735.26/media/base/cdm_promise_adapter.cc
|
||||
--- chromium-114.0.5735.26/media/base/cdm_promise_adapter.cc.me 2023-05-14 17:35:00.446844465 +0200
|
||||
+++ chromium-114.0.5735.26/media/base/cdm_promise_adapter.cc 2023-05-14 17:39:22.991733926 +0200
|
||||
@@ -94,7 +94,9 @@ void CdmPromiseAdapter::RejectPromise(ui
|
||||
void CdmPromiseAdapter::Clear(ClearReason reason) {
|
||||
// Reject all outstanding promises.
|
||||
DCHECK(thread_checker_.CalledOnValidThread());
|
||||
- for (auto& [promise_id, promise] : promises_) {
|
||||
+ for (auto& [p_i, p_e] : promises_) {
|
||||
+ auto& promise_id = p_i;
|
||||
+ auto& promise = p_e;
|
||||
TRACE_EVENT_NESTABLE_ASYNC_END1(
|
||||
"media", "CdmPromise", TRACE_ID_WITH_SCOPE("CdmPromise", promise_id),
|
||||
"status", "cleared");
|
@ -0,0 +1,20 @@
|
||||
diff -up chromium-70.0.3538.67/sandbox/linux/BUILD.gn.sandboxpie chromium-70.0.3538.67/sandbox/linux/BUILD.gn
|
||||
--- chromium-70.0.3538.67/sandbox/linux/BUILD.gn.sandboxpie 2018-10-18 12:14:05.766939769 -0400
|
||||
+++ chromium-70.0.3538.67/sandbox/linux/BUILD.gn 2018-10-18 12:16:37.820027182 -0400
|
||||
@@ -315,10 +315,16 @@ if (is_linux) {
|
||||
# For ULLONG_MAX
|
||||
"-std=gnu99",
|
||||
|
||||
+ "-fPIE",
|
||||
+
|
||||
# These files have a suspicious comparison.
|
||||
# TODO fix this and re-enable this warning.
|
||||
"-Wno-sign-compare",
|
||||
]
|
||||
+
|
||||
+ ldflags = [
|
||||
+ "-pie",
|
||||
+ ]
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,22 @@
|
||||
diff -up chromium-77.0.3865.75/third_party/zlib/zconf.h.nozmangle chromium-77.0.3865.75/third_party/zlib/zconf.h
|
||||
--- chromium-77.0.3865.75/third_party/zlib/zconf.h.nozmangle 2019-09-12 09:36:37.924086850 +0200
|
||||
+++ chromium-77.0.3865.75/third_party/zlib/zconf.h 2019-09-12 09:53:01.623958551 +0200
|
||||
@@ -9,18 +9,6 @@
|
||||
#define ZCONF_H
|
||||
|
||||
/*
|
||||
- * This library is also built as a part of AOSP, which does not need to include
|
||||
- * chromeconf.h. This config does not want chromeconf.h, so it can set this
|
||||
- * macro to opt out. While this works today, there's no guarantee that building
|
||||
- * zlib outside of Chromium keeps working in the future.
|
||||
- */
|
||||
-#if !defined(CHROMIUM_ZLIB_NO_CHROMECONF)
|
||||
-/* This include does prefixing as below, but with an updated set of names. Also
|
||||
- * sets up export macros in component builds. */
|
||||
-#include "chromeconf.h"
|
||||
-#endif
|
||||
-
|
||||
-/*
|
||||
* If you *really* need a unique prefix for all types and library functions,
|
||||
* compile with -DZ_PREFIX. The "standard" zlib should be compiled without it.
|
||||
* Even better than compiling with -DZ_PREFIX would be to use configure to set
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn.unbundle-zlib chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn
|
||||
--- chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn.unbundle-zlib 2020-04-13 12:25:09.001172601 -0400
|
||||
+++ chromium-81.0.4044.92/third_party/perfetto/gn/BUILD.gn 2020-04-13 12:25:23.688921586 -0400
|
||||
@@ -294,7 +294,7 @@ if (enable_perfetto_zlib) {
|
||||
public_configs = [ "//buildtools:zlib_config" ]
|
||||
public_deps = [ "//buildtools:zlib" ]
|
||||
} else {
|
||||
- public_configs = [ "//third_party/zlib:zlib_config" ]
|
||||
+ public_configs = [ "//third_party/zlib:system_zlib" ]
|
||||
public_deps = [ "//third_party/zlib" ]
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
diff -up chromium-85.0.4183.83/ui/gfx/linux/drm_util_linux.cc.el7-old-libdrm chromium-85.0.4183.83/ui/gfx/linux/drm_util_linux.cc
|
||||
--- chromium-85.0.4183.83/ui/gfx/linux/drm_util_linux.cc.el7-old-libdrm 2020-08-31 09:38:46.043993882 -0400
|
||||
+++ chromium-85.0.4183.83/ui/gfx/linux/drm_util_linux.cc 2020-08-31 09:39:21.599906318 -0400
|
||||
@@ -6,6 +6,11 @@
|
||||
|
||||
#include <drm_fourcc.h>
|
||||
|
||||
+// the libdrm in EL-7 is too old to have this define
|
||||
+#ifndef DRM_FORMAT_P010
|
||||
+#define DRM_FORMAT_P010 DRM_FORMAT_INVALID
|
||||
+#endif
|
||||
+
|
||||
#include "base/notreached.h"
|
||||
|
||||
namespace ui {
|
@ -0,0 +1,15 @@
|
||||
diff -up chromium-91.0.4472.77/chrome/browser/first_run/first_run_internal_linux.cc.etc chromium-91.0.4472.77/chrome/browser/first_run/first_run_internal_linux.cc
|
||||
--- chromium-91.0.4472.77/chrome/browser/first_run/first_run_internal_linux.cc.etc 2021-06-01 16:37:39.182531036 -0400
|
||||
+++ chromium-91.0.4472.77/chrome/browser/first_run/first_run_internal_linux.cc 2021-06-01 16:39:31.590102809 -0400
|
||||
@@ -20,9 +20,9 @@ bool IsOrganicFirstRun() {
|
||||
|
||||
base::FilePath InitialPrefsPath() {
|
||||
// The standard location of the initial prefs is next to the chrome binary.
|
||||
+ // ...but we patch it to use /etc/chromium
|
||||
base::FilePath initial_prefs;
|
||||
- if (!base::PathService::Get(base::DIR_EXE, &initial_prefs))
|
||||
- return base::FilePath();
|
||||
+ initial_prefs = base::FilePath("/etc/chromium");
|
||||
|
||||
base::FilePath new_path = initial_prefs.AppendASCII(installer::kInitialPrefs);
|
||||
if (base::PathIsReadable(new_path))
|
@ -0,0 +1,13 @@
|
||||
diff -up chromium-91.0.4472.77/third_party/closure_compiler/compiler.py.java-allowed chromium-91.0.4472.77/third_party/closure_compiler/compiler.py
|
||||
--- chromium-91.0.4472.77/third_party/closure_compiler/compiler.py.java-allowed 2021-06-02 17:14:48.445064647 +0000
|
||||
+++ chromium-91.0.4472.77/third_party/closure_compiler/compiler.py 2021-06-02 17:15:12.994836949 +0000
|
||||
@@ -13,8 +13,7 @@ import subprocess
|
||||
|
||||
|
||||
_CURRENT_DIR = os.path.join(os.path.dirname(__file__))
|
||||
-_JAVA_PATH = os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", "java")
|
||||
-assert os.path.isfile(_JAVA_PATH), "java only allowed in android builds"
|
||||
+_JAVA_PATH = "java"
|
||||
|
||||
class Compiler(object):
|
||||
"""Runs the Closure compiler on given source files to typecheck them
|
@ -0,0 +1,12 @@
|
||||
diff -up chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py.py3 chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py
|
||||
--- chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py.py3 2021-08-31 21:40:34.000000000 -0400
|
||||
+++ chromium-93.0.4577.63/tools/gn/bootstrap/bootstrap.py 2021-09-02 08:26:04.415846917 -0400
|
||||
@@ -130,7 +130,7 @@ def main(argv):
|
||||
if not options.debug:
|
||||
gn_gen_args += ' is_debug=false'
|
||||
subprocess.check_call([
|
||||
- gn_path, 'gen', out_dir,
|
||||
+ gn_path, 'gen', out_dir, ' --script-executable=/usr/bin/python3',
|
||||
'--args=%s' % gn_gen_args, "--root=" + SRC_ROOT
|
||||
])
|
||||
|
@ -0,0 +1,35 @@
|
||||
diff -up chromium-96.0.4664.45/third_party/webrtc/common_video/h264/pps_parser.h.missing-cstdint chromium-96.0.4664.45/third_party/webrtc/common_video/h264/pps_parser.h
|
||||
diff -up chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h.missing-cstdint chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h
|
||||
--- chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h.missing-cstdint 2021-11-19 17:05:31.379750350 -0500
|
||||
+++ chromium-96.0.4664.45/third_party/webrtc/common_video/h264/sps_parser.h 2021-11-19 17:07:35.191520127 -0500
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef COMMON_VIDEO_H264_SPS_PARSER_H_
|
||||
#define COMMON_VIDEO_H264_SPS_PARSER_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include "absl/types/optional.h"
|
||||
#include "rtc_base/bitstream_reader.h"
|
||||
|
||||
diff -up chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h.missing-cstdint chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h
|
||||
--- chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h.missing-cstdint 2021-11-12 05:28:10.000000000 -0500
|
||||
+++ chromium-96.0.4664.45/third_party/webrtc/modules/include/module_common_types_public.h 2021-11-19 17:05:31.379750350 -0500
|
||||
@@ -11,6 +11,7 @@
|
||||
#ifndef MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
|
||||
#define MODULES_INCLUDE_MODULE_COMMON_TYPES_PUBLIC_H_
|
||||
|
||||
+#include <cstdint>
|
||||
#include <limits>
|
||||
|
||||
#include "absl/types/optional.h"
|
||||
diff -up chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h.missing-cstdint chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h
|
||||
--- chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h.missing-cstdint 2021-11-12 05:25:24.000000000 -0500
|
||||
+++ chromium-96.0.4664.45/ui/gfx/linux/drm_util_linux.h 2021-11-19 17:05:31.379750350 -0500
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#include "ui/gfx/buffer_types.h"
|
||||
|
||||
+#include <cstdint>
|
||||
+
|
||||
namespace ui {
|
||||
|
||||
int GetFourCCFormatFromBufferFormat(gfx::BufferFormat format);
|
@ -0,0 +1,24 @@
|
||||
diff -up chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc
|
||||
--- chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc.missing-cstring 2021-11-12 05:28:09.000000000 -0500
|
||||
+++ chromium-96.0.4664.45/third_party/webrtc/audio/utility/channel_mixer.cc 2021-11-19 17:10:02.927438695 -0500
|
||||
@@ -8,6 +8,8 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
+#include <cstring>
|
||||
+
|
||||
#include "audio/utility/channel_mixer.h"
|
||||
|
||||
#include "audio/utility/channel_mixing_matrix.h"
|
||||
diff -up chromium-96.0.4664.45/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc.missing-cstring chromium-96.0.4664.45/third_party/webrtc/modules/desktop_capture/linux/base_capturer_pipewire.cc
|
||||
diff -up chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc
|
||||
--- chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc.missing-cstring 2021-11-12 05:28:10.000000000 -0500
|
||||
+++ chromium-96.0.4664.45/third_party/webrtc/modules/video_coding/utility/ivf_file_reader.cc 2021-11-19 17:10:02.928438701 -0500
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#include "modules/video_coding/utility/ivf_file_reader.h"
|
||||
|
||||
+#include <cstring>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
@ -0,0 +1,20 @@
|
||||
diff -up chromium-98.0.4758.102/remoting/BUILD.gn.remoting-no-tests chromium-98.0.4758.102/remoting/BUILD.gn
|
||||
--- chromium-98.0.4758.102/remoting/BUILD.gn.remoting-no-tests 2022-02-28 19:15:23.835872267 +0000
|
||||
+++ chromium-98.0.4758.102/remoting/BUILD.gn 2022-03-01 17:55:50.625536957 +0000
|
||||
@@ -8,7 +8,7 @@ import("//remoting/build/config/remoting
|
||||
group("remoting_all") {
|
||||
testonly = true
|
||||
|
||||
- deps = [ ":remoting_unittests" ]
|
||||
+ deps = [ ]
|
||||
|
||||
if (is_win) {
|
||||
deps += [
|
||||
@@ -37,7 +37,6 @@ group("remoting_all") {
|
||||
|
||||
if (enable_remoting_host) {
|
||||
deps += [
|
||||
- ":remoting_perftests",
|
||||
"//remoting/host",
|
||||
]
|
||||
|
@ -0,0 +1,20 @@
|
||||
diff -up chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc.erase-fix chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc
|
||||
--- chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc.erase-fix 2022-02-03 19:16:57.784979831 +0000
|
||||
+++ chromium-98.0.4758.80/components/ui_devtools/views/ui_element_with_metadata.cc 2022-02-03 19:17:12.983633352 +0000
|
||||
@@ -19,14 +19,14 @@ namespace {
|
||||
// Remove any custom editor "prefixes" from the property name. The prefixes must
|
||||
// not be valid identifier characters.
|
||||
void StripPrefix(std::string& property_name) {
|
||||
- auto cur = property_name.cbegin();
|
||||
+ auto cur = property_name.begin();
|
||||
for (; cur < property_name.cend(); ++cur) {
|
||||
if ((*cur >= 'A' && *cur <= 'Z') || (*cur >= 'a' && *cur <= 'z') ||
|
||||
*cur == '_') {
|
||||
break;
|
||||
}
|
||||
}
|
||||
- property_name.erase(property_name.cbegin(), cur);
|
||||
+ property_name.erase(property_name.begin(), cur);
|
||||
}
|
||||
|
||||
} // namespace
|
@ -0,0 +1,26 @@
|
||||
diff -up chromium-99.0.4844.51/base/allocator/partition_allocator/starscan/metadata_allocator.h.el7-extra-operator-equalequal chromium-99.0.4844.51/base/allocator/partition_allocator/starscan/metadata_allocator.h
|
||||
--- chromium-99.0.4844.51/base/allocator/partition_allocator/starscan/metadata_allocator.h.el7-extra-operator-equalequal 2022-03-05 18:37:25.979241754 -0500
|
||||
+++ chromium-99.0.4844.51/base/allocator/partition_allocator/starscan/metadata_allocator.h 2022-03-05 18:37:25.979241754 -0500
|
||||
@@ -39,6 +39,11 @@ class MetadataAllocator {
|
||||
}
|
||||
|
||||
template <typename U>
|
||||
+ bool operator==(const MetadataAllocator<U>&) const {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ template <typename U>
|
||||
bool operator!=(const MetadataAllocator<U>& o) {
|
||||
return !operator==(o);
|
||||
}
|
||||
diff -up chromium-99.0.4844.51/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h.el7-extra-operator-equalequal chromium-99.0.4844.51/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h
|
||||
--- chromium-99.0.4844.51/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h.el7-extra-operator-equalequal 2022-03-06 19:14:20.892513442 -0500
|
||||
+++ chromium-99.0.4844.51/third_party/pdfium/core/fxcrt/fx_memory_wrappers.h 2022-03-06 19:15:40.412060574 -0500
|
||||
@@ -70,6 +70,7 @@ struct FxPartitionAllocAllocator {
|
||||
}
|
||||
|
||||
// There's no state, so they are all the same,
|
||||
+ bool operator==(const FxPartitionAllocAllocator&) const { return true; }
|
||||
bool operator==(const FxPartitionAllocAllocator& that) { return true; }
|
||||
bool operator!=(const FxPartitionAllocAllocator& that) { return false; }
|
||||
};
|
@ -0,0 +1,142 @@
|
||||
diff -up chromium-99.0.4844.51/printing/backend/cups_helper.cc.el7cups chromium-99.0.4844.51/printing/backend/cups_helper.cc
|
||||
--- chromium-99.0.4844.51/printing/backend/cups_helper.cc.el7cups 2022-02-28 19:05:55.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/printing/backend/cups_helper.cc 2022-03-05 15:17:45.516887985 -0500
|
||||
@@ -34,18 +34,6 @@ namespace printing {
|
||||
// This section contains helper code for PPD parsing for semantic capabilities.
|
||||
namespace {
|
||||
|
||||
-// Function availability can be tested by checking whether its address is not
|
||||
-// nullptr. Weak symbols remove the need for platform specific build flags and
|
||||
-// allow for appropriate CUPS usage on platforms with non-uniform version
|
||||
-// support, namely Linux.
|
||||
-#define WEAK_CUPS_FN(x) extern "C" __attribute__((weak)) decltype(x) x
|
||||
-
|
||||
-WEAK_CUPS_FN(httpConnect2);
|
||||
-
|
||||
-// Timeout for establishing a CUPS connection. It is expected that cupsd is
|
||||
-// able to start and respond on all systems within this duration.
|
||||
-constexpr base::TimeDelta kCupsTimeout = base::Seconds(5);
|
||||
-
|
||||
// CUPS default max copies value (parsed from kCupsMaxCopies PPD attribute).
|
||||
constexpr int32_t kDefaultMaxCopies = 9999;
|
||||
constexpr char kCupsMaxCopies[] = "cupsMaxCopies";
|
||||
@@ -527,8 +515,7 @@ const int kDefaultIPPServerPort = 631;
|
||||
// Helper wrapper around http_t structure, with connection and cleanup
|
||||
// functionality.
|
||||
HttpConnectionCUPS::HttpConnectionCUPS(const GURL& print_server_url,
|
||||
- http_encryption_t encryption,
|
||||
- bool blocking)
|
||||
+ http_encryption_t encryption)
|
||||
: http_(nullptr) {
|
||||
// If we have an empty url, use default print server.
|
||||
if (print_server_url.is_empty())
|
||||
@@ -538,17 +525,10 @@ HttpConnectionCUPS::HttpConnectionCUPS(c
|
||||
if (port == url::PORT_UNSPECIFIED)
|
||||
port = kDefaultIPPServerPort;
|
||||
|
||||
- if (httpConnect2) {
|
||||
- http_ = httpConnect2(print_server_url.host().c_str(), port,
|
||||
- /*addrlist=*/nullptr, AF_UNSPEC, encryption,
|
||||
- blocking ? 1 : 0, kCupsTimeout.InMilliseconds(),
|
||||
- /*cancel=*/nullptr);
|
||||
- } else {
|
||||
- // Continue to use deprecated CUPS calls because because older Linux
|
||||
- // distribution such as RHEL/CentOS 7 are shipped with CUPS 1.6.
|
||||
- http_ =
|
||||
- httpConnectEncrypt(print_server_url.host().c_str(), port, encryption);
|
||||
- }
|
||||
+ // Continue to use deprecated CUPS calls because because older Linux
|
||||
+ // distribution such as RHEL/CentOS 7 are shipped with CUPS 1.6.
|
||||
+ http_ =
|
||||
+ httpConnectEncrypt(print_server_url.host().c_str(), port, encryption);
|
||||
|
||||
if (!http_) {
|
||||
LOG(ERROR) << "CP_CUPS: Failed connecting to print server: "
|
||||
@@ -556,8 +536,6 @@ HttpConnectionCUPS::HttpConnectionCUPS(c
|
||||
return;
|
||||
}
|
||||
|
||||
- if (!httpConnect2)
|
||||
- httpBlocking(http_, blocking ? 1 : 0);
|
||||
}
|
||||
|
||||
HttpConnectionCUPS::~HttpConnectionCUPS() {
|
||||
@@ -565,6 +543,10 @@ HttpConnectionCUPS::~HttpConnectionCUPS(
|
||||
httpClose(http_);
|
||||
}
|
||||
|
||||
+void HttpConnectionCUPS::SetBlocking(bool blocking) {
|
||||
+ httpBlocking(http_, blocking ? 1 : 0);
|
||||
+}
|
||||
+
|
||||
http_t* HttpConnectionCUPS::http() {
|
||||
return http_;
|
||||
}
|
||||
diff -up chromium-99.0.4844.51/printing/backend/cups_helper.h.el7cups chromium-99.0.4844.51/printing/backend/cups_helper.h
|
||||
--- chromium-99.0.4844.51/printing/backend/cups_helper.h.el7cups 2022-02-28 19:05:55.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/printing/backend/cups_helper.h 2022-03-05 15:17:45.517887991 -0500
|
||||
@@ -34,10 +34,11 @@ constexpr cups_ptype_t kDestinationsFilt
|
||||
class COMPONENT_EXPORT(PRINT_BACKEND) HttpConnectionCUPS {
|
||||
public:
|
||||
HttpConnectionCUPS(const GURL& print_server_url,
|
||||
- http_encryption_t encryption,
|
||||
- bool blocking);
|
||||
+ http_encryption_t encryption);
|
||||
~HttpConnectionCUPS();
|
||||
|
||||
+ void SetBlocking(bool blocking);
|
||||
+
|
||||
http_t* http();
|
||||
|
||||
private:
|
||||
diff -up chromium-99.0.4844.51/printing/backend/print_backend_cups.cc.el7cups chromium-99.0.4844.51/printing/backend/print_backend_cups.cc
|
||||
--- chromium-99.0.4844.51/printing/backend/print_backend_cups.cc.el7cups 2022-02-28 19:05:55.000000000 -0500
|
||||
+++ chromium-99.0.4844.51/printing/backend/print_backend_cups.cc 2022-03-05 15:17:45.517887991 -0500
|
||||
@@ -146,7 +146,7 @@ mojom::ResultCode PrintBackendCUPS::Enum
|
||||
// not showing as available. Using cupsEnumDests() allows us to do our own
|
||||
// filtering should any duplicates occur.
|
||||
CupsDestsData dests_data = {0, nullptr};
|
||||
- ipp_status_t last_error = IPP_STATUS_OK;
|
||||
+ ipp_status_t last_error = IPP_OK;
|
||||
if (print_server_url_.is_empty()) {
|
||||
VLOG(1) << "CUPS: using cupsEnumDests to enumerate printers";
|
||||
if (!cupsEnumDests(CUPS_DEST_FLAGS_NONE, kCupsTimeoutMs,
|
||||
@@ -173,7 +173,7 @@ mojom::ResultCode PrintBackendCUPS::Enum
|
||||
// no printer drivers installed. Rely upon CUPS error code to distinguish
|
||||
// between these.
|
||||
DCHECK(!dests_data.dests);
|
||||
- if (last_error != IPP_STATUS_ERROR_NOT_FOUND) {
|
||||
+ if (last_error != IPP_NOT_FOUND) {
|
||||
VLOG(1) << "CUPS: Error getting printers from CUPS server"
|
||||
<< ", server: " << print_server_url_
|
||||
<< ", error: " << static_cast<int>(last_error) << " - "
|
||||
@@ -336,7 +336,8 @@ int PrintBackendCUPS::GetDests(cups_dest
|
||||
if (print_server_url_.is_empty())
|
||||
return cupsGetDests2(CUPS_HTTP_DEFAULT, dests);
|
||||
|
||||
- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_);
|
||||
+ HttpConnectionCUPS http(print_server_url_, cups_encryption_);
|
||||
+ http.SetBlocking(blocking_);
|
||||
|
||||
// This call must be made in the same scope as `http` because its destructor
|
||||
// closes the connection.
|
||||
@@ -362,7 +363,8 @@ base::FilePath PrintBackendCUPS::GetPPD(
|
||||
// connection will timeout after 10 seconds of no data period. And it will
|
||||
// return the same way as if data was completely and successfully
|
||||
// downloaded.
|
||||
- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_);
|
||||
+ HttpConnectionCUPS http(print_server_url_, cups_encryption_);
|
||||
+ http.SetBlocking(blocking_);
|
||||
ppd_file_path = cupsGetPPD2(http.http(), name);
|
||||
// Check if the get full PPD, since non-blocking call may simply return
|
||||
// normally after timeout expired.
|
||||
@@ -398,7 +400,8 @@ PrintBackendCUPS::ScopedDestination Prin
|
||||
// Use default (local) print server.
|
||||
dest = cupsGetNamedDest(CUPS_HTTP_DEFAULT, printer_name.c_str(), nullptr);
|
||||
} else {
|
||||
- HttpConnectionCUPS http(print_server_url_, cups_encryption_, blocking_);
|
||||
+ HttpConnectionCUPS http(print_server_url_, cups_encryption_);
|
||||
+ http.SetBlocking(blocking_);
|
||||
dest = cupsGetNamedDest(http.http(), printer_name.c_str(), nullptr);
|
||||
}
|
||||
return ScopedDestination(dest);
|
@ -0,0 +1,61 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2011 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.
|
||||
|
||||
# Let the wrapped binary know that it has been run through the wrapper.
|
||||
export CHROME_WRAPPER="`readlink -f "$0"`"
|
||||
|
||||
HERE="`dirname "$CHROME_WRAPPER"`"
|
||||
|
||||
# We include some xdg utilities next to the binary, and we want to prefer them
|
||||
# over the system versions when we know the system versions are very old. We
|
||||
# detect whether the system xdg utilities are sufficiently new to be likely to
|
||||
# work for us by looking for xdg-settings. If we find it, we leave $PATH alone,
|
||||
# so that the system xdg utilities (including any distro patches) will be used.
|
||||
if ! which xdg-settings &> /dev/null; then
|
||||
# Old xdg utilities. Prepend $HERE to $PATH to use ours instead.
|
||||
export PATH="$HERE:$PATH"
|
||||
else
|
||||
# Use system xdg utilities. But first create mimeapps.list if it doesn't
|
||||
# exist; some systems have bugs in xdg-mime that make it fail without it.
|
||||
xdg_app_dir="${XDG_DATA_HOME:-$HOME/.local/share/applications}"
|
||||
mkdir -p "$xdg_app_dir"
|
||||
[ -f "$xdg_app_dir/mimeapps.list" ] || touch "$xdg_app_dir/mimeapps.list"
|
||||
fi
|
||||
|
||||
# Always use our versions of ffmpeg libs.
|
||||
# This also makes RPMs find the compatibly-named library symlinks.
|
||||
if [[ -n "$LD_LIBRARY_PATH" ]]; then
|
||||
LD_LIBRARY_PATH="$HERE:$HERE/lib:$LD_LIBRARY_PATH"
|
||||
else
|
||||
LD_LIBRARY_PATH="$HERE:$HERE/lib"
|
||||
fi
|
||||
export LD_LIBRARY_PATH
|
||||
|
||||
export CHROME_VERSION_EXTRA="Built from source for @@BUILD_TARGET@@"
|
||||
|
||||
# We don't want bug-buddy intercepting our crashes. http://crbug.com/24120
|
||||
export GNOME_DISABLE_CRASH_DIALOG=SET_BY_GOOGLE_CHROME
|
||||
|
||||
# Allow users to override command-line options and prefer user defined
|
||||
# CHROMIUM_USER_FLAGS from env over system wide CHROMIUM_FLAGS
|
||||
[[ -f /etc/chromium/chromium.conf ]] && . /etc/chromium/chromium.conf
|
||||
CHROMIUM_FLAGS=${CHROMIUM_USER_FLAGS:-$CHROMIUM_FLAGS}
|
||||
|
||||
CHROMIUM_DISTRO_FLAGS=" --enable-plugins \
|
||||
--enable-extensions \
|
||||
--enable-user-scripts \
|
||||
--enable-printing \
|
||||
--enable-gpu-rasterization \
|
||||
--enable-sync \
|
||||
--auto-ssl-client-auth @@EXTRA_FLAGS@@"
|
||||
|
||||
# Sanitize std{in,out,err} because they'll be shared with untrusted child
|
||||
# processes (http://crbug.com/376567).
|
||||
exec < /dev/null
|
||||
exec > >(exec cat)
|
||||
exec 2> >(exec cat >&2)
|
||||
|
||||
exec -a "$0" "$HERE/@@CHROMIUM_BROWSER_CHANNEL@@" $CHROMIUM_FLAGS $CHROMIUM_DISTRO_FLAGS "$@"
|
@ -0,0 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE default-apps SYSTEM "gnome-da-list.dtd">
|
||||
<default-apps>
|
||||
<web-browsers>
|
||||
<web-browser>
|
||||
<name>Chromium</name>
|
||||
<executable>chromium-browser</executable>
|
||||
<command>/usr/bin/chromium-browser %s</command>
|
||||
<icon-name>chromium-browser</icon-name>
|
||||
<run-in-terminal>false</run-in-terminal>
|
||||
<netscape-remote>false</netscape-remote>
|
||||
<!--
|
||||
<tab-command>false</tab-command>
|
||||
<win-command>false</win-command>
|
||||
-->
|
||||
</web-browser>
|
||||
</web-browsers>
|
||||
</default-apps>
|
@ -0,0 +1,26 @@
|
||||
description: disable building font tests
|
||||
author: Michael Gilbert <mgilbert@debian.org>
|
||||
|
||||
--- a/skia/BUILD.gn
|
||||
+++ b/skia/BUILD.gn
|
||||
@@ -860,7 +860,7 @@ group("test_fonts_resources") {
|
||||
if (is_apple) {
|
||||
deps += [ ":test_fonts_bundle_data" ]
|
||||
data_deps += [ ":test_fonts_bundle_data" ]
|
||||
- } else {
|
||||
+ } else if (false) {
|
||||
deps += [ "//third_party/test_fonts" ]
|
||||
data_deps += [ "//third_party/test_fonts" ]
|
||||
}
|
||||
--- a/third_party/test_fonts/fontconfig/BUILD.gn
|
||||
+++ b/third_party/test_fonts/fontconfig/BUILD.gn
|
||||
@@ -8,9 +8,7 @@ if (is_linux || is_chromeos) {
|
||||
group("test_support") {
|
||||
testonly = true
|
||||
public_deps = [ ":fontconfig_util_linux" ]
|
||||
- data_deps = [ "//third_party/test_fonts" ]
|
||||
if (current_toolchain == host_toolchain) {
|
||||
- data_deps += [ ":do_generate_fontconfig_caches" ]
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,344 @@
|
||||
#!/usr/bin/python3
|
||||
# Copyright 2010,2015-2019 Tom Callaway <tcallawa@redhat.com>
|
||||
# Copyright 2013-2016 Tomas Popela <tpopela@redhat.com>
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
try:
|
||||
import argparse
|
||||
optparse = False
|
||||
except ImportError:
|
||||
from optparse import OptionParser
|
||||
optparse = True
|
||||
import csv
|
||||
import glob
|
||||
import hashlib
|
||||
import locale
|
||||
import os
|
||||
import shutil
|
||||
import io
|
||||
import sys
|
||||
import urllib.request, urllib.parse, urllib.error
|
||||
|
||||
chromium_url = "http://commondatastorage.googleapis.com/chromium-browser-official/"
|
||||
|
||||
chromium_root_dir = "."
|
||||
version_string = "stable"
|
||||
|
||||
name = 'Chromium Latest'
|
||||
script_version = 0.9
|
||||
my_description = '{0} {1}'.format(name, script_version)
|
||||
|
||||
|
||||
def dlProgress(count, blockSize, totalSize):
|
||||
|
||||
if (totalSize <= blockSize):
|
||||
percent = int(count * 100)
|
||||
else:
|
||||
percent = int(count * blockSize * 100 / totalSize)
|
||||
sys.stdout.write("\r" + "Downloading ... %d%%" % percent)
|
||||
sys.stdout.flush()
|
||||
|
||||
|
||||
def delete_chromium_dir(ch_dir):
|
||||
|
||||
full_dir = "%s/%s" % (latest_dir, ch_dir)
|
||||
print('Deleting %s ' % full_dir)
|
||||
if os.path.isdir(full_dir):
|
||||
shutil.rmtree(full_dir)
|
||||
print('[DONE]')
|
||||
else:
|
||||
print('[NOT FOUND]')
|
||||
|
||||
|
||||
def delete_chromium_files(files):
|
||||
|
||||
full_path = "%s/%s" % (latest_dir, files)
|
||||
print('Deleting ' + full_path + ' ', end=' ')
|
||||
for filename in glob.glob(full_path):
|
||||
print('Deleting ' + filename + ' ', end=' ')
|
||||
os.remove(filename)
|
||||
print('[DONE]')
|
||||
|
||||
|
||||
def check_omahaproxy(channel="stable"):
|
||||
|
||||
version = 0
|
||||
status_url = "http://omahaproxy.appspot.com/all?os=linux&channel=" + channel
|
||||
|
||||
usock = urllib.request.urlopen(status_url)
|
||||
status_dump = usock.read().decode('utf-8')
|
||||
usock.close()
|
||||
status_list = io.StringIO(status_dump)
|
||||
status_reader = list(csv.reader(status_list, delimiter=','))
|
||||
linux_channels = [s for s in status_reader if "linux" in s]
|
||||
linux_channel = [s for s in linux_channels if channel in s]
|
||||
version = linux_channel[0][2]
|
||||
|
||||
if version == 0:
|
||||
print('I could not find the latest %s build. Bailing out.' % channel)
|
||||
sys.exit(1)
|
||||
else:
|
||||
print('Latest Chromium Version on %s at %s is %s' % (channel, status_url, version))
|
||||
return version
|
||||
|
||||
|
||||
def remove_file_if_exists(filename):
|
||||
|
||||
if os.path.isfile("./%s" % filename):
|
||||
try:
|
||||
os.remove(filename)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
|
||||
def download_file_and_compare_hashes(file_to_download):
|
||||
|
||||
hashes_file = '%s.hashes' % file_to_download
|
||||
|
||||
if (args.clean):
|
||||
remove_file_if_exists(file_to_download)
|
||||
remove_file_if_exists(hashes_file)
|
||||
|
||||
# Let's make sure we haven't already downloaded it.
|
||||
tarball_local_file = "./%s" % file_to_download
|
||||
if os.path.isfile(tarball_local_file):
|
||||
print("%s already exists!" % file_to_download)
|
||||
else:
|
||||
path = '%s%s' % (chromium_url, file_to_download)
|
||||
print("Downloading %s" % path)
|
||||
# Perhaps look at using python-progressbar at some point?
|
||||
info=urllib.request.urlretrieve(path, file_to_download, reporthook=dlProgress)[1]
|
||||
urllib.request.urlcleanup()
|
||||
print("")
|
||||
if (info["Content-Type"] != "application/x-tar"):
|
||||
print('Chromium tarballs for %s are not on servers.' % file_to_download)
|
||||
remove_file_if_exists (file_to_download)
|
||||
sys.exit(1)
|
||||
|
||||
hashes_local_file = "./%s" % hashes_file
|
||||
if not os.path.isfile(hashes_local_file):
|
||||
path = '%s%s' % (chromium_url, hashes_file)
|
||||
print("Downloading %s" % path)
|
||||
# Perhaps look at using python-progressbar at some point?
|
||||
info=urllib.request.urlretrieve(path, hashes_file, reporthook=dlProgress)[1]
|
||||
urllib.request.urlcleanup()
|
||||
print("")
|
||||
|
||||
if os.path.isfile(hashes_local_file):
|
||||
with open(hashes_local_file, "r") as input_file:
|
||||
md5sum = input_file.readline().split()[1]
|
||||
md5 = hashlib.md5()
|
||||
with open(tarball_local_file, "rb") as f:
|
||||
for block in iter(lambda: f.read(65536), b""):
|
||||
md5.update(block)
|
||||
if (md5sum == md5.hexdigest()):
|
||||
print("MD5 matches for %s!" % file_to_download)
|
||||
else:
|
||||
print("MD5 mismatch for %s!" % file_to_download)
|
||||
sys.exit(1)
|
||||
else:
|
||||
print("Cannot compare hashes for %s!" % file_to_download)
|
||||
|
||||
|
||||
def download_version(version):
|
||||
|
||||
download_file_and_compare_hashes ('chromium-%s.tar.xz' % version)
|
||||
|
||||
if (args.tests):
|
||||
download_file_and_compare_hashes ('chromium-%s-testdata.tar.xz' % version)
|
||||
|
||||
def nacl_versions(version):
|
||||
|
||||
if sys.version_info[0] == 2 and sys.version_info[1] == 6:
|
||||
return
|
||||
|
||||
myvars = {}
|
||||
chrome_dir = './chromium-%s' % version
|
||||
with open(chrome_dir + "/native_client/tools/REVISIONS") as myfile:
|
||||
for line in myfile:
|
||||
name, var = line.partition("=")[::2]
|
||||
myvars[name] = var
|
||||
print("nacl-binutils commit: %s" % myvars["NACL_BINUTILS_COMMIT"])
|
||||
print("nacl-gcc commit: %s" % myvars["NACL_GCC_COMMIT"])
|
||||
print("nacl-newlib commit: %s" % myvars["NACL_NEWLIB_COMMIT"])
|
||||
|
||||
# Parse GIT_REVISIONS dict from toolchain_build.py
|
||||
|
||||
sys.path.append(os.path.abspath(chrome_dir + "/native_client/toolchain_build"))
|
||||
from toolchain_build import GIT_REVISIONS
|
||||
print("nacl-arm-binutils commit: %s" % GIT_REVISIONS['binutils']['rev'])
|
||||
print("nacl-arm-gcc commit: %s" % GIT_REVISIONS['gcc']['rev'])
|
||||
|
||||
|
||||
def download_chrome_latest_rpm(arch):
|
||||
|
||||
chrome_rpm = 'google-chrome-%s_current_%s.rpm' % (version_string, arch)
|
||||
path = 'https://dl.google.com/linux/direct/%s' % chrome_rpm
|
||||
|
||||
if (args.clean):
|
||||
remove_file_if_exists(chrome_rpm)
|
||||
|
||||
# Let's make sure we haven't already downloaded it.
|
||||
if os.path.isfile("./%s" % chrome_rpm):
|
||||
print("%s already exists!" % chrome_rpm)
|
||||
else:
|
||||
print("Downloading %s" % path)
|
||||
# Perhaps look at using python-progressbar at some point?
|
||||
info=urllib.request.urlretrieve(path, chrome_rpm, reporthook=dlProgress)[1]
|
||||
urllib.request.urlcleanup()
|
||||
print("")
|
||||
if (info["Content-Type"] != "binary/octet-stream" and info["Content-Type"] != "application/x-redhat-package-manager"):
|
||||
print('Chrome %s rpms are not on servers.' % version_string)
|
||||
remove_file_if_exists (chrome_rpm)
|
||||
sys.exit(1)
|
||||
|
||||
# This is where the magic happens
|
||||
if __name__ == '__main__':
|
||||
|
||||
# Locale magic
|
||||
locale.setlocale(locale.LC_ALL, '')
|
||||
|
||||
# Create the parser object
|
||||
if optparse:
|
||||
parser = OptionParser(description=my_description)
|
||||
parser_add_argument = parser.add_option
|
||||
else:
|
||||
parser = argparse.ArgumentParser(description=my_description)
|
||||
parser_add_argument = parser.add_argument
|
||||
|
||||
parser_add_argument(
|
||||
'--ffmpegarm', action='store_true',
|
||||
help='Leave arm sources when cleaning ffmpeg')
|
||||
parser_add_argument(
|
||||
'--beta', action='store_true',
|
||||
help='Get the latest beta Chromium source')
|
||||
parser_add_argument(
|
||||
'--clean', action='store_true',
|
||||
help='Re-download all previously downloaded sources')
|
||||
parser_add_argument(
|
||||
'--cleansources', action='store_true',
|
||||
help='Get the latest Chromium release from given channel and clean various directories to from unnecessary or unwanted stuff')
|
||||
parser_add_argument(
|
||||
'--dev', action='store_true',
|
||||
help='Get the latest dev Chromium source')
|
||||
parser_add_argument(
|
||||
'--ffmpegclean', action='store_true',
|
||||
help='Get the latest Chromium release from given channel and cleans ffmpeg sources from proprietary stuff')
|
||||
parser_add_argument(
|
||||
'--chrome', action='store_true',
|
||||
help='Get the latest Chrome rpms for the given channel')
|
||||
parser_add_argument(
|
||||
'--prep', action='store_true',
|
||||
help='Prepare everything, but don\'t compress the result')
|
||||
parser_add_argument(
|
||||
'--stable', action='store_true',
|
||||
help='Get the latest stable Chromium source')
|
||||
parser_add_argument(
|
||||
'--tests', action='store_true',
|
||||
help='Get the additional data for running tests')
|
||||
parser_add_argument(
|
||||
'--version',
|
||||
help='Download a specific version of Chromium')
|
||||
parser_add_argument(
|
||||
'--naclvers',
|
||||
help='Display the commit versions of nacl toolchain components')
|
||||
|
||||
# Parse the args
|
||||
if optparse:
|
||||
args, options = parser.parse_args()
|
||||
else:
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.stable:
|
||||
version_string = "stable"
|
||||
elif args.beta:
|
||||
version_string = "beta"
|
||||
elif args.dev:
|
||||
version_string = "dev"
|
||||
elif (not (args.stable or args.beta or args.dev)):
|
||||
if (not args.version):
|
||||
print('No version specified, downloading STABLE')
|
||||
args.stable = True
|
||||
|
||||
chromium_version = args.version if args.version else check_omahaproxy(version_string)
|
||||
|
||||
if args.dev:
|
||||
version_string = "unstable"
|
||||
|
||||
if args.chrome:
|
||||
if args.version:
|
||||
print('You cannot specify a Chrome RPM version!')
|
||||
sys.exit(1)
|
||||
latest = 'google-chrome-%s_current_i386' % version_string
|
||||
download_chrome_latest_rpm("i386")
|
||||
latest = 'google-chrome-%s_current_x86_64' % version_string
|
||||
download_chrome_latest_rpm("x86_64")
|
||||
if (not (args.ffmpegclean or args.tests)):
|
||||
sys.exit(0)
|
||||
|
||||
latest = 'chromium-%s.tar.xz' % chromium_version
|
||||
|
||||
download_version(chromium_version)
|
||||
|
||||
# Lets make sure we haven't unpacked it already
|
||||
latest_dir = "%s/chromium-%s" % (chromium_root_dir, chromium_version)
|
||||
if (args.clean and os.path.isdir(latest_dir)):
|
||||
shutil.rmtree(latest_dir)
|
||||
|
||||
if os.path.isdir(latest_dir):
|
||||
print("%s already exists, perhaps %s has already been unpacked?" % (latest_dir, latest))
|
||||
else:
|
||||
print("Unpacking %s into %s, please wait." % (latest, latest_dir))
|
||||
if (os.system("tar -xJf %s" % latest) != 0):
|
||||
print("%s is possibly corrupted, exiting." % (latest))
|
||||
sys.exit(1)
|
||||
|
||||
if (args.naclvers):
|
||||
nacl_versions(chromium_version)
|
||||
|
||||
if (args.cleansources):
|
||||
junk_dirs = ['third_party/WebKit/Tools/Scripts/webkitpy/layout_tests',
|
||||
'webkit/data/layout_tests', 'third_party/hunspell/dictionaries',
|
||||
'chrome/test/data', 'native_client/tests',
|
||||
'third_party/WebKit/LayoutTests']
|
||||
|
||||
# First, the dirs:
|
||||
for directory in junk_dirs:
|
||||
delete_chromium_dir(directory)
|
||||
|
||||
# There has got to be a better, more portable way to do this.
|
||||
os.system("find %s -depth -name reference_build -type d -exec rm -rf {} \;" % latest_dir)
|
||||
|
||||
# I could not find good bindings for xz/lzma support, so we system call here too.
|
||||
chromium_clean_xz_file = "chromium-" + chromium_version + "-clean.tar.xz"
|
||||
|
||||
remove_file_if_exists(chromium_clean_xz_file)
|
||||
|
||||
if (args.ffmpegclean):
|
||||
print("Cleaning ffmpeg from proprietary things...")
|
||||
os.system("./clean_ffmpeg.sh %s %d" % (latest_dir, 0 if args.ffmpegarm else 1))
|
||||
print("Done!")
|
||||
|
||||
if (not args.prep):
|
||||
print("Compressing cleaned tree, please wait...")
|
||||
os.chdir(chromium_root_dir)
|
||||
os.system("tar --exclude=\.svn -cf - chromium-%s | xz -9 -T 0 -f > %s" % (chromium_version, chromium_clean_xz_file))
|
||||
|
||||
print("Finished!")
|
@ -0,0 +1,4 @@
|
||||
# system wide chromium flags
|
||||
CHROMIUM_FLAGS=""
|
||||
CHROMIUM_FLAGS+=" --disable-features=AudioServiceSandbox,Vulkan"
|
||||
CHROMIUM_FLAGS+=" --enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiVideoDecodeLinuxGL"
|
@ -0,0 +1,376 @@
|
||||
#!/bin/bash
|
||||
# Copyright 2013-2015 Tomas Popela <tpopela@redhat.com>
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
# $1 files
|
||||
# $2 verbose
|
||||
function copy_files() {
|
||||
for file in $1
|
||||
do
|
||||
dir_name=$(echo "$file" | sed 's%/[^/]*$%/%')
|
||||
if [[ $dir_name == */* ]]; then
|
||||
tmp_dir_name="tmp_"$dir_name
|
||||
mkdir -p "../tmp_ffmpeg/$tmp_dir_name"
|
||||
else
|
||||
tmp_dir_name=$file
|
||||
fi
|
||||
|
||||
if [ "$2" -eq 1 ]; then
|
||||
cp "$file" "../tmp_ffmpeg/$tmp_dir_name"
|
||||
else
|
||||
cp "$file" "../tmp_ffmpeg/$tmp_dir_name" > /dev/null 2>&1
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
where=$(pwd)
|
||||
|
||||
if ! generated_files=$(./get_free_ffmpeg_source_files.py "$1" "$2"); then
|
||||
exit 1
|
||||
fi
|
||||
# As the build system files does not contain the header files, cheat here
|
||||
# and generate the header files names from source files. These that does not
|
||||
# exist will be later skipped while copying.
|
||||
generated_files_headers="${generated_files//.c/.h}"
|
||||
generated_files_headers="$generated_files_headers ${generated_files//.c/_internal.h}"
|
||||
if [ "$2" -ne "1" ]; then
|
||||
generated_files_headers="$generated_files_headers ${generated_files//.S/.h}"
|
||||
fi
|
||||
generated_files_headers="$generated_files_headers ${generated_files//.asm/.h}"
|
||||
|
||||
header_files=" libavcodec/x86/inline_asm.h \
|
||||
libavcodec/x86/hpeldsp.h \
|
||||
libavcodec/x86/mathops.h \
|
||||
libavcodec/x86/vpx_arith.h \
|
||||
libavcodec/aarch64/vp8dsp.h \
|
||||
libavcodec/arm/vp8dsp.h \
|
||||
libavcodec/arm/vpx_arith.h \
|
||||
libavcodec/aac.h \
|
||||
libavcodec/aacps.h \
|
||||
libavcodec/aacpsdsp.h \
|
||||
libavcodec/aacsbrdata.h \
|
||||
libavcodec/aac_ac3_parser.h \
|
||||
libavcodec/aac_defines.h \
|
||||
libavcodec/ac3.h \
|
||||
libavcodec/ac3defs.h \
|
||||
libavcodec/ac3tab.h \
|
||||
libavcodec/adts_header.h \
|
||||
libavcodec/avcodec.h \
|
||||
libavcodec/blockdsp.h \
|
||||
libavcodec/bytestream.h \
|
||||
libavcodec/cbrt_data.h \
|
||||
libavcodec/cbrt_tablegen.h \
|
||||
libavcodec/codec.h \
|
||||
libavcodec/codec_id.h \
|
||||
libavcodec/codec_internal.h \
|
||||
libavcodec/codec_par.h \
|
||||
libavcodec/dct.h \
|
||||
libavcodec/dct32.h \
|
||||
libavcodec/defs.h \
|
||||
libavcodec/dv.h \
|
||||
libavcodec/error_resilience.h \
|
||||
libavcodec/fdctdsp.h \
|
||||
libavcodec/fft.h \
|
||||
libavcodec/fft-internal.h \
|
||||
libavcodec/fft_table.h \
|
||||
libavcodec/flac.h \
|
||||
libavcodec/flacdsp.h \
|
||||
libavcodec/flac_parse.h \
|
||||
libavcodec/frame_thread_encoder.h \
|
||||
libavcodec/get_bits.h \
|
||||
libavcodec/h263dsp.h \
|
||||
libavcodec/h264chroma.h \
|
||||
libavcodec/hevc.h \
|
||||
libavcodec/hpeldsp.h \
|
||||
libavcodec/hwaccels.h \
|
||||
libavcodec/hwconfig.h \
|
||||
libavcodec/idctdsp.h \
|
||||
libavcodec/internal.h \
|
||||
libavcodec/kbdwin.h \
|
||||
libavcodec/mathops.h \
|
||||
libavcodec/me_cmp.h \
|
||||
libavcodec/mlp_parse.h \
|
||||
libavcodec/motion_est.h \
|
||||
libavcodec/mpeg12.h \
|
||||
libavcodec/mpeg12data.h \
|
||||
libavcodec/mpeg12vlc.h \
|
||||
libavcodec/mpegaudio.h \
|
||||
libavcodec/mpegaudiodecheader.h \
|
||||
libavcodec/mpegaudiodec_common_tablegen.h \
|
||||
libavcodec/mpegaudiodsp.h \
|
||||
libavcodec/mpegaudio_tablegen.h \
|
||||
libavcodec/mpegpicture.h \
|
||||
libavcodec/mpegutils.h \
|
||||
libavcodec/mpegvideo.h \
|
||||
libavcodec/mpegvideodata.h \
|
||||
libavcodec/mpegvideoencdsp.h \
|
||||
libavcodec/options_table.h \
|
||||
libavcodec/opus.h \
|
||||
libavcodec/opusdsp.h \
|
||||
libavcodec/opus_celt.h \
|
||||
libavcodec/opus_pvq.h \
|
||||
libavcodec/opus_rc.h \
|
||||
libavcodec/packet.h \
|
||||
libavcodec/packet_internal.h \
|
||||
libavcodec/pcm_tablegen.h \
|
||||
libavcodec/pixblockdsp.h \
|
||||
libavcodec/pixels.h \
|
||||
libavcodec/png.h \
|
||||
libavcodec/pngdsp.h \
|
||||
libavcodec/put_bits.h \
|
||||
libavcodec/qpeldsp.h \
|
||||
libavcodec/ratecontrol.h \
|
||||
libavcodec/rectangle.h \
|
||||
libavcodec/rl.h \
|
||||
libavcodec/rnd_avg.h \
|
||||
libavcodec/sbr.h \
|
||||
libavcodec/sbrdsp.h \
|
||||
libavcodec/sinewin.h \
|
||||
libavcodec/sinewin_tablegen.h \
|
||||
libavcodec/startcode.h \
|
||||
libavcodec/thread.h \
|
||||
libavcodec/threadframe.h \
|
||||
libavcodec/unary.h \
|
||||
libavcodec/version.h \
|
||||
libavcodec/version_major.h \
|
||||
libavcodec/videodsp.h \
|
||||
libavcodec/vlc.h \
|
||||
libavcodec/vorbisdsp.h \
|
||||
libavcodec/vp3data.h \
|
||||
libavcodec/vp4data.h \
|
||||
libavcodec/vp3dsp.h \
|
||||
libavcodec/vp56.h \
|
||||
libavcodec/vp56dsp.h \
|
||||
libavcodec/vp8data.h \
|
||||
libavcodec/vp8dsp.h \
|
||||
libavcodec/vp89_rac.h \
|
||||
libavformat/apetag.h \
|
||||
libavformat/avformat.h \
|
||||
libavformat/dv.h \
|
||||
libavformat/img2.h \
|
||||
libavformat/internal.h \
|
||||
libavformat/mov_chan.h \
|
||||
libavformat/pcm.h \
|
||||
libavformat/rdt.h \
|
||||
libavformat/rtp.h \
|
||||
libavformat/rtpdec.h \
|
||||
libavformat/spdif.h \
|
||||
libavformat/srtp.h \
|
||||
libavformat/options_table.h \
|
||||
libavformat/version.h \
|
||||
libavformat/version_major.h \
|
||||
libavformat/w64.h \
|
||||
libavutil/aarch64/cpu.h \
|
||||
libavutil/x86/asm.h \
|
||||
libavutil/x86/bswap.h \
|
||||
libavutil/x86/cpu.h \
|
||||
libavutil/x86/emms.h
|
||||
libavutil/x86/intreadwrite.h \
|
||||
libavutil/x86/intmath.h
|
||||
libavutil/x86/timer.h \
|
||||
libavutil/attributes.h \
|
||||
libavutil/attributes_internal.h \
|
||||
libavutil/audio_fifo.h \
|
||||
libavutil/avassert.h \
|
||||
libavutil/avutil.h \
|
||||
libavutil/bswap.h \
|
||||
libavutil/common.h \
|
||||
libavutil/colorspace.h \
|
||||
libavutil/cpu.h \
|
||||
libavutil/cpu_internal.h \
|
||||
libavutil/dynarray.h \
|
||||
libavutil/ffmath.h \
|
||||
libavutil/fixed_dsp.h \
|
||||
libavutil/float_dsp.h \
|
||||
libavutil/imgutils.h \
|
||||
libavutil/imgutils_internal.h \
|
||||
libavutil/internal.h \
|
||||
libavutil/intfloat.h \
|
||||
libavutil/intreadwrite.h \
|
||||
libavutil/libm.h \
|
||||
libavutil/lls.h \
|
||||
libavutil/macros.h \
|
||||
libavutil/pixfmt.h \
|
||||
libavutil/qsort.h \
|
||||
libavutil/replaygain.h \
|
||||
libavutil/softfloat.h \
|
||||
libavutil/softfloat_tables.h \
|
||||
libavutil/thread.h \
|
||||
libavutil/timer.h \
|
||||
libavutil/timestamp.h \
|
||||
libavutil/tx_priv.h \
|
||||
libavutil/version.h \
|
||||
libswresample/swresample.h \
|
||||
libswresample/version.h \
|
||||
libswresample/version_major.h \
|
||||
compat/va_copy.h \
|
||||
compat/atomics/gcc/stdatomic.h "
|
||||
|
||||
manual_files=" libavcodec/aarch64/fft_neon.S \
|
||||
libavcodec/aarch64/h264pred_neon.S \
|
||||
libavcodec/aarch64/hpeldsp_neon.S \
|
||||
libavcodec/aarch64/mdct_neon.S \
|
||||
libavcodec/aarch64/neon.S \
|
||||
libavcodec/aarch64/vorbisdsp_neon.S \
|
||||
libavcodec/aarch64/vorbisdsp_init.c \
|
||||
libavcodec/aarch64/vp8dsp_neon.S \
|
||||
libavcodec/x86/hpeldsp.asm \
|
||||
libavcodec/x86/hpeldsp_rnd_template.c \
|
||||
libavcodec/x86/rnd_template.c \
|
||||
libavcodec/x86/videodsp.asm \
|
||||
libavcodec/x86/videodsp_init.c \
|
||||
libavcodec/x86/vorbisdsp_init.c \
|
||||
libavcodec/x86/vp3dsp.asm \
|
||||
libavcodec/x86/vp8dsp.asm \
|
||||
libavcodec/bit_depth_template.c \
|
||||
libavcodec/fft_template.c \
|
||||
libavcodec/flacdec.c \
|
||||
libavcodec/flacdsp.c \
|
||||
libavcodec/flacdsp_template.c \
|
||||
libavcodec/flacdsp_lpc_template.c \
|
||||
libavcodec/h264pred_template.c \
|
||||
libavcodec/hpel_template.c \
|
||||
libavcodec/hpeldsp.c \
|
||||
libavcodec/mdct_template.c \
|
||||
libavcodec/options.c \
|
||||
libavcodec/pcm.c \
|
||||
libavcodec/pel_template.c \
|
||||
libavcodec/utils.c \
|
||||
libavcodec/videodsp.c \
|
||||
libavcodec/videodsp_template.c \
|
||||
libavcodec/vorbisdsp.c \
|
||||
libavcodec/vp3dsp.c \
|
||||
libavcodec/vp8dsp.c \
|
||||
libavformat/flacdec.c \
|
||||
libavformat/options.c \
|
||||
libavformat/pcm.c \
|
||||
libavformat/utils.c \
|
||||
libavformat/version.c \
|
||||
libavutil/aarch64/asm.S \
|
||||
libavutil/aarch64/bswap.h \
|
||||
libavutil/aarch64/cpu.c \
|
||||
libavutil/aarch64/float_dsp_init.c \
|
||||
libavutil/aarch64/float_dsp_neon.S \
|
||||
libavutil/aarch64/timer.h \
|
||||
libavutil/cpu.c \
|
||||
libavutil/fixed_dsp.c \
|
||||
libavutil/float_dsp.c \
|
||||
libavutil/imgutils.c \
|
||||
libavutil/tx_float.c \
|
||||
libavutil/tx_template.c \
|
||||
libavutil/utils.c \
|
||||
libavutil/version.c \
|
||||
libavutil/x86/cpu.c \
|
||||
libavutil/x86/float_dsp_init.c \
|
||||
libavutil/x86/tx_float_init.c \
|
||||
libavutil/x86/x86inc.asm \
|
||||
libavutil/x86/x86util.asm "
|
||||
|
||||
mp3_files=" libavcodec/aarch64/aacpsdsp_init_aarch64.c \
|
||||
libavcodec/aarch64/aacpsdsp_neon.S \
|
||||
libavcodec/aarch64/autorename_libavcodec_aarch64_aacpsdsp_neon.S \
|
||||
libavcodec/aarch64/autorename_libavcodec_aarch64_sbrdsp_neon.S \
|
||||
libavcodec/aarch64/mpegaudiodsp_init.c \
|
||||
libavcodec/aarch64/mpegaudiodsp_neon.S \
|
||||
libavcodec/aarch64/sbrdsp_init_aarch64.c \
|
||||
libavcodec/aarch64/sbrdsp_neon.S \
|
||||
libavcodec/aac_ac3_parser.c \
|
||||
libavcodec/aac_parser.c \
|
||||
libavcodec/aacps_float.c \
|
||||
libavcodec/aacpsdsp_float.c \
|
||||
libavcodec/aacsbr.c \
|
||||
libavcodec/aactab.c \
|
||||
libavcodec/ac3tab.c \
|
||||
libavcodec/autorename_libavcodec_mpegaudiodsp.c \
|
||||
libavcodec/autorename_libavcodec_sbrdsp.c \
|
||||
libavcodec/cbrt_data.c \
|
||||
libavcodec/dct.c \
|
||||
libavcodec/dct32_fixed.c \
|
||||
libavcodec/dct32_float.c \
|
||||
libavcodec/dct32_template.c \
|
||||
libavcodec/kbdwin.c \
|
||||
libavcodec/mpegaudio.c \
|
||||
libavcodec/mpegaudio_parser.c \
|
||||
libavcodec/mpegaudiodec_fixed.c \
|
||||
libavcodec/mpegaudiodec_template.c \
|
||||
libavcodec/mpegaudiodecheader.c \
|
||||
libavcodec/mpegaudiodsp.c \
|
||||
libavcodec/mpegaudiodsp_data.c \
|
||||
libavcodec/mpegaudiodsp_fixed.c \
|
||||
libavcodec/mpegaudiodsp_float.c \
|
||||
libavcodec/mpegaudiodsp_template.c \
|
||||
libavcodec/sbrdsp.c \
|
||||
libavcodec/sbrdsp_template.c \
|
||||
libavcodec/sinewin.c \
|
||||
libavcodec/x86/dct_init.c \
|
||||
libavcodec/x86/dct32.asm \
|
||||
libavcodec/x86/imdct36.asm \
|
||||
libavcodec/x86/mpegaudiodsp.c \
|
||||
libavcodec/x86/sbrdsp_init.c \
|
||||
libavcodec/x86/sbrdsp.asm \
|
||||
libavformat/aacdec.c \
|
||||
libavformat/apetag.c \
|
||||
libavformat/img2.c \
|
||||
libavformat/mov.c \
|
||||
libavformat/mov_chan.c \
|
||||
libavformat/mp3dec.c "
|
||||
|
||||
other_files=" BUILD.gn \
|
||||
Changelog \
|
||||
COPYING.GPLv2 \
|
||||
COPYING.GPLv3 \
|
||||
COPYING.LGPLv2.1 \
|
||||
COPYING.LGPLv3 \
|
||||
CREDITS \
|
||||
CREDITS.chromium \
|
||||
ffmpeg_generated.gni \
|
||||
ffmpeg_options.gni \
|
||||
INSTALL.md \
|
||||
LICENSE.md \
|
||||
MAINTAINERS \
|
||||
OWNERS \
|
||||
README.chromium \
|
||||
README.md \
|
||||
RELEASE "
|
||||
|
||||
cd "$1/third_party/ffmpeg" || exit 1
|
||||
|
||||
copy_files "$generated_files" 0
|
||||
copy_files "$generated_files_headers" 0
|
||||
copy_files "$manual_files" 1
|
||||
copy_files "$other_files" 1
|
||||
copy_files "$header_files" 1
|
||||
copy_files "$mp3_files" 1
|
||||
|
||||
mkdir -p ../tmp_ffmpeg/tmp_chromium/config
|
||||
cp -r chromium/config ../tmp_ffmpeg/tmp_chromium
|
||||
|
||||
cd ../tmp_ffmpeg || exit 1
|
||||
|
||||
while IFS= read -r -d '' tmp_directory
|
||||
do
|
||||
new_name=${tmp_directory//tmp_/}
|
||||
mv "$tmp_directory" "$new_name"
|
||||
done < <(find . -type d -name 'tmp_*' -print0)
|
||||
|
||||
cd "$where" || exit 1
|
||||
|
||||
rm -rf "$1/third_party/ffmpeg"
|
||||
mv "$1/third_party/tmp_ffmpeg" "$1/third_party/ffmpeg"
|
@ -0,0 +1,82 @@
|
||||
#!/usr/bin/python3
|
||||
# Copyright 2015 Tomas Popela <tpopela@redhat.com>
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
import sys
|
||||
import re
|
||||
|
||||
def append_sources (input_sources, output_sources):
|
||||
|
||||
# Get the source files.
|
||||
source_files = re.findall(r"\"(.*?)\"", input_sources)
|
||||
output_sources += source_files
|
||||
|
||||
|
||||
def parse_sources(input_sources, output_sources, arch_not_arm):
|
||||
|
||||
# Get the type of sources in one group and sources itself in the other one.
|
||||
blocks = re.findall(r"(ffmpeg[^\s]*).*?\[(.*?)]", input_sources, re.DOTALL)
|
||||
for block in blocks:
|
||||
if (arch_not_arm):
|
||||
if not 'ffmpeg_gas_sources' in block[0]:
|
||||
append_sources (block[1], output_sources)
|
||||
else:
|
||||
append_sources (block[1], output_sources)
|
||||
|
||||
|
||||
def parse_ffmpeg_gni_file(gni_path, arch_not_arm):
|
||||
|
||||
with open(gni_path, "r") as input_file:
|
||||
content = input_file.read().replace('\n', '')
|
||||
|
||||
output_sources = []
|
||||
# Get all the sections.
|
||||
sections = re.findall(r"if (.*?})", content, re.DOTALL)
|
||||
for section in sections:
|
||||
# Get all the conditions (first group) and sources (second group) for the
|
||||
# current section.
|
||||
blocks = re.findall(r"(\(.*?\))\s\{(.*?)\}", section, re.DOTALL)
|
||||
for block in blocks:
|
||||
conditions = re.findall(r"\(?\((.*?)\)", block[0])
|
||||
inserted = False
|
||||
for condition in conditions:
|
||||
if inserted:
|
||||
break
|
||||
limitations = ['ffmpeg_branding == "Chrome"', 'ffmpeg_branding == "ChromeOS"']
|
||||
if ('use_linux_config' in condition) and not any(limitation in condition for limitation in limitations):
|
||||
if (arch_not_arm):
|
||||
if ('x64' in condition) or ('x86' in condition) or ('use_linux_config' in condition):
|
||||
parse_sources (block[1], output_sources, arch_not_arm)
|
||||
inserted = True
|
||||
else:
|
||||
parse_sources (block[1], output_sources, arch_not_arm)
|
||||
inserted = True
|
||||
|
||||
if len(output_sources) == 0:
|
||||
sys.stderr.write("Something went wrong, no sources parsed!\n")
|
||||
sys.exit(1)
|
||||
|
||||
print(' '.join(output_sources))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
path = "%s/third_party/ffmpeg/ffmpeg_generated.gni" % sys.argv[1]
|
||||
parse_ffmpeg_gni_file (path, False if sys.argv[2] == "0" else True)
|
@ -0,0 +1,121 @@
|
||||
#!/usr/bin/python
|
||||
# Copyright 2015 Tomas Popela <tpopela@redhat.com>
|
||||
# Permission is hereby granted, free of charge, to any person obtaining
|
||||
# a copy of this software and associated documentation files (the
|
||||
# "Software"), to deal in the Software without restriction, including
|
||||
# without limitation the rights to use, copy, modify, merge, publish,
|
||||
# distribute, sublicense, and/or sell copies of the Software, and to
|
||||
# permit persons to whom the Software is furnished to do so, subject to
|
||||
# the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included
|
||||
# in all copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
try:
|
||||
import argparse
|
||||
optparse = False
|
||||
except ImportError:
|
||||
from optparse import OptionParser
|
||||
optparse = True
|
||||
import locale
|
||||
import simplejson as json
|
||||
import sys
|
||||
import os
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
added = []
|
||||
|
||||
# Create the parser object
|
||||
if optparse:
|
||||
parser = OptionParser()
|
||||
parser_add_argument = parser.add_option
|
||||
else:
|
||||
parser = argparse.ArgumentParser()
|
||||
parser_add_argument = parser.add_argument
|
||||
|
||||
parser_add_argument(
|
||||
'--check',
|
||||
help='Check the tests against given SPEC file')
|
||||
parser_add_argument(
|
||||
'--spec', action='store_true',
|
||||
help='Prints the test targets in format suitable for SPEC file')
|
||||
parser_add_argument(
|
||||
'path', nargs='?', default=os.getcwd(),
|
||||
help='Path to Chromium sources')
|
||||
|
||||
# Parse the args
|
||||
if optparse:
|
||||
args, options = parser.parse_args()
|
||||
else:
|
||||
args = parser.parse_args()
|
||||
|
||||
tests_path = "%s/testing/buildbot/chromium.linux.json" % args.path
|
||||
|
||||
try:
|
||||
with open(tests_path, "r") as input_file:
|
||||
json_file = json.load(input_file)
|
||||
except IOError:
|
||||
print "Cannot find JSON file with tests in path '%s'!" % args.path
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
for test in json_file['Linux Tests']['gtest_tests']:
|
||||
if isinstance(test, dict):
|
||||
added.append(test['test'])
|
||||
else:
|
||||
added.append(test)
|
||||
|
||||
if args.check:
|
||||
removed = []
|
||||
disabled = []
|
||||
in_tests = False
|
||||
spec_file = None
|
||||
|
||||
with open(args.check) as f:
|
||||
for line in f:
|
||||
if "CHROMIUM_BROWSER_UNIT_TESTS=" in line:
|
||||
in_tests = True
|
||||
continue
|
||||
|
||||
if in_tests and line.endswith('"\n'):
|
||||
break
|
||||
|
||||
if in_tests:
|
||||
found = False
|
||||
for test in added:
|
||||
if test in line:
|
||||
if "#" in line:
|
||||
disabled.append(test)
|
||||
added.remove(test)
|
||||
found = True
|
||||
break
|
||||
if not found:
|
||||
if not "%" in line:
|
||||
removed.append(line)
|
||||
|
||||
for test in removed:
|
||||
print "REMOVED"
|
||||
print "\t" + test;
|
||||
for test in added:
|
||||
print "ADDED"
|
||||
print "\t" + test;
|
||||
for test in disabled:
|
||||
print "DISABLED"
|
||||
print "\t" + test;
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
for name in added:
|
||||
if args.spec:
|
||||
print "\t" + name + " \\"
|
||||
else:
|
||||
print name
|
@ -0,0 +1,17 @@
|
||||
{
|
||||
"homepage": "http://msvsphere.ru",
|
||||
"homepage_is_newtabpage": false,
|
||||
"distribution": {
|
||||
"alternate_shortcut_text": false,
|
||||
"oem_bubble": true,
|
||||
"chrome_shortcut_icon_index": 0,
|
||||
"create_all_shortcuts": true,
|
||||
"show_welcome_page": true,
|
||||
"system_level": false,
|
||||
"verbose_logging": false
|
||||
},
|
||||
"first_run_tabs": [
|
||||
"http://msvsphere.ru",
|
||||
"chrome://new-tab-page"
|
||||
]
|
||||
}
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue