Bug 150964 - [EFL] Separate beforeunload confirm callback from confirm callback
Summary: [EFL] Separate beforeunload confirm callback from confirm callback
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryuan Choi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-05 17:17 PST by Ryuan Choi
Modified: 2015-11-05 20:32 PST (History)
2 users (show)

See Also:


Attachments
Patch (8.77 KB, patch)
2015-11-05 17:31 PST, Ryuan Choi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryuan Choi 2015-11-05 17:17:05 PST
Browser need to distinguish beforeunload and confirm to modify the message.

For example, Firefox does not show the message of beforeunload event.
Comment 1 Ryuan Choi 2015-11-05 17:31:34 PST
Created attachment 264904 [details]
Patch
Comment 2 Gyuyoung Kim 2015-11-05 17:47:25 PST
Comment on attachment 264904 [details]
Patch

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

> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:1060
> +        return true;

Why should we return true instead of false ?
Comment 3 Ryuan Choi 2015-11-05 18:48:04 PST
Comment on attachment 264904 [details]
Patch

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

>> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:1060
>> +        return true;
> 
> Why should we return true instead of false ?

Beforeunload confirm pannel is for webpage(author) to ask that user really want to exit the current web page when requested navigation or close webview.
So, IMO, it looks reasonable that default behavior is true, that leaves the current page or closes webview.
Comment 4 Gyuyoung Kim 2015-11-05 18:57:56 PST
Comment on attachment 264904 [details]
Patch

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

>>> Source/WebKit2/UIProcess/API/efl/EwkView.cpp:1060
>>> +        return true;
>> 
>> Why should we return true instead of false ?
> 
> Beforeunload confirm pannel is for webpage(author) to ask that user really want to exit the current web page when requested navigation or close webview.
> So, IMO, it looks reasonable that default behavior is true, that leaves the current page or closes webview.

Got it !
Comment 5 WebKit Commit Bot 2015-11-05 20:32:44 PST
Comment on attachment 264904 [details]
Patch

Clearing flags on attachment: 264904

Committed r192091: <http://trac.webkit.org/changeset/192091>
Comment 6 WebKit Commit Bot 2015-11-05 20:32:48 PST
All reviewed patches have been landed.  Closing bug.