Bug 853820: Doorhanger buttons are of different size. [r=mfinkle]

This commit is contained in:
Sriram Ramasubramanian 2013-04-02 14:32:08 -07:00
Родитель 804c3824b9
Коммит 11cfd64d22
1 изменённых файлов: 7 добавлений и 2 удалений

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

@ -266,8 +266,13 @@ public class DoorHangerPopup extends PopupWindow
return;
}
// If there's no anchor, just show the popup at the top of the gecko app view.
if (mAnchor == null) {
int[] anchorLocation = new int[2];
if (mAnchor != null)
mAnchor.getLocationInWindow(anchorLocation);
// If there's no anchor or the anchor is out of the window bounds,
// just show the popup at the top of the gecko app view.
if (mAnchor == null || anchorLocation[1] < 0) {
showAtLocation(mActivity.getView(), Gravity.TOP, 0, 0);
return;
}