[Webkit-unassigned] [Bug 40036] Make WebChromeClient::closeWindowSoon work for all RunLoop modes

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Jun 7 09:36:02 PDT 2010


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





--- Comment #4 from Prasad Tammana <prasadt at chromium.org>  2010-06-07 09:36:00 PST ---
(In reply to comment #3)
> (From update of attachment 57611 [details])
> I don’t think this change is correct or helpful. For example, I don’t think we want to close a window and run all the code that triggers inside an NSConnectionReply modal event loop.
> 
> I don’t understand the benefit side of this patch either.

When you write a WebKit application that implements showModalDialog, you don't have a way to close the window from script.  The close call ends up in the closeWindowSoon() function and the _closeWindow() doesn't get dispatched because the run loop is in NSModalPanelRunLoopMode mode.

I didn't realize that dispatching these calls is inappropriate in certain modes.  I could make this fix more targeted and make it to be:

[m_webView performSelector:@selector(_closeWindow) withObject:nil afterDelay:0.0
        inModes:[NSArray arrayWithObjects:NSDefaultRunLoopMode, NSModalPanelRunLoopMode]];

With that change the only new mode we'll be closing windows would be in NSModalPanelRunLoopMode.  Does that seem like a correct change?

I ran into this issue when adding showModalDialog to DumpRenderTree as part of the bug fix for - https://bugs.webkit.org/show_bug.cgi?id=35350.  You'll notice I have a patch attached to that bug that includes this change.  I decided to factor out this particular change into a separate patch as this is the more sensitive part of that big patch.


Thanks,
Prasad

-- 
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