Title: [194172] trunk/Websites/perf.webkit.org
Revision
194172
Author
[email protected]
Date
2015-12-16 13:50:09 -0800 (Wed, 16 Dec 2015)

Log Message

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.

Modified Paths

Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (194171 => 194172)


--- trunk/Websites/perf.webkit.org/ChangeLog	2015-12-16 21:26:01 UTC (rev 194171)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2015-12-16 21:50:09 UTC (rev 194172)
@@ -1,5 +1,24 @@
 2015-12-16  Ryosuke Niwa  <[email protected]>
 
+        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  <[email protected]>
+
         The chart status on v3 UI sometimes show wrong revision ranges
         https://bugs.webkit.org/show_bug.cgi?id=152331
 

Modified: trunk/Websites/perf.webkit.org/public/v3/components/time-series-chart.js (194171 => 194172)


--- trunk/Websites/perf.webkit.org/public/v3/components/time-series-chart.js	2015-12-16 21:26:01 UTC (rev 194171)
+++ trunk/Websites/perf.webkit.org/public/v3/components/time-series-chart.js	2015-12-16 21:50:09 UTC (rev 194172)
@@ -34,6 +34,9 @@
         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);
@@ -534,8 +537,9 @@
     {
         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;
 

Modified: trunk/Websites/perf.webkit.org/public/v3/pages/dashboard-page.js (194171 => 194172)


--- trunk/Websites/perf.webkit.org/public/v3/pages/dashboard-page.js	2015-12-16 21:26:01 UTC (rev 194171)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/dashboard-page.js	2015-12-16 21:50:09 UTC (rev 194172)
@@ -201,10 +201,13 @@
                 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 {
                 margin: 0 0 0.2rem 0;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to