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

Unified Diff: extensions/renderer/resources/guest_view/extension_view_attributes.js

Issue 928623002: <webview> + <extensionview>: Generalize setValueIgnoreMutation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | extensions/renderer/resources/guest_view/web_view_attributes.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/renderer/resources/guest_view/extension_view_attributes.js
diff --git a/extensions/renderer/resources/guest_view/extension_view_attributes.js b/extensions/renderer/resources/guest_view/extension_view_attributes.js
index d4bc0d61ec573a3e6635558c66ff4e2dbce9a819..e71d2eac3e0821bb360703463beec652cd97ea61 100644
--- a/extensions/renderer/resources/guest_view/extension_view_attributes.js
+++ b/extensions/renderer/resources/guest_view/extension_view_attributes.js
@@ -37,7 +37,7 @@ ExtensionViewAttribute.prototype.setValue = function(value) {
// Changes the attribute's value without triggering its mutation handler.
ExtensionViewAttribute.prototype.setValueIgnoreMutation = function(value) {
this.ignoreMutation = true;
- this.extensionViewImpl.element.setAttribute(this.name, value || '');
+ this.setValue(value);
this.ignoreMutation = false;
}
@@ -80,9 +80,7 @@ SrcAttribute.prototype.__proto__ = ExtensionViewAttribute.prototype;
SrcAttribute.prototype.setValueIgnoreMutation = function(value) {
this.observer.takeRecords();
- this.ignoreMutation = true;
- this.extensionViewImpl.element.setAttribute(this.name, value || '');
- this.ignoreMutation = false;
+ ExtensionViewAttribute.prototype.setValueIgnoreMutation.call(this, value);
}
SrcAttribute.prototype.handleMutation = function(oldValue, newValue) {
« no previous file with comments | « no previous file | extensions/renderer/resources/guest_view/web_view_attributes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698