Loading content/xul/document/public/nsIXULPrototypeCache.h +10 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ class nsICSSStyleSheet; class nsIURI; class nsIXULPrototypeDocument; class nsCString; class nsIDocument; // {3A0A0FC0-8349-11d3-BE47-00104BDE6048} #define NS_IXULPROTOTYPECACHE_IID \ Loading @@ -52,6 +54,14 @@ public: NS_IMETHOD PutStyleSheet(nsICSSStyleSheet* aStyleSheet) = 0; NS_IMETHOD FlushStyleSheets() = 0; NS_IMETHOD GetXBLDocument(const nsCString& aString, nsIDocument** _result) = 0; NS_IMETHOD PutXBLDocument(nsIDocument* aDocument) = 0; NS_IMETHOD GetXBLDocScriptAccess(const nsCString& aString, nsIDocument** _result) = 0; NS_IMETHOD PutXBLDocScriptAccess(nsIDocument* aDocument) = 0; NS_IMETHOD FlushXBLInformation() = 0; /** * Flush the cache; remove all XUL prototype documents, style * sheets, and scripts. Loading content/xul/document/src/nsXULPrototypeCache.cpp +64 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include "nsHashtable.h" #include "nsXPIDLString.h" #include "plstr.h" #include "nsIDocument.h" class nsXULPrototypeCache : public nsIXULPrototypeCache Loading @@ -53,6 +54,14 @@ public: NS_IMETHOD PutStyleSheet(nsICSSStyleSheet* aStyleSheet); NS_IMETHOD FlushStyleSheets(); NS_IMETHOD GetXBLDocument(const nsCString& aString, nsIDocument** _result); NS_IMETHOD PutXBLDocument(nsIDocument* aDocument); NS_IMETHOD GetXBLDocScriptAccess(const nsCString& aString, nsIDocument** _result); NS_IMETHOD PutXBLDocScriptAccess(nsIDocument* aDocument); NS_IMETHOD FlushXBLInformation(); NS_IMETHOD Flush(); protected: Loading @@ -64,7 +73,8 @@ protected: nsSupportsHashtable mPrototypeTable; nsSupportsHashtable mStyleSheetTable; nsSupportsHashtable mXBLDocTable; nsSupportsHashtable mScriptAccessTable; class nsIURIKey : public nsHashKey { protected: Loading Loading @@ -188,6 +198,50 @@ nsXULPrototypeCache::PutStyleSheet(nsICSSStyleSheet* aStyleSheet) } NS_IMETHODIMP nsXULPrototypeCache::GetXBLDocument(const nsCString& aString, nsIDocument** _result) { nsStringKey key(aString); *_result = NS_STATIC_CAST(nsIDocument*, mXBLDocTable.Get(&key)); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::PutXBLDocument(nsIDocument *aDocument) { nsCOMPtr<nsIURI> uri(aDocument->GetDocumentURL()); char* aString; uri->GetSpec(&aString); nsStringKey key(aString); nsIDocument* olddoc = NS_STATIC_CAST(nsIDocument*, mXBLDocTable.Put(&key, aDocument)); NS_IF_RELEASE(olddoc); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::GetXBLDocScriptAccess(const nsCString& aString, nsIDocument** _result) { nsStringKey key(aString); *_result = NS_STATIC_CAST(nsIDocument*, mScriptAccessTable.Get(&key)); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::PutXBLDocScriptAccess(nsIDocument *aDocument) { nsCOMPtr<nsIURI> uri(aDocument->GetDocumentURL()); char* aString; uri->GetSpec(&aString); nsStringKey key(aString); nsIDocument* olddoc = NS_STATIC_CAST(nsIDocument*, mScriptAccessTable.Put(&key, aDocument)); NS_IF_RELEASE(olddoc); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::FlushStyleSheets() { Loading @@ -196,11 +250,20 @@ nsXULPrototypeCache::FlushStyleSheets() } NS_IMETHODIMP nsXULPrototypeCache::FlushXBLInformation() { mXBLDocTable.Reset(); mScriptAccessTable.Reset(); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::Flush() { FlushPrototypes(); FlushStyleSheets(); FlushXBLInformation(); return NS_OK; } rdf/content/public/nsIXULPrototypeCache.h +10 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ class nsICSSStyleSheet; class nsIURI; class nsIXULPrototypeDocument; class nsCString; class nsIDocument; // {3A0A0FC0-8349-11d3-BE47-00104BDE6048} #define NS_IXULPROTOTYPECACHE_IID \ Loading @@ -52,6 +54,14 @@ public: NS_IMETHOD PutStyleSheet(nsICSSStyleSheet* aStyleSheet) = 0; NS_IMETHOD FlushStyleSheets() = 0; NS_IMETHOD GetXBLDocument(const nsCString& aString, nsIDocument** _result) = 0; NS_IMETHOD PutXBLDocument(nsIDocument* aDocument) = 0; NS_IMETHOD GetXBLDocScriptAccess(const nsCString& aString, nsIDocument** _result) = 0; NS_IMETHOD PutXBLDocScriptAccess(nsIDocument* aDocument) = 0; NS_IMETHOD FlushXBLInformation() = 0; /** * Flush the cache; remove all XUL prototype documents, style * sheets, and scripts. Loading rdf/content/src/nsXULPrototypeCache.cpp +64 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include "nsHashtable.h" #include "nsXPIDLString.h" #include "plstr.h" #include "nsIDocument.h" class nsXULPrototypeCache : public nsIXULPrototypeCache Loading @@ -53,6 +54,14 @@ public: NS_IMETHOD PutStyleSheet(nsICSSStyleSheet* aStyleSheet); NS_IMETHOD FlushStyleSheets(); NS_IMETHOD GetXBLDocument(const nsCString& aString, nsIDocument** _result); NS_IMETHOD PutXBLDocument(nsIDocument* aDocument); NS_IMETHOD GetXBLDocScriptAccess(const nsCString& aString, nsIDocument** _result); NS_IMETHOD PutXBLDocScriptAccess(nsIDocument* aDocument); NS_IMETHOD FlushXBLInformation(); NS_IMETHOD Flush(); protected: Loading @@ -64,7 +73,8 @@ protected: nsSupportsHashtable mPrototypeTable; nsSupportsHashtable mStyleSheetTable; nsSupportsHashtable mXBLDocTable; nsSupportsHashtable mScriptAccessTable; class nsIURIKey : public nsHashKey { protected: Loading Loading @@ -188,6 +198,50 @@ nsXULPrototypeCache::PutStyleSheet(nsICSSStyleSheet* aStyleSheet) } NS_IMETHODIMP nsXULPrototypeCache::GetXBLDocument(const nsCString& aString, nsIDocument** _result) { nsStringKey key(aString); *_result = NS_STATIC_CAST(nsIDocument*, mXBLDocTable.Get(&key)); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::PutXBLDocument(nsIDocument *aDocument) { nsCOMPtr<nsIURI> uri(aDocument->GetDocumentURL()); char* aString; uri->GetSpec(&aString); nsStringKey key(aString); nsIDocument* olddoc = NS_STATIC_CAST(nsIDocument*, mXBLDocTable.Put(&key, aDocument)); NS_IF_RELEASE(olddoc); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::GetXBLDocScriptAccess(const nsCString& aString, nsIDocument** _result) { nsStringKey key(aString); *_result = NS_STATIC_CAST(nsIDocument*, mScriptAccessTable.Get(&key)); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::PutXBLDocScriptAccess(nsIDocument *aDocument) { nsCOMPtr<nsIURI> uri(aDocument->GetDocumentURL()); char* aString; uri->GetSpec(&aString); nsStringKey key(aString); nsIDocument* olddoc = NS_STATIC_CAST(nsIDocument*, mScriptAccessTable.Put(&key, aDocument)); NS_IF_RELEASE(olddoc); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::FlushStyleSheets() { Loading @@ -196,11 +250,20 @@ nsXULPrototypeCache::FlushStyleSheets() } NS_IMETHODIMP nsXULPrototypeCache::FlushXBLInformation() { mXBLDocTable.Reset(); mScriptAccessTable.Reset(); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::Flush() { FlushPrototypes(); FlushStyleSheets(); FlushXBLInformation(); return NS_OK; } Loading
content/xul/document/public/nsIXULPrototypeCache.h +10 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ class nsICSSStyleSheet; class nsIURI; class nsIXULPrototypeDocument; class nsCString; class nsIDocument; // {3A0A0FC0-8349-11d3-BE47-00104BDE6048} #define NS_IXULPROTOTYPECACHE_IID \ Loading @@ -52,6 +54,14 @@ public: NS_IMETHOD PutStyleSheet(nsICSSStyleSheet* aStyleSheet) = 0; NS_IMETHOD FlushStyleSheets() = 0; NS_IMETHOD GetXBLDocument(const nsCString& aString, nsIDocument** _result) = 0; NS_IMETHOD PutXBLDocument(nsIDocument* aDocument) = 0; NS_IMETHOD GetXBLDocScriptAccess(const nsCString& aString, nsIDocument** _result) = 0; NS_IMETHOD PutXBLDocScriptAccess(nsIDocument* aDocument) = 0; NS_IMETHOD FlushXBLInformation() = 0; /** * Flush the cache; remove all XUL prototype documents, style * sheets, and scripts. Loading
content/xul/document/src/nsXULPrototypeCache.cpp +64 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include "nsHashtable.h" #include "nsXPIDLString.h" #include "plstr.h" #include "nsIDocument.h" class nsXULPrototypeCache : public nsIXULPrototypeCache Loading @@ -53,6 +54,14 @@ public: NS_IMETHOD PutStyleSheet(nsICSSStyleSheet* aStyleSheet); NS_IMETHOD FlushStyleSheets(); NS_IMETHOD GetXBLDocument(const nsCString& aString, nsIDocument** _result); NS_IMETHOD PutXBLDocument(nsIDocument* aDocument); NS_IMETHOD GetXBLDocScriptAccess(const nsCString& aString, nsIDocument** _result); NS_IMETHOD PutXBLDocScriptAccess(nsIDocument* aDocument); NS_IMETHOD FlushXBLInformation(); NS_IMETHOD Flush(); protected: Loading @@ -64,7 +73,8 @@ protected: nsSupportsHashtable mPrototypeTable; nsSupportsHashtable mStyleSheetTable; nsSupportsHashtable mXBLDocTable; nsSupportsHashtable mScriptAccessTable; class nsIURIKey : public nsHashKey { protected: Loading Loading @@ -188,6 +198,50 @@ nsXULPrototypeCache::PutStyleSheet(nsICSSStyleSheet* aStyleSheet) } NS_IMETHODIMP nsXULPrototypeCache::GetXBLDocument(const nsCString& aString, nsIDocument** _result) { nsStringKey key(aString); *_result = NS_STATIC_CAST(nsIDocument*, mXBLDocTable.Get(&key)); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::PutXBLDocument(nsIDocument *aDocument) { nsCOMPtr<nsIURI> uri(aDocument->GetDocumentURL()); char* aString; uri->GetSpec(&aString); nsStringKey key(aString); nsIDocument* olddoc = NS_STATIC_CAST(nsIDocument*, mXBLDocTable.Put(&key, aDocument)); NS_IF_RELEASE(olddoc); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::GetXBLDocScriptAccess(const nsCString& aString, nsIDocument** _result) { nsStringKey key(aString); *_result = NS_STATIC_CAST(nsIDocument*, mScriptAccessTable.Get(&key)); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::PutXBLDocScriptAccess(nsIDocument *aDocument) { nsCOMPtr<nsIURI> uri(aDocument->GetDocumentURL()); char* aString; uri->GetSpec(&aString); nsStringKey key(aString); nsIDocument* olddoc = NS_STATIC_CAST(nsIDocument*, mScriptAccessTable.Put(&key, aDocument)); NS_IF_RELEASE(olddoc); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::FlushStyleSheets() { Loading @@ -196,11 +250,20 @@ nsXULPrototypeCache::FlushStyleSheets() } NS_IMETHODIMP nsXULPrototypeCache::FlushXBLInformation() { mXBLDocTable.Reset(); mScriptAccessTable.Reset(); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::Flush() { FlushPrototypes(); FlushStyleSheets(); FlushXBLInformation(); return NS_OK; }
rdf/content/public/nsIXULPrototypeCache.h +10 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,8 @@ class nsICSSStyleSheet; class nsIURI; class nsIXULPrototypeDocument; class nsCString; class nsIDocument; // {3A0A0FC0-8349-11d3-BE47-00104BDE6048} #define NS_IXULPROTOTYPECACHE_IID \ Loading @@ -52,6 +54,14 @@ public: NS_IMETHOD PutStyleSheet(nsICSSStyleSheet* aStyleSheet) = 0; NS_IMETHOD FlushStyleSheets() = 0; NS_IMETHOD GetXBLDocument(const nsCString& aString, nsIDocument** _result) = 0; NS_IMETHOD PutXBLDocument(nsIDocument* aDocument) = 0; NS_IMETHOD GetXBLDocScriptAccess(const nsCString& aString, nsIDocument** _result) = 0; NS_IMETHOD PutXBLDocScriptAccess(nsIDocument* aDocument) = 0; NS_IMETHOD FlushXBLInformation() = 0; /** * Flush the cache; remove all XUL prototype documents, style * sheets, and scripts. Loading
rdf/content/src/nsXULPrototypeCache.cpp +64 −1 Original line number Diff line number Diff line Loading @@ -37,6 +37,7 @@ #include "nsHashtable.h" #include "nsXPIDLString.h" #include "plstr.h" #include "nsIDocument.h" class nsXULPrototypeCache : public nsIXULPrototypeCache Loading @@ -53,6 +54,14 @@ public: NS_IMETHOD PutStyleSheet(nsICSSStyleSheet* aStyleSheet); NS_IMETHOD FlushStyleSheets(); NS_IMETHOD GetXBLDocument(const nsCString& aString, nsIDocument** _result); NS_IMETHOD PutXBLDocument(nsIDocument* aDocument); NS_IMETHOD GetXBLDocScriptAccess(const nsCString& aString, nsIDocument** _result); NS_IMETHOD PutXBLDocScriptAccess(nsIDocument* aDocument); NS_IMETHOD FlushXBLInformation(); NS_IMETHOD Flush(); protected: Loading @@ -64,7 +73,8 @@ protected: nsSupportsHashtable mPrototypeTable; nsSupportsHashtable mStyleSheetTable; nsSupportsHashtable mXBLDocTable; nsSupportsHashtable mScriptAccessTable; class nsIURIKey : public nsHashKey { protected: Loading Loading @@ -188,6 +198,50 @@ nsXULPrototypeCache::PutStyleSheet(nsICSSStyleSheet* aStyleSheet) } NS_IMETHODIMP nsXULPrototypeCache::GetXBLDocument(const nsCString& aString, nsIDocument** _result) { nsStringKey key(aString); *_result = NS_STATIC_CAST(nsIDocument*, mXBLDocTable.Get(&key)); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::PutXBLDocument(nsIDocument *aDocument) { nsCOMPtr<nsIURI> uri(aDocument->GetDocumentURL()); char* aString; uri->GetSpec(&aString); nsStringKey key(aString); nsIDocument* olddoc = NS_STATIC_CAST(nsIDocument*, mXBLDocTable.Put(&key, aDocument)); NS_IF_RELEASE(olddoc); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::GetXBLDocScriptAccess(const nsCString& aString, nsIDocument** _result) { nsStringKey key(aString); *_result = NS_STATIC_CAST(nsIDocument*, mScriptAccessTable.Get(&key)); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::PutXBLDocScriptAccess(nsIDocument *aDocument) { nsCOMPtr<nsIURI> uri(aDocument->GetDocumentURL()); char* aString; uri->GetSpec(&aString); nsStringKey key(aString); nsIDocument* olddoc = NS_STATIC_CAST(nsIDocument*, mScriptAccessTable.Put(&key, aDocument)); NS_IF_RELEASE(olddoc); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::FlushStyleSheets() { Loading @@ -196,11 +250,20 @@ nsXULPrototypeCache::FlushStyleSheets() } NS_IMETHODIMP nsXULPrototypeCache::FlushXBLInformation() { mXBLDocTable.Reset(); mScriptAccessTable.Reset(); return NS_OK; } NS_IMETHODIMP nsXULPrototypeCache::Flush() { FlushPrototypes(); FlushStyleSheets(); FlushXBLInformation(); return NS_OK; }