Bug 1699582 - Change nsMenuUtilsX::CalculateNativeInsertionPoint's aChild parameter to be an nsMenuX, because it is only called for that type. r=harry

Differential Revision: https://phabricator.services.mozilla.com/D109016
This commit is contained in:
Markus Stange 2021-03-22 19:55:43 +00:00
Родитель 84b3e1ff61
Коммит a3b924ff9a
2 изменённых файлов: 3 добавлений и 2 удалений

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

@ -14,6 +14,7 @@
class nsIContent;
class nsMenuBarX;
class nsMenuX;
// Namespace containing utility functions used in our native menu implementation.
namespace nsMenuUtilsX {
@ -24,7 +25,7 @@ unsigned int MacModifiersForGeckoModifiers(uint8_t geckoModifiers);
nsMenuBarX* GetHiddenWindowMenuBar(); // returned object is not retained
NSMenuItem* GetStandardEditMenuItem(); // returned object is not retained
bool NodeIsHiddenOrCollapsed(nsIContent* aContent);
int CalculateNativeInsertionPoint(nsMenuObjectX* aParent, nsMenuObjectX* aChild);
int CalculateNativeInsertionPoint(nsMenuObjectX* aParent, nsMenuX* aChild);
// Find the menu item by following the path aLocationString from aRootMenu.
// aLocationString is a '|'-separated list of integers, where each integer is

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

@ -190,7 +190,7 @@ bool nsMenuUtilsX::NodeIsHiddenOrCollapsed(nsIContent* aContent) {
// Determines how many items are visible among the siblings in a menu that are
// before the given child. This will not count the application menu.
int nsMenuUtilsX::CalculateNativeInsertionPoint(nsMenuObjectX* aParent, nsMenuObjectX* aChild) {
int nsMenuUtilsX::CalculateNativeInsertionPoint(nsMenuObjectX* aParent, nsMenuX* aChild) {
int insertionPoint = 0;
nsMenuObjectTypeX parentType = aParent->MenuObjectType();
if (parentType == eMenuBarObjectType) {