-
bdakin authored
Add a new member variable to ContectMenuItem to hold on to the sub- menu. The new member variable is an OwnPtr<ContextMenu> * platform/ContextMenu.cpp: Because of the OwnPtr in ContextMenuItem, we have to separate the declaration of ContextMenuItems away from the calls to appendItem(). Not doing so causes a build failure because OwnPtr inherits from Noncopyable. (WebCore::createFontSubMenu): Same. (WebCore::createSpellingAndGrammarSubMenu): Same. (WebCore::createSpellingSubMenu): Same. (WebCore::createSpeechSubMenu): Same. (WebCore::createWritingDirectionSubMenu): Same. (WebCore::ContextMenu::populate): Same. * platform/ContextMenuItem.h: New member variable m_subMenu. * platform/mac/ContextMenuItemMac.mm: Take care of setting m_subMenu in addition to setting the submenu of the NSMenuItem when we have a sub-menu. (WebCore::menuToArray): (WebCore::ContextMenuItem::ContextMenuItem): Same. (WebCore::ContextMenuItem::platformSubMenu): Same. (WebCore::ContextMenuItem::setSubMenu): Same. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9126f2c9