Implement support for the "type" attribute of <a> elements. Bug 214626,

r=adamlock, sr=darin
This commit is contained in:
bzbarsky%mit.edu 2005-08-18 11:16:43 +00:00
Родитель a6fe550fa7
Коммит f9accb3cc8
3 изменённых файлов: 31 добавлений и 12 удалений

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

@ -95,14 +95,18 @@ attribute boolean saveLayoutStateFlag;
/** attribute to indicate whether the page is already expired in cache */
attribute boolean expirationStatus;
/** attribute to indicate the content-type of the document that this
is a session history entry for */
attribute ACString contentType;
/** Set/Get scrollers' positon in anchored pages */
void setScrollPosition(in PRInt32 x, in PRInt32 y);
void getScrollPosition(out PRInt32 x, out PRInt32 y);
/** Additional ways to create an entry */
void create(in nsIURI aURI, in wstring aTitle, in nsIDOMDocument aDocument,
in nsIInputStream aInputStream, in nsILayoutHistoryState aHistoryLayoutState,
in nsISupports aCacheKey);
in nsIInputStream aInputStream, in nsILayoutHistoryState aHistoryLayoutState,
in nsISupports aCacheKey, in ACString aContentType);
nsISHEntry clone();

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

@ -258,20 +258,34 @@ NS_IMETHODIMP nsSHEntry::SetExpirationStatus(PRBool aFlag)
return NS_OK;
}
NS_IMETHODIMP nsSHEntry::GetContentType(nsACString& aContentType)
{
aContentType = mContentType;
return NS_OK;
}
NS_IMETHODIMP nsSHEntry::SetContentType(const nsACString& aContentType)
{
mContentType = aContentType;
return NS_OK;
}
NS_IMETHODIMP
nsSHEntry::Create(nsIURI * aURI, const PRUnichar * aTitle, nsIDOMDocument * aDOMDocument,
nsIInputStream * aInputStream, nsILayoutHistoryState * aHistoryLayoutState,
nsISupports * aCacheKey)
nsSHEntry::Create(nsIURI * aURI, const PRUnichar * aTitle,
nsIDOMDocument * aDOMDocument, nsIInputStream * aInputStream,
nsILayoutHistoryState * aHistoryLayoutState,
nsISupports * aCacheKey, const nsACString& aContentType)
{
SetURI(aURI);
SetTitle(aTitle);
SetDocument(aDOMDocument);
SetPostData(aInputStream);
SetLayoutHistoryState(aHistoryLayoutState);
SetCacheKey(aCacheKey);
SetTitle(aTitle);
SetDocument(aDOMDocument);
SetPostData(aInputStream);
SetLayoutHistoryState(aHistoryLayoutState);
SetCacheKey(aCacheKey);
SetContentType(aContentType);
// Set the LoadType by default to loadHistory during creation
SetLoadType((PRInt32)nsIDocShellLoadInfo::loadHistory);
SetLoadType((PRInt32)nsIDocShellLoadInfo::loadHistory);
// By default all entries are set false for subframe flag.
// nsDocShell::CloneAndReplace() which creates entries for

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

@ -69,6 +69,7 @@ private:
PRPackedBool mIsFrameNavigation;
PRPackedBool mSaveLayoutState;
PRPackedBool mExpired;
nsCString mContentType;
nsCOMPtr<nsISupports> mCacheKey;
nsISHEntry * mParent; // weak reference
};