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
567fbd5d
Commit
567fbd5d
authored
Oct 08, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 09, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use stored nsdoc in IHTMLDocument2::get_body.
parent
5629945c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
22 deletions
+10
-22
htmldoc.c
dlls/mshtml/htmldoc.c
+10
-22
No files found.
dlls/mshtml/htmldoc.c
View file @
567fbd5d
...
...
@@ -294,43 +294,31 @@ static HRESULT WINAPI HTMLDocument_get_all(IHTMLDocument2 *iface, IHTMLElementCo
static
HRESULT
WINAPI
HTMLDocument_get_body
(
IHTMLDocument2
*
iface
,
IHTMLElement
**
p
)
{
HTMLDocument
*
This
=
HTMLDOC_THIS
(
iface
);
nsIDOMDocument
*
nsdoc
;
nsIDOMHTMLDocument
*
nshtmldoc
;
nsIDOMHTMLElement
*
nsbody
=
NULL
;
HTMLDOMNode
*
node
;
nsresult
nsres
;
TRACE
(
"(%p)->(%p)
\n
"
,
This
,
p
);
*
p
=
NULL
;
if
(
!
This
->
nscontainer
)
return
S_OK
;
nsres
=
nsIWebNavigation_GetDocument
(
This
->
nscontainer
->
navigation
,
&
nsdoc
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetDocument failed: %08x
\n
"
,
nsres
);
return
S_OK
;
if
(
!
This
->
nsdoc
)
{
WARN
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
}
if
(
NS_FAILED
(
nsres
)
||
!
nsdoc
)
return
S_OK
;
nsIDOMDocument_QueryInterface
(
nsdoc
,
&
IID_nsIDOMHTMLDocument
,
(
void
**
)
&
nshtmldoc
);
nsIDOMDocument_Release
(
nsdoc
);
nsres
=
nsIDOMHTMLDocument_GetBody
(
nshtmldoc
,
&
nsbody
);
nsIDOMHTMLDocument_Release
(
nshtmldoc
);
if
(
NS_FAILED
(
nsres
)
||
!
nsbody
)
{
nsres
=
nsIDOMHTMLDocument_GetBody
(
This
->
nsdoc
,
&
nsbody
);
if
(
NS_FAILED
(
nsres
))
{
TRACE
(
"Could not get body: %08x
\n
"
,
nsres
);
return
S_OK
;
return
E_UNEXPECTED
;
}
if
(
nsbody
)
{
node
=
get_node
(
This
,
(
nsIDOMNode
*
)
nsbody
,
TRUE
);
nsIDOMHTMLElement_Release
(
nsbody
);
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
node
),
&
IID_IHTMLElement
,
(
void
**
)
p
);
}
else
{
*
p
=
NULL
;
}
TRACE
(
"*p = %p
\n
"
,
*
p
);
return
S_OK
;
...
...
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