Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package registry
Container registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lorenzo Ferrillo
wine
Commits
5ffd1510
Commit
5ffd1510
authored
14 years ago
by
Michael Stefaniuc
Committed by
Alexandre Julliard
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
mshtml: COM cleanup for the IHTMLStyleElement iface.
parent
f341ed11
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/mshtml/htmlstyleelem.c
+30
-31
30 additions, 31 deletions
dlls/mshtml/htmlstyleelem.c
with
30 additions
and
31 deletions
dlls/mshtml/htmlstyleelem.c
+
30
−
31
View file @
5ffd1510
...
...
@@ -35,47 +35,48 @@ WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
typedef
struct
{
HTMLElement
element
;
const
IHTMLStyleElement
Vtbl
*
lp
IHTMLStyleElement
Vtbl
;
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
->
lp
IHTMLStyleElementVtbl
=
&
HTMLStyleElementVtbl
;
ret
->
IHTMLStyleElement
_iface
.
lp
Vtbl
=
&
HTMLStyleElementVtbl
;
ret
->
element
.
node
.
vtbl
=
&
HTMLStyleElementImplVtbl
;
nsres
=
nsIDOMHTMLElement_QueryInterface
(
nselem
,
&
IID_nsIDOMHTMLStyleElement
,
(
void
**
)
&
ret
->
nsstyle
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment