Changeset 183403 in webkit
- Timestamp:
- Apr 27, 2015 11:38:29 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/mac/ChangeLog
r183373 r183403 1 2015-04-27 Brent Fulgham <bfulgham@apple.com> 2 3 REGRESSION(r182879): Images and video can no longer be downloaded 4 https://bugs.webkit.org/show_bug.cgi?id=144267 5 <rdar://problem/20702844> 6 7 Reviewed by Simon Fraser. 8 9 * WebView/WebActionMenuController.mm: 10 (-[WebActionMenuController _createActionMenuItemForTag:]): Check for 11 "!WebCore::protocolIs(..., "file")" for image and media downloads. 12 1 13 2015-04-26 Yusuke Suzuki <utatane.tea@gmail.com> 2 14 -
trunk/Source/WebKit/mac/WebView/WebActionMenuController.mm
r183136 r183403 692 692 title = WEB_UI_STRING_KEY("Save to Downloads", "Save to Downloads (image action menu item)", "image action menu item"); 693 693 image = [NSImage imageNamed:@"NSActionMenuSaveToDownloads"]; 694 enabled = WebCore::protocolIs(_hitTestResult.absoluteImageURL(), "file");694 enabled = !WebCore::protocolIs(_hitTestResult.absoluteImageURL(), "file"); 695 695 break; 696 696 … … 705 705 title = WEB_UI_STRING_KEY("Save to Downloads", "Save to Downloads (video action menu item)", "video action menu item"); 706 706 image = [NSImage imageNamed:@"NSActionMenuSaveToDownloads"]; 707 enabled = WebCore::protocolIs(_hitTestResult.absoluteMediaURL(), "file");707 enabled = !WebCore::protocolIs(_hitTestResult.absoluteMediaURL(), "file") && _hitTestResult.isDownloadableMedia(); 708 708 break; 709 709 -
trunk/Source/WebKit2/ChangeLog
r183389 r183403 1 2015-04-27 Brent Fulgham <bfulgham@apple.com> 2 3 REGRESSION(r182879): Images and video can no longer be downloaded 4 https://bugs.webkit.org/show_bug.cgi?id=144267 5 <rdar://problem/20702844> 6 7 Reviewed by Simon Fraser. 8 9 * UIProcess/mac/WKActionMenuController.mm: 10 (-[WKActionMenuController _createActionMenuItemForTag:]): Check for 11 "!WebCore::protocolIs(..., "file")" for image and media downloads. 12 1 13 2015-04-27 Csaba Osztrogonác <ossy@webkit.org> 2 14 -
trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm
r182879 r183403 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 enabled = !WebCore::protocolIs(hitTestResult->absoluteImageURL(), "file"); 594 594 break; 595 595 … … 622 622 title = WEB_UI_STRING_KEY("Save to Downloads", "Save to Downloads (video action menu item)", "video action menu item"); 623 623 image = [NSImage imageNamed:@"NSActionMenuSaveToDownloads"]; 624 enabled = WebCore::protocolIs(hitTestResult->absoluteMediaURL(), "file");624 enabled = !WebCore::protocolIs(hitTestResult->absoluteMediaURL(), "file") && hitTestResult->isDownloadableMedia(); 625 625 break; 626 626 -
trunk/Tools/ChangeLog
r183400 r183403 1 2015-04-27 Brent Fulgham <bfulgham@apple.com> 2 3 REGRESSION(r182879): Images and video can no longer be downloaded 4 https://bugs.webkit.org/show_bug.cgi?id=144267 5 <rdar://problem/20702844> 6 7 Reviewed by Simon Fraser. 8 9 Revise tests to check for proper download menu state. 10 1. Downloading a loal image should be disabled. 11 2. Downloading a local media file should be disabled. 12 3. Downloading non-downloadable media should be disabled. 13 14 * TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm: 15 (TestWebKitAPI::TEST): 16 1 17 2015-04-27 Csaba Osztrogonác <ossy@webkit.org> 2 18 -
trunk/Tools/TestWebKitAPI/Tests/WebKit2ObjC/ActionMenus.mm
r183298 r183403 666 666 }]; 667 667 668 // Download a n image.668 // Download a local image (should be disabled) 669 669 activeDownloadContext.shouldCheckForImage = true; 670 670 [wkView runMenuSequenceAtPoint:windowPointForTarget(TargetType::Image) preDidCloseMenuHandler:^() { 671 671 EXPECT_EQ(kWKActionMenuImage, [wkView _actionMenuResult].type); 672 673 didFinishDownload = false; 674 performMenuItemAtIndexOfTypeAsync([wkView _actionMenu], 2, kWKContextActionItemTagSaveImageToDownloads); 675 Util::run(&didFinishDownload); 672 ensureMenuItemAtIndexOfTypeIsDisabled([wkView _actionMenu], 2, kWKContextActionItemTagSaveImageToDownloads); 676 673 }]; 677 674 activeDownloadContext.shouldCheckForImage = false; … … 690 687 NSString *videoURL = watchPasteboardForString(); 691 688 EXPECT_WK_STREQ(@"test.mp4", [videoURL lastPathComponent]); 689 690 // Since this video is a local file, it should be disabled. 691 ensureMenuItemAtIndexOfTypeIsDisabled([wkView _actionMenu], 2, kWKContextActionItemTagSaveVideoToDownloads); 692 692 }]; 693 693
Note: See TracChangeset
for help on using the changeset viewer.