[webkit-reviews] review canceled: [Bug 79500] [GTK] Add support for window.showModalDialog in WebKit2GTK+ : [Attachment 128750] Patch proposal + Unit test

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 28 09:04:44 PST 2012


Mario Sanchez Prada <msanchez at igalia.com> has canceled Mario Sanchez Prada
<msanchez at igalia.com>'s request for review:
Bug 79500: [GTK] Add support for window.showModalDialog in WebKit2GTK+
https://bugs.webkit.org/show_bug.cgi?id=79500

Attachment 128750: Patch proposal + Unit test
https://bugs.webkit.org/attachment.cgi?id=128750&action=review

------- Additional Comments from Mario Sanchez Prada <msanchez at igalia.com>
(In reply to comment #7)
> [...]
> So, all things considered, Carlos had what I think it was a really good idea:
as this is a global feature and the 
> decision is ultimately made based on having defined in the port the
WebUIClieng::runModal() function, we 
> could perhaps add a new setting to the WebKitWebContext that would be checked
to decide whether to 
> implement or not runModal in attachUIClientToView(), which is called whenever
a WebView is constructed.

So, turned out that at the end I haven't follow that approach because I found
something out I didn't know of before: it is actually possible to change the
value of the canRunModal attribute in the WebPage from the UIProcess, as
there's even a message already defined for that: SetCanRunCommand, which is
already used in WebKit::WebPageProxy::initializeUIClient(). The only thing we'd
need would be to add some public functions in WebPageProxy so we can query and
set the canRunModal attribute in the WebPage from the WebKitWebView, so I went
ahead and wrote this new patch, which precisely address the issue doing that.

Also, I found out another important thing too: canRunModal is used in the web
process to call runModal in the UI client, _but also to create the new page_
(the modal dialog), which means that if this attribute is set to false no
dialog will be created (so it's not jsut a matter of the dialog being modal or
not, as I thought in principle). So, I took this into account as well when
writing the unit tests and now we have two of them: one to check that the
'create', 'ready-to-show' and 'run-as-modal' are emitted when allowing modal
dialogs (new API added for this in WebKitWebView too) and another one to check
that no signal is emitted if not allowed (as no dialog will be ever created).


More information about the webkit-reviews mailing list