OLD | NEW |
---|---|
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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
184 if (!dividerOffsets) { | 184 if (!dividerOffsets) { |
185 var dividersData = WebInspector.TimelineGrid.calculateDividerOffsets (calculator, this._dividersElement.clientWidth); | 185 var dividersData = WebInspector.TimelineGrid.calculateDividerOffsets (calculator, this._dividersElement.clientWidth); |
186 dividerOffsets = dividersData.offsets; | 186 dividerOffsets = dividersData.offsets; |
187 precision = dividersData.precision; | 187 precision = dividersData.precision; |
188 printDeltas = false; | 188 printDeltas = false; |
189 } | 189 } |
190 | 190 |
191 var dividersElementClientWidth = this._dividersElement.clientWidth; | 191 var dividersElementClientWidth = this._dividersElement.clientWidth; |
192 | 192 |
193 // Reuse divider elements and labels. | 193 // Reuse divider elements and labels. |
194 var divider = this._dividersElement.firstChild; | 194 var divider = /** @type {?Element} */ (this._dividersElement.firstChild) ; |
aandrey
2014/06/17 11:33:54
why this cast? looks like some other place should
apavlov
2014/06/17 12:46:03
firstChild returns {?Node}, but given the fact tha
| |
195 var dividerLabelBar = this._dividersLabelBarElement.firstChild; | 195 var dividerLabelBar = /** @type {?Element} */ (this._dividersLabelBarEle ment.firstChild); |
196 | 196 |
197 const minWidthForTitle = 60; | 197 const minWidthForTitle = 60; |
198 var lastPosition = 0; | 198 var lastPosition = 0; |
199 var lastTime = 0; | 199 var lastTime = 0; |
200 for (var i = 0; i < dividerOffsets.length; ++i) { | 200 for (var i = 0; i < dividerOffsets.length; ++i) { |
201 if (!divider) { | 201 if (!divider) { |
202 divider = document.createElement("div"); | 202 divider = document.createElement("div"); |
203 divider.className = "resources-divider"; | 203 divider.className = "resources-divider"; |
204 this._dividersElement.appendChild(divider); | 204 this._dividersElement.appendChild(divider); |
205 | 205 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
344 | 344 |
345 /** @return {number} */ | 345 /** @return {number} */ |
346 zeroTime: function() { }, | 346 zeroTime: function() { }, |
347 | 347 |
348 /** @return {number} */ | 348 /** @return {number} */ |
349 maximumBoundary: function() { }, | 349 maximumBoundary: function() { }, |
350 | 350 |
351 /** @return {number} */ | 351 /** @return {number} */ |
352 boundarySpan: function() { } | 352 boundarySpan: function() { } |
353 } | 353 } |
OLD | NEW |