backing out Txul-regression-causing popup window manager. bug 167929

This commit is contained in:
danm%netscape.com 2002-09-12 01:16:59 +00:00
parent 172045ff53
commit 997fa879e8
9 changed files with 41 additions and 40 deletions

View File

@ -2842,24 +2842,36 @@ GlobalWindowImpl::CheckForAbusePoint ()
if (!prefs)
return PR_FALSE;
PRInt32 clickDelay = 0;
prefs->GetIntPref("dom.disable_open_click_delay", &clickDelay);
if (clickDelay) {
PRTime now, ll_delta;
PRInt32 delta;
now = PR_Now();
LL_SUB(ll_delta, now, mLastMouseButtonAction);
LL_L2I(delta, ll_delta);
delta /= 1000;
if (delta > clickDelay)
{
if (!mIsDocumentLoaded || mRunningTimeout) {
PRBool blockOpenOnLoad = PR_FALSE;
prefs->GetBoolPref("dom.disable_open_during_load", &blockOpenOnLoad);
if (blockOpenOnLoad) {
#ifdef DEBUG
printf ("*** Scripts executed more than %ims after a mouse button "
"action are potential javascript abuse points (%i.)\n",
clickDelay, delta);
printf ("*** Scripts executed during (un)load or as a result of "
"setTimeout() are potential javascript abuse points.\n");
#endif
return PR_TRUE;
}
} else {
PRInt32 clickDelay = 0;
prefs->GetIntPref("dom.disable_open_click_delay", &clickDelay);
if (clickDelay) {
PRTime now, ll_delta;
PRInt32 delta;
now = PR_Now();
LL_SUB(ll_delta, now, mLastMouseButtonAction);
LL_L2I(delta, ll_delta);
delta /= 1000;
if (delta > clickDelay)
{
#ifdef DEBUG
printf ("*** Scripts executed more than %ims after a mouse button "
"action are potential javascript abuse points (%i.)\n",
clickDelay, delta);
#endif
return PR_TRUE;
}
}
}
return PR_FALSE;

View File

@ -124,11 +124,11 @@
pref = Components.classes['@mozilla.org/preferences-service;1'];
pref = pref.getService();
pref = pref.QueryInterface(Components.interfaces.nsIPrefBranch);
try {
HidePopups(!pref.getBoolPref("dom.disable_open_during_load"));
} catch(e) {
// try {
// HidePopups(!pref.getBoolPref("dom.disable_open_during_load"));
// } catch(e) {
HidePopups(true);
}
// }
// determine if image manager should be in the UI
if (alreadyCheckedForImage) {

View File

@ -492,7 +492,6 @@ function FinalizePermissionDeletions() {
// we lost the URI's original scheme, but this will do because the scheme
// is stripped later anyway.
var uri = ioService.newURI("http://"+deletedPermissions[p].host, null, null);
dump("********* uri "+uri.spec+"\n");
popupmanager.remove(uri);
} else
permissionmanager.remove(deletedPermissions[p].host, deletedPermissions[p].type);

View File

@ -176,10 +176,6 @@ CPPSRCS += nsNativeAppSupportWin.cpp nsNativeAppSupportBase.cpp
OS_LIBS += comctl32.lib comdlg32.lib uuid.lib shell32.lib ole32.lib oleaut32.lib version.lib winspool.lib
endif
ifneq (,$(filter cookie,$(MOZ_EXTENSIONS)))
DEFINES += -DUSE_POPUP_MANAGER
endif
ifneq (,$(filter windows os2 gtk gtk2,$(MOZ_WIDGET_TOOLKIT)))
ifneq (,$(filter windows os2,$(MOZ_WIDGET_TOOLKIT)))
ICON_SUFFIX=.ico

View File

@ -64,6 +64,10 @@
Mozilla version, which calls through to nsAppShellService.
*/
#ifdef USE_POPUP_MANAGER
#undef USE_POPUP_MANAGER
#endif
#include "nsCOMPtr.h"
#include "nsAppShellCIDs.h"
#include "nsNetUtil.h"

View File

@ -29,10 +29,6 @@
:: window rules are in xul.css
::::: */
window[chromehidden~="popupcontrol"] #popup-control {
display: none;
}
window[chromehidden~="toolbar"] #nav-bar-buttons,
window[chromehidden~="toolbar"] #print-button {
display: none;

View File

@ -415,7 +415,7 @@ function Startup()
addPrefListener(gButtonPrefListener);
addPrefListener(gTabStripPrefListener);
addPrefListener(gHomepagePrefListener);
addPopupPermListener(gPopupPermListener);
//addPopupPermListener(gPopupPermListener);
window.browserContentListener =
new nsBrowserContentListener(window, getBrowser());
@ -542,7 +542,7 @@ function Startup()
setTimeout(LoadBookmarksCallback, 0);
// initialize this checkbox after the rest of the onload sequence has completed
setTimeout(initPopupCheckbox, 0);
//setTimeout(initPopupCheckbox, 0);
}
function LoadBookmarksCallback()
@ -617,7 +617,7 @@ function Shutdown()
removePrefListener(gButtonPrefListener);
removePrefListener(gTabStripPrefListener);
removePrefListener(gHomepagePrefListener);
removePopupPermListener(gPopupPermListener);
//removePopupPermListener(gPopupPermListener);
window.browserContentListener.close();
// Close the app core.

View File

@ -411,10 +411,4 @@ Contributor(s):
<statusbarpanel class="statusbarpanel-iconic" id="offline-status"/>
<statusbarpanel class="statusbarpanel-iconic" id="security-button"/>
</statusbar>
<hbox id="popup-control">
<separator class="thin"/>
<checkbox id="popup-checkbox" label="&popup-control.label;" checked="true"
oncommand="popupCheckboxClick(this)"/>
</hbox>
</window>

View File

@ -124,11 +124,11 @@
pref = Components.classes['@mozilla.org/preferences-service;1'];
pref = pref.getService();
pref = pref.QueryInterface(Components.interfaces.nsIPrefBranch);
try {
HidePopups(!pref.getBoolPref("dom.disable_open_during_load"));
} catch(e) {
// try {
// HidePopups(!pref.getBoolPref("dom.disable_open_during_load"));
// } catch(e) {
HidePopups(true);
}
// }
// determine if image manager should be in the UI
if (alreadyCheckedForImage) {