Bug 19160

Summary: Inspector should support console.count
Product: WebKit Reporter: Adam Roben (:aroben) <aroben@webkit.org>
Component: Web Inspector (Deprecated)Assignee: Keishi Hattori <keishi@webkit.org>
Severity: Enhancement Keywords: InRadar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 14354    
Description Flags
Testcase for console.count behavior in Firebug
proposed patch
fixed a minor mistake ggaren: review+

Description From 2008-05-20 16:17:46 PST
The Inspector should support console.count for Firebug parity.
------- Comment #1 From 2008-05-20 16:23:15 PST -------
------- Comment #2 From 2008-06-19 07:41:58 PST -------
One thing that will make implementing this tricky is that currently there's no way for the console methods to know what file/line they were called from. See https://bugs.webkit.org/show_bug.cgi?id=17234#c2 and https://bugs.webkit.org/show_bug.cgi?id=17234#c3
------- Comment #3 From 2008-06-19 08:13:52 PST -------
Created an attachment (id=21837) [details]
Testcase for console.count behavior in Firebug

I think this testcase proves that console.count only cares about the title attribute and not the line it was called.
------- Comment #4 From 2008-06-19 08:49:01 PST -------
(From update of attachment 21837 [details])
Results from Firefox 2 with Firebug 1.1b:

a 100
a 100

So it looks like Firebug is in fact doing what it claims to do.
------- Comment #5 From 2008-06-19 08:54:26 PST -------
Oops. I guess it's a bug in Firebug 1.2 then.

------- Comment #6 From 2008-08-16 21:09:13 PST -------
Created an attachment (id=22836) [details]
proposed patch

Line number insensitive, but can be upgraded once the line numbers are available.
------- Comment #7 From 2008-08-16 21:21:31 PST -------
Created an attachment (id=22837) [details]
fixed a minor mistake

I couldn't figure out how to update a value in m_counts without removing and adding it back.
------- Comment #8 From 2008-08-16 22:01:57 PST -------
(From update of attachment 22837 [details])
------- Comment #9 From 2008-08-19 11:33:55 PST -------
Landed in r35842.