Factors out the TextPrompt.scanBackwards function into a generic
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Aug 2008 16:46:56 +0000 (16:46 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 5 Aug 2008 16:46:56 +0000 (16:46 +0000)
commitbccee97fa093e0b69ff8f94ebc2b59d5678dc4d6
tree45d463f139c7b4851e9b6b1230de01ee782d2369
parent57e61fbd12e5879ed52f1cf6c9eec76fdcd03bc0
    Factors out the TextPrompt.scanBackwards function into a generic
        helper function on the Node prototype, named rangeOfWord.

        Reviewed by Adam Roben.

        * page/inspector/Console.js:
        (WebInspector.Console.prototype.completions): Use rangeOfWord.
        * page/inspector/TextPrompt.js:
        (WebInspector.TextPrompt.prototype.complete): Ditto.
        (WebInspector.TextPrompt.prototype.scanBackwards): Removed.
        * page/inspector/utilities.js:
        (Node.prototype.rangeOfWord): Added. Copied from TextPrompt.scanBackwards,
        and added a direction argument allowing scanning forward, backward or
        both directions from the offset.

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