Bug 89974

Summary: [WK2] Move intent delivery code from the frame to the page
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: andersca, kenneth, sam, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 88303, 90067    
Attachments:
Description Flags
Patch
kenneth: review+
Patch none

Description Chris Dumez 2012-06-26 05:59:40 PDT
We need to add for following C API to WKFrame:
void WKFrameDeliverIntent(WKFrameRef frameRef, WKIntentDataRef intent);

Otherwise, the client cannot deliver a Web intent to a frame.
Comment 1 Chris Dumez 2012-06-26 06:01:30 PDT
Created attachment 149518 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2012-06-26 19:49:23 PDT
Comment on attachment 149518 [details]
Patch

Looks good to me, but please lets Anders or Sam have a look before you commit it.
Comment 3 Sam Weinig 2012-06-26 20:23:53 PDT
I have not been following this too closely, and I apologize for that (things are a bit busy here) but is it necessary for this to be at the frame level?  I would love to remove the need for explicit frame objects from the WebKit2 API, so adding things seems like going in the wrong direction.  Let me know if there are some other bugs I can look at for context.
Comment 4 Chris Dumez 2012-06-26 22:36:56 PDT
(In reply to comment #3)
> I have not been following this too closely, and I apologize for that (things are a bit busy here) but is it necessary for this to be at the frame level?  I would love to remove the need for explicit frame objects from the WebKit2 API, so adding things seems like going in the wrong direction.  Let me know if there are some other bugs I can look at for context.

All the WK2 Web Intents patches are marked as dependencies of this meta-bug:
Bug 88303.
Comment 5 Chris Dumez 2012-06-26 22:53:06 PDT
(In reply to comment #3)
> I have not been following this too closely, and I apologize for that (things are a bit busy here) but is it necessary for this to be at the frame level?  I would love to remove the need for explicit frame objects from the WebKit2 API, so adding things seems like going in the wrong direction.  Let me know if there are some other bugs I can look at for context.

I was merely trying to match the WebKit1 implementation. Should I move the intent delivery code to the page then?
Comment 6 Chris Dumez 2012-06-26 23:08:24 PDT
Created attachment 149686 [details]
Patch

Sam, is this what you had in mind?
I moved the intent delivery code from the frame to the page.
Comment 7 Sam Weinig 2012-06-27 11:11:42 PDT
(In reply to comment #6)
> Created an attachment (id=149686) [details]
> Patch
> 
> Sam, is this what you had in mind?
> I moved the intent delivery code from the frame to the page.

Probably, since I don't understand what this feature is supposed to do from the function name, I am not sure why it needs to take happen with regards to frame.
Comment 8 Chris Dumez 2012-06-27 11:52:16 PDT
(In reply to comment #7)
> (In reply to comment #6)
> > Created an attachment (id=149686) [details] [details]
> > Patch
> > 
> > Sam, is this what you had in mind?
> > I moved the intent delivery code from the frame to the page.
> 
> Probably, since I don't understand what this feature is supposed to do from the function name, I am not sure why it needs to take happen with regards to frame.

The point is to deliver a Web Intent to a service (web page that can handle an intent) by exposing it via DOMWindow.intent attribute [1]. My understanding is that a DOM Window is associated to a frame and a page can contain several frames. For this reason, the deliver method is associated to a frame, thus the FrameID in argument.

[1] http://www.w3.org/TR/web-intents/#delivery-and-response-api
Comment 9 WebKit Review Bot 2012-06-29 14:43:47 PDT
Comment on attachment 149686 [details]
Patch

Clearing flags on attachment: 149686

Committed r121590: <http://trac.webkit.org/changeset/121590>
Comment 10 WebKit Review Bot 2012-06-29 14:43:51 PDT
All reviewed patches have been landed.  Closing bug.