diff options
author | Szabolcs David <davidsz@inf.u-szeged.hu> | 2025-07-28 16:35:50 +0200 |
---|---|---|
committer | Szabolcs David <davidsz@inf.u-szeged.hu> | 2025-08-17 18:44:09 +0000 |
commit | be7190c6565e995bd6877b47a400f37692137ee3 (patch) | |
tree | a74dfc9a1215ddf83095a988e6e1adc8a49295ff /src/webenginequick/api/qquickwebenginetouchhandle.cpp | |
parent | 653122d8649da8d6d7791edf046aee4304b5963b (diff) |
This test fails for example when the system has a 125% global zoom level
set.
Inside Chromium: The requested pixel positions will be scaled up by the
device pixel ratio (1.25). The resulting fractional number will be
floored down and used for scrolling.
In RenderWidgetHostViewQt: We are informed about the scroll event and
the non-fractional integer is provided for us. We try to scale this
value down by dividing with the DPR to get back the requested pixel
position - but the result will never be accurate becase of the lost
fractional part in Chromium.
In this example, the difference between the requested and the actual
scroll position is outside of the tolerance level of qFuzzyCompare.
The good news is Chrome behaves the same way, it provides the same
inaccurate fractional scroll position in JavaScript as WebEngine
(both in the API and in JavaScript). So the best we can do is
relaxing the test by implementing a less strict comparison function
for floats.
Pick-to: 6.10 6.9
Change-Id: I2e924fac4344126727c347098b7f17da700181e0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'src/webenginequick/api/qquickwebenginetouchhandle.cpp')
0 files changed, 0 insertions, 0 deletions