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
3e422b9e
Commit
3e422b9e
authored
Mar 29, 2011
by
Jacek Caban
Committed by
Alexandre Julliard
Mar 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Use zone mapping instead of hardcoded protocols in use_gecko_script.
parent
739ff120
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
persist.c
dlls/mshtml/persist.c
+14
-7
No files found.
dlls/mshtml/persist.c
View file @
3e422b9e
...
...
@@ -48,15 +48,22 @@ typedef struct {
LPOLESTR
url
;
}
download_proc_task_t
;
static
BOOL
use_gecko_script
(
LPCWSTR
url
)
static
BOOL
use_gecko_script
(
HTMLWindow
*
window
)
{
static
const
WCHAR
fileW
[]
=
{
'f'
,
'i'
,
'l'
,
'e'
,
':'
};
DWORD
zone
;
HRESULT
hres
;
static
const
WCHAR
aboutW
[]
=
{
'a'
,
'b'
,
'o'
,
'u'
,
't'
,
':'
};
static
const
WCHAR
resW
[]
=
{
'r'
,
'e'
,
's'
,
':'
};
return
strncmpiW
(
fileW
,
url
,
sizeof
(
fileW
)
/
sizeof
(
WCHAR
))
&&
strncmpiW
(
aboutW
,
url
,
sizeof
(
aboutW
)
/
sizeof
(
WCHAR
))
&&
strncmpiW
(
resW
,
url
,
sizeof
(
resW
)
/
sizeof
(
WCHAR
));
hres
=
IInternetSecurityManager_MapUrlToZone
(
window
->
secmgr
,
window
->
url
,
&
zone
,
0
);
if
(
FAILED
(
hres
))
{
WARN
(
"Could not map %s to zone: %08x
\n
"
,
debugstr_w
(
window
->
url
),
hres
);
return
TRUE
;
}
TRACE
(
"zone %d
\n
"
,
zone
);
return
zone
!=
URLZONE_LOCAL_MACHINE
&&
zone
!=
URLZONE_TRUSTED
&&
strncmpiW
(
aboutW
,
window
->
url
,
sizeof
(
aboutW
)
/
sizeof
(
WCHAR
));
}
void
set_current_mon
(
HTMLWindow
*
This
,
IMoniker
*
mon
)
...
...
@@ -83,7 +90,7 @@ void set_current_mon(HTMLWindow *This, IMoniker *mon)
if
(
FAILED
(
hres
))
WARN
(
"GetDisplayName failed: %08x
\n
"
,
hres
);
set_script_mode
(
This
,
use_gecko_script
(
This
->
url
)
?
SCRIPTMODE_GECKO
:
SCRIPTMODE_ACTIVESCRIPT
);
set_script_mode
(
This
,
use_gecko_script
(
This
)
?
SCRIPTMODE_GECKO
:
SCRIPTMODE_ACTIVESCRIPT
);
}
static
void
set_progress_proc
(
task_t
*
_task
)
...
...
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