File chromium-79-gcc-name-clash.patch of Package chromium.openSUSE_Backports_SLE-15-SP1_Update
From e925deab264e5ebc3c5c13415aa3d44a746e8d45 Mon Sep 17 00:00:00 2001
From: Jose Dapena Paz <jose.dapena@lge.com>
Date: Fri, 25 Oct 2019 14:53:51 +0000
Subject: [PATCH] GCC: avoid clash of WebThemeEngine::ForcedColors with ForcedColors enum class
GCC fails to build because the declaration of the enum class ForcedColors
clashes with the GetForcedColors method.
Bug: 819294
Change-Id: I5c7647978d15c771f5372a8c70ac6aeb2284fb2f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879452
Reviewed-by: Kentaro Hara <haraken@chromium.org>
Commit-Queue: José Dapena Paz <jose.dapena@lge.com>
Cr-Commit-Position: refs/heads/master@{#709469}
(backported to M79)
---
Index: chromium-79.0.3945.36/content/child/webthemeengine_impl_android.cc
===================================================================
--- chromium-79.0.3945.36.orig/content/child/webthemeengine_impl_android.cc
+++ chromium-79.0.3945.36/content/child/webthemeengine_impl_android.cc
@@ -228,7 +228,7 @@ void WebThemeEngineAndroid::Paint(
native_theme_extra_params, NativeColorScheme(color_scheme));
}
-blink::ForcedColors WebThemeEngineAndroid::ForcedColors() const {
+blink::ForcedColors WebThemeEngineAndroid::GetForcedColors() const {
return forced_colors_;
}
Index: chromium-79.0.3945.36/content/child/webthemeengine_impl_android.h
===================================================================
--- chromium-79.0.3945.36.orig/content/child/webthemeengine_impl_android.h
+++ chromium-79.0.3945.36/content/child/webthemeengine_impl_android.h
@@ -22,7 +22,7 @@ class WebThemeEngineAndroid : public bli
const blink::WebRect& rect,
const blink::WebThemeEngine::ExtraParams* extra_params,
blink::WebColorScheme color_scheme) override;
- blink::ForcedColors ForcedColors() const override;
+ blink::ForcedColors GetForcedColors() const override;
void SetForcedColors(const blink::ForcedColors forced_colors) override;
private:
Index: chromium-79.0.3945.36/content/child/webthemeengine_impl_default.cc
===================================================================
--- chromium-79.0.3945.36.orig/content/child/webthemeengine_impl_default.cc
+++ chromium-79.0.3945.36/content/child/webthemeengine_impl_default.cc
@@ -232,7 +232,7 @@ void WebThemeEngineDefault::cacheScrollB
}
#endif
-blink::ForcedColors WebThemeEngineDefault::ForcedColors() const {
+blink::ForcedColors WebThemeEngineDefault::GetForcedColors() const {
return ui::NativeTheme::GetInstanceForWeb()->UsesHighContrastColors()
? blink::ForcedColors::kActive
: blink::ForcedColors::kNone;
Index: chromium-79.0.3945.36/content/child/webthemeengine_impl_default.h
===================================================================
--- chromium-79.0.3945.36.orig/content/child/webthemeengine_impl_default.h
+++ chromium-79.0.3945.36/content/child/webthemeengine_impl_default.h
@@ -39,7 +39,7 @@ class WebThemeEngineDefault : public bli
int32_t vertical_arrow_bitmap_height,
int32_t horizontal_arrow_bitmap_width);
#endif
- blink::ForcedColors ForcedColors() const override;
+ blink::ForcedColors GetForcedColors() const override;
void SetForcedColors(const blink::ForcedColors forced_colors) override;
};
Index: chromium-79.0.3945.36/content/child/webthemeengine_impl_mac.cc
===================================================================
--- chromium-79.0.3945.36.orig/content/child/webthemeengine_impl_mac.cc
+++ chromium-79.0.3945.36/content/child/webthemeengine_impl_mac.cc
@@ -6,7 +6,7 @@
namespace content {
-blink::ForcedColors WebThemeEngineMac::ForcedColors() const {
+blink::ForcedColors WebThemeEngineMac::GetForcedColors() const {
return forced_colors_;
}
Index: chromium-79.0.3945.36/content/child/webthemeengine_impl_mac.h
===================================================================
--- chromium-79.0.3945.36.orig/content/child/webthemeengine_impl_mac.h
+++ chromium-79.0.3945.36/content/child/webthemeengine_impl_mac.h
@@ -13,7 +13,7 @@ class WebThemeEngineMac : public blink::
public:
~WebThemeEngineMac() override {}
- blink::ForcedColors ForcedColors() const override;
+ blink::ForcedColors GetForcedColors() const override;
void SetForcedColors(const blink::ForcedColors forced_colors) override;
private:
Index: chromium-79.0.3945.36/third_party/blink/public/platform/web_theme_engine.h
===================================================================
--- chromium-79.0.3945.36.orig/third_party/blink/public/platform/web_theme_engine.h
+++ chromium-79.0.3945.36/third_party/blink/public/platform/web_theme_engine.h
@@ -226,7 +226,7 @@ class WebThemeEngine {
return base::nullopt;
}
- virtual ForcedColors ForcedColors() const { return ForcedColors::kNone; }
+ virtual ForcedColors GetForcedColors() const { return ForcedColors::kNone; }
virtual void SetForcedColors(const blink::ForcedColors forced_colors) {}
};
Index: chromium-79.0.3945.36/third_party/blink/renderer/core/css/media_values.cc
===================================================================
--- chromium-79.0.3945.36.orig/third_party/blink/renderer/core/css/media_values.cc
+++ chromium-79.0.3945.36/third_party/blink/renderer/core/css/media_values.cc
@@ -221,7 +221,7 @@ bool MediaValues::CalculatePrefersReduce
ForcedColors MediaValues::CalculateForcedColors() {
if (Platform::Current() && Platform::Current()->ThemeEngine())
- return Platform::Current()->ThemeEngine()->ForcedColors();
+ return Platform::Current()->ThemeEngine()->GetForcedColors();
else
return ForcedColors::kNone;
}
Index: chromium-79.0.3945.36/third_party/blink/renderer/core/dom/document.cc
===================================================================
--- chromium-79.0.3945.36.orig/third_party/blink/renderer/core/dom/document.cc
+++ chromium-79.0.3945.36/third_party/blink/renderer/core/dom/document.cc
@@ -8624,7 +8624,7 @@ void Document::ColorSchemeChanged() {
bool Document::InForcedColorsMode() const {
return RuntimeEnabledFeatures::ForcedColorsEnabled() && Platform::Current() &&
Platform::Current()->ThemeEngine() &&
- Platform::Current()->ThemeEngine()->ForcedColors() !=
+ Platform::Current()->ThemeEngine()->GetForcedColors() !=
ForcedColors::kNone;
}