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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineGrid.js

Issue 2418623002: [Devtools] Added divider timing to network timeline expirement (Closed)
Patch Set: Merge branch 'master' into NETWORK_TIMELINE_6_DRAW_DIVIDERS Created 4 years, 2 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/network/NetworkTimelineColumn.js ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org> 3 * Copyright (C) 2008, 2009 Anthony Ricaud <rik@webkit.org>
4 * Copyright (C) 2009 Google Inc. All rights reserved. 4 * Copyright (C) 2009 Google Inc. All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 this.element.appendChild(this._gridHeaderElement); 45 this.element.appendChild(this._gridHeaderElement);
46 } 46 }
47 47
48 /** 48 /**
49 * @param {!WebInspector.TimelineGrid.Calculator} calculator 49 * @param {!WebInspector.TimelineGrid.Calculator} calculator
50 * @param {number=} freeZoneAtLeft 50 * @param {number=} freeZoneAtLeft
51 * @return {!{offsets: !Array.<number>, precision: number}} 51 * @return {!{offsets: !Array.<number>, precision: number}}
52 */ 52 */
53 WebInspector.TimelineGrid.calculateDividerOffsets = function(calculator, freeZon eAtLeft) 53 WebInspector.TimelineGrid.calculateDividerOffsets = function(calculator, freeZon eAtLeft)
54 { 54 {
55 // TODO(allada) Remove this code out when timeline canvas experiment is over .
55 /** @const */ var minGridSlicePx = 64; // minimal distance between grid line s. 56 /** @const */ var minGridSlicePx = 64; // minimal distance between grid line s.
56 57
57 var clientWidth = calculator.computePosition(calculator.maximumBoundary()); 58 var clientWidth = calculator.computePosition(calculator.maximumBoundary());
58 var dividersCount = clientWidth / minGridSlicePx; 59 var dividersCount = clientWidth / minGridSlicePx;
59 var gridSliceTime = calculator.boundarySpan() / dividersCount; 60 var gridSliceTime = calculator.boundarySpan() / dividersCount;
60 var pixelsPerTime = clientWidth / calculator.boundarySpan(); 61 var pixelsPerTime = clientWidth / calculator.boundarySpan();
61 62
62 // Align gridSliceTime to a nearest round value. 63 // Align gridSliceTime to a nearest round value.
63 // We allow spans that fit into the formula: span = (1|2|5)x10^n, 64 // We allow spans that fit into the formula: span = (1|2|5)x10^n,
64 // e.g.: ... .1 .2 .5 1 2 5 10 20 50 ... 65 // e.g.: ... .1 .2 .5 1 2 5 10 20 50 ...
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 308
308 /** @return {number} */ 309 /** @return {number} */
309 zeroTime: function() { }, 310 zeroTime: function() { },
310 311
311 /** @return {number} */ 312 /** @return {number} */
312 maximumBoundary: function() { }, 313 maximumBoundary: function() { },
313 314
314 /** @return {number} */ 315 /** @return {number} */
315 boundarySpan: function() { } 316 boundarySpan: function() { }
316 } 317 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/devtools/front_end/network/NetworkTimelineColumn.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698