Index: extensions/renderer/resources/web_view.js |
diff --git a/extensions/renderer/resources/web_view.js b/extensions/renderer/resources/web_view.js |
index 9829bd9f0a057038f06fe406fb5865fd6a38d3d1..98c80b95ab27c0b3471c32fef5e91c78be6b2000 100644 |
--- a/extensions/renderer/resources/web_view.js |
+++ b/extensions/renderer/resources/web_view.js |
@@ -292,7 +292,11 @@ WebViewInternal.prototype.validateExecuteCodeCall = function() { |
*/ |
WebViewInternal.prototype.executeScript = function(var_args) { |
this.validateExecuteCodeCall(); |
- var args = $Array.concat([this.guestInstanceId, this.src], |
+ var webview_src = this.src; |
+ if (this.baseUrlForDataUrl != '') { |
+ webview_src = this.baseUrlForDataUrl; |
+ } |
+ var args = $Array.concat([this.guestInstanceId, webview_src], |
$Array.slice(arguments)); |
$Function.apply(WebView.executeScript, null, args); |
}; |
@@ -302,7 +306,11 @@ WebViewInternal.prototype.executeScript = function(var_args) { |
*/ |
WebViewInternal.prototype.insertCSS = function(var_args) { |
this.validateExecuteCodeCall(); |
- var args = $Array.concat([this.guestInstanceId, this.src], |
+ var webview_src = this.src; |
+ if (this.baseUrlForDataUrl != '') { |
+ webview_src = this.baseUrlForDataUrl; |
+ } |
+ var args = $Array.concat([this.guestInstanceId, webview_src], |
$Array.slice(arguments)); |
$Function.apply(WebView.insertCSS, null, args); |
}; |
@@ -726,7 +734,9 @@ WebViewInternal.prototype.setupEventProperty = function(eventName) { |
// Updates state upon loadcommit. |
WebViewInternal.prototype.onLoadCommit = function( |
- currentEntryIndex, entryCount, processId, url, isTopLevel) { |
+ baseUrlForDataUrl, currentEntryIndex, entryCount, |
+ processId, url, isTopLevel) { |
+ this.baseUrlForDataUrl = baseUrlForDataUrl; |
this.currentEntryIndex = currentEntryIndex; |
this.entryCount = entryCount; |
this.processId = processId; |