mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
Compare commits
23 Commits
v23.0.0-be
...
v23.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bfb870234d | ||
|
|
792a7c5913 | ||
|
|
705ef4bc60 | ||
|
|
14dc9a479f | ||
|
|
a290148714 | ||
|
|
b71926aba9 | ||
|
|
485bbfecfd | ||
|
|
401ea74cc8 | ||
|
|
419b5b77ae | ||
|
|
53ab44b1f2 | ||
|
|
13549bbc7b | ||
|
|
e69270a600 | ||
|
|
39203e93c0 | ||
|
|
961cc47948 | ||
|
|
9c614be4f8 | ||
|
|
e5da0b5c59 | ||
|
|
7db9895214 | ||
|
|
d706649da8 | ||
|
|
51ac59e1eb | ||
|
|
7623604030 | ||
|
|
ab2d2dc625 | ||
|
|
0e8b10beba | ||
|
|
e1dce7c1f7 |
@@ -486,7 +486,9 @@ step-fix-sync: &step-fix-sync
|
||||
run:
|
||||
name: Fix Sync
|
||||
command: |
|
||||
SEDOPTION="-i"
|
||||
if [ "`uname`" == "Darwin" ]; then
|
||||
SEDOPTION="-i ''"
|
||||
# Fix Clang Install (wrong binary)
|
||||
rm -rf src/third_party/llvm-build
|
||||
python3 src/tools/clang/scripts/update.py
|
||||
@@ -496,13 +498,16 @@ step-fix-sync: &step-fix-sync
|
||||
# Remove extra output from calling gclient getdep which always calls update_depot_tools
|
||||
sed -i '' "s/Updating depot_tools... //g" esbuild_ensure_file
|
||||
cipd ensure --root src/third_party/devtools-frontend/src/third_party/esbuild -ensure-file esbuild_ensure_file
|
||||
|
||||
# Fix ninja (wrong binary)
|
||||
echo 'infra/3pp/tools/ninja/${platform}' `gclient getdep --deps-file=src/DEPS -r 'src/third_party/ninja:infra/3pp/tools/ninja/${platform}'` > ninja_ensure_file
|
||||
sed -i '' "s/Updating depot_tools... //g" ninja_ensure_file
|
||||
cipd ensure --root src/third_party/ninja -ensure-file ninja_ensure_file
|
||||
fi
|
||||
|
||||
# Make sure we are using the right ninja
|
||||
echo 'infra/3pp/tools/ninja/${platform}' `gclient getdep --deps-file=src/DEPS -r 'src/third_party/ninja:infra/3pp/tools/ninja/${platform}'` > ninja_ensure_file
|
||||
sed $SEDOPTION "s/Updating depot_tools... //g" ninja_ensure_file
|
||||
cipd ensure --root src/third_party/ninja -ensure-file ninja_ensure_file
|
||||
|
||||
# Explicitly add ninja to the path
|
||||
echo 'export PATH="$PATH:'"$PWD"'/src/third_party/ninja"' >> $BASH_ENV
|
||||
|
||||
cd src/third_party/angle
|
||||
rm .git/objects/info/alternates
|
||||
git remote set-url origin https://chromium.googlesource.com/angle/angle.git
|
||||
|
||||
@@ -7,9 +7,6 @@ on:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
permissions: # added using https://github.com/step-security/secure-workflows
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
trigger_chromedriver:
|
||||
runs-on: ubuntu-latest
|
||||
@@ -17,10 +14,10 @@ jobs:
|
||||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag: v3
|
||||
- name: Trigger New chromedriver Release
|
||||
run: |
|
||||
if [[ ${{ github.event.release.tag_name }} =~ ^v[0-9]+\.0\.0$ ]]; then
|
||||
if [[ ${{ github.event.release.tag_name }} =~ ^v\d+\.\d+\.\d+$ ]]; then
|
||||
gh api /repos/:owner/chromedriver/actions/workflows/release.yml/dispatches --input - <<< '{"ref":"main","inputs":{"version":"${{ github.event.release.tag_name }}"}}'
|
||||
else
|
||||
echo "Not releasing for version ${{ github.event.release.tag_name }}: requires major version change"
|
||||
echo "Not releasing for version ${{ github.event.release.tag_name }}"
|
||||
fi
|
||||
|
||||
trigger_mksnapshot:
|
||||
@@ -29,4 +26,8 @@ jobs:
|
||||
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag: v3
|
||||
- name: Trigger New mksnapshot Release
|
||||
run: |
|
||||
gh api /repos/:owner/mksnapshot/actions/workflows/release.yml/dispatches --input - <<< '{"ref":"main","inputs":{"version":"${{ github.event.release.tag_name }}"}}'
|
||||
if [[ ${{ github.event.release.tag_name }} =~ ^v\d+\.\d+\.\d+$ ]]; then
|
||||
gh api /repos/:owner/mksnapshot/actions/workflows/release.yml/dispatches --input - <<< '{"ref":"main","inputs":{"version":"${{ github.event.release.tag_name }}"}}'
|
||||
else
|
||||
echo "Not releasing for version ${{ github.event.release.tag_name }}"
|
||||
fi
|
||||
|
||||
2
BUILD.gn
2
BUILD.gn
@@ -632,8 +632,6 @@ source_set("electron_lib") {
|
||||
sources += [
|
||||
"shell/browser/certificate_manager_model.cc",
|
||||
"shell/browser/certificate_manager_model.h",
|
||||
"shell/browser/ui/gtk/menu_util.cc",
|
||||
"shell/browser/ui/gtk/menu_util.h",
|
||||
"shell/browser/ui/gtk_util.cc",
|
||||
"shell/browser/ui/gtk_util.h",
|
||||
]
|
||||
|
||||
2
DEPS
2
DEPS
@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'110.0.5481.38',
|
||||
'110.0.5481.77',
|
||||
'node_version':
|
||||
'v18.12.1',
|
||||
'nan_version':
|
||||
|
||||
@@ -39,7 +39,7 @@ For more installation options and troubleshooting tips, see
|
||||
Each Electron release provides binaries for macOS, Windows, and Linux.
|
||||
|
||||
* macOS (High Sierra and up): Electron provides 64-bit Intel and ARM binaries for macOS. Apple Silicon support was added in Electron 11.
|
||||
* Windows (Windows 10 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8. Support for Windows 7 and 8 was [removed in Electron 23, in line with Chromium's Windows deprecation policy](https://www.electronjs.org/blog/windows-7-to-8-1-deprecation-notice).
|
||||
* Windows (Windows 10 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8. Support for Windows 7, 8 and 8.1 was [removed in Electron 23, in line with Chromium's Windows deprecation policy](https://www.electronjs.org/blog/windows-7-to-8-1-deprecation-notice).
|
||||
* Linux: The prebuilt binaries of Electron are built on Ubuntu 20.04. They have also been verified to work on:
|
||||
* Ubuntu 14.04 and newer
|
||||
* Fedora 24 and newer
|
||||
|
||||
@@ -51,6 +51,8 @@ environment:
|
||||
|
||||
clone_folder: C:\projects\src\electron
|
||||
|
||||
skip_branch_with_pr: true
|
||||
|
||||
# the first failed job cancels other jobs and fails entire build
|
||||
matrix:
|
||||
fast_finish: true
|
||||
@@ -130,6 +132,7 @@ for:
|
||||
}
|
||||
- if "%RUN_GCLIENT_SYNC%"=="true" ( gclient sync --with_branch_heads --with_tags ) else ( gclient runhooks )
|
||||
- cd src
|
||||
- ps: $env:PATH="$pwd\third_party\ninja;$env:PATH"
|
||||
- set BUILD_CONFIG_PATH=//electron/build/args/%GN_CONFIG%.gn
|
||||
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") import(\"%GN_GOMA_FILE%\") %GN_EXTRA_ARGS% "
|
||||
- gn check out/Default //electron:electron_lib
|
||||
|
||||
@@ -49,6 +49,8 @@ environment:
|
||||
|
||||
clone_folder: C:\projects\src\electron
|
||||
|
||||
skip_branch_with_pr: true
|
||||
|
||||
# the first failed job cancels other jobs and fails entire build
|
||||
matrix:
|
||||
fast_finish: true
|
||||
@@ -128,6 +130,7 @@ for:
|
||||
}
|
||||
- if "%RUN_GCLIENT_SYNC%"=="true" ( gclient sync --with_branch_heads --with_tags ) else ( gclient runhooks )
|
||||
- cd src
|
||||
- ps: $env:PATH="$pwd\third_party\ninja;$env:PATH"
|
||||
- set BUILD_CONFIG_PATH=//electron/build/args/%GN_CONFIG%.gn
|
||||
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") import(\"%GN_GOMA_FILE%\") %GN_EXTRA_ARGS% "
|
||||
- gn check out/Default //electron:electron_lib
|
||||
|
||||
@@ -1036,6 +1036,8 @@ height areas you have within the overall content view.
|
||||
The aspect ratio is not respected when window is resized programmatically with
|
||||
APIs like `win.setSize`.
|
||||
|
||||
To reset an aspect ratio, pass 0 as the `aspectRatio` value: `win.setAspectRatio(0)`.
|
||||
|
||||
#### `win.setBackgroundColor(backgroundColor)`
|
||||
|
||||
* `backgroundColor` string - Color in Hex, RGB, RGBA, HSL, HSLA or named CSS color format. The alpha channel is optional for the hex type.
|
||||
|
||||
@@ -29,8 +29,9 @@ __Platform Considerations__
|
||||
|
||||
__Linux__
|
||||
|
||||
* Tray icon requires support of [StatusNotifierItem](https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/)
|
||||
in user's desktop environment.
|
||||
* Tray icon uses [StatusNotifierItem](https://www.freedesktop.org/wiki/Specifications/StatusNotifierItem/)
|
||||
by default, when it is not available in user's desktop environment the
|
||||
`GtkStatusIcon` will be used instead.
|
||||
* The `click` event is emitted when the tray icon receives activation from
|
||||
user, however the StatusNotifierItem spec does not specify which action would
|
||||
cause an activation, for some environments it is left mouse click, but for
|
||||
|
||||
@@ -1359,31 +1359,6 @@ If you would like the page to stay hidden, you should ensure that `stayHidden` i
|
||||
Returns `boolean` - Whether this page is being captured. It returns true when the capturer count
|
||||
is large then 0.
|
||||
|
||||
#### `contents.incrementCapturerCount([size, stayHidden, stayAwake])` _Deprecated_
|
||||
|
||||
* `size` [Size](structures/size.md) (optional) - The preferred size for the capturer.
|
||||
* `stayHidden` boolean (optional) - Keep the page hidden instead of visible.
|
||||
* `stayAwake` boolean (optional) - Keep the system awake instead of allowing it to sleep.
|
||||
|
||||
Increase the capturer count by one. The page is considered visible when its browser window is
|
||||
hidden and the capturer count is non-zero. If you would like the page to stay hidden, you should ensure that `stayHidden` is set to true.
|
||||
|
||||
This also affects the Page Visibility API.
|
||||
|
||||
**Deprecated:** This API's functionality is now handled automatically within `contents.capturePage()`. See [breaking changes](../breaking-changes.md).
|
||||
|
||||
#### `contents.decrementCapturerCount([stayHidden, stayAwake])` _Deprecated_
|
||||
|
||||
* `stayHidden` boolean (optional) - Keep the page in hidden state instead of visible.
|
||||
* `stayAwake` boolean (optional) - Keep the system awake instead of allowing it to sleep.
|
||||
|
||||
Decrease the capturer count by one. The page will be set to hidden or occluded state when its
|
||||
browser window is hidden or occluded and the capturer count reaches zero. If you want to
|
||||
decrease the hidden capturer count instead you should set `stayHidden` to true.
|
||||
|
||||
**Deprecated:** This API's functionality is now handled automatically within `contents.capturePage()`.
|
||||
See [breaking changes](../breaking-changes.md).
|
||||
|
||||
#### `contents.getPrinters()` _Deprecated_
|
||||
|
||||
Get the system printer list.
|
||||
|
||||
@@ -15,7 +15,7 @@ calls, and other compiler optimizations. The only workaround is to build an
|
||||
unoptimized local build.
|
||||
|
||||
The official symbol server URL for Electron is
|
||||
https://symbols.electronjs.org.
|
||||
<https://symbols.electronjs.org>.
|
||||
You cannot visit this URL directly, you must add it to the symbol path of your
|
||||
debugging tool. In the examples below, a local cache directory is used to avoid
|
||||
repeatedly fetching the PDB from the server. Replace `c:\code\symbols` with an
|
||||
|
||||
@@ -23,6 +23,8 @@ if (!gotTheLock) {
|
||||
if (mainWindow.isMinimized()) mainWindow.restore()
|
||||
mainWindow.focus()
|
||||
}
|
||||
|
||||
dialog.showErrorBox('Welcome Back', `You arrived from: ${commandLine.pop().slice(0,-1)}`)
|
||||
})
|
||||
|
||||
// Create mainWindow, load the rest of the app, etc...
|
||||
|
||||
@@ -61,7 +61,7 @@ const createWindow = () => {
|
||||
|
||||
In this next step, we will create our `BrowserWindow` and tell our application how to handle an event in which an external protocol is clicked.
|
||||
|
||||
This code will be different in Windows compared to MacOS and Linux. This is due to Windows requiring additional code in order to open the contents of the protocol link within the same Electron instance. Read more about this [here](https://www.electronjs.org/docs/api/app#apprequestsingleinstancelock).
|
||||
This code will be different in Windows compared to MacOS and Linux. This is due to Windows requiring additional code in order to open the contents of the protocol link within the same Electron instance. Read more about this [here](../api/app.md#apprequestsingleinstancelockadditionaldata).
|
||||
|
||||
#### Windows code:
|
||||
|
||||
@@ -77,17 +77,15 @@ if (!gotTheLock) {
|
||||
if (mainWindow.isMinimized()) mainWindow.restore()
|
||||
mainWindow.focus()
|
||||
}
|
||||
// the commandLine is array of strings in which last element is deep link url
|
||||
// the url str ends with /
|
||||
dialog.showErrorBox('Welcome Back', `You arrived from: ${commandLine.pop().slice(0, -1)}`)
|
||||
})
|
||||
|
||||
// Create mainWindow, load the rest of the app, etc...
|
||||
app.whenReady().then(() => {
|
||||
createWindow()
|
||||
})
|
||||
|
||||
// Handle the protocol. In this case, we choose to show an Error Box.
|
||||
app.on('open-url', (event, url) => {
|
||||
dialog.showErrorBox('Welcome Back', `You arrived from: ${url}`)
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
@@ -35,9 +35,15 @@ filenames = {
|
||||
"shell/browser/relauncher_linux.cc",
|
||||
"shell/browser/ui/electron_desktop_window_tree_host_linux.cc",
|
||||
"shell/browser/ui/file_dialog_gtk.cc",
|
||||
"shell/browser/ui/gtk/menu_gtk.cc",
|
||||
"shell/browser/ui/gtk/menu_gtk.h",
|
||||
"shell/browser/ui/gtk/menu_util.cc",
|
||||
"shell/browser/ui/gtk/menu_util.h",
|
||||
"shell/browser/ui/message_box_gtk.cc",
|
||||
"shell/browser/ui/tray_icon_gtk.cc",
|
||||
"shell/browser/ui/tray_icon_gtk.h",
|
||||
"shell/browser/ui/status_icon_gtk.cc",
|
||||
"shell/browser/ui/status_icon_gtk.h",
|
||||
"shell/browser/ui/tray_icon_linux.cc",
|
||||
"shell/browser/ui/tray_icon_linux.h",
|
||||
"shell/browser/ui/views/client_frame_view_linux.cc",
|
||||
"shell/browser/ui/views/client_frame_view_linux.h",
|
||||
"shell/common/application_info_linux.cc",
|
||||
|
||||
@@ -21,8 +21,9 @@ global.module = new Module('electron/js2c/worker_init');
|
||||
global.require = makeRequireFunction(global.module);
|
||||
|
||||
// Set the __filename to the path of html file if it is file: protocol.
|
||||
if (self.location.protocol === 'file:') {
|
||||
const pathname = process.platform === 'win32' && self.location.pathname[0] === '/' ? self.location.pathname.substr(1) : self.location.pathname;
|
||||
// NB. 'self' isn't defined in an AudioWorklet.
|
||||
if (typeof self !== 'undefined' && self.location.protocol === 'file:') {
|
||||
const pathname = process.platform === 'win32' && self?.location.pathname[0] === '/' ? self?.location.pathname.substr(1) : self?.location.pathname;
|
||||
global.__filename = path.normalize(decodeURIComponent(pathname));
|
||||
global.__dirname = path.dirname(global.__filename);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
"@azure/storage-blob": "^12.9.0",
|
||||
"@electron/asar": "^3.2.1",
|
||||
"@electron/docs-parser": "^1.0.0",
|
||||
"@electron/fiddle-core": "^1.0.4",
|
||||
"@electron/github-app-auth": "^1.5.0",
|
||||
"@electron/typescript-definitions": "^8.10.0",
|
||||
"@octokit/rest": "^18.0.3",
|
||||
|
||||
@@ -33,10 +33,10 @@ index d78fad5f8e4549c605c9d2e5b5265fba987d6794..1239a4d5eb849455e0fe739fb32a1d78
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 8ba5a90740a059ce265d5e7690921f18a636f674..791a9f7a1e567fc7e855b466e710ea00fd2a06b7 100644
|
||||
index 21547000bf9097320825919238a3ad3e2979f4b4..fe6b4b52417c9c276c4f0a0ec4e8a453fa346cad 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4604,7 +4604,7 @@ static_library("browser") {
|
||||
@@ -4603,7 +4603,7 @@ static_library("browser") {
|
||||
|
||||
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
|
||||
# than here in :chrome_dll.
|
||||
|
||||
@@ -210,10 +210,10 @@ index a50a83d36f9172add44867ee0b0f1c89779b387e..c4ac7d4c885e764cfcfc3f2cd25e31b4
|
||||
|
||||
} // namespace blink
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
index 6f6b091a3c0e1b0bc65a72bbb4adb65439bd58c1..89651dea92b168c30a1212938b689d4b47953be1 100644
|
||||
index b072b4ae6c85ce5a1f3b4249ebf556e331624771..e387c4dfbae62f60072a1700e105960da719ef86 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2207,6 +2207,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2210,6 +2210,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
WebWindowFeatures window_features =
|
||||
GetWindowFeaturesFromString(features, entered_window, completed_url);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ in favor of defining PreconnectRequest in this file since we don't build
|
||||
the header.
|
||||
|
||||
diff --git a/chrome/browser/predictors/preconnect_manager.cc b/chrome/browser/predictors/preconnect_manager.cc
|
||||
index de39505b1e515559182b6b3f25ffbe96f0b8262b..a040d30dd35f3f6c4dda58fb9d2e3e537ecbb9f7 100644
|
||||
index d3f1b0daafb8a3a12f6f5a26cb24c98312b38f8d..00dc7871d41efe918c709a0e2728832c10162893 100644
|
||||
--- a/chrome/browser/predictors/preconnect_manager.cc
|
||||
+++ b/chrome/browser/predictors/preconnect_manager.cc
|
||||
@@ -10,9 +10,11 @@
|
||||
@@ -63,7 +63,7 @@ index de39505b1e515559182b6b3f25ffbe96f0b8262b..a040d30dd35f3f6c4dda58fb9d2e3e53
|
||||
|
||||
void PreconnectManager::Start(const GURL& url,
|
||||
diff --git a/chrome/browser/predictors/preconnect_manager.h b/chrome/browser/predictors/preconnect_manager.h
|
||||
index 5f7e0db497a48829a330d7aae63d0da34cca7e33..d25f97a11174cb6e28b961cd7fc59ba3831e7a54 100644
|
||||
index d18470c05cdaffbc48b83cc0c76f7085442dccce..0c0a3f11a2da083ef5437a0e6abcf91afbcf9df3 100644
|
||||
--- a/chrome/browser/predictors/preconnect_manager.h
|
||||
+++ b/chrome/browser/predictors/preconnect_manager.h
|
||||
@@ -17,7 +17,9 @@
|
||||
|
||||
@@ -121,7 +121,7 @@ index ba331906397e7355dba0377641eb08ba14495648..790f48fa351f82f22968a63733986b62
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
|
||||
index 0cd52f9e25177831d02911b60ce267e07f8ee79e..2317ef7f3884c34ac7f2bd815a5b16196294e553 100644
|
||||
index 0cd52f9e25177831d02911b60ce267e07f8ee79e..4161df767143b2497c396da1942076eaccbb8bad 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -29,8 +29,6 @@
|
||||
@@ -298,6 +298,15 @@ index 0cd52f9e25177831d02911b60ce267e07f8ee79e..2317ef7f3884c34ac7f2bd815a5b1619
|
||||
|
||||
auto callback_wrapper =
|
||||
base::BindOnce(&PrintViewManagerBase::UpdatePrintSettingsReply,
|
||||
@@ -637,7 +671,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
void PrintViewManagerBase::IsPrintingEnabled(
|
||||
IsPrintingEnabledCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
- std::move(callback).Run(printing_enabled_.GetValue());
|
||||
+ std::move(callback).Run(true);
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -653,14 +687,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
// didn't happen for some reason.
|
||||
bad_message::ReceivedBadMessage(
|
||||
|
||||
@@ -51,7 +51,7 @@ index bfee280212fc4d85b2b0a92ac79d898de3cb5ab3..a79cec8d82b439202ecf40b3d55b7570
|
||||
}
|
||||
}
|
||||
diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js
|
||||
index 6f25b2e67ab77613c6ed63c227bb875d5461f45f..d1527b859bbea15fdf30622fc8f2700bde5b4591 100644
|
||||
index 6f25b2e67ab77613c6ed63c227bb875d5461f45f..010fa8f78a21a8146879849e2e887332e2694e51 100644
|
||||
--- a/lib/internal/modules/esm/translators.js
|
||||
+++ b/lib/internal/modules/esm/translators.js
|
||||
@@ -154,7 +154,7 @@ translators.set('commonjs', async function commonjsStrategy(url, source,
|
||||
@@ -63,15 +63,19 @@ index 6f25b2e67ab77613c6ed63c227bb875d5461f45f..d1527b859bbea15fdf30622fc8f2700b
|
||||
[...exportNames] : ['default', ...exportNames];
|
||||
|
||||
return new ModuleWrap(url, undefined, namesWithDefault, function() {
|
||||
@@ -173,7 +173,7 @@ translators.set('commonjs', async function commonjsStrategy(url, source,
|
||||
@@ -173,9 +173,9 @@ translators.set('commonjs', async function commonjsStrategy(url, source,
|
||||
}
|
||||
}
|
||||
|
||||
- for (const exportName of exportNames) {
|
||||
- if (!ObjectPrototypeHasOwnProperty(exports, exportName) ||
|
||||
- exportName === 'default')
|
||||
+ for (const exportName of namesWithDefault) {
|
||||
if (!ObjectPrototypeHasOwnProperty(exports, exportName) ||
|
||||
exportName === 'default')
|
||||
+ if (exportName === 'default' ||
|
||||
+ !ObjectPrototypeHasOwnProperty(exports, exportName))
|
||||
continue;
|
||||
// We might trigger a getter -> dont fail.
|
||||
let value;
|
||||
diff --git a/lib/internal/url.js b/lib/internal/url.js
|
||||
index 2a4ffefe2450708af61e09d7a9530bec1c15d922..9a1c49df14e8b3cef7e66789242a625c6afb3ca9 100644
|
||||
--- a/lib/internal/url.js
|
||||
|
||||
@@ -7,7 +7,7 @@ Wc++98-compat-extra-semi is turned on for Electron so this
|
||||
patch fixes that error in node.
|
||||
|
||||
diff --git a/src/node_serdes.cc b/src/node_serdes.cc
|
||||
index 0cd76078218433b46c17f350e3ba6073987438cf..ba13061b6aa7fd8f877aa456db9d352a847e682a 100644
|
||||
index 97917c91c06dc47dfa6be2c194944cdc93e6bd7f..177390a24eb6490b128e22c104014e80f338c9d9 100644
|
||||
--- a/src/node_serdes.cc
|
||||
+++ b/src/node_serdes.cc
|
||||
@@ -32,7 +32,7 @@ namespace serdes {
|
||||
|
||||
@@ -155,7 +155,7 @@ index f27e03aed66fed5a4dc59ec3ab1102a9ea2c8c56..6d315edb9ce87fe8cce8af91bb45fd08
|
||||
|
||||
// Delegate to V8's allocator for compatibility with the V8 memory cage.
|
||||
diff --git a/src/node_serdes.cc b/src/node_serdes.cc
|
||||
index 45a16d9de43703c2115dde85c9faae3a04be2a88..0cd76078218433b46c17f350e3ba6073987438cf 100644
|
||||
index 45a16d9de43703c2115dde85c9faae3a04be2a88..97917c91c06dc47dfa6be2c194944cdc93e6bd7f 100644
|
||||
--- a/src/node_serdes.cc
|
||||
+++ b/src/node_serdes.cc
|
||||
@@ -29,6 +29,11 @@ using v8::ValueSerializer;
|
||||
@@ -219,17 +219,32 @@ index 45a16d9de43703c2115dde85c9faae3a04be2a88..0cd76078218433b46c17f350e3ba6073
|
||||
Maybe<bool> SerializerContext::WriteHostObject(Isolate* isolate,
|
||||
Local<Object> input) {
|
||||
MaybeLocal<Value> ret;
|
||||
@@ -211,7 +240,12 @@ void SerializerContext::ReleaseBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
@@ -209,9 +238,14 @@ void SerializerContext::ReleaseBuffer(const FunctionCallbackInfo<Value>& args) {
|
||||
// Note: Both ValueSerializer and this Buffer::New() variant use malloc()
|
||||
// as the underlying allocator.
|
||||
std::pair<uint8_t*, size_t> ret = ctx->serializer_.Release();
|
||||
auto buf = Buffer::New(ctx->env(),
|
||||
reinterpret_cast<char*>(ret.first),
|
||||
- auto buf = Buffer::New(ctx->env(),
|
||||
- reinterpret_cast<char*>(ret.first),
|
||||
- ret.second);
|
||||
+ ret.second,
|
||||
+ [](char* data, void* hint){
|
||||
+ if (data)
|
||||
+ GetAllocator()->Free(data, reinterpret_cast<size_t>(hint));
|
||||
+ },
|
||||
+ reinterpret_cast<void*>(ctx->last_length_));
|
||||
+ std::unique_ptr<v8::BackingStore> bs =
|
||||
+ v8::ArrayBuffer::NewBackingStore(reinterpret_cast<char*>(ret.first), ret.second,
|
||||
+ [](void* data, size_t length, void* deleter_data) {
|
||||
+ if (data) GetAllocator()->Free(reinterpret_cast<char*>(data), length);
|
||||
+ }, nullptr);
|
||||
+ Local<ArrayBuffer> ab = v8::ArrayBuffer::New(ctx->env()->isolate(), std::move(bs));
|
||||
+
|
||||
+ auto buf = Buffer::New(ctx->env(), ab, 0, ret.second);
|
||||
|
||||
if (!buf.IsEmpty()) {
|
||||
args.GetReturnValue().Set(buf.ToLocalChecked());
|
||||
diff --git a/test/parallel/test-v8-serialize-leak.js b/test/parallel/test-v8-serialize-leak.js
|
||||
index a90c398adcdaf30491a0fecdcf00895038d62e69..f5b8a1430ad2033eae06ca0157af2fb51d3f36a5 100644
|
||||
--- a/test/parallel/test-v8-serialize-leak.js
|
||||
+++ b/test/parallel/test-v8-serialize-leak.js
|
||||
@@ -23,5 +23,5 @@ const after = process.memoryUsage.rss();
|
||||
if (process.config.variables.asan) {
|
||||
assert(after < before * 10, `asan: before=${before} after=${after}`);
|
||||
} else {
|
||||
- assert(after < before * 2, `before=${before} after=${after}`);
|
||||
+ assert(after < before * 3, `before=${before} after=${after}`);
|
||||
}
|
||||
|
||||
@@ -21,6 +21,10 @@ def run_node_configure(target_cpu):
|
||||
# Work around "No acceptable ASM compiler found" error on some System,
|
||||
# it breaks nothing since Electron does not use OpenSSL.
|
||||
args += ['--openssl-no-asm']
|
||||
|
||||
# Enable whole-program optimization for electron native modules.
|
||||
if sys.platform == "win32":
|
||||
args += ['--with-ltcg']
|
||||
subprocess.check_call([sys.executable, configure] + args)
|
||||
|
||||
def read_node_config_gypi():
|
||||
|
||||
@@ -134,7 +134,6 @@
|
||||
"parallel/test-worker-debug",
|
||||
"parallel/test-worker-init-failure",
|
||||
"parallel/test-worker-stdio",
|
||||
"parallel/test-v8-serialize-leak",
|
||||
"parallel/test-zlib-unused-weak",
|
||||
"report/test-report-fatalerror-oomerror-set",
|
||||
"report/test-report-fatalerror-oomerror-directory",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
const { ElectronVersions, Installer } = require('@electron/fiddle-core');
|
||||
const childProcess = require('child_process');
|
||||
const crypto = require('crypto');
|
||||
const fs = require('fs-extra');
|
||||
@@ -12,7 +13,7 @@ const pass = '✓'.green;
|
||||
const fail = '✗'.red;
|
||||
|
||||
const args = require('minimist')(process.argv, {
|
||||
string: ['runners', 'target'],
|
||||
string: ['runners', 'target', 'electronVersion'],
|
||||
boolean: ['buildNativeTests'],
|
||||
unknown: arg => unknownFlags.push(arg)
|
||||
});
|
||||
@@ -39,6 +40,15 @@ const runners = new Map([
|
||||
|
||||
const specHashPath = path.resolve(__dirname, '../spec/.hash');
|
||||
|
||||
if (args.electronVersion) {
|
||||
if (args.runners && args.runners !== 'main') {
|
||||
console.log(`${fail} only 'main' runner can be used with --electronVersion`);
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
args.runners = 'main';
|
||||
}
|
||||
|
||||
let runnersToRun = null;
|
||||
if (args.runners !== undefined) {
|
||||
runnersToRun = args.runners.split(',').filter(value => value);
|
||||
@@ -52,6 +62,14 @@ if (args.runners !== undefined) {
|
||||
}
|
||||
|
||||
async function main () {
|
||||
if (args.electronVersion) {
|
||||
const versions = await ElectronVersions.create();
|
||||
if (!versions.isVersion(args.electronVersion)) {
|
||||
console.log(`${fail} '${args.electronVersion}' is not a recognized Electron version`);
|
||||
process.exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
const [lastSpecHash, lastSpecInstallHash] = loadLastSpecHash();
|
||||
const [currentSpecHash, currentSpecInstallHash] = await getSpecHash();
|
||||
const somethingChanged = (currentSpecHash !== lastSpecHash) ||
|
||||
@@ -122,7 +140,13 @@ async function runElectronTests () {
|
||||
}
|
||||
|
||||
async function runTestUsingElectron (specDir, testName) {
|
||||
let exe = path.resolve(BASE, utils.getElectronExec());
|
||||
let exe;
|
||||
if (args.electronVersion) {
|
||||
const installer = new Installer();
|
||||
exe = await installer.install(args.electronVersion);
|
||||
} else {
|
||||
exe = path.resolve(BASE, utils.getElectronExec());
|
||||
}
|
||||
const runnerArgs = [`electron/${specDir}`, ...unknownArgs.slice(2)];
|
||||
if (process.platform === 'linux') {
|
||||
runnerArgs.unshift(path.resolve(__dirname, 'dbus_mock.py'), exe);
|
||||
@@ -212,14 +236,20 @@ async function installSpecModules (dir) {
|
||||
// but don't clobber any other CXXFLAGS that were passed into spec-runner.js
|
||||
const CXXFLAGS = ['-std=c++17', process.env.CXXFLAGS].filter(x => !!x).join(' ');
|
||||
|
||||
const nodeDir = path.resolve(BASE, `out/${utils.getOutDir({ shouldLog: true })}/gen/node_headers`);
|
||||
const env = {
|
||||
...process.env,
|
||||
CXXFLAGS,
|
||||
npm_config_nodedir: nodeDir,
|
||||
npm_config_msvs_version: '2019',
|
||||
npm_config_yes: 'true'
|
||||
};
|
||||
if (args.electronVersion) {
|
||||
env.npm_config_target = args.electronVersion;
|
||||
env.npm_config_disturl = 'https://electronjs.org/headers';
|
||||
env.npm_config_runtime = 'electron';
|
||||
env.npm_config_build_from_source = 'true';
|
||||
} else {
|
||||
env.npm_config_nodedir = path.resolve(BASE, `out/${utils.getOutDir({ shouldLog: true })}/gen/node_headers`);
|
||||
}
|
||||
if (fs.existsSync(path.resolve(dir, 'node_modules'))) {
|
||||
await fs.remove(path.resolve(dir, 'node_modules'));
|
||||
}
|
||||
|
||||
@@ -3237,47 +3237,6 @@ v8::Local<v8::Promise> WebContents::CapturePage(gin::Arguments* args) {
|
||||
return handle;
|
||||
}
|
||||
|
||||
// TODO(codebytere): remove in Electron v23.
|
||||
void WebContents::IncrementCapturerCount(gin::Arguments* args) {
|
||||
EmitWarning(node::Environment::GetCurrent(args->isolate()),
|
||||
"webContents.incrementCapturerCount() is deprecated and will be "
|
||||
"removed in v23",
|
||||
"electron");
|
||||
|
||||
gfx::Size size;
|
||||
bool stay_hidden = false;
|
||||
bool stay_awake = false;
|
||||
|
||||
// get size arguments if they exist
|
||||
args->GetNext(&size);
|
||||
// get stayHidden arguments if they exist
|
||||
args->GetNext(&stay_hidden);
|
||||
// get stayAwake arguments if they exist
|
||||
args->GetNext(&stay_awake);
|
||||
|
||||
std::ignore = web_contents()
|
||||
->IncrementCapturerCount(size, stay_hidden, stay_awake)
|
||||
.Release();
|
||||
}
|
||||
|
||||
// TODO(codebytere): remove in Electron v23.
|
||||
void WebContents::DecrementCapturerCount(gin::Arguments* args) {
|
||||
EmitWarning(node::Environment::GetCurrent(args->isolate()),
|
||||
"webContents.decrementCapturerCount() is deprecated and will be "
|
||||
"removed in v23",
|
||||
"electron");
|
||||
|
||||
bool stay_hidden = false;
|
||||
bool stay_awake = false;
|
||||
|
||||
// get stayHidden arguments if they exist
|
||||
args->GetNext(&stay_hidden);
|
||||
// get stayAwake arguments if they exist
|
||||
args->GetNext(&stay_awake);
|
||||
|
||||
web_contents()->DecrementCapturerCount(stay_hidden, stay_awake);
|
||||
}
|
||||
|
||||
bool WebContents::IsBeingCaptured() {
|
||||
return web_contents()->IsBeingCaptured();
|
||||
}
|
||||
@@ -4102,8 +4061,6 @@ v8::Local<v8::ObjectTemplate> WebContents::FillObjectTemplate(
|
||||
.SetMethod("setEmbedder", &WebContents::SetEmbedder)
|
||||
.SetMethod("setDevToolsWebContents", &WebContents::SetDevToolsWebContents)
|
||||
.SetMethod("getNativeView", &WebContents::GetNativeView)
|
||||
.SetMethod("incrementCapturerCount", &WebContents::IncrementCapturerCount)
|
||||
.SetMethod("decrementCapturerCount", &WebContents::DecrementCapturerCount)
|
||||
.SetMethod("isBeingCaptured", &WebContents::IsBeingCaptured)
|
||||
.SetMethod("setWebRTCIPHandlingPolicy",
|
||||
&WebContents::SetWebRTCIPHandlingPolicy)
|
||||
|
||||
@@ -215,8 +215,6 @@ class WebContents : public ExclusiveAccessContext,
|
||||
void SetEmbedder(const WebContents* embedder);
|
||||
void SetDevToolsWebContents(const WebContents* devtools);
|
||||
v8::Local<v8::Value> GetNativeView(v8::Isolate* isolate) const;
|
||||
void IncrementCapturerCount(gin::Arguments* args);
|
||||
void DecrementCapturerCount(gin::Arguments* args);
|
||||
bool IsBeingCaptured();
|
||||
void HandleNewRenderFrame(content::RenderFrameHost* render_frame_host);
|
||||
|
||||
|
||||
@@ -120,10 +120,6 @@
|
||||
#include "ui/native_theme/native_theme.h"
|
||||
#include "v8/include/v8.h"
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include "sandbox/win/src/sandbox_policy.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(USE_NSS_CERTS)
|
||||
#include "net/ssl/client_cert_store_nss.h"
|
||||
#elif BUILDFLAG(IS_WIN)
|
||||
@@ -1435,19 +1431,6 @@ void ElectronBrowserClient::OverrideURLLoaderFactoryParams(
|
||||
browser_context, origin, is_for_isolated_world, factory_params);
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
bool ElectronBrowserClient::PreSpawnChild(sandbox::TargetPolicy* policy,
|
||||
sandbox::mojom::Sandbox sandbox_type,
|
||||
ChildSpawnFlags flags) {
|
||||
sandbox::ResultCode result = policy->GetConfig()->AddRule(
|
||||
sandbox::SubSystem::kFiles, sandbox::Semantics::kFilesAllowAny,
|
||||
L"\\??\\pipe\\crashpad_*");
|
||||
if (result != sandbox::SBOX_ALL_OK)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
#endif // BUILDFLAG(IS_WIN)
|
||||
|
||||
void ElectronBrowserClient::
|
||||
RegisterAssociatedInterfaceBindersForRenderFrameHost(
|
||||
content::RenderFrameHost&
|
||||
|
||||
@@ -242,11 +242,6 @@ class ElectronBrowserClient : public content::ContentBrowserClient,
|
||||
const url::Origin& origin,
|
||||
bool is_for_isolated_world,
|
||||
network::mojom::URLLoaderFactoryParams* factory_params) override;
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
bool PreSpawnChild(sandbox::TargetPolicy* policy,
|
||||
sandbox::mojom::Sandbox sandbox_type,
|
||||
ChildSpawnFlags flags) override;
|
||||
#endif
|
||||
void RegisterAssociatedInterfaceBindersForRenderFrameHost(
|
||||
content::RenderFrameHost& render_frame_host,
|
||||
blink::AssociatedInterfaceRegistry& associated_registry) override;
|
||||
|
||||
@@ -180,7 +180,7 @@ void FileSelectHelper::OnListDone(int error) {
|
||||
std::unique_ptr<ActiveDirectoryEnumeration> entry =
|
||||
std::move(directory_enumeration_);
|
||||
if (error) {
|
||||
FileSelectionCanceled(NULL);
|
||||
FileSelectionCanceled(nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -487,6 +487,11 @@ void FileSelectHelper::RunFileChooserEnd() {
|
||||
listener_->FileSelectionCanceled();
|
||||
render_frame_host_ = nullptr;
|
||||
web_contents_ = nullptr;
|
||||
// If the dialog was actually opened, dispose of our reference.
|
||||
if (select_file_dialog_) {
|
||||
select_file_dialog_->ListenerDestroyed();
|
||||
select_file_dialog_.reset();
|
||||
}
|
||||
Release();
|
||||
}
|
||||
|
||||
@@ -525,8 +530,6 @@ void FileSelectHelper::RenderWidgetHostDestroyed(
|
||||
void FileSelectHelper::RenderFrameHostChanged(
|
||||
content::RenderFrameHost* old_host,
|
||||
content::RenderFrameHost* new_host) {
|
||||
if (!render_frame_host_)
|
||||
return;
|
||||
// The |old_host| and its children are now pending deletion. Do not give them
|
||||
// file access past this point.
|
||||
for (content::RenderFrameHost* host = render_frame_host_; host;
|
||||
|
||||
@@ -193,6 +193,18 @@ inline void dispatch_sync_main(dispatch_block_t block) {
|
||||
return [super accessibilitySetValue:value forAttribute:attribute];
|
||||
}
|
||||
|
||||
- (NSAccessibilityRole)accessibilityRole {
|
||||
// For non-VoiceOver AT, such as Voice Control, Apple recommends turning on
|
||||
// a11y when an AT accesses the 'accessibilityRole' property. This function
|
||||
// is accessed frequently so we only change the accessibility state when
|
||||
// accessibility is disabled.
|
||||
auto* ax_state = content::BrowserAccessibilityState::GetInstance();
|
||||
if (!ax_state->GetAccessibilityMode().has_mode(ui::kAXModeBasic.flags())) {
|
||||
ax_state->AddAccessibilityModeFlags(ui::kAXModeBasic);
|
||||
}
|
||||
return [super accessibilityRole];
|
||||
}
|
||||
|
||||
- (void)orderFrontStandardAboutPanel:(id)sender {
|
||||
electron::Browser::Get()->ShowAboutPanel();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,10 @@
|
||||
#include "ui/base/hit_test.h"
|
||||
#include "ui/views/widget/widget.h"
|
||||
|
||||
#if !BUILDFLAG(IS_MAC)
|
||||
#include "shell/browser/ui/views/frameless_view.h"
|
||||
#endif
|
||||
|
||||
#if BUILDFLAG(IS_WIN)
|
||||
#include "ui/base/win/shell.h"
|
||||
#include "ui/display/win/screen_win.h"
|
||||
@@ -175,7 +179,11 @@ void NativeWindow::InitFromOptions(const gin_helper::Dictionary& options) {
|
||||
int max_width = max_size.width() > 0 ? max_size.width() : INT_MAX;
|
||||
int max_height = max_size.height() > 0 ? max_size.height() : INT_MAX;
|
||||
bool have_max_width = options.Get(options::kMaxWidth, &max_width);
|
||||
if (have_max_width && max_width <= 0)
|
||||
max_width = INT_MAX;
|
||||
bool have_max_height = options.Get(options::kMaxHeight, &max_height);
|
||||
if (have_max_height && max_height <= 0)
|
||||
max_height = INT_MAX;
|
||||
|
||||
// By default the window has a default maximum size that prevents it
|
||||
// from being resized larger than the screen, so we should only set this
|
||||
@@ -687,6 +695,17 @@ void NativeWindow::NotifyWindowMessage(UINT message,
|
||||
#endif
|
||||
|
||||
int NativeWindow::NonClientHitTest(const gfx::Point& point) {
|
||||
#if !BUILDFLAG(IS_MAC)
|
||||
// We need to ensure we account for resizing borders on Windows and Linux.
|
||||
if ((!has_frame() || has_client_frame()) && IsResizable()) {
|
||||
auto* frame =
|
||||
static_cast<FramelessView*>(widget()->non_client_view()->frame_view());
|
||||
int border_hit = frame->ResizingBorderHitTest(point);
|
||||
if (border_hit != HTNOWHERE)
|
||||
return border_hit;
|
||||
}
|
||||
#endif
|
||||
|
||||
for (auto* provider : draggable_region_providers_) {
|
||||
int hit = provider->NonClientHitTest(point);
|
||||
if (hit != HTNOWHERE)
|
||||
|
||||
@@ -1592,19 +1592,7 @@ views::View* NativeWindowViews::GetContentsView() {
|
||||
bool NativeWindowViews::ShouldDescendIntoChildForEventHandling(
|
||||
gfx::NativeView child,
|
||||
const gfx::Point& location) {
|
||||
// App window should claim mouse events that fall within any BrowserViews'
|
||||
// draggable region.
|
||||
if (NonClientHitTest(location) != HTNOWHERE)
|
||||
return false;
|
||||
|
||||
// And the events on border for dragging resizable frameless window.
|
||||
if ((!has_frame() || has_client_frame()) && resizable_) {
|
||||
auto* frame =
|
||||
static_cast<FramelessView*>(widget()->non_client_view()->frame_view());
|
||||
return frame->ResizingBorderHitTest(location) == HTNOWHERE;
|
||||
}
|
||||
|
||||
return true;
|
||||
return NonClientHitTest(location) == HTNOWHERE;
|
||||
}
|
||||
|
||||
views::ClientView* NativeWindowViews::CreateClientView(views::Widget* widget) {
|
||||
|
||||
70
shell/browser/ui/gtk/menu_gtk.cc
Normal file
70
shell/browser/ui/gtk/menu_gtk.cc
Normal file
@@ -0,0 +1,70 @@
|
||||
// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/ui/gtk/menu_gtk.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "shell/browser/ui/gtk/menu_util.h"
|
||||
#include "ui/base/models/menu_model.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace gtkui {
|
||||
|
||||
MenuGtk::MenuGtk(ui::MenuModel* model)
|
||||
: menu_model_(model), gtk_menu_(TakeGObject(gtk_menu_new())) {
|
||||
if (menu_model_) {
|
||||
BuildSubmenuFromModel(menu_model_, gtk_menu_,
|
||||
G_CALLBACK(OnMenuItemActivatedThunk),
|
||||
&block_activation_, this);
|
||||
Refresh();
|
||||
}
|
||||
}
|
||||
|
||||
MenuGtk::~MenuGtk() {
|
||||
gtk_widget_destroy(gtk_menu_);
|
||||
}
|
||||
|
||||
void MenuGtk::Refresh() {
|
||||
gtk_container_foreach(GTK_CONTAINER(gtk_menu_.get()), SetMenuItemInfo,
|
||||
&block_activation_);
|
||||
}
|
||||
|
||||
GtkMenu* MenuGtk::GetGtkMenu() {
|
||||
return GTK_MENU(gtk_menu_.get());
|
||||
}
|
||||
|
||||
void MenuGtk::OnMenuItemActivated(GtkWidget* menu_item) {
|
||||
if (block_activation_)
|
||||
return;
|
||||
|
||||
ui::MenuModel* model = ModelForMenuItem(GTK_MENU_ITEM(menu_item));
|
||||
if (!model) {
|
||||
// There won't be a model for "native" submenus like the "Input Methods"
|
||||
// context menu. We don't need to handle activation messages for submenus
|
||||
// anyway, so we can just return here.
|
||||
DCHECK(gtk_menu_item_get_submenu(GTK_MENU_ITEM(menu_item)));
|
||||
return;
|
||||
}
|
||||
|
||||
// The activate signal is sent to radio items as they get deselected;
|
||||
// ignore it in this case.
|
||||
if (GTK_IS_RADIO_MENU_ITEM(menu_item) &&
|
||||
!gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menu_item))) {
|
||||
return;
|
||||
}
|
||||
|
||||
int id;
|
||||
if (!GetMenuItemID(menu_item, &id))
|
||||
return;
|
||||
|
||||
// The menu item can still be activated by hotkeys even if it is disabled.
|
||||
if (model->IsEnabledAt(id))
|
||||
ExecuteCommand(model, id);
|
||||
}
|
||||
|
||||
} // namespace gtkui
|
||||
|
||||
} // namespace electron
|
||||
48
shell/browser/ui/gtk/menu_gtk.h
Normal file
48
shell/browser/ui/gtk/menu_gtk.h
Normal file
@@ -0,0 +1,48 @@
|
||||
// Copyright 2014 The Chromium Authors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_BROWSER_UI_GTK_MENU_GTK_H_
|
||||
#define ELECTRON_SHELL_BROWSER_UI_GTK_MENU_GTK_H_
|
||||
|
||||
#include "base/callback.h"
|
||||
#include "base/memory/raw_ptr.h"
|
||||
#include "ui/base/glib/glib_signal.h"
|
||||
#include "ui/base/glib/scoped_gobject.h"
|
||||
|
||||
typedef struct _GtkMenu GtkMenu;
|
||||
typedef struct _GtkWidget GtkWidget;
|
||||
|
||||
namespace ui {
|
||||
class MenuModel;
|
||||
}
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace gtkui {
|
||||
|
||||
class MenuGtk {
|
||||
public:
|
||||
explicit MenuGtk(ui::MenuModel* model);
|
||||
virtual ~MenuGtk();
|
||||
|
||||
// Refreshes all the menu item labels and menu item checked/enabled states.
|
||||
void Refresh();
|
||||
|
||||
GtkMenu* GetGtkMenu();
|
||||
|
||||
private:
|
||||
// Callback for when a menu item is activated.
|
||||
CHROMEG_CALLBACK_0(MenuGtk, void, OnMenuItemActivated, GtkWidget*);
|
||||
|
||||
raw_ptr<ui::MenuModel> menu_model_; // not owned
|
||||
ScopedGObject<GtkWidget> gtk_menu_;
|
||||
|
||||
bool block_activation_ = false;
|
||||
};
|
||||
|
||||
} // namespace gtkui
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_UI_GTK_MENU_GTK_H_
|
||||
68
shell/browser/ui/status_icon_gtk.cc
Normal file
68
shell/browser/ui/status_icon_gtk.cc
Normal file
@@ -0,0 +1,68 @@
|
||||
// Copyright (c) 2023 Microsoft, Inc.
|
||||
// Copyright (c) 2011 The Chromium Authors.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/ui/status_icon_gtk.h"
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "shell/browser/ui/gtk/menu_gtk.h"
|
||||
#include "shell/browser/ui/gtk_util.h"
|
||||
#include "ui/gfx/image/image_skia.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
StatusIconGtk::StatusIconGtk() : icon_(TakeGObject(gtk_status_icon_new())) {
|
||||
g_signal_connect(icon_, "activate", G_CALLBACK(OnClickThunk), this);
|
||||
g_signal_connect(icon_, "popup_menu", G_CALLBACK(OnContextMenuRequestedThunk),
|
||||
this);
|
||||
}
|
||||
|
||||
StatusIconGtk::~StatusIconGtk() = default;
|
||||
|
||||
void StatusIconGtk::SetIcon(const gfx::ImageSkia& image) {
|
||||
if (image.isNull())
|
||||
return;
|
||||
|
||||
GdkPixbuf* pixbuf = gtk_util::GdkPixbufFromSkBitmap(*image.bitmap());
|
||||
gtk_status_icon_set_from_pixbuf(icon_, pixbuf);
|
||||
g_object_unref(pixbuf);
|
||||
}
|
||||
|
||||
void StatusIconGtk::SetToolTip(const std::u16string& tool_tip) {
|
||||
gtk_status_icon_set_tooltip_text(icon_, base::UTF16ToUTF8(tool_tip).c_str());
|
||||
}
|
||||
|
||||
void StatusIconGtk::UpdatePlatformContextMenu(ui::MenuModel* model) {
|
||||
if (model)
|
||||
menu_ = std::make_unique<gtkui::MenuGtk>(model);
|
||||
}
|
||||
|
||||
void StatusIconGtk::RefreshPlatformContextMenu() {
|
||||
if (menu_)
|
||||
menu_->Refresh();
|
||||
}
|
||||
|
||||
void StatusIconGtk::OnSetDelegate() {
|
||||
SetIcon(delegate_->GetImage());
|
||||
SetToolTip(delegate_->GetToolTip());
|
||||
UpdatePlatformContextMenu(delegate_->GetMenuModel());
|
||||
gtk_status_icon_set_visible(icon_, TRUE);
|
||||
}
|
||||
|
||||
void StatusIconGtk::OnClick(GtkStatusIcon* status_icon) {
|
||||
delegate_->OnClick();
|
||||
}
|
||||
|
||||
void StatusIconGtk::OnContextMenuRequested(GtkStatusIcon* status_icon,
|
||||
guint button,
|
||||
guint32 activate_time) {
|
||||
if (menu_.get()) {
|
||||
gtk_menu_popup(menu_->GetGtkMenu(), nullptr, nullptr,
|
||||
gtk_status_icon_position_menu, icon_, button, activate_time);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
52
shell/browser/ui/status_icon_gtk.h
Normal file
52
shell/browser/ui/status_icon_gtk.h
Normal file
@@ -0,0 +1,52 @@
|
||||
// Copyright (c) 2023 Microsoft, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_BROWSER_UI_STATUS_ICON_GTK_H_
|
||||
#define ELECTRON_SHELL_BROWSER_UI_STATUS_ICON_GTK_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "ui/base/glib/glib_integers.h"
|
||||
#include "ui/base/glib/glib_signal.h"
|
||||
#include "ui/base/glib/scoped_gobject.h"
|
||||
#include "ui/linux/status_icon_linux.h"
|
||||
|
||||
typedef struct _GtkStatusIcon GtkStatusIcon;
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace gtkui {
|
||||
class MenuGtk;
|
||||
}
|
||||
|
||||
class StatusIconGtk : public ui::StatusIconLinux {
|
||||
public:
|
||||
StatusIconGtk();
|
||||
StatusIconGtk(const StatusIconGtk&) = delete;
|
||||
StatusIconGtk& operator=(const StatusIconGtk&) = delete;
|
||||
~StatusIconGtk() override;
|
||||
|
||||
// ui::StatusIconLinux:
|
||||
void SetIcon(const gfx::ImageSkia& image) override;
|
||||
void SetToolTip(const std::u16string& tool_tip) override;
|
||||
void UpdatePlatformContextMenu(ui::MenuModel* model) override;
|
||||
void RefreshPlatformContextMenu() override;
|
||||
void OnSetDelegate() override;
|
||||
|
||||
private:
|
||||
CHROMEG_CALLBACK_0(StatusIconGtk, void, OnClick, GtkStatusIcon*);
|
||||
CHROMEG_CALLBACK_2(StatusIconGtk,
|
||||
void,
|
||||
OnContextMenuRequested,
|
||||
GtkStatusIcon*,
|
||||
guint,
|
||||
guint);
|
||||
|
||||
std::unique_ptr<gtkui::MenuGtk> menu_;
|
||||
ScopedGObject<GtkStatusIcon> icon_;
|
||||
};
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_UI_STATUS_ICON_GTK_H_
|
||||
@@ -1,96 +0,0 @@
|
||||
// Copyright (c) 2014 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/ui/tray_icon_gtk.h"
|
||||
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h"
|
||||
#include "ui/gfx/image/image_skia_rep.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace {
|
||||
|
||||
gfx::ImageSkia GetBestImageRep(const gfx::ImageSkia& image) {
|
||||
image.EnsureRepsForSupportedScales();
|
||||
float best_scale = 0.0f;
|
||||
SkBitmap best_rep;
|
||||
for (const auto& rep : image.image_reps()) {
|
||||
if (rep.scale() > best_scale) {
|
||||
best_scale = rep.scale();
|
||||
best_rep = rep.GetBitmap();
|
||||
}
|
||||
}
|
||||
// All status icon implementations want the image in pixel coordinates, so use
|
||||
// a scale factor of 1.
|
||||
return gfx::ImageSkia::CreateFromBitmap(best_rep, 1.0f);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
TrayIconGtk::TrayIconGtk()
|
||||
: status_icon_(new StatusIconLinuxDbus),
|
||||
status_icon_type_(StatusIconType::kDbus) {
|
||||
status_icon_->SetDelegate(this);
|
||||
}
|
||||
|
||||
TrayIconGtk::~TrayIconGtk() = default;
|
||||
|
||||
void TrayIconGtk::SetImage(const gfx::Image& image) {
|
||||
image_ = GetBestImageRep(image.AsImageSkia());
|
||||
if (status_icon_)
|
||||
status_icon_->SetIcon(image_);
|
||||
}
|
||||
|
||||
void TrayIconGtk::SetToolTip(const std::string& tool_tip) {
|
||||
tool_tip_ = base::UTF8ToUTF16(tool_tip);
|
||||
if (status_icon_)
|
||||
status_icon_->SetToolTip(tool_tip_);
|
||||
}
|
||||
|
||||
void TrayIconGtk::SetContextMenu(ElectronMenuModel* menu_model) {
|
||||
menu_model_ = menu_model;
|
||||
if (status_icon_)
|
||||
status_icon_->UpdatePlatformContextMenu(menu_model_);
|
||||
}
|
||||
|
||||
const gfx::ImageSkia& TrayIconGtk::GetImage() const {
|
||||
return image_;
|
||||
}
|
||||
|
||||
const std::u16string& TrayIconGtk::GetToolTip() const {
|
||||
return tool_tip_;
|
||||
}
|
||||
|
||||
ui::MenuModel* TrayIconGtk::GetMenuModel() const {
|
||||
return menu_model_;
|
||||
}
|
||||
|
||||
void TrayIconGtk::OnImplInitializationFailed() {
|
||||
switch (status_icon_type_) {
|
||||
case StatusIconType::kDbus:
|
||||
status_icon_ = nullptr;
|
||||
status_icon_type_ = StatusIconType::kNone;
|
||||
return;
|
||||
case StatusIconType::kNone:
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
void TrayIconGtk::OnClick() {
|
||||
NotifyClicked();
|
||||
}
|
||||
|
||||
bool TrayIconGtk::HasClickAction() {
|
||||
// Returning true will make the tooltip show as an additional context menu
|
||||
// item, which makes sense in Chrome but not in most Electron apps.
|
||||
return false;
|
||||
}
|
||||
|
||||
// static
|
||||
TrayIcon* TrayIcon::Create(absl::optional<UUID> guid) {
|
||||
return new TrayIconGtk;
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
115
shell/browser/ui/tray_icon_linux.cc
Normal file
115
shell/browser/ui/tray_icon_linux.cc
Normal file
@@ -0,0 +1,115 @@
|
||||
// Copyright (c) 2014 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/ui/tray_icon_linux.h"
|
||||
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "chrome/browser/ui/views/status_icons/status_icon_linux_dbus.h"
|
||||
#include "shell/browser/ui/status_icon_gtk.h"
|
||||
#include "ui/gfx/image/image_skia_rep.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
namespace {
|
||||
|
||||
gfx::ImageSkia GetBestImageRep(const gfx::ImageSkia& image) {
|
||||
image.EnsureRepsForSupportedScales();
|
||||
float best_scale = 0.0f;
|
||||
SkBitmap best_rep;
|
||||
for (const auto& rep : image.image_reps()) {
|
||||
if (rep.scale() > best_scale) {
|
||||
best_scale = rep.scale();
|
||||
best_rep = rep.GetBitmap();
|
||||
}
|
||||
}
|
||||
// All status icon implementations want the image in pixel coordinates, so use
|
||||
// a scale factor of 1.
|
||||
return gfx::ImageSkia::CreateFromBitmap(best_rep, 1.0f);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
TrayIconLinux::TrayIconLinux()
|
||||
: status_icon_dbus_(new StatusIconLinuxDbus),
|
||||
status_icon_type_(StatusIconType::kDbus) {
|
||||
status_icon_dbus_->SetDelegate(this);
|
||||
}
|
||||
|
||||
TrayIconLinux::~TrayIconLinux() = default;
|
||||
|
||||
void TrayIconLinux::SetImage(const gfx::Image& image) {
|
||||
image_ = GetBestImageRep(image.AsImageSkia());
|
||||
if (auto* status_icon = GetStatusIcon())
|
||||
status_icon->SetIcon(image_);
|
||||
}
|
||||
|
||||
void TrayIconLinux::SetToolTip(const std::string& tool_tip) {
|
||||
tool_tip_ = base::UTF8ToUTF16(tool_tip);
|
||||
if (auto* status_icon = GetStatusIcon())
|
||||
status_icon->SetToolTip(tool_tip_);
|
||||
}
|
||||
|
||||
void TrayIconLinux::SetContextMenu(ElectronMenuModel* menu_model) {
|
||||
menu_model_ = menu_model;
|
||||
if (auto* status_icon = GetStatusIcon())
|
||||
status_icon->UpdatePlatformContextMenu(menu_model_);
|
||||
}
|
||||
|
||||
const gfx::ImageSkia& TrayIconLinux::GetImage() const {
|
||||
return image_;
|
||||
}
|
||||
|
||||
const std::u16string& TrayIconLinux::GetToolTip() const {
|
||||
return tool_tip_;
|
||||
}
|
||||
|
||||
ui::MenuModel* TrayIconLinux::GetMenuModel() const {
|
||||
return menu_model_;
|
||||
}
|
||||
|
||||
void TrayIconLinux::OnImplInitializationFailed() {
|
||||
switch (status_icon_type_) {
|
||||
case StatusIconType::kDbus:
|
||||
status_icon_dbus_.reset();
|
||||
status_icon_gtk_ = std::make_unique<StatusIconGtk>();
|
||||
status_icon_type_ = StatusIconType::kGtk;
|
||||
status_icon_gtk_->SetDelegate(this);
|
||||
return;
|
||||
case StatusIconType::kGtk:
|
||||
status_icon_gtk_.reset();
|
||||
status_icon_type_ = StatusIconType::kNone;
|
||||
menu_model_ = nullptr;
|
||||
return;
|
||||
case StatusIconType::kNone:
|
||||
NOTREACHED();
|
||||
}
|
||||
}
|
||||
|
||||
void TrayIconLinux::OnClick() {
|
||||
NotifyClicked();
|
||||
}
|
||||
|
||||
bool TrayIconLinux::HasClickAction() {
|
||||
// Returning true will make the tooltip show as an additional context menu
|
||||
// item, which makes sense in Chrome but not in most Electron apps.
|
||||
return false;
|
||||
}
|
||||
|
||||
ui::StatusIconLinux* TrayIconLinux::GetStatusIcon() {
|
||||
switch (status_icon_type_) {
|
||||
case StatusIconType::kDbus:
|
||||
return status_icon_dbus_.get();
|
||||
case StatusIconType::kGtk:
|
||||
return status_icon_gtk_.get();
|
||||
case StatusIconType::kNone:
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
TrayIcon* TrayIcon::Create(absl::optional<UUID> guid) {
|
||||
return new TrayIconLinux;
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
@@ -2,8 +2,8 @@
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_GTK_H_
|
||||
#define ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_GTK_H_
|
||||
#ifndef ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_LINUX_H_
|
||||
#define ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_LINUX_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
@@ -15,10 +15,12 @@ class StatusIconLinuxDbus;
|
||||
|
||||
namespace electron {
|
||||
|
||||
class TrayIconGtk : public TrayIcon, public ui::StatusIconLinux::Delegate {
|
||||
class StatusIconGtk;
|
||||
|
||||
class TrayIconLinux : public TrayIcon, public ui::StatusIconLinux::Delegate {
|
||||
public:
|
||||
TrayIconGtk();
|
||||
~TrayIconGtk() override;
|
||||
TrayIconLinux();
|
||||
~TrayIconLinux() override;
|
||||
|
||||
// TrayIcon:
|
||||
void SetImage(const gfx::Image& image) override;
|
||||
@@ -28,8 +30,6 @@ class TrayIconGtk : public TrayIcon, public ui::StatusIconLinux::Delegate {
|
||||
// ui::StatusIconLinux::Delegate
|
||||
void OnClick() override;
|
||||
bool HasClickAction() override;
|
||||
// The following four methods are only used by StatusIconLinuxDbus, which we
|
||||
// aren't yet using, so they are given stub implementations.
|
||||
const gfx::ImageSkia& GetImage() const override;
|
||||
const std::u16string& GetToolTip() const override;
|
||||
ui::MenuModel* GetMenuModel() const override;
|
||||
@@ -38,10 +38,14 @@ class TrayIconGtk : public TrayIcon, public ui::StatusIconLinux::Delegate {
|
||||
private:
|
||||
enum class StatusIconType {
|
||||
kDbus,
|
||||
kGtk,
|
||||
kNone,
|
||||
};
|
||||
|
||||
scoped_refptr<StatusIconLinuxDbus> status_icon_;
|
||||
ui::StatusIconLinux* GetStatusIcon();
|
||||
|
||||
scoped_refptr<StatusIconLinuxDbus> status_icon_dbus_;
|
||||
std::unique_ptr<StatusIconGtk> status_icon_gtk_;
|
||||
StatusIconType status_icon_type_;
|
||||
|
||||
gfx::ImageSkia image_;
|
||||
@@ -51,4 +55,4 @@ class TrayIconGtk : public TrayIcon, public ui::StatusIconLinux::Delegate {
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_GTK_H_
|
||||
#endif // ELECTRON_SHELL_BROWSER_UI_TRAY_ICON_LINUX_H_
|
||||
@@ -398,28 +398,8 @@ describe('BrowserView module', () => {
|
||||
});
|
||||
await view.webContents.loadFile(path.join(fixtures, 'pages', 'a.html'));
|
||||
|
||||
view.webContents.incrementCapturerCount();
|
||||
const image = await view.webContents.capturePage();
|
||||
expect(image.isEmpty()).to.equal(false);
|
||||
});
|
||||
|
||||
it('should increase the capturer count', () => {
|
||||
view = new BrowserView({
|
||||
webPreferences: {
|
||||
backgroundThrottling: false
|
||||
}
|
||||
});
|
||||
w.setBrowserView(view);
|
||||
view.setBounds({
|
||||
...w.getBounds(),
|
||||
x: 0,
|
||||
y: 0
|
||||
});
|
||||
|
||||
view.webContents.incrementCapturerCount();
|
||||
expect(view.webContents.isBeingCaptured()).to.be.true();
|
||||
view.webContents.decrementCapturerCount();
|
||||
expect(view.webContents.isBeingCaptured()).to.be.false();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1789,7 +1789,6 @@ describe('BrowserWindow module', () => {
|
||||
w.loadFile(path.join(fixtures, 'pages', 'a.html'));
|
||||
await emittedOnce(w, 'ready-to-show');
|
||||
|
||||
w.webContents.incrementCapturerCount();
|
||||
const image = await w.capturePage();
|
||||
expect(image.isEmpty()).to.equal(false);
|
||||
});
|
||||
@@ -1807,14 +1806,6 @@ describe('BrowserWindow module', () => {
|
||||
// Values can be 0,2,3,4, or 6. We want 6, which is RGB + Alpha
|
||||
expect(imgBuffer[25]).to.equal(6);
|
||||
});
|
||||
|
||||
it('should increase the capturer count', () => {
|
||||
const w = new BrowserWindow({ show: false });
|
||||
w.webContents.incrementCapturerCount();
|
||||
expect(w.webContents.isBeingCaptured()).to.be.true();
|
||||
w.webContents.decrementCapturerCount();
|
||||
expect(w.webContents.isBeingCaptured()).to.be.false();
|
||||
});
|
||||
});
|
||||
|
||||
describe('BrowserWindow.setProgressBar(progress)', () => {
|
||||
|
||||
@@ -9,10 +9,11 @@ const fixturesPath = path.resolve(__dirname, 'fixtures');
|
||||
describe('autofill', () => {
|
||||
afterEach(closeAllWindows);
|
||||
|
||||
it('can be selected via keyboard', async () => {
|
||||
it('can be selected via keyboard for a <datalist> with text type', async () => {
|
||||
const w = new BrowserWindow({ show: true });
|
||||
await w.loadFile(path.join(fixturesPath, 'pages', 'datalist.html'));
|
||||
await w.loadFile(path.join(fixturesPath, 'pages', 'datalist-text.html'));
|
||||
w.webContents.sendInputEvent({ type: 'keyDown', keyCode: 'Tab' });
|
||||
|
||||
const inputText = 'clap';
|
||||
for (const keyCode of inputText) {
|
||||
w.webContents.sendInputEvent({ type: 'char', keyCode });
|
||||
@@ -25,4 +26,22 @@ describe('autofill', () => {
|
||||
const value = await w.webContents.executeJavaScript("document.querySelector('input').value");
|
||||
expect(value).to.equal('Eric Clapton');
|
||||
});
|
||||
|
||||
it('can be selected via keyboard for a <datalist> with time type', async () => {
|
||||
const w = new BrowserWindow({ show: true });
|
||||
await w.loadFile(path.join(fixturesPath, 'pages', 'datalist-time.html'));
|
||||
|
||||
const inputText = '11P'; // 1:01 PM
|
||||
for (const keyCode of inputText) {
|
||||
w.webContents.sendInputEvent({ type: 'keyDown', keyCode: 'Tab' });
|
||||
w.webContents.sendInputEvent({ type: 'keyDown', keyCode });
|
||||
w.webContents.sendInputEvent({ type: 'char', keyCode });
|
||||
await delay(100);
|
||||
}
|
||||
|
||||
w.webContents.sendInputEvent({ type: 'keyDown', keyCode: 'Tab' });
|
||||
|
||||
const value = await w.webContents.executeJavaScript("document.querySelector('input').value");
|
||||
expect(value).to.equal('13:01');
|
||||
});
|
||||
});
|
||||
|
||||
15
spec/fixtures/pages/datalist-text.html
vendored
Normal file
15
spec/fixtures/pages/datalist-text.html
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<body>
|
||||
<input type="text" list="guitarists" />
|
||||
<datalist id="guitarists">
|
||||
<select>
|
||||
<option value="John Mayer"></option>
|
||||
<option value="Eric Clapton"></option>
|
||||
<option value="Django Reinhardt"></option>
|
||||
</select>
|
||||
</datalist>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
13
spec/fixtures/pages/datalist-time.html
vendored
Normal file
13
spec/fixtures/pages/datalist-time.html
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<body>
|
||||
<input type="time" list="hours" />
|
||||
<datalist id="popularHours">
|
||||
<option value="12:00"></option>
|
||||
<option value="13:00"></option>
|
||||
<option value="14:00"></option>
|
||||
</datalist>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
13
spec/fixtures/pages/datalist.html
vendored
13
spec/fixtures/pages/datalist.html
vendored
@@ -1,13 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<body>
|
||||
<input type="text" list="guitarists" />
|
||||
<datalist id="guitarists">
|
||||
<select>
|
||||
<option value="John Mayer"></option>
|
||||
<option value="Eric Clapton"></option>
|
||||
<option value="Django Reinhardt"></option>
|
||||
</select>
|
||||
</datalist>
|
||||
</body>
|
||||
</html>
|
||||
235
yarn.lock
235
yarn.lock
@@ -138,6 +138,36 @@
|
||||
ora "^4.0.3"
|
||||
pretty-ms "^5.1.0"
|
||||
|
||||
"@electron/fiddle-core@^1.0.4":
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/@electron/fiddle-core/-/fiddle-core-1.0.4.tgz#d28e330c4d88f3916269558a43d214c4312333af"
|
||||
integrity sha512-gjPz3IAHK+/f0N52cWVeTZpdgENJo3QHBGeGqMDHFUgzSBRTVyAr8z8Lw8wpu6Ocizs154Rtssn4ba1ysABgLA==
|
||||
dependencies:
|
||||
"@electron/get" "^2.0.0"
|
||||
debug "^4.3.3"
|
||||
env-paths "^2.2.1"
|
||||
extract-zip "^2.0.1"
|
||||
fs-extra "^10.0.0"
|
||||
getos "^3.2.1"
|
||||
node-fetch "^2.6.1"
|
||||
semver "^7.3.5"
|
||||
simple-git "^3.5.0"
|
||||
|
||||
"@electron/get@^2.0.0":
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@electron/get/-/get-2.0.2.tgz#ae2a967b22075e9c25aaf00d5941cd79c21efd7e"
|
||||
integrity sha512-eFZVFoRXb3GFGd7Ak7W4+6jBl9wBtiZ4AaYOse97ej6mKj5tkyO0dUnUChs1IhJZtx1BENo4/p4WUTXpi6vT+g==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
env-paths "^2.2.0"
|
||||
fs-extra "^8.1.0"
|
||||
got "^11.8.5"
|
||||
progress "^2.0.3"
|
||||
semver "^6.2.0"
|
||||
sumchecker "^3.0.1"
|
||||
optionalDependencies:
|
||||
global-agent "^3.0.0"
|
||||
|
||||
"@electron/github-app-auth@^1.5.0":
|
||||
version "1.5.0"
|
||||
resolved "https://registry.yarnpkg.com/@electron/github-app-auth/-/github-app-auth-1.5.0.tgz#426e64ba50143417d9b68f2795a1b119cb62108b"
|
||||
@@ -202,6 +232,18 @@
|
||||
"@jridgewell/resolve-uri" "^3.0.3"
|
||||
"@jridgewell/sourcemap-codec" "^1.4.10"
|
||||
|
||||
"@kwsites/file-exists@^1.1.1":
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@kwsites/file-exists/-/file-exists-1.1.1.tgz#ad1efcac13e1987d8dbaf235ef3be5b0d96faa99"
|
||||
integrity sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
|
||||
"@kwsites/promise-deferred@^1.1.1":
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz#8ace5259254426ccef57f3175bc64ed7095ed919"
|
||||
integrity sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==
|
||||
|
||||
"@nodelib/fs.scandir@2.1.3":
|
||||
version "2.1.3"
|
||||
resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz#3a582bdb53804c6ba6d146579c46e52130cf4a3b"
|
||||
@@ -1050,6 +1092,13 @@
|
||||
tapable "^2.2.0"
|
||||
webpack "^5"
|
||||
|
||||
"@types/yauzl@^2.9.1":
|
||||
version "2.10.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/yauzl/-/yauzl-2.10.0.tgz#b3248295276cf8c6f153ebe6a9aba0c988cb2599"
|
||||
integrity sha512-Cn6WYCm0tXv8p6k+A8PvbDG763EDpBoTzHdA+Q/MF6H3sapGjCm9NzoaJncJS9tUKSuCoDs9XHxYYsQDgxR6kw==
|
||||
dependencies:
|
||||
"@types/node" "*"
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^4.4.1":
|
||||
version "4.4.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.4.1.tgz#b8acea0373bd2a388ac47df44652f00bf8b368f5"
|
||||
@@ -1454,6 +1503,11 @@ astral-regex@^2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/astral-regex/-/astral-regex-2.0.0.tgz#483143c567aeed4785759c0865786dc77d7d2e31"
|
||||
integrity sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==
|
||||
|
||||
async@^3.2.0:
|
||||
version "3.2.4"
|
||||
resolved "https://registry.yarnpkg.com/async/-/async-3.2.4.tgz#2d22e00f8cddeb5fde5dd33522b56d1cf569a81c"
|
||||
integrity sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==
|
||||
|
||||
asynckit@^0.4.0:
|
||||
version "0.4.0"
|
||||
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
|
||||
@@ -1535,6 +1589,11 @@ body-parser@1.19.0:
|
||||
raw-body "2.4.0"
|
||||
type-is "~1.6.17"
|
||||
|
||||
boolean@^3.0.1:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/boolean/-/boolean-3.2.0.tgz#9e5294af4e98314494cbb17979fa54ca159f116b"
|
||||
integrity sha512-d0II/GO9uf9lfUHH2BQsjxzRJZBdsjgsBiW4BvhWk/3qoKwQFjIDVN19PfX8F2D/r9PCMTtLWjYVCFrpeYUzsw==
|
||||
|
||||
brace-expansion@^1.1.7:
|
||||
version "1.1.11"
|
||||
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
|
||||
@@ -1565,6 +1624,11 @@ btoa-lite@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/btoa-lite/-/btoa-lite-1.0.0.tgz#337766da15801210fdd956c22e9c6891ab9d0337"
|
||||
integrity sha512-gvW7InbIyF8AicrqWoptdW08pUxuhq8BEgowNajy9RhiE86fmGAGl+bLKo6oB8QP0CkqHLowfN0oJdKC/J6LbA==
|
||||
|
||||
buffer-crc32@~0.2.3:
|
||||
version "0.2.13"
|
||||
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
|
||||
integrity sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==
|
||||
|
||||
buffer-equal-constant-time@1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz#f8e71132f7ffe6e01a5c9697a4c6f3e48d5cc819"
|
||||
@@ -2019,6 +2083,13 @@ debug@^4.0.1, debug@^4.1.1:
|
||||
dependencies:
|
||||
ms "^2.1.1"
|
||||
|
||||
debug@^4.1.0, debug@^4.3.3, debug@^4.3.4:
|
||||
version "4.3.4"
|
||||
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
|
||||
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
|
||||
dependencies:
|
||||
ms "2.1.2"
|
||||
|
||||
decompress-response@^3.3.0:
|
||||
version "3.3.0"
|
||||
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
|
||||
@@ -2111,6 +2182,11 @@ destroy@~1.0.4:
|
||||
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
|
||||
integrity sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=
|
||||
|
||||
detect-node@^2.0.4:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1"
|
||||
integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==
|
||||
|
||||
diff@^3.1.0:
|
||||
version "3.5.0"
|
||||
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
|
||||
@@ -2262,6 +2338,11 @@ entities@~2.0.0:
|
||||
resolved "https://registry.yarnpkg.com/entities/-/entities-2.0.0.tgz#68d6084cab1b079767540d80e56a39b423e4abf4"
|
||||
integrity sha512-D9f7V0JSRwIxlRI2mjMqufDrRDnx8p+eEOz7aUM9SuvF8gsBzra0/6tbjl1m8eQHrZlYj6PxqE00hZ1SAIKPLw==
|
||||
|
||||
env-paths@^2.2.0, env-paths@^2.2.1:
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2"
|
||||
integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==
|
||||
|
||||
envinfo@^7.7.3:
|
||||
version "7.8.1"
|
||||
resolved "https://registry.yarnpkg.com/envinfo/-/envinfo-7.8.1.tgz#06377e3e5f4d379fea7ac592d5ad8927e0c4d475"
|
||||
@@ -2333,6 +2414,11 @@ es-to-primitive@^1.2.1:
|
||||
is-date-object "^1.0.1"
|
||||
is-symbol "^1.0.2"
|
||||
|
||||
es6-error@^4.1.1:
|
||||
version "4.1.1"
|
||||
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d"
|
||||
integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==
|
||||
|
||||
es6-object-assign@^1.0.3:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c"
|
||||
@@ -2353,6 +2439,11 @@ escape-string-regexp@^1.0.5:
|
||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
|
||||
integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=
|
||||
|
||||
escape-string-regexp@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
|
||||
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
|
||||
|
||||
eslint-config-standard-jsx@8.1.0:
|
||||
version "8.1.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-config-standard-jsx/-/eslint-config-standard-jsx-8.1.0.tgz#314c62a0e6f51f75547f89aade059bec140edfc7"
|
||||
@@ -2799,6 +2890,17 @@ external-editor@^3.0.3:
|
||||
iconv-lite "^0.4.24"
|
||||
tmp "^0.0.33"
|
||||
|
||||
extract-zip@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-2.0.1.tgz#663dca56fe46df890d5f131ef4a06d22bb8ba13a"
|
||||
integrity sha512-GDhU9ntwuKyGXdZBUgTIe+vXnWj0fppUEtMDL0+idd5Sta8TGpHssn/eusA9mrPr9qNDym6SxAYZjNvCn/9RBg==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
get-stream "^5.1.0"
|
||||
yauzl "^2.10.0"
|
||||
optionalDependencies:
|
||||
"@types/yauzl" "^2.9.1"
|
||||
|
||||
fast-deep-equal@^3.1.1:
|
||||
version "3.1.3"
|
||||
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525"
|
||||
@@ -2845,6 +2947,13 @@ fault@^2.0.0:
|
||||
dependencies:
|
||||
format "^0.2.0"
|
||||
|
||||
fd-slicer@~1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
|
||||
integrity sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==
|
||||
dependencies:
|
||||
pend "~1.2.0"
|
||||
|
||||
figgy-pudding@^3.5.1:
|
||||
version "3.5.2"
|
||||
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.2.tgz#b4eee8148abb01dcf1d1ac34367d59e12fa61d6e"
|
||||
@@ -2967,6 +3076,15 @@ fresh@0.5.2:
|
||||
resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7"
|
||||
integrity sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=
|
||||
|
||||
fs-extra@^10.0.0:
|
||||
version "10.1.0"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf"
|
||||
integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==
|
||||
dependencies:
|
||||
graceful-fs "^4.2.0"
|
||||
jsonfile "^6.0.1"
|
||||
universalify "^2.0.0"
|
||||
|
||||
fs-extra@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-7.0.1.tgz#4f189c44aa123b895f722804f55ea23eadc348e9"
|
||||
@@ -3056,6 +3174,13 @@ get-stream@^5.0.0, get-stream@^5.1.0:
|
||||
dependencies:
|
||||
pump "^3.0.0"
|
||||
|
||||
getos@^3.2.1:
|
||||
version "3.2.1"
|
||||
resolved "https://registry.yarnpkg.com/getos/-/getos-3.2.1.tgz#0134d1f4e00eb46144c5a9c0ac4dc087cbb27dc5"
|
||||
integrity sha512-U56CfOK17OKgTVqozZjUKNdkfEv6jk5WISBJ8SHoagjE6L69zOwl3Z+O8myjY9MEW3i2HPWQBt/LTbCgcC973Q==
|
||||
dependencies:
|
||||
async "^3.2.0"
|
||||
|
||||
glob-parent@^5.0.0, glob-parent@^5.1.0:
|
||||
version "5.1.1"
|
||||
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.1.tgz#b6c1ef417c4e5663ea498f1c45afac6916bbc229"
|
||||
@@ -3099,6 +3224,18 @@ glob@~7.1.6:
|
||||
once "^1.3.0"
|
||||
path-is-absolute "^1.0.0"
|
||||
|
||||
global-agent@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-3.0.0.tgz#ae7cd31bd3583b93c5a16437a1afe27cc33a1ab6"
|
||||
integrity sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==
|
||||
dependencies:
|
||||
boolean "^3.0.1"
|
||||
es6-error "^4.1.1"
|
||||
matcher "^3.0.0"
|
||||
roarr "^2.15.3"
|
||||
semver "^7.3.2"
|
||||
serialize-error "^7.0.1"
|
||||
|
||||
globals@^12.1.0:
|
||||
version "12.4.0"
|
||||
resolved "https://registry.yarnpkg.com/globals/-/globals-12.4.0.tgz#a18813576a41b00a24a97e7f815918c2e19925f8"
|
||||
@@ -3106,6 +3243,13 @@ globals@^12.1.0:
|
||||
dependencies:
|
||||
type-fest "^0.8.1"
|
||||
|
||||
globalthis@^1.0.1:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf"
|
||||
integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==
|
||||
dependencies:
|
||||
define-properties "^1.1.3"
|
||||
|
||||
globby@^11.0.0, globby@^11.0.1:
|
||||
version "11.0.1"
|
||||
resolved "https://registry.yarnpkg.com/globby/-/globby-11.0.1.tgz#9a2bf107a068f3ffeabc49ad702c79ede8cfd357"
|
||||
@@ -3652,6 +3796,11 @@ json-stable-stringify-without-jsonify@^1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
|
||||
integrity sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=
|
||||
|
||||
json-stringify-safe@^5.0.1:
|
||||
version "5.0.1"
|
||||
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
|
||||
integrity sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==
|
||||
|
||||
json5@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.1.tgz#779fb0018604fa854eacbf6252180d83543e3dbe"
|
||||
@@ -4100,6 +4249,13 @@ matcher-collection@^1.0.0:
|
||||
dependencies:
|
||||
minimatch "^3.0.2"
|
||||
|
||||
matcher@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz#bd9060f4c5b70aa8041ccc6f80368760994f30ca"
|
||||
integrity sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==
|
||||
dependencies:
|
||||
escape-string-regexp "^4.0.0"
|
||||
|
||||
mdast-comment-marker@^1.0.0:
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/mdast-comment-marker/-/mdast-comment-marker-1.1.1.tgz#9c9c18e1ed57feafc1965d92b028f37c3c8da70d"
|
||||
@@ -4513,6 +4669,13 @@ node-fetch@^2.3.0, node-fetch@^2.6.7:
|
||||
dependencies:
|
||||
whatwg-url "^5.0.0"
|
||||
|
||||
node-fetch@^2.6.1:
|
||||
version "2.6.8"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.6.8.tgz#a68d30b162bc1d8fd71a367e81b997e1f4d4937e"
|
||||
integrity sha512-RZ6dBYuj8dRSfxpUSu+NsdF1dpPpluJxwOp+6IoDp/sH2QNDSvurYsAa+F1WxY2RjA1iP93xhcsUoYbF2XBqVg==
|
||||
dependencies:
|
||||
whatwg-url "^5.0.0"
|
||||
|
||||
node-releases@^2.0.6:
|
||||
version "2.0.6"
|
||||
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503"
|
||||
@@ -4885,6 +5048,11 @@ pathval@^1.1.0:
|
||||
resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d"
|
||||
integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==
|
||||
|
||||
pend@~1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
|
||||
integrity sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==
|
||||
|
||||
picocolors@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
|
||||
@@ -5825,6 +5993,18 @@ rimraf@~2.2.6:
|
||||
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582"
|
||||
integrity sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI=
|
||||
|
||||
roarr@^2.15.3:
|
||||
version "2.15.4"
|
||||
resolved "https://registry.yarnpkg.com/roarr/-/roarr-2.15.4.tgz#f5fe795b7b838ccfe35dc608e0282b9eba2e7afd"
|
||||
integrity sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==
|
||||
dependencies:
|
||||
boolean "^3.0.1"
|
||||
detect-node "^2.0.4"
|
||||
globalthis "^1.0.1"
|
||||
json-stringify-safe "^5.0.1"
|
||||
semver-compare "^1.0.0"
|
||||
sprintf-js "^1.1.2"
|
||||
|
||||
run-async@^2.4.0:
|
||||
version "2.4.1"
|
||||
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455"
|
||||
@@ -5905,7 +6085,7 @@ semver@^6.0.0:
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-6.2.0.tgz#4d813d9590aaf8a9192693d6c85b9344de5901db"
|
||||
integrity sha512-jdFC1VdUGT/2Scgbimf7FSx9iJLXoqfglSF+gJeuNWVpiE37OIbc1jywR/GJyFdz3mnkz2/id0L0J/cr0izR5A==
|
||||
|
||||
semver@^6.1.0, semver@^6.1.2:
|
||||
semver@^6.1.0, semver@^6.1.2, semver@^6.2.0:
|
||||
version "6.3.0"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
|
||||
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
|
||||
@@ -5922,6 +6102,13 @@ semver@^7.2.1, semver@^7.3.2:
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.2.tgz#604962b052b81ed0786aae84389ffba70ffd3938"
|
||||
integrity sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==
|
||||
|
||||
semver@^7.3.5:
|
||||
version "7.3.8"
|
||||
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.8.tgz#07a78feafb3f7b32347d725e33de7e2a2df67798"
|
||||
integrity sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==
|
||||
dependencies:
|
||||
lru-cache "^6.0.0"
|
||||
|
||||
send@0.17.1:
|
||||
version "0.17.1"
|
||||
resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"
|
||||
@@ -5941,6 +6128,13 @@ send@0.17.1:
|
||||
range-parser "~1.2.1"
|
||||
statuses "~1.5.0"
|
||||
|
||||
serialize-error@^7.0.1:
|
||||
version "7.0.1"
|
||||
resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-7.0.1.tgz#f1360b0447f61ffb483ec4157c737fab7d778e18"
|
||||
integrity sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==
|
||||
dependencies:
|
||||
type-fest "^0.13.1"
|
||||
|
||||
serialize-javascript@^6.0.0:
|
||||
version "6.0.0"
|
||||
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-6.0.0.tgz#efae5d88f45d7924141da8b5c3a7a7e663fefeb8"
|
||||
@@ -6017,6 +6211,15 @@ signal-exit@^3.0.2:
|
||||
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c"
|
||||
integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==
|
||||
|
||||
simple-git@^3.5.0:
|
||||
version "3.15.1"
|
||||
resolved "https://registry.yarnpkg.com/simple-git/-/simple-git-3.15.1.tgz#57f595682cb0c2475d5056da078a05c8715a25ef"
|
||||
integrity sha512-73MVa5984t/JP4JcQt0oZlKGr42ROYWC3BcUZfuHtT3IHKPspIvL0cZBnvPXF7LL3S/qVeVHVdYYmJ3LOTw4Rg==
|
||||
dependencies:
|
||||
"@kwsites/file-exists" "^1.1.1"
|
||||
"@kwsites/promise-deferred" "^1.1.1"
|
||||
debug "^4.3.4"
|
||||
|
||||
slash@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634"
|
||||
@@ -6101,6 +6304,11 @@ spdx-license-ids@^3.0.0:
|
||||
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.4.tgz#75ecd1a88de8c184ef015eafb51b5b48bfd11bb1"
|
||||
integrity sha512-7j8LYJLeY/Yb6ACbQ7F76qy5jHkp0U6jgBfJsk97bwWlVUnUWsAgpyaCvo17h0/RQGnQ036tVDomiwoI4pDkQA==
|
||||
|
||||
sprintf-js@^1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673"
|
||||
integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==
|
||||
|
||||
sprintf-js@~1.0.2:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
|
||||
@@ -6272,6 +6480,13 @@ strip-json-comments@~2.0.1:
|
||||
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
|
||||
integrity sha1-PFMZQukIwml8DsNEhYwobHygpgo=
|
||||
|
||||
sumchecker@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-3.0.1.tgz#6377e996795abb0b6d348e9b3e1dfb24345a8e42"
|
||||
integrity sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==
|
||||
dependencies:
|
||||
debug "^4.1.0"
|
||||
|
||||
supports-color@^5.3.0:
|
||||
version "5.5.0"
|
||||
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
|
||||
@@ -6547,6 +6762,11 @@ type-fest@^0.11.0:
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.11.0.tgz#97abf0872310fed88a5c466b25681576145e33f1"
|
||||
integrity sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==
|
||||
|
||||
type-fest@^0.13.1:
|
||||
version "0.13.1"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934"
|
||||
integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==
|
||||
|
||||
type-fest@^0.3.0:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.3.1.tgz#63d00d204e059474fe5e1b7c011112bbd1dc29e1"
|
||||
@@ -6738,6 +6958,11 @@ universalify@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/universalify/-/universalify-1.0.0.tgz#b61a1da173e8435b2fe3c67d29b9adf8594bd16d"
|
||||
integrity sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==
|
||||
|
||||
universalify@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717"
|
||||
integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ==
|
||||
|
||||
unpipe@1.0.0, unpipe@~1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec"
|
||||
@@ -7075,6 +7300,14 @@ yaml@^1.7.2:
|
||||
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e"
|
||||
integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==
|
||||
|
||||
yauzl@^2.10.0:
|
||||
version "2.10.0"
|
||||
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
|
||||
integrity sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==
|
||||
dependencies:
|
||||
buffer-crc32 "~0.2.3"
|
||||
fd-slicer "~1.1.0"
|
||||
|
||||
yn@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a"
|
||||
|
||||
Reference in New Issue
Block a user