mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 23:02:20 +00:00
Bug 1755521 - Don't lose track of anchor rect width on popup position change. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D138827
This commit is contained in:
parent
d825fb6d4c
commit
52970abaec
@ -2411,8 +2411,14 @@ void nsMenuPopupFrame::MoveTo(const CSSPoint& aPos, bool aUpdateAttrs) {
|
||||
return;
|
||||
}
|
||||
|
||||
mAnchorType = MenuPopupAnchorType_Point;
|
||||
mScreenRect.MoveTo(appUnitsPos);
|
||||
if (mAnchorType == MenuPopupAnchorType_Rect) {
|
||||
// This ensures that the anchor width is still honored, to prevent it from
|
||||
// changing spuriously.
|
||||
mScreenRect.height = 0;
|
||||
} else {
|
||||
mAnchorType = MenuPopupAnchorType_Point;
|
||||
}
|
||||
|
||||
SetPopupPosition(nullptr, true, mSizedToPopup);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user