mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2026-06-13 16:05:40 +02:00
Update to CEF 107.1.9
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<CONFIG>
|
||||
<ProjectOptions>
|
||||
<Version Value="11"/>
|
||||
<Version Value="12"/>
|
||||
<PathDelim Value="\"/>
|
||||
<General>
|
||||
<Flags>
|
||||
@@ -9,9 +9,9 @@
|
||||
<MainUnitHasCreateFormStatements Value="False"/>
|
||||
<MainUnitHasTitleStatement Value="False"/>
|
||||
<MainUnitHasScaledStatement Value="False"/>
|
||||
<CompatibilityMode Value="True"/>
|
||||
</Flags>
|
||||
<SessionStorage Value="InProjectDir"/>
|
||||
<MainUnit Value="0"/>
|
||||
<Title Value="TabbedBrowser2"/>
|
||||
<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"/>
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user