diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:14:29 +0000 |
commit | fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8 (patch) | |
tree | 4c1ccaf5486d4f2009f9a338a98a83e886e29c97 /devtools/client/debugger/src/components/PrimaryPanes/Outline.js | |
parent | Releasing progress-linux version 124.0.1-1~progress7.99u1. (diff) | |
download | firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.tar.xz firefox-fbaf0bb26397aa498eb9156f06d5a6fe34dd7dd8.zip |
Merging upstream version 125.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'devtools/client/debugger/src/components/PrimaryPanes/Outline.js')
-rw-r--r-- | devtools/client/debugger/src/components/PrimaryPanes/Outline.js | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/devtools/client/debugger/src/components/PrimaryPanes/Outline.js b/devtools/client/debugger/src/components/PrimaryPanes/Outline.js index 79ebf7a38e..d52ed8ff40 100644 --- a/devtools/client/debugger/src/components/PrimaryPanes/Outline.js +++ b/devtools/client/debugger/src/components/PrimaryPanes/Outline.js @@ -82,6 +82,7 @@ export class Outline extends Component { selectedLocation: PropTypes.object.isRequired, getFunctionSymbols: PropTypes.func.isRequired, getClassSymbols: PropTypes.func.isRequired, + selectedSourceTextContent: PropTypes.object, canFetchSymbols: PropTypes.bool, }; } @@ -94,7 +95,8 @@ export class Outline extends Component { } componentDidUpdate(prevProps) { - const { cursorPosition, selectedLocation, canFetchSymbols } = this.props; + const { cursorPosition, selectedSourceTextContent, canFetchSymbols } = + this.props; if (cursorPosition && cursorPosition !== prevProps.cursorPosition) { this.setFocus(cursorPosition); } @@ -106,8 +108,11 @@ export class Outline extends Component { this.focusedElRef.scrollIntoView({ block: "center" }); } - // Lets make sure the source text has been loaded and is different - if (canFetchSymbols && prevProps.selectedLocation !== selectedLocation) { + // Lets make sure the source text has been loaded and it is different + if ( + canFetchSymbols && + prevProps.selectedSourceTextContent !== selectedSourceTextContent + ) { this.getClassAndFunctionSymbols(); } } @@ -133,8 +138,8 @@ export class Outline extends Component { } // Find items that enclose the selected location - const enclosedItems = [...classes, ...functions].filter( - ({ name, location }) => containsPosition(location, cursorPosition) + const enclosedItems = [...classes, ...functions].filter(({ location }) => + containsPosition(location, cursorPosition) ); if (!enclosedItems.length) { @@ -360,7 +365,7 @@ export class Outline extends Component { div( null, React.createElement(OutlineFilter, { - filter: filter, + filter, updateFilter: this.updateFilter, }), this.renderFunctions(functions), @@ -373,6 +378,7 @@ export class Outline extends Component { const mapStateToProps = state => { const selectedSourceTextContent = getSelectedSourceTextContent(state); return { + selectedSourceTextContent, selectedLocation: getSelectedLocation(state), canFetchSymbols: selectedSourceTextContent && isFulfilled(selectedSourceTextContent), |