Loading image in fennec doesn't pan on initial load

RESOLVED FIXED in Firefox 43

Status

()

RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: kats, Assigned: kats)

Tracking

({regression})

43 Branch
Firefox 43
ARM
Android
regression
Points:
---

Firefox Tracking Flags

(firefox42 unaffected, firefox43 fixed)

Details

Attachments

(1 attachment)

Nexus 4 running sep 05 nightly. Load https://bug1109194.bmoattachments.org/attachment.cgi?id=8533829 and try to pan or zoom in. For me most of the time it doesn't work - I have to zoom out first, and only then will I be able to pan around the whole image. It's a bit racy since sometimes on first load it works fine but ~90% of the time it doesn't. The patch on bug 1202290 doesn't fix this either.
I tracked this down to the displayport not getting set on the page on initial load. What seems to be happening is that while on about:home the displayport margins are all 0 and then when the image is loaded, the _oldDisplayportMargin check at [1] causes the displayport to not get set on the new document's root element. This causes a chain reaction of bad stuff: (1) the root scrollable layer doesn't get a FrameMetrics, which causes (2) Java to end up with bad metrics for the document and (3) Java then propagates that bad metrics all around.

The simple fix is to just get rid of the _oldDisplayportMargin check. The intent of this check was to avoid re-setting the displayport margins if they were already set to the same value, but there is already a check for that at [2], and that check is more accurate because it checks if the margins are actually on the target element rather than on a "tab".

[1] http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js?rev=01970916deda#3725
[2] http://mxr.mozilla.org/mozilla-central/source/layout/base/nsLayoutUtils.cpp?rev=01970916deda#1096
Created attachment 8658157 [details] [diff] [review]
Patch
Attachment #8658157 - Flags: review?(snorp)
status-firefox42: --- → unaffected
Attachment #8658157 - Flags: review?(snorp) → review+
https://hg.mozilla.org/mozilla-central/rev/b337feb71c38
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox43: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
You need to log in before you can comment on or make changes to this bug.