Web Inspector: refactor "script or resource" mess in scripts panel. - use sourceName instead of scriptOrResource - replace two huge functions _addScriptToFilesMenu and _showScriptOrResource that are calling each other recursively with small one-purpose non-recursive functions
Created attachment 83320 [details] Patch.
Comment on attachment 83320 [details] Patch. View in context: https://bugs.webkit.org/attachment.cgi?id=83320&action=review r+ with nits and request for tests. > LayoutTests/inspector/debugger/scripts-panel.html:30 > + InspectorTest.runDebuggerTestSuite([ InspectorTest.runTestSuite ? > Source/WebCore/inspector/front-end/ScriptsPanel.js:335 > + // 1) Added script url is the first item in files select Can you add tests for these? (I.e. make sure SourceFrame is not created). There was a huge regression once in this logic. > Source/WebCore/inspector/front-end/ScriptsPanel.js:540 > + _showSourceFrame: function(sourceName, addToBackForwardList, saveAsLastViewedScriptFile) saveAsLastViewedScriptFile -> userGesture? Aslo, I'd prefer couple of wrapper functions with sound names instead of these two boolean params all over the calling code.
Committed r79555: <http://trac.webkit.org/changeset/79555>