-
bdakin authored
Reviewed by Adam (and partially Geoff). Primarily, this patch gives WebCore context menus the ability to enable/disable and set state. It does a few other things along the way, though. Some of the more noticeable things: -Re-architects the ContextMenuItem class a bit so that the ownership model is a bit less confusing. ContextMenuItem is now *purely* a wrapper for the platformDescription. There are no other member variables. If you ever need the platformDescription outside of the MenuItem class, you have to call releasePlatformDescription(), which transfers ownership of the platformDescription to the caller. -Moves fontForSelection() from FrameMac into Editor.cpp. Turns out I don't need to use this function for my patch after all, but it doesn't seem like a terrible idea to move it anyway since we seem to be moving things from FrameMac into Editor these days anyway. WebKit: Reviewed by Adam. WebKit side of making WebCore context menus support state and enabled/disabled. * WebCoreSupport/WebContextMenuClient.h: contextMenuItemSelected takes a pointer to the parentMenu now since menu items no longer hold onto it. * WebCoreSupport/WebContextMenuClient.mm: Same. (WebContextMenuClient::contextMenuItemSelected): Same. * WebView/WebHTMLView.m: Must call setAutoenablesItems:NO on our menu. (-[NSArray menuForEvent:]): * WebView/WebUIDelegatePrivate.h: No need for if-def. git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18245 268f45cc-cd09-0410-ab3c-d52691b4dbfc
6172e092