Closed Bug 1202652 Opened 6 years ago Closed 6 years ago
Loading image in fennec doesn't pan on initial load
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  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 , and that check is more accurate because it checks if the margins are actually on the target element rather than on a "tab".  http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/browser.js?rev=01970916deda#3725  http://mxr.mozilla.org/mozilla-central/source/layout/base/nsLayoutUtils.cpp?rev=01970916deda#1096
6 years ago
Attachment #8658157 - Flags: review?(snorp) → review+
You need to log in before you can comment on or make changes to this bug.