2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
+ v3 dashboard doesn't stretch charts to fill the screen
+ https://bugs.webkit.org/show_bug.cgi?id=152354
+
+ Reviewed by Chris Dumez.
+
+ The bug was caused by a workaround to avoid canvas stretching table cell too much.
+
+ Fix the problem instead by making the canvas absolutely positioned inside the "time-series-chart" element
+ so that it does not contribute to the intrinsic/natural width of the cell.
+
+ * public/v3/components/time-series-chart.js:
+ (TimeSeriesChart.prototype._ensureCanvas): Make the canvas absolutely positioned inside the shadow root.
+ (TimeSeriesChart.prototype._updateCanvasSizeIfClientSizeChanged): Use the container element's size now that
+ the canvas does not resize with it.
+ * public/v3/pages/dashboard-page.js:
+ (DashboardPage.cssTemplate): Updated the CSS so that the chart stretches all the way.
+
+2015-12-16 Ryosuke Niwa <rniwa@webkit.org>
+
The chart status on v3 UI sometimes show wrong revision ranges
https://bugs.webkit.org/show_bug.cgi?id=152331
if (!this._canvas) {
this._canvas = this._createCanvas();
this._canvas.style.display = 'block';
+ this._canvas.style.position = 'absolute';
+ this._canvas.style.left = '0px';
+ this._canvas.style.top = '0px';
this._canvas.style.width = '100%';
this._canvas.style.height = '100%';
this.content().appendChild(this._canvas);
{
var canvas = this._ensureCanvas();
- var newWidth = canvas.clientWidth;
- var newHeight = canvas.clientHeight;
+ var newWidth = this.element().clientWidth;
+ var newHeight = this.element().clientHeight;
+
if (!newWidth || !newHeight || (newWidth == this._width && newHeight == this._height))
return false;
height: 100%;
border: 0;
}
- .dashboard-table td > * {
- display: inline-block;
- width: 20rem;
+ .dashboard-table td time-series-chart {
+ height: 10rem;
+ }
+ .dashboard-table td > chart-status-view {
+ display: block;
+ width: 100%;
}
.dashboard-table td *:first-child {