From ef353be5a09134e6e1d8833b469bfded3461d83a Mon Sep 17 00:00:00 2001 From: Gijs Kruitbosch Date: Mon, 9 Jun 2014 12:40:48 +0100 Subject: [PATCH] Bug 467442 - take transforms into account for popup placement, r=bz,f=tnikkel --HG-- extra : rebase_source : fd3acd246c9bee79feba59ac382048848b059866 --- layout/xul/nsMenuPopupFrame.cpp | 23 ++++++++----- layout/xul/test/chrome.ini | 1 + layout/xul/test/test_bug467442.xul | 54 ++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 layout/xul/test/test_bug467442.xul diff --git a/layout/xul/nsMenuPopupFrame.cpp b/layout/xul/nsMenuPopupFrame.cpp index c5397d1c2e0a..08ab1a9b4f7f 100644 --- a/layout/xul/nsMenuPopupFrame.cpp +++ b/layout/xul/nsMenuPopupFrame.cpp @@ -1156,15 +1156,22 @@ nsMenuPopupFrame::SetPopupPosition(nsIFrame* aAnchorFrame, bool aIsMove, bool aS } } - // the dimensions of the anchor in its app units - nsRect parentRect = aAnchorFrame->GetScreenRectInAppUnits(); + // In order to deal with transforms, possibly on an ancestor of the