| Index: chrome/renderer/resources/extensions/web_view.js
|
| diff --git a/chrome/renderer/resources/extensions/web_view.js b/chrome/renderer/resources/extensions/web_view.js
|
| index 7187089b371c112eed89b24a005f09f7e79c979c..d6143d1d2a08d0687abaea2ef5863a182bd752d2 100644
|
| --- a/chrome/renderer/resources/extensions/web_view.js
|
| +++ b/chrome/renderer/resources/extensions/web_view.js
|
| @@ -48,12 +48,16 @@ function WebView(node) {
|
|
|
| this.objectNode_ = document.createElement('object');
|
| this.objectNode_.type = 'application/browser-plugin';
|
| - // The <object> node fills in the <browser> container.
|
| + // The <object> node fills in the <webview> container.
|
| this.objectNode_.style.width = '100%';
|
| this.objectNode_.style.height = '100%';
|
| WEB_VIEW_ATTRIBUTES.forEach(function(attributeName) {
|
| - this.objectNode_.setAttribute(
|
| - attributeName, this.node_.getAttribute(attributeName));
|
| + // Only copy attributes that have been assigned values, rather than copying
|
| + // a series of undefined attributes to BrowserPlugin.
|
| + if (this.node_.hasAttribute(attributeName)) {
|
| + this.objectNode_.setAttribute(
|
| + attributeName, this.node_.getAttribute(attributeName));
|
| + }
|
| }, this);
|
|
|
| shadowRoot.appendChild(this.objectNode_);
|
|
|