New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 734500 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

WebAPKs: White splash screen shows up before web app content

Project Member Reported by fbeaufort@chromium.org, Jun 19 2017

Issue description

Chrome Version       : 61.0.3130.0
OS Version: 9658.0.0
URLs (if applicable) : https://biograf-155113.appspot.com

What steps will reproduce the problem?
1. Add official Google PWA Sample Media App (https://biograf-155113.appspot.com/) to the Home Screen
2. Launch it from the Home Screen

What is the expected result?
Splash screen shows up and provides a nice transition between Android OS and Web App. User can't tell if it's a native app or a web app.

What happens instead of that?
A big white splash screen appears before "real" web app content making it clear this is a web app ;(


Watch Google I/O talk: https://www.youtube.com/watch?v=_ssDaecATCM&t=1325

Note: this is not specific to this web app, I can reproduce with other web apps

 
Components: Mobile>WebAPKs
Labels: -OS-Chrome
Summary: WebAPKs: White splash screen shows up before web app content (was: White splash screen shows up before web app content)
Cc: dominickn@chromium.org
Owner: piotrs@chromium.org
Status: Assigned (was: Unconfirmed)
piotrs@, this sounds like  Issue 524438 ? Do you mind taking a look?
Components: UI>Browser>AppShortcuts
(gentle ping)
I will get to it very soon now. Needed to fix few other issues first.
Status: Started (was: Assigned)
Looking now.
Interesting fact for anyone who might look into this in the future is that it is not reproducible on a debug build. To repro this set all the debug flags to false, otherwise splash screen works fine.

Comment 9 by piotrs@chromium.org, Jul 13 2017

Cc: piotrs@chromium.org dfalcant...@chromium.org benwells@chromium.org lalitmag...@gmail.com
 Issue 524438  has been merged into this issue.
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5192ab32f8a99c87246b5343549aeea9e7f6fc1b

commit 5192ab32f8a99c87246b5343549aeea9e7f6fc1b
Author: Piotr Swigon <piotrs@chromium.org>
Date: Tue Jul 18 01:54:50 2017

[Installed PWA] Waits for a frame swap before hiding a splash screen.

This patch fixes the flash of white between the splash screen and the
web content in installed web apps. This is achieved with waiting for
a compositor frame swap before starting splash screen hiding animation.

Adding callbacks for next frame swap in CompositorViewHolder might not
be at the right level of abstraction - feedback welcome. I introduced
a generic mechanism as we might need it different places as well.
E.g. In CustomTabActivity the same issue is solved with a time delay,
which I plan to change to this mechanism in a follow up patch.

Existing tests for a webapp splash screen cover showing/hiding it in
various circumstances. Writing a specific test to assert flash of white
is fixed would be more work than it's worth it.

FYI: On Google Pixel this causes the splash screen to be shown about
50-100 later, which seems like the time time when flash of white was
visible.

Bug:  734500 
Change-Id: I70f8bde54f251c283e260d17a291685738f9e080
Reviewed-on: https://chromium-review.googlesource.com/569552
Commit-Queue: Piotr Swigon <piotrs@chromium.org>
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Reviewed-by: Khushal <khushalsagar@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487336}
[modify] https://crrev.com/5192ab32f8a99c87246b5343549aeea9e7f6fc1b/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java
[modify] https://crrev.com/5192ab32f8a99c87246b5343549aeea9e7f6fc1b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
[modify] https://crrev.com/5192ab32f8a99c87246b5343549aeea9e7f6fc1b/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappSplashScreenController.java
[modify] https://crrev.com/5192ab32f8a99c87246b5343549aeea9e7f6fc1b/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java

Status: Fixed (was: Started)
This should be fixed now.
Status: Started (was: Fixed)
I will be reverting the "fix". crbug.com/746616 shown there is something wrong and in the course of investigation I found that I'm listening on the browser-process compositor for browser UI instead of the renderer-process compositor that assembles web pages.

I expect to re-land the fix with listening to correct compositor sometime soon.
Project Member

Comment 13 by bugdroid1@chromium.org, Jul 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2f243a6243b8f899103ee5d90b97a0abb3a35211

commit 2f243a6243b8f899103ee5d90b97a0abb3a35211
Author: Piotr Swigon <piotrs@chromium.org>
Date: Thu Jul 20 05:09:38 2017

Revert "[Installed PWA] Waits for a frame swap before hiding a splash screen."

This reverts commit 5192ab32f8a99c87246b5343549aeea9e7f6fc1b.

Reason for revert: crbug.com/746616 TL;DR: we're listening for compositor frame swap on browser-process compositor instead of on the renderer-process compositor (which composites the page, instead of the browser UI).

Original change's description:
> [Installed PWA] Waits for a frame swap before hiding a splash screen.
> 
> This patch fixes the flash of white between the splash screen and the
> web content in installed web apps. This is achieved with waiting for
> a compositor frame swap before starting splash screen hiding animation.
> 
> Adding callbacks for next frame swap in CompositorViewHolder might not
> be at the right level of abstraction - feedback welcome. I introduced
> a generic mechanism as we might need it different places as well.
> E.g. In CustomTabActivity the same issue is solved with a time delay,
> which I plan to change to this mechanism in a follow up patch.
> 
> Existing tests for a webapp splash screen cover showing/hiding it in
> various circumstances. Writing a specific test to assert flash of white
> is fixed would be more work than it's worth it.
> 
> FYI: On Google Pixel this causes the splash screen to be shown about
> 50-100 later, which seems like the time time when flash of white was
> visible.
> 
> Bug:  734500 
> Change-Id: I70f8bde54f251c283e260d17a291685738f9e080
> Reviewed-on: https://chromium-review.googlesource.com/569552
> Commit-Queue: Piotr Swigon <piotrs@chromium.org>
> Reviewed-by: Matthew Jones <mdjones@chromium.org>
> Reviewed-by: Khushal <khushalsagar@chromium.org>
> Reviewed-by: Dominick Ng <dominickn@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#487336}

TBR=mdjones@chromium.org,khushalsagar@chromium.org,dominickn@chromium.org,piotrs@chromium.org

# Not skipping CQ checks because original CL landed > 1 day ago.

Bug:  734500 
Change-Id: Ib8afce105fa818b76492b8fce7da7d17c8e07e6a
Reviewed-on: https://chromium-review.googlesource.com/578631
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Piotr Swigon <piotrs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488141}
[modify] https://crrev.com/2f243a6243b8f899103ee5d90b97a0abb3a35211/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java
[modify] https://crrev.com/2f243a6243b8f899103ee5d90b97a0abb3a35211/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
[modify] https://crrev.com/2f243a6243b8f899103ee5d90b97a0abb3a35211/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappSplashScreenController.java
[modify] https://crrev.com/2f243a6243b8f899103ee5d90b97a0abb3a35211/chrome/android/javatests/src/org/chromium/chrome/browser/webapps/WebApkIntegrationTest.java

Labels: Merge-Request-61
I would like to merge commit 2f243a6243b8f899103ee5d90b97a0abb3a35211 into m61, it is a revert of a patch that causes relatively serious problems.
Project Member

Comment 15 by sheriffbot@chromium.org, Jul 24 2017

Labels: -Merge-Request-61 Merge-Review-61 Hotlist-Merge-Review
This bug requires manual review: Reverts referenced in bugdroid comments after merge request.
Please contact the milestone owner if you have questions.
Owners: amineer@(Android), cmasso@(iOS), ketakid @(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Reason for Merge Request:
Without this revert some PWAs in a standalone mode (e.g. Maps, Twitter) never get their splash screen hidden. This is severe, as my understanding is that Twitter PWA has decent-size user base.
Cc: amineer@chromium.org
Hi Alex, it's been almost a week since I proposed the merge. It seems to me I followed the right procedure, but let me know if there's something I've missed.
Labels: -Pri-3 Pri-1
Upping priority to reflect reality. I agree this is a significant issue
Labels: -Merge-Review-61 Merge-Approved-61
Sorry for the delay.  Approved for M61 branch 3163.  Please process ASAP.
Project Member

Comment 20 by sheriffbot@chromium.org, Aug 8 2017

This issue has been approved for a merge. Please merge the fix to any appropriate branches as soon as possible!

If all merges have been completed, please remove any remaining Merge-Approved labels from this issue.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: -Hotlist-Merge-Review -Merge-Approved-61
I must have made a mistake. Branch point is #488528, which is after the commit in question. I've also checked Chrome Beta and Twitter Lite does get its splash screen hidden.

Taking off the merge labels.
Project Member

Comment 22 by bugdroid1@chromium.org, Aug 16 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/aa7fa15ec4c7e97eaf67f08a3c3f985191b2c563

commit aa7fa15ec4c7e97eaf67f08a3c3f985191b2c563
Author: Piotr Swigon <piotrs@chromium.org>
Date: Wed Aug 16 00:58:42 2017

[Installed PWA] Waits for a frame swap before hiding a splash screen.

This patch fixes the flash of white between the splash screen and the
web content in installed web apps. This is achieved with waiting for
a compositor frame swap before starting splash screen hiding animation.

A generic mechanism is introduced as we might need it in different
places as well. E.g. In CustomTabActivity the same issue is solved with
a time delay, which I plan to change to this mechanism in a follow up
patch.

Existing tests for a webapp splash screen cover showing/hiding it in
various circumstances. Writing a specific test to assert flash of white
is fixed would be more work than it's worth it.

Bug:  734500 
Change-Id: Icc6c8c816179310e17bebf464de56d03721dd44e
Reviewed-on: https://chromium-review.googlesource.com/580014
Commit-Queue: Piotr Swigon <piotrs@chromium.org>
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#494645}
[modify] https://crrev.com/aa7fa15ec4c7e97eaf67f08a3c3f985191b2c563/chrome/android/java/src/org/chromium/chrome/browser/compositor/CompositorViewHolder.java
[modify] https://crrev.com/aa7fa15ec4c7e97eaf67f08a3c3f985191b2c563/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappActivity.java
[modify] https://crrev.com/aa7fa15ec4c7e97eaf67f08a3c3f985191b2c563/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappSplashScreenController.java

Status: Fixed (was: Started)
This should now be fixed.
Project Member

Comment 24 by bugdroid1@chromium.org, Aug 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ecdb2f2460355371cf7a91a3765249f346c914e5

commit ecdb2f2460355371cf7a91a3765249f346c914e5
Author: Piotr Swigon <piotrs@chromium.org>
Date: Fri Aug 18 06:23:55 2017

[WebApps] Hides splash screen on compositor redraw after page loads.

For some websites onPageLoadFinished is called before
didFirstVisuallyNonEmptyPaint. In such case flash of white content would
currently appear. This patch applies waiting for the compositor redraw
to ensure rendered content had enough time to reach the screen.

Bug:  734500 
Change-Id: Ic9f0a7e0e72e65370923a784b20fe36a8965d721
Reviewed-on: https://chromium-review.googlesource.com/620507
Reviewed-by: Dominick Ng <dominickn@chromium.org>
Commit-Queue: Piotr Swigon <piotrs@chromium.org>
Cr-Commit-Position: refs/heads/master@{#495485}
[modify] https://crrev.com/ecdb2f2460355371cf7a91a3765249f346c914e5/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappSplashScreenController.java

 Issue 547695  has been merged into this issue.
Cc: kgna...@chromium.org
Works as per expected behavior. Issue verified on 63.0.3214.0 

Sign in to add a comment