Repository navigation
Compare the layout sweep's unrounded edges instead of rounding each value - #6404
Merged
Merged
Conversation
…each value Rounding each box value is a tolerance with fixed boundaries: an edge from 804.49 to 804.51 read as a pixel's move, and half a pixel inside a bucket read as none. The sweep now reads left, top, right and bottom from getBoundingClientRect and compares them exactly; the sixth right-edge field is gone. Behavior changed: the sweep fails on any sub-pixel move of a watched box.
leaf-agent
approved these changes
Nov 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes
The layout box sweep (
DEFINE_BOXES,displaced) now reads each watched control'sleft,top,rightandbottomunrounded fromgetBoundingClientRect()and compares them exactly. The sixthMath.round(box.right)field added in #6398 is gone, since an unrounded right edge needs no special field. Failure messages report(left, top, right, bottom).Why
Rounding each value is a tolerance with fixed boundaries: an edge moving from 804.49 to 804.51 reads as a 1 px move, and a 0.4 px move inside a bucket reads as none. #6398 fixed one case of this (a right edge that never moved, read as 805 then 804, failing
test_the_poll_leaves_the_panel_where_it_wason macOS); this removes the cause.Evidence
Exact comparison adds no constant. On macOS, the poll test, the whole-row detection test and all seven
test_each_control_archetype_holds_its_neighbours_stillcases pass with it, so no run showed sub-pixel noise on boxes that didn't move; theabs(a - b) <= 0.5tolerance is not needed.Refs #6392