Skip to content

Commit

Permalink
chore: fix typos (#32985)
Browse files Browse the repository at this point in the history
  • Loading branch information
dsanders11 committed Feb 21, 2022
1 parent 069cde0 commit 1e8da89
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 20 deletions.
2 changes: 1 addition & 1 deletion lib/browser/api/net.ts
Expand Up @@ -198,7 +198,7 @@ class ChunkedBodyStream extends Writable {
this._downstream = pipe;
if (this._pendingChunk) {
const doneWriting = (maybeError: Error | void) => {
// If the underlying request has been aborted, we honeslty don't care about the error
// If the underlying request has been aborted, we honestly don't care about the error
// all work should cease as soon as we abort anyway, this error is probably a
// "mojo pipe disconnected" error (code=9)
if (this._clientRequest._aborted) return;
Expand Down
2 changes: 1 addition & 1 deletion shell/browser/api/electron_api_power_monitor_win.cc
Expand Up @@ -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)>(
Expand Down
2 changes: 1 addition & 1 deletion shell/browser/api/electron_api_url_loader.cc
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion shell/browser/auto_updater_mac.mm
Expand Up @@ -24,7 +24,7 @@

namespace {

// The gloal SQRLUpdater object.
// The global SQRLUpdater object.
SQRLUpdater* g_updater = nil;

} // namespace
Expand Down
4 changes: 2 additions & 2 deletions shell/browser/browser_mac.mm
Expand Up @@ -394,10 +394,10 @@ void RemoveFromLoginItems() {

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
Expand Down
8 changes: 4 additions & 4 deletions shell/browser/native_window_mac.mm
Expand Up @@ -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_;
Expand Down Expand Up @@ -373,15 +373,15 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
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)];
}
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);
}
}
Expand Down Expand Up @@ -562,7 +562,7 @@ void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {
}
}

// Deattach the window from the parent before.
// Detach the window from the parent before.
if (parent())
InternalSetParentWindow(parent(), false);

Expand Down
2 changes: 1 addition & 1 deletion shell/browser/native_window_views_win.cc
Expand Up @@ -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_) {
Expand Down
2 changes: 1 addition & 1 deletion shell/browser/ui/message_box_win.cc
Expand Up @@ -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);
Expand Down
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion shell/common/gin_helper/function_template.h
Expand Up @@ -208,7 +208,7 @@ class Invoker<IndicesHolder<indices...>, ArgTypes...>
// GCC thinks that create_flags is going unused, even though the
// expansion above clearly makes use of it. Per jyasskin@, casting
// to void is the commonly accepted way to convince the compiler
// that you're actually using a parameter/varible.
// that you're actually using a parameter/variable.
(void)create_flags;
}

Expand Down
2 changes: 1 addition & 1 deletion shell/common/platform_util_linux.cc
Expand Up @@ -119,7 +119,7 @@ class ShowItemHelper {
bool owned = false;

if (!reader.PopBool(&owned)) {
LOG(ERROR) << "Failed to read " << kMethodNameHasOwner << " resposne";
LOG(ERROR) << "Failed to read " << kMethodNameHasOwner << " response";
} else if (owned) {
is_running = true;
}
Expand Down
4 changes: 2 additions & 2 deletions shell/renderer/electron_render_frame_observer.cc
Expand Up @@ -82,7 +82,7 @@ void ElectronRenderFrameObserver::DidInstallConditionalFeatures(
v8::Handle<v8::Context> context,
int world_id) {
// When a child window is created with window.open, its WebPreferences will
// be copied from its parent, and Chromium will intialize JS context in it
// be copied from its parent, and Chromium will initialize JS context in it
// immediately.
// Normally the WebPreferences is overriden in browser before navigation,
// but this behavior bypasses the browser side navigation and the child
Expand All @@ -92,7 +92,7 @@ void ElectronRenderFrameObserver::DidInstallConditionalFeatures(
// while "nodeIntegration=no" is passed.
// We work around this issue by delaying the child window's initialization of
// Node.js if this is the initial empty document, and only do it when the
// acutal page has started to load.
// actual page has started to load.
auto* web_frame =
static_cast<blink::WebLocalFrameImpl*>(render_frame_->GetWebFrame());
if (web_frame->Opener() && web_frame->IsOnInitialEmptyDocument()) {
Expand Down
4 changes: 2 additions & 2 deletions shell/renderer/electron_renderer_client.cc
Expand Up @@ -50,7 +50,7 @@ void ElectronRendererClient::RenderFrameCreated(
void ElectronRendererClient::RunScriptsAtDocumentStart(
content::RenderFrame* render_frame) {
RendererClientBase::RunScriptsAtDocumentStart(render_frame);
// Inform the document start pharse.
// Inform the document start phase.
v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
node::Environment* env = GetEnvironment(render_frame);
if (env)
Expand All @@ -61,7 +61,7 @@ void ElectronRendererClient::RunScriptsAtDocumentStart(
void ElectronRendererClient::RunScriptsAtDocumentEnd(
content::RenderFrame* render_frame) {
RendererClientBase::RunScriptsAtDocumentEnd(render_frame);
// Inform the document end pharse.
// Inform the document end phase.
v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
node::Environment* env = GetEnvironment(render_frame);
if (env)
Expand Down
2 changes: 1 addition & 1 deletion spec-main/index.js
Expand Up @@ -27,7 +27,7 @@ const { app, protocol } = require('electron');

v8.setFlagsFromString('--expose_gc');
app.commandLine.appendSwitch('js-flags', '--expose_gc');
// Prevent the spec runner quiting when the first window closes
// Prevent the spec runner quitting when the first window closes
app.on('window-all-closed', () => null);

// Use fake device for Media Stream to replace actual camera and microphone.
Expand Down

0 comments on commit 1e8da89

Please sign in to comment.