mirror of
https://github.com/electron/electron.git
synced 2026-02-26 03:01:17 -05:00
Compare commits
92 Commits
v12.0.0-be
...
v12.0.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
05972074e3 | ||
|
|
21ac61270a | ||
|
|
f0500fae4c | ||
|
|
5f2f4182c4 | ||
|
|
ac8db00a70 | ||
|
|
ab5d0f4c8b | ||
|
|
203116867b | ||
|
|
67a67270f5 | ||
|
|
83a3eb64ec | ||
|
|
8b1260184a | ||
|
|
f13ddca55f | ||
|
|
f1c4265072 | ||
|
|
f5de5e9131 | ||
|
|
a73949315c | ||
|
|
189f7e0e4e | ||
|
|
2950f03e83 | ||
|
|
ca417e435c | ||
|
|
5237108396 | ||
|
|
3ae63c9a06 | ||
|
|
8828382b23 | ||
|
|
0e714d19c5 | ||
|
|
aec412e35d | ||
|
|
4b2d791212 | ||
|
|
fd629c16cb | ||
|
|
007c960f3c | ||
|
|
b2636e171a | ||
|
|
e7e1801443 | ||
|
|
0baf9997ad | ||
|
|
e65e989650 | ||
|
|
26a18c26d7 | ||
|
|
a52c88ec4d | ||
|
|
0ee559cd29 | ||
|
|
dfed04b71b | ||
|
|
d628fa07b5 | ||
|
|
f0c7789544 | ||
|
|
d00e869560 | ||
|
|
b70e42024a | ||
|
|
44adc8ddb4 | ||
|
|
9e30fe0f96 | ||
|
|
7180b2b13f | ||
|
|
c734baf8d4 | ||
|
|
a859436f7a | ||
|
|
3144f992f7 | ||
|
|
98f57a20e7 | ||
|
|
f6007654f9 | ||
|
|
84a4a7a944 | ||
|
|
1b6e3596f2 | ||
|
|
573784967c | ||
|
|
d55b399976 | ||
|
|
b8941d084d | ||
|
|
afffbadf5b | ||
|
|
c3bce9c664 | ||
|
|
33f6ff40fc | ||
|
|
777f23af0d | ||
|
|
f6992db54b | ||
|
|
8cdd20e97a | ||
|
|
962f1aa7d4 | ||
|
|
0961044dc8 | ||
|
|
e1f06510f8 | ||
|
|
b6bdbcf485 | ||
|
|
417230a67a | ||
|
|
fe876bd55b | ||
|
|
4e372b888f | ||
|
|
74ef45315b | ||
|
|
f7d8c806ae | ||
|
|
d4de0b5e50 | ||
|
|
35daa4801a | ||
|
|
5db929ffc1 | ||
|
|
f6b81990fc | ||
|
|
7c67c1d0ee | ||
|
|
509efee4af | ||
|
|
7fa87565c0 | ||
|
|
c67c3aaf74 | ||
|
|
cc4db3359d | ||
|
|
5dbb6356ef | ||
|
|
0c5b6bfd30 | ||
|
|
9faf23509d | ||
|
|
b4ae35a63d | ||
|
|
025abfc1ba | ||
|
|
563bb8559f | ||
|
|
30be5bfa4b | ||
|
|
28fa60fbcb | ||
|
|
37c68d56d6 | ||
|
|
da58ded8f9 | ||
|
|
80a3f10b6b | ||
|
|
889abd0c8e | ||
|
|
0305f08888 | ||
|
|
0604f8727c | ||
|
|
551896c4ce | ||
|
|
c11a5dcf29 | ||
|
|
b86eb74fbf | ||
|
|
e49a88ba53 |
@@ -308,7 +308,7 @@ step-setup-goma-for-build: &step-setup-goma-for-build
|
||||
npm install
|
||||
mkdir third_party
|
||||
node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })"
|
||||
node -e "require('./src/utils/goma.js').ensure()"
|
||||
third_party/goma/goma_ctl.py ensure_start
|
||||
echo 'export GN_GOMA_FILE='`node -e "console.log(require('./src/utils/goma.js').gnFilePath)"` >> $BASH_ENV
|
||||
echo 'export LOCAL_GOMA_DIR='`node -e "console.log(require('./src/utils/goma.js').dir)"` >> $BASH_ENV
|
||||
cd ..
|
||||
@@ -447,9 +447,6 @@ step-fix-sync-on-mac: &step-fix-sync-on-mac
|
||||
# Fix Clang Install (wrong binary)
|
||||
rm -rf src/third_party/llvm-build
|
||||
python src/tools/clang/scripts/update.py
|
||||
# Fix Framework Header Installs (symlinks not retained)
|
||||
rm -rf src/electron/external_binaries
|
||||
python src/electron/script/update-external-binaries.py
|
||||
fi
|
||||
|
||||
step-install-signing-cert-on-mac: &step-install-signing-cert-on-mac
|
||||
|
||||
5
BUILD.gn
5
BUILD.gn
@@ -337,7 +337,6 @@ source_set("electron_lib") {
|
||||
"//components/viz/service",
|
||||
"//content/public/browser",
|
||||
"//content/public/child",
|
||||
"//content/public/common:service_names",
|
||||
"//content/public/gpu",
|
||||
"//content/public/renderer",
|
||||
"//content/public/utility",
|
||||
@@ -649,6 +648,7 @@ source_set("electron_lib") {
|
||||
}
|
||||
if (enable_pdf_viewer) {
|
||||
deps += [
|
||||
"//chrome/browser/resources/pdf:pdf_resources",
|
||||
"//components/pdf/browser",
|
||||
"//components/pdf/renderer",
|
||||
"//pdf:pdf_ppapi",
|
||||
@@ -992,6 +992,9 @@ if (is_mac) {
|
||||
deps = [
|
||||
":electron_app_framework_bundle_data",
|
||||
":electron_app_resources",
|
||||
":electron_fuses",
|
||||
"//base",
|
||||
"//electron/buildflags",
|
||||
]
|
||||
if (is_mas_build) {
|
||||
deps += [ ":electron_login_helper_app" ]
|
||||
|
||||
4
DEPS
4
DEPS
@@ -14,9 +14,9 @@ gclient_gn_args = [
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'89.0.4348.1',
|
||||
'89.0.4389.82',
|
||||
'node_version':
|
||||
'v14.15.1',
|
||||
'v14.16.0',
|
||||
'nan_version':
|
||||
'2c4ee8a32a299eada3cd6e468bbd0a473bfea96d',
|
||||
'squirrel.mac_version':
|
||||
|
||||
@@ -1 +1 @@
|
||||
12.0.0-beta.18
|
||||
12.0.1
|
||||
@@ -29,15 +29,12 @@ The preferred method is to install Electron as a development dependency in your
|
||||
app:
|
||||
|
||||
```sh
|
||||
npm install electron --save-dev [--save-exact]
|
||||
npm install electron --save-dev
|
||||
```
|
||||
|
||||
The `--save-exact` flag is recommended for Electron prior to version 2, as it does not follow semantic
|
||||
versioning. As of version 2.0.0, Electron follows semver, so you don't need `--save-exact` flag. For info on how to manage Electron versions in your apps, see
|
||||
[Electron versioning](docs/tutorial/electron-versioning.md).
|
||||
|
||||
For more installation options and troubleshooting tips, see
|
||||
[installation](docs/tutorial/installation.md).
|
||||
[installation](docs/tutorial/installation.md). For info on how to manage Electron versions in your apps, see
|
||||
[Electron versioning](docs/tutorial/electron-versioning.md).
|
||||
|
||||
## Quick start & Electron Fiddle
|
||||
|
||||
|
||||
@@ -93,6 +93,6 @@ steps:
|
||||
condition: always()
|
||||
|
||||
- powershell: |
|
||||
Remove-Item -path $env:APPDATA/Electron* -Recurse
|
||||
Remove-Item -path $env:APPDATA/Electron* -Recurse -Force -ErrorAction Ignore
|
||||
displayName: 'Delete user app data directories'
|
||||
condition: always()
|
||||
|
||||
@@ -217,8 +217,6 @@ static_library("chrome") {
|
||||
"//chrome/browser/printing/print_view_manager_basic.h",
|
||||
"//chrome/browser/printing/printer_query.cc",
|
||||
"//chrome/browser/printing/printer_query.h",
|
||||
"//chrome/browser/printing/printing_message_filter.cc",
|
||||
"//chrome/browser/printing/printing_message_filter.h",
|
||||
"//chrome/browser/printing/printing_service.cc",
|
||||
"//chrome/browser/printing/printing_service.h",
|
||||
]
|
||||
|
||||
@@ -148,6 +148,7 @@ These individual tutorials expand on topics discussed in the guide above.
|
||||
|
||||
### Modules for the Renderer Process (Web Page):
|
||||
|
||||
* [contextBridge](api/context-bridge.md)
|
||||
* [desktopCapturer](api/desktop-capturer.md)
|
||||
* [ipcRenderer](api/ipc-renderer.md)
|
||||
* [remote](api/remote.md)
|
||||
|
||||
@@ -391,7 +391,7 @@ which contains more information about why the render process disappeared. It
|
||||
isn't always because it crashed. The `killed` boolean can be replaced by
|
||||
checking `reason === 'killed'` when you switch to that event.
|
||||
|
||||
#### Event: 'render-process-gone'
|
||||
### Event: 'render-process-gone'
|
||||
|
||||
Returns:
|
||||
|
||||
@@ -406,11 +406,14 @@ Returns:
|
||||
* `oom` - Process ran out of memory
|
||||
* `launch-failed` - Process never successfully launched
|
||||
* `integrity-failure` - Windows code integrity checks failed
|
||||
* `exitCode` Integer - The exit code of the process, unless `reason` is
|
||||
`launch-failed`, in which case `exitCode` will be a platform-specific
|
||||
launch failure error code.
|
||||
|
||||
Emitted when the renderer process unexpectedly disappears. This is normally
|
||||
because it was crashed or killed.
|
||||
|
||||
#### Event: 'child-process-gone'
|
||||
### Event: 'child-process-gone'
|
||||
|
||||
Returns:
|
||||
|
||||
|
||||
@@ -337,7 +337,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
|
||||
more details.
|
||||
* `contextIsolation` Boolean (optional) - Whether to run Electron APIs and
|
||||
the specified `preload` script in a separate JavaScript context. Defaults
|
||||
to `false`. The context that the `preload` script runs in will only have
|
||||
to `true`. The context that the `preload` script runs in will only have
|
||||
access to its own dedicated `document` and `window` globals, as well as
|
||||
its own set of JavaScript builtins (`Array`, `Object`, `JSON`, etc.),
|
||||
which are all invisible to the loaded content. The Electron API will only
|
||||
@@ -349,8 +349,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
|
||||
context in the dev tools by selecting the 'Electron Isolated Context'
|
||||
entry in the combo box at the top of the Console tab.
|
||||
* `worldSafeExecuteJavaScript` Boolean (optional) - If true, values returned from `webFrame.executeJavaScript` will be sanitized to ensure JS values
|
||||
can't unsafely cross between worlds when using `contextIsolation`. The default
|
||||
is `false`. In Electron 12, the default will be changed to `true`. _Deprecated_
|
||||
can't unsafely cross between worlds when using `contextIsolation`. Defaults to `true`. _Deprecated_
|
||||
* `nativeWindowOpen` Boolean (optional) - Whether to use native
|
||||
`window.open()`. Defaults to `false`. Child windows will always have node
|
||||
integration disabled unless `nodeIntegrationInSubFrames` is true. **Note:** This option is currently
|
||||
@@ -735,7 +734,7 @@ The method will also not return if the extension's manifest is missing or incomp
|
||||
is emitted.
|
||||
|
||||
**Note:** This method is deprecated. Instead, use
|
||||
[`ses.loadExtension(path)`](session.md#sesloadextensionpath).
|
||||
[`ses.loadExtension(path)`](session.md#sesloadextensionpath-options).
|
||||
|
||||
#### `BrowserWindow.removeExtension(name)` _Deprecated_
|
||||
|
||||
@@ -777,7 +776,7 @@ The method will also not return if the extension's manifest is missing or incomp
|
||||
is emitted.
|
||||
|
||||
**Note:** This method is deprecated. Instead, use
|
||||
[`ses.loadExtension(path)`](session.md#sesloadextensionpath).
|
||||
[`ses.loadExtension(path)`](session.md#sesloadextensionpath-options).
|
||||
|
||||
#### `BrowserWindow.removeDevToolsExtension(name)` _Deprecated_
|
||||
|
||||
@@ -1457,7 +1456,7 @@ Returns `Boolean` - Whether the window's document has been edited.
|
||||
|
||||
Returns `Promise<NativeImage>` - Resolves with a [NativeImage](native-image.md)
|
||||
|
||||
Captures a snapshot of the page within `rect`. Omitting `rect` will capture the whole visible page.
|
||||
Captures a snapshot of the page within `rect`. Omitting `rect` will capture the whole visible page. If the page is not visible, `rect` may be empty.
|
||||
|
||||
#### `win.loadURL(url[, options])`
|
||||
|
||||
@@ -1867,6 +1866,13 @@ Replacement API for setBrowserView supporting work with multi browser views.
|
||||
|
||||
* `browserView` [BrowserView](browser-view.md)
|
||||
|
||||
#### `win.setTopBrowserView(browserView)` _Experimental_
|
||||
|
||||
* `browserView` [BrowserView](browser-view.md)
|
||||
|
||||
Raises `browserView` above other `BrowserView`s attached to `win`.
|
||||
Throws an error if `browserView` is not attached to `win`.
|
||||
|
||||
#### `win.getBrowserViews()` _Experimental_
|
||||
|
||||
Returns `BrowserView[]` - an array of all BrowserViews that have been attached
|
||||
|
||||
@@ -15,7 +15,7 @@ extension capabilities.
|
||||
|
||||
Electron only supports loading unpacked extensions (i.e., `.crx` files do not
|
||||
work). Extensions are installed per-`session`. To load an extension, call
|
||||
[`ses.loadExtension`](session.md#sesloadextensionpath):
|
||||
[`ses.loadExtension`](session.md#sesloadextensionpath-options):
|
||||
|
||||
```js
|
||||
const { session } = require('electron')
|
||||
|
||||
@@ -62,10 +62,9 @@ included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
|
||||
throw an exception.
|
||||
|
||||
> **NOTE:** Sending non-standard JavaScript types such as DOM objects or
|
||||
> special Electron objects is deprecated, and will begin throwing an exception
|
||||
> starting with Electron 9.
|
||||
|
||||
> **NOTE:** Since the main process does not have support for DOM objects such as
|
||||
> special Electron objects will throw an exception.
|
||||
>
|
||||
> Since the main process does not have support for DOM objects such as
|
||||
> `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over
|
||||
> Electron's IPC to the main process, as the main process would have no way to decode
|
||||
> them. Attempting to send such objects over IPC will result in an error.
|
||||
@@ -90,11 +89,10 @@ Algorithm][SCA], just like [`window.postMessage`][], so prototype chains will no
|
||||
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
|
||||
throw an exception.
|
||||
|
||||
> **NOTE**: Sending non-standard JavaScript types such as DOM objects or
|
||||
> special Electron objects is deprecated, and will begin throwing an exception
|
||||
> starting with Electron 9.
|
||||
|
||||
> **NOTE:** Since the main process does not have support for DOM objects such as
|
||||
> **NOTE:** Sending non-standard JavaScript types such as DOM objects or
|
||||
> special Electron objects will throw an exception.
|
||||
>
|
||||
> Since the main process does not have support for DOM objects such as
|
||||
> `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over
|
||||
> Electron's IPC to the main process, as the main process would have no way to decode
|
||||
> them. Attempting to send such objects over IPC will result in an error.
|
||||
@@ -134,11 +132,10 @@ Algorithm][SCA], just like [`window.postMessage`][], so prototype chains will no
|
||||
included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
|
||||
throw an exception.
|
||||
|
||||
> **NOTE**: Sending non-standard JavaScript types such as DOM objects or
|
||||
> special Electron objects is deprecated, and will begin throwing an exception
|
||||
> starting with Electron 9.
|
||||
|
||||
> **NOTE:** Since the main process does not have support for DOM objects such as
|
||||
> **NOTE:** Sending non-standard JavaScript types such as DOM objects or
|
||||
> special Electron objects will throw an exception.
|
||||
>
|
||||
> Since the main process does not have support for DOM objects such as
|
||||
> `ImageBitmap`, `File`, `DOMMatrix` and so on, such objects cannot be sent over
|
||||
> Electron's IPC to the main process, as the main process would have no way to decode
|
||||
> them. Attempting to send such objects over IPC will result in an error.
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
## Modernization
|
||||
|
||||
The Electron team is currently undergoing an initiative to modernize our API in a few concrete ways. These include: updating our modules to use idiomatic JS properties instead of separate `getPropertyX` and `setPropertyX`, converting callbacks to promises, and removing some other anti-patterns present in our APIs. The current status of the Promise initiative can be tracked in the [promisification](promisification.md) tracking file.
|
||||
|
||||
As we work to perform these updates, we seek to create the least disruptive amount of change at any given time, so as many changes as possible will be introduced in a backward compatible manner and deprecated after enough time has passed to give users a chance to upgrade their API calls.
|
||||
|
||||
This document and its child documents will be updated to reflect the latest status of our API changes.
|
||||
|
||||
* [Promisification](promisification.md)
|
||||
* [Property Updates](property-updates.md)
|
||||
@@ -1,42 +0,0 @@
|
||||
## Promisification
|
||||
|
||||
The Electron team recently underwent an initiative to convert callback-based APIs to Promise-based ones. See converted functions below:
|
||||
|
||||
- [app.getFileIcon(path[, options], callback)](https://github.com/electron/electron/blob/master/docs/api/app.md#getFileIcon)
|
||||
- [contents.capturePage([rect, ]callback)](https://github.com/electron/electron/blob/master/docs/api/web-contents.md#capturePage)
|
||||
- [contents.executeJavaScript(code[, userGesture, callback])](https://github.com/electron/electron/blob/master/docs/api/web-contents.md#executeJavaScript)
|
||||
- [contents.printToPDF(options, callback)](https://github.com/electron/electron/blob/master/docs/api/web-contents.md#printToPDF)
|
||||
- [contents.savePage(fullPath, saveType, callback)](https://github.com/electron/electron/blob/master/docs/api/web-contents.md#savePage)
|
||||
- [contentTracing.getCategories(callback)](https://github.com/electron/electron/blob/master/docs/api/content-tracing.md#getCategories)
|
||||
- [contentTracing.startRecording(options, callback)](https://github.com/electron/electron/blob/master/docs/api/content-tracing.md#startRecording)
|
||||
- [contentTracing.stopRecording(resultFilePath, callback)](https://github.com/electron/electron/blob/master/docs/api/content-tracing.md#stopRecording)
|
||||
- [contentTracing.getTraceBufferUsage(callback)](https://github.com/electron/electron/blob/master/docs/api/content-tracing.md#getTraceBufferUsage)
|
||||
- [cookies.flushStore(callback)](https://github.com/electron/electron/blob/master/docs/api/cookies.md#flushStore)
|
||||
- [cookies.get(filter, callback)](https://github.com/electron/electron/blob/master/docs/api/cookies.md#get)
|
||||
- [cookies.remove(url, name, callback)](https://github.com/electron/electron/blob/master/docs/api/cookies.md#remove)
|
||||
- [cookies.set(details, callback)](https://github.com/electron/electron/blob/master/docs/api/cookies.md#set)
|
||||
- [debugger.sendCommand(method[, commandParams, callback])](https://github.com/electron/electron/blob/master/docs/api/debugger.md#sendCommand)
|
||||
- [desktopCapturer.getSources(options, callback)](https://github.com/electron/electron/blob/master/docs/api/desktop-capturer.md#getSources)
|
||||
- [dialog.showOpenDialog([browserWindow, ]options[, callback])](https://github.com/electron/electron/blob/master/docs/api/dialog.md#showOpenDialog)
|
||||
- [dialog.showSaveDialog([browserWindow, ]options[, callback])](https://github.com/electron/electron/blob/master/docs/api/dialog.md#showSaveDialog)
|
||||
- [inAppPurchase.purchaseProduct(productID, quantity, callback)](https://github.com/electron/electron/blob/master/docs/api/in-app-purchase.md#purchaseProduct)
|
||||
- [inAppPurchase.getProducts(productIDs, callback)](https://github.com/electron/electron/blob/master/docs/api/in-app-purchase.md#getProducts)
|
||||
- [dialog.showMessageBox([browserWindow, ]options[, callback])](https://github.com/electron/electron/blob/master/docs/api/dialog.md#showMessageBox)
|
||||
- [dialog.showCertificateTrustDialog([browserWindow, ]options, callback)](https://github.com/electron/electron/blob/master/docs/api/dialog.md#showCertificateTrustDialog)
|
||||
- [netLog.stopLogging([callback])](https://github.com/electron/electron/blob/master/docs/api/net-log.md#stopLogging)
|
||||
- [protocol.isProtocolHandled(scheme, callback)](https://github.com/electron/electron/blob/master/docs/api/protocol.md#isProtocolHandled)
|
||||
- [ses.clearHostResolverCache([callback])](https://github.com/electron/electron/blob/master/docs/api/session.md#clearHostResolverCache)
|
||||
- [ses.clearStorageData([options, callback])](https://github.com/electron/electron/blob/master/docs/api/session.md#clearStorageData)
|
||||
- [ses.setProxy(config, callback)](https://github.com/electron/electron/blob/master/docs/api/session.md#setProxy)
|
||||
- [ses.resolveProxy(url, callback)](https://github.com/electron/electron/blob/master/docs/api/session.md#resolveProxy)
|
||||
- [ses.getCacheSize(callback)](https://github.com/electron/electron/blob/master/docs/api/session.md#getCacheSize)
|
||||
- [ses.clearAuthCache(options[, callback])](https://github.com/electron/electron/blob/master/docs/api/session.md#clearAuthCache)
|
||||
- [ses.clearCache(callback)](https://github.com/electron/electron/blob/master/docs/api/session.md#clearCache)
|
||||
- [ses.getBlobData(identifier, callback)](https://github.com/electron/electron/blob/master/docs/api/session.md#getBlobData)
|
||||
- [shell.openExternal(url[, options, callback])](https://github.com/electron/electron/blob/master/docs/api/shell.md#openExternal)
|
||||
- [webFrame.executeJavaScript(code[, userGesture, callback])](https://github.com/electron/electron/blob/master/docs/api/web-frame.md#executeJavaScript)
|
||||
- [webFrame.executeJavaScriptInIsolatedWorld(worldId, scripts[, userGesture, callback])](https://github.com/electron/electron/blob/master/docs/api/web-frame.md#executeJavaScriptInIsolatedWorld)
|
||||
- [webviewTag.capturePage([rect, ]callback)](https://github.com/electron/electron/blob/master/docs/api/webview-tag.md#capturePage)
|
||||
- [webviewTag.executeJavaScript(code[, userGesture, callback])](https://github.com/electron/electron/blob/master/docs/api/webview-tag.md#executeJavaScript)
|
||||
- [webviewTag.printToPDF(options, callback)](https://github.com/electron/electron/blob/master/docs/api/webview-tag.md#printToPDF)
|
||||
- [win.capturePage([rect, ]callback)](https://github.com/electron/electron/blob/master/docs/api/browser-window.md#capturePage)
|
||||
@@ -1,41 +0,0 @@
|
||||
## Property Updates
|
||||
|
||||
The Electron team is currently undergoing an initiative to convert separate getter and setter functions in Electron to bespoke properties with `get` and `set` functionality. During this transition period, both the new properties and old getters and setters of these functions will work correctly and be documented.
|
||||
|
||||
## Candidates
|
||||
|
||||
* `BrowserWindow`
|
||||
* `menubarVisible`
|
||||
* `crashReporter` module
|
||||
* `uploadToServer`
|
||||
* `webFrame` modules
|
||||
* `zoomFactor`
|
||||
* `zoomLevel`
|
||||
* `audioMuted`
|
||||
* `<webview>`
|
||||
* `zoomFactor`
|
||||
* `zoomLevel`
|
||||
* `audioMuted`
|
||||
|
||||
## Converted Properties
|
||||
|
||||
* `app` module
|
||||
* `accessibilitySupport`
|
||||
* `applicationMenu`
|
||||
* `badgeCount`
|
||||
* `name`
|
||||
* `DownloadItem` class
|
||||
* `savePath`
|
||||
* `BrowserWindow` module
|
||||
* `autoHideMenuBar`
|
||||
* `resizable`
|
||||
* `maximizable`
|
||||
* `minimizable`
|
||||
* `fullscreenable`
|
||||
* `movable`
|
||||
* `closable`
|
||||
* `backgroundThrottling`
|
||||
* `NativeImage`
|
||||
* `isMacTemplateImage`
|
||||
* `SystemPreferences` module
|
||||
* `appLevelAppearance`
|
||||
@@ -492,6 +492,7 @@ win.webContents.session.setCertificateVerifyProc((request, callback) => {
|
||||
* `permission` String - The type of requested permission.
|
||||
* `clipboard-read` - Request access to read from the clipboard.
|
||||
* `media` - Request access to media devices such as camera, microphone and speakers.
|
||||
* `display-capture` - Request access to capture the screen.
|
||||
* `mediaKeySystem` - Request access to DRM protected content.
|
||||
* `geolocation` - Request access to user's current location.
|
||||
* `notifications` - Request notification creation and the ability to display them in the user's system tray.
|
||||
@@ -742,9 +743,13 @@ will not work on non-persistent (in-memory) sessions.
|
||||
|
||||
**Note:** On macOS and Windows 10 this word will be removed from the OS custom dictionary as well
|
||||
|
||||
#### `ses.loadExtension(path)`
|
||||
#### `ses.loadExtension(path[, options])`
|
||||
|
||||
* `path` String - Path to a directory containing an unpacked Chrome extension
|
||||
* `options` Object (optional)
|
||||
* `allowFileAccess` Boolean - Whether to allow the extension to read local files over `file://`
|
||||
protocol and inject content scripts into `file://` pages. This is required e.g. for loading
|
||||
devtools extensions on `file://` URLs. Defaults to false.
|
||||
|
||||
Returns `Promise<Extension>` - resolves when the extension is loaded.
|
||||
|
||||
@@ -767,7 +772,11 @@ const { app, session } = require('electron')
|
||||
const path = require('path')
|
||||
|
||||
app.on('ready', async () => {
|
||||
await session.defaultSession.loadExtension(path.join(__dirname, 'react-devtools'))
|
||||
await session.defaultSession.loadExtension(
|
||||
path.join(__dirname, 'react-devtools'),
|
||||
// allowFileAccess is required to load the devtools extension on file:// URLs.
|
||||
{ allowFileAccess: true }
|
||||
)
|
||||
// Note that in order to use the React DevTools extension, you'll need to
|
||||
// download and unzip a copy of the extension.
|
||||
})
|
||||
|
||||
@@ -402,6 +402,9 @@ Returns:
|
||||
* `oom` - Process ran out of memory
|
||||
* `launch-failed` - Process never successfully launched
|
||||
* `integrity-failure` - Windows code integrity checks failed
|
||||
* `exitCode` Integer - The exit code of the process, unless `reason` is
|
||||
`launch-failed`, in which case `exitCode` will be a platform-specific
|
||||
launch failure error code.
|
||||
|
||||
Emitted when the renderer process unexpectedly disappears. This is normally
|
||||
because it was crashed or killed.
|
||||
@@ -1658,8 +1661,7 @@ included. Sending Functions, Promises, Symbols, WeakMaps, or WeakSets will
|
||||
throw an exception.
|
||||
|
||||
> **NOTE**: Sending non-standard JavaScript types such as DOM objects or
|
||||
> special Electron objects is deprecated, and will begin throwing an exception
|
||||
> starting with Electron 9.
|
||||
> special Electron objects will throw an exception.
|
||||
|
||||
The renderer process can handle the message by listening to `channel` with the
|
||||
[`ipcRenderer`](ipc-renderer.md) module.
|
||||
@@ -1707,9 +1709,8 @@ Send an asynchronous message to a specific frame in a renderer process via
|
||||
chains will not be included. Sending Functions, Promises, Symbols, WeakMaps, or
|
||||
WeakSets will throw an exception.
|
||||
|
||||
> **NOTE**: Sending non-standard JavaScript types such as DOM objects or
|
||||
> special Electron objects is deprecated, and will begin throwing an exception
|
||||
> starting with Electron 9.
|
||||
> **NOTE:** Sending non-standard JavaScript types such as DOM objects or
|
||||
> special Electron objects will throw an exception.
|
||||
|
||||
The renderer process can handle the message by listening to `channel` with the
|
||||
[`ipcRenderer`](ipc-renderer.md) module.
|
||||
@@ -1872,7 +1873,7 @@ Returns `Boolean` - If *offscreen rendering* is enabled returns whether it is cu
|
||||
* `fps` Integer
|
||||
|
||||
If *offscreen rendering* is enabled sets the frame rate to the specified number.
|
||||
Only values between 1 and 60 are accepted.
|
||||
Only values between 1 and 240 are accepted.
|
||||
|
||||
#### `contents.getFrameRate()`
|
||||
|
||||
@@ -1970,7 +1971,7 @@ The zoom factor is the zoom percent divided by 100, so 300% = 3.0.
|
||||
#### `contents.frameRate`
|
||||
|
||||
An `Integer` property that sets the frame rate of the web contents to the specified number.
|
||||
Only values between 1 and 60 are accepted.
|
||||
Only values between 1 and 240 are accepted.
|
||||
|
||||
Only applicable if *offscreen rendering* is enabled.
|
||||
|
||||
|
||||
@@ -86,17 +86,6 @@ In the browser window some HTML APIs like `requestFullScreen` can only be
|
||||
invoked by a gesture from the user. Setting `userGesture` to `true` will remove
|
||||
this limitation.
|
||||
|
||||
#### `frame.executeJavaScriptInIsolatedWorld(worldId, code[, userGesture])`
|
||||
|
||||
* `worldId` Integer - The ID of the world to run the javascript in, `0` is the default world, `999` is the world used by Electron's `contextIsolation` feature. You can provide any integer here.
|
||||
* `code` String
|
||||
* `userGesture` Boolean (optional) - Default is `false`.
|
||||
|
||||
Returns `Promise<unknown>` - A promise that resolves with the result of the executed
|
||||
code or is rejected if execution throws or results in a rejected promise.
|
||||
|
||||
Works like `executeJavaScript` but evaluates `scripts` in an isolated context.
|
||||
|
||||
#### `frame.reload()`
|
||||
|
||||
Returns `boolean` - Whether the reload was initiated successfully. Only results in `false` when the frame has no history.
|
||||
|
||||
@@ -83,9 +83,9 @@ const mainWindow = new BrowserWindow()
|
||||
|
||||
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
|
||||
if (url.startsWith('https://github.com/')) {
|
||||
return true
|
||||
return { action: 'allow' }
|
||||
}
|
||||
return false
|
||||
return { action: 'deny' }
|
||||
})
|
||||
|
||||
mainWindow.webContents.on('did-create-window', (childWindow) => {
|
||||
|
||||
@@ -12,6 +12,16 @@ This document uses the following convention to categorize breaking changes:
|
||||
- **Deprecated:** An API was marked as deprecated. The API will continue to function, but will emit a deprecation warning, and will be removed in a future release.
|
||||
- **Removed:** An API or feature was removed, and is no longer supported by Electron.
|
||||
|
||||
## Planned Breaking API Changes (14.0)
|
||||
|
||||
### Removed: `worldSafeExecuteJavaScript`
|
||||
|
||||
In Electron 14, `worldSafeExecuteJavaScript` will be removed. There is no alternative, please
|
||||
ensure your code works with this property enabled. It has been enabled by default since Electron
|
||||
12.
|
||||
|
||||
You will be affected by this change if you use either `webFrame.executeJavaScript` or `webFrame.executeJavaScriptInIsolatedWorld`. You will need to ensure that values returned by either of those methods are supported by the [Context Bridge API](api/context-bridge.md#parameter--error--return-type-support) as these methods use the same value passing semantics.
|
||||
|
||||
## Planned Breaking API Changes (13.0)
|
||||
|
||||
### Removed: `shell.moveItemToTrash()`
|
||||
@@ -34,6 +44,15 @@ Chromium has removed support for Flash, and so we must follow suit. See
|
||||
Chromium's [Flash Roadmap](https://www.chromium.org/flash-roadmap) for more
|
||||
details.
|
||||
|
||||
### Default Changed: `worldSafeExecuteJavaScript` defaults to `true`
|
||||
|
||||
In Electron 12, `worldSafeExecuteJavaScript` will be enabled by default. To restore
|
||||
the previous behavior, `worldSafeExecuteJavaScript: false` must be specified in WebPreferences.
|
||||
Please note that setting this option to `false` is **insecure**.
|
||||
|
||||
This option will be removed in Electron 14 so please migrate your code to support the default
|
||||
value.
|
||||
|
||||
### Default Changed: `contextIsolation` defaults to `true`
|
||||
|
||||
In Electron 12, `contextIsolation` will be enabled by default. To restore
|
||||
@@ -593,6 +612,55 @@ Note that `webkitdirectory` no longer exposes the path to the selected folder.
|
||||
If you require the path to the selected folder rather than the folder contents,
|
||||
see the `dialog.showOpenDialog` API ([link](https://github.com/electron/electron/blob/master/docs/api/dialog.md#dialogshowopendialogbrowserwindow-options)).
|
||||
|
||||
### API Changed: Callback-based versions of promisified APIs
|
||||
|
||||
Electron 5 and Electron 6 introduced Promise-based versions of existing
|
||||
asynchronous APIs and deprecated their older, callback-based counterparts.
|
||||
In Electron 7, all deprecated callback-based APIs are now removed.
|
||||
|
||||
These functions now only return Promises:
|
||||
|
||||
* `app.getFileIcon()` [#15742](https://github.com/electron/electron/pull/15742)
|
||||
* `app.dock.show()` [#16904](https://github.com/electron/electron/pull/16904)
|
||||
* `contentTracing.getCategories()` [#16583](https://github.com/electron/electron/pull/16583)
|
||||
* `contentTracing.getTraceBufferUsage()` [#16600](https://github.com/electron/electron/pull/16600)
|
||||
* `contentTracing.startRecording()` [#16584](https://github.com/electron/electron/pull/16584)
|
||||
* `contentTracing.stopRecording()` [#16584](https://github.com/electron/electron/pull/16584)
|
||||
* `contents.executeJavaScript()` [#17312](https://github.com/electron/electron/pull/17312)
|
||||
* `cookies.flushStore()` [#16464](https://github.com/electron/electron/pull/16464)
|
||||
* `cookies.get()` [#16464](https://github.com/electron/electron/pull/16464)
|
||||
* `cookies.remove()` [#16464](https://github.com/electron/electron/pull/16464)
|
||||
* `cookies.set()` [#16464](https://github.com/electron/electron/pull/16464)
|
||||
* `debugger.sendCommand()` [#16861](https://github.com/electron/electron/pull/16861)
|
||||
* `dialog.showCertificateTrustDialog()` [#17181](https://github.com/electron/electron/pull/17181)
|
||||
* `inAppPurchase.getProducts()` [#17355](https://github.com/electron/electron/pull/17355)
|
||||
* `inAppPurchase.purchaseProduct()`[#17355](https://github.com/electron/electron/pull/17355)
|
||||
* `netLog.stopLogging()` [#16862](https://github.com/electron/electron/pull/16862)
|
||||
* `session.clearAuthCache()` [#17259](https://github.com/electron/electron/pull/17259)
|
||||
* `session.clearCache()` [#17185](https://github.com/electron/electron/pull/17185)
|
||||
* `session.clearHostResolverCache()` [#17229](https://github.com/electron/electron/pull/17229)
|
||||
* `session.clearStorageData()` [#17249](https://github.com/electron/electron/pull/17249)
|
||||
* `session.getBlobData()` [#17303](https://github.com/electron/electron/pull/17303)
|
||||
* `session.getCacheSize()` [#17185](https://github.com/electron/electron/pull/17185)
|
||||
* `session.resolveProxy()` [#17222](https://github.com/electron/electron/pull/17222)
|
||||
* `session.setProxy()` [#17222](https://github.com/electron/electron/pull/17222)
|
||||
* `shell.openExternal()` [#16176](https://github.com/electron/electron/pull/16176)
|
||||
* `webContents.loadFile()` [#15855](https://github.com/electron/electron/pull/15855)
|
||||
* `webContents.loadURL()` [#15855](https://github.com/electron/electron/pull/15855)
|
||||
* `webContents.hasServiceWorker()` [#16535](https://github.com/electron/electron/pull/16535)
|
||||
* `webContents.printToPDF()` [#16795](https://github.com/electron/electron/pull/16795)
|
||||
* `webContents.savePage()` [#16742](https://github.com/electron/electron/pull/16742)
|
||||
* `webFrame.executeJavaScript()` [#17312](https://github.com/electron/electron/pull/17312)
|
||||
* `webFrame.executeJavaScriptInIsolatedWorld()` [#17312](https://github.com/electron/electron/pull/17312)
|
||||
* `webviewTag.executeJavaScript()` [#17312](https://github.com/electron/electron/pull/17312)
|
||||
* `win.capturePage()` [#15743](https://github.com/electron/electron/pull/15743)
|
||||
|
||||
These functions now have two forms, synchronous and Promise-based asynchronous:
|
||||
|
||||
* `dialog.showMessageBox()`/`dialog.showMessageBoxSync()` [#17298](https://github.com/electron/electron/pull/17298)
|
||||
* `dialog.showOpenDialog()`/`dialog.showOpenDialogSync()` [#16973](https://github.com/electron/electron/pull/16973)
|
||||
* `dialog.showSaveDialog()`/`dialog.showSaveDialogSync()` [#17054](https://github.com/electron/electron/pull/17054)
|
||||
|
||||
## Planned Breaking API Changes (6.0)
|
||||
|
||||
### API Changed: `win.setMenu(null)` is now `win.removeMenu()`
|
||||
@@ -604,19 +672,6 @@ win.setMenu(null)
|
||||
win.removeMenu()
|
||||
```
|
||||
|
||||
### API Changed: `contentTracing.getTraceBufferUsage()` is now a promise
|
||||
|
||||
```js
|
||||
// Deprecated
|
||||
contentTracing.getTraceBufferUsage((percentage, value) => {
|
||||
// do something
|
||||
})
|
||||
// Replace with
|
||||
contentTracing.getTraceBufferUsage().then(infoObject => {
|
||||
// infoObject has percentage and value fields
|
||||
})
|
||||
```
|
||||
|
||||
### API Changed: `electron.screen` in the renderer process should be accessed via `remote`
|
||||
|
||||
```js
|
||||
@@ -755,6 +810,31 @@ webFrame.setSpellCheckProvider('en-US', {
|
||||
})
|
||||
```
|
||||
|
||||
### API Changed: `webContents.getZoomLevel` and `webContents.getZoomFactor` are now synchronous
|
||||
|
||||
`webContents.getZoomLevel` and `webContents.getZoomFactor` no longer take callback parameters,
|
||||
instead directly returning their number values.
|
||||
|
||||
```js
|
||||
// Deprecated
|
||||
webContents.getZoomLevel((level) => {
|
||||
console.log(level)
|
||||
})
|
||||
// Replace with
|
||||
const level = webContents.getZoomLevel()
|
||||
console.log(level)
|
||||
```
|
||||
|
||||
```js
|
||||
// Deprecated
|
||||
webContents.getZoomFactor((factor) => {
|
||||
console.log(factor)
|
||||
})
|
||||
// Replace with
|
||||
const factor = webContents.getZoomFactor()
|
||||
console.log(factor)
|
||||
```
|
||||
|
||||
## Planned Breaking API Changes (4.0)
|
||||
|
||||
The following list includes the breaking API changes made in Electron 4.0.
|
||||
|
||||
@@ -42,7 +42,7 @@ $ pip install pyobjc
|
||||
If you're developing Electron and don't plan to redistribute your
|
||||
custom Electron build, you may skip this section.
|
||||
|
||||
Official Electron builds are built with [Xcode 9.4.1](http://adcdownload.apple.com/Developer_Tools/Xcode_9.4.1/Xcode_9.4.1.xip), and the macOS 10.13 SDK. Building with a newer SDK works too, but the releases currently use the 10.13 SDK.
|
||||
Official Electron builds are built with [Xcode 12.2](https://download.developer.apple.com/Developer_Tools/Xcode_12.2/Xcode_12.2.xip), and the macOS 11.0 SDK. Building with a newer SDK works too, but the releases currently use the 11.0 SDK.
|
||||
|
||||
## Building Electron
|
||||
|
||||
|
||||
@@ -96,7 +96,7 @@ of the extension is not working as expected.
|
||||
[devtools-extension]: https://developer.chrome.com/extensions/devtools
|
||||
[session]: ../api/session.md
|
||||
[react-devtools]: https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi
|
||||
[load-extension]: ../api/session.md#sesloadextensionpath
|
||||
[load-extension]: ../api/session.md#sesloadextensionpath-options
|
||||
[extension-structure]: ../api/structures/extension.md
|
||||
[remove-extension]: ../api/session.md#sesremoveextensionextensionid
|
||||
[electron-devtools-installer]: https://github.com/MarshallOfSound/electron-devtools-installer
|
||||
|
||||
@@ -9,7 +9,7 @@ Two modes of rendering can be used and only the dirty area is passed in the
|
||||
`'paint'` event to be more efficient. The rendering can be stopped, continued
|
||||
and the frame rate can be set. The specified frame rate is a top limit value,
|
||||
when there is nothing happening on a webpage, no frames are generated. The
|
||||
maximum frame rate is 60, because above that there is no benefit, only
|
||||
maximum frame rate is 240, because above that there is no benefit, only
|
||||
performance loss.
|
||||
|
||||
**Note:** An offscreen window is always created as a [Frameless Window](../api/frameless-window.md).
|
||||
|
||||
@@ -96,6 +96,10 @@ template("electron_extra_paks") {
|
||||
"$root_gen_dir/ui/resources/webui_generated_resources.pak",
|
||||
]
|
||||
deps += [ "//content/browser/devtools:devtools_resources" ]
|
||||
if (enable_pdf_viewer) {
|
||||
sources += [ "$root_gen_dir/chrome/pdf_resources.pak" ]
|
||||
deps += [ "//chrome/browser/resources/pdf:pdf_resources" ]
|
||||
}
|
||||
if (enable_print_preview) {
|
||||
sources += [ "$root_gen_dir/chrome/print_preview_resources.pak" ]
|
||||
deps +=
|
||||
|
||||
@@ -34,7 +34,6 @@ auto_filenames = {
|
||||
"docs/api/menu.md",
|
||||
"docs/api/message-channel-main.md",
|
||||
"docs/api/message-port-main.md",
|
||||
"docs/api/modernization",
|
||||
"docs/api/native-image.md",
|
||||
"docs/api/native-theme.md",
|
||||
"docs/api/net-log.md",
|
||||
|
||||
@@ -332,6 +332,8 @@ filenames = {
|
||||
"shell/browser/badging/badge_manager.h",
|
||||
"shell/browser/badging/badge_manager_factory.cc",
|
||||
"shell/browser/badging/badge_manager_factory.h",
|
||||
"shell/browser/bluetooth/electron_bluetooth_delegate.cc",
|
||||
"shell/browser/bluetooth/electron_bluetooth_delegate.h",
|
||||
"shell/browser/browser.cc",
|
||||
"shell/browser/browser.h",
|
||||
"shell/browser/browser_observer.h",
|
||||
|
||||
@@ -43,7 +43,7 @@ Object.defineProperty(BaseWindow.prototype, 'kiosk', {
|
||||
});
|
||||
|
||||
Object.defineProperty(BaseWindow.prototype, 'documentEdited', {
|
||||
get: function () { return this.isFullscreen(); },
|
||||
get: function () { return this.isDocumentEdited(); },
|
||||
set: function (edited) { this.setDocumentEdited(edited); }
|
||||
});
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ class CrashReporter {
|
||||
|
||||
if (submitURL == null) throw new Error('submitURL is a required option to crashReporter.start');
|
||||
|
||||
if (!compress) {
|
||||
if (!compress && uploadToServer) {
|
||||
deprecate.log('Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.');
|
||||
}
|
||||
|
||||
|
||||
@@ -119,10 +119,13 @@ class IncomingMessage extends Readable {
|
||||
this._shouldPush = this.push(chunk);
|
||||
}
|
||||
if (this._shouldPush && this._resume) {
|
||||
this._resume();
|
||||
// Reset the callback, so that a new one is used for each
|
||||
// batch of throttled data
|
||||
// batch of throttled data. Do this before calling resume to avoid a
|
||||
// potential race-condition
|
||||
const resume = this._resume;
|
||||
this._resume = null;
|
||||
|
||||
resume();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -131,19 +131,11 @@ WebContents.prototype.postMessage = function (...args) {
|
||||
};
|
||||
|
||||
WebContents.prototype.send = function (channel, ...args) {
|
||||
if (typeof channel !== 'string') {
|
||||
throw new Error('Missing required channel argument');
|
||||
}
|
||||
|
||||
return this._send(false /* internal */, channel, args);
|
||||
return this.mainFrame.send(channel, ...args);
|
||||
};
|
||||
|
||||
WebContents.prototype._sendInternal = function (channel, ...args) {
|
||||
if (typeof channel !== 'string') {
|
||||
throw new Error('Missing required channel argument');
|
||||
}
|
||||
|
||||
return this._send(true /* internal */, channel, args);
|
||||
return this.mainFrame._sendInternal(channel, ...args);
|
||||
};
|
||||
|
||||
function getWebFrame (contents: Electron.WebContents, frame: number | [number, number]) {
|
||||
@@ -634,6 +626,7 @@ WebContents.prototype._init = function () {
|
||||
// it's technically a BrowserWindowConstructorOptions option because
|
||||
// we need to access it in the renderer at init time.
|
||||
backgroundColor: windowOpenOverriddenOptions.backgroundColor,
|
||||
transparent: windowOpenOverriddenOptions.transparent,
|
||||
...windowOpenOverriddenOptions.webPreferences
|
||||
} : undefined;
|
||||
this._setNextChildWebPreferences(
|
||||
|
||||
@@ -47,6 +47,7 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition
|
||||
embedder,
|
||||
features,
|
||||
frameName,
|
||||
isNativeWindowOpen,
|
||||
overrideOptions: overrideBrowserWindowOptions
|
||||
});
|
||||
|
||||
@@ -199,10 +200,11 @@ const securityWebPreferences: { [key: string]: boolean } = {
|
||||
enableWebSQL: false
|
||||
};
|
||||
|
||||
function makeBrowserWindowOptions ({ embedder, features, frameName, overrideOptions, useDeprecatedBehaviorForBareValues = true, useDeprecatedBehaviorForOptionInheritance = true }: {
|
||||
function makeBrowserWindowOptions ({ embedder, features, frameName, isNativeWindowOpen, overrideOptions, useDeprecatedBehaviorForBareValues = true, useDeprecatedBehaviorForOptionInheritance = true }: {
|
||||
embedder: WebContents,
|
||||
features: string,
|
||||
frameName: string,
|
||||
isNativeWindowOpen: boolean,
|
||||
overrideOptions?: BrowserWindowConstructorOptions,
|
||||
useDeprecatedBehaviorForBareValues?: boolean
|
||||
useDeprecatedBehaviorForOptionInheritance?: boolean
|
||||
@@ -216,9 +218,9 @@ function makeBrowserWindowOptions ({ embedder, features, frameName, overrideOpti
|
||||
options: {
|
||||
...(useDeprecatedBehaviorForOptionInheritance && deprecatedInheritedOptions),
|
||||
show: true,
|
||||
title: frameName,
|
||||
width: 800,
|
||||
height: 600,
|
||||
...(!isNativeWindowOpen && { title: frameName }),
|
||||
...parsedOptions,
|
||||
...overrideOptions,
|
||||
webPreferences: makeWebPreferences({ embedder, insecureParsedWebPreferences: parsedWebPreferences, secureOverrideWebPreferences: overrideOptions && overrideOptions.webPreferences, useDeprecatedBehaviorForOptionInheritance: true })
|
||||
|
||||
@@ -82,7 +82,7 @@ const getPreloadScript = async function (preloadPath: string) {
|
||||
let preloadSrc = null;
|
||||
let preloadError = null;
|
||||
try {
|
||||
preloadSrc = (await fs.promises.readFile(preloadPath)).toString();
|
||||
preloadSrc = await fs.promises.readFile(preloadPath, 'utf8');
|
||||
} catch (error) {
|
||||
preloadError = error;
|
||||
}
|
||||
|
||||
@@ -48,8 +48,10 @@ class WebFrame extends EventEmitter {
|
||||
}
|
||||
}
|
||||
|
||||
const { hasSwitch } = process._linkedBinding('electron_common_command_line');
|
||||
const worldSafeJS = hasSwitch('world-safe-execute-javascript') && hasSwitch('context-isolation');
|
||||
const contextIsolation = binding.getWebPreference(window, 'contextIsolation');
|
||||
const worldSafeExecuteJavaScript = binding.getWebPreference(window, 'worldSafeExecuteJavaScript');
|
||||
|
||||
const worldSafeJS = worldSafeExecuteJavaScript || !contextIsolation;
|
||||
|
||||
// Populate the methods.
|
||||
for (const name in binding) {
|
||||
|
||||
@@ -81,7 +81,7 @@ const isUnsafeEvalEnabled: () => Promise<boolean> = function () {
|
||||
// Call _executeJavaScript to bypass the world-safe deprecation warning
|
||||
return (webFrame as any)._executeJavaScript(`(${(() => {
|
||||
try {
|
||||
new Function(''); // eslint-disable-line no-new,no-new-func
|
||||
eval(window.trustedTypes.emptyScript); // eslint-disable-line no-eval
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ const warnAboutExperimentalFeatures = function (webPreferences?: Electron.WebPre
|
||||
const warnAboutEnableBlinkFeatures = function (webPreferences?: Electron.WebPreferences) {
|
||||
if (!webPreferences ||
|
||||
!Object.prototype.hasOwnProperty.call(webPreferences, 'enableBlinkFeatures') ||
|
||||
(webPreferences.enableBlinkFeatures && webPreferences.enableBlinkFeatures.length === 0)) {
|
||||
(webPreferences.enableBlinkFeatures != null && webPreferences.enableBlinkFeatures.length === 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -44,7 +44,9 @@ export class WebViewImpl {
|
||||
// Create internal iframe element.
|
||||
this.internalElement = this.createInternalElement();
|
||||
const shadowRoot = this.webviewNode.attachShadow({ mode: 'open' });
|
||||
shadowRoot.innerHTML = '<!DOCTYPE html><style type="text/css">:host { display: flex; }</style>';
|
||||
const style = shadowRoot.ownerDocument.createElement('style');
|
||||
style.textContent = ':host { display: flex; }';
|
||||
shadowRoot.appendChild(style);
|
||||
this.setupWebViewAttributes();
|
||||
this.viewInstanceId = getNextId();
|
||||
shadowRoot.appendChild(this.internalElement);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "electron",
|
||||
"version": "12.0.0-beta.18",
|
||||
"version": "12.0.1",
|
||||
"repository": "https://github.com/electron/electron",
|
||||
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
|
||||
"devDependencies": {
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
expose_ripemd160.patch
|
||||
expose_aes-cfb.patch
|
||||
expose_des-ede3.patch
|
||||
|
||||
@@ -57,7 +57,7 @@ index 53cb9d2dc8f1962a70dc12b648d27c32be8aca4b..84af06fc56e4aa72d4d48801d7c037ad
|
||||
callback(EVP_aes_192_ctr(), "aes-192-ctr", NULL, arg);
|
||||
callback(EVP_aes_256_ctr(), "aes-256-ctr", NULL, arg);
|
||||
diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h
|
||||
index 31390a3f63a1e88d50c22fa8c0d3b53610ebda68..792ae8feaa53229e3f6f9130269b268f43ded8d6 100644
|
||||
index c6bec489b51ca2e71b7f81e64a8e59b534e2e91a..512a9003164e65bd4ab896ef75b173dab3a8d1db 100644
|
||||
--- a/include/openssl/cipher.h
|
||||
+++ b/include/openssl/cipher.h
|
||||
@@ -430,6 +430,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);
|
||||
@@ -66,5 +66,5 @@ index 31390a3f63a1e88d50c22fa8c0d3b53610ebda68..792ae8feaa53229e3f6f9130269b268f
|
||||
OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_128_cfb128(void);
|
||||
+OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_256_cfb128(void);
|
||||
|
||||
// EVP_aes_256_cfb128 is only available in decrepit.
|
||||
OPENSSL_EXPORT const EVP_CIPHER *EVP_aes_256_cfb128(void);
|
||||
// EVP_aes_128_cfb is an alias for |EVP_aes_128_cfb128| and is only available in
|
||||
// decrepit.
|
||||
|
||||
40
patches/boringssl/expose_des-ede3.patch
Normal file
40
patches/boringssl/expose_des-ede3.patch
Normal file
@@ -0,0 +1,40 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Jeremy Rose <nornagon@nornagon.net>
|
||||
Date: Wed, 24 Feb 2021 11:08:34 -0800
|
||||
Subject: expose des-ede3
|
||||
|
||||
This should be upstreamed.
|
||||
|
||||
diff --git a/crypto/cipher_extra/cipher_extra.c b/crypto/cipher_extra/cipher_extra.c
|
||||
index 588a4773437c311877f275bf3679f9688cda3c46..e771ed6589b4579cc35300d5b2a1b68d92e444f5 100644
|
||||
--- a/crypto/cipher_extra/cipher_extra.c
|
||||
+++ b/crypto/cipher_extra/cipher_extra.c
|
||||
@@ -93,6 +93,8 @@ const EVP_CIPHER *EVP_get_cipherbyname(const char *name) {
|
||||
return EVP_rc4();
|
||||
} else if (OPENSSL_strcasecmp(name, "des-cbc") == 0) {
|
||||
return EVP_des_cbc();
|
||||
+ } else if (OPENSSL_strcasecmp(name, "des-ede3") == 0) {
|
||||
+ return EVP_des_ede3();
|
||||
} else if (OPENSSL_strcasecmp(name, "des-ede3-cbc") == 0 ||
|
||||
// This is not a name used by OpenSSL, but tcpdump registers it
|
||||
// with |EVP_add_cipher_alias|. Our |EVP_add_cipher_alias| is a
|
||||
diff --git a/decrepit/evp/evp_do_all.c b/decrepit/evp/evp_do_all.c
|
||||
index 84af06fc56e4aa72d4d48801d7c037add0221747..fe412e350f43ad20758025da6b9754952d164938 100644
|
||||
--- a/decrepit/evp/evp_do_all.c
|
||||
+++ b/decrepit/evp/evp_do_all.c
|
||||
@@ -39,6 +39,7 @@ void EVP_CIPHER_do_all_sorted(void (*callback)(const EVP_CIPHER *cipher,
|
||||
callback(EVP_des_cbc(), "DES-CBC", NULL, arg);
|
||||
callback(EVP_des_ecb(), "DES-ECB", NULL, arg);
|
||||
callback(EVP_des_ede(), "DES-EDE", NULL, arg);
|
||||
+ callback(EVP_des_ede3(), "DES-EDE3", NULL, arg);
|
||||
callback(EVP_des_ede_cbc(), "DES-EDE-CBC", NULL, arg);
|
||||
callback(EVP_des_ede3_cbc(), "DES-EDE3-CBC", NULL, arg);
|
||||
callback(EVP_rc2_cbc(), "RC2-CBC", NULL, arg);
|
||||
@@ -65,6 +66,7 @@ void EVP_CIPHER_do_all_sorted(void (*callback)(const EVP_CIPHER *cipher,
|
||||
callback(EVP_des_cbc(), "des-cbc", NULL, arg);
|
||||
callback(EVP_des_ecb(), "des-ecb", NULL, arg);
|
||||
callback(EVP_des_ede(), "des-ede", NULL, arg);
|
||||
+ callback(EVP_des_ede3(), "des-ede3", NULL, arg);
|
||||
callback(EVP_des_ede_cbc(), "des-ede-cbc", NULL, arg);
|
||||
callback(EVP_des_ede3_cbc(), "des-ede3-cbc", NULL, arg);
|
||||
callback(EVP_rc2_cbc(), "rc2-cbc", NULL, arg);
|
||||
@@ -106,3 +106,8 @@ export_gin_v8platform_pageallocator_for_usage_outside_of_the_gin.patch
|
||||
use_public_apis_to_determine_if_a_font_is_a_system_font_in_mas_build.patch
|
||||
fix_setparentacessibile_crash_win.patch
|
||||
fix_export_zlib_symbols.patch
|
||||
don_t_use_potentially_null_getwebframe_-_view_when_get_blink.patch
|
||||
cherry-pick-5902d1aa722a.patch
|
||||
cherry-pick-5c7ad5393f74.patch
|
||||
word_break_between_space_and_alphanumeric.patch
|
||||
moves_background_color_setter_of_webview_to_blinks_webprefs_logic.patch
|
||||
|
||||
@@ -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 70b4ac882ed335c1e623f4cbb6d2c1dc5aca4caa..7e9972660b4006d4f83b2cd812f084fd8a2fe289 100644
|
||||
index 5bcbb68864ed193a519b34a37f1e50c29422235a..c33f108158538c49f9d4d27b8fa89852e829c787 100644
|
||||
--- a/content/gpu/gpu_main.cc
|
||||
+++ b/content/gpu/gpu_main.cc
|
||||
@@ -260,6 +260,10 @@ int GpuMain(const MainFunctionParams& parameters) {
|
||||
@@ -261,6 +261,10 @@ int GpuMain(const MainFunctionParams& parameters) {
|
||||
// to the GpuProcessHost once the GpuServiceImpl has started.
|
||||
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
|
||||
|
||||
@@ -24,7 +24,7 @@ index 70b4ac882ed335c1e623f4cbb6d2c1dc5aca4caa..7e9972660b4006d4f83b2cd812f084fd
|
||||
// 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
|
||||
@@ -397,7 +401,6 @@ int GpuMain(const MainFunctionParams& parameters) {
|
||||
@@ -398,7 +402,6 @@ int GpuMain(const MainFunctionParams& parameters) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ DidCreateScriptContext is called, not all JS APIs are available in the
|
||||
context, which can cause some preload scripts to trip.
|
||||
|
||||
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
|
||||
index c005ab29708f0d5b172f7a06f340ff01d35dc5dc..62c6f5e1527ff9bc546ba40f49a2255116c37bb7 100644
|
||||
index 9ab534614b5bbb9b88069595603620c692b19711..5e3200887da9a584e9e0275d86e7e4254211009f 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -116,6 +116,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
@@ -122,6 +122,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
virtual void DidHandleOnloadEvents() {}
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int32_t world_id) {}
|
||||
@@ -23,10 +23,10 @@ index c005ab29708f0d5b172f7a06f340ff01d35dc5dc..62c6f5e1527ff9bc546ba40f49a22551
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 33e6dfca2df06ecf538ad48eb2b89f794ea207ad..536b5a72f4994bde01c6c96ffbca74499ad39a7c 100644
|
||||
index a401af64fad73f3717ab6bebdb28ba395d4090b2..eb777512e2cb36c6b4ae03cd0c0d728d76bd95fc 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4716,6 +4716,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4686,6 +4686,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index 33e6dfca2df06ecf538ad48eb2b89f794ea207ad..536b5a72f4994bde01c6c96ffbca7449
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index 3a72bb59fa3cb7748d1ca038504e11d72bf6a09b..9c50ea4ea8a231b55a9097515c7de316605c927a 100644
|
||||
index 1a01e4f9f527fb9c6c63b8a1206f594ec6e3e4f2..b3d91c25ddda2c14a1e5b088acd4d19f828f7bd8 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -657,6 +657,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -617,6 +617,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override;
|
||||
void DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
int world_id) override;
|
||||
@@ -53,10 +53,10 @@ index 3a72bb59fa3cb7748d1ca038504e11d72bf6a09b..9c50ea4ea8a231b55a9097515c7de316
|
||||
int world_id) override;
|
||||
void DidChangeScrollOffset() override;
|
||||
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
|
||||
index a298cc726c817e97110dbe6cd22e45c8cec38fa7..59db0ad6d5334499806a0837901742335f2a9b03 100644
|
||||
index 7d32ed800d136b8ae449b4bae302b5bdaf11f13a..84ee1c78f0fbacfe20f69284d79d297dccd7d170 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -551,6 +551,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -572,6 +572,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
@@ -67,10 +67,10 @@ index a298cc726c817e97110dbe6cd22e45c8cec38fa7..59db0ad6d5334499806a083790174233
|
||||
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
index 16d2cc458b3a61c0974b258111ad154be61d55db..119f080e0ea00300dc4df8e9ec14d735b424c3f5 100644
|
||||
index be5cf4457cd379d5abc119d209d2df6520ad1022..8a0baac5bb8cb403324fb8156be62b924d6d3d1a 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
|
||||
@@ -203,6 +203,7 @@ void LocalWindowProxy::Initialize() {
|
||||
@@ -188,6 +188,7 @@ void LocalWindowProxy::Initialize() {
|
||||
}
|
||||
|
||||
InstallConditionalFeatures();
|
||||
@@ -79,10 +79,10 @@ index 16d2cc458b3a61c0974b258111ad154be61d55db..119f080e0ea00300dc4df8e9ec14d735
|
||||
if (World().IsMainWorld()) {
|
||||
GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld();
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
index f84f72609f7e7dbb248db96756f01704fd2047ac..b1053f337d1b4b7560bb5dd0927602b357f20aac 100644
|
||||
index 5c171f837c93fa3df33f5230e999a76fbf8d17c8..97f55d0c95f462384fd112a2a16a5170432677d9 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -292,6 +292,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -293,6 +293,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
@@ -92,10 +92,10 @@ index f84f72609f7e7dbb248db96756f01704fd2047ac..b1053f337d1b4b7560bb5dd0927602b3
|
||||
int32_t world_id) = 0;
|
||||
virtual bool AllowScriptExtensions() = 0;
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
index c7caa0e7a8a4ba021ce9c8fbbedda3c61db796b6..a437303911bfa62b001da44256518b12aa342a3c 100644
|
||||
index fba008f3477648a5abdd0909b89d8d908b9dafac..504ab7bac6623253bbd3e7be756a34af57f368e4 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
|
||||
@@ -417,6 +417,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -347,6 +347,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
web_frame_->Client()->DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ index c7caa0e7a8a4ba021ce9c8fbbedda3c61db796b6..a437303911bfa62b001da44256518b12
|
||||
v8::Local<v8::Context> context,
|
||||
int32_t world_id) {
|
||||
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
index cb73777817af019cc807e400dd0efcf632688215..e57af1cb37e3d73eb12819dc2e3926ecaf600b07 100644
|
||||
index 00780a63657423935bce8a6b35cc1d629b256d14..806e8a381e6089d0ade1492ecd7608f13a71c230 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
|
||||
@@ -77,6 +77,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
|
||||
@@ -123,10 +123,10 @@ index cb73777817af019cc807e400dd0efcf632688215..e57af1cb37e3d73eb12819dc2e3926ec
|
||||
int32_t world_id) override;
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
index 871023f276bf8a3c47764477f0037c5ab97a349d..ee451fc5e0d7c395b9b73b9612d92c20fe228565 100644
|
||||
index fe5aeef63b5dba29adc0b960f96199308ef7b941..9504ffe0db55e429db6c360900f62cbbfce24704 100644
|
||||
--- a/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
|
||||
@@ -334,6 +334,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
@@ -336,6 +336,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
|
||||
|
||||
void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) override {}
|
||||
|
||||
@@ -39,10 +39,10 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f
|
||||
|
||||
GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
index 3252caf936465b36afc0ea0df294f91913723b98..ebb6db2929f2192ca73fb677986b9e07737f8569 100644
|
||||
index 4fbbdb2304a40ae4bca03dd51ce55615c5babae2..e2213b00d73f399bb14b7edfa0fb719aa12a6be5 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
@@ -698,6 +698,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
|
||||
@@ -697,6 +697,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,10 +10,10 @@ WebContents, and cancels the authentication if there's no WebContents
|
||||
available, which there isn't in the case of the 'net' module.
|
||||
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index ec89eeb056d686f8cab6003e456973ff8649df23..108b3a8082d10fd655b965bd6a703a75115801aa 100644
|
||||
index 737fc3c70ed0962fa1123c5665706762d7a8238b..9e894008fe949b756d3ee7d28a168c815e5dbcf2 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -215,6 +215,25 @@ struct CTPolicy {
|
||||
@@ -228,6 +228,25 @@ struct CTPolicy {
|
||||
array<string> excluded_legacy_spkis;
|
||||
};
|
||||
|
||||
@@ -39,7 +39,7 @@ index ec89eeb056d686f8cab6003e456973ff8649df23..108b3a8082d10fd655b965bd6a703a75
|
||||
interface CertVerifierClient {
|
||||
Verify(
|
||||
int32 default_error,
|
||||
@@ -641,6 +660,8 @@ struct URLLoaderFactoryParams {
|
||||
@@ -660,6 +679,8 @@ struct URLLoaderFactoryParams {
|
||||
// impact because of the extra process hops, so use should be minimized.
|
||||
pending_remote<TrustedURLLoaderHeaderClient>? header_client;
|
||||
|
||||
@@ -49,10 +49,10 @@ index ec89eeb056d686f8cab6003e456973ff8649df23..108b3a8082d10fd655b965bd6a703a75
|
||||
// the per-context allow patterns that is managed via NetworkContext
|
||||
// interface. This still respects the per-context block lists.
|
||||
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
|
||||
index 65bb883657aab4b588d505d78ad9e84a8eb36d16..f4ffe42e45ff2e821ae175cf3eb2dd9da40f93ba 100644
|
||||
index c02cabc51eb5a99c9857b8cb5a57e0793e04b863..4c87980dbad41372f3f23a9493877801ab4ed3d8 100644
|
||||
--- a/services/network/url_loader.cc
|
||||
+++ b/services/network/url_loader.cc
|
||||
@@ -463,6 +463,7 @@ URLLoader::URLLoader(
|
||||
@@ -461,6 +461,7 @@ URLLoader::URLLoader(
|
||||
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
|
||||
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
|
||||
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
|
||||
@@ -60,7 +60,7 @@ index 65bb883657aab4b588d505d78ad9e84a8eb36d16..f4ffe42e45ff2e821ae175cf3eb2dd9d
|
||||
mojom::OriginPolicyManager* origin_policy_manager,
|
||||
std::unique_ptr<TrustTokenRequestHelperFactory> trust_token_helper_factory,
|
||||
const cors::OriginAccessList* origin_access_list,
|
||||
@@ -527,6 +528,11 @@ URLLoader::URLLoader(
|
||||
@@ -525,6 +526,11 @@ URLLoader::URLLoader(
|
||||
header_client_.set_disconnect_handler(
|
||||
base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
|
||||
}
|
||||
@@ -72,7 +72,7 @@ index 65bb883657aab4b588d505d78ad9e84a8eb36d16..f4ffe42e45ff2e821ae175cf3eb2dd9d
|
||||
if (want_raw_headers_) {
|
||||
options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse |
|
||||
mojom::kURLLoadOptionSendSSLInfoForCertificateError;
|
||||
@@ -1159,7 +1165,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
@@ -1170,7 +1176,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
// |this| may have been deleted.
|
||||
return;
|
||||
}
|
||||
@@ -81,7 +81,7 @@ index 65bb883657aab4b588d505d78ad9e84a8eb36d16..f4ffe42e45ff2e821ae175cf3eb2dd9d
|
||||
OnAuthCredentials(base::nullopt);
|
||||
return;
|
||||
}
|
||||
@@ -1175,11 +1181,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
@@ -1186,11 +1192,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
|
||||
if (url_request->response_headers())
|
||||
head->headers = url_request->response_headers();
|
||||
head->auth_challenge_info = auth_info;
|
||||
@@ -108,10 +108,10 @@ index 65bb883657aab4b588d505d78ad9e84a8eb36d16..f4ffe42e45ff2e821ae175cf3eb2dd9d
|
||||
auth_challenge_responder_receiver_.set_disconnect_handler(
|
||||
base::BindOnce(&URLLoader::DeleteSelf, base::Unretained(this)));
|
||||
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
|
||||
index 6b2e6d3cbbc300ee15a9085271720b87b0d97635..2fe910c7debbc3caac1d809941fc098c9e677417 100644
|
||||
index 193733544750f8cdb07d76be80170f752947cec6..e2fcaeea674b3012d428911637748bb819aaf3e8 100644
|
||||
--- a/services/network/url_loader.h
|
||||
+++ b/services/network/url_loader.h
|
||||
@@ -124,6 +124,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
@@ -129,6 +129,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
|
||||
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
|
||||
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
|
||||
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
|
||||
@@ -128,10 +128,10 @@ index 6b2e6d3cbbc300ee15a9085271720b87b0d97635..2fe910c7debbc3caac1d809941fc098c
|
||||
std::unique_ptr<FileOpenerForUpload> file_opener_for_upload_;
|
||||
|
||||
diff --git a/services/network/url_loader_factory.cc b/services/network/url_loader_factory.cc
|
||||
index 26c07f7b77991a3f7987949bd964d067814a289c..8df2d90f65f323c448b2dacd3b07b26284bf95ce 100644
|
||||
index adf7d7e9df186f032cb85d2aeba301c551442c78..07b3c4a219ecefa142efa10ba0b7efda16d755d6 100644
|
||||
--- a/services/network/url_loader_factory.cc
|
||||
+++ b/services/network/url_loader_factory.cc
|
||||
@@ -76,6 +76,7 @@ URLLoaderFactory::URLLoaderFactory(
|
||||
@@ -77,6 +77,7 @@ URLLoaderFactory::URLLoaderFactory(
|
||||
resource_scheduler_client_(std::move(resource_scheduler_client)),
|
||||
header_client_(std::move(params_->header_client)),
|
||||
coep_reporter_(std::move(params_->coep_reporter)),
|
||||
@@ -139,7 +139,7 @@ index 26c07f7b77991a3f7987949bd964d067814a289c..8df2d90f65f323c448b2dacd3b07b262
|
||||
cors_url_loader_factory_(cors_url_loader_factory),
|
||||
cookie_observer_(std::move(params_->cookie_observer)) {
|
||||
DCHECK(context);
|
||||
@@ -260,6 +261,7 @@ void URLLoaderFactory::CreateLoaderAndStart(
|
||||
@@ -297,6 +298,7 @@ void URLLoaderFactory::CreateLoaderAndStart(
|
||||
std::move(keepalive_statistics_recorder),
|
||||
std::move(network_usage_accumulator),
|
||||
header_client_.is_bound() ? header_client_.get() : nullptr,
|
||||
|
||||
@@ -8,7 +8,7 @@ WebPreferences of in-process child windows, rather than relying on
|
||||
process-level command line switches, as before.
|
||||
|
||||
diff --git a/third_party/blink/common/web_preferences/web_preferences.cc b/third_party/blink/common/web_preferences/web_preferences.cc
|
||||
index ef215562237f8450f78133c3685623d93edb2660..27004b5a41abd48572bd70542385012d008ac6cc 100644
|
||||
index 758b0b1616ecf86b7dd090adce94395851d9baf2..55f20eb6266368c65fc0ec80d52caa332f85ecfb 100644
|
||||
--- a/third_party/blink/common/web_preferences/web_preferences.cc
|
||||
+++ b/third_party/blink/common/web_preferences/web_preferences.cc
|
||||
@@ -146,6 +146,29 @@ WebPreferences::WebPreferences()
|
||||
@@ -42,7 +42,7 @@ index ef215562237f8450f78133c3685623d93edb2660..27004b5a41abd48572bd70542385012d
|
||||
accelerated_video_decode_enabled(false),
|
||||
animation_policy(
|
||||
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
index 63d5d4e586eb152fbe7c22ce0038cd3c55ad3175..472acd8f567d323af63151301b153f4d8ab0c529 100644
|
||||
index ac2cb47de75eb3c3a695ff784c651ba3864ee6a0..e238c4e94fe6501bf7f89654d3b3eeef86eafb63 100644
|
||||
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
|
||||
@@ -24,6 +24,11 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -57,7 +57,7 @@ index 63d5d4e586eb152fbe7c22ce0038cd3c55ad3175..472acd8f567d323af63151301b153f4d
|
||||
!data.ReadLazyFrameLoadingDistanceThresholdsPx(
|
||||
&out->lazy_frame_loading_distance_thresholds_px) ||
|
||||
!data.ReadLazyImageLoadingDistanceThresholdsPx(
|
||||
@@ -148,6 +153,27 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -150,6 +155,27 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
out->navigate_on_drag_drop = data.navigate_on_drag_drop();
|
||||
out->v8_cache_options = data.v8_cache_options();
|
||||
out->record_whole_document = data.record_whole_document();
|
||||
@@ -86,7 +86,7 @@ index 63d5d4e586eb152fbe7c22ce0038cd3c55ad3175..472acd8f567d323af63151301b153f4d
|
||||
out->accelerated_video_decode_enabled =
|
||||
data.accelerated_video_decode_enabled();
|
||||
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
index 95ab02073293c69cafb8a0dc7de5ea467e6ade13..a67307ca4e480a3c50761f0186b070a6de4dbc83 100644
|
||||
index 64444803e75f95ad1a9b526521c5eee90ba5f925..f8b33c329988f269964783fb290721fc5208ae3d 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
|
||||
@@ -9,6 +9,7 @@
|
||||
@@ -97,7 +97,7 @@ index 95ab02073293c69cafb8a0dc7de5ea467e6ade13..a67307ca4e480a3c50761f0186b070a6
|
||||
#include "base/strings/string16.h"
|
||||
#include "base/time/time.h"
|
||||
#include "build/build_config.h"
|
||||
@@ -157,6 +158,29 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
@@ -159,6 +160,29 @@ struct BLINK_COMMON_EXPORT WebPreferences {
|
||||
blink::mojom::V8CacheOptions v8_cache_options;
|
||||
bool record_whole_document;
|
||||
|
||||
@@ -128,7 +128,7 @@ index 95ab02073293c69cafb8a0dc7de5ea467e6ade13..a67307ca4e480a3c50761f0186b070a6
|
||||
// only controls whether or not the "document.cookie" field is properly
|
||||
// connected to the backing store, for instance if you wanted to be able to
|
||||
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
index 145106cb2fc1992528c33c3429d40c7a528f20af..4c360934a648535b6ebaf476cb2b75bfd6192927 100644
|
||||
index c071879cdc2e8c39f9eb9e95aa9f08d6d560fc58..9b4143fe461b35df5763e89991c00befd12a18d2 100644
|
||||
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
|
||||
@@ -6,6 +6,7 @@
|
||||
@@ -139,7 +139,7 @@ index 145106cb2fc1992528c33c3429d40c7a528f20af..4c360934a648535b6ebaf476cb2b75bf
|
||||
#include "mojo/public/cpp/bindings/struct_traits.h"
|
||||
#include "net/nqe/effective_connection_type.h"
|
||||
#include "third_party/blink/public/common/common_export.h"
|
||||
@@ -431,6 +432,88 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
@@ -436,6 +437,88 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
|
||||
return r.record_whole_document;
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@ index 145106cb2fc1992528c33c3429d40c7a528f20af..4c360934a648535b6ebaf476cb2b75bf
|
||||
return r.cookie_enabled;
|
||||
}
|
||||
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
index df3ffb49020c834b13689c1827d29dd15ace8b62..55774f77bcf967fa94d9fe3fca43814448ded7af 100644
|
||||
index 519b354f7a0e02e8bfeb9c33904f78898fce37c4..483712685b01a75ad26e9f45a08f2ae32b00d10f 100644
|
||||
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
|
||||
@@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom";
|
||||
@@ -240,7 +240,7 @@ index df3ffb49020c834b13689c1827d29dd15ace8b62..55774f77bcf967fa94d9fe3fca438144
|
||||
|
||||
enum PointerType {
|
||||
kPointerNone = 1, // 1 << 0
|
||||
@@ -209,6 +210,29 @@ struct WebPreferences {
|
||||
@@ -210,6 +211,29 @@ struct WebPreferences {
|
||||
V8CacheOptions v8_cache_options;
|
||||
bool record_whole_document;
|
||||
|
||||
|
||||
@@ -13,11 +13,45 @@ when there is code doing that.
|
||||
|
||||
This patch reverts the change to fix the crash in Electron.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
|
||||
index 9305b576b06a8020583939f357cd42902302b543..d772a31a436bf8f0617d87b5fcf5bd960bf871d9 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -135,14 +135,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
|
||||
DCHECK(!IsDetached());
|
||||
|
||||
- // TODO(dcheng): FocusController::FrameDetached() *should* fire JS events,
|
||||
- // hence the above check for `client_` being null. However, when this was
|
||||
- // previously placed before the `FrameDetached()` call, nothing crashes, which
|
||||
- // is suspicious. Investigate if we really don't need to fire JS events--and
|
||||
- // if we don't, move `forbid_scripts` up to be instantiated sooner and
|
||||
- // simplify this code.
|
||||
- ScriptForbiddenScope forbid_scripts;
|
||||
-
|
||||
if (type == FrameDetachType::kRemove) {
|
||||
if (provisional_frame_) {
|
||||
provisional_frame_->Detach(FrameDetachType::kRemove);
|
||||
@@ -165,6 +157,14 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
GetWindowProxyManager()->ClearForSwap();
|
||||
}
|
||||
|
||||
+ // TODO(dcheng): FocusController::FrameDetached() *should* fire JS events,
|
||||
+ // hence the above check for `client_` being null. However, when this was
|
||||
+ // previously placed before the `FrameDetached()` call, nothing crashes, which
|
||||
+ // is suspicious. Investigate if we really don't need to fire JS events--and
|
||||
+ // if we don't, move `forbid_scripts` up to be instantiated sooner and
|
||||
+ // simplify this code.
|
||||
+ ScriptForbiddenScope forbid_scripts;
|
||||
+
|
||||
// After this, we must no longer talk to the client since this clears
|
||||
// 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 7494f3eaa8dda5c4f8d5d8e46514fa0767b4b750..ba30bb5d4f50d9f536af2bcbf1cbb84f20ba78e9 100644
|
||||
index 4ceaa30497d240acee5899262f4a119a5a883275..6b70d19009844b074f432ac7566a47aba6aa8882 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -641,10 +641,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -672,10 +672,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
@@ -26,12 +60,12 @@ index 7494f3eaa8dda5c4f8d5d8e46514fa0767b4b750..ba30bb5d4f50d9f536af2bcbf1cbb84f
|
||||
- // - Document::Shutdown() can dispose plugins which can run script.
|
||||
- ScriptForbiddenScope forbid_script;
|
||||
if (!Client())
|
||||
return;
|
||||
return false;
|
||||
|
||||
@@ -661,6 +657,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
// Notify WindowProxyManager that the frame is closing, since its cleanup ends
|
||||
// up calling back to LocalFrameClient via WindowProxy.
|
||||
GetWindowProxyManager()->ClearForClose();
|
||||
@@ -716,6 +712,10 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
+ // This is the earliest that scripting can be disabled:
|
||||
+ // - FrameLoader::Detach() can fire XHR abort events
|
||||
+ // - Document::Shutdown() can dispose plugins which can run script.
|
||||
|
||||
@@ -7,10 +7,10 @@ This exposes a method for obtaining a reference to an isolated world, which is
|
||||
otherwise not available in the Blink API.
|
||||
|
||||
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
|
||||
index 847eeee9ae3ba29f7afd1b4cca58e262ef06c773..ffeaf89a493d93e34480d3b5ed02536a4e264ff7 100644
|
||||
index e397b71732828ffdce2a1a2d006e5f6b0ef531c1..a56deb181dce34de6f9bec459f9745ec92245916 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame.h
|
||||
@@ -350,6 +350,8 @@ class WebLocalFrame : public WebFrame {
|
||||
@@ -367,6 +367,8 @@ class WebLocalFrame : public WebFrame {
|
||||
// Returns the world ID associated with |script_context|.
|
||||
virtual int32_t GetScriptContextWorldId(
|
||||
v8::Local<v8::Context> script_context) const = 0;
|
||||
@@ -20,10 +20,10 @@ index 847eeee9ae3ba29f7afd1b4cca58e262ef06c773..ffeaf89a493d93e34480d3b5ed02536a
|
||||
// Executes script in the context of the current page and returns the value
|
||||
// that the script evaluated to with callback. Script execution can be
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
index 20392b149a0f7468e33ea7e055092152b7b30c99..99cf7f0d5484d2a3c4412dea2b883b7d55de7f94 100644
|
||||
index b4dd040e6e74b1791454c01ef45f6cae780056de..8f8196932b8a13849d092c0b5bffc277b4775785 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
|
||||
@@ -997,6 +997,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
|
||||
@@ -1034,6 +1034,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
|
||||
return MainWorldScriptContext()->Global();
|
||||
}
|
||||
|
||||
@@ -38,10 +38,10 @@ index 20392b149a0f7468e33ea7e055092152b7b30c99..99cf7f0d5484d2a3c4412dea2b883b7d
|
||||
return BindingSecurity::ShouldAllowAccessToFrame(
|
||||
CurrentDOMWindow(V8PerIsolateData::MainThreadIsolate()),
|
||||
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.h b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
index debc4b14fbde344a0fa675f5b8c334da1eedc3dd..300e8e19d5aa0397ee85421f31aa8c6d0794d14c 100644
|
||||
index 5cc6f7a58ec3e89f0cd2aaddb8daa08facbacf5b..917865a2fe3564a50c9bd91bf9e2a99cef0fb424 100644
|
||||
--- a/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
+++ b/third_party/blink/renderer/core/frame/web_local_frame_impl.h
|
||||
@@ -161,6 +161,8 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
@@ -162,6 +162,8 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
v8::Local<v8::Context> MainWorldScriptContext() const override;
|
||||
int32_t GetScriptContextWorldId(
|
||||
v8::Local<v8::Context> script_context) const override;
|
||||
|
||||
@@ -6,7 +6,7 @@ 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 fab890501a2a94ecbd423dd9ef91ba57eb9f5de1..a5c8558194c9e694f5dd683b4db9b914c43ed260 100644
|
||||
index 17cf9cda9e54fef267e362344f7faacd22893cce..7916e87c19fd21ae9675573af04ac2aa8133daf1 100644
|
||||
--- a/third_party/boringssl/BUILD.gn
|
||||
+++ b/third_party/boringssl/BUILD.gn
|
||||
@@ -46,6 +46,19 @@ config("no_asm_config") {
|
||||
|
||||
@@ -8,7 +8,7 @@ categories in use are known / declared. This patch is required for us
|
||||
to introduce a new Electron category for Electron-specific tracing.
|
||||
|
||||
diff --git a/base/trace_event/builtin_categories.h b/base/trace_event/builtin_categories.h
|
||||
index b2d0c9e5fc6bd7617a47b34b0bc390bdac37d8f2..011d103a45b85c0dfeff847cf63633480f34dc0f 100644
|
||||
index ad3e86fb45ed6e115e62e89917fff8309a0e0705..c222819b9de97b988c9a2a49f971961e11665cad 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -73,6 +73,7 @@
|
||||
|
||||
@@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will
|
||||
rebuild the entire tree.
|
||||
|
||||
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
|
||||
index 093a94b31afccd8ec001c8178c9967159baf3eee..5b48ca69ca073af0a88b0e14b5036130e479dec1 100644
|
||||
index 1cff821865f06fec2efa37bf68781af94a4127e7..aa81930d894468825f41490ed172c339dbfdb4c6 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -123,6 +123,9 @@ if (current_os == "") {
|
||||
@@ -27,7 +27,7 @@ index 093a94b31afccd8ec001c8178c9967159baf3eee..5b48ca69ca073af0a88b0e14b5036130
|
||||
# Set to enable the official build level of optimization. This has nothing
|
||||
# to do with branding, but enables an additional level of optimization above
|
||||
# release (!is_debug). This might be better expressed as a tri-state
|
||||
@@ -333,6 +336,7 @@ default_compiler_configs = [
|
||||
@@ -344,6 +347,7 @@ default_compiler_configs = [
|
||||
"//build/config/compiler/pgo:default_pgo_flags",
|
||||
"//build/config/coverage:default_coverage",
|
||||
"//build/config/sanitizers:default_sanitizer_flags",
|
||||
|
||||
@@ -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 52dfc50e153516bc6b35d595ea339443116e5fa8..13c1fa88019a67e4ae1181fd798b2b91900849f4 100644
|
||||
index ce1b8c15940f4cee14c429a40d3083c5ab09e235..87c15b97cb0105c57e8312bb2580b33a87ae6f75 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -5116,6 +5116,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -5213,6 +5213,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 52dfc50e153516bc6b35d595ea339443116e5fa8..13c1fa88019a67e4ae1181fd798b2b91
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 16d2127e706bf4839f596c975e88a0bf4337b3c4..382e7d01444f55650971a0cade2211fab2a37754 100644
|
||||
index f4751d821d34a998407b37ca4b8221cd8a2ad135..762d4d6164df6f097c3dd77c695a3270a225ec68 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3598,6 +3598,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3560,6 +3560,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
}
|
||||
auto* new_contents_impl = new_contents.get();
|
||||
|
||||
@@ -39,7 +39,7 @@ index 16d2127e706bf4839f596c975e88a0bf4337b3c4..382e7d01444f55650971a0cade2211fa
|
||||
new_contents_impl->GetController().SetSessionStorageNamespace(
|
||||
partition_id, session_storage_namespace);
|
||||
|
||||
@@ -3639,12 +3647,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3601,12 +3609,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
AddDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -53,13 +53,13 @@ index 16d2127e706bf4839f596c975e88a0bf4337b3c4..382e7d01444f55650971a0cade2211fa
|
||||
observer->DidOpenRequestedURL(new_contents_impl, opener, params.target_url,
|
||||
params.referrer.To<Referrer>(),
|
||||
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
|
||||
index e959809bb8d20294e3946a73631667e71fca8ec7..68923a8f48ccec81cbc24cff70958cc19f2c00b1 100644
|
||||
index 182c6bf04e9937080efcedfc617fb9e072f10500..6fb3a1ee4a31e9a228e8ab04b1ce21c8af50ae74 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -275,6 +275,10 @@ struct CreateNewWindowParams {
|
||||
|
||||
// The window features to use for the new window.
|
||||
blink.mojom.WindowFeatures features;
|
||||
@@ -330,6 +330,10 @@ struct CreateNewWindowParams {
|
||||
// The impression associated with the navigation in the new window, if
|
||||
// one is specified.
|
||||
Impression? impression;
|
||||
+
|
||||
+ // Extra fields added by Electron.
|
||||
+ string raw_features;
|
||||
@@ -68,10 +68,10 @@ index e959809bb8d20294e3946a73631667e71fca8ec7..68923a8f48ccec81cbc24cff70958cc1
|
||||
|
||||
// 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 e1c6c1f7ca02fc5b8d379e435be6d52572e16266..2b0dd7cd7bdfcdc0c5a2e947e7f5faee86546330 100644
|
||||
index 64493c6a92a36dadd9dd7c254856498341460a68..d1c4beb5f3a8e1fb5dfc7d1d31df9a236e3ade8e 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -544,6 +544,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -553,6 +553,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -81,10 +81,10 @@ index e1c6c1f7ca02fc5b8d379e435be6d52572e16266..2b0dd7cd7bdfcdc0c5a2e947e7f5faee
|
||||
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 2a341fb5d2f9636c827b9f162d7bf0fcd66fe2e1..79d88cab12a1bce6e386fc470622d670bfaa6730 100644
|
||||
index 2cfb4a2bb17daaa831fca95bd21f8341751db7b3..d42c4f7a76f78f1590451691909066e86f29e809 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -150,6 +150,7 @@ class NetworkService;
|
||||
@@ -154,6 +154,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
@@ -92,7 +92,7 @@ index 2a341fb5d2f9636c827b9f162d7bf0fcd66fe2e1..79d88cab12a1bce6e386fc470622d670
|
||||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -874,6 +875,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -904,6 +905,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -102,7 +102,7 @@ index 2a341fb5d2f9636c827b9f162d7bf0fcd66fe2e1..79d88cab12a1bce6e386fc470622d670
|
||||
bool opener_suppressed,
|
||||
bool* no_javascript_access);
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 88e89a64cd0333de5fd38aaf2e29f39c8c6a2a20..3abbd89cf26a5e9d53352ad8c9f70d9d0bc52399 100644
|
||||
index 23ef0fe1e0275778bccd1bbae8ec46fa3dc24a7c..41bae2ebe3c6db1fc81a90763f304e90b8a1005c 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -27,6 +27,17 @@ namespace content {
|
||||
@@ -124,7 +124,7 @@ index 88e89a64cd0333de5fd38aaf2e29f39c8c6a2a20..3abbd89cf26a5e9d53352ad8c9f70d9d
|
||||
const OpenURLParams& params) {
|
||||
return nullptr;
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 49771a2f3db4d0d17822da81cd0cdc46453c1fd2..91fa6ef49923afdd39a5bb9848c88ee9979e2770 100644
|
||||
index 21d30d1b60ba870a35be87f8d1823ef5e3902a01..73b85693d59f25160df21c3b535869b3d03c3a76 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -17,6 +17,7 @@
|
||||
@@ -150,33 +150,32 @@ index 49771a2f3db4d0d17822da81cd0cdc46453c1fd2..91fa6ef49923afdd39a5bb9848c88ee9
|
||||
// typically happens when popups are created.
|
||||
virtual void WebContentsCreated(WebContents* source_contents,
|
||||
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
|
||||
index 2024bbc8dd91defdda32ad058c7450facf2c3382..bc49833e7788c312bfe38db56f4444f2e294ae13 100644
|
||||
index 7fc0a7edbfe1f274ed685277d3a5d4b560dd87d2..5efeed6fdf1e9f707db658a0da3408e16a6a66e0 100644
|
||||
--- a/content/renderer/render_view_impl.cc
|
||||
+++ b/content/renderer/render_view_impl.cc
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "third_party/blink/public/common/features.h"
|
||||
@@ -28,6 +28,7 @@
|
||||
#include "third_party/blink/public/platform/impression_conversions.h"
|
||||
#include "third_party/blink/public/platform/modules/video_capture/web_video_capture_impl_manager.h"
|
||||
#include "third_party/blink/public/platform/url_conversion.h"
|
||||
+#include "third_party/blink/public/platform/web_url_request_util.h"
|
||||
#include "third_party/blink/public/web/modules/mediastream/web_media_stream_device_observer.h"
|
||||
#include "third_party/blink/public/web/web_frame_widget.h"
|
||||
#include "third_party/blink/public/web/web_local_frame.h"
|
||||
@@ -381,6 +382,10 @@ WebView* RenderViewImpl::CreateView(
|
||||
@@ -385,6 +386,9 @@ WebView* RenderViewImpl::CreateView(
|
||||
if (impression) {
|
||||
params->impression = blink::ConvertWebImpressionToImpression(*impression);
|
||||
}
|
||||
params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
|
||||
|
||||
+ params->raw_features = features.raw_features.Utf8(
|
||||
+ WTF::UTF8ConversionMode::kStrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD);
|
||||
+ params->body = GetRequestBodyForWebURLRequest(request);
|
||||
+
|
||||
|
||||
// We preserve this information before sending the message since |params| is
|
||||
// moved on send.
|
||||
bool is_background_tab =
|
||||
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
index 6f5ae5bf1938133933f8055824e554a57470bbb9..7391fac052218c660cb122181e16ef84dc1a2e74 100644
|
||||
index 52bfdcfe1b1530133582dcd6bdef4ea80c8d8b45..adf92fa28b0a638cb311c48bc142448022513375 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.cc
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
@@ -378,6 +378,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
@@ -442,6 +442,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -221,10 +220,10 @@ index 4f735ad0d97eaac9a57dad137e479f8a7ec33a36..0a3c5821962c85609b64b3625fa6b8d6
|
||||
|
||||
} // 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 fa07443f71c1a0ab3780290157cbe6db04dae8f7..271da1447c0efe17b245f556d5ce3f9b3fb22ae2 100644
|
||||
index 74539b9e48b034355e67e43eb528e8597d4cefdd..1cd316f90a037d8736e89bbfb28fb26523ccd97b 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
|
||||
@@ -1952,6 +1952,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
@@ -2019,6 +2019,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
|
||||
}
|
||||
|
||||
WebWindowFeatures window_features = GetWindowFeaturesFromString(features);
|
||||
|
||||
155
patches/chromium/cherry-pick-5902d1aa722a.patch
Normal file
155
patches/chromium/cherry-pick-5902d1aa722a.patch
Normal file
@@ -0,0 +1,155 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Robinson <mrobinson@igalia.com>
|
||||
Date: Fri, 15 Jan 2021 10:52:00 +0000
|
||||
Subject: Use the native combobox a11y role more often on MacOS
|
||||
|
||||
Instead of mapping the ARIA combobox role to other roles on MacOS,
|
||||
always use it unless it is applied to a multiline edit field. This
|
||||
matches the specified behavior and other browsers.
|
||||
|
||||
These were originally mapped to other roles because of VoiceOver
|
||||
failures that have been fixed with other changes.
|
||||
|
||||
Bug: 1125165
|
||||
Change-Id: I26b8ccb006c15d6329da1c29193640f529fab781
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2611093
|
||||
Reviewed-by: Dominic Mazzoni <dmazzoni@chromium.org>
|
||||
Commit-Queue: Martin Robinson <mrobinson@igalia.com>
|
||||
Cr-Commit-Position: refs/heads/master@{#844021}
|
||||
|
||||
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
index f1f75aae285bbffc05e5598f411821a18ca47729..d997cfaa6275a570686d0c1703c30f21ca82a926 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
@@ -2002,7 +2002,7 @@ - (NSString*)role {
|
||||
cocoa_role = NSAccessibilityGroupRole;
|
||||
} else if ((_owner->IsPlainTextField() &&
|
||||
_owner->HasState(ax::mojom::State::kMultiline)) ||
|
||||
- _owner->IsRichTextField()) {
|
||||
+ (_owner->IsRichTextField() && !ui::IsComboBox(role))) {
|
||||
cocoa_role = NSAccessibilityTextAreaRole;
|
||||
} else if (role == ax::mojom::Role::kImage &&
|
||||
_owner->HasExplicitlyEmptyName()) {
|
||||
diff --git a/content/test/data/accessibility/aria/aria-combobox-uneditable-expected-mac.txt b/content/test/data/accessibility/aria/aria-combobox-uneditable-expected-mac.txt
|
||||
index f30f15e3e3cb50d7d5f31ce3c15fcd5d533e8c12..a3fe1ad8d3ea617b99fd9ffbbfc2b3ff8094b190 100644
|
||||
--- a/content/test/data/accessibility/aria/aria-combobox-uneditable-expected-mac.txt
|
||||
+++ b/content/test/data/accessibility/aria/aria-combobox-uneditable-expected-mac.txt
|
||||
@@ -1,7 +1,8 @@
|
||||
AXWebArea AXFocused=1
|
||||
++AXGroup
|
||||
++++AXStaticText AXValue='Choose a fruit, with text content'
|
||||
-++AXPopUpButton AXLinkedUIElements=[:6] AXTitle='Choose a fruit, with text content' AXValue='Apple'
|
||||
+++AXComboBox AXLinkedUIElements=[:6] AXTitle='Choose a fruit, with text content' AXValue='Apple'
|
||||
+
|
||||
++++AXStaticText AXValue='Apple'
|
||||
++AXList
|
||||
++++AXStaticText AXValue='Apple'
|
||||
diff --git a/content/test/data/accessibility/aria/aria-haspopup-expected-mac.txt b/content/test/data/accessibility/aria/aria-haspopup-expected-mac.txt
|
||||
index 11d0f747cade8f03b7803fd11f28b1d6ef7e2491..a3e161713f6cb47d7b03bc2cb90d7311c9ab76c7 100644
|
||||
--- a/content/test/data/accessibility/aria/aria-haspopup-expected-mac.txt
|
||||
+++ b/content/test/data/accessibility/aria/aria-haspopup-expected-mac.txt
|
||||
@@ -1,10 +1,10 @@
|
||||
AXWebArea
|
||||
-++AXPopUpButton AXHasPopup=1 AXPopupValue='menu'
|
||||
-++AXPopUpButton
|
||||
-++AXPopUpButton AXHasPopup=1 AXPopupValue='menu'
|
||||
-++AXPopUpButton AXHasPopup=1 AXPopupValue='listbox'
|
||||
-++AXPopUpButton AXHasPopup=1 AXPopupValue='grid'
|
||||
-++AXPopUpButton AXHasPopup=1 AXPopupValue='dialog'
|
||||
-++AXPopUpButton AXHasPopup=1 AXPopupValue='listbox'
|
||||
-++AXPopUpButton AXHasPopup=1 AXPopupValue='listbox'
|
||||
-++AXPopUpButton AXHasPopup=1 AXPopupValue='listbox'
|
||||
+++AXComboBox AXHasPopup=1 AXPopupValue='menu'
|
||||
+++AXComboBox
|
||||
+++AXComboBox AXHasPopup=1 AXPopupValue='menu'
|
||||
+++AXComboBox AXHasPopup=1 AXPopupValue='listbox'
|
||||
+++AXComboBox AXHasPopup=1 AXPopupValue='grid'
|
||||
+++AXComboBox AXHasPopup=1 AXPopupValue='dialog'
|
||||
+++AXComboBox AXHasPopup=1 AXPopupValue='listbox'
|
||||
+++AXComboBox AXHasPopup=1 AXPopupValue='listbox'
|
||||
+++AXComboBox AXHasPopup=1 AXPopupValue='listbox'
|
||||
diff --git a/content/test/data/accessibility/aria/aria-orientation-expected-mac.txt b/content/test/data/accessibility/aria/aria-orientation-expected-mac.txt
|
||||
index 4c605836da4804e91142dcaedd45dc4e0c259756..c04259a0a2148413b0482595e91c7a750df8a7bd 100644
|
||||
--- a/content/test/data/accessibility/aria/aria-orientation-expected-mac.txt
|
||||
+++ b/content/test/data/accessibility/aria/aria-orientation-expected-mac.txt
|
||||
@@ -1,7 +1,7 @@
|
||||
AXWebArea
|
||||
-++AXGroup
|
||||
-++AXGroup AXOrientation='AXHorizontalOrientation'
|
||||
-++AXGroup AXOrientation='AXVerticalOrientation'
|
||||
+++AXComboBox
|
||||
+++AXComboBox AXOrientation='AXHorizontalOrientation'
|
||||
+++AXComboBox AXOrientation='AXVerticalOrientation'
|
||||
++AXList AXOrientation='AXVerticalOrientation'
|
||||
++AXList AXOrientation='AXHorizontalOrientation'
|
||||
++AXList AXOrientation='AXVerticalOrientation'
|
||||
diff --git a/content/test/data/accessibility/aria/aria1.1-combobox-expected-mac.txt b/content/test/data/accessibility/aria/aria1.1-combobox-expected-mac.txt
|
||||
index b942711938c6c839317e6b96fd9e4a6aa98ee451..96f8201c834b12be7b490f23c1e2d65ab2149c96 100644
|
||||
--- a/content/test/data/accessibility/aria/aria1.1-combobox-expected-mac.txt
|
||||
+++ b/content/test/data/accessibility/aria/aria1.1-combobox-expected-mac.txt
|
||||
@@ -1,12 +1,12 @@
|
||||
AXWebArea
|
||||
++AXGroup
|
||||
++++AXStaticText AXValue='State'
|
||||
-++AXGroup AXTitle='State'
|
||||
+++AXComboBox AXTitle='State'
|
||||
++++AXTextField AXLinkedUIElements=[:6]
|
||||
++AXList
|
||||
++++AXStaticText AXValue='Alabama'
|
||||
++++AXStaticText AXFocused=1 AXValue='Alaska'
|
||||
-++AXGroup AXTitle='State'
|
||||
+++AXComboBox AXTitle='State'
|
||||
++++AXTextField AXLinkedUIElements=[:11]
|
||||
++AXList
|
||||
++++AXStaticText AXValue='Alabama'
|
||||
diff --git a/ui/accessibility/ax_role_properties.cc b/ui/accessibility/ax_role_properties.cc
|
||||
index c09f63643ae982970e7e280281ba71da63dd40de..8b966e2c877720eb8b88c06b8e7773fd70195a5c 100644
|
||||
--- a/ui/accessibility/ax_role_properties.cc
|
||||
+++ b/ui/accessibility/ax_role_properties.cc
|
||||
@@ -723,6 +723,17 @@ bool IsText(ax::mojom::Role role) {
|
||||
}
|
||||
}
|
||||
|
||||
+bool IsComboBox(const ax::mojom::Role role) {
|
||||
+ switch (role) {
|
||||
+ case ax::mojom::Role::kComboBoxMenuButton:
|
||||
+ case ax::mojom::Role::kComboBoxGrouping:
|
||||
+ case ax::mojom::Role::kTextFieldWithComboBox:
|
||||
+ return true;
|
||||
+ default:
|
||||
+ return false;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
bool ShouldHaveReadonlyStateByDefault(const ax::mojom::Role role) {
|
||||
switch (role) {
|
||||
case ax::mojom::Role::kArticle:
|
||||
diff --git a/ui/accessibility/ax_role_properties.h b/ui/accessibility/ax_role_properties.h
|
||||
index 117856080663708f0ee33b9e254f9e8a2fe330cc..02804128765221d473d0ab83d6ab151bdcbd7b99 100644
|
||||
--- a/ui/accessibility/ax_role_properties.h
|
||||
+++ b/ui/accessibility/ax_role_properties.h
|
||||
@@ -179,6 +179,9 @@ AX_BASE_EXPORT bool IsTableRow(ax::mojom::Role role);
|
||||
// break, or inline text box.
|
||||
AX_BASE_EXPORT bool IsText(ax::mojom::Role role);
|
||||
|
||||
+// Returns true if the provided role is any of the combobox-related roles.
|
||||
+AX_BASE_EXPORT bool IsComboBox(ax::mojom::Role role);
|
||||
+
|
||||
// Returns true if the node should be read only by default
|
||||
AX_BASE_EXPORT bool ShouldHaveReadonlyStateByDefault(
|
||||
const ax::mojom::Role role);
|
||||
diff --git a/ui/accessibility/platform/ax_platform_node_mac.mm b/ui/accessibility/platform/ax_platform_node_mac.mm
|
||||
index ce50a0a509ca151c7e406729b78655f60eaa4c98..93a3618c7fcbcbcee67b297dffc9d51a37d225ed 100644
|
||||
--- a/ui/accessibility/platform/ax_platform_node_mac.mm
|
||||
+++ b/ui/accessibility/platform/ax_platform_node_mac.mm
|
||||
@@ -57,8 +57,8 @@ RoleMap BuildRoleMap() {
|
||||
{ax::mojom::Role::kColorWell, NSAccessibilityColorWellRole},
|
||||
{ax::mojom::Role::kColumn, NSAccessibilityColumnRole},
|
||||
{ax::mojom::Role::kColumnHeader, @"AXCell"},
|
||||
- {ax::mojom::Role::kComboBoxGrouping, NSAccessibilityGroupRole},
|
||||
- {ax::mojom::Role::kComboBoxMenuButton, NSAccessibilityPopUpButtonRole},
|
||||
+ {ax::mojom::Role::kComboBoxGrouping, NSAccessibilityComboBoxRole},
|
||||
+ {ax::mojom::Role::kComboBoxMenuButton, NSAccessibilityComboBoxRole},
|
||||
{ax::mojom::Role::kComment, NSAccessibilityGroupRole},
|
||||
{ax::mojom::Role::kComplementary, NSAccessibilityGroupRole},
|
||||
{ax::mojom::Role::kContentDeletion, NSAccessibilityGroupRole},
|
||||
298
patches/chromium/cherry-pick-5c7ad5393f74.patch
Normal file
298
patches/chromium/cherry-pick-5c7ad5393f74.patch
Normal file
@@ -0,0 +1,298 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Martin Robinson <mrobinson@igalia.com>
|
||||
Date: Mon, 25 Jan 2021 14:27:23 +0000
|
||||
Subject: Mac a11y: Use the keyboard focusable element for
|
||||
NSAccessibilityTextChangeElement
|
||||
|
||||
When setting the NSAccessibilityTextChangeElement property for
|
||||
NSAccessibilitySelectedTextChangedNotifications, use the keyboard
|
||||
focusable element instead of the element that has the focus side of the
|
||||
text selection. Using the latter, when the element is an empty group,
|
||||
VoiceOver will focus the containing Web View (when using the VO
|
||||
cursor follows keyboard focus setting). This makes it impossible to use
|
||||
the down keyboard key to move past these empty nodes.
|
||||
|
||||
VoiceOver cursor" setting in contenteditable nodes.
|
||||
|
||||
AX-Relnotes: Fix a bug with the "Synchronize keyboard focus and
|
||||
Bug: 952922
|
||||
Change-Id: I3627936726f89b01132c32bd5d83758fc7c3dac4
|
||||
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2642686
|
||||
Auto-Submit: Martin Robinson <mrobinson@igalia.com>
|
||||
Commit-Queue: Nektarios Paisios <nektar@chromium.org>
|
||||
Reviewed-by: Nektarios Paisios <nektar@chromium.org>
|
||||
Cr-Commit-Position: refs/heads/master@{#846707}
|
||||
|
||||
diff --git a/content/browser/accessibility/browser_accessibility_cocoa_browsertest.mm b/content/browser/accessibility/browser_accessibility_cocoa_browsertest.mm
|
||||
index 03b84fa0963df86c699c4c0a56ca527d5b50a46c..9d042a004217ec5c182bf562207c86cb967df2d2 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_cocoa_browsertest.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_cocoa_browsertest.mm
|
||||
@@ -20,12 +20,11 @@
|
||||
#include "net/base/data_url.h"
|
||||
#include "testing/gtest/include/gtest/gtest.h"
|
||||
#include "testing/gtest_mac.h"
|
||||
+#include "ui/accessibility/platform/ax_private_webkit_constants_mac.h"
|
||||
#include "url/gurl.h"
|
||||
|
||||
namespace content {
|
||||
|
||||
-namespace {
|
||||
-
|
||||
class BrowserAccessibilityCocoaBrowserTest : public ContentBrowserTest {
|
||||
public:
|
||||
BrowserAccessibilityCocoaBrowserTest() {}
|
||||
@@ -73,6 +72,11 @@ void FocusAccessibilityElementAndWaitForFocusChange(
|
||||
WaitForAccessibilityFocusChange();
|
||||
}
|
||||
|
||||
+ NSDictionary* GetUserInfoForSelectedTextChangedNotification() {
|
||||
+ auto* manager = static_cast<BrowserAccessibilityManagerMac*>(GetManager());
|
||||
+ return manager->GetUserInfoForSelectedTextChangedNotification();
|
||||
+ }
|
||||
+
|
||||
private:
|
||||
BrowserAccessibility* FindNodeInSubtree(BrowserAccessibility& node,
|
||||
ax::mojom::Role role) {
|
||||
@@ -89,8 +93,6 @@ void FocusAccessibilityElementAndWaitForFocusChange(
|
||||
}
|
||||
};
|
||||
|
||||
-} // namespace
|
||||
-
|
||||
IN_PROC_BROWSER_TEST_F(BrowserAccessibilityCocoaBrowserTest,
|
||||
AXTextMarkerForTextEdit) {
|
||||
EXPECT_TRUE(NavigateToURL(shell(), GURL(url::kAboutBlankURL)));
|
||||
@@ -106,12 +108,11 @@ GURL url(R"HTML(data:text/html,
|
||||
|
||||
BrowserAccessibility* text_field = FindNode(ax::mojom::Role::kTextField);
|
||||
ASSERT_NE(nullptr, text_field);
|
||||
- EXPECT_TRUE(content::ExecuteScript(
|
||||
- shell()->web_contents(), "document.querySelector('input').focus()"));
|
||||
+ EXPECT_TRUE(ExecuteScript(shell()->web_contents(),
|
||||
+ "document.querySelector('input').focus()"));
|
||||
|
||||
- content::SimulateKeyPress(shell()->web_contents(),
|
||||
- ui::DomKey::FromCharacter('B'), ui::DomCode::US_B,
|
||||
- ui::VKEY_B, false, false, false, false);
|
||||
+ SimulateKeyPress(shell()->web_contents(), ui::DomKey::FromCharacter('B'),
|
||||
+ ui::DomCode::US_B, ui::VKEY_B, false, false, false, false);
|
||||
|
||||
base::scoped_nsobject<BrowserAccessibilityCocoa> cocoa_text_field(
|
||||
[ToBrowserAccessibilityCocoa(text_field) retain]);
|
||||
@@ -122,10 +123,9 @@ AccessibilityNotificationWaiter value_waiter(shell()->web_contents(),
|
||||
AXTextEdit text_edit = [cocoa_text_field computeTextEdit];
|
||||
EXPECT_NE(text_edit.edit_text_marker, nil);
|
||||
|
||||
- EXPECT_EQ(
|
||||
- content::AXTextMarkerToPosition(text_edit.edit_text_marker)->ToString(),
|
||||
- "TextPosition anchor_id=4 text_offset=1 affinity=downstream "
|
||||
- "annotated_text=B<>");
|
||||
+ EXPECT_EQ(AXTextMarkerToPosition(text_edit.edit_text_marker)->ToString(),
|
||||
+ "TextPosition anchor_id=4 text_offset=1 affinity=downstream "
|
||||
+ "annotated_text=B<>");
|
||||
}
|
||||
|
||||
IN_PROC_BROWSER_TEST_F(BrowserAccessibilityCocoaBrowserTest,
|
||||
@@ -604,7 +604,7 @@ GURL url(R"HTML(data:text/html,
|
||||
ASSERT_NSEQ(@"AXRow", [tree_children[0] role]);
|
||||
ASSERT_NSEQ(@"AXRow", [tree_children[1] role]);
|
||||
|
||||
- content::RenderProcessHost* render_process_host =
|
||||
+ RenderProcessHost* render_process_host =
|
||||
shell()->web_contents()->GetMainFrame()->GetProcess();
|
||||
auto menu_filter = base::MakeRefCounted<ContextMenuFilter>(
|
||||
ContextMenuFilter::ShowBehavior::kPreventShow);
|
||||
@@ -619,9 +619,8 @@ GURL url(R"HTML(data:text/html,
|
||||
EXPECT_NE(tree_point, item_2_point);
|
||||
|
||||
// Now focus the second child and trigger a context menu on the tree.
|
||||
- ASSERT_TRUE(
|
||||
- content::ExecuteScript(shell()->web_contents(),
|
||||
- "document.body.children[0].children[1].focus();"));
|
||||
+ ASSERT_TRUE(ExecuteScript(shell()->web_contents(),
|
||||
+ "document.body.children[0].children[1].focus();"));
|
||||
WaitForAccessibilityFocusChange();
|
||||
|
||||
// Triggering a context menu on the tree should now trigger the menu
|
||||
@@ -741,4 +740,63 @@ GURL url(R"HTML(data:text/html,
|
||||
}
|
||||
}
|
||||
|
||||
+IN_PROC_BROWSER_TEST_F(BrowserAccessibilityCocoaBrowserTest,
|
||||
+ TestNSAccessibilityTextChangeElement) {
|
||||
+ AccessibilityNotificationWaiter waiter(shell()->web_contents(),
|
||||
+ ui::kAXModeComplete,
|
||||
+ ax::mojom::Event::kLoadComplete);
|
||||
+
|
||||
+ GURL url(R"HTML(data:text/html,
|
||||
+ <div id="editable" contenteditable="true" dir="auto">
|
||||
+ <p>One</p>
|
||||
+ <p>Two</p>
|
||||
+ <p><br></p>
|
||||
+ <p>Three</p>
|
||||
+ <p>Four</p>
|
||||
+ </div>)HTML");
|
||||
+
|
||||
+ ASSERT_TRUE(NavigateToURL(shell(), url));
|
||||
+ waiter.WaitForNotification();
|
||||
+
|
||||
+ base::scoped_nsobject<BrowserAccessibilityCocoa> content_editable(
|
||||
+ [ToBrowserAccessibilityCocoa(GetManager()->GetRoot()->PlatformGetChild(0))
|
||||
+ retain]);
|
||||
+ EXPECT_EQ([[content_editable children] count], 5ul);
|
||||
+
|
||||
+ WebContents* web_contents = shell()->web_contents();
|
||||
+ auto run_script_and_wait_for_selection_change =
|
||||
+ [web_contents](const char* script) {
|
||||
+ AccessibilityNotificationWaiter waiter(
|
||||
+ web_contents, ui::kAXModeComplete,
|
||||
+ ax::mojom::Event::kTextSelectionChanged);
|
||||
+ ASSERT_TRUE(ExecuteScript(web_contents, script));
|
||||
+ waiter.WaitForNotification();
|
||||
+ };
|
||||
+
|
||||
+ FocusAccessibilityElementAndWaitForFocusChange(content_editable);
|
||||
+
|
||||
+ run_script_and_wait_for_selection_change(R"script(
|
||||
+ let editable = document.getElementById('editable');
|
||||
+ const selection = window.getSelection();
|
||||
+ selection.collapse(editable.children[0].childNodes[0], 1);)script");
|
||||
+
|
||||
+ // The focused node in the user info should be the keyboard focusable
|
||||
+ // ancestor.
|
||||
+ NSDictionary* info = GetUserInfoForSelectedTextChangedNotification();
|
||||
+ EXPECT_EQ(id{content_editable},
|
||||
+ [info objectForKey:ui::NSAccessibilityTextChangeElement]);
|
||||
+
|
||||
+ AccessibilityNotificationWaiter waiter2(
|
||||
+ web_contents, ui::kAXModeComplete,
|
||||
+ ax::mojom::Event::kTextSelectionChanged);
|
||||
+ run_script_and_wait_for_selection_change(
|
||||
+ "selection.collapse(editable.children[2].childNodes[0], 0);");
|
||||
+
|
||||
+ // Even when the cursor is in the empty paragraph text node, the focused
|
||||
+ // object should be the keyboard focusable ancestor.
|
||||
+ info = GetUserInfoForSelectedTextChangedNotification();
|
||||
+ EXPECT_EQ(id{content_editable},
|
||||
+ [info objectForKey:ui::NSAccessibilityTextChangeElement]);
|
||||
+}
|
||||
+
|
||||
} // namespace content
|
||||
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.h b/content/browser/accessibility/browser_accessibility_manager_mac.h
|
||||
index 925bfe1ea191ab846805fdbff1b0314e779b1c9e..5488245e22b883105dbe1e225156ab18e1a64534 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_manager_mac.h
|
||||
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.h
|
||||
@@ -19,6 +19,8 @@
|
||||
|
||||
namespace content {
|
||||
|
||||
+class BrowserAccessibilityCocoaBrowserTest;
|
||||
+
|
||||
class CONTENT_EXPORT BrowserAccessibilityManagerMac
|
||||
: public BrowserAccessibilityManager {
|
||||
public:
|
||||
@@ -54,8 +56,7 @@ class CONTENT_EXPORT BrowserAccessibilityManagerMac
|
||||
const std::vector<Change>& changes) override;
|
||||
|
||||
// Returns an autoreleased object.
|
||||
- NSDictionary* GetUserInfoForSelectedTextChangedNotification(
|
||||
- bool focus_changed);
|
||||
+ NSDictionary* GetUserInfoForSelectedTextChangedNotification();
|
||||
|
||||
// Returns an autoreleased object.
|
||||
NSDictionary* GetUserInfoForValueChangedNotification(
|
||||
@@ -80,6 +81,8 @@ class CONTENT_EXPORT BrowserAccessibilityManagerMac
|
||||
// constructor.
|
||||
friend class BrowserAccessibilityManager;
|
||||
|
||||
+ friend class BrowserAccessibilityCocoaBrowserTest;
|
||||
+
|
||||
DISALLOW_COPY_AND_ASSIGN(BrowserAccessibilityManagerMac);
|
||||
};
|
||||
|
||||
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
index 93bcc87244d41c6b72908ed31f83cdd629f6e69f..bbffc89e4f6f2f7b85d285de24120ade082a0090 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
@@ -131,8 +131,6 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
auto native_node = ToBrowserAccessibilityCocoa(node);
|
||||
DCHECK(native_node);
|
||||
|
||||
- bool focus_changed = GetFocus() != GetLastFocusedNode();
|
||||
-
|
||||
// Refer to |AXObjectCache::postPlatformNotification| in WebKit source code.
|
||||
NSString* mac_notification = nullptr;
|
||||
switch (event_type) {
|
||||
@@ -183,8 +181,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
if (!focus)
|
||||
break; // Just fire a notification on the root.
|
||||
|
||||
- NSDictionary* user_info =
|
||||
- GetUserInfoForSelectedTextChangedNotification(focus_changed);
|
||||
+ NSDictionary* user_info = GetUserInfoForSelectedTextChangedNotification();
|
||||
|
||||
BrowserAccessibilityManager* root_manager = GetRootManager();
|
||||
if (!root_manager)
|
||||
@@ -452,9 +449,8 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
}
|
||||
}
|
||||
|
||||
-NSDictionary*
|
||||
-BrowserAccessibilityManagerMac::GetUserInfoForSelectedTextChangedNotification(
|
||||
- bool focus_changed) {
|
||||
+NSDictionary* BrowserAccessibilityManagerMac::
|
||||
+ GetUserInfoForSelectedTextChangedNotification() {
|
||||
NSMutableDictionary* user_info =
|
||||
[[[NSMutableDictionary alloc] init] autorelease];
|
||||
[user_info setObject:@YES forKey:ui::NSAccessibilityTextStateSyncKey];
|
||||
@@ -471,7 +467,10 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
// TODO(mrobinson): Determine definitively what the type of this text
|
||||
// selection change is. This requires passing this information here from
|
||||
// blink.
|
||||
- if (focus_changed) {
|
||||
+ BrowserAccessibility* focused_accessibility = GetFocus();
|
||||
+ DCHECK(focused_accessibility);
|
||||
+
|
||||
+ if (focused_accessibility != GetLastFocusedNode()) {
|
||||
[user_info setObject:@(ui::AXTextStateChangeTypeSelectionMove)
|
||||
forKey:ui::NSAccessibilityTextStateChangeTypeKey];
|
||||
} else {
|
||||
@@ -479,25 +478,22 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
forKey:ui::NSAccessibilityTextStateChangeTypeKey];
|
||||
}
|
||||
|
||||
- int32_t focus_id = ax_tree()->GetUnignoredSelection().focus_object_id;
|
||||
- BrowserAccessibility* focus_object = GetFromID(focus_id);
|
||||
- if (focus_object) {
|
||||
- focus_object = focus_object->PlatformGetClosestPlatformObject();
|
||||
- auto native_focus_object = ToBrowserAccessibilityCocoa(focus_object);
|
||||
- if (native_focus_object && [native_focus_object instanceActive]) {
|
||||
- [user_info setObject:native_focus_object
|
||||
- forKey:ui::NSAccessibilityTextChangeElement];
|
||||
+ focused_accessibility =
|
||||
+ focused_accessibility->PlatformGetClosestPlatformObject();
|
||||
+ auto native_focus_object = ToBrowserAccessibilityCocoa(focused_accessibility);
|
||||
+ if (native_focus_object && [native_focus_object instanceActive]) {
|
||||
+ [user_info setObject:native_focus_object
|
||||
+ forKey:ui::NSAccessibilityTextChangeElement];
|
||||
|
||||
#ifndef MAS_BUILD
|
||||
- id selected_text = [native_focus_object selectedTextMarkerRange];
|
||||
- if (selected_text) {
|
||||
- NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
|
||||
- @"AXSelectedTextMarkerRange";
|
||||
- [user_info setObject:selected_text
|
||||
- forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
|
||||
- }
|
||||
-#endif
|
||||
+ id selected_text = [native_focus_object selectedTextMarkerRange];
|
||||
+ if (selected_text) {
|
||||
+ NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
|
||||
+ @"AXSelectedTextMarkerRange";
|
||||
+ [user_info setObject:selected_text
|
||||
+ forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
|
||||
}
|
||||
+#endif
|
||||
}
|
||||
|
||||
return user_info;
|
||||
@@ -9,10 +9,10 @@ we're running with contextIsolation enabled, we should be falling back
|
||||
to Blink's logic. This will be upstreamed in some form.
|
||||
|
||||
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
index ebb6db2929f2192ca73fb677986b9e07737f8569..a1450c55841de39bbf3f1809ad2507991c01ced1 100644
|
||||
index e2213b00d73f399bb14b7edfa0fb719aa12a6be5..363f9e7a823864f67faa7ce9ec6fd914f371652e 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
@@ -451,7 +451,7 @@ CodeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context,
|
||||
@@ -450,7 +450,7 @@ CodeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context,
|
||||
return {true, std::move(stringified_source)};
|
||||
}
|
||||
|
||||
|
||||
@@ -140,10 +140,10 @@ index dc7f3bc886e7130c66d98ae6de73c17db746cbe5..6197db3570c860f39f381370e1af37f8
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index 93bc1b4289ed14bd59c640351a83efee949bf75a..d36a754c8abc98f124c2d295b78beadddf5ae2d9 100644
|
||||
index 409f908148b3d2885216a12048fc3f2e3ea47c89..d43be2439324753f504109f3a3fc0a4f3799bee5 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -1798,12 +1798,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -1804,12 +1804,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -159,10 +159,10 @@ index 93bc1b4289ed14bd59c640351a83efee949bf75a..d36a754c8abc98f124c2d295b78beadd
|
||||
|
||||
WebContents* Browser::CreateCustomWebContents(
|
||||
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
||||
index 923b9d25f98431c7d44c9abdd070d6358d2476a4..5a434f45d319d03f9dc8db2211f199ed1265c702 100644
|
||||
index 1ccab44183bf3d47762cff2198231e3fda9c53fc..7fc6a35ddee24340913f03c23fe7b8f80a102398 100644
|
||||
--- a/chrome/browser/ui/browser.h
|
||||
+++ b/chrome/browser/ui/browser.h
|
||||
@@ -780,8 +780,7 @@ class Browser : public TabStripModelObserver,
|
||||
@@ -791,8 +791,7 @@ class Browser : public TabStripModelObserver,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -201,10 +201,10 @@ index 058ec72442d59989c4d6df4a7c791ecfeff0ef99..f7c8c2139382cb2e290c561624291afe
|
||||
// The profile used for the presentation.
|
||||
Profile* otr_profile_;
|
||||
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
index 9573beffd60b8445be4e2b53f8a9ad041f7d35d2..716946bd6a054b42ff4e0a3b1bdbd2e291412e08 100644
|
||||
index e8cee3297c218cd86b1200003e574c3713ab7afe..198dbbfd3d52d8a381b3c63271320e9920671fe6 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
@@ -167,14 +167,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
@@ -168,14 +168,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -215,11 +215,11 @@ index 9573beffd60b8445be4e2b53f8a9ad041f7d35d2..716946bd6a054b42ff4e0a3b1bdbd2e2
|
||||
ScopedJavaLocalRef<jobject> obj = GetJavaDelegate(env);
|
||||
if (obj.is_null())
|
||||
return false;
|
||||
ScopedJavaLocalRef<jstring> java_url =
|
||||
- ConvertUTF8ToJavaString(env, target_url.spec());
|
||||
+ ConvertUTF8ToJavaString(env, params.target_url.spec());
|
||||
ScopedJavaLocalRef<jobject> java_gurl =
|
||||
- url::GURLAndroid::FromNativeGURL(env, target_url);
|
||||
+ url::GURLAndroid::FromNativeGURL(env, params.target_url);
|
||||
return !Java_WebContentsDelegateAndroid_shouldCreateWebContents(env, obj,
|
||||
java_url);
|
||||
java_gurl);
|
||||
}
|
||||
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
index 348c65a323c6104030f50e1336ccbd9ada9e7628..c7d6a0041de46784bb28146d5ffd53ded3e5685d 100644
|
||||
@@ -264,10 +264,10 @@ index c5c5a7b63b5b3b62a9517cbef3ae23ce57a3c89c..4f1b7e88d6d2ae89a60311c8aeb1fcee
|
||||
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 f940851b87541cb245a7439f100275c6694cee0f..97623546b3d8c44759338f3dab02aa34be71a8e4 100644
|
||||
index a2bce274bdd70c0481a1bc75d449bfadf7b91618..af8196ef8a368b6e91703a8b91db58b94417a182 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3559,8 +3559,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3521,8 +3521,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
@@ -278,10 +278,10 @@ index f940851b87541cb245a7439f100275c6694cee0f..97623546b3d8c44759338f3dab02aa34
|
||||
opener, source_site_instance, is_new_browsing_instance,
|
||||
opener->GetLastCommittedURL(), params.frame_name, params.target_url,
|
||||
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
|
||||
index 3abbd89cf26a5e9d53352ad8c9f70d9d0bc52399..c5b4c9ef5b508de0bc41e9c3ece15c52d8e30fbf 100644
|
||||
index 41bae2ebe3c6db1fc81a90763f304e90b8a1005c..b1b2a4e20d58c7eeb5bbaca3d908ce13c06140b7 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -135,8 +135,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
@@ -139,8 +139,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -292,7 +292,7 @@ index 3abbd89cf26a5e9d53352ad8c9f70d9d0bc52399..c5b4c9ef5b508de0bc41e9c3ece15c52
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 91fa6ef49923afdd39a5bb9848c88ee9979e2770..5f1cb33a890a9bdc09445dd180f06946999f6237 100644
|
||||
index 73b85693d59f25160df21c3b535869b3d03c3a76..7f70aca41af3d12bccac751f8a8639bc16598891 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -316,8 +316,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -362,10 +362,10 @@ index a7f0b19a8ab9bac6f1315ebd715d8e1b134edfe1..cbe2912d4ab2d9015396bbddf7836e10
|
||||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/fuchsia/engine/browser/frame_impl.cc b/fuchsia/engine/browser/frame_impl.cc
|
||||
index d470ef3c91475be3e10f2074de8b4ad7e29c7b19..a03718f5744aac5d5b5d09c295fb8741d783a331 100644
|
||||
index cadebbfd37738ae7df9486a4240d9bdda4197f47..79ae6d8672b7435fbe5daa22986327cb07aef557 100644
|
||||
--- a/fuchsia/engine/browser/frame_impl.cc
|
||||
+++ b/fuchsia/engine/browser/frame_impl.cc
|
||||
@@ -352,8 +352,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
@@ -372,8 +372,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -376,10 +376,10 @@ index d470ef3c91475be3e10f2074de8b4ad7e29c7b19..a03718f5744aac5d5b5d09c295fb8741
|
||||
// can catch bad client behavior while not interfering with normal operation.
|
||||
constexpr size_t kMaxPendingWebContentsCount = 10;
|
||||
diff --git a/fuchsia/engine/browser/frame_impl.h b/fuchsia/engine/browser/frame_impl.h
|
||||
index 484b1600fbac408d4cec5697f5c8bcba5ff8b1e1..46623a6b8b26143c75a4a35a02562b44d17f9287 100644
|
||||
index d6f69a298932496ed5fe29ee2ae43e35503476d4..656abba62cc533f8b8805ce4c9b5e782156aa6ed 100644
|
||||
--- a/fuchsia/engine/browser/frame_impl.h
|
||||
+++ b/fuchsia/engine/browser/frame_impl.h
|
||||
@@ -216,8 +216,7 @@ class FrameImpl : public fuchsia::web::Frame,
|
||||
@@ -234,8 +234,7 @@ class FrameImpl : public fuchsia::web::Frame,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -390,7 +390,7 @@ index 484b1600fbac408d4cec5697f5c8bcba5ff8b1e1..46623a6b8b26143c75a4a35a02562b44
|
||||
int opener_render_process_id,
|
||||
int opener_render_frame_id,
|
||||
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
|
||||
index b3e8582ca50b70b88c1e4804a93db42eac938337..367e25b1a50032413aa981252107d138d772893b 100644
|
||||
index af6718c5d217b18c2afe42ef2d66ec8a0f6671f5..42ec80412a5be0fb034c145974aa6caba66b446c 100644
|
||||
--- a/headless/lib/browser/headless_web_contents_impl.cc
|
||||
+++ b/headless/lib/browser/headless_web_contents_impl.cc
|
||||
@@ -170,8 +170,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
|
||||
|
||||
@@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from
|
||||
Electrons grit header instead of Chromes
|
||||
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index d922c9c06965c1833fdbdaebabcf5ac8cc1e6cab..76d9806c0f2e25aa119a7e353db9e709b0b80d70 100644
|
||||
index 508e6780855e31b4e9e520b793527c0e295ed01a..14dd777a3d1ede24e0f73c7718a2b69aaaff8f52 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -6156,6 +6156,7 @@ static_library("browser") {
|
||||
@@ -6203,6 +6203,7 @@ static_library("browser") {
|
||||
deps += [
|
||||
"//components/spellcheck/browser",
|
||||
"//components/spellcheck/common",
|
||||
@@ -19,7 +19,7 @@ index d922c9c06965c1833fdbdaebabcf5ac8cc1e6cab..76d9806c0f2e25aa119a7e353db9e709
|
||||
|
||||
if (!is_android) {
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
index 2b7aa1add57dccbcbf8202cead5b7d2d5a174270..2ba03fc045f2e4bb12f173aacb6581ccb20bfc5a 100644
|
||||
index d511c9085253ebfba69ba37f41193d15638bb10f..d98cfc569c775b52687a533e03c595a5e45be87e 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
@@ -6,7 +6,7 @@
|
||||
@@ -32,10 +32,10 @@ index 2b7aa1add57dccbcbf8202cead5b7d2d5a174270..2ba03fc045f2e4bb12f173aacb6581cc
|
||||
#include "components/pref_registry/pref_registry_syncable.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
diff --git a/components/language/core/browser/BUILD.gn b/components/language/core/browser/BUILD.gn
|
||||
index f28230ea94fece5ae8ca7ac27a14da48f40fadbb..c10eea103852b9411a644e1fe20a7e20a38bf187 100644
|
||||
index 41761e18716a7d9221511978dc4582a1804920e2..faea3d936c678e31fa29b93ae1ccd976ad52c7a1 100644
|
||||
--- a/components/language/core/browser/BUILD.gn
|
||||
+++ b/components/language/core/browser/BUILD.gn
|
||||
@@ -31,6 +31,7 @@ static_library("browser") {
|
||||
@@ -34,6 +34,7 @@ static_library("browser") {
|
||||
"//components/pref_registry",
|
||||
"//components/prefs",
|
||||
"//components/strings",
|
||||
@@ -44,10 +44,10 @@ index f28230ea94fece5ae8ca7ac27a14da48f40fadbb..c10eea103852b9411a644e1fe20a7e20
|
||||
]
|
||||
}
|
||||
diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc
|
||||
index 75dcb9e5c4cb1aa64800240bd9282cac469c4524..b27d374f76e24b809f9bc9cf45560603f141350c 100644
|
||||
index c14811efa87b223729d37695d86f858dd8f366ee..444c8273e4985f7e276ad0dd0fd001b027bc0d47 100644
|
||||
--- a/components/language/core/browser/language_prefs.cc
|
||||
+++ b/components/language/core/browser/language_prefs.cc
|
||||
@@ -20,7 +20,7 @@
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "components/pref_registry/pref_registry_syncable.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/prefs/scoped_user_pref_update.h"
|
||||
|
||||
@@ -7,7 +7,7 @@ Disable persiste licence support check for widevine cdm,
|
||||
as its not supported in the current version of chrome.
|
||||
|
||||
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
|
||||
index 93c95a3fdad3ea4eccd16d3a38f27d3787510549..54652ee3f074c7a015d703113211fb0bff3acd14 100644
|
||||
index 21606970e534c73c791ee8e11d767939c334d37a..0c6671dd5175540fcb727cb4c44ed3bffbaaf555 100644
|
||||
--- a/chrome/renderer/media/chrome_key_systems.cc
|
||||
+++ b/chrome/renderer/media/chrome_key_systems.cc
|
||||
@@ -16,7 +16,9 @@
|
||||
@@ -20,7 +20,7 @@ index 93c95a3fdad3ea4eccd16d3a38f27d3787510549..54652ee3f074c7a015d703113211fb0b
|
||||
#include "components/cdm/renderer/external_clear_key_key_system_properties.h"
|
||||
#include "components/cdm/renderer/widevine_key_system_properties.h"
|
||||
#include "content/public/renderer/render_thread.h"
|
||||
@@ -189,12 +191,14 @@ static SupportedCodecs GetSupportedCodecs(
|
||||
@@ -201,12 +203,14 @@ static SupportedCodecs GetSupportedCodecs(
|
||||
// Returns persistent-license session support.
|
||||
static EmeSessionTypeSupport GetPersistentLicenseSupport(
|
||||
bool supported_by_the_cdm) {
|
||||
|
||||
@@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously
|
||||
in electron::api::WebContents::ResetManagedWebContents.
|
||||
|
||||
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
|
||||
index d87cbfc0c61dfbf71c7c7f473fd6652a44420fc8..62dc65bf3d05a3c36750ccd4bec43a918b6c6748 100644
|
||||
index 80b679406ee9f24b9ef3669b0274bb467dd0a02d..bed72ab5ba6b116c081054c2424831bbc7cc9bbd 100644
|
||||
--- a/content/browser/browser_main_loop.cc
|
||||
+++ b/content/browser/browser_main_loop.cc
|
||||
@@ -1454,7 +1454,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
|
||||
@@ -1409,7 +1409,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
|
||||
NOTREACHED();
|
||||
#else
|
||||
base::RunLoop run_loop;
|
||||
|
||||
@@ -17,14 +17,14 @@ only one or two specific checks fail. Then it's better to simply comment out the
|
||||
failing checks and allow the rest of the target to have them enabled.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc
|
||||
index 44a9cde381d323183ae25490d5f07511ab2126d5..ea5b2dd99037ea531f74f1930bd1626cfc0d93bf 100644
|
||||
index 2c1ace66fecfe086c3f500995c11ca5424f9560f..468192b97015056dbe6a9dc9ba4b283c132500b8 100644
|
||||
--- a/content/browser/renderer_host/navigation_controller_impl.cc
|
||||
+++ b/content/browser/renderer_host/navigation_controller_impl.cc
|
||||
@@ -1306,8 +1306,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
|
||||
@@ -1312,8 +1312,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
|
||||
return NAVIGATION_TYPE_NEW_SUBFRAME;
|
||||
}
|
||||
|
||||
- // We only clear the session history when navigating to a new page.
|
||||
- // We only clear the session history in tests when navigating to a new entry.
|
||||
- DCHECK(!params.history_list_was_cleared);
|
||||
+ // Electron does its own book keeping of navigation entries and we
|
||||
+ // expect content to not track any, by clearing history list for
|
||||
@@ -33,7 +33,7 @@ index 44a9cde381d323183ae25490d5f07511ab2126d5..ea5b2dd99037ea531f74f1930bd1626c
|
||||
|
||||
if (rfh->GetParent()) {
|
||||
// All manual subframes would be did_create_new_entry and handled above, so
|
||||
@@ -1597,7 +1599,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
|
||||
@@ -1604,7 +1606,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewEntry(
|
||||
new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try
|
||||
re-submitting the patch.
|
||||
|
||||
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
|
||||
index c0823fa0abedf954155294a8d84c62640aa7175f..abdb7ffb1d606b972025689350c60b09650fe24a 100644
|
||||
index 1f05e6351c58cbd9e65bd48ddd4e9a4eb8c7fbf1..c865e271a45fa35f4dadc0e845392607a209c2c8 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -676,7 +676,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
@@ -702,7 +702,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -15,10 +15,10 @@ the redraw locking mechanism, which fixes these issues. The electron issue
|
||||
can be found at https://github.com/electron/electron/issues/1821
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 46f2701356063f7a554317739ec01c47adbb76ba..34b58eb81f42e70a17250b99dfaa58891dc076c1 100644
|
||||
index 4c9654191ddce3db5f9391cdbd07b1be8a77a2af..dc2cdf7467912d36261583c91c8f46fbe041c5e0 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -309,6 +309,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
|
||||
@@ -304,6 +304,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -29,7 +29,7 @@ index 46f2701356063f7a554317739ec01c47adbb76ba..34b58eb81f42e70a17250b99dfaa5889
|
||||
// A scoping class that prevents a window from being able to redraw in response
|
||||
// to invalidations that may occur within it for the lifetime of the object.
|
||||
//
|
||||
@@ -360,6 +364,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
|
||||
@@ -355,6 +359,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
|
||||
cancel_unlock_(false),
|
||||
should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
|
||||
::IsWindow(hwnd_) &&
|
||||
@@ -37,7 +37,7 @@ index 46f2701356063f7a554317739ec01c47adbb76ba..34b58eb81f42e70a17250b99dfaa5889
|
||||
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
|
||||
!ui::win::IsAeroGlassEnabled())) {
|
||||
if (should_lock_)
|
||||
@@ -974,6 +979,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
|
||||
@@ -969,6 +974,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
|
||||
return scoped_enable;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ index 46f2701356063f7a554317739ec01c47adbb76ba..34b58eb81f42e70a17250b99dfaa5889
|
||||
// HWNDMessageHandler, gfx::WindowImpl overrides:
|
||||
|
||||
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
|
||||
index 2f5eefa481f7e3752d9e527ca6b946f6d80f3878..c2353cd1058b31430b5a3cd8f6bca0434cab6a21 100644
|
||||
index 3d498de563ed739f55136f83b110b31bd66a1b5c..5d7810c9e31d9948212826377d6f039ad5761ba6 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.h
|
||||
+++ b/ui/views/win/hwnd_message_handler.h
|
||||
@@ -202,6 +202,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
|
||||
|
||||
@@ -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 33b0abba38ee3531353a5dd5548c63886f68c1e0..ec1c418ce090589b44d67f5ecb3f0e4b048eb505 100644
|
||||
index 23ca139dc684007eedc35696108bb1171191f86d..80a47f960fa8c1fdd45ea9cd18eacd8e7cff8d49 100644
|
||||
--- a/cc/trees/layer_tree_host_impl.cc
|
||||
+++ b/cc/trees/layer_tree_host_impl.cc
|
||||
@@ -1773,6 +1773,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
@@ -1770,6 +1770,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
|
||||
gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace(
|
||||
gfx::ContentColorUsage content_color_usage) const {
|
||||
@@ -35,7 +35,7 @@ index 33b0abba38ee3531353a5dd5548c63886f68c1e0..ec1c418ce090589b44d67f5ecb3f0e4b
|
||||
|
||||
// If we are likely to software composite the resource, we use sRGB because
|
||||
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
|
||||
index 3d411412c72f3d23f71529617e7d11fe34509c34..f7d66bc1e075c0313d16b3c426ebefa0f5c85d72 100644
|
||||
index 63f087b74b93efe884df3833865e9aa7af912508..eb41d143ed1dd622a362b0f008a725034d6e1a97 100644
|
||||
--- a/cc/trees/layer_tree_settings.h
|
||||
+++ b/cc/trees/layer_tree_settings.h
|
||||
@@ -97,6 +97,8 @@ class CC_EXPORT LayerTreeSettings {
|
||||
@@ -60,7 +60,7 @@ index 2e32385af86c6156c4197393248d70c470cdd4b5..350f56238e1c01cc6073555933f57df8
|
||||
bool force_antialiasing = false;
|
||||
bool force_blending_with_shaders = false;
|
||||
diff --git a/components/viz/host/renderer_settings_creation.cc b/components/viz/host/renderer_settings_creation.cc
|
||||
index 4dbfd138a467462bae4ff062d9a8062b76ecaa4c..cc7c95bb0f4e6ec6b3579ced90a0f1035f27bef6 100644
|
||||
index 88045687f03cbefa8c2adaee65f6ada75d3f3e52..53cb6859dd951dd79f9d463c2bb2177268f1a251 100644
|
||||
--- a/components/viz/host/renderer_settings_creation.cc
|
||||
+++ b/components/viz/host/renderer_settings_creation.cc
|
||||
@@ -17,6 +17,7 @@
|
||||
@@ -229,7 +229,7 @@ index 9f60a5f7b0062775b8451a82658b1c719775b332..7053104b6575991f2edbeff89028bd1b
|
||||
+
|
||||
+#undef PATCH_CS
|
||||
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
||||
index 28799999f686d71c905efd9becc5b6fcb2a4fca2..87b2a9846a2f8192a8d5c27a644f98a6392df496 100644
|
||||
index d5d68aa5a40b577d7d7b545cdc67f60e18acdf86..8ab5b75d7eee5f3e17b997abcd84f504ec6283ea 100644
|
||||
--- a/content/browser/gpu/gpu_process_host.cc
|
||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||
@@ -223,6 +223,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
@@ -241,10 +241,10 @@ index 28799999f686d71c905efd9becc5b6fcb2a4fca2..87b2a9846a2f8192a8d5c27a644f98a6
|
||||
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 1b4d95b6dd43bcb030bba4aa1f2454c7466c82ba..3967ee4920aaeffa9aa52535eee275eb5ad7872f 100644
|
||||
index 894e527847ee338e4377740d59dfeb308f286fc5..34a066bf4ec85ec4ec5606861320b0e1a1f9793b 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -220,6 +220,7 @@
|
||||
@@ -218,6 +218,7 @@
|
||||
#include "ui/accessibility/accessibility_switches.h"
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
#include "ui/display/display_switches.h"
|
||||
@@ -252,7 +252,7 @@ index 1b4d95b6dd43bcb030bba4aa1f2454c7466c82ba..3967ee4920aaeffa9aa52535eee275eb
|
||||
#include "ui/gl/gl_switches.h"
|
||||
#include "ui/native_theme/native_theme_features.h"
|
||||
#include "url/origin.h"
|
||||
@@ -3195,6 +3196,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
@@ -3175,6 +3176,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[] = {
|
||||
@@ -261,7 +261,7 @@ index 1b4d95b6dd43bcb030bba4aa1f2454c7466c82ba..3967ee4920aaeffa9aa52535eee275eb
|
||||
switches::kDisableInProcessStackTraces,
|
||||
sandbox::policy::switches::kDisableSeccompFilterSandbox,
|
||||
diff --git a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
|
||||
index 8d6308af4befcac7c0a0f1cce3a4af89ff248895..b83fdd165b3d9c7bfaf1524d03c319c9b14d797a 100644
|
||||
index 9bd9885624666a8d65b0b1bb710c79077321c451..ff5842db80d81adc8f17d2eef36e82d37dbdbe47 100644
|
||||
--- a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
|
||||
+++ b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
|
||||
@@ -4,6 +4,7 @@
|
||||
@@ -271,8 +271,8 @@ index 8d6308af4befcac7c0a0f1cce3a4af89ff248895..b83fdd165b3d9c7bfaf1524d03c319c9
|
||||
+#include "base/command_line.h"
|
||||
#include "cc/paint/skia_paint_canvas.h"
|
||||
#include "components/viz/common/resources/resource_format_utils.h"
|
||||
#include "third_party/blink/renderer/platform/runtime_enabled_features.h"
|
||||
@@ -13,6 +14,7 @@
|
||||
#include "third_party/blink/renderer/platform/graphics/canvas_resource_params.h"
|
||||
@@ -14,6 +15,7 @@
|
||||
#include "third_party/khronos/GLES3/gl3.h"
|
||||
#include "third_party/skia/include/core/SkSurfaceProps.h"
|
||||
#include "ui/gfx/color_space.h"
|
||||
@@ -280,19 +280,7 @@ index 8d6308af4befcac7c0a0f1cce3a4af89ff248895..b83fdd165b3d9c7bfaf1524d03c319c9
|
||||
|
||||
namespace blink {
|
||||
|
||||
@@ -92,6 +94,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const {
|
||||
}
|
||||
|
||||
gfx::ColorSpace CanvasColorParams::GetSamplerGfxColorSpace() const {
|
||||
+ auto* cmd_line = base::CommandLine::ForCurrentProcess();
|
||||
+ if (cmd_line->HasSwitch(switches::kDisableColorCorrectRendering)) {
|
||||
+ return gfx::ColorSpace();
|
||||
+ }
|
||||
+
|
||||
// TODO(ccameron): If we add support for uint8srgb as a pixel format, this
|
||||
// will need to take into account whether or not this texture will be sampled
|
||||
// in linear or nonlinear space.
|
||||
@@ -99,6 +106,11 @@ gfx::ColorSpace CanvasColorParams::GetSamplerGfxColorSpace() const {
|
||||
@@ -144,6 +146,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const {
|
||||
}
|
||||
|
||||
gfx::ColorSpace CanvasColorParams::GetStorageGfxColorSpace() const {
|
||||
@@ -305,7 +293,7 @@ index 8d6308af4befcac7c0a0f1cce3a4af89ff248895..b83fdd165b3d9c7bfaf1524d03c319c9
|
||||
}
|
||||
|
||||
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 008619ad943c432b5bc013943195be9b7995213e..042c9eb43bbe1fb34cf86f53072c249e5ce4688b 100644
|
||||
index 2c8e7445e9226f4860a0d36284e0cf770dbaa233..6cabd21b8dd996578d9aa02a553d4e3bca5fde04 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
|
||||
@@ -24,6 +24,7 @@
|
||||
@@ -316,7 +304,7 @@ index 008619ad943c432b5bc013943195be9b7995213e..042c9eb43bbe1fb34cf86f53072c249e
|
||||
#include "ui/native_theme/native_theme_features.h"
|
||||
#include "ui/native_theme/overlay_scrollbar_constants_aura.h"
|
||||
|
||||
@@ -179,6 +180,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
|
||||
@@ -177,6 +178,9 @@ cc::LayerTreeSettings GenerateLayerTreeSettings(
|
||||
settings.main_frame_before_activation_enabled =
|
||||
cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: fix: disabling compositor recycling
|
||||
Compositor recycling is useful for Chrome because there can be many tabs and spinning up a compositor for each one would be costly. In practice, Chrome uses the parent compositor code path of browser_compositor_view_mac.mm; the NSView of each tab is detached when it's hidden and attached when it's shown. For Electron, there is no parent compositor, so we're forced into the "own compositor" code path, which seems to be non-optimal and pretty ruthless in terms of the release of resources. Electron has no real concept of multiple tabs per window, so it should be okay to disable this ruthless recycling altogether in Electron.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index 5c53aad7e3cb709cfa6ec841978722fdab07422d..103437c715e375b4da2c34911e26022d71ea65a9 100644
|
||||
index cd45e6c19505e553a4632dd478d33f3ee2cce0de..2090da2ac1a23a9847d0c3c14a7a2cc2c0ff2a55 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -478,7 +478,11 @@
|
||||
@@ -476,7 +476,11 @@
|
||||
return;
|
||||
|
||||
host()->WasHidden();
|
||||
|
||||
@@ -6,10 +6,10 @@ 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 eaf64f381ca121c439d38286be85e45aae809c03..7a639f30914bf5cbb74449327a7e0b65e0114be6 100644
|
||||
index e23394ae63cde089d4e1a707f076a2c17c955f76..3122722665f1e2e4796e9628486c8bea8fdf283e 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -700,6 +700,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -722,6 +722,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
if (is_hidden_)
|
||||
return;
|
||||
|
||||
@@ -20,10 +20,10 @@ index eaf64f381ca121c439d38286be85e45aae809c03..7a639f30914bf5cbb74449327a7e0b65
|
||||
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 aa994c8677b7e108ecde003b2557ee021bf20279..c5bd7e95124ce7389913a2a97a41eec2c79edd47 100644
|
||||
index 3dd95dcf37cbc3b73b79b098524bf05666e1b9de..57cb297221c01994580e3a0f3546fbad3d5ba6f5 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -184,6 +184,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -186,6 +186,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
// RenderWidgetHostImpl.
|
||||
static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
|
||||
|
||||
@@ -34,10 +34,10 @@ index aa994c8677b7e108ecde003b2557ee021bf20279..c5bd7e95124ce7389913a2a97a41eec2
|
||||
const base::TimeDelta& delay) {
|
||||
new_content_rendering_delay_ = delay;
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
index d2e23689f8cf7ef2acaffdc75370137593cf6415..9d07891a280e4063300d9180937f7423071751ba 100644
|
||||
index 33122769e7c40cd88046d0c390a93d4924b9c48f..ee6e08c581d3f2d13e29d03eedf502cf4f156f3c 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -600,7 +600,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
@@ -606,7 +606,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
DCHECK(visibility_ == Visibility::HIDDEN ||
|
||||
visibility_ == Visibility::OCCLUDED);
|
||||
|
||||
@@ -45,4 +45,4 @@ index d2e23689f8cf7ef2acaffdc75370137593cf6415..9d07891a280e4063300d9180937f7423
|
||||
+ if (!host()->is_hidden() && !host()->disable_hidden_) {
|
||||
host()->WasHidden();
|
||||
aura::WindowTreeHost* host = window_->GetHost();
|
||||
if (delegated_frame_host_) {
|
||||
aura::Window* parent = window_->parent();
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <samuel.r.attard@gmail.com>
|
||||
Date: Fri, 18 Dec 2020 15:19:39 -0800
|
||||
Subject: Don't use potentially null "GetWebFrame()->View()" when get blink
|
||||
prefs
|
||||
|
||||
For whatever reason (still haven't narrowed it down to an exact test case) when using OOPIFs the "GetWebFrame()->View()" call during "RenderFrameCreated" call be nullptr. Accessing the prefs via the render_view though still works.
|
||||
|
||||
This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572256
|
||||
|
||||
Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393
|
||||
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 3f9d1ba1217c43d18322e603c7958d94497c88f6..835577bbc61d97f8ed41ad085a7c7c83e76da69a 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -2689,7 +2689,7 @@ blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() {
|
||||
}
|
||||
|
||||
const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() {
|
||||
- return GetWebFrame()->View()->GetWebPreferences();
|
||||
+ return render_view_->GetWebView()->GetWebPreferences();
|
||||
}
|
||||
|
||||
const blink::RendererPreferences& RenderFrameImpl::GetRendererPreferences()
|
||||
@@ -19,10 +19,10 @@ index a409755330351e7e1684c31f7c7cc6882a2dc7af..3349f38e1df8ff7e5c70f1c177b11914
|
||||
aspect_ratio.height());
|
||||
}
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 34b58eb81f42e70a17250b99dfaa58891dc076c1..10c584016c427b1969bf707f79e74fa9f7e3e882 100644
|
||||
index dc2cdf7467912d36261583c91c8f46fbe041c5e0..a23108d0a38af3388b35bd5a0ae3cc3d5e565d93 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -924,8 +924,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
|
||||
@@ -919,8 +919,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
|
||||
}
|
||||
|
||||
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) {
|
||||
|
||||
@@ -21,10 +21,10 @@ index da2aeb2f2da84fe47d5cc7d721f8d3dade0c0972..4ddad9065782fad5927bc0481ad77201
|
||||
#endif
|
||||
std::shared_ptr<v8::TaskRunner> GetForegroundTaskRunner(
|
||||
diff --git a/gin/v8_platform.cc b/gin/v8_platform.cc
|
||||
index 27c300ff640faeef04e8228d292e81643b7ab6a9..022395e37d270e480e9a47b760e5e172c88b354f 100644
|
||||
index af8c64e7daecb26a0915d811f4ed90192a869ff2..933c22c227f68eea97da01f23c4a3076f62d5530 100644
|
||||
--- a/gin/v8_platform.cc
|
||||
+++ b/gin/v8_platform.cc
|
||||
@@ -461,6 +461,10 @@ v8::PageAllocator* V8Platform::GetPageAllocator() {
|
||||
@@ -464,6 +464,10 @@ v8::PageAllocator* V8Platform::GetPageAllocator() {
|
||||
return g_page_allocator.Pointer();
|
||||
}
|
||||
|
||||
|
||||
@@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970
|
||||
DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
|
||||
};
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index d8b35023554a3f7f1b6e96c899fa52200285e7f3..fa390b7609b2daeb488aecbb177f1269b4be4095 100644
|
||||
index 103958bba8a41b217bbaf4d8899fec3ad562aa70..a9447adde5430f123bb28fb8bf746d20cfba3485 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1105,6 +1105,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -1129,6 +1129,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
@@ -51,22 +51,22 @@ index d8b35023554a3f7f1b6e96c899fa52200285e7f3..fa390b7609b2daeb488aecbb177f1269
|
||||
// This may only be called on NetworkContexts created with the constructor
|
||||
// that calls MakeURLRequestContext().
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index b0b6f9bb175cd0e5dc7f69bd204886c463b63442..b334b9efb15f829c42d9f113b6c3d5cd53b8a533 100644
|
||||
index 494d68d7f399152a08dd74ee4aa2d17baec81dd8..19e1fae26676c3ec45fce162b784f67cafdce35a 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -248,6 +248,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -251,6 +251,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override;
|
||||
+ void SetUserAgent(const std::string& new_user_agent) override;
|
||||
void SetAcceptLanguage(const std::string& new_accept_language) override;
|
||||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if BUILDFLAG(IS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index b0065647d08f3208446d0c996276d6394d80409e..ec89eeb056d686f8cab6003e456973ff8649df23 100644
|
||||
index 17695b6b6a50f6d8f3b81d5e57b2bbeb667b83c7..737fc3c70ed0962fa1123c5665706762d7a8238b 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -1074,6 +1074,9 @@ interface NetworkContext {
|
||||
@@ -1102,6 +1102,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
|
||||
@@ -77,14 +77,14 @@ index b0065647d08f3208446d0c996276d6394d80409e..ec89eeb056d686f8cab6003e456973ff
|
||||
SetAcceptLanguage(string new_accept_language);
|
||||
|
||||
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
|
||||
index ff87a952a866b490aadc732786fcb6e54e03b0d6..a8005f98f5a619df03193a9e132a12c9a6c82d6f 100644
|
||||
index 3b1c2b43688f1789efeac418063e572e7a3d0626..97fa1e18fc1038e5fcd90dbf4ae4e5f76a7deda4 100644
|
||||
--- a/services/network/test/test_network_context.h
|
||||
+++ b/services/network/test/test_network_context.h
|
||||
@@ -110,6 +110,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
@@ -113,6 +113,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override {}
|
||||
+ void SetUserAgent(const std::string& new_user_agent) override {}
|
||||
void SetAcceptLanguage(const std::string& new_accept_language) override {}
|
||||
void SetEnableReferrers(bool enable_referrers) override {}
|
||||
#if BUILDFLAG(IS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
@@ -13,7 +13,7 @@ uses internally for things like menus and devtools.
|
||||
We can remove this patch once it has in some shape been upstreamed.
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
|
||||
index 32b264749c2ccd933e06d033ecca85b2721d0801..0caa3a4408abda7444471c8048a0bdbceab9b673 100644
|
||||
index 6f9221b95d5609d6bc3395bd3a3c81670877fdd0..bd4cd7cf50ea7f8816b35b3150bea8c459571231 100644
|
||||
--- a/ui/native_theme/native_theme.cc
|
||||
+++ b/ui/native_theme/native_theme.cc
|
||||
@@ -257,6 +257,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors)
|
||||
@@ -26,10 +26,10 @@ index 32b264749c2ccd933e06d033ecca85b2721d0801..0caa3a4408abda7444471c8048a0bdbc
|
||||
}
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
|
||||
index 4181c8d4328f7514c52b3a66766bb4860ede730b..e3a16bdf98cf444bd1b202a722763d26087618e9 100644
|
||||
index d254838cfb21ec2135691b84fd0432cbdbb92e24..f6a6e48ddd93ed1026cf216a59fa4a4d3d0b56d6 100644
|
||||
--- a/ui/native_theme/native_theme.h
|
||||
+++ b/ui/native_theme/native_theme.h
|
||||
@@ -403,6 +403,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -402,6 +402,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
ColorId color_id,
|
||||
ColorScheme color_scheme = ColorScheme::kDefault) const;
|
||||
|
||||
@@ -52,8 +52,8 @@ index 4181c8d4328f7514c52b3a66766bb4860ede730b..e3a16bdf98cf444bd1b202a722763d26
|
||||
// Returns a shared instance of the native theme that should be used for web
|
||||
// rendering. Do not use it in a normal application context (i.e. browser).
|
||||
// The returned object should not be deleted by the caller. This function is
|
||||
@@ -550,6 +566,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
bool is_high_contrast_ = false;
|
||||
@@ -552,6 +568,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
bool forced_colors_ = false;
|
||||
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
|
||||
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
|
||||
+ ThemeSource theme_source_ = ThemeSource::kSystem;
|
||||
@@ -61,12 +61,12 @@ index 4181c8d4328f7514c52b3a66766bb4860ede730b..e3a16bdf98cf444bd1b202a722763d26
|
||||
DISALLOW_COPY_AND_ASSIGN(NativeTheme);
|
||||
};
|
||||
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
|
||||
index 6bcec4c618ae2ee4e544ff0204a6349dee460707..0842657c39c0c0ecc8d2b3aa75dddefd9b5961d3 100644
|
||||
index f4dff8de98066ea0ee4fb30ce832b27707791743..3d8c850111c0bbcd724c752e5b717ee46cfd5852 100644
|
||||
--- a/ui/native_theme/native_theme_win.cc
|
||||
+++ b/ui/native_theme/native_theme_win.cc
|
||||
@@ -741,6 +741,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
// ...unless --force-dark-mode was specified in which case caveat emptor.
|
||||
if (UsesHighContrastColors() && !IsForcedDarkMode())
|
||||
if (InForcedColorsMode() && !IsForcedDarkMode())
|
||||
return false;
|
||||
+ if (theme_source() == ThemeSource::kForcedLight) return false;
|
||||
+ if (theme_source() == ThemeSource::kForcedDark) return true;
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: feat: allow disabling blink scheduler throttling per RenderView
|
||||
This allows us to disable throttling for hidden windows.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
index 13ffa3d6b211055dcbf2d92d3a918de69e41c4a1..ad0f1ec63ad2defd976e0808adbc7d0207b62cc1 100644
|
||||
index 255c259a9b35d40a54fb18dc4b907e928277d102..ab640d81a6dc01e735bca52dab5465165d801013 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -587,6 +587,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -593,6 +593,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ index 13ffa3d6b211055dcbf2d92d3a918de69e41c4a1..ad0f1ec63ad2defd976e0808adbc7d02
|
||||
return is_active();
|
||||
}
|
||||
diff --git a/content/browser/renderer_host/render_view_host_impl.h b/content/browser/renderer_host/render_view_host_impl.h
|
||||
index 5a95c4b355eda499f4b949d270ba6463bdab9367..a116091337676ced8628de329d8a3cdbbc428326 100644
|
||||
index 650544041510cb45742e73ed9e392cce753c3808..6402cf9ce1ca7aa0c888f2bcedf8d8ef1b9f8f20 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.h
|
||||
@@ -131,6 +131,7 @@ class CONTENT_EXPORT RenderViewHostImpl
|
||||
@@ -48,10 +48,10 @@ index 4c082605daf6841205f51789c1df329cc10ce57e..f450523c978c7603af4358fb928c6be7
|
||||
// This interface should only be implemented inside content.
|
||||
friend class RenderViewHostImpl;
|
||||
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
|
||||
index e89e36f7c0d2ccb7e70931b43333a9473f58ae58..11eb9b423ddb12832e422e35287b8ca11d924c85 100644
|
||||
index c860de180ec0586f30019de936c62f16a7acc7cc..f7e0dd8335d4424bd09426ce6563477f7e8eba8c 100644
|
||||
--- a/content/renderer/render_view_impl.h
|
||||
+++ b/content/renderer/render_view_impl.h
|
||||
@@ -306,6 +306,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
|
||||
@@ -235,6 +235,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
|
||||
static WindowOpenDisposition NavigationPolicyToDisposition(
|
||||
blink::WebNavigationPolicy policy);
|
||||
|
||||
@@ -73,10 +73,10 @@ index e122d4ffb857023841dabcb6fed352d7586d8344..3c7cd1cb8b204024a0835150302ee889
|
||||
+ SetSchedulerThrottling(bool allowed);
|
||||
};
|
||||
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
|
||||
index ffe969fc0f0c1db58d3ea6672efb2a55c2056dc9..ed5b29f0e4901a1ce05aa83a31899480e6301a91 100644
|
||||
index fb648cda4e1aaa578cf271a60027e43b5d3a39d2..b567763c75832b742403356bb5deeaecbc5b6fe1 100644
|
||||
--- a/third_party/blink/public/web/web_view.h
|
||||
+++ b/third_party/blink/public/web/web_view.h
|
||||
@@ -344,6 +344,7 @@ class WebView {
|
||||
@@ -343,6 +343,7 @@ class WebView {
|
||||
// Scheduling -----------------------------------------------------------
|
||||
|
||||
virtual PageScheduler* Scheduler() const = 0;
|
||||
@@ -85,10 +85,10 @@ index ffe969fc0f0c1db58d3ea6672efb2a55c2056dc9..ed5b29f0e4901a1ce05aa83a31899480
|
||||
// Visibility -----------------------------------------------------------
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
index ab8765ee0dfe02237692fd13ce7b1afd547dd8b9..b4a1c539b3555e39240bc2bffe0ff6699c4a72c4 100644
|
||||
index 68688f094a68f9f29d7e8ec8d1158a0a4d7bb3f3..755d037d6f5046d4641b6532918125d1ca84cdd8 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -3465,6 +3465,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3477,6 +3477,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ index ab8765ee0dfe02237692fd13ce7b1afd547dd8b9..b4a1c539b3555e39240bc2bffe0ff669
|
||||
void WebViewImpl::SetVisibilityState(
|
||||
mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) {
|
||||
@@ -3475,7 +3482,8 @@ void WebViewImpl::SetVisibilityState(
|
||||
@@ -3487,7 +3494,8 @@ void WebViewImpl::SetVisibilityState(
|
||||
}
|
||||
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
|
||||
GetPage()->GetPageScheduler()->SetPageVisible(
|
||||
@@ -113,7 +113,7 @@ index ab8765ee0dfe02237692fd13ce7b1afd547dd8b9..b4a1c539b3555e39240bc2bffe0ff669
|
||||
|
||||
mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() {
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
index f479a50a684abeada48706517892312166b22729..b09bb456a6bd2b8f8257bb742eb22f63cbaf7f2a 100644
|
||||
index 83a2e96325de2667036153e2fa9b3d0228ae3c37..b24fe240be02a013675cfb25be29560a3ff92792 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -365,6 +365,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
|
||||
@@ -5,10 +5,10 @@ Subject: feat: allow embedders to add observers on created hunspell
|
||||
dictionaries
|
||||
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
index 09256573b848bbb248530f77619df47ddbeb8a0e..75b70e375ed1d680cbd2fba1ca73a4e2e5403fb6 100644
|
||||
index d56c8c83de75185dec10085c299eff88f25f4666..ccf8434c278900346c29b7f1e5693d593632b2c4 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
@@ -459,6 +459,9 @@ void SpellcheckService::LoadDictionaries() {
|
||||
@@ -475,6 +475,9 @@ void SpellcheckService::LoadDictionaries() {
|
||||
std::make_unique<SpellcheckHunspellDictionary>(
|
||||
dictionary, platform_spellcheck_language, context_, this));
|
||||
hunspell_dictionaries_.back()->AddObserver(this);
|
||||
@@ -18,7 +18,7 @@ index 09256573b848bbb248530f77619df47ddbeb8a0e..75b70e375ed1d680cbd2fba1ca73a4e2
|
||||
hunspell_dictionaries_.back()->Load();
|
||||
}
|
||||
|
||||
@@ -511,6 +514,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
|
||||
@@ -527,6 +530,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
|
||||
(!hunspell_dictionaries_.empty() || enable_if_uninitialized);
|
||||
}
|
||||
|
||||
@@ -36,23 +36,23 @@ index 09256573b848bbb248530f77619df47ddbeb8a0e..75b70e375ed1d680cbd2fba1ca73a4e2
|
||||
+ hunspell_observer_ = observer;
|
||||
+}
|
||||
+
|
||||
bool SpellcheckService::LoadExternalDictionary(std::string language,
|
||||
std::string locale,
|
||||
std::string path,
|
||||
void SpellcheckService::Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
const content::NotificationDetails& details) {
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h
|
||||
index 29ea018d1df9f34204d26766fe010e6b38def7da..68af07c361ee1934e3f76497429c9d30f0212283 100644
|
||||
index a810ed516cce5f491ea75ae2d0bbda65e066ad3e..fcfd3f5801a967fdd7b3e99094a35eddb1a31789 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_service.h
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_service.h
|
||||
@@ -141,6 +141,8 @@ class SpellcheckService : public KeyedService,
|
||||
@@ -134,6 +134,8 @@ class SpellcheckService : public KeyedService,
|
||||
// dictionaries available.
|
||||
bool IsSpellcheckEnabled() const;
|
||||
|
||||
+ void SetHunspellObserver(SpellcheckHunspellDictionary::Observer* observer);
|
||||
+
|
||||
// Load a dictionary from a given path. Format specifies how the dictionary
|
||||
// is stored. Return value is true if successful.
|
||||
bool LoadExternalDictionary(std::string language,
|
||||
@@ -319,6 +321,8 @@ class SpellcheckService : public KeyedService,
|
||||
// NotificationProfile implementation.
|
||||
void Observe(int type,
|
||||
const content::NotificationSource& source,
|
||||
@@ -301,6 +303,8 @@ class SpellcheckService : public KeyedService,
|
||||
// A pointer to the BrowserContext which this service refers to.
|
||||
content::BrowserContext* context_;
|
||||
|
||||
|
||||
@@ -8,25 +8,21 @@ rendering with the viz compositor by way of a custom HostDisplayClient
|
||||
and LayeredWindowUpdater.
|
||||
|
||||
diff --git a/components/viz/host/host_display_client.cc b/components/viz/host/host_display_client.cc
|
||||
index 3b00759e513dc7e19fd68398e853c8ce6ac73905..d89fe3a7cc3f89d99606a74936626eeee3836956 100644
|
||||
index 3b00759e513dc7e19fd68398e853c8ce6ac73905..47f4e7cc2e8b3141dcaf9e7a498fec32c9342f40 100644
|
||||
--- a/components/viz/host/host_display_client.cc
|
||||
+++ b/components/viz/host/host_display_client.cc
|
||||
@@ -45,9 +45,13 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams(
|
||||
@@ -45,9 +45,9 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams(
|
||||
}
|
||||
#endif
|
||||
|
||||
-#if defined(OS_WIN)
|
||||
+void HostDisplayClient::IsOffscreen(IsOffscreenCallback callback) {
|
||||
+ std::move(callback).Run(false);
|
||||
+}
|
||||
+
|
||||
void HostDisplayClient::CreateLayeredWindowUpdater(
|
||||
mojo::PendingReceiver<mojom::LayeredWindowUpdater> receiver) {
|
||||
+#if defined(OS_WIN)
|
||||
if (!NeedsToUseLayerWindow(widget_)) {
|
||||
DLOG(ERROR) << "HWND shouldn't be using a layered window";
|
||||
return;
|
||||
@@ -55,8 +59,12 @@ void HostDisplayClient::CreateLayeredWindowUpdater(
|
||||
@@ -55,8 +55,12 @@ void HostDisplayClient::CreateLayeredWindowUpdater(
|
||||
|
||||
layered_window_updater_ =
|
||||
std::make_unique<LayeredWindowUpdaterImpl>(widget_, std::move(receiver));
|
||||
@@ -41,24 +37,15 @@ index 3b00759e513dc7e19fd68398e853c8ce6ac73905..d89fe3a7cc3f89d99606a74936626eee
|
||||
// TODO(crbug.com/1052397): Revisit the macro expression once build flag switch
|
||||
// of lacros-chrome is complete.
|
||||
diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h
|
||||
index 5e260e13762f61971c99f755e93d73aa794d9175..b4a46b030335f49b59b2c678078e5f18ef432300 100644
|
||||
index 5e260e13762f61971c99f755e93d73aa794d9175..a57770718b71def04fa35c7655d9368a58f39f20 100644
|
||||
--- a/components/viz/host/host_display_client.h
|
||||
+++ b/components/viz/host/host_display_client.h
|
||||
@@ -32,17 +32,17 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
|
||||
mojo::PendingRemote<mojom::DisplayClient> GetBoundRemote(
|
||||
scoped_refptr<base::SingleThreadTaskRunner> task_runner);
|
||||
|
||||
- private:
|
||||
+ protected:
|
||||
// mojom::DisplayClient implementation:
|
||||
+ void IsOffscreen(IsOffscreenCallback callback) override;
|
||||
+
|
||||
#if defined(OS_APPLE)
|
||||
void OnDisplayReceivedCALayerParams(
|
||||
@@ -39,10 +39,9 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
|
||||
const gfx::CALayerParams& ca_layer_params) override;
|
||||
#endif
|
||||
|
||||
-#if defined(OS_WIN)
|
||||
+ protected:
|
||||
void CreateLayeredWindowUpdater(
|
||||
mojo::PendingReceiver<mojom::LayeredWindowUpdater> receiver) override;
|
||||
-#endif
|
||||
@@ -94,7 +81,7 @@ index 1026b739d283f0fc252fa2af83a6d4cf51bc8553..fe562ab60ce98b8bb0c5080a6428deb3
|
||||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 504c1f1efd5d9bdfad5b4fe65475fd3f18dad0c9..c8abc5ca4847b71e4a400acce621a97f22c23d1c 100644
|
||||
index 0f6a5a2fa3d82ae76889ef55af14e18b86cacffc..e33cd6305f53aa9287c61bf2d38848f878a14d30 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -119,6 +119,8 @@ viz_component("service") {
|
||||
@@ -106,8 +93,22 @@ index 504c1f1efd5d9bdfad5b4fe65475fd3f18dad0c9..c8abc5ca4847b71e4a400acce621a97f
|
||||
"display_embedder/software_output_surface.cc",
|
||||
"display_embedder/software_output_surface.h",
|
||||
"display_embedder/viz_process_context_provider.cc",
|
||||
diff --git a/components/viz/service/display_embedder/output_surface_provider.h b/components/viz/service/display_embedder/output_surface_provider.h
|
||||
index 77d463e683d8b8d3a202681a6884eacaab79d70d..05d51cb2637d34c073cd0025e365803633459a86 100644
|
||||
--- a/components/viz/service/display_embedder/output_surface_provider.h
|
||||
+++ b/components/viz/service/display_embedder/output_surface_provider.h
|
||||
@@ -39,7 +39,8 @@ class OutputSurfaceProvider {
|
||||
mojom::DisplayClient* display_client,
|
||||
DisplayCompositorMemoryAndTaskController* gpu_dependency,
|
||||
const RendererSettings& renderer_settings,
|
||||
- const DebugRendererSettings* debug_settings) = 0;
|
||||
+ const DebugRendererSettings* debug_settings,
|
||||
+ bool offscreen) = 0;
|
||||
};
|
||||
|
||||
} // namespace viz
|
||||
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
index 79c800e77a160cc0b10a29dd560d37e19c9d05fd..6513af7550933f988edacc0de124ae29c06500f8 100644
|
||||
index 79c800e77a160cc0b10a29dd560d37e19c9d05fd..a9b1b267c97ed513890ba8466f66c3eafcbd5d5b 100644
|
||||
--- a/components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
+++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -126,29 +127,70 @@ index 79c800e77a160cc0b10a29dd560d37e19c9d05fd..6513af7550933f988edacc0de124ae29
|
||||
#include "ui/base/ui_base_switches.h"
|
||||
#include "ui/gl/gl_context.h"
|
||||
#include "ui/gl/init/gl_factory.h"
|
||||
@@ -245,6 +247,22 @@ OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
|
||||
@@ -130,7 +132,8 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
|
||||
mojom::DisplayClient* display_client,
|
||||
DisplayCompositorMemoryAndTaskController* gpu_dependency,
|
||||
const RendererSettings& renderer_settings,
|
||||
- const DebugRendererSettings* debug_settings) {
|
||||
+ const DebugRendererSettings* debug_settings,
|
||||
+ bool offscreen) {
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
if (surface_handle == gpu::kNullSurfaceHandle)
|
||||
return std::make_unique<OutputSurfaceUnified>();
|
||||
@@ -142,7 +145,7 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
|
||||
|
||||
if (!gpu_compositing) {
|
||||
output_surface = std::make_unique<SoftwareOutputSurface>(
|
||||
- CreateSoftwareOutputDeviceForPlatform(surface_handle, display_client));
|
||||
+ CreateSoftwareOutputDeviceForPlatform(surface_handle, display_client, offscreen));
|
||||
} else if (renderer_settings.use_skia_renderer) {
|
||||
DCHECK(gpu_dependency);
|
||||
{
|
||||
@@ -241,10 +244,22 @@ std::unique_ptr<OutputSurface> OutputSurfaceProviderImpl::CreateOutputSurface(
|
||||
std::unique_ptr<SoftwareOutputDevice>
|
||||
OutputSurfaceProviderImpl::CreateSoftwareOutputDeviceForPlatform(
|
||||
gpu::SurfaceHandle surface_handle,
|
||||
- mojom::DisplayClient* display_client) {
|
||||
+ mojom::DisplayClient* display_client,
|
||||
+ bool offscreen) {
|
||||
if (headless_)
|
||||
return std::make_unique<SoftwareOutputDevice>();
|
||||
|
||||
+#if !defined(OS_MAC)
|
||||
+ {
|
||||
+ mojo::ScopedAllowSyncCallForTesting allow_sync;
|
||||
+ if (offscreen) {
|
||||
+ DCHECK(display_client);
|
||||
+ bool offscreen = false;
|
||||
+ if (display_client->IsOffscreen(&offscreen) && offscreen) {
|
||||
+ mojom::LayeredWindowUpdaterPtr layered_window_updater;
|
||||
+ display_client->CreateLayeredWindowUpdater(
|
||||
+ mojo::MakeRequest(&layered_window_updater));
|
||||
+
|
||||
+ return std::make_unique<SoftwareOutputDeviceProxy>(
|
||||
+ std::move(layered_window_updater));
|
||||
+ }
|
||||
+ mojom::LayeredWindowUpdaterPtr layered_window_updater;
|
||||
+ display_client->CreateLayeredWindowUpdater(
|
||||
+ mojo::MakeRequest(&layered_window_updater));
|
||||
+ return std::make_unique<SoftwareOutputDeviceProxy>(
|
||||
+ std::move(layered_window_updater));
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
#if defined(OS_WIN)
|
||||
return CreateSoftwareOutputDeviceWin(surface_handle, &output_device_backing_,
|
||||
display_client);
|
||||
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.h b/components/viz/service/display_embedder/output_surface_provider_impl.h
|
||||
index a6bb42cdbc567f526cc70c5c4d9b967274dc0332..d116844635922c8a1086dfa13063b8ae8b43ce59 100644
|
||||
--- a/components/viz/service/display_embedder/output_surface_provider_impl.h
|
||||
+++ b/components/viz/service/display_embedder/output_surface_provider_impl.h
|
||||
@@ -61,12 +61,14 @@ class VIZ_SERVICE_EXPORT OutputSurfaceProviderImpl
|
||||
mojom::DisplayClient* display_client,
|
||||
DisplayCompositorMemoryAndTaskController* gpu_dependency,
|
||||
const RendererSettings& renderer_settings,
|
||||
- const DebugRendererSettings* debug_settings) override;
|
||||
+ const DebugRendererSettings* debug_settings,
|
||||
+ bool offscreen) override;
|
||||
|
||||
private:
|
||||
std::unique_ptr<SoftwareOutputDevice> CreateSoftwareOutputDeviceForPlatform(
|
||||
gpu::SurfaceHandle surface_handle,
|
||||
- mojom::DisplayClient* display_client);
|
||||
+ mojom::DisplayClient* display_client,
|
||||
+ bool offscreen);
|
||||
|
||||
GpuServiceImpl* const gpu_service_impl_;
|
||||
gpu::CommandBufferTaskExecutor* const task_executor_;
|
||||
diff --git a/components/viz/service/display_embedder/software_output_device_mac.cc b/components/viz/service/display_embedder/software_output_device_mac.cc
|
||||
index 49149081cc603f14eacee647cbb2fcf8ed5e66fd..9ff3f2ee203403fdaa31edb8a0bcc000c4d214d7 100644
|
||||
--- a/components/viz/service/display_embedder/software_output_device_mac.cc
|
||||
@@ -454,11 +496,25 @@ index 2bb30e5318b6b48c2e6d4b1f64a6a36c68f963d1..9e805f27a9d7d1c0aa68cdf9f48895c0
|
||||
&SoftwareOutputDeviceWinProxy::DrawAck, base::Unretained(this)));
|
||||
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 8112abf9ca0bf214721f5996bb59f7458d9347d2..8b3c2a4cce0c4789fadd555b360dea2c145ae1a4 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
|
||||
@@ -46,7 +46,8 @@ RootCompositorFrameSinkImpl::Create(
|
||||
params->gpu_compositing, params->widget, params->renderer_settings);
|
||||
auto output_surface = output_surface_provider->CreateOutputSurface(
|
||||
params->widget, params->gpu_compositing, display_client.get(),
|
||||
- display_controller.get(), params->renderer_settings, debug_settings);
|
||||
+ display_controller.get(), params->renderer_settings, debug_settings,
|
||||
+ params->offscreen);
|
||||
|
||||
// Creating output surface failed. The host can send a new request, possibly
|
||||
// with a different compositing mode.
|
||||
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
|
||||
index 8532a82205834ed6eee143abb577945e177d2a9a..f7a5f787f1016355e90b1a1ecd2641fa8e8c5fda 100644
|
||||
index 11ac1649ed0f5be1d12e8a30b8d170f86b8e9bb8..05746d9a561c3933ae0c5578467f20b486453943 100644
|
||||
--- a/content/browser/compositor/viz_process_transport_factory.cc
|
||||
+++ b/content/browser/compositor/viz_process_transport_factory.cc
|
||||
@@ -410,8 +410,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
|
||||
@@ -414,8 +414,14 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
|
||||
compositor_data.display_private.reset();
|
||||
root_params->display_private =
|
||||
compositor_data.display_private.BindNewEndpointAndPassReceiver();
|
||||
@@ -467,6 +523,7 @@ index 8532a82205834ed6eee143abb577945e177d2a9a..f7a5f787f1016355e90b1a1ecd2641fa
|
||||
+ if (compositor->delegate()) {
|
||||
+ compositor_data.display_client = compositor->delegate()->CreateHostDisplayClient(
|
||||
+ compositor);
|
||||
+ root_params->offscreen = compositor->delegate()->IsOffscreen();
|
||||
+ } else {
|
||||
+ compositor_data.display_client =
|
||||
+ std::make_unique<HostDisplayClient>(compositor);
|
||||
@@ -474,40 +531,11 @@ index 8532a82205834ed6eee143abb577945e177d2a9a..f7a5f787f1016355e90b1a1ecd2641fa
|
||||
root_params->display_client =
|
||||
compositor_data.display_client->GetBoundRemote(resize_task_runner_);
|
||||
|
||||
diff --git a/mojo/public/cpp/bindings/sync_call_restrictions.h b/mojo/public/cpp/bindings/sync_call_restrictions.h
|
||||
index c9a75d59b7eb480c3e64e14bdcb9516150ec368c..7370f0b80057ce7b24560c41b70c0bab1cacffef 100644
|
||||
--- a/mojo/public/cpp/bindings/sync_call_restrictions.h
|
||||
+++ b/mojo/public/cpp/bindings/sync_call_restrictions.h
|
||||
@@ -29,6 +29,7 @@ class Compositor;
|
||||
|
||||
namespace viz {
|
||||
class HostFrameSinkManager;
|
||||
+class GpuDisplayProvider;
|
||||
}
|
||||
|
||||
namespace mojo {
|
||||
@@ -78,6 +79,8 @@ class COMPONENT_EXPORT(MOJO_CPP_BINDINGS) SyncCallRestrictions {
|
||||
// For destroying the GL context/surface that draw to a platform window before
|
||||
// the platform window is destroyed.
|
||||
friend class viz::HostFrameSinkManager;
|
||||
+ // For query of whether to use SoftwareOutputDevice or not
|
||||
+ friend class viz::GpuDisplayProvider;
|
||||
// For preventing frame swaps of wrong size during resize on Windows.
|
||||
// (https://crbug.com/811945)
|
||||
friend class ui::Compositor;
|
||||
diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom
|
||||
index 0c9686f3c8070000bf5b180d9c06a8817d430c4a..a69b9613a61ef68624b3f69dc087603ad5cfd0c2 100644
|
||||
index 0c9686f3c8070000bf5b180d9c06a8817d430c4a..4538b95f6e71708144eb7752438b1b31d60cb2ca 100644
|
||||
--- a/services/viz/privileged/mojom/compositing/display_private.mojom
|
||||
+++ b/services/viz/privileged/mojom/compositing/display_private.mojom
|
||||
@@ -80,12 +80,14 @@ interface DisplayPrivate {
|
||||
};
|
||||
|
||||
interface DisplayClient {
|
||||
+ [Sync]
|
||||
+ IsOffscreen() => (bool success);
|
||||
+
|
||||
[EnableIf=is_mac]
|
||||
OnDisplayReceivedCALayerParams(gfx.mojom.CALayerParams ca_layer_params);
|
||||
@@ -85,7 +85,6 @@ interface DisplayClient {
|
||||
|
||||
// Creates a LayeredWindowUpdater implementation to draw into a layered
|
||||
// window.
|
||||
@@ -515,6 +543,18 @@ index 0c9686f3c8070000bf5b180d9c06a8817d430c4a..a69b9613a61ef68624b3f69dc087603a
|
||||
CreateLayeredWindowUpdater(pending_receiver<LayeredWindowUpdater> receiver);
|
||||
|
||||
// Notifies that a swap has occurred and provides information about the pixel
|
||||
diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
|
||||
index a0b87925e0c9d02f586cc4e9446cbfcf12b7aa1c..71659834eec5237016f95f93defa9dcb30f0af52 100644
|
||||
--- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
|
||||
+++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
|
||||
@@ -30,6 +30,7 @@ struct RootCompositorFrameSinkParams {
|
||||
// Disables begin frame rate limiting for the display compositor.
|
||||
bool disable_frame_rate_limit = false;
|
||||
bool use_preferred_interval_for_video = false;
|
||||
+ bool offscreen = false;
|
||||
|
||||
[EnableIf=is_android]
|
||||
float refresh_rate;
|
||||
diff --git a/services/viz/privileged/mojom/compositing/layered_window_updater.mojom b/services/viz/privileged/mojom/compositing/layered_window_updater.mojom
|
||||
index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a285498c3f8e72 100644
|
||||
--- a/services/viz/privileged/mojom/compositing/layered_window_updater.mojom
|
||||
@@ -527,10 +567,10 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549
|
||||
+ Draw(gfx.mojom.Rect damage_rect) => ();
|
||||
};
|
||||
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
|
||||
index bb08a017bd27b65731baf68264cc880399d5fc65..4c1d2244bf785394f40a2c637f540d9f7094b180 100644
|
||||
index e1db8f745c077b2f57b39a48aeab434fe0e98541..ddafd1f2aa38ef30776fa89ffcf5d108be963ac9 100644
|
||||
--- a/ui/compositor/compositor.h
|
||||
+++ b/ui/compositor/compositor.h
|
||||
@@ -76,6 +76,7 @@ class ExternalBeginFrameController;
|
||||
@@ -77,6 +77,7 @@ class ExternalBeginFrameController;
|
||||
class DelegatedInkPointRenderer;
|
||||
} // namespace mojom
|
||||
class ContextProvider;
|
||||
@@ -538,12 +578,13 @@ index bb08a017bd27b65731baf68264cc880399d5fc65..4c1d2244bf785394f40a2c637f540d9f
|
||||
class HostFrameSinkManager;
|
||||
class LocalSurfaceId;
|
||||
class RasterContextProvider;
|
||||
@@ -129,6 +130,15 @@ class COMPOSITOR_EXPORT ContextFactory {
|
||||
@@ -133,6 +134,16 @@ class COMPOSITOR_EXPORT ContextFactory {
|
||||
virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
|
||||
};
|
||||
|
||||
+class COMPOSITOR_EXPORT CompositorDelegate {
|
||||
+ public:
|
||||
+ virtual bool IsOffscreen() const = 0;
|
||||
+ virtual std::unique_ptr<viz::HostDisplayClient> CreateHostDisplayClient(
|
||||
+ ui::Compositor* compositor) = 0;
|
||||
+
|
||||
@@ -554,7 +595,7 @@ index bb08a017bd27b65731baf68264cc880399d5fc65..4c1d2244bf785394f40a2c637f540d9f
|
||||
// Compositor object to take care of GPU painting.
|
||||
// A Browser compositor object is responsible for generating the final
|
||||
// displayable form of pixels comprising a single widget's contents. It draws an
|
||||
@@ -163,6 +173,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -167,6 +178,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
// Schedules a redraw of the layer tree associated with this compositor.
|
||||
void ScheduleDraw();
|
||||
|
||||
@@ -564,7 +605,7 @@ index bb08a017bd27b65731baf68264cc880399d5fc65..4c1d2244bf785394f40a2c637f540d9f
|
||||
// Sets the root of the layer tree drawn by this Compositor. The root layer
|
||||
// must have no parent. The compositor's root layer is reset if the root layer
|
||||
// is destroyed. NULL can be passed to reset the root layer, in which case the
|
||||
@@ -434,6 +447,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -435,6 +449,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
|
||||
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Subject:
|
||||
Disable usage of pthread_fchdir_np and pthread_chdir_np in MAS builds.
|
||||
|
||||
diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc
|
||||
index c074f0d73eab1993b580f317c42480688e6669e6..2a86b0c6897efd10c483d0816b3f7a54f1e13d2a 100644
|
||||
index d3396d984086717e69d99cff3107ab09506b2b02..237e310b12eb9814f7da9103cf61d69e423b2920 100644
|
||||
--- a/base/process/launch_mac.cc
|
||||
+++ b/base/process/launch_mac.cc
|
||||
@@ -27,8 +27,10 @@ extern "C" {
|
||||
@@ -21,7 +21,7 @@ index c074f0d73eab1993b580f317c42480688e6669e6..2a86b0c6897efd10c483d0816b3f7a54
|
||||
|
||||
int responsibility_spawnattrs_setdisclaim(posix_spawnattr_t attrs, int disclaim)
|
||||
API_AVAILABLE(macosx(10.14));
|
||||
@@ -103,21 +105,29 @@ class PosixSpawnFileActions {
|
||||
@@ -96,21 +98,29 @@ class PosixSpawnFileActions {
|
||||
};
|
||||
|
||||
int ChangeCurrentThreadDirectory(const char* path) {
|
||||
@@ -51,7 +51,7 @@ index c074f0d73eab1993b580f317c42480688e6669e6..2a86b0c6897efd10c483d0816b3f7a54
|
||||
}
|
||||
|
||||
struct GetAppOutputOptions {
|
||||
@@ -233,11 +243,13 @@ Process LaunchProcess(const std::vector<std::string>& argv,
|
||||
@@ -230,11 +240,13 @@ Process LaunchProcess(const std::vector<std::string>& argv,
|
||||
file_actions.Inherit(STDERR_FILENO);
|
||||
}
|
||||
|
||||
|
||||
@@ -7,13 +7,13 @@ This tweaks Chrome's Accessibility support at chrome://accessibility
|
||||
to make it usable from Electron by removing Profile references.
|
||||
|
||||
diff --git a/chrome/browser/accessibility/accessibility_ui.cc b/chrome/browser/accessibility/accessibility_ui.cc
|
||||
index 95a1bf5a66b9f5f18e20a53d5a901189400974dd..6b947b3118ceafd24a7d4426a6c8b4a57fc0c115 100644
|
||||
index 4453990236f07a58932f50701f31fab961d0fb9e..d505af3e2207921257e212e88f2c95f1071b591b 100644
|
||||
--- a/chrome/browser/accessibility/accessibility_ui.cc
|
||||
+++ b/chrome/browser/accessibility/accessibility_ui.cc
|
||||
@@ -19,7 +19,10 @@
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
@@ -20,7 +20,10 @@
|
||||
#include "base/values.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#if 0
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
+#endif
|
||||
@@ -21,16 +21,24 @@ index 95a1bf5a66b9f5f18e20a53d5a901189400974dd..6b947b3118ceafd24a7d4426a6c8b4a5
|
||||
#include "chrome/common/pref_names.h"
|
||||
#include "chrome/common/webui_url_constants.h"
|
||||
#include "chrome/grit/dev_ui_browser_resources.h"
|
||||
@@ -43,7 +46,7 @@
|
||||
#include "ui/accessibility/platform/inspect/tree_formatter.h"
|
||||
@@ -47,14 +50,14 @@
|
||||
#include "ui/base/webui/web_ui_util.h"
|
||||
#include "ui/views/accessibility/view_accessibility.h"
|
||||
|
||||
-#if !defined(OS_ANDROID)
|
||||
+#if 0
|
||||
#include "chrome/browser/ui/browser.h"
|
||||
#include "chrome/browser/ui/browser_list.h"
|
||||
#include "chrome/browser/ui/browser_window.h"
|
||||
@@ -147,7 +150,7 @@ std::unique_ptr<base::DictionaryValue> BuildTargetDescriptor(
|
||||
+#endif
|
||||
#include "ui/views/accessibility/widget_ax_tree_id_map.h"
|
||||
#include "ui/views/widget/widget.h"
|
||||
#include "ui/views/widget/widget_delegate.h"
|
||||
-#endif
|
||||
|
||||
static const char kTargetsDataFile[] = "targets-data.json";
|
||||
|
||||
@@ -161,7 +164,7 @@ std::unique_ptr<base::DictionaryValue> BuildTargetDescriptor(
|
||||
accessibility_mode);
|
||||
}
|
||||
|
||||
@@ -39,7 +47,7 @@ index 95a1bf5a66b9f5f18e20a53d5a901189400974dd..6b947b3118ceafd24a7d4426a6c8b4a5
|
||||
std::unique_ptr<base::DictionaryValue> BuildTargetDescriptor(Browser* browser) {
|
||||
std::unique_ptr<base::DictionaryValue> target_data(
|
||||
new base::DictionaryValue());
|
||||
@@ -170,7 +173,9 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -200,7 +203,9 @@ void HandleAccessibilityRequestCallback(
|
||||
DCHECK(ShouldHandleAccessibilityRequestCallback(path));
|
||||
|
||||
base::DictionaryValue data;
|
||||
@@ -49,7 +57,7 @@ index 95a1bf5a66b9f5f18e20a53d5a901189400974dd..6b947b3118ceafd24a7d4426a6c8b4a5
|
||||
ui::AXMode mode =
|
||||
content::BrowserAccessibilityState::GetInstance()->GetAccessibilityMode();
|
||||
bool is_native_enabled = content::BrowserAccessibilityState::GetInstance()
|
||||
@@ -199,9 +204,7 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -229,9 +234,7 @@ void HandleAccessibilityRequestCallback(
|
||||
// The "labelImages" flag works only if "web" is enabled, the current profile
|
||||
// has the kAccessibilityImageLabelsEnabled preference set and the appropriate
|
||||
// command line switch has been used.
|
||||
@@ -60,16 +68,16 @@ index 95a1bf5a66b9f5f18e20a53d5a901189400974dd..6b947b3118ceafd24a7d4426a6c8b4a5
|
||||
bool label_images = mode.has_mode(ui::AXMode::kLabelImages);
|
||||
data.SetString(kLabelImages, are_accessibility_image_labels_enabled
|
||||
? (label_images ? kOn : kOff)
|
||||
@@ -210,7 +213,7 @@ void HandleAccessibilityRequestCallback(
|
||||
// The "pdf" flag is independent of the others.
|
||||
data.SetString(kPDF, pdf ? kOn : kOff);
|
||||
@@ -245,7 +248,7 @@ void HandleAccessibilityRequestCallback(
|
||||
data.SetBoolean(kViewsAccessibility,
|
||||
features::IsAccessibilityTreeForViewsEnabled());
|
||||
|
||||
- bool show_internal = pref->GetBoolean(prefs::kShowInternalAccessibilityTree);
|
||||
+ bool show_internal = true;
|
||||
data.SetString(kInternal, show_internal ? kOn : kOff);
|
||||
|
||||
std::unique_ptr<base::ListValue> rvh_list(new base::ListValue());
|
||||
@@ -247,11 +250,11 @@ void HandleAccessibilityRequestCallback(
|
||||
@@ -282,11 +285,11 @@ void HandleAccessibilityRequestCallback(
|
||||
data.Set(kPagesField, std::move(rvh_list));
|
||||
|
||||
std::unique_ptr<base::ListValue> browser_list(new base::ListValue());
|
||||
@@ -82,8 +90,8 @@ index 95a1bf5a66b9f5f18e20a53d5a901189400974dd..6b947b3118ceafd24a7d4426a6c8b4a5
|
||||
+#endif // !defined(OS_ANDROID)
|
||||
data.Set(kBrowsersField, std::move(browser_list));
|
||||
|
||||
std::string json_string;
|
||||
@@ -449,8 +452,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(const base::ListValue* args) {
|
||||
std::unique_ptr<base::ListValue> widgets_list(new base::ListValue());
|
||||
@@ -505,8 +508,10 @@ void AccessibilityUIMessageHandler::SetGlobalFlag(const base::ListValue* args) {
|
||||
|
||||
AllowJavascript();
|
||||
if (flag_name_str == kInternal) {
|
||||
@@ -94,7 +102,7 @@ index 95a1bf5a66b9f5f18e20a53d5a901189400974dd..6b947b3118ceafd24a7d4426a6c8b4a5
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -548,10 +553,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
|
||||
@@ -615,10 +620,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
|
||||
AXPropertyFilter::ALLOW_EMPTY);
|
||||
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
|
||||
|
||||
@@ -108,7 +116,7 @@ index 95a1bf5a66b9f5f18e20a53d5a901189400974dd..6b947b3118ceafd24a7d4426a6c8b4a5
|
||||
result->SetString(kTreeField, accessibility_contents);
|
||||
FireWebUIListener(request_type, *(result.get()));
|
||||
}
|
||||
@@ -586,6 +593,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
@@ -642,6 +649,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
AXPropertyFilter::ALLOW_EMPTY);
|
||||
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
|
||||
|
||||
@@ -116,7 +124,7 @@ index 95a1bf5a66b9f5f18e20a53d5a901189400974dd..6b947b3118ceafd24a7d4426a6c8b4a5
|
||||
for (Browser* browser : *BrowserList::GetInstance()) {
|
||||
if (browser->session_id().id() == session_id) {
|
||||
std::unique_ptr<base::DictionaryValue> result(
|
||||
@@ -600,6 +608,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
@@ -656,6 +664,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -124,7 +132,7 @@ index 95a1bf5a66b9f5f18e20a53d5a901189400974dd..6b947b3118ceafd24a7d4426a6c8b4a5
|
||||
#endif // !defined(OS_ANDROID)
|
||||
// No browser with the specified |session_id| was found.
|
||||
std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue());
|
||||
@@ -666,5 +675,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
|
||||
@@ -771,5 +780,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
|
||||
// static
|
||||
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
|
||||
user_prefs::PrefRegistrySyncable* registry) {
|
||||
@@ -133,7 +141,7 @@ index 95a1bf5a66b9f5f18e20a53d5a901189400974dd..6b947b3118ceafd24a7d4426a6c8b4a5
|
||||
+#endif
|
||||
}
|
||||
diff --git a/chrome/browser/accessibility/accessibility_ui.h b/chrome/browser/accessibility/accessibility_ui.h
|
||||
index 906b24117cdf584dc4935e81c61fe664c48d552b..7a542240c77877a19d0e80649605a1fee393c50f 100644
|
||||
index c0453b9f8603ba99a83a747666a1b05b9c36ca14..b0c610de6322177baf5a7ba44b632a9658756ce8 100644
|
||||
--- a/chrome/browser/accessibility/accessibility_ui.h
|
||||
+++ b/chrome/browser/accessibility/accessibility_ui.h
|
||||
@@ -24,6 +24,8 @@ struct AXEventNotificationDetails;
|
||||
|
||||
@@ -13,10 +13,10 @@ This patch can be removed once app.allowRendererProcessReuse is forced
|
||||
to true as then Chromiums assumptions around processes become correct.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 382e7d01444f55650971a0cade2211fab2a37754..d8845bd7a2dc89a12e40cf3fdd227217e3ae1da1 100644
|
||||
index 762d4d6164df6f097c3dd77c695a3270a225ec68..eac2487f18332616b1550bd7fa1f39f5c532b079 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3009,11 +3009,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
@@ -2971,11 +2971,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
|
||||
WebContentsImpl* outermost = GetOutermostWebContents();
|
||||
if (event.button == blink::WebPointerProperties::Button::kBack &&
|
||||
outermost->controller_.CanGoBack()) {
|
||||
|
||||
@@ -12,11 +12,11 @@ as they will loaded as empty strings.
|
||||
* IDS_UTILITY_PROCESS_PRINTING_SERVICE_NAME on Windows
|
||||
|
||||
diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc
|
||||
index a6d491e7f42214f99a042deca6a59188cae6af5b..a9e0f358b3bf7c2b4802650e3280ae7414ce89c9 100644
|
||||
index 3256f23502945b573b3e739e7916346867913bdf..0c72fa489b65a923637c2dc09a5c815940aeac29 100644
|
||||
--- a/chrome/browser/pdf/pdf_extension_util.cc
|
||||
+++ b/chrome/browser/pdf/pdf_extension_util.cc
|
||||
@@ -8,8 +8,7 @@
|
||||
#include "base/values.h"
|
||||
@@ -9,8 +9,7 @@
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/common/chrome_content_client.h"
|
||||
-#include "chrome/grit/browser_resources.h"
|
||||
|
||||
@@ -42,10 +42,10 @@ index 65e627f2fa89352b0be27b5813d71a622bf1d326..113f4fd00f1cf994b39f64c9da387855
|
||||
// another SiteInstance for the same site.
|
||||
void RegisterSiteInstance(SiteInstanceImpl* site_instance);
|
||||
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
|
||||
index 0e1c0fa283c9db2d5e3e48a75eb666c5bd0cd97e..b0acb88d7a21500e70120a21f99f494db02b4627 100644
|
||||
index 24450c34eaed19d06bed16368c21ce838ff21e88..7ea0a4b99b7d5c1444fab19913e455153577573a 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.cc
|
||||
+++ b/content/browser/renderer_host/navigation_request.cc
|
||||
@@ -1430,6 +1430,21 @@ void NavigationRequest::BeginNavigation() {
|
||||
@@ -1496,6 +1496,21 @@ void NavigationRequest::BeginNavigation() {
|
||||
if (IsSameDocument()) {
|
||||
render_frame_host_ = frame_tree_node_->current_frame_host();
|
||||
} else {
|
||||
@@ -67,7 +67,7 @@ index 0e1c0fa283c9db2d5e3e48a75eb666c5bd0cd97e..b0acb88d7a21500e70120a21f99f494d
|
||||
// Select an appropriate RenderFrameHost.
|
||||
std::string frame_host_choice_reason;
|
||||
render_frame_host_ =
|
||||
@@ -5278,6 +5293,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
|
||||
@@ -5365,6 +5380,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
|
||||
{WILL_START_REQUEST, {
|
||||
WILL_REDIRECT_REQUEST,
|
||||
WILL_PROCESS_RESPONSE,
|
||||
@@ -75,7 +75,7 @@ index 0e1c0fa283c9db2d5e3e48a75eb666c5bd0cd97e..b0acb88d7a21500e70120a21f99f494d
|
||||
READY_TO_COMMIT,
|
||||
DID_COMMIT,
|
||||
CANCELING,
|
||||
@@ -5291,10 +5307,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
|
||||
@@ -5378,10 +5394,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
|
||||
WILL_FAIL_REQUEST,
|
||||
}},
|
||||
{WILL_PROCESS_RESPONSE, {
|
||||
@@ -91,10 +91,10 @@ index 0e1c0fa283c9db2d5e3e48a75eb666c5bd0cd97e..b0acb88d7a21500e70120a21f99f494d
|
||||
NOT_STARTED,
|
||||
DID_COMMIT,
|
||||
diff --git a/content/browser/renderer_host/navigation_request.h b/content/browser/renderer_host/navigation_request.h
|
||||
index 730174fdfff549916673ece367b27c264b8389db..1300e8c74cf5a42fb2159e75edfd7c150f648fcf 100644
|
||||
index a5c8cafef454369e593ed5f63770b914f22b0884..396af71f380977e588da58e361b24ffe8b240a6e 100644
|
||||
--- a/content/browser/renderer_host/navigation_request.h
|
||||
+++ b/content/browser/renderer_host/navigation_request.h
|
||||
@@ -130,6 +130,10 @@ class CONTENT_EXPORT NavigationRequest
|
||||
@@ -133,6 +133,10 @@ class CONTENT_EXPORT NavigationRequest
|
||||
// asynchronous.
|
||||
WILL_PROCESS_RESPONSE,
|
||||
|
||||
@@ -106,10 +106,10 @@ index 730174fdfff549916673ece367b27c264b8389db..1300e8c74cf5a42fb2159e75edfd7c15
|
||||
READY_TO_COMMIT,
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
index 04e360fc01cc3a7f04ec6763c1c5d031f7303db8..1ddd5f21ac69ff51f771d2f9e506fbe0150509e8 100644
|
||||
index 3b3b825f738b1b50974603d4a801aa2e2717b286..5818a15007baa8d1a078c0ddc9d30e00984876cf 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -2715,6 +2715,16 @@ scoped_refptr<SiteInstance>
|
||||
@@ -2726,6 +2726,16 @@ scoped_refptr<SiteInstance>
|
||||
RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
NavigationRequest* request,
|
||||
std::string* reason) {
|
||||
@@ -126,7 +126,7 @@ index 04e360fc01cc3a7f04ec6763c1c5d031f7303db8..1ddd5f21ac69ff51f771d2f9e506fbe0
|
||||
SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
|
||||
|
||||
// All children of MHTML documents must be MHTML documents. They all live in
|
||||
@@ -2742,10 +2752,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -2753,10 +2763,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
//
|
||||
// TODO(clamy): We should also consider as a candidate SiteInstance the
|
||||
// speculative SiteInstance that was computed on redirects.
|
||||
@@ -191,7 +191,7 @@ index 04e360fc01cc3a7f04ec6763c1c5d031f7303db8..1ddd5f21ac69ff51f771d2f9e506fbe0
|
||||
|
||||
// Account for renderer-initiated reload as well.
|
||||
// Needed as a workaround for https://crbug.com/1045524, remove it when it is
|
||||
@@ -2785,6 +2845,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -2796,6 +2856,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
@@ -202,10 +202,10 @@ index 04e360fc01cc3a7f04ec6763c1c5d031f7303db8..1ddd5f21ac69ff51f771d2f9e506fbe0
|
||||
}
|
||||
|
||||
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
|
||||
index 34f32197686fbb350a065cb2ce554a7b4ae917b5..7196c8a8b1be2d4e3496de2de1e8f62430696021 100644
|
||||
index b0903d9cd7ef9ca15bc32d230b6003a2bfb4c3d9..9da9ae8b51010b9bbf5c62ec810ffd0bc145dad5 100644
|
||||
--- a/content/browser/site_instance_impl.cc
|
||||
+++ b/content/browser/site_instance_impl.cc
|
||||
@@ -742,6 +742,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) {
|
||||
@@ -755,6 +755,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) {
|
||||
return browsing_instance_->HasSiteInstance(site_info);
|
||||
}
|
||||
|
||||
@@ -217,10 +217,10 @@ index 34f32197686fbb350a065cb2ce554a7b4ae917b5..7196c8a8b1be2d4e3496de2de1e8f624
|
||||
const GURL& url) {
|
||||
return GetRelatedSiteInstanceImpl(
|
||||
diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
|
||||
index 3dc0f0cf7f3e9b9e75cf053817e9ac5fba0182bc..16759a044e24ac3c0719a57e196fbf3e2975f1b9 100644
|
||||
index 1d79bf9261aad6e649a029257f7e6848cc34ad69..64cd5e188786ed60e474aeb1cabacd3d85069ae0 100644
|
||||
--- a/content/browser/site_instance_impl.h
|
||||
+++ b/content/browser/site_instance_impl.h
|
||||
@@ -321,6 +321,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
|
||||
@@ -323,6 +323,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
|
||||
BrowserContext* GetBrowserContext() override;
|
||||
const GURL& GetSiteURL() override;
|
||||
scoped_refptr<SiteInstance> GetRelatedSiteInstance(const GURL& url) override;
|
||||
@@ -229,7 +229,7 @@ index 3dc0f0cf7f3e9b9e75cf053817e9ac5fba0182bc..16759a044e24ac3c0719a57e196fbf3e
|
||||
size_t GetRelatedActiveContentsCount() override;
|
||||
bool RequiresDedicatedProcess() override;
|
||||
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
|
||||
index 2b0dd7cd7bdfcdc0c5a2e947e7f5faee86546330..76c05a9374969495cb152f4a6521b39391f551ec 100644
|
||||
index d1c4beb5f3a8e1fb5dfc7d1d31df9a236e3ade8e..e3279ca97116ea2d6757a2561668692bae8ec8aa 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -65,6 +65,21 @@
|
||||
@@ -255,12 +255,12 @@ index 2b0dd7cd7bdfcdc0c5a2e947e7f5faee86546330..76c05a9374969495cb152f4a6521b393
|
||||
const MainFunctionParams& parameters) {
|
||||
return nullptr;
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index 79d88cab12a1bce6e386fc470622d670bfaa6730..6c0674bd02c4acca75c83afd9051687f5b688297 100644
|
||||
index d42c4f7a76f78f1590451691909066e86f29e809..2ed3eae7909ba40733dd89a3cff9cfe44c29ab33 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -251,8 +251,45 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
using IsClipboardPasteAllowedCallback =
|
||||
base::OnceCallback<void(ClipboardPasteAllowed)>;
|
||||
@@ -255,8 +255,45 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
using IsClipboardPasteContentAllowedCallback =
|
||||
base::OnceCallback<void(ClipboardPasteContentAllowed)>;
|
||||
|
||||
+ // Identifies the type of site instance to use for a navigation.
|
||||
+ enum SiteInstanceForNavigationType {
|
||||
@@ -281,7 +281,7 @@ index 79d88cab12a1bce6e386fc470622d670bfaa6730..6c0674bd02c4acca75c83afd9051687f
|
||||
+ ASK_CHROMIUM
|
||||
+ };
|
||||
+
|
||||
virtual ~ContentBrowserClient() {}
|
||||
virtual ~ContentBrowserClient() = default;
|
||||
|
||||
+ // Electron: Allows disabling the below ShouldOverride patch
|
||||
+ virtual bool CanUseCustomSiteInstance();
|
||||
|
||||
@@ -7,10 +7,10 @@ We don't use gin to create the V8 platform, because we need to inject Node
|
||||
things.
|
||||
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index 73435b1c2c008a376421f8c94059fdb61d58feed..9ded78a8fd05bf4278c9800fcd0cdea6cefa2ac8 100644
|
||||
index 872025f8e29907f90b6b775f1bda4ad2dc19d491..5633e066f6ec829d050f4d154d618cf664ec8dc0 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -105,9 +105,10 @@ IsolateHolder::~IsolateHolder() {
|
||||
@@ -107,9 +107,10 @@ IsolateHolder::~IsolateHolder() {
|
||||
// static
|
||||
void IsolateHolder::Initialize(ScriptMode mode,
|
||||
v8::ArrayBuffer::Allocator* allocator,
|
||||
@@ -24,10 +24,10 @@ index 73435b1c2c008a376421f8c94059fdb61d58feed..9ded78a8fd05bf4278c9800fcd0cdea6
|
||||
g_reference_table = reference_table;
|
||||
}
|
||||
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
|
||||
index f23af2d9738f3aa76e3a49301e1c3216ee4a64b4..ede178acabc63c3c33d6ce93efd5632bec50ba89 100644
|
||||
index a8eb7190ddb87405e8d5b810c75d3fac6bab2120..689571089c3619f45d2f03df01f83bd73df55ba2 100644
|
||||
--- a/gin/public/isolate_holder.h
|
||||
+++ b/gin/public/isolate_holder.h
|
||||
@@ -88,7 +88,8 @@ class GIN_EXPORT IsolateHolder {
|
||||
@@ -89,7 +89,8 @@ class GIN_EXPORT IsolateHolder {
|
||||
// reference pointers. Otherwise, it can be nullptr.
|
||||
static void Initialize(ScriptMode mode,
|
||||
v8::ArrayBuffer::Allocator* allocator,
|
||||
@@ -38,7 +38,7 @@ index f23af2d9738f3aa76e3a49301e1c3216ee4a64b4..ede178acabc63c3c33d6ce93efd5632b
|
||||
v8::Isolate* isolate() { return isolate_; }
|
||||
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index 4174fd98f3a1d9ed6c9a4b57651e8122a2d37770..07d970b84b770b06019dc1de441cf108d67b1782 100644
|
||||
index 3967c18d2b0b48bee6e095997ba65f59f6aa4dd6..25f492ec675b7de953f5e45d6f768be40b272c3a 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -198,12 +198,14 @@ enum LoadV8FileResult {
|
||||
|
||||
@@ -12,10 +12,10 @@ rendering and there is no signal from browser process on this event
|
||||
to identify it.
|
||||
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
|
||||
index 443bdfdae846e494cf211daf6577ab0e2f58ec78..e425ee95415b51d7c108822494d9fcd8f2b43086 100644
|
||||
index f09a5bcb2085edcef3ef3571f19c4d5a5fc4cab4..e6959b579173ef70f98c2e523daf0f4a46f10610 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
|
||||
@@ -229,6 +229,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() {
|
||||
@@ -234,6 +234,11 @@ void GpuDataManagerImpl::TerminateInfoCollectionGpuProcess() {
|
||||
base::AutoLock auto_lock(lock_);
|
||||
private_->TerminateInfoCollectionGpuProcess();
|
||||
}
|
||||
@@ -28,10 +28,10 @@ index 443bdfdae846e494cf211daf6577ab0e2f58ec78..e425ee95415b51d7c108822494d9fcd8
|
||||
|
||||
void GpuDataManagerImpl::UpdateGpuFeatureInfo(
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
|
||||
index f8df36a25932346ba0f1b40805a72cd78aa95e01..7156db588e819f952d81e41e455d2e10921ca5b7 100644
|
||||
index 23bd3c93795488055a4db2d81c22d7fdb18b0092..5c23468ec6289f331fd4aabdb844fcb847f13352 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl.h
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl.h
|
||||
@@ -97,6 +97,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
|
||||
@@ -103,6 +103,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
|
||||
// Called from BrowserMainLoop::BrowserThreadsStarted().
|
||||
void OnBrowserThreadsStarted();
|
||||
void TerminateInfoCollectionGpuProcess();
|
||||
@@ -40,10 +40,10 @@ index f8df36a25932346ba0f1b40805a72cd78aa95e01..7156db588e819f952d81e41e455d2e10
|
||||
// Update the GPU feature info. This updates the blocklist and enabled status
|
||||
// of GPU rasterization. In the future this will be used for more features.
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
index 147de9d790b69d79a4a166f3d8d1037af9e4d77b..406529c4207b74c17eb98d3c3f16ca10aee53b87 100644
|
||||
index bb38974278df53fab6f91bfce1a94b3a686beced..957a464f86940441d70b012351d6f6d82bae284f 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
@@ -1042,6 +1042,11 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
||||
@@ -1073,6 +1073,11 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
||||
host->ForceShutdown();
|
||||
}
|
||||
|
||||
@@ -56,10 +56,10 @@ index 147de9d790b69d79a4a166f3d8d1037af9e4d77b..406529c4207b74c17eb98d3c3f16ca10
|
||||
|
||||
void GpuDataManagerImplPrivate::UpdateGpuFeatureInfo(
|
||||
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
index 25ff864d1b4f65edf01c334f1d4a2bd272452385..771279e91078646e17c9a8eeae46c778baf0e835 100644
|
||||
index 1e5be27d997d83b18fec3431d593f4f8be5a5f66..4f733bfe05613418f53ab99e9c7340e5fb245738 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
@@ -75,6 +75,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
||||
@@ -77,6 +77,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
||||
bool VulkanRequested() const;
|
||||
void OnBrowserThreadsStarted();
|
||||
void TerminateInfoCollectionGpuProcess();
|
||||
|
||||
@@ -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 adb9590e79cca869619f25a461faaea2f47610b0..0ceae9411f549843319707800b6706510d3b98c3 100644
|
||||
index 1343d7c03b07cb15416d353450a4b0f6937c4c4b..e199e5ad195c52943e81afc386dc9c7ba7e6f42d 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -685,6 +685,11 @@
|
||||
@@ -696,6 +696,11 @@
|
||||
"includes": [3880],
|
||||
},
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: gtk_visibility.patch
|
||||
Allow electron to depend on GTK in the GN build.
|
||||
|
||||
diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn
|
||||
index 0ba7dc322db2d48cb66d76630532c13ff02767e7..5721080a1b596095e42343be9c2f94004cbce4cd 100644
|
||||
index 5491aef735fc277521acbff97c1484fa81ef9ba4..8ff2728d1843e6d436aa2c59a6b991f2f257e864 100644
|
||||
--- a/build/config/linux/gtk/BUILD.gn
|
||||
+++ b/build/config/linux/gtk/BUILD.gn
|
||||
@@ -29,6 +29,8 @@ group("gtk") {
|
||||
@@ -17,4 +17,4 @@ index 0ba7dc322db2d48cb66d76630532c13ff02767e7..5721080a1b596095e42343be9c2f9400
|
||||
+
|
||||
# These are all for WebRTC.
|
||||
"//examples:peerconnection_client",
|
||||
"//remoting/host/linux",
|
||||
"//remoting/host:common",
|
||||
|
||||
@@ -8,7 +8,7 @@ needs to register on an isolate so that it can be used later
|
||||
down in the initialization process of an isolate.
|
||||
|
||||
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
|
||||
index 9ded78a8fd05bf4278c9800fcd0cdea6cefa2ac8..f25c4bc7aa0e13ef772294afec7d94c01c498205 100644
|
||||
index 5633e066f6ec829d050f4d154d618cf664ec8dc0..2604ec42fbb6e04499c660e064a5fa2f676037e2 100644
|
||||
--- a/gin/isolate_holder.cc
|
||||
+++ b/gin/isolate_holder.cc
|
||||
@@ -53,7 +53,8 @@ IsolateHolder::IsolateHolder(
|
||||
@@ -35,10 +35,10 @@ index 9ded78a8fd05bf4278c9800fcd0cdea6cefa2ac8..f25c4bc7aa0e13ef772294afec7d94c0
|
||||
new PerIsolateData(isolate_, allocator, access_mode_, task_runner));
|
||||
if (isolate_creation_mode == IsolateCreationMode::kCreateSnapshot) {
|
||||
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
|
||||
index ede178acabc63c3c33d6ce93efd5632bec50ba89..ffe7331cf1806417a32e66970f81b7797b9b80fc 100644
|
||||
index 689571089c3619f45d2f03df01f83bd73df55ba2..7c50707f2ec40fbf27c956460e4b0e6c8e4db8f7 100644
|
||||
--- a/gin/public/isolate_holder.h
|
||||
+++ b/gin/public/isolate_holder.h
|
||||
@@ -75,7 +75,8 @@ class GIN_EXPORT IsolateHolder {
|
||||
@@ -76,7 +76,8 @@ class GIN_EXPORT IsolateHolder {
|
||||
AccessMode access_mode,
|
||||
AllowAtomicsWaitMode atomics_wait_mode,
|
||||
IsolateType isolate_type,
|
||||
|
||||
@@ -47,7 +47,7 @@ index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209f
|
||||
|
||||
} // 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 cad39d6496aa138daa121b9fa08512cbde55dc72..cf0806ac316a9927bc917cedea98d865a641d1ef 100644
|
||||
index d2b88549b3005cf5fe43fc57c35403696c94ba80..f14d779670711f5aa4a46ac310bc94082cef7d7f 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
|
||||
@@ -550,10 +550,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
||||
@@ -117,7 +117,7 @@ index 055d28d8c6f6cc6826db1f888b1ea0f535c3c716..1eedb217a700ffdc73d30c5daadf003d
|
||||
// Used to force the NSApplication's focused accessibility element to be the
|
||||
// content::BrowserAccessibilityCocoa accessibility tree when the NSView for
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
index cd544c970c6a03ac5a377f9cdcedf9a7bc4e5ba0..5c53aad7e3cb709cfa6ec841978722fdab07422d 100644
|
||||
index e811980fc5798e668163adafce4e72a7188d94fe..cd45e6c19505e553a4632dd478d33f3ee2cce0de 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -234,8 +234,10 @@
|
||||
@@ -131,7 +131,7 @@ index cd544c970c6a03ac5a377f9cdcedf9a7bc4e5ba0..5c53aad7e3cb709cfa6ec841978722fd
|
||||
|
||||
// Disconnect from the previous bridge (this will have the effect of
|
||||
// destroying the associated bridge), and close the receiver (to allow it
|
||||
@@ -1379,8 +1381,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1383,8 +1385,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
gfx::NativeViewAccessible
|
||||
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
|
||||
@@ -142,7 +142,7 @@ index cd544c970c6a03ac5a377f9cdcedf9a7bc4e5ba0..5c53aad7e3cb709cfa6ec841978722fd
|
||||
return [GetInProcessNSView() window];
|
||||
}
|
||||
|
||||
@@ -1412,9 +1416,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1416,9 +1420,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
|
||||
@@ -154,7 +154,7 @@ index cd544c970c6a03ac5a377f9cdcedf9a7bc4e5ba0..5c53aad7e3cb709cfa6ec841978722fd
|
||||
}
|
||||
|
||||
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
|
||||
@@ -1901,12 +1907,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1905,12 +1911,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
|
||||
const std::vector<uint8_t>& window_token) {
|
||||
@@ -170,7 +170,7 @@ index cd544c970c6a03ac5a377f9cdcedf9a7bc4e5ba0..5c53aad7e3cb709cfa6ec841978722fd
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index 09e921fc8f0a1d502c2b39a23d759f2f3046faba..d7e85481dfa02364937e7961c6bda7a461a4782c 100644
|
||||
index dc5eedfa0d1194db18feb5bc2f418885163a795d..8e5af3ba8db08db55754b59a66231b07515655e3 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -313,6 +313,13 @@ component("base") {
|
||||
|
||||
@@ -7,19 +7,19 @@ Guard usages in blink of private Mac APIs by MAS_BUILD, so they can be
|
||||
excluded for people who want to submit their apps to the Mac App store.
|
||||
|
||||
diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
|
||||
index bd73a072fa9499c6ce231e35c29a50ce870e1fd1..e444cf5b5a8324d2528aa8b325f9feb11d89590d 100644
|
||||
index fa612b156034ca30446ccec5ec82098eafdf13a3..c6c06d1d62aee91a15827f30bf07b256e4d76c4e 100644
|
||||
--- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm
|
||||
+++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
|
||||
@@ -310,7 +310,7 @@ OptionalNSObject InvokeAttributeFor(
|
||||
0 == strcmp([value objCType], @encode(NSRange))) {
|
||||
return PopulateRange([value rangeValue]);
|
||||
@@ -238,7 +238,7 @@
|
||||
return PopulateSize([value sizeValue]);
|
||||
}
|
||||
}
|
||||
-
|
||||
+#ifndef MAS_BUILD
|
||||
// AXTextMarker
|
||||
if (content::IsAXTextMarker(value)) {
|
||||
return PopulateTextPosition(content::AXTextMarkerToPosition(value).get(),
|
||||
@@ -321,6 +321,7 @@ OptionalNSObject InvokeAttributeFor(
|
||||
@@ -249,6 +249,7 @@
|
||||
if (content::IsAXTextMarkerRange(value)) {
|
||||
return PopulateTextMarkerRange(value, line_indexer);
|
||||
}
|
||||
@@ -27,7 +27,7 @@ index bd73a072fa9499c6ce231e35c29a50ce870e1fd1..e444cf5b5a8324d2528aa8b325f9feb1
|
||||
|
||||
// AXValue
|
||||
if (CFGetTypeID(value) == AXValueGetTypeID()) {
|
||||
@@ -431,7 +432,7 @@ OptionalNSObject InvokeAttributeFor(
|
||||
@@ -359,7 +360,7 @@
|
||||
kConstValuePrefix + affinity);
|
||||
return set;
|
||||
}
|
||||
@@ -36,7 +36,7 @@ index bd73a072fa9499c6ce231e35c29a50ce870e1fd1..e444cf5b5a8324d2528aa8b325f9feb1
|
||||
base::Value AccessibilityTreeFormatterMac::PopulateTextMarkerRange(
|
||||
id object,
|
||||
const LineIndexer* line_indexer) const {
|
||||
@@ -445,7 +446,7 @@ OptionalNSObject InvokeAttributeFor(
|
||||
@@ -373,7 +374,7 @@
|
||||
dict.SetPath("focus", PopulateTextPosition(range.focus(), line_indexer));
|
||||
return dict;
|
||||
}
|
||||
@@ -46,10 +46,10 @@ index bd73a072fa9499c6ce231e35c29a50ce870e1fd1..e444cf5b5a8324d2528aa8b325f9feb1
|
||||
NSArray* node_array,
|
||||
const LineIndexer* line_indexer) const {
|
||||
diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
|
||||
index bd4804528b8b023655f6cfd61d051b8675cd65f6..eeb5855e06d7869d6c0579f4b3035c85234bee95 100644
|
||||
index 955a1c85425016cf13b2447cbf1aec9607a135c6..18a2de387cb09e24ff599dd556cef0fcf6777a0a 100644
|
||||
--- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
|
||||
+++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
|
||||
@@ -206,6 +206,7 @@
|
||||
@@ -234,6 +234,7 @@
|
||||
if (property_name == "AXIndexForChildUIElement") { // UIElement
|
||||
return OptionalNSObject::NotNilOrError(PropertyNodeToUIElement(arg_node));
|
||||
}
|
||||
@@ -57,7 +57,7 @@ index bd4804528b8b023655f6cfd61d051b8675cd65f6..eeb5855e06d7869d6c0579f4b3035c85
|
||||
if (property_name == "AXIndexForTextMarker") { // TextMarker
|
||||
return OptionalNSObject::NotNilOrError(PropertyNodeToTextMarker(arg_node));
|
||||
}
|
||||
@@ -213,6 +214,7 @@
|
||||
@@ -241,6 +242,7 @@
|
||||
return OptionalNSObject::NotNilOrError(
|
||||
PropertyNodeToTextMarkerRange(arg_node));
|
||||
}
|
||||
@@ -65,7 +65,7 @@ index bd4804528b8b023655f6cfd61d051b8675cd65f6..eeb5855e06d7869d6c0579f4b3035c85
|
||||
|
||||
return OptionalNSObject::NotApplicable();
|
||||
}
|
||||
@@ -278,6 +280,7 @@
|
||||
@@ -306,6 +308,7 @@
|
||||
return uielement;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ index bd4804528b8b023655f6cfd61d051b8675cd65f6..eeb5855e06d7869d6c0579f4b3035c85
|
||||
id AttributeInvoker::DictNodeToTextMarker(
|
||||
const AXPropertyNode& dictnode) const {
|
||||
if (!dictnode.IsDict()) {
|
||||
@@ -382,6 +385,7 @@ OptionalNSObject TextMarkerRangeGetEndMarker(const OptionalNSObject& obj) {
|
||||
@@ -410,6 +413,7 @@ OptionalNSObject TextMarkerRangeGetEndMarker(const OptionalNSObject& obj) {
|
||||
return OptionalNSObject::NotNilOrError(content::AXTextMarkerFrom(
|
||||
cocoa_node, position->text_offset(), position->affinity()));
|
||||
}
|
||||
@@ -125,7 +125,7 @@ index 33a689c23c72b1d18d0fceb595a4a45cf2790454..808eaf45096fbeb5d4bd62448c64078c
|
||||
// is concerned.
|
||||
@property(nonatomic, readonly) NSString* subrole;
|
||||
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f579ddb17 100644
|
||||
index 3fb1c5954b704307724483c5e4c758b4b62e4f9b..f1f75aae285bbffc05e5598f411821a18ca47729 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
@@ -209,6 +209,7 @@
|
||||
@@ -143,8 +143,8 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
+#endif
|
||||
|
||||
// Other private attributes.
|
||||
NSString* const NSAccessibilitySelectTextWithCriteriaParameterizedAttribute =
|
||||
@@ -243,6 +245,7 @@
|
||||
NSString* const NSAccessibilityIdentifierChromeAttribute = @"ChromeAXNodeId";
|
||||
@@ -244,6 +246,7 @@
|
||||
// VoiceOver uses -1 to mean "no limit" for AXResultsLimit.
|
||||
const int kAXResultsLimitNoLimit = -1;
|
||||
|
||||
@@ -152,7 +152,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
extern "C" {
|
||||
|
||||
// The following are private accessibility APIs required for cursor navigation
|
||||
@@ -466,6 +469,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range,
|
||||
@@ -467,6 +470,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range,
|
||||
AddMisspelledTextAttributes(ax_range, attributed_text);
|
||||
return attributed_text;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
|
||||
// Returns an autoreleased copy of the AXNodeData's attribute.
|
||||
NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility,
|
||||
@@ -737,6 +741,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
|
||||
@@ -738,6 +742,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
|
||||
#define NSAccessibilityLanguageAttribute @"AXLanguage"
|
||||
#endif
|
||||
|
||||
@@ -168,7 +168,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
bool content::IsAXTextMarker(id object) {
|
||||
if (object == nil)
|
||||
return false;
|
||||
@@ -780,6 +785,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
|
||||
@@ -781,6 +786,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
|
||||
kCFAllocatorDefault, anchor_textmarker, focus_textmarker);
|
||||
return [static_cast<id>(cf_marker_range) autorelease];
|
||||
}
|
||||
@@ -176,7 +176,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
|
||||
@implementation BrowserAccessibilityCocoa
|
||||
|
||||
@@ -818,7 +824,9 @@ + (void)initialize {
|
||||
@@ -820,7 +826,9 @@ + (void)initialize {
|
||||
{NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
|
||||
{NSAccessibilityElementBusyAttribute, @"elementBusy"},
|
||||
{NSAccessibilityEnabledAttribute, @"enabled"},
|
||||
@@ -186,7 +186,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
{NSAccessibilityExpandedAttribute, @"expanded"},
|
||||
{NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"},
|
||||
{NSAccessibilityFocusedAttribute, @"focused"},
|
||||
@@ -830,8 +838,10 @@ + (void)initialize {
|
||||
@@ -832,8 +840,10 @@ + (void)initialize {
|
||||
{NSAccessibilityHighestEditableAncestorAttribute,
|
||||
@"highestEditableAncestor"},
|
||||
{NSAccessibilityIndexAttribute, @"index"},
|
||||
@@ -197,7 +197,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
{NSAccessibilityInvalidAttribute, @"invalid"},
|
||||
{NSAccessibilityIsMultiSelectableAttribute, @"isMultiSelectable"},
|
||||
{NSAccessibilityLanguageAttribute, @"language"},
|
||||
@@ -853,13 +863,17 @@ + (void)initialize {
|
||||
@@ -855,13 +865,17 @@ + (void)initialize {
|
||||
{NSAccessibilityRowsAttribute, @"rows"},
|
||||
// TODO(aboxhall): expose
|
||||
// NSAccessibilityServesAsTitleForUIElementsAttribute
|
||||
@@ -215,7 +215,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
{NSAccessibilitySizeAttribute, @"size"},
|
||||
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
|
||||
{NSAccessibilitySubroleAttribute, @"subrole"},
|
||||
@@ -1354,6 +1368,7 @@ - (NSNumber*)enabled {
|
||||
@@ -1357,6 +1371,7 @@ - (NSNumber*)enabled {
|
||||
ax::mojom::Restriction::kDisabled);
|
||||
}
|
||||
|
||||
@@ -223,15 +223,15 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
// Returns a text marker that points to the last character in the document that
|
||||
// can be selected with VoiceOver.
|
||||
- (id)endTextMarker {
|
||||
@@ -1364,6 +1379,7 @@ - (id)endTextMarker {
|
||||
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
|
||||
return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
|
||||
@@ -1365,6 +1380,7 @@ - (id)endTextMarker {
|
||||
BrowserAccessibilityPositionInstance position = _owner->CreatePositionAt(0);
|
||||
return CreateTextMarker(position->CreatePositionAtEndOfContent());
|
||||
}
|
||||
+#endif
|
||||
|
||||
- (NSNumber*)expanded {
|
||||
if (![self instanceActive])
|
||||
@@ -1564,6 +1580,7 @@ - (bool)findRowIndex:(BrowserAccessibilityCocoa*)toFind
|
||||
@@ -1565,6 +1581,7 @@ - (bool)findRowIndex:(BrowserAccessibilityCocoa*)toFind
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
- (NSNumber*)insertionPointLineNumber {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -1589,6 +1606,7 @@ - (NSNumber*)insertionPointLineNumber {
|
||||
@@ -1590,6 +1607,7 @@ - (NSNumber*)insertionPointLineNumber {
|
||||
caretPosition->AsTextPosition()->text_offset());
|
||||
return @(std::distance(lineBreaks.begin(), iterator));
|
||||
}
|
||||
@@ -247,7 +247,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
|
||||
// Returns whether or not this node should be ignored in the
|
||||
// accessibility tree.
|
||||
@@ -1940,8 +1958,12 @@ - (BOOL)shouldExposeTitleUIElement {
|
||||
@@ -1941,8 +1959,12 @@ - (BOOL)shouldExposeTitleUIElement {
|
||||
return content::AXTextEdit(newValue, base::string16(), nil);
|
||||
}
|
||||
}
|
||||
@@ -260,7 +260,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
}
|
||||
|
||||
- (BOOL)instanceActive {
|
||||
@@ -2266,6 +2288,7 @@ - (NSArray*)selectedChildren {
|
||||
@@ -2267,6 +2289,7 @@ - (NSArray*)selectedChildren {
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
- (NSString*)selectedText {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -2277,11 +2300,13 @@ - (NSString*)selectedText {
|
||||
@@ -2278,11 +2301,13 @@ - (NSString*)selectedText {
|
||||
return nil;
|
||||
return base::SysUTF16ToNSString(range.GetText());
|
||||
}
|
||||
@@ -282,7 +282,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
- (NSValue*)selectedTextRange {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -2305,7 +2330,9 @@ - (NSValue*)selectedTextRange {
|
||||
@@ -2306,7 +2331,9 @@ - (NSValue*)selectedTextRange {
|
||||
int selLength = range.GetText().length();
|
||||
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
|
||||
}
|
||||
@@ -292,15 +292,15 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
- (id)selectedTextMarkerRange {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -2313,6 +2340,7 @@ - (id)selectedTextMarkerRange {
|
||||
@@ -2318,6 +2345,7 @@ - (id)selectedTextMarkerRange {
|
||||
// words correctly.
|
||||
return CreateTextMarkerRange(GetSelectedRange(*_owner).AsBackwardRange());
|
||||
return CreateTextMarkerRange(ax_range.AsBackwardRange());
|
||||
}
|
||||
+#endif
|
||||
|
||||
- (NSValue*)size {
|
||||
if (![self instanceActive])
|
||||
@@ -2345,6 +2373,7 @@ - (NSString*)sortDirection {
|
||||
@@ -2350,6 +2378,7 @@ - (NSString*)sortDirection {
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -308,15 +308,15 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
// Returns a text marker that points to the first character in the document that
|
||||
// can be selected with VoiceOver.
|
||||
- (id)startTextMarker {
|
||||
@@ -2355,6 +2384,7 @@ - (id)startTextMarker {
|
||||
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
|
||||
return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
|
||||
@@ -2358,6 +2387,7 @@ - (id)startTextMarker {
|
||||
BrowserAccessibilityPositionInstance position = _owner->CreatePositionAt(0);
|
||||
return CreateTextMarker(position->CreatePositionAtStartOfContent());
|
||||
}
|
||||
+#endif
|
||||
|
||||
// Returns a subrole based upon the role.
|
||||
- (NSString*)subrole {
|
||||
@@ -2681,11 +2711,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
|
||||
@@ -2687,11 +2717,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
|
||||
NSMutableAttributedString* attributedInnerText =
|
||||
[[[NSMutableAttributedString alloc]
|
||||
initWithString:base::SysUTF16ToNSString(innerText)] autorelease];
|
||||
@@ -330,7 +330,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
|
||||
return [attributedInnerText attributedSubstringFromRange:range];
|
||||
}
|
||||
@@ -2798,9 +2830,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
||||
@@ -2804,9 +2836,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
||||
return ToBrowserAccessibilityCocoa(cell);
|
||||
}
|
||||
|
||||
@@ -342,7 +342,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
BrowserAccessibilityPositionInstance position =
|
||||
CreatePositionFromTextMarker(parameter);
|
||||
if (!position->IsNullPosition())
|
||||
@@ -3113,6 +3144,7 @@ AXPlatformRange range(std::move(lineStartPosition),
|
||||
@@ -3119,6 +3150,7 @@ AXPlatformRange range(std::move(lineStartPosition),
|
||||
|
||||
return CreateTextMarker(root->CreatePositionAt(index));
|
||||
}
|
||||
@@ -350,7 +350,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
|
||||
if ([attribute isEqualToString:
|
||||
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
|
||||
@@ -3143,6 +3175,7 @@ AXPlatformRange range(std::move(lineStartPosition),
|
||||
@@ -3149,6 +3181,7 @@ AXPlatformRange range(std::move(lineStartPosition),
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
if ([attribute
|
||||
isEqualToString:
|
||||
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
|
||||
@@ -3257,6 +3290,7 @@ AXPlatformRange range(std::move(lineStartPosition),
|
||||
@@ -3263,6 +3296,7 @@ AXPlatformRange range(std::move(lineStartPosition),
|
||||
|
||||
return @(child->GetIndexInParent());
|
||||
}
|
||||
@@ -366,7 +366,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
|
||||
return nil;
|
||||
}
|
||||
@@ -3782,6 +3816,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
|
||||
@@ -3792,6 +3826,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
|
||||
AXPlatformRange(_owner->CreatePositionAt(range.location),
|
||||
_owner->CreatePositionAt(NSMaxRange(range))));
|
||||
}
|
||||
@@ -374,7 +374,7 @@ index 212d2ebe8fb64ae04a845b8b8f8de159df6e5dbc..8b6da847d6e98ef2dbe1114d6e027f4f
|
||||
if ([attribute
|
||||
isEqualToString:NSAccessibilitySelectedTextMarkerRangeAttribute]) {
|
||||
AXPlatformRange range = CreateRangeFromTextMarkerRange(value);
|
||||
@@ -3791,6 +3826,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
|
||||
@@ -3801,6 +3836,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
|
||||
manager->SetSelection(AXPlatformRange(range.anchor()->AsLeafTextPosition(),
|
||||
range.focus()->AsLeafTextPosition()));
|
||||
}
|
||||
@@ -517,7 +517,7 @@ index 56864e40431a051dc93ada792a712ca8cf5e9258..c2ee161f02e8cbf901234210671f6dc5
|
||||
|
||||
void BluetoothAdapterMac::RemovePairingDelegateInternal(
|
||||
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
|
||||
index d56fc21776812d36870767ea04a25d72287a87eb..c3b0a303693439947bbd804df69adf5a23e692a1 100644
|
||||
index 21153d38f978f84fed54d9a904c7a30b9a072d56..0d23e05fe70c5b6f73f39bf3139c7456ba800a51 100644
|
||||
--- a/media/audio/BUILD.gn
|
||||
+++ b/media/audio/BUILD.gn
|
||||
@@ -177,6 +177,12 @@ source_set("audio") {
|
||||
@@ -547,19 +547,21 @@ index a994f74bb68d1e57ffa787e159f0a6c69e7b6953..1d84f84b59b2bae75c10c00da730022e
|
||||
}
|
||||
|
||||
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
|
||||
index bd838cbf757deed871a166d5c3205a6619c87d68..efedc7f089ad9f995d52ca0c50378b99237ae6cf 100644
|
||||
index b50f468c7666150ed501566d36ebe4e1fd32227f..f992753b2b3d514e836655e0aa81d00a61d8083d 100644
|
||||
--- a/net/dns/dns_config_service_posix.cc
|
||||
+++ b/net/dns/dns_config_service_posix.cc
|
||||
@@ -248,6 +248,7 @@ class DnsConfigServicePosix::Watcher {
|
||||
@@ -232,8 +232,8 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher {
|
||||
|
||||
bool Watch() {
|
||||
bool Watch() override {
|
||||
CheckOnCorrectSequence();
|
||||
-
|
||||
bool success = true;
|
||||
+#ifndef MAS_BUILD
|
||||
if (!config_watcher_.Watch(base::BindRepeating(&Watcher::OnConfigChanged,
|
||||
base::Unretained(this)))) {
|
||||
LOG(ERROR) << "DNS config watch failed to start.";
|
||||
@@ -270,6 +271,7 @@ class DnsConfigServicePosix::Watcher {
|
||||
DNS_CONFIG_WATCH_MAX);
|
||||
@@ -251,6 +251,7 @@ class DnsConfigServicePosix::Watcher : public DnsConfigService::Watcher {
|
||||
success = false;
|
||||
}
|
||||
#endif // !defined(OS_ANDROID) && !defined(OS_IOS)
|
||||
+#endif
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Mon, 8 Mar 2021 16:27:39 -0800
|
||||
Subject: moves background_color setter of WebView to blinks webprefs logic
|
||||
|
||||
background_color can be updated at runtime, as such we need to apply the
|
||||
new background color to the WebView in the ApplyPreferences method.
|
||||
There is no current way to attach an observer to these prefs so patching
|
||||
is our only option.
|
||||
|
||||
Ideally we could add an embedder observer pattern here but that can be
|
||||
done in future work.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.cc b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
index 755d037d6f5046d4641b6532918125d1ca84cdd8..adeb4845fe5f8516cb4d2ed36cb59bb26d714b9b 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -154,6 +154,7 @@
|
||||
#include "third_party/blink/renderer/core/timing/dom_window_performance.h"
|
||||
#include "third_party/blink/renderer/core/timing/window_performance.h"
|
||||
#include "third_party/blink/renderer/platform/fonts/font_cache.h"
|
||||
+#include "third_party/blink/renderer/platform/graphics/color.h"
|
||||
#include "third_party/blink/renderer/platform/graphics/image.h"
|
||||
#include "third_party/blink/renderer/platform/graphics/paint/cull_rect.h"
|
||||
#include "third_party/blink/renderer/platform/graphics/paint/paint_record_builder.h"
|
||||
@@ -1752,6 +1753,14 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
|
||||
RuntimeEnabledFeatures::SetTranslateServiceEnabled(
|
||||
prefs.translate_service_available);
|
||||
+
|
||||
+ SkColor color = SK_ColorTRANSPARENT;
|
||||
+ if (!prefs.guest_instance_id) { // not inside electron <webview /> tag, which is always transparent.
|
||||
+ Color blink_color;
|
||||
+ if (blink_color.SetFromString(WebString::FromASCII(prefs.background_color)))
|
||||
+ color = static_cast<SkColor>(blink_color);
|
||||
+ }
|
||||
+ web_view->SetBaseBackgroundColor(color);
|
||||
}
|
||||
|
||||
void WebViewImpl::ThemeChanged() {
|
||||
@@ -7,10 +7,10 @@ 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 664407028b54b969372709fa89a80d5444110350..d8b35023554a3f7f1b6e96c899fa52200285e7f3 100644
|
||||
index db667e13f2e4d9e96e9ac28f17c61412d6279ec7..103958bba8a41b217bbaf4d8899fec3ad562aa70 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -115,6 +115,11 @@
|
||||
@@ -118,6 +118,11 @@
|
||||
#include "services/network/url_loader.h"
|
||||
#include "services/network/url_request_context_builder_mojo.h"
|
||||
|
||||
@@ -22,7 +22,7 @@ index 664407028b54b969372709fa89a80d5444110350..d8b35023554a3f7f1b6e96c899fa5220
|
||||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
#include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
|
||||
#include "components/certificate_transparency/chrome_require_ct_delegate.h"
|
||||
@@ -373,6 +378,79 @@ bool SCTAuditingDelegate::IsSCTAuditingEnabled() {
|
||||
@@ -376,6 +381,79 @@ bool SCTAuditingDelegate::IsSCTAuditingEnabled() {
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -102,7 +102,7 @@ index 664407028b54b969372709fa89a80d5444110350..d8b35023554a3f7f1b6e96c899fa5220
|
||||
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
|
||||
|
||||
NetworkContext::PendingCertVerify::PendingCertVerify() = default;
|
||||
@@ -572,6 +650,13 @@ void NetworkContext::SetClient(
|
||||
@@ -575,6 +653,13 @@ void NetworkContext::SetClient(
|
||||
client_.Bind(std::move(client));
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ index 664407028b54b969372709fa89a80d5444110350..d8b35023554a3f7f1b6e96c899fa5220
|
||||
void NetworkContext::CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) {
|
||||
@@ -1855,8 +1940,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -1878,8 +1963,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
"NetworkContext should pass CertVerifierServiceRemoteParams.";
|
||||
|
||||
std::unique_ptr<net::CertVerifier> cert_verifier;
|
||||
@@ -127,7 +127,7 @@ index 664407028b54b969372709fa89a80d5444110350..d8b35023554a3f7f1b6e96c899fa5220
|
||||
} else {
|
||||
if (params_->cert_verifier_params &&
|
||||
params_->cert_verifier_params->is_remote_params()) {
|
||||
@@ -1884,7 +1970,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -1907,7 +1993,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
cert_net_fetcher_ =
|
||||
base::MakeRefCounted<net::CertNetFetcherURLRequest>();
|
||||
|
||||
@@ -136,7 +136,7 @@ index 664407028b54b969372709fa89a80d5444110350..d8b35023554a3f7f1b6e96c899fa5220
|
||||
}
|
||||
|
||||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
@@ -1908,9 +1994,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -1931,9 +2017,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
|
||||
// Whether the cert verifier is remote or in-process, we should wrap it in
|
||||
// caching and coalescing layers to avoid extra verifications and IPCs.
|
||||
@@ -146,9 +146,9 @@ index 664407028b54b969372709fa89a80d5444110350..d8b35023554a3f7f1b6e96c899fa5220
|
||||
- std::move(cert_verifier)));
|
||||
+ std::move(temp_verifier)));
|
||||
|
||||
#if BUILDFLAG(IS_ASH)
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
cert_verifier_with_trust_anchors_ =
|
||||
@@ -1919,13 +2005,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -1942,13 +2028,27 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
UpdateAdditionalCertificates(
|
||||
std::move(params_->initial_additional_certificates));
|
||||
cert_verifier_with_trust_anchors_->InitializeOnIOThread(
|
||||
@@ -156,7 +156,7 @@ index 664407028b54b969372709fa89a80d5444110350..d8b35023554a3f7f1b6e96c899fa5220
|
||||
- cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_);
|
||||
+ std::move(temp_verifier));
|
||||
+ temp_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_);
|
||||
#endif // BUILDFLAG(IS_ASH)
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
+ if (!temp_verifier) {
|
||||
+#if !defined(OS_LINUX)
|
||||
+ temp_verifier = std::make_unique<net::MultiThreadedCertVerifier>(
|
||||
@@ -181,10 +181,10 @@ index 664407028b54b969372709fa89a80d5444110350..d8b35023554a3f7f1b6e96c899fa5220
|
||||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
if (params_->enforce_chrome_ct_policy) {
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index d6ec5511068bdc9aa34e76fdab46802d2536654e..b0b6f9bb175cd0e5dc7f69bd204886c463b63442 100644
|
||||
index 707cf9a7db7b81da9affef0c9ab4a934f5fd69c9..494d68d7f399152a08dd74ee4aa2d17baec81dd8 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -88,6 +88,7 @@ class DomainReliabilityMonitor;
|
||||
@@ -90,6 +90,7 @@ class DomainReliabilityMonitor;
|
||||
|
||||
namespace network {
|
||||
class CertVerifierWithTrustAnchors;
|
||||
@@ -192,7 +192,7 @@ index d6ec5511068bdc9aa34e76fdab46802d2536654e..b0b6f9bb175cd0e5dc7f69bd204886c4
|
||||
class CookieManager;
|
||||
class ExpectCTReporter;
|
||||
class HostResolver;
|
||||
@@ -192,6 +193,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -194,6 +195,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
void CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) override;
|
||||
@@ -201,7 +201,7 @@ index d6ec5511068bdc9aa34e76fdab46802d2536654e..b0b6f9bb175cd0e5dc7f69bd204886c4
|
||||
void ResetURLLoaderFactories() override;
|
||||
void GetCookieManager(
|
||||
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
|
||||
@@ -690,6 +693,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -692,6 +695,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr;
|
||||
#endif
|
||||
|
||||
@@ -211,10 +211,10 @@ index d6ec5511068bdc9aa34e76fdab46802d2536654e..b0b6f9bb175cd0e5dc7f69bd204886c4
|
||||
// CertNetFetcher is not used by the current platform, or if the actual
|
||||
// net::CertVerifier is instantiated outside of the network service.
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 0a09398cf50e8ef8dac952c3cf89a64d6df53798..b0065647d08f3208446d0c996276d6394d80409e 100644
|
||||
index 8ac73cae153047e16f37a7ca1941c7fc43def52e..17695b6b6a50f6d8f3b81d5e57b2bbeb667b83c7 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -215,6 +215,17 @@ struct CTPolicy {
|
||||
@@ -228,6 +228,17 @@ struct CTPolicy {
|
||||
array<string> excluded_legacy_spkis;
|
||||
};
|
||||
|
||||
@@ -232,7 +232,7 @@ index 0a09398cf50e8ef8dac952c3cf89a64d6df53798..b0065647d08f3208446d0c996276d639
|
||||
// Parameters for constructing a network context.
|
||||
struct NetworkContextParams {
|
||||
// Name used by memory tools to identify the context.
|
||||
@@ -866,6 +877,9 @@ interface NetworkContext {
|
||||
@@ -889,6 +900,9 @@ interface NetworkContext {
|
||||
// Sets a client for this network context.
|
||||
SetClient(pending_remote<NetworkContextClient> client);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Do not check for unique origin in CacheStorage, in Electron we may have
|
||||
scripts running without an origin.
|
||||
|
||||
diff --git a/content/browser/cache_storage/legacy/legacy_cache_storage.cc b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
|
||||
index 0c0beb628e1a57ffd288e05203b75b82373932b0..2cd698a42391520de36594294e6f2ad243e70481 100644
|
||||
index 5e85bd8335d46b743700248241d059fed8924ec8..24e26ac4364818249e7ab29a08f5f73301ae190e 100644
|
||||
--- a/content/browser/cache_storage/legacy/legacy_cache_storage.cc
|
||||
+++ b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
|
||||
@@ -107,7 +107,7 @@ class LegacyCacheStorage::CacheLoader {
|
||||
|
||||
@@ -108,10 +108,10 @@ index f9b6a18aa73968506ddeca13de69b368f4ca8606..d45cb1c32be1b5c76840dafcd96fd06c
|
||||
mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
index 0c1b98163a40c2a214167422e1818c670491e135..9ce9b3e26a1a4d9c5d209f926b6d93e7e4d05074 100644
|
||||
index 09eb09f2fad4a21fec66ea1cf01233aea3716e9d..cf96bade12b5add90e85d21dc9f3846e95c769cf 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2093,7 +2093,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2091,7 +2091,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
mojo::PendingReceiver<blink::mojom::NotificationService> receiver) {
|
||||
DCHECK_CURRENTLY_ON(BrowserThread::UI);
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
||||
@@ -35,10 +35,10 @@ index 79b969d83f5b2dcee7ece6c18ac9a1dcf47ac5a1..a4d38d5d0e248cf92195f649b96c77cd
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/gfx/color_palette.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
index fc55e78614714299f8660c6e7eae2325f099e89a..45ffc1ae48396e8f91144c2a4f7dbab5ed390d24 100644
|
||||
index 67790686e1d006095d1969489064f6a06b457428..5f8bba605e0bd9b540860fe379305ef638d963de 100644
|
||||
--- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
@@ -14,16 +14,18 @@
|
||||
@@ -15,16 +15,18 @@
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
#include "chrome/app/vector_icons/vector_icons.h"
|
||||
@@ -58,7 +58,7 @@ index fc55e78614714299f8660c6e7eae2325f099e89a..45ffc1ae48396e8f91144c2a4f7dbab5
|
||||
#include "components/vector_icons/vector_icons.h"
|
||||
#include "content/public/browser/picture_in_picture_window_controller.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
@@ -48,7 +50,7 @@
|
||||
@@ -49,7 +51,7 @@
|
||||
#include "ui/aura/window.h"
|
||||
#endif
|
||||
|
||||
@@ -67,7 +67,7 @@ index fc55e78614714299f8660c6e7eae2325f099e89a..45ffc1ae48396e8f91144c2a4f7dbab5
|
||||
#include "chrome/browser/shell_integration_win.h"
|
||||
#include "ui/aura/window.h"
|
||||
#include "ui/aura/window_tree_host.h"
|
||||
@@ -219,7 +221,7 @@ std::unique_ptr<OverlayWindowViews> OverlayWindowViews::Create(
|
||||
@@ -223,7 +225,7 @@ std::unique_ptr<OverlayWindowViews> OverlayWindowViews::Create(
|
||||
overlay_window->Init(std::move(params));
|
||||
overlay_window->OnRootViewReady();
|
||||
|
||||
@@ -103,7 +103,7 @@ index b1272d8664afdd5c05afcb38a2f533741f210554..20f7ffa8be09b046122430c4497edce8
|
||||
#include "ui/base/hit_test.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
|
||||
index 251503cb7154c77333d85be892fe89253523a94a..052e74bb54e8b32985af7b5f870159c80ca44d87 100644
|
||||
index 61b52275ad685ffc4970dd5e58714310e9af0835..72c0199189bf0efbb7530f12a5c8dc3e72cc783c 100644
|
||||
--- a/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/skip_ad_label_button.cc
|
||||
@@ -4,7 +4,7 @@
|
||||
@@ -116,7 +116,7 @@ index 251503cb7154c77333d85be892fe89253523a94a..052e74bb54e8b32985af7b5f870159c8
|
||||
#include "ui/gfx/color_palette.h"
|
||||
#include "ui/views/background.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/track_image_button.cc b/chrome/browser/ui/views/overlay/track_image_button.cc
|
||||
index d5fe4187200354d18c778591e2383d9c23f4783f..ccb0ed6fef88b7ec228055ded708637c3e094571 100644
|
||||
index c0d070733148d2c9e0271b125ab6e09c55a4f686..f93ca7115cc7c7ed85007d3a392e5bd85426cae3 100644
|
||||
--- a/chrome/browser/ui/views/overlay/track_image_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/track_image_button.cc
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
@@ -102,10 +102,10 @@ index 47a5b3c2a11ec595ff926df10f856ed3c5375c55..38769ab454b143a1f50d1291a363092c
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
|
||||
index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d14094510816 100644
|
||||
index 83849c57ba42f29ecb169958c91df2d81bdab9dc..3a7eff03f034e71d8f493b425ea2a922c1e6106d 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -30,10 +30,7 @@
|
||||
@@ -29,10 +29,7 @@
|
||||
#include "chrome/browser/printing/print_view_manager_common.h"
|
||||
#include "chrome/browser/printing/printer_query.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
@@ -116,7 +116,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
#include "chromeos/constants/chromeos_features.h"
|
||||
#include "components/prefs/pref_service.h"
|
||||
#include "components/printing/browser/print_composite_client.h"
|
||||
@@ -50,6 +47,7 @@
|
||||
@@ -49,6 +46,7 @@
|
||||
#include "content/public/browser/render_process_host.h"
|
||||
#include "content/public/browser/render_view_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
@@ -124,7 +124,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
#include "mojo/public/cpp/system/buffer.h"
|
||||
#include "printing/buildflags/buildflags.h"
|
||||
#include "printing/metafile_skia.h"
|
||||
@@ -74,6 +72,8 @@ using PrintSettingsCallback =
|
||||
@@ -78,6 +76,8 @@ using PrintSettingsCallback =
|
||||
base::OnceCallback<void(std::unique_ptr<PrinterQuery>)>;
|
||||
|
||||
void ShowWarningMessageBox(const base::string16& message) {
|
||||
@@ -133,7 +133,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
// Runs always on the UI thread.
|
||||
static bool is_dialog_shown = false;
|
||||
if (is_dialog_shown)
|
||||
@@ -82,6 +82,7 @@ void ShowWarningMessageBox(const base::string16& message) {
|
||||
@@ -86,6 +86,7 @@ void ShowWarningMessageBox(const base::string16& message) {
|
||||
base::AutoReset<bool> auto_reset(&is_dialog_shown, true);
|
||||
|
||||
chrome::ShowWarningMessageBox(nullptr, base::string16(), message);
|
||||
@@ -141,7 +141,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
@@ -219,7 +220,9 @@ void UpdatePrintSettingsReplyOnIO(
|
||||
@@ -223,7 +224,9 @@ void UpdatePrintSettingsReplyOnIO(
|
||||
DCHECK(printer_query);
|
||||
auto params = mojom::PrintPagesParams::New();
|
||||
params->params = mojom::PrintParams::New();
|
||||
@@ -152,7 +152,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
RenderParamsFromPrintSettings(printer_query->settings(),
|
||||
params->params.get());
|
||||
params->params->document_cookie = printer_query->cookie();
|
||||
@@ -272,12 +275,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
@@ -351,12 +354,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
: PrintManager(web_contents),
|
||||
queue_(g_browser_process->print_job_manager()->queue()) {
|
||||
DCHECK(queue_);
|
||||
@@ -167,7 +167,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
}
|
||||
|
||||
PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -285,7 +290,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -364,7 +369,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
DisconnectFromCurrentPrintJob();
|
||||
}
|
||||
|
||||
@@ -179,7 +179,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
DisconnectFromCurrentPrintJob();
|
||||
|
||||
// Don't print / print preview crashed tabs.
|
||||
@@ -293,7 +301,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
@@ -372,7 +380,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
return false;
|
||||
|
||||
SetPrintingRFH(rfh);
|
||||
@@ -195,7 +195,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -414,9 +429,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
|
||||
@@ -493,9 +508,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
|
||||
void PrintViewManagerBase::UpdatePrintingEnabled() {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
// The Unretained() is safe because ForEachFrame() is synchronous.
|
||||
@@ -208,7 +208,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::NavigationStopped() {
|
||||
@@ -532,12 +547,13 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
@@ -612,12 +627,13 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
void PrintViewManagerBase::GetDefaultPrintSettings(
|
||||
GetDefaultPrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -223,7 +223,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
content::RenderFrameHost* render_frame_host =
|
||||
print_manager_host_receivers_.GetCurrentTargetFrame();
|
||||
|
||||
@@ -553,11 +569,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
@@ -633,11 +649,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
base::Value job_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
@@ -237,7 +237,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
if (!job_settings.FindIntKey(kSettingPrinterType)) {
|
||||
UpdatePrintSettingsReply(std::move(callback), nullptr, false);
|
||||
return;
|
||||
@@ -578,7 +595,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
|
||||
@@ -676,7 +693,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
|
||||
PrintManager::PrintingFailed(cookie);
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
@@ -246,7 +246,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
#endif
|
||||
|
||||
ReleasePrinterQuery();
|
||||
@@ -597,6 +614,11 @@ void PrintViewManagerBase::OnScriptedPrint(
|
||||
@@ -688,6 +705,11 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::ShowInvalidPrinterSettingsError() {
|
||||
@@ -258,7 +258,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
FROM_HERE, base::BindOnce(&ShowWarningMessageBox,
|
||||
l10n_util::GetStringUTF16(
|
||||
@@ -666,9 +688,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
|
||||
@@ -757,9 +779,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
|
||||
content::NotificationService::NoDetails());
|
||||
break;
|
||||
}
|
||||
@@ -274,7 +274,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
NOTREACHED();
|
||||
break;
|
||||
}
|
||||
@@ -766,8 +792,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -857,8 +883,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
DCHECK(!quit_inner_loop_);
|
||||
DCHECK(query);
|
||||
|
||||
@@ -287,7 +287,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
|
||||
// We can't print if there is no renderer.
|
||||
if (!web_contents()->GetMainFrame()->GetRenderViewHost() ||
|
||||
@@ -791,8 +819,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -882,8 +910,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
print_job_->SetSource(source, /*source_id=*/"");
|
||||
#endif
|
||||
|
||||
@@ -296,7 +296,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
printing_succeeded_ = false;
|
||||
return true;
|
||||
}
|
||||
@@ -841,14 +867,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -932,14 +958,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
content::RenderFrameHost* rfh = printing_rfh_;
|
||||
printing_rfh_ = nullptr;
|
||||
|
||||
@@ -321,7 +321,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
// Don't close the worker thread.
|
||||
print_job_ = nullptr;
|
||||
}
|
||||
@@ -884,7 +918,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -975,7 +1009,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
@@ -331,7 +331,7 @@ index 94774af53c16d13329c189739fb8c25a58e42494..9364f3bf37d5244bbcedb672e891d140
|
||||
|
||||
if (!cookie) {
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
|
||||
index 59ef9a7f60dc21bdf1f4f87092e490cc1f1f1fe7..0c6da3f7658314776bf8fd7898a50d4cd30c6eb9 100644
|
||||
index 93103940036ece118c511703c20c659d73724202..fcbf4c69d1b6cd30124444158e3f2c6da3371977 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.h
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.h
|
||||
@@ -38,6 +38,8 @@ class PrintJob;
|
||||
@@ -355,7 +355,7 @@ index 59ef9a7f60dc21bdf1f4f87092e490cc1f1f1fe7..0c6da3f7658314776bf8fd7898a50d4c
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Prints the document in |print_data| with settings specified in
|
||||
@@ -217,9 +222,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
@@ -214,9 +219,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
// The current RFH that is printing with a system printing dialog.
|
||||
content::RenderFrameHost* printing_rfh_ = nullptr;
|
||||
|
||||
@@ -371,83 +371,11 @@ index 59ef9a7f60dc21bdf1f4f87092e490cc1f1f1fe7..0c6da3f7658314776bf8fd7898a50d4c
|
||||
// Set while running an inner message loop inside RenderAllMissingPagesNow().
|
||||
// This means we are _blocking_ until all the necessary pages have been
|
||||
// rendered or the print settings are being loaded.
|
||||
diff --git a/chrome/browser/printing/printing_message_filter.cc b/chrome/browser/printing/printing_message_filter.cc
|
||||
index ca5858bffffa5fabd77de502f6453ccd8b315653..943d753ed78276acc094d92b171b7220f1caa49f 100644
|
||||
--- a/chrome/browser/printing/printing_message_filter.cc
|
||||
+++ b/chrome/browser/printing/printing_message_filter.cc
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "components/printing/browser/print_manager_utils.h"
|
||||
#include "components/printing/common/print.mojom.h"
|
||||
#include "components/printing/common/print_messages.h"
|
||||
+#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/browser_task_traits.h"
|
||||
#include "content/public/browser/render_frame_host.h"
|
||||
#include "content/public/browser/web_contents.h"
|
||||
@@ -65,19 +66,22 @@ class PrintingMessageFilterShutdownNotifierFactory
|
||||
|
||||
} // namespace
|
||||
|
||||
-PrintingMessageFilter::PrintingMessageFilter(int render_process_id,
|
||||
- Profile* profile)
|
||||
+PrintingMessageFilter::PrintingMessageFilter(
|
||||
+ int render_process_id,
|
||||
+ content::BrowserContext* browser_context)
|
||||
: BrowserMessageFilter(PrintMsgStart),
|
||||
render_process_id_(render_process_id),
|
||||
queue_(g_browser_process->print_job_manager()->queue()) {
|
||||
DCHECK(queue_.get());
|
||||
printing_shutdown_subscription_ =
|
||||
PrintingMessageFilterShutdownNotifierFactory::GetInstance()
|
||||
- ->Get(profile)
|
||||
+ ->Get(browser_context)
|
||||
->Subscribe(base::Bind(&PrintingMessageFilter::ShutdownOnUIThread,
|
||||
base::Unretained(this)));
|
||||
+ #if 0
|
||||
is_printing_enabled_.Init(prefs::kPrintingEnabled, profile->GetPrefs());
|
||||
is_printing_enabled_.MoveToSequence(content::GetIOThreadTaskRunner({}));
|
||||
+ #endif
|
||||
}
|
||||
|
||||
PrintingMessageFilter::~PrintingMessageFilter() {
|
||||
@@ -152,7 +156,7 @@ void PrintingMessageFilter::OnScriptedPrintReply(
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
void PrintingMessageFilter::OnCheckForCancel(const mojom::PreviewIds& ids,
|
||||
bool* cancel) {
|
||||
- *cancel = PrintPreviewUI::ShouldCancelRequest(ids);
|
||||
+ *cancel = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
diff --git a/chrome/browser/printing/printing_message_filter.h b/chrome/browser/printing/printing_message_filter.h
|
||||
index ec7bda04cfac09eba3d5285770d1054c2997c170..c36d6eca8c6aa1a23d39d742c04496b4fcc56e4e 100644
|
||||
--- a/chrome/browser/printing/printing_message_filter.h
|
||||
+++ b/chrome/browser/printing/printing_message_filter.h
|
||||
@@ -22,6 +22,10 @@
|
||||
|
||||
class Profile;
|
||||
|
||||
+namespace content {
|
||||
+class BrowserContext;
|
||||
+}
|
||||
+
|
||||
namespace printing {
|
||||
|
||||
class PrintQueriesQueue;
|
||||
@@ -31,7 +35,8 @@ class PrinterQuery;
|
||||
// renderer process on the IPC thread.
|
||||
class PrintingMessageFilter : public content::BrowserMessageFilter {
|
||||
public:
|
||||
- PrintingMessageFilter(int render_process_id, Profile* profile);
|
||||
+ PrintingMessageFilter(int render_process_id,
|
||||
+ content::BrowserContext* browser_context);
|
||||
|
||||
// content::BrowserMessageFilter:
|
||||
bool OnMessageReceived(const IPC::Message& message) override;
|
||||
diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom
|
||||
index 2c19fe79d3c4286749bf5e66e3b042b7367b674e..5fe34d36c872945c3bc16b35b2844f4561368254 100644
|
||||
index cc728c5e16864ddd227fbe7b0a0bfa9a941243c3..3a1754680cb033695a56a8152a585031a1bb0177 100644
|
||||
--- a/components/printing/common/print.mojom
|
||||
+++ b/components/printing/common/print.mojom
|
||||
@@ -230,7 +230,7 @@ interface PrintPreviewUI {
|
||||
@@ -241,7 +241,7 @@ interface PrintPreviewUI {
|
||||
interface PrintRenderFrame {
|
||||
// Tells the RenderFrame to switch the CSS to print media type, render every
|
||||
// requested page, and then switch back the CSS to display media type.
|
||||
@@ -457,7 +385,7 @@ index 2c19fe79d3c4286749bf5e66e3b042b7367b674e..5fe34d36c872945c3bc16b35b2844f45
|
||||
// Tells the RenderFrame to switch the CSS to print media type, render every
|
||||
// requested page using the print preview document's frame/node, and then
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
|
||||
index 07c52050b6dd6ebd8dfa06736ec962b889f1c2b7..f78e0a255fdcf4114beb3c7e19efa899424523e9 100644
|
||||
index c744a25d3414c1f10cf5abba4379923a07188bdb..0a7fece33fcbf560263912a92907502760f78b4e 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
@@ -468,7 +396,7 @@ index 07c52050b6dd6ebd8dfa06736ec962b889f1c2b7..f78e0a255fdcf4114beb3c7e19efa899
|
||||
#include "printing/units.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_provider.h"
|
||||
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
|
||||
@@ -1174,7 +1175,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
@@ -1172,7 +1173,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
|
||||
if (!weak_this)
|
||||
return;
|
||||
|
||||
@@ -478,7 +406,7 @@ index 07c52050b6dd6ebd8dfa06736ec962b889f1c2b7..f78e0a255fdcf4114beb3c7e19efa899
|
||||
|
||||
if (weak_this)
|
||||
web_frame->DispatchAfterPrintEvent();
|
||||
@@ -1201,7 +1203,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
@@ -1199,7 +1201,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
|
||||
receivers_.Add(this, std::move(receiver));
|
||||
}
|
||||
|
||||
@@ -487,7 +415,7 @@ index 07c52050b6dd6ebd8dfa06736ec962b889f1c2b7..f78e0a255fdcf4114beb3c7e19efa899
|
||||
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
|
||||
if (ipc_nesting_level_ > 1)
|
||||
return;
|
||||
@@ -1216,7 +1218,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
@@ -1214,7 +1216,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
|
||||
// that instead.
|
||||
auto plugin = delegate_->GetPdfElement(frame);
|
||||
|
||||
@@ -496,7 +424,7 @@ index 07c52050b6dd6ebd8dfa06736ec962b889f1c2b7..f78e0a255fdcf4114beb3c7e19efa899
|
||||
|
||||
if (!render_frame_gone_)
|
||||
frame->DispatchAfterPrintEvent();
|
||||
@@ -1235,7 +1237,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
@@ -1233,7 +1235,8 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
|
||||
}
|
||||
|
||||
Print(frame, print_preview_context_.source_node(),
|
||||
@@ -506,7 +434,7 @@ index 07c52050b6dd6ebd8dfa06736ec962b889f1c2b7..f78e0a255fdcf4114beb3c7e19efa899
|
||||
if (!render_frame_gone_)
|
||||
print_preview_context_.DispatchAfterPrintEvent();
|
||||
// WARNING: |this| may be gone at this point. Do not do any more work here and
|
||||
@@ -1283,6 +1286,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
|
||||
@@ -1281,6 +1284,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
|
||||
if (ipc_nesting_level_ > 1)
|
||||
return;
|
||||
|
||||
@@ -515,7 +443,7 @@ index 07c52050b6dd6ebd8dfa06736ec962b889f1c2b7..f78e0a255fdcf4114beb3c7e19efa899
|
||||
print_preview_context_.OnPrintPreview();
|
||||
|
||||
if (print_preview_context_.IsForArc()) {
|
||||
@@ -1819,7 +1824,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -1817,7 +1822,8 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
return;
|
||||
|
||||
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
|
||||
@@ -525,7 +453,7 @@ index 07c52050b6dd6ebd8dfa06736ec962b889f1c2b7..f78e0a255fdcf4114beb3c7e19efa899
|
||||
// Check if |this| is still valid.
|
||||
if (!weak_this)
|
||||
return;
|
||||
@@ -1834,7 +1840,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
@@ -1832,7 +1838,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
|
||||
|
||||
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
const blink::WebNode& node,
|
||||
@@ -536,7 +464,7 @@ index 07c52050b6dd6ebd8dfa06736ec962b889f1c2b7..f78e0a255fdcf4114beb3c7e19efa899
|
||||
// If still not finished with earlier print request simply ignore.
|
||||
if (prep_frame_view_)
|
||||
return;
|
||||
@@ -1842,7 +1850,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -1840,7 +1848,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
FrameReference frame_ref(frame);
|
||||
|
||||
uint32_t expected_page_count = 0;
|
||||
@@ -545,17 +473,16 @@ index 07c52050b6dd6ebd8dfa06736ec962b889f1c2b7..f78e0a255fdcf4114beb3c7e19efa899
|
||||
DidFinishPrinting(FAIL_PRINT_INIT);
|
||||
return; // Failed to init print page settings.
|
||||
}
|
||||
@@ -1861,10 +1869,41 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
@@ -1859,8 +1867,41 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
|
||||
print_pages_params_->params->print_scaling_option;
|
||||
|
||||
mojom::PrintPagesParams print_settings;
|
||||
- print_settings.params = mojom::PrintParams::New();
|
||||
+
|
||||
auto self = weak_ptr_factory_.GetWeakPtr();
|
||||
- GetPrintSettingsFromUser(frame_ref.GetFrame(), node, expected_page_count,
|
||||
- print_request_type, &print_settings);
|
||||
+ if (silent)
|
||||
+ print_settings.params = mojom::PrintParams::New(
|
||||
- mojom::PrintPagesParamsPtr print_settings = GetPrintSettingsFromUser(
|
||||
+ mojom::PrintPagesParamsPtr print_settings;
|
||||
+
|
||||
+ if (silent) {
|
||||
+ print_settings = mojom::PrintPagesParams::New();
|
||||
+ print_settings->params = mojom::PrintParams::New(
|
||||
+ print_pages_params_->params->page_size,
|
||||
+ print_pages_params_->params->content_size,
|
||||
+ print_pages_params_->params->printable_area,
|
||||
@@ -582,15 +509,14 @@ index 07c52050b6dd6ebd8dfa06736ec962b889f1c2b7..f78e0a255fdcf4114beb3c7e19efa899
|
||||
+ print_pages_params_->params->printed_doc_type,
|
||||
+ print_pages_params_->params->prefer_css_page_size,
|
||||
+ print_pages_params_->params->pages_per_sheet);
|
||||
+ else {
|
||||
+ print_settings.params = mojom::PrintParams::New();
|
||||
+ GetPrintSettingsFromUser(frame_ref.GetFrame(), node, expected_page_count,
|
||||
+ print_request_type, &print_settings);
|
||||
+ } else {
|
||||
+ print_settings = GetPrintSettingsFromUser(
|
||||
frame_ref.GetFrame(), node, expected_page_count, print_request_type);
|
||||
+ }
|
||||
// Check if |this| is still valid.
|
||||
if (!self)
|
||||
return;
|
||||
@@ -2108,7 +2147,9 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
@@ -2112,7 +2153,9 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -601,7 +527,7 @@ index 07c52050b6dd6ebd8dfa06736ec962b889f1c2b7..f78e0a255fdcf4114beb3c7e19efa899
|
||||
mojom::PrintPagesParams settings;
|
||||
settings.params = mojom::PrintParams::New();
|
||||
GetPrintManagerHost()->GetDefaultPrintSettings(&settings.params);
|
||||
@@ -2132,12 +2173,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
|
||||
@@ -2136,12 +2179,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -620,8 +546,28 @@ index 07c52050b6dd6ebd8dfa06736ec962b889f1c2b7..f78e0a255fdcf4114beb3c7e19efa899
|
||||
notify_browser_of_print_failure_ = false;
|
||||
GetPrintManagerHost()->ShowInvalidPrinterSettingsError();
|
||||
return false;
|
||||
@@ -2486,18 +2531,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) {
|
||||
}
|
||||
|
||||
bool PrintRenderFrameHelper::CheckForCancel() {
|
||||
- const mojom::PrintParams& print_params = *print_pages_params_->params;
|
||||
- bool cancel = false;
|
||||
-
|
||||
- if (!GetPrintManagerHost()->CheckForCancel(print_params.preview_ui_id,
|
||||
- print_params.preview_request_id,
|
||||
- &cancel)) {
|
||||
- cancel = true;
|
||||
- }
|
||||
-
|
||||
- if (cancel)
|
||||
- notify_browser_of_print_failure_ = false;
|
||||
- return cancel;
|
||||
+ return false;
|
||||
}
|
||||
|
||||
bool PrintRenderFrameHelper::PreviewPageRendered(
|
||||
diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
|
||||
index a874a182e048adf4a6cfb0444b79420b8e0e31bf..8fc1db14a0d6d523a53ac6e47d5107fec5561aaf 100644
|
||||
index 502fa982439553adf01d9c3b517b3facecefb8b7..f90f6603216b199910132f13a7b6f6d9583bd471 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.h
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.h
|
||||
@@ -231,7 +231,7 @@ class PrintRenderFrameHelper
|
||||
|
||||
@@ -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/gtk/native_theme_gtk.cc b/ui/gtk/native_theme_gtk.cc
|
||||
index 977f166904fddc1b7c99b0e3350488e28ce07965..bfecf7bf69f0de16d772c20457ffd8c100b361dc 100644
|
||||
index 6a864ebf186ee22b5a3495562f25f473e51fece0..50c2c58fe6ce0bb3ab14f3dc80b4b2f90eedf8ac 100644
|
||||
--- a/ui/gtk/native_theme_gtk.cc
|
||||
+++ b/ui/gtk/native_theme_gtk.cc
|
||||
@@ -357,6 +357,29 @@ base::Optional<SkColor> SkColorFromColorId(
|
||||
@@ -356,6 +356,29 @@ base::Optional<SkColor> SkColorFromColorId(
|
||||
case ui::NativeTheme::kColorId_TableHeaderSeparator:
|
||||
return GetBorderColor("GtkTreeView#treeview.view GtkButton#button");
|
||||
|
||||
@@ -42,7 +42,7 @@ index 977f166904fddc1b7c99b0e3350488e28ce07965..bfecf7bf69f0de16d772c20457ffd8c1
|
||||
// TODO(thomasanderson): Render GtkSpinner directly.
|
||||
case ui::NativeTheme::kColorId_ThrobberSpinningColor:
|
||||
diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc
|
||||
index 763b98c4042146ade58543820497b63e585c71fa..da9a221635f341daac5d3bd3ca4dd401612cc840 100644
|
||||
index 2969de7777e4104618149bacb99603b3f3fb416d..c7605301808133f9a995c0ceb95c84576d2cebd1 100644
|
||||
--- a/ui/native_theme/common_theme.cc
|
||||
+++ b/ui/native_theme/common_theme.cc
|
||||
@@ -64,7 +64,8 @@ base::Optional<SkColor> GetHighContrastColor(
|
||||
@@ -115,7 +115,7 @@ index d08b6a27c0377140562b8feee14b3ae595eb336e..b3d47ac70bc91f3e1cb9931560e6fb36
|
||||
OP(kColorId_ThrobberSpinningColor), \
|
||||
OP(kColorId_ThrobberWaitingColor), \
|
||||
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
|
||||
index c45c48d9de73004ed89651920247f65fa3035aac..6bcec4c618ae2ee4e544ff0204a6349dee460707 100644
|
||||
index 4d0ed521015660da2376ebc9c50b0f4235ff112c..f4dff8de98066ea0ee4fb30ce832b27707791743 100644
|
||||
--- a/ui/native_theme/native_theme_win.cc
|
||||
+++ b/ui/native_theme/native_theme_win.cc
|
||||
@@ -652,6 +652,18 @@ base::Optional<SkColor> NativeThemeWin::GetPlatformHighContrastColor(
|
||||
|
||||
@@ -30,11 +30,11 @@ index f3875c216b5f4169a3beb9ae3aeb73c9f4df23f1..5e471024655e1b9ee224ed8ba7fc416e
|
||||
// RenderWidgetHost on the main frame, and false otherwise.
|
||||
virtual bool IsWidgetForMainFrame(RenderWidgetHostImpl*);
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
index 7a639f30914bf5cbb74449327a7e0b65e0114be6..a1664b545767888a7395b3130d932e8121a5421a 100644
|
||||
index 3122722665f1e2e4796e9628486c8bea8fdf283e..a5d58e950b91431639fb14b0e6a9bd430759bd00 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -1882,6 +1882,8 @@ void RenderWidgetHostImpl::SetCursor(const ui::Cursor& unsafe_cursor) {
|
||||
|
||||
@@ -1912,6 +1912,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
if (view_)
|
||||
view_->UpdateCursor(WebCursor(cursor));
|
||||
+ if (delegate_)
|
||||
@@ -43,10 +43,10 @@ index 7a639f30914bf5cbb74449327a7e0b65e0114be6..a1664b545767888a7395b3130d932e81
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 377e1485477bdf7ea7888f2d9101c96494792db2..f940851b87541cb245a7439f100275c6694cee0f 100644
|
||||
index bc54b385d792eaad00c13fe43e9be1536397c5d7..a2bce274bdd70c0481a1bc75d449bfadf7b91618 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4140,6 +4140,12 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -4119,6 +4119,12 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
@@ -60,10 +60,10 @@ index 377e1485477bdf7ea7888f2d9101c96494792db2..f940851b87541cb245a7439f100275c6
|
||||
RenderWidgetHostImpl* render_widget_host) {
|
||||
return render_widget_host == GetMainFrame()->GetRenderWidgetHost();
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index d0473ee191cdfb64b7e0696124db6550a362c4da..4ab9d20e13c58f379fd3a158fbb0f090acce686d 100644
|
||||
index 84ecccc204ee33820b8a059219244a841d6d642f..357ba07b83577392a902203cd7ee50e0ba3d27dd 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -939,6 +939,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -965,6 +965,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
blink::mojom::FrameVisibility visibility) override;
|
||||
void SendScreenRects() override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
|
||||
@@ -6,7 +6,7 @@ Subject: remove some deps that do not work on arm64
|
||||
Once these deps have been fixed upstream we can remove this patch.
|
||||
|
||||
diff --git a/.vpython b/.vpython
|
||||
index c249e9c4384dd89acdf741e8d3b499ef31f8d9f4..0461af26f32e4373c6987773f7920880b388a3fe 100644
|
||||
index e76e966921da472fdf713eabe25235fb5951d0fc..031725b7b0417e456df5dab514382beb3e720226 100644
|
||||
--- a/.vpython
|
||||
+++ b/.vpython
|
||||
@@ -53,10 +53,10 @@ wheel: <
|
||||
@@ -151,18 +151,3 @@ index c249e9c4384dd89acdf741e8d3b499ef31f8d9f4..0461af26f32e4373c6987773f7920880
|
||||
wheel: <
|
||||
name: "infra/python/wheels/pytz-py2_py3"
|
||||
version: "version:2018.4"
|
||||
@@ -275,10 +275,10 @@ wheel <
|
||||
name: "infra/python/wheels/funcsigs-py2_py3"
|
||||
version: "version:1.0.2"
|
||||
>
|
||||
-wheel: <
|
||||
- name: "infra/python/wheels/psutil/${vpython_platform}"
|
||||
- version: "version:5.2.2"
|
||||
->
|
||||
+#wheel: <
|
||||
+# name: "infra/python/wheels/psutil/${vpython_platform}"
|
||||
+# version: "version:5.2.2"
|
||||
+#>
|
||||
|
||||
# Used by:
|
||||
# tools/infra
|
||||
|
||||
@@ -9,10 +9,10 @@ change to move more of //chrome spellchecker logic into //components so
|
||||
that we can further separate our dependency from //chrome.
|
||||
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
index 1d426c35c539064e899b848d0ccc19306f1c4db8..2b7aa1add57dccbcbf8202cead5b7d2d5a174270 100644
|
||||
index 89edb0f8372b3606f2dd38980d5cc40d5b9d4a81..d511c9085253ebfba69ba37f41193d15638bb10f 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
@@ -71,7 +71,10 @@ void SpellcheckServiceFactory::RegisterProfilePrefs(
|
||||
@@ -76,7 +76,10 @@ void SpellcheckServiceFactory::RegisterProfilePrefs(
|
||||
|
||||
content::BrowserContext* SpellcheckServiceFactory::GetBrowserContextToUse(
|
||||
content::BrowserContext* context) const {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch
|
||||
... something to do with OSR? and maybe <webview> as well? terrifying.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
index e8c6d3e81004dafe53b0e1b19f8605dfe702d92a..dcfce013ea11c7fe8eac853b5d047eb7d78fbd66 100644
|
||||
index 7a90002e09be6f9e440d509cf437a7974b5eea64..44a06fe37b0a58a7ba5347a8ceca8aa2cbe13e31 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
|
||||
@@ -566,6 +566,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
|
||||
@@ -567,6 +567,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ index e8c6d3e81004dafe53b0e1b19f8605dfe702d92a..dcfce013ea11c7fe8eac853b5d047eb7
|
||||
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 44d3c2535fae701bd8c2eadd2c952d3e38e04513..8e0644fd7f643485c9cc89e747f61cfe8d839843 100644
|
||||
index 63c4db6df041a5861aa9af201bdc15c2b06be809..d418e0549a9d7ee28a91eddc50e9dfc17be0d365 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,10 @@
|
||||
|
||||
@@ -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 f403cf4b77fd78cd399e6806269eb2004c3c979d..7890e77888da9b43dac0b67e3dad5e2ecf4ba670 100644
|
||||
index c28309a07dd643523e4a6d52bf90a9291a521399..090c87ddaf8e0506ba23110fb3f93aef95f1df9a 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -1458,7 +1458,7 @@ if (is_chrome_branded && !is_android) {
|
||||
@@ -1417,7 +1417,7 @@ if (is_chrome_branded && !is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ index f403cf4b77fd78cd399e6806269eb2004c3c979d..7890e77888da9b43dac0b67e3dad5e2e
|
||||
chrome_paks("packed_resources") {
|
||||
if (is_mac) {
|
||||
output_dir = "$root_gen_dir/repack"
|
||||
@@ -1478,6 +1478,12 @@ if (!is_android) {
|
||||
@@ -1437,6 +1437,12 @@ if (!is_android) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -9,10 +9,10 @@ for every navigation to keep Node.js working properly. Once Native Modules in th
|
||||
are required to be NAPI or context aware (Electron v11), this patch can be removed.
|
||||
|
||||
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
|
||||
index e9c8c71a0b2e7a431f14b873a114e741a4c129fb..5db4a2f36da1761f94d7ce58483d4d6544b8daf9 100644
|
||||
index 8268205a1db1d3a1e4344640edd47745a61c0af4..01578ce536a7fad07766e60781282b87191b1296 100644
|
||||
--- a/chrome/renderer/chrome_content_renderer_client.cc
|
||||
+++ b/chrome/renderer/chrome_content_renderer_client.cc
|
||||
@@ -1275,6 +1275,25 @@ ChromeContentRendererClient::GetProtocolHandlerSecurityLevel() {
|
||||
@@ -1282,6 +1282,25 @@ ChromeContentRendererClient::GetProtocolHandlerSecurityLevel() {
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ index e9c8c71a0b2e7a431f14b873a114e741a4c129fb..5db4a2f36da1761f94d7ce58483d4d65
|
||||
WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h
|
||||
index 857b350afe980dd79e4c76ebd3cb1be461457f0a..1cac9fc1d8d92d5afe02aa1d1dba05895d4d2672 100644
|
||||
index 30718f6b057fcca8eef7516cb48720c4137c3cb4..7a1f4ad8e73cf141ac7c60a9aced2b81cbc61812 100644
|
||||
--- a/chrome/renderer/chrome_content_renderer_client.h
|
||||
+++ b/chrome/renderer/chrome_content_renderer_client.h
|
||||
@@ -122,6 +122,11 @@ class ChromeContentRendererClient
|
||||
@@ -55,10 +55,10 @@ index 857b350afe980dd79e4c76ebd3cb1be461457f0a..1cac9fc1d8d92d5afe02aa1d1dba0589
|
||||
override;
|
||||
void WillSendRequest(blink::WebLocalFrame* frame,
|
||||
diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc
|
||||
index 6aea489e574bd0a8bc882d2f2d29e4929f8ce261..2397ccf48fa54e678652b93896665f89a039a992 100644
|
||||
index 18e13633bc5f2be2830f6c10f4a46783c57720d4..e9123e07996f511e66ce23e28bcfc2f8ecedd6c5 100644
|
||||
--- a/content/public/renderer/content_renderer_client.cc
|
||||
+++ b/content/public/renderer/content_renderer_client.cc
|
||||
@@ -115,6 +115,14 @@ bool ContentRendererClient::HandleNavigation(
|
||||
@@ -117,6 +117,14 @@ bool ContentRendererClient::HandleNavigation(
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -74,7 +74,7 @@ index 6aea489e574bd0a8bc882d2f2d29e4929f8ce261..2397ccf48fa54e678652b93896665f89
|
||||
blink::WebLocalFrame* frame,
|
||||
ui::PageTransition transition_type,
|
||||
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
|
||||
index 16d0dd4456f214b14fbdf224ba938ebb1cb63106..4dc340938d54597a315ebb441d769dccb398757d 100644
|
||||
index 357df68c64071ef7dca98ce4aab885dd936b1c49..f501a2ab0bd6d4664dad13913671c4d7d5a96c1e 100644
|
||||
--- a/content/public/renderer/content_renderer_client.h
|
||||
+++ b/content/public/renderer/content_renderer_client.h
|
||||
@@ -210,6 +210,13 @@ class CONTENT_EXPORT ContentRendererClient {
|
||||
@@ -92,10 +92,10 @@ index 16d0dd4456f214b14fbdf224ba938ebb1cb63106..4dc340938d54597a315ebb441d769dcc
|
||||
// |url|. If the function returns a valid |new_url|, the request must be
|
||||
// updated to use it.
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index 536b5a72f4994bde01c6c96ffbca74499ad39a7c..0faa12629b99ea9f5079b53c16f8d6b4b39a41d7 100644
|
||||
index eb777512e2cb36c6b4ae03cd0c0d728d76bd95fc..3f9d1ba1217c43d18322e603c7958d94497c88f6 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -5502,6 +5502,23 @@ void RenderFrameImpl::BeginNavigation(
|
||||
@@ -5451,6 +5451,23 @@ void RenderFrameImpl::BeginNavigation(
|
||||
// we can do a per-frame check here rather than a process-wide check.
|
||||
bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) ||
|
||||
(enabled_bindings_ & kWebUIBindingsPolicyMask);
|
||||
|
||||
@@ -6,10 +6,10 @@ 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 a52c3c75068fcb2de9ae74f124b3b5486de29ee5..7f0c0f74b49e093e9dad4da1ed6a9778aae04b1a 100644
|
||||
index aa1fc3821b47489418129d21a26c79a31ef69cdf..5ab08aa0bcd90996c06477241fad09a93468b0b2 100644
|
||||
--- a/content/renderer/render_thread_impl.cc
|
||||
+++ b/content/renderer/render_thread_impl.cc
|
||||
@@ -1293,7 +1293,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
@@ -1291,7 +1291,7 @@ bool RenderThreadImpl::IsLcdTextEnabled() {
|
||||
}
|
||||
|
||||
bool RenderThreadImpl::IsElasticOverscrollEnabled() {
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: ssl_security_state_tab_helper.patch
|
||||
Allows populating security tab info for devtools in Electron.
|
||||
|
||||
diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc
|
||||
index 53cfff38ef810fe9274e99bde578b3b9d144d5f1..f8394ecff80098863bbd8e3816253b9644fb721c 100644
|
||||
index c11f6e1ccb92aebad9bc3c50b7cecf9306ae815a..c89ddc95ffe595ec310f316b796eeea88f5f4e2c 100644
|
||||
--- a/chrome/browser/ssl/security_state_tab_helper.cc
|
||||
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
|
||||
@@ -7,31 +7,36 @@
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "base/bind.h"
|
||||
@@ -17,9 +17,10 @@ index 53cfff38ef810fe9274e99bde578b3b9d144d5f1..f8394ecff80098863bbd8e3816253b96
|
||||
#include "base/feature_list.h"
|
||||
#include "base/metrics/field_trial_params.h"
|
||||
#include "base/metrics/histogram_macros.h"
|
||||
#include "base/strings/pattern.h"
|
||||
@@ -14,25 +15,29 @@
|
||||
#include "base/strings/string_util.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
+#if 0
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
@@ -47,16 +48,16 @@ index 53cfff38ef810fe9274e99bde578b3b9d144d5f1..f8394ecff80098863bbd8e3816253b96
|
||||
#include "components/security_state/content/content_utils.h"
|
||||
#include "content/public/browser/browser_context.h"
|
||||
#include "content/public/browser/navigation_entry.h"
|
||||
@@ -54,7 +59,7 @@
|
||||
@@ -55,7 +60,7 @@
|
||||
#include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
|
||||
#endif // defined(OS_CHROMEOS)
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
|
||||
-#if BUILDFLAG(FULL_SAFE_BROWSING)
|
||||
+#if 0
|
||||
#include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
|
||||
#endif
|
||||
|
||||
@@ -98,9 +103,12 @@ bool IsLegacyTLS(GURL url, int connection_status) {
|
||||
@@ -99,9 +104,12 @@ bool IsLegacyTLS(GURL url, int connection_status) {
|
||||
// default we treat TLS < 1.2 as Legacy, unless the "SSLVersionMin" policy is
|
||||
// set.
|
||||
std::string ssl_version_min_str = switches::kSSLVersionTLSv12;
|
||||
@@ -72,7 +73,7 @@ index 53cfff38ef810fe9274e99bde578b3b9d144d5f1..f8394ecff80098863bbd8e3816253b96
|
||||
}
|
||||
|
||||
// Convert the pref string to an SSLVersion, if it is valid. Otherwise use the
|
||||
@@ -120,8 +128,9 @@ bool IsLegacyTLS(GURL url, int connection_status) {
|
||||
@@ -121,8 +129,9 @@ bool IsLegacyTLS(GURL url, int connection_status) {
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -83,7 +84,7 @@ index 53cfff38ef810fe9274e99bde578b3b9d144d5f1..f8394ecff80098863bbd8e3816253b96
|
||||
|
||||
SecurityStateTabHelper::SecurityStateTabHelper(
|
||||
content::WebContents* web_contents)
|
||||
@@ -167,6 +176,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() {
|
||||
@@ -168,6 +177,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() {
|
||||
// information is still being initialized, thus no need to check for that.
|
||||
state->malicious_content_status = GetMaliciousContentStatus();
|
||||
|
||||
@@ -91,7 +92,7 @@ index 53cfff38ef810fe9274e99bde578b3b9d144d5f1..f8394ecff80098863bbd8e3816253b96
|
||||
ReputationWebContentsObserver* reputation_web_contents_observer =
|
||||
ReputationWebContentsObserver::FromWebContents(web_contents());
|
||||
state->safety_tip_info =
|
||||
@@ -191,6 +201,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() {
|
||||
@@ -192,6 +202,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +100,7 @@ index 53cfff38ef810fe9274e99bde578b3b9d144d5f1..f8394ecff80098863bbd8e3816253b96
|
||||
return state;
|
||||
}
|
||||
|
||||
@@ -253,8 +264,10 @@ void SecurityStateTabHelper::DidFinishNavigation(
|
||||
@@ -254,8 +265,10 @@ void SecurityStateTabHelper::DidFinishNavigation(
|
||||
UMA_HISTOGRAM_BOOLEAN("interstitial.ssl.visited_site_after_warning", true);
|
||||
}
|
||||
|
||||
@@ -110,7 +111,7 @@ index 53cfff38ef810fe9274e99bde578b3b9d144d5f1..f8394ecff80098863bbd8e3816253b96
|
||||
}
|
||||
|
||||
void SecurityStateTabHelper::DidChangeVisibleSecurityState() {
|
||||
@@ -278,6 +291,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
||||
@@ -279,6 +292,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
||||
web_contents()->GetController().GetVisibleEntry();
|
||||
if (!entry)
|
||||
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
|
||||
@@ -118,7 +119,7 @@ index 53cfff38ef810fe9274e99bde578b3b9d144d5f1..f8394ecff80098863bbd8e3816253b96
|
||||
safe_browsing::SafeBrowsingService* sb_service =
|
||||
g_browser_process->safe_browsing_service();
|
||||
if (!sb_service)
|
||||
@@ -360,6 +374,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
||||
@@ -361,6 +375,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ 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 9ce9b3e26a1a4d9c5d209f926b6d93e7e4d05074..1b4d95b6dd43bcb030bba4aa1f2454c7466c82ba 100644
|
||||
index cf96bade12b5add90e85d21dc9f3846e95c769cf..894e527847ee338e4377740d59dfeb308f286fc5 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -401,6 +401,11 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
@@ -34,7 +34,7 @@ index 9ce9b3e26a1a4d9c5d209f926b6d93e7e4d05074..1b4d95b6dd43bcb030bba4aa1f2454c7
|
||||
+ use_zygote_(use_zygote) {}
|
||||
+#endif
|
||||
+
|
||||
~RendererSandboxedProcessLauncherDelegate() override {}
|
||||
~RendererSandboxedProcessLauncherDelegate() override = default;
|
||||
|
||||
#if defined(OS_WIN)
|
||||
@@ -422,6 +427,9 @@ class RendererSandboxedProcessLauncherDelegate
|
||||
@@ -62,7 +62,7 @@ index 9ce9b3e26a1a4d9c5d209f926b6d93e7e4d05074..1b4d95b6dd43bcb030bba4aa1f2454c7
|
||||
};
|
||||
|
||||
const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey";
|
||||
@@ -1820,11 +1831,18 @@ bool RenderProcessHostImpl::Init() {
|
||||
@@ -1816,11 +1827,18 @@ bool RenderProcessHostImpl::Init() {
|
||||
cmd_line->PrependWrapper(renderer_prefix);
|
||||
AppendRendererCommandLine(cmd_line.get());
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user