Bug 48760 - Web Inspector: highlight frame on hover in resources panel.
Summary: Web Inspector: highlight frame on hover in resources panel.
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
Depends on:
Reported: 2010-11-01 08:33 PDT by Pavel Feldman
Modified: 2010-11-02 03:25 PDT (History)
10 users (show)

See Also:

[PATCH] Proposed change. (7.99 KB, patch)
2010-11-01 08:39 PDT, Pavel Feldman
joepeck: review+
joepeck: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.