зеркало из https://github.com/mozilla/gecko-dev.git
viewer can set the compatibility mode
This commit is contained in:
Родитель
3219f036ec
Коммит
a00d4400f4
|
@ -16,6 +16,8 @@
|
|||
* Corporation. Portions created by Netscape are Copyright (C) 1998
|
||||
* Netscape Communications Corporation. All Rights Reserved.
|
||||
*/
|
||||
#include "nsIPref.h"
|
||||
|
||||
#ifdef XP_MAC
|
||||
#include "nsBrowserWindow.h"
|
||||
#define NS_IMPL_IDS
|
||||
|
@ -62,7 +64,6 @@
|
|||
#include "nsILabel.h"
|
||||
#include "nsWidgetSupport.h"
|
||||
|
||||
|
||||
#include "resources.h"
|
||||
|
||||
#if defined(WIN32)
|
||||
|
@ -2119,6 +2120,14 @@ nsBrowserWindow::DoToggleSelection()
|
|||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsBrowserWindow::SetCompatibilityMode(PRBool aIsStandard)
|
||||
{
|
||||
if (nsnull != mPrefs) {
|
||||
int32 prefInt = (aIsStandard) ? eCompatibility_Standard : eCompatibility_NavQuirks;
|
||||
mPrefs->SetIntPref("nglayout.compatibility.mode", prefInt);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsBrowserWindow::DoDebugRobot()
|
||||
|
@ -2217,6 +2226,11 @@ nsBrowserWindow::DispatchDebugMenu(PRInt32 aID)
|
|||
case VIEWER_TOP100:
|
||||
DoSiteWalker();
|
||||
break;
|
||||
|
||||
case VIEWER_NAV_QUIRKS_MODE:
|
||||
case VIEWER_STANDARD_MODE:
|
||||
SetCompatibilityMode(VIEWER_STANDARD_MODE == aID);
|
||||
break;
|
||||
}
|
||||
return(result);
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include "nsString.h"
|
||||
#include "nsVoidArray.h"
|
||||
#include "nsCRT.h"
|
||||
|
||||
//#include "nsIPref.h"
|
||||
|
||||
class nsILabel;
|
||||
class nsICheckButton;
|
||||
|
@ -148,6 +148,7 @@ public:
|
|||
void DoDebugRobot();
|
||||
void DoSiteWalker();
|
||||
nsEventStatus DispatchDebugMenu(PRInt32 aID);
|
||||
void SetCompatibilityMode(PRBool aIsStandard);
|
||||
#endif
|
||||
|
||||
nsEventStatus ProcessDialogEvent(nsGUIEvent *aEvent);
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
#define VIEWER_DEBUGSAVE 40032
|
||||
#define VIEWER_SHOW_CONTENT_QUALITY 40033
|
||||
#define VIEWER_TOGGLE_SELECTION 40034
|
||||
#define VIEWER_NAV_QUIRKS_MODE 40035
|
||||
#define VIEWER_STANDARD_MODE 40036
|
||||
|
||||
// Note: must be in ascending sequential order
|
||||
#define VIEWER_ONE_COLUMN 40040
|
||||
|
|
|
@ -82,6 +82,12 @@ VIEWER MENU DISCARDABLE
|
|||
MENUITEM "Debu&g Robot", VIEWER_DEBUGROBOT
|
||||
MENUITEM SEPARATOR
|
||||
MENUITEM "Show Content Quality", VIEWER_SHOW_CONTENT_QUALITY
|
||||
MENUITEM SEPARATOR
|
||||
POPUP "&Compatibility Mode"
|
||||
{
|
||||
MENUITEM "Nav Quirks", VIEWER_NAV_QUIRKS_MODE
|
||||
MENUITEM "Standard", VIEWER_STANDARD_MODE
|
||||
}
|
||||
}
|
||||
POPUP "&Tools"
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче