chore: fix typos (#32985)

This commit is contained in:
David Sanders 2022-02-21 01:27:45 -08:00 committed by GitHub
parent 069cde09fb
commit 1e8da899a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 20 additions and 20 deletions

View file

@ -42,7 +42,7 @@ void PowerMonitor::InitPlatformSpecificMonitors() {
// Tel windows we want to be notified with session events
WTSRegisterSessionNotification(window_, NOTIFY_FOR_THIS_SESSION);
// For Windows 8 and later, a new "connected standy" mode has been added and
// For Windows 8 and later, a new "connected standby" mode has been added and
// we must explicitly register for its notifications.
auto RegisterSuspendResumeNotification =
reinterpret_cast<decltype(&::RegisterSuspendResumeNotification)>(

View file

@ -490,7 +490,7 @@ gin::Handle<SimpleURLLoaderWrapper> SimpleURLLoaderWrapper::Create(
int options = 0;
if (!credentials_specified && !use_session_cookies) {
// This is the default case, as well as the case when credentials is not
// specified and useSessionCoookies is false. credentials_mode will be
// specified and useSessionCookies is false. credentials_mode will be
// kInclude, but cookies will be blocked.
request->credentials_mode = network::mojom::CredentialsMode::kInclude;
options |= network::mojom::kURLLoadOptionBlockAllCookies;

View file

@ -24,7 +24,7 @@ namespace auto_updater {
namespace {
// The gloal SQRLUpdater object.
// The global SQRLUpdater object.
SQRLUpdater* g_updater = nil;
} // namespace

View file

@ -394,10 +394,10 @@ std::string Browser::DockGetBadgeText() {
void Browser::DockHide() {
// Transforming application state from UIElement to Foreground is an
// asyncronous operation, and unfortunately there is currently no way to know
// asynchronous operation, and unfortunately there is currently no way to know
// when it is finished.
// So if we call DockHide => DockShow => DockHide => DockShow in a very short
// time, we would triger a bug of macOS that, there would be multiple dock
// time, we would trigger a bug of macOS that, there would be multiple dock
// icons of the app left in system.
// To work around this, we make sure DockHide does nothing if it is called
// immediately after DockShow. After some experiments, 1 second seems to be

View file

@ -51,7 +51,7 @@
// This view would inform Chromium to resize the hosted views::View.
//
// The overrided methods should behave the same with BridgedContentView.
// The overridden methods should behave the same with BridgedContentView.
@interface ElectronAdaptedContentView : NSView {
@private
views::NativeWidgetMacNSWindowHost* bridge_host_;
@ -373,7 +373,7 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options,
if (traffic_light_position_) {
[buttons_proxy_ setMargin:*traffic_light_position_];
} else if (title_bar_style_ == TitleBarStyle::kHiddenInset) {
// For macOS >= 11, while this value does not match offical macOS apps
// For macOS >= 11, while this value does not match official macOS apps
// like Safari or Notes, it matches titleBarStyle's old implementation
// before Electron <= 12.
[buttons_proxy_ setMargin:gfx::Point(12, 11)];
@ -381,7 +381,7 @@ NativeWindowMac::NativeWindowMac(const gin_helper::Dictionary& options,
if (title_bar_style_ == TitleBarStyle::kCustomButtonsOnHover) {
[buttons_proxy_ setShowOnHover:YES];
} else {
// customButtonsOnHover does not show buttons initialiy.
// customButtonsOnHover does not show buttons initially.
InternalSetWindowButtonVisibility(true);
}
}
@ -562,7 +562,7 @@ void NativeWindowMac::Hide() {
}
}
// Deattach the window from the parent before.
// Detach the window from the parent before.
if (parent())
InternalSetParentWindow(parent(), false);

View file

@ -473,7 +473,7 @@ LRESULT CALLBACK NativeWindowViews::SubclassProc(HWND hwnd,
// windows can occur due to rapidly entering and leaving forwarding mode.
// By consuming and ignoring the message, we're essentially telling
// Chromium that we have not left the window despite somebody else getting
// the messages. As to why this is catched for the legacy window and not
// the messages. As to why this is caught for the legacy window and not
// the actual browser window is simply that the legacy window somehow
// makes use of these events; posting to the main window didn't work.
if (window->forwarding_mouse_messages_) {

View file

@ -48,7 +48,7 @@ std::map<int, std::unique_ptr<HWND>>& GetDialogsMap() {
return *dialogs;
}
// Speical HWND used by the dialogs map.
// Special HWND used by the dialogs map.
//
// - ID is used but window has not been created yet.
const HWND kHwndReserve = reinterpret_cast<HWND>(-1);

View file

@ -87,7 +87,7 @@ bool ElectronDesktopWindowTreeHostWin::GetClientAreaInsets(
// Indenting the client area can fix this behavior.
if (IsMaximized() && !native_window_view_->has_frame()) {
// The insets would be eventually passed to WM_NCCALCSIZE, which takes
// the metrics under the DPI of _main_ monitor instead of current moniotr.
// the metrics under the DPI of _main_ monitor instead of current monitor.
//
// Please make sure you tested maximized frameless window under multiple
// monitors with different DPIs before changing this code.