[Mac] Disable "Save to Downloads" option for local files
authorbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Apr 2015 03:57:51 +0000 (03:57 +0000)
committerbfulgham@apple.com <bfulgham@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Apr 2015 03:57:51 +0000 (03:57 +0000)
commit551cf4929263d91eb80b74ccaee4a7129f319b84
tree1843380205fc257f4db62c2ff8fca2b4d0a538cd
parentb3b00e943d416dab5fd12462288531d66ede2f7d
[Mac] Disable "Save to Downloads" option for local files
https://bugs.webkit.org/show_bug.cgi?id=143794

Reviewed by Tim Horton.

Disable the Image and Media download options if the download
target is a local file. We can only download web resources;
anything else is actually a no-op.

Source/WebCore:

* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::checkOrEnableIfNeeded): Disable
menu item if appropriate.

Source/WebKit/mac:

* WebView/WebActionMenuController.mm:
(-[WebActionMenuController _defaultMenuItemsForImage]):
(-[WebActionMenuController _defaultMenuItemsForVideo]):

Source/WebKit2:

* UIProcess/mac/WKActionMenuController.mm:
(-[WKActionMenuController _defaultMenuItemsForVideo]):
(-[WKActionMenuController _defaultMenuItemsForImage]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@182879 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/page/ContextMenuController.cpp
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebActionMenuController.mm
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/mac/WKActionMenuController.mm