2929 */
3030
3131import * as Common from '../../core/common/common.js' ;
32- import * as Host from '../../core/host/host.js' ;
3332import * as i18n from '../../core/i18n/i18n.js' ;
3433import * as Root from '../../core/root/root.js' ;
3534import * as Bindings from '../../models/bindings/bindings.js' ;
@@ -214,11 +213,7 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
214213 return ;
215214 }
216215
217- // Differentiate between Mac and other platforms to use SoftContextMenu or native menus
218- // while we are gradually landing CLs to enable accelerators for native menus on Mac.
219- // We will use native menus disregarding of the platform once all CLs are in.
220- const useSoftMenu = Host . Platform . isMac ( ) ;
221- const contextMenu = new UI . ContextMenu . ContextMenu ( event , { useSoftMenu} ) ;
216+ const contextMenu = new UI . ContextMenu . ContextMenu ( event ) ;
222217
223218 if ( UI . ActionRegistry . ActionRegistry . instance ( ) . hasAction ( 'drjones.performance-panel-context' ) ) {
224219 const aiNode = this . getAIEventNodeTreeFromEntryIndex ( entryIndex ) ;
@@ -234,17 +229,17 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
234229 disabled : ! possibleActions ?. [ PerfUI . FlameChart . FilterAction . MERGE_FUNCTION ] ,
235230 jslogContext : 'hide-function' ,
236231 } ) ;
237- hideEntryOption . setShortcut ( 'H' ) ;
238232 hideEntryOption . setAccelerator ( UI . KeyboardShortcut . Keys . H , [ UI . KeyboardShortcut . Modifiers . None ] ) ;
233+ hideEntryOption . setIsDevToolsPerformanceMenuItem ( true ) ;
239234
240235 const hideChildrenOption = contextMenu . defaultSection ( ) . appendItem ( i18nString ( UIStrings . hideChildren ) , ( ) => {
241236 this . modifyTree ( PerfUI . FlameChart . FilterAction . COLLAPSE_FUNCTION , entryIndex ) ;
242237 } , {
243238 disabled : ! possibleActions ?. [ PerfUI . FlameChart . FilterAction . COLLAPSE_FUNCTION ] ,
244239 jslogContext : 'hide-children' ,
245240 } ) ;
246- hideChildrenOption . setShortcut ( 'C' ) ;
247241 hideChildrenOption . setAccelerator ( UI . KeyboardShortcut . Keys . C , [ UI . KeyboardShortcut . Modifiers . None ] ) ;
242+ hideChildrenOption . setIsDevToolsPerformanceMenuItem ( true ) ;
248243
249244 const hideRepeatingChildrenOption =
250245 contextMenu . defaultSection ( ) . appendItem ( i18nString ( UIStrings . hideRepeatingChildren ) , ( ) => {
@@ -253,17 +248,17 @@ export class TimelineFlameChartDataProvider extends Common.ObjectWrapper.ObjectW
253248 disabled : ! possibleActions ?. [ PerfUI . FlameChart . FilterAction . COLLAPSE_REPEATING_DESCENDANTS ] ,
254249 jslogContext : 'hide-repeating-children' ,
255250 } ) ;
256- hideRepeatingChildrenOption . setShortcut ( 'R' ) ;
257251 hideRepeatingChildrenOption . setAccelerator ( UI . KeyboardShortcut . Keys . R , [ UI . KeyboardShortcut . Modifiers . None ] ) ;
252+ hideRepeatingChildrenOption . setIsDevToolsPerformanceMenuItem ( true ) ;
258253
259254 const resetChildrenOption = contextMenu . defaultSection ( ) . appendItem ( i18nString ( UIStrings . resetChildren ) , ( ) => {
260255 this . modifyTree ( PerfUI . FlameChart . FilterAction . RESET_CHILDREN , entryIndex ) ;
261256 } , {
262257 disabled : ! possibleActions ?. [ PerfUI . FlameChart . FilterAction . RESET_CHILDREN ] ,
263258 jslogContext : 'reset-children' ,
264259 } ) ;
265- resetChildrenOption . setShortcut ( 'U' ) ;
266260 resetChildrenOption . setAccelerator ( UI . KeyboardShortcut . Keys . U , [ UI . KeyboardShortcut . Modifiers . None ] ) ;
261+ resetChildrenOption . setIsDevToolsPerformanceMenuItem ( true ) ;
267262
268263 contextMenu . defaultSection ( ) . appendItem ( i18nString ( UIStrings . resetTrace ) , ( ) => {
269264 this . modifyTree ( PerfUI . FlameChart . FilterAction . UNDO_ALL_ACTIONS , entryIndex ) ;
0 commit comments