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
parent 681a32500a
commit e15f1bd4b7
3 changed files with 10 additions and 3 deletions

View File

@ -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();
}
}
});

View File

@ -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;
}

View File

@ -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);
}
}
}