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
163970c3
Commit
163970c3
authored
Oct 11, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 11, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Create script element in IHTMLDocument::createStyleSheet.
parent
878b8582
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
47 additions
and
3 deletions
+47
-3
htmldoc.c
dlls/mshtml/htmldoc.c
+47
-3
No files found.
dlls/mshtml/htmldoc.c
View file @
163970c3
...
...
@@ -1442,11 +1442,55 @@ static HRESULT WINAPI HTMLDocument_createStyleSheet(IHTMLDocument2 *iface, BSTR
LONG
lIndex
,
IHTMLStyleSheet
**
ppnewStyleSheet
)
{
HTMLDocument
*
This
=
impl_from_IHTMLDocument2
(
iface
);
nsIDOMHTMLHeadElement
*
head_elem
;
IHTMLStyleElement
*
style_elem
;
HTMLElement
*
elem
;
nsresult
nsres
;
HRESULT
hres
;
FIXME
(
"(%p)->(%s %d %p) semi-stub
\n
"
,
This
,
debugstr_w
(
bstrHref
),
lIndex
,
ppnewStyleSheet
)
;
static
const
WCHAR
styleW
[]
=
{
's'
,
't'
,
'y'
,
'l'
,
'e'
,
0
}
;
*
ppnewStyleSheet
=
HTMLStyleSheet_Create
(
NULL
);
return
S_OK
;
TRACE
(
"(%p)->(%s %d %p)
\n
"
,
This
,
debugstr_w
(
bstrHref
),
lIndex
,
ppnewStyleSheet
);
if
(
!
This
->
doc_node
->
nsdoc
)
{
FIXME
(
"not a real doc object
\n
"
);
return
E_NOTIMPL
;
}
if
(
lIndex
!=
-
1
)
FIXME
(
"Unsupported lIndex %d
\n
"
,
lIndex
);
if
(
bstrHref
)
{
FIXME
(
"semi-stub for href %s
\n
"
,
debugstr_w
(
bstrHref
));
*
ppnewStyleSheet
=
HTMLStyleSheet_Create
(
NULL
);
return
S_OK
;
}
hres
=
create_element
(
This
->
doc_node
,
styleW
,
&
elem
);
if
(
FAILED
(
hres
))
return
hres
;
nsres
=
nsIDOMHTMLDocument_GetHead
(
This
->
doc_node
->
nsdoc
,
&
head_elem
);
if
(
NS_SUCCEEDED
(
nsres
))
{
nsIDOMNode
*
tmp_node
;
nsres
=
nsIDOMHTMLHeadElement_AppendChild
(
head_elem
,
(
nsIDOMNode
*
)
elem
->
nselem
,
&
tmp_node
);
nsIDOMHTMLHeadElement_Release
(
head_elem
);
if
(
NS_SUCCEEDED
(
nsres
)
&&
tmp_node
)
nsIDOMNode_Release
(
tmp_node
);
}
if
(
NS_FAILED
(
nsres
))
{
IHTMLElement_Release
(
&
elem
->
IHTMLElement_iface
);
return
E_FAIL
;
}
hres
=
IHTMLElement_QueryInterface
(
&
elem
->
IHTMLElement_iface
,
&
IID_IHTMLStyleElement
,
(
void
**
)
&
style_elem
);
assert
(
hres
==
S_OK
);
IHTMLElement_Release
(
&
elem
->
IHTMLElement_iface
);
hres
=
IHTMLStyleElement_get_styleSheet
(
style_elem
,
ppnewStyleSheet
);
IHTMLStyleElement_Release
(
style_elem
);
return
hres
;
}
static
const
IHTMLDocument2Vtbl
HTMLDocumentVtbl
=
{
...
...
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