Adding new history interface method onto webshell, removing enums types from linkhandler
This commit is contained in:
Родитель
f3b2aeaeb6
Коммит
93bb8ce0eb
|
@ -207,6 +207,7 @@ public:
|
|||
NS_IMETHOD Forward(void);
|
||||
NS_IMETHOD CanForward(void);
|
||||
NS_IMETHOD GoTo(PRInt32 aHistoryIndex);
|
||||
NS_IMETHOD GetHistoryLength(PRInt32& aResult);
|
||||
NS_IMETHOD GetHistoryIndex(PRInt32& aResult);
|
||||
NS_IMETHOD GetURL(PRInt32 aHistoryIndex, PRUnichar** aURLResult);
|
||||
|
||||
|
@ -1452,6 +1453,13 @@ nsWebShell::GoTo(PRInt32 aHistoryIndex)
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::GetHistoryLength(PRInt32& aResult)
|
||||
{
|
||||
aResult = mHistory.Count();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::GetHistoryIndex(PRInt32& aResult)
|
||||
{
|
||||
|
@ -1840,12 +1848,6 @@ nsWebShell:: GetLinkState(const PRUnichar* aURLSpec, nsLinkState& aState)
|
|||
else if (URLSpec.Equals("http://out-of-date/")) {
|
||||
aState = eLinkState_OutOfDate;
|
||||
}
|
||||
else if (URLSpec.Equals("http://active/")) {
|
||||
aState = eLinkState_Active;
|
||||
}
|
||||
else if (URLSpec.Equals("http://hover/")) {
|
||||
aState = eLinkState_Hover;
|
||||
}
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -34,8 +34,6 @@ enum nsLinkState {
|
|||
eLinkState_Unvisited = 0,
|
||||
eLinkState_Visited = 1,
|
||||
eLinkState_OutOfDate = 2, // visited, but the cache is stale
|
||||
eLinkState_Active = 3, // mouse is down on link
|
||||
eLinkState_Hover = 4 // mouse is hovering over link
|
||||
};
|
||||
|
||||
// XXX Verb to use for link actuation. These are the verbs specified
|
||||
|
|
|
@ -298,6 +298,7 @@ public:
|
|||
NS_IMETHOD Forward() = 0;
|
||||
NS_IMETHOD CanForward() = 0;
|
||||
NS_IMETHOD GoTo(PRInt32 aHistoryIndex) = 0;
|
||||
NS_IMETHOD GetHistoryLength(PRInt32& aResult) = 0;
|
||||
NS_IMETHOD GetHistoryIndex(PRInt32& aResult) = 0;
|
||||
NS_IMETHOD GetURL(PRInt32 aHistoryIndex, PRUnichar **aURLResult) = 0;
|
||||
|
||||
|
|
|
@ -207,6 +207,7 @@ public:
|
|||
NS_IMETHOD Forward(void);
|
||||
NS_IMETHOD CanForward(void);
|
||||
NS_IMETHOD GoTo(PRInt32 aHistoryIndex);
|
||||
NS_IMETHOD GetHistoryLength(PRInt32& aResult);
|
||||
NS_IMETHOD GetHistoryIndex(PRInt32& aResult);
|
||||
NS_IMETHOD GetURL(PRInt32 aHistoryIndex, PRUnichar** aURLResult);
|
||||
|
||||
|
@ -1452,6 +1453,13 @@ nsWebShell::GoTo(PRInt32 aHistoryIndex)
|
|||
return rv;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::GetHistoryLength(PRInt32& aResult)
|
||||
{
|
||||
aResult = mHistory.Count();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsWebShell::GetHistoryIndex(PRInt32& aResult)
|
||||
{
|
||||
|
@ -1840,12 +1848,6 @@ nsWebShell:: GetLinkState(const PRUnichar* aURLSpec, nsLinkState& aState)
|
|||
else if (URLSpec.Equals("http://out-of-date/")) {
|
||||
aState = eLinkState_OutOfDate;
|
||||
}
|
||||
else if (URLSpec.Equals("http://active/")) {
|
||||
aState = eLinkState_Active;
|
||||
}
|
||||
else if (URLSpec.Equals("http://hover/")) {
|
||||
aState = eLinkState_Hover;
|
||||
}
|
||||
#endif
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче