Vitaliy Margolen wrote:
Jacek Caban wrote:
Hi all,
The last release of Wine Gecko caused a few regressions.
Yes it did and some are still not fixed. Flash does not work anymore on all the pages. This really needs to be fixed.
I've been looking on it for a while and I didn't find the fix. I'm attaching a hack that might help if someone is interested in working on it.
Jacek
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index 7c402b2..9d3b1c6 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -2165,10 +2165,26 @@ static nsresult NSAPI nsIOService_NewChannelFromURI(nsIIOService *iface, nsIURI nsIChannel *channel = NULL; nsChannel *ret; nsIWineURI *wine_uri; + nsACString schema_str; + const char *schema; + BOOL b; nsresult nsres;
TRACE("(%p %p)\n", aURI, _retval);
+ /* + * Our wrapped nsChannel object doesn't work for Flash, so we use URI heuristic + * and return necko object for *.swf channels. + */ + nsACString_Init(&schema_str, NULL); + nsIURI_GetScheme(aURI, &schema_str); + nsACString_GetData(&schema_str, &schema); + b = !strstr(schema, ".swf"); + nsACString_Finish(&schema_str); + + if(b) + return nsIIOService_NewChannelFromURI(nsio, aURI, _retval); + nsres = nsIIOService_NewChannelFromURI(nsio, aURI, &channel); if(NS_FAILED(nsres) && nsres != NS_ERROR_UNKNOWN_PROTOCOL) { WARN("NewChannelFromURI failed: %08x\n", nsres);