diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml index 88fd0051fa..d74742fc20 100644 --- a/.circleci/config/base.yml +++ b/.circleci/config/base.yml @@ -639,7 +639,7 @@ step-electron-publish: &step-electron-publish echo 'Uploading Electron release distribution to Azure' script/release/uploaders/upload.py --verbose --UPLOAD_TO_STORAGE else - echo 'Uploading Electron release distribution to Github releases' + echo 'Uploading Electron release distribution to GitHub releases' script/release/uploaders/upload.py --verbose fi diff --git a/BUILD.gn b/BUILD.gn index 2d16cd815a..e8b11ac5ba 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -132,7 +132,7 @@ config("electron_lib_config") { include_dirs = [ "." ] } -# We geneate the definitions twice here, once in //electron/electron.d.ts +# We generate the definitions twice here, once in //electron/electron.d.ts # and once in $target_gen_dir # The one in $target_gen_dir is used for the actual TSC build later one # and the one in //electron/electron.d.ts is used by your IDE (vscode) diff --git a/appveyor.yml b/appveyor.yml index 216999f6cf..0d12169703 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -3,7 +3,7 @@ # - "GN_EXTRA_ARGS" Additional gn arguments for a build config, # e.g. 'target_cpu="x86"' to build for a 32bit platform. # https://gn.googlesource.com/gn/+/master/docs/reference.md#target_cpu -# Don't forget to set up "NPM_CONFIG_ARCH" and "TARGET_ARCH" accordningly +# Don't forget to set up "NPM_CONFIG_ARCH" and "TARGET_ARCH" accordingly # if you pass a custom value for 'target_cpu'. # - "ELECTRON_RELEASE" Set it to '1' upload binaries on success. # - "NPM_CONFIG_ARCH" E.g. 'x86'. Is used to build native Node.js modules. @@ -12,7 +12,7 @@ # Is used in some publishing scripts, but does NOT affect the Electron binary. # Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "NPM_CONFIG_ARCH" value. # - "UPLOAD_TO_STORAGE" Set it to '1' upload a release to the Azure bucket. -# Otherwise the release will be uploaded to the Github Releases. +# Otherwise the release will be uploaded to the GitHub Releases. # (The value is only checked if "ELECTRON_RELEASE" is defined.) # # The publishing scripts expect access tokens to be defined as env vars, @@ -215,7 +215,7 @@ test_script: } - cd electron - if "%RUN_TESTS%"=="true" ( echo Running main test suite & node script/yarn test -- --trace-uncaught --runners=main --enable-logging=file --log-file=%cd%\electron.log ) - - if "%RUN_TESTS%"=="true" ( echo Running remote test suite & node script/yarn test -- --trace-uncaught --runners=remote --runTestFilesSeperately --enable-logging=file --log-file=%cd%\electron.log ) + - if "%RUN_TESTS%"=="true" ( echo Running remote test suite & node script/yarn test -- --trace-uncaught --runners=remote --runTestFilesSeparately --enable-logging=file --log-file=%cd%\electron.log ) - if "%RUN_TESTS%"=="true" ( echo Running native test suite & node script/yarn test -- --trace-uncaught --runners=native --enable-logging=file --log-file=%cd%\electron.log ) - cd .. - if "%RUN_TESTS%"=="true" ( echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg ) diff --git a/build/mac/make_locale_dirs.py b/build/mac/make_locale_dirs.py index 21b220f7d9..47f3a9f1f6 100644 --- a/build/mac/make_locale_dirs.py +++ b/build/mac/make_locale_dirs.py @@ -4,7 +4,7 @@ # Cocoa .app bundle. The presence of these empty directories is sufficient to # convince Cocoa that the application supports the named localization, even if # an InfoPlist.strings file is not provided. Chrome uses these empty locale -# directoires for its helper executable bundles, which do not otherwise +# directories for its helper executable bundles, which do not otherwise # require any direct Cocoa locale support. import os diff --git a/build/node.gni b/build/node.gni index a65f718e63..6d7882d346 100644 --- a/build/node.gni +++ b/build/node.gni @@ -1,6 +1,6 @@ template("node_action") { assert(defined(invoker.script), "Need script path to run") - assert(defined(invoker.args), "Need script argumets") + assert(defined(invoker.args), "Need script arguments") action(target_name) { forward_variables_from(invoker, diff --git a/build/npm.gni b/build/npm.gni index c2a0d1725a..7790dcece1 100644 --- a/build/npm.gni +++ b/build/npm.gni @@ -1,7 +1,7 @@ template("npm_action") { assert(defined(invoker.script), "Need script name to run (must be defined in package.json)") - assert(defined(invoker.args), "Need script argumets") + assert(defined(invoker.args), "Need script arguments") action("npm_pre_flight_" + target_name) { inputs = [ diff --git a/build/rules.gni b/build/rules.gni index c6c383829b..557f0b8193 100644 --- a/build/rules.gni +++ b/build/rules.gni @@ -51,7 +51,7 @@ template("compile_ib_files") { # Template to compile and package Mac XIB files as bundle data. # Arguments # sources: -# list of string, sources to comiple +# list of string, sources to compile # output_path: # (optional) string, the path to use for the outputs list in the # bundle_data step. If unspecified, defaults to bundle_resources_dir. diff --git a/docs/api/app.md b/docs/api/app.md index 94b8c954fc..0bfc137a21 100755 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -1381,7 +1381,7 @@ method returns false. If we fail to perform the copy, then this method will throw an error. The message in the error should be informative and tell you exactly what went wrong. -By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the pre-existing running app will assume focus and the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing. +By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the preexisting running app will assume focus and the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing. For example: diff --git a/docs/api/session.md b/docs/api/session.md index 8475302e94..70a1a29f4d 100644 --- a/docs/api/session.md +++ b/docs/api/session.md @@ -713,7 +713,7 @@ To clear the handler, call `setDevicePermissionHandler(null)`. This handler can be used to provide default permissioning to devices without first calling for permission to devices (eg via `navigator.hid.requestDevice`). If this handler is not defined, the default device permissions as granted through device selection (eg via `navigator.hid.requestDevice`) will be used. -Additionally, the default behavior of Electron is to store granted device permision through the lifetime +Additionally, the default behavior of Electron is to store granted device permission through the lifetime of the corresponding WebContents. If longer term storage is needed, a developer can store granted device permissions (eg when handling the `select-hid-device` event) and then read from that storage with `setDevicePermissionHandler`. diff --git a/docs/development/README.md b/docs/development/README.md index 6ddbbcdbae..fcf147f1ca 100644 --- a/docs/development/README.md +++ b/docs/development/README.md @@ -64,7 +64,7 @@ If you want to add a new API module to Electron, you'll want to look in [creatin Electron has a fully-fledged governance system that oversees activity in Electron and whose working groups are responsible for areas like APIs, releases, and upgrades to Electron's dependencies including Chromium and Node.js. Depending on how frequently and to what end you want to contribute, you may want to consider joining a working group. -Details about each group and their reponsibilities can be found in the [governance repo](https://github.com/electron/governance). +Details about each group and their responsibilities can be found in the [governance repo](https://github.com/electron/governance). ## Patches in Electron diff --git a/docs/development/debugging.md b/docs/development/debugging.md index 775a31199b..7fc7c0bc13 100644 --- a/docs/development/debugging.md +++ b/docs/development/debugging.md @@ -9,7 +9,7 @@ Some of the more common approaches are outlined below. Chromium contains logging macros which can aid debugging by printing information to console in C++ and Objective-C++. -You might use this to print out variable values, function names, and line numbers, amonst other things. +You might use this to print out variable values, function names, and line numbers, amongst other things. Some examples: @@ -25,7 +25,7 @@ See [logging.h](https://chromium.googlesource.com/chromium/src/base/+/refs/heads ## Printing Stacktraces -Chromium contains a helper to print stack traces to console without interrrupting the program. +Chromium contains a helper to print stack traces to console without interrupting the program. ```cpp #include "base/debug/stack_trace.h" diff --git a/docs/tutorial/devices.md b/docs/tutorial/devices.md index 7ce513caf9..cba807891f 100644 --- a/docs/tutorial/devices.md +++ b/docs/tutorial/devices.md @@ -43,7 +43,7 @@ the WebHID API: * [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler) can be used to provide default permissioning to devices without first calling for permission to devices via `navigator.hid.requestDevice`. Additionally, - the default behavior of Electron is to store granted device permision through + the default behavior of Electron is to store granted device permission through the lifetime of the corresponding WebContents. If longer term storage is needed, a developer can store granted device permissions (eg when handling the `select-hid-device` event) and then read from that storage with @@ -92,7 +92,7 @@ There are several additional APIs for working with the Web Serial API: * [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler) can be used to provide default permissioning to devices without first calling for permission to devices via `navigator.serial.requestPort`. Additionally, - the default behavior of Electron is to store granted device permision through + the default behavior of Electron is to store granted device permission through the lifetime of the corresponding WebContents. If longer term storage is needed, a developer can store granted device permissions (eg when handling the `select-serial-port` event) and then read from that storage with diff --git a/docs/tutorial/electron-versioning.md b/docs/tutorial/electron-versioning.md index 7e473bffd3..0948a557df 100644 --- a/docs/tutorial/electron-versioning.md +++ b/docs/tutorial/electron-versioning.md @@ -18,7 +18,7 @@ npm install --save-dev electron@latest There are several major changes from our 1.x strategy outlined below. Each change is intended to satisfy the needs and priorities of developers/maintainers and app developers. -1. Strict use of the the [SemVer](#semver) spec +1. Strict use of the [SemVer](#semver) spec 2. Introduction of semver-compliant `-beta` tags 3. Introduction of [conventional commit messages](https://conventionalcommits.org/) 4. Well-defined stabilization branches diff --git a/lib/browser/api/web-contents.ts b/lib/browser/api/web-contents.ts index f493d49801..120d85ce72 100644 --- a/lib/browser/api/web-contents.ts +++ b/lib/browser/api/web-contents.ts @@ -10,7 +10,7 @@ import * as ipcMainUtils from '@electron/internal/browser/ipc-main-internal-util import { MessagePortMain } from '@electron/internal/browser/message-port-main'; import { IPC_MESSAGES } from '@electron/internal/common/ipc-messages'; -// session is not used here, the purpose is to make sure session is initalized +// session is not used here, the purpose is to make sure session is initialized // before the webContents module. // eslint-disable-next-line session diff --git a/script/lint.js b/script/lint.js index 2047f02253..42b1abf1f0 100755 --- a/script/lint.js +++ b/script/lint.js @@ -172,7 +172,7 @@ const LINTERS = [{ run: (opts, filenames) => { const patchesDir = path.resolve(__dirname, '../patches'); const patchesConfig = path.resolve(patchesDir, 'config.json'); - // If the config does not exist, that's a proiblem + // If the config does not exist, that's a problem if (!fs.existsSync(patchesConfig)) { process.exit(1); } diff --git a/script/release/ci-release-build.js b/script/release/ci-release-build.js index 31ac6a3b74..b584a99818 100644 --- a/script/release/ci-release-build.js +++ b/script/release/ci-release-build.js @@ -115,7 +115,7 @@ async function getCircleCIWorkflowId (pipelineId) { workflowId = workflows.items.find(item => item.name.includes('publish')).id; break; } - console.log('Unxpected number of workflows, response was:', workflows); + console.log('Unexpected number of workflows, response was:', workflows); workflowId = -1; break; } @@ -139,7 +139,7 @@ async function getCircleCIJobNumber (workflowId) { continue; } if (jobInfo.items.length !== 1) { - console.log('Unxpected number of jobs, response was:', jobInfo); + console.log('Unexpected number of jobs, response was:', jobInfo); jobNumber = -1; break; } diff --git a/script/release/notes/index.js b/script/release/notes/index.js index d40ed7086f..a3ff8d267b 100755 --- a/script/release/notes/index.js +++ b/script/release/notes/index.js @@ -133,7 +133,7 @@ const getPreviousPoint = async (point) => { console.log('error', error); } - // Otherwise, use the newest stable release that preceeds this branch. + // Otherwise, use the newest stable release that precedes this branch. // To reach that you may have to walk past >1 branch, e.g. to get past // 2-1-x which never had a stable release. let branch = currentBranch; diff --git a/script/release/notes/notes.js b/script/release/notes/notes.js index 20f72b071b..7bc3d525d7 100644 --- a/script/release/notes/notes.js +++ b/script/release/notes/notes.js @@ -410,7 +410,7 @@ const getNotes = async (fromRef, toRef, newVersion) => { // remove any old commits pool.commits = pool.commits.filter(commit => !pool.processedHashes.has(commit.hash)); - // if a commmit _and_ revert occurred in the unprocessed set, skip them both + // if a commit _and_ revert occurred in the unprocessed set, skip them both for (const commit of pool.commits) { const revertHash = commit.revertHash; if (!revertHash) { diff --git a/script/release/uploaders/upload.py b/script/release/uploaders/upload.py index 69c4bbfa57..caaa726d55 100755 --- a/script/release/uploaders/upload.py +++ b/script/release/uploaders/upload.py @@ -92,9 +92,9 @@ def main(): shutil.copy2(os.path.join(OUT_DIR, 'dsym.zip'), dsym_zip) upload_electron(release, dsym_zip, args) - dsym_snaphot_zip = os.path.join(OUT_DIR, DSYM_SNAPSHOT_NAME) - shutil.copy2(os.path.join(OUT_DIR, 'dsym-snapshot.zip'), dsym_snaphot_zip) - upload_electron(release, dsym_snaphot_zip, args) + dsym_snapshot_zip = os.path.join(OUT_DIR, DSYM_SNAPSHOT_NAME) + shutil.copy2(os.path.join(OUT_DIR, 'dsym-snapshot.zip'), dsym_snapshot_zip) + upload_electron(release, dsym_snapshot_zip, args) elif PLATFORM == 'win32': if get_target_arch() != 'ia32': pdb_zip = os.path.join(OUT_DIR, PDB_NAME) @@ -359,7 +359,7 @@ def upload_electron(release, file_path, args): def upload_io_to_github(release, filename, filepath, version): - print('Uploading %s to Github' % \ + print('Uploading %s to GitHub' % \ (filename)) script_path = os.path.join( ELECTRON_DIR, 'script', 'release', 'uploaders', 'upload-to-github.ts') diff --git a/script/run-clang-tidy.ts b/script/run-clang-tidy.ts index f399b2c084..93d1a13f72 100644 --- a/script/run-clang-tidy.ts +++ b/script/run-clang-tidy.ts @@ -272,7 +272,7 @@ function parseCommandLine () { if (opts.help) showUsage(); if (!opts['out-dir']) { - console.log('--out-dir is a required argunment'); + console.log('--out-dir is a required argument'); process.exit(0); } diff --git a/script/spec-runner.js b/script/spec-runner.js index ce16865f10..eb4160c8ce 100755 --- a/script/spec-runner.js +++ b/script/spec-runner.js @@ -13,7 +13,7 @@ const fail = '✗'.red; const args = require('minimist')(process.argv, { string: ['runners', 'target'], - boolean: ['buildNativeTests', 'runTestFilesSeperately'], + boolean: ['buildNativeTests', 'runTestFilesSeparately'], unknown: arg => unknownFlags.push(arg) }); @@ -155,7 +155,7 @@ const specFilter = (file) => { }; async function runTests (specDir, testName) { - if (args.runTestFilesSeperately) { + if (args.runTestFilesSeparately) { const getFiles = require('../spec/static/get-files'); const testFiles = await getFiles(path.resolve(__dirname, `../${specDir}`), { filter: specFilter }); const baseElectronDir = path.resolve(__dirname, '..'); diff --git a/shell/browser/api/electron_api_system_preferences.h b/shell/browser/api/electron_api_system_preferences.h index d35dd5b947..a254e55324 100644 --- a/shell/browser/api/electron_api_system_preferences.h +++ b/shell/browser/api/electron_api_system_preferences.h @@ -160,7 +160,7 @@ class SystemPreferences std::string current_color_; - bool invertered_color_scheme_ = false; + bool inverted_color_scheme_ = false; bool high_contrast_color_scheme_ = false; diff --git a/shell/browser/api/electron_api_system_preferences_win.cc b/shell/browser/api/electron_api_system_preferences_win.cc index 00e9a2728b..ce47c81227 100644 --- a/shell/browser/api/electron_api_system_preferences_win.cc +++ b/shell/browser/api/electron_api_system_preferences_win.cc @@ -185,7 +185,7 @@ std::string SystemPreferences::GetMediaAccessStatus( } void SystemPreferences::InitializeWindow() { - invertered_color_scheme_ = IsInvertedColorScheme(); + inverted_color_scheme_ = IsInvertedColorScheme(); high_contrast_color_scheme_ = IsHighContrastColorScheme(); // Wait until app is ready before creating sys color listener @@ -243,10 +243,10 @@ LRESULT CALLBACK SystemPreferences::WndProc(HWND hwnd, } void SystemPreferences::OnSysColorChange() { - bool new_invertered_color_scheme = IsInvertedColorScheme(); - if (new_invertered_color_scheme != invertered_color_scheme_) { - invertered_color_scheme_ = new_invertered_color_scheme; - Emit("inverted-color-scheme-changed", new_invertered_color_scheme); + bool new_inverted_color_scheme = IsInvertedColorScheme(); + if (new_inverted_color_scheme != inverted_color_scheme_) { + inverted_color_scheme_ = new_inverted_color_scheme; + Emit("inverted-color-scheme-changed", new_inverted_color_scheme); } bool new_high_contrast_color_scheme = IsHighContrastColorScheme(); diff --git a/shell/browser/api/electron_api_web_contents.cc b/shell/browser/api/electron_api_web_contents.cc index 017897b29b..eec3e6bb96 100644 --- a/shell/browser/api/electron_api_web_contents.cc +++ b/shell/browser/api/electron_api_web_contents.cc @@ -991,7 +991,7 @@ void WebContents::DeleteThisIfAlive() { } void WebContents::Destroy() { - // The content::WebContents should be destroyed asyncronously when possible + // The content::WebContents should be destroyed asynchronously when possible // as user may choose to destroy WebContents during an event of it. if (Browser::Get()->is_shutting_down() || IsGuest()) { DeleteThisIfAlive(); diff --git a/shell/browser/api/electron_api_web_contents_mac.mm b/shell/browser/api/electron_api_web_contents_mac.mm index 8aa071e9b4..f9f1af380b 100644 --- a/shell/browser/api/electron_api_web_contents_mac.mm +++ b/shell/browser/api/electron_api_web_contents_mac.mm @@ -64,7 +64,7 @@ bool WebContents::PlatformHandleKeyboardEvent( [event.os_event.window redispatchKeyEvent:event.os_event]; // FIXME(nornagon): this isn't the right return value; we should implement // devtools windows as Widgets in order to take advantage of the - // pre-existing redispatch code in bridged_native_widget. + // preexisting redispatch code in bridged_native_widget. return false; } else if (event.os_event.window && [event.os_event.window diff --git a/shell/browser/api/event.h b/shell/browser/api/event.h index a9e4dec39e..763d684c72 100644 --- a/shell/browser/api/event.h +++ b/shell/browser/api/event.h @@ -43,7 +43,7 @@ class Event : public gin::Wrappable { const char* GetTypeName() override; private: - // Replyer for the synchronous messages. + // Replier for the synchronous messages. InvokeCallback callback_; }; diff --git a/shell/browser/browser_observer.h b/shell/browser/browser_observer.h index 5b82aa50fa..03d252d3c7 100644 --- a/shell/browser/browser_observer.h +++ b/shell/browser/browser_observer.h @@ -49,7 +49,7 @@ class BrowserObserver : public base::CheckedObserver { virtual void OnWillFinishLaunching() {} virtual void OnFinishLaunching(const base::DictionaryValue& launch_info) {} - // The browser's accessibility suppport has changed. + // The browser's accessibility support has changed. virtual void OnAccessibilitySupportChanged() {} // The app message loop is ready diff --git a/shell/browser/lib/bluetooth_chooser.cc b/shell/browser/lib/bluetooth_chooser.cc index 3dec4d19be..7c9942d7ba 100644 --- a/shell/browser/lib/bluetooth_chooser.cc +++ b/shell/browser/lib/bluetooth_chooser.cc @@ -131,7 +131,7 @@ void BluetoothChooser::AddOrUpdateDevice(const std::string& device_id, "select-bluetooth-device", GetDeviceList(), base::BindOnce(&OnDeviceChosen, event_handler_)); - // If emit not implimented select first device that matches the filters + // If emit not implemented select first device that matches the filters // provided. if (!prevent_default) { event_handler_.Run(content::BluetoothChooserEvent::SELECTED, device_id); diff --git a/shell/browser/native_window_views.cc b/shell/browser/native_window_views.cc index 03501b7b73..1f4f316048 100644 --- a/shell/browser/native_window_views.cc +++ b/shell/browser/native_window_views.cc @@ -1517,7 +1517,7 @@ void NativeWindowViews::OnWidgetActivationChanged(views::Widget* changed_widget, NativeWindow::NotifyWindowBlur(); } - // Hide menu bar when window is blured. + // Hide menu bar when window is blurred. if (!active && IsMenuBarAutoHide() && IsMenuBarVisible()) SetMenuBarVisibility(false); diff --git a/shell/browser/ui/autofill_popup.cc b/shell/browser/ui/autofill_popup.cc index dc40be4b03..93975bf676 100644 --- a/shell/browser/ui/autofill_popup.cc +++ b/shell/browser/ui/autofill_popup.cc @@ -62,7 +62,7 @@ void CalculatePopupXAndWidthHorizontallyCentered( // Calculate how much the pop-up needs to grow into the non-preferred // direction. - int amount_to_grow_in_unpreffered_direction = + int amount_to_grow_in_unpreferred_direction = std::max(0, popup_width - space_to_grow_in_preferred_direction); bubble_bounds->set_width(popup_width); @@ -70,10 +70,10 @@ void CalculatePopupXAndWidthHorizontallyCentered( // Note, in RTL the |pop_up_width| must be subtracted to achieve // right-alignment of the pop-up with the element. bubble_bounds->set_x(preferred_starting_point - popup_width + - amount_to_grow_in_unpreffered_direction); + amount_to_grow_in_unpreferred_direction); } else { bubble_bounds->set_x(preferred_starting_point - - amount_to_grow_in_unpreffered_direction); + amount_to_grow_in_unpreferred_direction); } } diff --git a/shell/browser/ui/cocoa/electron_ns_panel.mm b/shell/browser/ui/cocoa/electron_ns_panel.mm index 581c142ede..f046943772 100644 --- a/shell/browser/ui/cocoa/electron_ns_panel.mm +++ b/shell/browser/ui/cocoa/electron_ns_panel.mm @@ -17,7 +17,7 @@ } @dynamic styleMask; -// The Nonactivating mask is reserverd for NSPanel, +// The Nonactivating mask is reserved for NSPanel, // but we can use this workaround to add it at runtime - (NSWindowStyleMask)styleMask { return originalStyleMask | NSWindowStyleMaskNonactivatingPanel; diff --git a/shell/browser/ui/inspectable_web_contents.h b/shell/browser/ui/inspectable_web_contents.h index bfc6cbae89..905d7cb372 100644 --- a/shell/browser/ui/inspectable_web_contents.h +++ b/shell/browser/ui/inspectable_web_contents.h @@ -85,7 +85,7 @@ class InspectableWebContents void UpdateDevToolsZoomLevel(double level); private: - // DevToolsEmbedderMessageDispacher::Delegate + // DevToolsEmbedderMessageDispatcher::Delegate void ActivateWindow() override; void CloseWindow() override; void LoadCompleted() override; diff --git a/shell/browser/ui/views/client_frame_view_linux.h b/shell/browser/ui/views/client_frame_view_linux.h index 360b11b3ed..b9bf50d8f7 100644 --- a/shell/browser/ui/views/client_frame_view_linux.h +++ b/shell/browser/ui/views/client_frame_view_linux.h @@ -47,10 +47,10 @@ class ClientFrameViewLinux : public FramelessView, // views::WindowButtonOrderObserver: void OnWindowButtonOrderingChange() override; - // Overriden from FramelessView: + // Overridden from FramelessView: int ResizingBorderHitTest(const gfx::Point& point) override; - // Overriden from views::NonClientFrameView: + // Overridden from views::NonClientFrameView: gfx::Rect GetBoundsForClientView() const override; gfx::Rect GetWindowBoundsForClientBounds( const gfx::Rect& client_bounds) const override; diff --git a/shell/browser/ui/views/electron_views_delegate_win.cc b/shell/browser/ui/views/electron_views_delegate_win.cc index e9453422ca..10cb4ca820 100644 --- a/shell/browser/ui/views/electron_views_delegate_win.cc +++ b/shell/browser/ui/views/electron_views_delegate_win.cc @@ -51,7 +51,7 @@ bool MonitorHasAutohideTaskbarForEdge(UINT edge, HMONITOR monitor) { // There is a potential race condition here: // 1. A maximized chrome window is fullscreened. // 2. It is switched back to maximized. - // 3. In the process the window gets a WM_NCCACLSIZE message which calls us to + // 3. In the process the window gets a WM_NCCALCSIZE message which calls us to // get the autohide state. // 4. The worker thread is invoked. It calls the API to get the autohide // state. On Windows versions earlier than Windows 7, taskbars could 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 d978ce64f5..7288007747 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 @@ -76,7 +76,7 @@ bool ElectronDesktopWindowTreeHostWin::GetDwmFrameInsetsInPixels( bool ElectronDesktopWindowTreeHostWin::GetClientAreaInsets( gfx::Insets* insets, HMONITOR monitor) const { - // Windows by deafult extends the maximized window slightly larger than + // Windows by default extends the maximized window slightly larger than // current workspace, for frameless window since the standard frame has been // removed, the client area would then be drew outside current workspace. // diff --git a/shell/browser/web_contents_preferences.cc b/shell/browser/web_contents_preferences.cc index a635b991fc..734f3e48c3 100644 --- a/shell/browser/web_contents_preferences.cc +++ b/shell/browser/web_contents_preferences.cc @@ -388,7 +388,7 @@ void WebContentsPreferences::AppendCommandLineSwitches( // We are appending args to a webContents so let's save the current state // of our preferences object so that during the lifetime of the WebContents - // we can fetch the options used to initally configure the WebContents + // we can fetch the options used to initially configure the WebContents // last_preference_ = preference_.Clone(); SaveLastPreferences(); } diff --git a/shell/browser/web_contents_preferences.h b/shell/browser/web_contents_preferences.h index 544bc54a80..091778899c 100644 --- a/shell/browser/web_contents_preferences.h +++ b/shell/browser/web_contents_preferences.h @@ -44,7 +44,7 @@ class WebContentsPreferences void SetFromDictionary(const gin_helper::Dictionary& new_web_preferences); - // Append command paramters according to preferences. + // Append command parameters according to preferences. void AppendCommandLineSwitches(base::CommandLine* command_line, bool is_subframe); diff --git a/shell/common/extensions/api/cryptotoken_private.idl b/shell/common/extensions/api/cryptotoken_private.idl index bd761504f2..3bb5745d87 100644 --- a/shell/common/extensions/api/cryptotoken_private.idl +++ b/shell/common/extensions/api/cryptotoken_private.idl @@ -19,7 +19,7 @@ namespace cryptotokenPrivate { DOMString appId; // The origin of the caller. DOMString origin; - // Identifies the tab in which the registration is occuring so that any + // Identifies the tab in which the registration is occurring so that any // permissions prompt is correctly located. long tabId; }; diff --git a/shell/common/extensions/api/i18n.json b/shell/common/extensions/api/i18n.json index d819d3117b..01bc8b1759 100644 --- a/shell/common/extensions/api/i18n.json +++ b/shell/common/extensions/api/i18n.json @@ -93,7 +93,7 @@ { "type": "object", "name": "result", - "description": "LanguageDetectionResult object that holds detected langugae reliability and array of DetectedLanguage", + "description": "LanguageDetectionResult object that holds detected language reliability and array of DetectedLanguage", "properties": { "isReliable": { "type": "boolean", "description": "CLD detected language reliability" }, "languages": diff --git a/shell/common/gin_helper/event_emitter.h b/shell/common/gin_helper/event_emitter.h index 58b8d07a43..c600e896af 100644 --- a/shell/common/gin_helper/event_emitter.h +++ b/shell/common/gin_helper/event_emitter.h @@ -40,7 +40,7 @@ class EventEmitter : public gin_helper::Wrappable { using Base = gin_helper::Wrappable; using ValueArray = std::vector>; - // Make the convinient methods visible: + // Make the convenient methods visible: // https://isocpp.org/wiki/faq/templates#nondependent-name-lookup-members v8::Isolate* isolate() const { return Base::isolate(); } v8::Local GetWrapper() const { return Base::GetWrapper(); } diff --git a/shell/common/gin_helper/function_template.h b/shell/common/gin_helper/function_template.h index b5d8293213..c6d6410f94 100644 --- a/shell/common/gin_helper/function_template.h +++ b/shell/common/gin_helper/function_template.h @@ -313,7 +313,7 @@ struct CallbackTraits> { // Specialization for member function pointers. We need to handle this case // specially because the first parameter for callbacks to MFP should typically -// come from the the JavaScript "this" object the function was called on, not +// come from the JavaScript "this" object the function was called on, not // from the first normal parameter. template struct CallbackTraits< diff --git a/shell/common/key_weak_map.h b/shell/common/key_weak_map.h index 09111d48dc..038349b8e9 100644 --- a/shell/common/key_weak_map.h +++ b/shell/common/key_weak_map.h @@ -50,7 +50,7 @@ class KeyWeakMap { return v8::Local::New(isolate, iter->second.second); } - // Whethere there is an object with |key| in this WeakMap. + // Whether there is an object with |key| in this WeakMap. bool Has(const K& key) const { return map_.find(key) != map_.end(); } // Returns all objects. diff --git a/shell/renderer/electron_render_frame_observer.cc b/shell/renderer/electron_render_frame_observer.cc index 2c22d1fceb..f3ef770262 100644 --- a/shell/renderer/electron_render_frame_observer.cc +++ b/shell/renderer/electron_render_frame_observer.cc @@ -84,7 +84,7 @@ void ElectronRenderFrameObserver::DidInstallConditionalFeatures( // When a child window is created with window.open, its WebPreferences will // be copied from its parent, and Chromium will initialize JS context in it // immediately. - // Normally the WebPreferences is overriden in browser before navigation, + // Normally the WebPreferences is overridden in browser before navigation, // but this behavior bypasses the browser side navigation and the child // window will get wrong WebPreferences in the initialization. // This will end up initializing Node.js in the child window with wrong diff --git a/spec-main/api-app-spec.ts b/spec-main/api-app-spec.ts index 51c202366a..347dae24d2 100644 --- a/spec-main/api-app-spec.ts +++ b/spec-main/api-app-spec.ts @@ -127,7 +127,7 @@ describe('app module', () => { }); describe('app.isPackaged', () => { - it('should be false durings tests', () => { + it('should be false during tests', () => { expect(app.isPackaged).to.equal(false); }); }); @@ -496,7 +496,7 @@ describe('app module', () => { expect(window.id).to.equal(w.id); }); - it('should emit browser-window-blur event when window is blured', async () => { + it('should emit browser-window-blur event when window is blurred', async () => { const emitted = emittedOnce(app, 'browser-window-blur'); w = new BrowserWindow({ show: false }); w.emit('blur'); @@ -987,7 +987,7 @@ describe('app module', () => { it('gets the folder for recent files', () => { const recent = app.getPath('recent'); - // We expect that one of our test machines have overriden this + // We expect that one of our test machines have overridden this // to be something crazy, it'll always include the word "Recent" // unless people have been registry-hacking like crazy expect(recent).to.include('Recent'); diff --git a/spec-main/api-browser-window-spec.ts b/spec-main/api-browser-window-spec.ts index 3edd3becbe..039bc17b31 100644 --- a/spec-main/api-browser-window-spec.ts +++ b/spec-main/api-browser-window-spec.ts @@ -2679,7 +2679,7 @@ describe('BrowserWindow module', () => { for (const isolatedGlobal of isolated.globals) { notIsolatedGlobals.delete(isolatedGlobal); } - expect([...notIsolatedGlobals]).to.deep.equal([], 'non-isoalted renderer should have no additional globals'); + expect([...notIsolatedGlobals]).to.deep.equal([], 'non-isolated renderer should have no additional globals'); }); it('loads the script before other scripts in window', async () => { diff --git a/spec-main/api-net-log-spec.ts b/spec-main/api-net-log-spec.ts index 4cae12478a..f7fed76843 100644 --- a/spec-main/api-net-log-spec.ts +++ b/spec-main/api-net-log-spec.ts @@ -134,7 +134,7 @@ describe('netLog module', () => { expect(fs.existsSync(dumpFile)).to.be.true('dump file exists'); }); - ifit(process.platform !== 'linux')('should begin and end logging automtically when --log-net-log is passed, and behave correctly when .startLogging() and .stopLogging() is called', async () => { + ifit(process.platform !== 'linux')('should begin and end logging automatically when --log-net-log is passed, and behave correctly when .startLogging() and .stopLogging() is called', async () => { const appProcess = ChildProcess.spawn(process.execPath, [appPath], { env: { diff --git a/spec-main/api-session-spec.ts b/spec-main/api-session-spec.ts index 15c3cf8206..3631a532ca 100644 --- a/spec-main/api-session-spec.ts +++ b/spec-main/api-session-spec.ts @@ -1013,7 +1013,7 @@ describe('session module', () => { const w = new BrowserWindow({ show: false, webPreferences: { - partition: 'very-temp-permision-handler', + partition: 'very-temp-permission-handler', nodeIntegration: true, contextIsolation: false } diff --git a/spec-main/api-web-contents-spec.ts b/spec-main/api-web-contents-spec.ts index c340d309c8..55626f4189 100644 --- a/spec-main/api-web-contents-spec.ts +++ b/spec-main/api-web-contents-spec.ts @@ -247,7 +247,7 @@ describe('webContents module', () => { const result = await w.webContents.executeJavaScript(code); expect(result).to.equal(expected); }); - it('resolves the returned promise with the result if the code returns an asyncronous promise', async () => { + it('resolves the returned promise with the result if the code returns an asynchronous promise', async () => { const result = await w.webContents.executeJavaScript(asyncCode); expect(result).to.equal(expected); }); @@ -883,7 +883,7 @@ describe('webContents module', () => { describe('getOSProcessId()', () => { afterEach(closeAllWindows); - it('returns a valid procress id', async () => { + it('returns a valid process id', async () => { const w = new BrowserWindow({ show: false }); expect(w.webContents.getOSProcessId()).to.equal(0); diff --git a/spec-main/chromium-spec.ts b/spec-main/chromium-spec.ts index c1d29bbf8e..06fa2e5154 100644 --- a/spec-main/chromium-spec.ts +++ b/spec-main/chromium-spec.ts @@ -2150,7 +2150,7 @@ describe('navigator.hid', () => { await requestDevices(); if (haveDevices) { - // We have devices to exclude, so check if exculsionFilters work + // We have devices to exclude, so check if exclusionFilters work checkForExcludedDevice = true; await w.webContents.executeJavaScript(` navigator.hid.requestDevice({filters: [], exclusionFilters: ${JSON.stringify(exclusionFilters)}}).then(device => device.toString()).catch(err => err.toString()); diff --git a/spec-main/release-notes-spec.ts b/spec-main/release-notes-spec.ts index a2fd06b93f..aa47575f4b 100644 --- a/spec-main/release-notes-spec.ts +++ b/spec-main/release-notes-spec.ts @@ -52,7 +52,7 @@ class GitFake { const b: string = args[2]!; stdout = this.mergeBase(a, b); } else if (args.length === 3 && args[0] === 'log' && args[1] === '--format=%H') { - // exepcted form: `git log --format=%H branchName + // expected form: `git log --format=%H branchName const branch: string = args[2]!; stdout = this.branches[branch].map((commit: Commit) => commit.sha1).join('\n'); } else if (args.length > 1 && args[0] === 'log' && args.includes('--format=%H,%s')) { @@ -107,10 +107,10 @@ describe('release notes', () => { const oldTropFix = new Commit('8751f485c5a6c8c78990bfd55a4350700f81f8cd', 'fix: workaround for hang when preventDefault-ing nativeWindowOpen (#22749)'); // a PR that has unusual note formatting - const sublist = new Commit('61dc1c88fd34a3e8fff80c80ed79d0455970e610', 'fix: client area inset calculation when maximized for framless windows (#25052) (#25216)'); + const sublist = new Commit('61dc1c88fd34a3e8fff80c80ed79d0455970e610', 'fix: client area inset calculation when maximized for frameless windows (#25052) (#25216)'); before(() => { - // location of relase-notes' octokit reply cache + // location of release-notes' octokit reply cache const fixtureDir = path.resolve(__dirname, 'fixtures', 'release-notes'); process.env.NOTES_CACHE_PATH = path.resolve(fixtureDir, 'cache'); }); diff --git a/spec-main/version-bump-spec.ts b/spec-main/version-bump-spec.ts index ef37d871b7..7a8ef9113c 100644 --- a/spec-main/version-bump-spec.ts +++ b/spec-main/version-bump-spec.ts @@ -60,7 +60,7 @@ class GitFake { describe('version-bumper', () => { describe('makeVersion', () => { - it('makes a version with a period delimeter', () => { + it('makes a version with a period delimiter', () => { const components = { major: 2, minor: 0, @@ -71,7 +71,7 @@ describe('version-bumper', () => { expect(version).to.equal('2.0.0'); }); - it('makes a version with a period delimeter and a partial pre', () => { + it('makes a version with a period delimiter and a partial pre', () => { const components = { major: 2, minor: 0, @@ -83,7 +83,7 @@ describe('version-bumper', () => { expect(version).to.equal('2.0.0.12345678'); }); - it('makes a version with a period delimeter and a full pre', () => { + it('makes a version with a period delimiter and a full pre', () => { const components = { major: 2, minor: 0, diff --git a/spec/asar-spec.js b/spec/asar-spec.js index 4468bf85e2..d95dcb4711 100644 --- a/spec/asar-spec.js +++ b/spec/asar-spec.js @@ -1677,7 +1677,7 @@ describe('asar package', function () { describe('graceful-fs module', function () { const gfs = require('graceful-fs'); - it('recognize asar archvies', function () { + it('recognize asar archives', function () { const p = path.join(asarDir, 'a.asar', 'link1'); expect(gfs.readFileSync(p).toString().trim()).to.equal('file1'); }); diff --git a/spec/chromium-spec.js b/spec/chromium-spec.js index d0379b13d6..6e92dc6c7e 100644 --- a/spec/chromium-spec.js +++ b/spec/chromium-spec.js @@ -358,7 +358,7 @@ describe('chromium feature', () => { }); }); - it('requesting persitent quota works', async () => { + it('requesting persistent quota works', async () => { const grantedBytes = await new Promise(resolve => { navigator.webkitPersistentStorage.requestQuota(1024 * 1024, resolve); }); @@ -459,7 +459,7 @@ describe('chromium feature', () => { describe('window.history', () => { describe('window.history.go(offset)', () => { - it('throws an exception when the argumnet cannot be converted to a string', () => { + it('throws an exception when the argument cannot be converted to a string', () => { expect(() => { window.history.go({ toString: null }); }).to.throw('Cannot convert object to primitive value'); @@ -482,7 +482,7 @@ describe('chromium feature', () => { const sentence = `long sentence which will take at least a few seconds to utter so that it's possible to pause and resume before the end`; const utter = new SpeechSynthesisUtterance(sentence); - // Create a dummy utterence so that speech synthesis state + // Create a dummy utterance so that speech synthesis state // is initialized for later calls. speechSynthesis.speak(new SpeechSynthesisUtterance()); speechSynthesis.cancel(); diff --git a/spec/node-spec.js b/spec/node-spec.js index 05af8764c0..2d3fdd53af 100644 --- a/spec/node-spec.js +++ b/spec/node-spec.js @@ -45,7 +45,7 @@ describe('node feature', () => { expect(msg).to.equal('message'); }); - it('works in forked process when options.env is specifed', async () => { + it('works in forked process when options.env is specified', async () => { const child = ChildProcess.fork(path.join(fixtures, 'module', 'fork_ping.js'), [], { path: process.env.PATH }); diff --git a/spec/static/index.html b/spec/static/index.html index 7c316a69f1..f69432535a 100644 --- a/spec/static/index.html +++ b/spec/static/index.html @@ -24,7 +24,7 @@ // DO NOT MOVE, REMOVE OR EDIT THIS LINE require('chai').use(require('chai-as-promised')) - // Rediret all output to browser. + // Redirect all output to browser. const fakeConsole = {} for (const k in console) { if (console.hasOwnProperty(k) && k !== 'assert') { diff --git a/spec/static/main.js b/spec/static/main.js index 075d699ede..262024a881 100644 --- a/spec/static/main.js +++ b/spec/static/main.js @@ -136,7 +136,7 @@ app.whenReady().then(async function () { const chosen = dialog.showMessageBox(window, { type: 'warning', buttons: ['Close', 'Keep Waiting'], - message: 'Window is not responsing', + message: 'Window is not responding', detail: 'The window is not responding. Would you like to force close it or just keep waiting?' }); if (chosen === 0) window.destroy(); diff --git a/spec/ts-smoke/electron/main.ts b/spec/ts-smoke/electron/main.ts index 5d1b6dd6b6..6cd4db3b71 100644 --- a/spec/ts-smoke/electron/main.ts +++ b/spec/ts-smoke/electron/main.ts @@ -60,9 +60,9 @@ app.whenReady().then(() => { // and load the index.html of the app. mainWindow.loadURL(`file://${__dirname}/index.html`) - mainWindow.loadURL('file://foo/bar', { userAgent: 'cool-agent', httpReferrer: 'greateRefferer' }) - mainWindow.webContents.loadURL('file://foo/bar', { userAgent: 'cool-agent', httpReferrer: 'greateRefferer' }) - mainWindow.webContents.loadURL('file://foo/bar', { userAgent: 'cool-agent', httpReferrer: 'greateRefferer', postData: [{ type: 'rawData', bytes: Buffer.from([123]) }] }) + mainWindow.loadURL('file://foo/bar', { userAgent: 'cool-agent', httpReferrer: 'greatReferrer' }) + mainWindow.webContents.loadURL('file://foo/bar', { userAgent: 'cool-agent', httpReferrer: 'greatReferrer' }) + mainWindow.webContents.loadURL('file://foo/bar', { userAgent: 'cool-agent', httpReferrer: 'greatReferrer', postData: [{ type: 'rawData', bytes: Buffer.from([123]) }] }) mainWindow.webContents.openDevTools() mainWindow.webContents.toggleDevTools() @@ -513,7 +513,7 @@ dialog.showOpenDialog(win3, { const ret = globalShortcut.register('ctrl+x', () => { console.log('ctrl+x is pressed') }) -if (!ret) { console.log('registerion fails') } +if (!ret) { console.log('registration fails') } // Check whether a shortcut is registered. console.log(globalShortcut.isRegistered('ctrl+x')) @@ -940,7 +940,7 @@ app.whenReady().then(() => { appIcon.displayBalloon({ title: 'Hello World!', - content: 'This the the balloon content.', + content: 'This is the balloon content.', iconType: 'error', icon: 'path/to/icon', respectQuietTime: true, diff --git a/spec/webview-spec.js b/spec/webview-spec.js index 6b548b5654..c703c57c8c 100644 --- a/spec/webview-spec.js +++ b/spec/webview-spec.js @@ -233,7 +233,7 @@ describe(' tag', function () { const types = JSON.parse(message); expect(types).to.include({ - require: 'function', // arguments passed to it should be availale + require: 'function', // arguments passed to it should be available electron: 'undefined', // objects from the scope it is called from should not be available window: 'object', // the window object should be available localVar: 'undefined' // but local variables should not be exposed to the window @@ -634,7 +634,7 @@ describe(' tag', function () { }); describe('will-navigate event', () => { - it('emits when a url that leads to oustide of the page is clicked', async () => { + it('emits when a url that leads to outside of the page is clicked', async () => { loadWebView(webview, { src: `file://${fixtures}/pages/webview-will-navigate.html` });