[Webkit-unassigned] [Bug 85586] Web Inspector: "Goto Function" filtering should be less restrictive.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 5 07:41:25 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=85586





--- Comment #3 from eustas.bug at gmail.com  2012-05-05 07:41:24 PST ---
(From update of attachment 140171)
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

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list