1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-06-02 21:57:37 +02:00

Update to CEF 80.1.14

This commit is contained in:
Salvador Díaz Fau 2020-04-03 17:57:52 +02:00
parent 45db1a3ef9
commit c55283acb1
10 changed files with 110 additions and 101 deletions

View File

@ -3,10 +3,10 @@ CEF4Delphi is an open source project created by Salvador D
CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file. CEF4Delphi is based on DCEF3, made by Henri Gourvest. The original license of DCEF3 still applies to CEF4Delphi. Read the license terms in the first lines of any *.pas file.
CEF4Delphi uses CEF 80.1.4 which includes Chromium 80.0.3987.149. CEF4Delphi uses CEF 80.1.14 which includes Chromium 80.0.3987.149.
The CEF binaries used by CEF4Delphi are available for download at spotify : The CEF binaries used by CEF4Delphi are available for download at spotify :
* [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_80.1.4%2Bg8927396%2Bchromium-80.0.3987.149_windows32.tar.bz2) * [32 bits](http://opensource.spotify.com/cefbuilds/cef_binary_80.1.14%2Bga33bdbc%2Bchromium-80.0.3987.149_windows32.tar.bz2)
* [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_80.1.4%2Bg8927396%2Bchromium-80.0.3987.149_windows64.tar.bz2) * [64 bits](http://opensource.spotify.com/cefbuilds/cef_binary_80.1.14%2Bga33bdbc%2Bchromium-80.0.3987.149_windows64.tar.bz2)
CEF4Delphi was developed and tested on Delphi 10.3 Rio and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.6/FPC 3.0.4. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. CEF4Delphi was developed and tested on Delphi 10.3 Rio and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2 and Lazarus 2.0.6/FPC 3.0.4. 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="80" Minor="1" Release="4"/> <Version Major="80" Minor="1" Release="14"/>
<Files Count="156"> <Files Count="156">
<Item1> <Item1>
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/> <Filename Value="..\source\uCEFAccessibilityHandler.pas"/>

View File

@ -62,7 +62,7 @@ uses
const const
CEF_SUPPORTED_VERSION_MAJOR = 80; CEF_SUPPORTED_VERSION_MAJOR = 80;
CEF_SUPPORTED_VERSION_MINOR = 1; CEF_SUPPORTED_VERSION_MINOR = 1;
CEF_SUPPORTED_VERSION_RELEASE = 4; CEF_SUPPORTED_VERSION_RELEASE = 14;
CEF_SUPPORTED_VERSION_BUILD = 0; CEF_SUPPORTED_VERSION_BUILD = 0;
CEF_CHROMEELF_VERSION_MAJOR = 80; CEF_CHROMEELF_VERSION_MAJOR = 80;

View File

@ -402,8 +402,8 @@ begin
end; end;
function TBufferPanel.CopyBuffer : boolean; function TBufferPanel.CopyBuffer : boolean;
var
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
var
TempFunction : TBlendFunction; TempFunction : TBlendFunction;
{$ENDIF} {$ENDIF}
begin begin

View File

@ -50,7 +50,8 @@ interface
uses uses
{$IFDEF DELPHI16_UP} {$IFDEF DELPHI16_UP}
{$IFDEF MSWINDOWS}WinApi.Windows, WinApi.Messages, WinApi.ActiveX, WinApi.CommCtrl,{$ENDIF} System.Classes, System.SyncObjs, {$IFDEF MSWINDOWS}WinApi.Windows, WinApi.Messages, WinApi.ActiveX, WinApi.CommCtrl,{$ENDIF}
System.Classes, System.SyncObjs, System.Types,
{$ELSE} {$ELSE}
{$IFDEF MSWINDOWS}Windows, ActiveX, CommCtrl,{$ENDIF} Classes, {$IFDEF MSWINDOWS}Windows, ActiveX, CommCtrl,{$ENDIF} Classes,
{$IFDEF FPC} {$IFDEF FPC}
@ -570,6 +571,7 @@ type
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
procedure InitializeDragAndDrop(const aDropTargetWnd : HWND); procedure InitializeDragAndDrop(const aDropTargetWnd : HWND);
procedure ShutdownDragAndDrop; procedure ShutdownDragAndDrop;
function SetNewBrowserParent(aNewParentHwnd : HWND) : boolean;
{$ENDIF MSWINDOWS} {$ENDIF MSWINDOWS}
function CreateBrowser(aParentHandle : TCefWindowHandle; aParentRect : TRect; const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual; function CreateBrowser(aParentHandle : TCefWindowHandle; aParentRect : TRect; const aWindowName : ustring = ''; const aContext : ICefRequestContext = nil; const aExtraInfo : ICefDictionaryValue = nil) : boolean; overload; virtual;
@ -611,7 +613,6 @@ type
procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; const aFrameIdentifier : int64; aStartLine : integer = 0); overload; procedure ExecuteJavaScript(const aCode, aScriptURL : ustring; const aFrameIdentifier : int64; aStartLine : integer = 0); overload;
procedure UpdatePreferences; procedure UpdatePreferences;
procedure SavePreferences(const aFileName : string); procedure SavePreferences(const aFileName : string);
function SetNewBrowserParent(aNewParentHwnd : HWND) : boolean;
procedure ResolveHost(const aURL : ustring); procedure ResolveHost(const aURL : ustring);
function IsSameBrowser(const aBrowser : ICefBrowser) : boolean; function IsSameBrowser(const aBrowser : ICefBrowser) : boolean;
function ExecuteTaskOnCefThread(aCefThreadId : TCefThreadId; aTaskID : cardinal; aDelayMs : Int64 = 0) : boolean; function ExecuteTaskOnCefThread(aCefThreadId : TCefThreadId; aTaskID : cardinal; aDelayMs : Int64 = 0) : boolean;
@ -1464,7 +1465,7 @@ begin
(FBrowserId = 0) and (FBrowserId = 0) and
(GlobalCEFApp <> nil) and (GlobalCEFApp <> nil) and
GlobalCEFApp.GlobalContextInitialized and GlobalCEFApp.GlobalContextInitialized and
CreateClientHandler(aParentHandle = 0) then CreateClientHandler(not(ValidCefWindowHandle(aParentHandle))) then
begin begin
GetSettings(FBrowserSettings); GetSettings(FBrowserSettings);
InitializeWindowInfo(aParentHandle, aParentRect, aWindowName); InitializeWindowInfo(aParentHandle, aParentRect, aWindowName);
@ -1519,13 +1520,12 @@ procedure TChromiumCore.DefaultInitializeDevToolsWindowInfo( aDevToolsWnd :
const aClientRect : TRect; const aClientRect : TRect;
const aWindowName : ustring); const aWindowName : ustring);
begin begin
if (ValidCefWindowHandle(aDevToolsWnd)) then
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
if (aDevToolsWnd <> 0) then
WindowInfoAsChild(FDevWindowInfo, aDevToolsWnd, aClientRect, aWindowName) WindowInfoAsChild(FDevWindowInfo, aDevToolsWnd, aClientRect, aWindowName)
else else
WindowInfoAsPopUp(FDevWindowInfo, WindowHandle, DEVTOOLS_WINDOWNAME); WindowInfoAsPopUp(FDevWindowInfo, WindowHandle, DEVTOOLS_WINDOWNAME);
{$ELSE} {$ELSE}
if (aDevToolsWnd <> 0) then
WindowInfoAsChild(FDevWindowInfo, aDevToolsWnd, aClientRect) WindowInfoAsChild(FDevWindowInfo, aDevToolsWnd, aClientRect)
else else
WindowInfoAsPopUp(FDevWindowInfo, WindowHandle); WindowInfoAsPopUp(FDevWindowInfo, WindowHandle);
@ -3119,22 +3119,20 @@ begin
end; end;
end; end;
function TChromiumCore.SetNewBrowserParent(aNewParentHwnd : HWND) : boolean;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
function TChromiumCore.SetNewBrowserParent(aNewParentHwnd : HWND) : boolean;
var var
TempHandle : HWND; TempHandle : HWND;
{$ENDIF}
begin begin
Result := False; Result := False;
{$IFDEF MSWINDOWS}
if Initialized then if Initialized then
begin begin
TempHandle := FBrowser.Host.WindowHandle; TempHandle := FBrowser.Host.WindowHandle;
Result := (TempHandle <> 0) and (SetParent(TempHandle, aNewParentHwnd) <> 0); Result := (TempHandle <> 0) and (SetParent(TempHandle, aNewParentHwnd) <> 0);
end; end;
{$ENDIF}
end; end;
{$ENDIF}
procedure TChromiumCore.ResolveHost(const aURL : ustring); procedure TChromiumCore.ResolveHost(const aURL : ustring);
var var

View File

@ -424,8 +424,7 @@ const
UU_SPACES = 1 shl 1; UU_SPACES = 1 shl 1;
UU_PATH_SEPARATORS = 1 shl 2; UU_PATH_SEPARATORS = 1 shl 2;
UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = 1 shl 3; UU_URL_SPECIAL_CHARS_EXCEPT_PATH_SEPARATORS = 1 shl 3;
UU_SPOOFING_AND_CONTROL_CHARS = 1 shl 4; UU_REPLACE_PLUS_WITH_SPACE = 1 shl 4;
UU_REPLACE_PLUS_WITH_SPACE = 1 shl 5;
// /include/internal/cef_types.h (cef_menu_id_t) // /include/internal/cef_types.h (cef_menu_id_t)
MENU_ID_BACK = 100; MENU_ID_BACK = 100;
@ -630,9 +629,8 @@ const
CEF_IMAGE_FILE_MACHINE_I386 = $014C; CEF_IMAGE_FILE_MACHINE_I386 = $014C;
CEF_IMAGE_FILE_MACHINE_AMD64 = $8664; CEF_IMAGE_FILE_MACHINE_AMD64 = $8664;
{$IFDEF FPC}
USER_DEFAULT_SCREEN_DPI = 96; USER_DEFAULT_SCREEN_DPI = 96;
{$ENDIF}
implementation implementation
end. end.

View File

@ -377,14 +377,18 @@ begin
end; end;
function TFMXBufferPanel.GetScreenScale : Single; function TFMXBufferPanel.GetScreenScale : Single;
{$IFDEF MSWINDOWS}
var var
TempHandle : TCefWindowHandle; TempHandle : TCefWindowHandle;
{$ENDIF}
begin begin
{$IFDEF MSWINDOWS}
TempHandle := GetParentFormHandle; TempHandle := GetParentFormHandle;
if (TempHandle <> 0) then if (TempHandle <> 0) then
Result := GetWndScale(TempHandle) Result := GetWndScale(TempHandle)
else else
{$ENDIF}
if (GlobalCEFApp <> nil) then if (GlobalCEFApp <> nil) then
Result := GlobalCEFApp.DeviceScaleFactor Result := GlobalCEFApp.DeviceScaleFactor
else else

View File

@ -53,11 +53,12 @@ uses
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
WinApi.Windows, WinApi.ActiveX, {$IFDEF FMX}FMX.Types,{$ENDIF} WinApi.Windows, WinApi.ActiveX, {$IFDEF FMX}FMX.Types,{$ENDIF}
{$ELSE} {$ELSE}
System.Types, {$IFDEF FMX}FMX.Types,{$ENDIF} {$IFDEF MACOS}Macapi.Foundation, FMX.Helpers.Mac,{$ENDIF} {$IFDEF FMX}FMX.Types,{$ENDIF} {$IFDEF MACOS}Macapi.Foundation, FMX.Helpers.Mac,{$ENDIF}
{$ENDIF} {$ENDIF}
System.IOUtils, System.Classes, System.SysUtils, System.UITypes, System.Math, System.Types, System.IOUtils, System.Classes, System.SysUtils, System.UITypes, System.Math,
{$ELSE} {$ELSE}
{$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF} {$IFDEF DELPHI14_UP}IOUtils,{$ENDIF} Classes, SysUtils, Math, {$IFDEF MSWINDOWS}Windows, ActiveX,{$ENDIF}
{$IFDEF DELPHI14_UP}Types, IOUtils,{$ENDIF} Classes, SysUtils, Math,
{$IFDEF FPC}LCLType,{$IFNDEF MSWINDOWS}InterfaceBase, Forms,{$ENDIF}{$ENDIF} {$IFDEF FPC}LCLType,{$IFNDEF MSWINDOWS}InterfaceBase, Forms,{$ENDIF}{$ENDIF}
{$ENDIF} {$ENDIF}
uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFResourceHandler, uCEFTypes, uCEFInterfaces, uCEFLibFunctions, uCEFResourceHandler,
@ -295,14 +296,13 @@ function MoveFileList(const aFileList : TStringList; const aSrcDirectory, aDstDi
function CefGetDataURI(const aString, aMimeType : ustring) : ustring; overload; function CefGetDataURI(const aString, aMimeType : ustring) : ustring; overload;
function CefGetDataURI(aData : pointer; aSize : integer; const aMimeType : ustring; const aCharset : ustring = '') : ustring; overload; function CefGetDataURI(aData : pointer; aSize : integer; const aMimeType : ustring; const aCharset : ustring = '') : ustring; overload;
function ValidCefWindowHandle(aHandle : TCefWindowHandle) : boolean;
implementation implementation
uses uses
{$IFDEF DELPHI16_UP} {$IFNDEF DELPHI16_UP}
System.Types,
{$ELSE}
{$IFDEF DELPHI14_UP}Types,{$ENDIF} {$IFDEF DELPHI14_UP}Types,{$ENDIF}
{$ENDIF} {$ENDIF}
uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue, uCEFApplicationCore, uCEFSchemeHandlerFactory, uCEFValue,
@ -2334,4 +2334,13 @@ begin
Result := Result + ';base64,' + CefURIEncode(CefBase64Encode(aData, aSize), false); Result := Result + ';base64,' + CefURIEncode(CefBase64Encode(aData, aSize), false);
end; end;
function ValidCefWindowHandle(aHandle : TCefWindowHandle) : boolean;
begin
{$IFDEF MACOS}
Result := (aHandle <> nil);
{$ELSE}
Result := (aHandle <> 0);
{$ENDIF}
end;
end. end.

View File

@ -2,9 +2,9 @@
"UpdateLazPackages" : [ "UpdateLazPackages" : [
{ {
"ForceNotify" : true, "ForceNotify" : true,
"InternalVersion" : 112, "InternalVersion" : 113,
"Name" : "cef4delphi_lazarus.lpk", "Name" : "cef4delphi_lazarus.lpk",
"Version" : "80.1.4.0" "Version" : "80.1.14.0"
} }
], ],
"UpdatePackageData" : { "UpdatePackageData" : {