Commit f8eee19d authored by fsamuel@chromium.org's avatar fsamuel@chromium.org

<webview>: Fixed out-of-date comment + Only copy attributes to BrowserPlugin if they exist.

BUG=none
TBR=fsamuel@chromium.org

Review URL: https://codereview.chromium.org/11783092

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@176109 0039d316-1c4b-4281-b951-d872f2087c98
parent 3f6d9fc8
......@@ -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_);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment