зеркало из https://github.com/mozilla/pjs.git
Oh yeah, baby.
This commit is contained in:
Родитель
5f7286349a
Коммит
7d751fe7c5
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче