diff --git a/dlls/mshtml/htmldoc.c b/dlls/mshtml/htmldoc.c
index e9df70e505f..6ad153a031c 100644
--- a/dlls/mshtml/htmldoc.c
+++ b/dlls/mshtml/htmldoc.c
@@ -1046,7 +1046,7 @@ static HRESULT WINAPI HTMLDocument_createStyleSheet(IHTMLDocument2 *iface, BSTR
FIXME("(%p)->(%s %ld %p) semi-stub\n", This, debugstr_w(bstrHref), lIndex, ppnewStyleSheet);
- *ppnewStyleSheet = HTMLStyleSheet_Create();
+ *ppnewStyleSheet = HTMLStyleSheet_Create(NULL);
return S_OK;
}
diff --git a/dlls/mshtml/htmlstylesheet.c b/dlls/mshtml/htmlstylesheet.c
index 30be0798016..823e5f56b5a 100644
--- a/dlls/mshtml/htmlstylesheet.c
+++ b/dlls/mshtml/htmlstylesheet.c
@@ -38,7 +38,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
typedef struct {
const IHTMLStyleSheetVtbl *lpHTMLStyleSheetVtbl;
+
LONG ref;
+
+ nsIDOMCSSStyleSheet *nsstylesheet;
} HTMLStyleSheet;
typedef struct {
@@ -470,12 +473,21 @@ static const IHTMLStyleSheetVtbl HTMLStyleSheetVtbl = {
HTMLStyleSheet_get_rules
};
-IHTMLStyleSheet *HTMLStyleSheet_Create(void)
+IHTMLStyleSheet *HTMLStyleSheet_Create(nsIDOMStyleSheet *nsstylesheet)
{
HTMLStyleSheet *ret = mshtml_alloc(sizeof(HTMLStyleSheet));
+ nsresult nsres;
ret->lpHTMLStyleSheetVtbl = &HTMLStyleSheetVtbl;
ret->ref = 1;
+ ret->nsstylesheet = NULL;
+
+ if(nsstylesheet) {
+ nsres = nsIDOMStyleSheet_QueryInterface(nsstylesheet, &IID_nsIDOMCSSStyleSheet,
+ (void**)&ret->nsstylesheet);
+ if(NS_FAILED(nsres))
+ ERR("Could not get nsICSSStyleSheet interface: %08x\n", nsres);
+ }
return HTMLSTYLESHEET(ret);
}
diff --git a/dlls/mshtml/mshtml_private.h b/dlls/mshtml/mshtml_private.h
index 2bf926b3e25..03837ad35c9 100644
--- a/dlls/mshtml/mshtml_private.h
+++ b/dlls/mshtml/mshtml_private.h
@@ -430,7 +430,7 @@ void set_current_mon(HTMLDocument*,IMoniker*);
IHTMLSelectionObject *HTMLSelectionObject_Create(HTMLDocument*,nsISelection*);
IHTMLTxtRange *HTMLTxtRange_Create(HTMLDocument*,nsIDOMRange*);
IHTMLStyle *HTMLStyle_Create(nsIDOMCSSStyleDeclaration*);
-IHTMLStyleSheet *HTMLStyleSheet_Create(void);
+IHTMLStyleSheet *HTMLStyleSheet_Create(nsIDOMStyleSheet*);
IHTMLStyleSheetsCollection *HTMLStyleSheetsCollection_Create(nsIDOMStyleSheetList*);
void detach_selection(HTMLDocument*);
diff --git a/dlls/mshtml/nsiface.idl b/dlls/mshtml/nsiface.idl
index aac9a879606..8f2876c2dee 100644
--- a/dlls/mshtml/nsiface.idl
+++ b/dlls/mshtml/nsiface.idl
@@ -123,7 +123,8 @@ typedef nsISupports nsIPrincipal;
typedef nsISupports nsIAtom;
typedef nsISupports nsISupportsArray;
typedef nsISupports nsIContentFilter;
-typedef nsISupports nsIDOMStyleSheet;
+typedef nsISupports nsIDOMMediaList;
+typedef nsISupports nsIDOMCSSRuleList;
[
object,
@@ -570,6 +571,36 @@ interface nsIDOMCSSStyleDeclaration : nsISupports
nsresult GetParentRule(nsIDOMCSSRule **aParentRule);
}
+[
+ object,
+ uuid(a6cf9080-15b3-11d2-932e-00805f8add32)
+ /* FROZEN */
+]
+interface nsIDOMStyleSheet : nsISupports
+{
+ nsresult GetType(nsAString *aType);
+ nsresult GetDisabled(PRBool *aDisabled);
+ nsresult SetDisabled(PRBool aDisabled);
+ nsresult GetOwnerNode(nsIDOMNode **aOwnerNode);
+ nsresult GetParentStyleSheet(nsIDOMStyleSheet **aParentStyleSheet);
+ nsresult GetHref(nsAString *aHref);
+ nsresult GetTitle(nsAString *aTitle);
+ nsresult GetMedia(nsIDOMMediaList **aMedia);
+}
+
+[
+ object,
+ uuid(a6cf90c2-15b3-11d2-932e-00805f8add32)
+ /* FROZEN */
+]
+interface nsIDOMCSSStyleSheet : nsIDOMStyleSheet
+{
+ nsresult GetOwnerRule(nsIDOMCSSRule **aOwnerRule);
+ nsresult GetCssRules(nsIDOMCSSRuleList **aCssRules);
+ nsresult InsertRule(const nsAString *rule, PRUint32 index, PRUint32 *_retval);
+ nsresult DeleteRule(PRUint32 index);
+}
+
[
object,
uuid(a6cf9081-15b3-11d2-932e-00805f8add32)