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
5068249c
Commit
5068249c
authored
Aug 18, 2010
by
Jacek Caban
Committed by
Alexandre Julliard
Aug 18, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Treat file URLs pointing to Gecko installation directory as special URIs.
parent
eec86f64
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
0 deletions
+38
-0
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
nsembed.c
dlls/mshtml/nsembed.c
+30
-0
nsio.c
dlls/mshtml/nsio.c
+7
-0
No files found.
dlls/mshtml/mshtml_private.h
View file @
5068249c
...
...
@@ -726,6 +726,7 @@ void register_nsservice(nsIComponentRegistrar*,nsIServiceManager*);
void
init_nsio
(
nsIComponentManager
*
,
nsIComponentRegistrar
*
);
void
release_nsio
(
void
);
BOOL
install_wine_gecko
(
BOOL
);
BOOL
is_gecko_path
(
const
char
*
);
HRESULT
nsuri_to_url
(
LPCWSTR
,
BOOL
,
BSTR
*
);
HRESULT
create_doc_uri
(
HTMLWindow
*
,
WCHAR
*
,
nsWineURI
**
);
...
...
dlls/mshtml/nsembed.c
View file @
5068249c
...
...
@@ -74,6 +74,8 @@ static nsIMemory *nsmem = NULL;
static
const
WCHAR
wszNsContainer
[]
=
{
'N'
,
's'
,
'C'
,
'o'
,
'n'
,
't'
,
'a'
,
'i'
,
'n'
,
'e'
,
'r'
,
0
};
static
ATOM
nscontainer_class
;
static
WCHAR
gecko_path
[
MAX_PATH
];
static
unsigned
gecko_path_len
;
static
LRESULT
WINAPI
nsembed_proc
(
HWND
hwnd
,
UINT
msg
,
WPARAM
wParam
,
LPARAM
lParam
)
{
...
...
@@ -411,6 +413,7 @@ static BOOL init_xpcom(const PRUnichar *gre_path)
nsIComponentRegistrar
*
registrar
=
NULL
;
nsAString
path
;
nsIFile
*
gre_dir
;
WCHAR
*
ptr
;
nsAString_InitDepend
(
&
path
,
gre_path
);
nsres
=
NS_NewLocalFile
(
&
path
,
FALSE
,
&
gre_dir
);
...
...
@@ -428,6 +431,13 @@ static BOOL init_xpcom(const PRUnichar *gre_path)
return
FALSE
;
}
strcpyW
(
gecko_path
,
gre_path
);
for
(
ptr
=
gecko_path
;
*
ptr
;
ptr
++
)
{
if
(
*
ptr
==
'\\'
)
*
ptr
=
'/'
;
}
gecko_path_len
=
ptr
-
gecko_path
;
nsres
=
nsIServiceManager_QueryInterface
(
pServMgr
,
&
IID_nsIComponentManager
,
(
void
**
)
&
pCompMgr
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Could not get nsIComponentManager: %08x
\n
"
,
nsres
);
...
...
@@ -788,6 +798,26 @@ void close_gecko(void)
/* if (hXPCOM) FreeLibrary(hXPCOM); */
}
BOOL
is_gecko_path
(
const
char
*
path
)
{
WCHAR
*
buf
,
*
ptr
;
BOOL
ret
;
buf
=
heap_strdupAtoW
(
path
);
if
(
strlenW
(
buf
)
<
gecko_path_len
)
return
FALSE
;
buf
[
gecko_path_len
]
=
0
;
for
(
ptr
=
buf
;
*
ptr
;
ptr
++
)
{
if
(
*
ptr
==
'\\'
)
*
ptr
=
'/'
;
}
ret
=
!
strcmpiW
(
buf
,
gecko_path
);
heap_free
(
buf
);
return
ret
;
}
/**********************************************************
* nsIWebBrowserChrome interface
*/
...
...
dlls/mshtml/nsio.c
View file @
5068249c
...
...
@@ -2566,6 +2566,13 @@ static BOOL is_gecko_special_uri(const char *spec)
return
TRUE
;
}
if
(
!
strncasecmp
(
spec
,
"file:"
,
5
))
{
const
char
*
ptr
=
spec
+
5
;
while
(
*
ptr
==
'/'
)
ptr
++
;
return
is_gecko_path
(
ptr
);
}
return
FALSE
;
}
...
...
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