Merge pull request #4777 from deepak1556/webview_background_patch
webview: allow setting background color
This commit is contained in:
commit
e50ba35871
9 changed files with 5 additions and 73 deletions
|
@ -106,7 +106,4 @@ module.exports = {
|
|||
setSize: function(guestInstanceId, params) {
|
||||
return ipcRenderer.send('ATOM_SHELL_GUEST_VIEW_MANAGER_SET_SIZE', guestInstanceId, params);
|
||||
},
|
||||
setAllowTransparency: function(guestInstanceId, allowtransparency) {
|
||||
return ipcRenderer.send('ATOM_SHELL_GUEST_VIEW_MANAGER_SET_ALLOW_TRANSPARENCY', guestInstanceId, allowtransparency);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
module.exports = {
|
||||
// Attributes.
|
||||
ATTRIBUTE_ALLOWTRANSPARENCY: 'allowtransparency',
|
||||
ATTRIBUTE_AUTOSIZE: 'autosize',
|
||||
ATTRIBUTE_MAXHEIGHT: 'maxheight',
|
||||
ATTRIBUTE_MAXWIDTH: 'maxwidth',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue