mirror of
https://github.com/electron/electron.git
synced 2026-02-26 03:01:17 -05:00
Compare commits
20 Commits
v25.0.0-be
...
v25.0.0-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4f2e369bdc | ||
|
|
eef9787c48 | ||
|
|
81fe8993ec | ||
|
|
55b5c85f92 | ||
|
|
a0e6ca8dab | ||
|
|
e30b25269d | ||
|
|
319d77a4ee | ||
|
|
e22767b1e7 | ||
|
|
5008e3ecab | ||
|
|
d69776bfb0 | ||
|
|
b56e4287d3 | ||
|
|
1254a684dd | ||
|
|
99a81e4ef0 | ||
|
|
36d5706ea9 | ||
|
|
2ae9588e1c | ||
|
|
320415edf9 | ||
|
|
dd59115ac6 | ||
|
|
80a378a9de | ||
|
|
8d2530437e | ||
|
|
dde3a0f1ba |
@@ -52,9 +52,14 @@ executors:
|
||||
size:
|
||||
description: "macOS executor size"
|
||||
type: enum
|
||||
enum: ["macos.x86.medium.gen2", "large"]
|
||||
enum: ["macos.x86.medium.gen2"]
|
||||
version:
|
||||
description: "xcode version"
|
||||
type: enum
|
||||
enum: ["14.3.0", "14.0.0"]
|
||||
default: 14.3.0
|
||||
macos:
|
||||
xcode: 14.0.0
|
||||
xcode: << parameters.version >>
|
||||
resource_class: << parameters.size >>
|
||||
|
||||
# Electron Runners
|
||||
@@ -2142,6 +2147,7 @@ jobs:
|
||||
executor:
|
||||
name: macos
|
||||
size: macos.x86.medium.gen2
|
||||
version: 14.0.0
|
||||
environment:
|
||||
<<: *env-mac-large
|
||||
<<: *env-stack-dumping
|
||||
@@ -2165,6 +2171,7 @@ jobs:
|
||||
executor:
|
||||
name: macos
|
||||
size: macos.x86.medium.gen2
|
||||
version: 14.0.0
|
||||
environment:
|
||||
<<: *env-mac-large
|
||||
<<: *env-stack-dumping
|
||||
|
||||
@@ -1,27 +1,3 @@
|
||||
{
|
||||
"commands-show-output": false,
|
||||
"first-line-h1": false,
|
||||
"header-increment": false,
|
||||
"line-length": {
|
||||
"code_blocks": false,
|
||||
"tables": false,
|
||||
"stern": true,
|
||||
"line_length": -1
|
||||
},
|
||||
"no-bare-urls": false,
|
||||
"no-blanks-blockquote": false,
|
||||
"no-duplicate-header": {
|
||||
"allow_different_nesting": true
|
||||
},
|
||||
"no-emphasis-as-header": false,
|
||||
"no-hard-tabs": {
|
||||
"code_blocks": false
|
||||
},
|
||||
"no-space-in-emphasis": false,
|
||||
"no-trailing-punctuation": false,
|
||||
"no-trailing-spaces": {
|
||||
"br_spaces": 0
|
||||
},
|
||||
"single-h1": false,
|
||||
"no-inline-html": false
|
||||
"extends": "@electron/lint-roller/configs/markdownlint.json"
|
||||
}
|
||||
|
||||
2
DEPS
2
DEPS
@@ -2,7 +2,7 @@ gclient_gn_args_from = 'src'
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'114.0.5719.0',
|
||||
'114.0.5735.16',
|
||||
'node_version':
|
||||
'v18.15.0',
|
||||
'nan_version':
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
version: 1.0.{build}
|
||||
build_cloud: electronhq-16-core
|
||||
image: e-114.0.5684.0
|
||||
image: e-114.0.5735.16-bust-cache
|
||||
environment:
|
||||
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||
ELECTRON_OUT_DIR: Default
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
version: 1.0.{build}
|
||||
build_cloud: electronhq-16-core
|
||||
image: e-114.0.5684.0
|
||||
image: e-114.0.5735.16-bust-cache
|
||||
environment:
|
||||
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||
ELECTRON_OUT_DIR: Default
|
||||
|
||||
@@ -129,6 +129,45 @@ won't be able to connect to remote sites. However, a return value of
|
||||
whether a particular connection attempt to a particular remote site
|
||||
will be successful.
|
||||
|
||||
#### `net.resolveHost(host, [options])`
|
||||
|
||||
* `host` string - Hostname to resolve.
|
||||
* `options` Object (optional)
|
||||
* `queryType` string (optional) - Requested DNS query type. If unspecified,
|
||||
resolver will pick A or AAAA (or both) based on IPv4/IPv6 settings:
|
||||
* `A` - Fetch only A records
|
||||
* `AAAA` - Fetch only AAAA records.
|
||||
* `source` string (optional) - The source to use for resolved addresses.
|
||||
Default allows the resolver to pick an appropriate source. Only affects use
|
||||
of big external sources (e.g. calling the system for resolution or using
|
||||
DNS). Even if a source is specified, results can still come from cache,
|
||||
resolving "localhost" or IP literals, etc. One of the following values:
|
||||
* `any` (default) - Resolver will pick an appropriate source. Results could
|
||||
come from DNS, MulticastDNS, HOSTS file, etc
|
||||
* `system` - Results will only be retrieved from the system or OS, e.g. via
|
||||
the `getaddrinfo()` system call
|
||||
* `dns` - Results will only come from DNS queries
|
||||
* `mdns` - Results will only come from Multicast DNS queries
|
||||
* `localOnly` - No external sources will be used. Results will only come
|
||||
from fast local sources that are available no matter the source setting,
|
||||
e.g. cache, hosts file, IP literal resolution, etc.
|
||||
* `cacheUsage` string (optional) - Indicates what DNS cache entries, if any,
|
||||
can be used to provide a response. One of the following values:
|
||||
* `allowed` (default) - Results may come from the host cache if non-stale
|
||||
* `staleAllowed` - Results may come from the host cache even if stale (by
|
||||
expiration or network changes)
|
||||
* `disallowed` - Results will not come from the host cache.
|
||||
* `secureDnsPolicy` string (optional) - Controls the resolver's Secure DNS
|
||||
behavior for this request. One of the following values:
|
||||
* `allow` (default)
|
||||
* `disable`
|
||||
|
||||
Returns [`Promise<ResolvedHost>`](structures/resolved-host.md) - Resolves with the resolved IP addresses for the `host`.
|
||||
|
||||
This method will resolve hosts from the [default
|
||||
session](session.md#sessiondefaultsession). To resolve a host from
|
||||
another session, use [ses.resolveHost()](session.md#sesresolvehosthost-options).
|
||||
|
||||
## Properties
|
||||
|
||||
### `net.online` _Readonly_
|
||||
|
||||
@@ -1024,7 +1024,7 @@ Passing `null` instead of a function resets the handler to its default state.
|
||||
* `details` Object
|
||||
* `deviceType` string - The type of device that permission is being requested on, can be `hid`, `serial`, or `usb`.
|
||||
* `origin` string - The origin URL of the device permission check.
|
||||
* `device` [HIDDevice](structures/hid-device.md) | [SerialPort](structures/serial-port.md)- the device that permission is being requested for.
|
||||
* `device` [HIDDevice](structures/hid-device.md) | [SerialPort](structures/serial-port.md) | [USBDevice](structures/usb-device.md) - the device that permission is being requested for.
|
||||
|
||||
Sets the handler which can be used to respond to device permission checks for the `session`.
|
||||
Returning `true` will allow the device to be permitted and `false` will reject it.
|
||||
|
||||
@@ -28,6 +28,8 @@ On macOS, third-party assistive technology can toggle accessibility features ins
|
||||
Electron applications by setting the `AXManualAccessibility` attribute
|
||||
programmatically:
|
||||
|
||||
Using Objective-C:
|
||||
|
||||
```objc
|
||||
CFStringRef kAXManualAccessibility = CFSTR("AXManualAccessibility");
|
||||
|
||||
@@ -43,5 +45,16 @@ CFStringRef kAXManualAccessibility = CFSTR("AXManualAccessibility");
|
||||
}
|
||||
```
|
||||
|
||||
Using Swift:
|
||||
|
||||
```swift
|
||||
import Cocoa
|
||||
let name = CommandLine.arguments.count >= 2 ? CommandLine.arguments[1] : "Electron"
|
||||
let pid = NSWorkspace.shared.runningApplications.first(where: {$0.localizedName == name})!.processIdentifier
|
||||
let axApp = AXUIElementCreateApplication(pid)
|
||||
let result = AXUIElementSetAttributeValue(axApp, "AXManualAccessibility" as CFString, true as CFTypeRef)
|
||||
print("Setting 'AXManualAccessibility' \(error.rawValue == 0 ? "succeeded" : "failed")")
|
||||
```
|
||||
|
||||
[a11y-docs]: https://www.chromium.org/developers/design-documents/accessibility#TOC-How-Chrome-detects-the-presence-of-Assistive-Technology
|
||||
[setAccessibilitySupportEnabled]: ../api/app.md#appsetaccessibilitysupportenabledenabled-macos-windows
|
||||
|
||||
@@ -129,7 +129,7 @@ Electron provides several APIs for working with the WebUSB API:
|
||||
when handling the `select-usb-device` event.
|
||||
**Note:** These two events only fire until the callback from `select-usb-device`
|
||||
is called. They are not intended to be used as a generic usb device listener.
|
||||
* The [`usb-device-revoked' event on the Session](../api/session.md#event-usb-device-revoked) can
|
||||
* The [`usb-device-revoked` event on the Session](../api/session.md#event-usb-device-revoked) can
|
||||
be used to respond when [device.forget()](https://developer.chrome.com/articles/usb/#revoke-access)
|
||||
is called on a USB device.
|
||||
* [`ses.setDevicePermissionHandler(handler)`](../api/session.md#sessetdevicepermissionhandlerhandler)
|
||||
|
||||
@@ -146,6 +146,6 @@ GNOME, and KDE.
|
||||
[set-app-user-model-id]: ../api/app.md#appsetappusermodelidid-windows
|
||||
[squirrel-events]: https://github.com/electron/windows-installer/blob/main/README.md#handling-squirrel-events
|
||||
[toast-activator-clsid]: https://learn.microsoft.com/en-us/windows/win32/properties/props-system-appusermodel-toastactivatorclsid
|
||||
[apple-notification-guidelines]: https://developer.apple.com/macos/human-interface-guidelines/system-capabilities/notifications/
|
||||
[apple-notification-guidelines]: https://developer.apple.com/design/human-interface-guidelines/notifications
|
||||
[windows-notification-state]: https://github.com/felixrieseberg/windows-notification-state
|
||||
[macos-notification-state]: https://github.com/felixrieseberg/macos-notification-state
|
||||
|
||||
@@ -202,7 +202,7 @@ Then, set up your `handle` listener in the main process. We do this _before_
|
||||
loading the HTML file so that the handler is guaranteed to be ready before
|
||||
you send out the `invoke` call from the renderer.
|
||||
|
||||
```js {1,12} title="main.js"
|
||||
```js {1,15} title="main.js"
|
||||
const { app, BrowserWindow, ipcMain } = require('electron')
|
||||
const path = require('path')
|
||||
|
||||
@@ -214,10 +214,12 @@ const createWindow = () => {
|
||||
preload: path.join(__dirname, 'preload.js'),
|
||||
},
|
||||
})
|
||||
ipcMain.handle('ping', () => 'pong')
|
||||
win.loadFile('index.html')
|
||||
}
|
||||
app.whenReady().then(createWindow)
|
||||
app.whenReady().then(() => {
|
||||
ipcMain.handle('ping', () => 'pong')
|
||||
createWindow()
|
||||
})
|
||||
```
|
||||
|
||||
Once you have the sender and receiver set up, you can now send messages from the renderer
|
||||
|
||||
@@ -637,8 +637,6 @@ filenames = {
|
||||
"shell/common/language_util.h",
|
||||
"shell/common/logging.cc",
|
||||
"shell/common/logging.h",
|
||||
"shell/common/mouse_util.cc",
|
||||
"shell/common/mouse_util.h",
|
||||
"shell/common/node_bindings.cc",
|
||||
"shell/common/node_bindings.h",
|
||||
"shell/common/node_includes.h",
|
||||
@@ -697,6 +695,8 @@ filenames = {
|
||||
"shell/browser/extensions/api/management/electron_management_api_delegate.h",
|
||||
"shell/browser/extensions/api/resources_private/resources_private_api.cc",
|
||||
"shell/browser/extensions/api/resources_private/resources_private_api.h",
|
||||
"shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.cc",
|
||||
"shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.h",
|
||||
"shell/browser/extensions/api/runtime/electron_runtime_api_delegate.cc",
|
||||
"shell/browser/extensions/api/runtime/electron_runtime_api_delegate.h",
|
||||
"shell/browser/extensions/api/streams_private/streams_private_api.cc",
|
||||
|
||||
@@ -12,6 +12,10 @@ export function fetch (input: RequestInfo, init?: RequestInit): Promise<Response
|
||||
return session.defaultSession.fetch(input, init);
|
||||
}
|
||||
|
||||
export function resolveHost (host: string, options?: Electron.ResolveHostOptions): Promise<Electron.ResolvedHost> {
|
||||
return session.defaultSession.resolveHost(host, options);
|
||||
}
|
||||
|
||||
exports.isOnline = isOnline;
|
||||
|
||||
Object.defineProperty(exports, 'online', {
|
||||
|
||||
@@ -519,17 +519,10 @@ WebContents.prototype._callWindowOpenHandler = function (event: Electron.Event,
|
||||
event.preventDefault();
|
||||
return defaultResponse;
|
||||
} else if (response.action === 'allow') {
|
||||
if (typeof response.overrideBrowserWindowOptions === 'object' && response.overrideBrowserWindowOptions !== null) {
|
||||
return {
|
||||
browserWindowConstructorOptions: response.overrideBrowserWindowOptions,
|
||||
outlivesOpener: typeof response.outlivesOpener === 'boolean' ? response.outlivesOpener : false
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
browserWindowConstructorOptions: {},
|
||||
outlivesOpener: typeof response.outlivesOpener === 'boolean' ? response.outlivesOpener : false
|
||||
};
|
||||
}
|
||||
return {
|
||||
browserWindowConstructorOptions: typeof response.overrideBrowserWindowOptions === 'object' ? response.overrideBrowserWindowOptions : null,
|
||||
outlivesOpener: typeof response.outlivesOpener === 'boolean' ? response.outlivesOpener : false
|
||||
};
|
||||
} else {
|
||||
event.preventDefault();
|
||||
console.error('The window open handler response must be an object with an \'action\' property of \'allow\' or \'deny\'.');
|
||||
|
||||
20
package.json
20
package.json
@@ -5,11 +5,11 @@
|
||||
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
|
||||
"devDependencies": {
|
||||
"@azure/storage-blob": "^12.9.0",
|
||||
"@dsanders11/vscode-markdown-languageservice": "^0.3.0-alpha.4",
|
||||
"@electron/asar": "^3.2.1",
|
||||
"@electron/docs-parser": "^1.1.0",
|
||||
"@electron/fiddle-core": "^1.0.4",
|
||||
"@electron/github-app-auth": "^1.5.0",
|
||||
"@electron/lint-roller": "^1.1.0",
|
||||
"@electron/typescript-definitions": "^8.14.0",
|
||||
"@octokit/rest": "^19.0.7",
|
||||
"@primer/octicons": "^10.0.0",
|
||||
@@ -56,10 +56,9 @@
|
||||
"klaw": "^3.0.0",
|
||||
"lint": "^1.1.2",
|
||||
"lint-staged": "^10.2.11",
|
||||
"markdownlint-cli": "^0.33.0",
|
||||
"mdast-util-from-markdown": "^1.2.0",
|
||||
"minimist": "^1.2.6",
|
||||
"null-loader": "^4.0.0",
|
||||
"patch-package": "^7.0.0",
|
||||
"pre-flight": "^1.1.0",
|
||||
"process": "^0.11.10",
|
||||
"remark-cli": "^10.0.0",
|
||||
@@ -74,10 +73,6 @@
|
||||
"ts-loader": "^8.0.2",
|
||||
"ts-node": "6.2.0",
|
||||
"typescript": "^4.5.5",
|
||||
"unist-util-visit": "^4.1.1",
|
||||
"vscode-languageserver": "^8.0.2",
|
||||
"vscode-languageserver-textdocument": "^1.0.7",
|
||||
"vscode-uri": "^3.0.6",
|
||||
"webpack": "^5.76.0",
|
||||
"webpack-cli": "^4.10.0",
|
||||
"wrapper-webpack-plugin": "^2.2.0"
|
||||
@@ -96,8 +91,8 @@
|
||||
"lint:gn": "node ./script/lint.js --gn",
|
||||
"lint:docs": "remark docs -qf && npm run lint:js-in-markdown && npm run create-typescript-definitions && npm run lint:docs-fiddles && npm run lint:docs-relative-links && npm run lint:markdownlint",
|
||||
"lint:docs-fiddles": "standard \"docs/fiddles/**/*.js\"",
|
||||
"lint:docs-relative-links": "ts-node script/lint-docs-links.ts",
|
||||
"lint:markdownlint": "markdownlint -r ./script/markdownlint-emd001.js \"*.md\" \"docs/**/*.md\"",
|
||||
"lint:docs-relative-links": "electron-lint-markdown-links --root docs \"**/*.md\"",
|
||||
"lint:markdownlint": "electron-markdownlint \"*.md\" \"docs/**/*.md\"",
|
||||
"lint:js-in-markdown": "standard-markdown docs",
|
||||
"create-api-json": "node script/create-api-json.js",
|
||||
"create-typescript-definitions": "npm run create-api-json && electron-typescript-definitions --api=electron-api.json && node spec/ts-smoke/runner.js",
|
||||
@@ -108,7 +103,7 @@
|
||||
"precommit": "lint-staged",
|
||||
"preinstall": "node -e 'process.exit(0)'",
|
||||
"prepack": "check-for-leaks",
|
||||
"prepare": "husky install",
|
||||
"prepare": "husky install && patch-package --patch-dir patches_npm",
|
||||
"repl": "node ./script/start.js --interactive",
|
||||
"start": "node ./script/start.js",
|
||||
"test": "node ./script/spec-runner.js",
|
||||
@@ -142,7 +137,7 @@
|
||||
],
|
||||
"docs/api/**/*.md": [
|
||||
"ts-node script/gen-filenames.ts",
|
||||
"markdownlint --config .markdownlint.autofix.json --fix",
|
||||
"electron-markdownlint --config .markdownlint.autofix.json --fix",
|
||||
"git add filenames.auto.gni"
|
||||
],
|
||||
"{*.patch,.patches}": [
|
||||
@@ -155,6 +150,7 @@
|
||||
]
|
||||
},
|
||||
"resolutions": {
|
||||
"nan": "nodejs/nan#16fa32231e2ccd89d2804b3f765319128b20c4ac"
|
||||
"nan": "nodejs/nan#16fa32231e2ccd89d2804b3f765319128b20c4ac",
|
||||
"@octokit/request": "6.2.3"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ index 2ca14efae5ea478f43794a81883b00dfdb1a37b0..d73055fbf39334925ef4b4804bbaca57
|
||||
|
||||
case ssl_open_record_error:
|
||||
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc
|
||||
index 86e8eb33e2f99b9a6173550027cfd0812a39614e..f2aac85c096bef42a015135b02936e3d4e9a4c56 100644
|
||||
index 6b4549633585f8a65fb7b285a9be4ba83db355db..f9367d3c050f89011a09b847c29df31f321ffd09 100644
|
||||
--- a/ssl/ssl_lib.cc
|
||||
+++ b/ssl/ssl_lib.cc
|
||||
@@ -1320,7 +1320,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
@@ -1335,7 +1335,7 @@ int SSL_get_error(const SSL *ssl, int ret_code) {
|
||||
}
|
||||
|
||||
if (ret_code == 0) {
|
||||
@@ -32,7 +32,7 @@ index 86e8eb33e2f99b9a6173550027cfd0812a39614e..f2aac85c096bef42a015135b02936e3d
|
||||
return SSL_ERROR_ZERO_RETURN;
|
||||
}
|
||||
// An EOF was observed which violates the protocol, and the underlying
|
||||
@@ -2597,13 +2597,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
@@ -2624,13 +2624,7 @@ void *SSL_CTX_get_ex_data(const SSL_CTX *ctx, int idx) {
|
||||
return CRYPTO_get_ex_data(&ctx->ex_data, idx);
|
||||
}
|
||||
|
||||
@@ -48,10 +48,10 @@ index 86e8eb33e2f99b9a6173550027cfd0812a39614e..f2aac85c096bef42a015135b02936e3d
|
||||
void SSL_CTX_set_tmp_rsa_callback(SSL_CTX *ctx,
|
||||
RSA *(*cb)(SSL *ssl, int is_export,
|
||||
diff --git a/ssl/ssl_test.cc b/ssl/ssl_test.cc
|
||||
index f51c11efc12209377773204808b85c9cbf5d3bff..d19fd1f9643f99fdd56753a942fccefff08728ac 100644
|
||||
index 854068f44b2bb8f738e41fab059b62ced9309fce..a080edd8b5ec48e433afa45d6246b30e9f7221f0 100644
|
||||
--- a/ssl/ssl_test.cc
|
||||
+++ b/ssl/ssl_test.cc
|
||||
@@ -8460,11 +8460,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) {
|
||||
@@ -8459,11 +8459,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) {
|
||||
EXPECT_EQ(ret, 0);
|
||||
EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_ZERO_RETURN);
|
||||
|
||||
@@ -63,7 +63,7 @@ index f51c11efc12209377773204808b85c9cbf5d3bff..d19fd1f9643f99fdd56753a942fcceff
|
||||
// Although the client has seen close_notify, it should continue to report
|
||||
// |SSL_ERROR_SYSCALL| when its writes fail.
|
||||
ret = SSL_write(client.get(), data, sizeof(data));
|
||||
@@ -8472,22 +8467,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) {
|
||||
@@ -8471,22 +8466,6 @@ TEST(SSLTest, ErrorSyscallAfterCloseNotify) {
|
||||
EXPECT_EQ(SSL_get_error(client.get(), ret), SSL_ERROR_SYSCALL);
|
||||
EXPECT_TRUE(write_failed);
|
||||
write_failed = false;
|
||||
|
||||
@@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
|
||||
index 7af9fa04eefd67a6a3a3083e01efb85450057135..8a3cec9cb09c08f8a5a88ae671e0f13b643d9b5b 100644
|
||||
index a399e1ba0e6728aa8d2869864d3c328ba61e779b..b7dd5e0e48af2a88aad11139f5951d917d8d4f9d 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -244,6 +244,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -258,6 +258,10 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
// to the GpuProcessHost once the GpuServiceImpl has started.
|
||||
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
|
||||
|
||||
@@ -24,7 +24,7 @@ index 7af9fa04eefd67a6a3a3083e01efb85450057135..8a3cec9cb09c08f8a5a88ae671e0f13b
|
||||
// We are experiencing what appear to be memory-stomp issues in the GPU
|
||||
// process. These issues seem to be impacting the task executor and listeners
|
||||
// registered to it. Create the task executor on the heap to guard against
|
||||
@@ -328,7 +332,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
@@ -342,7 +346,6 @@ int GpuMain(MainFunctionParams parameters) {
|
||||
const_cast<base::CommandLine*>(&command_line), gpu_preferences);
|
||||
const bool dead_on_arrival = !init_success;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ index fef4c8e02067c44ed804c8b53db1007fae2d2a76..b36304ee0a832c5e1e2fd3af6151b7b0
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 456304cef9e3a8063b112b3f4cfabc25d9d479d4..03cc4d80913201828aba0c60940f4784b0b788b3 100644
|
||||
index 026a6934997f0825c3f2c0a40551ce7784a7b828..5bceb2baec943a2f58416c0ca6093014f9d68d7c 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4417,6 +4417,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -40,7 +40,7 @@ index 456304cef9e3a8063b112b3f4cfabc25d9d479d4..03cc4d80913201828aba0c60940f4784
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index 39119f060d6f8bd1707cf9122708e3571d52ecb8..4b501e4602cd3f39e8e26f839f3cc77832ff690c 100644
|
||||
index 516a8140f79cc7f8ffe4b0665184d7d3d6111da9..fce2608070d2bf31b6b02de47102aff870c8229f 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -608,6 +608,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
|
||||
@@ -8,10 +8,10 @@ was removed as part of the Raw Clipboard API scrubbing.
|
||||
https://bugs.chromium.org/p/chromium/issues/detail?id=1217643
|
||||
|
||||
diff --git a/ui/base/clipboard/scoped_clipboard_writer.cc b/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
index 069a4481ca6318215dd8a86b71aa7cacfb635173..605c5b8f8a7e50a22c94c6818cbdd95ced14fc15 100644
|
||||
index 0aef31c1e881fdcb5bfe09fd5ba47b1c5bd861bc..0864450bdcb5577b3ccdf2b6bd97198f283db295 100644
|
||||
--- a/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
+++ b/ui/base/clipboard/scoped_clipboard_writer.cc
|
||||
@@ -232,6 +232,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting(
|
||||
@@ -249,6 +249,16 @@ void ScopedClipboardWriter::WriteEncodedDataTransferEndpointForTesting(
|
||||
}
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
@@ -29,10 +29,10 @@ index 069a4481ca6318215dd8a86b71aa7cacfb635173..605c5b8f8a7e50a22c94c6818cbdd95c
|
||||
objects_.clear();
|
||||
platform_representations_.clear();
|
||||
diff --git a/ui/base/clipboard/scoped_clipboard_writer.h b/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
index 2a9964f12a3a17103cd473de74a039d01e117041..873cd66831b7cb4d762d3b7abf5fd08623d3d73b 100644
|
||||
index 569aa7f3673f16c126e7c0b8ea34cac483c7b38d..e494fcc56d4182175943ce0f4190f23a86b9f3a5 100644
|
||||
--- a/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
+++ b/ui/base/clipboard/scoped_clipboard_writer.h
|
||||
@@ -87,6 +87,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {
|
||||
@@ -91,6 +91,10 @@ class COMPONENT_EXPORT(UI_BASE_CLIPBOARD) ScopedClipboardWriter {
|
||||
// This is only used to write custom format data.
|
||||
void WriteData(const std::u16string& format, mojo_base::BigBuffer data);
|
||||
|
||||
|
||||
@@ -49,7 +49,7 @@ index 22c4d4e9718a503d9c7ca26a40c97149b0f8986a..6bdc2757c96a28022fda9e6f5e3b74a0
|
||||
// its owning reference back to our owning LocalFrame.
|
||||
client_->Detached(type);
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index c1a1bc822294940dbfdeef19ad082a17dc98325c..780e573751d6b7cee1ff751746f57f039649e96b 100644
|
||||
index ff4e8adad01b5d05bf0aa1bbac8fac5733ffb682..b01924ed532b360a7002d846b6085e308681a0ff 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -625,10 +625,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: boringssl BUILD.gn
|
||||
Build BoringSSL with some extra functions that nodejs needs.
|
||||
|
||||
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
|
||||
index 40073723173388015f0c78899214ba155e7cdc53..72978c43a522e5716ba06e8b989710cc99bd8773 100644
|
||||
index 6fb13437c6bcca2aff102b04f3a46d2ad6a791c5..c61c60c7cb968c2b730a14de9ac0629aaceb73d3 100644
|
||||
--- a/third_party/boringssl/BUILD.gn
|
||||
+++ b/third_party/boringssl/BUILD.gn
|
||||
@@ -44,6 +44,20 @@ config("no_asm_config") {
|
||||
@@ -49,6 +49,20 @@ config("no_asm_config") {
|
||||
|
||||
all_sources = crypto_sources + ssl_sources
|
||||
all_headers = crypto_headers + ssl_headers
|
||||
@@ -28,5 +28,5 @@ index 40073723173388015f0c78899214ba155e7cdc53..72978c43a522e5716ba06e8b989710cc
|
||||
+ ]
|
||||
+}
|
||||
|
||||
# Windows' assembly is built with NASM. The other platforms use the platform
|
||||
# assembler. Exclude Windows ARM64 because NASM targets x86 and x64 only.
|
||||
if (enable_rust_boringssl) {
|
||||
rust_bindgen("raw_bssl_sys_bindings") {
|
||||
|
||||
@@ -13,7 +13,7 @@ This patch can be removed when enable_print_content_analysis can be more
|
||||
easily enabled or disabled by default with buildflags.
|
||||
|
||||
diff --git a/printing/buildflags/buildflags.gni b/printing/buildflags/buildflags.gni
|
||||
index 8a688b2d196070caf8076bc5621eca2649a6f136..c148f511628ac13f0b50faab01f7308538f102a9 100644
|
||||
index e617f46226d9c1c43353db51d6e4764ec8ed66e8..b7c99a725eda84d1c3f7b334633c19be67714363 100644
|
||||
--- a/printing/buildflags/buildflags.gni
|
||||
+++ b/printing/buildflags/buildflags.gni
|
||||
@@ -44,7 +44,7 @@ declare_args() {
|
||||
|
||||
@@ -11,7 +11,7 @@ if we ever align our .pak file generation with Chrome we can remove this
|
||||
patch.
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index 98c9dca792522fd27774d9d22ead61ee546b1832..d255787f554b71cb9034229212f80b0fdd5c73f9 100644
|
||||
index f9e148eb5b5a9a1da534f5db19227e327282eac0..d95ba090ae13b036b694724d95834e5a62a3fff9 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -193,11 +193,16 @@ if (!is_android && !is_mac) {
|
||||
@@ -33,10 +33,10 @@ index 98c9dca792522fd27774d9d22ead61ee546b1832..d255787f554b71cb9034229212f80b0f
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index 09f96b22f60fac75a1d194a6ee40346e3841c5c6..f9f2a0801b4140080142d4116995bee66e157cd7 100644
|
||||
index 6780e7770a9fea5578f923f6e7d4ba9778d39f3e..fa413b9cbcd1290e219784d4c6e9f94125433634 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4571,7 +4571,7 @@ static_library("browser") {
|
||||
@@ -4591,7 +4591,7 @@ static_library("browser") {
|
||||
|
||||
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
|
||||
# than here in :chrome_dll.
|
||||
@@ -46,10 +46,10 @@ index 09f96b22f60fac75a1d194a6ee40346e3841c5c6..f9f2a0801b4140080142d4116995bee6
|
||||
sources += [ "certificate_viewer_stub.cc" ]
|
||||
}
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index 67fb2ff53b6145cee2e310592828d3b6337d5b17..85d6e319598edf1b5b1b80ccb3092154a3b54cb5 100644
|
||||
index d082159704a95fe7c930f0e5c1d038beff34f58c..336de455835baad241262f88c3ca68f1a95f9f57 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -6413,7 +6413,6 @@ test("unit_tests") {
|
||||
@@ -6424,7 +6424,6 @@ test("unit_tests") {
|
||||
|
||||
deps += [
|
||||
"//chrome:other_version",
|
||||
@@ -57,7 +57,7 @@ index 67fb2ff53b6145cee2e310592828d3b6337d5b17..85d6e319598edf1b5b1b80ccb3092154
|
||||
"//chrome//services/util_win:unit_tests",
|
||||
"//chrome/app:chrome_dll_resources",
|
||||
"//chrome/app:win_unit_tests",
|
||||
@@ -6439,6 +6438,10 @@ test("unit_tests") {
|
||||
@@ -6450,6 +6449,10 @@ test("unit_tests") {
|
||||
"//ui/resources",
|
||||
]
|
||||
|
||||
@@ -68,7 +68,7 @@ index 67fb2ff53b6145cee2e310592828d3b6337d5b17..85d6e319598edf1b5b1b80ccb3092154
|
||||
ldflags = [
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-error-l1-1-0.dll",
|
||||
"/DELAYLOAD:api-ms-win-core-winrt-l1-1-0.dll",
|
||||
@@ -7364,7 +7367,6 @@ test("unit_tests") {
|
||||
@@ -7387,7 +7390,6 @@ test("unit_tests") {
|
||||
}
|
||||
|
||||
deps += [
|
||||
@@ -76,7 +76,7 @@ index 67fb2ff53b6145cee2e310592828d3b6337d5b17..85d6e319598edf1b5b1b80ccb3092154
|
||||
"//chrome/browser/apps:icon_standardizer",
|
||||
"//chrome/browser/apps/app_service",
|
||||
"//chrome/browser/apps/app_service:test_support",
|
||||
@@ -7443,6 +7445,10 @@ test("unit_tests") {
|
||||
@@ -7468,6 +7470,10 @@ test("unit_tests") {
|
||||
"//ui/webui/resources/js/browser_command:mojo_bindings",
|
||||
]
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: build: only use the mas build config in the required components
|
||||
Before landing this patch should be split into the relevant MAS patches, or at least the patch this one partially reverts
|
||||
|
||||
diff --git a/base/BUILD.gn b/base/BUILD.gn
|
||||
index 38103227e6036efec56424223d7ca1b3aceb8a89..9dd0e0f1a0ed794cf3cff2af78c97511935d5b81 100644
|
||||
index 425cb0ab0af169222d29794310167557dbbc8da2..2cec28651ee9e0a70ddf5a785f2259abedbb7f52 100644
|
||||
--- a/base/BUILD.gn
|
||||
+++ b/base/BUILD.gn
|
||||
@@ -1032,6 +1032,7 @@ component("base") {
|
||||
@@ -55,10 +55,10 @@ index 0625f07f317de46af619fdb279be78d9ecdc0029..5897820839d6d57ada22a83fe753e3a6
|
||||
"alert.h",
|
||||
"alert.mm",
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 8c8c29706ebec0be7ca25d63fc5e8af4a212e8bc..66fd728dc1ec5079a8d227f4e88d0d38b9ada5a1 100644
|
||||
index 06e4c47bd5f37c041d93808cf712e9eb028ff1b2..5b0a12d8b69c0b79fefcb9194e0f3fb88c4c7051 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -320,6 +320,7 @@ viz_component("service") {
|
||||
@@ -322,6 +322,7 @@ viz_component("service") {
|
||||
|
||||
frameworks += [ "CoreGraphics.framework" ]
|
||||
}
|
||||
@@ -66,7 +66,7 @@ index 8c8c29706ebec0be7ca25d63fc5e8af4a212e8bc..66fd728dc1ec5079a8d227f4e88d0d38
|
||||
}
|
||||
|
||||
if (is_android || use_ozone) {
|
||||
@@ -574,6 +575,8 @@ viz_source_set("unit_tests") {
|
||||
@@ -576,6 +577,8 @@ viz_source_set("unit_tests") {
|
||||
"display_embedder/software_output_device_mac_unittest.mm",
|
||||
]
|
||||
frameworks = [ "IOSurface.framework" ]
|
||||
@@ -76,7 +76,7 @@ index 8c8c29706ebec0be7ca25d63fc5e8af4a212e8bc..66fd728dc1ec5079a8d227f4e88d0d38
|
||||
|
||||
if (is_win) {
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index fce93ca350d0fa6235f740a8c8ca67b2943a1a30..231b38fba003ad36a4914d615105bd35e8c45b0f 100644
|
||||
index ab9889dc4d631df1ddc61565eb0fe35c06e45b72..416b801add9b122a0c8d9747bf46f0096cf70464 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -56,6 +56,7 @@ source_set("browser") {
|
||||
@@ -88,10 +88,10 @@ index fce93ca350d0fa6235f740a8c8ca67b2943a1a30..231b38fba003ad36a4914d615105bd35
|
||||
libs = []
|
||||
frameworks = []
|
||||
diff --git a/content/common/BUILD.gn b/content/common/BUILD.gn
|
||||
index a92d1339b0ec7980dc9b73dcbad834c3ffca8211..5a07df3e8a31f6d5bfc5d27bf804517fb27239b2 100644
|
||||
index 90e39f11ef8d0755a1d9823a7783cd7124819e91..53994eaa27dbcf7b4ee9d60056db737cd2db6fd7 100644
|
||||
--- a/content/common/BUILD.gn
|
||||
+++ b/content/common/BUILD.gn
|
||||
@@ -170,6 +170,7 @@ source_set("common") {
|
||||
@@ -171,6 +171,7 @@ source_set("common") {
|
||||
"//content:content_implementation",
|
||||
"//build/config:precompiled_headers",
|
||||
]
|
||||
@@ -100,7 +100,7 @@ index a92d1339b0ec7980dc9b73dcbad834c3ffca8211..5a07df3e8a31f6d5bfc5d27bf804517f
|
||||
public_deps = [
|
||||
":mojo_bindings",
|
||||
diff --git a/content/renderer/BUILD.gn b/content/renderer/BUILD.gn
|
||||
index 3ec54c242fb920a53fcaa6d8040f2ec88c2727df..27dee1596183d2ead5290a60c08e47e69e905d21 100644
|
||||
index 487c06de8be47be8508ef01dd84e444c2cea95ce..c6825189ba5f75f54e6cdbae9a1e9439f361079c 100644
|
||||
--- a/content/renderer/BUILD.gn
|
||||
+++ b/content/renderer/BUILD.gn
|
||||
@@ -224,6 +224,7 @@ target(link_target_type, "renderer") {
|
||||
@@ -124,10 +124,10 @@ index 642afd72cc0f98fe2590cef0c470f378eabb939e..894769a5de698767117339cab0fc2942
|
||||
|
||||
if (is_mac) {
|
||||
diff --git a/gpu/ipc/service/BUILD.gn b/gpu/ipc/service/BUILD.gn
|
||||
index 89e0e91bb24cb1b92abb8670f56328499c0669e0..6b6dd9c74011c1acafb931842d6675ff65e17bd9 100644
|
||||
index f52c3b6c8daa545baf92eccb6aff4f9afad27632..18ba76df48107403b4996245f3b581edf0269aa7 100644
|
||||
--- a/gpu/ipc/service/BUILD.gn
|
||||
+++ b/gpu/ipc/service/BUILD.gn
|
||||
@@ -119,6 +119,7 @@ component("service") {
|
||||
@@ -123,6 +123,7 @@ component("service") {
|
||||
"QuartzCore.framework",
|
||||
]
|
||||
defines += [ "GL_SILENCE_DEPRECATION" ]
|
||||
@@ -189,7 +189,7 @@ index 5e9fc18352d1bf0939f8366d2282b49aeb307994..69dcc2cafa27b3d8bdf3fe8d0a22a980
|
||||
|
||||
source_set("sandbox_unittests") {
|
||||
diff --git a/third_party/blink/renderer/core/BUILD.gn b/third_party/blink/renderer/core/BUILD.gn
|
||||
index 94aece314a1ba9418f1e5a3e015088a3395500d4..239527d1aebefa2496a5d3fe2afa2ab1e8c63bed 100644
|
||||
index cf57dd886874729872f949a08997e454bddaba3c..7a9d82150349219aae672cd22ae26bcaef3b332d 100644
|
||||
--- a/third_party/blink/renderer/core/BUILD.gn
|
||||
+++ b/third_party/blink/renderer/core/BUILD.gn
|
||||
@@ -304,6 +304,7 @@ component("core") {
|
||||
@@ -226,10 +226,10 @@ index ebc2470893838ec41ac1bf536c5a6db304bfa7cb..4a2082c2fed4e220cb8cbc2c803f682c
|
||||
|
||||
if (use_atk) {
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index 4f41808bcabe9c1f4277d877d597b4f0c43030f9..69f412ed84d6b4134961c91e5056ed42b678f5ed 100644
|
||||
index 4beabe5a2daf781521af70be6c5132c64848c9b7..4b69d53ac4a2ae6578ac3688c63d8d1a06a9357d 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -343,6 +343,7 @@ component("base") {
|
||||
@@ -341,6 +341,7 @@ component("base") {
|
||||
"l10n/l10n_util_mac.mm",
|
||||
"resource/resource_bundle_mac.mm",
|
||||
]
|
||||
@@ -265,7 +265,7 @@ index 34a269ee4d47a2597fd098bc9eabe10685f4fc86..8a96f5abc4e0092bca15dbf6e5098a64
|
||||
if (is_win) {
|
||||
sources += [
|
||||
diff --git a/ui/views/BUILD.gn b/ui/views/BUILD.gn
|
||||
index 444ceb361b871a6db4c37a0dc548a3210b248d2d..f18c6542a198e2acc3c39decccb3107d760de71c 100644
|
||||
index 11515d6de3e8b017f03f4d6665f1e57b1f6dceb3..6b5c3d3a9f6cab7dcc97830f2e76c93b3ed79d8d 100644
|
||||
--- a/ui/views/BUILD.gn
|
||||
+++ b/ui/views/BUILD.gn
|
||||
@@ -675,6 +675,7 @@ component("views") {
|
||||
|
||||
@@ -9,10 +9,10 @@ potentially prevent a window from being created.
|
||||
TODO(loc): this patch is currently broken.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index 8accd729b4f39c738b722d36bc0bbe769e598cba..2937f35372bafd9158be712f04d2731bb4100f9a 100644
|
||||
index 3fed38a2433b4a65f57673037c7402b69aeed429..6b3b52e10c02373e0a87d05eec1d7a143e826864 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -7711,6 +7711,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -7758,6 +7758,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
last_committed_origin_, params->window_container_type,
|
||||
params->target_url, params->referrer.To<Referrer>(),
|
||||
params->frame_name, params->disposition, *params->features,
|
||||
@@ -21,10 +21,10 @@ index 8accd729b4f39c738b722d36bc0bbe769e598cba..2937f35372bafd9158be712f04d2731b
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index bd4a6817ae9b60338219dcffd6c0c7d2fbd4bf97..bc9e24f2346a0d3e494502fedaaa0b24e82fc494 100644
|
||||
index e4f917be1206411bada8e4677497a95668c64c95..afdf6c98157797bfbbabd381daa42ad22d7a63d0 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4160,6 +4160,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4161,6 +4161,12 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
auto* new_contents_impl = new_contents.get();
|
||||
|
||||
@@ -37,7 +37,7 @@ index bd4a6817ae9b60338219dcffd6c0c7d2fbd4bf97..bc9e24f2346a0d3e494502fedaaa0b24
|
||||
// If the new frame has a name, make sure any SiteInstances that can find
|
||||
// this named frame have proxies for it. Must be called after
|
||||
// SetSessionStorageNamespace, since this calls CreateRenderView, which uses
|
||||
@@ -4201,12 +4207,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4202,12 +4208,6 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -66,10 +66,10 @@ index 12f4a2066a2a31e9852216c0cb3344095c7b0e39..588ca46227c58f9596317d6d4d05d0b3
|
||||
|
||||
// Operation result when the renderer asks the browser to create a new window.
|
||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
||||
index abc759cc548276accc0869b67c55d1078cf4c097..36e70e69615a4463afdb7b069b60f20d010dfb27 100644
|
||||
index f9c88663946a9f04f7b4fbb5d2101e3f7022acc5..334b7c767ef2e7fbbee40b0a21f8f47372473b18 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -631,6 +631,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -654,6 +654,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -79,10 +79,10 @@ index abc759cc548276accc0869b67c55d1078cf4c097..36e70e69615a4463afdb7b069b60f20d
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) {
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index 6fc121fb5f3a418763df5042619f89cae0551a00..d89b97d141c66696caa5535b03f4da994fd28210 100644
|
||||
index a60c4455d1d7d5240be6d676f97b595e07bc8986..b9438a454757e3368ca194cefedb40a266f71131 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -165,6 +165,7 @@ class NetworkService;
|
||||
@@ -166,6 +166,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
@@ -90,7 +90,7 @@ index 6fc121fb5f3a418763df5042619f89cae0551a00..d89b97d141c66696caa5535b03f4da99
|
||||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -1032,6 +1033,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -1062,6 +1063,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -148,10 +148,10 @@ index 5da6f93293bc5ddae88c17ac2dd8d7037ba8e8f3..76d699790fb7d92587293b14332f696d
|
||||
// typically happens when popups are created.
|
||||
virtual void WebContentsCreated(WebContents* source_contents,
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 3257ffeafbc86eb728e58498a2c2283eabf305f3..456304cef9e3a8063b112b3f4cfabc25d9d479d4 100644
|
||||
index c921467ec58895143efc7ba11661f5a529e14ad6..026a6934997f0825c3f2c0a40551ce7784a7b828 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -6317,6 +6317,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
@@ -6314,6 +6314,10 @@ WebView* RenderFrameImpl::CreateNewWindow(
|
||||
blink::GetNavigationInitiatorActivationAndAdStatus(
|
||||
request.HasUserGesture(), GetWebFrame()->IsAdScriptInStack());
|
||||
|
||||
@@ -189,28 +189,28 @@ index 22254206063abe36739e1c0e7c065223ab6807d2..7f5d89f8dc8b46ac1338e73b03948725
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access) override;
|
||||
diff --git a/third_party/blink/public/web/web_window_features.h b/third_party/blink/public/web/web_window_features.h
|
||||
index 4156256596276015ca3205b0f49f69d1ab47208e..271bc153afe3e3bfa98a7baa6ae4f92285d41929 100644
|
||||
index bef5a989bac50c177f15f52fe87ac3790d553e85..65dcd2e3b51929400c8bfb6a98a4fb59bb6a3d6b 100644
|
||||
--- a/third_party/blink/public/web/web_window_features.h
|
||||
+++ b/third_party/blink/public/web/web_window_features.h
|
||||
@@ -32,6 +32,7 @@
|
||||
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_WINDOW_FEATURES_H_
|
||||
|
||||
@@ -34,6 +34,7 @@
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
#include "third_party/blink/public/platform/web_string.h"
|
||||
#include "third_party/blink/public/platform/web_vector.h"
|
||||
+#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
|
||||
|
||||
namespace blink {
|
||||
|
||||
@@ -68,6 +69,8 @@ struct WebWindowFeatures {
|
||||
// request should be made. Otherwise, an impression should be set and a
|
||||
// background request should be made to the contained relative URL.
|
||||
WebString attribution_src;
|
||||
@@ -73,6 +74,8 @@ struct WebWindowFeatures {
|
||||
// TODO(apaseltiner): Investigate moving this field to a non-public struct
|
||||
// since it is only needed within //third_party/blink.
|
||||
absl::optional<WebVector<WebString>> attribution_srcs;
|
||||
+
|
||||
+ String raw_features;
|
||||
};
|
||||
|
||||
} // 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 1b718368110b62bd3581985a70a441a2d2674056..d38dc86c8368a923a347889b35a00539ae42c50f 100644
|
||||
index 83a6e6015d0b974dc038133948e6f436c0c8ba72..e9a85e5b1ae2d7a0d4ccb7e17792431e27ce21fe 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -2219,6 +2219,8 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: chore: add electron deps to gitignores
|
||||
Makes things like "git status" quicker when developing electron locally
|
||||
|
||||
diff --git a/.gitignore b/.gitignore
|
||||
index f39533c8951d81fba73910a89b5cf2de9bd34a02..00756eb8a32aec3bc109db9aa1b370ab9f0b1d26 100644
|
||||
index 775a2ccf4c36d647658a5c35b5161f43eeb3fb00..ee92b06a8a0dc5adbf22d714a20b66efdad0d7ab 100644
|
||||
--- a/.gitignore
|
||||
+++ b/.gitignore
|
||||
@@ -238,6 +238,7 @@ vs-chromium-project.txt
|
||||
@@ -239,6 +239,7 @@ vs-chromium-project.txt
|
||||
/delegate_execute
|
||||
/device/serial/device_serial_mojo.xml
|
||||
/docs/website
|
||||
|
||||
@@ -7,10 +7,10 @@ With WCO, allow chromium to handle synthetic mouse events generated for touch
|
||||
actions in the non-client caption area.
|
||||
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index b2e8e4127d73d1c8f0f3698fe9c7f37a03868c06..79e00fd9f83dc6cb4114ceac53ea025dcb7595b7 100644
|
||||
index 06fd4d3962b8aa0767d295deeba2e949e7cd856c..61673ac08ca19816dc01c89b6687f5b2a7c289e2 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -1209,6 +1209,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
|
||||
@@ -1215,6 +1215,10 @@ void DesktopWindowTreeHostWin::HandleHeadlessWindowBoundsChanged(
|
||||
window()->SetProperty(aura::client::kHeadlessBoundsKey, bounds);
|
||||
}
|
||||
|
||||
@@ -22,10 +22,10 @@ index b2e8e4127d73d1c8f0f3698fe9c7f37a03868c06..79e00fd9f83dc6cb4114ceac53ea025d
|
||||
DesktopWindowTreeHostWin::GetSingletonDesktopNativeCursorManager() {
|
||||
return new DesktopNativeCursorManagerWin();
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
index 2b935ac09209c1b043aa416f886a84dff742826e..04b586a7fd15bc2e85cb62cd6cefe63461a2539e 100644
|
||||
index 2e4bacce52a45b5d9d7829c1f88f82aa0bb1b4bb..f3537e89191bd2c6d9b06c9b741a168071eb8662 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.h
|
||||
@@ -259,6 +259,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
||||
@@ -261,6 +261,7 @@ class VIEWS_EXPORT DesktopWindowTreeHostWin
|
||||
void HandleWindowSizeUnchanged() override;
|
||||
void HandleWindowScaleFactorChanged(float window_scale_factor) override;
|
||||
void HandleHeadlessWindowBoundsChanged(const gfx::Rect& bounds) override;
|
||||
@@ -34,10 +34,10 @@ index 2b935ac09209c1b043aa416f886a84dff742826e..04b586a7fd15bc2e85cb62cd6cefe634
|
||||
Widget* GetWidget();
|
||||
const Widget* GetWidget() const;
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 071137f6fa403108328e5f42aa47c4c0de0d8ed3..7c5f6f5b6d981df6dfd2dbac9e409b4c5a378a2b 100644
|
||||
index 81d3612a4d0a56c0e3fdc57a3e1718984014f7bc..6b7366dfd43ca13587f0fc430eb1b11f2ed0436a 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3209,15 +3209,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
@@ -3225,15 +3225,19 @@ LRESULT HWNDMessageHandler::HandleMouseEventInternal(UINT message,
|
||||
SetMsgHandled(FALSE);
|
||||
// We must let Windows handle the caption buttons if it's drawing them, or
|
||||
// they won't work.
|
||||
|
||||
@@ -52,10 +52,10 @@ index a3add3e3811f5f31d615800b1852f56afde63edc..2f3132e450f883460e0325c4a0bb91f0
|
||||
/*from_user_gesture=*/true);
|
||||
return true;
|
||||
diff --git a/chrome/browser/ui/ash/ash_web_view_impl.h b/chrome/browser/ui/ash/ash_web_view_impl.h
|
||||
index 1af9377f917f4659149698593dbe85d98ed3409e..52771e9703663e60ed8ac77fff5abf9c85e21f4f 100644
|
||||
index 68fec72b3b97a18563fade50dd129eba49a86bb6..d3d4af06542c73c61cf8b8ee510a0345ba666739 100644
|
||||
--- a/chrome/browser/ui/ash/ash_web_view_impl.h
|
||||
+++ b/chrome/browser/ui/ash/ash_web_view_impl.h
|
||||
@@ -48,8 +48,7 @@ class AshWebViewImpl : public ash::AshWebView,
|
||||
@@ -49,8 +49,7 @@ class AshWebViewImpl : public ash::AshWebView,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -80,7 +80,7 @@ index aaaa61d5c3a1d5ade2fd355e38a3985ef5cc4e7d..b45746ba0f38a381a2ee5ca17f3a1685
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index 996be105cbe5c85d9b350ff4c5042ef8efad84f5..cd758cc379fa8c3ea302801298de7dbe19db59a4 100644
|
||||
index 0fcb0295dec5d38c859ca5963238def57167080f..d849ed0609d97dd9282628b37b4239be05e71806 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -1859,12 +1859,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -218,10 +218,10 @@ index 4e32d708ecf4afd3913d86ec1602ef2dc9a60998..1dd2f50fba1387b5eeb554dd540957d7
|
||||
void AddNewContents(content::WebContents* source,
|
||||
std::unique_ptr<content::WebContents> new_contents,
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 28d808417d6c5fd339c0d68cbfad177fa2fda166..fbcc419d13b5d064689d960fab4e85fa7625ea02 100644
|
||||
index bbfe0f02522fdf13898b5b9183d1c9b5a47cfa30..4e32ad1cfa069d3446d8c88bb16c8af631db7a63 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4067,8 +4067,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
@@ -4068,8 +4068,7 @@ FrameTree* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
|
||||
@@ -20,10 +20,10 @@ to deal with color spaces. That is being tracked at
|
||||
https://crbug.com/634542 and https://crbug.com/711107.
|
||||
|
||||
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
|
||||
index ffaf89466d29864bd1bb91565c16303b097e4e5d..56fe848755bc56ddb5b5893476ba82ed185774c0 100644
|
||||
index 16117d0b40245282ed59a8b9c0cebddc3b2e288c..dd03e12e2b2069e426401ec91a3070e0a2dc0de7 100644
|
||||
--- a/cc/trees/layer_tree_host_impl.cc
|
||||
+++ b/cc/trees/layer_tree_host_impl.cc
|
||||
@@ -1915,6 +1915,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
@@ -1919,6 +1919,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
TargetColorParams LayerTreeHostImpl::GetTargetColorParams(
|
||||
gfx::ContentColorUsage content_color_usage) const {
|
||||
TargetColorParams params;
|
||||
@@ -35,7 +35,7 @@ index ffaf89466d29864bd1bb91565c16303b097e4e5d..56fe848755bc56ddb5b5893476ba82ed
|
||||
// If we are likely to software composite the resource, we use sRGB because
|
||||
// software compositing is unable to perform color conversion.
|
||||
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
|
||||
index d67c103a301f6398084f8db8a7d559981f3c669c..ccec09bdde3b107b0260ec9d26f5db20e023ce89 100644
|
||||
index b85b3251a752afc1305108ad370bbe8453e4f789..e24eefabacf2fcdbd15b26e0c696579cca909dd8 100644
|
||||
--- a/cc/trees/layer_tree_settings.h
|
||||
+++ b/cc/trees/layer_tree_settings.h
|
||||
@@ -96,6 +96,8 @@ class CC_EXPORT LayerTreeSettings {
|
||||
@@ -81,10 +81,10 @@ index c7ca2458708dd9577afdaef7fbcafaaa68046904..c4a1f1368ef053830c86cf86c3bec7ce
|
||||
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
|
||||
|
||||
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
||||
index 9e53989c27763d082dabbaee2149206906977d10..7f6698c75db98e0a239a9144c73362f5ec2b38bd 100644
|
||||
index 081cf448574bdf0ab2562e21b2eec0436925dc82..637553eaf6aa77c02ced24bf70da10a86737b33d 100644
|
||||
--- a/content/browser/gpu/gpu_process_host.cc
|
||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||
@@ -227,6 +227,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
@@ -226,6 +226,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
|
||||
// Command-line switches to propagate to the GPU process.
|
||||
static const char* const kSwitchNames[] = {
|
||||
@@ -93,10 +93,10 @@ index 9e53989c27763d082dabbaee2149206906977d10..7f6698c75db98e0a239a9144c73362f5
|
||||
sandbox::policy::switches::kGpuSandboxAllowSysVShm,
|
||||
sandbox::policy::switches::kGpuSandboxFailuresFatal,
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index da1b9e452b349b05c985791847044a33ad04f97a..844a544811b5470ee3ce90105cfc655cfb353b9a 100644
|
||||
index e5ff37adaa1d38e3732457004c63d8c282cb0fd8..197949ebcbb7d1c0f3cd7e3fa3e7623303ebbff1 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -3333,6 +3333,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
@@ -3349,6 +3349,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
// Propagate the following switches to the renderer command line (along
|
||||
// with any associated values) if present in the browser command line.
|
||||
static const char* const kSwitchNames[] = {
|
||||
@@ -148,7 +148,7 @@ index 318005b66e04ed03ce6d44931d9360c0e009cb94..0d622fddb95720141ccf8a285ace4714
|
||||
}
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
index 77624a8b54b6e05da79bd913aa3d25187118090c..0057d51aebaf7530cc91e87fc826dd70c49c1df4 100644
|
||||
index 3ebaee0026affd8a9eb4cf36432cbefc13db8f3b..0a38a4a281b5b90fea38b6a2662ec5da0087f134 100644
|
||||
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -159,7 +159,7 @@ index 77624a8b54b6e05da79bd913aa3d25187118090c..0057d51aebaf7530cc91e87fc826dd70
|
||||
#include "ui/native_theme/native_theme_features.h"
|
||||
#include "ui/native_theme/overlay_scrollbar_constants_aura.h"
|
||||
|
||||
@@ -214,6 +215,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
|
||||
@@ -210,6 +211,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
|
||||
settings.main_frame_before_activation_enabled =
|
||||
cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ at some point be an API to "unfreeze" the flags, or we may be able to refactor
|
||||
node initialization to not update flags after V8 initialization.
|
||||
|
||||
diff --git a/content/renderer/render_process_impl.cc b/content/renderer/render_process_impl.cc
|
||||
index 15928985bed40a7e0a26d9ab09f44f86ed3f3bd6..612616264b1caf097a4d45a4ba09e312b10e7acf 100644
|
||||
index 243f60e292bee821d2842964d88209e6762391bd..d8da9eca25025e28204fe54b037b6a6f543f1bec 100644
|
||||
--- a/content/renderer/render_process_impl.cc
|
||||
+++ b/content/renderer/render_process_impl.cc
|
||||
@@ -228,6 +228,9 @@ RenderProcessImpl::RenderProcessImpl()
|
||||
@@ -221,6 +221,9 @@ RenderProcessImpl::RenderProcessImpl()
|
||||
v8::V8::SetFlagsFromString(kSABPerContextFlag, sizeof(kSABPerContextFlag));
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: disable_hidden.patch
|
||||
Electron uses this to disable background throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index f6c710215f04b6639089c9d19824e3049f909c31..0d66b297f64af9f3bc2d4aab0e7a285fff9507cc 100644
|
||||
index e45129c031d9cecd8838483ea6ba23436d59bab3..347b8d89a2ecaa6baa4779f650b8af49a6d6d118 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -800,6 +800,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -20,10 +20,10 @@ index f6c710215f04b6639089c9d19824e3049f909c31..0d66b297f64af9f3bc2d4aab0e7a285f
|
||||
blink::mojom::PointerLockResult::kWrongDocument);
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
index dd25d63edc8e2cd0d9701da73fe485418bfde1b4..f4fbc63cb38deb7b4904ea58491052ede2c83ada 100644
|
||||
index d93a3647c1150b763a954c9f8d53e5b6d57ee9bc..f09757ba35d07d117cae7ca4b6842189cdbc219b 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -896,6 +896,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -900,6 +900,8 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
void UpdateBrowserControlsState(cc::BrowserControlsState constraints,
|
||||
cc::BrowserControlsState current,
|
||||
bool animate);
|
||||
|
||||
@@ -6,26 +6,26 @@ Subject: feat: enable setting aspect ratio to 0
|
||||
Make SetAspectRatio accept 0 as valid input, which would reset to null.
|
||||
|
||||
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
index d52fc15106eb3a834f1008846df6cb954db17250..b2e8e4127d73d1c8f0f3698fe9c7f37a03868c06 100644
|
||||
index 3d22d934c39f50760d1c519d665ddc3cb1908541..06fd4d3962b8aa0767d295deeba2e949e7cd856c 100644
|
||||
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
|
||||
@@ -564,7 +564,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
}
|
||||
|
||||
void DesktopWindowTreeHostWin::SetAspectRatio(const gfx::SizeF& aspect_ratio) {
|
||||
@@ -570,7 +570,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
|
||||
void DesktopWindowTreeHostWin::SetAspectRatio(
|
||||
const gfx::SizeF& aspect_ratio,
|
||||
const gfx::Size& excluded_margin) {
|
||||
- DCHECK(!aspect_ratio.IsEmpty());
|
||||
+ DCHECK_NE(aspect_ratio.height(), 0);
|
||||
message_handler_->SetAspectRatio(aspect_ratio.width() /
|
||||
aspect_ratio.height());
|
||||
message_handler_->SetAspectRatio(aspect_ratio.width() / aspect_ratio.height(),
|
||||
excluded_margin);
|
||||
}
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 5603bd95d19197ca28a25a6539b0b18a240ef73a..a9c8acdea0b2507f4f98f31c5265650a1cf6bc54 100644
|
||||
index bde6bc5a8a3ade015909c31f8c238d287c54ece9..1bb4dcca04b57c2dab18c23c358f59c1f7c5abf1 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -1123,8 +1123,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
|
||||
}
|
||||
@@ -1135,8 +1135,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen,
|
||||
|
||||
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) {
|
||||
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio,
|
||||
const gfx::Size& excluded_margin) {
|
||||
- // If the aspect ratio is not in the valid range, do nothing.
|
||||
- DCHECK_GT(aspect_ratio, 0.0f);
|
||||
+ // If the aspect ratio is 0, reset it to null.
|
||||
|
||||
@@ -33,7 +33,7 @@ index 0ab8187b0db8ae6db46d81738f653a2bc4c566f6..de3d55e85c22317f7f9375eb94d0d5d4
|
||||
|
||||
} // namespace net
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index 3c8c72eca43b5842a17f502d3b705c27f9c78ec3..8516117fb0da14f128e3fd9cf64e2dba65a0417a 100644
|
||||
index 6ed06ffa2119753748ac4b7c5705c1229825f3e6..0f31bafe0f56edce4d695058a94d721a2e92acd1 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1461,6 +1461,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -63,10 +63,10 @@ index 574434c94e0ee145c9a86566baa04d1c054b0dff..5a15c65967b73e54ea742c4f44ee40dd
|
||||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 8d8899d941050868c80642d6589e4e3bc48462c7..411282b43eaee28d4091510777c83897e0e844fc 100644
|
||||
index 810a23b388b4c9fd02569f506ff884825cd7bb09..3c75a8146a8ca321c49b715b46f211a207408aa6 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1119,6 +1119,9 @@ interface NetworkContext {
|
||||
@@ -1131,6 +1131,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass
|
||||
then refers to the list so that it can correctly determine the data source's settings.
|
||||
|
||||
diff --git a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
|
||||
index f1b47787d5296e8bdc3090840573270fff1f344e..ac114e77a335b0f66670be88873c071e18f4726f 100644
|
||||
index 2b5c5f059159865cb84a7efcefe47cd788d5f5ee..1627649fb5085c637cde556074b242c4939c81de 100644
|
||||
--- a/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
|
||||
+++ b/third_party/blink/renderer/platform/media/multi_buffer_data_source.cc
|
||||
@@ -11,8 +11,10 @@
|
||||
|
||||
@@ -183,10 +183,10 @@ index 4d4c17b8fe687e01f7403335c88453998259d647..22c1e5fd0c6f16a101b2578675704f18
|
||||
host->GetChildProcess()->BindServiceInterface(std::move(receiver));
|
||||
}
|
||||
diff --git a/content/browser/utility_process_host.cc b/content/browser/utility_process_host.cc
|
||||
index d2bd22ce6875e7cf160a8699b8d888c564b3ef89..46cfc20f31a2b13fe5cb9dfa7eae62fd74bbc096 100644
|
||||
index 475614df3115ac27fafa4cf23f65be8e794e9f90..d3a5fd8531754c07aa1fa7e175d4a650cbbeb885 100644
|
||||
--- a/content/browser/utility_process_host.cc
|
||||
+++ b/content/browser/utility_process_host.cc
|
||||
@@ -146,11 +146,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
|
||||
@@ -156,11 +156,13 @@ const ChildProcessData& UtilityProcessHost::GetData() {
|
||||
return process_->GetData();
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@ index d2bd22ce6875e7cf160a8699b8d888c564b3ef89..46cfc20f31a2b13fe5cb9dfa7eae62fd
|
||||
|
||||
bool UtilityProcessHost::Start() {
|
||||
return StartProcess();
|
||||
@@ -206,6 +208,24 @@ void UtilityProcessHost::SetZygoteForTesting(ZygoteCommunication* handle) {
|
||||
@@ -216,6 +218,24 @@ void UtilityProcessHost::SetZygoteForTesting(ZygoteCommunication* handle) {
|
||||
}
|
||||
#endif // BUILDFLAG(USE_ZYGOTE)
|
||||
|
||||
@@ -227,7 +227,7 @@ index d2bd22ce6875e7cf160a8699b8d888c564b3ef89..46cfc20f31a2b13fe5cb9dfa7eae62fd
|
||||
mojom::ChildProcess* UtilityProcessHost::GetChildProcess() {
|
||||
return static_cast<ChildProcessHostImpl*>(process_->GetHost())
|
||||
->child_process();
|
||||
@@ -410,9 +430,22 @@ bool UtilityProcessHost::StartProcess() {
|
||||
@@ -431,9 +451,22 @@ bool UtilityProcessHost::StartProcess() {
|
||||
}
|
||||
#endif // BUILDFLAG(IS_LINUX)
|
||||
|
||||
@@ -252,7 +252,7 @@ index d2bd22ce6875e7cf160a8699b8d888c564b3ef89..46cfc20f31a2b13fe5cb9dfa7eae62fd
|
||||
#if BUILDFLAG(USE_ZYGOTE)
|
||||
if (zygote_for_testing_.has_value()) {
|
||||
diff --git a/content/browser/utility_process_host.h b/content/browser/utility_process_host.h
|
||||
index 64ca6bc6657572bc4f878391ed9528704ce579af..095971ae67ce51f80d24f73fe69d7515a7027ea8 100644
|
||||
index 65e59b1cbf33c065a500b7d304ed6618d0a24808..e3b1aa7963b4ab9daafdd3340ecfaee07d93f8ea 100644
|
||||
--- a/content/browser/utility_process_host.h
|
||||
+++ b/content/browser/utility_process_host.h
|
||||
@@ -35,6 +35,10 @@
|
||||
@@ -266,7 +266,7 @@ index 64ca6bc6657572bc4f878391ed9528704ce579af..095971ae67ce51f80d24f73fe69d7515
|
||||
namespace base {
|
||||
class Thread;
|
||||
} // namespace base
|
||||
@@ -98,9 +102,13 @@ class CONTENT_EXPORT UtilityProcessHost
|
||||
@@ -104,9 +108,13 @@ class CONTENT_EXPORT UtilityProcessHost
|
||||
|
||||
// Returns information about the utility child process.
|
||||
const ChildProcessData& GetData();
|
||||
@@ -282,7 +282,7 @@ index 64ca6bc6657572bc4f878391ed9528704ce579af..095971ae67ce51f80d24f73fe69d7515
|
||||
|
||||
// Starts the utility process.
|
||||
bool Start();
|
||||
@@ -140,6 +148,16 @@ class CONTENT_EXPORT UtilityProcessHost
|
||||
@@ -146,6 +154,16 @@ class CONTENT_EXPORT UtilityProcessHost
|
||||
void SetZygoteForTesting(ZygoteCommunication* handle);
|
||||
#endif // BUILDFLAG(USE_ZYGOTE)
|
||||
|
||||
@@ -299,7 +299,7 @@ index 64ca6bc6657572bc4f878391ed9528704ce579af..095971ae67ce51f80d24f73fe69d7515
|
||||
// Returns a control interface for the running child process.
|
||||
mojom::ChildProcess* GetChildProcess();
|
||||
|
||||
@@ -188,6 +206,22 @@ class CONTENT_EXPORT UtilityProcessHost
|
||||
@@ -194,6 +212,22 @@ class CONTENT_EXPORT UtilityProcessHost
|
||||
absl::optional<raw_ptr<ZygoteCommunication>> zygote_for_testing_;
|
||||
#endif // BUILDFLAG(USE_ZYGOTE)
|
||||
|
||||
|
||||
@@ -87,11 +87,11 @@ index 8af69cac78b7488d28f1f05ccb174793fe5148cd..9f74e511c263d147b5fbe81fe100d217
|
||||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 96fe556f6046ca86b9ddc488fd25a2c641299768..8c8c29706ebec0be7ca25d63fc5e8af4a212e8bc 100644
|
||||
index f2fe76f53dac7380cbd5d3d42a630efbb55af173..06e4c47bd5f37c041d93808cf712e9eb028ff1b2 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -137,6 +137,8 @@ viz_component("service") {
|
||||
"display_embedder/skia_output_surface_impl_on_gpu.h",
|
||||
@@ -139,6 +139,8 @@ viz_component("service") {
|
||||
"display_embedder/skia_output_surface_impl_on_gpu_debug_capture.h",
|
||||
"display_embedder/skia_render_copy_results.cc",
|
||||
"display_embedder/skia_render_copy_results.h",
|
||||
+ "display_embedder/software_output_device_proxy.cc",
|
||||
@@ -513,7 +513,7 @@ index d4d4c1444e7a169d154bb9062f09f2270e7e9734..01943e14de567afd7b14f6a92eec651d
|
||||
waiting_on_draw_ack_ = true;
|
||||
|
||||
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
index 01109192627543a27140e311d718b0317be8ee54..63597d58cf6b43ae9769ab0b8cf7d480c756f2b2 100644
|
||||
index 33a2a735633ab75b69345e7df9bf263ef6cc1743..055b0a2df07954b8e28f2a6f36b446339ae9ef9f 100644
|
||||
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
|
||||
@@ -90,7 +90,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
|
||||
@@ -37,10 +37,10 @@ index 6d42ae691a2c4a8cf51501bc4c690aca328001f5..71ac9d67eaa87346e7348e63d10157fb
|
||||
allow_cookies_from_browser == other.allow_cookies_from_browser &&
|
||||
client_security_state == other.client_security_state;
|
||||
diff --git a/services/network/public/cpp/resource_request.h b/services/network/public/cpp/resource_request.h
|
||||
index a39040c92d48394af20c1249215f6e02a51c0b76..0f6626c0ec3837c5e6095402211880fc4dac977f 100644
|
||||
index 97bc15e4dbd30364a3ea9d2cc2961d8e0dce2473..c84bc3991722a252c03ebc61451cf8933e55e6f9 100644
|
||||
--- a/services/network/public/cpp/resource_request.h
|
||||
+++ b/services/network/public/cpp/resource_request.h
|
||||
@@ -64,6 +64,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
|
||||
@@ -65,6 +65,7 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE) ResourceRequest {
|
||||
bool disable_secure_dns = false;
|
||||
bool has_user_activation = false;
|
||||
bool allow_cookies_from_browser = false;
|
||||
@@ -49,7 +49,7 @@ index a39040c92d48394af20c1249215f6e02a51c0b76..0f6626c0ec3837c5e6095402211880fc
|
||||
mojo::PendingRemote<mojom::TrustTokenAccessObserver> trust_token_observer;
|
||||
mojo::PendingRemote<mojom::URLLoaderNetworkServiceObserver>
|
||||
diff --git a/services/network/public/cpp/url_request_mojom_traits.cc b/services/network/public/cpp/url_request_mojom_traits.cc
|
||||
index 9b65526dee306bfc6f661cc97ca2d4c2f8618606..811b39b995d4270c8a4e94f18174585da4107e7d 100644
|
||||
index e716df9998d8ec8125c7c5ceb46a0abfcd8a1538..780ffaae2f608f7e153a62adf4e61fad42d01888 100644
|
||||
--- a/services/network/public/cpp/url_request_mojom_traits.cc
|
||||
+++ b/services/network/public/cpp/url_request_mojom_traits.cc
|
||||
@@ -90,6 +90,7 @@ bool StructTraits<network::mojom::TrustedUrlRequestParamsDataView,
|
||||
@@ -61,10 +61,10 @@ index 9b65526dee306bfc6f661cc97ca2d4c2f8618606..811b39b995d4270c8a4e94f18174585d
|
||||
mojo::PendingRemote<network::mojom::CookieAccessObserver>>();
|
||||
out->trust_token_observer = data.TakeTrustTokenObserver<
|
||||
diff --git a/services/network/public/cpp/url_request_mojom_traits.h b/services/network/public/cpp/url_request_mojom_traits.h
|
||||
index e50408e66ccd30e0c9bef2f5f39515ae31face64..df08da0cce3ed564655d617b9ffce484a6518525 100644
|
||||
index fc841300bd332d240ff73dfb2991151dbc853110..4b6f6df75b42bc167da145c4e95310a10e4c91ef 100644
|
||||
--- a/services/network/public/cpp/url_request_mojom_traits.h
|
||||
+++ b/services/network/public/cpp/url_request_mojom_traits.h
|
||||
@@ -70,6 +70,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
|
||||
@@ -71,6 +71,10 @@ struct COMPONENT_EXPORT(NETWORK_CPP_BASE)
|
||||
const network::ResourceRequest::TrustedParams& trusted_params) {
|
||||
return trusted_params.allow_cookies_from_browser;
|
||||
}
|
||||
@@ -76,10 +76,10 @@ index e50408e66ccd30e0c9bef2f5f39515ae31face64..df08da0cce3ed564655d617b9ffce484
|
||||
cookie_observer(
|
||||
const network::ResourceRequest::TrustedParams& trusted_params) {
|
||||
diff --git a/services/network/public/mojom/url_request.mojom b/services/network/public/mojom/url_request.mojom
|
||||
index be8d6d82f56fb2841b5e2a084c8320531db16a66..3c10936738c5f487b5a40690fc34e2734b01d5f1 100644
|
||||
index 515e4b9d26b26e23d41a43e601c667c765b0dff1..d3f1d984e663121b97a9129b576142963ad72612 100644
|
||||
--- a/services/network/public/mojom/url_request.mojom
|
||||
+++ b/services/network/public/mojom/url_request.mojom
|
||||
@@ -71,6 +71,9 @@ struct TrustedUrlRequestParams {
|
||||
@@ -72,6 +72,9 @@ struct TrustedUrlRequestParams {
|
||||
// FollowRedirect().
|
||||
bool allow_cookies_from_browser;
|
||||
|
||||
@@ -112,7 +112,7 @@ index f232e84621137b4deb4846628e932508d6cf0d1e..415181034418faa4d718fb8748971b4e
|
||||
string mime_type;
|
||||
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index f2fa6521ac3f2a413c7db2cdad6b5a976e9d6133..04ef118f9b3930935a92c23c0bdfb0d015ee8434 100644
|
||||
index 61e5014a219b2077691d826159dbb473aeee62bc..28b51564dec0e39742972f992f9f84337349a207 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -642,6 +642,7 @@ URLLoader::URLLoader(
|
||||
@@ -123,7 +123,7 @@ index f2fa6521ac3f2a413c7db2cdad6b5a976e9d6133..04ef118f9b3930935a92c23c0bdfb0d0
|
||||
}
|
||||
|
||||
// Store any cookies passed from the browser process to later attach them to
|
||||
@@ -715,7 +716,7 @@ URLLoader::URLLoader(
|
||||
@@ -717,7 +718,7 @@ URLLoader::URLLoader(
|
||||
url_request_->SetRequestHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawRequestHeadersAndNotify, base::Unretained(this)));
|
||||
|
||||
@@ -132,7 +132,7 @@ index f2fa6521ac3f2a413c7db2cdad6b5a976e9d6133..04ef118f9b3930935a92c23c0bdfb0d0
|
||||
url_request_->SetResponseHeadersCallback(base::BindRepeating(
|
||||
&URLLoader::SetRawResponseHeaders, base::Unretained(this)));
|
||||
}
|
||||
@@ -1610,6 +1611,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
@@ -1612,6 +1613,19 @@ void URLLoader::OnResponseStarted(net::URLRequest* url_request, int net_error) {
|
||||
}
|
||||
|
||||
response_ = BuildResponseHead();
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: fix: allow guest webcontents to enter fullscreen
|
||||
This can be upstreamed, a guest webcontents can't technically become the focused webContents. This DCHECK should allow all guest webContents to request fullscreen entrance.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 1b08ec595adb6285f4c4d51d7d4745686c83a7db..c3996a52a1bc149c77fb81b2e6261a4e3f9fe35e 100644
|
||||
index a08ab949b596768bfff777d47130728ff9054837..be55f859e39fcaf45d0c3000432abb3110b981b3 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3588,7 +3588,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
@@ -3589,7 +3589,7 @@ void WebContentsImpl::EnterFullscreenMode(
|
||||
OPTIONAL_TRACE_EVENT0("content", "WebContentsImpl::EnterFullscreenMode");
|
||||
DCHECK(CanEnterFullscreenMode(requesting_frame, options));
|
||||
DCHECK(requesting_frame->IsActive());
|
||||
|
||||
@@ -11,10 +11,10 @@ enlarge window above dimensions set during creation of the
|
||||
BrowserWindow.
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index a9c8acdea0b2507f4f98f31c5265650a1cf6bc54..071137f6fa403108328e5f42aa47c4c0de0d8ed3 100644
|
||||
index 1bb4dcca04b57c2dab18c23c358f59c1f7c5abf1..81d3612a4d0a56c0e3fdc57a3e1718984014f7bc 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -3784,6 +3784,21 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
|
||||
@@ -3800,14 +3800,29 @@ void HWNDMessageHandler::SizeWindowToAspectRatio(UINT param,
|
||||
delegate_->GetMinMaxSize(&min_window_size, &max_window_size);
|
||||
min_window_size = delegate_->DIPToScreenSize(min_window_size);
|
||||
max_window_size = delegate_->DIPToScreenSize(max_window_size);
|
||||
@@ -36,3 +36,13 @@ index a9c8acdea0b2507f4f98f31c5265650a1cf6bc54..071137f6fa403108328e5f42aa47c4c0
|
||||
|
||||
absl::optional<gfx::Size> max_size_param;
|
||||
if (!max_window_size.IsEmpty())
|
||||
max_size_param = max_window_size;
|
||||
|
||||
- gfx::SizeRectToAspectRatioWithExcludedMargin(
|
||||
+ gfx::SizeRectToAspectRatio(
|
||||
GetWindowResizeEdge(param), aspect_ratio_.value(), min_window_size,
|
||||
- max_size_param, excluded_margin_, *window_rect);
|
||||
+ max_size_param, window_rect);
|
||||
}
|
||||
|
||||
POINT HWNDMessageHandler::GetCursorPos() const {
|
||||
|
||||
@@ -17,10 +17,10 @@ policy->CanCommitOriginAndUrl.
|
||||
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/3856266.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index abdb8e291a7f321404aa70881af2fa60d2ef4db7..8bbc051f468bee65b292c9b75c52cc4f01e02db6 100644
|
||||
index c7cc3b8472d432a3f6f4ffd75ecb20e9f2ddd8f6..d0f07ecdc9fae8d7c38a34ef071b79b97c080e5b 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -7392,10 +7392,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
@@ -7370,10 +7370,11 @@ NavigationRequest::GetOriginForURLLoaderFactoryAfterResponseWithDebugInfo() {
|
||||
if (IsForMhtmlSubframe())
|
||||
return origin_with_debug_info;
|
||||
|
||||
@@ -37,10 +37,10 @@ index abdb8e291a7f321404aa70881af2fa60d2ef4db7..8bbc051f468bee65b292c9b75c52cc4f
|
||||
}
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.h b/content/browser/renderer_host/render_frame_host_impl.h
|
||||
index 40c8eeb812338b3dc9f4f59d7672a9c4340f4305..e56bc9d06b9bef150b8de0dd66bbcc2901d6da2f 100644
|
||||
index f76cb6dcdd90d75f2cb64798efce245c65b3f839..c095093cf0e0883205703050ddd68ebc436f963a 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.h
|
||||
@@ -2904,6 +2904,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
@@ -2911,6 +2911,17 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
// last committed document.
|
||||
CookieChangeListener::CookieChangeInfo GetCookieChangeInfo();
|
||||
|
||||
@@ -58,7 +58,7 @@ index 40c8eeb812338b3dc9f4f59d7672a9c4340f4305..e56bc9d06b9bef150b8de0dd66bbcc29
|
||||
// Sets a ResourceCache in the renderer. `this` must be active and there must
|
||||
// be no pending navigation. `remote` must have the same and process
|
||||
// isolation policy.
|
||||
@@ -3246,17 +3257,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
@@ -3268,17 +3279,6 @@ class CONTENT_EXPORT RenderFrameHostImpl
|
||||
// relevant.
|
||||
void ResetWaitingState();
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta
|
||||
to users. We should try to upstream this.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index b43205b4dea3ab0201085cd4d63c6b3a4fa78238..268aebd9406b3d0e927d2a61df18bfec84a46d5f 100644
|
||||
index 69f9ffbf4826421491118a0b200d6c71e41f8950..c3b7f6fa146ac335b0d18a749a61600cf8241c8d 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -1865,7 +1865,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -1860,7 +1860,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
// IncrementCapturerCount() is destructed.
|
||||
void DecrementCapturerCount(bool stay_hidden,
|
||||
bool stay_awake,
|
||||
|
||||
@@ -45,10 +45,10 @@ index 2ca4e42342ff6bf3f2ad104208944e36d572aa3c..7421cc779873b580d6f5a109d57ff744
|
||||
// RenderFrameMetadataProvider::Observer implementation.
|
||||
void OnRenderFrameMetadataChangedBeforeActivation(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index c3996a52a1bc149c77fb81b2e6261a4e3f9fe35e..7eaa359b9b60a0abf558f4cdcab9d039b6558f79 100644
|
||||
index be55f859e39fcaf45d0c3000432abb3110b981b3..66ac9d01f99a07a5686babca10f0fee9e5a93743 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -8094,7 +8094,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
@@ -8092,7 +8092,7 @@ void WebContentsImpl::OnFocusedElementChangedInFrame(
|
||||
"WebContentsImpl::OnFocusedElementChangedInFrame",
|
||||
"render_frame_host", frame);
|
||||
RenderWidgetHostViewBase* root_view =
|
||||
|
||||
@@ -18,10 +18,10 @@ or resizing, but Electron does not seem to run into that issue
|
||||
for opaque frameless windows even with that block commented out.
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 7c5f6f5b6d981df6dfd2dbac9e409b4c5a378a2b..aaa0d52e1baae405a75af29ab3741a3a0895dbe0 100644
|
||||
index 6b7366dfd43ca13587f0fc430eb1b11f2ed0436a..b3c3299befba4a16e167e117d599c37eada56b6c 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -1847,7 +1847,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
|
||||
@@ -1863,7 +1863,23 @@ LRESULT HWNDMessageHandler::OnCreate(CREATESTRUCT* create_struct) {
|
||||
SendMessage(hwnd(), WM_CHANGEUISTATE, MAKELPARAM(UIS_CLEAR, UISF_HIDEFOCUS),
|
||||
0);
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ index 4cd668a127a50e5462e3878c3f1dcb7384926768..dfbec49249404df8f8ebdbd26e6e865c
|
||||
|
||||
#endif // THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_SCRIPT_EXECUTION_CALLBACK_H_
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
index 780e573751d6b7cee1ff751746f57f039649e96b..48090768a67cd9b5e98d2805e46c64b043e09d2c 100644
|
||||
index b01924ed532b360a7002d846b6085e308681a0ff..2efb2f5461a52510f7dc500ccbaed2772cb3b2d4 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -2693,6 +2693,7 @@ void LocalFrame::RequestExecuteScript(
|
||||
@@ -98,7 +98,7 @@ index 2bc46fe0b173f35384888dfe0c382425ed55946e..f8fc6b4044a7ae3d345dc26af04146b3
|
||||
mojom::blink::WantResultOption,
|
||||
mojom::blink::PromiseResultOption);
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
|
||||
index 3db51e1aaad98574947653472844e96a35053bf8..11ae2e4f042ba9fa665d5fc8532429269f2a5f6b 100644
|
||||
index 162661bd0f429fec49b8ac57430b36966d37988a..207286750c5f93c1c43d5f880b78aeedc4f9fe93 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_mojo_handler.cc
|
||||
@@ -954,6 +954,7 @@ void LocalFrameMojoHandler::JavaScriptExecuteRequestInIsolatedWorld(
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: Re-register status item when owner of status watcher is changed
|
||||
https://chromium-review.googlesource.com/c/chromium/src/+/4022621
|
||||
|
||||
diff --git a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
|
||||
index 3e22390f3b8b83f65e8404881a684d2d77697018..ce2e13052d375d3b03fdd7dffaa84cbd2a5dc155 100644
|
||||
index e7e710d58e2bdf1f0bc042f479add048f3aa1ffb..dc0d69a726f389e4925001fc2c817fe0f0f83508 100644
|
||||
--- a/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
|
||||
+++ b/chrome/browser/ui/views/status_icons/status_icon_linux_dbus.cc
|
||||
@@ -360,6 +360,13 @@ void StatusIconLinuxDbus::OnInitialized(bool success) {
|
||||
@@ -361,6 +361,13 @@ void StatusIconLinuxDbus::OnInitialized(bool success) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ index 3e22390f3b8b83f65e8404881a684d2d77697018..ce2e13052d375d3b03fdd7dffaa84cbd
|
||||
dbus::MethodCall method_call(kInterfaceStatusNotifierWatcher,
|
||||
kMethodRegisterStatusNotifierItem);
|
||||
dbus::MessageWriter writer(&method_call);
|
||||
@@ -375,6 +382,14 @@ void StatusIconLinuxDbus::OnRegistered(dbus::Response* response) {
|
||||
@@ -376,6 +383,14 @@ void StatusIconLinuxDbus::OnRegistered(dbus::Response* response) {
|
||||
delegate_->OnImplInitializationFailed();
|
||||
}
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
|
||||
Allows embedder to intercept site instances created by chromium.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
index b51154ddd3d3bd49327e83adedc8bce8c64fcbcf..64db37078f898d6c8345be69d8fa03b695fdb06b 100644
|
||||
index 5392308ae84274f072ad7e6f72ceee74258bd358..37bb3ec8b2bfef75a9e494babd36aa49b54b03be 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -3758,6 +3758,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -3833,6 +3833,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ index b51154ddd3d3bd49327e83adedc8bce8c64fcbcf..64db37078f898d6c8345be69d8fa03b6
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index d89b97d141c66696caa5535b03f4da994fd28210..0f67c7b6517b1153f01a3318ebde0c37ecf1264e 100644
|
||||
index b9438a454757e3368ca194cefedb40a266f71131..43890ccf69e8b0b7318a93f78b734f27fca17d89 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -277,6 +277,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -301,6 +301,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
||||
virtual ~ContentBrowserClient() = default;
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
|
||||
Add electron resources file to the list of resource ids generation.
|
||||
|
||||
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
|
||||
index 81fff672fa54c240ab86f73f95a3441fe78316b5..2906e29139c721a84ec44aeb4d62f87ba5977569 100644
|
||||
index e929bcf5899140d4ac3b8b75b4cd9a60174431d7..548fe6b12db2f5b4b07a4cab522dea150456c6ed 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -1123,6 +1123,11 @@
|
||||
@@ -1131,6 +1131,11 @@
|
||||
"includes": [4960],
|
||||
},
|
||||
|
||||
|
||||
@@ -8,13 +8,13 @@ require a largeish patch to get working, so just redirect it to our
|
||||
implementation instead.
|
||||
|
||||
diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
index 71b016bdea8d9f2e2a8f9fec0b30f321dc818c44..804a4c2a48087d7ad1f4a2a975e628e8c0b869b8 100644
|
||||
index d8616c3d0e0f2c7a564521479d0013b5580b762d..44c3625a27a0cc4846cdec0e14b3cd0b0a42dfc4 100644
|
||||
--- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
+++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
@@ -10,8 +10,8 @@
|
||||
#include "base/feature_list.h"
|
||||
#include "base/functional/bind.h"
|
||||
#include "base/guid.h"
|
||||
#include "base/uuid.h"
|
||||
-#include "chrome/browser/extensions/api/streams_private/streams_private_api.h"
|
||||
-#include "chrome/browser/plugins/plugin_utils.h"
|
||||
+#include "electron/shell/browser/extensions/api/streams_private/streams_private_api.h"
|
||||
|
||||
@@ -11,7 +11,7 @@ If removing this patch causes no sync failures, it's safe to delete :+1:
|
||||
Ref https://chromium-review.googlesource.com/c/chromium/src/+/2953903
|
||||
|
||||
diff --git a/tools/clang/scripts/update.py b/tools/clang/scripts/update.py
|
||||
index c86343459e853689d9cfb8729525a8aed4c73e2c..d04f37058b573b609eec94d384f5d088558ca7c4 100755
|
||||
index 89ad0eccc3e1b0f057da69928e647e3d8a1f79d0..e475448b0509cf7c828016874bcb2121d9f9b15e 100755
|
||||
--- a/tools/clang/scripts/update.py
|
||||
+++ b/tools/clang/scripts/update.py
|
||||
@@ -305,6 +305,8 @@ def GetDefaultHostOs():
|
||||
|
||||
@@ -44,7 +44,7 @@ index 3600a7ce7b3e6540767f64c631f352aa62240459..3147961f3d1c2c1690b5adf16a9a58f7
|
||||
|
||||
} // namespace
|
||||
diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
|
||||
index 4befb8cc94966c4c6ea21dd2d4f9c40152486387..5f17cc7422f5627d20186fe674cc2c6bcb1decaa 100644
|
||||
index f13ccec0334aa6b47cce180630b15298b86a4162..fa76a984f3dea99bdb337b44ceb8e397cae6a4ec 100644
|
||||
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
|
||||
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
|
||||
@@ -572,10 +572,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
||||
@@ -61,7 +61,7 @@ index 4befb8cc94966c4c6ea21dd2d4f9c40152486387..5f17cc7422f5627d20186fe674cc2c6b
|
||||
// Beware: This view was briefly removed (in favor of a bare CALayer) in
|
||||
// crrev/c/1236675. The ordering of unassociated layers relative to NSView
|
||||
diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
|
||||
index f553d52bcc00acc9f1e2d87ee618efb7b24b389d..672aa22e5d1eeecfca3c780822024037e04ae4e2 100644
|
||||
index c87ae83d0a9755401a343b5392a22540c7051769..dc01554c00518561b1b7275c1eeea94785310a78 100644
|
||||
--- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
|
||||
+++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
|
||||
@@ -87,8 +87,10 @@ id GetFocusedBrowserAccessibilityElement() override {
|
||||
@@ -213,10 +213,10 @@ index a7cbd153f799d8e6da61fb255c3d1d70c18fa514..2e3a87b7694f105a684ac2500ae5fb68
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index b7abc4befd026de5721ac03a3469f2df8fc355cb..4f41808bcabe9c1f4277d877d597b4f0c43030f9 100644
|
||||
index 941a4ecd5bf999e96bfd19b90f97376ba70b571c..4beabe5a2daf781521af70be6c5132c64848c9b7 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -358,6 +358,13 @@ component("base") {
|
||||
@@ -356,6 +356,13 @@ component("base") {
|
||||
sources += [ "resource/resource_bundle_lacros.cc" ]
|
||||
}
|
||||
|
||||
@@ -251,7 +251,7 @@ index aa09619a3137d1878c9f5c111a348703965dd16f..6553de29e861c15028564ffe4a4b9b01
|
||||
+
|
||||
#endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_
|
||||
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
index 1f7fef969cf78606110e4a848c00ed6546a626f2..01b031219c9d96eb9b1850ccfd5b86bc5abadbf7 100644
|
||||
index aa89421a689ad3f0872e51fa19624d2371948c21..e63b249a9bdc23545121a513156bfa32e92fec0b 100644
|
||||
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
@@ -32,7 +32,9 @@
|
||||
@@ -264,7 +264,7 @@ index 1f7fef969cf78606110e4a848c00ed6546a626f2..01b031219c9d96eb9b1850ccfd5b86bc
|
||||
@class NSView;
|
||||
|
||||
namespace remote_cocoa {
|
||||
@@ -463,11 +465,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
|
||||
@@ -458,11 +460,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
|
||||
mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
|
||||
remote_ns_window_remote_;
|
||||
|
||||
@@ -279,10 +279,10 @@ index 1f7fef969cf78606110e4a848c00ed6546a626f2..01b031219c9d96eb9b1850ccfd5b86bc
|
||||
// Used to force the NSApplication's focused accessibility element to be the
|
||||
// views::Views accessibility tree when the NSView for this is focused.
|
||||
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
index 06af43645067a32088c4874724175379c8d366c8..76c803688baf2093417143ee0a621cbdf88566a1 100644
|
||||
index dca21f43003231445b2c6fe0cfe07cd9ad9247ba..c6a33c2a85206295426292406291af670ce65ab0 100644
|
||||
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
@@ -345,14 +345,22 @@ void BubbleAnchorViewContainedInWidget(
|
||||
@@ -339,14 +339,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const {
|
||||
if (in_process_ns_window_bridge_)
|
||||
return in_process_ns_window_bridge_->ns_view();
|
||||
@@ -305,7 +305,7 @@ index 06af43645067a32088c4874724175379c8d366c8..76c803688baf2093417143ee0a621cbd
|
||||
}
|
||||
|
||||
remote_cocoa::mojom::NativeWidgetNSWindow*
|
||||
@@ -1339,6 +1347,7 @@ void BubbleAnchorViewContainedInWidget(
|
||||
@@ -1333,6 +1341,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
|
||||
const std::vector<uint8_t>& window_token,
|
||||
const std::vector<uint8_t>& view_token) {
|
||||
@@ -313,7 +313,7 @@ index 06af43645067a32088c4874724175379c8d366c8..76c803688baf2093417143ee0a621cbd
|
||||
remote_window_accessible_ =
|
||||
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
|
||||
remote_view_accessible_ =
|
||||
@@ -1346,14 +1355,17 @@ void BubbleAnchorViewContainedInWidget(
|
||||
@@ -1340,14 +1349,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
[remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()];
|
||||
[remote_view_accessible_
|
||||
setTopLevelUIElement:remote_window_accessible_.get()];
|
||||
|
||||
@@ -41,7 +41,7 @@ index 7d0b810073898dd4a3607828e3419b65ee1cb09d..20c6bd1a002e2b54eed0a8732b2807f5
|
||||
|
||||
gfx::Size pixel_size_;
|
||||
diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
||||
index 1f9d7ec4bd7ab0668a081ecc74bf9a3ab80c4697..4e3014ff05c001d37f583cb7c1af6b3dda9b1503 100644
|
||||
index ad8295c4a3c57560c6d0d59ea53ed1b1dee48969..d9e53025e37b1b9a7f2a3efdddc730881d6865bb 100644
|
||||
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
||||
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
|
||||
@@ -55,7 +55,9 @@
|
||||
|
||||
@@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement
|
||||
session.setCertificateVerifyCallback.
|
||||
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index 911317d27c72fc77d6ae3ecf222538e0afec5c06..3c8c72eca43b5842a17f502d3b705c27f9c78ec3 100644
|
||||
index 02709c1f1bf5154d6c2999bb941fbc673924b512..6ed06ffa2119753748ac4b7c5705c1229825f3e6 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -139,6 +139,11 @@
|
||||
@@ -177,7 +177,7 @@ index 34b92d40efedb02efd42a8805c7630efd1fd2005..574434c94e0ee145c9a86566baa04d1c
|
||||
std::unique_ptr<HostResolver> internal_host_resolver_;
|
||||
// Map values set to non-null only if that HostResolver has its own private
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 67ec13248477a6897cca614f235f813587e73eb1..8d8899d941050868c80642d6589e4e3bc48462c7 100644
|
||||
index 62150fda9f17aee59b4f38a466bbc0e90f21edac..810a23b388b4c9fd02569f506ff884825cd7bb09 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -297,6 +297,17 @@ struct NetworkContextFilePaths {
|
||||
@@ -198,7 +198,7 @@ index 67ec13248477a6897cca614f235f813587e73eb1..8d8899d941050868c80642d6589e4e3b
|
||||
// Parameters for constructing a network context.
|
||||
struct NetworkContextParams {
|
||||
// The user agent string.
|
||||
@@ -853,6 +864,9 @@ interface NetworkContext {
|
||||
@@ -865,6 +876,9 @@ interface NetworkContext {
|
||||
// Sets a client for this network context.
|
||||
SetClient(pending_remote<NetworkContextClient> client);
|
||||
|
||||
|
||||
@@ -92,10 +92,10 @@ index 00965c253f28bd3947255b2ab77bf3a0bb71f14a..e04a7eef94990dfb0e2fca2e116352fe
|
||||
contents_.get()->GetPrimaryMainFrame()->GetWeakDocumentPtr(),
|
||||
RenderProcessHost::NotificationServiceCreatorType::kDocument,
|
||||
diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc
|
||||
index aa04c672494e5ecb9ca43eb7e0d3b49bad01e29b..ff24af7f921dc86c00bfd7151dc8d70af6f1b99a 100644
|
||||
index 9814861ab18fa88bc781f83acb602129b6f3de1f..1c5a2efc2749697aa3d38247f491eabf240c1aa5 100644
|
||||
--- a/content/browser/notifications/platform_notification_context_impl.cc
|
||||
+++ b/content/browser/notifications/platform_notification_context_impl.cc
|
||||
@@ -283,6 +283,7 @@ void PlatformNotificationContextImpl::Shutdown() {
|
||||
@@ -268,6 +268,7 @@ void PlatformNotificationContextImpl::Shutdown() {
|
||||
|
||||
void PlatformNotificationContextImpl::CreateService(
|
||||
RenderProcessHost* render_process_host,
|
||||
@@ -103,7 +103,7 @@ index aa04c672494e5ecb9ca43eb7e0d3b49bad01e29b..ff24af7f921dc86c00bfd7151dc8d70a
|
||||
const blink::StorageKey& storage_key,
|
||||
const GURL& document_url,
|
||||
const WeakDocumentPtr& weak_document_ptr,
|
||||
@@ -291,7 +292,7 @@ void PlatformNotificationContextImpl::CreateService(
|
||||
@@ -276,7 +277,7 @@ void PlatformNotificationContextImpl::CreateService(
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
services_.push_back(std::make_unique<BlinkNotificationServiceImpl>(
|
||||
this, browser_context_, service_worker_context_, render_process_host,
|
||||
@@ -133,10 +133,10 @@ index bbd2aa78722fc0a14ac815ca0243b83965ad8d7c..b6e0a2fce3a0fb9c449aa1bef6a0f970
|
||||
const GURL& document_url,
|
||||
const WeakDocumentPtr& weak_document_ptr,
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index a2d47ffbf20d15e2f211049d62fe691ea61ca9f8..2971e719224d0e23254b39bd7faec79529e1e9cd 100644
|
||||
index b6352bba532f22c6a440eb5c79905c1d37c4b73e..a08b722319ba838f9a525cda03fc435dc4a3c0b8 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2122,7 +2122,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2139,7 +2139,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kSharedWorker:
|
||||
case RenderProcessHost::NotificationServiceCreatorType::kDedicatedWorker: {
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
@@ -145,7 +145,7 @@ index a2d47ffbf20d15e2f211049d62fe691ea61ca9f8..2971e719224d0e23254b39bd7faec795
|
||||
creator_type, std::move(receiver));
|
||||
break;
|
||||
}
|
||||
@@ -2130,7 +2130,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2147,7 +2147,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
CHECK(rfh);
|
||||
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
||||
@@ -9,7 +9,7 @@ don't get errors for Chrome's generated resources, which are non-existent
|
||||
because we don't generate them in our build.
|
||||
|
||||
diff --git a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
index 0b68f7d80be51a2960aafa72a1f6ea7ebf678b8c..f075a25fad0e7efa2d958f5dc14434084e302124 100644
|
||||
index 311d0835a9a713b3e8ec6f0061ef0867baed730e..af182bb6aaa991cfd60d28aff56d8b95542fdc97 100644
|
||||
--- a/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/video_overlay_window_views.cc
|
||||
@@ -14,9 +14,11 @@
|
||||
@@ -24,7 +24,7 @@ index 0b68f7d80be51a2960aafa72a1f6ea7ebf678b8c..f075a25fad0e7efa2d958f5dc1443408
|
||||
#include "chrome/browser/ui/color/chrome_color_id.h"
|
||||
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
|
||||
#include "chrome/browser/ui/views/overlay/close_image_button.h"
|
||||
@@ -53,7 +55,7 @@
|
||||
@@ -52,7 +54,7 @@
|
||||
#include "ui/aura/window.h"
|
||||
#endif
|
||||
|
||||
@@ -33,7 +33,7 @@ index 0b68f7d80be51a2960aafa72a1f6ea7ebf678b8c..f075a25fad0e7efa2d958f5dc1443408
|
||||
#include "chrome/browser/shell_integration_win.h"
|
||||
#include "ui/aura/window.h"
|
||||
#include "ui/aura/window_tree_host.h"
|
||||
@@ -279,7 +281,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
|
||||
@@ -278,7 +280,7 @@ std::unique_ptr<VideoOverlayWindowViews> VideoOverlayWindowViews::Create(
|
||||
overlay_window->Init(std::move(params));
|
||||
overlay_window->OnRootViewReady();
|
||||
|
||||
|
||||
@@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be
|
||||
our autofill implementation to work like Chromium's.
|
||||
|
||||
diff --git a/ui/color/color_id.h b/ui/color/color_id.h
|
||||
index 1539abfba5e5a65b2ed1a49d707b120048ca3c06..e8f9fcf4fb50f76e9795cc1f7f645528bf4eee17 100644
|
||||
index ce4e2f4e7914fd0ba6218bd992c41b013caef828..79d3418cec7bf1bd24be98768b2574c1415cf025 100644
|
||||
--- a/ui/color/color_id.h
|
||||
+++ b/ui/color/color_id.h
|
||||
@@ -355,6 +355,10 @@
|
||||
@@ -354,6 +354,10 @@
|
||||
E_CPONLY(kColorScrollbarThumbInactive) \
|
||||
E_CPONLY(kColorScrollbarThumbPressed) \
|
||||
E_CPONLY(kColorScrollbarTrack) \
|
||||
@@ -22,7 +22,7 @@ index 1539abfba5e5a65b2ed1a49d707b120048ca3c06..e8f9fcf4fb50f76e9795cc1f7f645528
|
||||
E_CPONLY(kColorSeparator) \
|
||||
E_CPONLY(kColorShadowBase) \
|
||||
E_CPONLY(kColorShadowValueAmbientShadowElevationSixteen) \
|
||||
@@ -428,6 +432,7 @@
|
||||
@@ -427,6 +431,7 @@
|
||||
E_CPONLY(kColorTreeNodeForeground) \
|
||||
E_CPONLY(kColorTreeNodeForegroundSelectedFocused) \
|
||||
E_CPONLY(kColorTreeNodeForegroundSelectedUnfocused) \
|
||||
@@ -31,10 +31,10 @@ index 1539abfba5e5a65b2ed1a49d707b120048ca3c06..e8f9fcf4fb50f76e9795cc1f7f645528
|
||||
|
||||
#if BUILDFLAG(IS_CHROMEOS)
|
||||
diff --git a/ui/color/ui_color_mixer.cc b/ui/color/ui_color_mixer.cc
|
||||
index e52dd23cef1ea6cc2b61f51650b94de382683cc0..8b103d7d5a6ed860cb76d3ca7e23bb2e9d835993 100644
|
||||
index 5120d66f48ecb760080979f860219c182ab81782..35422cb82a42063918dda6ccaf2a7042722390dc 100644
|
||||
--- a/ui/color/ui_color_mixer.cc
|
||||
+++ b/ui/color/ui_color_mixer.cc
|
||||
@@ -206,6 +206,17 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
@@ -218,6 +218,17 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
: SkColorSetA(SK_ColorBLACK, 0x80)};
|
||||
mixer[kColorScrollbarTrack] = {dark_mode ? SkColorSetRGB(0x42, 0x42, 0x42)
|
||||
: SkColorSetRGB(0xF1, 0xF1, 0xF1)};
|
||||
@@ -52,7 +52,7 @@ index e52dd23cef1ea6cc2b61f51650b94de382683cc0..8b103d7d5a6ed860cb76d3ca7e23bb2e
|
||||
mixer[kColorSeparator] = {kColorMidground};
|
||||
mixer[kColorShadowBase] = {dark_mode ? SK_ColorBLACK : gfx::kGoogleGrey800};
|
||||
mixer[kColorShadowValueAmbientShadowElevationThree] =
|
||||
@@ -303,6 +314,7 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
@@ -315,6 +326,7 @@ void AddUiColorMixer(ColorProvider* provider,
|
||||
mixer[kColorTreeNodeForegroundSelectedFocused] = {kColorTreeNodeForeground};
|
||||
mixer[kColorTreeNodeForegroundSelectedUnfocused] = {
|
||||
kColorTreeNodeForegroundSelectedFocused};
|
||||
|
||||
@@ -78,7 +78,7 @@ index b496ff49232f449fd6cea9dc1927b833c049497b..4c12ca65c1f800ddbbb792716f09f63f
|
||||
: PdfRenderSettings::Mode::POSTSCRIPT_LEVEL3;
|
||||
}
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
|
||||
index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78d47f2f6c 100644
|
||||
index 6756967e1df3d985eab45aaaefcf5dd2f7025b9a..c5743ccb09146aaa3ab2c5c8cb728af1291b4ebc 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -23,7 +23,9 @@
|
||||
@@ -106,10 +106,10 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
+ return "";
|
||||
+}
|
||||
+
|
||||
using PrintSettingsCallback =
|
||||
base::OnceCallback<void(std::unique_ptr<PrinterQuery>)>;
|
||||
|
||||
@@ -90,9 +103,11 @@ void OnDidGetDefaultPrintSettings(
|
||||
void OnDidGetDefaultPrintSettings(
|
||||
scoped_refptr<PrintQueriesQueue> queue,
|
||||
bool want_pdf_settings,
|
||||
@@ -87,9 +100,11 @@ void OnDidGetDefaultPrintSettings(
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
||||
if (printer_query->last_status() != mojom::ResultCode::kSuccess) {
|
||||
@@ -121,7 +121,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
std::move(callback).Run(nullptr);
|
||||
return;
|
||||
}
|
||||
@@ -102,9 +117,11 @@ void OnDidGetDefaultPrintSettings(
|
||||
@@ -99,9 +114,11 @@ void OnDidGetDefaultPrintSettings(
|
||||
params->document_cookie = printer_query->cookie();
|
||||
|
||||
if (!PrintMsgPrintParamsIsValid(*params)) {
|
||||
@@ -133,7 +133,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
std::move(callback).Run(nullptr);
|
||||
return;
|
||||
}
|
||||
@@ -121,7 +138,7 @@ void OnDidScriptedPrint(
|
||||
@@ -118,7 +135,7 @@ void OnDidScriptedPrint(
|
||||
|
||||
if (printer_query->last_status() != mojom::ResultCode::kSuccess ||
|
||||
!printer_query->settings().dpi()) {
|
||||
@@ -142,7 +142,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -131,12 +148,13 @@ void OnDidScriptedPrint(
|
||||
@@ -128,12 +145,13 @@ void OnDidScriptedPrint(
|
||||
params->params.get());
|
||||
params->params->document_cookie = printer_query->cookie();
|
||||
if (!PrintMsgPrintParamsIsValid(*params->params)) {
|
||||
@@ -158,7 +158,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
queue->QueuePrinterQuery(std::move(printer_query));
|
||||
}
|
||||
|
||||
@@ -173,9 +191,11 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
@@ -170,9 +188,11 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
: PrintManager(web_contents),
|
||||
queue_(g_browser_process->print_job_manager()->queue()) {
|
||||
DCHECK(queue_);
|
||||
@@ -171,7 +171,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
}
|
||||
|
||||
PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -183,7 +203,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -180,7 +200,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
DisconnectFromCurrentPrintJob();
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
// Remember the ID for `rfh`, to enable checking that the `RenderFrameHost`
|
||||
// is still valid after a possible inner message loop runs in
|
||||
// `DisconnectFromCurrentPrintJob()`.
|
||||
@@ -211,7 +234,12 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
@@ -208,7 +231,12 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
#endif
|
||||
|
||||
SetPrintingRFH(rfh);
|
||||
@@ -196,7 +196,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -382,7 +410,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
|
||||
@@ -432,7 +460,8 @@ void PrintViewManagerBase::GetDefaultPrintSettingsReply(
|
||||
void PrintViewManagerBase::ScriptedPrintReply(
|
||||
ScriptedPrintCallback callback,
|
||||
int process_id,
|
||||
@@ -206,7 +206,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
|
||||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
@@ -397,12 +426,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
|
||||
@@ -447,12 +476,15 @@ void PrintViewManagerBase::ScriptedPrintReply(
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
}
|
||||
}
|
||||
|
||||
@@ -538,10 +570,12 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
@@ -588,10 +620,12 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
void PrintViewManagerBase::GetDefaultPrintSettings(
|
||||
GetDefaultPrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -237,7 +237,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
#if BUILDFLAG(ENABLE_OOP_PRINTING)
|
||||
if (printing::features::kEnableOopPrintDriversJobPrint.Get() &&
|
||||
#if BUILDFLAG(ENABLE_PRINT_CONTENT_ANALYSIS)
|
||||
@@ -593,10 +627,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -643,10 +677,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
base::Value::Dict job_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -250,7 +250,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
|
||||
absl::optional<int> printer_type_value =
|
||||
job_settings.FindInt(kSettingPrinterType);
|
||||
@@ -607,6 +643,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -657,6 +693,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
|
||||
mojom::PrinterType printer_type =
|
||||
static_cast<mojom::PrinterType>(*printer_type_value);
|
||||
@@ -258,7 +258,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
if (printer_type != mojom::PrinterType::kExtension &&
|
||||
printer_type != mojom::PrinterType::kPdf &&
|
||||
printer_type != mojom::PrinterType::kLocal) {
|
||||
@@ -626,6 +663,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -676,6 +713,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
if (value > 0)
|
||||
job_settings.Set(kSettingRasterizePdfDpi, value);
|
||||
}
|
||||
@@ -266,7 +266,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
|
||||
std::unique_ptr<PrintSettings> print_settings =
|
||||
PrintSettingsFromJobSettings(job_settings);
|
||||
@@ -682,7 +720,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -725,7 +763,7 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
void PrintViewManagerBase::IsPrintingEnabled(
|
||||
IsPrintingEnabledCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -275,7 +275,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -698,14 +736,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
@@ -741,14 +779,14 @@ void PrintViewManagerBase::ScriptedPrint(mojom::ScriptedPrintParamsPtr params,
|
||||
// didn't happen for some reason.
|
||||
bad_message::ReceivedBadMessage(
|
||||
render_process_host, bad_message::PVMB_SCRIPTED_PRINT_FENCED_FRAME);
|
||||
@@ -292,7 +292,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
@@ -743,6 +781,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -786,6 +824,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
|
||||
PrintManager::PrintingFailed(cookie, reason);
|
||||
|
||||
@@ -300,7 +300,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
// `PrintingFailed()` can occur because asynchronous compositing results
|
||||
// don't complete until after a print job has already failed and been
|
||||
// destroyed. In such cases the error notification to the user will
|
||||
@@ -752,7 +791,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
@@ -795,7 +834,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie,
|
||||
print_job_->document()->cookie() == cookie) {
|
||||
ShowPrintErrorDialogForGenericError();
|
||||
}
|
||||
@@ -309,7 +309,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
ReleasePrinterQuery();
|
||||
}
|
||||
|
||||
@@ -764,15 +803,24 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
|
||||
@@ -807,15 +846,24 @@ void PrintViewManagerBase::RemoveObserver(Observer& observer) {
|
||||
observers_.RemoveObserver(&observer);
|
||||
}
|
||||
|
||||
@@ -334,7 +334,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::RenderFrameDeleted(
|
||||
@@ -824,7 +872,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
@@ -867,7 +915,12 @@ void PrintViewManagerBase::OnJobDone() {
|
||||
// Printing is done, we don't need it anymore.
|
||||
// print_job_->is_job_pending() may still be true, depending on the order
|
||||
// of object registration.
|
||||
@@ -348,7 +348,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
ReleasePrintJob();
|
||||
}
|
||||
|
||||
@@ -833,9 +886,10 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
@@ -876,9 +929,10 @@ void PrintViewManagerBase::OnCanceling() {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::OnFailed() {
|
||||
@@ -360,7 +360,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
TerminatePrintJob(true);
|
||||
}
|
||||
|
||||
@@ -845,7 +899,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
@@ -888,7 +942,7 @@ bool PrintViewManagerBase::RenderAllMissingPagesNow() {
|
||||
|
||||
// Is the document already complete?
|
||||
if (print_job_->document() && print_job_->document()->IsComplete()) {
|
||||
@@ -369,7 +369,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -893,7 +947,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -936,7 +990,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
|
||||
// Disconnect the current `print_job_`.
|
||||
auto weak_this = weak_ptr_factory_.GetWeakPtr();
|
||||
@@ -381,7 +381,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
if (!weak_this)
|
||||
return false;
|
||||
|
||||
@@ -914,7 +971,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -957,7 +1014,7 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
#endif
|
||||
print_job_->AddObserver(*this);
|
||||
|
||||
@@ -390,7 +390,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -976,6 +1033,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -1019,6 +1076,11 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -402,7 +402,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
if (!print_job_)
|
||||
return;
|
||||
|
||||
@@ -983,7 +1045,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -1026,7 +1088,7 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
// printing_rfh_ should only ever point to a RenderFrameHost with a live
|
||||
// RenderFrame.
|
||||
DCHECK(rfh->IsRenderFrameLive());
|
||||
@@ -411,7 +411,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
}
|
||||
|
||||
print_job_->RemoveObserver(*this);
|
||||
@@ -1025,7 +1087,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -1068,7 +1130,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
@@ -420,7 +420,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
return true;
|
||||
|
||||
if (!cookie) {
|
||||
@@ -1133,7 +1195,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
|
||||
@@ -1176,7 +1238,7 @@ void PrintViewManagerBase::ReleasePrinterQuery() {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::CompletePrintNow(content::RenderFrameHost* rfh) {
|
||||
@@ -429,7 +429,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
|
||||
for (auto& observer : GetObservers())
|
||||
observer.OnPrintNow(rfh);
|
||||
@@ -1181,7 +1243,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
|
||||
@@ -1224,7 +1286,7 @@ void PrintViewManagerBase::CompleteScriptedPrintAfterContentAnalysis(
|
||||
bool allowed) {
|
||||
if (!allowed || !printing_rfh_ || IsCrashed() ||
|
||||
!printing_rfh_->IsRenderFrameLive()) {
|
||||
@@ -439,7 +439,7 @@ index ea3f1ea0e83c7486534d5b1a15a6e8a372830104..de443f48596043fe005ed2c14fc15a78
|
||||
}
|
||||
CompleteScriptedPrint(printing_rfh_, std::move(params), std::move(callback));
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
|
||||
index 5aec0843d4882155d109f9d2d639e4f52f0e5bd2..2bdfbb8f020814b13efca34d13d570dcfdcf6f2c 100644
|
||||
index af968282117eb3b6969b479a18765ec6908843be..59814c3f6c32c1aff0776031b37a296cc9133923 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.h
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.h
|
||||
@@ -46,6 +46,8 @@ namespace printing {
|
||||
@@ -489,7 +489,7 @@ index 5aec0843d4882155d109f9d2d639e4f52f0e5bd2..2bdfbb8f020814b13efca34d13d570dc
|
||||
protected:
|
||||
explicit PrintViewManagerBase(content::WebContents* web_contents);
|
||||
|
||||
@@ -272,7 +287,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -285,7 +300,8 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
// Runs `callback` with `params` to reply to ScriptedPrint().
|
||||
void ScriptedPrintReply(ScriptedPrintCallback callback,
|
||||
int process_id,
|
||||
@@ -499,7 +499,7 @@ index 5aec0843d4882155d109f9d2d639e4f52f0e5bd2..2bdfbb8f020814b13efca34d13d570dc
|
||||
|
||||
// Requests the RenderView to render all the missing pages for the print job.
|
||||
// No-op if no print job is pending. Returns true if at least one page has
|
||||
@@ -342,8 +358,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
@@ -355,8 +371,11 @@ class PrintViewManagerBase : public PrintManager, public PrintJob::Observer {
|
||||
// The current RFH that is printing with a system printing dialog.
|
||||
raw_ptr<content::RenderFrameHost> printing_rfh_ = nullptr;
|
||||
|
||||
@@ -513,10 +513,10 @@ index 5aec0843d4882155d109f9d2d639e4f52f0e5bd2..2bdfbb8f020814b13efca34d13d570dc
|
||||
// Indication that the job is getting canceled.
|
||||
bool canceling_job_ = false;
|
||||
diff --git a/chrome/browser/printing/printer_query.cc b/chrome/browser/printing/printer_query.cc
|
||||
index e75b5609ad7684ac83ae3b44b5f6f5836a1b56d4..cbd58e731f2ddba3848931324fb369ba3db51d43 100644
|
||||
index 0b6ff160cc0537d4e75ecfdc3ab3fc881888bbc9..8ca904943942de2d5ff4b194976e606a60ced16c 100644
|
||||
--- a/chrome/browser/printing/printer_query.cc
|
||||
+++ b/chrome/browser/printing/printer_query.cc
|
||||
@@ -349,17 +349,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings,
|
||||
@@ -355,17 +355,19 @@ void PrinterQuery::UpdatePrintSettings(base::Value::Dict new_settings,
|
||||
#endif // BUILDFLAG(IS_LINUX) && BUILDFLAG(USE_CUPS)
|
||||
}
|
||||
|
||||
@@ -617,7 +617,7 @@ index 82f44b6c90f292772b56253a99578394b5cc2881..91ee0c3d66c33adee346060a0ecd931d
|
||||
// Tells the browser printing failed.
|
||||
PrintingFailed(int32 cookie, PrintFailureReason reason);
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
|
||||
index f1e72946e69e8e12d0436366587648b683d9f4f8..2c7db9c160ac200a2abf671c9b01a24acba4207a 100644
|
||||
index f1e72946e69e8e12d0436366587648b683d9f4f8..205598b3b14d72dc97bf664143a97073677fe52b 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -45,6 +45,7 @@
|
||||
@@ -748,7 +748,7 @@ index f1e72946e69e8e12d0436366587648b683d9f4f8..2c7db9c160ac200a2abf671c9b01a24a
|
||||
// Check if the printer returned any settings, if the settings are null,
|
||||
// assume there are no printer drivers configured. So safely terminate.
|
||||
- if (!settings.params) {
|
||||
+ if (!settings->params) {
|
||||
+ if (!settings || !settings->params) {
|
||||
// Caller will reset `print_pages_params_`.
|
||||
return false;
|
||||
}
|
||||
@@ -831,10 +831,10 @@ index 146fbcb2e6bd4348110ecc3220d6ac0ac59babf3..eecc3118033ef7fe1f17aba48cd19b17
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Set options for print preset from source PDF document.
|
||||
diff --git a/content/browser/BUILD.gn b/content/browser/BUILD.gn
|
||||
index aaf5673f33e3cfbdce1dd72beb362180f2e7896a..fce93ca350d0fa6235f740a8c8ca67b2943a1a30 100644
|
||||
index aedd85d36cc5cd6bffe77c0af7a5a73e00bd86f7..ab9889dc4d631df1ddc61565eb0fe35c06e45b72 100644
|
||||
--- a/content/browser/BUILD.gn
|
||||
+++ b/content/browser/BUILD.gn
|
||||
@@ -2858,8 +2858,9 @@ source_set("browser") {
|
||||
@@ -2862,8 +2862,9 @@ source_set("browser") {
|
||||
"//ppapi/shared_impl",
|
||||
]
|
||||
|
||||
|
||||
@@ -30,10 +30,10 @@ index fe010b1f001130fbdeaf4ef9ce7798e4baf958b5..28f1305f439be7f669e482ac0e4804c0
|
||||
// RenderWidgetHost on the primary main frame, and false otherwise.
|
||||
virtual bool IsWidgetForPrimaryMainFrame(RenderWidgetHostImpl*);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 0d66b297f64af9f3bc2d4aab0e7a285fff9507cc..bc4e729b4ef82f9b995e24f3764ad301c8efa183 100644
|
||||
index 347b8d89a2ecaa6baa4779f650b8af49a6d6d118..07b6f899132ab4b94fb9474d441461c8fcf53705 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -2055,6 +2055,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
@@ -2066,6 +2066,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
if (view_)
|
||||
view_->UpdateCursor(cursor);
|
||||
@@ -43,10 +43,10 @@ index 0d66b297f64af9f3bc2d4aab0e7a285fff9507cc..bc4e729b4ef82f9b995e24f3764ad301
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index bc9e24f2346a0d3e494502fedaaa0b24e82fc494..28d808417d6c5fd339c0d68cbfad177fa2fda166 100644
|
||||
index afdf6c98157797bfbbabd381daa42ad22d7a63d0..bbfe0f02522fdf13898b5b9183d1c9b5a47cfa30 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4752,6 +4752,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -4753,6 +4753,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
@@ -59,10 +59,10 @@ index bc9e24f2346a0d3e494502fedaaa0b24e82fc494..28d808417d6c5fd339c0d68cbfad177f
|
||||
RenderWidgetHostImpl* render_widget_host) {
|
||||
return render_widget_host == GetPrimaryMainFrame()->GetRenderWidgetHost();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index cebf67d16dff164ee75677200824e50fdcdbbe85..b43205b4dea3ab0201085cd4d63c6b3a4fa78238 100644
|
||||
index ea889f23e73044b6812c7e514956bee89ebb9396..69f9ffbf4826421491118a0b200d6c71e41f8950 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -971,6 +971,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -972,6 +972,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
void SendScreenRects() override;
|
||||
void SendActiveState(bool active) override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
|
||||
@@ -24,7 +24,7 @@ index d770e7b922232d3e2697ba4146e2e4a3984d6757..5761c122a3fd201c2b53b9d98f21191c
|
||||
const blink::WebMouseEvent& event,
|
||||
const ui::LatencyInfo& latency) {
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
index d83e754fe27be4cf77570eec5e8a05c7b90ca53b..be58619d4612d7a6ff382be21708a9422a9b2c81 100644
|
||||
index 7b8afe19a30886bff552d9db3daf456f6a0012f9..524e266126cc2d8e17c1a32aa3863924b8626c2f 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
|
||||
@@ -25,8 +25,11 @@
|
||||
|
||||
@@ -52,10 +52,10 @@ Some alternatives to this patch:
|
||||
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index ee9a00bb6bbbacd0e304f156dbb10a65f7091f44..98c9dca792522fd27774d9d22ead61ee546b1832 100644
|
||||
index 38b1cdc80c9ed286c79492933995c4e06e35a092..f9e148eb5b5a9a1da534f5db19227e327282eac0 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1580,7 +1580,7 @@ if (is_chrome_branded && !is_android) {
|
||||
@@ -1582,7 +1582,7 @@ if (is_chrome_branded && !is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index ee9a00bb6bbbacd0e304f156dbb10a65f7091f44..98c9dca792522fd27774d9d22ead61ee
|
||||
chrome_paks("packed_resources") {
|
||||
if (is_mac) {
|
||||
output_dir = "$root_gen_dir/repack"
|
||||
@@ -1609,6 +1609,12 @@ if (!is_android) {
|
||||
@@ -1611,6 +1611,12 @@ if (!is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: scroll_bounce_flag.patch
|
||||
Patch to make scrollBounce option work.
|
||||
|
||||
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
|
||||
index d0aa0090e0d6304d6e8afa70710520b8e4930f25..9d42b0a8d3b1f2660673ec0a6e0c8de184d64c84 100644
|
||||
index a614d8eb1ecd3f95d19019637dabf6ef8e7bf49a..d9d2cf273cf99e1a7ce5f8832fbf8d77f0497e97 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1344,7 +1344,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
|
||||
@@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
|
||||
does touch a security-sensitive class.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 2971e719224d0e23254b39bd7faec79529e1e9cd..da1b9e452b349b05c985791847044a33ad04f97a 100644
|
||||
index a08b722319ba838f9a525cda03fc435dc4a3c0b8..e5ff37adaa1d38e3732457004c63d8c282cb0fd8 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -1803,9 +1803,15 @@ bool RenderProcessHostImpl::Init() {
|
||||
@@ -1820,9 +1820,15 @@ bool RenderProcessHostImpl::Init() {
|
||||
std::unique_ptr<SandboxedProcessLauncherDelegate> sandbox_delegate =
|
||||
std::make_unique<RendererSandboxedProcessLauncherDelegateWin>(
|
||||
*cmd_line, IsPdf(), IsJitDisabled());
|
||||
|
||||
@@ -9,10 +9,10 @@ is needed for OSR.
|
||||
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index fbcc419d13b5d064689d960fab4e85fa7625ea02..1b08ec595adb6285f4c4d51d7d4745686c83a7db 100644
|
||||
index 4e32ad1cfa069d3446d8c88bb16c8af631db7a63..a08ab949b596768bfff777d47130728ff9054837 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3206,6 +3206,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3207,6 +3207,13 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
params.main_frame_name, GetOpener(), primary_main_frame_policy,
|
||||
base::UnguessableToken::Create());
|
||||
|
||||
@@ -26,7 +26,7 @@ index fbcc419d13b5d064689d960fab4e85fa7625ea02..1b08ec595adb6285f4c4d51d7d474568
|
||||
std::unique_ptr<WebContentsViewDelegate> delegate =
|
||||
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
|
||||
|
||||
@@ -3216,6 +3223,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
@@ -3217,6 +3224,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params,
|
||||
view_ = CreateWebContentsView(this, std::move(delegate),
|
||||
&render_view_host_delegate_view_);
|
||||
}
|
||||
|
||||
@@ -14,10 +14,10 @@ Note that we also need to manually update embedder's
|
||||
`api::WebContents::IsFullscreenForTabOrPending` value.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
index 2937f35372bafd9158be712f04d2731bb4100f9a..9c3b945f91f083bfdf32ec90bea3ed73220e4414 100644
|
||||
index 6b3b52e10c02373e0a87d05eec1d7a143e826864..6af93d94eca3ac445c558053c2e7d789dce12351 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -6933,6 +6933,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
@@ -6979,6 +6979,17 @@ void RenderFrameHostImpl::EnterFullscreen(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -26,10 +26,10 @@ index 77f2c4fbf8c886c5c622f41d0b9da67d09b7d331..7aa2059f33dfa92828beec95f4716775
|
||||
// An empty URL is returned if the URL is not overriden.
|
||||
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
|
||||
index acc5e11a24248ef37db4e20a74f3469ab33ed12b..3f582acf43ffd21f0f5eb485bf4d6a5cca8d2250 100644
|
||||
index 93de85d84231556a22becc3a60d798d4c954cedd..8b94565a7dc696ed80780de776201faab02c3803 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -826,6 +826,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
@@ -827,6 +827,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
|
||||
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
|
||||
}
|
||||
|
||||
@@ -43,10 +43,10 @@ index acc5e11a24248ef37db4e20a74f3469ab33ed12b..3f582acf43ffd21f0f5eb485bf4d6a5c
|
||||
const v8::Local<v8::Context>& worker) {
|
||||
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
|
||||
index 594e30a46018dc47d8c6bfd4de2160d874e7e176..6028e84c41e6f4f5e4c3194388c6ecda9e4fa770 100644
|
||||
index 0067dcb8b5c6b0079118c5f1ae1da98c72cef4a1..19822bd314f014e4433ec5c6271e71af12a4822e 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.h
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -175,6 +175,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -176,6 +176,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
void DidStartWorkerThread() override;
|
||||
void WillStopWorkerThread() override;
|
||||
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
|
||||
@@ -55,10 +55,10 @@ index 594e30a46018dc47d8c6bfd4de2160d874e7e176..6028e84c41e6f4f5e4c3194388c6ecda
|
||||
const blink::WebSecurityOrigin& script_origin) override;
|
||||
blink::ProtocolHandlerSecurityLevel GetProtocolHandlerSecurityLevel()
|
||||
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
|
||||
index 17e2a2876789c11dcdf7d850e845d73fcf637434..931d174c6f5f843d8c29b89ec678c10ef06ce0de 100644
|
||||
index 78eb25f4005fd40f8ff54c4dae3d49cdeab0de16..6ee3894d45f457726bdaf6899b69c381ef9aea3f 100644
|
||||
--- a/third_party/blink/public/platform/platform.h
|
||||
+++ b/third_party/blink/public/platform/platform.h
|
||||
@@ -632,6 +632,7 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
@@ -633,6 +633,7 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
virtual void DidStartWorkerThread() {}
|
||||
virtual void WillStopWorkerThread() {}
|
||||
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
|
||||
|
||||
@@ -35,10 +35,10 @@ index 7aa2059f33dfa92828beec95f4716775e7291fed..df919b894d4f29274696806444d034d4
|
||||
// from the worker thread.
|
||||
virtual void WillDestroyWorkerContextOnWorkerThread(
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
|
||||
index 3f582acf43ffd21f0f5eb485bf4d6a5cca8d2250..b98eb4fad9b9585e8a32734d23030983037d4e59 100644
|
||||
index 8b94565a7dc696ed80780de776201faab02c3803..03b96e829bfc835cf96d3372849a91db3ce68500 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.cc
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.cc
|
||||
@@ -838,6 +838,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
|
||||
@@ -839,6 +839,12 @@ void RendererBlinkPlatformImpl::WorkerContextCreated(
|
||||
worker);
|
||||
}
|
||||
|
||||
@@ -52,10 +52,10 @@ index 3f582acf43ffd21f0f5eb485bf4d6a5cca8d2250..b98eb4fad9b9585e8a32734d23030983
|
||||
const blink::WebSecurityOrigin& script_origin) {
|
||||
return GetContentClient()->renderer()->AllowScriptExtensionForServiceWorker(
|
||||
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
|
||||
index 6028e84c41e6f4f5e4c3194388c6ecda9e4fa770..cb6333c731b3c36a46a577665ca75ca75299ae3f 100644
|
||||
index 19822bd314f014e4433ec5c6271e71af12a4822e..9d900d10c02928648d925e025322a614772ad98d 100644
|
||||
--- a/content/renderer/renderer_blink_platform_impl.h
|
||||
+++ b/content/renderer/renderer_blink_platform_impl.h
|
||||
@@ -175,6 +175,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
@@ -176,6 +176,8 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
|
||||
void DidStartWorkerThread() override;
|
||||
void WillStopWorkerThread() override;
|
||||
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
|
||||
@@ -65,10 +65,10 @@ index 6028e84c41e6f4f5e4c3194388c6ecda9e4fa770..cb6333c731b3c36a46a577665ca75ca7
|
||||
bool AllowScriptExtensionForServiceWorker(
|
||||
const blink::WebSecurityOrigin& script_origin) override;
|
||||
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
|
||||
index 931d174c6f5f843d8c29b89ec678c10ef06ce0de..24d16db94e628b73ab80c4d9d62198b91b85a554 100644
|
||||
index 6ee3894d45f457726bdaf6899b69c381ef9aea3f..f311d98c18b4955f5257029a950644fd4423cbd6 100644
|
||||
--- a/third_party/blink/public/platform/platform.h
|
||||
+++ b/third_party/blink/public/platform/platform.h
|
||||
@@ -632,6 +632,8 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
@@ -633,6 +633,8 @@ class BLINK_PLATFORM_EXPORT Platform {
|
||||
virtual void DidStartWorkerThread() {}
|
||||
virtual void WillStopWorkerThread() {}
|
||||
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
|
||||
|
||||
@@ -8,3 +8,4 @@ fix_build_deprecated_attribute_for_older_msvc_versions.patch
|
||||
fix_disable_implies_dcheck_for_node_stream_array_buffers.patch
|
||||
force_cppheapcreateparams_to_be_noncopyable.patch
|
||||
chore_allow_customizing_microtask_policy_per_context.patch
|
||||
build_revert_builtins_pgo.patch
|
||||
|
||||
@@ -9,10 +9,10 @@ necessary for native modules to load.
|
||||
Also, some fixes relating to mksnapshot on ARM.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index bca193c467c25f57a2be33c96366e516d3616994..942e78e6537b8fe55545cf7a91038dc119a0c8f7 100644
|
||||
index 5cda664fdde1783c27d1242d3f3e68138ca6da82..efa9a1650f04c0fdba8fb4feb8c60fc79ce6052d 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -709,7 +709,7 @@ config("internal_config") {
|
||||
@@ -714,7 +714,7 @@ config("internal_config") {
|
||||
":cppgc_header_features",
|
||||
]
|
||||
|
||||
@@ -21,7 +21,7 @@ index bca193c467c25f57a2be33c96366e516d3616994..942e78e6537b8fe55545cf7a91038dc1
|
||||
defines += [ "BUILDING_V8_SHARED" ]
|
||||
}
|
||||
|
||||
@@ -6437,7 +6437,7 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
@@ -6451,7 +6451,7 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
"src/interpreter/bytecodes.h",
|
||||
]
|
||||
|
||||
|
||||
71
patches/v8/build_revert_builtins_pgo.patch
Normal file
71
patches/v8/build_revert_builtins_pgo.patch
Normal file
@@ -0,0 +1,71 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Keeley Hammond <vertedinde@electronjs.org>
|
||||
Date: Tue, 9 May 2023 11:44:16 -0700
|
||||
Subject: build: revert "Reland "[builtins-pgo] Enable builtins PGO for Windows
|
||||
and gcc builds""
|
||||
|
||||
This reverts commit be04b76419b55d47a696d2c9417baa0ab7d6462b.
|
||||
|
||||
This commit causes build failures on release builds across platforms. This patch
|
||||
can be removed when 1) the issue is resolved with Chromium upstream or
|
||||
2) when Electron disables builtins PGO.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 2dc5737260d544460e00b037fe62d3ecf846d46d..7434814cc3ec451a33106a8aec9648427f7d3bbb 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -578,30 +578,20 @@ if (v8_builtins_profiling_log_file == "default") {
|
||||
# are accessed,
|
||||
# * v8_enable_webassembly because it changes the set of opcodes which affects
|
||||
# graphs hashes,
|
||||
+ # * !is_clang because it might affect argument evaluation order, which
|
||||
+ # makes node IDs not predictable for subgraphs like Op1(Op2(), Op3()) and
|
||||
+ # as a result different graph hash.
|
||||
if (v8_enable_builtins_optimization && !v8_enable_builtins_profiling &&
|
||||
- !is_debug && !dcheck_always_on && v8_enable_webassembly) {
|
||||
- # This is about function arguments evaluation order, which makes node IDs
|
||||
- # not predictable for subgraphs like Op1(Op2(), Op3()) and as a result
|
||||
- # different graph hashes.
|
||||
- # Clang uses left-to-right order everywhere except Windows, otherwise the
|
||||
- # order is right-to-left.
|
||||
- # TODO(crbug.com/v8/13647): Remove once this issue is fixed in CSA.
|
||||
- if (!is_clang || is_win) {
|
||||
- pgo_profile_suffix = "-rl"
|
||||
- } else {
|
||||
- pgo_profile_suffix = ""
|
||||
- }
|
||||
+ is_clang && !is_debug && !dcheck_always_on && v8_enable_webassembly) {
|
||||
if ((v8_current_cpu == "x64" || v8_current_cpu == "arm64") &&
|
||||
v8_enable_pointer_compression && v8_enable_external_code_space &&
|
||||
v8_enable_sandbox) {
|
||||
# Note, currently x64 profile can be applied to arm64 but not the other
|
||||
# way round.
|
||||
- v8_builtins_profiling_log_file =
|
||||
- "tools/builtins-pgo/profiles/x64" + pgo_profile_suffix + ".profile"
|
||||
+ v8_builtins_profiling_log_file = "tools/builtins-pgo/profiles/x64.profile"
|
||||
} else if (v8_current_cpu == "x86" || v8_current_cpu == "arm") {
|
||||
# Note, x86 profile can be applied to arm but not the other way round.
|
||||
- v8_builtins_profiling_log_file =
|
||||
- "tools/builtins-pgo/profiles/x86" + pgo_profile_suffix + ".profile"
|
||||
+ v8_builtins_profiling_log_file = "tools/builtins-pgo/profiles/x86.profile"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2266,11 +2256,13 @@ template("run_mksnapshot") {
|
||||
args += [
|
||||
"--turbo-profiling-input",
|
||||
rebase_path(v8_builtins_profiling_log_file, root_build_dir),
|
||||
-
|
||||
- # Replace this with --warn-about-builtin-profile-data to see the full
|
||||
- # list of builtins with incompatible profiles.
|
||||
- "--abort-on-bad-builtin-profile-data",
|
||||
]
|
||||
+
|
||||
+ # Replace this with --warn-about-builtin-profile-data to see the full
|
||||
+ # list of builtins with incompatible profiles.
|
||||
+ # TODO(crbug.com/v8/13647): Do not fail for invalid profiles
|
||||
+ # args += [ "--abort-on-bad-builtin-profile-data" ]
|
||||
+ args += [ "--warn-about-builtin-profile-data" ]
|
||||
}
|
||||
|
||||
# This is needed to distinguish between generating code for the simulator
|
||||
@@ -6,7 +6,7 @@ Subject: dcheck.patch
|
||||
https://github.com/auchenberg/volkswagen
|
||||
|
||||
diff --git a/src/api/api.cc b/src/api/api.cc
|
||||
index 3f6fe87d632f9285c37bcd4d8d4298a81cee85b6..fd22728908b3a09c9d372fef102942dec7aaa75a 100644
|
||||
index 5132e4812e881c26d4f274a2c38a8ee21ede593d..d664893fca9e378853eaaae5b174679dadc75d91 100644
|
||||
--- a/src/api/api.cc
|
||||
+++ b/src/api/api.cc
|
||||
@@ -9896,7 +9896,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
|
||||
|
||||
@@ -12,10 +12,10 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
|
||||
contain any standard C++ library exports (e.g. `std::ostringstream`).
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index eb4beeceef43fafd5362b3abd42a0a79327348e3..77db34b81027dd765245e9e720159d9b41e3739a 100644
|
||||
index e8a790cfe450c88ce7d40f20a372e1249948d531..2dc5737260d544460e00b037fe62d3ecf846d46d 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -709,6 +709,10 @@ config("internal_config") {
|
||||
@@ -714,6 +714,10 @@ config("internal_config") {
|
||||
":cppgc_header_features",
|
||||
]
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
|
||||
Needed in order to target mksnapshot for mksnapshot zip.
|
||||
|
||||
diff --git a/BUILD.gn b/BUILD.gn
|
||||
index 942e78e6537b8fe55545cf7a91038dc119a0c8f7..eb4beeceef43fafd5362b3abd42a0a79327348e3 100644
|
||||
index efa9a1650f04c0fdba8fb4feb8c60fc79ce6052d..e8a790cfe450c88ce7d40f20a372e1249948d531 100644
|
||||
--- a/BUILD.gn
|
||||
+++ b/BUILD.gn
|
||||
@@ -6449,7 +6449,6 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
@@ -6463,7 +6463,6 @@ if (current_toolchain == v8_generator_toolchain) {
|
||||
|
||||
if (current_toolchain == v8_snapshot_toolchain) {
|
||||
v8_executable("mksnapshot") {
|
||||
|
||||
26
patches_npm/@octokit+request+6.2.3.patch
Normal file
26
patches_npm/@octokit+request+6.2.3.patch
Normal file
@@ -0,0 +1,26 @@
|
||||
diff --git a/node_modules/@octokit/request/dist-node/index.js b/node_modules/@octokit/request/dist-node/index.js
|
||||
index 11ac3f4..c4d9331 100644
|
||||
--- a/node_modules/@octokit/request/dist-node/index.js
|
||||
+++ b/node_modules/@octokit/request/dist-node/index.js
|
||||
@@ -29,7 +29,8 @@ function fetchWrapper(requestOptions) {
|
||||
method: requestOptions.method,
|
||||
body: requestOptions.body,
|
||||
headers: requestOptions.headers,
|
||||
- redirect: requestOptions.redirect
|
||||
+ redirect: requestOptions.redirect,
|
||||
+ ...(requestOptions.body && { duplex: "half" }),
|
||||
},
|
||||
// `requestOptions.request.agent` type is incompatible
|
||||
// see https://github.com/octokit/types.ts/pull/264
|
||||
diff --git a/node_modules/@octokit/request/dist-src/fetch-wrapper.js b/node_modules/@octokit/request/dist-src/fetch-wrapper.js
|
||||
index 223307a..15114d5 100644
|
||||
--- a/node_modules/@octokit/request/dist-src/fetch-wrapper.js
|
||||
+++ b/node_modules/@octokit/request/dist-src/fetch-wrapper.js
|
||||
@@ -21,6 +21,7 @@ export default function fetchWrapper(requestOptions) {
|
||||
body: requestOptions.body,
|
||||
headers: requestOptions.headers,
|
||||
redirect: requestOptions.redirect,
|
||||
+ ...(requestOptions.body && { duplex: "half" }),
|
||||
},
|
||||
// `requestOptions.request.agent` type is incompatible
|
||||
// see https://github.com/octokit/types.ts/pull/264
|
||||
@@ -1,334 +0,0 @@
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
|
||||
import * as MarkdownIt from 'markdown-it';
|
||||
import {
|
||||
githubSlugifier,
|
||||
resolveInternalDocumentLink,
|
||||
ExternalHref,
|
||||
FileStat,
|
||||
HrefKind,
|
||||
InternalHref,
|
||||
IMdLinkComputer,
|
||||
IMdParser,
|
||||
ITextDocument,
|
||||
IWorkspace,
|
||||
MdLink,
|
||||
MdLinkKind
|
||||
} from '@dsanders11/vscode-markdown-languageservice';
|
||||
import { Emitter, Range } from 'vscode-languageserver';
|
||||
import { TextDocument } from 'vscode-languageserver-textdocument';
|
||||
import { URI } from 'vscode-uri';
|
||||
|
||||
import { findMatchingFiles } from './utils';
|
||||
|
||||
import type { Definition, ImageReference, Link, LinkReference } from 'mdast';
|
||||
import type { fromMarkdown as FromMarkdownFunction } from 'mdast-util-from-markdown';
|
||||
import type { Node, Position } from 'unist';
|
||||
import type { visit as VisitFunction } from 'unist-util-visit';
|
||||
|
||||
// Helper function to work around import issues with ESM modules and ts-node
|
||||
// eslint-disable-next-line no-new-func
|
||||
const dynamicImport = new Function('specifier', 'return import(specifier)');
|
||||
|
||||
// Helper function from `vscode-markdown-languageservice` codebase
|
||||
function tryDecodeUri (str: string): string {
|
||||
try {
|
||||
return decodeURI(str);
|
||||
} catch {
|
||||
return str;
|
||||
}
|
||||
}
|
||||
|
||||
// Helper function from `vscode-markdown-languageservice` codebase
|
||||
function createHref (
|
||||
sourceDocUri: URI,
|
||||
link: string,
|
||||
workspace: IWorkspace
|
||||
): ExternalHref | InternalHref | undefined {
|
||||
if (/^[a-z-][a-z-]+:/i.test(link)) {
|
||||
// Looks like a uri
|
||||
return { kind: HrefKind.External, uri: URI.parse(tryDecodeUri(link)) };
|
||||
}
|
||||
|
||||
const resolved = resolveInternalDocumentLink(sourceDocUri, link, workspace);
|
||||
if (!resolved) {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
return {
|
||||
kind: HrefKind.Internal,
|
||||
path: resolved.resource,
|
||||
fragment: resolved.linkFragment
|
||||
};
|
||||
}
|
||||
|
||||
function positionToRange (position: Position): Range {
|
||||
return {
|
||||
start: {
|
||||
character: position.start.column - 1,
|
||||
line: position.start.line - 1
|
||||
},
|
||||
end: { character: position.end.column - 1, line: position.end.line - 1 }
|
||||
};
|
||||
}
|
||||
|
||||
const mdIt = MarkdownIt({ html: true });
|
||||
|
||||
export class MarkdownParser implements IMdParser {
|
||||
slugifier = githubSlugifier;
|
||||
|
||||
async tokenize (document: TextDocument) {
|
||||
return mdIt.parse(document.getText(), {});
|
||||
}
|
||||
}
|
||||
|
||||
export class DocsWorkspace implements IWorkspace {
|
||||
private readonly documentCache: Map<string, TextDocument>;
|
||||
readonly root: string;
|
||||
|
||||
constructor (root: string) {
|
||||
this.documentCache = new Map();
|
||||
this.root = root;
|
||||
}
|
||||
|
||||
get workspaceFolders () {
|
||||
return [URI.file(this.root)];
|
||||
}
|
||||
|
||||
async getAllMarkdownDocuments (): Promise<Iterable<ITextDocument>> {
|
||||
const files = await findMatchingFiles(this.root, (file) =>
|
||||
file.endsWith('.md')
|
||||
);
|
||||
|
||||
for (const file of files) {
|
||||
const document = TextDocument.create(
|
||||
URI.file(file).toString(),
|
||||
'markdown',
|
||||
1,
|
||||
fs.readFileSync(file, 'utf8')
|
||||
);
|
||||
|
||||
this.documentCache.set(file, document);
|
||||
}
|
||||
|
||||
return this.documentCache.values();
|
||||
}
|
||||
|
||||
hasMarkdownDocument (resource: URI) {
|
||||
const relativePath = path.relative(this.root, resource.path);
|
||||
return (
|
||||
!relativePath.startsWith('..') &&
|
||||
!path.isAbsolute(relativePath) &&
|
||||
fs.existsSync(resource.path)
|
||||
);
|
||||
}
|
||||
|
||||
async openMarkdownDocument (resource: URI) {
|
||||
if (!this.documentCache.has(resource.path)) {
|
||||
const document = TextDocument.create(
|
||||
resource.toString(),
|
||||
'markdown',
|
||||
1,
|
||||
fs.readFileSync(resource.path, 'utf8')
|
||||
);
|
||||
|
||||
this.documentCache.set(resource.path, document);
|
||||
}
|
||||
|
||||
return this.documentCache.get(resource.path);
|
||||
}
|
||||
|
||||
async stat (resource: URI): Promise<FileStat | undefined> {
|
||||
if (this.hasMarkdownDocument(resource)) {
|
||||
const stats = fs.statSync(resource.path);
|
||||
return { isDirectory: stats.isDirectory() };
|
||||
}
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
async readDirectory (): Promise<Iterable<readonly [string, FileStat]>> {
|
||||
throw new Error('Not implemented');
|
||||
}
|
||||
|
||||
//
|
||||
// These events are defined to fulfill the interface, but are never emitted
|
||||
// by this implementation since it's not meant for watching a workspace
|
||||
//
|
||||
|
||||
#onDidChangeMarkdownDocument = new Emitter<ITextDocument>();
|
||||
onDidChangeMarkdownDocument = this.#onDidChangeMarkdownDocument.event;
|
||||
|
||||
#onDidCreateMarkdownDocument = new Emitter<ITextDocument>();
|
||||
onDidCreateMarkdownDocument = this.#onDidCreateMarkdownDocument.event;
|
||||
|
||||
#onDidDeleteMarkdownDocument = new Emitter<URI>();
|
||||
onDidDeleteMarkdownDocument = this.#onDidDeleteMarkdownDocument.event;
|
||||
}
|
||||
|
||||
export class MarkdownLinkComputer implements IMdLinkComputer {
|
||||
private readonly workspace: IWorkspace;
|
||||
|
||||
constructor (workspace: IWorkspace) {
|
||||
this.workspace = workspace;
|
||||
}
|
||||
|
||||
async getAllLinks (document: ITextDocument): Promise<MdLink[]> {
|
||||
const { fromMarkdown } = (await dynamicImport(
|
||||
'mdast-util-from-markdown'
|
||||
)) as { fromMarkdown: typeof FromMarkdownFunction };
|
||||
|
||||
const tree = fromMarkdown(document.getText());
|
||||
|
||||
const links = [
|
||||
...(await this.#getInlineLinks(document, tree)),
|
||||
...(await this.#getReferenceLinks(document, tree)),
|
||||
...(await this.#getLinkDefinitions(document, tree))
|
||||
];
|
||||
|
||||
return links;
|
||||
}
|
||||
|
||||
async #getInlineLinks (
|
||||
document: ITextDocument,
|
||||
tree: Node
|
||||
): Promise<MdLink[]> {
|
||||
const { visit } = (await dynamicImport('unist-util-visit')) as {
|
||||
visit: typeof VisitFunction;
|
||||
};
|
||||
|
||||
const documentUri = URI.parse(document.uri);
|
||||
const links: MdLink[] = [];
|
||||
|
||||
visit(
|
||||
tree,
|
||||
(node) => node.type === 'link',
|
||||
(node: Node) => {
|
||||
const link = node as Link;
|
||||
const href = createHref(documentUri, link.url, this.workspace);
|
||||
|
||||
if (href) {
|
||||
const range = positionToRange(link.position!);
|
||||
|
||||
// NOTE - These haven't been implemented properly, but their
|
||||
// values aren't used for the link linting use-case
|
||||
const targetRange = range;
|
||||
const hrefRange = range;
|
||||
const fragmentRange = undefined;
|
||||
|
||||
links.push({
|
||||
kind: MdLinkKind.Link,
|
||||
href,
|
||||
source: {
|
||||
hrefText: link.url,
|
||||
resource: documentUri,
|
||||
range,
|
||||
targetRange,
|
||||
hrefRange,
|
||||
fragmentRange,
|
||||
pathText: link.url.split('#')[0]
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
return links;
|
||||
}
|
||||
|
||||
async #getReferenceLinks (
|
||||
document: ITextDocument,
|
||||
tree: Node
|
||||
): Promise<MdLink[]> {
|
||||
const { visit } = (await dynamicImport('unist-util-visit')) as {
|
||||
visit: typeof VisitFunction;
|
||||
};
|
||||
|
||||
const links: MdLink[] = [];
|
||||
|
||||
visit(
|
||||
tree,
|
||||
(node) => ['imageReference', 'linkReference'].includes(node.type),
|
||||
(node: Node) => {
|
||||
const link = node as ImageReference | LinkReference;
|
||||
const range = positionToRange(link.position!);
|
||||
|
||||
// NOTE - These haven't been implemented properly, but their
|
||||
// values aren't used for the link linting use-case
|
||||
const targetRange = range;
|
||||
const hrefRange = range;
|
||||
|
||||
links.push({
|
||||
kind: MdLinkKind.Link,
|
||||
href: {
|
||||
kind: HrefKind.Reference,
|
||||
ref: link.label!
|
||||
},
|
||||
source: {
|
||||
hrefText: link.label!,
|
||||
resource: URI.parse(document.uri),
|
||||
range,
|
||||
targetRange,
|
||||
hrefRange,
|
||||
fragmentRange: undefined,
|
||||
pathText: link.label!
|
||||
}
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
return links;
|
||||
}
|
||||
|
||||
async #getLinkDefinitions (
|
||||
document: ITextDocument,
|
||||
tree: Node
|
||||
): Promise<MdLink[]> {
|
||||
const { visit } = (await dynamicImport('unist-util-visit')) as {
|
||||
visit: typeof VisitFunction;
|
||||
};
|
||||
|
||||
const documentUri = URI.parse(document.uri);
|
||||
const links: MdLink[] = [];
|
||||
|
||||
visit(
|
||||
tree,
|
||||
(node) => node.type === 'definition',
|
||||
(node: Node) => {
|
||||
const definition = node as Definition;
|
||||
const href = createHref(documentUri, definition.url, this.workspace);
|
||||
|
||||
if (href) {
|
||||
const range = positionToRange(definition.position!);
|
||||
|
||||
// NOTE - These haven't been implemented properly, but their
|
||||
// values aren't used for the link linting use-case
|
||||
const targetRange = range;
|
||||
const hrefRange = range;
|
||||
const fragmentRange = undefined;
|
||||
|
||||
links.push({
|
||||
kind: MdLinkKind.Definition,
|
||||
href,
|
||||
ref: {
|
||||
range,
|
||||
text: definition.label!
|
||||
},
|
||||
source: {
|
||||
hrefText: definition.url,
|
||||
resource: documentUri,
|
||||
range,
|
||||
targetRange,
|
||||
hrefRange,
|
||||
fragmentRange,
|
||||
pathText: definition.url.split('#')[0]
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
return links;
|
||||
}
|
||||
}
|
||||
@@ -1,177 +0,0 @@
|
||||
#!/usr/bin/env ts-node
|
||||
|
||||
import * as path from 'path';
|
||||
|
||||
import {
|
||||
createLanguageService,
|
||||
DiagnosticLevel,
|
||||
DiagnosticOptions,
|
||||
ILogger
|
||||
} from '@dsanders11/vscode-markdown-languageservice';
|
||||
import * as minimist from 'minimist';
|
||||
import fetch from 'node-fetch';
|
||||
import { CancellationTokenSource } from 'vscode-languageserver';
|
||||
import { URI } from 'vscode-uri';
|
||||
|
||||
import {
|
||||
DocsWorkspace,
|
||||
MarkdownLinkComputer,
|
||||
MarkdownParser
|
||||
} from './lib/markdown';
|
||||
|
||||
class NoOpLogger implements ILogger {
|
||||
log (): void {}
|
||||
}
|
||||
|
||||
const diagnosticOptions: DiagnosticOptions = {
|
||||
ignoreLinks: [],
|
||||
validateDuplicateLinkDefinitions: DiagnosticLevel.error,
|
||||
validateFileLinks: DiagnosticLevel.error,
|
||||
validateFragmentLinks: DiagnosticLevel.error,
|
||||
validateMarkdownFileLinkFragments: DiagnosticLevel.error,
|
||||
validateReferences: DiagnosticLevel.error,
|
||||
validateUnusedLinkDefinitions: DiagnosticLevel.error
|
||||
};
|
||||
|
||||
async function fetchExternalLink (link: string, checkRedirects = false) {
|
||||
try {
|
||||
const response = await fetch(link);
|
||||
if (response.status !== 200) {
|
||||
console.log('Broken link', link, response.status, response.statusText);
|
||||
} else {
|
||||
if (checkRedirects && response.redirected) {
|
||||
const wwwUrl = new URL(link);
|
||||
wwwUrl.hostname = `www.${wwwUrl.hostname}`;
|
||||
|
||||
// For now cut down on noise to find meaningful redirects
|
||||
const wwwRedirect = wwwUrl.toString() === response.url;
|
||||
const trailingSlashRedirect = `${link}/` === response.url;
|
||||
|
||||
if (!wwwRedirect && !trailingSlashRedirect) {
|
||||
console.log('Link redirection', link, '->', response.url);
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
} catch {
|
||||
console.log('Broken link', link);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
async function main ({ fetchExternalLinks = false, checkRedirects = false }) {
|
||||
const workspace = new DocsWorkspace(path.resolve(__dirname, '..', 'docs'));
|
||||
const parser = new MarkdownParser();
|
||||
const linkComputer = new MarkdownLinkComputer(workspace);
|
||||
const languageService = createLanguageService({
|
||||
workspace,
|
||||
parser,
|
||||
logger: new NoOpLogger(),
|
||||
linkComputer
|
||||
});
|
||||
|
||||
const cts = new CancellationTokenSource();
|
||||
let errors = false;
|
||||
|
||||
const externalLinks = new Set<string>();
|
||||
|
||||
try {
|
||||
// Collect diagnostics for all documents in the workspace
|
||||
for (const document of await workspace.getAllMarkdownDocuments()) {
|
||||
for (let link of await languageService.getDocumentLinks(
|
||||
document,
|
||||
cts.token
|
||||
)) {
|
||||
if (link.target === undefined) {
|
||||
link =
|
||||
(await languageService.resolveDocumentLink(link, cts.token)) ??
|
||||
link;
|
||||
}
|
||||
|
||||
if (
|
||||
link.target &&
|
||||
link.target.startsWith('http') &&
|
||||
new URL(link.target).hostname !== 'localhost'
|
||||
) {
|
||||
externalLinks.add(link.target);
|
||||
}
|
||||
}
|
||||
const diagnostics = await languageService.computeDiagnostics(
|
||||
document,
|
||||
diagnosticOptions,
|
||||
cts.token
|
||||
);
|
||||
|
||||
if (diagnostics.length) {
|
||||
console.log(
|
||||
'File Location:',
|
||||
path.relative(workspace.root, URI.parse(document.uri).path)
|
||||
);
|
||||
}
|
||||
|
||||
for (const diagnostic of diagnostics) {
|
||||
console.log(
|
||||
`\tBroken link on line ${diagnostic.range.start.line + 1}:`,
|
||||
diagnostic.message
|
||||
);
|
||||
errors = true;
|
||||
}
|
||||
}
|
||||
} finally {
|
||||
cts.dispose();
|
||||
}
|
||||
|
||||
if (fetchExternalLinks) {
|
||||
const externalLinkStates = await Promise.all(
|
||||
Array.from(externalLinks).map((link) =>
|
||||
fetchExternalLink(link, checkRedirects)
|
||||
)
|
||||
);
|
||||
|
||||
errors = errors || !externalLinkStates.every((x) => x);
|
||||
}
|
||||
|
||||
return errors;
|
||||
}
|
||||
|
||||
function parseCommandLine () {
|
||||
const showUsage = (arg?: string): boolean => {
|
||||
if (!arg || arg.startsWith('-')) {
|
||||
console.log(
|
||||
'Usage: script/lint-docs-links.ts [-h|--help] [--fetch-external-links] ' +
|
||||
'[--check-redirects]'
|
||||
);
|
||||
process.exit(0);
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
const opts = minimist(process.argv.slice(2), {
|
||||
boolean: ['help', 'fetch-external-links', 'check-redirects'],
|
||||
stopEarly: true,
|
||||
unknown: showUsage
|
||||
});
|
||||
|
||||
if (opts.help) showUsage();
|
||||
|
||||
return opts;
|
||||
}
|
||||
|
||||
if (process.mainModule === module) {
|
||||
const opts = parseCommandLine();
|
||||
|
||||
main({
|
||||
fetchExternalLinks: opts['fetch-external-links'],
|
||||
checkRedirects: opts['check-redirects']
|
||||
})
|
||||
.then((errors) => {
|
||||
if (errors) process.exit(1);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
process.exit(1);
|
||||
});
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
const { addError, getLineMetadata, getReferenceLinkImageData } = require('markdownlint/helpers');
|
||||
|
||||
module.exports = {
|
||||
names: ['EMD001', 'no-shortcut-reference-links'],
|
||||
description:
|
||||
'Disallow shortcut reference links (those with no link label)',
|
||||
tags: ['images', 'links'],
|
||||
function: function EMD001 (params, onError) {
|
||||
const lineMetadata = getLineMetadata(params);
|
||||
const { shortcuts } = getReferenceLinkImageData(lineMetadata);
|
||||
for (const [shortcut, occurrences] of shortcuts) {
|
||||
for (const [lineNumber] of occurrences) {
|
||||
addError(
|
||||
onError,
|
||||
lineNumber + 1, // human-friendly line numbers (1-based)
|
||||
`Disallowed shortcut reference link: "${shortcut}"`
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -118,7 +118,6 @@
|
||||
#include "shell/common/gin_helper/dictionary.h"
|
||||
#include "shell/common/gin_helper/object_template_builder.h"
|
||||
#include "shell/common/language_util.h"
|
||||
#include "shell/common/mouse_util.h"
|
||||
#include "shell/common/node_includes.h"
|
||||
#include "shell/common/options_switches.h"
|
||||
#include "shell/common/process_util.h"
|
||||
@@ -382,6 +381,101 @@ namespace electron::api {
|
||||
|
||||
namespace {
|
||||
|
||||
std::string CursorTypeToString(const ui::Cursor& cursor) {
|
||||
switch (cursor.type()) {
|
||||
case ui::mojom::CursorType::kPointer:
|
||||
return "default";
|
||||
case ui::mojom::CursorType::kCross:
|
||||
return "crosshair";
|
||||
case ui::mojom::CursorType::kHand:
|
||||
return "pointer";
|
||||
case ui::mojom::CursorType::kIBeam:
|
||||
return "text";
|
||||
case ui::mojom::CursorType::kWait:
|
||||
return "wait";
|
||||
case ui::mojom::CursorType::kHelp:
|
||||
return "help";
|
||||
case ui::mojom::CursorType::kEastResize:
|
||||
return "e-resize";
|
||||
case ui::mojom::CursorType::kNorthResize:
|
||||
return "n-resize";
|
||||
case ui::mojom::CursorType::kNorthEastResize:
|
||||
return "ne-resize";
|
||||
case ui::mojom::CursorType::kNorthWestResize:
|
||||
return "nw-resize";
|
||||
case ui::mojom::CursorType::kSouthResize:
|
||||
return "s-resize";
|
||||
case ui::mojom::CursorType::kSouthEastResize:
|
||||
return "se-resize";
|
||||
case ui::mojom::CursorType::kSouthWestResize:
|
||||
return "sw-resize";
|
||||
case ui::mojom::CursorType::kWestResize:
|
||||
return "w-resize";
|
||||
case ui::mojom::CursorType::kNorthSouthResize:
|
||||
return "ns-resize";
|
||||
case ui::mojom::CursorType::kEastWestResize:
|
||||
return "ew-resize";
|
||||
case ui::mojom::CursorType::kNorthEastSouthWestResize:
|
||||
return "nesw-resize";
|
||||
case ui::mojom::CursorType::kNorthWestSouthEastResize:
|
||||
return "nwse-resize";
|
||||
case ui::mojom::CursorType::kColumnResize:
|
||||
return "col-resize";
|
||||
case ui::mojom::CursorType::kRowResize:
|
||||
return "row-resize";
|
||||
case ui::mojom::CursorType::kMiddlePanning:
|
||||
return "m-panning";
|
||||
case ui::mojom::CursorType::kEastPanning:
|
||||
return "e-panning";
|
||||
case ui::mojom::CursorType::kNorthPanning:
|
||||
return "n-panning";
|
||||
case ui::mojom::CursorType::kNorthEastPanning:
|
||||
return "ne-panning";
|
||||
case ui::mojom::CursorType::kNorthWestPanning:
|
||||
return "nw-panning";
|
||||
case ui::mojom::CursorType::kSouthPanning:
|
||||
return "s-panning";
|
||||
case ui::mojom::CursorType::kSouthEastPanning:
|
||||
return "se-panning";
|
||||
case ui::mojom::CursorType::kSouthWestPanning:
|
||||
return "sw-panning";
|
||||
case ui::mojom::CursorType::kWestPanning:
|
||||
return "w-panning";
|
||||
case ui::mojom::CursorType::kMove:
|
||||
return "move";
|
||||
case ui::mojom::CursorType::kVerticalText:
|
||||
return "vertical-text";
|
||||
case ui::mojom::CursorType::kCell:
|
||||
return "cell";
|
||||
case ui::mojom::CursorType::kContextMenu:
|
||||
return "context-menu";
|
||||
case ui::mojom::CursorType::kAlias:
|
||||
return "alias";
|
||||
case ui::mojom::CursorType::kProgress:
|
||||
return "progress";
|
||||
case ui::mojom::CursorType::kNoDrop:
|
||||
return "nodrop";
|
||||
case ui::mojom::CursorType::kCopy:
|
||||
return "copy";
|
||||
case ui::mojom::CursorType::kNone:
|
||||
return "none";
|
||||
case ui::mojom::CursorType::kNotAllowed:
|
||||
return "not-allowed";
|
||||
case ui::mojom::CursorType::kZoomIn:
|
||||
return "zoom-in";
|
||||
case ui::mojom::CursorType::kZoomOut:
|
||||
return "zoom-out";
|
||||
case ui::mojom::CursorType::kGrab:
|
||||
return "grab";
|
||||
case ui::mojom::CursorType::kGrabbing:
|
||||
return "grabbing";
|
||||
case ui::mojom::CursorType::kCustom:
|
||||
return "custom";
|
||||
default:
|
||||
return "default";
|
||||
}
|
||||
}
|
||||
|
||||
base::IDMap<WebContents*>& GetAllWebContents() {
|
||||
static base::NoDestructor<base::IDMap<WebContents*>> s_all_web_contents;
|
||||
return *s_all_web_contents;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//electron/buildflags/buildflags.gni")
|
||||
import("//extensions/buildflags/buildflags.gni")
|
||||
import("//tools/json_schema_compiler/json_schema_api.gni")
|
||||
|
||||
@@ -14,6 +15,12 @@ function_registration("api_registration") {
|
||||
"//electron/shell/common/extensions/api/resources_private.idl",
|
||||
"//electron/shell/common/extensions/api/tabs.json",
|
||||
]
|
||||
|
||||
if (enable_pdf_viewer) {
|
||||
sources +=
|
||||
[ "//electron/shell/common/extensions/api/pdf_viewer_private.idl" ]
|
||||
}
|
||||
|
||||
impl_dir = "//electron/shell/browser/extensions/api"
|
||||
configs = [ "//build/config:precompiled_headers" ]
|
||||
bundle_name = "Electron"
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
// Copyright 2022 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include "shell/browser/extensions/api/pdf_viewer_private/pdf_viewer_private_api.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "base/values.h"
|
||||
#include "chrome/common/extensions/api/pdf_viewer_private.h"
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "shell/browser/electron_browser_context.h"
|
||||
#include "url/url_constants.h"
|
||||
|
||||
namespace extensions {
|
||||
|
||||
namespace {
|
||||
|
||||
namespace IsAllowedLocalFileAccess =
|
||||
api::pdf_viewer_private::IsAllowedLocalFileAccess;
|
||||
|
||||
namespace SetPdfOcrPref = api::pdf_viewer_private::SetPdfOcrPref;
|
||||
|
||||
// Check if the current URL is allowed based on a list of allowlisted domains.
|
||||
bool IsUrlAllowedToEmbedLocalFiles(
|
||||
const GURL& current_url,
|
||||
const base::Value::List& allowlisted_domains) {
|
||||
if (!current_url.is_valid() || !current_url.SchemeIs(url::kHttpsScheme)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
for (auto const& value : allowlisted_domains) {
|
||||
const std::string* domain = value.GetIfString();
|
||||
if (!domain) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (current_url.DomainIs(*domain)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
PdfViewerPrivateIsAllowedLocalFileAccessFunction::
|
||||
PdfViewerPrivateIsAllowedLocalFileAccessFunction() = default;
|
||||
|
||||
PdfViewerPrivateIsAllowedLocalFileAccessFunction::
|
||||
~PdfViewerPrivateIsAllowedLocalFileAccessFunction() = default;
|
||||
|
||||
ExtensionFunction::ResponseAction
|
||||
PdfViewerPrivateIsAllowedLocalFileAccessFunction::Run() {
|
||||
absl::optional<IsAllowedLocalFileAccess::Params> params =
|
||||
IsAllowedLocalFileAccess::Params::Create(args());
|
||||
EXTENSION_FUNCTION_VALIDATE(params);
|
||||
|
||||
return RespondNow(WithArguments(
|
||||
IsUrlAllowedToEmbedLocalFiles(GURL(params->url), base::Value::List())));
|
||||
}
|
||||
|
||||
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction::
|
||||
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction() = default;
|
||||
|
||||
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction::
|
||||
~PdfViewerPrivateIsPdfOcrAlwaysActiveFunction() = default;
|
||||
|
||||
// TODO(codebytere): enable when https://crbug.com/1393069 works properly.
|
||||
ExtensionFunction::ResponseAction
|
||||
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction::Run() {
|
||||
return RespondNow(WithArguments(false));
|
||||
}
|
||||
|
||||
PdfViewerPrivateSetPdfOcrPrefFunction::PdfViewerPrivateSetPdfOcrPrefFunction() =
|
||||
default;
|
||||
|
||||
PdfViewerPrivateSetPdfOcrPrefFunction::
|
||||
~PdfViewerPrivateSetPdfOcrPrefFunction() = default;
|
||||
|
||||
// TODO(codebytere): enable when https://crbug.com/1393069 works properly.
|
||||
ExtensionFunction::ResponseAction PdfViewerPrivateSetPdfOcrPrefFunction::Run() {
|
||||
absl::optional<SetPdfOcrPref::Params> params =
|
||||
SetPdfOcrPref::Params::Create(args());
|
||||
EXTENSION_FUNCTION_VALIDATE(params);
|
||||
return RespondNow(WithArguments(false));
|
||||
}
|
||||
|
||||
} // namespace extensions
|
||||
@@ -0,0 +1,69 @@
|
||||
// Copyright 2022 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_BROWSER_EXTENSIONS_API_PDF_VIEWER_PRIVATE_PDF_VIEWER_PRIVATE_API_H_
|
||||
#define ELECTRON_SHELL_BROWSER_EXTENSIONS_API_PDF_VIEWER_PRIVATE_PDF_VIEWER_PRIVATE_API_H_
|
||||
|
||||
#include "extensions/browser/extension_function.h"
|
||||
|
||||
namespace extensions {
|
||||
|
||||
class PdfViewerPrivateIsAllowedLocalFileAccessFunction
|
||||
: public ExtensionFunction {
|
||||
public:
|
||||
DECLARE_EXTENSION_FUNCTION("pdfViewerPrivate.isAllowedLocalFileAccess",
|
||||
PDFVIEWERPRIVATE_ISALLOWEDLOCALFILEACCESS)
|
||||
|
||||
PdfViewerPrivateIsAllowedLocalFileAccessFunction();
|
||||
PdfViewerPrivateIsAllowedLocalFileAccessFunction(
|
||||
const PdfViewerPrivateIsAllowedLocalFileAccessFunction&) = delete;
|
||||
PdfViewerPrivateIsAllowedLocalFileAccessFunction& operator=(
|
||||
const PdfViewerPrivateIsAllowedLocalFileAccessFunction&) = delete;
|
||||
|
||||
protected:
|
||||
~PdfViewerPrivateIsAllowedLocalFileAccessFunction() override;
|
||||
|
||||
// Override from ExtensionFunction:
|
||||
ResponseAction Run() override;
|
||||
};
|
||||
|
||||
class PdfViewerPrivateIsPdfOcrAlwaysActiveFunction : public ExtensionFunction {
|
||||
public:
|
||||
DECLARE_EXTENSION_FUNCTION("pdfViewerPrivate.isPdfOcrAlwaysActive",
|
||||
PDFVIEWERPRIVATE_ISPDFOCRALWAYSACTIVE)
|
||||
|
||||
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction();
|
||||
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction(
|
||||
const PdfViewerPrivateIsPdfOcrAlwaysActiveFunction&) = delete;
|
||||
PdfViewerPrivateIsPdfOcrAlwaysActiveFunction& operator=(
|
||||
const PdfViewerPrivateIsPdfOcrAlwaysActiveFunction&) = delete;
|
||||
|
||||
protected:
|
||||
~PdfViewerPrivateIsPdfOcrAlwaysActiveFunction() override;
|
||||
|
||||
// Override from ExtensionFunction:
|
||||
ResponseAction Run() override;
|
||||
};
|
||||
|
||||
class PdfViewerPrivateSetPdfOcrPrefFunction : public ExtensionFunction {
|
||||
public:
|
||||
DECLARE_EXTENSION_FUNCTION("pdfViewerPrivate.setPdfOcrPref",
|
||||
PDFVIEWERPRIVATE_SETPDFOCRPREF)
|
||||
|
||||
PdfViewerPrivateSetPdfOcrPrefFunction();
|
||||
PdfViewerPrivateSetPdfOcrPrefFunction(
|
||||
const PdfViewerPrivateSetPdfOcrPrefFunction&) = delete;
|
||||
PdfViewerPrivateSetPdfOcrPrefFunction& operator=(
|
||||
const PdfViewerPrivateSetPdfOcrPrefFunction&) = delete;
|
||||
|
||||
protected:
|
||||
~PdfViewerPrivateSetPdfOcrPrefFunction() override;
|
||||
|
||||
// Override from ExtensionFunction:
|
||||
ResponseAction Run() override;
|
||||
};
|
||||
|
||||
} // namespace extensions
|
||||
|
||||
#endif // ELECTRON_SHELL_BROWSER_EXTENSIONS_API_PDF_VIEWER_PRIVATE_PDF_VIEWER_PRIVATE_API_H_
|
||||
@@ -25,7 +25,7 @@
|
||||
|
||||
// To add a new component to this API, simply:
|
||||
// 1. Add your component to the Component enum in
|
||||
// chrome/common/extensions/api/resources_private.idl
|
||||
// shell/common/extensions/api/resources_private.idl
|
||||
// 2. Create an AddStringsForMyComponent(base::Value::Dict* dict) method.
|
||||
// 3. Tie in that method to the switch statement in Run()
|
||||
|
||||
|
||||
@@ -6,15 +6,16 @@
|
||||
|
||||
#include "base/functional/callback.h"
|
||||
#include "base/time/time.h"
|
||||
#include "services/device/public/mojom/geoposition.mojom-shared.h"
|
||||
#include "services/device/public/mojom/geoposition.mojom.h"
|
||||
|
||||
namespace electron {
|
||||
|
||||
FakeLocationProvider::FakeLocationProvider() {
|
||||
position_.latitude = 10;
|
||||
position_.longitude = -10;
|
||||
position_.accuracy = 1;
|
||||
position_.error_code =
|
||||
device::mojom::Geoposition::ErrorCode::POSITION_UNAVAILABLE;
|
||||
result_ = device::mojom::GeopositionResult::NewError(
|
||||
device::mojom::GeopositionError::New(
|
||||
device::mojom::GeopositionErrorCode::kPositionUnavailable,
|
||||
"Position unavailable.", ""));
|
||||
}
|
||||
|
||||
FakeLocationProvider::~FakeLocationProvider() = default;
|
||||
@@ -28,16 +29,13 @@ void FakeLocationProvider::StartProvider(bool high_accuracy) {}
|
||||
|
||||
void FakeLocationProvider::StopProvider() {}
|
||||
|
||||
const device::mojom::Geoposition& FakeLocationProvider::GetPosition() {
|
||||
return position_;
|
||||
const device::mojom::GeopositionResult* FakeLocationProvider::GetPosition() {
|
||||
return result_.get();
|
||||
}
|
||||
|
||||
void FakeLocationProvider::OnPermissionGranted() {
|
||||
if (!callback_.is_null()) {
|
||||
// Check device::ValidateGeoPosition for range of values.
|
||||
position_.error_code = device::mojom::Geoposition::ErrorCode::NONE;
|
||||
position_.timestamp = base::Time::Now();
|
||||
callback_.Run(this, position_);
|
||||
callback_.Run(this, result_.Clone());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,11 +24,11 @@ class FakeLocationProvider : public device::LocationProvider {
|
||||
const LocationProviderUpdateCallback& callback) override;
|
||||
void StartProvider(bool high_accuracy) override;
|
||||
void StopProvider() override;
|
||||
const device::mojom::Geoposition& GetPosition() override;
|
||||
const device::mojom::GeopositionResult* GetPosition() override;
|
||||
void OnPermissionGranted() override;
|
||||
|
||||
private:
|
||||
device::mojom::Geoposition position_;
|
||||
device::mojom::GeopositionResultPtr result_;
|
||||
LocationProviderUpdateCallback callback_;
|
||||
};
|
||||
|
||||
|
||||
@@ -29,8 +29,6 @@
|
||||
#include "content/public/browser/file_select_listener.h"
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/render_widget_host_view.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
#include "net/base/filename_util.h"
|
||||
#include "net/base/mime_util.h"
|
||||
@@ -46,8 +44,6 @@ using blink::mojom::FileChooserFileInfoPtr;
|
||||
using blink::mojom::FileChooserParams;
|
||||
using blink::mojom::FileChooserParamsPtr;
|
||||
using content::BrowserThread;
|
||||
using content::RenderViewHost;
|
||||
using content::RenderWidgetHost;
|
||||
using content::WebContents;
|
||||
|
||||
namespace {
|
||||
@@ -379,9 +375,7 @@ void FileSelectHelper::RunFileChooser(
|
||||
render_frame_host_ = render_frame_host;
|
||||
web_contents_ = WebContents::FromRenderFrameHost(render_frame_host);
|
||||
listener_ = std::move(listener);
|
||||
observation_.Reset();
|
||||
content::WebContentsObserver::Observe(web_contents_);
|
||||
observation_.Observe(render_frame_host_->GetRenderViewHost()->GetWidget());
|
||||
|
||||
base::ThreadPool::PostTask(
|
||||
FROM_HERE, {base::MayBlock()},
|
||||
@@ -520,13 +514,6 @@ void FileSelectHelper::EnumerateDirectoryEnd() {
|
||||
Release();
|
||||
}
|
||||
|
||||
void FileSelectHelper::RenderWidgetHostDestroyed(
|
||||
content::RenderWidgetHost* widget_host) {
|
||||
render_frame_host_ = nullptr;
|
||||
DCHECK(observation_.IsObservingSource(widget_host));
|
||||
observation_.Reset();
|
||||
}
|
||||
|
||||
void FileSelectHelper::RenderFrameHostChanged(
|
||||
content::RenderFrameHost* old_host,
|
||||
content::RenderFrameHost* new_host) {
|
||||
|
||||
@@ -42,7 +42,6 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
|
||||
content::BrowserThread::DeleteOnUIThread>,
|
||||
public ui::SelectFileDialog::Listener,
|
||||
public content::WebContentsObserver,
|
||||
public content::RenderWidgetHostObserver,
|
||||
private net::DirectoryLister::DirectoryListerDelegate {
|
||||
public:
|
||||
// disable copy
|
||||
@@ -98,10 +97,6 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
|
||||
void* params) override;
|
||||
void FileSelectionCanceled(void* params) override;
|
||||
|
||||
// content::RenderWidgetHostObserver overrides.
|
||||
void RenderWidgetHostDestroyed(
|
||||
content::RenderWidgetHost* widget_host) override;
|
||||
|
||||
// content::WebContentsObserver overrides.
|
||||
void RenderFrameHostChanged(content::RenderFrameHost* old_host,
|
||||
content::RenderFrameHost* new_host) override;
|
||||
@@ -220,10 +215,6 @@ class FileSelectHelper : public base::RefCountedThreadSafe<
|
||||
struct ActiveDirectoryEnumeration;
|
||||
std::unique_ptr<ActiveDirectoryEnumeration> directory_enumeration_;
|
||||
|
||||
base::ScopedObservation<content::RenderWidgetHost,
|
||||
content::RenderWidgetHostObserver>
|
||||
observation_{this};
|
||||
|
||||
// Temporary files only used on OSX. This class is responsible for deleting
|
||||
// these files when they are no longer needed.
|
||||
std::vector<base::FilePath> temporary_files_;
|
||||
|
||||
@@ -94,9 +94,8 @@ class ElectronHidDelegate : public content::HidDelegate,
|
||||
namespace base {
|
||||
|
||||
template <>
|
||||
struct base::ScopedObservationTraits<
|
||||
electron::HidChooserContext,
|
||||
electron::HidChooserContext::DeviceObserver> {
|
||||
struct ScopedObservationTraits<electron::HidChooserContext,
|
||||
electron::HidChooserContext::DeviceObserver> {
|
||||
static void AddObserver(
|
||||
electron::HidChooserContext* source,
|
||||
electron::HidChooserContext::DeviceObserver* observer) {
|
||||
|
||||
@@ -175,11 +175,40 @@ inline void dispatch_sync_main(dispatch_block_t block) {
|
||||
electron::Browser::Get()->OpenURL(base::SysNSStringToUTF8(url));
|
||||
}
|
||||
|
||||
// Returns the list of accessibility attributes that this object supports.
|
||||
- (NSArray*)accessibilityAttributeNames {
|
||||
NSMutableArray* attributes =
|
||||
[[super accessibilityAttributeNames] mutableCopy];
|
||||
[attributes addObject:@"AXManualAccessibility"];
|
||||
return attributes;
|
||||
}
|
||||
|
||||
// Returns whether or not the specified attribute can be set by the
|
||||
// accessibility API via |accessibilitySetValue:forAttribute:|.
|
||||
- (BOOL)accessibilityIsAttributeSettable:(NSString*)attribute {
|
||||
bool is_manual_ax = [attribute isEqualToString:@"AXManualAccessibility"];
|
||||
return is_manual_ax || [super accessibilityIsAttributeSettable:attribute];
|
||||
}
|
||||
|
||||
// Returns the accessibility value for the given attribute. If the value isn't
|
||||
// supported this will return nil.
|
||||
- (id)accessibilityAttributeValue:(NSString*)attribute {
|
||||
if ([attribute isEqualToString:@"AXManualAccessibility"]) {
|
||||
auto* ax_state = content::BrowserAccessibilityState::GetInstance();
|
||||
return [NSNumber numberWithBool:ax_state->IsAccessibleBrowser()];
|
||||
}
|
||||
|
||||
return [super accessibilityAttributeValue:attribute];
|
||||
}
|
||||
|
||||
// Sets the value for an accessibility attribute via the accessibility API.
|
||||
// AXEnhancedUserInterface is an undocumented attribute that screen reader
|
||||
// related functionality sets when running, and AXManualAccessibility is an
|
||||
// attribute Electron specifically allows third-party apps to use to enable
|
||||
// a11y features in Electron.
|
||||
- (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
|
||||
// Undocumented attribute that screen reader related functionality
|
||||
// sets when running.
|
||||
if ([attribute isEqualToString:@"AXEnhancedUserInterface"] ||
|
||||
[attribute isEqualToString:@"AXManualAccessibility"]) {
|
||||
bool is_manual_ax = [attribute isEqualToString:@"AXManualAccessibility"];
|
||||
if ([attribute isEqualToString:@"AXEnhancedUserInterface"] || is_manual_ax) {
|
||||
auto* ax_state = content::BrowserAccessibilityState::GetInstance();
|
||||
if ([value boolValue]) {
|
||||
ax_state->OnScreenReaderDetected();
|
||||
@@ -188,6 +217,12 @@ inline void dispatch_sync_main(dispatch_block_t block) {
|
||||
}
|
||||
|
||||
electron::Browser::Get()->OnAccessibilitySupportChanged();
|
||||
|
||||
// Don't call the superclass function for AXManualAccessibility,
|
||||
// as it will log an AXError and make it appear as though the attribute
|
||||
// failed to take effect.
|
||||
if (is_manual_ax)
|
||||
return;
|
||||
}
|
||||
|
||||
return [super accessibilitySetValue:value forAttribute:attribute];
|
||||
|
||||
@@ -388,7 +388,6 @@ void OffScreenRenderWidgetHostView::TakeFallbackContentFrom(
|
||||
GetDelegatedFrameHost()->TakeFallbackContentFrom(
|
||||
view_osr->GetDelegatedFrameHost());
|
||||
}
|
||||
host()->GetContentRenderingTimeoutFrom(view_osr->host());
|
||||
}
|
||||
|
||||
void OffScreenRenderWidgetHostView::ResetFallbackToFirstNavigationSurface() {
|
||||
|
||||
@@ -83,9 +83,8 @@ class ElectronSerialDelegate : public content::SerialDelegate,
|
||||
namespace base {
|
||||
|
||||
template <>
|
||||
struct base::ScopedObservationTraits<
|
||||
electron::SerialChooserContext,
|
||||
electron::SerialChooserContext::PortObserver> {
|
||||
struct ScopedObservationTraits<electron::SerialChooserContext,
|
||||
electron::SerialChooserContext::PortObserver> {
|
||||
static void AddObserver(
|
||||
electron::SerialChooserContext* source,
|
||||
electron::SerialChooserContext::PortObserver* observer) {
|
||||
|
||||
@@ -5,9 +5,9 @@
|
||||
#ifndef ELECTRON_SHELL_BROWSER_UI_COCOA_EVENT_DISPATCHING_WINDOW_H_
|
||||
#define ELECTRON_SHELL_BROWSER_UI_COCOA_EVENT_DISPATCHING_WINDOW_H_
|
||||
|
||||
#import "ui/base/cocoa/underlay_opengl_hosting_window.h"
|
||||
#import <Cocoa/Cocoa.h>
|
||||
|
||||
@interface EventDispatchingWindow : UnderlayOpenGLHostingWindow {
|
||||
@interface EventDispatchingWindow : NSWindow {
|
||||
@private
|
||||
BOOL redispatchingEvent_;
|
||||
}
|
||||
|
||||
@@ -321,6 +321,10 @@ ElectronAccessibilityUI::ElectronAccessibilityUI(content::WebUI* web_ui)
|
||||
base::BindRepeating(&HandleAccessibilityRequestCallback,
|
||||
web_ui->GetWebContents()->GetBrowserContext()));
|
||||
|
||||
html_source->OverrideContentSecurityPolicy(
|
||||
network::mojom::CSPDirectiveName::TrustedTypes,
|
||||
"trusted-types parse-html-subset sanitize-inner-html;");
|
||||
|
||||
web_ui->AddMessageHandler(
|
||||
std::make_unique<ElectronAccessibilityUIMessageHandler>());
|
||||
}
|
||||
|
||||
@@ -226,7 +226,7 @@ void WebContentsPreferences::SetFromDictionary(
|
||||
// preferences don't save a transparency option,
|
||||
// apply any existing transparency setting to background_color_
|
||||
bool transparent;
|
||||
if (web_preferences.Get(options::kTransparent, &transparent)) {
|
||||
if (web_preferences.Get(options::kTransparent, &transparent) && transparent) {
|
||||
background_color_ = SK_ColorTRANSPARENT;
|
||||
}
|
||||
std::string background_color;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
import("//electron/buildflags/buildflags.gni")
|
||||
import("//extensions/buildflags/buildflags.gni")
|
||||
import("//tools/json_schema_compiler/json_features.gni")
|
||||
import("//tools/json_schema_compiler/json_schema_api.gni")
|
||||
@@ -41,6 +42,10 @@ generated_json_strings("generated_api_json_strings") {
|
||||
"tabs.json",
|
||||
]
|
||||
|
||||
if (enable_pdf_viewer) {
|
||||
sources += [ "pdf_viewer_private.idl" ]
|
||||
}
|
||||
|
||||
configs = [ "//build/config:precompiled_headers" ]
|
||||
bundle_name = "Electron"
|
||||
schema_include_rules = "extensions/common/api:extensions::api::%(namespace)s"
|
||||
@@ -56,6 +61,11 @@ generated_types("generated_api_types") {
|
||||
"resources_private.idl",
|
||||
"tabs.json",
|
||||
]
|
||||
|
||||
if (enable_pdf_viewer) {
|
||||
sources += [ "pdf_viewer_private.idl" ]
|
||||
}
|
||||
|
||||
configs = [ "//build/config:precompiled_headers" ]
|
||||
schema_include_rules = "extensions/common/api:extensions::api::%(namespace)s"
|
||||
|
||||
|
||||
@@ -28,6 +28,10 @@
|
||||
"channel": "stable",
|
||||
"matches": ["<all_urls>"]
|
||||
},
|
||||
"pdfViewerPrivate": {
|
||||
"dependencies": ["permission:pdfViewerPrivate"],
|
||||
"contexts": ["blessed_extension"]
|
||||
},
|
||||
"resourcesPrivate": [{
|
||||
"dependencies": ["permission:resourcesPrivate"],
|
||||
"contexts": ["blessed_extension"]
|
||||
|
||||
@@ -6,6 +6,15 @@
|
||||
],
|
||||
"location": "component"
|
||||
},
|
||||
"pdfViewerPrivate": {
|
||||
"channel": "stable",
|
||||
"extension_types": [
|
||||
"extension"
|
||||
],
|
||||
"allowlist": [
|
||||
"CBCC42ABED43A4B58FE3810E62AFFA010EB0349F"
|
||||
]
|
||||
},
|
||||
"management": {
|
||||
"channel": "stable",
|
||||
"extension_types": [
|
||||
|
||||
39
shell/common/extensions/api/pdf_viewer_private.idl
Normal file
39
shell/common/extensions/api/pdf_viewer_private.idl
Normal file
@@ -0,0 +1,39 @@
|
||||
// Copyright 2022 The Chromium Authors
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Use the <code>chrome.pdfViewerPrivate</code> API for specific browser
|
||||
// functionality that the PDF Viewer needs from outside the PDF plugin. This API
|
||||
// is exclusively for the PDF Viewer.
|
||||
namespace pdfViewerPrivate {
|
||||
callback IsAllowedLocalFileAccessCallback = void(boolean result);
|
||||
callback IsPdfOcrAlwaysActiveCallback = void(boolean result);
|
||||
callback OnPdfOcrPrefSetCallback = void(boolean result);
|
||||
|
||||
interface Functions {
|
||||
// Determines if the given URL should be allowed to access local files from
|
||||
// the PDF Viewer. |callback|: Called with true if URL should be allowed to
|
||||
// access local files from the PDF Viewer, false otherwise.
|
||||
[supportsPromises] static void isAllowedLocalFileAccess(
|
||||
DOMString url,
|
||||
IsAllowedLocalFileAccessCallback callback);
|
||||
|
||||
// Determines if the preference for PDF OCR is set to run PDF OCR always.
|
||||
// |callback|: Called with true if PDF OCR is set to be always active;
|
||||
// false otherwise.
|
||||
[supportsPromises] static void isPdfOcrAlwaysActive(
|
||||
IsPdfOcrAlwaysActiveCallback callback);
|
||||
|
||||
// Sets a pref value for PDF OCR.
|
||||
// |value|: The new value of the pref.
|
||||
// |callback|: The callback for whether the pref was set or not.
|
||||
[supportsPromises] static void setPdfOcrPref(
|
||||
boolean value, OnPdfOcrPrefSetCallback callback);
|
||||
};
|
||||
|
||||
interface Events {
|
||||
// Fired when a pref value for PDF OCR has changed.
|
||||
// |value| The pref value that changed.
|
||||
static void onPdfOcrPrefChanged(boolean value);
|
||||
};
|
||||
};
|
||||
@@ -34,6 +34,9 @@ constexpr APIPermissionInfo::InitInfo permissions_to_register[] = {
|
||||
APIPermissionInfo::kFlagInternal},
|
||||
{mojom::APIPermissionID::kResourcesPrivate, "resourcesPrivate",
|
||||
APIPermissionInfo::kFlagCannotBeOptional},
|
||||
#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
{mojom::APIPermissionID::kPdfViewerPrivate, "pdfViewerPrivate"},
|
||||
#endif
|
||||
{mojom::APIPermissionID::kManagement, "management"},
|
||||
};
|
||||
base::span<const APIPermissionInfo::InitInfo> GetPermissionInfos() {
|
||||
|
||||
@@ -1,109 +0,0 @@
|
||||
// Copyright (c) 2015 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "shell/common/mouse_util.h"
|
||||
#include "ui/base/cursor/mojom/cursor_type.mojom-shared.h"
|
||||
|
||||
using Cursor = ui::mojom::CursorType;
|
||||
|
||||
namespace electron {
|
||||
|
||||
std::string CursorTypeToString(const ui::Cursor& cursor) {
|
||||
switch (cursor.type()) {
|
||||
case Cursor::kPointer:
|
||||
return "default";
|
||||
case Cursor::kCross:
|
||||
return "crosshair";
|
||||
case Cursor::kHand:
|
||||
return "pointer";
|
||||
case Cursor::kIBeam:
|
||||
return "text";
|
||||
case Cursor::kWait:
|
||||
return "wait";
|
||||
case Cursor::kHelp:
|
||||
return "help";
|
||||
case Cursor::kEastResize:
|
||||
return "e-resize";
|
||||
case Cursor::kNorthResize:
|
||||
return "n-resize";
|
||||
case Cursor::kNorthEastResize:
|
||||
return "ne-resize";
|
||||
case Cursor::kNorthWestResize:
|
||||
return "nw-resize";
|
||||
case Cursor::kSouthResize:
|
||||
return "s-resize";
|
||||
case Cursor::kSouthEastResize:
|
||||
return "se-resize";
|
||||
case Cursor::kSouthWestResize:
|
||||
return "sw-resize";
|
||||
case Cursor::kWestResize:
|
||||
return "w-resize";
|
||||
case Cursor::kNorthSouthResize:
|
||||
return "ns-resize";
|
||||
case Cursor::kEastWestResize:
|
||||
return "ew-resize";
|
||||
case Cursor::kNorthEastSouthWestResize:
|
||||
return "nesw-resize";
|
||||
case Cursor::kNorthWestSouthEastResize:
|
||||
return "nwse-resize";
|
||||
case Cursor::kColumnResize:
|
||||
return "col-resize";
|
||||
case Cursor::kRowResize:
|
||||
return "row-resize";
|
||||
case Cursor::kMiddlePanning:
|
||||
return "m-panning";
|
||||
case Cursor::kEastPanning:
|
||||
return "e-panning";
|
||||
case Cursor::kNorthPanning:
|
||||
return "n-panning";
|
||||
case Cursor::kNorthEastPanning:
|
||||
return "ne-panning";
|
||||
case Cursor::kNorthWestPanning:
|
||||
return "nw-panning";
|
||||
case Cursor::kSouthPanning:
|
||||
return "s-panning";
|
||||
case Cursor::kSouthEastPanning:
|
||||
return "se-panning";
|
||||
case Cursor::kSouthWestPanning:
|
||||
return "sw-panning";
|
||||
case Cursor::kWestPanning:
|
||||
return "w-panning";
|
||||
case Cursor::kMove:
|
||||
return "move";
|
||||
case Cursor::kVerticalText:
|
||||
return "vertical-text";
|
||||
case Cursor::kCell:
|
||||
return "cell";
|
||||
case Cursor::kContextMenu:
|
||||
return "context-menu";
|
||||
case Cursor::kAlias:
|
||||
return "alias";
|
||||
case Cursor::kProgress:
|
||||
return "progress";
|
||||
case Cursor::kNoDrop:
|
||||
return "nodrop";
|
||||
case Cursor::kCopy:
|
||||
return "copy";
|
||||
case Cursor::kNone:
|
||||
return "none";
|
||||
case Cursor::kNotAllowed:
|
||||
return "not-allowed";
|
||||
case Cursor::kZoomIn:
|
||||
return "zoom-in";
|
||||
case Cursor::kZoomOut:
|
||||
return "zoom-out";
|
||||
case Cursor::kGrab:
|
||||
return "grab";
|
||||
case Cursor::kGrabbing:
|
||||
return "grabbing";
|
||||
case Cursor::kCustom:
|
||||
return "custom";
|
||||
default:
|
||||
return "default";
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace electron
|
||||
@@ -1,34 +0,0 @@
|
||||
// Copyright (c) 2015 GitHub, Inc.
|
||||
// Use of this source code is governed by the MIT license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
#ifndef ELECTRON_SHELL_COMMON_MOUSE_UTIL_H_
|
||||
#define ELECTRON_SHELL_COMMON_MOUSE_UTIL_H_
|
||||
|
||||
#include <string>
|
||||
#include "ipc/ipc_message_macros.h"
|
||||
#include "ui/base/cursor/cursor.h"
|
||||
|
||||
// IPC macros similar to the already existing ones in the chromium source.
|
||||
// We need these to listen to the cursor change IPC message while still
|
||||
// letting chromium handle the actual cursor change by setting handled = false.
|
||||
#define IPC_MESSAGE_HANDLER_CODE(msg_class, member_func, code) \
|
||||
IPC_MESSAGE_FORWARD_CODE(msg_class, this, \
|
||||
_IpcMessageHandlerClass::member_func, code)
|
||||
|
||||
#define IPC_MESSAGE_FORWARD_CODE(msg_class, obj, member_func, code) \
|
||||
case msg_class::ID: { \
|
||||
if (!msg_class::Dispatch(&ipc_message__, obj, this, param__, \
|
||||
&member_func)) \
|
||||
ipc_message__.set_dispatch_error(); \
|
||||
code; \
|
||||
} break;
|
||||
|
||||
namespace electron {
|
||||
|
||||
// Returns the cursor's type as a string.
|
||||
std::string CursorTypeToString(const ui::Cursor& cursor);
|
||||
|
||||
} // namespace electron
|
||||
|
||||
#endif // ELECTRON_SHELL_COMMON_MOUSE_UTIL_H_
|
||||
@@ -2227,13 +2227,17 @@ describe('BrowserWindow module', () => {
|
||||
expect(w.isAlwaysOnTop()).to.be.true('is not alwaysOnTop');
|
||||
});
|
||||
|
||||
ifit(process.platform === 'darwin')('resets the windows level on minimize', () => {
|
||||
ifit(process.platform === 'darwin')('resets the windows level on minimize', async () => {
|
||||
expect(w.isAlwaysOnTop()).to.be.false('is alwaysOnTop');
|
||||
w.setAlwaysOnTop(true, 'screen-saver');
|
||||
expect(w.isAlwaysOnTop()).to.be.true('is not alwaysOnTop');
|
||||
const minimized = once(w, 'minimize');
|
||||
w.minimize();
|
||||
await minimized;
|
||||
expect(w.isAlwaysOnTop()).to.be.false('is alwaysOnTop');
|
||||
const restored = once(w, 'restore');
|
||||
w.restore();
|
||||
await restored;
|
||||
expect(w.isAlwaysOnTop()).to.be.true('is not alwaysOnTop');
|
||||
});
|
||||
|
||||
@@ -6013,7 +6017,7 @@ describe('BrowserWindow module', () => {
|
||||
});
|
||||
|
||||
// Linux and arm64 platforms (WOA and macOS) do not return any capture sources
|
||||
ifit(process.platform === 'darwin' && process.arch !== 'x64')('should not display a visible background', async () => {
|
||||
ifit(process.platform === 'darwin' && process.arch === 'x64')('should not display a visible background', async () => {
|
||||
const display = screen.getPrimaryDisplay();
|
||||
|
||||
const backgroundWindow = new BrowserWindow({
|
||||
@@ -6086,6 +6090,32 @@ describe('BrowserWindow module', () => {
|
||||
|
||||
expect(areColorsSimilar(centerColor, HexColors.PURPLE)).to.be.true();
|
||||
});
|
||||
|
||||
// Linux and arm64 platforms (WOA and macOS) do not return any capture sources
|
||||
ifit(process.platform === 'darwin' && process.arch === 'x64')('should not make background transparent if falsy', async () => {
|
||||
const display = screen.getPrimaryDisplay();
|
||||
|
||||
for (const transparent of [false, undefined]) {
|
||||
const window = new BrowserWindow({
|
||||
...display.bounds,
|
||||
transparent
|
||||
});
|
||||
|
||||
await once(window, 'show');
|
||||
await window.webContents.loadURL('data:text/html,<head><meta name="color-scheme" content="dark"></head>');
|
||||
|
||||
await setTimeout(500);
|
||||
const screenCapture = await captureScreen();
|
||||
const centerColor = getPixelColor(screenCapture, {
|
||||
x: display.size.width / 2,
|
||||
y: display.size.height / 2
|
||||
});
|
||||
window.close();
|
||||
|
||||
// color-scheme is set to dark so background should not be white
|
||||
expect(areColorsSimilar(centerColor, HexColors.WHITE)).to.be.false();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('"backgroundColor" option', () => {
|
||||
|
||||
@@ -4,7 +4,11 @@ import { BaseWindow, WebContentsView } from 'electron/main';
|
||||
|
||||
describe('WebContentsView', () => {
|
||||
let w: BaseWindow;
|
||||
afterEach(() => closeWindow(w as any).then(() => { w = null as unknown as BaseWindow; }));
|
||||
|
||||
afterEach(async () => {
|
||||
await closeWindow(w as any);
|
||||
w = null as unknown as BaseWindow;
|
||||
});
|
||||
|
||||
it('can be used as content view', () => {
|
||||
w = new BaseWindow({ show: false });
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user