Skip to content

Commit

Permalink
Revert "Revert "[Home] Account for incognito in modern tab title""
Browse files Browse the repository at this point in the history
This reverts commit b0bb3a8.

Reason for revert: <INSERT REASONING HERE>

Original change's description:
> Revert "[Home] Account for incognito in modern tab title"
> 
> This reverts commit 6dd103c.
> 
> Reason for revert: this broke
> https://uberchromegw.corp.google.com/i/official.android/builders/official-arm/builds/2411
> with error message:
> ../../chrome/android/java/src/org/chromium/chrome/browser/compositor/LayerTitleCache.java:128: error: cannot find symbol
>         if (!DeviceFormFactor.isTablet() && !FeatureUtilities.isChromeHomeModernEnabled())
> 
> Original change's description:
> > [Home] Account for incognito in modern tab title
> > 
> > Titles in Chrome Modern are not always white, incognito still uses a
> > dark theme.
> > 
> > BUG=760740
> > [email protected]
> > 
> > (cherry picked from commit fba6588)
> > 
> > Change-Id: I82800234101f3755dcb3214c65942ae82e59b3d9
> > Reviewed-on: https://chromium-review.googlesource.com/651570
> > Reviewed-by: Theresa <[email protected]>
> > Commit-Queue: Matthew Jones <[email protected]>
> > Cr-Original-Commit-Position: refs/heads/master@{#499781}
> > Reviewed-on: https://chromium-review.googlesource.com/661319
> > Reviewed-by: Matthew Jones <[email protected]>
> > Cr-Commit-Position: refs/branch-heads/3202@{crosswalk-project#147}
> > Cr-Branched-From: fa6a5d8-refs/heads/master@{#499098}
> 
> [email protected],[email protected]
> 
> Change-Id: I12ab4b52aa3c9f6007f26388cfe14e40b3e90f90
> No-Presubmit: true
> No-Tree-Checks: true
> No-Try: true
> Bug: 764200,760740
> Reviewed-on: https://chromium-review.googlesource.com/663381
> Reviewed-by: John Mellor <[email protected]>
> Cr-Commit-Position: refs/branch-heads/3202@{crosswalk-project#162}
> Cr-Branched-From: fa6a5d8-refs/heads/master@{#499098}

[email protected],[email protected],[email protected]

Change-Id: I8afb1fdf63fefacf33bba8bde5a9065eac85a295
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 764200, 760740
Reviewed-on: https://chromium-review.googlesource.com/663738
Reviewed-by: Matthew Jones <[email protected]>
Cr-Commit-Position: refs/branch-heads/3202@{crosswalk-project#166}
Cr-Branched-From: fa6a5d8-refs/heads/master@{#499098}
  • Loading branch information
iotitan committed Sep 12, 2017
1 parent d378c50 commit 31e34ea
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.chromium.chrome.browser.tab.Tab;
import org.chromium.chrome.browser.tabmodel.TabModelSelector;
import org.chromium.chrome.browser.util.ColorUtils;
import org.chromium.chrome.browser.util.FeatureUtilities;
import org.chromium.ui.base.DeviceFormFactor;
import org.chromium.ui.resources.ResourceManager;
import org.chromium.ui.resources.dynamics.BitmapDynamicResource;
Expand Down Expand Up @@ -125,14 +126,14 @@ private String getUpdatedTitleInternal(Tab tab, String titleString,

boolean isDarkTheme = tab.isIncognito();
// The theme might require lighter text.
if (!DeviceFormFactor.isTablet()) {
if (!DeviceFormFactor.isTablet() && !FeatureUtilities.isChromeHomeModernEnabled()) {
isDarkTheme |= ColorUtils.shouldUseLightForegroundOnBackground(tab.getThemeColor());
}

ColorUtils.shouldUseLightForegroundOnBackground(tab.getThemeColor());
boolean isRtl = tab.isTitleDirectionRtl();
TitleBitmapFactory titleBitmapFactory = isDarkTheme
? mDarkTitleBitmapFactory : mStandardTitleBitmapFactory;
TitleBitmapFactory titleBitmapFactory =
isDarkTheme ? mDarkTitleBitmapFactory : mStandardTitleBitmapFactory;

Title title = mTitles.get(tabId);
if (title == null) {
Expand Down

0 comments on commit 31e34ea

Please sign in to comment.