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
bb983c82
Commit
bb983c82
authored
Jan 16, 2009
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Jan 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Implement IHTMLDocument5 createComment.
parent
be14da00
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
3 deletions
+49
-3
htmldoc5.c
dlls/mshtml/htmldoc5.c
+26
-2
dom.c
dlls/mshtml/tests/dom.c
+23
-1
No files found.
dlls/mshtml/htmldoc5.c
View file @
bb983c82
...
@@ -124,8 +124,32 @@ static HRESULT WINAPI HTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bs
...
@@ -124,8 +124,32 @@ static HRESULT WINAPI HTMLDocument5_createComment(IHTMLDocument5 *iface, BSTR bs
IHTMLDOMNode
**
ppRetNode
)
IHTMLDOMNode
**
ppRetNode
)
{
{
HTMLDocument
*
This
=
HTMLDOC5_THIS
(
iface
);
HTMLDocument
*
This
=
HTMLDOC5_THIS
(
iface
);
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
bstrdata
),
ppRetNode
);
nsIDOMComment
*
nscomment
;
return
E_NOTIMPL
;
HTMLDOMNode
*
node
;
nsAString
str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
bstrdata
),
ppRetNode
);
if
(
!
This
->
nsdoc
)
{
WARN
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
}
nsAString_Init
(
&
str
,
bstrdata
);
nsres
=
nsIDOMHTMLDocument_CreateComment
(
This
->
nsdoc
,
&
str
,
&
nscomment
);
nsAString_Finish
(
&
str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"CreateTextNode failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
node
=
&
HTMLCommentElement_Create
(
This
,
(
nsIDOMNode
*
)
nscomment
)
->
node
;
nsIDOMElement_Release
(
nscomment
);
*
ppRetNode
=
HTMLDOMNODE
(
node
);
IHTMLDOMNode_AddRef
(
HTMLDOMNODE
(
node
));
return
S_OK
;
}
}
static
HRESULT
WINAPI
HTMLDocument5_put_onfocusin
(
IHTMLDocument5
*
iface
,
VARIANT
v
)
static
HRESULT
WINAPI
HTMLDocument5_put_onfocusin
(
IHTMLDocument5
*
iface
,
VARIANT
v
)
...
...
dlls/mshtml/tests/dom.c
View file @
bb983c82
...
@@ -3809,11 +3809,13 @@ static void test_elems(IHTMLDocument2 *doc)
...
@@ -3809,11 +3809,13 @@ static void test_elems(IHTMLDocument2 *doc)
static
void
test_create_elems
(
IHTMLDocument2
*
doc
)
static
void
test_create_elems
(
IHTMLDocument2
*
doc
)
{
{
IHTMLElement
*
elem
,
*
body
,
*
elem2
;
IHTMLElement
*
elem
,
*
body
,
*
elem2
;
IHTMLDOMNode
*
node
,
*
node2
,
*
node3
;
IHTMLDOMNode
*
node
,
*
node2
,
*
node3
,
*
comment
;
IHTMLDocument5
*
doc5
;
IDispatch
*
disp
;
IDispatch
*
disp
;
VARIANT
var
;
VARIANT
var
;
long
type
;
long
type
;
HRESULT
hres
;
HRESULT
hres
;
BSTR
str
;
static
const
elem_type_t
types1
[]
=
{
ET_TESTG
};
static
const
elem_type_t
types1
[]
=
{
ET_TESTG
};
...
@@ -3868,6 +3870,26 @@ static void test_create_elems(IHTMLDocument2 *doc)
...
@@ -3868,6 +3870,26 @@ static void test_create_elems(IHTMLDocument2 *doc)
test_elem_innertext
(
body
,
"insert test"
);
test_elem_innertext
(
body
,
"insert test"
);
hres
=
IHTMLDocument2_QueryInterface
(
doc
,
&
IID_IHTMLDocument5
,
(
void
**
)
&
doc5
);
if
(
hres
==
S_OK
)
{
str
=
a2bstr
(
"testing"
);
hres
=
IHTMLDocument5_createComment
(
doc5
,
str
,
&
comment
);
SysFreeString
(
str
);
ok
(
hres
==
S_OK
,
"createComment failed: %08x
\n
"
,
hres
);
if
(
hres
==
S_OK
)
{
type
=
get_node_type
((
IUnknown
*
)
comment
);
ok
(
type
==
8
,
"type=%ld, expected 8
\n
"
,
type
);
test_node_get_value_str
((
IUnknown
*
)
comment
,
"testing"
);
IHTMLDOMNode_Release
(
comment
);
}
IHTMLDocument5_Release
(
doc5
);
}
IHTMLElement_Release
(
body
);
IHTMLElement_Release
(
body
);
}
}
...
...
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