зеркало из https://github.com/electron/electron.git
chore: fix typos (#32985)
This commit is contained in:
Родитель
069cde09fb
Коммит
1e8da899a3
|
@ -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;
|
||||
|
|
|
@ -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)>(
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace auto_updater {
|
|||
|
||||
namespace {
|
||||
|
||||
// The gloal SQRLUpdater object.
|
||||
// The global SQRLUpdater object.
|
||||
SQRLUpdater* g_updater = nil;
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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_) {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
@ -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()) {
|
||||
|
|
|
@ -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)
|
||||
|
@ -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)
|
||||
|
|
|
@ -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.
|
||||
|
|
Загрузка…
Ссылка в новой задаче