Enhance createPopup() API to support key callback
authorJihoon Chung <jihoon.chung@samsaung.com>
Wed, 2 Oct 2013 02:57:14 +0000 (11:57 +0900)
committerHoseon LEE <hoseon46.lee@samsung.com>
Mon, 14 Oct 2013 11:19:44 +0000 (20:19 +0900)
commit0a5fc0a64f29bacf7dc0c5db8812a9baca1230e8
tree89816e08b3b1a131d2718bceb68c40cc5da055b5
parent08cc23cd54de44356a324fc8dd86ea8f61eb8023
Enhance createPopup() API to support key callback

[Issue#]   N/A
[Problem]  A web page underneath pop-up moves to the previous page when user expects the pop-up closed.
           This happens when a user select back-key when the permission request pop-up is on the screen.
[Cause]    Permission request pop-up does not handle the key callback.
           Moreover, the key event (which is not consumed) is passed onto the webview evas_object.
           As a result, the default behavior (i.e. dispatch tizenhwkey event) happens.
[Solution] Add key callback handler to popup evas_object.
           Destory popup and pass "deny" to webkit that waits permission request result,
           when Back-key event callback is called.

[SCMRequest] Needed by https://review.tizendev.org/gerrit/#/c/88381/

[Remarks] Implementation details
    * CertificateSupportUtil::createPopup extend an argument to receive key callback.
      (Evas_Smart_Cb keyCallback)
    * Add "EVAS_CALLBACK_DEL" callback to remove before popup is removed.
      This behavior will prevent crash.
      Sometimes ecore dispatch event which is in the queue even callback data is already released.

Change-Id: I48b09e85db36da9f9ca27a38e7a08ed27b29cbbc
src/view/common/view_logic_certificate_support.cpp
src/view/common/view_logic_certificate_support.h [changed mode: 0755->0644]
src/view/webkit/view_logic_certificate_confirm_support.cpp [changed mode: 0755->0644]