Comment on attachment 316915 fix v2
>-nsMenuPopupFrame::InitializePopupAtScreen(PRInt32 aXPos, PRInt32 aYPos) >+nsMenuPopupFrame::InitializePopupAtScreen(PRInt32 aXPos, PRInt32 aYPos, >+ PRBool aIsContextMenu) > { > EnsureWidget(); > > mPopupState = ePopupShowing; > mAnchorContent = nsnull; > mScreenXPos = aXPos; > mScreenYPos = aYPos; > mPopupAnchor = POPUPALIGNMENT_NONE; > mPopupAlignment = POPUPALIGNMENT_NONE; >+ mIsContextMenu = aIsContextMenu; >+ mAdjustOffsetForContextMenu = aIsContextMenu;
mAdjustOffsetForContextMenu should be set to false for the other two InitializeX methods.
> screenViewLocY = nsPresContext::CSSPixelsToAppUnits(mScreenYPos) / factor; >+ PRInt32 offsetForContextMenuCSS = mAdjustOffsetForContextMenu ? 2 : 0; >+ PRInt32 offsetForContextMenuDev = >+ nsPresContext::CSSPixelsToAppUnits(offsetForContextMenu) / factor;
You meant 'offsetForContextMenuCSS' here right?
I assume with this patch that the test for contextmenus (test_contextmenu_list.xul) works ok?
I'm not a superreviewer, so let's ask the other Neil.
Comment on attachment 316915
fix v2
>-nsMenuPopupFr ame::Initialize PopupAtScreen( PRInt32 aXPos, PRInt32 aYPos) ame::Initialize PopupAtScreen( PRInt32 aXPos, PRInt32 aYPos, NONE; NONE; rContextMenu = aIsContextMenu;
>+nsMenuPopupFr
>+ PRBool aIsContextMenu)
> {
> EnsureWidget();
>
> mPopupState = ePopupShowing;
> mAnchorContent = nsnull;
> mScreenXPos = aXPos;
> mScreenYPos = aYPos;
> mPopupAnchor = POPUPALIGNMENT_
> mPopupAlignment = POPUPALIGNMENT_
>+ mIsContextMenu = aIsContextMenu;
>+ mAdjustOffsetFo
mAdjustOffsetFo rContextMenu should be set to false for the other two InitializeX methods.
> screenViewLocY = nsPresContext: :CSSPixelsToApp Units(mScreenYP os) / factor; tMenuCSS = mAdjustOffsetFo rContextMenu ? 2 : 0; tMenuDev = :CSSPixelsToApp Units(offsetFor ContextMenu) / factor;
>+ PRInt32 offsetForContex
>+ PRInt32 offsetForContex
>+ nsPresContext:
You meant 'offsetForConte xtMenuCSS' here right?
I assume with this patch that the test for contextmenus (test_contextme nu_list. xul) works ok?
I'm not a superreviewer, so let's ask the other Neil.