Use tabIndex in the Web Inspector for focusable areas.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jun 2008 22:32:34 +0000 (22:32 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Jun 2008 22:32:34 +0000 (22:32 +0000)
commita7f540851d96dd41cea8a5f81f7fa62aa4ae5af4
treeab2b7992dc51e46e5df66784a89e61858b050194
parent919fd0a1761f95c2e5fc0a79d7587ffcd3b2691e
    Use tabIndex in the Web Inspector for focusable areas.
        https://bugs.webkit.org/show_bug.cgi?id=19583

        Reviewed by Adam Roben.

        * page/inspector/Console.js:
        (WebInspector.Console): No longer make the messagesElement
        focusable since the engine handles the case for us. The promptElement
        now handles the key events.
        (WebInspector.Console.prototype.show): Set the current focus element
        to the prompt element.
        (WebInspector.Console.prototype.hide): Set the current focus element
        to WebInspector.previousFocusElement.
        (WebInspector.Console.prototype._messagesFocused): Removed.
        * page/inspector/DataGrid.js:
        (WebInspector.DataGrid): Remove the focusable class.
        * page/inspector/DatabaseQueryView.js:
        (WebInspector.DatabaseQueryView): Remove the focusable class. Set
        tabIndex to 0. The promptElement now handles the key events.
        (WebInspector.DatabaseQueryView.prototype._focused): Removed.
        * page/inspector/inspector.css: Updated selectors to use :focus
        instead of .focused and .blurred.
        * page/inspector/inspector.html: Removed focusable, focused and blurred
        classes and added tabindex attributes.
        * page/inspector/inspector.js:
        (WebInspector.get previousFocusElement): Added. Returns _previousFocusElement.
        (WebInspector.set currentFocusElement): Simplified. Stores the previous element
        in _previousFocusElement for clients that need it. Calls focus on the passed
        in element or blur on the previous element.
        (WebInspector.loaded): Removed the event listener for mousedown. Renamed
        changeFocus to focusChanged.
        (WebInspector.focusChanged): Renamed from changeFocus. Just sets the
        currentFocusElement to the event target.
        (WebInspector.startEditing): Changed to use tabIndex and blur events.
        Add a more robust check for restoring focus to the previous element
        when editing finishes that catches focused descendants.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@34631 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/page/inspector/Console.js
WebCore/page/inspector/DataGrid.js
WebCore/page/inspector/DatabaseQueryView.js
WebCore/page/inspector/inspector.css
WebCore/page/inspector/inspector.html
WebCore/page/inspector/inspector.js