WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
109796
Web Inspector: extract DOM counters graph implementation into its own class
https://bugs.webkit.org/show_bug.cgi?id=109796
Summary
Web Inspector: extract DOM counters graph implementation into its own class
Yury Semikhatsky
Reported
2013-02-14 01:36:15 PST
MemoryStatistics.js now implements DOM counters graph and also is inherited by NativeMemoryGraph.js. DOM counters specific should go into its own file leaving only common bits in MemoryStatistics.js.
Attachments
Patch
(30.53 KB, patch)
2013-02-14 01:43 PST
,
Yury Semikhatsky
apavlov
: review+
Details
Formatted Diff
Diff
Patch for landing
(31.11 KB, patch)
2013-02-14 02:16 PST
,
Yury Semikhatsky
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Yury Semikhatsky
Comment 1
2013-02-14 01:43:05 PST
Created
attachment 188290
[details]
Patch
Alexander Pavlov (apavlov)
Comment 2
2013-02-14 01:58:32 PST
Comment on
attachment 188290
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=188290&action=review
> Source/WebCore/inspector/front-end/DOMCountersGraph.js:32 > + * @param {WebInspector.TimelinePanel} timelinePanel
@param tags should follow the @constructor and @extends tags
> Source/WebCore/inspector/front-end/DOMCountersGraph.js:48 > +WebInspector.DOMCounterUI = function(memoryCountersPane, title, currentValueLabel, rgb, valueGetter)
JSDoc for the params, please
> Source/WebCore/inspector/front-end/DOMCountersGraph.js:50 > + var swatchColor = "rgb(" + rgb.join(",") + ")";
BTW, why don't you use WebInspector.Color? It will ease your life.
> Source/WebCore/inspector/front-end/DOMCountersGraph.js:66 > +WebInspector.DOMCountersGraph.Counter = function(time, documentCount, nodeCount, listenerCount)
JSDoc for the params, please
> Source/WebCore/inspector/front-end/DOMCountersGraph.js:159 > + new WebInspector.DOMCounterUI(this, "Document Count", "Documents: %d", [100,0,0], getDocumentCount),
spaces between array elements everywhere
> Source/WebCore/inspector/front-end/DOMCountersGraph.js:242 > + ctx.arc(x, y, radius, 0, Math.PI*2, true);
whitespace around '*'
> Source/WebCore/inspector/front-end/DOMCountersGraph.js:289 > + var currentY = originY + (height - (valueGetter(this._counters[this._minimumIndex])- minValue) * yFactor);
whitespace before '-'
> Source/WebCore/inspector/front-end/DOMCountersGraph.js:294 > + currentY = originY + (height - (valueGetter(this._counters[i])- minValue) * yFactor);
ditto
Yury Semikhatsky
Comment 3
2013-02-14 02:14:28 PST
(In reply to
comment #2
)
> (From update of
attachment 188290
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=188290&action=review
> > > Source/WebCore/inspector/front-end/DOMCountersGraph.js:32 > > + * @param {WebInspector.TimelinePanel} timelinePanel > > @param tags should follow the @constructor and @extends tags >
Done.
> > Source/WebCore/inspector/front-end/DOMCountersGraph.js:48 > > +WebInspector.DOMCounterUI = function(memoryCountersPane, title, currentValueLabel, rgb, valueGetter) > > JSDoc for the params, please >
Done.
> > Source/WebCore/inspector/front-end/DOMCountersGraph.js:50 > > + var swatchColor = "rgb(" + rgb.join(",") + ")"; > > BTW, why don't you use WebInspector.Color? It will ease your life. >
I only need to format string value here.
> > Source/WebCore/inspector/front-end/DOMCountersGraph.js:66 > > +WebInspector.DOMCountersGraph.Counter = function(time, documentCount, nodeCount, listenerCount) > > JSDoc for the params, please >
Done.
> > Source/WebCore/inspector/front-end/DOMCountersGraph.js:159 > > + new WebInspector.DOMCounterUI(this, "Document Count", "Documents: %d", [100,0,0], getDocumentCount), > > spaces between array elements everywhere >
Done.
> > Source/WebCore/inspector/front-end/DOMCountersGraph.js:242 > > + ctx.arc(x, y, radius, 0, Math.PI*2, true); > > whitespace around '*' >
Done.
> > Source/WebCore/inspector/front-end/DOMCountersGraph.js:289 > > + var currentY = originY + (height - (valueGetter(this._counters[this._minimumIndex])- minValue) * yFactor); > > whitespace before '-' >
Done.
> > Source/WebCore/inspector/front-end/DOMCountersGraph.js:294 > > + currentY = originY + (height - (valueGetter(this._counters[i])- minValue) * yFactor); > > ditto
Done.
Yury Semikhatsky
Comment 4
2013-02-14 02:16:53 PST
Created
attachment 188294
[details]
Patch for landing
Yury Semikhatsky
Comment 5
2013-02-14 02:24:04 PST
Committed
r142862
: <
http://trac.webkit.org/changeset/142862
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug