Page MenuHomePhorge

[Meet] Fix video elements sizing bug
ClosedPublic

Authored by machniak on Apr 14 2021, 2:29 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mar 12 2024, 1:46 AM
Unknown Object (File)
Mar 6 2024, 9:42 PM
Unknown Object (File)
Feb 15 2024, 4:15 PM
Unknown Object (File)
Feb 15 2024, 9:03 AM
Unknown Object (File)
Feb 8 2024, 4:54 AM
Unknown Object (File)
Jan 24 2024, 11:01 PM
Unknown Object (File)
Jan 24 2024, 11:01 PM
Unknown Object (File)
Jan 24 2024, 7:49 PM
Subscribers
Restricted Project

Details

Reviewers
mollekopf
Group Reviewers
Restricted Project
Commits
rK7e6b1576f5cf: [Meet] Fix video elements sizing bug
Summary

T432152

Test Plan

./phpunit

Diff Detail

Repository
rK kolab
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

machniak created this revision.

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.

This revision is now accepted and ready to land.Apr 15 2021, 10:39 AM
This revision was automatically updated to reflect the committed changes.