Fix a bug where the context menu does not show in PDF documents if there is no
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Apr 2011 18:52:52 +0000 (18:52 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 Apr 2011 18:52:52 +0000 (18:52 +0000)
commitd7349596ded91f8300a56ab6ad509613d72cd665
tree5dca7781041fd98a1d476dc797080a0cdfd79191
parentc1d9441737dc4d7b93e83662b13128f2249d5677
Fix a bug where the context menu does not show in PDF documents if there is no
UI delegate or the UI delegate does not respond to the context menu selector.

https://webkit.org/b/57958

Reviewed by Darin Adler.

* WebView/WebView.mm:
(-[WebView _menuForElement:defaultItems:]): CallUIDelegate returns nil
if UIDelegate is nil or doesn't respond to the selector. So check that
here to distinguish between using defaultMenuItems or the delegate
really returning nil to say "no context menu".

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@83464 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebView.mm