Skip to content

Commit 45a62a6

Browse files
Kateryna ProkopenkoDevtools-frontend LUCI CQ
authored andcommitted
[GM3Restyling] Use native menu for flame chart context menu
Screenshot: https://imgur.com/a/IUDnyUA Bug: 378634065 Change-Id: Ie1f504b716f15a101c9cc558d1ba3d57f81a399f Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/6044315 Commit-Queue: Kateryna Prokopenko <[email protected]> Reviewed-by: Kim-Anh Tran <[email protected]> Auto-Submit: Kateryna Prokopenko <[email protected]> Commit-Queue: Kim-Anh Tran <[email protected]>
1 parent dac243e commit 45a62a6

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

front_end/ui/legacy/components/perf_ui/FlameChart.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,25 +1421,22 @@ export class FlameChart extends Common.ObjectWrapper.eventMixin<EventTypes, type
14211421
// |highlightedEntryIndex| might be correct, but to make the code easier
14221422
// to maintain, let's use |selectedEntryIndex|.
14231423
this.contextMenu = this.dataProvider.customizedContextMenu?.(event, this.selectedEntryIndex, groupIndex) ??
1424-
new UI.ContextMenu.ContextMenu(event, {useSoftMenu: true});
1424+
new UI.ContextMenu.ContextMenu(event);
14251425

14261426
// Generate context menu entries for annotations.
14271427
const annotationSection = this.contextMenu.section('annotations');
1428-
const labelEntryAnnotationOption = annotationSection.appendItem(i18nString(UIStrings.labelEntry), () => {
1428+
annotationSection.appendItem(i18nString(UIStrings.labelEntry), () => {
14291429
this.dispatchEventToListeners(
14301430
Events.ENTRY_LABEL_ANNOTATION_ADDED, {entryIndex: this.selectedEntryIndex, withLinkCreationButton: false});
14311431
}, {
14321432
jslogContext: 'timeline.annotations.create-entry-label',
14331433
});
14341434

1435-
labelEntryAnnotationOption.setShortcut('Double Click');
1436-
1437-
const linkEntriesAnnotationOption = annotationSection.appendItem(i18nString(UIStrings.linkEntries), () => {
1435+
annotationSection.appendItem(i18nString(UIStrings.linkEntries), () => {
14381436
this.dispatchEventToListeners(Events.ENTRIES_LINK_ANNOTATION_CREATED, {entryFromIndex: this.selectedEntryIndex});
14391437
}, {
14401438
jslogContext: 'timeline.annotations.create-entries-link',
14411439
});
1442-
linkEntriesAnnotationOption.setShortcut('Double Click');
14431440

14441441
annotationSection.appendItem(i18nString(UIStrings.deleteAnnotations), () => {
14451442
this.dataProvider.deleteAnnotationsForEntry?.(this.selectedEntryIndex);

0 commit comments

Comments
 (0)