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

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

Issue 11231086: Remove width and height property from <webview> tag. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments + Sync <browser> to <webview> renaming. Created 8 years, 2 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 | chrome/test/data/extensions/platform_apps/web_view/main.html » ('j') | 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 2d02c66efb9f2126f2b1382b683bfb0e5aceb6bf..2a299f7a1dc5ca55706b0f09f22daaf37c8034a8 100644
--- a/chrome/renderer/resources/extensions/web_view.js
+++ b/chrome/renderer/resources/extensions/web_view.js
@@ -7,7 +7,7 @@
// The actual tag is implemented via the browser plugin. The internals of this
// are hidden via Shadow DOM.
-var WEB_VIEW_ATTRIBUTES = ['src', 'width', 'height'];
+var WEB_VIEW_ATTRIBUTES = ['src'];
var WEB_VIEW_READONLY_ATTRIBUTES = ['contentWindow'];
@@ -56,6 +56,9 @@ function WebView(node) {
this.objectNode_ = document.createElement('object');
this.objectNode_.type = 'application/browser-plugin';
+ // The <object> node fills in the <browser> container.
+ this.objectNode_.style.width = '100%';
+ this.objectNode_.style.height = '100%';
WEB_VIEW_ATTRIBUTES.forEach(this.copyAttribute_, this);
shadowRoot.appendChild(this.objectNode_);
@@ -87,9 +90,7 @@ function WebView(node) {
// updates its src attribute on guest-initiated navigations.
return objectNode.src;
}
- var value = node.getAttribute(attributeName);
- var numericValue = parseInt(value, 10);
- return isNaN(numericValue) ? value : numericValue;
+ return node.getAttribute(attributeName);
},
set: function(value) {
node.setAttribute(attributeName, value);
« no previous file with comments | « no previous file | chrome/test/data/extensions/platform_apps/web_view/main.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698