Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: aef0fd4fa3ee6ff6676045658292b246cd93887f https://github.com/WebKit/WebKit/commit/aef0fd4fa3ee6ff6676045658292b246cd93887f Author: Devin Rousso <drou...@apple.com> Date: 2022-10-05 (Wed, 05 Oct 2022)
Changed paths: M Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js Log Message: ----------- Web Inspector: Inline breakpoint indicators appear for every line after refresh+hitting a breakpoint https://bugs.webkit.org/show_bug.cgi?id=246117 Reviewed by Patrick Angle. When dealing with minified code, although Web Inspector will attempt to automatically pretty-print, this happens after the initial content is shown. As a result, any attempt to use the formatter source map created for pretty-printing will fail, meaning that attempting to map locations will always result in the original location. This means that the range given to `Debugger.getBreakpointLocations` will (likely) be the entire file since (most of) the content will be on the first line. Instead, have the frontend only fetch the entire line if the code is not minified or if it's been pretty-printed. * Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js: (WI.SourceCodeTextEditor.prototype._prepareEditorForInitialContent): (WI.SourceCodeTextEditor.prototype.async _addBreakpointWidgetsForLine): Ensure that `_isProbablyMinified` is set before attempting to (re)show breakpoints after recieving the initial content. Canonical link: https://commits.webkit.org/255200@main _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes