Make clicking anywhere in a row in the DOM tree select that row's node
authoraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Mar 2008 20:39:18 +0000 (20:39 +0000)
committeraroben@apple.com <aroben@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 19 Mar 2008 20:39:18 +0000 (20:39 +0000)
commit0ec2424ddc6fee6a349806d4bcefcbebcdb718ea
treec091aad612d919cf858596ab8b697b26be94febc
parent97b3da0aa5eb7c2e3e53a888f52b4533abfba956
    Make clicking anywhere in a row in the DOM tree select that row's node

        We now have mousedown and dblclick event listeners on the root of the
        tree that forward the event to the node on the row the mouse is over.

        Reviewed by Tim Hatcher.

        * page/inspector/DocumentPanel.js:
        (WebInspector.DocumentPanel): Added a dblclick and mousedown event
        listeners to the root of the tree.
        (WebInspector.DocumentPanel._treeElementFromEvent): Added. Finds the
        tree element for the row underneath the mouse.
        (WebInspector.DocumentPanel._ondblclick): Added. Sends the dblclick
        event on to the tree element in the current row.
        (WebInspector.DocumentPanel._onmousedown): Added. Selects the tree
        element in the current row.
        * page/inspector/treeoutline.js:
        (TreeOutline.treeElementFromPoint): Added.
        (TreeElement.treeElementSelected): Changed to call
        TreeElement.isEventWithinDisclosureTriangle, and added an early return.
        (TreeElement.treeElementToggled): Ditto.
        (TreeElement.isEventWithinDisclosureTriangle): Added.
        * page/inspector/utilities.js:
        (Node.enclosingNodeOrSelfWithNodeNameInArray): Added.
        (Node.enclosingNodeOrSelfWithNodeName): Now just calls
        enclosingNodeOrSelfWithNodeNameInArray.
        (Elemnt.get totalOffsetLeft): Added.
        (Elemnt.get totalOffsetTop): Added.

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