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..88c6eb961362bc95eb02bd59cd010fa4c0de4c24 100644 |
--- a/extensions/renderer/resources/web_view.js |
+++ b/extensions/renderer/resources/web_view.js |
@@ -288,21 +288,29 @@ WebViewInternal.prototype.validateExecuteCodeCall = function() { |
}; |
/** |
- * @private |
- */ |
+ * @private |
+ */ |
Fady Samuel
2014/09/25 20:09:03
Just remove this comment. We don't use this style
paulmeyer
2014/09/25 20:39:51
Done.
|
WebViewInternal.prototype.executeScript = function(var_args) { |
this.validateExecuteCodeCall(); |
- var args = $Array.concat([this.guestInstanceId, this.src], |
+ var webview_src = this.src; |
+ if (this.baseURLForDataURL != '') { |
Fady Samuel
2014/09/25 20:09:03
s/URL/Url preferred in Javascript.
paulmeyer
2014/09/25 20:39:51
Done.
|
+ webview_src = this.baseURLForDataURL; |
+ } |
+ var args = $Array.concat([this.guestInstanceId, webview_src], |
$Array.slice(arguments)); |
$Function.apply(WebView.executeScript, null, args); |
}; |
/** |
- * @private |
- */ |
+ * @private |
+ */ |
Fady Samuel
2014/09/25 20:09:03
Just remove this comment. we don't use this style
paulmeyer
2014/09/25 20:39:51
Done.
|
WebViewInternal.prototype.insertCSS = function(var_args) { |
this.validateExecuteCodeCall(); |
- var args = $Array.concat([this.guestInstanceId, this.src], |
+ var webview_src = this.src; |
+ if (this.baseURLForDataURL != '') { |
Fady Samuel
2014/09/25 20:09:03
s/URL/Url preferred in Javascript.
paulmeyer
2014/09/25 20:39:51
Done.
|
+ 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; |