Bug 48760

Summary: Web Inspector: highlight frame on hover in resources panel.
Product: WebKit Reporter: Pavel Feldman <pfeldman>
Component: Web Inspector (Deprecated)Assignee: Pavel Feldman <pfeldman>
Severity: Normal CC: apavlov, bweinstein, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
[PATCH] Proposed change. joepeck: review+, joepeck: commit-queue-

Description Pavel Feldman 2010-11-01 08:33:46 PDT
When I hover over a frame element in the new resources panel, I'd like to see it highlighted in the UI (i.e. its owner element is highlighted).
Comment 1 Pavel Feldman 2010-11-01 08:39:31 PDT
Created attachment 72509 [details]
[PATCH] Proposed change.
Comment 2 Joseph Pecoraro 2010-11-01 15:05:13 PDT
Comment on attachment 72509 [details]
[PATCH] Proposed change.

View in context: https://bugs.webkit.org/attachment.cgi?id=72509&action=review

r+ with comments and a question about the early return in _onmouseout.

> WebCore/ChangeLog:18
> +        (WebInspector.StoragePanel.prototype._treeElementFromEvent):

Nit: remove if the method gets removed.

> WebCore/inspector/InspectorController.cpp:307
> +    for (Frame* frame = m_inspectedPage->mainFrame(); frame; frame = frame->tree()->traverseNext(m_inspectedPage->mainFrame())) {

I'd feel better if "m_inspectedPage->mainFrame()" was cached in a local variable. I never know when the calls are optimized out or not, and it might make readability easier here.

> WebCore/inspector/front-end/StoragePanel.js:726
> +        if (!nodeUnderMouse)
> +            return;
> +        var listNode = nodeUnderMouse.enclosingNodeOrSelfWithNodeName("li");

Nit: Adding a newline after the return would be nice.

> WebCore/inspector/front-end/StoragePanel.js:749
> +    _onmouseout: function(event)
> +    {
> +        var nodeUnderMouse = document.elementFromPoint(event.pageX, event.pageY);
> +        if (nodeUnderMouse && nodeUnderMouse.isDescendant(this.sidebarElement))
> +            return;

In what cases does mouseout still have a node that is a descendant of the sidebar element? Is this like moving your mouse of the left edge of an undocked inspector?

> WebCore/inspector/front-end/StoragePanel.js:757
> +    _treeElementFromEvent: function(event)

Can be removed. Don't forget to remove from the ChangeLog as well.
Comment 3 Pavel Feldman 2010-11-02 03:25:33 PDT
Landed as r71104.