1
0
mirror of https://github.com/salvadordf/CEF4Delphi.git synced 2025-05-23 21:50:21 +02:00

Update to CEF 113.3.1

This commit is contained in:
salvadordf 2023-05-29 17:20:32 +02:00
parent 42d8ba4f85
commit 9e7da7a03e
11 changed files with 101 additions and 40 deletions

View File

@ -3,15 +3,14 @@ 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 113.1.5 which includes Chromium 113.0.5672.93. CEF4Delphi uses CEF 113.3.1 which includes Chromium 113.0.5672.128.
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_113.1.5%2Bge452d82%2Bchromium-113.0.5672.93_windows32.tar.bz2) * [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_113.3.1%2Bg525fa10%2Bchromium-113.0.5672.128_windows32.tar.bz2)
* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_113.1.5%2Bge452d82%2Bchromium-113.0.5672.93_windows64.tar.bz2) * [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_113.3.1%2Bg525fa10%2Bchromium-113.0.5672.128_windows64.tar.bz2)
* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_113.1.5%2Bge452d82%2Bchromium-113.0.5672.93_linux64.tar.bz2) * [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_113.3.1%2Bg525fa10%2Bchromium-113.0.5672.128_linux64.tar.bz2)
* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_113.1.5%2Bge452d82%2Bchromium-113.0.5672.93_linuxarm.tar.bz2) * [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_113.3.1%2Bg525fa10%2Bchromium-113.0.5672.128_linuxarm64.tar.bz2)
* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_113.1.5%2Bge452d82%2Bchromium-113.0.5672.93_linuxarm64.tar.bz2) * [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_113.3.1%2Bg525fa10%2Bchromium-113.0.5672.128_macosx64.tar.bz2)
* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_113.1.5%2Bge452d82%2Bchromium-113.0.5672.93_macosx64.tar.bz2)
CEF4Delphi was developed and tested on Delphi 11.3 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3, Delphi 10.4 and Lazarus 2.2.6/FPC 3.2.2. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. CEF4Delphi was developed and tested on Delphi 11.3 and it has been tested in Delphi 7, Delphi XE, Delphi 10, Delphi 10.2, Delphi 10.3, Delphi 10.4 and Lazarus 2.2.6/FPC 3.2.2. 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="113" Minor="1" Release="5"/> <Version Major="113" Minor="3" Release="1"/>
<Files Count="214"> <Files Count="214">
<Item1> <Item1>
<Filename Value="..\source\uCEFAccessibilityHandler.pas"/> <Filename Value="..\source\uCEFAccessibilityHandler.pas"/>

View File

@ -72,6 +72,7 @@ type
FOnGetDelegateForPopupBrowserView : TOnGetDelegateForPopupBrowserViewEvent; FOnGetDelegateForPopupBrowserView : TOnGetDelegateForPopupBrowserViewEvent;
FOnPopupBrowserViewCreated : TOnPopupBrowserViewCreatedEvent; FOnPopupBrowserViewCreated : TOnPopupBrowserViewCreatedEvent;
FOnGetChromeToolbarType : TOnGetChromeToolbarTypeEvent; FOnGetChromeToolbarType : TOnGetChromeToolbarTypeEvent;
FOnGestureCommand : TOnGestureCommandEvent;
procedure DestroyView; override; procedure DestroyView; override;
procedure Initialize; override; procedure Initialize; override;
@ -87,6 +88,7 @@ type
procedure doOnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); procedure doOnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
procedure doOnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); procedure doOnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
procedure doOnGetChromeToolbarType(var aChromeToolbarType: TCefChromeToolbarType); procedure doOnGetChromeToolbarType(var aChromeToolbarType: TCefChromeToolbarType);
procedure doOnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
public public
function CreateBrowserView(const client: ICefClient; const url: ustring; const settings: TCefBrowserSettings; const extra_info: ICefDictionaryValue; const request_context: ICefRequestContext): boolean; function CreateBrowserView(const client: ICefClient; const url: ustring; const settings: TCefBrowserSettings; const extra_info: ICefDictionaryValue; const request_context: ICefRequestContext): boolean;
@ -102,6 +104,7 @@ type
property OnGetDelegateForPopupBrowserView : TOnGetDelegateForPopupBrowserViewEvent read FOnGetDelegateForPopupBrowserView write FOnGetDelegateForPopupBrowserView; property OnGetDelegateForPopupBrowserView : TOnGetDelegateForPopupBrowserViewEvent read FOnGetDelegateForPopupBrowserView write FOnGetDelegateForPopupBrowserView;
property OnPopupBrowserViewCreated : TOnPopupBrowserViewCreatedEvent read FOnPopupBrowserViewCreated write FOnPopupBrowserViewCreated; property OnPopupBrowserViewCreated : TOnPopupBrowserViewCreatedEvent read FOnPopupBrowserViewCreated write FOnPopupBrowserViewCreated;
property OnGetChromeToolbarType : TOnGetChromeToolbarTypeEvent read FOnGetChromeToolbarType write FOnGetChromeToolbarType; property OnGetChromeToolbarType : TOnGetChromeToolbarTypeEvent read FOnGetChromeToolbarType write FOnGetChromeToolbarType;
property OnGestureCommand : TOnGestureCommandEvent read FOnGestureCommand write FOnGestureCommand;
end; end;
{$IFDEF FPC} {$IFDEF FPC}
@ -151,6 +154,7 @@ begin
FOnGetDelegateForPopupBrowserView := nil; FOnGetDelegateForPopupBrowserView := nil;
FOnPopupBrowserViewCreated := nil; FOnPopupBrowserViewCreated := nil;
FOnGetChromeToolbarType := nil; FOnGetChromeToolbarType := nil;
FOnGestureCommand := nil;
end; end;
procedure TCEFBrowserViewComponent.DestroyView; procedure TCEFBrowserViewComponent.DestroyView;
@ -260,6 +264,14 @@ begin
FOnGetChromeToolbarType(self, aChromeToolbarType); FOnGetChromeToolbarType(self, aChromeToolbarType);
end; end;
procedure TCEFBrowserViewComponent.doOnGestureCommand(const browser_view : ICefBrowserView;
gesture_command : TCefGestureCommand;
var aResult : boolean);
begin
if assigned(FOnGestureCommand) then
FOnGestureCommand(self, browser_view, aResult);
end;
{$IFDEF FPC} {$IFDEF FPC}
procedure Register; procedure Register;
begin begin

View File

@ -64,6 +64,7 @@ type
procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
function GetChromeToolbarType: TCefChromeToolbarType; function GetChromeToolbarType: TCefChromeToolbarType;
procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
public public
class function UnWrap(data: Pointer): ICefBrowserViewDelegate; class function UnWrap(data: Pointer): ICefBrowserViewDelegate;
@ -76,6 +77,7 @@ type
procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); virtual; procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); virtual;
procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); virtual; procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); virtual;
function GetChromeToolbarType: TCefChromeToolbarType; virtual; function GetChromeToolbarType: TCefChromeToolbarType; virtual;
procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean); virtual;
procedure InitializeCEFMethods; override; procedure InitializeCEFMethods; override;
@ -105,6 +107,7 @@ type
procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); override; procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); override;
procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); override; procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); override;
function GetChromeToolbarType: TCefChromeToolbarType; override; function GetChromeToolbarType: TCefChromeToolbarType; override;
procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean); override;
public public
constructor Create(const events: ICefBrowserViewDelegateEvents); reintroduce; constructor Create(const events: ICefBrowserViewDelegateEvents); reintroduce;
@ -165,6 +168,15 @@ begin
Result := PCefBrowserViewDelegate(FData)^.get_chrome_toolbar_type(PCefBrowserViewDelegate(FData)); Result := PCefBrowserViewDelegate(FData)^.get_chrome_toolbar_type(PCefBrowserViewDelegate(FData));
end; end;
procedure TCefBrowserViewDelegateRef.OnGestureCommand(const browser_view : ICefBrowserView;
gesture_command : TCefGestureCommand;
var aResult : boolean);
begin
aResult := (PCefBrowserViewDelegate(FData)^.on_gesture_command(PCefBrowserViewDelegate(FData),
CefGetData(browser_view),
gesture_command) <> 0);
end;
class function TCefBrowserViewDelegateRef.UnWrap(data: Pointer): ICefBrowserViewDelegate; class function TCefBrowserViewDelegateRef.UnWrap(data: Pointer): ICefBrowserViewDelegate;
begin begin
if (data <> nil) then if (data <> nil) then
@ -257,6 +269,24 @@ begin
Result := TCefBrowserViewDelegateOwn(TempObject).GetChromeToolbarType(); Result := TCefBrowserViewDelegateOwn(TempObject).GetChromeToolbarType();
end; end;
function cef_browserview_delegate_on_gesture_command(self : PCefBrowserViewDelegate;
browser_view : PCefBrowserView;
gesture_command : TCefGestureCommand): Integer; stdcall;
var
TempObject : TObject;
TempResult : boolean;
begin
TempObject := CefGetObject(self);
TempResult := False;
if (TempObject <> nil) and (TempObject is TCefBrowserViewDelegateOwn) then
TCefBrowserViewDelegateOwn(TempObject).OnGestureCommand(TCefBrowserViewRef.UnWrap(browser_view),
gesture_command,
TempResult);
Result := ord(TempResult);
end;
constructor TCefBrowserViewDelegateOwn.Create; constructor TCefBrowserViewDelegateOwn.Create;
begin begin
inherited CreateData(SizeOf(TCefBrowserViewDelegate)); inherited CreateData(SizeOf(TCefBrowserViewDelegate));
@ -275,6 +305,7 @@ begin
get_delegate_for_popup_browser_view := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_get_delegate_for_popup_browser_view; get_delegate_for_popup_browser_view := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_get_delegate_for_popup_browser_view;
on_popup_browser_view_created := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_on_popup_browser_view_created; on_popup_browser_view_created := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_on_popup_browser_view_created;
get_chrome_toolbar_type := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_get_chrome_toolbar_type; get_chrome_toolbar_type := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_get_chrome_toolbar_type;
on_gesture_command := {$IFDEF FPC}@{$ENDIF}cef_browserview_delegate_on_gesture_command;
end; end;
end; end;
@ -303,6 +334,11 @@ begin
Result := CEF_CTT_NONE; Result := CEF_CTT_NONE;
end; end;
procedure TCefBrowserViewDelegateOwn.OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
begin
//
end;
// ************************************************************** // **************************************************************
// **************** TCustomBrowserViewDelegate ****************** // **************** TCustomBrowserViewDelegate ******************
@ -482,5 +518,18 @@ begin
end; end;
end; end;
procedure TCustomBrowserViewDelegate.OnGestureCommand(const browser_view : ICefBrowserView;
gesture_command : TCefGestureCommand;
var aResult : boolean);
begin
try
if (FEvents <> nil) then
ICefBrowserViewDelegateEvents(FEvents).doOnGestureCommand(browser_view, gesture_command, aResult);
except
on e : exception do
if CustomExceptionHandler('TCustomBrowserViewDelegate.OnGestureCommand', e) then raise;
end;
end;
end. end.

View File

@ -769,16 +769,7 @@ end;
procedure TBufferPanel.WMIMEComposition(var aMessage: TMessage); procedure TBufferPanel.WMIMEComposition(var aMessage: TMessage);
const const
// CEF uses UINT32_MAX to initialize the TCefRange parameters. UINT32_MAX = high(cardinal);
// FPC works fine with a high(integer) value but if we try to use
// integer(high(cardinal)) then it duplicates the result string.
// Delphi however works fine with integer(high(cardinal)) but it doesn't show
// any result string when we use high(integer)
{$IFDEF FPC}
UINT32_MAX = high(integer);
{$ELSE}
UINT32_MAX = integer(high(cardinal));
{$ENDIF}
var var
TempText : ustring; TempText : ustring;
TempRange : TCefRange; TempRange : TCefRange;

View File

@ -2882,6 +2882,7 @@ type
procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); procedure OnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); procedure OnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
function GetChromeToolbarType: TCefChromeToolbarType; function GetChromeToolbarType: TCefChromeToolbarType;
procedure OnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
property ChromeToolbarType: TCefChromeToolbarType read GetChromeToolbarType; property ChromeToolbarType: TCefChromeToolbarType read GetChromeToolbarType;
end; end;
@ -2893,6 +2894,7 @@ type
procedure doOnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate); procedure doOnGetDelegateForPopupBrowserView(const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate);
procedure doOnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean); procedure doOnPopupBrowserViewCreated(const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean);
procedure doOnGetChromeToolbarType(var aChromeToolbarType: TCefChromeToolbarType); procedure doOnGetChromeToolbarType(var aChromeToolbarType: TCefChromeToolbarType);
procedure doOnGestureCommand(const browser_view: ICefBrowserView; gesture_command: TCefGestureCommand; var aResult : boolean);
end; end;
// TCefButton // TCefButton

View File

@ -77,7 +77,7 @@ type
protected protected
FHWND : HWND; FHWND : HWND;
FCompositionRange : TCefRange; FCompositionRange : TCefRange;
FCursorIndex : integer; FCursorIndex : cardinal;
FIMERect : TCefRect; FIMERect : TCefRect;
FSystemCaret : boolean; FSystemCaret : boolean;
FInputLanguageID : LANGID; FInputLanguageID : LANGID;
@ -94,8 +94,8 @@ type
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
function IsSelectionAttribute(aAttribute : AnsiChar) : boolean; function IsSelectionAttribute(aAttribute : AnsiChar) : boolean;
{$ENDIF} {$ENDIF}
procedure GetCompositionSelectionRange(imc : HIMC; var target_start, target_end : integer); procedure GetCompositionSelectionRange(imc : HIMC; var target_start, target_end : cardinal);
procedure GetCompositionUnderlines(imc : HIMC; target_start, target_end : integer; var underlines : TCefCompositionUnderlineDynArray); procedure GetCompositionUnderlines(imc : HIMC; target_start, target_end : cardinal; var underlines : TCefCompositionUnderlineDynArray);
public public
constructor Create(aHWND : HWND); constructor Create(aHWND : HWND);
@ -113,7 +113,7 @@ type
procedure EnableIME; procedure EnableIME;
procedure DisableIME; procedure DisableIME;
procedure CancelIME; procedure CancelIME;
procedure UpdateCaretPosition(index : integer); procedure UpdateCaretPosition(index : cardinal);
procedure ChangeCompositionRange(const selection_range : TCefRange; const character_bounds : TCefRectDynArray); procedure ChangeCompositionRange(const selection_range : TCefRange; const character_bounds : TCefRectDynArray);
procedure MoveImeWindow; procedure MoveImeWindow;
@ -148,7 +148,7 @@ begin
FHWND := aHWND; FHWND := aHWND;
FCompositionRange.from := 0; FCompositionRange.from := 0;
FCompositionRange.to_ := 0; FCompositionRange.to_ := 0;
FCursorIndex := -1; FCursorIndex := high(cardinal);
FIMERect.x := -1; FIMERect.x := -1;
FIMERect.y := -1; FIMERect.y := -1;
FIMERect.width := 0; FIMERect.width := 0;
@ -215,7 +215,8 @@ procedure TCEFOSRIMEHandler.GetCompositionInfo( imc : HIMC;
var underlines : TCefCompositionUnderlineDynArray; var underlines : TCefCompositionUnderlineDynArray;
var composition_start : integer); var composition_start : integer);
var var
TempTargetStart, TempTargetEnd, TempLen, i : integer; TempLen, TempTargetStart, TempTargetEnd : cardinal;
i : integer;
begin begin
if (underlines <> nil) then if (underlines <> nil) then
begin begin
@ -337,7 +338,7 @@ begin
end; end;
{$ENDIF} {$ENDIF}
procedure TCEFOSRIMEHandler.GetCompositionSelectionRange(imc : HIMC; var target_start, target_end : integer); procedure TCEFOSRIMEHandler.GetCompositionSelectionRange(imc : HIMC; var target_start, target_end : cardinal);
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
var var
i, TempStart, TempEnd, TempBufferLen : integer; i, TempStart, TempEnd, TempBufferLen : integer;
@ -389,8 +390,8 @@ begin
end; end;
procedure TCEFOSRIMEHandler.GetCompositionUnderlines( imc : HIMC; procedure TCEFOSRIMEHandler.GetCompositionUnderlines( imc : HIMC;
target_start : integer; target_start : cardinal;
target_end : integer; target_end : cardinal;
var underlines : TCefCompositionUnderlineDynArray); var underlines : TCefCompositionUnderlineDynArray);
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
var var
@ -528,7 +529,7 @@ end;
procedure TCEFOSRIMEHandler.ResetComposition; procedure TCEFOSRIMEHandler.ResetComposition;
begin begin
FIsComposing := False; FIsComposing := False;
FCursorIndex := -1; FCursorIndex := high(cardinal);
end; end;
function TCEFOSRIMEHandler.GetResult(aParam : LPARAM; var aResult : ustring) : boolean; function TCEFOSRIMEHandler.GetResult(aParam : LPARAM; var aResult : ustring) : boolean;
@ -627,7 +628,7 @@ begin
end; end;
end; end;
procedure TCEFOSRIMEHandler.UpdateCaretPosition(index : integer); procedure TCEFOSRIMEHandler.UpdateCaretPosition(index : cardinal);
begin begin
FCursorIndex := index; FCursorIndex := index;
MoveImeWindow(); MoveImeWindow();
@ -664,7 +665,7 @@ procedure TCEFOSRIMEHandler.MoveImeWindow;
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
var var
TempRect : TCefRect; TempRect : TCefRect;
TempLocation : integer; TempLocation : cardinal;
TempIMC : HIMC; TempIMC : HIMC;
TempCandidatePos : TCandidateForm; TempCandidatePos : TCandidateForm;
TempCandidateExc : TCandidateForm; TempCandidateExc : TCandidateForm;
@ -678,7 +679,7 @@ begin
TempRect := FIMERect; TempRect := FIMERect;
TempLocation := FCursorIndex; TempLocation := FCursorIndex;
if (TempLocation = -1) then if (TempLocation = high(cardinal)) then
TempLocation := FCompositionRange.from; TempLocation := FCompositionRange.from;
if (TempLocation >= FCompositionRange.from) then if (TempLocation >= FCompositionRange.from) then
@ -687,8 +688,7 @@ begin
if (FCompositionBounds = nil) then if (FCompositionBounds = nil) then
exit exit
else else
if (TempLocation >= 0) and if (TempLocation < cardinal(length(FCompositionBounds))) then
(TempLocation < length(FCompositionBounds)) then
TempRect := FCompositionBounds[TempLocation] TempRect := FCompositionBounds[TempLocation]
else else
if (length(FCompositionBounds) > 0) then if (length(FCompositionBounds) > 0) then

View File

@ -565,8 +565,8 @@ type
// /include/internal/cef_types_geometry.h (cef_range_t) // /include/internal/cef_types_geometry.h (cef_range_t)
TCefRange = record TCefRange = record
from : Integer; from : cardinal;
to_ : Integer; to_ : cardinal;
end; end;
TCefRangeArray = array of TCefRange; TCefRangeArray = array of TCefRange;
@ -1197,6 +1197,12 @@ type
CEF_PREFERENCES_TYPE_REQUEST_CONTEXT CEF_PREFERENCES_TYPE_REQUEST_CONTEXT
); );
// /include/internal/cef_types.h (cef_gesture_command_t)
TCefGestureCommand = (
CEF_GESTURE_COMMAND_BACK,
CEF_GESTURE_COMMAND_FORWARD
);
// /include/internal/cef_types.h (cef_test_cert_type_t) // /include/internal/cef_types.h (cef_test_cert_type_t)
TCefTestCertType = ( TCefTestCertType = (
CEF_TEST_CERT_OK_IP, CEF_TEST_CERT_OK_IP,
@ -3436,6 +3442,7 @@ type
get_delegate_for_popup_browser_view : function(self: PCefBrowserViewDelegate; browser_view: PCefBrowserView; const settings: PCefBrowserSettings; client: PCefClient; is_devtools: Integer): PCefBrowserViewDelegate; stdcall; get_delegate_for_popup_browser_view : function(self: PCefBrowserViewDelegate; browser_view: PCefBrowserView; const settings: PCefBrowserSettings; client: PCefClient; is_devtools: Integer): PCefBrowserViewDelegate; stdcall;
on_popup_browser_view_created : function(self: PCefBrowserViewDelegate; browser_view, popup_browser_view: PCefBrowserView; is_devtools: Integer): Integer; stdcall; on_popup_browser_view_created : function(self: PCefBrowserViewDelegate; browser_view, popup_browser_view: PCefBrowserView; is_devtools: Integer): Integer; stdcall;
get_chrome_toolbar_type : function(self: PCefBrowserViewDelegate): TCefChromeToolbarType; stdcall; get_chrome_toolbar_type : function(self: PCefBrowserViewDelegate): TCefChromeToolbarType; stdcall;
on_gesture_command : function(self: PCefBrowserViewDelegate; browser_view: PCefBrowserView; gesture_command: TCefGestureCommand): Integer; stdcall;
end; end;
// /include/capi/views/cef_button_capi.h (cef_button_t) // /include/capi/views/cef_button_capi.h (cef_button_t)

View File

@ -1,9 +1,9 @@
CEF_SUPPORTED_VERSION_MAJOR = 113; CEF_SUPPORTED_VERSION_MAJOR = 113;
CEF_SUPPORTED_VERSION_MINOR = 1; CEF_SUPPORTED_VERSION_MINOR = 3;
CEF_SUPPORTED_VERSION_RELEASE = 5; CEF_SUPPORTED_VERSION_RELEASE = 1;
CEF_SUPPORTED_VERSION_BUILD = 0; CEF_SUPPORTED_VERSION_BUILD = 0;
CEF_CHROMEELF_VERSION_MAJOR = CEF_SUPPORTED_VERSION_MAJOR; CEF_CHROMEELF_VERSION_MAJOR = CEF_SUPPORTED_VERSION_MAJOR;
CEF_CHROMEELF_VERSION_MINOR = 0; CEF_CHROMEELF_VERSION_MINOR = 0;
CEF_CHROMEELF_VERSION_RELEASE = 5672; CEF_CHROMEELF_VERSION_RELEASE = 5672;
CEF_CHROMEELF_VERSION_BUILD = 93; CEF_CHROMEELF_VERSION_BUILD = 128;

View File

@ -81,6 +81,7 @@ type
TOnGetDelegateForPopupBrowserViewEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate) of object; TOnGetDelegateForPopupBrowserViewEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; const settings: TCefBrowserSettings; const client: ICefClient; is_devtools: boolean; var aResult : ICefBrowserViewDelegate) of object;
TOnPopupBrowserViewCreatedEvent = procedure(const Sender: TObject; const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean) of object; TOnPopupBrowserViewCreatedEvent = procedure(const Sender: TObject; const browser_view, popup_browser_view: ICefBrowserView; is_devtools: boolean; var aResult : boolean) of object;
TOnGetChromeToolbarTypeEvent = procedure(const Sender: TObject; var aChromeToolbarType: TCefChromeToolbarType) of object; TOnGetChromeToolbarTypeEvent = procedure(const Sender: TObject; var aChromeToolbarType: TCefChromeToolbarType) of object;
TOnGestureCommandEvent = procedure(const Sender: TObject; const browser_view: ICefBrowserView; var aResult : boolean) of object;
// ICefButtonDelegate // ICefButtonDelegate
TOnButtonPressedEvent = procedure(const Sender: TObject; const button: ICefButton) of object; TOnButtonPressedEvent = procedure(const Sender: TObject; const button: ICefButton) of object;

View File

@ -2,9 +2,9 @@
"UpdateLazPackages" : [ "UpdateLazPackages" : [
{ {
"ForceNotify" : true, "ForceNotify" : true,
"InternalVersion" : 486, "InternalVersion" : 487,
"Name" : "cef4delphi_lazarus.lpk", "Name" : "cef4delphi_lazarus.lpk",
"Version" : "113.1.5" "Version" : "113.3.1"
} }
], ],
"UpdatePackageData" : { "UpdatePackageData" : {