Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3899)

Unified Diff: chrome/renderer/resources/extensions/web_view.js

Issue 11783092: <webview>: Fixed out-of-date comment + Only copy attributes to BrowserPlugin if they exist. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698