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
23b1d3a7
Commit
23b1d3a7
authored
Feb 19, 2018
by
Jacek Caban
Committed by
Alexandre Julliard
Feb 19, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Get owner document from Gecko node in get_node.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b5aff992
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
1 deletion
+37
-1
htmldoc.c
dlls/mshtml/htmldoc.c
+19
-0
htmlnode.c
dlls/mshtml/htmlnode.c
+17
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
No files found.
dlls/mshtml/htmldoc.c
View file @
23b1d3a7
...
...
@@ -5205,6 +5205,25 @@ static HRESULT create_document_fragment(nsIDOMNode *nsnode, HTMLDocumentNode *do
return
S_OK
;
}
HRESULT
get_document_node
(
nsIDOMDocument
*
dom_document
,
HTMLDocumentNode
**
ret
)
{
HTMLDOMNode
*
node
;
HRESULT
hres
;
hres
=
get_node
(
NULL
,
(
nsIDOMNode
*
)
dom_document
,
FALSE
,
&
node
);
if
(
FAILED
(
hres
))
return
hres
;
if
(
!
node
)
{
ERR
(
"document not initialized
\n
"
);
return
E_FAIL
;
}
assert
(
node
->
vtbl
==
&
HTMLDocumentNodeImplVtbl
);
*
ret
=
impl_from_HTMLDOMNode
(
node
);
return
S_OK
;
}
static
inline
HTMLDocumentObj
*
impl_from_IUnknown
(
IUnknown
*
iface
)
{
return
CONTAINING_RECORD
(
iface
,
HTMLDocumentObj
,
IUnknown_outer
);
...
...
dlls/mshtml/htmlnode.c
View file @
23b1d3a7
...
...
@@ -1616,8 +1616,11 @@ void init_node_cc(void)
HRESULT
get_node
(
HTMLDocumentNode
*
This
,
nsIDOMNode
*
nsnode
,
BOOL
create
,
HTMLDOMNode
**
ret
)
{
nsIDOMDocument
*
dom_document
;
HTMLDocumentNode
*
document
;
nsISupports
*
unk
=
NULL
;
nsresult
nsres
;
HRESULT
hres
;
nsres
=
nsIDOMNode_GetMshtmlNode
(
nsnode
,
&
unk
);
assert
(
nsres
==
NS_OK
);
...
...
@@ -1633,5 +1636,18 @@ HRESULT get_node(HTMLDocumentNode *This, nsIDOMNode *nsnode, BOOL create, HTMLDO
return
S_OK
;
}
return
create_node
(
This
,
nsnode
,
ret
);
nsres
=
nsIDOMNode_GetOwnerDocument
(
nsnode
,
&
dom_document
);
if
(
NS_FAILED
(
nsres
)
||
!
dom_document
)
{
ERR
(
"GetOwnerDocument failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
hres
=
get_document_node
(
dom_document
,
&
document
);
nsIDOMDocument_Release
(
dom_document
);
if
(
!
document
)
return
E_FAIL
;
hres
=
create_node
(
document
,
nsnode
,
ret
);
htmldoc_release
(
&
document
->
basedoc
);
return
hres
;
}
dlls/mshtml/mshtml_private.h
View file @
23b1d3a7
...
...
@@ -1074,6 +1074,7 @@ void HTMLFrameBase_destructor(HTMLFrameBase*) DECLSPEC_HIDDEN;
HRESULT
get_node
(
HTMLDocumentNode
*
,
nsIDOMNode
*
,
BOOL
,
HTMLDOMNode
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_elem
(
HTMLDocumentNode
*
,
nsIDOMElement
*
,
HTMLElement
**
)
DECLSPEC_HIDDEN
;
HRESULT
get_document_node
(
nsIDOMDocument
*
,
HTMLDocumentNode
**
)
DECLSPEC_HIDDEN
;
HTMLElement
*
unsafe_impl_from_IHTMLElement
(
IHTMLElement
*
)
DECLSPEC_HIDDEN
;
...
...
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