Closed Bug 1758386 Opened 9 months ago Closed 8 months ago

[wpt-sync] Sync PR 33086 - ZoomForDSF: Adjust pixel snapped values using integer adjustment.

Categories

(Core :: DOM: CSS Object Model, task, P4)

task

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 33086 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/33086
Details from upstream follow.

Vladimir Levin <vmpstr@chromium.org> wrote:

ZoomForDSF: Adjust pixel snapped values using integer adjustment.

This patch changes client/offset width and related calculations to
use integer adjustment instead of layout unit adjustment.

The difference, roughly speaking, is that we do the rounding in the
layout space instead of the adjusted for dsf space.

Starting with a value of 13.3 and dsf=2:

Using layout unit rounding, we have

  • The layout value is 26.6, which is pixel snapped to 27.
  • Adjusting for dsf yields 13.5, which is rounded to 14.

Using int rounding, we have

  • The layout value is 26.6, which is pixel snapped to 27.
  • Adjusting adds 0.5 and divides by dsf, which is 13.75
  • Truncated to int, we get 13.

R=ikilpatrick@chromium.org

Fixed: 1302246
Change-Id: I68aa0af1d30a8704657fcd3099b17d56d423f5c2
Reviewed-on: https://chromium-review.googlesource.com/3507532
WPT-Export-Revision: ee73829e27647caae2589650bd038fbd50dd7fed

Component: web-platform-tests → DOM: CSS Object Model
Product: Testing → Core
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1ed68df86c83
[wpt PR 33086] - ZoomForDSF: Adjust pixel snapped values using integer adjustment., a=testonly
Test result changes from PR not available.
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/45f98e10d089
[wpt PR 33086] - ZoomForDSF: Adjust pixel snapped values using integer adjustment., a=testonly
Status: NEW → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
You need to log in before you can comment on or make changes to this bug.