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
a68e77d6
Commit
a68e77d6
authored
Jul 24, 2012
by
Jacek Caban
Committed by
Alexandre Julliard
Jul 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use proper document node for createElement called on document fragment.
parent
b1d063b1
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
htmldoc.c
dlls/mshtml/htmldoc.c
+8
-2
dom.c
dlls/mshtml/tests/dom.c
+9
-1
No files found.
dlls/mshtml/htmldoc.c
View file @
a68e77d6
...
...
@@ -1022,17 +1022,23 @@ static HRESULT WINAPI HTMLDocument_createElement(IHTMLDocument2 *iface, BSTR eTa
IHTMLElement
**
newElem
)
{
HTMLDocument
*
This
=
impl_from_IHTMLDocument2
(
iface
);
HTMLDocumentNode
*
doc_node
;
nsIDOMHTMLElement
*
nselem
;
HTMLElement
*
elem
;
HRESULT
hres
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
eTag
),
newElem
);
hres
=
create_nselem
(
This
->
doc_node
,
eTag
,
&
nselem
);
/* Use owner doc if called on document fragment */
doc_node
=
This
->
doc_node
;
if
(
!
doc_node
->
nsdoc
)
doc_node
=
doc_node
->
node
.
doc
;
hres
=
create_nselem
(
doc_node
,
eTag
,
&
nselem
);
if
(
FAILED
(
hres
))
return
hres
;
hres
=
HTMLElement_Create
(
This
->
doc_node
,
(
nsIDOMNode
*
)
nselem
,
TRUE
,
&
elem
);
hres
=
HTMLElement_Create
(
doc_node
,
(
nsIDOMNode
*
)
nselem
,
TRUE
,
&
elem
);
nsIDOMHTMLElement_Release
(
nselem
);
if
(
FAILED
(
hres
))
return
hres
;
...
...
dlls/mshtml/tests/dom.c
View file @
a68e77d6
...
...
@@ -6246,10 +6246,10 @@ static IHTMLDocument2 *create_docfrag(IHTMLDocument2 *doc)
static
void
test_docfrag
(
IHTMLDocument2
*
doc
)
{
IHTMLDocument2
*
frag
,
*
owner_doc
,
*
doc_node
;
IHTMLElement
*
div
,
*
body
,
*
br
;
IHTMLElementCollection
*
col
;
IHTMLLocation
*
location
;
IHTMLDocument2
*
frag
;
HRESULT
hres
;
static
const
elem_type_t
all_types
[]
=
{
...
...
@@ -6288,6 +6288,14 @@ static void test_docfrag(IHTMLDocument2 *doc)
test_elem_collection
((
IUnknown
*
)
col
,
all_types
,
sizeof
(
all_types
)
/
sizeof
(
all_types
[
0
]));
IHTMLElementCollection_Release
(
col
);
div
=
test_create_elem
(
frag
,
"div"
);
owner_doc
=
get_owner_doc
((
IUnknown
*
)
div
);
doc_node
=
get_doc_node
(
doc
);
ok
(
iface_cmp
((
IUnknown
*
)
owner_doc
,
(
IUnknown
*
)
doc_node
),
"owner_doc != doc_node
\n
"
);
IHTMLDocument2_Release
(
doc_node
);
IHTMLDocument2_Release
(
owner_doc
);
IHTMLElement_Release
(
div
);
IHTMLDocument2_Release
(
frag
);
}
...
...
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