This commit is contained in:
hyatt%netscape.com 1999-05-18 09:03:53 +00:00
Родитель 5f7286349a
Коммит 7d751fe7c5
6 изменённых файлов: 16 добавлений и 36 удалений

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

@ -28,7 +28,8 @@ class nsIDOMElement;
typedef enum {
eXULPopupType_popup,
eXULPopupType_context,
eXULPopupType_tooltip
eXULPopupType_tooltip,
eXULPopupType_blur
} XULPopupType;
class nsIXULPopupListener: public nsISupports {

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

@ -137,9 +137,9 @@ XULPopupListenerImpl::QueryInterface(REFNSIID iid, void** result)
NS_IMETHODIMP
XULPopupListenerImpl::Init(nsIDOMElement* aElement, const XULPopupType& popup)
{
element = aElement; // Weak reference. Don't addref it.
popupType = popup;
return NS_OK;
element = aElement; // Weak reference. Don't addref it.
popupType = popup;
return NS_OK;
}
////////////////////////////////////////////////////////////////
@ -252,7 +252,7 @@ XULPopupListenerImpl::LaunchPopup(nsIDOMEvent* anEvent)
domWindow->CreateAnchoredPopup(element, popupContent,
anchorAlignment, type, popupAlignment);
}
xulDocument->SetPopup(nsnull);
xulDocument->SetPopup(nsnull);
}
NS_RELEASE(global);
}

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

@ -2995,22 +2995,11 @@ XULDocumentImpl::CreatePopupDocument(nsIContent* aPopupElement, nsIDocument** aR
NS_IF_ADDREF(mPopup);
popupDoc->mPopup = mPopup;
// Our root content is the first child of the popup
// node.
nsCOMPtr<nsIContent> firstChild;
PRInt32 childCount;
aPopupElement->ChildCount(childCount);
if (childCount == 0)
return NS_OK;
aPopupElement->ChildAt(0, *getter_AddRefs(firstChild));
// Our root is firstChild. Suck all of this
// content into our document.
// Suck all of the root's content into our document.
// We need to make the XUL builder instantiate this node.
// Retrieve the resource that corresponds to this node.
nsAutoString idValue;
nsCOMPtr<nsIDOMElement> domRoot = do_QueryInterface(firstChild);
nsCOMPtr<nsIDOMElement> domRoot = do_QueryInterface(aPopupElement);
domRoot->GetAttribute("id", idValue);
const char* url;
mDocumentURL->GetSpec(&url);

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

@ -28,7 +28,8 @@ class nsIDOMElement;
typedef enum {
eXULPopupType_popup,
eXULPopupType_context,
eXULPopupType_tooltip
eXULPopupType_tooltip,
eXULPopupType_blur
} XULPopupType;
class nsIXULPopupListener: public nsISupports {

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

@ -2995,22 +2995,11 @@ XULDocumentImpl::CreatePopupDocument(nsIContent* aPopupElement, nsIDocument** aR
NS_IF_ADDREF(mPopup);
popupDoc->mPopup = mPopup;
// Our root content is the first child of the popup
// node.
nsCOMPtr<nsIContent> firstChild;
PRInt32 childCount;
aPopupElement->ChildCount(childCount);
if (childCount == 0)
return NS_OK;
aPopupElement->ChildAt(0, *getter_AddRefs(firstChild));
// Our root is firstChild. Suck all of this
// content into our document.
// Suck all of the root's content into our document.
// We need to make the XUL builder instantiate this node.
// Retrieve the resource that corresponds to this node.
nsAutoString idValue;
nsCOMPtr<nsIDOMElement> domRoot = do_QueryInterface(firstChild);
nsCOMPtr<nsIDOMElement> domRoot = do_QueryInterface(aPopupElement);
domRoot->GetAttribute("id", idValue);
const char* url;
mDocumentURL->GetSpec(&url);

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

@ -137,9 +137,9 @@ XULPopupListenerImpl::QueryInterface(REFNSIID iid, void** result)
NS_IMETHODIMP
XULPopupListenerImpl::Init(nsIDOMElement* aElement, const XULPopupType& popup)
{
element = aElement; // Weak reference. Don't addref it.
popupType = popup;
return NS_OK;
element = aElement; // Weak reference. Don't addref it.
popupType = popup;
return NS_OK;
}
////////////////////////////////////////////////////////////////
@ -252,7 +252,7 @@ XULPopupListenerImpl::LaunchPopup(nsIDOMEvent* anEvent)
domWindow->CreateAnchoredPopup(element, popupContent,
anchorAlignment, type, popupAlignment);
}
xulDocument->SetPopup(nsnull);
xulDocument->SetPopup(nsnull);
}
NS_RELEASE(global);
}