Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

browsingContext.print: minimum page size: round down instead of up #536

Merged
merged 1 commit into from
Sep 12, 2023

Conversation

thiagowfx
Copy link
Member

@thiagowfx thiagowfx commented Sep 11, 2023

This is a small correction of #534.

The minimum page size is (2.54 / 72) = 0.03527...

We need to round it down to 0.0352 instead of up to 0.0353 in order to make 0.03527 (1x1 point) an acceptable value.


Preview | Diff

This is a small correction of #534.

The minimum page size is (2.54 / 72) = 0.03527...

We need to round it down to 0.0352 instead of up to 0.0353 in order to
make 0.03527 an acceptable value.
@thiagowfx thiagowfx changed the title browsingContext.print: minimum page size: round down instead of up browsingContext.print: minimum page size: round down instead of up Sep 11, 2023
Copy link
Contributor

@whimboo whimboo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, good point. It's probably more likely to hit that case as running into the still existent invalid small gap between 2.54/72 and 0.0352. Nevertheless having to use fractional numbers is always not great, especially when it comes to checking the equality.

@whimboo whimboo merged commit 43abc3c into main Sep 12, 2023
3 checks passed
@whimboo whimboo deleted the print branch September 12, 2023 07:48
github-actions bot added a commit that referenced this pull request Sep 12, 2023
)

SHA: 43abc3c
Reason: push, by whimboo

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants