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
b17d1393
Commit
b17d1393
authored
Sep 19, 2013
by
Jacek Caban
Committed by
Alexandre Julliard
Sep 19, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mshtml: Don't pass navigation to Gecko for MIME types that it doesn't support.
parent
4db1b008
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
64 additions
and
1 deletion
+64
-1
mshtml_private.h
dlls/mshtml/mshtml_private.h
+1
-0
navigate.c
dlls/mshtml/navigate.c
+28
-1
nsembed.c
dlls/mshtml/nsembed.c
+19
-0
nsiface.idl
dlls/mshtml/nsiface.idl
+16
-0
No files found.
dlls/mshtml/mshtml_private.h
View file @
b17d1393
...
...
@@ -832,6 +832,7 @@ void get_editor_controller(NSContainer*) DECLSPEC_HIDDEN;
nsresult
get_nsinterface
(
nsISupports
*
,
REFIID
,
void
**
)
DECLSPEC_HIDDEN
;
nsIWritableVariant
*
create_nsvariant
(
void
)
DECLSPEC_HIDDEN
;
nsresult
create_nsfile
(
const
PRUnichar
*
,
nsIFile
**
)
DECLSPEC_HIDDEN
;
char
*
get_nscategory_entry
(
const
char
*
,
const
char
*
)
DECLSPEC_HIDDEN
;
HRESULT
create_pending_window
(
HTMLOuterWindow
*
,
nsChannelBSC
*
)
DECLSPEC_HIDDEN
;
HRESULT
start_binding
(
HTMLInnerWindow
*
,
BSCallback
*
,
IBindCtx
*
)
DECLSPEC_HIDDEN
;
...
...
dlls/mshtml/navigate.c
View file @
b17d1393
...
...
@@ -1161,6 +1161,9 @@ static HRESULT read_stream_data(nsChannelBSC *This, IStream *stream)
}
}
if
(
!
This
->
nschannel
)
return
S_OK
;
if
(
!
This
->
nslistener
)
{
BYTE
buf
[
1024
];
...
...
@@ -1544,7 +1547,7 @@ static HRESULT nsChannelBSC_stop_binding(BSCallback *bsc, HRESULT result)
if
(
result
!=
E_ABORT
)
{
if
(
FAILED
(
result
))
handle_navigation_error
(
This
,
result
);
else
if
(
This
->
is_doc_channel
)
{
else
if
(
This
->
is_doc_channel
&&
This
->
nschannel
)
{
result
=
async_stop_request
(
This
);
if
(
SUCCEEDED
(
result
))
return
S_OK
;
...
...
@@ -1604,12 +1607,36 @@ static HRESULT handle_redirect(nsChannelBSC *This, const WCHAR *new_url)
return
hres
;
}
static
BOOL
is_supported_doc_mime
(
const
WCHAR
*
mime
)
{
char
*
nscat
,
*
mimea
;
BOOL
ret
;
mimea
=
heap_strdupWtoA
(
mime
);
if
(
!
mimea
)
return
FALSE
;
nscat
=
get_nscategory_entry
(
"Gecko-Content-Viewers"
,
mimea
);
ret
=
nscat
!=
NULL
&&
!
strcmp
(
nscat
,
"@mozilla.org/content/document-loader-factory;1"
);
heap_free
(
mimea
);
nsfree
(
nscat
);
return
ret
;
}
static
HRESULT
nsChannelBSC_on_progress
(
BSCallback
*
bsc
,
ULONG
status_code
,
LPCWSTR
status_text
)
{
nsChannelBSC
*
This
=
nsChannelBSC_from_BSCallback
(
bsc
);
switch
(
status_code
)
{
case
BINDSTATUS_MIMETYPEAVAILABLE
:
if
(
This
->
is_doc_channel
&&
!
is_supported_doc_mime
(
status_text
))
{
FIXME
(
"External MIME: %s
\n
"
,
debugstr_w
(
status_text
));
This
->
nschannel
=
NULL
;
}
if
(
!
This
->
nschannel
)
return
S_OK
;
...
...
dlls/mshtml/nsembed.c
View file @
b17d1393
...
...
@@ -48,6 +48,7 @@ WINE_DECLARE_DEBUG_CHANNEL(gecko);
#define NS_EDITORCONTROLLER_CONTRACTID "@mozilla.org/editor/editorcontroller;1"
#define NS_PREFERENCES_CONTRACTID "@mozilla.org/preferences;1"
#define NS_VARIANT_CONTRACTID "@mozilla.org/variant;1"
#define NS_CATEGORYMANAGER_CONTRACTID "@mozilla.org/categorymanager;1"
#define PR_UINT32_MAX 0xffffffff
...
...
@@ -73,6 +74,7 @@ static HINSTANCE xul_handle = NULL;
static
nsIServiceManager
*
pServMgr
=
NULL
;
static
nsIComponentManager
*
pCompMgr
=
NULL
;
static
nsICategoryManager
*
cat_mgr
;
static
nsIMemory
*
nsmem
=
NULL
;
static
nsIFile
*
profile_directory
,
*
plugin_directory
;
...
...
@@ -725,6 +727,11 @@ static BOOL init_xpcom(const PRUnichar *gre_path)
if
(
NS_FAILED
(
nsres
))
ERR
(
"Could not get nsIMemory: %08x
\n
"
,
nsres
);
nsres
=
nsIServiceManager_GetServiceByContractID
(
pServMgr
,
NS_CATEGORYMANAGER_CONTRACTID
,
&
IID_nsICategoryManager
,
(
void
**
)
&
cat_mgr
);
if
(
NS_FAILED
(
nsres
))
ERR
(
"Could not get category manager service: %08x
\n
"
,
nsres
);
if
(
registrar
)
{
register_nsservice
(
registrar
,
pServMgr
);
nsIComponentRegistrar_Release
(
registrar
);
...
...
@@ -901,6 +908,15 @@ nsIWritableVariant *create_nsvariant(void)
return
ret
;
}
char
*
get_nscategory_entry
(
const
char
*
category
,
const
char
*
entry
)
{
char
*
ret
=
NULL
;
nsresult
nsres
;
nsres
=
nsICategoryManager_GetCategoryEntry
(
cat_mgr
,
category
,
entry
,
&
ret
);
return
NS_SUCCEEDED
(
nsres
)
?
ret
:
NULL
;
}
nsresult
get_nsinterface
(
nsISupports
*
iface
,
REFIID
riid
,
void
**
ppv
)
{
nsIInterfaceRequestor
*
iface_req
;
...
...
@@ -1093,6 +1109,9 @@ void close_gecko(void)
if
(
pServMgr
)
nsIServiceManager_Release
(
pServMgr
);
if
(
cat_mgr
)
nsICategoryManager_Release
(
cat_mgr
);
if
(
nsmem
)
nsIMemory_Release
(
nsmem
);
...
...
dlls/mshtml/nsiface.idl
View file @
b17d1393
...
...
@@ -3263,6 +3263,22 @@ interface nsICommandManager : nsISupports
[
object
,
uuid
(
3275b2
cd
-
af6d
-
429
a
-
80
d7
-
f0c5120342ac
),
local
]
interface
nsICategoryManager
:
nsISupports
{
nsresult
GetCategoryEntry
(
const
char
*
aCategory
,
const
char
*
aEntry
,
char
**
_retval
)
;
nsresult
AddCategoryEntry
(
const
char
*
aCategory
,
const
char
*
aEntry
,
const
char
*
aValue
,
bool
aPersist
,
bool
aReplace
,
char
**
_retval
)
;
nsresult
DeleteCategoryEntry
(
const
char
*
aCategory
,
const
char
*
aEntry
,
bool
aPersist
)
;
nsresult
DeleteCategory
(
const
char
*
aCategory
)
;
nsresult
EnumerateCategory
(
const
char
*
aCategory
,
nsISimpleEnumerator
**
_retval
)
;
nsresult
EnumerateCategories
(
nsISimpleEnumerator
**
_retval
)
;
}
[
object
,
uuid
(
47b82b60
-
a36f
-
4167
-
8072
-
6
f421151ed50
),
local
]
...
...
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