Bug 28146

Summary: Allow Inspector's Number.toString to print low-resolution values
Product: WebKit Reporter: Mikhail Naganov <mnaganov>
Component: Web Inspector (Deprecated)Assignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Enhancement CC: eric, pfeldman, timothy
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
Proposed change timothy: review+

Description Mikhail Naganov 2009-08-10 07:08:37 PDT
Currently, Number.toString always prints high-resolution values in KBs and MBs (e.g. 1.234MB). My intention is to allow it to print coarse-grained values (no digits after the decimal point.)
Comment 1 Mikhail Naganov 2009-08-10 07:15:36 PDT
Created attachment 34450 [details]
Proposed change
Comment 2 Timothy Hatcher 2009-08-10 09:14:23 PDT
What is the reason for this addition?
Comment 3 Mikhail Naganov 2009-08-11 00:12:19 PDT
I'm working on the heap profiling page for Chromium. I have one place where I'm displaying memory stats (as a subtitle for memory snapshot items), and there I don't need excessive precision provided by the default version of Number.bytesToString. That's why I decided to provide 'low-res' argument to it.

You can check out the current look of the Heap page here:
http://build.chromium.org/buildbot/continuous/mac/2009-08-10/22915/chrome-mac.zip

As I'm planning to upstream it to WebKit some day, so let's discuss it. The current view is very simple, I have more functionality to add.
Comment 4 Pavel Feldman 2009-08-12 01:00:24 PDT
Committing to http://svn.webkit.org/repository/webkit/trunk ...
	M	WebCore/ChangeLog
	M	WebCore/inspector/front-end/utilities.js
Committed r47095