Bug 92228

Summary: [WK2][WTR] LayoutTestController.deliverWebIntent() needs to be implemented
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    
Attachments:
Description Flags
Patch
webkit-ews: commit-queue-
Patch
andersca: review-, andersca: commit-queue-
Patch
none
Patch none

Description Chris Dumez 2012-07-25 01:19:13 PDT
The following web intents test rely on LayoutTestController.deliverWebIntent():
  webintents/web-intents-delivery.html

The tests is now failing on WebKit2 WTR because LayoutTestController.deliverWebIntent() is undefined.
Comment 1 Chris Dumez 2012-07-25 04:01:56 PDT
Created attachment 154318 [details]
Patch
Comment 2 Early Warning System Bot 2012-07-25 04:46:25 PDT
Comment on attachment 154318 [details]
Patch

Attachment 154318 [details] did not pass qt-wk2-ews (qt):
Output: http://queues.webkit.org/results/13361015
Comment 3 Chris Dumez 2012-07-25 04:53:22 PDT
Created attachment 154326 [details]
Patch

Should fix build on other ports than EFL.
Comment 4 Anders Carlsson 2012-07-25 10:32:09 PDT
Comment on attachment 154326 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=154326&action=review

> Source/WebKit2/UIProcess/API/C/WKIntentData.cpp:48
> +WKIntentDataRef WKIntentDataCreate(WKIntentData wkIntentData)

Please make WKIntentDataCreate take the action, type and data as individual parameters instead of using a struct.

> Source/WebKit2/UIProcess/API/C/WKIntentData.h:40
> +struct WKIntentData {
> +    WKStringRef action;
> +    WKStringRef type;
> +    WKSerializedScriptValueRef data;
> +};
> +typedef struct WKIntentData WKIntentData;

Having a struct with public members like this is bad from a memory management standpoint.
Comment 5 Chris Dumez 2012-07-25 11:49:46 PDT
Created attachment 154408 [details]
Patch

Use a WKDictionary instead of a structure as initialization argument, as discussed with andersca on IRC. I'm trying to avoid using distinct function arguments because we may choose to pass more initialization parameters in the future. Using a dictionary is more easily extensible and would not break API compatibility.
Comment 6 Chris Dumez 2012-07-25 13:41:05 PDT
Created attachment 154430 [details]
Patch

Rebase on master.
Comment 7 WebKit Review Bot 2012-07-27 13:10:35 PDT
Comment on attachment 154430 [details]
Patch

Clearing flags on attachment: 154430

Committed r123911: <http://trac.webkit.org/changeset/123911>
Comment 8 WebKit Review Bot 2012-07-27 13:10:40 PDT
All reviewed patches have been landed.  Closing bug.