Changeset 127462 in webkit
- Timestamp:
- Sep 4, 2012 6:13:08 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ChangeLog
r127457 r127462 1 2012-09-04 Michał Pakuła vel Rutka <m.pakula@samsung.com> 2 3 [EFL] Context menu restore. 4 https://bugs.webkit.org/show_bug.cgi?id=74179 5 6 Reviewed by Gyuyoung Kim. 7 8 Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS 9 approach, the same as used in WebKit2. 10 11 * Source/cmake/OptionsEfl.cmake: Turn on CONTEXT_MENUS flag for EFL port 12 1 13 2012-09-04 Allan Sandfeld Jensen <allan.jensen@nokia.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r127459 r127462 1 2012-09-04 Michał Pakuła vel Rutka <m.pakula@samsung.com> 2 3 [EFL] Context menu restore. 4 https://bugs.webkit.org/show_bug.cgi?id=74179 5 6 Reviewed by Gyuyoung Kim. 7 8 Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS 9 approach, the same as used in WebKit2. 10 11 * PlatformEfl.cmake: Removed -DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1 12 1 13 2012-09-04 Andrey Adaikin <aandrey@chromium.org> 2 14 -
trunk/Source/WebCore/PlatformEfl.cmake
r127258 r127462 298 298 ENDIF () 299 299 300 ADD_DEFINITIONS(-DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=1 301 -DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}") 300 ADD_DEFINITIONS(-DDATA_DIR="${CMAKE_INSTALL_PREFIX}/${DATA_INSTALL_DIR}") 302 301 303 302 IF (ENABLE_WEB_AUDIO) -
trunk/Source/WebKit/ChangeLog
r126971 r127462 1 2012-09-04 Michał Pakuła vel Rutka <m.pakula@samsung.com> 2 3 [EFL] Context menu restore. 4 https://bugs.webkit.org/show_bug.cgi?id=74179 5 6 Reviewed by Gyuyoung Kim. 7 8 Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS 9 approach, the same as used in WebKit2. 10 11 * PlatformEfl.cmake: Added ContextMenuClientEfl.cpp file to sources list. 12 1 13 2012-08-29 Ryuan Choi <ryuan.choi@samsung.com> 2 14 -
trunk/Source/WebKit/PlatformEfl.cmake
r126971 r127462 90 90 efl/WebCoreSupport/ChromeClientEfl.cpp 91 91 efl/WebCoreSupport/ColorChooserEfl.cpp 92 efl/WebCoreSupport/ContextMenuClientEfl.cpp 92 93 efl/WebCoreSupport/DeviceOrientationClientEfl.cpp 93 94 efl/WebCoreSupport/DeviceMotionClientEfl.cpp -
trunk/Source/WebKit/efl/ChangeLog
r127444 r127462 1 2012-09-04 Michał Pakuła vel Rutka <m.pakula@samsung.com> 2 3 [EFL] Context menu restore. 4 https://bugs.webkit.org/show_bug.cgi?id=74179 5 6 Reviewed by Gyuyoung Kim. 7 8 Adds context menu support for EFL port using non-CROSS_PLATFORM_CONTEXT_MENUS 9 approach, the same as used in WebKit2. 10 11 * WebCoreSupport/ContextMenuClientEfl.cpp: Added. 12 (WebCore): 13 (WebCore::ContextMenuClientEfl::contextMenuDestroyed): 14 (WebCore::ContextMenuClientEfl::getCustomMenuFromDefaultItems): 15 (WebCore::ContextMenuClientEfl::contextMenuItemSelected): 16 (WebCore::ContextMenuClientEfl::downloadURL): 17 (WebCore::ContextMenuClientEfl::lookUpInDictionary): 18 (WebCore::ContextMenuClientEfl::speak): 19 (WebCore::ContextMenuClientEfl::isSpeaking): 20 (WebCore::ContextMenuClientEfl::stopSpeaking): 21 (WebCore::ContextMenuClientEfl::searchWithGoogle): 22 * WebCoreSupport/ContextMenuClientEfl.h: Added. 23 (WebCore): 24 (ContextMenuClientEfl): 25 * ewk/ewk_contextmenu.cpp: Removed ewk_context_menu_customize implementation. 26 (ewk_context_menu_destroy): Added freeing context menu. 27 (ewk_context_menu_new): Added filling ewk_contextmenu list. 28 (ewk_context_menu_item_append): 29 * ewk/ewk_contextmenu_private.h: Removed ewk_context_menu_customize and changed ewk_context_menu_new definition. 30 * ewk/ewk_view.cpp: 31 (_Ewk_View_Private_Data): 32 (_ewk_view_priv_new): 33 (_ewk_view_priv_del): 34 (ewk_view_context_menu_forward_event): 35 1 36 2012-09-04 Ryuan Choi <ryuan.choi@samsung.com> 2 37 -
trunk/Source/WebKit/efl/ewk/ewk_contextmenu.cpp
r109205 r127462 25 25 #include "ContextMenuController.h" 26 26 #include "ContextMenuItem.h" 27 #include "ewk_ private.h"27 #include "ewk_contextmenu_private.h" 28 28 #include <Eina.h> 29 29 #include <eina_safety_checks.h> … … 85 85 EINA_SAFETY_ON_NULL_RETURN_VAL(menu->controller, false); 86 86 menu->controller->clearContextMenu(); 87 ewk_context_menu_free(menu); 87 88 return true; 88 89 #else … … 218 219 * @note emits a signal "contextmenu,new" 219 220 */ 220 Ewk_Context_Menu* ewk_context_menu_new(Evas_Object* view, WebCore::ContextMenuController* controller )221 Ewk_Context_Menu* ewk_context_menu_new(Evas_Object* view, WebCore::ContextMenuController* controller, WebCore::ContextMenu* coreMenu) 221 222 { 222 223 Ewk_Context_Menu* menu; … … 232 233 evas_object_smart_callback_call(menu->view, "contextmenu,new", menu); 233 234 235 const Vector<WebCore::ContextMenuItem>* itemsList = coreMenu->platformDescription(); 236 for (Vector<WebCore::ContextMenuItem>::const_iterator iter = itemsList->begin(); iter != itemsList->end(); ++iter) 237 ewk_context_menu_item_append(menu, *iter); 238 234 239 return menu; 235 240 } … … 267 272 * @see ewk_context_menu_item_new 268 273 */ 269 void ewk_context_menu_item_append(Ewk_Context_Menu* menu, WebCore::ContextMenuItem& core)274 void ewk_context_menu_item_append(Ewk_Context_Menu* menu, const WebCore::ContextMenuItem& core) 270 275 { 271 276 Ewk_Context_Menu_Item_Type type = static_cast<Ewk_Context_Menu_Item_Type>(core.type()); … … 284 289 * @internal 285 290 * 286 * Emits a signal with the items of the context menu.291 * Emits a signal "contextmenu,show" 287 292 * 288 293 * @param menu the context menu object 289 * @return the same context menu object that was given through parameter290 *291 * @note emits a signal "contextmenu,customize"292 *293 * @see ewk_context_menu_item_list_get294 */295 Ewk_Context_Menu* ewk_context_menu_customize(Ewk_Context_Menu* menu)296 {297 EINA_SAFETY_ON_NULL_RETURN_VAL(menu, 0);298 299 evas_object_smart_callback_call(menu->view, "contextmenu,customize", menu->items);300 return menu;301 }302 303 /**304 * @internal305 *306 * Emits a signal "contextmenu,show"307 *308 * @param menu the context menu object309 294 */ 310 295 void ewk_context_menu_show(Ewk_Context_Menu* menu) -
trunk/Source/WebKit/efl/ewk/ewk_contextmenu_private.h
r117046 r127462 22 22 #define ewk_contextmenu_private_h 23 23 24 #include "ewk_contextmenu.h" 25 24 26 // forward declarations 25 27 namespace WebCore { … … 29 31 30 32 #if ENABLE(CONTEXT_MENUS) 31 Ewk_Context_Menu* ewk_context_menu_new(Evas_Object* view, WebCore::ContextMenuController* controller );33 Ewk_Context_Menu* ewk_context_menu_new(Evas_Object* view, WebCore::ContextMenuController* controller, WebCore::ContextMenu* coreMenu); 32 34 bool ewk_context_menu_free(Ewk_Context_Menu* menu); 33 void ewk_context_menu_item_append(Ewk_Context_Menu* menu, WebCore::ContextMenuItem& core); 34 Ewk_Context_Menu* ewk_context_menu_customize(Ewk_Context_Menu* menu); 35 void ewk_context_menu_item_append(Ewk_Context_Menu* menu, const WebCore::ContextMenuItem& core); 35 36 void ewk_context_menu_show(Ewk_Context_Menu* menu); 36 37 #endif 37 38 38 #endif // ewk_context_m anu_private_h39 #endif // ewk_context_menu_private_h -
trunk/Source/WebKit/efl/ewk/ewk_view.cpp
r127024 r127462 28 28 #include "Chrome.h" 29 29 #include "ChromeClientEfl.h" 30 #include "ContextMenuClientEfl.h" 30 31 #include "ContextMenuController.h" 31 32 #include "DocumentLoader.h" … … 58 59 #include "Settings.h" 59 60 #include "c_instance.h" 61 #include "ewk_contextmenu_private.h" 60 62 #include "ewk_frame.h" 61 63 #include "ewk_frame_private.h" … … 361 363 bool isUsingEcoreX; 362 364 #endif 365 Ewk_Context_Menu* contextMenu; 363 366 }; 364 367 … … 742 745 WebCore::Page::PageClients pageClients; 743 746 pageClients.chromeClient = new WebCore::ChromeClientEfl(smartData->self); 747 pageClients.contextMenuClient = new WebCore::ContextMenuClientEfl; 744 748 pageClients.editorClient = new WebCore::EditorClientEfl(smartData->self); 745 749 pageClients.dragClient = new WebCore::DragClientEfl; … … 892 896 #endif 893 897 898 priv->contextMenu = 0; 899 894 900 return priv; 895 901 } … … 924 930 if (priv->cursorObject) 925 931 evas_object_del(priv->cursorObject); 932 933 if (priv->contextMenu) 934 ewk_context_menu_free(priv->contextMenu); 926 935 927 936 delete priv; … … 1625 1634 1626 1635 priv->page->contextMenuController()->clearContextMenu(); 1636 if (priv->contextMenu) 1637 ewk_context_menu_free(priv->contextMenu); 1638 1627 1639 WebCore::Frame* mainFrame = priv->page->mainFrame(); 1628 1640 Evas_Coord x, y; … … 1636 1648 } 1637 1649 1638 if ( mainFrame->eventHandler()->sendContextMenuEvent(event))1650 if (!mainFrame->eventHandler()->sendContextMenuEvent(event)) 1639 1651 return false; 1640 1652 … … 1646 1658 return mouse_press_handled; 1647 1659 } 1660 1661 priv->contextMenu = ewk_context_menu_new(ewkView, priv->page->contextMenuController(), coreMenu); 1662 if (!priv->contextMenu) 1663 return false; 1664 1665 ewk_context_menu_show(priv->contextMenu); 1648 1666 1649 1667 return true; -
trunk/Source/cmake/OptionsEfl.cmake
r127419 r127462 27 27 ADD_DEFINITIONS(-DWTF_USE_SOUP=1) 28 28 29 ADD_DEFINITIONS(-DENABLE_CONTEXT_MENUS= 0)29 ADD_DEFINITIONS(-DENABLE_CONTEXT_MENUS=1) 30 30 31 31 SET(WTF_USE_PTHREADS 1)
Note: See TracChangeset
for help on using the changeset viewer.