mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-23 13:04:28 +00:00
added accessor for html style sheet
This commit is contained in:
parent
ea6809a628
commit
8cae022e89
@ -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___ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user