| Index: chrome/android/java/src/org/chromium/chrome/browser/util/ColorUtils.java
|
| diff --git a/chrome/android/java/src/org/chromium/chrome/browser/util/ColorUtils.java b/chrome/android/java/src/org/chromium/chrome/browser/util/ColorUtils.java
|
| index 90a29a79cb9ec49cce8f4946e32cf3b8990e48c8..2b7a7110b612bbe272d017bc47a34a70d38f9d8a 100644
|
| --- a/chrome/android/java/src/org/chromium/chrome/browser/util/ColorUtils.java
|
| +++ b/chrome/android/java/src/org/chromium/chrome/browser/util/ColorUtils.java
|
| @@ -10,6 +10,7 @@ import android.graphics.Color;
|
| import org.chromium.base.ApiCompatibilityUtils;
|
| import org.chromium.chrome.R;
|
| import org.chromium.chrome.browser.ntp.NewTabPage;
|
| +import org.chromium.chrome.browser.ntp.NtpColorUtils;
|
| import org.chromium.chrome.browser.tab.Tab;
|
|
|
| /**
|
| @@ -53,8 +54,16 @@ public class ColorUtils {
|
| /**
|
| * @return The base color for the textbox given a toolbar background color.
|
| */
|
| - public static int getTextBoxColorForToolbarBackground(int color) {
|
| - if (shouldUseOpaqueTextboxBackground(color)) return Color.WHITE;
|
| + public static int getTextBoxColorForToolbarBackground(Resources res, Tab tab, int color) {
|
| + if (shouldUseOpaqueTextboxBackground(color)) {
|
| + // NTP should have no visible textbox in the toolbar, so just return the toolbar's
|
| + // background color.
|
| + if (tab.getNativePage() instanceof NewTabPage) {
|
| + return NtpColorUtils.getToolbarBackgroundColorResource(res);
|
| + }
|
| +
|
| + return Color.WHITE;
|
| + }
|
| return getColorWithOverlay(Color.WHITE, color, LOCATION_BAR_TRANSPARENT_BACKGROUND_ALPHA);
|
| }
|
|
|
|
|