Don't return attributes from from WebViewImpl::setupWebViewAttributes

This commit is contained in:
Kevin Sawicki 2016-03-10 13:08:38 -08:00
parent cd327e65cb
commit 5ed6c7714b

View file

@ -297,7 +297,6 @@ class BlinkFeaturesAttribute extends WebViewAttribute {
// Sets up all of the webview attributes. // Sets up all of the webview attributes.
WebViewImpl.prototype.setupWebViewAttributes = function() { WebViewImpl.prototype.setupWebViewAttributes = function() {
var attribute, autosizeAttributes, i, len, results;
this.attributes = {}; this.attributes = {};
this.attributes[webViewConstants.ATTRIBUTE_ALLOWTRANSPARENCY] = new AllowTransparencyAttribute(this); this.attributes[webViewConstants.ATTRIBUTE_ALLOWTRANSPARENCY] = new AllowTransparencyAttribute(this);
this.attributes[webViewConstants.ATTRIBUTE_AUTOSIZE] = new AutosizeAttribute(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_ALLOWPOPUPS] = new BooleanAttribute(webViewConstants.ATTRIBUTE_ALLOWPOPUPS, this);
this.attributes[webViewConstants.ATTRIBUTE_PRELOAD] = new PreloadAttribute(this); this.attributes[webViewConstants.ATTRIBUTE_PRELOAD] = new PreloadAttribute(this);
this.attributes[webViewConstants.ATTRIBUTE_BLINKFEATURES] = new BlinkFeaturesAttribute(this); this.attributes[webViewConstants.ATTRIBUTE_BLINKFEATURES] = new BlinkFeaturesAttribute(this);
autosizeAttributes = [webViewConstants.ATTRIBUTE_MAXHEIGHT, webViewConstants.ATTRIBUTE_MAXWIDTH, webViewConstants.ATTRIBUTE_MINHEIGHT, webViewConstants.ATTRIBUTE_MINWIDTH];
results = []; const autosizeAttributes = [webViewConstants.ATTRIBUTE_MAXHEIGHT, webViewConstants.ATTRIBUTE_MAXWIDTH, webViewConstants.ATTRIBUTE_MINHEIGHT, webViewConstants.ATTRIBUTE_MINWIDTH];
for (i = 0, len = autosizeAttributes.length; i < len; i++) { autosizeAttributes.forEach((attribute) => {
attribute = autosizeAttributes[i]; this.attributes[attribute] = new AutosizeDimensionAttribute(attribute, this);
results.push(this.attributes[attribute] = new AutosizeDimensionAttribute(attribute, this)); });
}
return results;
}; };