fix(capture): honour the capture viewport environment variables - #28
Closed
pathscale wants to merge 1 commit into
Closed
fix(capture): honour the capture viewport environment variables#28pathscale wants to merge 1 commit into
pathscale wants to merge 1 commit into
Conversation
`scripts/render-check.sh` has documented and exported CHUZZ_CAPTURE_WIDTH and CHUZZ_CAPTURE_HEIGHT since it was written, and the capture entry point read neither: it passed a literal 1440 by 960. Every capture was that size whatever the caller asked for, and a run at another width produced a byte-identical tree, which is how this surfaced. That matters now because captures are about to be compared against a reference browser. Two engines laying the same page out at different widths disagree on every percentage width, every centred box and every responsive breakpoint, so an unhonoured viewport turns a diff into noise that reads exactly like a rendering fault. Only CHUZZ_CAPTURE_SCALE was wired up, so the fix follows its shape.
Owner
Author
|
Superseded by #30, which stacks this with the runtime script-fetch work for a single release. |
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.
scripts/render-check.shhas documented and exportedCHUZZ_CAPTURE_WIDTHandCHUZZ_CAPTURE_HEIGHTsince it was written, and the capture entry point read neither — it passed a literal1440, 960. Every capture came out that size whatever the caller asked for.Found while setting up a reference-browser comparison: a re-capture at width 1507 produced a byte-identical tree dump to the 1440 run, which is not something a working viewport knob can do.
This matters beyond tidiness. Two engines laying the same page out at different widths disagree on every percentage width, every centred box and every responsive breakpoint, so an unhonoured viewport turns a rendering diff into noise that reads exactly like a rendering fault.
Only
CHUZZ_CAPTURE_SCALEwas wired up, so the fix follows its shape.Verified:
CHUZZ_CAPTURE_WIDTH=1507 CHUZZ_CAPTURE_HEIGHT=803 scripts/render-check.shnow yieldsbody 0,0 1507*803, against1440*960before.cargo fmt --checkandcargo clippy -D warningsboth clean.