1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-01-13 10:22:04 +02:00

Added default view rect values in OSR mode

This commit is contained in:
Salvador Díaz Fau 2019-01-20 09:50:32 +01:00
parent 9e12b2258b
commit 2a82206be3

View File

@ -156,6 +156,10 @@ begin
if (TempObject <> nil) and (TempObject is TCefRenderHandlerOwn) then
TCefRenderHandlerOwn(TempObject).GetViewRect(TCefBrowserRef.UnWrap(browser),
rect^);
// CEF3 needs a rect with valid height and width
if (rect^.width <= 0) then rect^.width := 800;
if (rect^.height <= 0) then rect^.height := 600;
end;
function cef_render_handler_get_screen_point(self : PCefRenderHandler;