Merge pull request #4777 from deepak1556/webview_background_patch

webview: allow setting background color
This commit is contained in:
Cheng Zhao 2016-03-15 21:12:04 +09:00
commit e50ba35871
9 changed files with 5 additions and 73 deletions

View file

@ -77,20 +77,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) {
@ -292,7 +278,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);