added inline style sheet accessor
git-svn-id: svn://10.0.0.236/trunk@15581 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -367,6 +367,22 @@ NS_IMETHODIMP nsHTMLDocument::GetAttributeStyleSheet(nsIHTMLStyleSheet** aResult
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLDocument::GetInlineStyleSheet(nsIHTMLCSSStyleSheet** aResult)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aResult, "null ptr");
|
||||
if (nsnull == aResult) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
*aResult = mStyleAttrStyleSheet;
|
||||
if (nsnull == mStyleAttrStyleSheet) {
|
||||
return NS_ERROR_NOT_AVAILABLE; // probably not the right error...
|
||||
}
|
||||
else {
|
||||
NS_ADDREF(mStyleAttrStyleSheet);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsHTMLDocument::AddStyleSheetToSet(nsIStyleSheet* aSheet, nsIStyleSet* aSet)
|
||||
{
|
||||
if ((nsnull != mStyleAttrStyleSheet) && (aSheet != mStyleAttrStyleSheet)) {
|
||||
|
||||
@@ -56,6 +56,7 @@ public:
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName, nsIImageMap** aResult);
|
||||
|
||||
NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet);
|
||||
NS_IMETHOD GetInlineStyleSheet(nsIHTMLCSSStyleSheet** aStyleSheet);
|
||||
|
||||
NS_IMETHOD GetDTDMode(nsDTDMode& aMode);
|
||||
NS_IMETHOD SetDTDMode(nsDTDMode aMode);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "nsISupports.h"
|
||||
|
||||
class nsIHTMLStyleSheet;
|
||||
class nsIHTMLCSSStyleSheet;
|
||||
|
||||
/* a6cf90cc-15b3-11d2-932e-00805f8add32 */
|
||||
#define NS_IHTMLCONTENTCONTAINER_IID \
|
||||
@@ -35,6 +36,7 @@ class nsIHTMLStyleSheet;
|
||||
class nsIHTMLContentContainer : public nsISupports {
|
||||
public:
|
||||
NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet) = 0;
|
||||
NS_IMETHOD GetInlineStyleSheet(nsIHTMLCSSStyleSheet** aStyleSheet) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -367,6 +367,22 @@ NS_IMETHODIMP nsHTMLDocument::GetAttributeStyleSheet(nsIHTMLStyleSheet** aResult
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP nsHTMLDocument::GetInlineStyleSheet(nsIHTMLCSSStyleSheet** aResult)
|
||||
{
|
||||
NS_PRECONDITION(nsnull != aResult, "null ptr");
|
||||
if (nsnull == aResult) {
|
||||
return NS_ERROR_NULL_POINTER;
|
||||
}
|
||||
*aResult = mStyleAttrStyleSheet;
|
||||
if (nsnull == mStyleAttrStyleSheet) {
|
||||
return NS_ERROR_NOT_AVAILABLE; // probably not the right error...
|
||||
}
|
||||
else {
|
||||
NS_ADDREF(mStyleAttrStyleSheet);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
void nsHTMLDocument::AddStyleSheetToSet(nsIStyleSheet* aSheet, nsIStyleSet* aSet)
|
||||
{
|
||||
if ((nsnull != mStyleAttrStyleSheet) && (aSheet != mStyleAttrStyleSheet)) {
|
||||
|
||||
@@ -56,6 +56,7 @@ public:
|
||||
NS_IMETHOD GetImageMap(const nsString& aMapName, nsIImageMap** aResult);
|
||||
|
||||
NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet);
|
||||
NS_IMETHOD GetInlineStyleSheet(nsIHTMLCSSStyleSheet** aStyleSheet);
|
||||
|
||||
NS_IMETHOD GetDTDMode(nsDTDMode& aMode);
|
||||
NS_IMETHOD SetDTDMode(nsDTDMode aMode);
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include "nsISupports.h"
|
||||
|
||||
class nsIHTMLStyleSheet;
|
||||
class nsIHTMLCSSStyleSheet;
|
||||
|
||||
/* a6cf90cc-15b3-11d2-932e-00805f8add32 */
|
||||
#define NS_IHTMLCONTENTCONTAINER_IID \
|
||||
@@ -35,6 +36,7 @@ class nsIHTMLStyleSheet;
|
||||
class nsIHTMLContentContainer : public nsISupports {
|
||||
public:
|
||||
NS_IMETHOD GetAttributeStyleSheet(nsIHTMLStyleSheet** aStyleSheet) = 0;
|
||||
NS_IMETHOD GetInlineStyleSheet(nsIHTMLCSSStyleSheet** aStyleSheet) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user