added accessor for html style sheet
git-svn-id: svn://10.0.0.236/trunk@6472 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -266,6 +266,20 @@ NS_IMETHODIMP nsHTMLDocument::GetImageMap(const nsString& aMapName,
|
||||
return 1;/* XXX NS_NOT_FOUND */
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLDocument::GetAttributeStyleSheet(nsIHTMLStyleSheet** aResult)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aResult, "null ptr");
|
||||
if (nsnull == aResult) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
*aResult = mAttrStyleSheet;
|
||||
if (nsnull == mAttrStyleSheet) {
|
||||
return NS_ERROR_NOT_AVAILABLE; // probably not the right error...
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
void nsHTMLDocument::AddStyleSheetToSet(nsIStyleSheet* aSheet, nsIStyleSet* aSet)
|
||||
{
|
||||
if ((nsnull != mAttrStyleSheet) && (aSheet != mAttrStyleSheet)) {
|
||||
|
||||
@@ -50,6 +50,8 @@ public:
|
||||
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName, nsIImageMap** aResult);
|
||||
|
||||
NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet);
|
||||
|
||||
// nsIDOMDocument interface
|
||||
NS_IMETHOD GetMasterDoc(nsIDOMDocument **aDocument)
|
||||
{ return nsDocument::GetMasterDoc(aDocument); }
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "nsISupports.h"
|
||||
class nsIImageMap;
|
||||
class nsString;
|
||||
class nsIHTMLStyleSheet;
|
||||
|
||||
/* b2a848b0-d0a9-11d1-89b1-006008911b81 */
|
||||
#define NS_IHTMLDOCUMENT_IID \
|
||||
@@ -36,6 +37,8 @@ public:
|
||||
NS_IMETHOD AddImageMap(nsIImageMap* aMap) = 0;
|
||||
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName, nsIImageMap** aResult) = 0;
|
||||
|
||||
NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet) = 0;
|
||||
};
|
||||
|
||||
#endif /* nsIHTMLDocument_h___ */
|
||||
|
||||
@@ -266,6 +266,20 @@ NS_IMETHODIMP nsHTMLDocument::GetImageMap(const nsString& aMapName,
|
||||
return 1;/* XXX NS_NOT_FOUND */
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLDocument::GetAttributeStyleSheet(nsIHTMLStyleSheet** aResult)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aResult, "null ptr");
|
||||
if (nsnull == aResult) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
*aResult = mAttrStyleSheet;
|
||||
if (nsnull == mAttrStyleSheet) {
|
||||
return NS_ERROR_NOT_AVAILABLE; // probably not the right error...
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
void nsHTMLDocument::AddStyleSheetToSet(nsIStyleSheet* aSheet, nsIStyleSet* aSet)
|
||||
{
|
||||
if ((nsnull != mAttrStyleSheet) && (aSheet != mAttrStyleSheet)) {
|
||||
|
||||
@@ -50,6 +50,8 @@ public:
|
||||
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName, nsIImageMap** aResult);
|
||||
|
||||
NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet);
|
||||
|
||||
// nsIDOMDocument interface
|
||||
NS_IMETHOD GetMasterDoc(nsIDOMDocument **aDocument)
|
||||
{ return nsDocument::GetMasterDoc(aDocument); }
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "nsISupports.h"
|
||||
class nsIImageMap;
|
||||
class nsString;
|
||||
class nsIHTMLStyleSheet;
|
||||
|
||||
/* b2a848b0-d0a9-11d1-89b1-006008911b81 */
|
||||
#define NS_IHTMLDOCUMENT_IID \
|
||||
@@ -36,6 +37,8 @@ public:
|
||||
NS_IMETHOD AddImageMap(nsIImageMap* aMap) = 0;
|
||||
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName, nsIImageMap** aResult) = 0;
|
||||
|
||||
NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet) = 0;
|
||||
};
|
||||
|
||||
#endif /* nsIHTMLDocument_h___ */
|
||||
|
||||
Reference in New Issue
Block a user