1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-01-03 10:15:38 +02:00

Update to CEF 92.0.27

Fixed issue #374 : TChromium.SaveAsBitmapStream Fails
This commit is contained in:
Salvador Díaz Fau 2021-08-19 14:20:01 +02:00
parent 701406f0e8
commit b3f388709a
7 changed files with 19 additions and 19 deletions

View File

@ -3,16 +3,16 @@ CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chro
CEF4Delphi is based on DCEF3 and fpCEF3. The original license of those projects still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file. CEF4Delphi is based on DCEF3 and fpCEF3. The original license of those projects still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file.
CEF4Delphi uses CEF 92.0.26 which includes Chromium 92.0.4515.159. CEF4Delphi uses CEF 92.0.27 which includes Chromium 92.0.4515.159.
The CEF binaries used by CEF4Delphi are available for download at Spotify : The CEF binaries used by CEF4Delphi are available for download at Spotify :
* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.26%2Bg9d87c1f%2Bchromium-92.0.4515.159_windows32.tar.bz2) * [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.27%2Bg274abcf%2Bchromium-92.0.4515.159_windows32.tar.bz2)
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.26%2Bg9d87c1f%2Bchromium-92.0.4515.159_windows64.tar.bz2) * [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.27%2Bg274abcf%2Bchromium-92.0.4515.159_windows64.tar.bz2)
* [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.26%2Bg9d87c1f%2Bchromium-92.0.4515.159_linux32.tar.bz2) * [Linux x86 32 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.27%2Bg274abcf%2Bchromium-92.0.4515.159_linux32.tar.bz2)
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.26%2Bg9d87c1f%2Bchromium-92.0.4515.159_linux64.tar.bz2) * [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.27%2Bg274abcf%2Bchromium-92.0.4515.159_linux64.tar.bz2)
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.26%2Bg9d87c1f%2Bchromium-92.0.4515.159_linuxarm.tar.bz2) * [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.27%2Bg274abcf%2Bchromium-92.0.4515.159_linuxarm.tar.bz2)
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.26%2Bg9d87c1f%2Bchromium-92.0.4515.159_linuxarm64.tar.bz2) * [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.27%2Bg274abcf%2Bchromium-92.0.4515.159_linuxarm64.tar.bz2)
* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.26%2Bg9d87c1f%2Bchromium-92.0.4515.159_macosx64.tar.bz2) * [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_92.0.27%2Bg274abcf%2Bchromium-92.0.4515.159_macosx64.tar.bz2)
CEF4Delphi was developed and tested on Delphi 10.4.2 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3 and Lazarus 2.0.12/FPC 3.2.0. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. CEF4Delphi was developed and tested on Delphi 10.4.2 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3 and Lazarus 2.0.12/FPC 3.2.0. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components.

View File

@ -21,7 +21,7 @@
</CompilerOptions> </CompilerOptions>
<Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/> <Description Value="CEF4Delphi is an open source project created by Salvador Díaz Fau to embed Chromium-based browsers in applications made with Delphi or Lazarus/FPC."/>
<License Value="MPL 1.1"/> <License Value="MPL 1.1"/>
<Version Major="92" Release="26"/> <Version Major="92" Release="27"/>
<Files Count="203"> <Files Count="203">
<Item1> <Item1>
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/> <Filename Value="..\source\uCEFAccessibilityHandler.pas"/>

View File

@ -66,7 +66,7 @@ uses
const const
CEF_SUPPORTED_VERSION_MAJOR = 92; CEF_SUPPORTED_VERSION_MAJOR = 92;
CEF_SUPPORTED_VERSION_MINOR = 0; CEF_SUPPORTED_VERSION_MINOR = 0;
CEF_SUPPORTED_VERSION_RELEASE = 26; CEF_SUPPORTED_VERSION_RELEASE = 27;
CEF_SUPPORTED_VERSION_BUILD = 0; CEF_SUPPORTED_VERSION_BUILD = 0;
CEF_CHROMEELF_VERSION_MAJOR = 92; CEF_CHROMEELF_VERSION_MAJOR = 92;

View File

@ -84,7 +84,7 @@ type
procedure SetFormTopTo(const y : Integer); procedure SetFormTopTo(const y : Integer);
function CreateBrowser(const aBrowserParent : TWinControl = nil; const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual; function CreateBrowser(const aBrowserParent : TWinControl = nil; const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual;
function SaveAsBitmapStream(var aStream : TStream) : boolean; function SaveAsBitmapStream(const aStream : TStream) : boolean;
function TakeSnapshot(var aBitmap : TBitmap) : boolean; function TakeSnapshot(var aBitmap : TBitmap) : boolean;
end; end;
@ -313,7 +313,7 @@ begin
Result := inherited CreateBrowser(TempHandle, TempRect, aWindowName, aContext, aExtraInfo); Result := inherited CreateBrowser(TempHandle, TempRect, aWindowName, aContext, aExtraInfo);
end; end;
function TChromium.SaveAsBitmapStream(var aStream : TStream) : boolean; function TChromium.SaveAsBitmapStream(const aStream : TStream) : boolean;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
var var
TempDC : HDC; TempDC : HDC;

View File

@ -482,7 +482,7 @@ type
procedure WidgetCompWndProc(var aMessage: TMessage); procedure WidgetCompWndProc(var aMessage: TMessage);
procedure RenderCompWndProc(var aMessage: TMessage); procedure RenderCompWndProc(var aMessage: TMessage);
procedure RestoreOldCompWndProc; procedure RestoreOldCompWndProc;
function CopyDCToBitmapStream(aSrcDC : HDC; const aSrcRect : TRect; var aStream : TStream) : boolean; function CopyDCToBitmapStream(aSrcDC : HDC; const aSrcRect : TRect; const aStream : TStream) : boolean;
{$ENDIF} {$ENDIF}
procedure DragDropManager_OnDragEnter(Sender: TObject; const aDragData : ICefDragData; grfKeyState: Longint; pt: TPoint; var dwEffect: Longint); procedure DragDropManager_OnDragEnter(Sender: TObject; const aDragData : ICefDragData; grfKeyState: Longint; pt: TPoint; var dwEffect: Longint);
@ -6796,7 +6796,7 @@ begin
end; end;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
function TChromiumCore.CopyDCToBitmapStream(aSrcDC : HDC; const aSrcRect : TRect; var aStream : TStream) : boolean; function TChromiumCore.CopyDCToBitmapStream(aSrcDC : HDC; const aSrcRect : TRect; const aStream : TStream) : boolean;
var var
TempDstDC : HDC; TempDstDC : HDC;
TempWidth : Integer; TempWidth : Integer;

View File

@ -73,7 +73,7 @@ type
procedure SetFormTopTo(const y : Integer); procedure SetFormTopTo(const y : Integer);
function CreateBrowser(const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual; function CreateBrowser(const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual;
function SaveAsBitmapStream(var aStream : TStream; const aRect : System.Types.TRect) : boolean; function SaveAsBitmapStream(const aStream : TStream; const aRect : System.Types.TRect) : boolean;
function TakeSnapshot(var aBitmap : TBitmap; const aRect : System.Types.TRect) : boolean; function TakeSnapshot(var aBitmap : TBitmap; const aRect : System.Types.TRect) : boolean;
property ScreenScale : single read GetScreenScale; property ScreenScale : single read GetScreenScale;
@ -313,7 +313,7 @@ begin
{$ENDIF} {$ENDIF}
end; end;
function TFMXChromium.SaveAsBitmapStream(var aStream : TStream; const aRect : System.Types.TRect) : boolean; function TFMXChromium.SaveAsBitmapStream(const aStream : TStream; const aRect : System.Types.TRect) : boolean;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
var var
TempDC : HDC; TempDC : HDC;
@ -351,7 +351,7 @@ begin
try try
TempStream := TMemoryStream.Create; TempStream := TMemoryStream.Create;
if SaveAsBitmapStream(TStream(TempStream), aRect) then if SaveAsBitmapStream(TempStream, aRect) then
begin begin
aBitmap.LoadFromStream(TempStream); aBitmap.LoadFromStream(TempStream);
Result := True; Result := True;

View File

@ -2,9 +2,9 @@
"UpdateLazPackages" : [ "UpdateLazPackages" : [
{ {
"ForceNotify" : true, "ForceNotify" : true,
"InternalVersion" : 314, "InternalVersion" : 315,
"Name" : "cef4delphi_lazarus.lpk", "Name" : "cef4delphi_lazarus.lpk",
"Version" : "92.0.26.0" "Version" : "92.0.27.0"
} }
], ],
"UpdatePackageData" : { "UpdatePackageData" : {