Bug 95675 - [WK2] Provide asynchronous javascript popup api.
Summary: [WK2] Provide asynchronous javascript popup api.
Status: UNCONFIRMED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Byungwoo Lee
URL:
Keywords:
Depends on:
Blocks: 96616
  Show dependency treegraph
 
Reported: 2012-09-03 01:40 PDT by Byungwoo Lee
Modified: 2012-09-21 02:15 PDT (History)
1 user (show)

See Also:


Attachments
Patch (14.96 KB, patch)
2012-09-21 02:09 PDT, Byungwoo Lee
buildbot: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Byungwoo Lee 2012-09-03 01:40:56 PDT
Efl doesn't support modal popup or nested main loop by the platform side.

But with the current webkit implementation, an application that uses webkit should use those,
because the apis for creating alert(), confirm(), prompt() popups work as synchronously.

So application need to implements some complex way to support modal popup without platform support.

Fortunately, WK2 has a sync ipc message with delayed reply.
With applying this to the ipc messages for js popup, those apis can work as asynchronouse way on UIProcess side.
(WebProcess main run loop will be suspended until the reply for the ipc message is received.)

Async api is more flexible than sync api. It has an advantage for the platforms like efl,
and it can be used as sync way on some other platforms which can use modal popup or nested main loop.
Comment 1 Byungwoo Lee 2012-09-21 02:09:01 PDT
Created attachment 165083 [details]
Patch
Comment 2 Byungwoo Lee 2012-09-21 02:09:42 PDT
This is a partial patch for providing async api for javascript popup.
For the first step, I changed the below sync apis with delayed reply.
  Messages::WebPageProxy::RunJavaScriptAlert
  Messages::WebPageProxy::RunJavaScriptConfirm
  Messages::WebPageProxy::RunJavaScriptPrompt
Comment 3 Build Bot 2012-09-21 02:15:16 PDT
Comment on attachment 165083 [details]
Patch

Attachment 165083 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/13958507