Web Inspector: Network's columns shake when scrolling at non-default zoom level
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jan 2018 00:46:39 +0000 (00:46 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 24 Jan 2018 00:46:39 +0000 (00:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=181998
<rdar://problem/36449808>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2018-01-23
Reviewed by Matt Baker.

* UserInterface/Views/Table.js:
When zoomed the bounding client rect values were fractional, which was
unexpected by this area of code. Floor the values to get a value we expect
to be able to evenly distribute.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@227463 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/Table.js

index 4442996..76cacd8 100644 (file)
@@ -1,3 +1,16 @@
+2018-01-23  Joseph Pecoraro  <pecoraro@apple.com>
+
+        Web Inspector: Network's columns shake when scrolling at non-default zoom level
+        https://bugs.webkit.org/show_bug.cgi?id=181998
+        <rdar://problem/36449808>
+
+        Reviewed by Matt Baker.
+
+        * UserInterface/Views/Table.js:
+        When zoomed the bounding client rect values were fractional, which was
+        unexpected by this area of code. Floor the values to get a value we expect
+        to be able to evenly distribute.
+
 2018-01-22  Nikita Vasilyev  <nvasilyev@apple.com>
 
         Web Inspector: Styles Redesign: data corruption when updating values quickly
index d0c8be2..86996af 100644 (file)
@@ -709,8 +709,8 @@ WI.Table = class Table extends WI.View
 
         if (isNaN(this._cachedWidth)) {
             let boundingClientRect = this._scrollContainerElement.getBoundingClientRect();
-            this._cachedWidth = boundingClientRect.width;
-            this._cachedHeight = boundingClientRect.height;
+            this._cachedWidth = Math.floor(boundingClientRect.width);
+            this._cachedHeight = Math.floor(boundingClientRect.height);
         }
 
         // Not visible yet.