mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
Bug 1197233 - When fullscreening a video make sure we don't show garbage in the toolbar area. r=rbarker
--HG-- extra : commitid : FC0cW3NkINy
This commit is contained in:
parent
c10cfda0d4
commit
7ec5cb2fcf
@ -235,9 +235,17 @@ public class DynamicToolbarAnimator {
|
||||
}
|
||||
|
||||
IntSize getViewportSize() {
|
||||
ThreadUtils.assertOnUiThread();
|
||||
|
||||
int viewWidth = mTarget.getView().getWidth();
|
||||
int viewHeight = mTarget.getView().getHeight();
|
||||
int viewHeightVisible = viewHeight - Math.round(mMaxTranslation - mToolbarTranslation);
|
||||
float toolbarTranslation = mToolbarTranslation;
|
||||
if (mAnimationTask != null) {
|
||||
// If we have an animation going, mToolbarTranslation may be in flux
|
||||
// and we should use the final value it will settle on.
|
||||
toolbarTranslation = mAnimationTask.getFinalToolbarTranslation();
|
||||
}
|
||||
int viewHeightVisible = viewHeight - Math.round(mMaxTranslation - toolbarTranslation);
|
||||
return new IntSize(viewWidth, viewHeightVisible);
|
||||
}
|
||||
|
||||
@ -482,6 +490,10 @@ public class DynamicToolbarAnimator {
|
||||
mShiftLayerView = aShiftLayerView;
|
||||
}
|
||||
|
||||
float getFinalToolbarTranslation() {
|
||||
return mEndTranslation;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean internalRun(long timeDelta, long currentFrameStartTime) {
|
||||
if (!mContinueAnimation) {
|
||||
|
@ -221,7 +221,7 @@ class GeckoLayerClient implements LayerView.Listener, PanZoomTarget
|
||||
}
|
||||
mViewportMetrics = mViewportMetrics.setViewportSize(width, height);
|
||||
if (scrollChange != null) {
|
||||
mViewportMetrics = mViewportMetrics.offsetViewportBy(scrollChange.x, scrollChange.y);
|
||||
mViewportMetrics = mViewportMetrics.offsetViewportByAndClamp(scrollChange.x, scrollChange.y);
|
||||
}
|
||||
|
||||
if (mGeckoIsReady) {
|
||||
|
Loading…
Reference in New Issue
Block a user