Skip to content
  • commit-queue@webkit.org's avatar
    [EFL] Use CROSS_PLATFORM_CONTEXT_MENU · cb6e3470
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=111877
    
    Patch by Jesus Sanchez-Palencia <jesus.palencia@openbossa.org> on 2013-03-14
    Reviewed by Caio Marcelo de Oliveira Filho.
    
    .:
    
    * Source/cmake/OptionsEfl.cmake: add -DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1
    
    Source/WebCore:
    
    Now EFL uses the CROSS_PLATFORM_CONTEXT_MENUS
    USE flag. This flag provides a full cross-platform
    representation of a ContextMenu and a ContextMenuItem.
    The embedder can then decide how to show this and neither
    WebCore nor WebCore/platform need to know any platform
    specific code about the menus, even though they could.
    
    No new tests needed, no behavior changes.
    
    * platform/ContextMenu.h:
    (ContextMenu):
    * platform/ContextMenuItem.h:
    (WebCore):
    * platform/PlatformMenuDescription.h:
    (WebCore):
    * platform/efl/ContextMenuEfl.cpp:
    (WebCore::ContextMenu::ContextMenu):
    (WebCore::ContextMenu::getContextMenuItems):
    (WebCore::ContextMenu::createPlatformContextMenuFromItems):
    (WebCore::ContextMenu::platformContextMenu):
    * platform/efl/ContextMenuItemEfl.cpp:
    (WebCore::ContextMenuItem::platformContextMenuItem):
    
    Source/WebKit/efl:
    
    Adjust ContextMenuClient to use the CROSS_PLATFORM_CONTEXT_MENUS USE flag
    by implementing customizeMenu() instead of getCustomMenuFromDefaultItems()
    and by calling coreMenu->items() instead of coreMenu->platformDescription().
    
    * WebCoreSupport/ContextMenuClientEfl.cpp:
    (WebCore::ContextMenuClientEfl::customizeMenu):
    * WebCoreSupport/ContextMenuClientEfl.h:
    (ContextMenuClientEfl):
    * ewk/ewk_contextmenu.cpp:
    (ewk_context_menu_new):
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@145841 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    cb6e3470