diff --git a/README.md b/README.md index c3aabd2c..e1db4895 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,15 @@ 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 uses CEF 107.1.7 which includes Chromium 107.0.5304.88. +CEF4Delphi uses CEF 107.1.9 which includes Chromium 107.0.5304.110. The CEF binaries used by CEF4Delphi are available for download at Spotify : -* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_107.1.7%2Bg59a795c%2Bchromium-107.0.5304.88_windows32.tar.bz2) -* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_107.1.7%2Bg59a795c%2Bchromium-107.0.5304.88_windows64.tar.bz2) -* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_107.1.7%2Bg59a795c%2Bchromium-107.0.5304.88_linux64.tar.bz2) -* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_107.1.7%2Bg59a795c%2Bchromium-107.0.5304.88_linuxarm.tar.bz2) -* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_107.1.7%2Bg59a795c%2Bchromium-107.0.5304.88_linuxarm64.tar.bz2) -* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_107.1.7%2Bg59a795c%2Bchromium-107.0.5304.88_macosx64.tar.bz2) +* [Windows 32 bits](https://cef-builds.spotifycdn.com/cef_binary_107.1.9%2Bg1f0a21a%2Bchromium-107.0.5304.110_windows32.tar.bz2) +* [Windows 64 bits](https://cef-builds.spotifycdn.com/cef_binary_107.1.9%2Bg1f0a21a%2Bchromium-107.0.5304.110_windows64.tar.bz2) +* [Linux x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_107.1.9%2Bg1f0a21a%2Bchromium-107.0.5304.110_linux64.tar.bz2) +* [Linux ARM 32 bits](https://cef-builds.spotifycdn.com/cef_binary_107.1.9%2Bg1f0a21a%2Bchromium-107.0.5304.110_linuxarm.tar.bz2) +* [Linux ARM 64 bits](https://cef-builds.spotifycdn.com/cef_binary_107.1.9%2Bg1f0a21a%2Bchromium-107.0.5304.110_linuxarm64.tar.bz2) +* [MacOS x86 64 bits](https://cef-builds.spotifycdn.com/cef_binary_107.1.9%2Bg1f0a21a%2Bchromium-107.0.5304.110_macosx64.tar.bz2) CEF4Delphi was developed and tested on Delphi 11.2 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.4/FPC 3.2.2. CEF4Delphi includes VCL, FireMonkey (FMX) and Lazarus components. diff --git a/demos/Delphi_VCL/TabbedBrowser2/uBrowserFrame.pas b/demos/Delphi_VCL/TabbedBrowser2/uBrowserFrame.pas index d8b7e6e4..da6a118b 100644 --- a/demos/Delphi_VCL/TabbedBrowser2/uBrowserFrame.pas +++ b/demos/Delphi_VCL/TabbedBrowser2/uBrowserFrame.pas @@ -161,7 +161,7 @@ implementation {$R *.dfm} uses - uCEFMiscFunctions, uBrowserTab; + uCEFApplication, uCEFMiscFunctions, uBrowserTab; // The TChromium events are executed in a CEF thread and we should only update the // GUI controls in the main application thread. @@ -320,6 +320,9 @@ begin FClosing := True; NavControlPnl.Enabled := False; Chromium1.CloseBrowser(True); + + if GlobalCEFApp.ChromeRuntime then + CEFWindowParent1.Free; end; end; diff --git a/demos/Delphi_VCL/TabbedBrowser2/uMainForm.pas b/demos/Delphi_VCL/TabbedBrowser2/uMainForm.pas index 51ffc21f..524f66b3 100644 --- a/demos/Delphi_VCL/TabbedBrowser2/uMainForm.pas +++ b/demos/Delphi_VCL/TabbedBrowser2/uMainForm.pas @@ -194,10 +194,7 @@ begin GlobalCEFApp.cache := 'cache'; GlobalCEFApp.EnablePrintPreview := True; GlobalCEFApp.OnContextInitialized := GlobalCEFApp_OnContextInitialized; - - // This is a workaround for the CEF4Delphi issue #324 : - // https://github.com/salvadordf/CEF4Delphi/issues/324 - GlobalCEFApp.DisableFeatures := 'WinUseBrowserSpellChecker'; + //GlobalCEFApp.ChromeRuntime := True; end; procedure TMainForm.EnableButtonPnl; @@ -535,55 +532,61 @@ function TMainForm.DoOnBeforePopup(var windowInfo : TCefWindowInfo; const popupFeatures : TCefPopupFeatures; targetDisposition : TCefWindowOpenDisposition) : boolean; begin - try - FCriticalSection.Acquire; + if GlobalCEFApp.ChromeRuntime then + Result := False + else + try + FCriticalSection.Acquire; - case targetDisposition of - WOD_NEW_FOREGROUND_TAB, - WOD_NEW_BACKGROUND_TAB : - Result := (FHiddenTab <> nil) and - FHiddenTab.CreateClientHandler(windowInfo, client, targetFrameName, popupFeatures) and - PostMessage(Handle, CEF_CREATENEXTTAB, 0, ord(False)); + case targetDisposition of + WOD_NEW_FOREGROUND_TAB, + WOD_NEW_BACKGROUND_TAB : + Result := (FHiddenTab <> nil) and + FHiddenTab.CreateClientHandler(windowInfo, client, targetFrameName, popupFeatures) and + PostMessage(Handle, CEF_CREATENEXTTAB, 0, ord(False)); - WOD_NEW_WINDOW, - WOD_NEW_POPUP : - Result := (FChildForm <> nil) and - FChildForm.CreateClientHandler(windowInfo, client, targetFrameName, popupFeatures) and - PostMessage(Handle, CEF_CREATENEXTCHILD, 0, ord(False)); + WOD_NEW_WINDOW, + WOD_NEW_POPUP : + Result := (FChildForm <> nil) and + FChildForm.CreateClientHandler(windowInfo, client, targetFrameName, popupFeatures) and + PostMessage(Handle, CEF_CREATENEXTCHILD, 0, ord(False)); - else Result := False; + else Result := False; + end; + finally + FCriticalSection.Release; end; - finally - FCriticalSection.Release; - end; end; function TMainForm.DoOpenUrlFromTab(const targetUrl : string; targetDisposition : TCefWindowOpenDisposition) : boolean; begin - try - FCriticalSection.Acquire; + if GlobalCEFApp.ChromeRuntime then + Result := True + else + try + FCriticalSection.Acquire; - case targetDisposition of - WOD_NEW_FOREGROUND_TAB, - WOD_NEW_BACKGROUND_TAB : - begin - FPendingURL := targetUrl; - Result := PostMessage(Handle, CEF_CREATENEXTTAB, 0, ord(True)); - end; + case targetDisposition of + WOD_NEW_FOREGROUND_TAB, + WOD_NEW_BACKGROUND_TAB : + begin + FPendingURL := targetUrl; + Result := PostMessage(Handle, CEF_CREATENEXTTAB, 0, ord(True)); + end; - WOD_NEW_WINDOW, - WOD_NEW_POPUP : - begin - FPendingURL := targetUrl; - Result := PostMessage(Handle, CEF_CREATENEXTCHILD, 0, ord(True)); - end + WOD_NEW_WINDOW, + WOD_NEW_POPUP : + begin + FPendingURL := targetUrl; + Result := PostMessage(Handle, CEF_CREATENEXTCHILD, 0, ord(True)); + end - else Result := False; + else Result := False; + end; + finally + FCriticalSection.Release; end; - finally - FCriticalSection.Release; - end; end; end. diff --git a/demos/Lazarus_Windows/TabbedBrowser2/TabbedBrowser2.lpi b/demos/Lazarus_Windows/TabbedBrowser2/TabbedBrowser2.lpi index a898545a..89348ffb 100644 --- a/demos/Lazarus_Windows/TabbedBrowser2/TabbedBrowser2.lpi +++ b/demos/Lazarus_Windows/TabbedBrowser2/TabbedBrowser2.lpi @@ -1,7 +1,7 @@ - + @@ -9,9 +9,9 @@ + - <UseAppBundle Value="False"/> <ResourceType Value="res"/> @@ -25,7 +25,6 @@ </PublishOptions> <RunParams> <FormatVersion Value="2"/> - <Modes Count="0"/> </RunParams> <RequiredPackages Count="2"> <Item1> @@ -79,6 +78,9 @@ </SyntaxOptions> </Parsing> <Linking> + <Debugging> + <DebugInfoType Value="dsDwarf2Set"/> + </Debugging> <Options> <Win32> <GraphicApplication Value="True"/> diff --git a/demos/Lazarus_Windows/TabbedBrowser2/uBrowserFrame.pas b/demos/Lazarus_Windows/TabbedBrowser2/uBrowserFrame.pas index 068cfe31..a24b9523 100644 --- a/demos/Lazarus_Windows/TabbedBrowser2/uBrowserFrame.pas +++ b/demos/Lazarus_Windows/TabbedBrowser2/uBrowserFrame.pas @@ -163,7 +163,7 @@ implementation {$R *.lfm} uses - uCEFMiscFunctions, uBrowserTab; + uCEFApplication, uCEFMiscFunctions, uBrowserTab; // The TChromium events are executed in a CEF thread and we should only update the // GUI controls in the main application thread. @@ -321,7 +321,10 @@ begin begin FClosing := True; NavControlPnl.Enabled := False; - Chromium1.CloseBrowser(True); + Chromium1.CloseBrowser(True); + + if GlobalCEFApp.ChromeRuntime then + CEFWindowParent1.Free; end; end; diff --git a/demos/Lazarus_Windows/TabbedBrowser2/uMainForm.pas b/demos/Lazarus_Windows/TabbedBrowser2/uMainForm.pas index dd814241..00cb29d3 100644 --- a/demos/Lazarus_Windows/TabbedBrowser2/uMainForm.pas +++ b/demos/Lazarus_Windows/TabbedBrowser2/uMainForm.pas @@ -196,10 +196,7 @@ begin GlobalCEFApp.cache := 'cache'; GlobalCEFApp.EnablePrintPreview := True; GlobalCEFApp.OnContextInitialized := GlobalCEFApp_OnContextInitialized; - - // This is a workaround for the CEF4Delphi issue #324 : - // https://github.com/salvadordf/CEF4Delphi/issues/324 - GlobalCEFApp.DisableFeatures := 'WinUseBrowserSpellChecker'; + //GlobalCEFApp.ChromeRuntime := True; end; procedure TMainForm.EnableButtonPnl; @@ -536,56 +533,62 @@ function TMainForm.DoOnBeforePopup(var windowInfo : TCefWindowInfo; const targetFrameName : string; const popupFeatures : TCefPopupFeatures; targetDisposition : TCefWindowOpenDisposition) : boolean; -begin - try - FCriticalSection.Acquire; +begin + if GlobalCEFApp.ChromeRuntime then + Result := False + else + try + FCriticalSection.Acquire; - case targetDisposition of - WOD_NEW_FOREGROUND_TAB, - WOD_NEW_BACKGROUND_TAB : - Result := (FHiddenTab <> nil) and - FHiddenTab.CreateClientHandler(windowInfo, client, targetFrameName, popupFeatures) and - PostMessage(Handle, CEF_CREATENEXTTAB, 0, ord(False)); + case targetDisposition of + WOD_NEW_FOREGROUND_TAB, + WOD_NEW_BACKGROUND_TAB : + Result := (FHiddenTab <> nil) and + FHiddenTab.CreateClientHandler(windowInfo, client, targetFrameName, popupFeatures) and + PostMessage(Handle, CEF_CREATENEXTTAB, 0, ord(False)); - WOD_NEW_WINDOW, - WOD_NEW_POPUP : - Result := (FChildForm <> nil) and - FChildForm.CreateClientHandler(windowInfo, client, targetFrameName, popupFeatures) and - PostMessage(Handle, CEF_CREATENEXTCHILD, 0, ord(False)); + WOD_NEW_WINDOW, + WOD_NEW_POPUP : + Result := (FChildForm <> nil) and + FChildForm.CreateClientHandler(windowInfo, client, targetFrameName, popupFeatures) and + PostMessage(Handle, CEF_CREATENEXTCHILD, 0, ord(False)); - else Result := False; + else Result := False; + end; + finally + FCriticalSection.Release; end; - finally - FCriticalSection.Release; - end; end; function TMainForm.DoOpenUrlFromTab(const targetUrl : string; targetDisposition : TCefWindowOpenDisposition) : boolean; -begin - try - FCriticalSection.Acquire; +begin + if GlobalCEFApp.ChromeRuntime then + Result := True + else + try + FCriticalSection.Acquire; - case targetDisposition of - WOD_NEW_FOREGROUND_TAB, - WOD_NEW_BACKGROUND_TAB : - begin - FPendingURL := targetUrl; - Result := PostMessage(Handle, CEF_CREATENEXTTAB, 0, ord(True)); - end; + case targetDisposition of + WOD_NEW_FOREGROUND_TAB, + WOD_NEW_BACKGROUND_TAB : + begin + FPendingURL := targetUrl; + Result := PostMessage(Handle, CEF_CREATENEXTTAB, 0, ord(True)); + end; - WOD_NEW_WINDOW, - WOD_NEW_POPUP : - begin - FPendingURL := targetUrl; - Result := PostMessage(Handle, CEF_CREATENEXTCHILD, 0, ord(True)); - end + WOD_NEW_WINDOW, + WOD_NEW_POPUP : + begin + FPendingURL := targetUrl; + Result := PostMessage(Handle, CEF_CREATENEXTCHILD, 0, ord(True)); + end - else Result := False; + else Result := False; + end; + finally + FCriticalSection.Release; end; - finally - FCriticalSection.Release; - end; end; end. diff --git a/packages/cef4delphi_lazarus.lpk b/packages/cef4delphi_lazarus.lpk index c2d03468..f43c3b16 100644 --- a/packages/cef4delphi_lazarus.lpk +++ b/packages/cef4delphi_lazarus.lpk @@ -21,7 +21,7 @@ </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."/> <License Value="MPL 1.1"/> - <Version Major="107" Minor="1" Release="7"/> + <Version Major="107" Minor="1" Release="9"/> <Files Count="210"> <Item1> <Filename Value="..\source\uCEFAccessibilityHandler.pas"/> diff --git a/source/uCEFApplicationCore.pas b/source/uCEFApplicationCore.pas index 70356ec9..ebc781ad 100644 --- a/source/uCEFApplicationCore.pas +++ b/source/uCEFApplicationCore.pas @@ -68,13 +68,13 @@ uses const CEF_SUPPORTED_VERSION_MAJOR = 107; CEF_SUPPORTED_VERSION_MINOR = 1; - CEF_SUPPORTED_VERSION_RELEASE = 7; + CEF_SUPPORTED_VERSION_RELEASE = 9; CEF_SUPPORTED_VERSION_BUILD = 0; CEF_CHROMEELF_VERSION_MAJOR = CEF_SUPPORTED_VERSION_MAJOR; CEF_CHROMEELF_VERSION_MINOR = 0; CEF_CHROMEELF_VERSION_RELEASE = 5304; - CEF_CHROMEELF_VERSION_BUILD = 88; + CEF_CHROMEELF_VERSION_BUILD = 110; {$IFDEF MSWINDOWS} LIBCEF_DLL = 'libcef.dll'; diff --git a/update_CEF4Delphi.json b/update_CEF4Delphi.json index 7c514438..0584d241 100644 --- a/update_CEF4Delphi.json +++ b/update_CEF4Delphi.json @@ -2,9 +2,9 @@ "UpdateLazPackages" : [ { "ForceNotify" : true, - "InternalVersion" : 444, + "InternalVersion" : 445, "Name" : "cef4delphi_lazarus.lpk", - "Version" : "107.1.7" + "Version" : "107.1.9" } ], "UpdatePackageData" : {