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
bc701d59
Commit
bc701d59
authored
Nov 15, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Nov 15, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Split setting window URI from set_current_mon.
parent
f86abedb
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
19 deletions
+32
-19
persist.c
dlls/mshtml/persist.c
+32
-19
No files found.
dlls/mshtml/persist.c
View file @
bc701d59
...
...
@@ -70,9 +70,31 @@ static BOOL use_gecko_script(HTMLWindow *window)
return
FAILED
(
hres
)
||
scheme
!=
URL_SCHEME_ABOUT
;
}
static
void
set_current_uri
(
HTMLWindow
*
window
,
IUri
*
uri
)
{
if
(
window
->
uri
)
{
IUri_Release
(
window
->
uri
);
window
->
uri
=
NULL
;
}
if
(
window
->
url
)
{
SysFreeString
(
window
->
url
);
window
->
url
=
NULL
;
}
if
(
!
uri
)
return
;
IUri_AddRef
(
uri
);
window
->
uri
=
uri
;
IUri_GetDisplayUri
(
uri
,
&
window
->
url
);
}
void
set_current_mon
(
HTMLWindow
*
This
,
IMoniker
*
mon
)
{
IUriContainer
*
uri_container
;
IUri
*
uri
=
NULL
;
HRESULT
hres
;
if
(
This
->
mon
)
{
...
...
@@ -80,15 +102,6 @@ void set_current_mon(HTMLWindow *This, IMoniker *mon)
This
->
mon
=
NULL
;
}
if
(
This
->
uri
)
{
IUri_Release
(
This
->
uri
);
This
->
uri
=
NULL
;
}
if
(
This
->
url
)
{
SysFreeString
(
This
->
url
);
This
->
url
=
NULL
;
}
if
(
!
mon
)
return
;
...
...
@@ -98,23 +111,26 @@ void set_current_mon(HTMLWindow *This, IMoniker *mon)
hres
=
IMoniker_QueryInterface
(
mon
,
&
IID_IUriContainer
,
(
void
**
)
&
uri_container
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
IUriContainer_GetIUri
(
uri_container
,
&
This
->
uri
);
hres
=
IUriContainer_GetIUri
(
uri_container
,
&
uri
);
IUriContainer_Release
(
uri_container
);
if
(
hres
!=
S_OK
)
{
WARN
(
"GetIUri failed: %08x
\n
"
,
hres
);
This
->
uri
=
NULL
;
uri
=
NULL
;
}
}
if
(
!
This
->
uri
)
{
if
(
!
uri
)
{
WCHAR
*
url
;
hres
=
IMoniker_GetDisplayName
(
mon
,
NULL
,
NULL
,
&
url
);
if
(
SUCCEEDED
(
hres
))
{
hres
=
CreateUri
(
url
,
0
,
0
,
&
This
->
uri
);
hres
=
CreateUri
(
url
,
0
,
0
,
&
uri
);
if
(
FAILED
(
hres
))
{
WARN
(
"CrateUri failed: %08x
\n
"
,
hres
);
set_current_uri
(
This
,
NULL
);
This
->
url
=
SysAllocString
(
url
);
CoTaskMemFree
(
url
);
return
;
}
CoTaskMemFree
(
url
);
}
else
{
...
...
@@ -122,12 +138,9 @@ void set_current_mon(HTMLWindow *This, IMoniker *mon)
}
}
if
(
!
This
->
url
&&
This
->
uri
)
{
hres
=
IUri_GetDisplayUri
(
This
->
uri
,
&
This
->
url
);
if
(
FAILED
(
hres
))
WARN
(
"GetDisplayUri failed: %08x
\n
"
,
hres
);
}
set_current_uri
(
This
,
uri
);
if
(
uri
)
IUri_Release
(
uri
);
set_script_mode
(
This
,
use_gecko_script
(
This
)
?
SCRIPTMODE_GECKO
:
SCRIPTMODE_ACTIVESCRIPT
);
}
...
...
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