Bug 19160 - Inspector should support console.count
Summary: Inspector should support console.count
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Enhancement
Assignee: Keishi Hattori
URL:
Keywords: InRadar
Depends on:
Blocks: 14354
  Show dependency treegraph
 
Reported: 2008-05-20 16:17 PDT by Adam Roben (:aroben)
Modified: 2008-08-19 11:33 PDT (History)
0 users

See Also:


Attachments
Testcase for console.count behavior in Firebug (1.21 KB, text/html)
2008-06-19 08:13 PDT, Keishi Hattori
no flags Details
proposed patch (4.87 KB, patch)
2008-08-16 21:09 PDT, Keishi Hattori
no flags Details | Formatted Diff | Diff
fixed a minor mistake (4.86 KB, patch)
2008-08-16 21:21 PDT, Keishi Hattori
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Roben (:aroben) 2008-05-20 16:17:46 PDT
The Inspector should support console.count for Firebug parity.
Comment 1 Mark Rowe (bdash) 2008-05-20 16:23:15 PDT
<rdar://problem/5950865>
Comment 2 Adam Roben (:aroben) 2008-06-19 07:41:58 PDT
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 Keishi Hattori 2008-06-19 08:13:52 PDT
Created attachment 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 Adam Roben (:aroben) 2008-06-19 08:49:01 PDT
Comment on attachment 21837 [details]
Testcase for console.count behavior in Firebug

Results from Firefox 2 with Firebug 1.1b:

100
100
a 100
a 100

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

http://gyazo.com/eae0e3bcf7fd423181f7aabf0d459e73.png
Comment 6 Keishi Hattori 2008-08-16 21:09:13 PDT
Created attachment 22836 [details]
proposed patch

Line number insensitive, but can be upgraded once the line numbers are available.
Comment 7 Keishi Hattori 2008-08-16 21:21:31 PDT
Created attachment 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 Geoffrey Garen 2008-08-16 22:01:57 PDT
Comment on attachment 22837 [details]
fixed a minor mistake

r=me
Comment 9 Timothy Hatcher 2008-08-19 11:33:55 PDT
Landed in r35842.