Module: wine Branch: master Commit: e4c203a2bc4197b91588e31a629c3dea5a168559 URL: http://source.winehq.org/git/wine.git/?a=commit;h=e4c203a2bc4197b91588e31a62...
Author: Jacek Caban jacek@codeweavers.com Date: Sat Aug 22 19:37:59 2009 +0200
mshtml: Treat wyciwyg protocol as Gecko special protocol.
---
dlls/mshtml/nsio.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/mshtml/nsio.c b/dlls/mshtml/nsio.c index e09eb46..90c1683 100644 --- a/dlls/mshtml/nsio.c +++ b/dlls/mshtml/nsio.c @@ -2186,15 +2186,15 @@ static nsresult NSAPI nsIOService_GetProtocolFlags(nsIIOService *iface, const ch
static BOOL is_gecko_special_uri(const char *spec) { - static const char chromeW[] = "chrome:"; - static const char jarW[] = "jar:"; - static const char resourceW[] = "resource:"; - static const char javascriptW[] = "javascript:"; - - return !strncasecmp(spec, chromeW, sizeof(chromeW)-1) - || !strncasecmp(spec, resourceW, sizeof(resourceW)-1) - || !strncasecmp(spec, jarW, sizeof(jarW)-1) - || !strncasecmp(spec, javascriptW, sizeof(javascriptW)-1); + static const char *special_schemes[] = {"chrome:", "jar:", "resource:", "javascript:", "wyciwyg:"}; + int i; + + for(i=0; i < sizeof(special_schemes)/sizeof(*special_schemes); i++) { + if(!strncasecmp(spec, special_schemes[i], strlen(special_schemes[i]))) + return TRUE; + } + + return FALSE; }
static nsresult NSAPI nsIOService_NewURI(nsIIOService *iface, const nsACString *aSpec,