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
f1ff6b09
Commit
f1ff6b09
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 IHTMLDocument3::getElementById.
parent
08257ace
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
htmldoc3.c
dlls/mshtml/htmldoc3.c
+17
-18
No files found.
dlls/mshtml/htmldoc3.c
View file @
f1ff6b09
...
...
@@ -421,37 +421,36 @@ static HRESULT WINAPI HTMLDocument3_getElementById(IHTMLDocument3 *iface, BSTR v
IHTMLElement
**
pel
)
{
HTMLDocument
*
This
=
HTMLDOC3_THIS
(
iface
);
nsIDOMDocument
*
nsdoc
=
NULL
;
nsIDOMElement
*
nselem
=
NULL
;
nsIDOMElement
*
nselem
;
HTMLDOMNode
*
node
;
nsAString
id_str
;
nsresult
nsres
;
TRACE
(
"(%p)->(%s %p)
\n
"
,
This
,
debugstr_w
(
v
),
pel
);
*
pel
=
NULL
;
if
(
!
This
->
nscontainer
)
return
S_OK
;
nsres
=
nsIWebNavigation_GetDocument
(
This
->
nscontainer
->
navigation
,
&
nsdoc
);
if
(
NS_FAILED
(
nsres
)
||
!
nsdoc
)
return
S_OK
;
if
(
!
This
->
nsdoc
)
{
WARN
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
}
nsAString_Init
(
&
id_str
,
v
);
nsIDOMDocument_GetElementById
(
nsdoc
,
&
id_str
,
&
nselem
);
nsIDOMDocument_Release
(
nsdoc
);
nsres
=
nsIDOMHTMLDocument_GetElementById
(
This
->
nsdoc
,
&
id_str
,
&
nselem
);
nsAString_Finish
(
&
id_str
);
if
(
FAILED
(
nsres
))
{
ERR
(
"GetElementById failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
}
if
(
nselem
)
{
node
=
get_node
(
This
,
(
nsIDOMNode
*
)
nselem
,
TRUE
);
nsIDOMElement_Release
(
nselem
);
if
(
!
nselem
)
{
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
node
),
&
IID_IHTMLElement
,
(
void
**
)
pel
);
}
else
{
*
pel
=
NULL
;
return
S_OK
;
}
node
=
get_node
(
This
,
(
nsIDOMNode
*
)
nselem
,
TRUE
);
nsIDOMElement_Release
(
nselem
);
return
IHTMLDOMNode_QueryInterface
(
HTMLDOMNODE
(
node
),
&
IID_IHTMLElement
,
(
void
**
)
pel
);
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