From 36ec9d72362bf4cf5a81a63b61f0a66ac01cc3fb Mon Sep 17 00:00:00 2001 From: co63oc Date: Fri, 28 Feb 2025 19:24:00 +0800 Subject: [PATCH] docs: fix spelling errors in code comments (#45842) chore: Fix typos --- shell/browser/api/electron_api_power_monitor.h | 2 +- shell/browser/api/electron_api_web_contents.h | 2 +- shell/browser/native_window_views.h | 2 +- shell/browser/ui/devtools_ui_theme_data_source.cc | 2 +- shell/browser/ui/views/submenu_button.cc | 2 +- shell/browser/ui/win/electron_desktop_window_tree_host_win.cc | 2 +- shell/common/gin_converters/frame_converter.cc | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/shell/browser/api/electron_api_power_monitor.h b/shell/browser/api/electron_api_power_monitor.h index 5fb31504e2..53db4b9e91 100644 --- a/shell/browser/api/electron_api_power_monitor.h +++ b/shell/browser/api/electron_api_power_monitor.h @@ -44,7 +44,7 @@ class PowerMonitor final : public gin::Wrappable, void SetListeningForShutdown(bool); #endif - // Called by native calles. + // Called by native callers. bool ShouldShutdown(); #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN) diff --git a/shell/browser/api/electron_api_web_contents.h b/shell/browser/api/electron_api_web_contents.h index 40a0502b66..44a27ebf09 100644 --- a/shell/browser/api/electron_api_web_contents.h +++ b/shell/browser/api/electron_api_web_contents.h @@ -847,7 +847,7 @@ class WebContents final : public ExclusiveAccessContext, const scoped_refptr print_task_runner_; #endif - // Stores the frame thats currently in fullscreen, nullptr if there is none. + // Stores the frame that's currently in fullscreen, nullptr if there is none. raw_ptr fullscreen_frame_ = nullptr; std::unique_ptr draggable_region_; diff --git a/shell/browser/native_window_views.h b/shell/browser/native_window_views.h index 4f3c38bedb..6387eb434e 100644 --- a/shell/browser/native_window_views.h +++ b/shell/browser/native_window_views.h @@ -151,7 +151,7 @@ class NativeWindowViews : public NativeWindow, #if BUILDFLAG(IS_WIN) // Catch-all message handling and filtering. Called before - // HWNDMessageHandler's built-in handling, which may pre-empt some + // HWNDMessageHandler's built-in handling, which may preempt some // expectations in Views/Aura if messages are consumed. Returns true if the // message was consumed by the delegate and should not be processed further // by the HWNDMessageHandler. In this case, |result| is returned. |result| is diff --git a/shell/browser/ui/devtools_ui_theme_data_source.cc b/shell/browser/ui/devtools_ui_theme_data_source.cc index 8e07942ddb..f1c78c69ff 100644 --- a/shell/browser/ui/devtools_ui_theme_data_source.cc +++ b/shell/browser/ui/devtools_ui_theme_data_source.cc @@ -195,7 +195,7 @@ void ThemeDataSource::SendColorsCss( css_selector = ":host"; } else { // This selector requires more specificity than other existing CSS - // selectors that define variables. We increase the specifity by adding + // selectors that define variables. We increase the specificity by adding // a pseudoselector. css_selector = "html:not(#z)"; } diff --git a/shell/browser/ui/views/submenu_button.cc b/shell/browser/ui/views/submenu_button.cc index 6e2ec6b0f7..a07f2c2b0b 100644 --- a/shell/browser/ui/views/submenu_button.cc +++ b/shell/browser/ui/views/submenu_button.cc @@ -23,7 +23,7 @@ SubmenuButton::SubmenuButton(PressedCallback callback, : views::MenuButton(std::move(callback), gfx::RemoveAccelerator(title)), background_color_(background_color) { #if BUILDFLAG(IS_LINUX) - // Dont' use native style border. + // Don't use native style border. SetBorder(CreateDefaultBorder()); #endif SetAccessibleRole(ax::mojom::Role::kPopUpButton); diff --git a/shell/browser/ui/win/electron_desktop_window_tree_host_win.cc b/shell/browser/ui/win/electron_desktop_window_tree_host_win.cc index 48d6894d90..ee17c885fc 100644 --- a/shell/browser/ui/win/electron_desktop_window_tree_host_win.cc +++ b/shell/browser/ui/win/electron_desktop_window_tree_host_win.cc @@ -99,7 +99,7 @@ bool ElectronDesktopWindowTreeHostWin::HandleMouseEventForCaption( // Chromium lets the OS handle caption buttons for FrameMode::SYSTEM_DRAWN but // again this does not generate the SC_MINIMIZE, SC_MAXIMIZE, SC_RESTORE // commands when Non-client mouse events are generated for HTCLOSE, - // HTMINBUTTON, HTMAXBUTTON. To workaround this issue, wit this delegate we + // HTMINBUTTON, HTMAXBUTTON. To workaround this issue, with this delegate we // let chromium handle the mouse events via // HWNDMessageHandler::HandleMouseInputForCaption instead of the OS and this // will generate the necessary system commands to perform caption button diff --git a/shell/common/gin_converters/frame_converter.cc b/shell/common/gin_converters/frame_converter.cc index 41a542a847..f02b44014a 100644 --- a/shell/common/gin_converters/frame_converter.cc +++ b/shell/common/gin_converters/frame_converter.cc @@ -104,7 +104,7 @@ bool Converter>::FromV8( auto* rfh = content::RenderFrameHost::FromID(process_id, routing_id); if (!rfh) { - // Lazily evaluted property accessed after RFH has been destroyed. + // Lazily evaluated property accessed after RFH has been destroyed. // Continue to return nullptr, but emit warning to inform developers // what occurred. electron::util::EmitWarning(