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

Issue 600496 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

A WebView with AllowsTransparency should allow transparency when a PNG is returned from captureVisibleRegion()

Project Member Reported by wjmaclean@chromium.org, Apr 4 2016

Issue description


What steps will reproduce the problem?
(1) Use WebView.captureVisibleRegion() to capture the contents of a WebView that (i) has AllowsTransparency set, and (ii) is displaying transparent content (e.g. an SVG drawing). Request the data as a PNG image.

What is the expected output?

The returned PNG should retain the transparency of the contents.

What do you see instead?

The transparency information is discarded, and the image has a solid background.


Please use labels and text to provide additional information.

captureVisibleRegion for WebView was implemented in

https://codereview.chromium.org/1635513003/

Comments on this issue describe this problem.

 
Cc: aval...@chromium.org
 Issue 600494  has been merged into this issue.
Status: Started (was: Untriaged)
Wrote a test case that displays <webview> with and without transparency.

The screenshot button will capture the webview's visible region and display that png in a new window (with checkerboard background to show transparency).

See https://github.com/avallee/chrome-samples/tree/master/webview_transparency
Cc: jarek.fo...@gmail.com
Here's a preview of rendering SVGs in a webview.
screenshot-notransparency.png
181 KB View Download
screenshot-withtransparency.png
222 KB View Download
Status: Fixed (was: Started)
Thanks for fixing this bug! I will test it as soon as it hits Canary.
@#8: did this resolve your issue?
@#9: Yes, everything seems to work fine. I have managed to successfully replace the buggy canvas-based rasterisation code with this new API. I will open a separate bug in case I find any edge cases where it breaks.

Sign in to add a comment