Bug 170555

Summary: REGRESSION (r209882): Web Inspector: Command-G does not work in the console
Product: WebKit Reporter: BJ Burg <bburg>
Component: Web InspectorAssignee: Nikita Vasilyev <nvasilyev>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, commit-queue, inspector-bugzilla-changes, nvasilyev, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: All   
OS: All   
URL: https://bugs.webkit.org/show_bug.cgi?id=170554
See Also: https://bugs.webkit.org/show_bug.cgi?id=170556
Attachments:
Description Flags
Patch none

Description BJ Burg 2017-04-06 10:48:24 PDT
-------
Inspected URL:        any
Loading completed:    true
Frontend User Agent:  Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_5) AppleWebKit/604.1.16+ (KHTML, like Gecko)

Uncaught Exceptions:
 - TypeError: this.delegate.highlightNextSearchMatch is not a function. (In 'this.delegate.highlightNextSearchMatch()', 'this.delegate.highlightNextSearchMatch' is undefined) (at JavaScriptLogViewController.js:260:47)
    _handleFindNextShortcut @ JavaScriptLogViewController.js:260:47
    _handleFindNextShortcut @ [native code]
    _handleKeyDown @ KeyboardShortcut.js:84:42
-------

* STEPS TO REPRODUCE
1. Go to Console tab
2. Add some results so it's not empty
3. Search for a string with no results using Console find bar
4. Cmd-g
=> Boom

This seems to work as expected if there is a matching search result being highlighted.
Comment 1 Radar WebKit Bug Importer 2017-04-06 10:49:17 PDT
<rdar://problem/31481247>
Comment 2 Nikita Vasilyev 2017-04-24 17:18:51 PDT
I’m unable to reproduce the bug.

Steps I tried:
1. Open https://webkit.org
2. Go to Console tab
3. Type “foo” in the console, press Enter
4. Press Commang-F, type “bar”
5. Press Commang-G

Please let me know if I missed something.
Comment 3 Nikita Vasilyev 2017-04-24 17:27:01 PDT
I was able to reproduce once. I'm not sure how it happened :)

    _handleFindNextShortcut()
    {
        this.delegate.highlightNextSearchMatch();
    }

highlightNextSearchMatch is not defined anywhere in Web Inspector front-end.
Comment 4 Nikita Vasilyev 2017-04-24 17:38:33 PDT
Steps to reproduce the bug:
1. Go to Console tab
2. Click on the console content view (any message in the console, for example)
3. Press Commang-G

this.delegate.highlightNextSearchMatch() was added in 2013 when Web Inspector was open sourced back to WebKit.

At some point highlightNextSearchMatch was removed.
Comment 5 Nikita Vasilyev 2017-04-24 17:47:23 PDT
By using

    git log -c -S'highlightNextSearchMatch' -- Source/WebInspectorUI

I found out that it was removed in https://bugs.webkit.org/show_bug.cgi?id=164047#c12.
Comment 6 Nikita Vasilyev 2017-04-24 18:05:13 PDT
Created attachment 308031 [details]
Patch
Comment 7 BJ Burg 2017-04-25 23:08:09 PDT
Comment on attachment 308031 [details]
Patch

r=me
Comment 8 WebKit Commit Bot 2017-04-25 23:39:03 PDT
Comment on attachment 308031 [details]
Patch

Clearing flags on attachment: 308031

Committed r215795: <http://trac.webkit.org/changeset/215795>
Comment 9 WebKit Commit Bot 2017-04-25 23:39:05 PDT
All reviewed patches have been landed.  Closing bug.