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
39c7951c
Commit
39c7951c
authored
Jun 23, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Jun 23, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added IHTMLDocument3::createTextNode implementation.
parent
19803de2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
50 additions
and
2 deletions
+50
-2
htmldoc3.c
dlls/mshtml/htmldoc3.c
+25
-2
dom.c
dlls/mshtml/tests/dom.c
+25
-0
No files found.
dlls/mshtml/htmldoc3.c
View file @
39c7951c
...
...
@@ -108,8 +108,31 @@ static HRESULT WINAPI HTMLDocument3_createTextNode(IHTMLDocument3 *iface, BSTR t
IHTMLDOMNode
**
newTextNode
)
{
HTMLDocument
*
This
=
HTMLDOC3_THIS
(
iface
);
FIXME
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
text
),
newTextNode
);
return
E_NOTIMPL
;
nsIDOMDocument
*
nsdoc
;
nsIDOMText
*
nstext
;
HTMLDOMNode
*
node
;
nsAString
text_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
text
),
newTextNode
);
nsIWebNavigation_GetDocument
(
This
->
nscontainer
->
navigation
,
&
nsdoc
);
nsAString_Init
(
&
text_str
,
text
);
nsres
=
nsIDOMDocument_CreateTextNode
(
nsdoc
,
&
text_str
,
&
nstext
);
nsAString_Finish
(
&
text_str
);
nsIDOMDocument_Release
(
nsdoc
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"CreateTextNode failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
node
=
HTMLDOMTextNode_Create
(
This
,
(
nsIDOMNode
*
)
nstext
);
nsIDOMElement_Release
(
nstext
);
*
newTextNode
=
HTMLDOMNODE
(
node
);
IHTMLDOMNode_AddRef
(
HTMLDOMNODE
(
node
));
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLDocument3_get_documentElement
(
IHTMLDocument3
*
iface
,
IHTMLElement
**
p
)
...
...
dlls/mshtml/tests/dom.c
View file @
39c7951c
...
...
@@ -1035,6 +1035,26 @@ static IHTMLElement *_test_create_elem(unsigned line, IHTMLDocument2 *doc, const
return
elem
;
}
#define test_create_text(d,t) _test_create_text(__LINE__,d,t)
static
IHTMLDOMNode
*
_test_create_text
(
unsigned
line
,
IHTMLDocument2
*
doc
,
const
char
*
text
)
{
IHTMLDocument3
*
doc3
;
IHTMLDOMNode
*
node
=
NULL
;
BSTR
tmp
;
HRESULT
hres
;
hres
=
IHTMLDocument2_QueryInterface
(
doc
,
&
IID_IHTMLDocument3
,
(
void
**
)
&
doc3
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"Could not get IHTMLDocument3: %08x
\n
"
,
hres
);
tmp
=
a2bstr
(
text
);
hres
=
IHTMLDocument3_createTextNode
(
doc3
,
tmp
,
&
node
);
IHTMLDocument3_Release
(
doc3
);
ok_
(
__FILE__
,
line
)
(
hres
==
S_OK
,
"createElement failed: %08x
\n
"
,
hres
);
ok_
(
__FILE__
,
line
)
(
node
!=
NULL
,
"node == NULL
\n
"
);
return
node
;
}
#define test_node_append_child(n,c) _test_node_append_child(__LINE__,n,c)
static
IHTMLDOMNode
*
_test_node_append_child
(
unsigned
line
,
IUnknown
*
node_unk
,
IUnknown
*
child_unk
)
{
...
...
@@ -1932,6 +1952,11 @@ static void test_create_elems(IHTMLDocument2 *doc)
IHTMLElement_Release
(
elem2
);
IHTMLElement_Release
(
body
);
IHTMLElement_Release
(
elem
);
node
=
test_create_text
(
doc
,
"test"
);
test_ifaces
((
IUnknown
*
)
node
,
text_iids
);
test_disp
((
IUnknown
*
)
node
,
&
DIID_DispHTMLDOMTextNode
);
IHTMLDOMNode_Release
(
node
);
}
static
void
test_exec
(
IUnknown
*
unk
,
const
GUID
*
grpid
,
DWORD
cmdid
,
VARIANT
*
in
,
VARIANT
*
out
)
...
...
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