Do not restore zoom on cancellable nsISHistoryListener events

RESOLVED INVALID

Status

()

Firefox for Android
General
RESOLVED INVALID
3 years ago
9 months ago

People

(Reporter: mcomella, Unassigned, Mentored)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [lang=js][lang=c++])

(Reporter)

Description

3 years ago
After bug 960746 lands, the restore zoom functionality is the only event relying on the OnHistory* listeners (e.g. [1]). As per bug 960746 comment 48, these listeners don't necessarily result in a page load event, meaning this restore zoom functionality may occur when we don't actually load a new page.

If possible, we should move this restore functionality to a stable event such as onLocationChange (as per bug 960746). Afterwards, unregister the history listener and delete the associated methods [2].

[1]: https://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js?rev=d63fe263014c#4449
[2]: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XPCOM/Reference/Interface/nsISHistoryListener
(Reporter)

Comment 1

3 years ago
Note that this move may not be possible because we may need the "restoreZoom" information before the onLocationChange (or other) event - analyze where it's used and make sure the update can occur at this later point.
(Reporter)

Updated

3 years ago
Mentor: michael.l.comella@gmail.com
Whiteboard: [lang=js][lang=c++]
(Reporter)

Updated

3 years ago
Mentor: snorp@snorp.net, nchen@mozilla.com

Comment 2

9 months ago
Probably obsoleted by APZ and no longer needed (compare bug 1337325).
Status: NEW → RESOLVED
Last Resolved: 9 months ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.