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

LibWeb: Calculate image size in CSS pixels #2982

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

InvalidUsernameException
Copy link
Contributor

Previously most of the calculations for object-fit and object-position were based on device pixels, meaning that images would render differently based on zoom and DPI settings. Instead those calculations now use css pixels and only the final draw-call is based on device-pixels.

The changes in test expectation files are due to the fact that in one place image size is now correctly rounded instead of truncated, fixing an off-by-one error that was coded into those test expectations.

Draft because there is no regression test yet.

scaling-before.mp4
scaling-after.mp4

Previously most of the calculations for `object-fit` and
`object-position` were based on device pixels, meaning that images would
render differently based on zoom and DPI settings. Instead those
calculations now use css pixels and only the final draw-call is based
on device-pixels.
@github-actions github-actions bot added the conflicts Pull request has merge conflicts that need resolution label Dec 21, 2024
Copy link

Your pull request has conflicts that need to be resolved before it can be reviewed and merged. Make sure to rebase your branch on top of the latest master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
conflicts Pull request has merge conflicts that need resolution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant