Bug 95675

Summary: [WK2] Provide asynchronous javascript popup api.
Product: WebKit Reporter: Byungwoo Lee <bw80.lee>
Component: WebKit EFLAssignee: Byungwoo Lee <bw80.lee>
Status: UNCONFIRMED ---    
Severity: Normal CC: lucas.de.marchi
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 96616    
Attachments:
Description Flags
Patch buildbot: commit-queue-

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