Bug 85586

Summary: Web Inspector: "Goto Function" filtering should be less restrictive.
Product: WebKit Reporter: eustas.bug
Component: Web Inspector (Deprecated)Assignee: eustas.bug
Status: RESOLVED FIXED    
Severity: Normal CC: apavlov, bweinstein, eustas.bug, joepeck, keishi, loislo, pfeldman, pmuellr, rik, timothy, webkit.review.bot, yurys
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

eustas.bug
Reported 2012-05-04 00:12:35 PDT
User is forced to use asterisks to find something that is not camel-cased, or if he can't remember what terms are camel cased. This is not convenient. My proposal: 1) Avoid asterisks at all; new filtering should behave like old filtering with asterisk added after every input character; 2) Optimization: do not create regexp for each item inside filtering loop;
Attachments
Patch (6.09 KB, patch)
2012-05-04 00:26 PDT, eustas.bug
no flags
Patch (8.06 KB, patch)
2012-05-05 07:47 PDT, eustas.bug
no flags
Patch (8.60 KB, patch)
2012-05-05 08:11 PDT, eustas.bug
no flags
eustas.bug
Comment 1 2012-05-04 00:26:48 PDT
Pavel Feldman
Comment 2 2012-05-04 22:48:37 PDT
Comment on attachment 140171 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140171&action=review > Source/WebCore/inspector/front-end/FilteredItemSelectionDialog.js:129 > + if (this._checkItemAt(i)) { To make things simple, I would structure the code as follows: var regex = this._createSearchRegex(this._promptElement.value); for (var i = ...) { if (regex.test(this._delegate.itemKeyAt(i)) ... } Then method below would not be needed. > Source/WebCore/inspector/front-end/FilteredItemSelectionDialog.js:195 > + if (!query) { The WebKit style for thise would be: if (!query) { delete this._checkItemAt; return; } rest of the code here. > Source/WebCore/inspector/front-end/FilteredItemSelectionDialog.js:204 > + this._checkItemAt = checker.bind(this); You should never overwrite methods on the prototype. > Source/WebCore/inspector/front-end/FilteredItemSelectionDialog.js:231 > + c = c + "\\"; Escaping via appending \\ looks strange. Having test cases suggesting the behavior pattern would help understanding the logic.
eustas.bug
Comment 3 2012-05-05 07:41:24 PDT
Comment on attachment 140171 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=140171&action=review >> Source/WebCore/inspector/front-end/FilteredItemSelectionDialog.js:129 >> + if (this._checkItemAt(i)) { > > To make things simple, I would structure the code as follows: > > var regex = this._createSearchRegex(this._promptElement.value); > for (var i = ...) { > if (regex.test(this._delegate.itemKeyAt(i)) > ... > } > > Then method below would not be needed. Right you are, but i've tried to preserve original code structure. Fixed. >> Source/WebCore/inspector/front-end/FilteredItemSelectionDialog.js:195 >> + if (!query) { > > The WebKit style for thise would be: > > if (!query) { > delete this._checkItemAt; > return; > } > > rest of the code here. Thanks. >> Source/WebCore/inspector/front-end/FilteredItemSelectionDialog.js:204 >> + this._checkItemAt = checker.bind(this); > > You should never overwrite methods on the prototype. OK >> Source/WebCore/inspector/front-end/FilteredItemSelectionDialog.js:231 >> + c = c + "\\"; > > Escaping via appending \\ looks strange. Having test cases suggesting the behavior pattern would help understanding the logic. Oops. Fixed. Tests added
eustas.bug
Comment 4 2012-05-05 07:47:30 PDT
eustas.bug
Comment 5 2012-05-05 08:11:18 PDT
WebKit Review Bot
Comment 6 2012-05-06 15:19:00 PDT
Comment on attachment 140402 [details] Patch Clearing flags on attachment: 140402 Committed r116244: <http://trac.webkit.org/changeset/116244>
WebKit Review Bot
Comment 7 2012-05-06 15:19:05 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.