Title: [197659] trunk/Source/WebInspectorUI
Revision
197659
Author
[email protected]
Date
2016-03-06 22:41:51 -0800 (Sun, 06 Mar 2016)

Log Message

Web Inspector: Use half-pixel borders for data grids
https://bugs.webkit.org/show_bug.cgi?id=154437
<rdar://problem/24736365>

Reviewed by Timothy Hatcher.

* UserInterface/Views/DataGrid.css:
(.data-grid.inline):
(.data-grid th):
(.data-grid :matches(th, td):not(:last-child)):
Half-pixel borders round to 1px on 1x (non-retina) screens since r192444.

* UserInterface/Views/DataGrid.js:
(WebInspector.DataGrid.prototype._positionResizerElements):
Use getBoundingClientRect for better precision since it provides subpixel values.

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (197658 => 197659)


--- trunk/Source/WebInspectorUI/ChangeLog	2016-03-07 03:52:19 UTC (rev 197658)
+++ trunk/Source/WebInspectorUI/ChangeLog	2016-03-07 06:41:51 UTC (rev 197659)
@@ -1,3 +1,21 @@
+2016-03-06  Nikita Vasilyev  <[email protected]>
+
+        Web Inspector: Use half-pixel borders for data grids
+        https://bugs.webkit.org/show_bug.cgi?id=154437
+        <rdar://problem/24736365>
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/DataGrid.css:
+        (.data-grid.inline):
+        (.data-grid th):
+        (.data-grid :matches(th, td):not(:last-child)):
+        Half-pixel borders round to 1px on 1x (non-retina) screens since r192444.
+
+        * UserInterface/Views/DataGrid.js:
+        (WebInspector.DataGrid.prototype._positionResizerElements):
+        Use getBoundingClientRect for better precision since it provides subpixel values.
+
 2016-03-05  Joseph Pecoraro  <[email protected]>
 
         Web Inspector: Have separate path component for Script Timeline content views

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.css (197658 => 197659)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.css	2016-03-07 03:52:19 UTC (rev 197658)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.css	2016-03-07 06:41:51 UTC (rev 197659)
@@ -58,7 +58,7 @@
 }
 
 .data-grid.inline {
-    border: 1px solid var(--border-color);
+    border: 0.5px solid var(--border-color);
 }
 
 .data-grid.no-header > table.header {
@@ -75,7 +75,7 @@
 
     background-color: white;
 
-    border-bottom: 1px solid var(--border-color);
+    border-bottom: 0.5px solid var(--border-color);
 
     font-weight: normal;
 
@@ -87,7 +87,7 @@
 }
 
 .data-grid :matches(th, td):not(:last-child) {
-    border-right: 1px solid var(--border-color);
+    border-right: 0.5px solid var(--border-color);
 }
 
 .data-grid th.sortable:active {

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js (197658 => 197659)


--- trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js	2016-03-07 03:52:19 UTC (rev 197658)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DataGrid.js	2016-03-07 06:41:51 UTC (rev 197659)
@@ -699,7 +699,7 @@
             // Get the width of the cell in the first (and only) row of the
             // header table in order to determine the width of the column, since
             // it is not possible to query a column for its width.
-            left += this._headerTableBodyElement.rows[0].cells[i].offsetWidth;
+            left += this._headerTableBodyElement.rows[0].cells[i].getBoundingClientRect().width;
 
             if (this._isColumnVisible(this.orderedColumns[i])) {
                 resizer.element.style.removeProperty("display");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to