2017-09-12 19:21:18 +02:00
|
|
|
diff --git build/config/compiler/BUILD.gn build/config/compiler/BUILD.gn
|
2018-08-09 22:18:24 +02:00
|
|
|
index 7cb21711aa1b..afbddcd5b394 100644
|
2017-09-12 19:21:18 +02:00
|
|
|
--- build/config/compiler/BUILD.gn
|
|
|
|
+++ build/config/compiler/BUILD.gn
|
2018-07-31 21:21:39 +02:00
|
|
|
@@ -153,7 +153,7 @@ declare_args() {
|
2018-07-02 19:11:49 +02:00
|
|
|
!use_clang_coverage && !(is_android && use_order_profiling) &&
|
2018-06-01 21:16:26 +02:00
|
|
|
(use_lld ||
|
2018-04-19 17:44:42 +02:00
|
|
|
(use_gold &&
|
|
|
|
- ((!is_android && linux_use_bundled_binutils) || is_chromeos ||
|
|
|
|
+ ((!is_android && linux_use_bundled_binutils && current_cpu != "x86") || is_chromeos ||
|
|
|
|
!(current_cpu == "x86" || current_cpu == "x64"))))
|
2018-03-20 21:15:08 +01:00
|
|
|
}
|
|
|
|
|
2018-02-15 01:12:09 +01:00
|
|
|
diff --git chrome/browser/ui/libgtkui/gtk_util.cc chrome/browser/ui/libgtkui/gtk_util.cc
|
2018-08-09 22:18:24 +02:00
|
|
|
index 39bf49c7b111..ad7b054e185f 100644
|
2018-02-15 01:12:09 +01:00
|
|
|
--- chrome/browser/ui/libgtkui/gtk_util.cc
|
|
|
|
+++ chrome/browser/ui/libgtkui/gtk_util.cc
|
2018-08-09 22:18:24 +02:00
|
|
|
@@ -239,6 +239,7 @@ float GetDeviceScaleFactor() {
|
2018-03-20 21:15:08 +01:00
|
|
|
return linux_ui ? linux_ui->GetDeviceScaleFactor() : 1;
|
2017-12-07 22:44:24 +01:00
|
|
|
}
|
|
|
|
|
2018-02-15 01:12:09 +01:00
|
|
|
+#if GTK_MAJOR_VERSION > 2
|
|
|
|
using GtkSetState = void (*)(GtkWidgetPath*, gint, GtkStateFlags);
|
|
|
|
PROTECTED_MEMORY_SECTION base::ProtectedMemory<GtkSetState>
|
|
|
|
_gtk_widget_path_iter_set_state;
|
2018-08-09 22:18:24 +02:00
|
|
|
@@ -246,6 +247,7 @@ PROTECTED_MEMORY_SECTION base::ProtectedMemory<GtkSetState>
|
2018-02-15 01:12:09 +01:00
|
|
|
using GtkSetObjectName = void (*)(GtkWidgetPath*, gint, const char*);
|
|
|
|
PROTECTED_MEMORY_SECTION base::ProtectedMemory<GtkSetObjectName>
|
|
|
|
_gtk_widget_path_iter_set_object_name;
|
2017-12-07 22:44:24 +01:00
|
|
|
+#endif
|
|
|
|
|
|
|
|
} // namespace
|
|
|
|
|
2018-08-09 22:18:24 +02:00
|
|
|
@@ -403,10 +405,12 @@ ScopedStyleContext AppendCssNodeToStyleContext(GtkStyleContext* context,
|
2018-02-15 01:12:09 +01:00
|
|
|
NOTREACHED();
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
+#if GTK_MAJOR_VERSION > 2
|
|
|
|
static base::ProtectedMemory<GtkSetObjectName>::Initializer init(
|
|
|
|
&_gtk_widget_path_iter_set_object_name,
|
|
|
|
reinterpret_cast<GtkSetObjectName>(dlsym(
|
|
|
|
GetGtkSharedLibrary(), "gtk_widget_path_iter_set_object_name")));
|
|
|
|
+#endif
|
|
|
|
switch (part_type) {
|
|
|
|
case CSS_NAME: {
|
|
|
|
if (GtkVersionCheck(3, 20)) {
|
2018-08-09 22:18:24 +02:00
|
|
|
@@ -451,6 +455,7 @@ ScopedStyleContext AppendCssNodeToStyleContext(GtkStyleContext* context,
|
2018-02-15 01:12:09 +01:00
|
|
|
// widgets specially if they want to.
|
|
|
|
gtk_widget_path_iter_add_class(path, -1, "chromium");
|
2017-12-07 22:44:24 +01:00
|
|
|
|
2018-02-15 01:12:09 +01:00
|
|
|
+#if GTK_MAJOR_VERSION > 2
|
|
|
|
if (GtkVersionCheck(3, 14)) {
|
|
|
|
static base::ProtectedMemory<GtkSetState>::Initializer init(
|
|
|
|
&_gtk_widget_path_iter_set_state,
|
2018-08-09 22:18:24 +02:00
|
|
|
@@ -459,6 +464,7 @@ ScopedStyleContext AppendCssNodeToStyleContext(GtkStyleContext* context,
|
2018-02-15 01:12:09 +01:00
|
|
|
DCHECK(*_gtk_widget_path_iter_set_state);
|
|
|
|
base::UnsanitizedCfiCall(_gtk_widget_path_iter_set_state)(path, -1, state);
|
2017-12-07 22:44:24 +01:00
|
|
|
}
|
2018-02-15 01:12:09 +01:00
|
|
|
+#endif
|
2017-12-07 22:44:24 +01:00
|
|
|
|
2018-02-15 01:12:09 +01:00
|
|
|
ScopedStyleContext child_context(gtk_style_context_new());
|
|
|
|
gtk_style_context_set_path(child_context, path);
|
2018-05-20 15:51:42 +02:00
|
|
|
diff --git chrome/browser/ui/libgtkui/native_theme_gtk2.cc chrome/browser/ui/libgtkui/native_theme_gtk2.cc
|
2018-07-13 21:29:20 +02:00
|
|
|
index b24ff4b95f97..49e80717b1d6 100644
|
2018-05-20 15:51:42 +02:00
|
|
|
--- chrome/browser/ui/libgtkui/native_theme_gtk2.cc
|
|
|
|
+++ chrome/browser/ui/libgtkui/native_theme_gtk2.cc
|
|
|
|
@@ -163,6 +163,8 @@ SkColor NativeThemeGtk2::GetSystemColor(ColorId color_id) const {
|
|
|
|
return GetBgColor(GetMenu(), NORMAL);
|
2018-04-19 17:44:42 +02:00
|
|
|
|
2018-05-20 15:51:42 +02:00
|
|
|
// Label
|
|
|
|
+ case kColorId_ActionableSubmenuVerticalSeparatorColor:
|
|
|
|
+ case kColorId_TouchableMenuItemLabelColor:
|
|
|
|
case kColorId_LabelEnabledColor:
|
|
|
|
return GetTextColor(GetEntry(), NORMAL);
|
|
|
|
case kColorId_LabelDisabledColor:
|
2018-07-12 19:57:48 +02:00
|
|
|
diff --git ui/accessibility/platform/atk_util_auralinux_gtk2.cc ui/accessibility/platform/atk_util_auralinux_gtk2.cc
|
2018-08-09 22:18:24 +02:00
|
|
|
index 5bcccd9cd98c..fa581fbe23b1 100644
|
2018-07-12 19:57:48 +02:00
|
|
|
--- ui/accessibility/platform/atk_util_auralinux_gtk2.cc
|
|
|
|
+++ ui/accessibility/platform/atk_util_auralinux_gtk2.cc
|
|
|
|
@@ -48,6 +48,7 @@ GnomeAccessibilityModuleInitFunc GetAccessibilityModuleInitFunc() {
|
|
|
|
return init_func;
|
|
|
|
}
|
|
|
|
|
|
|
|
+NO_SANITIZE("cfi-icall")
|
|
|
|
void FinishAccessibilityInitOnMainThread(
|
|
|
|
GnomeAccessibilityModuleInitFunc init_func) {
|
|
|
|
if (!init_func) {
|