Forward application suspend resume notifications to the web process.
Created attachment 225212 [details] Patch
These notifications are observed in MedisSessionManagerIOS.mm
Comment on attachment 225212 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=225212&action=review I would like Gavin to look this over; we may want to propagate this info along with the other visibility-related data. > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:72 > +SOFT_LINK_FRAMEWORK(UIKit) > +SOFT_LINK_POINTER(UIKit, UIApplicationWillResignActiveNotification, NSString *) > +SOFT_LINK_POINTER(UIKit, UIApplicationWillEnterForegroundNotification, NSString *) > + > +#define UIApplicationWillResignActiveNotification getUIApplicationWillResignActiveNotification() > +#define UIApplicationWillEnterForegroundNotification getUIApplicationWillEnterForegroundNotification() Why do these need to be soft-linked?
Created attachment 225340 [details] Patch
This is just a rebase.
(In reply to comment #3) > (From update of attachment 225212 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=225212&action=review > > I would like Gavin to look this over; we may want to propagate this info along with the other visibility-related data. > > > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:72 > > +SOFT_LINK_FRAMEWORK(UIKit) > > +SOFT_LINK_POINTER(UIKit, UIApplicationWillResignActiveNotification, NSString *) > > +SOFT_LINK_POINTER(UIKit, UIApplicationWillEnterForegroundNotification, NSString *) > > + > > +#define UIApplicationWillResignActiveNotification getUIApplicationWillResignActiveNotification() > > +#define UIApplicationWillEnterForegroundNotification getUIApplicationWillEnterForegroundNotification() > > Why do these need to be soft-linked? Oh right. It is just WebCore not WebProcess that doesn't link against UIKit. Next patch will have this change.
Created attachment 225341 [details] Patch
Also forward UIApplicationDidBecomeActiveNotification.
Created attachment 225343 [details] Patch
Comment on attachment 225343 [details] Patch Looks good to me.
This looks good to me as well, but I am not a WK2 owner so someone else will have to give it an r+.
Created attachment 225530 [details] Patch
Removed #include <UIKit/UIKit.h> And instead have WebCore specific versions of the Notifications.
Comment on attachment 225530 [details] Patch Rejecting attachment 225530 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-02', 'apply-attachment', '--no-update', '--non-interactive', 225530, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: urce/WebKit2/WebProcess/WebPage/WebPage.messages.in Hunk #1 FAILED at 65. 1 out of 1 hunk FAILED -- saving rejects to file Source/WebKit2/WebProcess/WebPage/WebPage.messages.in.rej patching file Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm Hunk #1 succeeded at 58 (offset 2 lines). Hunk #2 succeeded at 1670 with fuzz 1 (offset 29 lines). Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Sam Weinig']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: http://webkit-queues.appspot.com/results/6551233372356608
Created attachment 225688 [details] Patch
(In reply to comment #15) > Created an attachment (id=225688) [details] > Patch Rebased patch.
Comment on attachment 225688 [details] Patch Clearing flags on attachment: 225688 Committed r165028: <http://trac.webkit.org/changeset/165028>
All reviewed patches have been landed. Closing bug.
Comment on attachment 225688 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=225688&action=review > Source/WebKit2/WebProcess/WebPage/ios/WebPageIOS.mm:1686 > +void WebPage::applicationWillResignActive() > +{ > + [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationWillResignActiveNotification object:nil]; > +} > + > +void WebPage::applicationWillEnterForeground() > +{ > + [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationWillEnterForegroundNotification object:nil]; > +} > + > +void WebPage::applicationDidBecomeActive() > +{ > + [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationDidBecomeActiveNotification object:nil]; > +} This is not okay. Can you please add clean messaging from the WebKit layer to the WebCore layer?