Closed Bug 1120244 Opened 7 years ago Closed 7 years ago

When scrolled to the bottom of a page in Fennec, the java-side viewport is incorrect

Categories

(Firefox for Android Graveyard :: Toolbar, defect)

All
Android
defect
Not set
normal

Tracking

(firefox37 affected, firefox38 affected)

RESOLVED WONTFIX
Firefox 37
Tracking Status
firefox37 --- affected
firefox38 --- affected

People

(Reporter: kats, Assigned: kats)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1120211 +++

Same STR as bug 1120211 (without the patch on that bug applied). I was looking at the various metrics once we are scrolled to the bottom of the page and blurry content is visible. I noticed that the java-side viewportRect was incorrect in that it went past the page bounds by 96 pixels (the margin amount).

What's happening here is that once we scroll to the bottom of the page, the dynamic toolbar is made visible [1]. During the animation the top margin is increased [2] and the viewport is shifted down [3] to match. However, the shifting of the viewport does not properly clamp the viewport to the page rect, with the result that the viewport can get shifted beyond the page rect.

[1] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/BrowserApp.java?rev=5419d08cbe98#1276
[2] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/gfx/LayerMarginsAnimator.java?rev=5419d08cbe98#288
[3] http://mxr.mozilla.org/mozilla-central/source/mobile/android/base/gfx/LayerMarginsAnimator.java?rev=5419d08cbe98#296
Attached patch PatchSplinter Review
This fixes the incorrect clamping but to be honest my knowledge of this code is kinda shaky so I hope it doesn't regress anything...
Attachment #8547219 - Flags: review?(snorp)
Comment on attachment 8547219 [details] [diff] [review]
Patch

Review of attachment 8547219 [details] [diff] [review]:
-----------------------------------------------------------------

I don't pretend to really understand this code, but your explanation makes sense.
Attachment #8547219 - Flags: review?(snorp) → review+
https://hg.mozilla.org/mozilla-central/rev/a6183ada0399
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 37
Depends on: 1121268
This introduced problems scrolling to the bottom of pages, see bug 1121268.
Backed out this patch on fx-team in bug 1121268.
Resolution: FIXED → WONTFIX
Backed out on aurora as well in bug 1121268.
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.