Titanium JIRA Archive
Appcelerator Community (AC)

[AC-1114] Ti.UI.webview is not correctly displayed for some url

GitHub Issuen/a
TypeBug
Priorityn/a
StatusResolved
ResolutionCannot Reproduce
Resolution Date2015-12-22T08:54:23.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid
ReporterSiwei Shen
AssigneeRadamantis Torres-Lechuga
Created2015-12-18T07:36:49.000+0000
Updated2016-03-08T07:37:28.000+0000

Description

for some url, the webView doesn't work. e.g. :
url = http://www.aoyou.com/domesticpackage/p31372i2  

this doesn't work, the page is not shown.

Ti.UI.createWebView({ url: url });
expected result: the web page shown actual result: the web page is not shown. with no error message. However, if we did the following coding way, it works ( added borderWidth and borderColor attributes)

Ti.UI.createWebView({    
		    url: url,
		    borderWidth: 0,
                    borderColor: 'white'
	});

Comments

  1. Sharif AbuDarda 2015-12-20

    Hello [~sg552], This is not a bug. It described in our [documentation](http://docs.appcelerator.com/platform/latest/#!/api/Titanium.UI.WebView). Starting with Android 4.4 (API Level 19), the WebView component is based off of Chromium, introducing a number of changes to its rendering engine. By default, the Chromium WebView uses hardware acceleration, which may cause content to fail to render. If the WebView fails to render the content, the web view will clear itself, displaying only the default background color. The following log messages will be displayed in the console:
       [WARN] :   AwContents: nativeOnDraw failed; clearing to background color.
       [INFO] :   chromium: [INFO:async_pixel_transfer_manager_android.cc(56)]
       
    Which i observed in my test. To workaround this issue, you can enable software rendering by setting the webview's "borderRadius" property to a value greater than zero. This is platform default behavior. Thanks.
  2. Siwei Shen 2015-12-20

    hi Sharif AbuDarda, thanks for your detailed explanation! I am very clear!

JSON Source