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
c3ea7272
Commit
c3ea7272
authored
Oct 09, 2008
by
Jacek Caban
Committed by
Alexandre Julliard
Oct 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use stored nsdoc in IHTMOptionElement::put_text.
parent
4283f5ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
10 deletions
+7
-10
htmloption.c
dlls/mshtml/htmloption.c
+7
-10
No files found.
dlls/mshtml/htmloption.c
View file @
c3ea7272
...
...
@@ -180,7 +180,6 @@ static HRESULT WINAPI HTMLOptionElement_get_index(IHTMLOptionElement *iface, LON
static
HRESULT
WINAPI
HTMLOptionElement_put_text
(
IHTMLOptionElement
*
iface
,
BSTR
v
)
{
HTMLOptionElement
*
This
=
HTMLOPTION_THIS
(
iface
);
nsIDOMDocument
*
nsdoc
;
nsIDOMText
*
text_node
;
nsAString
text_str
;
nsIDOMNode
*
tmp
;
...
...
@@ -188,6 +187,11 @@ static HRESULT WINAPI HTMLOptionElement_put_text(IHTMLOptionElement *iface, BSTR
TRACE
(
"(%p)->(%s)
\n
"
,
This
,
debugstr_w
(
v
));
if
(
!
This
->
element
.
node
.
doc
->
nsdoc
)
{
WARN
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
}
while
(
1
)
{
nsIDOMNode
*
child
;
...
...
@@ -205,19 +209,12 @@ static HRESULT WINAPI HTMLOptionElement_put_text(IHTMLOptionElement *iface, BSTR
}
}
nsres
=
nsIWebNavigation_GetDocument
(
This
->
element
.
node
.
doc
->
nscontainer
->
navigation
,
&
nsdoc
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetDocument failed: %08x
\n
"
,
nsres
);
return
S_OK
;
}
nsAString_Init
(
&
text_str
,
v
);
nsres
=
nsIDOMDocument_CreateTextNode
(
nsdoc
,
&
text_str
,
&
text_node
);
nsIDOMDocument_Release
(
nsdoc
);
nsres
=
nsIDOMHTMLDocument_CreateTextNode
(
This
->
element
.
node
.
doc
->
nsdoc
,
&
text_str
,
&
text_node
);
nsAString_Finish
(
&
text_str
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"CreateTextNode failed: %08x
\n
"
,
nsres
);
return
S_OK
;
return
E_FAIL
;
}
nsres
=
nsIDOMHTMLOptionElement_AppendChild
(
This
->
nsoption
,
(
nsIDOMNode
*
)
text_node
,
&
tmp
);
...
...
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