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

Unified Diff: Source/devtools/front_end/timeline/TimelineUIUtils.js

Issue 726653003: DevTools: add Paint Profiler link to layer & event details views (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 1 month 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: Source/devtools/front_end/timeline/TimelineUIUtils.js
diff --git a/Source/devtools/front_end/timeline/TimelineUIUtils.js b/Source/devtools/front_end/timeline/TimelineUIUtils.js
index 5380ab6ce5731a065f67236881c349e93b983816..267e0659922629f176cdf499e7b04e93abdcb45e 100644
--- a/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -876,11 +876,19 @@ WebInspector.TimelineUIUtils.buildPicturePreviewContent = function(event, target
return;
}
var container = createElement("div");
- container.className = "image-preview-container";
+ container.classList.add("image-preview-container", "vbox", "link");
var img = container.createChild("img");
img.src = imageURL;
+ var paintProfilerButton = container.createChild("a");
+ paintProfilerButton.textContent = WebInspector.UIString("Paint Profiler");
+ container.addEventListener("click", showPaintProfiler, false);
callback(container);
}
+
+ function showPaintProfiler()
+ {
+ WebInspector.TimelinePanel.instance().select(WebInspector.TimelineSelection.fromTraceEvent(event), WebInspector.TimelinePanel.DetailsTab.PaintProfiler);
+ }
}
/**
« no previous file with comments | « Source/devtools/front_end/timeline/TimelinePanel.js ('k') | Source/devtools/front_end/timeline/timelinePanel.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698