[Webkit-unassigned] [Bug 107813] Web Inspector: Filters on Console panel

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 24 06:08:33 PST 2013


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


Pavel Feldman <pfeldman at chromium.org> changed:

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




--- Comment #2 from Pavel Feldman <pfeldman at chromium.org>  2013-01-24 06:10:27 PST ---
(From update of attachment 184473)
View in context: https://bugs.webkit.org/attachment.cgi?id=184473&action=review

> Source/WebCore/ChangeLog:3
> +        Web Inspector: Filters on Console panel

Title should be more specific. "Filter out messages from selected scripts in console".

> Source/WebCore/inspector/front-end/ConsoleView.js:40
> +    this._messageUrlFilters = [];

_messageURLFitlers (per WebKit guidelines)

> Source/WebCore/inspector/front-end/ConsoleView.js:42
> +    this._filteredCount = {};

What does this collect?

> Source/WebCore/inspector/front-end/ConsoleView.js:386
> +        if (this._filteredCount[event.data.url])

Please perform cast to ConsoleMessage using annotations. Then access url. Use compile-front-end.py to check for errors.

> Source/WebCore/inspector/front-end/ConsoleView.js:391
> +        if (this._shouldBeVisible(event.data))

So you bump this._filteredCount no matter whether message becomes visible or not. Why?

> Source/WebCore/inspector/front-end/ConsoleView.js:458
> +        var srcElement = event.srcElement;

var sourceElement = event.target.enclosingNodeOrSelfWithClass("console-message");

> Source/WebCore/inspector/front-end/ConsoleView.js:462
> +        var filterSubMenu = contextMenu.appendSubMenuItem("Filter", !(this._messageUrlFilters.length || (srcElement && srcElement.message.url)));

WebInspector.UIString("Fitler"), also add Filter to WebCore/English.lproj/localizedStrings.js if it is not there.

> Source/WebCore/inspector/front-end/ConsoleView.js:468
> +        filterSubMenu.appendItem(WebInspector.UIString("Unhide all"), this._removeMessageUrlFilter.bind(this, -1), !this._messageUrlFilters.length);

add to localized strings

> Source/WebCore/inspector/front-end/ConsoleView.js:487
> +    _addMessageUrlFilter: function(url) {

Here and below: { on the next line, please add closure annotations, URL - all caps.

> Source/WebCore/inspector/front-end/ConsoleView.js:489
> +        var option = document.createElement("option");

Where do you display these options? Please attach a screenshot.

> Source/WebCore/inspector/front-end/ConsoleView.js:519
> +                if (this._shouldBeVisible(visibleMessage)) {

No { } around single line blocks.

> Source/WebCore/inspector/front-end/ConsoleView.js:528
> +                    newVisibleMessages.push(sourceMessage);

This logic requires a test.

> Source/WebCore/inspector/front-end/ConsoleView.js:783
> +    addMessage: function(msg, node)

Please annotate.

> Source/WebCore/inspector/front-end/ConsoleView.js:795
> +                this.messagesElement.insertBefore(element, node);

no {} around single line blocks.

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