Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(823)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java

Issue 2156673002: Disallow theme colors with luminance > 0.94 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/util/ColorUtils.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
index 414dcbecd1fb554637f68483cebf059444b0a323..d59029e6b1cd600a6c2a1dfb844f0e22705cbabb 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/tab/Tab.java
@@ -84,6 +84,7 @@ import org.chromium.chrome.browser.tabmodel.TabModel.TabSelectionType;
import org.chromium.chrome.browser.tabmodel.TabModelImpl;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.tabmodel.TabReparentingParams;
+import org.chromium.chrome.browser.util.ColorUtils;
import org.chromium.components.dom_distiller.core.DomDistillerUrlUtils;
import org.chromium.components.navigation_interception.InterceptNavigationDelegate;
import org.chromium.components.security_state.ConnectionSecurityLevel;
@@ -1085,6 +1086,7 @@ public class Tab implements ViewGroup.OnHierarchyChangeListener,
// corresponds to the didChangeThemeColor in WebContentsObserver.
if (getWebContents() != null && didWebContentsThemeColorChange) {
themeColor = getWebContents().getThemeColor();
+ if (themeColor != 0 && !ColorUtils.isValidThemeColor(themeColor)) themeColor = 0;
}
// Do not apply the theme color if there are any security issues on the page.
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/util/ColorUtils.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698