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

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 4 22:48:37 PDT 2012


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


Pavel Feldman <pfeldman at chromium.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #140171|review?                     |review-
               Flag|                            |




--- Comment #2 from Pavel Feldman <pfeldman at chromium.org>  2012-05-04 22:48:37 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.

> 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.

-- 
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