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
6c9c77fd
Commit
6c9c77fd
authored
Mar 15, 2021
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Initialize HTMLStyleSheetRulesCollection object with compat mode.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
687c6685
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
10 deletions
+17
-10
htmlstylesheet.c
dlls/mshtml/htmlstylesheet.c
+17
-10
No files found.
dlls/mshtml/htmlstylesheet.c
View file @
6c9c77fd
...
@@ -381,21 +381,26 @@ static dispex_static_data_t HTMLStyleSheetRulesCollection_dispex = {
...
@@ -381,21 +381,26 @@ static dispex_static_data_t HTMLStyleSheetRulesCollection_dispex = {
HTMLStyleSheetRulesCollection_iface_tids
HTMLStyleSheetRulesCollection_iface_tids
};
};
static
IHTMLStyleSheetRulesCollection
*
HTMLStyleSheetRulesCollection_Create
(
nsIDOMCSSRuleList
*
nslist
)
static
HRESULT
create_style_sheet_rules_collection
(
nsIDOMCSSRuleList
*
nslist
,
compat_mode_t
compat_mode
,
IHTMLStyleSheetRulesCollection
**
ret
)
{
{
HTMLStyleSheetRulesCollection
*
ret
;
HTMLStyleSheetRulesCollection
*
collection
;
ret
=
heap_alloc
(
sizeof
(
*
ret
));
if
(
!
(
collection
=
heap_alloc
(
sizeof
(
*
collection
))))
ret
->
IHTMLStyleSheetRulesCollection_iface
.
lpVtbl
=
&
HTMLStyleSheetRulesCollectionVtbl
;
return
E_OUTOFMEMORY
;
ret
->
ref
=
1
;
ret
->
nslist
=
nslist
;
collection
->
IHTMLStyleSheetRulesCollection_iface
.
lpVtbl
=
&
HTMLStyleSheetRulesCollectionVtbl
;
collection
->
ref
=
1
;
collection
->
nslist
=
nslist
;
init_dispex
(
&
ret
->
dispex
,
(
IUnknown
*
)
&
ret
->
IHTMLStyleSheetRulesCollection_iface
,
&
HTMLStyleSheetRulesCollection_dispex
);
init_dispex_with_compat_mode
(
&
collection
->
dispex
,
(
IUnknown
*
)
&
collection
->
IHTMLStyleSheetRulesCollection_iface
,
&
HTMLStyleSheetRulesCollection_dispex
,
compat_mode
);
if
(
nslist
)
if
(
nslist
)
nsIDOMCSSRuleList_AddRef
(
nslist
);
nsIDOMCSSRuleList_AddRef
(
nslist
);
return
&
ret
->
IHTMLStyleSheetRulesCollection_iface
;
*
ret
=
&
collection
->
IHTMLStyleSheetRulesCollection_iface
;
return
S_OK
;
}
}
static
inline
HTMLStyleSheetsCollection
*
impl_from_IHTMLStyleSheetsCollection
(
IHTMLStyleSheetsCollection
*
iface
)
static
inline
HTMLStyleSheetsCollection
*
impl_from_IHTMLStyleSheetsCollection
(
IHTMLStyleSheetsCollection
*
iface
)
...
@@ -896,6 +901,7 @@ static HRESULT WINAPI HTMLStyleSheet_get_rules(IHTMLStyleSheet *iface,
...
@@ -896,6 +901,7 @@ static HRESULT WINAPI HTMLStyleSheet_get_rules(IHTMLStyleSheet *iface,
HTMLStyleSheet
*
This
=
impl_from_IHTMLStyleSheet
(
iface
);
HTMLStyleSheet
*
This
=
impl_from_IHTMLStyleSheet
(
iface
);
nsIDOMCSSRuleList
*
nslist
=
NULL
;
nsIDOMCSSRuleList
*
nslist
=
NULL
;
nsresult
nsres
;
nsresult
nsres
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
...
@@ -905,8 +911,9 @@ static HRESULT WINAPI HTMLStyleSheet_get_rules(IHTMLStyleSheet *iface,
...
@@ -905,8 +911,9 @@ static HRESULT WINAPI HTMLStyleSheet_get_rules(IHTMLStyleSheet *iface,
return
E_FAIL
;
return
E_FAIL
;
}
}
*
p
=
HTMLStyleSheetRulesCollection_Create
(
nslist
);
hres
=
create_style_sheet_rules_collection
(
nslist
,
dispex_compat_mode
(
&
This
->
dispex
),
p
);
return
S_OK
;
nsIDOMCSSRuleList_Release
(
nslist
);
return
hres
;
}
}
static
const
IHTMLStyleSheetVtbl
HTMLStyleSheetVtbl
=
{
static
const
IHTMLStyleSheetVtbl
HTMLStyleSheetVtbl
=
{
...
...
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