hi,
i use the qt webkit port,
found the these code:
closeWindowSoon just call the client, and let the client make decision
void Chrome::closeWindowSoon()
{
m_client->closeWindowSoon();
}
void ChromeClientQt::closeWindowSoon()
{
m_webPage->mainFrame()->d->frame->loader()->stopAllLoaders();
emit m_webPage->windowCloseRequested();
}
the function ChromeClientQt::closeWindowSoon doesn't really close the window
and left it to the user.
so, in the qt webkit port, you can safely ignore this request and the
window will still open.
if you want the user to decide close the window or not, just connect this
signal to your own slot,this can be found in
the qt's demo browser:
void TabWidget::windowCloseRequested()
{
DBUG_ENTER();
WebPage *webPage = qobject_cast<WebPage*>(sender());
WebView *webView = qobject_cast<WebView*>(webPage->view());
int index = webViewIndex(webView);
if (index >= 0) {
if (count() == 1)
{
qDebug()<<"close window";
//webView->webPage()->mainWindow()->close();
// raise a messagebox to tell the user here
}
else
closeTab(index);
}
}
wish it help.
_______________________________________________
webkit-help mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-help