- Restore missing call to OnBeforeClose().
- Fix assertion when closing popup windows.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@264 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-07-03 02:00:01 +00:00
parent da210afca7
commit 1542dbe053
2 changed files with 12 additions and 0 deletions

View File

@ -700,6 +700,15 @@ void CefBrowserImpl::UIT_DestroyBrowser()
} }
} }
} }
#else
// Call OnBeforeClose() here for platforms that don't support modal dialogs.
if (client_.get()) {
CefRefPtr<CefLifeSpanHandler> handler = client_->GetLifeSpanHandler();
if (handler.get()) {
// Notify the handler that the window is about to be closed.
handler->OnBeforeClose(this);
}
}
#endif #endif
UIT_GetWebViewDelegate()->RevokeDragDrop(); UIT_GetWebViewDelegate()->RevokeDragDrop();

View File

@ -91,6 +91,9 @@ WebRect BrowserWebViewDelegate::windowResizerRect() {
if (host) { if (host) {
NSView *view = host->view_handle(); NSView *view = host->view_handle();
NSWindow* window = [view window]; NSWindow* window = [view window];
if (window == nil)
return gfx::Rect();
resize_rect = [window _growBoxRect]; resize_rect = [window _growBoxRect];
// The scrollbar assumes that the resizer goes all the way down to the // The scrollbar assumes that the resizer goes all the way down to the
// bottom corner, so we ignore any y offset to the rect itself and use the // bottom corner, so we ignore any y offset to the rect itself and use the