Bug 393575, change nsIMenuParent to nsMenuParent, r+sr=bz
--HG-- rename : layout/xul/base/src/nsIMenuParent.h => layout/xul/base/src/nsMenuParent.h
This commit is contained in:
Родитель
4966447d94
Коммит
d17aae4fc5
|
@ -65,7 +65,6 @@
|
|||
#include "nsIMenuFrame.h"
|
||||
#include "nsIHTMLDocument.h"
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIMenuParent.h"
|
||||
#include "nsIScrollableView.h"
|
||||
#include "nsISelectionPrivate.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
|
|
@ -118,7 +118,6 @@
|
|||
#include "nsPIDOMWindow.h"
|
||||
#include "nsJSEnvironment.h"
|
||||
#include "nsIFocusController.h"
|
||||
#include "nsIMenuParent.h"
|
||||
|
||||
#include "nsIScrollableView.h"
|
||||
#include "nsIHTMLDocument.h"
|
||||
|
|
|
@ -195,7 +195,6 @@
|
|||
#include "nsMenuFrame.h"
|
||||
#include "nsTreeBodyFrame.h"
|
||||
#endif
|
||||
#include "nsIMenuParent.h"
|
||||
#include "nsPlaceholderFrame.h"
|
||||
|
||||
// Content viewer interfaces
|
||||
|
|
|
@ -72,7 +72,7 @@ class nsIPresShell;
|
|||
class nsMenuFrame;
|
||||
class nsMenuPopupFrame;
|
||||
class nsMenuBarFrame;
|
||||
class nsIMenuParent;
|
||||
class nsMenuParent;
|
||||
class nsIDOMKeyEvent;
|
||||
class nsIDocShellTreeItem;
|
||||
|
||||
|
@ -492,7 +492,7 @@ public:
|
|||
/**
|
||||
* Return true if the popup for the supplied menu parent is open.
|
||||
*/
|
||||
PRBool IsPopupOpenForMenuParent(nsIMenuParent* aMenuParent);
|
||||
PRBool IsPopupOpenForMenuParent(nsMenuParent* aMenuParent);
|
||||
|
||||
/**
|
||||
* Return the frame for the topmost open popup of a given type, or null if
|
||||
|
@ -551,7 +551,7 @@ public:
|
|||
* submenu before the timer fires, we should instead cancel the timer. This
|
||||
* ensures that the user can move the mouse diagonally over a menu.
|
||||
*/
|
||||
void CancelMenuTimer(nsIMenuParent* aMenuParent);
|
||||
void CancelMenuTimer(nsMenuParent* aMenuParent);
|
||||
|
||||
/**
|
||||
* Handles navigation for menu accelkeys. Returns true if the key has
|
||||
|
|
|
@ -78,8 +78,6 @@ ifdef MOZ_XUL
|
|||
PARALLEL_DIRS = tree/public tree/src grid
|
||||
endif
|
||||
|
||||
EXPORTS = nsIMenuParent.h
|
||||
|
||||
CPPSRCS = \
|
||||
nsScrollBoxFrame.cpp \
|
||||
nsRootBoxFrame.cpp \
|
||||
|
|
|
@ -51,19 +51,19 @@
|
|||
#include "nsBoxFrame.h"
|
||||
#include "nsMenuFrame.h"
|
||||
#include "nsMenuBarListener.h"
|
||||
#include "nsIMenuParent.h"
|
||||
#include "nsMenuParent.h"
|
||||
#include "nsIWidget.h"
|
||||
|
||||
class nsIContent;
|
||||
|
||||
nsIFrame* NS_NewMenuBarFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||
|
||||
class nsMenuBarFrame : public nsBoxFrame, public nsIMenuParent
|
||||
class nsMenuBarFrame : public nsBoxFrame, public nsMenuParent
|
||||
{
|
||||
public:
|
||||
nsMenuBarFrame(nsIPresShell* aShell, nsStyleContext* aContext);
|
||||
|
||||
// nsIMenuParentInterface
|
||||
// nsMenuParent interface
|
||||
virtual nsMenuFrame* GetCurrentMenuItem();
|
||||
NS_IMETHOD SetCurrentMenuItem(nsMenuFrame* aMenuItem);
|
||||
virtual void CurrentMenuIsBeingDestroyed();
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
#include "nsBoxFrame.h"
|
||||
#include "nsFrameList.h"
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsIMenuParent.h"
|
||||
#include "nsMenuParent.h"
|
||||
#include "nsIMenuFrame.h"
|
||||
#include "nsXULPopupManager.h"
|
||||
#include "nsITimer.h"
|
||||
|
@ -180,7 +180,7 @@ public:
|
|||
|
||||
NS_IMETHOD SetParent(const nsIFrame* aParent);
|
||||
|
||||
virtual nsIMenuParent *GetMenuParent() { return mMenuParent; }
|
||||
virtual nsMenuParent *GetMenuParent() { return mMenuParent; }
|
||||
const nsAString& GetRadioGroupName() { return mGroupName; }
|
||||
nsMenuType GetMenuType() { return mType; }
|
||||
nsMenuPopupFrame* GetPopup() { return mPopupFrame; }
|
||||
|
@ -269,7 +269,7 @@ protected:
|
|||
PRPackedBool mChecked; // are we checked?
|
||||
nsMenuType mType;
|
||||
|
||||
nsIMenuParent* mMenuParent; // Our parent menu.
|
||||
nsMenuParent* mMenuParent; // Our parent menu.
|
||||
|
||||
// the popup for this menu, owned
|
||||
nsMenuPopupFrame* mPopupFrame;
|
||||
|
|
|
@ -36,20 +36,20 @@
|
|||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#ifndef nsIMenuParent_h___
|
||||
#define nsIMenuParent_h___
|
||||
#ifndef nsMenuParent_h___
|
||||
#define nsMenuParent_h___
|
||||
|
||||
class nsMenuFrame;
|
||||
|
||||
/*
|
||||
* nsIMenuParent is an interface implemented by nsMenuBarFrame and nsMenuPopupFrame
|
||||
* nsMenuParent is an interface implemented by nsMenuBarFrame and nsMenuPopupFrame
|
||||
* as both serve as parent frames to nsMenuFrame.
|
||||
*
|
||||
* Don't implement this interface on other classes unless you also fix up references,
|
||||
* as this interface is directly cast to and from nsMenuBarFrame and nsMenuPopupFrame.
|
||||
*/
|
||||
|
||||
class nsIMenuParent {
|
||||
class nsMenuParent {
|
||||
|
||||
public:
|
||||
// returns the menu frame of the currently active item within the menu
|
|
@ -53,7 +53,7 @@
|
|||
#include "nsIDOMEventTarget.h"
|
||||
|
||||
#include "nsBoxFrame.h"
|
||||
#include "nsIMenuParent.h"
|
||||
#include "nsMenuParent.h"
|
||||
#include "nsIWidget.h"
|
||||
|
||||
#include "nsITimer.h"
|
||||
|
@ -111,15 +111,14 @@ nsIFrame* NS_NewMenuPopupFrame(nsIPresShell* aPresShell, nsStyleContext* aContex
|
|||
|
||||
class nsIViewManager;
|
||||
class nsIView;
|
||||
class nsIMenuParent;
|
||||
class nsMenuPopupFrame;
|
||||
|
||||
class nsMenuPopupFrame : public nsBoxFrame, public nsIMenuParent
|
||||
class nsMenuPopupFrame : public nsBoxFrame, public nsMenuParent
|
||||
{
|
||||
public:
|
||||
nsMenuPopupFrame(nsIPresShell* aShell, nsStyleContext* aContext);
|
||||
|
||||
// nsIMenuParentInterface
|
||||
// nsMenuParent interface
|
||||
virtual nsMenuFrame* GetCurrentMenuItem();
|
||||
NS_IMETHOD SetCurrentMenuItem(nsMenuFrame* aMenuItem);
|
||||
virtual void CurrentMenuIsBeingDestroyed();
|
||||
|
|
|
@ -406,7 +406,7 @@ nsXULPopupManager::ShowMenu(nsIContent *aMenu,
|
|||
PRBool onMenuBar = PR_FALSE;
|
||||
PRBool onmenu = menuFrame->IsOnMenu();
|
||||
|
||||
nsIMenuParent* parent = menuFrame->GetMenuParent();
|
||||
nsMenuParent* parent = menuFrame->GetMenuParent();
|
||||
if (parent && onmenu) {
|
||||
parentIsContextMenu = parent->IsContextMenu();
|
||||
onMenuBar = parent->IsMenuBar();
|
||||
|
@ -1133,7 +1133,7 @@ nsXULPopupManager::IsPopupOpen(nsIContent* aPopup)
|
|||
}
|
||||
|
||||
PRBool
|
||||
nsXULPopupManager::IsPopupOpenForMenuParent(nsIMenuParent* aMenuParent)
|
||||
nsXULPopupManager::IsPopupOpenForMenuParent(nsMenuParent* aMenuParent)
|
||||
{
|
||||
nsMenuChainItem* item = GetTopVisibleMenu();
|
||||
while (item) {
|
||||
|
@ -1255,7 +1255,7 @@ nsXULPopupManager::MayShowPopup(nsMenuPopupFrame* aPopup)
|
|||
nsIFrame* parent = aPopup->GetParent();
|
||||
if (parent && parent->GetType() == nsGkAtoms::menuFrame) {
|
||||
nsMenuFrame* menuFrame = static_cast<nsMenuFrame *>(parent);
|
||||
nsIMenuParent* parentPopup = menuFrame->GetMenuParent();
|
||||
nsMenuParent* parentPopup = menuFrame->GetMenuParent();
|
||||
if (parentPopup && !parentPopup->IsOpen())
|
||||
return PR_FALSE;
|
||||
}
|
||||
|
@ -1514,7 +1514,7 @@ nsXULPopupManager::KillMenuTimer()
|
|||
}
|
||||
|
||||
void
|
||||
nsXULPopupManager::CancelMenuTimer(nsIMenuParent* aMenuParent)
|
||||
nsXULPopupManager::CancelMenuTimer(nsMenuParent* aMenuParent)
|
||||
{
|
||||
if (mCloseTimer && mTimerMenu == aMenuParent) {
|
||||
mCloseTimer->Cancel();
|
||||
|
@ -1582,7 +1582,7 @@ nsXULPopupManager::HandleKeyboardNavigation(PRUint32 aKeyCode)
|
|||
// check to make sure that the parent is actually the parent menu. It won't
|
||||
// be if the parent is in a different frame hierarchy, for example, for a
|
||||
// context menu opened on another menu.
|
||||
nsIMenuParent* expectedParent = static_cast<nsIMenuParent *>(nextitem->Frame());
|
||||
nsMenuParent* expectedParent = static_cast<nsMenuParent *>(nextitem->Frame());
|
||||
nsIFrame* parent = item->Frame()->GetParent();
|
||||
if (parent && parent->GetType() == nsGkAtoms::menuFrame) {
|
||||
nsMenuFrame* menuFrame = static_cast<nsMenuFrame *>(parent);
|
||||
|
|
Загрузка…
Ссылка в новой задаче