Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Unified Diff: chrome/browser/resources/net_internals/timeline_graph_view.js

Issue 10834312: Make net-internals work a bit better on Android. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/net_internals/timeline_graph_view.js
===================================================================
--- chrome/browser/resources/net_internals/timeline_graph_view.js (revision 151563)
+++ chrome/browser/resources/net_internals/timeline_graph_view.js (working copy)
@@ -356,8 +356,9 @@
// Make space at the bottom of the graph for the time labels, and then
// draw the labels.
+ var textHeight = height;
height -= fontHeight + LABEL_VERTICAL_SPACING;
- this.drawTimeLabels(context, width, height, visibleStartTime);
+ this.drawTimeLabels(context, width, height, textHeight, visibleStartTime);
// Draw outline of the main graph area.
context.strokeStyle = GRID_COLOR;
@@ -385,9 +386,7 @@
* since it may not be |startTime_|, when we're displaying the entire
* time range.
*/
- drawTimeLabels: function(context, width, height, startTime) {
- var textHeight = height + LABEL_VERTICAL_SPACING;
-
+ drawTimeLabels: function(context, width, height, textHeight, startTime) {
// Text for a time string to use in determining how far apart
// to place text labels.
var sampleText = (new Date(startTime)).toLocaleTimeString();
@@ -428,7 +427,7 @@
// timeStep because of how UTC times work.
var time = Math.ceil(startTime / timeStep) * timeStep;
- context.textBaseline = 'top';
+ context.textBaseline = 'bottom';
context.textAlign = 'center';
context.fillStyle = TEXT_COLOR;
context.strokeStyle = GRID_COLOR;
« no previous file with comments | « chrome/browser/resources/net_internals/tab_switcher_view.css ('k') | chrome/browser/resources/net_internals/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698