Speed up the the JavaScript syntax highlighter by generating
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Aug 2008 18:48:37 +0000 (18:48 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Aug 2008 18:48:37 +0000 (18:48 +0000)
commitaab7cfaf428d3ca1583bd257037863532e6a79ef
tree95435212ee02601a81cb07a89b82f14f0e5002fb
parent227bc6e0b3ccab0e407df64145507045a2453ab7
    Speed up the the JavaScript syntax highlighter by generating
        the finders only once per script instead of per line.

        https://bugs.webkit.org/show_bug.cgi?id=20346

        Reviewed by Adam Roben.

        * page/inspector/SourceFrame.js:
        (WebInspector.SourceFrame.prototype._syntaxHighlightJavascriptLine):
        Removed, factored into syntaxHighlightJavascript as an inline function.
        (WebInspector.SourceFrame.prototype.syntaxHighlightJavascript):
        Pulled in the _syntaxHighlightJavascriptLine so it will create a closure.
        Generate the finders before iterating the lines.

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