Bug 928800: Doorhanger, while showing, should respect dynamic toolbar's dynamicness. [r=mfinkle]

--HG--
extra : rebase_source : dfb816f01fb26b032b8402b80371d6e70889a3f3
This commit is contained in:
Sriram Ramasubramanian 2013-11-14 16:06:01 -08:00
Родитель 9272e50551
Коммит cdb3b4bd3f
3 изменённых файлов: 10 добавлений и 3 удалений

Просмотреть файл

@ -926,6 +926,9 @@ abstract public class BrowserApp extends GeckoApp
ThreadUtils.postToUiThread(new Runnable() {
public void run() {
toolbarLayout.scrollTo(0, toolbarLayout.getHeight() - marginTop);
if (mDoorHangerPopup.isShowing()) {
mDoorHangerPopup.updatePopup();
}
}
});

Просмотреть файл

@ -268,7 +268,7 @@ public class DoorHangerPopup extends ArrowPopup
*
* This method must be called on the UI thread.
*/
private void updatePopup() {
void updatePopup() {
// Bail if the selected tab is null, if there are no active doorhangers,
// if we haven't inflated the layout yet (this can happen if updatePopup()
// is called before the runnable from addDoorHanger() runs), or if the
@ -299,7 +299,7 @@ public class DoorHangerPopup extends ArrowPopup
showDividers();
if (isShowing()) {
update();
show();
return;
}

Просмотреть файл

@ -114,6 +114,10 @@ public class ArrowPopup extends PopupWindow {
arrowLayoutParams.setMargins(leftMargin, 0, 0, 0);
}
showAsDropDown(mAnchor, offset, -mYOffset);
if (isShowing()) {
update(mAnchor, offset, -mYOffset, -1, -1);
} else {
showAsDropDown(mAnchor, offset, -mYOffset);
}
}
}