Bug 90953

Summary: [WK2][EFL] Add policy client to Ewk_View
Product: WebKit Reporter: Chris Dumez <cdumez>
Component: WebKit2Assignee: Chris Dumez <cdumez>
Status: RESOLVED FIXED    
Severity: Normal CC: gustavo, gyuyoung.kim, kenneth, rakuco, ryuan.choi, tonikitoo, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 61838    
Attachments:
Description Flags
Patch
none
Patch
none
Patch none

Description Chris Dumez 2012-07-11 01:51:15 PDT
We need to support policy decisions in Ewk_View by defining a policy client and attaching it to the Ewk_View.
Comment 1 Chris Dumez 2012-07-11 05:44:25 PDT
Created attachment 151691 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2012-07-12 00:01:55 PDT
Comment on attachment 151691 [details]
Patch

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

> Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.cpp:44
> +    bool madePolicyDecision;

isnt it more like it is accepted? "didAccept"?

> Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h:46
> +    EWK_NAVIGATION_TYPE_LINK_CLICKED,

I prefer LINK_ACTIVATED especially since it covers a linked being tapped by a finger
Comment 3 Chris Dumez 2012-07-12 00:30:17 PDT
Comment on attachment 151691 [details]
Patch

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

>> Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.cpp:44
>> +    bool madePolicyDecision;
> 
> isnt it more like it is accepted? "didAccept"?

No, we want to know if "any" decision was made by the client (accept, reject or download). This is needed, to make a default policy decision ("accept" in this patch) in the case the client did not make an explicit decision.

>> Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h:46
>> +    EWK_NAVIGATION_TYPE_LINK_CLICKED,
> 
> I prefer LINK_ACTIVATED especially since it covers a linked being tapped by a finger

Good point. I will fix this and reupload.
Comment 4 Chris Dumez 2012-07-12 00:33:29 PDT
Created attachment 151871 [details]
Patch

Take Kenneth's feedback into consideration.
Comment 5 Kenneth Rohde Christiansen 2012-07-12 00:36:09 PDT
(In reply to comment #3)
> (From update of attachment 151691 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=151691&action=review
> 
> >> Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.cpp:44
> >> +    bool madePolicyDecision;
> > 
> > isnt it more like it is accepted? "didAccept"?
> 
> No, we want to know if "any" decision was made by the client (accept, reject or download). This is needed, to make a default policy decision ("accept" in this patch) in the case the client did not make an explicit decision.

bool clientTookDecision; might be a bit more clear

or actedUponByClient..
Comment 6 Chris Dumez 2012-07-12 00:42:37 PDT
Comment on attachment 151691 [details]
Patch

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

>>>> Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.cpp:44
>>>> +    bool madePolicyDecision;
>>> 
>>> isnt it more like it is accepted? "didAccept"?
>> 
>> No, we want to know if "any" decision was made by the client (accept, reject or download). This is needed, to make a default policy decision ("accept" in this patch) in the case the client did not make an explicit decision.
> 
> bool clientTookDecision; might be a bit more clear
> 
> or actedUponByClient..

Ok, I'll clarify.
Comment 7 Chris Dumez 2012-07-12 00:43:18 PDT
Created attachment 151873 [details]
Patch

Take Kenneth's feedback into consideration.
Comment 8 WebKit Review Bot 2012-07-12 01:35:51 PDT
Comment on attachment 151873 [details]
Patch

Clearing flags on attachment: 151873

Committed r122426: <http://trac.webkit.org/changeset/122426>
Comment 9 WebKit Review Bot 2012-07-12 01:35:57 PDT
All reviewed patches have been landed.  Closing bug.