Bug 892246 - Allow subdocument scrolling to reveal margins. r=kats
This adds a notification callback to PanZoomTarget that the PanZoomController can call to notify GeckoLayerClient that a subdocument is being scrolled. This allows GeckoLayerClient to call LayerMarginsAnimator and alter the margins accordingly, stopping a page from trapping the toolbar on/off the screen with a screen-covering subframe.
This commit is contained in:
@@ -806,7 +806,11 @@ class JavaPanZoomController
|
||||
if (FloatUtils.fuzzyEquals(displacement.x, 0.0f) && FloatUtils.fuzzyEquals(displacement.y, 0.0f)) {
|
||||
return;
|
||||
}
|
||||
if (! mSubscroller.scrollBy(displacement)) {
|
||||
if (mSubscroller.scrollBy(displacement)) {
|
||||
synchronized (mTarget.getLock()) {
|
||||
mTarget.onSubdocumentScrollBy(displacement.x, displacement.y);
|
||||
}
|
||||
} else {
|
||||
synchronized (mTarget.getLock()) {
|
||||
scrollBy(displacement.x, displacement.y);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user