Skip to content
This repository has been archived by the owner on Apr 3, 2020. It is now read-only.

Commit

Permalink
Don't update the title to about:blank on first show for custom tabs
Browse files Browse the repository at this point in the history
Currently custom tabs don't show a title if the title is still the url,
but due to optimizations inside warmup(), the title might end up being
about:blank (even if the current url is not about:blank). The domain
explicitly guards against this but title doesn't. Update the title to
also never show about:blank

BUG=579647

Review URL: https://codereview.chromium.org/1649183002 .

Cr-Commit-Position: refs/branch-heads/2623@{#201}
Cr-Branched-From: 92d7753-refs/heads/master@{#369907}
  • Loading branch information
Yusuf Ozuysal committed Jan 29, 2016
1 parent 40503d3 commit 3cf7fe5
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ public void setTitleToPageTitle() {

// It takes some time to parse the title of the webcontent, and before that Tab#getTitle
// always return the url. We postpone the title animation until the title is authentic.
if (mShouldShowTitle && !TextUtils.equals(currentTab.getTitle(), currentTab.getUrl())) {
// TODO(yusufo): Clear the explicit references to about:blank here and for domain.
if (mShouldShowTitle
&& !TextUtils.equals(currentTab.getTitle(), currentTab.getUrl())
&& !TextUtils.equals(currentTab.getTitle(), "about:blank")) {
long duration = System.currentTimeMillis() - mInitializeTimeStamp;
if (duration >= TITLE_ANIM_DELAY_MS) {
mTitleAnimationStarter.run();
Expand Down

0 comments on commit 3cf7fe5

Please sign in to comment.