Don't return attributes from from WebViewImpl::setupWebViewAttributes
This commit is contained in:
Родитель
cd327e65cb
Коммит
5ed6c7714b
|
@ -297,7 +297,6 @@ class BlinkFeaturesAttribute extends WebViewAttribute {
|
|||
|
||||
// Sets up all of the webview attributes.
|
||||
WebViewImpl.prototype.setupWebViewAttributes = function() {
|
||||
var attribute, autosizeAttributes, i, len, results;
|
||||
this.attributes = {};
|
||||
this.attributes[webViewConstants.ATTRIBUTE_ALLOWTRANSPARENCY] = new AllowTransparencyAttribute(this);
|
||||
this.attributes[webViewConstants.ATTRIBUTE_AUTOSIZE] = new AutosizeAttribute(this);
|
||||
|
@ -311,11 +310,9 @@ WebViewImpl.prototype.setupWebViewAttributes = function() {
|
|||
this.attributes[webViewConstants.ATTRIBUTE_ALLOWPOPUPS] = new BooleanAttribute(webViewConstants.ATTRIBUTE_ALLOWPOPUPS, this);
|
||||
this.attributes[webViewConstants.ATTRIBUTE_PRELOAD] = new PreloadAttribute(this);
|
||||
this.attributes[webViewConstants.ATTRIBUTE_BLINKFEATURES] = new BlinkFeaturesAttribute(this);
|
||||
autosizeAttributes = [webViewConstants.ATTRIBUTE_MAXHEIGHT, webViewConstants.ATTRIBUTE_MAXWIDTH, webViewConstants.ATTRIBUTE_MINHEIGHT, webViewConstants.ATTRIBUTE_MINWIDTH];
|
||||
results = [];
|
||||
for (i = 0, len = autosizeAttributes.length; i < len; i++) {
|
||||
attribute = autosizeAttributes[i];
|
||||
results.push(this.attributes[attribute] = new AutosizeDimensionAttribute(attribute, this));
|
||||
}
|
||||
return results;
|
||||
|
||||
const autosizeAttributes = [webViewConstants.ATTRIBUTE_MAXHEIGHT, webViewConstants.ATTRIBUTE_MAXWIDTH, webViewConstants.ATTRIBUTE_MINHEIGHT, webViewConstants.ATTRIBUTE_MINWIDTH];
|
||||
autosizeAttributes.forEach((attribute) => {
|
||||
this.attributes[attribute] = new AutosizeDimensionAttribute(attribute, this);
|
||||
});
|
||||
};
|
||||
|
|
Загрузка…
Ссылка в новой задаче