Made clicking a Console message URL originating from a JavaScript
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 May 2008 06:05:57 +0000 (06:05 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 31 May 2008 06:05:57 +0000 (06:05 +0000)
commit05366677414943a57020eedb29abd2bf540e0d46
tree640b4e53aaba7b0f200b64efddeac00d81b04bfb
parent5fea7d6b3865174d23782e8e6fb1629a9b002239
    Made clicking a Console message URL originating from a JavaScript
        source show the Resource in the Scripts panel. This only happens
        when the debugger is attached.

        Reviewed by Adam Roben.

        * page/inspector/Console.js:
        (WebInspector.Console.prototype._formaterror):
        Add a preferredPanel of "scripts".
        (WebInspector.ConsoleMessage.prototype.toMessageElement):
        Add a preferredPanel of "scripts" when the source is JS.
        * page/inspector/ScriptView.js:
        (WebInspector.ScriptView.prototype.highlightLine): Added.
        Calls through to the sourceFrame. Matches SourceView.
        * page/inspector/ScriptsPanel.js:
        (WebInspector.ScriptsPanel.prototype.canShowResource): Added.
        Returns true if the debugger is attached and the resource has scripts.
        (WebInspector.ScriptsPanel.prototype._showScriptOrResource): Call
        highlightLine on the view.
        * page/inspector/inspector.js:
        (WebInspector.documentClick): Pass the preferredPanel to showResourceForURL.
        (WebInspector.showResourceForURL): Resolve the preferredPanel from the string
        passed in. Checks if the panel implements showResource and canShowResource.
        Reverts to the Resources panel if any of that is false or not implemented.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/page/inspector/Console.js
WebCore/page/inspector/ScriptView.js
WebCore/page/inspector/ScriptsPanel.js
WebCore/page/inspector/inspector.js