Closed Bug 1202652 Opened 6 years ago Closed 6 years ago

Loading image in fennec doesn't pan on initial load

Categories

(Firefox for Android Graveyard :: Toolbar, defect)

43 Branch
ARM
Android
defect
Not set
normal

Tracking

(firefox42 unaffected, firefox43 fixed)

RESOLVED FIXED
Firefox 43
Tracking Status
firefox42 --- unaffected
firefox43 --- fixed

People

(Reporter: kats, Assigned: kats)

Details

(Keywords: regression)

Attachments

(1 file)

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
Attached patch PatchSplinter Review
Attachment #8658157 - Flags: review?(snorp)
Attachment #8658157 - Flags: review?(snorp) → review+
https://hg.mozilla.org/mozilla-central/rev/b337feb71c38
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.