Bug 75092 - Web Inspector: Implement "Go to Function" dialog for JavaScript
Summary: Web Inspector: Implement "Go to Function" dialog for JavaScript
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Alexander Pavlov (apavlov)
URL:
Keywords:
Depends on: 75166
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-22 09:15 PST by Alexander Pavlov (apavlov)
Modified: 2012-01-08 21:35 PST (History)
12 users (show)

See Also:


Attachments
Patch (43.28 KB, patch)
2011-12-22 09:33 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[IMAGE] Screenshot of the Inspector with the Go to Function dialog opened (100.20 KB, image/jpeg)
2011-12-22 09:35 PST, Alexander Pavlov (apavlov)
no flags Details
Patch (33.54 KB, patch)
2011-12-23 09:59 PST, Alexander Pavlov (apavlov)
no flags Details | Formatted Diff | Diff
[IMAGE] Screenshot of the Go to Function dialog with query match highlighting (76.08 KB, image/jpeg)
2011-12-23 10:04 PST, Alexander Pavlov (apavlov)
no flags Details
Patch (31.02 KB, patch)
2011-12-26 02:38 PST, Alexander Pavlov (apavlov)
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Pavlov (apavlov) 2011-12-22 09:15:42 PST
This should resemble a similar dialog that pops up in Eclipse upon Ctrl/Meta-O.

Patch to follow.
Comment 1 Timothy Hatcher 2011-12-22 09:19:49 PST
Please attach a screenshot too.
Comment 2 Alexander Pavlov (apavlov) 2011-12-22 09:33:10 PST
Created attachment 120331 [details]
Patch
Comment 3 WebKit Review Bot 2011-12-22 09:35:36 PST
Attachment 120331 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/update-webkit']" exit_code: 9

Updating OpenSource
From git://git.webkit.org/WebKit
 + 0639b9d...3ff8cc1 master     -> origin/master  (forced update)
Partial-rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc ...
Currently at 103548 = 0639b9de03475c2b49464647c607d0249c7445d1
r103545 = 3ff8cc11dd87e8ac3a4acaee763d8549687e5da1
Done rebuilding .git/svn/refs/remotes/origin/master/.rev_map.268f45cc-cd09-0410-ab3c-d52691b4dbfc
	M	Tools/TestWebKitAPI/TestsController.cpp
	M	Tools/ChangeLog
103546 = 4e5cbb711dbbaa35b7a064791c6a6e3e2556787c already exists! Why are we refetching it?
 at /usr/lib/git-core/git-svn line 5210

Died at Tools/Scripts/update-webkit line 158.


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 4 Alexander Pavlov (apavlov) 2011-12-22 09:35:52 PST
Created attachment 120332 [details]
[IMAGE] Screenshot of the Inspector with the Go to Function dialog opened

The blue bar below the query input field reports the script parsing progress
Comment 5 Pavel Feldman 2011-12-22 09:44:48 PST
It'd be great to visualize the matching piece in the list (like making the match black vs text's gray-ish).
Comment 6 Alexander Pavlov (apavlov) 2011-12-22 11:06:22 PST
(In reply to comment #5)
> It'd be great to visualize the matching piece in the list (like making the match black vs text's gray-ish).

Agree, however it's going to be a CPU killer for huge matching function counts (and for multiple matches per function name). I'll try to figure it out tomorrow.
Comment 7 Pavel Feldman 2011-12-23 04:15:38 PST
Comment on attachment 120331 [details]
Patch

Alexander is splitting this change as we agreed offline.
Comment 8 Alexander Pavlov (apavlov) 2011-12-23 09:59:37 PST
Created attachment 120470 [details]
Patch

This implements chunked match highlighting (see screenshot). Didn't extract Dialog - too little code in common with GoToLine
Comment 9 Alexander Pavlov (apavlov) 2011-12-23 10:04:46 PST
Created attachment 120472 [details]
[IMAGE] Screenshot of the Go to Function dialog with query match highlighting
Comment 10 Pavel Feldman 2011-12-26 01:19:50 PST
Comment on attachment 120470 [details]
Patch

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

> Source/WebCore/inspector/front-end/JavaScriptOutlineDialog.js:407
> +WebInspector.JavaScriptOutlineDialog.MatchHighlighter = function(dialog)

Lets land highlighter as a separate change.

> Source/WebCore/inspector/front-end/inspector.html:36
> +    <link rel="stylesheet" type="text/css" href="javaScriptOutlineDialog.css">

This css should be lazily loaded.
Comment 11 Alexander Pavlov (apavlov) 2011-12-26 02:38:45 PST
Created attachment 120541 [details]
Patch
Comment 12 Alexander Pavlov (apavlov) 2011-12-26 04:39:56 PST
Committed r103682: <http://trac.webkit.org/changeset/103682>
Comment 13 Paul Irish 2012-01-08 21:35:15 PST
On Mac, does this meta-O conflict with File / Open's shortcut?