Clarify expectations for CefRenderHandler::GetViewRect (issue #1910)

This commit is contained in:
Marshall Greenblatt
2018-09-25 15:40:02 +02:00
parent 64cd460c73
commit 09afa3a843
17 changed files with 100 additions and 99 deletions

View File

@@ -50,12 +50,15 @@ bool ClientHandlerOsr::GetRootScreenRect(CefRefPtr<CefBrowser> browser,
return osr_delegate_->GetRootScreenRect(browser, rect);
}
bool ClientHandlerOsr::GetViewRect(CefRefPtr<CefBrowser> browser,
void ClientHandlerOsr::GetViewRect(CefRefPtr<CefBrowser> browser,
CefRect& rect) {
CEF_REQUIRE_UI_THREAD();
if (!osr_delegate_)
return false;
return osr_delegate_->GetViewRect(browser, rect);
if (!osr_delegate_) {
// Never return an empty rectangle.
rect.width = rect.height = 1;
return;
}
osr_delegate_->GetViewRect(browser, rect);
}
bool ClientHandlerOsr::GetScreenPoint(CefRefPtr<CefBrowser> browser,