зеркало из https://github.com/mozilla/gecko-dev.git
including nsBrowserInstance impl. disabling bad cert dialogs on windows. making the win32 build work. adding code that will notify registered observers when during a network load. hiding the SIP button. Workaround SSR / Site SSR confusion.
This commit is contained in:
Родитель
d5667000c4
Коммит
4415b1428d
|
@ -54,6 +54,8 @@ PROGRAM = minimo$(BIN_SUFFIX)
|
|||
MODULE = minimo
|
||||
|
||||
REQUIRES = xpcom \
|
||||
browser \
|
||||
history \
|
||||
appshell \
|
||||
string \
|
||||
embed_base \
|
||||
|
@ -89,7 +91,7 @@ CPPSRCS = Minimo.cpp \
|
|||
|
||||
# this should move into the toolkit!
|
||||
LOCAL_INCLUDES = -I$(srcdir) -I$(topsrcdir)/xpfe/browser/src/
|
||||
CPPSRCS += nsBrowserStatusFilter.cpp
|
||||
CPPSRCS += nsBrowserStatusFilter.cpp nsBrowserInstance.cpp
|
||||
|
||||
ifdef WINCE
|
||||
RCINCLUDE = wince/SplashScreen.rc
|
||||
|
@ -156,9 +158,10 @@ endif
|
|||
|
||||
export::
|
||||
$(NSINSTALL) $(topsrcdir)/xpfe/browser/src/nsBrowserStatusFilter.cpp .
|
||||
$(NSINSTALL) $(topsrcdir)/xpfe/browser/src/nsBrowserInstance.cpp .
|
||||
|
||||
|
||||
GARBAGE += nsBrowserStatusFilter.cpp
|
||||
GARBAGE += nsBrowserStatusFilter.cpp nsBrowserInstance.cpp
|
||||
|
||||
ifdef WINCE
|
||||
package::
|
||||
|
|
|
@ -249,6 +249,7 @@ nsFullScreen::GetChromeItems(nsISimpleEnumerator **_retval)
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
#ifndef WINCE
|
||||
|
||||
class nsBadCertListener : public nsIBadCertListener
|
||||
{
|
||||
|
@ -387,6 +388,7 @@ nsBadCertListener::NotifyCrlNextupdate(nsIInterfaceRequestor *socketInfo, const
|
|||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
nsresult StartupProfile()
|
||||
{
|
||||
|
@ -442,9 +444,13 @@ void DoPreferences()
|
|||
}
|
||||
|
||||
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserInstance)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBrowserStatusFilter)
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsFullScreen)
|
||||
|
||||
#ifndef WINCE
|
||||
NS_GENERIC_FACTORY_CONSTRUCTOR(nsBadCertListener)
|
||||
#endif
|
||||
|
||||
static const nsModuleComponentInfo defaultAppComps[] = {
|
||||
{
|
||||
|
@ -454,6 +460,12 @@ static const nsModuleComponentInfo defaultAppComps[] = {
|
|||
nsBrowserStatusFilterConstructor
|
||||
},
|
||||
|
||||
{ "nsBrowserInstance",
|
||||
NS_BROWSERINSTANCE_CID,
|
||||
NS_BROWSERINSTANCE_CONTRACTID,
|
||||
nsBrowserInstanceConstructor
|
||||
},
|
||||
|
||||
{
|
||||
"FullScreen",
|
||||
NS_FULLSCREEN_CID,
|
||||
|
@ -461,12 +473,14 @@ static const nsModuleComponentInfo defaultAppComps[] = {
|
|||
nsFullScreenConstructor
|
||||
},
|
||||
|
||||
#ifndef WINCE
|
||||
{
|
||||
"Bad Cert Dialogs",
|
||||
NS_BADCERTLISTENER_CID,
|
||||
NS_BADCERTLISTENER_CONTRACTID,
|
||||
nsBadCertListenerConstructor
|
||||
},
|
||||
#endif
|
||||
};
|
||||
|
||||
void OverrideComponents()
|
||||
|
|
|
@ -97,7 +97,9 @@ void GetScreenSize(unsigned long* x, unsigned long* y);
|
|||
|
||||
void WriteConsoleLog();
|
||||
|
||||
#include "nsIBrowserInstance.h"
|
||||
|
||||
#include "nsBrowserStatusFilter.h"
|
||||
#include "nsBrowserInstance.h"
|
||||
|
||||
#endif // MINIMO_PRIVATE_H
|
||||
|
|
|
@ -9,4 +9,4 @@ END
|
|||
|
||||
IDB_BITMAP1 BITMAP DISCARDABLE "splashscreen.bmp"
|
||||
|
||||
HI_RES_AWARE CEUX {1} // To turn off the emulation layer
|
||||
// HI_RES_AWARE CEUX {1} // To turn off the emulation layer
|
||||
|
|
|
@ -16,15 +16,17 @@ embedcomponents
|
|||
webbrwsr
|
||||
texteditor
|
||||
txmgr
|
||||
tkautoc
|
||||
appshell
|
||||
chrome
|
||||
mork
|
||||
tkitcmps
|
||||
xmlextras
|
||||
transformiix
|
||||
websrvcs
|
||||
gkplugin
|
||||
softkey
|
||||
phone
|
||||
snav
|
||||
ssr
|
||||
devicesupport
|
||||
cookie
|
||||
perms
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
nspr4_s
|
||||
plc4_s
|
||||
plds4_s
|
||||
js3250
|
||||
ucvutil_s
|
||||
unicharutil_s
|
||||
gfxshared_s
|
||||
gkgfx
|
||||
xpcom_core
|
||||
xpcomglue
|
||||
embed_base_s
|
||||
profdirserviceprovider_s
|
||||
|
|
|
@ -19,12 +19,14 @@ nsTransactionManagerModule
|
|||
appshell
|
||||
nsChromeModule
|
||||
nsMorkModule
|
||||
tkAutoCompleteModule
|
||||
nsToolkitCompsModule
|
||||
nsXMLExtrasModule
|
||||
TransformiixModule
|
||||
nsWebServicesModule
|
||||
nsPluginModule
|
||||
SoftKeyBoardModule
|
||||
nsPhoneSupportModule
|
||||
SpatialNavigationModule
|
||||
SSRModule
|
||||
DeviceSupportModule
|
||||
nsCookieModule
|
||||
nsPermissionsModule
|
||||
|
|
|
@ -103,6 +103,15 @@ nsBrowserStatusHandler.prototype =
|
|||
|
||||
if (aStateFlags & nsIWebProgressListener.STATE_START)
|
||||
{
|
||||
// Notify anyone interested that we are loading.
|
||||
try {
|
||||
var os = Components.classes["@mozilla.org/observer-service;1"]
|
||||
.getService(Components.interfaces.nsIObserverService);
|
||||
var host = aRequest.QueryInterface(Components.interfaces.nsIChannel).URI.host;
|
||||
os.notifyObservers(null, "loading-domain", host);
|
||||
}
|
||||
catch(e) {}
|
||||
|
||||
document.getElementById("statusbar").hidden=false;
|
||||
|
||||
if(aRequest && aWebProgress.DOMWindow == content) {
|
||||
|
|
|
@ -322,6 +322,10 @@
|
|||
<menuitem id="command_go"
|
||||
command="cmd_BrowserGo"
|
||||
label="&goCmd.label;" />
|
||||
|
||||
<menuitem id="command_stop"
|
||||
command="cmd_BrowserStop"
|
||||
label="&stopCmd.label;" />
|
||||
|
||||
</menupopup>
|
||||
|
||||
|
|
|
@ -92,13 +92,6 @@
|
|||
onclick="syncPref(this)"
|
||||
/>
|
||||
|
||||
<checkbox id="sitessr"
|
||||
onfocus="prefFocus('ssrimage-box')" onblur="prefBlur('ssrimage-box')"
|
||||
tabindex="13"
|
||||
label="&usesiteSSRCheckbox.label;"
|
||||
preference="ssr.site.enabled" preftype="bool"
|
||||
onclick="syncPref(this)"
|
||||
/>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
</vbox>
|
||||
|
|
|
@ -610,13 +610,18 @@ nsSoftKeyBoard::OpenSIP()
|
|||
if (hWndSIP)
|
||||
::ShowWindow( hWndSIP, SW_SHOW);
|
||||
|
||||
hWndSIP = ::FindWindow( _T( "MS_SIPBUTTON" ), NULL );
|
||||
if (hWndSIP)
|
||||
::ShowWindow( hWndSIP, SW_SHOW);
|
||||
|
||||
SHSipPreference(NULL, SIP_UP);
|
||||
|
||||
SHFullScreen(GetForegroundWindow(), SHFS_SHOWSIPBUTTON);
|
||||
// SHFullScreen(GetForegroundWindow(), SHFS_SHOWSIPBUTTON);
|
||||
|
||||
// keep the sip button hidden!
|
||||
|
||||
hWndSIP = FindWindow( _T( "MS_SIPBUTTON" ), NULL );
|
||||
if (hWndSIP)
|
||||
{
|
||||
ShowWindow( hWndSIP, SW_HIDE );
|
||||
SetWindowPos(hWndSIP, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -44,6 +44,7 @@
|
|||
#include "nsIPrefService.h"
|
||||
#include "nsIPrefBranch2.h"
|
||||
#include "nsICategoryManager.h"
|
||||
#include "nsIObserverService.h"
|
||||
|
||||
#include "string.h"
|
||||
#include "nsNetUtil.h"
|
||||
|
@ -68,11 +69,10 @@ public:
|
|||
nsCOMPtr<nsIStyleSheetService> m_sss;
|
||||
|
||||
PRBool mUsingSSR;
|
||||
PRBool mUsingSiteSSR;
|
||||
};
|
||||
|
||||
nsSSRSupport::nsSSRSupport()
|
||||
: mUsingSiteSSR(PR_FALSE), mUsingSSR(PR_FALSE)
|
||||
: mUsingSSR(PR_FALSE)
|
||||
{
|
||||
m_sss = do_GetService("@mozilla.org/content/style-sheet-service;1");
|
||||
}
|
||||
|
@ -128,13 +128,13 @@ nsSSRSupport::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar
|
|||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
prefBranch->AddObserver("ssr.", this, PR_FALSE);
|
||||
prefBranch->GetBoolPref("ssr.enabled", &mUsingSSR);
|
||||
|
||||
PRBool enabled;
|
||||
prefBranch->GetBoolPref("ssr.enabled", &enabled);
|
||||
SetSSREnabled(enabled);
|
||||
|
||||
prefBranch->GetBoolPref("ssr.sites.enabled", &enabled);
|
||||
SetSiteSSREnabled(enabled);
|
||||
nsCOMPtr<nsIObserverService> observerService = do_GetService("@mozilla.org/observer-service;1", &rv);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
observerService->AddObserver(this, "loading-domain", PR_FALSE);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -148,21 +148,33 @@ nsSSRSupport::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar
|
|||
|
||||
if (!strcmp(pref, "ssr.enabled"))
|
||||
{
|
||||
PRBool enabled;
|
||||
prefBranch->GetBoolPref(pref, &enabled);
|
||||
|
||||
SetSSREnabled(enabled);
|
||||
prefBranch->GetBoolPref(pref, &mUsingSSR);
|
||||
return NS_OK;
|
||||
}
|
||||
}
|
||||
|
||||
if (!strcmp(pref, "ssr.site.enabled"))
|
||||
if (!strcmp(aTopic, "loading-domain"))
|
||||
{
|
||||
if (!mUsingSSR)
|
||||
return NS_OK;
|
||||
|
||||
const char* domain = NS_ConvertUCS2toUTF8(aData).get();
|
||||
|
||||
if (!strcmp(domain, "maps.google.com") ||
|
||||
!strcmp(domain, "slashdot.org") ||
|
||||
!strcmp(domain, "www.digg.com") ||
|
||||
!strcmp(domain, "weblogs.mozillazine.org") ||
|
||||
!strcmp(domain, "forums.mozillazine.org") )
|
||||
{
|
||||
PRBool enabled;
|
||||
prefBranch->GetBoolPref(pref, &enabled);
|
||||
|
||||
SetSiteSSREnabled(enabled);
|
||||
return NS_OK;
|
||||
SetSSREnabled(PR_FALSE);
|
||||
SetSiteSSREnabled(PR_TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
SetSSREnabled(PR_TRUE);
|
||||
SetSiteSSREnabled(PR_FALSE);
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -3,6 +3,12 @@
|
|||
div#map { margin-left: 0 ! important;}
|
||||
div#panel { display: none ! important;}
|
||||
table#headertitle { display: none ! important;}
|
||||
table#titlebar { display: none ! important;}
|
||||
div#gaia { display: none ! important;}
|
||||
td.logo { display: none ! important;}
|
||||
td.tabs { display: none ! important;}
|
||||
td.helplinks { display: none ! important;}
|
||||
span.example { display: none ! important;}
|
||||
}
|
||||
|
||||
@-moz-document domain(slashdot.org)
|
||||
|
@ -51,7 +57,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
@-moz-document domain(weblogs.mozillazine.org)
|
||||
{
|
||||
div#rightcol-full
|
||||
|
|
|
@ -282,11 +282,11 @@ pref("network.http.redirection-limit", 20);
|
|||
// NOTE: support for "compress" has been disabled per bug 196406.
|
||||
pref("network.http.accept-encoding" ,"gzip,deflate");
|
||||
|
||||
pref("network.http.pipelining" , false);
|
||||
pref("network.http.pipelining" , true);
|
||||
pref("network.http.proxy.pipelining", false);
|
||||
|
||||
// Max number of requests in the pipeline
|
||||
pref("network.http.pipelining.maxrequests" , 4);
|
||||
pref("network.http.pipelining.maxrequests" , 12);
|
||||
|
||||
// </http>
|
||||
|
||||
|
@ -640,7 +640,6 @@ pref("network.autodial-helper.enabled", true);
|
|||
pref("config.wince.overrideHWKeys", false);
|
||||
|
||||
pref("ssr.enabled", true);
|
||||
pref("ssr.site.enabled", true);
|
||||
|
||||
pref("skey.enabled", true);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче