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

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

Issue 2747553002: [DevTools] Rework Popover API (Closed)
Patch Set: rebased Created 3 years, 9 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/timeline/TimelineUIUtils.js
diff --git a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
index 614b50997494af98739f689e5915f0946cbf70a6..ee01b9a3a9629474052c8fa8135cff90a62f92e3 100644
--- a/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
+++ b/third_party/WebKit/Source/devtools/front_end/timeline/TimelineUIUtils.js
@@ -694,7 +694,7 @@ Timeline.TimelineUIUtils = class {
var url = TimelineModel.TimelineData.forEvent(event).url;
event[Timeline.TimelineUIUtils._previewElementSymbol] = await new Promise(fulfill => {
if (url)
- Components.DOMPresentationUtils.buildImagePreviewContents(target, url, false, fulfill);
+ Components.DOMPresentationUtils.buildImagePreviewContents(target, url, false).then(fulfill);
else if (TimelineModel.TimelineData.forEvent(event).picture)
Timeline.TimelineUIUtils.buildPicturePreviewContent(event, target, fulfill);
else
@@ -1131,13 +1131,15 @@ Timeline.TimelineUIUtils = class {
* @param {function(?Element)} fulfill
*/
function action(fulfill) {
- Components.DOMPresentationUtils.buildImagePreviewContents(
- /** @type {!SDK.Target} */ (target), request.url, false, saveImage);
+ Components.DOMPresentationUtils
+ .buildImagePreviewContents(
+ /** @type {!SDK.Target} */ (target), request.url, false)
+ .then(saveImage);
/**
- * @param {!Element=} element
+ * @param {?Element} element
*/
function saveImage(element) {
- request.previewElement = element || null;
+ request.previewElement = element;
fulfill(request.previewElement);
}
}

Powered by Google App Engine
This is Rietveld 408576698