Closed Bug 1707234 Opened 4 years ago Closed 4 years ago

Double-tap to zoom breaks the reddit page

Categories

(Core :: Panning and Zooming, defect)

Firefox 89
Desktop
macOS
defect

Tracking

()

VERIFIED FIXED
90 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox88 --- unaffected
firefox89 --- verified
firefox90 --- verified

People

(Reporter: dcicas, Assigned: tnikkel)

References

(Regression)

Details

(Keywords: regression, Whiteboard: [proton-uplift])

Attachments

(2 files)

Affected versions

  • Firefox 90.0a1 (BuildId:20210423095101)
    Firefox 89.0b3

Affected platforms

  • macOS 11.2
    macOS 10.13

Unaffected platforms

  • Windows 10 64 bit
    Ubuntu 18.04

Steps to reproduce

  1. Reach https://www.reddit.com/.
  2. Scroll down to a section.
  3. Open a post.
    3.b Open another post if you cant trigger the bug, it depends on the post.
  4. Double tap on anything inside the post.

Expected result

  • Double tapping should zoom in to the area.

Actual result

  • Double tapping zooms in a lot and the whole pages turns white.

Suggested Severity

  • I suggest an S2 severity because inside a high traffic top site the feature is not behaving as intended.

Regression Range

Additional notes

  • If I scroll up or down the white screen disappears but the page is very zoomed in.
    This issue was found when verifying and regression searching for bug 1704041.
Regressed by: 1704041
Blocks: 1695874
Blocks: 674371

The page is actually overflow hidden, but it looks like the page js scrolls so it's not at 0,0. Our computed scrollable rect is just the viewport because of the overflow hidden, this confuses the code in AsyncPanZoomController::ZoomToRect.

Blocks: 1704222

That's not too hard to fix but there is a flash of content at the wrong scale that happens pretty often still.

(In reply to Timothy Nikkel (:tnikkel) from comment #3)

That's not too hard to fix but there is a flash of content at the wrong scale that happens pretty often still.

I'll fix that in another bug.

In the testcase from the bug we have an overflow hidden document that is being scrolled by the pages javascript. In this case the scrollable rect (aka cssPageRect here) has its position as the scroll offset and the size is the composition size in css pixels. In this case we want to behave as if the scroll position is not movable (since it's not movable by the user), so we only want to be able to zoom to something that is in the visible rect. Staying inside the scrollable rect also makes sense, and we want to do it, for the non-overflow hidden case.

The current code assumes that the scrollable rect starts at 0.

Assignee: nobody → tnikkel
Status: NEW → ASSIGNED
Regressions: 1707417
Has Regression Range: --- → yes
Has STR: --- → yes

Set release status flags based on info from the regressing bug 1704041

Summary: Double-tap to zoom brakes the reddit page → Double-tap to zoom breaks the reddit page
Attached file Bug 1707234. Add test. r?botond (deleted) —
Pushed by tnikkel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/8458c181c404 Don't try to zoom to a rect that is outside of the scrollable range. r=botond https://hg.mozilla.org/integration/autoland/rev/f4c5c7451c00 Add test. r=botond

Backed out 2 changesets (Bug 1707234) for causing android failures in helper_doubletap_zoom_scrolled_overflowhidden.html
Backout link: https://hg.mozilla.org/integration/autoland/rev/35121ea63b8f7ecc2d7382bd66c1f4ac0802b309
Push with failures, failure log.

Flags: needinfo?(tnikkel)

These are TV failures, they don't represent actual failures. Tons of tests that are currently in the tree would fail TV spectacularly if you make a no-op change to their test files to trigger a TV job (source, I've done that many times). But they run just fine normally. I'm going to re-land these.

Flags: needinfo?(tnikkel)

And my try runs which had many more re-triggers than they got on autoland were quite stable.

Looks like it was backed out for a non-TV failure. I'll slightly increase the tolerance for that failure (it only needs to be almost the same).

Pushed by tnikkel@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/08144201afdc Don't try to zoom to a rect that is outside of the scrollable range. r=botond https://hg.mozilla.org/integration/autoland/rev/9addba951269 Add test. r=botond
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
Whiteboard: [proton-uplift]

Comment on attachment 9218087 [details]
Bug 1707234. Don't try to zoom to a rect that is outside of the scrollable range. r?botond

Beta/Release Uplift Approval Request

  • User impact if declined: double tap zoom on reddit pages tries to scroll outside visible bounds, generally very bad experience
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): fixes the rect to zoom calculation only
  • String changes made/needed:
Attachment #9218087 - Flags: approval-mozilla-beta?
Attachment #9218865 - Flags: approval-mozilla-beta?

Comment on attachment 9218087 [details]
Bug 1707234. Don't try to zoom to a rect that is outside of the scrollable range. r?botond

Approved for 89 beta 7, thanks.

Attachment #9218087 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9218865 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Hello,

I can confirm this is fixed in Firefox 89.0b9 and Firefox 90.0a1 (BuildID:20210506214311) on mac OS 11.3

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: