| Index: third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineGrid.js
|
| diff --git a/third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineGrid.js b/third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineGrid.js
|
| index 44ceca596bdcd3776ee35df2e599a4b93ada446a..5185b3f5de4ac2abffcd3757c4fe898dc55f7bf0 100644
|
| --- a/third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineGrid.js
|
| +++ b/third_party/WebKit/Source/devtools/front_end/ui_lazy/TimelineGrid.js
|
| @@ -98,8 +98,10 @@ WebInspector.TimelineGrid = class {
|
| * @param {!WebInspector.TimelineGrid.Calculator} calculator
|
| * @param {number} paddingTop
|
| * @param {number=} freeZoneAtLeft
|
| + * @param {number=} freeZoneAtRight
|
| + * @param {string=} fontSize
|
| */
|
| - static drawCanvasGrid(context, calculator, paddingTop, freeZoneAtLeft) {
|
| + static drawCanvasGrid(context, calculator, paddingTop, freeZoneAtLeft, freeZoneAtRight, fontSize) {
|
| context.save();
|
| var ratio = window.devicePixelRatio;
|
| context.scale(ratio, ratio);
|
| @@ -115,19 +117,22 @@ WebInspector.TimelineGrid = class {
|
| context.fillStyle = '#333';
|
| context.strokeStyle = 'rgba(0, 0, 0, 0.1)';
|
| context.textBaseline = 'hanging';
|
| - context.font = '11px ' + WebInspector.fontFamily();
|
| + if (!fontSize)
|
| + fontSize = '11px';
|
| + context.font = fontSize + ' ' + WebInspector.fontFamily();
|
| context.lineWidth = 1;
|
|
|
| context.translate(0.5, 0.5);
|
| const paddingRight = 4;
|
| freeZoneAtLeft = freeZoneAtLeft || 0;
|
| + freeZoneAtRight = freeZoneAtRight || 0;
|
| for (var i = 0; i < dividerOffsets.length; ++i) {
|
| var time = dividerOffsets[i];
|
| var position = calculator.computePosition(time);
|
| var text = calculator.formatValue(time, precision);
|
| var textWidth = context.measureText(text).width;
|
| var textPosition = position - textWidth - paddingRight;
|
| - if (freeZoneAtLeft < textPosition)
|
| + if (freeZoneAtLeft < textPosition && width - freeZoneAtRight > textPosition + textWidth)
|
| context.fillText(text, textPosition, paddingTop);
|
| context.moveTo(position, 0);
|
| context.lineTo(position, height);
|
|
|