Limit translucent popups to chrome docshells b=70798 r+sr=bz

This commit is contained in:
neil%parkwaycc.co.uk 2006-09-14 23:03:40 +00:00
parent 22b21deaf6
commit 0696d9668a

View File

@ -223,6 +223,14 @@ nsMenuPopupFrame::CreateWidgetForView(nsIView* aView)
PRBool viewHasTransparentContent = hasBG &&
(bg->mBackgroundFlags & NS_STYLE_BG_COLOR_TRANSPARENT) &&
!GetStyleDisplay()->mAppearance;
if (viewHasTransparentContent) {
nsCOMPtr<nsISupports> cont = GetPresContext()->GetContainer();
nsCOMPtr<nsIDocShellTreeItem> dsti = do_QueryInterface(cont);
PRInt32 type = -1;
if (!dsti || NS_FAILED(dsti->GetItemType(&type)) ||
type != nsIDocShellTreeItem::typeChrome)
viewHasTransparentContent = PR_FALSE;
}
nsIContent* parentContent = GetContent()->GetParent();
nsIAtom *tag = nsnull;