Repository navigation
Read stills' styles as computed values, so an auto margin reads auto - #7464
Merged
Merged
Conversation
`leaf-dev stills` reported style changes on identical arms in 3 of 63 card and thread states (detached-thread, threads-returning, thread-picture): one arm read an auto margin, on `main` or a shot's canvas, as 0px and the other as 217px or 336px. `getComputedStyle` reports a margin's used length, and on one tab at detached-thread Chromium went from 336px to 0px across a style walk or a ring reading while the box stayed at 336px. #6798 moved the style walk before the screenshot for the same symptom, which this reading makes unnecessary. The walk now reads each property's computed value through `computedStyleMap`, the cascade's own value the header already asks for, so the margin reads `auto` throughout. Firefox has no `computedStyleMap` and keeps `getComputedStyle`. The walk costs the same (0.29-0.31s vs 0.26s on the feature gallery), the three states plus summary-card read unchanged in 3 of 3 runs on identical arms, and a `margin-left: 3%` added to the card is still reported, as `0px -> 3%`.
leaf-agent
approved these changes
Nov 27, 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.
leaf-dev stillsstill reported style changes on identical arms in 3 of 63 card and thread states (detached-thread, threads-returning, thread-picture): one arm read an auto margin as 0px and the other as 217px or 336px.getComputedStylereports a margin's used length, which Chromium sometimes misreports as 0px while the box stays put; on one tab it flipped across a style walk or a ring reading. The style walk now reads computed values throughcomputedStyleMap, the cascade's own value the stills header already asks for, so the margin readsauto. Firefox has nocomputedStyleMapand keepsgetComputedStyle.The walk costs the same (about 0.3 s on the feature gallery). The three states and summary-card read unchanged in 3 of 3 identical-arm runs, and a
margin-left: 3%added to the card is still reported, as0px -> 3%. A follow-up to #7456, which Max asked to have fixed before this session closed.dev/tests/model/test_stills.pypasses.