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
427610da
Commit
427610da
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 get_doc_string.
parent
e90386b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
16 deletions
+7
-16
persist.c
dlls/mshtml/persist.c
+7
-16
No files found.
dlls/mshtml/persist.c
View file @
427610da
...
...
@@ -335,25 +335,17 @@ static HRESULT set_moniker(HTMLDocument *This, IMoniker *mon, IBindCtx *pibc, BO
static
HRESULT
get_doc_string
(
HTMLDocument
*
This
,
char
**
str
,
DWORD
*
len
)
{
nsIDOMDocument
*
nsdoc
;
nsIDOMNode
*
nsnode
;
LPCWSTR
strw
;
nsAString
nsstr
;
nsresult
nsres
;
if
(
!
This
->
nscontainer
)
{
WARN
(
"no nscontainer, returning NULL
\n
"
);
return
S_OK
;
}
nsres
=
nsIWebNavigation_GetDocument
(
This
->
nscontainer
->
navigation
,
&
nsdoc
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"GetDocument failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
if
(
!
This
->
nsdoc
)
{
WARN
(
"NULL nsdoc
\n
"
);
return
E_UNEXPECTED
;
}
nsres
=
nsIDOMDocument_QueryInterface
(
nsdoc
,
&
IID_nsIDOMNode
,
(
void
**
)
&
nsnode
);
nsIDOMDocument_Release
(
nsdoc
);
nsres
=
nsIDOMHTMLDocument_QueryInterface
(
This
->
nsdoc
,
&
IID_nsIDOMNode
,
(
void
**
)
&
nsnode
);
if
(
NS_FAILED
(
nsres
))
{
ERR
(
"Could not get nsIDOMNode failed: %08x
\n
"
,
nsres
);
return
E_FAIL
;
...
...
@@ -601,12 +593,11 @@ static HRESULT WINAPI PersistFile_Save(IPersistFile *iface, LPCOLESTR pszFileNam
}
hres
=
get_doc_string
(
This
,
&
str
,
&
len
);
if
(
FAIL
ED
(
hres
))
return
hres
;
if
(
SUCCEED
ED
(
hres
))
WriteFile
(
file
,
str
,
len
,
&
written
,
NULL
)
;
WriteFile
(
file
,
str
,
len
,
&
written
,
NULL
);
CloseHandle
(
file
);
return
S_OK
;
return
hres
;
}
static
HRESULT
WINAPI
PersistFile_SaveCompleted
(
IPersistFile
*
iface
,
LPCOLESTR
pszFileName
)
...
...
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