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

Unified Diff: third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js

Issue 2122353002: [DevTools] Make resource tree model optional (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 5 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
Index: third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js b/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
index a299b322c0083a4f601e8c748fcbac8a795a3ded..e41955529986fc42f2f9bddcba62191d8acb9996 100644
--- a/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/components/DOMPresentationUtils.js
@@ -151,19 +151,19 @@ WebInspector.DOMPresentationUtils.linkifyDeferredNodeReference = function(deferr
}
/**
- * @param {!WebInspector.Target} target
+ * @param {!WebInspector.ResourceTreeModel} resourceTreeModel
* @param {string} originalImageURL
* @param {boolean} showDimensions
* @param {function(!Element=)} userCallback
* @param {!Object=} precomputedFeatures
*/
-WebInspector.DOMPresentationUtils.buildImagePreviewContents = function(target, originalImageURL, showDimensions, userCallback, precomputedFeatures)
+WebInspector.DOMPresentationUtils.buildImagePreviewContents = function(resourceTreeModel, originalImageURL, showDimensions, userCallback, precomputedFeatures)
{
- var resource = target.resourceTreeModel.resourceForURL(originalImageURL);
+ var resource = resourceTreeModel.resourceForURL(originalImageURL);
var imageURL = originalImageURL;
if (!isImageResource(resource) && precomputedFeatures && precomputedFeatures.currentSrc) {
imageURL = precomputedFeatures.currentSrc;
- resource = target.resourceTreeModel.resourceForURL(imageURL);
+ resource = resourceTreeModel.resourceForURL(imageURL);
}
if (!isImageResource(resource)) {
userCallback();

Powered by Google App Engine
This is Rietveld 408576698