Merge branch 'rawhide' into epel8

epel8
Than Ngo 1 year ago
commit d08b03c94e

@ -1,11 +0,0 @@
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>

@ -1,12 +0,0 @@
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.

@ -1,21 +0,0 @@
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);

@ -1,574 +0,0 @@
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.

@ -1,46 +0,0 @@
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",

@ -1,12 +0,0 @@
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();

@ -1,59 +0,0 @@
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 {

@ -1,226 +0,0 @@
commit 73e9d865abd6b636280c4bb45720af2ff2c1e374
Author: Monica Basta <msalama@chromium.org>
Date: Fri Jun 2 13:25:42 2023 +0000
[BSC]: Add BoundSessionRefreshCookieFetcher::Result
Bug: b/273920907
Change-Id: I6508dcb79592420bfa3ebe3aac872c097a303a02
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4574672
Commit-Queue: Monica Basta <msalama@chromium.org>
Reviewed-by: Alex Ilin <alexilin@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1152484}
diff --git a/chrome/browser/signin/bound_session_credentials/bound_session_cookie_controller_impl.cc b/chrome/browser/signin/bound_session_credentials/bound_session_cookie_controller_impl.cc
index 4e7e0b092a568..1c8c0110e3516 100644
--- a/chrome/browser/signin/bound_session_credentials/bound_session_cookie_controller_impl.cc
+++ b/chrome/browser/signin/bound_session_credentials/bound_session_cookie_controller_impl.cc
@@ -93,7 +93,7 @@ void BoundSessionCookieControllerImpl::MaybeRefreshCookie() {
void BoundSessionCookieControllerImpl::OnCookieRefreshFetched(
BoundSessionRefreshCookieFetcher::Result result) {
refresh_cookie_fetcher_.reset();
- if (result.net_error == net::OK && result.response_code == net::HTTP_OK) {
+ if (result == BoundSessionRefreshCookieFetcher::Result::kSuccess) {
// Requests are resumed once the cookie is set in the cookie jar. The
// cookie is expected to be fresh and `this` is notified with its
// expiration date before `OnCookieRefreshFetched` is called.
diff --git a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher.h b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher.h
index db62988635a26..f7a8b3693346f 100644
--- a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher.h
+++ b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher.h
@@ -14,10 +14,13 @@
// created per request.
class BoundSessionRefreshCookieFetcher {
public:
- struct Result {
- net::Error net_error;
- absl::optional<int> response_code;
+ enum class Result {
+ kSuccess = 0,
+ kConnectionError = 1,
+ kServerTransientError = 2,
+ kServerPersistentError = 3,
};
+
// Reports the result of the fetch request.
using RefreshCookieCompleteCallback = base::OnceCallback<void(Result)>;
diff --git a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.cc b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.cc
index 46be6f06b147a..a6f038b158311 100644
--- a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.cc
+++ b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.cc
@@ -8,6 +8,7 @@
#include "components/signin/public/base/signin_client.h"
#include "google_apis/gaia/gaia_urls.h"
+#include "net/http/http_status_code.h"
#include "net/traffic_annotation/network_traffic_annotation.h"
#include "services/network/public/cpp/resource_request.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
@@ -102,7 +103,36 @@ void BoundSessionRefreshCookieFetcherImpl::OnURLLoaderComplete(
scoped_refptr<net::HttpResponseHeaders> headers) {
net::Error net_error = static_cast<net::Error>(url_loader_->NetError());
- std::move(callback_).Run(
- Result(net_error, headers ? absl::optional<int>(headers->response_code())
- : absl::nullopt));
+ Result result = GetResultFromNetErrorAndHttpStatusCode(
+ net_error,
+ headers ? absl::optional<int>(headers->response_code()) : absl::nullopt);
+ std::move(callback_).Run(result);
+}
+
+BoundSessionRefreshCookieFetcher::Result
+BoundSessionRefreshCookieFetcherImpl::GetResultFromNetErrorAndHttpStatusCode(
+ net::Error net_error,
+ absl::optional<int> response_code) {
+ if ((net_error != net::OK &&
+ net_error != net::ERR_HTTP_RESPONSE_CODE_FAILURE) ||
+ !response_code) {
+ return BoundSessionRefreshCookieFetcher::Result::kConnectionError;
+ }
+
+ if (response_code == net::HTTP_OK) {
+ return BoundSessionRefreshCookieFetcher::Result::kSuccess;
+ }
+
+ if (response_code >= net::HTTP_INTERNAL_SERVER_ERROR) {
+ // Server error 5xx.
+ return BoundSessionRefreshCookieFetcher::Result::kServerTransientError;
+ }
+
+ if (response_code >= net::HTTP_BAD_REQUEST) {
+ // Server error 4xx.
+ return BoundSessionRefreshCookieFetcher::Result::kServerPersistentError;
+ }
+
+ // Unexpected response code.
+ return BoundSessionRefreshCookieFetcher::Result::kServerPersistentError;
}
diff --git a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.h b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.h
index 733ffbaae088c..52943f0194c32 100644
--- a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.h
+++ b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl.h
@@ -31,8 +31,14 @@ class BoundSessionRefreshCookieFetcherImpl
void Start(RefreshCookieCompleteCallback callback) override;
private:
+ FRIEND_TEST_ALL_PREFIXES(BoundSessionRefreshCookieFetcherImplTest,
+ GetResultFromNetErrorAndHttpStatusCode);
+
void StartRefreshRequest();
void OnURLLoaderComplete(scoped_refptr<net::HttpResponseHeaders> headers);
+ Result GetResultFromNetErrorAndHttpStatusCode(
+ net::Error net_error,
+ absl::optional<int> response_code);
const raw_ptr<SigninClient> client_;
const scoped_refptr<network::SharedURLLoaderFactory> url_loader_factory_;
diff --git a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl_unittest.cc b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl_unittest.cc
index d018592022d55..36ae64f83e4ee 100644
--- a/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl_unittest.cc
+++ b/chrome/browser/signin/bound_session_credentials/bound_session_refresh_cookie_fetcher_impl_unittest.cc
@@ -19,8 +19,6 @@
#include "services/network/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace {
-
class BoundSessionRefreshCookieFetcherImplTest : public ::testing::Test {
public:
BoundSessionRefreshCookieFetcherImplTest() {
@@ -55,8 +53,7 @@ TEST_F(BoundSessionRefreshCookieFetcherImplTest, Success) {
pending_request->request.url.spec(), "");
EXPECT_TRUE(future.Wait());
BoundSessionRefreshCookieFetcher::Result result = future.Get();
- EXPECT_EQ(result.net_error, net::OK);
- EXPECT_EQ(result.response_code, net::HTTP_OK);
+ EXPECT_EQ(result, BoundSessionRefreshCookieFetcher::Result::kSuccess);
}
TEST_F(BoundSessionRefreshCookieFetcherImplTest, FailureNetError) {
@@ -75,8 +72,7 @@ TEST_F(BoundSessionRefreshCookieFetcherImplTest, FailureNetError) {
EXPECT_TRUE(future.Wait());
BoundSessionRefreshCookieFetcher::Result result = future.Get();
- EXPECT_EQ(result.net_error, status.error_code);
- EXPECT_FALSE(result.response_code.has_value());
+ EXPECT_EQ(result, BoundSessionRefreshCookieFetcher::Result::kConnectionError);
}
TEST_F(BoundSessionRefreshCookieFetcherImplTest, FailureHttpError) {
@@ -93,8 +89,38 @@ TEST_F(BoundSessionRefreshCookieFetcherImplTest, FailureHttpError) {
EXPECT_TRUE(future.Wait());
BoundSessionRefreshCookieFetcher::Result result = future.Get();
- EXPECT_EQ(result.net_error, net::ERR_HTTP_RESPONSE_CODE_FAILURE);
- EXPECT_EQ(result.response_code, net::HTTP_UNAUTHORIZED);
+ EXPECT_EQ(result,
+ BoundSessionRefreshCookieFetcher::Result::kServerPersistentError);
+}
+
+TEST_F(BoundSessionRefreshCookieFetcherImplTest,
+ GetResultFromNetErrorAndHttpStatusCode) {
+ // Connection error.
+ EXPECT_EQ(fetcher_->GetResultFromNetErrorAndHttpStatusCode(
+ net::ERR_CONNECTION_TIMED_OUT, absl::nullopt),
+ BoundSessionRefreshCookieFetcher::Result::kConnectionError);
+ // net::OK.
+ EXPECT_EQ(
+ fetcher_->GetResultFromNetErrorAndHttpStatusCode(net::OK, net::HTTP_OK),
+ BoundSessionRefreshCookieFetcher::Result::kSuccess);
+ // net::ERR_HTTP_RESPONSE_CODE_FAILURE
+ EXPECT_EQ(fetcher_->GetResultFromNetErrorAndHttpStatusCode(
+ net::ERR_HTTP_RESPONSE_CODE_FAILURE, net::HTTP_BAD_REQUEST),
+ BoundSessionRefreshCookieFetcher::Result::kServerPersistentError);
+ // Persistent error.
+ EXPECT_EQ(fetcher_->GetResultFromNetErrorAndHttpStatusCode(
+ net::OK, net::HTTP_BAD_REQUEST),
+ BoundSessionRefreshCookieFetcher::Result::kServerPersistentError);
+ EXPECT_EQ(fetcher_->GetResultFromNetErrorAndHttpStatusCode(
+ net::OK, net::HTTP_NOT_FOUND),
+ BoundSessionRefreshCookieFetcher::Result::kServerPersistentError);
+ // Transient error.
+ EXPECT_EQ(fetcher_->GetResultFromNetErrorAndHttpStatusCode(
+ net::OK, net::HTTP_INTERNAL_SERVER_ERROR),
+ BoundSessionRefreshCookieFetcher::Result::kServerTransientError);
+ EXPECT_EQ(fetcher_->GetResultFromNetErrorAndHttpStatusCode(
+ net::OK, net::HTTP_GATEWAY_TIMEOUT),
+ BoundSessionRefreshCookieFetcher::Result::kServerTransientError);
}
TEST_F(BoundSessionRefreshCookieFetcherImplTest, NetworkDelayed) {
@@ -114,5 +140,3 @@ TEST_F(BoundSessionRefreshCookieFetcherImplTest, NetworkDelayed) {
EXPECT_TRUE(future.Wait());
}
-
-} // namespace
diff --git a/chrome/browser/signin/bound_session_credentials/fake_bound_session_refresh_cookie_fetcher.cc b/chrome/browser/signin/bound_session_credentials/fake_bound_session_refresh_cookie_fetcher.cc
index b4b1a07e687cb..fcfa9305d04e9 100644
--- a/chrome/browser/signin/bound_session_credentials/fake_bound_session_refresh_cookie_fetcher.cc
+++ b/chrome/browser/signin/bound_session_credentials/fake_bound_session_refresh_cookie_fetcher.cc
@@ -51,7 +51,8 @@ void FakeBoundSessionRefreshCookieFetcher::SimulateCompleteRefreshRequest(
// Synchronous since tests use `BoundSessionTestCookieManager`.
OnRefreshCookieCompleted(CreateFakeCookie(cookie_expiration.value()));
} else {
- std::move(callback_).Run(Result(net::Error::OK, net::HTTP_FORBIDDEN));
+ std::move(callback_).Run(
+ BoundSessionRefreshCookieFetcher::Result::kServerPersistentError);
}
}
@@ -83,9 +84,11 @@ void FakeBoundSessionRefreshCookieFetcher::OnCookieSet(
net::CookieAccessResult access_result) {
bool success = access_result.status.IsInclude();
if (!success) {
- std::move(callback_).Run(Result(net::Error::OK, net::HTTP_FORBIDDEN));
+ std::move(callback_).Run(
+ BoundSessionRefreshCookieFetcher::Result::kServerPersistentError);
} else {
- std::move(callback_).Run(Result(net::Error::OK, net::HTTP_OK));
+ std::move(callback_).Run(
+ BoundSessionRefreshCookieFetcher::Result::kSuccess);
}
// |This| may be destroyed
}

@ -1,22 +0,0 @@
diff -up chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc.me chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc
--- chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc.me 2023-06-18 12:33:52.387412788 +0200
+++ chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc 2023-06-18 12:35:28.229148935 +0200
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "skia/ext/skcolorspace_trfn.h"
+#include <cmath>
namespace skia {
diff -up chromium-115.0.5790.32/net/cert/pki/verify_name_match.h.me chromium-115.0.5790.32/net/cert/pki/verify_name_match.h
--- chromium-115.0.5790.32/net/cert/pki/verify_name_match.h.me 2023-06-18 14:23:13.847725775 +0200
+++ chromium-115.0.5790.32/net/cert/pki/verify_name_match.h 2023-06-18 14:23:41.637221117 +0200
@@ -6,6 +6,7 @@
#define NET_CERT_PKI_VERIFY_NAME_MATCH_H_
#include <string>
+#include <vector>
#include "net/base/net_export.h"

@ -1,289 +0,0 @@
commit b2c4ff8d5d8cdbf2487363a5b8d68b6485706069
Author: Richard Townsend <Richard.Townsend@arm.com>
Date: Thu May 18 22:51:36 2023 +0000
Reland "Reland "mte: refactor the tagging functions to use ifuncs""
This is a reland of commit 2321ea383c006149c3b496a515f54fb3aebdc34c
and a revert of commit adfb1c2c6ceb3daf210cef1e5688541ebc561e20. It
was reverted because of a problem with android-arm64 orderfile
generation, which is now resolved.
Original change's description:
> Reland "mte: refactor the tagging functions to use ifuncs"
>
> This was reverted due to a toolchain problem affecting ThinLTO,
> resolved in [1]
>
> [1] https://reviews.llvm.org/D144982
>
> This reverts commit 6c22e41fc3ffd305359f17b2423c37c2c976acf3.
>
> Bug: 1137393
> Change-Id: I991e12618f98cdf8b89ec83cad06e30ad60d332e
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4473870
> Reviewed-by: Keishi Hattori <keishi@chromium.org>
> Commit-Queue: Richard Townsend <richard.townsend@arm.com>
> Cr-Commit-Position: refs/heads/main@{#1135862}
Bug: 1137393, 1440531
Change-Id: I4cd1911a36cf55ee1c06e6ffda971866c93fa741
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4517702
Commit-Queue: Richard Townsend <richard.townsend@arm.com>
Reviewed-by: Keishi Hattori <keishi@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1146244}
diff --git a/base/allocator/partition_allocator/partition_root.cc b/base/allocator/partition_allocator/partition_root.cc
index 486594e81f823..8ab37f6dec750 100644
--- a/base/allocator/partition_allocator/partition_root.cc
+++ b/base/allocator/partition_allocator/partition_root.cc
@@ -869,10 +869,6 @@ void PartitionRoot<thread_safe>::Init(PartitionOptions opts) {
return;
}
- // Swaps out the active no-op tagging intrinsics with MTE-capable ones, if
- // running on the right hardware.
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
-
#if BUILDFLAG(HAS_64_BIT_POINTERS)
// Reserve address space for partition alloc.
internal::PartitionAddressSpace::Init();
diff --git a/base/allocator/partition_allocator/tagging.cc b/base/allocator/partition_allocator/tagging.cc
index a8a74155de4e1..ea7ac2af82c88 100644
--- a/base/allocator/partition_allocator/tagging.cc
+++ b/base/allocator/partition_allocator/tagging.cc
@@ -12,7 +12,9 @@
#if PA_CONFIG(HAS_MEMORY_TAGGING)
#include <arm_acle.h>
+#include <asm/hwcap.h>
#include <sys/auxv.h>
+#include <sys/ifunc.h>
#include <sys/prctl.h>
#define PR_SET_TAGGED_ADDR_CTRL 55
#define PR_GET_TAGGED_ADDR_CTRL 56
@@ -119,12 +121,6 @@ namespace {
return ret;
}
-#if PA_CONFIG(HAS_MEMORY_TAGGING)
-static bool HasCPUMemoryTaggingExtension() {
- return base::CPU::GetInstanceNoAllocation().has_mte();
-}
-#endif // PA_CONFIG(HAS_MEMORY_TAGGING)
-
#if PA_CONFIG(HAS_MEMORY_TAGGING)
void* TagRegionRandomlyForMTE(void* ptr, size_t sz, uint64_t mask) {
// Randomly tag a region (MTE-enabled systems only). The first 16-byte
@@ -166,7 +162,6 @@ void* RemaskVoidPtrForMTE(void* ptr) {
}
return nullptr;
}
-#endif
void* TagRegionIncrementNoOp(void* ptr, size_t sz) {
// Region parameters are checked even on non-MTE systems to check the
@@ -183,24 +178,49 @@ void* TagRegionRandomlyNoOp(void* ptr, size_t sz, uint64_t mask) {
void* RemaskVoidPtrNoOp(void* ptr) {
return ptr;
}
+#endif
} // namespace
-void InitializeMTESupportIfNeeded() {
#if PA_CONFIG(HAS_MEMORY_TAGGING)
- if (HasCPUMemoryTaggingExtension()) {
- global_remask_void_ptr_fn = RemaskVoidPtrForMTE;
- global_tag_memory_range_increment_fn = TagRegionIncrementForMTE;
- global_tag_memory_range_randomly_fn = TagRegionRandomlyForMTE;
+using RemaskPtrInternalFn = void*(void* ptr);
+using TagMemoryRangeIncrementInternalFn = void*(void* ptr, size_t size);
+
+using TagMemoryRangeRandomlyInternalFn = void*(void* ptr,
+ size_t size,
+ uint64_t mask);
+
+extern "C" TagMemoryRangeIncrementInternalFn(
+ *ResolveTagMemoryRangeIncrement(uint64_t hwcap, struct __ifunc_arg_t* hw)) {
+ if ((hwcap & _IFUNC_ARG_HWCAP) && (hw->_hwcap2 & HWCAP2_MTE)) {
+ return TagRegionIncrementForMTE;
}
-#endif
+ return TagRegionIncrementNoOp;
+}
+
+extern "C" TagMemoryRangeRandomlyInternalFn(
+ *ResolveTagMemoryRandomly(uint64_t hwcap, struct __ifunc_arg_t* hw)) {
+ if ((hwcap & _IFUNC_ARG_HWCAP) && (hw->_hwcap2 & HWCAP2_MTE)) {
+ return TagRegionRandomlyForMTE;
+ }
+ return TagRegionRandomlyNoOp;
+}
+
+extern "C" RemaskPtrInternalFn(
+ *ResolveRemaskPointer(uint64_t hwcap, struct __ifunc_arg_t* hw)) {
+ if ((hwcap & _IFUNC_ARG_HWCAP) && (hw->_hwcap2 & HWCAP2_MTE)) {
+ return RemaskVoidPtrForMTE;
+ }
+ return RemaskVoidPtrNoOp;
}
-RemaskPtrInternalFn* global_remask_void_ptr_fn = RemaskVoidPtrNoOp;
-TagMemoryRangeIncrementInternalFn* global_tag_memory_range_increment_fn =
- TagRegionIncrementNoOp;
-TagMemoryRangeRandomlyInternalFn* global_tag_memory_range_randomly_fn =
- TagRegionRandomlyNoOp;
+void* TagMemoryRangeIncrementInternal(void* ptr, size_t size)
+ __attribute__((ifunc("ResolveTagMemoryRangeIncrement")));
+void* TagMemoryRangeRandomlyInternal(void* ptr, size_t size, uint64_t mask)
+ __attribute__((ifunc("ResolveTagMemoryRandomly")));
+void* RemaskPointerInternal(void* ptr)
+ __attribute__((ifunc("ResolveRemaskPointer")));
+#endif // PA_CONFIG(HAS_MEMORY_TAGGING)
TagViolationReportingMode GetMemoryTaggingModeForCurrentThread() {
#if PA_CONFIG(HAS_MEMORY_TAGGING)
diff --git a/base/allocator/partition_allocator/tagging.h b/base/allocator/partition_allocator/tagging.h
index af914452b1162..d49e062ce6319 100644
--- a/base/allocator/partition_allocator/tagging.h
+++ b/base/allocator/partition_allocator/tagging.h
@@ -55,32 +55,16 @@ void ChangeMemoryTaggingModeForAllThreadsPerProcess(TagViolationReportingMode);
PA_COMPONENT_EXPORT(PARTITION_ALLOC)
TagViolationReportingMode GetMemoryTaggingModeForCurrentThread();
-// Called by the partition allocator after initial startup, this detects MTE
-// support in the current CPU and replaces the active tagging intrinsics with
-// MTE versions if needed.
-PA_COMPONENT_EXPORT(PARTITION_ALLOC) void InitializeMTESupportIfNeeded();
-
-// These global function pointers hold the implementations of the tagging
-// intrinsics (TagMemoryRangeRandomly, TagMemoryRangeIncrement, RemaskPtr).
-// They are designed to be callable without taking a branch. They are initially
-// set to no-op functions in tagging.cc, but can be replaced with MTE-capable
-// ones through InitializeMTEIfNeeded(). This is conceptually similar to an
-// IFUNC, even though less secure. These function pointers were introduced to
-// support older Android releases. With the removal of support for Android M,
-// it became possible to use IFUNC instead.
-// TODO(bartekn): void* -> uintptr_t
-using RemaskPtrInternalFn = void*(void* ptr);
-using TagMemoryRangeIncrementInternalFn = void*(void* ptr, size_t size);
-
-using TagMemoryRangeRandomlyInternalFn = void*(void* ptr,
- size_t size,
- uint64_t mask);
-extern PA_COMPONENT_EXPORT(PARTITION_ALLOC)
- TagMemoryRangeRandomlyInternalFn* global_tag_memory_range_randomly_fn;
-extern PA_COMPONENT_EXPORT(PARTITION_ALLOC)
- TagMemoryRangeIncrementInternalFn* global_tag_memory_range_increment_fn;
-extern PA_COMPONENT_EXPORT(PARTITION_ALLOC)
- RemaskPtrInternalFn* global_remask_void_ptr_fn;
+// These forward-defined functions do not really exist in tagging.cc, they're resolved
+// by the dynamic linker to MTE-capable versions on the right hardware.
+#if PA_CONFIG(HAS_MEMORY_TAGGING)
+PA_COMPONENT_EXPORT(PARTITION_ALLOC)
+void* TagMemoryRangeIncrementInternal(void* ptr, size_t size);
+PA_COMPONENT_EXPORT(PARTITION_ALLOC)
+void* TagMemoryRangeRandomlyInternal(void* ptr, size_t size, uint64_t mask);
+PA_COMPONENT_EXPORT(PARTITION_ALLOC)
+void* RemaskPointerInternal(void* ptr);
+#endif
// Increments the tag of the memory range ptr. Useful for provable revocations
// (e.g. free). Returns the pointer with the new tag. Ensures that the entire
@@ -90,7 +74,7 @@ extern PA_COMPONENT_EXPORT(PARTITION_ALLOC)
template <typename T>
PA_ALWAYS_INLINE T* TagMemoryRangeIncrement(T* ptr, size_t size) {
#if PA_CONFIG(HAS_MEMORY_TAGGING)
- return reinterpret_cast<T*>(global_tag_memory_range_increment_fn(ptr, size));
+ return reinterpret_cast<T*>(TagMemoryRangeIncrementInternal(ptr, size));
#else
return ptr;
#endif
@@ -108,8 +92,7 @@ PA_ALWAYS_INLINE T* TagMemoryRangeRandomly(T* ptr,
size_t size,
uint64_t mask = 0u) {
#if PA_CONFIG(HAS_MEMORY_TAGGING)
- return reinterpret_cast<T*>(
- global_tag_memory_range_randomly_fn(ptr, size, mask));
+ return reinterpret_cast<T*>(TagMemoryRangeRandomlyInternal(ptr, size, mask));
#else
return ptr;
#endif
@@ -124,7 +107,7 @@ PA_ALWAYS_INLINE void* TagMemoryRangeRandomly(uintptr_t ptr,
template <typename T>
PA_ALWAYS_INLINE T* TagPtr(T* ptr) {
#if PA_CONFIG(HAS_MEMORY_TAGGING)
- return reinterpret_cast<T*>(global_remask_void_ptr_fn(ptr));
+ return reinterpret_cast<T*>(RemaskPointerInternal(ptr));
#else
return ptr;
#endif
diff --git a/base/allocator/partition_allocator/tagging_unittest.cc b/base/allocator/partition_allocator/tagging_unittest.cc
index f3b8532a8f1f4..47f62ac000b43 100644
--- a/base/allocator/partition_allocator/tagging_unittest.cc
+++ b/base/allocator/partition_allocator/tagging_unittest.cc
@@ -16,7 +16,6 @@ namespace partition_alloc::internal {
// Check whether we can call the tagging intrinsics safely on all architectures.
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeRandomlySafe) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
PageAccessibilityConfiguration(
@@ -32,7 +31,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeRandomlySafe) {
}
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementSafe) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
@@ -54,7 +52,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementSafe) {
#if defined(ARCH_CPU_64_BITS)
// Size / alignment constraints are only enforced on 64-bit architectures.
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeBadSz) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
@@ -71,7 +68,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeBadSz) {
}
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeRandomlyNoSz) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
@@ -87,7 +83,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeRandomlyNoSz) {
}
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeRandomlyBadAlign) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
@@ -104,7 +99,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeRandomlyBadAlign) {
}
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementBadSz) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
@@ -120,7 +114,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementBadSz) {
}
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementNoSz) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),
@@ -136,7 +129,6 @@ TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementNoSz) {
}
TEST(PartitionAllocMemoryTaggingTest, TagMemoryRangeIncrementBadAlign) {
- ::partition_alloc::internal::InitializeMTESupportIfNeeded();
base::CPU cpu;
uintptr_t buffer =
AllocPages(PageAllocationGranularity(), PageAllocationGranularity(),

@ -1,36 +0,0 @@
diff -up chromium-115.0.5790.24/net/filter/brotli_source_stream.cc.system-brotli chromium-115.0.5790.24/net/filter/brotli_source_stream.cc
--- chromium-115.0.5790.24/net/filter/brotli_source_stream.cc.system-brotli 2023-06-07 21:48:38.000000000 +0200
+++ chromium-115.0.5790.24/net/filter/brotli_source_stream.cc 2023-06-17 14:42:19.734299929 +0200
@@ -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-115.0.5790.24/net/ssl/cert_compression.cc.system-brotli chromium-115.0.5790.24/net/ssl/cert_compression.cc
--- chromium-115.0.5790.24/net/ssl/cert_compression.cc.system-brotli 2023-06-07 21:48:38.000000000 +0200
+++ chromium-115.0.5790.24/net/ssl/cert_compression.cc 2023-06-17 14:42:19.734299929 +0200
@@ -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-115.0.5790.24/ui/base/resource/resource_bundle.cc.system-brotli chromium-115.0.5790.24/ui/base/resource/resource_bundle.cc
--- chromium-115.0.5790.24/ui/base/resource/resource_bundle.cc.system-brotli 2023-06-17 14:42:19.734299929 +0200
+++ chromium-115.0.5790.24/ui/base/resource/resource_bundle.cc 2023-06-17 14:44:18.591002119 +0200
@@ -32,7 +32,7 @@
#include "net/filter/gzip_header.h"
#include "skia/ext/image_operations.h"
#include "third_party/abseil-cpp/absl/types/variant.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"

@ -1,31 +0,0 @@
commit 8f46ad499d8f8afd56bf5c82cbbcad67285ed8aa
Author: Phan Quang Minh <phanquangminh217@gmail.com>
Date: Wed May 24 10:13:45 2023 +0000
ozone/wayland: Load default cursor theme if theme name is empty
We might need to load the cursor theme even if `OnCursorThemeName` never
gets called (e.g. Qt theme backend). In this case we will need to load
the default theme by passing `NULL` to wl_cursor_theme_load.
Change-Id: I0e1814178319734a4d0fe7574cdc8c7a1d1cf7a5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4553659
Reviewed-by: Antonio Gomes <tonikitoo@igalia.com>
Reviewed-by: Maksim Sisov <msisov@igalia.com>
Commit-Queue: Maksim Sisov <msisov@igalia.com>
Cr-Commit-Position: refs/heads/main@{#1148441}
diff --git a/ui/ozone/platform/wayland/host/wayland_cursor_factory.cc b/ui/ozone/platform/wayland/host/wayland_cursor_factory.cc
index 9ab12b1994c68..11b162554abc8 100644
--- a/ui/ozone/platform/wayland/host/wayland_cursor_factory.cc
+++ b/ui/ozone/platform/wayland/host/wayland_cursor_factory.cc
@@ -230,7 +230,8 @@ void WaylandCursorFactory::MaybeLoadThemeCursors() {
base::ThreadPool::PostTaskAndReplyWithResult(
FROM_HERE,
{base::MayBlock(), base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN},
- base::BindOnce(wl_cursor_theme_load, name_.c_str(), GetCacheKey(),
+ base::BindOnce(wl_cursor_theme_load,
+ name_.empty() ? nullptr : name_.c_str(), GetCacheKey(),
connection_->buffer_factory()->shm()),
base::BindOnce(&WaylandCursorFactory::OnThemeLoaded,
weak_factory_.GetWeakPtr(), name_, size_));

@ -0,0 +1,14 @@
diff -up chromium-116.0.5845.50/base/allocator/partition_allocator/partition_alloc_config.h.me chromium-116.0.5845.50/base/allocator/partition_allocator/partition_alloc_config.h
--- chromium-116.0.5845.50/base/allocator/partition_allocator/partition_alloc_config.h.me 2023-07-30 15:13:45.873427874 +0200
+++ chromium-116.0.5845.50/base/allocator/partition_allocator/partition_alloc_config.h 2023-07-30 15:15:31.393181400 +0200
@@ -150,9 +150,7 @@ static_assert(sizeof(void*) != 8, "");
(!BUILDFLAG(PUT_REF_COUNT_IN_PREVIOUS_SLOT) && \
defined(ARCH_CPU_LITTLE_ENDIAN))
-#define PA_CONFIG_HAS_MEMORY_TAGGING() \
- (defined(ARCH_CPU_ARM64) && defined(__clang__) && \
- (BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_ANDROID)))
+#define PA_CONFIG_HAS_MEMORY_TAGGING() 0
#if PA_CONFIG(HAS_MEMORY_TAGGING)
static_assert(sizeof(void*) == 8);

@ -1,3 +1,14 @@
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>
diff -up chromium-109.0.5414.74/base/check_op.h.me chromium-109.0.5414.74/base/check_op.h 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.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 +++ chromium-109.0.5414.74/base/check_op.h 2023-01-17 17:39:42.546060957 +0100
@ -20,17 +31,6 @@ diff -up chromium-109.0.5414.74/base/debug/profiler.h.me chromium-109.0.5414.74/
#include <string> #include <string>
#include "base/base_export.h" #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 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.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 +++ chromium-109.0.5414.74/gpu/config/gpu_feature_info.h 2023-01-17 19:07:08.874849879 +0100
@ -320,17 +320,6 @@ diff -up chromium-109.0.5414.74/third_party/pdfium/constants/annotation_flags.h.
namespace pdfium { namespace pdfium {
namespace annotation_flags { 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 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.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 +++ 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
@ -376,3 +365,115 @@ diff -up chromium-113.0.5672.53/chrome/test/chromedriver/chrome/web_view_impl.cc
#include "base/check.h" #include "base/check.h"
#include "base/files/file_path.h" #include "base/files/file_path.h"
diff -up chromium-116.0.5845.50/components/bookmarks/common/url_load_stats.h.me chromium-116.0.5845.50/components/bookmarks/common/url_load_stats.h
--- chromium-116.0.5845.50/components/bookmarks/common/url_load_stats.h.me 2023-08-01 15:07:06.940881439 +0200
+++ chromium-116.0.5845.50/components/bookmarks/common/url_load_stats.h 2023-08-01 15:09:29.301537450 +0200
@@ -5,6 +5,7 @@
#ifndef COMPONENTS_BOOKMARKS_COMMON_URL_LOAD_STATS_H_
#define COMPONENTS_BOOKMARKS_COMMON_URL_LOAD_STATS_H_
+#include <cstddef>
#include <cstdint>
#include <vector>
diff -up chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h
--- chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me 2023-07-30 19:44:54.718846606 +0200
+++ chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h 2023-07-30 19:45:14.829249467 +0200
@@ -8,6 +8,7 @@
#include <array>
#include <memory>
#include <utility>
+#include <variant>
#include "base/dcheck_is_on.h"
#include "base/memory/ptr_util.h"
diff -up chromium-116.0.5845.50/chrome/browser/ui/profile_view_utils.h.me chromium-116.0.5845.50/chrome/browser/ui/profile_view_utils.h
--- chromium-116.0.5845.50/chrome/browser/ui/profile_view_utils.h.me 2023-07-31 13:40:18.171175385 +0200
+++ chromium-116.0.5845.50/chrome/browser/ui/profile_view_utils.h 2023-07-31 13:43:38.185244234 +0200
@@ -7,6 +7,7 @@
#include <string>
#include <utility>
+#include <vector>
class Profile;
class ProfileAttributesEntry;
diff -up chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc.me chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc
--- chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc.me 2023-06-18 12:33:52.387412788 +0200
+++ chromium-115.0.5790.32/skia/ext/skcolorspace_trfn.cc 2023-06-18 12:35:28.229148935 +0200
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "skia/ext/skcolorspace_trfn.h"
+#include <cmath>
namespace skia {
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);
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/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>
diff -up chromium-116.0.5845.96/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc.me chromium-116.0.5845.96/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc
--- chromium-116.0.5845.96/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc.me 2023-08-15 10:42:54.732984421 +0200
+++ chromium-116.0.5845.96/third_party/abseil-cpp/absl/debugging/internal/stacktrace_aarch64-inl.inc 2023-08-15 10:43:31.125950897 +0200
@@ -13,6 +13,7 @@
#include <cassert>
#include <cstdint>
#include <iostream>
+#include <limits>
#include "absl/base/attributes.h"
#include "absl/debugging/internal/address_is_readable.h"

@ -0,0 +1,364 @@
diff -up chromium-116.0.5845.50/net/dns/host_resolver_cache.cc.me chromium-116.0.5845.50/net/dns/host_resolver_cache.cc
--- chromium-116.0.5845.50/net/dns/host_resolver_cache.cc.me
+++ chromium-116.0.5845.50/net/dns/host_resolver_cache.cc
@@ -161,7 +161,7 @@ void HostResolverCache::Set(
std::string domain_name = result->domain_name();
entries_.emplace(
- Key(std::move(domain_name), network_anonymization_key),
+ Key{std::move(domain_name), network_anonymization_key},
Entry(std::move(result), source, secure, staleness_generation_));
if (entries_.size() > max_entries_) {
diff -up chromium-116.0.5845.50/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.me chromium-116.0.5845.50/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc
--- chromium-116.0.5845.50/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc.me 2023-08-02 15:17:52.613858423 +0200
+++ chromium-116.0.5845.50/components/viz/service/display_embedder/skia_output_surface_impl_on_gpu.cc 2023-08-02 15:18:43.269790877 +0200
@@ -1496,7 +1496,7 @@ void SkiaOutputSurfaceImplOnGpu::CopyOut
// Issue readbacks from the surfaces:
for (size_t i = 0; i < CopyOutputResult::kNV12MaxPlanes; ++i) {
- SkISize size(plane_surfaces[i]->width(), plane_surfaces[i]->height());
+ SkISize size{plane_surfaces[i]->width(), plane_surfaces[i]->height()};
SkImageInfo dst_info = SkImageInfo::Make(
size, (i == 0) ? kAlpha_8_SkColorType : kR8G8_unorm_SkColorType,
kUnpremul_SkAlphaType);
diff -up chromium-116.0.5845.50/third_party/blink/renderer/platform/fonts/palette_interpolation.cc.me chromium-116.0.5845.50/third_party/blink/renderer/platform/fonts/palette_interpolation.cc
--- chromium-116.0.5845.50/third_party/blink/renderer/platform/fonts/palette_interpolation.cc.me 2023-08-02 21:32:14.195705494 +0200
+++ chromium-116.0.5845.50/third_party/blink/renderer/platform/fonts/palette_interpolation.cc 2023-08-02 21:59:08.156532934 +0200
@@ -31,7 +31,7 @@ Vector<FontPalette::FontPaletteOverride>
color_interpolation_space, hue_interpolation_method, start_color,
end_color, percentage, alpha_multiplier);
- FontPalette::FontPaletteOverride result_color_record(i, result_color);
+ FontPalette::FontPaletteOverride result_color_record{static_cast<int>(i), result_color};
result_color_records.push_back(result_color_record);
}
return result_color_records;
diff -up chromium-116.0.5845.50/ui/base/wayland/color_manager_util.h.me chromium-116.0.5845.50/ui/base/wayland/color_manager_util.h
--- chromium-116.0.5845.50/ui/base/wayland/color_manager_util.h.me 2023-08-03 08:27:11.371750178 +0200
+++ chromium-116.0.5845.50/ui/base/wayland/color_manager_util.h 2023-08-03 10:39:07.266989323 +0200
@@ -52,53 +52,53 @@ constexpr auto kChromaticityMap = base::
zcr_color_manager_v1_chromaticity_names,
PrimaryVersion>(
{{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT601_525_LINE,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::SMPTE170M,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::SMPTE170M,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT601_625_LINE,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT470BG,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT470BG,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE170M,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::SMPTE170M,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::SMPTE170M,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT709,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT2020,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT2020, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT2020, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SRGB,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::BT709, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_DISPLAYP3,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::P3, kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::P3, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_ADOBERGB,
- PrimaryVersion(gfx::ColorSpace::PrimaryID::ADOBE_RGB,
- kDefaultSinceVersion)},
+ PrimaryVersion{gfx::ColorSpace::PrimaryID::ADOBE_RGB,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::WIDE_GAMUT_COLOR_SPIN,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_WIDE_GAMUT_COLOR_SPIN_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::BT470M,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_BT470M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::SMPTE240M,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTE240M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::XYZ_D50,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_XYZ_D50_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::SMPTEST428_1,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST428_1_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::SMPTEST431_2,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_SMPTEST431_2_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM,
- PrimaryVersion(
+ PrimaryVersion{
gfx::ColorSpace::PrimaryID::FILM,
- ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM_SINCE_VERSION)}});
+ ZCR_COLOR_MANAGER_V1_CHROMATICITY_NAMES_FILM_SINCE_VERSION}}});
// A map from the zcr_color_manager_v1 eotf_names enum values
// representing well-known EOTFs, to their equivalent TransferIDs.
@@ -107,65 +107,65 @@ constexpr auto kEotfMap = base::MakeFixe
zcr_color_manager_v1_eotf_names,
TransferVersion>({
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
- TransferVersion(gfx::ColorSpace::TransferID::LINEAR,
- kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::LINEAR,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB,
- TransferVersion(gfx::ColorSpace::TransferID::SRGB, kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::SRGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709,
- TransferVersion(gfx::ColorSpace::TransferID::BT709,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT709,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2087,
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA24,
- kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA24,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_ADOBERGB,
// This is ever so slightly inaccurate. The number ought to be
// 2.19921875f, not 2.2
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA22,
- kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA22,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_PQ,
- TransferVersion(gfx::ColorSpace::TransferID::PQ, kDefaultSinceVersion)},
+ TransferVersion{gfx::ColorSpace::TransferID::PQ, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG,
- TransferVersion(gfx::ColorSpace::TransferID::HLG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::HLG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M,
- TransferVersion(gfx::ColorSpace::TransferID::SMPTE170M,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::SMPTE170M,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE170M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M,
- TransferVersion(gfx::ColorSpace::TransferID::SMPTE240M,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::SMPTE240M,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTE240M_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1,
- TransferVersion(
+ TransferVersion{
gfx::ColorSpace::TransferID::SMPTEST428_1,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SMPTEST428_1_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG,
- TransferVersion(gfx::ColorSpace::TransferID::LOG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::LOG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT,
- TransferVersion(gfx::ColorSpace::TransferID::LOG_SQRT,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::LOG_SQRT,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LOG_SQRT_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4,
- TransferVersion(
+ TransferVersion{
gfx::ColorSpace::TransferID::IEC61966_2_4,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_IEC61966_2_4_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG,
- TransferVersion(gfx::ColorSpace::TransferID::BT1361_ECG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT1361_ECG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT1361_ECG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10,
- TransferVersion(gfx::ColorSpace::TransferID::BT2020_10,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT2020_10,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_10_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12,
- TransferVersion(gfx::ColorSpace::TransferID::BT2020_12,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::BT2020_12,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2020_12_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS,
- TransferVersion(
+ TransferVersion{
gfx::ColorSpace::TransferID::SCRGB_LINEAR_80_NITS,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SCRGB_LINEAR_80_NITS_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18,
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA18,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA18,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA18_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28,
- TransferVersion(gfx::ColorSpace::TransferID::GAMMA28,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28_SINCE_VERSION)},
+ TransferVersion{gfx::ColorSpace::TransferID::GAMMA28,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_GAMMA28_SINCE_VERSION}},
});
// A map from the SDR zcr_color_manager_v1 eotf_names enum values
@@ -174,18 +174,18 @@ constexpr auto kEotfMap = base::MakeFixe
constexpr auto kTransferMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_eotf_names, TransferFnVersion>({
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
- TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFn::kLinear, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB,
- TransferFnVersion(SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709,
- TransferFnVersion(
+ TransferFnVersion{
SkNamedTransferFnExt::kRec709,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT709_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_BT2087,
- TransferFnVersion(gamma24, kDefaultSinceVersion)},
+ TransferFnVersion{gamma24, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_ADOBERGB,
- TransferFnVersion(SkNamedTransferFnExt::kA98RGB,
- kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFnExt::kA98RGB,
+ kDefaultSinceVersion}},
});
// A map from the HDR zcr_color_manager_v1 eotf_names enum values
@@ -194,68 +194,68 @@ constexpr auto kTransferMap =
constexpr auto kHDRTransferMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_eotf_names, TransferFnVersion>(
{{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_LINEAR,
- TransferFnVersion(SkNamedTransferFn::kLinear, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFn::kLinear, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_SRGB,
- TransferFnVersion(SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFnExt::kSRGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_PQ,
- TransferFnVersion(SkNamedTransferFn::kPQ, kDefaultSinceVersion)},
+ TransferFnVersion{SkNamedTransferFn::kPQ, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG,
- TransferFnVersion(SkNamedTransferFn::kHLG,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION)},
+ TransferFnVersion{SkNamedTransferFn::kHLG,
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_HLG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10,
- TransferFnVersion(
+ TransferFnVersion{
SkNamedTransferFnExt::kSRGBExtended1023Over510,
- ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10_SINCE_VERSION)}});
+ ZCR_COLOR_MANAGER_V1_EOTF_NAMES_EXTENDEDSRGB10_SINCE_VERSION}}});
// A map from zcr_color_manager_v1 matrix_names enum values to
// gfx::ColorSpace::MatrixIDs.
constexpr auto kMatrixMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_matrix_names, MatrixVersion>(
{{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_RGB,
- MatrixVersion(gfx::ColorSpace::MatrixID::RGB, kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::RGB, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT709,
- MatrixVersion(gfx::ColorSpace::MatrixID::BT709,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::BT709,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG,
- MatrixVersion(
+ MatrixVersion{
gfx::ColorSpace::MatrixID::BT470BG,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG_SINCE_VERSION)},
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT470BG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT2020_NCL,
- MatrixVersion(gfx::ColorSpace::MatrixID::BT2020_NCL,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::BT2020_NCL,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_BT2020_CL,
- MatrixVersion(gfx::ColorSpace::MatrixID::BT2020_CL,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::BT2020_CL,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_FCC,
- MatrixVersion(gfx::ColorSpace::MatrixID::FCC, kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::FCC, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG,
- MatrixVersion(gfx::ColorSpace::MatrixID::YCOCG,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG_SINCE_VERSION)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::YCOCG,
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YCOCG_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX,
- MatrixVersion(gfx::ColorSpace::MatrixID::YDZDX,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX_SINCE_VERSION)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::YDZDX,
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_YDZDX_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR,
- MatrixVersion(gfx::ColorSpace::MatrixID::GBR,
- ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR_SINCE_VERSION)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::GBR,
+ ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_GBR_SINCE_VERSION}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_SMPTE170M,
- MatrixVersion(gfx::ColorSpace::MatrixID::SMPTE170M,
- kDefaultSinceVersion)},
+ MatrixVersion{gfx::ColorSpace::MatrixID::SMPTE170M,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_MATRIX_NAMES_SMPTE240M,
- MatrixVersion(gfx::ColorSpace::MatrixID::SMPTE240M,
- kDefaultSinceVersion)}});
+ MatrixVersion{gfx::ColorSpace::MatrixID::SMPTE240M,
+ kDefaultSinceVersion}}});
// A map from zcr_color_manager_v1 range_names enum values to
// gfx::ColorSpace::RangeIDs.
constexpr auto kRangeMap =
base::MakeFixedFlatMap<zcr_color_manager_v1_range_names, RangeVersion>(
{{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_LIMITED,
- RangeVersion(gfx::ColorSpace::RangeID::LIMITED,
- kDefaultSinceVersion)},
+ RangeVersion{gfx::ColorSpace::RangeID::LIMITED,
+ kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_FULL,
- RangeVersion(gfx::ColorSpace::RangeID::FULL, kDefaultSinceVersion)},
+ RangeVersion{gfx::ColorSpace::RangeID::FULL, kDefaultSinceVersion}},
{ZCR_COLOR_MANAGER_V1_RANGE_NAMES_DERIVED,
- RangeVersion(gfx::ColorSpace::RangeID::DERIVED,
- kDefaultSinceVersion)}});
+ RangeVersion{gfx::ColorSpace::RangeID::DERIVED,
+ kDefaultSinceVersion}}});
zcr_color_manager_v1_chromaticity_names ToColorManagerChromaticity(
gfx::ColorSpace::PrimaryID primaryID,
diff -up chromium-116.0.5845.50/chrome/browser/ui/omnibox/chrome_omnibox_client.cc.me chromium-116.0.5845.50/chrome/browser/ui/omnibox/chrome_omnibox_client.cc
--- chromium-116.0.5845.50/chrome/browser/ui/omnibox/chrome_omnibox_client.cc.me 2023-08-03 13:23:33.748394615 +0200
+++ chromium-116.0.5845.50/chrome/browser/ui/omnibox/chrome_omnibox_client.cc 2023-08-03 13:25:01.140489840 +0200
@@ -470,10 +470,10 @@ void ChromeOmniboxClient::OnAutocomplete
alternative_nav_match);
// Store the details necessary to open the omnibox match via browser commands.
- location_bar_->set_navigation_params(LocationBar::NavigationParams(
+ location_bar_->set_navigation_params(LocationBar::NavigationParams{
destination_url, disposition, transition, match_selection_timestamp,
destination_url_entered_without_scheme,
- destination_url_entered_with_http_scheme));
+ destination_url_entered_with_http_scheme});
if (browser_) {
auto navigation = chrome::OpenCurrentURL(browser_);

@ -0,0 +1,38 @@
diff -up chromium-116.0.5845.50/net/filter/brotli_source_stream.cc.system-brotli chromium-116.0.5845.50/net/filter/brotli_source_stream.cc
--- chromium-116.0.5845.50/net/filter/brotli_source_stream.cc.system-brotli 2023-07-30 13:06:06.284705823 +0200
+++ chromium-116.0.5845.50/net/filter/brotli_source_stream.cc 2023-07-30 13:08:43.398218141 +0200
@@ -12,8 +12,8 @@
#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 "third_party/brotli/include/brotli/shared_dictionary.h"
+#include <brotli/decode.h>
+#include <brotli/shared_dictionary.h>
namespace net {
diff -up chromium-116.0.5845.50/net/ssl/cert_compression.cc.system-brotli chromium-116.0.5845.50/net/ssl/cert_compression.cc
--- chromium-116.0.5845.50/net/ssl/cert_compression.cc.system-brotli 2023-07-26 17:43:01.000000000 +0200
+++ chromium-116.0.5845.50/net/ssl/cert_compression.cc 2023-07-30 13:06:06.284705823 +0200
@@ -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-116.0.5845.50/ui/base/resource/resource_bundle.cc.system-brotli chromium-116.0.5845.50/ui/base/resource/resource_bundle.cc
--- chromium-116.0.5845.50/ui/base/resource/resource_bundle.cc.system-brotli 2023-07-26 17:43:23.000000000 +0200
+++ chromium-116.0.5845.50/ui/base/resource/resource_bundle.cc 2023-07-30 13:06:06.284705823 +0200
@@ -32,7 +32,7 @@
#include "net/filter/gzip_header.h"
#include "skia/ext/image_operations.h"
#include "third_party/abseil-cpp/absl/types/variant.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,237 @@
commit e2f8a1e1b5c0096cb0465a79e4f6c53d0d50e664
Author: Gregg Tavares <gman@chromium.org>
Date: Fri Aug 11 00:32:19 2023 +0000
Tweak about:gpu
* Make it so you can select all the text
As it was, selection only worked on individual top level divs.
Adding an enclosing parent div fixed this issue
* Change "Copy Report to Clipboard" to "Download Report to File"
The data here was almost always too big. Too big to paste into
a chrome bug, too big to paste into chat.
The user can still press Ctrl-A/Cmd-A or pick Select-All
and do a text copy.
* Add dark mode support
Bug: 1470927
Change-Id: I82da29ae5b68106f204d02084e252d3f07373a69
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4764269
Commit-Queue: Gregg Tavares <gman@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1182383}
diff --git a/content/browser/resources/gpu/gpu_internals.html b/content/browser/resources/gpu/gpu_internals.html
index d324f96798fd6..22322bb6ba7d8 100644
--- a/content/browser/resources/gpu/gpu_internals.html
+++ b/content/browser/resources/gpu/gpu_internals.html
@@ -9,13 +9,15 @@ found in the LICENSE file.
<meta name="viewport" content="width=device-width" />
<title>GPU Internals</title>
<style>
+ :root {
+ color-scheme: light dark;
+ }
* {
box-sizing: border-box;
user-select: none;
}
body {
- background-color: white;
cursor: default;
font-family: sans-serif;
margin: 8px;
diff --git a/content/browser/resources/gpu/info_view.html b/content/browser/resources/gpu/info_view.html
index 289691ceb11b3..ce3643da2adb6 100644
--- a/content/browser/resources/gpu/info_view.html
+++ b/content/browser/resources/gpu/info_view.html
@@ -5,12 +5,28 @@ found in the LICENSE file.
-->
<style>
:host {
+ --green: #080;
+ --yellow: #880;
+ --red: #f00;
+ --gray: #888;
+ --bg-yellow: #ff0;
+
display: block;
flex: 1;
overflow: auto;
padding: 10px;
}
+ @media (prefers-color-scheme: dark) {
+ :host {
+ --green: #0F0;
+ --yellow: #FF0;
+ --red: #f00;
+ --gray: #888;
+ --bg-yellow: #880;
+ }
+ }
+
:host * {
user-select: text;
}
@@ -26,77 +42,52 @@ found in the LICENSE file.
margin-top: 0;
}
- :host > div {
+ #content > div {
margin-bottom: 1em;
}
.feature-green {
- color: rgb(0, 128, 0);
+ color: var(--green);
}
.feature-yellow {
- color: rgb(128, 128, 0);
+ color: var(--yellow);
}
.feature-red {
- color: rgb(255, 0, 0);
+ color: var(--red);
}
.feature-gray {
- color: rgb(128, 128, 128);
+ color: var(--gray);
}
.bg-yellow {
- background-color: yellow;
+ background-color: var(--bg-yellow);
}
#vulkan-info-value {
white-space: pre;
}
- #copy-to-clipboard {
- background-image: linear-gradient(#ededed, #ededed 38%, #dedede);
- border: 1px solid rgba(0, 0, 0, .25);
- border-radius: 2px;
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08),
- inset 0 1px 2px rgba(255, 255, 255, 0.75);
- color: #444;
+ #download-to-file {
font: inherit;
margin: 0 1px 0 0;
min-height: 2em;
- outline: none;
padding: 1px 10px;
- text-shadow: 0 1px 0 rgb(240, 240, 240);
user-select: none;
}
- #copy-to-clipboard:enabled:hover {
- background-image: linear-gradient(#f0f0f0, #f0f0f0 38%, #e0e0e0);
- border-color: rgba(0, 0, 0, 0.3);
- box-shadow: 0 1px 0 rgba(0, 0, 0, 0.12),
- inset 0 1px 2px rgba(255, 255, 255, 0.95);
- color: black;
- }
-
- #copy-to-clipboard:enabled:active {
- background-image: linear-gradient(#e7e7e7, #e7e7e7 38%, #d7d7d7);
- box-shadow: none;
- text-shadow: none;
- }
-
- #copy-to-clipboard:enabled:focus {
- border-color: rgb(77, 144, 254);
- }
-
h4.dawn-info-header {
- color: rgb(128, 128, 0);
+ color: var(--yellow);
margin-bottom: 2px;
margin-top: 10px;
}
</style>
+<div id="content">
<div>
- <button id="copy-to-clipboard">Copy Report to Clipboard</button>
+ <button id="download-to-file">Download Report to File</button>
</div>
<div>
<h3>Graphics Feature Status</h3>
@@ -193,3 +184,4 @@ found in the LICENSE file.
<h3>Log Messages</h3>
<ul></ul>
</div>
+</div>
\ No newline at end of file
diff --git a/content/browser/resources/gpu/info_view.ts b/content/browser/resources/gpu/info_view.ts
index 0b91cc130f46f..96c08f76e4bc7 100644
--- a/content/browser/resources/gpu/info_view.ts
+++ b/content/browser/resources/gpu/info_view.ts
@@ -12,6 +12,22 @@ import {getTemplate} from './info_view.html.js';
import {ArrayData, Data} from './info_view_table_row.js';
import {VulkanInfo} from './vulkan_info.js';
+/**
+ * Given a blob and a filename, prompts user to
+ * save as a file.
+ */
+const saveData = (function() {
+ const a = document.createElement('a');
+ a.style.display = 'none';
+ document.body.appendChild(a);
+ return function saveData(blob: Blob, fileName: string) {
+ const url = window.URL.createObjectURL(blob);
+ a.href = url;
+ a.download = fileName;
+ a.click();
+ };
+}());
+
/**
* @fileoverview This view displays information on the current GPU
* hardware. Its primary usefulness is to allow users to copy-paste
@@ -33,19 +49,26 @@ export class InfoViewElement extends CustomElement {
}
connectedCallback() {
- // Add handler to 'copy to clipboard' button
- const copyButton =
- this.shadowRoot!.querySelector<HTMLElement>('#copy-to-clipboard');
- assert(copyButton);
- copyButton.onclick = (() => {
+ // Add handler to 'download report to clipboard' button
+ const downloadButton =
+ this.shadowRoot!.querySelector<HTMLElement>('#download-to-file')!;
+ assert(downloadButton);
+ downloadButton.onclick = (() => {
// Make sure nothing is selected
const s = window.getSelection()!;
s.removeAllRanges();
+
+ // Select everything
s.selectAllChildren(this.shadowRoot!);
- document.execCommand('copy');
+ const text = s.toString();
// And deselect everything at the end.
window.getSelection()!.removeAllRanges();
+
+ const blob = new Blob([text], {type: 'text/text'});
+ const filename = `about-gpu-${
+ new Date().toISOString().replace(/[^a-z0-9-]/ig, '-')}.txt`;
+ saveData(blob, filename);
});
}

@ -1,5 +1,5 @@
diff -up chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.typename chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc diff -up chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.me chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc
--- chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.typename 2023-06-17 14:50:56.342591702 +0200 --- chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc.me 2023-06-17 14:50:56.342591702 +0200
+++ chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc 2023-06-17 14:57:48.024377375 +0200 +++ chromium-115.0.5790.24/chrome/browser/download/bubble/download_bubble_update_service.cc 2023-06-17 14:57:48.024377375 +0200
@@ -91,7 +91,7 @@ ItemSortKey GetSortKey(const Item& item) @@ -91,7 +91,7 @@ ItemSortKey GetSortKey(const Item& item)
// Helper to get an iterator to the last element in the cache. The cache // Helper to get an iterator to the last element in the cache. The cache
@ -34,8 +34,8 @@ diff -up chromium-115.0.5790.32/components/optimization_guide/core/tflite_model_
override { override {
DCHECK(execution_task_runner_->RunsTasksInCurrentSequence()); DCHECK(execution_task_runner_->RunsTasksInCurrentSequence());
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
diff -up chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me1 chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc diff -up chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc
--- chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me1 2023-06-19 10:03:32.319218678 +0200 --- chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc.me 2023-06-19 10:03:32.319218678 +0200
+++ chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc 2023-06-19 10:04:12.023942232 +0200 +++ chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html_document_parser_fastpath.cc 2023-06-19 10:04:12.023942232 +0200
@@ -169,7 +169,7 @@ class HTMLFastPathParser { @@ -169,7 +169,7 @@ class HTMLFastPathParser {
using Span = base::span<const Char>; using Span = base::span<const Char>;
@ -46,3 +46,34 @@ diff -up chromium-115.0.5790.32/third_party/blink/renderer/core/html/parser/html
UCharLiteralBuffer<32>, UCharLiteralBuffer<32>,
LCharLiteralBuffer<32>>::type LiteralBufferType; LCharLiteralBuffer<32>>::type LiteralBufferType;
typedef UCharLiteralBuffer<32> UCharLiteralBufferType; typedef UCharLiteralBuffer<32> UCharLiteralBufferType;
diff -up chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h.me chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h
--- chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h.me 2023-08-02 16:18:30.380108125 +0200
+++ chromium-116.0.5845.50/content/public/browser/web_ui_browser_interface_broker_registry.h 2023-08-02 16:20:59.660024578 +0200
@@ -127,10 +127,10 @@ class CONTENT_EXPORT WebUIBrowserInterfa
//
// TODO(crbug.com/1407936): Point to WebUIJsBridge documentation.
template <typename ControllerType>
- JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() {
+ typename JsBridgeTraits<ControllerType>::BinderInitializer& ForWebUIWithJsBridge() {
using Traits = JsBridgeTraits<ControllerType>;
- using Interface = Traits::Interface;
- using JsBridgeBinderInitializer = Traits::BinderInitializer;
+ using Interface = typename Traits::Interface;
+ using JsBridgeBinderInitializer = typename Traits::BinderInitializer;
// WebUIController::GetType() requires an instantiated WebUIController
// (because it's a virtual method and can't be static). Here we only have
diff -up chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h
--- chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h.me 2023-08-02 20:41:23.984729462 +0200
+++ chromium-116.0.5845.50/third_party/blink/renderer/core/paint/object_paint_properties_sparse.h 2023-08-02 20:41:53.737583093 +0200
@@ -270,8 +270,8 @@ class CORE_EXPORT ObjectPaintPropertiesS
NodeList& nodes,
NodeId node_id,
const ParentType& parent,
- NodeType::State&& state,
- const NodeType::AnimationState& animation_state =
+ typename NodeType::State&& state,
+ const typename NodeType::AnimationState& animation_state =
NodeType::AnimationState()) {
// First, check if we need to add a new node.
if (!nodes.HasField(node_id)) {

@ -1,35 +0,0 @@
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);

@ -1,24 +0,0 @@
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>

@ -1,4 +1,3 @@
# system wide chromium flags # system wide chromium flags
CHROMIUM_FLAGS="" CHROMIUM_FLAGS=""
CHROMIUM_FLAGS+=" --disable-features=AudioServiceSandbox,Vulkan" CHROMIUM_FLAGS+=" --enable-features=VaapiVideoEncoder,VaapiVideoDecodeLinuxGL"
CHROMIUM_FLAGS+=" --enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiVideoDecodeLinuxGL"

@ -129,8 +129,9 @@
%global toolchain gcc %global toolchain gcc
%endif %endif
# enable system brotli # enable|disable system brotli
%global bundlebrotli 0 # disable system brotli due to old system brotli
%global bundlebrotli 1
# Chromium's fork of ICU is now something we can't unbundle. # Chromium's fork of ICU is now something we can't unbundle.
# This is left here to ease the change if that ever switches. # This is left here to ease the change if that ever switches.
@ -234,8 +235,8 @@
%endif %endif
Name: chromium%{chromium_channel} Name: chromium%{chromium_channel}
Version: 115.0.5790.170 Version: 116.0.5845.96
Release: 2%{?dist} Release: 1%{?dist}
Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use Summary: A WebKit (Blink) powered web browser that Google doesn't want you to use
Url: http://www.chromium.org/Home Url: http://www.chromium.org/Home
License: BSD-3-Clause AND LGPL-2.1-or-later AND Apache-2.0 AND IJG AND MIT AND GPL-2.0-or-later AND ISC AND OpenSSL AND (MPL-1.1 OR GPL-2.0-only OR LGPL-2.0-only) License: BSD-3-Clause AND LGPL-2.1-or-later AND Apache-2.0 AND IJG AND MIT AND GPL-2.0-or-later AND ISC AND OpenSSL AND (MPL-1.1 OR GPL-2.0-only OR LGPL-2.0-only)
@ -270,15 +271,6 @@ Patch20: chromium-disable-font-tests.patch
# https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-unbundle-zlib.patch # https://gitweb.gentoo.org/repo/gentoo.git/tree/www-client/chromium/files/chromium-unbundle-zlib.patch
Patch52: chromium-81.0.4044.92-unbundle-zlib.patch Patch52: chromium-81.0.4044.92-unbundle-zlib.patch
# missing limits.h, error: no member named 'numeric_limits' in namespace 'std'
Patch53: chromium-110-limits.patch
# ../../third_party/perfetto/include/perfetto/base/task_runner.h:48:55: error: 'uint32_t' has not been declared
Patch56: chromium-96.0.4664.45-missing-cstdint-header.patch
# Missing <cstring> (thanks c++17)
Patch57: chromium-96.0.4664.45-missing-cstring.patch
# Fix headers to look for system paths when we are using system minizip # Fix headers to look for system paths when we are using system minizip
Patch61: chromium-109-system-minizip-header-fix.patch Patch61: chromium-109-system-minizip-header-fix.patch
@ -296,7 +288,7 @@ Patch70: chromium-105.0.5195.52-python-six-1.16.0.patch
Patch82: chromium-98.0.4758.102-remoting-no-tests.patch Patch82: chromium-98.0.4758.102-remoting-no-tests.patch
# patch for using system brotli # patch for using system brotli
Patch89: chromium-115-system-brotli.patch Patch89: chromium-116-system-brotli.patch
# disable GlobalMediaControlsCastStartStop to avoid crash # disable GlobalMediaControlsCastStartStop to avoid crash
# when using the address bar media player button # when using the address bar media player button
@ -328,7 +320,7 @@ Patch105: chromium-85.0.4183.83-el7-old-libdrm.patch
Patch106: chromium-98.0.4758.80-epel7-erase-fix.patch Patch106: chromium-98.0.4758.80-epel7-erase-fix.patch
# Add additional operator== to make el7 happy. # Add additional operator== to make el7 happy.
Patch107: chromium-99.0.4844.51-el7-extra-operator==.patch Patch107: chromium-99.0.4844.51-el7-extra-operator.patch
# workaround for clang bug on el7 # workaround for clang bug on el7
Patch109: chromium-114-wireless-el7.patch Patch109: chromium-114-wireless-el7.patch
Patch110: chromium-115-buildflag-el7.patch Patch110: chromium-115-buildflag-el7.patch
@ -341,37 +333,29 @@ Patch116: chromium-112-ffmpeg-first_dts.patch
# revert new-channel-layout-api on f36, old ffmpeg-free # revert new-channel-layout-api on f36, old ffmpeg-free
Patch117: chromium-108-ffmpeg-revert-new-channel-layout-api.patch Patch117: chromium-108-ffmpeg-revert-new-channel-layout-api.patch
# gcc13
Patch122: chromium-115-gcc13.patch
# revert AV1 VA-API video encode due to old libva on el9 # revert AV1 VA-API video encode due to old libva on el9
Patch130: chromium-114-revert-av1enc-el9.patch Patch130: chromium-114-revert-av1enc-el9.patch
# Apply these patches to work around EPEL8 issues
Patch300: chromium-113-rhel8-force-disable-use_gnome_keyring.patch
# compiler build errors # compiler build errors
Patch300: chromium-116-no_matching_constructor.patch
Patch301: chromium-115-compiler-SkColor4f.patch Patch301: chromium-115-compiler-SkColor4f.patch
# workaround for clang bug, https://github.com/llvm/llvm-project/issues/57826 # workaround for clang bug, https://github.com/llvm/llvm-project/issues/57826
Patch302: chromium-115-workaround_clang_bug-structured_binding.patch Patch302: chromium-115-workaround_clang_bug-structured_binding.patch
# missing typename # missing typename
Patch303: chromium-115-typename.patch Patch303: chromium-116-typename.patch
# missing cmath
Patch304: chromium-115-missing-cmath.patch
# add BoundSessionRefreshCookieFetcher::Result # missing include header files
Patch305: chromium-115-add_BoundSessionRefreshCookieFetcher::Result.patch Patch304: chromium-116-missing-header-files.patch
# compiler error with c++20 # compiler error with c++20
Patch306: chromium-115-emplace_back_on_vector-c++20.patch Patch306: chromium-115-emplace_back_on_vector-c++20.patch
# revert for epel8 on aarch64 due to new feature IFUNC-Resolver not supported # disable memory tagging for epel8 on aarch64 due to new feature IFUNC-Resolver not supported
# in old glibc < 2.30 # in old glibc < 2.30
# error: fatal error: 'sys/ifunc.h' file not found # error: fatal error: 'sys/ifunc.h' file not found
Patch307: chromium-115-revert-ifunc.patch Patch307: chromium-116-arm64-memory_tagging.patch
# upstream, do not restrict new V4L2 decoders to ARM or ChromeOS # upstream, do not restrict new V4L2 decoders to ARM or ChromeOS
# error: use of undeclared identifier 'kV4L2FlatStatefulVideoDecoder' # error: use of undeclared identifier 'kV4L2FlatStatefulVideoDecoder'
@ -382,25 +366,17 @@ Patch308: chromium-115-do_not_restrict_new_V4L2_decoders.v4l2.pach
# error: no member named 'Contains' in namespace 'base' # error: no member named 'Contains' in namespace 'base'
Patch309: chromium-115-include_contains_h_header_for_V4L2StatefulVideoDecoder.patch Patch309: chromium-115-include_contains_h_header_for_V4L2StatefulVideoDecoder.patch
# Load default cursor theme if theme name is empty
Patch310: chromium-115-wayland-load_default_cursor_theme.patch
# clang warnings # clang warnings
Patch311: chromium-115-clang-warnings.patch Patch311: chromium-115-clang-warnings.patch
# imp module is removed in python-3.12 # imp module is removed in python-3.12
Patch312: chromium-115-python-3.12-deprecated.patch Patch312: chromium-115-python-3.12-deprecated.patch
# Qt issue # upstream patches
Patch321: chromium-114-qt-handle_scale_factor_changes.patch # Set toolkit dark preference based on FDO dark preference
Patch322: chromium-114-qt-fix_font_double_scaling.patch
Patch323: chromium-114-qt_deps.patch
Patch324: chromium-114-qt_enable_AllowQt_feature_flag.patch
Patch325: chromium-114-qt_logical_scale_factor.patch
# theme
# upstream, Set toolkit dark preference based on FDO dark preference
Patch350: chromium-115-linux_ui_darkmode.patch Patch350: chromium-115-linux_ui_darkmode.patch
# Tweak about:gpu, Add dark mode support
Patch351: chromium-116-tweak_about_gpu.patch
# Use chromium-latest.py to generate clean tarball from released build tarballs, found here: # Use chromium-latest.py to generate clean tarball from released build tarballs, found here:
# http://build.chromium.org/buildbot/official/ # http://build.chromium.org/buildbot/official/
@ -621,13 +597,7 @@ BuildRequires: opus-devel
BuildRequires: perl(Switch) BuildRequires: perl(Switch)
BuildRequires: %{chromium_pybin} BuildRequires: %{chromium_pybin}
%if %{gtk3}
BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(gtk+-3.0)
%else
BuildRequires: pkgconfig(gtk+-2.0)
%endif
BuildRequires: python3-devel BuildRequires: python3-devel
BuildRequires: python3-zipp BuildRequires: python3-zipp
BuildRequires: python3-simplejson BuildRequires: python3-simplejson
@ -930,10 +900,6 @@ udev.
%patch -P52 -p1 -b .unbundle-zlib %patch -P52 -p1 -b .unbundle-zlib
%endif %endif
%patch -P53 -p1 -b .limits-header
%patch -P56 -p1 -b .missing-cstdint
%patch -P57 -p1 -b .missing-cstring
%if ! %{bundleminizip} %if ! %{bundleminizip}
%patch -P61 -p1 -b .system-minizip %patch -P61 -p1 -b .system-minizip
%endif %endif
@ -980,16 +946,11 @@ udev.
%patch -P110 -p1 -b .buildflag-el7 %patch -P110 -p1 -b .buildflag-el7
%endif %endif
%patch -P122 -p1 -b .gcc13
%if 0%{?rhel} == 9 %if 0%{?rhel} == 9
%patch -P130 -p1 -b .revert-av1enc %patch -P130 -p1 -b .revert-av1enc
%endif %endif
%if 0%{?rhel} >= 8 %patch -P300 -p1 -b .no_matching_constructor
%patch -P300 -p1 -b .disblegnomekeyring
%endif
%if %{clang} %if %{clang}
%if 0%{?rhel} || 0%{?fedora} < 38 %if 0%{?rhel} || 0%{?fedora} < 38
%patch -P301 -p1 -b .workaround_clang-SkColor4f %patch -P301 -p1 -b .workaround_clang-SkColor4f
@ -998,27 +959,22 @@ udev.
%endif %endif
%patch -P303 -p1 -b .typename %patch -P303 -p1 -b .typename
%patch -P304 -p1 -b .cmath %patch -P304 -p1 -b .missing-header-files
%patch -P305 -p1 -b .add_BoundSessionRefreshCookieFetcher::Result
%patch -P306 -p1 -b .emplace_back_on_vector-c++20 %patch -P306 -p1 -b .emplace_back_on_vector-c++20
%ifarch aarch64 %ifarch aarch64
%if 0%{?rhel} == 8 %if 0%{?rhel} <= 8
%patch -P307 -p1 -R -b .ifunc %patch -P307 -p1 -b .memory_tagging
%endif %endif
%endif %endif
%patch -P308 -p1 -b .do_not_restrict_new_V4L2_decoders.v4l2 %patch -P308 -p1 -b .do_not_restrict_new_V4L2_decoders.v4l2
%patch -P309 -p1 -b .include_contains_h_header_for_V4L2StatefulVideoDecoder %patch -P309 -p1 -b .include_contains_h_header_for_V4L2StatefulVideoDecoder
%patch -P310 -p1 -b .wayland_load_default_cursor_theme
%patch -P311 -p1 -b .clang-warnings %patch -P311 -p1 -b .clang-warnings
%patch -P312 -p1 -b .python-3.12-deprecated %patch -P312 -p1 -b .python-3.12-deprecated
%patch -P321 -p1 -b .handle_scale_factor_changes
%patch -P322 -p1 -b .fix_font_double_scaling
%patch -P323 -p1 -b .qt_deps
%patch -P324 -p1 -b .qt_enable_AllowQt_feature_flag
%patch -P325 -p1 -b .qt_logical_scale_factor
%patch -P350 -p1 -b .linux_ui_darkmode %patch -P350 -p1 -b .linux_ui_darkmode
%patch -P351 -p1 -b .tweak_about_gpu
# Change shebang in all relevant files in this directory and all subdirectories # Change shebang in all relevant files in this directory and all subdirectories
# See `man find` for how the `-exec command {} +` syntax works # See `man find` for how the `-exec command {} +` syntax works
@ -1700,6 +1656,9 @@ getent group chrome-remote-desktop >/dev/null || groupadd -r chrome-remote-deskt
%{chromium_path}/chromedriver %{chromium_path}/chromedriver
%changelog %changelog
* Tue Aug 15 2023 Than Ngo <than@redhat.com> - 116.0.5845.96-1
- update to 116.0.5845.96
* Wed Aug 09 2023 Than Ngo <than@redhat.com> - 115.0.5790.170-2 * Wed Aug 09 2023 Than Ngo <than@redhat.com> - 115.0.5790.170-2
- set use_all_cpus=1 for aarch64 - set use_all_cpus=1 for aarch64

@ -1,3 +1,3 @@
SHA512 (node-v19.8.1-linux-arm64.tar.xz) = 86ff19085669e92ce7afe2fd7d4df0c5441df2d88c00f29d5463b805f3cf5625626db8aebf98349c9a495b772da1ce6d68263730018207ea98815058a1c81397 SHA512 (node-v19.8.1-linux-arm64.tar.xz) = 86ff19085669e92ce7afe2fd7d4df0c5441df2d88c00f29d5463b805f3cf5625626db8aebf98349c9a495b772da1ce6d68263730018207ea98815058a1c81397
SHA512 (node-v19.8.1-linux-x64.tar.xz) = 925c0037c6b7074d0b0245bced20d0a0d9b1300f53b808106f16b5018d763f5f5b00bc321b33fa1033d736b1e1076608da9b7fcae66aed53d27b100b1186e2c6 SHA512 (node-v19.8.1-linux-x64.tar.xz) = 925c0037c6b7074d0b0245bced20d0a0d9b1300f53b808106f16b5018d763f5f5b00bc321b33fa1033d736b1e1076608da9b7fcae66aed53d27b100b1186e2c6
SHA512 (chromium-115.0.5790.170-clean.tar.xz) = 0fc6b1557e7c1acdd66a875161fd8ec824ddb6db42ce133d9bdea96b4779c0e8b36e4a4bc4489633409fd59f7a53229be4d87d4e72485869f99fca639d528d32 SHA512 (chromium-116.0.5845.96-clean.tar.xz) = 4e3d304c51571415b70132cec98f0ac0247859868e6866cf55f4ac03a3f485e579cf7f3a996050bc6f9f8491ef4441679e3191ec21fd6190f17e9d489ca498f2

Loading…
Cancel
Save