Reviewed by Maciej.
authorbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Dec 2006 18:37:05 +0000 (18:37 +0000)
committerbdakin <bdakin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 8 Dec 2006 18:37:05 +0000 (18:37 +0000)
commit9454e95bfd8d4901e790f9e438da914ba578c622
tree8de40e71cdb806289f7acb8563a764bbbd2ea01c
parentc9791aa362ab0911e25d1186690f95f9eb7db218
    Reviewed by Maciej.

        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: https://svn.webkit.org/repository/webkit/trunk@18081 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/platform/ContextMenu.cpp
WebCore/platform/ContextMenuItem.h
WebCore/platform/mac/ContextMenuItemMac.mm