| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 context.save(); | 104 context.save(); |
| 105 var ratio = window.devicePixelRatio; | 105 var ratio = window.devicePixelRatio; |
| 106 context.scale(ratio, ratio); | 106 context.scale(ratio, ratio); |
| 107 var width = context.canvas.width / window.devicePixelRatio; | 107 var width = context.canvas.width / window.devicePixelRatio; |
| 108 var height = context.canvas.height / window.devicePixelRatio; | 108 var height = context.canvas.height / window.devicePixelRatio; |
| 109 var dividersData = PerfUI.TimelineGrid.calculateDividerOffsets(calculator); | 109 var dividersData = PerfUI.TimelineGrid.calculateDividerOffsets(calculator); |
| 110 var dividerOffsets = dividersData.offsets; | 110 var dividerOffsets = dividersData.offsets; |
| 111 var precision = dividersData.precision; | 111 var precision = dividersData.precision; |
| 112 | 112 |
| 113 if (headerHeight) { | 113 if (headerHeight) { |
| 114 context.fillStyle = UI.themeSupport.patchColor('rgba(255, 255, 255, 0.5)',
UI.ThemeSupport.ColorUsage.Background); | 114 context.fillStyle = |
| 115 UI.themeSupport.patchColorText('rgba(255, 255, 255, 0.5)', UI.ThemeSup
port.ColorUsage.Background); |
| 115 context.fillRect(0, 0, width, headerHeight); | 116 context.fillRect(0, 0, width, headerHeight); |
| 116 } | 117 } |
| 117 | 118 |
| 118 context.fillStyle = UI.themeSupport.patchColor('#333', UI.ThemeSupport.Color
Usage.Foreground); | 119 context.fillStyle = UI.themeSupport.patchColorText('#333', UI.ThemeSupport.C
olorUsage.Foreground); |
| 119 context.strokeStyle = UI.themeSupport.patchColor('rgba(0, 0, 0, 0.1)', UI.Th
emeSupport.ColorUsage.Foreground); | 120 context.strokeStyle = UI.themeSupport.patchColorText('rgba(0, 0, 0, 0.1)', U
I.ThemeSupport.ColorUsage.Foreground); |
| 120 context.textBaseline = 'hanging'; | 121 context.textBaseline = 'hanging'; |
| 121 context.font = '11px ' + Host.fontFamily(); | 122 context.font = '11px ' + Host.fontFamily(); |
| 122 context.lineWidth = 1; | 123 context.lineWidth = 1; |
| 123 | 124 |
| 124 context.translate(0.5, 0.5); | 125 context.translate(0.5, 0.5); |
| 125 const paddingRight = 4; | 126 const paddingRight = 4; |
| 126 for (var i = 0; i < dividerOffsets.length; ++i) { | 127 for (var i = 0; i < dividerOffsets.length; ++i) { |
| 127 var time = dividerOffsets[i]; | 128 var time = dividerOffsets[i]; |
| 128 var position = calculator.computePosition(time); | 129 var position = calculator.computePosition(time); |
| 129 context.moveTo(position, 0); | 130 context.moveTo(position, 0); |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 | 282 |
| 282 /** @return {number} */ | 283 /** @return {number} */ |
| 283 zeroTime() {}, | 284 zeroTime() {}, |
| 284 | 285 |
| 285 /** @return {number} */ | 286 /** @return {number} */ |
| 286 maximumBoundary() {}, | 287 maximumBoundary() {}, |
| 287 | 288 |
| 288 /** @return {number} */ | 289 /** @return {number} */ |
| 289 boundarySpan() {} | 290 boundarySpan() {} |
| 290 }; | 291 }; |
| OLD | NEW |