Changeset 175992 in webkit
- Timestamp:
- Nov 11, 2014, 4:59:54 PM (12 years ago)
- Location:
- trunk/Source
- Files:
-
- 6 edited
-
WebCore/ChangeLog (modified) (1 diff)
-
WebCore/WebCore.exp.in (modified) (1 diff)
-
WebCore/platform/spi/mac/DataDetectorsSPI.h (modified) (1 diff)
-
WebKit2/ChangeLog (modified) (1 diff)
-
WebKit2/Shared/API/c/WKActionMenuTypes.h (modified) (1 diff)
-
WebKit2/UIProcess/mac/WKActionMenuController.mm (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r175981 r175992 1 2014-11-11 Tim Horton <timothy_horton@apple.com> 2 3 Add support for mailto: link action menus 4 https://bugs.webkit.org/show_bug.cgi?id=138641 5 <rdar://problem/18741567> 6 7 Reviewed by Beth Dakin. 8 9 * WebCore.exp.in: 10 Add an export. 11 12 * platform/spi/mac/DataDetectorsSPI.h: 13 Add some DataDetectors SPI. 14 1 15 2014-11-11 Eric Carlson <eric.carlson@apple.com> 2 16 -
trunk/Source/WebCore/WebCore.exp.in
r175972 r175992 126 126 __ZN7WebCore10deleteFileERKN3WTF6StringE 127 127 __ZN7WebCore10fileExistsERKN3WTF6StringE 128 __ZN7WebCore10protocolIsERKN3WTF6StringEPKc 128 129 __ZN7WebCore10setCookiesEPNS_8DocumentERKNS_3URLERKN3WTF6StringE 129 130 __ZN7WebCore11BitmapImage13getCGImageRefEv -
trunk/Source/WebCore/platform/spi/mac/DataDetectorsSPI.h
r175964 r175992 76 76 + (DDActionsManager *)sharedManager; 77 77 - (NSArray *)menuItemsForResult:(DDResultRef)result actionContext:(DDActionContext *)context; 78 - (NSArray *)menuItemsForTargetURL:(NSString *)targetURL actionContext:(DDActionContext *)context; 78 79 - (void)requestBubbleClosureUnanchorOnFailure:(BOOL)unanchorOnFailure; 79 80 -
trunk/Source/WebKit2/ChangeLog
r175985 r175992 1 2014-11-11 Tim Horton <timothy_horton@apple.com> 2 3 Add support for mailto: link action menus 4 https://bugs.webkit.org/show_bug.cgi?id=138641 5 <rdar://problem/18741567> 6 7 Reviewed by Beth Dakin. 8 9 * Shared/API/c/WKActionMenuTypes.h: 10 Add a new type for mailto links. 11 12 * UIProcess/mac/WKActionMenuController.mm: 13 (-[WKActionMenuController _defaultMenuItemsForMailtoLink]): 14 Build a DDActionContext and grab menu items for our mailto link. 15 16 (-[WKActionMenuController _defaultMenuItems]): 17 Get menu items from _defaultMenuItemsForMailtoLink if needed. 18 1 19 2014-11-11 Conrad Shultz <conrad_shultz@apple.com> 2 20 -
trunk/Source/WebKit2/Shared/API/c/WKActionMenuTypes.h
r175779 r175992 42 42 kWKActionMenuEditableTextWithSuggestions, 43 43 kWKActionMenuWhitespaceInEditableArea, 44 kWKActionMenuVideo 44 kWKActionMenuVideo, 45 kWKActionMenuMailtoLink 45 46 }; 46 47 typedef uint32_t _WKActionMenuType; -
trunk/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm
r175985 r175992 658 658 } 659 659 660 #pragma mark Mailto Link actions 661 662 - (NSArray *)_defaultMenuItemsForMailtoLink 663 { 664 RefPtr<WebHitTestResult> hitTestResult = [self _webHitTestResult]; 665 666 RetainPtr<DDActionContext> actionContext = [[getDDActionContextClass() alloc] init]; 667 [actionContext setForActionMenuContent:YES]; 668 [actionContext setHighlightFrame:[_wkView.window convertRectToScreen:[_wkView convertRect:hitTestResult->elementBoundingBox() toView:nil]]]; 669 return [[getDDActionsManagerClass() sharedManager] menuItemsForTargetURL:hitTestResult->absoluteLinkURL() actionContext:actionContext.get()]; 670 } 671 660 672 #pragma mark NSMenuDelegate implementation 661 673 … … 845 857 846 858 String absoluteLinkURL = hitTestResult->absoluteLinkURL(); 847 if (!absoluteLinkURL.isEmpty() && WebCore::protocolIsInHTTPFamily(absoluteLinkURL)) { 848 _type = kWKActionMenuLink; 849 return [self _defaultMenuItemsForLink]; 859 if (!absoluteLinkURL.isEmpty()) { 860 if (WebCore::protocolIsInHTTPFamily(absoluteLinkURL)) { 861 _type = kWKActionMenuLink; 862 return [self _defaultMenuItemsForLink]; 863 } 864 865 if (protocolIs(absoluteLinkURL, "mailto")) { 866 _type = kWKActionMenuMailtoLink; 867 return [self _defaultMenuItemsForMailtoLink]; 868 } 850 869 } 851 870
Note:
See TracChangeset
for help on using the changeset viewer.