Browse Source

docs: fix spelling errors in code comments (#45842)

chore: Fix typos
co63oc 1 month ago
parent
commit
36ec9d7236

+ 1 - 1
shell/browser/api/electron_api_power_monitor.h

@@ -44,7 +44,7 @@ class PowerMonitor final : public gin::Wrappable<PowerMonitor>,
   void SetListeningForShutdown(bool);
 #endif
 
-  // Called by native calles.
+  // Called by native callers.
   bool ShouldShutdown();
 
 #if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)

+ 1 - 1
shell/browser/api/electron_api_web_contents.h

@@ -847,7 +847,7 @@ class WebContents final : public ExclusiveAccessContext,
   const scoped_refptr<base::TaskRunner> 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<content::RenderFrameHost> fullscreen_frame_ = nullptr;
 
   std::unique_ptr<SkRegion> draggable_region_;

+ 1 - 1
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

+ 1 - 1
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)";
   }

+ 1 - 1
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);

+ 1 - 1
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

+ 1 - 1
shell/common/gin_converters/frame_converter.cc

@@ -104,7 +104,7 @@ bool Converter<gin_helper::AccessorValue<content::RenderFrameHost*>>::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(