Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
f35737a0
Commit
f35737a0
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 HTMLStyleSheet object with compat mode.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
51e348e9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
16 deletions
+27
-16
htmldoc.c
dlls/mshtml/htmldoc.c
+2
-2
htmlstyleelem.c
dlls/mshtml/htmlstyleelem.c
+4
-3
htmlstylesheet.c
dlls/mshtml/htmlstylesheet.c
+20
-10
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-1
No files found.
dlls/mshtml/htmldoc.c
View file @
f35737a0
...
...
@@ -1733,8 +1733,8 @@ static HRESULT WINAPI HTMLDocument_createStyleSheet(IHTMLDocument2 *iface, BSTR
if
(
bstrHref
&&
*
bstrHref
)
{
FIXME
(
"semi-stub for href %s
\n
"
,
debugstr_w
(
bstrHref
));
*
ppnewStyleSheet
=
HTMLStyleSheet_Create
(
NULL
);
return
S_OK
;
return
create_style_sheet
(
NULL
,
dispex_compat_mode
(
&
This
->
doc_node
->
node
.
event_target
.
dispex
),
ppnewStyleSheet
)
;
}
hres
=
create_element
(
This
->
doc_node
,
L"style"
,
&
elem
);
...
...
dlls/mshtml/htmlstyleelem.c
View file @
f35737a0
...
...
@@ -198,10 +198,11 @@ static HRESULT WINAPI HTMLStyleElement_get_styleSheet(IHTMLStyleElement *iface,
assert
(
nsres
==
NS_OK
);
if
(
ss
)
{
This
->
style_sheet
=
HTMLStyleSheet_Create
(
ss
);
HRESULT
hres
=
create_style_sheet
(
ss
,
dispex_compat_mode
(
&
This
->
element
.
node
.
event_target
.
dispex
),
&
This
->
style_sheet
);
nsIDOMStyleSheet_Release
(
ss
);
if
(
!
This
->
style_sheet
)
return
E_OUTOFMEMORY
;
if
(
FAILED
(
hres
)
)
return
hres
;
}
}
...
...
dlls/mshtml/htmlstylesheet.c
View file @
f35737a0
...
...
@@ -517,7 +517,9 @@ static HRESULT WINAPI HTMLStyleSheetsCollection_item(IHTMLStyleSheetsCollection
switch
(
V_VT
(
pvarIndex
))
{
case
VT_I4
:
{
nsIDOMStyleSheet
*
nsstylesheet
;
IHTMLStyleSheet
*
stylesheet
;
nsresult
nsres
;
HRESULT
hres
;
TRACE
(
"index=%d
\n
"
,
V_I4
(
pvarIndex
));
...
...
@@ -528,9 +530,12 @@ static HRESULT WINAPI HTMLStyleSheetsCollection_item(IHTMLStyleSheetsCollection
return
E_INVALIDARG
;
}
V_VT
(
pvarResult
)
=
VT_DISPATCH
;
V_DISPATCH
(
pvarResult
)
=
(
IDispatch
*
)
HTMLStyleSheet_Create
(
nsstylesheet
);
hres
=
create_style_sheet
(
nsstylesheet
,
dispex_compat_mode
(
&
This
->
dispex
),
&
stylesheet
);
if
(
FAILED
(
hres
))
return
hres
;
V_VT
(
pvarResult
)
=
VT_DISPATCH
;
V_DISPATCH
(
pvarResult
)
=
(
IDispatch
*
)
stylesheet
;
return
S_OK
;
}
...
...
@@ -938,23 +943,28 @@ static dispex_static_data_t HTMLStyleSheet_dispex = {
HTMLStyleSheet_iface_tids
};
IHTMLStyleSheet
*
HTMLStyleSheet_Create
(
nsIDOMStyleSheet
*
nsstyleshe
et
)
HRESULT
create_style_sheet
(
nsIDOMStyleSheet
*
nsstylesheet
,
compat_mode_t
compat_mode
,
IHTMLStyleSheet
**
r
et
)
{
HTMLStyleSheet
*
ret
=
heap_alloc
(
sizeof
(
HTMLStyleSheet
))
;
HTMLStyleSheet
*
style_sheet
;
nsresult
nsres
;
ret
->
IHTMLStyleSheet_iface
.
lpVtbl
=
&
HTMLStyleSheetVtbl
;
ret
->
ref
=
1
;
ret
->
nsstylesheet
=
NULL
;
if
(
!
(
style_sheet
=
heap_alloc
(
sizeof
(
HTMLStyleSheet
))))
return
E_OUTOFMEMORY
;
init_dispex
(
&
ret
->
dispex
,
(
IUnknown
*
)
&
ret
->
IHTMLStyleSheet_iface
,
&
HTMLStyleSheet_dispex
);
style_sheet
->
IHTMLStyleSheet_iface
.
lpVtbl
=
&
HTMLStyleSheetVtbl
;
style_sheet
->
ref
=
1
;
style_sheet
->
nsstylesheet
=
NULL
;
init_dispex_with_compat_mode
(
&
style_sheet
->
dispex
,
(
IUnknown
*
)
&
style_sheet
->
IHTMLStyleSheet_iface
,
&
HTMLStyleSheet_dispex
,
compat_mode
);
if
(
nsstylesheet
)
{
nsres
=
nsIDOMStyleSheet_QueryInterface
(
nsstylesheet
,
&
IID_nsIDOMCSSStyleSheet
,
(
void
**
)
&
r
et
->
nsstylesheet
);
(
void
**
)
&
style_she
et
->
nsstylesheet
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Could not get nsICSSStyleSheet interface: %08x
\n
"
,
nsres
);
}
return
&
ret
->
IHTMLStyleSheet_iface
;
*
ret
=
&
style_sheet
->
IHTMLStyleSheet_iface
;
return
S_OK
;
}
dlls/mshtml/mshtml_private.h
View file @
f35737a0
...
...
@@ -1019,7 +1019,7 @@ HRESULT get_readystate_string(READYSTATE,BSTR*) DECLSPEC_HIDDEN;
HRESULT
HTMLSelectionObject_Create
(
HTMLDocumentNode
*
,
nsISelection
*
,
IHTMLSelectionObject
**
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLTxtRange_Create
(
HTMLDocumentNode
*
,
nsIDOMRange
*
,
IHTMLTxtRange
**
)
DECLSPEC_HIDDEN
;
IHTMLStyleSheet
*
HTMLStyleSheet_Create
(
nsIDOMStyleSheet
*
)
DECLSPEC_HIDDEN
;
HRESULT
create_style_sheet
(
nsIDOMStyleSheet
*
,
compat_mode_t
,
IHTMLStyleSheet
*
*
)
DECLSPEC_HIDDEN
;
IHTMLStyleSheetsCollection
*
HTMLStyleSheetsCollection_Create
(
nsIDOMStyleSheetList
*
)
DECLSPEC_HIDDEN
;
HRESULT
HTMLDOMRange_Create
(
nsIDOMRange
*
,
IHTMLDOMRange
**
)
DECLSPEC_HIDDEN
;
HRESULT
create_markup_pointer
(
IMarkupPointer
**
)
DECLSPEC_HIDDEN
;
...
...
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