[Webkit-unassigned] [Bug 35350] DumpRenderTree should allow tests with modal dialogs

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 14 17:40:37 PDT 2010


https://bugs.webkit.org/show_bug.cgi?id=35350





--- Comment #10 from Prasad Tammana <prasadt at chromium.org>  2010-06-14 17:40:35 PST ---
(In reply to comment #9)
> (In reply to comment #8)
> > (In reply to comment #7)
> 
> > > Its a whole another thing if you think we shouldn't be able to close showModalDialog from script
> > 
> > Does closing the dialog work in Internet Explorer? Since showModalDialog originates there, I’d like to match its behavior if possible.
> 
> I just tested this on IE - closing showModalDialog from script works on IE.  Interestingly closing showModalDialog from script also works on Safari.  Seems like Safari does not go through WebChromeClient::closeWindowSoon() when closing modal dialogs.  So its just applications that rely on WebChromeClient that are not able to close modal dialogs from script.

I just debugged Safari to confirm what I said above regarding Safari not going through WebChromeClient::closeWindowSoon().  Turns out I'm wrong and Safari does use WebChromeClient and WebChromeClient::closeWindowSoon() does get called.  I looked in the debugger to see the current run loop mode at that point and its kCFRunLoopDefaultMode, and runModalForWindow() is on the stack.  Seems like Safari is overriding NSApplication to make performSelector succeed, just as you suggested to me.

As I said, I was getting a random crash after calling abortModal() when I tried that.  You can see exactly what I'm trying to do in my changes to WebKitTools/DumpRenderTree/mac/UIDelegate.mm in the patch.  Would you know if Safari does something different in its UIDelegate to break out of the runModalForWindow() call?

I guess I have more digging to do to see why I'd get this random crash and not Safari...  or go with what was working for me and add abortModal function to LayoutTestController and make it available for script.  Appreciate any thoughts.  Thanks.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list