WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 85586
Web Inspector: "Goto Function" filtering should be less restrictive.
https://bugs.webkit.org/show_bug.cgi?id=85586
Summary
Web Inspector: "Goto Function" filtering should be less restrictive.
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
Details
Formatted Diff
Diff
Patch
(8.06 KB, patch)
2012-05-05 07:47 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Patch
(8.60 KB, patch)
2012-05-05 08:11 PDT
,
eustas.bug
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
eustas.bug
Comment 1
2012-05-04 00:26:48 PDT
Created
attachment 140171
[details]
Patch
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
Created
attachment 140398
[details]
Patch
eustas.bug
Comment 5
2012-05-05 08:11:18 PDT
Created
attachment 140402
[details]
Patch
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.
Top of Page
Format For Printing
XML
Clone This Bug