Bug 548734. Get rid of the footgun ui.use_native_popup_windows preference. r=roc,khuey

This commit is contained in:
Boris Zbarsky 2011-06-21 17:00:47 -04:00
Родитель d00fedc460
Коммит 3e900c1912
8 изменённых файлов: 25 добавлений и 12 удалений

Просмотреть файл

@ -4808,6 +4808,7 @@ NECKO_PROTOCOLS_DEFAULT="about data file ftp http res viewsource websocket wyciw
USE_ARM_KUSER=
BUILD_CTYPES=1
XPC_IDISPATCH_SUPPORT=
MOZ_USE_NATIVE_POPUP_WINDOWS=
case "${target}" in
@ -6340,6 +6341,10 @@ for extension in $MOZ_EXTENSIONS; do
fi
done
if test -n "$MOZ_USE_NATIVE_POPUP_WINDOWS"; then
AC_DEFINE(MOZ_USE_NATIVE_POPUP_WINDOWS)
fi
dnl ========================================================
dnl SVG Display Lists
dnl ========================================================

Просмотреть файл

@ -1520,6 +1520,10 @@ nsComboboxControlFrame::RestoreState(nsPresState* aState)
PRBool
nsComboboxControlFrame::ToolkitHasNativePopup()
{
return Preferences::GetBool("ui.use_native_popup_windows");
#ifdef MOZ_USE_NATIVE_POPUP_WINDOWS
return PR_TRUE;
#else
return PR_FALSE;
#endif /* MOZ_USE_NATIVE_POPUP_WINDOWS */
}

Просмотреть файл

@ -73,9 +73,6 @@ pref("toolkit.zoomManager.zoomValues", ".2,.3,.5,.67,.8,.9,1,1.1,1.2,1.33,1.5,1.
// Device pixel to CSS px ratio, in percent. Set to -1 to calculate based on display density.
pref("browser.viewport.scaleRatio", -1);
/* use custom widget for html:select */
pref("ui.use_native_popup_windows", true);
/* allow scrollbars to float above chrome ui */
pref("ui.scrollbarsCanOverlapContent", 1);

Просмотреть файл

@ -60,3 +60,6 @@ fi
# Needed for building our components as part of libxul
MOZ_APP_COMPONENT_LIBS="browsercomps"
MOZ_APP_COMPONENT_INCLUDE=nsBrowserComponents.h
# use custom widget for html:select
MOZ_USE_NATIVE_POPUP_WINDOWS=1

Просмотреть файл

@ -98,7 +98,6 @@ pref("browser.sessionhistory.max_total_viewers", -1);
pref("browser.sessionhistory.optimize_eviction", true);
pref("ui.use_native_colors", true);
pref("ui.use_native_popup_windows", false);
pref("ui.click_hold_context_menus", false);
pref("browser.display.use_document_fonts", 1); // 0 = never, 1 = quick, 2 = always
pref("browser.display.use_document_colors", true);

Просмотреть файл

@ -2955,9 +2955,9 @@ NSEvent* gLastDragMouseDownEvent = nil;
if (!gRollupWidget)
return;
if (Preferences::GetBool("ui.use_native_popup_windows", PR_FALSE)) {
return;
}
#ifdef MOZ_USE_NATIVE_POPUP_WINDOWS
return;
#endif /* MOZ_USE_NATIVE_POPUP_WINDOWS */
NSWindow *popupWindow = (NSWindow*)gRollupWidget->GetNativeData(NS_NATIVE_WINDOW);
if (!popupWindow || ![popupWindow isKindOfClass:[PopupWindow class]])

Просмотреть файл

@ -227,7 +227,11 @@ static void FitRectToVisibleAreaForScreen(nsIntRect &aRect, NSScreen *screen)
// (native context menus, native tooltips)
static PRBool UseNativePopupWindows()
{
return Preferences::GetBool("ui.use_native_popup_windows", PR_FALSE);
#ifdef MOZ_USE_NATIVE_POPUP_WINDOWS
return PR_TRUE;
#else
return PR_FALSE;
#endif /* MOZ_USE_NATIVE_POPUP_WINDOWS */
}
nsresult nsCocoaWindow::Create(nsIWidget *aParent,

Просмотреть файл

@ -271,9 +271,10 @@ nsToolkit::RegisterForAllProcessMouseEvents()
NS_OBJC_BEGIN_TRY_ABORT_BLOCK;
// Don't do this for apps that (like Camino) use native context menus.
if (Preferences::GetBool("ui.use_native_popup_windows", PR_FALSE)) {
return;
}
#ifdef MOZ_USE_NATIVE_POPUP_WINDOWS
return;
#endif /* MOZ_USE_NATIVE_POPUP_WINDOWS */
if (!mEventMonitorHandler) {
EventTypeSpec kEvents[] = {{kEventClassMouse, kEventMouseMoved}};
InstallEventHandler(GetEventMonitorTarget(), EventMonitorHandler,