Bug 433340 bookmark dialog covers candidate window when using IMEr=enndeakin, sr=neil, a=mtschrep

This commit is contained in:
masayuki%d-toybox.com 2008-05-23 04:47:25 +00:00
Родитель 731917ae91
Коммит 7bb00ba873
3 изменённых файлов: 24 добавлений и 4 удалений

Просмотреть файл

@ -856,6 +856,7 @@ GK_ATOM(tooltip, "tooltip")
GK_ATOM(tooltiptext, "tooltiptext")
GK_ATOM(top, "top")
GK_ATOM(topmargin, "topmargin")
GK_ATOM(topmost, "topmost")
GK_ATOM(toppadding, "toppadding")
GK_ATOM(tr, "tr")
GK_ATOM(trailing, "trailing")

Просмотреть файл

@ -189,6 +189,21 @@ nsMenuPopupFrame::IsNoAutoHide()
nsGkAtoms::_true, eIgnoreCase));
}
PRBool
nsMenuPopupFrame::IsTopMost()
{
// If this popup is not a panel, this is always a topmost popup.
if (mPopupType != ePopupTypePanel)
return PR_TRUE;
// Web pages should not be able to create a topmost panel. If this panel is
// a noautohide panel, it should appear just above the parent window.
if (mInContentShell || IsNoAutoHide())
return PR_FALSE;
// Otherwise, check the topmost attribute.
return mContent->AttrValueIs(kNameSpaceID_None, nsGkAtoms::topmost,
nsGkAtoms::_true, eIgnoreCase);
}
void
nsMenuPopupFrame::EnsureWidget()
{
@ -218,11 +233,11 @@ nsMenuPopupFrame::CreateWidgetForView(nsIView* aView)
tag = parentContent->Tag();
widgetData.mDropShadow = !(viewHasTransparentContent || tag == nsGkAtoms::menulist);
// panels which don't auto-hide need a parent widget. This allows them
// to always appear in front of the parent window but behind other windows
// that should be in front of it.
// panels which are not topmost need a parent widget. This allows them to
// always appear in front of the parent window but behind other windows that
// should be in front of it.
nsCOMPtr<nsIWidget> parentWidget;
if (IsNoAutoHide()) {
if (!IsTopMost()) {
nsCOMPtr<nsISupports> cont = PresContext()->GetContainer();
nsCOMPtr<nsIDocShellTreeItem> dsti = do_QueryInterface(cont);
if (!dsti)

Просмотреть файл

@ -180,6 +180,10 @@ public:
// true. These panels do not roll up automatically.
PRBool IsNoAutoHide();
// returns true if the popup is a top-most window. Otherwise, the
// panel appears in front of the parent window.
PRBool IsTopMost();
void EnsureWidget();
virtual nsresult CreateWidgetForView(nsIView* aView);