webview: allow setting background color

This commit is contained in:
Robo 2016-03-13 09:46:33 +05:30
parent 100ea975bd
commit f8f3fba433
11 changed files with 17 additions and 69 deletions

View file

@ -81,20 +81,6 @@ class BooleanAttribute extends WebViewAttribute {
}
}
// Attribute that specifies whether transparency is allowed in the webview.
class AllowTransparencyAttribute extends BooleanAttribute {
constructor(webViewImpl) {
super(webViewConstants.ATTRIBUTE_ALLOWTRANSPARENCY, webViewImpl);
}
handleMutation() {
if (!this.webViewImpl.guestInstanceId) {
return;
}
return guestViewInternal.setAllowTransparency(this.webViewImpl.guestInstanceId, this.getValue());
}
}
// Attribute used to define the demension limits of autosizing.
class AutosizeDimensionAttribute extends WebViewAttribute {
constructor(name, webViewImpl) {
@ -298,7 +284,6 @@ class BlinkFeaturesAttribute extends WebViewAttribute {
// Sets up all of the webview attributes.
WebViewImpl.prototype.setupWebViewAttributes = function() {
this.attributes = {};
this.attributes[webViewConstants.ATTRIBUTE_ALLOWTRANSPARENCY] = new AllowTransparencyAttribute(this);
this.attributes[webViewConstants.ATTRIBUTE_AUTOSIZE] = new AutosizeAttribute(this);
this.attributes[webViewConstants.ATTRIBUTE_PARTITION] = new PartitionAttribute(this);
this.attributes[webViewConstants.ATTRIBUTE_SRC] = new SrcAttribute(this);