Closed Bug 1787953 Opened 3 years ago Closed 3 years ago

Change the value of COORDINATE_EPSILON back to 0.01

Categories

(Core :: Panning and Zooming, task, P3)

task

Tracking

()

RESOLVED FIXED
106 Branch
Tracking Status
firefox106 --- fixed

People

(Reporter: botond, Assigned: botond)

Details

Attachments

(2 files)

COORDINATE_EPSILON is a constant used by APZ code as an epsilon in floating-point coordinate comparisons.

Its value at the time of its introduction was 0.01. The comment above it includes the following note:

// Note also that the smallest legitimate difference in page
// coordinates is 1 app unit, which is 1/60 of a (CSS pixel), so this epsilon
// isn't too large.

which suggests that the value was deliberately chosen to be below 1/60 = 0.016....

The current value of COORDINATE_EPSILON is 0.02. The change happened in https://phabricator.services.mozilla.com/D87405, which is titled "Move AsyncTransform from AsyncCompositionManager.h to APZUtils.h".

The change to the value of COORDINATE_EPSILON does not seem to be related to the title of that patch, nor is it explained/justified in the commit message or associated discussion.

My best guess is, this is a change I had applied locally for some debugging purpose, and it slipped into that patch accidentally during patch splitting.

Notably, the 0.02 value is inconsistent with the original intent of being smaller than 1 app unit (0.016...).

In this bug, I'd like to change it back to the original value of 0.01.

The previous change to 0.02 appears to have been unintentional,
and the value should be less than 1 app unit (1/60 of a pixel).

This epsilon was split off from COORDINATE_EPSILON in bug 1787099,
but the original value used here (before bug 1659642) was 0.01
as well.

Depends on D155904

Pushed by bballo@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/363982aa6de6 Change the value of COORDINATE_EPSILON back to 0.01. r=tnikkel https://hg.mozilla.org/integration/autoland/rev/6bf13d375660 Update the value of the epsilon used in SampledAPZCState::RemoveFractionalAsyncDelta() to 0.01 as well. r=tnikkel
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 106 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: