Merge for backout of changeset af29773ebf66

This commit is contained in:
Shawn Wilsher 2010-02-18 10:01:29 -08:00
Родитель 2e365ca1de 0d6465dc78
Коммит 5927192b32
3 изменённых файлов: 32 добавлений и 1 удалений

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

@ -11347,6 +11347,30 @@ nsDocShell::OnLeaveLink()
return rv;
}
NS_IMETHODIMP
nsDocShell::GetLinkState(nsIURI* aLinkURI, nsLinkState& aState)
{
if (!aLinkURI) {
// No uri means not a link
aState = eLinkState_NotLink;
return NS_OK;
}
aState = eLinkState_Unvisited;
// no history, leave state unchanged
if (!mGlobalHistory)
return NS_OK;
PRBool isVisited;
NS_ENSURE_SUCCESS(mGlobalHistory->IsVisited(aLinkURI, &isVisited),
NS_ERROR_FAILURE);
if (isVisited)
aState = eLinkState_Visited;
return NS_OK;
}
//----------------------------------------------------------------------
// Web Shell Services API

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

@ -277,6 +277,7 @@ public:
nsIURI* aURI,
const PRUnichar* aTargetSpec);
NS_IMETHOD OnLeaveLink();
NS_IMETHOD GetLinkState(nsIURI* aLinkURI, nsLinkState& aState);
nsDocShellInfoLoadType ConvertLoadTypeToDocShellLoadInfo(PRUint32 aLoadType);
PRUint32 ConvertDocShellLoadInfoToLoadType(nsDocShellInfoLoadType aDocShellLoadType);

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

@ -48,7 +48,7 @@ class nsGUIEvent;
// Interface ID for nsILinkHandler
#define NS_ILINKHANDLER_IID \
{ 0x71627c30, 0xd3c5, 0x4ad0,{0xb5, 0x33, 0x6e, 0x01, 0x91, 0xf2, 0x79, 0x32}}
{ 0x514bc565, 0x8d38, 0x4dde,{0xb4, 0xeb, 0xe7, 0xb5, 0x01, 0x2b, 0xf4, 0x64}}
/**
* Interface used for handling clicks on links
@ -112,6 +112,12 @@ public:
* Process the mouse leaving a link.
*/
NS_IMETHOD OnLeaveLink() = 0;
/**
* Get the state of a link to a given absolute URL
*/
NS_IMETHOD GetLinkState(nsIURI* aLinkURI, nsLinkState& aState) = 0;
};
NS_DEFINE_STATIC_IID_ACCESSOR(nsILinkHandler, NS_ILINKHANDLER_IID)