зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1364194
- Refresh static toolbar snapshot when page width changes r=botond,jchen
MozReview-Commit-ID: HaQo66j640g
This commit is contained in:
Родитель
84cf5d5cd4
Коммит
962808afbf
|
@ -278,10 +278,15 @@ AndroidDynamicToolbarAnimator::SetCompositionSize(ScreenIntSize aSize)
|
|||
return false;
|
||||
}
|
||||
|
||||
ScreenIntCoord prevHeight = mCompositorCompositionSize.height;
|
||||
ScreenIntSize prevSize = mCompositorCompositionSize;
|
||||
mCompositorCompositionSize = aSize;
|
||||
|
||||
if (prevHeight != aSize.height) {
|
||||
// The width has changed so the static snapshot needs to be updated
|
||||
if ((prevSize.width != aSize.width) && (mToolbarState != eToolbarVisible)) {
|
||||
PostMessage(STATIC_TOOLBAR_NEEDS_UPDATE);
|
||||
}
|
||||
|
||||
if (prevSize.height != aSize.height) {
|
||||
UpdateControllerCompositionHeight(aSize.height);
|
||||
UpdateFixedLayerMargins();
|
||||
}
|
||||
|
|
|
@ -1712,7 +1712,11 @@ public class BrowserApp extends GeckoApp
|
|||
if (aShow) {
|
||||
mBrowserChrome.setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mBrowserChrome.setVisibility(View.GONE);
|
||||
// The chrome needs to be INVISIBLE instead of GONE so that
|
||||
// it will continue update when the layout changes. This
|
||||
// ensures the bitmap generated for the static toolbar
|
||||
// snapshot is the correct size.
|
||||
mBrowserChrome.setVisibility(View.INVISIBLE);
|
||||
}
|
||||
|
||||
super.toggleChrome(aShow);
|
||||
|
|
Загрузка…
Ссылка в новой задаче