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

Commit 3cf7fe5

Browse files
author
Yusuf Ozuysal
committed
Don't update the title to about:blank on first show for custom tabs
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}
1 parent 40503d3 commit 3cf7fe5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,10 @@ public void setTitleToPageTitle() {
214214

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

0 commit comments

Comments
 (0)