WebCore:
Reviewed by Anders
- WebCore part of fix for:
<rdar://problem/
5128697> REGRESSION: At least one PDF context menu item isn't appearing on Leopard
* platform/ContextMenuItem.h:
(WebCore::):
add two PDF-related context menu items to enum to keep it in sync with WebKit
* platform/ContextMenu.cpp:
(WebCore::ContextMenu::checkOrEnableIfNeeded):
add the new context menu items to the do-nothing case of a big switch statement
WebKit:
Reviewed by Anders
- WebKit part of fix for:
<rdar://problem/
5128697> REGRESSION: At least one PDF context menu item isn't appearing on Leopard
* Misc/WebNSArrayExtras.h: Added.
* Misc/WebNSArrayExtras.m: Added.
(-[NSMutableArray _webkit_removeUselessMenuItemSeparators]):
New file, includes this method to strip leading, trailing, and duplicate separators from arrays
of NSMenuItems (copied from Safari)
* WebView/WebUIDelegatePrivate.h:
new MenuItemTag enum values for new PDFKit context menu items
* WebKit.xcodeproj/project.pbxproj:
updated for new files
* WebView/WebPDFView.mm:
(-[WebPDFView _anyPDFTagsFoundInMenu:]):
check for new PDFKit context menu items
(-[WebPDFView _menuItemsFromPDFKitForEvent:]):
associate new PDFKit context menu item selectors with the new tags; skip certain selectors that
correspond to menu items that WebKit already includes; remove useless menu item separators when
we're done, since we might have removed arbitrarily-placed menu items
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@20862
268f45cc-cd09-0410-ab3c-
d52691b4dbfc