After the popup reworking patch (bug 279703), calling gMenuPopup.showPopup(gTrigger, -1, -1, "popup", "topleft", "topleft"); causes the popup to be offset by 1. This is because the code in nsMenuPopupFrame::InitializePopupWithAnchorAlign is erroneously adding the -1 x and y values to the anchor position. It should be using 0.
Created attachment 270963 [details] [diff] [review] fix off by one error Initialize mXPos and mYPos to 0 when -1 are passed in.
Found this bug when creating the testcase in bug 279703 so no need for an extra test here.