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
a215ab64
Commit
a215ab64
authored
Nov 14, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 15, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Added document fragment cloneNode implementation.
parent
5caf8c31
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
3 deletions
+28
-3
htmldoc.c
dlls/mshtml/htmldoc.c
+23
-3
jstest.html
dlls/mshtml/tests/jstest.html
+5
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
a215ab64
...
@@ -1908,14 +1908,34 @@ static HRESULT HTMLDocumentNode_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HT
...
@@ -1908,14 +1908,34 @@ static HRESULT HTMLDocumentNode_clone(HTMLDOMNode *iface, nsIDOMNode *nsnode, HT
return
E_NOTIMPL
;
return
E_NOTIMPL
;
}
}
#undef HTMLDOCNODE_NODE_THIS
static
const
NodeImplVtbl
HTMLDocumentNodeImplVtbl
=
{
static
const
NodeImplVtbl
HTMLDocumentNodeImplVtbl
=
{
HTMLDocumentNode_QI
,
HTMLDocumentNode_QI
,
HTMLDocumentNode_destructor
,
HTMLDocumentNode_destructor
,
HTMLDocumentNode_clone
HTMLDocumentNode_clone
};
};
static
HRESULT
HTMLDocumentFragment_clone
(
HTMLDOMNode
*
iface
,
nsIDOMNode
*
nsnode
,
HTMLDOMNode
**
ret
)
{
HTMLDocumentNode
*
This
=
HTMLDOCNODE_NODE_THIS
(
iface
);
HTMLDocumentNode
*
new_node
;
HRESULT
hres
;
hres
=
create_document_fragment
(
nsnode
,
This
->
node
.
doc
,
&
new_node
);
if
(
FAILED
(
hres
))
return
hres
;
*
ret
=
&
new_node
->
node
;
return
S_OK
;
}
#undef HTMLDOCNODE_NODE_THIS
static
const
NodeImplVtbl
HTMLDocumentFragmentImplVtbl
=
{
HTMLDocumentNode_QI
,
HTMLDocumentNode_destructor
,
HTMLDocumentFragment_clone
};
static
const
tid_t
HTMLDocumentNode_iface_tids
[]
=
{
static
const
tid_t
HTMLDocumentNode_iface_tids
[]
=
{
IHTMLDOMNode_tid
,
IHTMLDOMNode_tid
,
IHTMLDOMNode2_tid
,
IHTMLDOMNode2_tid
,
...
@@ -1998,7 +2018,7 @@ HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *doc_node,
...
@@ -1998,7 +2018,7 @@ HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *doc_node,
return
E_OUTOFMEMORY
;
return
E_OUTOFMEMORY
;
HTMLDOMNode_Init
(
doc_node
,
&
doc_frag
->
node
,
nsnode
);
HTMLDOMNode_Init
(
doc_node
,
&
doc_frag
->
node
,
nsnode
);
doc_frag
->
node
.
vtbl
=
&
HTMLDocument
Node
ImplVtbl
;
doc_frag
->
node
.
vtbl
=
&
HTMLDocument
Fragment
ImplVtbl
;
doc_frag
->
node
.
cp_container
=
&
doc_frag
->
basedoc
.
cp_container
;
doc_frag
->
node
.
cp_container
=
&
doc_frag
->
basedoc
.
cp_container
;
htmldoc_addref
(
&
doc_frag
->
basedoc
);
htmldoc_addref
(
&
doc_frag
->
basedoc
);
...
...
dlls/mshtml/tests/jstest.html
View file @
a215ab64
...
@@ -38,6 +38,11 @@ function test_createDocumentFragment() {
...
@@ -38,6 +38,11 @@ function test_createDocumentFragment() {
ok
(
fragment
.
parentWindow
===
window
,
"fragment.parentWindow != window"
);
ok
(
fragment
.
parentWindow
===
window
,
"fragment.parentWindow != window"
);
ok
(
fragment
.
nodeType
===
11
,
"fragment.nodeType = "
+
fragment
.
nodeType
);
ok
(
fragment
.
nodeType
===
11
,
"fragment.nodeType = "
+
fragment
.
nodeType
);
ok
(
fragment
.
nodeName
===
"#document-fragment"
,
"fragment.nodeName = "
+
fragment
.
nodeName
);
ok
(
fragment
.
nodeName
===
"#document-fragment"
,
"fragment.nodeName = "
+
fragment
.
nodeName
);
var
cloned
=
fragment
.
cloneNode
(
true
);
ok
(
cloned
.
parentWindow
===
window
,
"cloned.parentWindow != window"
);
ok
(
cloned
.
nodeType
===
11
,
"cloned.nodeType = "
+
cloned
.
nodeType
);
ok
(
cloned
.
nodeName
===
"#document-fragment"
,
"cloned.nodeName = "
+
cloned
.
nodeName
);
}
}
var
globalVar
=
false
;
var
globalVar
=
false
;
...
...
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