Comment 41 for bug 187313

Revision history for this message
In , Neil-httl (neil-httl) wrote :

Comment on attachment 317116
fix v3

>+ nscoord offsetForContextMenu = 0;

>+ PRInt32 offsetForContextMenuCSS = mAdjustOffsetForContextMenu ? 2 : 0;
>+ PRInt32 offsetForContextMenuDev =
>+ nsPresContext::CSSPixelsToAppUnits(offsetForContextMenuCSS) / factor;
>+ offsetForContextMenu = presContext->DevPixelsToAppUnits(offsetForContextMenuDev);
Any reason not to do this in an if rather than possibly calculating with zero?