Repository navigation
test: accept the contents link's subpixel shortfall from the 44px touch floor - #5208
Merged
Merged
Conversation
…ch floor Under a coarse pointer a contents link pads its line out to the aim floor with (--aim-floor - 1lh) / 2. Since #4859 set the outline in --font-ui (14px at line-height 1.45, 20.3px), layout truncates the line box and the padding to 1/64px units and each link stands 43.984px tall, so the exact >= 44 check failed. The padding floor is the layer's documented way to state a block floor (surfaces.css), and test_coarse_pointer_panel_lists_give_humane_aims already accepts the same loss at 43.9. The test now uses that threshold; the user-facing behavior it protects, a finger-sized row under touch against compact rows under a mouse, is unchanged. Closes #5163
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.
Under touch, each contents link stands 43.984px tall, 1/64px short of the 44px floor
test_a_table_of_contents_link_is_a_finger_s_aimchecked exactly. The link reaches the floor through padding,(--aim-floor - 1lh) / 2(toc.css). Since #4859 set the outline in--font-ui(14px at line-height 1.45, so a 20.3px line), Chrome truncates the line box and the padding to 1/64px layout units, and the sum falls short by one unit. Before that change the line was 1.3 and happened to round to the floor.Padding is the layer's documented way to state a block floor (the aim-floor comment in
browser/styles/components/surfaces.css).test_coarse_pointer_panel_lists_give_humane_aimsalready accepts the same shortfall by checking against 43.9. This test now uses that threshold too. It still checks the same behavior: finger-sized rows under touch and compact 24–30px rows under a mouse. No CSS or layout changes.The test fails on current
main(both links measure 43.984375px) and passes with this change.Closes #5163 — automated triage