Open Bug 1865573 Opened 2 years ago Updated 2 years ago

Zoom ratio on double-tap-to-zoom sometimes doesn't increase monotonically

Categories

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

defect

Tracking

()

People

(Reporter: hiro, Unassigned)

Details

Attachments

(1 file)

Attaching file adds a mochitest to see this bug;

Step to reproduce the issue;

  1. MOZ_LOG="apz.helper:5" ./mach mochitest --setpref="apz.subtest=helper_doubletap_zoom_bug.html" gfx/layers/apz/test/mochitest/test_group_double_tap_zoom-2.html
  2. Check the log you got

An example I got is;

 0:40.72 GECKO(151732) [Child 151936: Main Thread]: D/apz.helper Handling request { scrollId=4, scrollOffset=(0,10050), zoom=0.8, viewport=(x=0, y=10050, w=2868, h=2387.5), scrollUpdateType=1, scrollGeneration=10, scrollGenerationOnApz=0, dpMargins=(t=589.375, r=71.25, b=589.375, l=71.25)}
 0:40.79 GECKO(151732) [Child 151936: Main Thread]: D/apz.helper Handling request { scrollId=4, scrollOffset=(0,10050), zoom=0.8, viewport=(x=0, y=10050, w=2868, h=2387.5), scrollUpdateType=1, scrollGeneration=10, scrollGenerationOnApz=0, dpMargins=(t=304.421, r=184.009, b=304.421, l=184.009)}
 0:40.79 GECKO(151732) [Child 151936: Main Thread]: D/apz.helper Handling request { scrollId=4, scrollOffset=(9.30884,10159.5), zoom=0.840356, viewport=(x=0, y=10050, w=2868, h=2387.5), scrollUpdateType=1, scrollGeneration=10, scrollGenerationOnApz=3, dpMargins=(t=304.421, r=184.009, b=304.421, l=184.009)}
 0:40.81 GECKO(151732) [Child 151936: Main Thread]: D/apz.helper Handling request { scrollId=4, scrollOffset=(9.30884,10159.5), zoom=0.840356, viewport=(x=0, y=10050, w=2856, h=2375.5), scrollUpdateType=0, scrollGeneration=10, scrollGenerationOnApz=3, dpMargins=(t=304.421, r=184.009, b=304.421, l=184.009)}
 0:40.83 GECKO(151732) [Child 151936: Main Thread]: D/apz.helper Handling request { scrollId=4, scrollOffset=(22.1623,10310.6), zoom=0.903273, viewport=(x=0, y=10050, w=2856, h=2375.5), scrollUpdateType=1, scrollGeneration=10, scrollGenerationOnApz=4, dpMargins=(t=304.421, r=184.009, b=304.421, l=184.009)}
 0:40.84 GECKO(151732) [Child 151936: Main Thread]: D/apz.helper Handling request { scrollId=4, scrollOffset=(38.5933,10503.8), zoom=0.998872, viewport=(x=0, y=10050, w=2856, h=2375.5), scrollUpdateType=1, scrollGeneration=10, scrollGenerationOnApz=5, dpMargins=(t=304.421, r=184.009, b=304.421, l=184.009)}
 0:40.84 GECKO(151732) [Child 151936: Main Thread]: D/apz.helper Handling request { scrollId=4, scrollOffset=(38.5933,10349), zoom=0.903273, viewport=(x=0, y=10071.5, w=2856, h=2365.55), scrollUpdateType=0, scrollGeneration=10, scrollGenerationOnApz=5, dpMargins=(t=304.421, r=184.009, b=304.421, l=184.009)}

At 0:40:83, the zoom value was 0.903273 and then the zoom value on next update was 0.998872 at 0:40.84, but soon after it was 0.903273 again. As far as I can tell the second 0.903273 came from a repaint request in NotifyLayersUpdated.

Due to this bug mochitests added for bug 1715179 are quite unstable.

Interesting. I wonder if we are getting some type of update from the content side at 0.903273 and clobbers the apz side animation?

I thought I would have run into this if it existed back when I was working on double tap zoom, so perhaps this regressed since then?

(In reply to Hiroyuki Ikezoe (:hiro) from comment #0)

At 0:40:83, the zoom value was 0.903273 and then the zoom value on next update was 0.998872 at 0:40.84, but soon after it was 0.903273 again. As far as I can tell the second 0.903273 came from a repaint request in NotifyLayersUpdated.

It turned out that the repaint request is triggered by this branch where the layout viewport size has been changed.

Adding scrollbar-width: none is a workaround for bug 1715179. That makes me suspect that we mis-include the scrollbar for the visual viewport into the layout viewport size?

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: