Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
5ffd1510
Commit
5ffd1510
authored
Jan 04, 2011
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Jan 04, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: COM cleanup for the IHTMLStyleElement iface.
parent
f341ed11
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
31 deletions
+30
-31
htmlstyleelem.c
dlls/mshtml/htmlstyleelem.c
+30
-31
No files found.
dlls/mshtml/htmlstyleelem.c
View file @
5ffd1510
...
...
@@ -35,47 +35,48 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
typedef
struct
{
HTMLElement
element
;
const
IHTMLStyleElementVtbl
*
lpIHTMLStyleElementVtbl
;
IHTMLStyleElement
IHTMLStyleElement_iface
;
nsIDOMHTMLStyleElement
*
nsstyle
;
}
HTMLStyleElement
;
#define HTMLSTYLE(x) (&(x)->lpIHTMLStyleElementVtbl)
#define HTMLSTYLE_THIS(iface) DEFINE_THIS(HTMLStyleElement, IHTMLStyleElement, iface)
static
inline
HTMLStyleElement
*
impl_from_IHTMLStyleElement
(
IHTMLStyleElement
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLStyleElement
,
IHTMLStyleElement_iface
);
}
static
HRESULT
WINAPI
HTMLStyleElement_QueryInterface
(
IHTMLStyleElement
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
return
IHTMLDOMNode_QueryInterface
(
&
This
->
element
.
node
.
IHTMLDOMNode_iface
,
riid
,
ppv
);
}
static
ULONG
WINAPI
HTMLStyleElement_AddRef
(
IHTMLStyleElement
*
iface
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
return
IHTMLDOMNode_AddRef
(
&
This
->
element
.
node
.
IHTMLDOMNode_iface
);
}
static
ULONG
WINAPI
HTMLStyleElement_Release
(
IHTMLStyleElement
*
iface
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
return
IHTMLDOMNode_Release
(
&
This
->
element
.
node
.
IHTMLDOMNode_iface
);
}
static
HRESULT
WINAPI
HTMLStyleElement_GetTypeInfoCount
(
IHTMLStyleElement
*
iface
,
UINT
*
pctinfo
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
return
IDispatchEx_GetTypeInfoCount
(
&
This
->
element
.
node
.
dispex
.
IDispatchEx_iface
,
pctinfo
);
}
static
HRESULT
WINAPI
HTMLStyleElement_GetTypeInfo
(
IHTMLStyleElement
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
return
IDispatchEx_GetTypeInfo
(
&
This
->
element
.
node
.
dispex
.
IDispatchEx_iface
,
iTInfo
,
lcid
,
ppTInfo
);
}
...
...
@@ -83,7 +84,7 @@ static HRESULT WINAPI HTMLStyleElement_GetTypeInfo(IHTMLStyleElement *iface, UIN
static
HRESULT
WINAPI
HTMLStyleElement_GetIDsOfNames
(
IHTMLStyleElement
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
return
IDispatchEx_GetIDsOfNames
(
&
This
->
element
.
node
.
dispex
.
IDispatchEx_iface
,
riid
,
rgszNames
,
cNames
,
lcid
,
rgDispId
);
}
...
...
@@ -92,14 +93,14 @@ static HRESULT WINAPI HTMLStyleElement_Invoke(IHTMLStyleElement *iface, DISPID d
REFIID
riid
,
LCID
lcid
,
WORD
wFlags
,
DISPPARAMS
*
pDispParams
,
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
return
IDispatchEx_Invoke
(
&
This
->
element
.
node
.
dispex
.
IDispatchEx_iface
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
}
static
HRESULT
WINAPI
HTMLStyleElement_put_type
(
IHTMLStyleElement
*
iface
,
BSTR
v
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
nsAString
type_str
;
nsresult
nsres
;
...
...
@@ -118,7 +119,7 @@ static HRESULT WINAPI HTMLStyleElement_put_type(IHTMLStyleElement *iface, BSTR v
static
HRESULT
WINAPI
HTMLStyleElement_get_type
(
IHTMLStyleElement
*
iface
,
BSTR
*
p
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
nsAString
nsstr
;
nsresult
nsres
;
...
...
@@ -131,77 +132,77 @@ static HRESULT WINAPI HTMLStyleElement_get_type(IHTMLStyleElement *iface, BSTR *
static
HRESULT
WINAPI
HTMLStyleElement_get_readyState
(
IHTMLStyleElement
*
iface
,
BSTR
*
p
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLStyleElement_put_onreadystatechange
(
IHTMLStyleElement
*
iface
,
VARIANT
v
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLStyleElement_get_onreadystatechange
(
IHTMLStyleElement
*
iface
,
VARIANT
*
p
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLStyleElement_put_onload
(
IHTMLStyleElement
*
iface
,
VARIANT
v
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLStyleElement_get_onload
(
IHTMLStyleElement
*
iface
,
VARIANT
*
p
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLStyleElement_put_onerror
(
IHTMLStyleElement
*
iface
,
VARIANT
v
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
FIXME
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_variant
(
&
v
));
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLStyleElement_get_onerror
(
IHTMLStyleElement
*
iface
,
VARIANT
*
p
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLStyleElement_get_styleSheet
(
IHTMLStyleElement
*
iface
,
IHTMLStyleSheet
**
p
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLStyleElement_put_disabled
(
IHTMLStyleElement
*
iface
,
VARIANT_BOOL
v
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
FIXME
(
"(%p)->(%x)
\n
"
,
This
,
v
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLStyleElement_get_disabled
(
IHTMLStyleElement
*
iface
,
VARIANT_BOOL
*
p
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
p
);
return
E_NOTIMPL
;
}
static
HRESULT
WINAPI
HTMLStyleElement_put_media
(
IHTMLStyleElement
*
iface
,
BSTR
v
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
nsAString
media_str
;
nsresult
nsres
;
...
...
@@ -220,7 +221,7 @@ static HRESULT WINAPI HTMLStyleElement_put_media(IHTMLStyleElement *iface, BSTR
static
HRESULT
WINAPI
HTMLStyleElement_get_media
(
IHTMLStyleElement
*
iface
,
BSTR
*
p
)
{
HTMLStyleElement
*
This
=
HTMLSTYLE_THIS
(
iface
);
HTMLStyleElement
*
This
=
impl_from_IHTMLStyleElement
(
iface
);
nsAString
nsstr
;
nsresult
nsres
;
...
...
@@ -231,8 +232,6 @@ static HRESULT WINAPI HTMLStyleElement_get_media(IHTMLStyleElement *iface, BSTR
return
return_nsstr
(
nsres
,
&
nsstr
,
p
);
}
#undef HTMLSTYLE_THIS
static
const
IHTMLStyleElementVtbl
HTMLStyleElementVtbl
=
{
HTMLStyleElement_QueryInterface
,
HTMLStyleElement_AddRef
,
...
...
@@ -268,13 +267,13 @@ static HRESULT HTMLStyleElement_QI(HTMLDOMNode *iface, REFIID riid, void **ppv)
if
(
IsEqualGUID
(
&
IID_IUnknown
,
riid
))
{
TRACE
(
"(%p)->(IID_IUnknown %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLSTYLE
(
This
)
;
*
ppv
=
&
This
->
IHTMLStyleElement_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IDispatch
,
riid
))
{
TRACE
(
"(%p)->(IID_IDispatch %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLSTYLE
(
This
)
;
*
ppv
=
&
This
->
IHTMLStyleElement_iface
;
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLStyleElement
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLStyleElement %p)
\n
"
,
This
,
ppv
);
*
ppv
=
HTMLSTYLE
(
This
)
;
*
ppv
=
&
This
->
IHTMLStyleElement_iface
;
}
else
{
return
HTMLElement_QI
(
&
This
->
element
.
node
,
riid
,
ppv
);
}
...
...
@@ -320,7 +319,7 @@ HRESULT HTMLStyleElement_Create(HTMLDocumentNode *doc, nsIDOMHTMLElement *nselem
if
(
!
ret
)
return
E_OUTOFMEMORY
;
ret
->
lpIHTMLStyleElement
Vtbl
=
&
HTMLStyleElementVtbl
;
ret
->
IHTMLStyleElement_iface
.
lp
Vtbl
=
&
HTMLStyleElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLStyleElementImplVtbl
;
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLStyleElement
,
(
void
**
)
&
ret
->
nsstyle
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment