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
d9aacfd9
Commit
d9aacfd9
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 IHTMLDocument3::createDocumentFragment implementation.
parent
cb99f716
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
12 deletions
+65
-12
htmldoc.c
dlls/mshtml/htmldoc.c
+39
-10
htmldoc3.c
dlls/mshtml/htmldoc3.c
+25
-2
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
d9aacfd9
...
...
@@ -1930,35 +1930,47 @@ static dispex_static_data_t HTMLDocumentNode_dispex = {
HTMLDocumentNode_iface_tids
};
HRESULT
create_doc_from_nsdoc
(
nsIDOMHTMLDocument
*
nsdoc
,
HTMLDocumentObj
*
doc_obj
,
HTMLWindow
*
window
,
HTMLDocumentNode
**
ret
)
static
HTMLDocumentNode
*
alloc_doc_node
(
HTMLDocumentObj
*
doc_obj
,
HTMLWindow
*
window
)
{
HTMLDocumentNode
*
doc
;
HRESULT
hres
;
doc
=
heap_alloc_zero
(
sizeof
(
HTMLDocumentNode
));
if
(
!
doc
)
return
E_OUTOFMEMORY
;
return
NULL
;
doc
->
ref
=
1
;
doc
->
basedoc
.
doc_node
=
doc
;
doc
->
basedoc
.
doc_obj
=
doc_obj
;
doc
->
basedoc
.
window
=
window
;
init_dispex
(
&
doc
->
node
.
dispex
,
(
IUnknown
*
)
HTMLDOMNODE
(
&
doc
->
node
),
&
HTMLDocumentNode_dispex
);
init_doc
(
&
doc
->
basedoc
,
(
IUnknown
*
)
HTMLDOMNODE
(
&
doc
->
node
),
DISPATCHEX
(
&
doc
->
node
.
dispex
));
HTMLDocumentNode_SecMgr_Init
(
doc
);
doc
->
ref
=
1
;
doc
->
basedoc
.
window
=
window
;
init_nsevents
(
doc
);
list_init
(
&
doc
->
bindings
);
list_init
(
&
doc
->
selection_list
);
list_init
(
&
doc
->
range_list
);
return
doc
;
}
HRESULT
create_doc_from_nsdoc
(
nsIDOMHTMLDocument
*
nsdoc
,
HTMLDocumentObj
*
doc_obj
,
HTMLWindow
*
window
,
HTMLDocumentNode
**
ret
)
{
HTMLDocumentNode
*
doc
;
HRESULT
hres
;
doc
=
alloc_doc_node
(
doc_obj
,
window
);
if
(
!
doc
)
return
E_OUTOFMEMORY
;
if
(
window
==
doc_obj
->
basedoc
.
window
)
doc
->
basedoc
.
cp_container
.
forward_container
=
&
doc_obj
->
basedoc
.
cp_container
;
nsIDOMHTMLDocument_AddRef
(
nsdoc
);
doc
->
nsdoc
=
nsdoc
;
init_mutation
(
doc
);
init_nsevents
(
doc
);
list_init
(
&
doc
->
bindings
);
list_init
(
&
doc
->
selection_list
);
list_init
(
&
doc
->
range_list
);
HTMLDOMNode_Init
(
doc
,
&
doc
->
node
,
(
nsIDOMNode
*
)
nsdoc
);
doc
->
node
.
vtbl
=
&
HTMLDocumentNodeImplVtbl
;
...
...
@@ -1974,6 +1986,23 @@ HRESULT create_doc_from_nsdoc(nsIDOMHTMLDocument *nsdoc, HTMLDocumentObj *doc_ob
return
S_OK
;
}
HRESULT
create_document_fragment
(
nsIDOMNode
*
nsnode
,
HTMLDocumentNode
*
doc_node
,
HTMLDocumentNode
**
ret
)
{
HTMLDocumentNode
*
doc_frag
;
doc_frag
=
alloc_doc_node
(
doc_node
->
basedoc
.
doc_obj
,
doc_node
->
basedoc
.
window
);
if
(
!
doc_frag
)
return
E_OUTOFMEMORY
;
HTMLDOMNode_Init
(
doc_node
,
&
doc_frag
->
node
,
nsnode
);
doc_frag
->
node
.
vtbl
=
&
HTMLDocumentNodeImplVtbl
;
doc_frag
->
node
.
cp_container
=
&
doc_frag
->
basedoc
.
cp_container
;
htmldoc_addref
(
&
doc_frag
->
basedoc
);
*
ret
=
doc_frag
;
return
S_OK
;
}
/**********************************************************
* ICustomDoc implementation
*/
...
...
dlls/mshtml/htmldoc3.c
View file @
d9aacfd9
...
...
@@ -343,8 +343,31 @@ static HRESULT WINAPI HTMLDocument3_createDocumentFragment(IHTMLDocument3 *iface
IHTMLDocument2
**
ppNewDoc
)
{
HTMLDocument
*
This
=
HTMLDOC3_THIS
(
iface
);
FIXME
(
"(%p)->(%p)
\n
"
,
This
,
ppNewDoc
);
return
E_NOTIMPL
;
nsIDOMDocumentFragment
*
doc_frag
;
HTMLDocumentNode
*
docnode
;
nsresult
nsres
;
HRESULT
hres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
ppNewDoc
);
if
(
!
This
->
doc_node
->
nsdoc
)
{
FIXME
(
"NULL nsdoc
\n
"
);
return
E_NOTIMPL
;
}
nsres
=
nsIDOMHTMLDocument_CreateDocumentFragment
(
This
->
doc_node
->
nsdoc
,
&
doc_frag
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"CreateDocumentFragment failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
hres
=
create_document_fragment
((
nsIDOMNode
*
)
doc_frag
,
This
->
doc_node
,
&
docnode
);
nsIDOMDocumentFragment_Release
(
doc_frag
);
if
(
FAILED
(
hres
))
return
hres
;
*
ppNewDoc
=
HTMLDOC
(
&
docnode
->
basedoc
);
return
S_OK
;
}
static
HRESULT
WINAPI
HTMLDocument3_get_parentDocument
(
IHTMLDocument3
*
iface
,
...
...
dlls/mshtml/mshtml_private.h
View file @
d9aacfd9
...
...
@@ -701,6 +701,7 @@ struct HTMLDocumentNode {
HRESULT
HTMLDocument_Create
(
IUnknown
*
,
REFIID
,
void
**
);
HRESULT
HTMLLoadOptions_Create
(
IUnknown
*
,
REFIID
,
void
**
);
HRESULT
create_doc_from_nsdoc
(
nsIDOMHTMLDocument
*
,
HTMLDocumentObj
*
,
HTMLWindow
*
,
HTMLDocumentNode
**
);
HRESULT
create_document_fragment
(
nsIDOMNode
*
,
HTMLDocumentNode
*
,
HTMLDocumentNode
**
);
HRESULT
HTMLWindow_Create
(
HTMLDocumentObj
*
,
nsIDOMWindow
*
,
HTMLWindow
*
,
HTMLWindow
**
);
void
update_window_doc
(
HTMLWindow
*
);
...
...
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