Don't return attributes from from WebViewImpl::setupWebViewAttributes

This commit is contained in:
Kevin Sawicki 2016-03-10 13:08:38 -08:00
Родитель cd327e65cb
Коммит 5ed6c7714b
1 изменённых файлов: 5 добавлений и 8 удалений

Просмотреть файл

@ -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);
});
};