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

Issue 802172 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

Android Oreo WebView background color wrong when calling loadData and loadUrl and vice versa

Reported by alexande...@gmail.com, Jan 16 2018

Issue description

THIS TEMPLATE IS FOR FILING BUGS ON THE ANDROID SYSTEM WEBVIEW. GENERAL WEB
BUGS SHOULD BE FILED USING A DIFFERENT TEMPLATE!

Device name: Nexus 5X / Google Pixel
Android version: 8.0.0 / 8.1.0
WebView version (from system settings -> Apps -> Android System WebView): 63.0.3239.111
Application: 
Application version:

URLs (if applicable):



Steps to reproduce:
(1) Create a WebView
(2) Set the background color
(3) Call WebView.laodUrl()
(4) Call WebView.loadData

or 

(1) Run the provided project on an Android Oreo Phone


Expected result:
The background color of the WebView should not change after calling loadUrl and loadData.

Actual result:
The background color of the WebView changes to white when calling loadUrl after loadData or vice versa.
This can be seen in the attached screenshots.
The issue was only observed on Android 8.0+.


 
Oreo_webView_background_color_issue.zip
970 KB Download
expected_after_load_data.png
97.4 KB View Download
actual_after_load_data.png
56.0 KB View Download
Labels: Needs-triage-Mobile
Cc: pnangunoori@chromium.org
Labels: WV-Triaged Needs-Feedback
alexander.bendl.at@ -- Thanks for reporting the issue along with the sample project. Could you please provide the test APK file. This would help us in further triaging the issue.

Thanks in advance!
Thanks for the quick response. I attached the APK to this comment.
Oreo_webView_background_color_issue.apk
81.8 KB Download
Project Member

Comment 4 by sheriffbot@chromium.org, Jan 17 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "pnangunoori@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Untriaged (was: Unconfirmed)
This also reproduces on 55 + N with multiprocess enabled.
Labels: M-65
Tested the issue in Android and able to reproduce the issue. Similar behavior is observed since Chrome #58.0.3029.125

Steps Followed:
1. Updated the Webview with respective Chrome verson.
2. Launched the test application provided in C#3.
3. Observed that background color changes to White after some time.

Chrome versions tested:
58.0.3029.125, 63.0.3239.111(Stable), 65.0.3323.3(Canary)

OS:
Android 8

Android Devices:
Pixel XL

This seems to be a Non-Regression issue as same behavior is seen since M58. Untriaged for further input's on this issue.

Please navigate to below link for log's and video--
go/chrome-androidlogs/802172

Note: 
This issue is not observed in Desktop.
in AwRenderViewHostExt::RenderViewCreated we send AwViewMsg_SetBackgroundColor but unfortunately in multiprocess that message arrives before the new blink WebViewImpl is created, which means the colour change is applied to the existing object which is replaced at some subsequent point. Then eventually SynchronousCompositorHost::UpdateFrameMetaData receives new frame metadata (including the white background originating from the new WebViewImpl object).

Sending the message from AwRenderViewHostExt::RenderViewReady works, at the expense of a flash of white background.
Project Member

Comment 9 by bugdroid1@chromium.org, Jan 19 2018

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

commit 5a21b8e6ec6485014c57a2ab79dd024fa318203a
Author: Tobias Sargeant <tobiasjs@google.com>
Date: Fri Jan 19 16:55:22 2018

aw: Update background colour on newly created main frames.

Bug:  802172 
Change-Id: I5841fe34ee7226611a5ad2c66cf3c971fd40c670
Reviewed-on: https://chromium-review.googlesource.com/873977
Commit-Queue: Tobias Sargeant <tobiasjs@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#530540}
[modify] https://crrev.com/5a21b8e6ec6485014c57a2ab79dd024fa318203a/android_webview/browser/renderer_host/aw_render_view_host_ext.cc
[modify] https://crrev.com/5a21b8e6ec6485014c57a2ab79dd024fa318203a/android_webview/browser/renderer_host/aw_render_view_host_ext.h

Owner: tobiasjs@chromium.org
Status: Fixed (was: Untriaged)
Fix verified on 66.0.3328.0,tested on Pixel/8.1.0.

However, issue is still reproducible on latest M65. 
tobiasjs@, will this be merged to M65?
Cc: sandeepkumars@chromium.org
 Issue 805378  has been merged into this issue.
Cc: cma...@chromium.org
Labels: Merge-Request-65
Fix was in 66.0.3326.0 - I don't have a strong opinion either way on whether this should be merged to m65. Could you please decide, Estelle?
Additional (AOSP) report in b/71987074
Labels: -Pri-3 Pri-2

Comment 16 Deleted

Project Member

Comment 17 by sheriffbot@chromium.org, Jan 26 2018

Labels: -Merge-Request-65 Hotlist-Merge-Approved Merge-Approved-65
Your change meets the bar and is auto-approved for M65. Please go ahead and merge the CL to branch 3325 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), bhthompson@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Friendly reminder to please merge to M65 branch 3325 soon.
Project Member

Comment 19 by bugdroid1@chromium.org, Jan 31 2018

Labels: -merge-approved-65 merge-merged-3325
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/56048f54771391554a11b465c8105c72523d98ef

commit 56048f54771391554a11b465c8105c72523d98ef
Author: Tobias Sargeant <tobiasjs@google.com>
Date: Wed Jan 31 11:38:03 2018

aw: Update background colour on newly created main frames.

TBR=tobiasjs@google.com

(cherry picked from commit 5a21b8e6ec6485014c57a2ab79dd024fa318203a)

Bug:  802172 
Change-Id: I5841fe34ee7226611a5ad2c66cf3c971fd40c670
Reviewed-on: https://chromium-review.googlesource.com/873977
Commit-Queue: Tobias Sargeant <tobiasjs@chromium.org>
Reviewed-by: Bo <boliu@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#530540}
Reviewed-on: https://chromium-review.googlesource.com/894405
Reviewed-by: Tobias Sargeant <tobiasjs@chromium.org>
Cr-Commit-Position: refs/branch-heads/3325@{#198}
Cr-Branched-From: bc084a8b5afa3744a74927344e304c02ae54189f-refs/heads/master@{#530369}
[modify] https://crrev.com/56048f54771391554a11b465c8105c72523d98ef/android_webview/browser/renderer_host/aw_render_view_host_ext.cc
[modify] https://crrev.com/56048f54771391554a11b465c8105c72523d98ef/android_webview/browser/renderer_host/aw_render_view_host_ext.h

Fix verified, tested on Pixel 2XL/OPM1.171019.021, Chrome: 65.0.3325.53

Sign in to add a comment