Changeset 182879 in webkit
- Timestamp:
- Apr 15, 2015 8:57:51 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r182877 r182879 1 2015-04-15 Brent Fulgham <bfulgham@apple.com> 2 3 [Mac] Disable "Save to Downloads" option for local files 4 https://bugs.webkit.org/show_bug.cgi?id=143794 5 6 Reviewed by Tim Horton. 7 8 Disable the Image and Media download options if the download 9 target is a local file. We can only download web resources; 10 anything else is actually a no-op. 11 12 * page/ContextMenuController.cpp: 13 (WebCore::ContextMenuController::checkOrEnableIfNeeded): Disable 14 menu item if appropriate. 15 1 16 2015-04-15 Chris Dumez <cdumez@apple.com> 2 17 -
trunk/Source/WebCore/page/ContextMenuController.cpp
r182748 r182879 1335 1335 case ContextMenuItemTagCopyLinkToClipboard: 1336 1336 case ContextMenuItemTagOpenImageInNewWindow: 1337 case ContextMenuItemTagDownloadImageToDisk:1338 1337 case ContextMenuItemTagCopyImageToClipboard: 1339 1338 #if PLATFORM(GTK) || PLATFORM(EFL) 1340 1339 case ContextMenuItemTagCopyImageUrlToClipboard: 1340 #endif 1341 break; 1342 case ContextMenuItemTagDownloadImageToDisk: 1343 #if PLATFORM(MAC) 1344 if (WebCore::protocolIs(m_context.hitTestResult().absoluteImageURL(), "file")) 1345 shouldEnable = false; 1341 1346 #endif 1342 1347 break; … … 1352 1357 else 1353 1358 item.setTitle(contextMenuItemTagDownloadAudioToDisk()); 1359 if (WebCore::protocolIs(m_context.hitTestResult().absoluteImageURL(), "file")) 1360 shouldEnable = false; 1354 1361 break; 1355 1362 case ContextMenuItemTagCopyMediaLinkToClipboard: -
trunk/Source/WebKit/mac/ChangeLog
r182865 r182879 1 2015-04-15 Brent Fulgham <bfulgham@apple.com> 2 3 [Mac] Disable "Save to Downloads" option for local files 4 https://bugs.webkit.org/show_bug.cgi?id=143794 5 6 Reviewed by Tim Horton. 7 8 Disable the Image and Media download options if the download 9 target is a local file. We can only download web resources; 10 anything else is actually a no-op. 11 12 * WebView/WebActionMenuController.mm: 13 (-[WebActionMenuController _defaultMenuItemsForImage]): 14 (-[WebActionMenuController _defaultMenuItemsForVideo]): 15 1 16 2015-04-15 Alex Christensen <achristensen@webkit.org> 2 17 -
trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm
r181858 r182879 1 1 /* 2 * Copyright (C) 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2014-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 687 687 title = WEB_UI_STRING_KEY("Save to Downloads", "Save to Downloads (image action menu item)", "image action menu item"); 688 688 image = [NSImage imageNamed:@"NSActionMenuSaveToDownloads"]; 689 enabled = WebCore::protocolIs(_hitTestResult.absoluteImageURL(), "file"); 689 690 break; 690 691 … … 699 700 title = WEB_UI_STRING_KEY("Save to Downloads", "Save to Downloads (video action menu item)", "video action menu item"); 700 701 image = [NSImage imageNamed:@"NSActionMenuSaveToDownloads"]; 702 enabled = WebCore::protocolIs(_hitTestResult.absoluteMediaURL(), "file"); 701 703 break; 702 704 -
trunk/Source/WebKit2/ChangeLog
r182875 r182879 1 2015-04-15 Brent Fulgham <bfulgham@apple.com> 2 3 [Mac] Disable "Save to Downloads" option for local files 4 https://bugs.webkit.org/show_bug.cgi?id=143794 5 6 Reviewed by Tim Horton. 7 8 Disable the Image and Media download options if the download 9 target is a local file. We can only download web resources; 10 anything else is actually a no-op. 11 12 * UIProcess/mac/WKActionMenuController.mm: 13 (-[WKActionMenuController _defaultMenuItemsForVideo]): 14 (-[WKActionMenuController _defaultMenuItemsForImage]): 15 1 16 2015-04-15 Anders Carlsson <andersca@apple.com> 2 17 -
trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm
r182442 r182879 1 1 /* 2 * Copyright (C) 2014 Apple Inc. All rights reserved.2 * Copyright (C) 2014-2015 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 591 591 title = WEB_UI_STRING_KEY("Save to Downloads", "Save to Downloads (image action menu item)", "image action menu item"); 592 592 image = [NSImage imageNamed:@"NSActionMenuSaveToDownloads"]; 593 enabled = WebCore::protocolIs(hitTestResult->absoluteImageURL(), "file"); 593 594 break; 594 595 … … 621 622 title = WEB_UI_STRING_KEY("Save to Downloads", "Save to Downloads (video action menu item)", "video action menu item"); 622 623 image = [NSImage imageNamed:@"NSActionMenuSaveToDownloads"]; 624 enabled = WebCore::protocolIs(hitTestResult->absoluteMediaURL(), "file"); 623 625 break; 624 626
Note: See TracChangeset
for help on using the changeset viewer.