Changeset 114367 in webkit
- Timestamp:
- Apr 17, 2012 4:56:19 AM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 31 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r114360 r114367 1 2012-04-17 Mariusz Grzegorczyk <mariusz.g@samsung.com> 2 3 [EFL][WK2] Fix build break when CONTEXT_MENUS is disabled. 4 https://bugs.webkit.org/show_bug.cgi?id=83285 5 6 Reviewed by Ryosuke Niwa. 7 8 * platform/ContextMenuItem.h: Remove macro around enums - needed by InjectedBundle. 9 (WebCore): 10 * platform/Widget.h: Remove namespace WebCore for PlatformPageClient typedef. 11 1 12 2012-04-17 Kent Tamura <tkent@chromium.org> 2 13 -
trunk/Source/WebCore/platform/ContextMenuItem.h
r113147 r114367 45 45 class wxMenuItem; 46 46 #endif 47 #endif // ENABLE(CONTEXT_MENUS) 47 48 48 49 namespace WebCore { … … 176 177 }; 177 178 179 #if ENABLE(CONTEXT_MENUS) 178 180 #if PLATFORM(MAC) 179 181 typedef NSMenuItem* PlatformMenuItemDescription; … … 304 306 }; 305 307 308 #endif // ENABLE(CONTEXT_MENUS) 306 309 } 307 310 308 #endif // ENABLE(CONTEXT_MENUS)309 311 #endif // ContextMenuItem_h -
trunk/Source/WebCore/platform/Widget.h
r111673 r114367 92 92 typedef PageClientBlackBerry* PlatformPageClient; 93 93 #elif PLATFORM(EFL) 94 namespace WebCore {95 94 class PageClientEfl; 96 95 typedef PageClientEfl* PlatformPageClient; 97 }98 96 #else 99 97 typedef PlatformWidget PlatformPageClient; -
trunk/Source/WebKit/efl/ChangeLog
r114113 r114367 1 2012-04-17 Mariusz Grzegorczyk <mariusz.g@samsung.com> 2 3 [EFL][WK2] Fix build break when CONTEXT_MENUS is disabled. 4 https://bugs.webkit.org/show_bug.cgi?id=83285 5 6 Reviewed by Ryosuke Niwa. 7 8 Remove WebCore namespace from PageClientEfl. 9 10 * WebCoreSupport/PageClientEfl.cpp: 11 (WebCore): 12 * WebCoreSupport/PageClientEfl.h: 13 * ewk/ewk_private.h: 14 (EWKPrivate): 15 * ewk/ewk_view.cpp: 16 (_Ewk_View_Private_Data): 17 (_ewk_view_priv_new): 18 (EWKPrivate::corePageClient): 19 1 20 2012-04-13 Thiago Marcos P. Santos <thiago.santos@intel.com> 2 21 -
trunk/Source/WebKit/efl/WebCoreSupport/PageClientEfl.cpp
r111673 r114367 24 24 25 25 namespace WebCore { 26 class IntRect; 27 } 26 28 27 29 PageClientEfl::PageClientEfl(Evas_Object* view) … … 46 48 } 47 49 #endif 48 49 } -
trunk/Source/WebKit/efl/WebCoreSupport/PageClientEfl.h
r111673 r114367 27 27 28 28 namespace WebCore { 29 30 29 class GraphicsContext3D; 30 } // namespace WebCore 31 31 32 32 class PageClientEfl { … … 46 46 }; 47 47 48 } // namespace WebCore49 50 48 #endif // PageClientEfl_h -
trunk/Source/WebKit/efl/ewk/ewk_private.h
r114113 r114367 99 99 WebCore::Page *corePage(const Evas_Object *ewkView); 100 100 WebCore::HistoryItem *coreHistoryItem(const Ewk_History_Item *ewkHistoryItem); 101 WebCore::PlatformPageClient corePageClient(Evas_Object* ewkView);101 PlatformPageClient corePageClient(Evas_Object* ewkView); 102 102 103 103 Evas_Object* kitFrame(const WebCore::Frame* coreFrame); -
trunk/Source/WebKit/efl/ewk/ewk_view.cpp
r114113 r114367 160 160 WebCore::ViewportArguments viewportArguments; 161 161 Ewk_History* history; 162 OwnPtr< WebCore::PageClientEfl> pageClient;162 OwnPtr<PageClientEfl> pageClient; 163 163 #if ENABLE(INPUT_TYPE_COLOR) 164 164 WebCore::ColorChooserClient* colorChooserClient; … … 742 742 priv->soupSession = WebCore::ResourceHandle::defaultSession(); 743 743 744 priv->pageClient = adoptPtr(new WebCore::PageClientEfl(smartData->self));744 priv->pageClient = adoptPtr(new PageClientEfl(smartData->self)); 745 745 746 746 return priv; … … 4057 4057 } 4058 4058 4059 WebCore::PlatformPageClient corePageClient(Evas_Object* ewkView)4059 PlatformPageClient corePageClient(Evas_Object* ewkView) 4060 4060 { 4061 4061 EWK_VIEW_SD_GET_OR_RETURN(ewkView, smartData, 0); -
trunk/Source/WebKit2/ChangeLog
r114345 r114367 1 2012-04-17 Mariusz Grzegorczyk <mariusz.g@samsung.com> 2 3 [EFL][WK2] Fix build break when CONTEXT_MENUS is disabled. 4 https://bugs.webkit.org/show_bug.cgi?id=83285 5 6 Reviewed by Ryosuke Niwa. 7 8 Surround code related to context menu with ENABLE(CONTEXT_MENUS) macro. 9 Add dummy functions for public API implementation related to context menu. 10 11 * Shared/API/c/WKContextMenuItem.cpp: 12 (WKContextMenuItemGetTypeID): 13 (WKContextMenuItemCreateAsAction): 14 (WKContextMenuItemCreateAsCheckableAction): 15 (WKContextMenuItemCreateAsSubmenu): 16 (WKContextMenuItemSeparatorItem): 17 (WKContextMenuItemGetTag): 18 (WKContextMenuItemGetType): 19 (WKContextMenuItemCopyTitle): 20 (WKContextMenuItemGetEnabled): 21 (WKContextMenuItemGetChecked): 22 (WKContextMenuCopySubmenuItems): 23 (WKContextMenuItemGetUserData): 24 (WKContextMenuItemSetUserData): 25 * Shared/WebContextMenuItem.cpp: 26 * Shared/WebContextMenuItem.h: 27 * Shared/WebContextMenuItemData.cpp: 28 * Shared/WebContextMenuItemData.h: 29 * UIProcess/API/C/WKPage.cpp: 30 (WKPageSetPageContextMenuClient): 31 * UIProcess/WebPageContextMenuClient.cpp: 32 * UIProcess/WebPageContextMenuClient.h: 33 * UIProcess/WebPageProxy.cpp: 34 (WebKit): 35 * UIProcess/WebPageProxy.h: 36 (WebPageProxy): 37 * UIProcess/WebPageProxy.messages.in: 38 * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: 39 (WKBundlePageSetContextMenuClient): 40 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp: 41 * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h: 42 * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: 43 * WebProcess/WebCoreSupport/WebContextMenuClient.h: 44 * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp: 45 * WebProcess/WebPage/WebContextMenu.cpp: 46 * WebProcess/WebPage/WebContextMenu.h: 47 * WebProcess/WebPage/WebPage.cpp: 48 (WebKit::WebPage::WebPage): 49 (WebKit): 50 (WebKit::handleMouseEvent): 51 (WebKit::WebPage::mouseEvent): 52 * WebProcess/WebPage/WebPage.h: 53 (WebPage): 54 * WebProcess/WebPage/WebPage.messages.in: 55 1 56 2012-04-16 Ryuan Choi <ryuan.choi@samsung.com> 2 57 -
trunk/Source/WebKit2/Shared/API/c/WKContextMenuItem.cpp
r95901 r114367 38 38 WKTypeID WKContextMenuItemGetTypeID() 39 39 { 40 #if ENABLE(CONTEXT_MENUS) 40 41 return toAPI(WebContextMenuItem::APIType); 42 #else 43 return toAPI(APIObject::TypeNull); 44 #endif 41 45 } 42 46 43 47 WKContextMenuItemRef WKContextMenuItemCreateAsAction(WKContextMenuItemTag tag, WKStringRef title, bool enabled) 44 48 { 49 #if ENABLE(CONTEXT_MENUS) 45 50 return toAPI(WebContextMenuItem::create(WebContextMenuItemData(ActionType, toImpl(tag), toImpl(title)->string(), enabled, false)).leakRef()); 51 #else 52 return 0; 53 #endif 46 54 } 47 55 48 56 WKContextMenuItemRef WKContextMenuItemCreateAsCheckableAction(WKContextMenuItemTag tag, WKStringRef title, bool enabled, bool checked) 49 57 { 58 #if ENABLE(CONTEXT_MENUS) 50 59 return toAPI(WebContextMenuItem::create(WebContextMenuItemData(CheckableActionType, toImpl(tag), toImpl(title)->string(), enabled, checked)).leakRef()); 60 #else 61 return 0; 62 #endif 51 63 } 52 64 53 65 WKContextMenuItemRef WKContextMenuItemCreateAsSubmenu(WKStringRef title, bool enabled, WKArrayRef submenuItems) 54 66 { 67 #if ENABLE(CONTEXT_MENUS) 55 68 return toAPI(WebContextMenuItem::create(toImpl(title)->string(), enabled, toImpl(submenuItems)).leakRef()); 69 #else 70 return 0; 71 #endif 56 72 } 57 73 58 74 WKContextMenuItemRef WKContextMenuItemSeparatorItem() 59 75 { 76 #if ENABLE(CONTEXT_MENUS) 60 77 return toAPI(WebContextMenuItem::separatorItem()); 78 #else 79 return 0; 80 #endif 61 81 } 62 82 63 83 WKContextMenuItemTag WKContextMenuItemGetTag(WKContextMenuItemRef itemRef) 64 84 { 85 #if ENABLE(CONTEXT_MENUS) 65 86 return toAPI(toImpl(itemRef)->data()->action()); 87 #else 88 return toAPI(ContextMenuItemTagNoAction); 89 #endif 66 90 } 67 91 68 92 WKContextMenuItemType WKContextMenuItemGetType(WKContextMenuItemRef itemRef) 69 93 { 94 #if ENABLE(CONTEXT_MENUS) 70 95 return toAPI(toImpl(itemRef)->data()->type()); 96 #else 97 return toAPI(ActionType); 98 #endif 71 99 } 72 100 73 101 WKStringRef WKContextMenuItemCopyTitle(WKContextMenuItemRef itemRef) 74 102 { 103 #if ENABLE(CONTEXT_MENUS) 75 104 return toCopiedAPI(toImpl(itemRef)->data()->title().impl()); 105 #else 106 return 0; 107 #endif 76 108 } 77 109 78 110 bool WKContextMenuItemGetEnabled(WKContextMenuItemRef itemRef) 79 111 { 112 #if ENABLE(CONTEXT_MENUS) 80 113 return toImpl(itemRef)->data()->enabled(); 114 #else 115 return false; 116 #endif 81 117 } 82 118 83 119 bool WKContextMenuItemGetChecked(WKContextMenuItemRef itemRef) 84 120 { 121 #if ENABLE(CONTEXT_MENUS) 85 122 return toImpl(itemRef)->data()->checked(); 123 #else 124 return false; 125 #endif 86 126 } 87 127 88 128 WKArrayRef WKContextMenuCopySubmenuItems(WKContextMenuItemRef itemRef) 89 129 { 130 #if ENABLE(CONTEXT_MENUS) 90 131 return toAPI(toImpl(itemRef)->submenuItemsAsImmutableArray().leakRef()); 132 #else 133 return 0; 134 #endif 91 135 } 92 136 93 137 WKTypeRef WKContextMenuItemGetUserData(WKContextMenuItemRef itemRef) 94 138 { 139 #if ENABLE(CONTEXT_MENUS) 95 140 return toAPI(toImpl(itemRef)->userData()); 141 #else 142 return 0; 143 #endif 96 144 } 97 145 98 146 void WKContextMenuItemSetUserData(WKContextMenuItemRef itemRef, WKTypeRef userDataRef) 99 147 { 148 #if ENABLE(CONTEXT_MENUS) 100 149 toImpl(itemRef)->setUserData(toImpl(userDataRef)); 150 #endif 101 151 } -
trunk/Source/WebKit2/Shared/WebContextMenuItem.cpp
r95901 r114367 25 25 26 26 #include "config.h" 27 28 #if ENABLE(CONTEXT_MENUS) 29 27 30 #include "WebContextMenuItem.h" 28 31 … … 88 91 } // namespace WebKit 89 92 93 #endif // ENABLE(CONTEXT_MENUS) -
trunk/Source/WebKit2/Shared/WebContextMenuItem.h
r95901 r114367 26 26 #ifndef WebContextMenuItem_h 27 27 #define WebContextMenuItem_h 28 29 #if ENABLE(CONTEXT_MENUS) 28 30 29 31 #include "APIObject.h" … … 62 64 } // namespace WebKit 63 65 66 #endif // ENABLE(CONTEXT_MENUS) 64 67 #endif // WebContextMenuItem_h -
trunk/Source/WebKit2/Shared/WebContextMenuItemData.cpp
r95901 r114367 25 25 26 26 #include "config.h" 27 28 #if ENABLE(CONTEXT_MENUS) 29 27 30 #include "WebContextMenuItemData.h" 28 31 … … 157 160 158 161 } // namespace WebKit 162 #endif // ENABLE(CONTEXT_MENUS) -
trunk/Source/WebKit2/Shared/WebContextMenuItemData.h
r95901 r114367 26 26 #ifndef WebContextMenuItemData_h 27 27 #define WebContextMenuItemData_h 28 29 #if ENABLE(CONTEXT_MENUS) 28 30 29 31 #include <WebCore/ContextMenuItem.h> … … 80 82 } // namespace WebKit 81 83 84 #endif // ENABLE(CONTEXT_MENUS) 82 85 #endif // WebContextMenuItemData_h -
trunk/Source/WebKit2/UIProcess/API/C/WKPage.cpp
r110638 r114367 462 462 void WKPageSetPageContextMenuClient(WKPageRef pageRef, const WKPageContextMenuClient* wkClient) 463 463 { 464 #if ENABLE(CONTEXT_MENUS) 464 465 toImpl(pageRef)->initializeContextMenuClient(wkClient); 466 #endif 465 467 } 466 468 -
trunk/Source/WebKit2/UIProcess/WebPageContextMenuClient.cpp
r109750 r114367 25 25 26 26 #include "config.h" 27 28 #if ENABLE(CONTEXT_MENUS) 29 27 30 #include "WebPageContextMenuClient.h" 28 31 … … 92 95 93 96 } // namespace WebKit 97 #endif // ENABLE(CONTEXT_MENUS) -
trunk/Source/WebKit2/UIProcess/WebPageContextMenuClient.h
r109750 r114367 27 27 #define WebPageContextMenuClient_h 28 28 29 #if ENABLE(CONTEXT_MENUS) 30 29 31 #include "APIClient.h" 30 32 #include "WebHitTestResult.h" … … 47 49 } // namespace WebKit 48 50 51 #endif // ENABLE(CONTEXT_MENUS) 49 52 #endif // WebPageContextMenuClient_h -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r114286 r114367 298 298 } 299 299 300 #if ENABLE(CONTEXT_MENUS) 300 301 void WebPageProxy::initializeContextMenuClient(const WKPageContextMenuClient* client) 301 302 { 302 303 m_contextMenuClient.initialize(client); 303 304 } 305 #endif 304 306 305 307 void WebPageProxy::reattachToWebProcess() … … 2696 2698 } 2697 2699 2700 #if ENABLE(CONTEXT_MENUS) 2698 2701 void WebPageProxy::showContextMenu(const IntPoint& menuLocation, const WebHitTestResult::Data& hitTestResultData, const Vector<WebContextMenuItemData>& proposedItems, CoreIPC::ArgumentDecoder* arguments) 2699 2702 { … … 2805 2808 process()->send(Messages::WebPage::DidSelectItemFromActiveContextMenu(item), m_pageID); 2806 2809 } 2810 #endif // ENABLE(CONTEXT_MENUS) 2807 2811 2808 2812 void WebPageProxy::didChooseFilesForOpenPanel(const Vector<String>& fileURLs) -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r114143 r114367 240 240 #endif 241 241 242 #if ENABLE(CONTEXT_MENUS) 242 243 void initializeContextMenuClient(const WKPageContextMenuClient*); 244 #endif 243 245 void initializeFindClient(const WKPageFindClient*); 244 246 void initializeFormClient(const WKPageFormClient*); … … 567 569 void preferencesDidChange(); 568 570 571 #if ENABLE(CONTEXT_MENUS) 569 572 // Called by the WebContextMenuProxy. 570 573 void contextMenuItemSelected(const WebContextMenuItemData&); 574 #endif 571 575 572 576 // Called by the WebOpenPanelResultListenerProxy. … … 792 796 #endif 793 797 798 #if ENABLE(CONTEXT_MENUS) 794 799 // Context Menu. 795 800 void showContextMenu(const WebCore::IntPoint& menuLocation, const WebHitTestResult::Data&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*); 796 801 void internalShowContextMenu(const WebCore::IntPoint& menuLocation, const WebHitTestResult::Data&, const Vector<WebContextMenuItemData>&, CoreIPC::ArgumentDecoder*); 802 #endif 797 803 798 804 // Search popup results … … 893 899 WebUIClient m_uiClient; 894 900 WebFindClient m_findClient; 901 #if ENABLE(CONTEXT_MENUS) 895 902 WebPageContextMenuClient m_contextMenuClient; 903 #endif 896 904 897 905 OwnPtr<DrawingAreaProxy> m_drawingArea; -
trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in
r114143 r114367 197 197 #endif 198 198 199 #if ENABLE(CONTEXT_MENUS) 199 200 # ContextMenu messages 200 201 ShowContextMenu(WebCore::IntPoint menuLocation, WebKit::WebHitTestResult::Data hitTestResultData, Vector<WebKit::WebContextMenuItemData> items, WebKit::InjectedBundleUserMessageEncoder userData) 202 #endif 201 203 202 204 # Authentication messages -
trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.cpp
r110397 r114367 55 55 void WKBundlePageSetContextMenuClient(WKBundlePageRef pageRef, WKBundlePageContextMenuClient* wkClient) 56 56 { 57 #if ENABLE(CONTEXT_MENUS) 57 58 toImpl(pageRef)->initializeInjectedBundleContextMenuClient(wkClient); 59 #endif 58 60 } 59 61 -
trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp
r95901 r114367 25 25 26 26 #include "config.h" 27 28 #if ENABLE(CONTEXT_MENUS) 29 27 30 #include "InjectedBundlePageContextMenuClient.h" 28 31 … … 76 79 77 80 } // namespace WebKit 81 #endif // ENABLE(CONTEXT_MENUS) -
trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h
r95901 r114367 27 27 #define InjectedBundlePageContextMenuClient_h 28 28 29 #if ENABLE(CONTEXT_MENUS) 30 29 31 #include "APIClient.h" 30 32 #include "WKBundlePage.h" … … 49 51 } // namespace WebKit 50 52 53 #endif // ENABLE(CONTEXT_MENUS) 51 54 #endif // InjectedBundlePageEditorClient_h -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.cpp
r108957 r114367 25 25 26 26 #include "config.h" 27 28 #if ENABLE(CONTEXT_MENUS) 29 27 30 #include "WebContextMenuClient.h" 28 31 … … 97 100 98 101 } // namespace WebKit 102 #endif // ENABLE(CONTEXT_MENUS) -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebContextMenuClient.h
r108957 r114367 26 26 #ifndef WebContextMenuClient_h 27 27 #define WebContextMenuClient_h 28 29 #if ENABLE(CONTEXT_MENUS) 28 30 29 31 #include <WebCore/ContextMenuClient.h> … … 70 72 } // namespace WebKit 71 73 74 #endif // ENABLE(CONTEXT_MENUS) 72 75 #endif // WebContextMenuClient_h -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp
r95901 r114367 25 25 26 26 #include "config.h" 27 28 #if ENABLE(CONTEXT_MENUS) 29 27 30 #include "WebContextMenuClient.h" 28 31 … … 55 58 56 59 } // namespace WebKit 60 #endif // ENABLE(CONTEXT_MENUS) -
trunk/Source/WebKit2/WebProcess/WebPage/WebContextMenu.cpp
r110348 r114367 21 21 22 22 #include "config.h" 23 24 #if ENABLE(CONTEXT_MENUS) 25 23 26 #include "WebContextMenu.h" 24 27 … … 94 97 95 98 } // namespace WebKit 99 100 #endif // ENABLE(CONTEXT_MENUS) -
trunk/Source/WebKit2/WebProcess/WebPage/WebContextMenu.h
r95901 r114367 21 21 #ifndef WebContextMenu_h 22 22 #define WebContextMenu_h 23 24 #if ENABLE(CONTEXT_MENUS) 23 25 24 26 #include "WebContextMenuItemData.h" … … 51 53 } // namespace WebKit 52 54 55 #endif // ENABLE(CONTEXT_MENUS) 53 56 #endif // WebPopupMenu_h -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r114249 r114367 216 216 , m_numWheelEventHandlers(0) 217 217 , m_cachedPageCount(0) 218 #if ENABLE(CONTEXT_MENUS) 218 219 , m_isShowingContextMenu(false) 220 #endif 219 221 , m_willGoToBackForwardItemCallbackEnabled(true) 220 222 #if PLATFORM(WIN) … … 229 231 Page::PageClients pageClients; 230 232 pageClients.chromeClient = new WebChromeClient(this); 233 #if ENABLE(CONTEXT_MENUS) 231 234 pageClients.contextMenuClient = new WebContextMenuClient(this); 235 #endif 232 236 pageClients.editorClient = new WebEditorClient(this); 233 237 pageClients.dragClient = new WebDragClient(this); … … 328 332 } 329 333 334 #if ENABLE(CONTEXT_MENUS) 330 335 void WebPage::initializeInjectedBundleContextMenuClient(WKBundlePageContextMenuClient* client) 331 336 { 332 337 m_contextMenuClient.initialize(client); 333 338 } 339 #endif 334 340 335 341 void WebPage::initializeInjectedBundleEditorClient(WKBundlePageEditorClient* client) … … 1198 1204 #endif 1199 1205 1206 #if ENABLE(CONTEXT_MENUS) 1200 1207 WebContextMenu* WebPage::contextMenu() 1201 1208 { … … 1204 1211 return m_contextMenu.get(); 1205 1212 } 1213 #endif 1206 1214 1207 1215 // Events … … 1234 1242 }; 1235 1243 1244 #if ENABLE(CONTEXT_MENUS) 1236 1245 static bool isContextClick(const PlatformMouseEvent& event) 1237 1246 { … … 1263 1272 return handled; 1264 1273 } 1274 #endif 1265 1275 1266 1276 static bool handleMouseEvent(const WebMouseEvent& mouseEvent, WebPage* page, bool onlyUpdateScrollbars) … … 1274 1284 switch (platformMouseEvent.type()) { 1275 1285 case PlatformEvent::MousePressed: { 1286 #if ENABLE(CONTEXT_MENUS) 1276 1287 if (isContextClick(platformMouseEvent)) 1277 1288 page->corePage()->contextMenuController()->clearContextMenu(); 1278 1289 #endif 1290 1279 1291 bool handled = frame->eventHandler()->handleMousePressEvent(platformMouseEvent); 1292 #if ENABLE(CONTEXT_MENUS) 1280 1293 if (isContextClick(platformMouseEvent)) 1281 1294 handled = handleContextMenuEvent(platformMouseEvent, page); 1295 #endif 1282 1296 1283 1297 return handled; … … 1297 1311 void WebPage::mouseEvent(const WebMouseEvent& mouseEvent) 1298 1312 { 1313 #if ENABLE(CONTEXT_MENUS) 1299 1314 // Don't try to handle any pending mouse events if a context menu is showing. 1300 1315 if (m_isShowingContextMenu) { … … 1302 1317 return; 1303 1318 } 1319 #endif 1304 1320 1305 1321 bool handled = false; … … 2394 2410 #endif 2395 2411 2412 #if ENABLE(CONTEXT_MENUS) 2396 2413 void WebPage::didSelectItemFromActiveContextMenu(const WebContextMenuItemData& item) 2397 2414 { … … 2402 2419 m_contextMenu = 0; 2403 2420 } 2421 #endif 2404 2422 2405 2423 void WebPage::replaceSelectionWithText(Frame* frame, const String& text) -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r113974 r114367 33 33 #include "ImageOptions.h" 34 34 #include "ImmutableArray.h" 35 #if ENABLE(CONTEXT_MENUS) 35 36 #include "InjectedBundlePageContextMenuClient.h" 37 #endif 36 38 #include "InjectedBundlePageEditorClient.h" 37 39 #include "InjectedBundlePageFormClient.h" … … 217 219 218 220 // -- InjectedBundle methods 221 #if ENABLE(CONTEXT_MENUS) 219 222 void initializeInjectedBundleContextMenuClient(WKBundlePageContextMenuClient*); 223 #endif 220 224 void initializeInjectedBundleEditorClient(WKBundlePageEditorClient*); 221 225 void initializeInjectedBundleFormClient(WKBundlePageFormClient*); … … 228 232 #endif 229 233 234 #if ENABLE(CONTEXT_MENUS) 230 235 InjectedBundlePageContextMenuClient& injectedBundleContextMenuClient() { return m_contextMenuClient; } 236 #endif 231 237 InjectedBundlePageEditorClient& injectedBundleEditorClient() { return m_editorClient; } 232 238 InjectedBundlePageFormClient& injectedBundleFormClient() { return m_formClient; } … … 348 354 #endif 349 355 356 #if ENABLE(CONTEXT_MENUS) 350 357 WebContextMenu* contextMenu(); 358 #endif 351 359 352 360 bool hasLocalDataForURL(const WebCore::KURL&); … … 500 508 String viewportConfigurationAsText(int deviceDPI, int deviceWidth, int deviceHeight, int availableWidth, int availableHeight); 501 509 510 #if ENABLE(CONTEXT_MENUS) 502 511 void contextMenuShowing() { m_isShowingContextMenu = true; } 512 #endif 503 513 504 514 #if PLATFORM(QT) … … 580 590 #endif 581 591 #endif 592 #if ENABLE(CONTEXT_MENUS) 582 593 void contextMenuHidden() { m_isShowingContextMenu = false; } 594 #endif 583 595 584 596 static void scroll(WebCore::Page*, WebCore::ScrollDirection, WebCore::ScrollGranularity); … … 734 746 WebCore::IntSize m_windowResizerSize; 735 747 748 #if ENABLE(CONTEXT_MENUS) 736 749 InjectedBundlePageContextMenuClient m_contextMenuClient; 750 #endif 737 751 InjectedBundlePageEditorClient m_editorClient; 738 752 InjectedBundlePageFormClient m_formClient; … … 764 778 #endif 765 779 RefPtr<WebPopupMenu> m_activePopupMenu; 780 #if ENABLE(CONTEXT_MENUS) 766 781 RefPtr<WebContextMenu> m_contextMenu; 782 #endif 767 783 RefPtr<WebOpenPanelResultListener> m_activeOpenPanelResultListener; 768 784 RefPtr<NotificationPermissionRequestManager> m_notificationPermissionRequestManager; … … 795 811 unsigned m_cachedPageCount; 796 812 813 #if ENABLE(CONTEXT_MENUS) 797 814 bool m_isShowingContextMenu; 815 #endif 798 816 799 817 bool m_willGoToBackForwardItemCallbackEnabled; -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.messages.in
r113181 r114367 45 45 #endif 46 46 47 #if ENABLE(CONTEXT_MENUS) 47 48 ContextMenuHidden() 49 #endif 48 50 49 51 ScrollBy(uint32_t scrollDirection, uint32_t scrollGranularity) … … 158 160 #endif 159 161 162 #if ENABLE(CONTEXT_MENUS) 160 163 # Context menu. 161 164 DidSelectItemFromActiveContextMenu(WebKit::WebContextMenuItemData menuItem); 165 #endif 162 166 163 167 # Open panel.
Note: See TracChangeset
for help on using the changeset viewer.