i9e-gost-119.0.6045.159
changed/i9/chromium-116.0.5845.96-1.el9.inferit.1
parent
f11d70603a
commit
9535c95dca
@ -1 +1 @@
|
||||
9e4b3a30e852aa2add27115df620a113f7b9d921 SOURCES/chromium-115.0.5790.170.tar.xz
|
||||
cfcc860ecb3a032a27ceef1fa69eda193cb1e0de SOURCES/chromium-116.0.5845.96.tar.xz
|
||||
|
@ -1 +1 @@
|
||||
SOURCES/chromium-115.0.5790.170.tar.xz
|
||||
SOURCES/chromium-116.0.5845.96.tar.xz
|
||||
|
@ -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,21 +0,0 @@
|
||||
diff -up chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc.me chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc
|
||||
--- chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc.me 2023-06-25 10:06:58.445990069 +0200
|
||||
+++ chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc 2023-06-25 10:51:17.640818231 +0200
|
||||
@@ -355,7 +355,7 @@ Status ParseMobileEmulation(const base::
|
||||
"'version' field of type string");
|
||||
}
|
||||
|
||||
- brands.emplace_back(*brand, *version);
|
||||
+ brands.emplace_back() = {*brand, *version};
|
||||
}
|
||||
|
||||
client_hints.brands = std::move(brands);
|
||||
@@ -392,7 +392,7 @@ Status ParseMobileEmulation(const base::
|
||||
"a 'version' field of type string");
|
||||
}
|
||||
|
||||
- full_version_list.emplace_back(*brand, *version);
|
||||
+ full_version_list.emplace_back() = {*brand, *version};
|
||||
}
|
||||
|
||||
client_hints.full_version_list = std::move(full_version_list);
|
@ -0,0 +1,297 @@
|
||||
commit 4943182fdfe7adbcc49b10538d7d52b17dd538ff
|
||||
Author: Tom Anderson <thomasanderson@chromium.org>
|
||||
Date: Fri Jul 21 22:35:40 2023 +0000
|
||||
|
||||
[Linux Ui] Set toolkit dark preference based on FDO dark preference
|
||||
|
||||
The toolkit color scheme preference is not affected by the
|
||||
`org.freedesktop.appearance color-scheme` setting. It's up to
|
||||
apps to manually toggle the toolkit theme based on this setting.
|
||||
This is done by libadwaita, libhandy, firefox, and libreoffice.
|
||||
|
||||
R=sky
|
||||
|
||||
Change-Id: If05e61e6d0ec98ee1a74d442ce29b2ceb5337e86
|
||||
Bug: 998903
|
||||
Low-Coverage-Reason: No existing tests for dark_mode_manager_linux
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4701710
|
||||
Reviewed-by: Scott Violet <sky@chromium.org>
|
||||
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1173744}
|
||||
|
||||
diff --git a/chrome/browser/ui/views/dark_mode_manager_linux.cc b/chrome/browser/ui/views/dark_mode_manager_linux.cc
|
||||
index 4127327433593..6f054ab76b305 100644
|
||||
--- a/chrome/browser/ui/views/dark_mode_manager_linux.cc
|
||||
+++ b/chrome/browser/ui/views/dark_mode_manager_linux.cc
|
||||
@@ -67,7 +67,7 @@ DarkModeManagerLinux::DarkModeManagerLinux()
|
||||
if (auto* linux_ui_theme = ui::GetDefaultLinuxUiTheme()) {
|
||||
auto* native_theme = linux_ui_theme->GetNativeTheme();
|
||||
native_theme_observer_.Observe(native_theme);
|
||||
- SetColorScheme(native_theme->ShouldUseDarkColors());
|
||||
+ SetColorScheme(native_theme->ShouldUseDarkColors(), true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ DarkModeManagerLinux::~DarkModeManagerLinux() {
|
||||
|
||||
void DarkModeManagerLinux::OnNativeThemeUpdated(
|
||||
ui::NativeTheme* observed_theme) {
|
||||
- SetColorScheme(observed_theme->ShouldUseDarkColors());
|
||||
+ SetColorScheme(observed_theme->ShouldUseDarkColors(), true);
|
||||
}
|
||||
|
||||
void DarkModeManagerLinux::OnSignalConnected(const std::string& interface_name,
|
||||
@@ -114,7 +114,7 @@ void DarkModeManagerLinux::OnPortalSettingChanged(dbus::Signal* signal) {
|
||||
return;
|
||||
}
|
||||
|
||||
- SetColorScheme(new_color_scheme == kFreedesktopColorSchemeDark);
|
||||
+ SetColorScheme(new_color_scheme == kFreedesktopColorSchemeDark, false);
|
||||
}
|
||||
|
||||
void DarkModeManagerLinux::OnReadColorSchemeResponse(dbus::Response* response) {
|
||||
@@ -137,13 +137,23 @@ void DarkModeManagerLinux::OnReadColorSchemeResponse(dbus::Response* response) {
|
||||
return;
|
||||
}
|
||||
|
||||
- // Ignore future updates from the toolkit theme.
|
||||
- native_theme_observer_.Reset();
|
||||
+ // Once we read the org.freedesktop.appearance color-scheme setting successfully,
|
||||
+ // it should always take precedence over the toolkit color scheme.
|
||||
+ ignore_toolkit_theme_changes_ = true;
|
||||
|
||||
- SetColorScheme(new_color_scheme == kFreedesktopColorSchemeDark);
|
||||
+ SetColorScheme(new_color_scheme == kFreedesktopColorSchemeDark, false);
|
||||
}
|
||||
|
||||
-void DarkModeManagerLinux::SetColorScheme(bool prefer_dark_theme) {
|
||||
+void DarkModeManagerLinux::SetColorScheme(bool prefer_dark_theme,
|
||||
+ bool from_toolkit_theme) {
|
||||
+ if (from_toolkit_theme && ignore_toolkit_theme_changes_) {
|
||||
+ return;
|
||||
+ }
|
||||
+ if (!from_toolkit_theme) {
|
||||
+ for (auto* linux_ui_theme : ui::GetLinuxUiThemes()) {
|
||||
+ linux_ui_theme->SetDarkTheme(prefer_dark_theme);
|
||||
+ }
|
||||
+ }
|
||||
if (prefer_dark_theme_ == prefer_dark_theme) {
|
||||
return;
|
||||
}
|
||||
diff --git a/chrome/browser/ui/views/dark_mode_manager_linux.h b/chrome/browser/ui/views/dark_mode_manager_linux.h
|
||||
index 34b07ffadbbef..e00d8617e0e23 100644
|
||||
--- a/chrome/browser/ui/views/dark_mode_manager_linux.h
|
||||
+++ b/chrome/browser/ui/views/dark_mode_manager_linux.h
|
||||
@@ -44,12 +44,13 @@ class DarkModeManagerLinux : public NativeThemeObserver {
|
||||
void OnReadColorSchemeResponse(dbus::Response* response);
|
||||
|
||||
// Sets `prefer_dark_theme_` and propagates to the web theme.
|
||||
- void SetColorScheme(bool prefer_dark_theme);
|
||||
+ void SetColorScheme(bool prefer_dark_theme, bool from_toolkit_theme);
|
||||
|
||||
scoped_refptr<dbus::Bus> bus_;
|
||||
raw_ptr<dbus::ObjectProxy> settings_proxy_;
|
||||
|
||||
bool prefer_dark_theme_ = false;
|
||||
+ bool ignore_toolkit_theme_changes_ = false;
|
||||
|
||||
base::ScopedObservation<NativeTheme, NativeThemeObserver>
|
||||
native_theme_observer_{this};
|
||||
diff --git a/ui/gtk/gtk_ui.cc b/ui/gtk/gtk_ui.cc
|
||||
index 2b6bb89e3071e..a463500570c03 100644
|
||||
--- a/ui/gtk/gtk_ui.cc
|
||||
+++ b/ui/gtk/gtk_ui.cc
|
||||
@@ -463,6 +463,14 @@ bool GtkUi::PreferDarkTheme() const {
|
||||
return dark;
|
||||
}
|
||||
|
||||
+void GtkUi::SetDarkTheme(bool dark) {
|
||||
+ auto* settings = gtk_settings_get_default();
|
||||
+ g_object_set(settings, "gtk-application-prefer-dark-theme", dark, nullptr);
|
||||
+ // OnThemeChanged() will be called via the
|
||||
+ // notify::gtk-application-prefer-dark-theme handler to update the native
|
||||
+ // theme.
|
||||
+}
|
||||
+
|
||||
bool GtkUi::AnimationsEnabled() const {
|
||||
gboolean animations_enabled = false;
|
||||
g_object_get(gtk_settings_get_default(), "gtk-enable-animations",
|
||||
diff --git a/ui/gtk/gtk_ui.h b/ui/gtk/gtk_ui.h
|
||||
index 573ea4066881b..53c02c50dac53 100644
|
||||
--- a/ui/gtk/gtk_ui.h
|
||||
+++ b/ui/gtk/gtk_ui.h
|
||||
@@ -106,6 +106,7 @@ class GtkUi : public ui::LinuxUiAndTheme {
|
||||
void GetInactiveSelectionBgColor(SkColor* color) const override;
|
||||
void GetInactiveSelectionFgColor(SkColor* color) const override;
|
||||
bool PreferDarkTheme() const override;
|
||||
+ void SetDarkTheme(bool dark) override;
|
||||
std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
|
||||
ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame) override;
|
||||
|
||||
diff --git a/ui/linux/fake_linux_ui.cc b/ui/linux/fake_linux_ui.cc
|
||||
index d236a0919f66b..8b67f04c25e7d 100644
|
||||
--- a/ui/linux/fake_linux_ui.cc
|
||||
+++ b/ui/linux/fake_linux_ui.cc
|
||||
@@ -93,6 +93,8 @@ bool FakeLinuxUi::PreferDarkTheme() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
+void FakeLinuxUi::SetDarkTheme(bool dark) {}
|
||||
+
|
||||
bool FakeLinuxUi::AnimationsEnabled() const {
|
||||
return true;
|
||||
}
|
||||
diff --git a/ui/linux/fake_linux_ui.h b/ui/linux/fake_linux_ui.h
|
||||
index 87aa82c930a35..daba20d196a7c 100644
|
||||
--- a/ui/linux/fake_linux_ui.h
|
||||
+++ b/ui/linux/fake_linux_ui.h
|
||||
@@ -64,6 +64,7 @@ class FakeLinuxUi : public LinuxUiAndTheme {
|
||||
void GetInactiveSelectionBgColor(SkColor* color) const override;
|
||||
void GetInactiveSelectionFgColor(SkColor* color) const override;
|
||||
bool PreferDarkTheme() const override;
|
||||
+ void SetDarkTheme(bool dark) override;
|
||||
std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
|
||||
ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame) override;
|
||||
};
|
||||
diff --git a/ui/linux/fallback_linux_ui.cc b/ui/linux/fallback_linux_ui.cc
|
||||
index ab116fda42b22..6d77be047e202 100644
|
||||
--- a/ui/linux/fallback_linux_ui.cc
|
||||
+++ b/ui/linux/fallback_linux_ui.cc
|
||||
@@ -112,7 +112,11 @@ LinuxUi::WindowFrameAction FallbackLinuxUi::GetWindowFrameAction(
|
||||
}
|
||||
|
||||
bool FallbackLinuxUi::PreferDarkTheme() const {
|
||||
- return false;
|
||||
+ return theme_is_dark_;
|
||||
+}
|
||||
+
|
||||
+void FallbackLinuxUi::SetDarkTheme(bool dark) {
|
||||
+ theme_is_dark_ = dark;
|
||||
}
|
||||
|
||||
bool FallbackLinuxUi::AnimationsEnabled() const {
|
||||
diff --git a/ui/linux/fallback_linux_ui.h b/ui/linux/fallback_linux_ui.h
|
||||
index 0d0df25ec2caf..9901d4939400d 100644
|
||||
--- a/ui/linux/fallback_linux_ui.h
|
||||
+++ b/ui/linux/fallback_linux_ui.h
|
||||
@@ -65,12 +65,14 @@ class FallbackLinuxUi : public LinuxUiAndTheme {
|
||||
void GetInactiveSelectionBgColor(SkColor* color) const override;
|
||||
void GetInactiveSelectionFgColor(SkColor* color) const override;
|
||||
bool PreferDarkTheme() const override;
|
||||
+ void SetDarkTheme(bool dark) override;
|
||||
std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
|
||||
ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame) override;
|
||||
|
||||
private:
|
||||
std::string default_font_family_;
|
||||
gfx::FontRenderParams default_font_render_params_;
|
||||
+ bool theme_is_dark_ = false;
|
||||
};
|
||||
|
||||
} // namespace ui
|
||||
diff --git a/ui/linux/linux_ui.h b/ui/linux/linux_ui.h
|
||||
index 45b36fbeeabc4..a47134d7fa672 100644
|
||||
--- a/ui/linux/linux_ui.h
|
||||
+++ b/ui/linux/linux_ui.h
|
||||
@@ -300,6 +300,10 @@ class COMPONENT_EXPORT(LINUX_UI) LinuxUiTheme {
|
||||
// preferred.
|
||||
virtual bool PreferDarkTheme() const = 0;
|
||||
|
||||
+ // Override the toolkit's dark mode preference. Used when the dark mode
|
||||
+ // setting is provided by org.freedesktop.appearance instead of the toolkit.
|
||||
+ virtual void SetDarkTheme(bool dark) = 0;
|
||||
+
|
||||
// Returns a new NavButtonProvider, or nullptr if the underlying
|
||||
// toolkit does not support drawing client-side navigation buttons.
|
||||
virtual std::unique_ptr<NavButtonProvider> CreateNavButtonProvider() = 0;
|
||||
diff --git a/ui/linux/linux_ui_factory.cc b/ui/linux/linux_ui_factory.cc
|
||||
index 5555ff3bf21f4..21be358d2af8e 100644
|
||||
--- a/ui/linux/linux_ui_factory.cc
|
||||
+++ b/ui/linux/linux_ui_factory.cc
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "base/command_line.h"
|
||||
#include "base/environment.h"
|
||||
#include "base/nix/xdg_util.h"
|
||||
+#include "base/no_destructor.h"
|
||||
#include "base/strings/string_util.h"
|
||||
#include "build/chromecast_buildflags.h"
|
||||
#include "ui/base/buildflags.h"
|
||||
@@ -35,10 +36,16 @@ namespace {
|
||||
|
||||
const char kUiToolkitFlag[] = "ui-toolkit";
|
||||
|
||||
+std::vector<LinuxUiTheme*>& GetLinuxUiThemesImpl() {
|
||||
+ static base::NoDestructor<std::vector<LinuxUiTheme*>> themes;
|
||||
+ return *themes;
|
||||
+}
|
||||
+
|
||||
std::unique_ptr<LinuxUiAndTheme> CreateGtkUi() {
|
||||
#if BUILDFLAG(USE_GTK)
|
||||
auto gtk_ui = BuildGtkUi();
|
||||
if (gtk_ui->Initialize()) {
|
||||
+ GetLinuxUiThemesImpl().push_back(gtk_ui.get());
|
||||
return gtk_ui;
|
||||
}
|
||||
#endif
|
||||
@@ -61,6 +68,7 @@ std::unique_ptr<LinuxUiAndTheme> CreateQtUi() {
|
||||
#if BUILDFLAG(USE_QT)
|
||||
auto qt_ui = qt::CreateQtUi(GetGtkUi());
|
||||
if (qt_ui->Initialize()) {
|
||||
+ GetLinuxUiThemesImpl().push_back(qt_ui.get());
|
||||
return qt_ui;
|
||||
}
|
||||
#endif
|
||||
@@ -156,6 +164,10 @@ LinuxUiTheme* GetLinuxUiTheme(SystemTheme system_theme) {
|
||||
}
|
||||
}
|
||||
|
||||
+const std::vector<LinuxUiTheme*>& GetLinuxUiThemes() {
|
||||
+ return GetLinuxUiThemesImpl();
|
||||
+}
|
||||
+
|
||||
SystemTheme GetDefaultSystemTheme() {
|
||||
std::unique_ptr<base::Environment> env = base::Environment::Create();
|
||||
|
||||
diff --git a/ui/linux/linux_ui_factory.h b/ui/linux/linux_ui_factory.h
|
||||
index 5d4f4f4761972..2f4820f2c6240 100644
|
||||
--- a/ui/linux/linux_ui_factory.h
|
||||
+++ b/ui/linux/linux_ui_factory.h
|
||||
@@ -32,6 +32,10 @@ LinuxUiTheme* GetDefaultLinuxUiTheme();
|
||||
COMPONENT_EXPORT(LINUX_UI_FACTORY)
|
||||
LinuxUiTheme* GetLinuxUiTheme(SystemTheme system_theme);
|
||||
|
||||
+// Returns all `LinuxUiTheme`s that have been created.
|
||||
+COMPONENT_EXPORT(LINUX_UI_FACTORY)
|
||||
+const std::vector<LinuxUiTheme*>& GetLinuxUiThemes();
|
||||
+
|
||||
COMPONENT_EXPORT(LINUX_UI_FACTORY)
|
||||
SystemTheme GetDefaultSystemTheme();
|
||||
|
||||
diff --git a/ui/qt/qt_ui.cc b/ui/qt/qt_ui.cc
|
||||
index cd12c72a3cad4..37e165d76305e 100644
|
||||
--- a/ui/qt/qt_ui.cc
|
||||
+++ b/ui/qt/qt_ui.cc
|
||||
@@ -355,6 +355,11 @@ bool QtUi::PreferDarkTheme() const {
|
||||
shim_->GetColor(ColorType::kWindowBg, ColorState::kNormal));
|
||||
}
|
||||
|
||||
+DISABLE_CFI_VCALL
|
||||
+void QtUi::SetDarkTheme(bool dark) {
|
||||
+ // Qt::ColorScheme is only available in QT 6.5 and later.
|
||||
+}
|
||||
+
|
||||
DISABLE_CFI_VCALL
|
||||
bool QtUi::AnimationsEnabled() const {
|
||||
return shim_->GetAnimationDurationMs() > 0;
|
||||
diff --git a/ui/qt/qt_ui.h b/ui/qt/qt_ui.h
|
||||
index 38ce8719ee1d8..787a9556b1264 100644
|
||||
--- a/ui/qt/qt_ui.h
|
||||
+++ b/ui/qt/qt_ui.h
|
||||
@@ -82,6 +82,7 @@ class QtUi : public ui::LinuxUiAndTheme, QtInterface::Delegate {
|
||||
void GetInactiveSelectionBgColor(SkColor* color) const override;
|
||||
void GetInactiveSelectionFgColor(SkColor* color) const override;
|
||||
bool PreferDarkTheme() const override;
|
||||
+ void SetDarkTheme(bool dark) override;
|
||||
std::unique_ptr<ui::NavButtonProvider> CreateNavButtonProvider() override;
|
||||
ui::WindowFrameProvider* GetWindowFrameProvider(bool solid_frame) override;
|
||||
|
@ -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"
|
||||
|
@ -0,0 +1,172 @@
|
||||
diff -up chromium-115.0.5790.102/base/write_build_date_header.py.me chromium-115.0.5790.102/base/write_build_date_header.py
|
||||
--- chromium-115.0.5790.102/base/write_build_date_header.py.me 2023-07-22 14:23:42.620679397 +0200
|
||||
+++ chromium-115.0.5790.102/base/write_build_date_header.py 2023-07-22 15:24:46.833310310 +0200
|
||||
@@ -17,7 +17,7 @@ def main():
|
||||
args = argument_parser.parse_args()
|
||||
|
||||
date_val = int(args.timestamp)
|
||||
- date = datetime.datetime.utcfromtimestamp(date_val)
|
||||
+ date = datetime.datetime.fromtimestamp(date_val, datetime.timezone.utc)
|
||||
output = ('// Generated by //base/write_build_date_header.py\n'
|
||||
'#ifndef BASE_GENERATED_BUILD_DATE_TIMESTAMP \n'
|
||||
f'#define BASE_GENERATED_BUILD_DATE_TIMESTAMP {date_val}'
|
||||
diff -up chromium-115.0.5790.102/build/write_buildflag_header.py.me chromium-115.0.5790.102/build/write_buildflag_header.py
|
||||
--- chromium-115.0.5790.102/build/write_buildflag_header.py.me 2023-07-22 14:16:14.196975451 +0200
|
||||
+++ chromium-115.0.5790.102/build/write_buildflag_header.py 2023-07-22 14:20:24.977239994 +0200
|
||||
@@ -44,7 +44,7 @@ def GetOptions():
|
||||
header_guard = cmdline_options.output.upper()
|
||||
if header_guard[0].isdigit():
|
||||
header_guard = '_' + header_guard
|
||||
- header_guard = re.sub('[^\w]', '_', header_guard)
|
||||
+ header_guard = re.sub(r'[^\w]', '_', header_guard)
|
||||
header_guard += '_'
|
||||
|
||||
# The actual output file is inside the gen dir.
|
||||
diff -up chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py.me chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py
|
||||
--- chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py.me 2023-07-22 14:47:34.230764210 +0200
|
||||
+++ chromium-115.0.5790.102/components/resources/protobufs/binary_proto_generator.py 2023-07-22 15:11:50.360983383 +0200
|
||||
@@ -9,7 +9,8 @@
|
||||
"""
|
||||
from __future__ import print_function
|
||||
import abc
|
||||
-import imp
|
||||
+import types
|
||||
+import importlib
|
||||
import optparse
|
||||
import os
|
||||
import re
|
||||
@@ -40,6 +41,12 @@ class GoogleProtobufModuleImporter:
|
||||
return filepath
|
||||
return None
|
||||
|
||||
+ def load_source(name: str, path: str) -> types.ModuleType:
|
||||
+ spec = importlib.util.spec_from_file_location(name, path)
|
||||
+ module = importlib.util.module_from_spec(spec)
|
||||
+ spec.loader.exec_module(module)
|
||||
+ return module
|
||||
+
|
||||
def _module_exists(self, fullname):
|
||||
return self._fullname_to_filepath(fullname) is not None
|
||||
|
||||
@@ -68,7 +75,7 @@ class GoogleProtobufModuleImporter:
|
||||
raise ImportError(fullname)
|
||||
|
||||
filepath = self._fullname_to_filepath(fullname)
|
||||
- return imp.load_source(fullname, filepath)
|
||||
+ return load_source(fullname, filepath)
|
||||
|
||||
class BinaryProtoGenerator:
|
||||
|
||||
diff -up chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py.me chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py
|
||||
--- chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py.me 2023-07-22 15:17:19.114258801 +0200
|
||||
+++ chromium-115.0.5790.102/mojo/public/tools/bindings/concatenate_and_replace_closure_exports.py 2023-07-22 15:17:43.368200491 +0200
|
||||
@@ -32,7 +32,7 @@ def FilterLine(filename, line, output):
|
||||
return
|
||||
|
||||
if line.startswith("goog.provide"):
|
||||
- match = re.match("goog.provide\('([^']+)'\);", line)
|
||||
+ match = re.match(r"goog.provide\('([^']+)'\);", line)
|
||||
if not match:
|
||||
print("Invalid goog.provide line in %s:\n%s" % (filename, line))
|
||||
sys.exit(1)
|
||||
diff -up chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py.me chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py
|
||||
--- chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py.me 2023-07-22 14:10:40.372979365 +0200
|
||||
+++ chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/parse/lexer.py 2023-07-22 14:13:31.200453442 +0200
|
||||
@@ -2,7 +2,6 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
-import imp
|
||||
import os.path
|
||||
import sys
|
||||
|
||||
diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py
|
||||
--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py.me 2023-07-22 15:12:41.850895179 +0200
|
||||
+++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/html_generation_controller.py 2023-07-22 15:12:55.844871207 +0200
|
||||
@@ -18,7 +18,7 @@ class HTMLGenerationController(object):
|
||||
|
||||
def GetHTMLForInlineStylesheet(self, contents):
|
||||
if self.current_module is None:
|
||||
- if re.search('url\(.+\)', contents):
|
||||
+ if re.search(r'url\(.+\)', contents):
|
||||
raise Exception(
|
||||
'Default HTMLGenerationController cannot handle inline style urls')
|
||||
return contents
|
||||
diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py
|
||||
--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py.me 2023-07-22 15:14:06.923717910 +0200
|
||||
+++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/js_utils.py 2023-07-22 15:18:03.704150614 +0200
|
||||
@@ -4,4 +4,4 @@
|
||||
|
||||
|
||||
def EscapeJSIfNeeded(js):
|
||||
- return js.replace('</script>', '<\/script>')
|
||||
+ return js.replace(r'</script>', r'<\/script>')
|
||||
diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py
|
||||
--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py.me 2023-07-22 15:14:30.105662532 +0200
|
||||
+++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/parse_html_deps.py 2023-07-22 15:14:57.977595950 +0200
|
||||
@@ -293,6 +293,6 @@ class HTMLModuleParser():
|
||||
html = ''
|
||||
else:
|
||||
if html.find('< /script>') != -1:
|
||||
- raise Exception('Escape script tags with <\/script>')
|
||||
+ raise Exception(r'Escape script tags with <\/script>')
|
||||
|
||||
return HTMLModuleParserResults(html)
|
||||
diff -up chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py.me chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py
|
||||
--- chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py.me 2023-07-22 15:13:12.316842990 +0200
|
||||
+++ chromium-115.0.5790.102/third_party/catapult/common/py_vulcanize/py_vulcanize/style_sheet.py 2023-07-22 15:13:49.684759091 +0200
|
||||
@@ -60,7 +60,7 @@ class ParsedStyleSheet(object):
|
||||
return 'url(data:image/%s;base64,%s)' % (ext[1:], data.decode('utf-8'))
|
||||
|
||||
# I'm assuming we only have url()'s associated with images
|
||||
- return re.sub('url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)',
|
||||
+ return re.sub(r'url\((?P<quote>"|\'|)(?P<url>[^"\'()]*)(?P=quote)\)',
|
||||
InlineUrl, self.contents)
|
||||
|
||||
def AppendDirectlyDependentFilenamesTo(self, dependent_filenames):
|
||||
@@ -72,7 +72,7 @@ class ParsedStyleSheet(object):
|
||||
raise Exception('@imports are not supported')
|
||||
|
||||
matches = re.findall(
|
||||
- 'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)',
|
||||
+ r'url\((?:["|\']?)([^"\'()]*)(?:["|\']?)\)',
|
||||
self.contents)
|
||||
|
||||
def resolve_url(url):
|
||||
diff -up chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py.me chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py
|
||||
--- chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py.me 2023-07-22 15:11:56.826972306 +0200
|
||||
+++ chromium-115.0.5790.102/third_party/dawn/generator/generator_lib.py 2023-07-22 15:12:37.550902545 +0200
|
||||
@@ -119,8 +119,8 @@ class _PreprocessingLoader(jinja2.BaseLo
|
||||
source = self.preprocess(f.read())
|
||||
return source, path, lambda: mtime == os.path.getmtime(path)
|
||||
|
||||
- blockstart = re.compile('{%-?\s*(if|elif|else|for|block|macro)[^}]*%}')
|
||||
- blockend = re.compile('{%-?\s*(end(if|for|block|macro)|elif|else)[^}]*%}')
|
||||
+ blockstart = re.compile(r'{%-?\s*(if|elif|else|for|block|macro)[^}]*%}')
|
||||
+ blockend = re.compile(r'{%-?\s*(end(if|for|block|macro)|elif|else)[^}]*%}')
|
||||
|
||||
def preprocess(self, source):
|
||||
lines = source.split('\n')
|
||||
diff -up chromium-115.0.5790.102/third_party/vulkan-deps/vulkan-tools/src/build-gn/generate_vulkan_layers_json.py.me chromium-115.0.5790.102/third_party/vulkan-deps/vulkan-tools/src/build-gn/generate_vulkan_layers_json.py
|
||||
diff -up chromium-115.0.5790.102/third_party/vulkan-deps/vulkan-validation-layers/src/build-gn/generate_vulkan_layers_json.py.me chromium-115.0.5790.102/third_party/vulkan-deps/vulkan-validation-layers/src/build-gn/generate_vulkan_layers_json.py
|
||||
--- chromium-115.0.5790.102/third_party/vulkan-deps/vulkan-validation-layers/src/build-gn/generate_vulkan_layers_json.py.me 2023-07-22 16:02:48.330050088 +0200
|
||||
+++ chromium-115.0.5790.102/third_party/vulkan-deps/vulkan-validation-layers/src/build-gn/generate_vulkan_layers_json.py 2023-07-22 16:03:02.320023617 +0200
|
||||
@@ -28,7 +28,6 @@ import platform
|
||||
import sys
|
||||
|
||||
def glob_slash(dirname):
|
||||
- """Like regular glob but replaces \ with / in returned paths."""
|
||||
return [s.replace('\\', '/') for s in glob.glob(dirname)]
|
||||
|
||||
def main():
|
||||
diff -up chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/fileutil.py.python-imp-deprecated chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/fileutil.py
|
||||
--- chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/fileutil.py.python-imp-deprecated 2023-07-21 05:41:02.000000000 +0200
|
||||
+++ chromium-115.0.5790.102/mojo/public/tools/mojom/mojom/fileutil.py 2023-07-22 14:45:20.440127549 +0200
|
||||
@@ -3,7 +3,6 @@
|
||||
# found in the LICENSE file.
|
||||
|
||||
import errno
|
||||
-import imp
|
||||
import os.path
|
||||
import sys
|
||||
|
@ -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);
|
@ -0,0 +1,46 @@
|
||||
diff -up chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc.me chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc
|
||||
--- chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc.me 2023-06-25 10:06:58.445990069 +0200
|
||||
+++ chromium-115.0.5790.40/chrome/test/chromedriver/capabilities.cc 2023-06-25 10:51:17.640818231 +0200
|
||||
@@ -355,7 +355,7 @@ Status ParseMobileEmulation(const base::
|
||||
"'version' field of type string");
|
||||
}
|
||||
|
||||
- brands.emplace_back(*brand, *version);
|
||||
+ brands.emplace_back() = {*brand, *version};
|
||||
}
|
||||
|
||||
client_hints.brands = std::move(brands);
|
||||
@@ -392,7 +392,7 @@ Status ParseMobileEmulation(const base::
|
||||
"a 'version' field of type string");
|
||||
}
|
||||
|
||||
- full_version_list.emplace_back(*brand, *version);
|
||||
+ full_version_list.emplace_back() = {*brand, *version};
|
||||
}
|
||||
|
||||
client_hints.full_version_list = std::move(full_version_list);
|
||||
diff -up chromium-116.0.5845.96/chrome/browser/content_settings/one_time_permission_provider.cc.me chromium-116.0.5845.96/chrome/browser/content_settings/one_time_permission_provider.cc
|
||||
--- chromium-116.0.5845.96/chrome/browser/content_settings/one_time_permission_provider.cc.me 2023-08-15 21:34:58.922855428 +0200
|
||||
+++ chromium-116.0.5845.96/chrome/browser/content_settings/one_time_permission_provider.cc 2023-08-15 21:39:23.310434237 +0200
|
||||
@@ -207,8 +207,8 @@ void OneTimePermissionProvider::OnSuspen
|
||||
|
||||
while (rule_iterator && rule_iterator->HasNext()) {
|
||||
auto rule = rule_iterator->Next();
|
||||
- patterns_to_delete.emplace_back(setting_type, rule->primary_pattern,
|
||||
- rule->secondary_pattern);
|
||||
+ patterns_to_delete.emplace_back() = {setting_type, rule->primary_pattern,
|
||||
+ rule->secondary_pattern};
|
||||
permissions::PermissionUmaUtil::RecordOneTimePermissionEvent(
|
||||
setting_type,
|
||||
permissions::OneTimePermissionEvent::EXPIRED_ON_SUSPEND);
|
||||
@@ -302,8 +302,8 @@ void OneTimePermissionProvider::DeleteEn
|
||||
auto rule = rule_iterator->Next();
|
||||
if (rule->primary_pattern.Matches(origin_gurl) &&
|
||||
rule->secondary_pattern.Matches(origin_gurl)) {
|
||||
- patterns_to_delete.emplace_back(
|
||||
- content_setting_type, rule->primary_pattern, rule->secondary_pattern);
|
||||
+ patterns_to_delete.emplace_back() = {
|
||||
+ content_setting_type, rule->primary_pattern, rule->secondary_pattern};
|
||||
permissions::PermissionUmaUtil::RecordOneTimePermissionEvent(
|
||||
content_setting_type, trigger_event);
|
||||
}
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
@ -0,0 +1,50 @@
|
||||
commit 992f2b837f7c150bebe40a8186420c5c065b71f8
|
||||
Author: Chen-Yu Tsai <wenst@chromium.org>
|
||||
Date: Mon Jul 31 04:50:11 2023 +0000
|
||||
|
||||
media/gpu/v4l2: Only set HEVC .num_delta_pocs_of_ref_rps_idx on ChromeOS
|
||||
|
||||
The HEVC decode parameter .num_delta_pocs_of_ref_rps_idx field was
|
||||
very recently added to support MediaTek's stateless HEVC decoder. It
|
||||
was accepted upstream, but hasn't been part of a release yet, and so
|
||||
hasn't trickled down into a distro package that can be included in the
|
||||
sysroots.
|
||||
|
||||
Guard the field assignment for now so that the Linux builds can proceed.
|
||||
|
||||
Bug: b:258331312, b:291169645
|
||||
Cq-Include-Trybots: luci.chromium.try:linux-v4l2-codec-rel
|
||||
Change-Id: I1629be2373e7d67ea06a206226ad09bce90c3752
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4728846
|
||||
Reviewed-by: Nathan Hebert <nhebert@chromium.org>
|
||||
Auto-Submit: Chen-Yu Tsai <wenst@chromium.org>
|
||||
Commit-Queue: Chen-Yu Tsai <wenst@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/main@{#1177093}
|
||||
|
||||
diff --git a/media/gpu/v4l2/v4l2_video_decoder_delegate_h265.cc b/media/gpu/v4l2/v4l2_video_decoder_delegate_h265.cc
|
||||
index d683fbb5407a4..0f02f39758fe9 100644
|
||||
--- a/media/gpu/v4l2/v4l2_video_decoder_delegate_h265.cc
|
||||
+++ b/media/gpu/v4l2/v4l2_video_decoder_delegate_h265.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
#include <type_traits>
|
||||
|
||||
#include "base/logging.h"
|
||||
+#include "build/build_config.h"
|
||||
#include "media/gpu/macros.h"
|
||||
#include "media/gpu/v4l2/v4l2_decode_surface.h"
|
||||
#include "media/gpu/v4l2/v4l2_decode_surface_handler.h"
|
||||
@@ -410,8 +411,14 @@ V4L2VideoDecoderDelegateH265::SubmitFrameMetadata(
|
||||
.pic_order_cnt_val = pic->pic_order_cnt_val_,
|
||||
.short_term_ref_pic_set_size = static_cast<__u16>(slice_hdr->st_rps_bits),
|
||||
.long_term_ref_pic_set_size = static_cast<__u16>(slice_hdr->lt_rps_bits),
|
||||
+#if BUILDFLAG(IS_CHROMEOS)
|
||||
+ // .num_delta_pocs_of_ref_rps_idx is upstream but not yet pulled
|
||||
+ // into linux build sysroot.
|
||||
+ // TODO(wenst): Remove once linux-libc-dev package is updated to
|
||||
+ // at least v6.5 in the sysroots.
|
||||
.num_delta_pocs_of_ref_rps_idx =
|
||||
static_cast<__u8>(slice_hdr->st_ref_pic_set.rps_idx_num_delta_pocs),
|
||||
+#endif
|
||||
.flags = static_cast<__u64>(
|
||||
(pic->irap_pic_ ? V4L2_HEVC_DECODE_PARAM_FLAG_IRAP_PIC : 0) |
|
||||
((pic->nal_unit_type_ >= H265NALU::IDR_W_RADL &&
|
@ -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
|
||||
CHROMIUM_FLAGS=""
|
||||
CHROMIUM_FLAGS+=" --disable-features=AudioServiceSandbox,Vulkan"
|
||||
CHROMIUM_FLAGS+=" --enable-features=VaapiVideoDecoder,VaapiVideoEncoder,VaapiVideoDecodeLinuxGL"
|
||||
CHROMIUM_FLAGS+=" --enable-features=VaapiVideoEncoder,VaapiVideoDecodeLinuxGL"
|
||||
|
Loading…
Reference in new issue