Enhance createPopup() API to support key callback
authorJihoon Chung <jihoon.chung@samsaung.com>
Fri, 27 Sep 2013 10:37:36 +0000 (19:37 +0900)
committerHoseon LEE <hoseon46.lee@samsung.com>
Mon, 14 Oct 2013 11:18:27 +0000 (20:18 +0900)
commit04133d355a187d115d03f1e475a2db8ec606230c
tree3fff19b7abb818f7abcaaafeb0f8fffe1af4b89a
parent1d90fd45baed741efa967fe63e80ac5667f6a79d
Enhance createPopup() API to support key callback

[Issue#]   P130927-03479
[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://tizendev.org/gerrit/#/c/91230/

[Remarks] Implementation details
    * SecurityOriginSupportUtil::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: I4aeaf6ee4e2a9219ec3fd27c886673a2ba88a452
src/view/common/CMakeLists.txt
src/view/common/view_logic_security_origin_support.cpp
src/view/common/view_logic_security_origin_support.h
src/view/webkit/view_logic_geolocation_support.cpp
src/view/webkit/view_logic_web_notification_permission_support.cpp
src/view/webkit/view_logic_web_storage_support.cpp