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
000b78e9
Commit
000b78e9
authored
May 09, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
May 09, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IDispatchEx support to HTMLStyleSheetRulesCollection object.
parent
018af15b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
21 deletions
+33
-21
htmlstylesheet.c
dlls/mshtml/htmlstylesheet.c
+29
-21
mshtml_private.h
dlls/mshtml/mshtml_private.h
+2
-0
dom.c
dlls/mshtml/tests/dom.c
+2
-0
No files found.
dlls/mshtml/htmlstylesheet.c
View file @
000b78e9
...
...
@@ -50,6 +50,7 @@ struct HTMLStyleSheetsCollection {
};
struct
HTMLStyleSheetRulesCollection
{
DispatchEx
dispex
;
IHTMLStyleSheetRulesCollection
IHTMLStyleSheetRulesCollection_iface
;
LONG
ref
;
...
...
@@ -73,15 +74,16 @@ static HRESULT WINAPI HTMLStyleSheetRulesCollection_QueryInterface(IHTMLStyleShe
}
else
if
(
IsEqualGUID
(
&
IID_IHTMLStyleSheetRulesCollection
,
riid
))
{
TRACE
(
"(%p)->(IID_IHTMLStyleSheetRulesCollection %p)
\n
"
,
This
,
ppv
);
*
ppv
=
&
This
->
IHTMLStyleSheetRulesCollection_iface
;
}
else
if
(
dispex_query_interface
(
&
This
->
dispex
,
riid
,
ppv
))
{
return
*
ppv
?
S_OK
:
E_NOINTERFACE
;
}
else
{
*
ppv
=
NULL
;
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
}
if
(
*
ppv
)
{
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
ppv
);
return
E_NOINTERFACE
;
IUnknown_AddRef
((
IUnknown
*
)
*
ppv
);
return
S_OK
;
}
static
ULONG
WINAPI
HTMLStyleSheetRulesCollection_AddRef
(
IHTMLStyleSheetRulesCollection
*
iface
)
...
...
@@ -102,6 +104,7 @@ static ULONG WINAPI HTMLStyleSheetRulesCollection_Release(IHTMLStyleSheetRulesCo
TRACE
(
"(%p) ref=%d
\n
"
,
This
,
ref
);
if
(
!
ref
)
{
release_dispex
(
&
This
->
dispex
);
if
(
This
->
nslist
)
nsIDOMCSSRuleList_Release
(
This
->
nslist
);
heap_free
(
This
);
...
...
@@ -114,25 +117,22 @@ static HRESULT WINAPI HTMLStyleSheetRulesCollection_GetTypeInfoCount(
IHTMLStyleSheetRulesCollection
*
iface
,
UINT
*
pctinfo
)
{
HTMLStyleSheetRulesCollection
*
This
=
impl_from_IHTMLStyleSheetRulesCollection
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
pctinfo
);
return
E_NOTIMPL
;
return
IDispatchEx_GetTypeInfoCount
(
&
This
->
dispex
.
IDispatchEx_iface
,
pctinfo
);
}
static
HRESULT
WINAPI
HTMLStyleSheetRulesCollection_GetTypeInfo
(
IHTMLStyleSheetRulesCollection
*
iface
,
UINT
iTInfo
,
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
HTMLStyleSheetRulesCollection
*
This
=
impl_from_IHTMLStyleSheetRulesCollection
(
iface
);
FIXME
(
"(%p)->(%u %u %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
return
E_NOTIMPL
;
return
IDispatchEx_GetTypeInfo
(
&
This
->
dispex
.
IDispatchEx_iface
,
iTInfo
,
lcid
,
ppTInfo
);
}
static
HRESULT
WINAPI
HTMLStyleSheetRulesCollection_GetIDsOfNames
(
IHTMLStyleSheetRulesCollection
*
iface
,
REFIID
riid
,
LPOLESTR
*
rgszNames
,
UINT
cNames
,
LCID
lcid
,
DISPID
*
rgDispId
)
{
HTMLStyleSheetRulesCollection
*
This
=
impl_from_IHTMLStyleSheetRulesCollection
(
iface
);
FIXME
(
"(%p)->(%s %p %u %u %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
lcid
,
rgDispId
);
return
E_NOTIMPL
;
return
IDispatchEx_GetIDsOfNames
(
&
This
->
dispex
.
IDispatchEx_iface
,
riid
,
rgszNames
,
cNames
,
lcid
,
rgDispId
);
}
static
HRESULT
WINAPI
HTMLStyleSheetRulesCollection_Invoke
(
IHTMLStyleSheetRulesCollection
*
iface
,
...
...
@@ -140,9 +140,8 @@ static HRESULT WINAPI HTMLStyleSheetRulesCollection_Invoke(IHTMLStyleSheetRulesC
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
HTMLStyleSheetRulesCollection
*
This
=
impl_from_IHTMLStyleSheetRulesCollection
(
iface
);
FIXME
(
"(%p)->(%d %s %d %d %p %p %p %p)
\n
"
,
This
,
dispIdMember
,
debugstr_guid
(
riid
),
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
return
E_NOTIMPL
;
return
IDispatchEx_Invoke
(
&
This
->
dispex
.
IDispatchEx_iface
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
}
static
HRESULT
WINAPI
HTMLStyleSheetRulesCollection_get_length
(
IHTMLStyleSheetRulesCollection
*
iface
,
...
...
@@ -185,6 +184,17 @@ static const IHTMLStyleSheetRulesCollectionVtbl HTMLStyleSheetRulesCollectionVtb
HTMLStyleSheetRulesCollection_item
};
static
const
tid_t
HTMLStyleSheetRulesCollection_iface_tids
[]
=
{
IHTMLStyleSheetRulesCollection_tid
,
0
};
static
dispex_static_data_t
HTMLStyleSheetRulesCollection_dispex
=
{
NULL
,
DispHTMLStyleSheetRulesCollection_tid
,
NULL
,
HTMLStyleSheetRulesCollection_iface_tids
};
static
IHTMLStyleSheetRulesCollection
*
HTMLStyleSheetRulesCollection_Create
(
nsIDOMCSSRuleList
*
nslist
)
{
HTMLStyleSheetRulesCollection
*
ret
;
...
...
@@ -194,6 +204,8 @@ static IHTMLStyleSheetRulesCollection *HTMLStyleSheetRulesCollection_Create(nsID
ret
->
ref
=
1
;
ret
->
nslist
=
nslist
;
init_dispex
(
&
ret
->
dispex
,
(
IUnknown
*
)
&
ret
->
IHTMLStyleSheetRulesCollection_iface
,
&
HTMLStyleSheetRulesCollection_dispex
);
if
(
nslist
)
nsIDOMCSSRuleList_AddRef
(
nslist
);
...
...
@@ -460,7 +472,6 @@ static HRESULT WINAPI HTMLStyleSheet_GetTypeInfo(IHTMLStyleSheet *iface, UINT iT
LCID
lcid
,
ITypeInfo
**
ppTInfo
)
{
HTMLStyleSheet
*
This
=
impl_from_IHTMLStyleSheet
(
iface
);
TRACE
(
"(%p)->(%u %u %p)
\n
"
,
This
,
iTInfo
,
lcid
,
ppTInfo
);
return
IDispatchEx_GetTypeInfo
(
&
This
->
dispex
.
IDispatchEx_iface
,
iTInfo
,
lcid
,
ppTInfo
);
}
...
...
@@ -469,7 +480,6 @@ static HRESULT WINAPI HTMLStyleSheet_GetIDsOfNames(IHTMLStyleSheet *iface, REFII
LCID
lcid
,
DISPID
*
rgDispId
)
{
HTMLStyleSheet
*
This
=
impl_from_IHTMLStyleSheet
(
iface
);
TRACE
(
"(%p)->(%s %p %u %u %p)
\n
"
,
This
,
debugstr_guid
(
riid
),
rgszNames
,
cNames
,
lcid
,
rgDispId
);
return
IDispatchEx_GetIDsOfNames
(
&
This
->
dispex
.
IDispatchEx_iface
,
riid
,
rgszNames
,
cNames
,
lcid
,
rgDispId
);
}
...
...
@@ -478,8 +488,6 @@ static HRESULT WINAPI HTMLStyleSheet_Invoke(IHTMLStyleSheet *iface, DISPID dispI
VARIANT
*
pVarResult
,
EXCEPINFO
*
pExcepInfo
,
UINT
*
puArgErr
)
{
HTMLStyleSheet
*
This
=
impl_from_IHTMLStyleSheet
(
iface
);
TRACE
(
"(%p)->(%d %s %d %d %p %p %p %p)
\n
"
,
This
,
dispIdMember
,
debugstr_guid
(
riid
),
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
return
IDispatchEx_Invoke
(
&
This
->
dispex
.
IDispatchEx_iface
,
dispIdMember
,
riid
,
lcid
,
wFlags
,
pDispParams
,
pVarResult
,
pExcepInfo
,
puArgErr
);
}
...
...
dlls/mshtml/mshtml_private.h
View file @
000b78e9
...
...
@@ -107,6 +107,7 @@ typedef struct event_target_t event_target_t;
XDIID(DispHTMLStyle) \
XDIID(DispHTMLStyleElement) \
XDIID(DispHTMLStyleSheet) \
XDIID(DispHTMLStyleSheetRulesCollection) \
XDIID(DispHTMLStyleSheetsCollection) \
XDIID(DispHTMLTable) \
XDIID(DispHTMLTableCell) \
...
...
@@ -180,6 +181,7 @@ typedef struct event_target_t event_target_t;
XIID(IHTMLStyle6) \
XIID(IHTMLStyleElement) \
XIID(IHTMLStyleSheet) \
XIID(IHTMLStyleSheetRulesCollection) \
XIID(IHTMLStyleSheetsCollection) \
XIID(IHTMLTable) \
XIID(IHTMLTable2) \
...
...
dlls/mshtml/tests/dom.c
View file @
000b78e9
...
...
@@ -6241,6 +6241,8 @@ static void test_stylesheet(IDispatch *disp)
hres
=
IHTMLStyleSheet_get_rules
(
stylesheet
,
&
col
);
ok
(
hres
==
S_OK
,
"get_rules failed: %08x
\n
"
,
hres
);
ok
(
col
!=
NULL
,
"col == NULL
\n
"
);
test_disp2
((
IUnknown
*
)
col
,
&
DIID_DispHTMLStyleSheetRulesCollection
,
&
IID_IHTMLStyleSheetRulesCollection
,
"[object]"
);
IHTMLStyleSheetRulesCollection_Release
(
col
);
href
=
(
void
*
)
0xdeadbeef
;
...
...
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