diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /devtools/client/debugger/src/actions | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/debugger/src/actions')
-rw-r--r-- | devtools/client/debugger/src/actions/context-menus/editor.js | 21 |
1 files changed, 8 insertions, 13 deletions
diff --git a/devtools/client/debugger/src/actions/context-menus/editor.js b/devtools/client/debugger/src/actions/context-menus/editor.js index 1cad1e2131..4785c963cb 100644 --- a/devtools/client/debugger/src/actions/context-menus/editor.js +++ b/devtools/client/debugger/src/actions/context-menus/editor.js @@ -73,7 +73,7 @@ export function showEditorContextMenu(event, editor, location) { }; } -export function showEditorGutterContextMenu(event, editor, location, lineText) { +export function showEditorGutterContextMenu(event, line, location, lineText) { return async ({ dispatch, getState }) => { const { source } = location; const state = getState(); @@ -90,7 +90,7 @@ export function showEditorGutterContextMenu(event, editor, location, lineText) { { type: "separator" }, blackBoxLineMenuItem( source, - editor, + line, blackboxedRanges, isSourceOnIgnoreList, location.line, @@ -178,7 +178,7 @@ const blackBoxMenuItem = ( const blackBoxLineMenuItem = ( selectedSource, - editor, + { from, to }, blackboxedRanges, isSourceOnIgnoreList, // the clickedLine is passed when the context menu @@ -187,10 +187,6 @@ const blackBoxLineMenuItem = ( clickedLine = null, dispatch ) => { - const { codeMirror } = editor; - const from = codeMirror.getCursor("from"); - const to = codeMirror.getCursor("to"); - const startLine = clickedLine ?? toSourceLine(selectedSource.id, from.line); const endLine = clickedLine ?? toSourceLine(selectedSource.id, to.line); @@ -251,16 +247,12 @@ const blackBoxLineMenuItem = ( const blackBoxLinesMenuItem = ( selectedSource, - editor, + { from, to }, blackboxedRanges, isSourceOnIgnoreList, clickedLine, dispatch ) => { - const { codeMirror } = editor; - const from = codeMirror.getCursor("from"); - const to = codeMirror.getCursor("to"); - const startLine = toSourceLine(selectedSource.id, from.line); const endLine = toSourceLine(selectedSource.id, to.line); @@ -408,7 +400,10 @@ function editorMenuItems({ items.push( blackBoxSourceLinesMenuItem( source, - editor, + { + from: editor.codeMirror.getCursor("from"), + to: editor.codeMirror.getCursor("to"), + }, blackboxedRanges, isSourceOnIgnoreList, null, |