- Group Reviewers
- rK7e6b1576f5cf: [Meet] Fix video elements sizing bug
Could it be that the problem is not the precision but that offsetWidth does not take any transformations into account? See https://developer.mozilla.org/en-US/docs/Web/API/CSS_Object_Model/Determining_the_dimensions_of_elements
Would in any case only affect the comment, so feel free to ship this.
I couldn't find any references to any rounding going on. Given that the values are all in pixels (right?) I would be interested to what these values are rounded to (for my understanding, you can ship it if it works).
The main cause for the issue is the chat element that uses width: 30%, which causes the screen to be split not evenly (sometimes with 0.5px difference). offsetWidth is always rounded up to full pixels. So, when you divide that (0.5px bigger than in reality) width by the number of columns the sum of widthts of the participant boxes will be bigger than the real width of the container.