fix: avoid IPC for renderer webFrame.getZoom...
APIs (#45557)
* fix: avoid IPC for renderer `webFrame.getZoom...` APIs Co-authored-by: clavin <clavin@electronjs.org> * Remove `DoGetZoomLevel` IPC Co-authored-by: clavin <clavin@electronjs.org> * Fix synchronous behavior & nullptr deref Co-authored-by: clavin <clavin@electronjs.org> * Use local root Co-authored-by: clavin <clavin@electronjs.org> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: clavin <clavin@electronjs.org>
This commit is contained in:
parent
5b90ce2290
commit
aacbdaf4ec
7 changed files with 22 additions and 34 deletions
|
@ -3693,12 +3693,6 @@ void WebContents::SetTemporaryZoomLevel(double level) {
|
|||
zoom_controller_->SetTemporaryZoomLevel(level);
|
||||
}
|
||||
|
||||
void WebContents::DoGetZoomLevel(
|
||||
electron::mojom::ElectronWebContentsUtility::DoGetZoomLevelCallback
|
||||
callback) {
|
||||
std::move(callback).Run(GetZoomLevel());
|
||||
}
|
||||
|
||||
std::optional<PreloadScript> WebContents::GetPreloadScript() const {
|
||||
if (auto* web_preferences = WebContentsPreferences::From(web_contents())) {
|
||||
if (auto preload = web_preferences->GetPreloadPath()) {
|
||||
|
|
|
@ -470,9 +470,6 @@ class WebContents final : public ExclusiveAccessContext,
|
|||
// mojom::ElectronWebContentsUtility
|
||||
void OnFirstNonEmptyLayout(content::RenderFrameHost* render_frame_host);
|
||||
void SetTemporaryZoomLevel(double level);
|
||||
void DoGetZoomLevel(
|
||||
electron::mojom::ElectronWebContentsUtility::DoGetZoomLevelCallback
|
||||
callback);
|
||||
|
||||
void SetImageAnimationPolicy(const std::string& new_policy);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue