Title: [175322] branches/safari-600.3-branch/Source/WebKit2
- Revision
- 175322
- Author
- [email protected]
- Date
- 2014-10-29 01:49:35 -0700 (Wed, 29 Oct 2014)
Log Message
Merged r175190. <rdar://problem/18767397>
Modified Paths
Diff
Modified: branches/safari-600.3-branch/Source/WebKit2/ChangeLog (175321 => 175322)
--- branches/safari-600.3-branch/Source/WebKit2/ChangeLog 2014-10-29 08:47:23 UTC (rev 175321)
+++ branches/safari-600.3-branch/Source/WebKit2/ChangeLog 2014-10-29 08:49:35 UTC (rev 175322)
@@ -1,5 +1,30 @@
2014-10-29 Lucas Forschler <[email protected]>
+ Merge r175190
+
+ 2014-10-24 Tim Horton <[email protected]>
+
+ Share sheet doesn't attach to the window
+ https://bugs.webkit.org/show_bug.cgi?id=138062
+ <rdar://problem/18767397>
+
+ Reviewed by Beth Dakin.
+
+ * UIProcess/mac/WKActionMenuController.h:
+ WKActionMenuController is now a NSSharingService{Picker}Delegate.
+
+ * UIProcess/mac/WKActionMenuController.mm:
+ (-[WKActionMenuController _defaultMenuItemsForImage]):
+ Set us up as the NSSharingServicePicker delegate.
+
+ (-[WKActionMenuController sharingServicePicker:delegateForSharingService:]):
+ Set us up as the NSSharingService delegate.
+
+ (-[WKActionMenuController sharingService:sourceWindowForShareItems:sharingContentScope:]):
+ Return the appropriate window to attach to.
+
+2014-10-29 Lucas Forschler <[email protected]>
+
Merge r175187
2014-10-24 Beth Dakin <[email protected]>
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.h (175321 => 175322)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.h 2014-10-29 08:47:23 UTC (rev 175321)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.h 2014-10-29 08:49:35 UTC (rev 175322)
@@ -28,6 +28,7 @@
#import "ActionMenuHitTestResult.h"
#import "WKActionMenuItemTypes.h"
+#import <AppKit/NSSharingService.h>
#import <wtf/RetainPtr.h>
namespace WebKit {
@@ -40,10 +41,9 @@
};
}
-@class NSSharingServicePicker;
@class WKView;
-@interface WKActionMenuController : NSObject {
+@interface WKActionMenuController : NSObject <NSSharingServiceDelegate, NSSharingServicePickerDelegate> {
@private
WebKit::WebPageProxy *_page;
WKView *_wkView;
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (175321 => 175322)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-10-29 08:47:23 UTC (rev 175321)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-10-29 08:49:35 UTC (rev 175322)
@@ -192,6 +192,7 @@
RetainPtr<CGImageRef> image = bitmap->makeCGImage();
RetainPtr<NSImage> nsImage = adoptNS([[NSImage alloc] initWithCGImage:image.get() size:NSZeroSize]);
_sharingServicePicker = adoptNS([[NSSharingServicePicker alloc] initWithItems:@[ nsImage.get() ]]);
+ [_sharingServicePicker setDelegate:self];
[shareItem setSubmenu:[_sharingServicePicker menu]];
}
@@ -291,6 +292,20 @@
});
}
+#pragma mark NSSharingServicePickerDelegate implementation
+
+- (id <NSSharingServiceDelegate>)sharingServicePicker:(NSSharingServicePicker *)sharingServicePicker delegateForSharingService:(NSSharingService *)sharingService
+{
+ return self;
+}
+
+#pragma mark NSSharingServiceDelegate implementation
+
+- (NSWindow *)sharingService:(NSSharingService *)sharingService sourceWindowForShareItems:(NSArray *)items sharingContentScope:(NSSharingContentScope *)sharingContentScope
+{
+ return _wkView.window;
+}
+
#pragma mark Menu Items
- (RetainPtr<NSMenuItem>)_createActionMenuItemForTag:(uint32_t)tag
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes