mirror of
https://github.com/electron/electron.git
synced 2026-02-19 03:14:51 -05:00
Compare commits
67 Commits
robo/fix_u
...
v14.0.0-be
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc0cd83447 | ||
|
|
17c3649811 | ||
|
|
56926d9bee | ||
|
|
2f4e729f8d | ||
|
|
1789cfa5d3 | ||
|
|
5e3bdfd920 | ||
|
|
6128e25ace | ||
|
|
2fcd000f0c | ||
|
|
f1fcdbd4a0 | ||
|
|
014409f98e | ||
|
|
3b39ff300b | ||
|
|
e81d3756d5 | ||
|
|
789bfe627b | ||
|
|
f465439843 | ||
|
|
066e356ada | ||
|
|
7665ba0838 | ||
|
|
b884381311 | ||
|
|
1d0be9d6ed | ||
|
|
f4ed98c43b | ||
|
|
faf3477388 | ||
|
|
8cf7c46570 | ||
|
|
dd5dd2a426 | ||
|
|
0e673d069d | ||
|
|
d24de10707 | ||
|
|
6a429e9d04 | ||
|
|
172ac25013 | ||
|
|
e3a613d103 | ||
|
|
73696eadde | ||
|
|
bdbf78dca8 | ||
|
|
40dbeb6836 | ||
|
|
3ff100521d | ||
|
|
f1752a0b6f | ||
|
|
e67b244571 | ||
|
|
fef79701e0 | ||
|
|
c2877a342c | ||
|
|
4e610b1948 | ||
|
|
4d30e7618a | ||
|
|
7381738d85 | ||
|
|
0f2ad3e384 | ||
|
|
b8812c8942 | ||
|
|
7a11390b8a | ||
|
|
6ab2684234 | ||
|
|
80f051d859 | ||
|
|
95e7c6d53a | ||
|
|
1b4c3428a9 | ||
|
|
8edb7b456f | ||
|
|
6362736703 | ||
|
|
670ae438b9 | ||
|
|
10c6959c7f | ||
|
|
1066dce975 | ||
|
|
d584afdf5b | ||
|
|
0d69ba8ca2 | ||
|
|
c2ba3ab114 | ||
|
|
72a33e79d0 | ||
|
|
3ee0536b1d | ||
|
|
846a12056d | ||
|
|
e0f6313739 | ||
|
|
8866b312ad | ||
|
|
cb8fada7a0 | ||
|
|
b983bda721 | ||
|
|
3125ec093d | ||
|
|
a27329d9ad | ||
|
|
5362882cf6 | ||
|
|
c58446d9d7 | ||
|
|
1c2ed2ba95 | ||
|
|
1c0e496ee2 | ||
|
|
0f32b0f1ce |
@@ -1429,6 +1429,8 @@ commands:
|
||||
steps:
|
||||
- attach_workspace:
|
||||
at: .
|
||||
- *step-maybe-early-exit-doc-only-change
|
||||
- run: rm -rf src/electron
|
||||
- *step-restore-brew-cache
|
||||
- *step-install-gnutar-on-mac
|
||||
- *step-save-brew-cache
|
||||
@@ -1997,7 +1999,7 @@ jobs:
|
||||
persist: true
|
||||
checkout: false
|
||||
checkout-and-assume-cache: true
|
||||
attach: false
|
||||
attach: true
|
||||
|
||||
osx-testing-x64-gn-check:
|
||||
executor:
|
||||
@@ -2073,7 +2075,7 @@ jobs:
|
||||
persist: true
|
||||
checkout: false
|
||||
checkout-and-assume-cache: true
|
||||
attach: false
|
||||
attach: true
|
||||
|
||||
mas-testing-x64:
|
||||
executor: macos
|
||||
@@ -2089,7 +2091,7 @@ jobs:
|
||||
persist: true
|
||||
checkout: false
|
||||
checkout-and-assume-cache: true
|
||||
attach: false
|
||||
attach: true
|
||||
|
||||
mas-testing-x64-gn-check:
|
||||
executor:
|
||||
@@ -2167,7 +2169,7 @@ jobs:
|
||||
persist: true
|
||||
checkout: false
|
||||
checkout-and-assume-cache: true
|
||||
attach: false
|
||||
attach: true
|
||||
|
||||
# Layer 3: Tests.
|
||||
linux-x64-unittests:
|
||||
|
||||
8
BUILD.gn
8
BUILD.gn
@@ -1,6 +1,7 @@
|
||||
import("//build/config/locales.gni")
|
||||
import("//build/config/ui.gni")
|
||||
import("//build/config/win/manifest.gni")
|
||||
import("//components/os_crypt/features.gni")
|
||||
import("//components/spellcheck/spellcheck_build_features.gni")
|
||||
import("//content/public/app/mac_helpers.gni")
|
||||
import("//extensions/buildflags/buildflags.gni")
|
||||
@@ -296,7 +297,7 @@ templated_file("electron_version_header") {
|
||||
action("electron_fuses") {
|
||||
script = "build/fuses/build.py"
|
||||
|
||||
inputs = [ "build/fuses/fuses.json" ]
|
||||
inputs = [ "build/fuses/fuses.json5" ]
|
||||
|
||||
outputs = [
|
||||
"$target_gen_dir/fuses.h",
|
||||
@@ -335,6 +336,7 @@ source_set("electron_lib") {
|
||||
"//components/network_hints/common:mojo_bindings",
|
||||
"//components/network_hints/renderer",
|
||||
"//components/network_session_configurator/common",
|
||||
"//components/os_crypt",
|
||||
"//components/pref_registry",
|
||||
"//components/prefs",
|
||||
"//components/security_state/content",
|
||||
@@ -684,6 +686,10 @@ source_set("electron_lib") {
|
||||
]
|
||||
libs += [ "uxtheme.lib" ]
|
||||
}
|
||||
|
||||
if (allow_runtime_configurable_key_storage) {
|
||||
defines += [ "ALLOW_RUNTIME_CONFIGURABLE_KEY_STORAGE" ]
|
||||
}
|
||||
}
|
||||
|
||||
electron_paks("packed_resources") {
|
||||
|
||||
7
DEPS
7
DEPS
@@ -14,11 +14,14 @@ gclient_gn_args = [
|
||||
|
||||
vars = {
|
||||
'chromium_version':
|
||||
'92.0.4511.0',
|
||||
'93.0.4536.0',
|
||||
'node_version':
|
||||
'v14.17.0',
|
||||
'nan_version':
|
||||
'v2.14.2',
|
||||
# The following commit hash of NAN is v2.14.2 with *only* changes to the
|
||||
# test suite. This should be updated to a specific tag when one becomes
|
||||
# available.
|
||||
'65b32af46e9d7fab2e4ff657751205b3865f4920',
|
||||
'squirrel.mac_version':
|
||||
'cdc0729c8bf8576bfef18629186e1e9ecf1b0d9f',
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
14.0.0-nightly.20210524
|
||||
14.0.0-beta.7
|
||||
@@ -29,4 +29,7 @@ enable_pseudolocales = false
|
||||
|
||||
is_cfi = false
|
||||
|
||||
enable_pak_file_integrity_checks = false
|
||||
# Make application name configurable at runtime for cookie crypto
|
||||
allow_runtime_configurable_key_storage = true
|
||||
|
||||
enable_cet_shadow_stack = false
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
from collections import OrderedDict
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
@@ -49,8 +50,8 @@ const volatile char kFuseWire[] = { /* sentinel */ {sentinel}, /* fuse_version *
|
||||
}
|
||||
"""
|
||||
|
||||
with open(os.path.join(dir_path, "fuses.json"), 'r') as f:
|
||||
fuse_defaults = json.load(f)
|
||||
with open(os.path.join(dir_path, "fuses.json5"), 'r') as f:
|
||||
fuse_defaults = json.loads(''.join(line for line in f.readlines() if not line.strip()[0] == "/"), object_pairs_hook=OrderedDict)
|
||||
|
||||
fuse_version = fuse_defaults['_version']
|
||||
del fuse_defaults['_version']
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
"_comment": "Modifying the fuse schema in any breaking way should result in the _version prop being incremented. NEVER remove a fuse or change its meaning, instead mark it as removed with 'r'",
|
||||
"_schema": "0 == off, 1 == on, r == removed fuse",
|
||||
"_version": 1,
|
||||
"run_as_node": "1"
|
||||
"run_as_node": "1",
|
||||
"cookie_encryption": "0"
|
||||
}
|
||||
@@ -71,7 +71,7 @@ const request = net.request({
|
||||
|
||||
Returns:
|
||||
|
||||
* `response` IncomingMessage - An object representing the HTTP response message.
|
||||
* `response` [IncomingMessage](incoming-message.md) - An object representing the HTTP response message.
|
||||
|
||||
#### Event: 'login'
|
||||
|
||||
|
||||
@@ -85,15 +85,18 @@ const mainWindow = new BrowserWindow()
|
||||
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
|
||||
if (url === 'about:blank') {
|
||||
return {
|
||||
frame: false,
|
||||
fullscreenable: false,
|
||||
backgroundColor: 'black',
|
||||
webPreferences: {
|
||||
preload: 'my-child-window-preload-script.js'
|
||||
action: 'allow',
|
||||
overrideBrowserWindowOptions: {
|
||||
frame: false,
|
||||
fullscreenable: false,
|
||||
backgroundColor: 'black',
|
||||
webPreferences: {
|
||||
preload: 'my-child-window-preload-script.js'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
return { action: 'deny' }
|
||||
})
|
||||
```
|
||||
|
||||
|
||||
@@ -10,12 +10,12 @@ files, you need to have built Electron so that it knows which compiler flags
|
||||
were used. There is one required option for the script `--output-dir`, which
|
||||
tells the script which build directory to pull the compilation information
|
||||
from. A typical usage would be:
|
||||
`npm run lint:clang-tiy --out-dir ../out/Testing`
|
||||
`npm run lint:clang-tidy --out-dir ../out/Testing`
|
||||
|
||||
With no filenames provided, all C/C++/Objective-C files will be checked.
|
||||
You can provide a list of files to be checked by passing the filenames after
|
||||
the options:
|
||||
`npm run lint:clang-tiy --out-dir ../out/Testing shell/browser/api/electron_api_app.cc`
|
||||
`npm run lint:clang-tidy --out-dir ../out/Testing shell/browser/api/electron_api_app.cc`
|
||||
|
||||
While `clang-tidy` has a
|
||||
[long list](https://clang.llvm.org/extra/clang-tidy/checks/list.html)
|
||||
|
||||
@@ -25,7 +25,7 @@ You can run `npm run lint` to show any style issues detected by `cpplint` and
|
||||
## C++ and Python
|
||||
|
||||
For C++ and Python, we follow Chromium's [Coding
|
||||
Style](https://www.chromium.org/developers/coding-style). You can use
|
||||
Style](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/styleguide/styleguide.md). You can use
|
||||
[clang-format](clang-format.md) to format the C++ code automatically. There is
|
||||
also a script `script/cpplint.py` to check whether all files conform.
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ function createWindow () {
|
||||
})
|
||||
|
||||
ipcMain.handle('dark-mode:system', () => {
|
||||
nativeTheme.themeSouce = 'system'
|
||||
nativeTheme.themeSource = 'system'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -7,10 +7,6 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello World!</h1>
|
||||
<p>
|
||||
We are using node <script>document.write(process.versions.node)</script>,
|
||||
Chrome <script>document.write(process.versions.chrome)</script>,
|
||||
and Electron <script>document.write(process.versions.electron)</script>.
|
||||
</p>
|
||||
<p>After launching this application, you should see the system notification.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,21 +3,17 @@ const { app, BrowserWindow, Notification } = require('electron')
|
||||
function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
}
|
||||
height: 600
|
||||
})
|
||||
|
||||
win.loadFile('index.html')
|
||||
}
|
||||
|
||||
const NOTIFICATION_TITLE = 'Basic Notification'
|
||||
const NOTIFICATION_BODY = 'Notification from the Main process'
|
||||
|
||||
function showNotification () {
|
||||
const notification = {
|
||||
title: 'Basic Notification',
|
||||
body: 'Notification from the Main process'
|
||||
}
|
||||
new Notification(notification).show()
|
||||
new Notification({ title: NOTIFICATION_TITLE, body: NOTIFICATION_BODY }).show()
|
||||
}
|
||||
|
||||
app.whenReady().then(createWindow).then(showNotification)
|
||||
|
||||
@@ -7,11 +7,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello World!</h1>
|
||||
<p>
|
||||
We are using node <script>document.write(process.versions.node)</script>,
|
||||
Chrome <script>document.write(process.versions.chrome)</script>,
|
||||
and Electron <script>document.write(process.versions.electron)</script>.
|
||||
</p>
|
||||
<p>After launching this application, you should see the system notification.</p>
|
||||
<p id="output">Click it to see the effect in this interface.</p>
|
||||
|
||||
<script src="renderer.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -3,10 +3,7 @@ const { app, BrowserWindow } = require('electron')
|
||||
function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
}
|
||||
height: 600
|
||||
})
|
||||
|
||||
win.loadFile('index.html')
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
const myNotification = new Notification('Title', {
|
||||
body: 'Notification from the Renderer process'
|
||||
})
|
||||
const NOTIFICATION_TITLE = 'Title'
|
||||
const NOTIFICATION_BODY = 'Notification from the Renderer process. Click to log to console.'
|
||||
const CLICK_MESSAGE = 'Notification clicked!'
|
||||
|
||||
myNotification.onclick = () => {
|
||||
console.log('Notification clicked')
|
||||
}
|
||||
new Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY })
|
||||
.onclick = () => document.getElementById("output").innerText = CLICK_MESSAGE
|
||||
|
||||
@@ -7,10 +7,9 @@
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello World!</h1>
|
||||
<p>
|
||||
We are using node <script>document.write(process.versions.node)</script>,
|
||||
Chrome <script>document.write(process.versions.chrome)</script>,
|
||||
and Electron <script>document.write(process.versions.electron)</script>.
|
||||
</p>
|
||||
<p>Keep an eye on the dock (Mac) or taskbar (Windows, Unity) for this application!</p>
|
||||
<p>It should indicate a progress that advances from 0 to 100%.</p>
|
||||
<p>It should then show indeterminate (Windows) or pin at 100% (other operating systems)
|
||||
briefly and then loop.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,21 +1,39 @@
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
|
||||
let progressInterval
|
||||
|
||||
function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
}
|
||||
height: 600
|
||||
})
|
||||
|
||||
win.loadFile('index.html')
|
||||
win.setProgressBar(0.5)
|
||||
}
|
||||
|
||||
const INCREMENT = 0.03
|
||||
const INTERVAL_DELAY = 100 // ms
|
||||
|
||||
let c = 0
|
||||
progressInterval = setInterval(() => {
|
||||
// update progress bar to next value
|
||||
// values between 0 and 1 will show progress, >1 will show indeterminate or stick at 100%
|
||||
win.setProgressBar(c)
|
||||
|
||||
// increment or reset progress bar
|
||||
if (c < 2) {
|
||||
c += INCREMENT
|
||||
} else {
|
||||
c = (-INCREMENT * 5) // reset to a bit less than 0 to show reset state
|
||||
}
|
||||
}, INTERVAL_DELAY)
|
||||
}
|
||||
|
||||
app.whenReady().then(createWindow)
|
||||
|
||||
// before the app is terminated, clear both timers
|
||||
app.on('before-quit', () => {
|
||||
clearInterval(progressInterval)
|
||||
})
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
|
||||
@@ -2,15 +2,14 @@
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Hello World!</title>
|
||||
<title>Recent Documents</title>
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello World!</h1>
|
||||
<h1>Recent Documents</h1>
|
||||
<p>
|
||||
We are using node <script>document.write(process.versions.node)</script>,
|
||||
Chrome <script>document.write(process.versions.chrome)</script>,
|
||||
and Electron <script>document.write(process.versions.electron)</script>.
|
||||
Right click on the app icon to see recent documents.
|
||||
You should see `recently-used.md` added to the list of recent files
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -5,17 +5,15 @@ const path = require('path')
|
||||
function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
}
|
||||
height: 600
|
||||
})
|
||||
|
||||
win.loadFile('index.html')
|
||||
}
|
||||
|
||||
const fileName = 'recently-used.md'
|
||||
fs.writeFile(fileName, 'Lorem Ipsum', () => {
|
||||
app.addRecentDocument(path.join(process.cwd(), `${fileName}`))
|
||||
app.addRecentDocument(path.join(__dirname, fileName))
|
||||
})
|
||||
|
||||
app.whenReady().then(createWindow)
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
<meta charset="UTF-8">
|
||||
<title>Hello World!</title>
|
||||
<meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsafe-inline';" />
|
||||
<link rel="stylesheet" type="text/css" href="./styles.css">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Hello World!</h1>
|
||||
<p>
|
||||
We are using node <script>document.write(process.versions.node)</script>,
|
||||
Chrome <script>document.write(process.versions.chrome)</script>,
|
||||
and Electron <script>document.write(process.versions.electron)</script>.
|
||||
Click on the title with the <pre>Command</pre> or <pre>Control</pre> key pressed.
|
||||
You should see a popup with the represented file at the top.
|
||||
</p>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -4,10 +4,7 @@ const os = require('os');
|
||||
function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
webPreferences: {
|
||||
nodeIntegration: true
|
||||
}
|
||||
height: 600
|
||||
})
|
||||
|
||||
win.loadFile('index.html')
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 37 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 32 KiB |
0
docs/images/versioning-sketch-2.png
Executable file → Normal file
0
docs/images/versioning-sketch-2.png
Executable file → Normal file
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
@@ -159,7 +159,7 @@ function createWindow () {
|
||||
})
|
||||
|
||||
ipcMain.handle('dark-mode:system', () => {
|
||||
nativeTheme.themeSouce = 'system'
|
||||
nativeTheme.themeSource = 'system'
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -51,4 +51,4 @@ Somewhere in the Electron binary there will be a sequence of bytes that look lik
|
||||
|
||||
To flip a fuse you find its position in the fuse wire and change it to "0" or "1" depending on the state you'd like.
|
||||
|
||||
You can view the current schema [here](https://github.com/electron/electron/blob/master/build/fuses/fuses.json).
|
||||
You can view the current schema [here](https://github.com/electron/electron/blob/master/build/fuses/fuses.json5).
|
||||
|
||||
@@ -49,11 +49,11 @@ is a great place to get advice from other Electron app developers.
|
||||
the [GitHub issue tracker][issue-tracker] to see if any existing issues match your
|
||||
problem. If not, feel free to fill out our bug report template and submit a new issue.
|
||||
|
||||
[chromium](https://www.chromium.org/)
|
||||
[node](https://nodejs.org/)
|
||||
[mdn-guide](https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web)
|
||||
[node-guide](https://nodejs.dev/learn)
|
||||
[comic](https://www.google.com/googlebooks/chrome/)
|
||||
[fiddle](https://electronjs.org/fiddle)
|
||||
[issue-tracker](https://github.com/electron/electron/issues)
|
||||
[discord](https://discord.gg/electron)
|
||||
[chromium]: https://www.chromium.org/
|
||||
[node]: https://nodejs.org/
|
||||
[mdn-guide]: https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web
|
||||
[node-guide]: https://nodejs.dev/learn
|
||||
[comic]: https://www.google.com/googlebooks/chrome/
|
||||
[fiddle]: https://electronjs.org/fiddle
|
||||
[issue-tracker]: https://github.com/electron/electron/issues
|
||||
[discord]: https://discord.gg/electron
|
||||
|
||||
@@ -18,7 +18,7 @@ To show notifications in the Main process, you need to use the
|
||||
|
||||
### Show notifications in the Renderer process
|
||||
|
||||
Assuming you have a working Electron application from the
|
||||
Starting with a working application from the
|
||||
[Quick Start Guide](quick-start.md), add the following line to the
|
||||
`index.html` file before the closing `</body>` tag:
|
||||
|
||||
@@ -26,26 +26,22 @@ Assuming you have a working Electron application from the
|
||||
<script src="renderer.js"></script>
|
||||
```
|
||||
|
||||
and add the `renderer.js` file:
|
||||
...and add the `renderer.js` file:
|
||||
|
||||
```javascript fiddle='docs/fiddles/features/notifications/renderer'
|
||||
const myNotification = new Notification('Title', {
|
||||
body: 'Notification from the Renderer process'
|
||||
})
|
||||
const NOTIFICATION_TITLE = 'Title'
|
||||
const NOTIFICATION_BODY = 'Notification from the Renderer process. Click to log to console.'
|
||||
const CLICK_MESSAGE = 'Notification clicked'
|
||||
|
||||
myNotification.onclick = () => {
|
||||
console.log('Notification clicked')
|
||||
}
|
||||
new Notification(NOTIFICATION_TITLE, { body: NOTIFICATION_BODY })
|
||||
.onclick = () => console.log(CLICK_MESSAGE)
|
||||
```
|
||||
|
||||
After launching the Electron application, you should see the notification:
|
||||
|
||||

|
||||
|
||||
If you open the Console and then click the notification, you will see the
|
||||
message that was generated after triggering the `onclick` event:
|
||||
|
||||

|
||||
Additionally, if you click on the notification, the DOM will update to show "Notification clicked!".
|
||||
|
||||
### Show notifications in the Main process
|
||||
|
||||
@@ -55,18 +51,17 @@ Starting with a working application from the
|
||||
```javascript fiddle='docs/fiddles/features/notifications/main'
|
||||
const { Notification } = require('electron')
|
||||
|
||||
const NOTIFICATION_TITLE = 'Basic Notification'
|
||||
const NOTIFICATION_BODY = 'Notification from the Main process'
|
||||
|
||||
function showNotification () {
|
||||
const notification = {
|
||||
title: 'Basic Notification',
|
||||
body: 'Notification from the Main process'
|
||||
}
|
||||
new Notification(notification).show()
|
||||
new Notification({ title: NOTIFICATION_TITLE, body: NOTIFICATION_BODY }).show()
|
||||
}
|
||||
|
||||
app.whenReady().then(createWindow).then(showNotification)
|
||||
```
|
||||
|
||||
After launching the Electron application, you should see the notification:
|
||||
After launching the Electron application, you should see the system notification:
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -120,9 +120,9 @@ file in the directory you executed it in. Both files can be analyzed using
|
||||
the Chrome Developer Tools, using the `Performance` and `Memory` tabs
|
||||
respectively.
|
||||
|
||||
![performance-cpu-prof]
|
||||
![Performance CPU Profile][performance-cpu-prof]
|
||||
|
||||
![performance-heap-prof]
|
||||
![Performance Heap Memory Profile][performance-heap-prof]
|
||||
|
||||
In this example, on the author's machine, we saw that loading `request` took
|
||||
almost half a second, whereas `node-fetch` took dramatically less memory
|
||||
|
||||
@@ -138,7 +138,7 @@ way to import Electron's content scripts.
|
||||
<!-- Note: This guide doesn't take sandboxing into account, which might fundamentally
|
||||
change the statements here. -->
|
||||
Preload scripts contain code that executes in a renderer process before its web content
|
||||
begins loading. These scripts runs within the renderer context, but are granted more
|
||||
begins loading. These scripts run within the renderer context, but are granted more
|
||||
privileges by having access to Node.js APIs.
|
||||
|
||||
A preload script can be attached to the main process in the `BrowserWindow` constructor's
|
||||
|
||||
@@ -31,30 +31,70 @@ currently at 63% towards completion, you would call it as
|
||||
`setProgressBar(0.63)`.
|
||||
|
||||
Setting the parameter to negative values (e.g. `-1`) will remove the progress
|
||||
bar, whereas setting it to values greater than `1` (e.g. `2`) will switch the
|
||||
progress bar to indeterminate mode (Windows-only -- it will clamp to 100%
|
||||
otherwise). In this mode, a progress bar remains active but does not show an
|
||||
actual percentage. Use this mode for situations when you do not know how long
|
||||
an operation will take to complete.
|
||||
bar. Setting it to a value greater than `1` will indicate an indeterminate progress bar
|
||||
in Windows or clamp to 100% in other operating systems. An indeterminate progress bar
|
||||
remains active but does not show an actual percentage, and is used for situations when
|
||||
you do not know how long an operation will take to complete.
|
||||
|
||||
See the [API documentation for more options and modes][setprogressbar].
|
||||
|
||||
## Example
|
||||
|
||||
Starting with a working application from the
|
||||
[Quick Start Guide](quick-start.md), add the following lines to the
|
||||
`main.js` file:
|
||||
In this example, we add a progress bar to the main window that increments over time
|
||||
using Node.js timers.
|
||||
|
||||
```javascript fiddle='docs/fiddles/features/progress-bar'
|
||||
const { BrowserWindow } = require('electron')
|
||||
const win = new BrowserWindow()
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
|
||||
win.setProgressBar(0.5)
|
||||
let progressInterval
|
||||
|
||||
function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600
|
||||
})
|
||||
|
||||
win.loadFile('index.html')
|
||||
|
||||
const INCREMENT = 0.03
|
||||
const INTERVAL_DELAY = 100 // ms
|
||||
|
||||
let c = 0
|
||||
progressInterval = setInterval(() => {
|
||||
// update progress bar to next value
|
||||
// values between 0 and 1 will show progress, >1 will show indeterminate or stick at 100%
|
||||
win.setProgressBar(c)
|
||||
|
||||
// increment or reset progress bar
|
||||
if (c < 2) c += INCREMENT
|
||||
else c = 0
|
||||
}, INTERVAL_DELAY)
|
||||
}
|
||||
|
||||
app.whenReady().then(createWindow)
|
||||
|
||||
// before the app is terminated, clear both timers
|
||||
app.on('before-quit', () => {
|
||||
clearInterval(progressInterval)
|
||||
})
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
|
||||
app.on('activate', () => {
|
||||
if (BrowserWindow.getAllWindows().length === 0) {
|
||||
createWindow()
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
After launching the Electron application, you should see the bar in
|
||||
the dock (macOS) or taskbar (Windows, Unity), indicating the progress
|
||||
percentage you just defined.
|
||||
After launching the Electron application, the dock (macOS) or taskbar (Windows, Unity)
|
||||
should show a progress bar that starts at zero and progresses through 100% to completion.
|
||||
It should then show indeterminate (Windows) or pin to 100% (other operating systems)
|
||||
briefly and then loop.
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -299,7 +299,9 @@ function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600,
|
||||
preload: path.join(__dirname, 'preload.js')
|
||||
webPreferences: {
|
||||
preload: path.join(__dirname, 'preload.js')
|
||||
}
|
||||
})
|
||||
|
||||
win.loadFile('index.html')
|
||||
@@ -440,7 +442,7 @@ window.addEventListener('DOMContentLoaded', () => {
|
||||
</html>
|
||||
```
|
||||
|
||||
```fiddle docs/fiddles/quickstart
|
||||
```fiddle docs/fiddles/quick-start
|
||||
```
|
||||
|
||||
To summarize all the steps we've done:
|
||||
|
||||
@@ -13,39 +13,62 @@ __Application dock menu:__
|
||||
|
||||
![macOS Dock Menu][dock-menu-image]
|
||||
|
||||
To add a file to recent documents, you need to use the
|
||||
[app.addRecentDocument][addrecentdocument] API.
|
||||
|
||||
## Example
|
||||
|
||||
### Add an item to recent documents
|
||||
|
||||
Starting with a working application from the
|
||||
[Quick Start Guide](quick-start.md), add the following lines to the
|
||||
`main.js` file:
|
||||
### Managing recent documents
|
||||
|
||||
```javascript fiddle='docs/fiddles/features/recent-documents'
|
||||
const { app } = require('electron')
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
app.addRecentDocument('/Users/USERNAME/Desktop/work.type')
|
||||
function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600
|
||||
})
|
||||
|
||||
win.loadFile('index.html')
|
||||
}
|
||||
|
||||
const fileName = 'recently-used.md'
|
||||
fs.writeFile(fileName, 'Lorem Ipsum', () => {
|
||||
app.addRecentDocument(path.join(__dirname, fileName))
|
||||
})
|
||||
|
||||
app.whenReady().then(createWindow)
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
app.clearRecentDocuments()
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
|
||||
app.on('activate', () => {
|
||||
if (BrowserWindow.getAllWindows().length === 0) {
|
||||
createWindow()
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
#### Adding a recent document
|
||||
|
||||
To add a file to recent documents, use the
|
||||
[app.addRecentDocument][addrecentdocument] API.
|
||||
|
||||
After launching the Electron application, right click the application icon.
|
||||
You should see the item you just added. In this guide, the item is a Markdown
|
||||
file located in the root of the project:
|
||||
In this guide, the item is a Markdown file located in the root of the project.
|
||||
You should see `recently-used.md` added to the list of recent files:
|
||||
|
||||

|
||||
|
||||
### Clear the list of recent documents
|
||||
#### Clearing the list of recent documents
|
||||
|
||||
To clear the list of recent documents, you need to use
|
||||
[app.clearRecentDocuments][clearrecentdocuments] API in the `main.js` file:
|
||||
|
||||
```javascript
|
||||
const { app } = require('electron')
|
||||
|
||||
app.clearRecentDocuments()
|
||||
```
|
||||
To clear the list of recent documents, use the
|
||||
[app.clearRecentDocuments][clearrecentdocuments] API.
|
||||
In this guide, the list of documents is cleared once all windows have been
|
||||
closed.
|
||||
|
||||
## Additional information
|
||||
|
||||
|
||||
@@ -20,23 +20,40 @@ To set the represented file of window, you can use the
|
||||
|
||||
## Example
|
||||
|
||||
Starting with a working application from the
|
||||
[Quick Start Guide](quick-start.md), add the following lines to the
|
||||
`main.js` file:
|
||||
|
||||
```javascript fiddle='docs/fiddles/features/represented-file'
|
||||
const { app, BrowserWindow } = require('electron')
|
||||
const os = require('os');
|
||||
|
||||
function createWindow () {
|
||||
const win = new BrowserWindow({
|
||||
width: 800,
|
||||
height: 600
|
||||
})
|
||||
}
|
||||
|
||||
app.whenReady().then(() => {
|
||||
const win = new BrowserWindow()
|
||||
|
||||
win.setRepresentedFilename('/etc/passwd')
|
||||
win.setRepresentedFilename(os.homedir())
|
||||
win.setDocumentEdited(true)
|
||||
})
|
||||
|
||||
app.on('window-all-closed', () => {
|
||||
if (process.platform !== 'darwin') {
|
||||
app.quit()
|
||||
}
|
||||
})
|
||||
|
||||
app.on('activate', () => {
|
||||
if (BrowserWindow.getAllWindows().length === 0) {
|
||||
createWindow()
|
||||
}
|
||||
})
|
||||
```
|
||||
|
||||
After launching the Electron application, click on the title with `Command` or
|
||||
`Control` key pressed. You should see a popup with the file you just defined:
|
||||
`Control` key pressed. You should see a popup with the represented file at the top.
|
||||
In this guide, this is the current user's home directory:
|
||||
|
||||

|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ you can interact with the community in these locations:
|
||||
* Sharing ideas with other Electron app developers
|
||||
* And more!
|
||||
* [`electron`](https://discuss.atom.io/c/electron) category on the Atom forums
|
||||
* `#atom-shell` channel on Freenode
|
||||
* `#electron` channel on [Atom's Slack](https://discuss.atom.io/t/join-us-on-slack/16638?source_topic_id=25406)
|
||||
* [`electron-ru`](https://telegram.me/electron_ru) *(Russian)*
|
||||
* [`electron-br`](https://electron-br.slack.com) *(Brazilian Portuguese)*
|
||||
|
||||
@@ -490,63 +490,83 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
|
||||
}
|
||||
};
|
||||
|
||||
function fsReadFileAsar (pathArgument: string, options: any, callback: any) {
|
||||
const pathInfo = splitPath(pathArgument);
|
||||
if (pathInfo.isAsar) {
|
||||
const { asarPath, filePath } = pathInfo;
|
||||
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = { encoding: null };
|
||||
} else if (typeof options === 'string') {
|
||||
options = { encoding: options };
|
||||
} else if (options === null || options === undefined) {
|
||||
options = { encoding: null };
|
||||
} else if (typeof options !== 'object') {
|
||||
throw new TypeError('Bad arguments');
|
||||
}
|
||||
|
||||
const { encoding } = options;
|
||||
const archive = getOrCreateArchive(asarPath);
|
||||
if (!archive) {
|
||||
const error = createError(AsarError.INVALID_ARCHIVE, { asarPath });
|
||||
nextTick(callback, [error]);
|
||||
return;
|
||||
}
|
||||
|
||||
const info = archive.getFileInfo(filePath);
|
||||
if (!info) {
|
||||
const error = createError(AsarError.NOT_FOUND, { asarPath, filePath });
|
||||
nextTick(callback, [error]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.size === 0) {
|
||||
nextTick(callback, [null, encoding ? '' : Buffer.alloc(0)]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.unpacked) {
|
||||
const realPath = archive.copyFileOut(filePath);
|
||||
return fs.readFile(realPath, options, callback);
|
||||
}
|
||||
|
||||
const buffer = Buffer.alloc(info.size);
|
||||
const fd = archive.getFd();
|
||||
if (!(fd >= 0)) {
|
||||
const error = createError(AsarError.NOT_FOUND, { asarPath, filePath });
|
||||
nextTick(callback, [error]);
|
||||
return;
|
||||
}
|
||||
|
||||
logASARAccess(asarPath, filePath, info.offset);
|
||||
fs.read(fd, buffer, 0, info.size, info.offset, (error: Error) => {
|
||||
callback(error, encoding ? buffer.toString(encoding) : buffer);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const { readFile } = fs;
|
||||
fs.readFile = function (pathArgument: string, options: any, callback: any) {
|
||||
const pathInfo = splitPath(pathArgument);
|
||||
if (!pathInfo.isAsar) return readFile.apply(this, arguments);
|
||||
const { asarPath, filePath } = pathInfo;
|
||||
|
||||
if (typeof options === 'function') {
|
||||
callback = options;
|
||||
options = { encoding: null };
|
||||
} else if (typeof options === 'string') {
|
||||
options = { encoding: options };
|
||||
} else if (options === null || options === undefined) {
|
||||
options = { encoding: null };
|
||||
} else if (typeof options !== 'object') {
|
||||
throw new TypeError('Bad arguments');
|
||||
if (!pathInfo.isAsar) {
|
||||
return readFile.apply(this, arguments);
|
||||
}
|
||||
|
||||
const { encoding } = options;
|
||||
const archive = getOrCreateArchive(asarPath);
|
||||
if (!archive) {
|
||||
const error = createError(AsarError.INVALID_ARCHIVE, { asarPath });
|
||||
nextTick(callback, [error]);
|
||||
return;
|
||||
}
|
||||
|
||||
const info = archive.getFileInfo(filePath);
|
||||
if (!info) {
|
||||
const error = createError(AsarError.NOT_FOUND, { asarPath, filePath });
|
||||
nextTick(callback, [error]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.size === 0) {
|
||||
nextTick(callback, [null, encoding ? '' : Buffer.alloc(0)]);
|
||||
return;
|
||||
}
|
||||
|
||||
if (info.unpacked) {
|
||||
const realPath = archive.copyFileOut(filePath);
|
||||
return fs.readFile(realPath, options, callback);
|
||||
}
|
||||
|
||||
const buffer = Buffer.alloc(info.size);
|
||||
const fd = archive.getFd();
|
||||
if (!(fd >= 0)) {
|
||||
const error = createError(AsarError.NOT_FOUND, { asarPath, filePath });
|
||||
nextTick(callback, [error]);
|
||||
return;
|
||||
}
|
||||
|
||||
logASARAccess(asarPath, filePath, info.offset);
|
||||
fs.read(fd, buffer, 0, info.size, info.offset, (error: Error) => {
|
||||
callback(error, encoding ? buffer.toString(encoding) : buffer);
|
||||
});
|
||||
return fsReadFileAsar(pathArgument, options, callback);
|
||||
};
|
||||
|
||||
fs.promises.readFile = util.promisify(fs.readFile);
|
||||
const { readFile: readFilePromise } = fs.promises;
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
fs.promises.readFile = function (pathArgument: string, options: any) {
|
||||
const pathInfo = splitPath(pathArgument);
|
||||
if (!pathInfo.isAsar) {
|
||||
return readFilePromise.apply(this, arguments);
|
||||
}
|
||||
|
||||
const p = util.promisify(fsReadFileAsar);
|
||||
return p(pathArgument, options);
|
||||
};
|
||||
|
||||
const { readFileSync } = fs;
|
||||
fs.readFileSync = function (pathArgument: string, options: any) {
|
||||
|
||||
@@ -54,7 +54,7 @@ const isChromeDevTools = function (pageURL: string) {
|
||||
};
|
||||
|
||||
const assertChromeDevTools = function (contents: Electron.WebContents, api: string) {
|
||||
const pageURL = contents._getURL();
|
||||
const pageURL = contents.getURL();
|
||||
if (!isChromeDevTools(pageURL)) {
|
||||
console.error(`Blocked ${pageURL} from calling ${api}`);
|
||||
throw new Error(`Blocked ${api}`);
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "electron",
|
||||
"version": "14.0.0-nightly.20210524",
|
||||
"version": "14.0.0-beta.7",
|
||||
"repository": "https://github.com/electron/electron",
|
||||
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
|
||||
"devDependencies": {
|
||||
|
||||
@@ -3,7 +3,6 @@ dcheck.patch
|
||||
accelerator.patch
|
||||
blink_file_path.patch
|
||||
blink_local_frame.patch
|
||||
blink_world_context.patch
|
||||
can_create_window.patch
|
||||
disable_hidden.patch
|
||||
dom_storage_limits.patch
|
||||
@@ -16,7 +15,6 @@ enable_reset_aspect_ratio.patch
|
||||
v8_context_snapshot_generator.patch
|
||||
boringssl_build_gn.patch
|
||||
pepper_plugin_support.patch
|
||||
no_cache_storage_check.patch
|
||||
gtk_visibility.patch
|
||||
sysroot.patch
|
||||
resource_file_conflict.patch
|
||||
@@ -49,7 +47,6 @@ build_add_electron_tracing_category.patch
|
||||
worker_context_will_destroy.patch
|
||||
frame_host_manager.patch
|
||||
crashpad_pid_check.patch
|
||||
preconnect_feature.patch
|
||||
network_service_allow_remote_certificate_verification_logic.patch
|
||||
put_back_deleted_colors_for_autofill.patch
|
||||
disable_color_correct_rendering.patch
|
||||
@@ -83,7 +80,6 @@ crash_allow_disabling_compression_on_linux.patch
|
||||
allow_setting_secondary_label_via_simplemenumodel.patch
|
||||
feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch
|
||||
fix_patch_out_profile_refs_in_accessibility_ui.patch
|
||||
fix_check_issecureeventinputenabled_in_constructor_before_setting.patch
|
||||
skip_atk_toolchain_check.patch
|
||||
worker_feat_add_hook_to_notify_script_ready.patch
|
||||
chore_provide_iswebcontentscreationoverridden_with_full_params.patch
|
||||
@@ -99,6 +95,7 @@ fix_add_check_for_sandbox_then_result.patch
|
||||
extend_apply_webpreferences.patch
|
||||
fix_expose_decrementcapturercount_in_web_contents_impl.patch
|
||||
add_setter_for_browsermainloop_result_code.patch
|
||||
chore_allow_overriding_of_enable_pak_file_integrity_checks.patch
|
||||
make_include_of_stack_trace_h_unconditional.patch
|
||||
build_libc_as_static_library.patch
|
||||
build_do_not_depend_on_packed_resource_integrity.patch
|
||||
build_read_idl_files_as_utf8_to_fix_python3_character_encodding.patch
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cheng Zhao <zcbenz@gmail.com>
|
||||
Date: Thu, 4 Oct 2018 14:57:02 -0700
|
||||
Subject: accelerator.patch
|
||||
Subject: fix: improve shortcut text of Accelerator
|
||||
|
||||
This patch makes three changes to Accelerator::GetShortcutText to improve shortcut display text in menus:
|
||||
|
||||
1. Ctrl-Alt-<Key> accelerators show as Ctrl-Alt-<Key> instead of as Ctrl-<Key>
|
||||
2. F2-F24 accelerators show up as such
|
||||
3. Ctrl-Shift-= should show as Ctrl-+
|
||||
3. Ctrl-Shift-= and Ctrl-Plus show up as such
|
||||
|
||||
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
|
||||
index d6913b15149f773cad28b5e2278b0f80df3d2896..15f944c4bb2fde7241b643f6a979a81ebce844b1 100644
|
||||
index d6913b15149f773cad28b5e2278b0f80df3d2896..25342f62acdc28806a0e6ae0bd129c59083ccf06 100644
|
||||
--- a/ui/base/accelerators/accelerator.cc
|
||||
+++ b/ui/base/accelerators/accelerator.cc
|
||||
@@ -11,6 +11,7 @@
|
||||
@@ -21,61 +21,39 @@ index d6913b15149f773cad28b5e2278b0f80df3d2896..15f944c4bb2fde7241b643f6a979a81e
|
||||
#include "base/strings/utf_string_conversions.h"
|
||||
#include "build/build_config.h"
|
||||
#include "build/chromeos_buildflags.h"
|
||||
@@ -27,9 +28,7 @@
|
||||
#include <windows.h>
|
||||
@@ -234,6 +235,11 @@ std::u16string Accelerator::GetShortcutText() const {
|
||||
#endif
|
||||
|
||||
-#if !defined(OS_WIN) && (defined(USE_AURA) || defined(OS_MAC))
|
||||
#include "ui/events/keycodes/keyboard_code_conversion.h"
|
||||
-#endif
|
||||
|
||||
#if defined(OS_CHROMEOS)
|
||||
#include "ui/base/ui_base_features.h"
|
||||
@@ -233,7 +232,15 @@ std::u16string Accelerator::GetShortcutText() const {
|
||||
shortcut = KeyCodeToName();
|
||||
#endif
|
||||
|
||||
+ unsigned int flags = 0;
|
||||
if (shortcut.empty()) {
|
||||
+ const uint16_t c = DomCodeToUsLayoutCharacter(
|
||||
+ UsLayoutKeyboardCodeToDomCode(key_code_), flags);
|
||||
+ if (c != 0) {
|
||||
+ shortcut =
|
||||
+ static_cast<std::u16string::value_type>(
|
||||
+ base::ToUpperASCII(static_cast<char16_t>(c)));
|
||||
+ }
|
||||
+ // When a shifted char is explicitly specified, for example Ctrl+Plus,
|
||||
+ // use the shifted char directly.
|
||||
+ if (shifted_char) {
|
||||
+ shortcut += *shifted_char;
|
||||
+ } else {
|
||||
#if defined(OS_WIN)
|
||||
// Our fallback is to try translate the key code to a regular character
|
||||
// unless it is one of digits (VK_0 to VK_9). Some keyboard
|
||||
@@ -242,21 +249,14 @@ std::u16string Accelerator::GetShortcutText() const {
|
||||
// accent' for '0'). For display in the menu (e.g. Ctrl-0 for the
|
||||
// default zoom level), we leave VK_[0-9] alone without translation.
|
||||
wchar_t key;
|
||||
- if (base::IsAsciiDigit(key_code_))
|
||||
+ if (base::IsAsciiDigit(key_code_)) {
|
||||
key = static_cast<wchar_t>(key_code_);
|
||||
- else
|
||||
- key = LOWORD(::MapVirtualKeyW(key_code_, MAPVK_VK_TO_CHAR));
|
||||
- // If there is no translation for the given |key_code_| (e.g.
|
||||
- // VKEY_UNKNOWN), |::MapVirtualKeyW| returns 0.
|
||||
- if (key != 0)
|
||||
- shortcut += key;
|
||||
-#elif defined(USE_AURA) || defined(OS_MAC) || defined(OS_ANDROID)
|
||||
- const uint16_t c = DomCodeToUsLayoutCharacter(
|
||||
- UsLayoutKeyboardCodeToDomCode(key_code_), false);
|
||||
- if (c != 0)
|
||||
- shortcut +=
|
||||
- static_cast<std::u16string::value_type>(base::ToUpperASCII(c));
|
||||
+ shortcut = key;
|
||||
+ }
|
||||
@@ -257,6 +263,10 @@ std::u16string Accelerator::GetShortcutText() const {
|
||||
shortcut +=
|
||||
static_cast<std::u16string::value_type>(base::ToUpperASCII(c));
|
||||
#endif
|
||||
+ }
|
||||
+ if (key_code_ > VKEY_F1 && key_code_ <= VKEY_F24)
|
||||
+ shortcut = base::UTF8ToUTF16(
|
||||
+ base::StringPrintf("F%d", key_code_ - VKEY_F1 + 1));
|
||||
}
|
||||
|
||||
#if defined(OS_MAC)
|
||||
@@ -452,7 +452,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
|
||||
@@ -444,7 +454,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
|
||||
const std::u16string& shortcut) const {
|
||||
std::u16string result = shortcut;
|
||||
|
||||
- if (IsShiftDown())
|
||||
+ if (!shifted_char && IsShiftDown())
|
||||
result = ApplyModifierToAcceleratorString(result, IDS_APP_SHIFT_KEY);
|
||||
|
||||
// Note that we use 'else-if' in order to avoid using Ctrl+Alt as a shortcut.
|
||||
@@ -452,7 +462,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
|
||||
// more information.
|
||||
if (IsCtrlDown())
|
||||
result = ApplyModifierToAcceleratorString(result, IDS_APP_CTRL_KEY);
|
||||
@@ -84,3 +62,24 @@ index d6913b15149f773cad28b5e2278b0f80df3d2896..15f944c4bb2fde7241b643f6a979a81e
|
||||
result = ApplyModifierToAcceleratorString(result, IDS_APP_ALT_KEY);
|
||||
|
||||
if (IsCmdDown()) {
|
||||
diff --git a/ui/base/accelerators/accelerator.h b/ui/base/accelerators/accelerator.h
|
||||
index 780a45f9ca2dd60e0deac27cc6e8f69e72cd8435..b1b46f18e9c600820fdd2d26631eac38da672811 100644
|
||||
--- a/ui/base/accelerators/accelerator.h
|
||||
+++ b/ui/base/accelerators/accelerator.h
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <utility>
|
||||
|
||||
#include "base/component_export.h"
|
||||
+#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
#include "base/time/time.h"
|
||||
#include "build/build_config.h"
|
||||
#include "ui/events/event_constants.h"
|
||||
@@ -129,6 +130,8 @@ class COMPONENT_EXPORT(UI_BASE) Accelerator {
|
||||
return interrupted_by_mouse_event_;
|
||||
}
|
||||
|
||||
+ absl::optional<char16_t> shifted_char;
|
||||
+
|
||||
private:
|
||||
std::u16string ApplyLongFormModifiers(const std::u16string& shortcut) const;
|
||||
std::u16string ApplyShortFormModifiers(const std::u16string& shortcut) const;
|
||||
|
||||
@@ -10,7 +10,7 @@ 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 107c22e38babc4860d53d4fb539f322e6dec1df0..366382caddffc3beb363fe96eab63ea7474f81d1 100644
|
||||
index 3d985164eee3d7d8ef9e7ff2215ec9a17ec157a5..9c1c4fd8528fbb088f1836c8503c5875727f5d62 100644
|
||||
--- a/content/public/renderer/render_frame_observer.h
|
||||
+++ b/content/public/renderer/render_frame_observer.h
|
||||
@@ -127,6 +127,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
|
||||
@@ -23,10 +23,10 @@ index 107c22e38babc4860d53d4fb539f322e6dec1df0..366382caddffc3beb363fe96eab63ea7
|
||||
int32_t world_id) {}
|
||||
virtual void DidClearWindowObject() {}
|
||||
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
|
||||
index e0c8e8c19450b067757a8e8289f46f32b7d443eb..0f13101c719e6f43cfc5d281d0f6f345d475744d 100644
|
||||
index d2a0ef47f32fd0eed6854d4d3c6c6c02a37c3e88..768301dae0e1c8ad0bc8e3f1762670fb636c36d4 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -4135,6 +4135,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
@@ -4263,6 +4263,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
|
||||
observer.DidCreateScriptContext(context, world_id);
|
||||
}
|
||||
|
||||
@@ -40,10 +40,10 @@ index e0c8e8c19450b067757a8e8289f46f32b7d443eb..0f13101c719e6f43cfc5d281d0f6f345
|
||||
int world_id) {
|
||||
for (auto& observer : observers_)
|
||||
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
|
||||
index 77aaa3c08c1268c246f698a02df3e8a1aa4ef294..ffc6a5d1cd16ee2aecee027e9a321f1e435f5410 100644
|
||||
index 53299308d20eaaf5e26b8a5dc34d1c66d7b0fdf8..fa63808238ede5bebc3589901e318acc882b766a 100644
|
||||
--- a/content/renderer/render_frame_impl.h
|
||||
+++ b/content/renderer/render_frame_impl.h
|
||||
@@ -576,6 +576,8 @@ class CONTENT_EXPORT RenderFrameImpl
|
||||
@@ -583,6 +583,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 77aaa3c08c1268c246f698a02df3e8a1aa4ef294..ffc6a5d1cd16ee2aecee027e9a321f1e
|
||||
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 4b3b9b1c4034656fdf5f9862d3fffa66f51e72fe..55e69bb644e2c47ac15fe8b2e255d660b8a51b4f 100644
|
||||
index 493358dade0f6a1359f95bc3f8b3adc4303b8bcc..c0a53b380d5d3d2430e353d581dab6f183fa48b7 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame_client.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame_client.h
|
||||
@@ -577,6 +577,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
@@ -583,6 +583,9 @@ class BLINK_EXPORT WebLocalFrameClient {
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) {}
|
||||
|
||||
@@ -79,10 +79,10 @@ index 83b81f4c1fd4232ee5c2b7b1b7b85424164f3acc..bdd4a0031af6f9c2b701979dd469867c
|
||||
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 d8ac4cd5b0847b03ed30663dea24654c6e29d2f0..8c46855d4a5f888425ea4b6d4f69c74ac649933e 100644
|
||||
index 0ca3b35db57056a86828e0aa80451abb4142eef3..0508e786747eef3d9b7061c42153d166e72d270e 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
|
||||
@@ -291,6 +291,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
@@ -298,6 +298,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
|
||||
|
||||
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
|
||||
int32_t world_id) = 0;
|
||||
@@ -92,7 +92,7 @@ index d8ac4cd5b0847b03ed30663dea24654c6e29d2f0..8c46855d4a5f888425ea4b6d4f69c74a
|
||||
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 3538350785762dc742f862ff0e9ba8f43c92199a..0c980c66d861af11760faf1f1f78070d9f487367 100644
|
||||
index a3f1507a39bfea1f336a42e1f2575e3c1f684603..7aca23d4228680a1419c2e8ed8fa8a44a18c1d80 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
|
||||
@@ -272,6 +272,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
|
||||
@@ -110,7 +110,7 @@ index 3538350785762dc742f862ff0e9ba8f43c92199a..0c980c66d861af11760faf1f1f78070d
|
||||
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 aab6643b89899a2b7f5bd74d4501bbf74562a663..8a3dddf797106e3d5da6a75d458ddea97cdf5edc 100644
|
||||
index a853d0dd0ecfd676b6ada622f38a6546e526be92..d39a81547c3335d6b2ff3219ddcf5f3b2daa1c9c 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 {
|
||||
|
||||
@@ -10,10 +10,10 @@ valid use cases for setting custom exit codes of the main loop. This
|
||||
exposes a simple setter that embedders can call.
|
||||
|
||||
diff --git a/content/browser/browser_main_loop.h b/content/browser/browser_main_loop.h
|
||||
index 30d6d6f54e453c5b9690bc028005d4169f7d71c4..76228c72b87368d5372ed812693b81e7d4d370d0 100644
|
||||
index 090ca9c6e8785c6e9f1b9245771645ea19805795..fdf587055a71103c21f27fd79e5714baa24ea5c4 100644
|
||||
--- a/content/browser/browser_main_loop.h
|
||||
+++ b/content/browser/browser_main_loop.h
|
||||
@@ -164,6 +164,10 @@ class CONTENT_EXPORT BrowserMainLoop {
|
||||
@@ -161,6 +161,10 @@ class CONTENT_EXPORT BrowserMainLoop {
|
||||
|
||||
int GetResultCode() const { return result_code_; }
|
||||
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: 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 e38a3a04c260d66b0f116d101c197824e3aaae93..bb3c79f407ab638fcd3180f6b16af98ec6ece5f8 100644
|
||||
index 2e43f4e05e0521a8d1e3bf077360171128a0898f..5934a03cfb6fa7239aa0994fb0a10ae6c5ce69c8 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.cc
|
||||
@@ -611,6 +611,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
@@ -615,6 +615,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
|
||||
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ index e38a3a04c260d66b0f116d101c197824e3aaae93..bb3c79f407ab638fcd3180f6b16af98e
|
||||
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 8926801ad5fdc5a560cb8a1eb40675eb5416f5cc..691abfe3802c207f402aef54eae481aaedafc364 100644
|
||||
index 37f3a9cae4ce9652943bbe7e71541ce182f52c1e..608b54785a1d8b34df41b030f65253c14b8285a1 100644
|
||||
--- a/content/browser/renderer_host/render_view_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_view_host_impl.h
|
||||
@@ -135,6 +135,7 @@ class CONTENT_EXPORT RenderViewHostImpl
|
||||
@@ -34,7 +34,7 @@ index 8926801ad5fdc5a560cb8a1eb40675eb5416f5cc..691abfe3802c207f402aef54eae481aa
|
||||
void SendRendererPreferencesToRenderer(
|
||||
const blink::RendererPreferences& preferences);
|
||||
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
|
||||
index 9f1acca2bdb697b79a01362a9a5d8dd098eca925..c57c03b838a773d41614002afee27520f4488c6f 100644
|
||||
index 740d1c322b740d374dd0287d99daebc1fe39ceda..f6ed1402120c0d8b30356c87a52d88fe39ed08d9 100644
|
||||
--- a/content/public/browser/render_view_host.h
|
||||
+++ b/content/public/browser/render_view_host.h
|
||||
@@ -90,6 +90,9 @@ class CONTENT_EXPORT RenderViewHost {
|
||||
@@ -48,18 +48,18 @@ index 9f1acca2bdb697b79a01362a9a5d8dd098eca925..c57c03b838a773d41614002afee27520
|
||||
// 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 dfaf88a323e6b1e63cc2b7abd1d7a1dcc26b1b8c..9cbc5fcf90d54173c84b5e91c620d175166ed9b3 100644
|
||||
index 59f8c47769c5fa325bb9464912561da1f0ba6c8b..822c94e3a3439b1c97ef25baf3eac97a017fa472 100644
|
||||
--- a/content/renderer/render_view_impl.h
|
||||
+++ b/content/renderer/render_view_impl.h
|
||||
@@ -183,6 +183,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
|
||||
@@ -155,6 +155,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
|
||||
static WindowOpenDisposition NavigationPolicyToDisposition(
|
||||
blink::WebNavigationPolicy policy);
|
||||
|
||||
+ void OnSetSchedulerThrottling(bool allowed);
|
||||
+
|
||||
// Misc private functions ----------------------------------------------------
|
||||
|
||||
// In OOPIF-enabled modes, this tells each RenderFrame with a pending state
|
||||
// ---------------------------------------------------------------------------
|
||||
// ADDING NEW FUNCTIONS? Please keep private functions alphabetized and put
|
||||
// it in the same order in the .cc file as it was in the header.
|
||||
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
|
||||
index e122d4ffb857023841dabcb6fed352d7586d8344..3c7cd1cb8b204024a0835150302ee8896e01ee45 100644
|
||||
--- a/third_party/blink/public/mojom/page/page.mojom
|
||||
@@ -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 26aafb1350fe3e5df35800d858794b60aa309f21..e686722564b5d85ee77acc09ccba93d8605b1a0a 100644
|
||||
index 97e150f7d7f1ccba622ca0a286023ebd75438bb6..85333052af3dcdf39325033f345ae15674dd8768 100644
|
||||
--- a/third_party/blink/public/web/web_view.h
|
||||
+++ b/third_party/blink/public/web/web_view.h
|
||||
@@ -357,6 +357,7 @@ class WebView {
|
||||
@@ -364,6 +364,7 @@ class WebView {
|
||||
// Scheduling -----------------------------------------------------------
|
||||
|
||||
virtual PageScheduler* Scheduler() const = 0;
|
||||
@@ -85,10 +85,10 @@ index 26aafb1350fe3e5df35800d858794b60aa309f21..e686722564b5d85ee77acc09ccba93d8
|
||||
// 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 e5d12060da4fd6366313a28f4a99ac52ce119803..ff5dda58a3db3efeea952f0ae75cf85575e1a12c 100644
|
||||
index 81c88781d0b7d5c662164b787d581dbfddaa138a..b627f400d16ee1c605ef7657dc3ba63319c5fd56 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -3559,6 +3559,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
@@ -3577,6 +3577,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
|
||||
return GetPage()->GetPageScheduler();
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ index e5d12060da4fd6366313a28f4a99ac52ce119803..ff5dda58a3db3efeea952f0ae75cf855
|
||||
void WebViewImpl::SetVisibilityState(
|
||||
mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) {
|
||||
@@ -3570,7 +3577,8 @@ void WebViewImpl::SetVisibilityState(
|
||||
@@ -3588,7 +3595,8 @@ void WebViewImpl::SetVisibilityState(
|
||||
}
|
||||
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
|
||||
GetPage()->GetPageScheduler()->SetPageVisible(
|
||||
@@ -113,10 +113,10 @@ index e5d12060da4fd6366313a28f4a99ac52ce119803..ff5dda58a3db3efeea952f0ae75cf855
|
||||
|
||||
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 e536aeacc79dcc5cf45674fbc4d288a8265a7548..c06214e3c714c96acd104208c7495397e924bc12 100644
|
||||
index c2e704e745d3859790e73e515c3c1cbcd11ce529..5b3233f4d1f108492f370fc0f6450633dbe713f0 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
|
||||
@@ -403,6 +403,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -408,6 +408,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
LocalDOMWindow* PagePopupWindow() const;
|
||||
|
||||
PageScheduler* Scheduler() const override;
|
||||
@@ -124,7 +124,7 @@ index e536aeacc79dcc5cf45674fbc4d288a8265a7548..c06214e3c714c96acd104208c7495397
|
||||
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
|
||||
bool is_initial_state) override;
|
||||
mojom::blink::PageVisibilityState GetVisibilityState() override;
|
||||
@@ -828,6 +829,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
@@ -833,6 +834,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
|
||||
// If true, we send IPC messages when |preferred_size_| changes.
|
||||
bool send_preferred_size_changes_ = false;
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ This is used by editors to obtain the filesystem path from a dragged file. See
|
||||
documentation at https://electronjs.org/docs/api/file-object
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/fileapi/file.h b/third_party/blink/renderer/core/fileapi/file.h
|
||||
index 7c21e6bc889c5bead5aa25a3a7582918d2f6d953..fe255a5d6afca61852adead82beaac275ebe9c54 100644
|
||||
index d70a95cc9b28674dd4ac925e9f1aca481e60c34b..fa9d21a20e77867a7d596e0df4ec143edb871f27 100644
|
||||
--- a/third_party/blink/renderer/core/fileapi/file.h
|
||||
+++ b/third_party/blink/renderer/core/fileapi/file.h
|
||||
@@ -200,6 +200,9 @@ class CORE_EXPORT File final : public Blob {
|
||||
@@ -191,6 +191,9 @@ class CORE_EXPORT File final : public Blob {
|
||||
}
|
||||
const String& name() const { return name_; }
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ Refs changes in:
|
||||
This patch reverts the changes to fix associated crashes in Electron.
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
|
||||
index a190fd8233e295555d4b5e93cb3a8edd59d7df59..37f199f6e6471d97105ffad9dd7d4450cb02331f 100644
|
||||
index 8bf6b4bc077cc41da5e0e6b13302bc343537c68f..01bddc0bcb7476408023c4cfc042a0883c16430c 100644
|
||||
--- a/third_party/blink/renderer/core/frame/frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/frame.cc
|
||||
@@ -120,14 +120,6 @@ bool Frame::Detach(FrameDetachType type) {
|
||||
@@ -49,10 +49,10 @@ index a190fd8233e295555d4b5e93cb3a8edd59d7df59..37f199f6e6471d97105ffad9dd7d4450
|
||||
// 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 fab2d2cbc446cc283939830f5e8fe9bb5b500b73..7530888913597ac9afd32d634d461c74f1da69ed 100644
|
||||
index d7610b904d1656e410af376c8c79d5339ef87dca..26091688b05ea60a33e7a0a4b7d101814263f7ff 100644
|
||||
--- a/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
|
||||
@@ -785,10 +785,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -792,10 +792,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
}
|
||||
DCHECK(!view_ || !view_->IsAttached());
|
||||
|
||||
@@ -63,7 +63,7 @@ index fab2d2cbc446cc283939830f5e8fe9bb5b500b73..7530888913597ac9afd32d634d461c74
|
||||
if (!Client())
|
||||
return false;
|
||||
|
||||
@@ -834,6 +830,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
@@ -840,6 +836,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
|
||||
DCHECK(!view_->IsAttached());
|
||||
Client()->WillBeDetached();
|
||||
|
||||
|
||||
@@ -1,52 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Anonymous <anonymous@electronjs.org>
|
||||
Date: Thu, 20 Sep 2018 17:45:11 -0700
|
||||
Subject: blink_world_context.patch
|
||||
|
||||
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 fd6ce9a3df30bc11387db8ee63293f202a8d00aa..014a71c2b81cb6ab3a6a295d8ee6f403f75770fd 100644
|
||||
--- a/third_party/blink/public/web/web_local_frame.h
|
||||
+++ b/third_party/blink/public/web/web_local_frame.h
|
||||
@@ -369,6 +369,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;
|
||||
+ virtual v8::Local<v8::Context> WorldScriptContext(
|
||||
+ v8::Isolate* isolate, int world_id) const = 0;
|
||||
|
||||
// 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 35290011b1c32b8695e08ec80398e4df2cf611dc..1ae8fc18f467c50f2a7e0de9e24d708514c5cc86 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
|
||||
@@ -1078,6 +1078,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
|
||||
return MainWorldScriptContext()->Global();
|
||||
}
|
||||
|
||||
+v8::Local<v8::Context> WebLocalFrameImpl::WorldScriptContext(
|
||||
+ v8::Isolate* isolate, int world_id) const {
|
||||
+ scoped_refptr<DOMWrapperWorld> world = DOMWrapperWorld::EnsureIsolatedWorld(
|
||||
+ isolate, world_id);
|
||||
+ return ToScriptState(GetFrame(), *world)->GetContext();
|
||||
+}
|
||||
+
|
||||
bool WebFrame::ScriptCanAccess(WebFrame* target) {
|
||||
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 415bd0ead0d6be7e73dbdfc2066612b7abee99b4..7e6512649709e68b9ea9cd829f6b7ffadf8a59dd 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
|
||||
@@ -170,6 +170,8 @@ class CORE_EXPORT WebLocalFrameImpl final
|
||||
v8::Local<v8::Context> MainWorldScriptContext() const override;
|
||||
int32_t GetScriptContextWorldId(
|
||||
v8::Local<v8::Context> script_context) const override;
|
||||
+ v8::Local<v8::Context> WorldScriptContext(
|
||||
+ v8::Isolate* isolate, int world_id) const override;
|
||||
void RequestExecuteScriptAndReturnValue(const WebScriptSource&,
|
||||
bool user_gesture,
|
||||
WebScriptExecutionCallback*) override;
|
||||
@@ -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 563674ae9631732979d973f5233a3b707312d638..779b76fe62c520f1681a82343a21aa4d734b3a55 100644
|
||||
index a9616406d4d3742c90aa0d1cf65ab84cfb8890ed..32142ed13cfca009e09578dff79e94030233cfbf 100644
|
||||
--- a/base/trace_event/builtin_categories.h
|
||||
+++ b/base/trace_event/builtin_categories.h
|
||||
@@ -77,6 +77,7 @@
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Thu, 27 May 2021 17:21:07 -0700
|
||||
Subject: build: do not depend on packed_resource_integrity
|
||||
|
||||
This ensures we do not depend on a target that does not exist when
|
||||
building Electron, electron generates its own .pak files via
|
||||
electron_repack and therefore this integrity target which is generated
|
||||
by the chrome_paks target does not exist. This can not be upstreamed,
|
||||
if we ever align our .pak file generation with Chrome we can remove this
|
||||
patch.
|
||||
|
||||
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
|
||||
index 8e07f7000de932bc9b6bf484b1a9fce4d4580b4a..eac65b694c0a0857f73f75228b8d673bdfcd2b93 100644
|
||||
--- a/chrome/BUILD.gn
|
||||
+++ b/chrome/BUILD.gn
|
||||
@@ -172,11 +172,16 @@ if (!is_android && !is_mac) {
|
||||
"common/crash_keys.h",
|
||||
]
|
||||
|
||||
+ if (!is_electron_build) {
|
||||
+ deps += [
|
||||
+ ":packed_resources_integrity",
|
||||
+ ]
|
||||
+ }
|
||||
+
|
||||
deps += [
|
||||
":chrome_dll",
|
||||
":chrome_exe_version",
|
||||
":copy_first_run",
|
||||
- ":packed_resources_integrity",
|
||||
":visual_elements_resources",
|
||||
"//base",
|
||||
"//build:branding_buildflags",
|
||||
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
|
||||
index a7b5475c29acff9032ceb28f1237c4901559deba..db2b9ea0a08d6dc72afc67b305f628eb2ad67a38 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -4277,7 +4277,7 @@ static_library("browser") {
|
||||
|
||||
# On Windows, the hashes are embedded in //chrome:chrome_initial rather
|
||||
# than here in :chrome_dll.
|
||||
- if (!is_win) {
|
||||
+ if (!is_win && !is_electron_build) {
|
||||
deps += [ "//chrome:packed_resources_integrity" ]
|
||||
}
|
||||
|
||||
diff --git a/chrome/test/BUILD.gn b/chrome/test/BUILD.gn
|
||||
index d5f3e36ccf1aad7a88424befeed9d7be59cb4ad5..7a0809f33c376154720e204b1b0456bc59b341b7 100644
|
||||
--- a/chrome/test/BUILD.gn
|
||||
+++ b/chrome/test/BUILD.gn
|
||||
@@ -5025,10 +5025,15 @@ test("unit_tests") {
|
||||
assert(toolkit_views)
|
||||
sources += [ "../browser/ui/startup/credential_provider_signin_info_fetcher_win_unittest.cc" ]
|
||||
deps += [
|
||||
- "//chrome:packed_resources_integrity",
|
||||
"//chrome/browser/win/conflicts:unit_tests",
|
||||
"//chrome/test:credential_provider_test_utils",
|
||||
]
|
||||
+
|
||||
+ if (!is_electron_build) {
|
||||
+ deps += [
|
||||
+ "//chrome:packed_resources_integrity",
|
||||
+ ]
|
||||
+ }
|
||||
}
|
||||
|
||||
if (is_win || is_chromeos_ash || is_mac) {
|
||||
@@ -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 0ef73ab2b2e124466c4ff22fe662273ade82603b..f2451ca5f2ce1f22b84fe81637314daeb3dc64d8 100644
|
||||
index 46bc4769236eabee773be1e5690f0d406cb22229..0c674012b6265a8109e00b13c7c95a36eaddbe27 100644
|
||||
--- a/build/config/BUILDCONFIG.gn
|
||||
+++ b/build/config/BUILDCONFIG.gn
|
||||
@@ -123,6 +123,9 @@ if (current_os == "") {
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Attard <sattard@slack-corp.com>
|
||||
Date: Fri, 28 May 2021 14:29:38 -0700
|
||||
Subject: build: read IDL files as utf8 to fix python3 character encodding
|
||||
issue
|
||||
|
||||
This should be upstreamed
|
||||
|
||||
diff --git a/tools/json_schema_compiler/compiler.py b/tools/json_schema_compiler/compiler.py
|
||||
index 6e6990525d0441d22899450d34991bbb94265ca6..2ac3ae8f783f7472ffaf054714f07cf50bdf0fd3 100755
|
||||
--- a/tools/json_schema_compiler/compiler.py
|
||||
+++ b/tools/json_schema_compiler/compiler.py
|
||||
@@ -146,7 +146,7 @@ def GenerateSchema(generator_name,
|
||||
output_dir = os.path.join(destdir, src_path)
|
||||
if not os.path.exists(output_dir):
|
||||
os.makedirs(output_dir)
|
||||
- with open(os.path.join(output_dir, filename), 'w') as f:
|
||||
+ with open(os.path.join(output_dir, filename), 'w', encoding='utf-8') as f:
|
||||
f.write(code)
|
||||
# If multiple files are being output, add the filename for each file.
|
||||
if len(generators) > 1:
|
||||
diff --git a/tools/json_schema_compiler/idl_schema.py b/tools/json_schema_compiler/idl_schema.py
|
||||
index 029e83c7179b2582bc46b5e3eeac1e32a016a479..f83d9edd37ad89478d6b741e1cf0c525bab94587 100755
|
||||
--- a/tools/json_schema_compiler/idl_schema.py
|
||||
+++ b/tools/json_schema_compiler/idl_schema.py
|
||||
@@ -575,7 +575,7 @@ def Load(filename):
|
||||
Python dictionary in a format that the JSON schema compiler expects to see.
|
||||
'''
|
||||
|
||||
- f = open(filename, 'r')
|
||||
+ f = open(filename, 'r', encoding='utf-8')
|
||||
contents = f.read()
|
||||
f.close()
|
||||
|
||||
@@ -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 9708cea34a2a15bf0ad10d0acbd23870abcc0bf7..05b5abd7b4b9aca999ed428ed50fcf2d6983b767 100644
|
||||
index 491c8b441dfe84862c8b0caa7941cc1e7d16e331..74b3fb5010895869b606890f1523512cd2ee96af 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
|
||||
@@ -5720,6 +5720,7 @@ void RenderFrameHostImpl::CreateNewWindow(
|
||||
@@ -5979,6 +5979,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 9708cea34a2a15bf0ad10d0acbd23870abcc0bf7..05b5abd7b4b9aca999ed428ed50fcf2d
|
||||
&no_javascript_access);
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index ec8c6d3956485103b7add39d111ba372126ce21f..04e320e1b0150dbf7edd42be88c3ab6ceaecf46f 100644
|
||||
index e3146d7cfdfb1f1856edba2e371a8b7589b627a1..952c073cfb1a2385581759b29683f1b66564d99b 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3658,6 +3658,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3774,6 +3774,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
}
|
||||
auto* new_contents_impl = new_contents.get();
|
||||
|
||||
@@ -39,7 +39,7 @@ index ec8c6d3956485103b7add39d111ba372126ce21f..04e320e1b0150dbf7edd42be88c3ab6c
|
||||
new_contents_impl->GetController().SetSessionStorageNamespace(
|
||||
partition_id, session_storage_namespace);
|
||||
|
||||
@@ -3700,12 +3708,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3816,12 +3824,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
AddWebContentsDestructionObserver(new_contents_impl);
|
||||
}
|
||||
|
||||
@@ -53,10 +53,10 @@ index ec8c6d3956485103b7add39d111ba372126ce21f..04e320e1b0150dbf7edd42be88c3ab6c
|
||||
new_contents_impl, opener, params.target_url,
|
||||
params.referrer.To<Referrer>(), params.disposition,
|
||||
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
|
||||
index 5f6980ca1865dfb58830de7012d7c3f499457e3d..04bfe5f3cc0fdaf5065d64f1a0a9ec6b2595e5f8 100644
|
||||
index 542a9bb6343b16c4dfe3aebae97ec06073021e52..840d562fcc8e0da12393924d56c2a6f319be9006 100644
|
||||
--- a/content/common/frame.mojom
|
||||
+++ b/content/common/frame.mojom
|
||||
@@ -455,6 +455,10 @@ struct CreateNewWindowParams {
|
||||
@@ -468,6 +468,10 @@ struct CreateNewWindowParams {
|
||||
// The impression associated with the navigation in the new window, if
|
||||
// one is specified.
|
||||
Impression? impression;
|
||||
@@ -68,10 +68,10 @@ index 5f6980ca1865dfb58830de7012d7c3f499457e3d..04bfe5f3cc0fdaf5065d64f1a0a9ec6b
|
||||
|
||||
// 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 1b1761121436278e1d113da19f58dd832117ef69..92675cb2cf49b7fb750612ac6edc4ee39c349f9b 100644
|
||||
index 09597633dfd443376784d8645611ab18a903bf23..1fe182db87390b346fa03091dcc177611943d70e 100644
|
||||
--- a/content/public/browser/content_browser_client.cc
|
||||
+++ b/content/public/browser/content_browser_client.cc
|
||||
@@ -561,6 +561,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
@@ -566,6 +566,8 @@ bool ContentBrowserClient::CanCreateWindow(
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -81,10 +81,10 @@ index 1b1761121436278e1d113da19f58dd832117ef69..92675cb2cf49b7fb750612ac6edc4ee3
|
||||
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 0b1a60bf8cdc0452d9f818d799e8ece5400698bd..c24c05c17e5511d247fb93a4f987dd852742b5a4 100644
|
||||
index 7dd2b78088759ffdd80c33cd529adbb93215334f..5ec83c0a56fc91d3c13d97dd8c58a286b6358146 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -158,6 +158,7 @@ class NetworkService;
|
||||
@@ -160,6 +160,7 @@ class NetworkService;
|
||||
class TrustedURLLoaderHeaderClient;
|
||||
} // namespace mojom
|
||||
struct ResourceRequest;
|
||||
@@ -92,7 +92,7 @@ index 0b1a60bf8cdc0452d9f818d799e8ece5400698bd..c24c05c17e5511d247fb93a4f987dd85
|
||||
} // namespace network
|
||||
|
||||
namespace sandbox {
|
||||
@@ -928,6 +929,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -937,6 +938,8 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
const std::string& frame_name,
|
||||
WindowOpenDisposition disposition,
|
||||
const blink::mojom::WindowFeatures& features,
|
||||
@@ -102,10 +102,10 @@ index 0b1a60bf8cdc0452d9f818d799e8ece5400698bd..c24c05c17e5511d247fb93a4f987dd85
|
||||
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 bf70b55e6b643686c6b57fbd4a51ad4f6927fa56..1d7b049404282bddb26ea04ab26a0fa726d5a958 100644
|
||||
index 8ba5d82ebb39b495a0c175c771be8c4f071b5052..cf2974dad890e61e4090d3328b23de203838bd7c 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -27,6 +27,17 @@ namespace content {
|
||||
@@ -28,6 +28,17 @@ namespace content {
|
||||
|
||||
WebContentsDelegate::WebContentsDelegate() = default;
|
||||
|
||||
@@ -124,7 +124,7 @@ index bf70b55e6b643686c6b57fbd4a51ad4f6927fa56..1d7b049404282bddb26ea04ab26a0fa7
|
||||
const OpenURLParams& params) {
|
||||
return nullptr;
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index b1cfa654259d431adfada00a00f9bfc8ae5ab292..484d36de2ac0ef3b1d19bbd0d6c79db84e53b7fb 100644
|
||||
index 8a3c4c24a55ae7c520514ded527eb6214a5708a9..631c9b3aab0f2dfe8e6d8437b3f31676e8e158b5 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -16,6 +16,7 @@
|
||||
@@ -150,10 +150,10 @@ index b1cfa654259d431adfada00a00f9bfc8ae5ab292..484d36de2ac0ef3b1d19bbd0d6c79db8
|
||||
// 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 9ee8f76a0de7fa8ab568363b97c9dc22eb698e15..71d98e472641d6ebbc8857365ee1ee36c6ee1ff9 100644
|
||||
index a229509d7254f87af5128ffdaad4cd9c74c3e980..766adb31cf654ff964fbca3acc941c092e382448 100644
|
||||
--- a/content/renderer/render_view_impl.cc
|
||||
+++ b/content/renderer/render_view_impl.cc
|
||||
@@ -27,6 +27,7 @@
|
||||
@@ -26,6 +26,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"
|
||||
@@ -161,7 +161,7 @@ index 9ee8f76a0de7fa8ab568363b97c9dc22eb698e15..71d98e472641d6ebbc8857365ee1ee36
|
||||
#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"
|
||||
@@ -312,6 +313,10 @@ WebView* RenderViewImpl::CreateView(
|
||||
@@ -284,6 +285,10 @@ WebView* RenderViewImpl::CreateView(
|
||||
params->impression = blink::ConvertWebImpressionToImpression(*impression);
|
||||
}
|
||||
|
||||
@@ -173,7 +173,7 @@ index 9ee8f76a0de7fa8ab568363b97c9dc22eb698e15..71d98e472641d6ebbc8857365ee1ee36
|
||||
// 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 5e9b1a409f5fb0dd683cc67318bae9c542816451..e2a3780b6ea5e15839b89ff92c85e57e7c48b017 100644
|
||||
index e3dd040164fec1a70c9bd2dac7cc3d93478ec39f..f8894682e181a99b9e6cf3d0e4b46413076eb5ef 100644
|
||||
--- a/content/web_test/browser/web_test_content_browser_client.cc
|
||||
+++ b/content/web_test/browser/web_test_content_browser_client.cc
|
||||
@@ -450,6 +450,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: John Kleinschmidt <jkleinsc@electronjs.org>
|
||||
Date: Tue, 11 May 2021 21:35:39 -0400
|
||||
Subject: chore: allow overriding of enable_pak_file_integrity_checks
|
||||
|
||||
enable_pak_file_integrity_checks is not currently overridable
|
||||
but Electron does not need to run this.
|
||||
|
||||
diff --git a/chrome/browser/buildflags.gni b/chrome/browser/buildflags.gni
|
||||
index 8c19e707371c7ad4fbcd46d58b147de3bfc89790..17c82c078a2beb8146c39290aa37703c7a3b07f2 100644
|
||||
--- a/chrome/browser/buildflags.gni
|
||||
+++ b/chrome/browser/buildflags.gni
|
||||
@@ -21,11 +21,13 @@ declare_args() {
|
||||
# app_session_service and some not.
|
||||
enable_app_session_service =
|
||||
!(is_chromeos_lacros || is_chromecast || is_android)
|
||||
-}
|
||||
|
||||
-# If true, the resource .pak files will be hashed and the digest will be
|
||||
-# embedded in the binary and checked at run-time. This is incompatible with
|
||||
-# enable_resource_allowlist_generation on Windows because it creates a circular
|
||||
-# dependency with chrome_dll.
|
||||
-enable_pak_file_integrity_checks =
|
||||
- !(enable_resource_allowlist_generation && is_win) && !is_android
|
||||
+
|
||||
+ # If true, the resource .pak files will be hashed and the digest will be
|
||||
+ # embedded in the binary and checked at run-time. This is incompatible with
|
||||
+ # enable_resource_allowlist_generation on Windows because it creates a circular
|
||||
+ # dependency with chrome_dll.
|
||||
+ enable_pak_file_integrity_checks =
|
||||
+ !(enable_resource_allowlist_generation && is_win) && !is_android
|
||||
+
|
||||
+}
|
||||
\ No newline at end of file
|
||||
@@ -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 72248101cdaee12ff71d0d6cd9b83ea50db2c829..2b242fa4f7cb0562c31a48ba5aad49f534fbd71c 100644
|
||||
index e3ad92d44fe90f45f8986f2ba3b6d5af096f831b..dafa7d7e67ed3a870d5ae534124047703c0328f1 100644
|
||||
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
|
||||
@@ -464,7 +464,7 @@ CodeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context,
|
||||
@@ -448,7 +448,7 @@ CodeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context,
|
||||
return {true, std::move(stringified_source)};
|
||||
}
|
||||
|
||||
|
||||
@@ -67,10 +67,10 @@ index d072e66a2ad8a05c9678c98aa5dbeecd4a925465..3874397a4f3096cc965fc8ce4ee955c7
|
||||
return extension && extension->id() == app_id_;
|
||||
}
|
||||
diff --git a/chrome/browser/media/offscreen_tab.cc b/chrome/browser/media/offscreen_tab.cc
|
||||
index 4499d9df3723b1c721aef919cbe376166985ddab..c641a8e3dc64f98aacc09567cc5fc9edcc6c9ff5 100644
|
||||
index 412e6b05265a97077c3b617e12908c88719e6e73..8365a0d5923beb2ffbd837535db2abc23e32e891 100644
|
||||
--- a/chrome/browser/media/offscreen_tab.cc
|
||||
+++ b/chrome/browser/media/offscreen_tab.cc
|
||||
@@ -283,8 +283,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
|
||||
@@ -282,8 +282,7 @@ bool OffscreenTab::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -140,10 +140,10 @@ index ef84e04d628fb5cdbaf8fbbf84af3bf23e00c522..f1ee0bee5bfd08227a29498f8410d5d3
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
|
||||
index 7c840e8a0cbe1b8e5b7ebfba5d4dbd1488f4a530..b0854e1191b2fb124b4dfd52bd49a13f321829b3 100644
|
||||
index 335611dcad36ab2bf058015321a9a72d8f77989b..06619bb2a343781edf422d21eb350b285b2419d9 100644
|
||||
--- a/chrome/browser/ui/browser.cc
|
||||
+++ b/chrome/browser/ui/browser.cc
|
||||
@@ -1793,12 +1793,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
@@ -1797,12 +1797,11 @@ bool Browser::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -159,10 +159,10 @@ index 7c840e8a0cbe1b8e5b7ebfba5d4dbd1488f4a530..b0854e1191b2fb124b4dfd52bd49a13f
|
||||
|
||||
WebContents* Browser::CreateCustomWebContents(
|
||||
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
|
||||
index 71ce1e28e6291dcf5a8765003b93054eca360925..11d87d0ad1f86963b52c870adcdc65c2322ececc 100644
|
||||
index 25422f4bbe93f0bb31f88c2e11cd79e95d1845dd..679f93d43a07c27cdc14b1e78beee5c96e666095 100644
|
||||
--- a/chrome/browser/ui/browser.h
|
||||
+++ b/chrome/browser/ui/browser.h
|
||||
@@ -796,8 +796,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 e878f49dd6cc69f5ba0b43e666277d29ed8c0d91..3a8eb296fee0ac2dda52435b58537a98d90e4467 100644
|
||||
index 9364a722de5183c077a9c50b8c8a48ffa3a0fea6..ddde17de38bc5ca904046702a28a88d7c00f18c4 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
|
||||
@@ -169,14 +169,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
@@ -170,14 +170,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -222,7 +222,7 @@ index e878f49dd6cc69f5ba0b43e666277d29ed8c0d91..3a8eb296fee0ac2dda52435b58537a98
|
||||
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 cf50204a6aeb099d25dc41d4180f8a1e32a63eda..642e88a4de3044173423fae5bfe2e30ef442f366 100644
|
||||
index 4b832f4c3a051eefca57909958334631335e03e1..8aed42112d8fad7df813524cf700d8082ad75c47 100644
|
||||
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
|
||||
@@ -78,8 +78,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
|
||||
@@ -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 e240f8a32b1f7f69afa992861c995e668695c51f..87792fc94a84ed3336c70d431516150a91ec5928 100644
|
||||
index 362889cfb7778385937385849d285bc5c8f28f02..2df013a85ce160272fa8378571eac39d4b66f31d 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -3610,8 +3610,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
@@ -3726,8 +3726,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
|
||||
|
||||
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
|
||||
source_site_instance, params.window_container_type,
|
||||
@@ -278,10 +278,10 @@ index e240f8a32b1f7f69afa992861c995e668695c51f..87792fc94a84ed3336c70d431516150a
|
||||
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 1d7b049404282bddb26ea04ab26a0fa726d5a958..ee6c311ba410a01ea90c95369abfdba1ae422388 100644
|
||||
index cf2974dad890e61e4090d3328b23de203838bd7c..4eb0b83a4b68c0a0be3fbeca25d345a0246746c4 100644
|
||||
--- a/content/public/browser/web_contents_delegate.cc
|
||||
+++ b/content/public/browser/web_contents_delegate.cc
|
||||
@@ -135,8 +135,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
@@ -136,8 +136,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
|
||||
SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -292,7 +292,7 @@ index 1d7b049404282bddb26ea04ab26a0fa726d5a958..ee6c311ba410a01ea90c95369abfdba1
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
|
||||
index 484d36de2ac0ef3b1d19bbd0d6c79db84e53b7fb..339577e0e4297904b186a2b2abae6fc9e8c4625e 100644
|
||||
index 631c9b3aab0f2dfe8e6d8437b3f31676e8e158b5..b8fad336db3a4b1f3e7877df179d29b32d719fc3 100644
|
||||
--- a/content/public/browser/web_contents_delegate.h
|
||||
+++ b/content/public/browser/web_contents_delegate.h
|
||||
@@ -319,8 +319,7 @@ class CONTENT_EXPORT WebContentsDelegate {
|
||||
@@ -334,10 +334,10 @@ index 9b293d0df6c634bf44a69d607c4eee839a74b4a1..7e5b9cbdcc232c5e20eae0130d800f50
|
||||
content::RenderFrameHost* opener,
|
||||
content::SiteInstance* source_site_instance,
|
||||
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
index 8dc27c2df589861c3176a54c02abe821419e39c7..7e5d49798cd4f55e6b3e24f5f10824f5043c2ddd 100644
|
||||
index 330b9467832a93aade64c962a1715ced6fa4c6a6..babcfb3eee9933a2db39023492095f30c957b21c 100644
|
||||
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
|
||||
@@ -380,8 +380,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
||||
@@ -386,8 +386,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -362,10 +362,10 @@ index 7d27e12c4e9a7f32af8a26f672359057a643dd67..7a30ac31f79871f2a9afa0345e0e88af
|
||||
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 ba54048e3af4e71a38afbd07ad1e5bef57aa589b..833f4425b6499c8bbcd17dfa488e8126ac28bd1c 100644
|
||||
index d5bb190807b3b8e7b025d3779420e41c222c054a..b7dc3554078011c9fbf5d467df31bc091b94013c 100644
|
||||
--- a/fuchsia/engine/browser/frame_impl.cc
|
||||
+++ b/fuchsia/engine/browser/frame_impl.cc
|
||||
@@ -381,8 +381,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
@@ -387,8 +387,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -376,10 +376,10 @@ index ba54048e3af4e71a38afbd07ad1e5bef57aa589b..833f4425b6499c8bbcd17dfa488e8126
|
||||
// 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 5ae42572b62fa277aae17e6722f714a90dd9496e..5aa358ecdf4b1a7f3a272834fd50e7bee49accc8 100644
|
||||
index 08b2a1d7e1a0bc458e478a77bfd2fbaf35865d08..690c4baace675a6f8bbeaa1e7297e3bf0f0a8a50 100644
|
||||
--- a/fuchsia/engine/browser/frame_impl.h
|
||||
+++ b/fuchsia/engine/browser/frame_impl.h
|
||||
@@ -240,8 +240,7 @@ class FrameImpl : public fuchsia::web::Frame,
|
||||
@@ -241,8 +241,7 @@ class FrameImpl : public fuchsia::web::Frame,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -390,10 +390,10 @@ index 5ae42572b62fa277aae17e6722f714a90dd9496e..5aa358ecdf4b1a7f3a272834fd50e7be
|
||||
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 4e4b37cc0fbbcf8f630a4e928c957261e9a03603..610848b09bba4dfa7dd645ca62354930b74e3ed5 100644
|
||||
index dd1f6129173a0e19023f4ec9b66c44486b080456..d10468c06f84b59387af0a8fd5bc1c06108865eb 100644
|
||||
--- a/headless/lib/browser/headless_web_contents_impl.cc
|
||||
+++ b/headless/lib/browser/headless_web_contents_impl.cc
|
||||
@@ -198,8 +198,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
|
||||
@@ -192,8 +192,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -404,10 +404,10 @@ index 4e4b37cc0fbbcf8f630a4e928c957261e9a03603..610848b09bba4dfa7dd645ca62354930
|
||||
->options()
|
||||
->block_new_web_contents();
|
||||
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
|
||||
index cd3f3c8849060fec8d9612d26c6c34caeefb3995..1ed386fd54918b24ebc81d6c2524e5d1fe02a655 100644
|
||||
index 606f82c4e9708c4099425603b6e8c3e6859f088b..b8a2dfb475c0ca9ae24901ca31bb92f328827bf7 100644
|
||||
--- a/ui/views/controls/webview/web_dialog_view.cc
|
||||
+++ b/ui/views/controls/webview/web_dialog_view.cc
|
||||
@@ -429,8 +429,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
|
||||
@@ -438,8 +438,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
@@ -418,10 +418,10 @@ index cd3f3c8849060fec8d9612d26c6c34caeefb3995..1ed386fd54918b24ebc81d6c2524e5d1
|
||||
return delegate_->HandleShouldOverrideWebContentsCreation();
|
||||
return false;
|
||||
diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
|
||||
index 96896f5600495ff89b5209bb8cd72d7add6b404a..7df417f0509ddd993fa11bf6fb23ae68886d8008 100644
|
||||
index 978155add287e3ce57ece8db0b142a7154b378b0..7bdfe79c5c77f91cdd59df65761504b1f532b2e4 100644
|
||||
--- a/ui/views/controls/webview/web_dialog_view.h
|
||||
+++ b/ui/views/controls/webview/web_dialog_view.h
|
||||
@@ -159,8 +159,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
|
||||
@@ -160,8 +160,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
|
||||
content::SiteInstance* source_site_instance,
|
||||
content::mojom::WindowContainerType window_container_type,
|
||||
const GURL& opener_url,
|
||||
|
||||
@@ -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 be9370112776419a6df98c364e9eae149eabdbb4..f6ce53126e53995966692fbbbf74c3bf3489a088 100644
|
||||
index 519eba1795836a69c8eab33b3ec094eb15440b9b..a7b5475c29acff9032ceb28f1237c4901559deba 100644
|
||||
--- a/chrome/browser/BUILD.gn
|
||||
+++ b/chrome/browser/BUILD.gn
|
||||
@@ -6350,6 +6350,7 @@ static_library("browser") {
|
||||
@@ -6366,6 +6366,7 @@ static_library("browser") {
|
||||
deps += [
|
||||
"//components/spellcheck/browser",
|
||||
"//components/spellcheck/common",
|
||||
@@ -19,7 +19,7 @@ index be9370112776419a6df98c364e9eae149eabdbb4..f6ce53126e53995966692fbbbf74c3bf
|
||||
|
||||
if (!is_android) {
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
index d511c9085253ebfba69ba37f41193d15638bb10f..d98cfc569c775b52687a533e03c595a5e45be87e 100644
|
||||
index 2b7aa1add57dccbcbf8202cead5b7d2d5a174270..2ba03fc045f2e4bb12f173aacb6581ccb20bfc5a 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
|
||||
@@ -6,7 +6,7 @@
|
||||
@@ -44,10 +44,10 @@ index 41761e18716a7d9221511978dc4582a1804920e2..faea3d936c678e31fa29b93ae1ccd976
|
||||
]
|
||||
}
|
||||
diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc
|
||||
index 49e30e1fa3e980c09ff783fde9982ee4f58aca9f..04f0871ca950a7a5963989bbe728b9b18b198b09 100644
|
||||
index ba4d8473077d1cc35cec531750460a7ee289c1b0..1b19de36dc654f3b8c544f6ce8fc5ac058354cbc 100644
|
||||
--- a/components/language/core/browser/language_prefs.cc
|
||||
+++ b/components/language/core/browser/language_prefs.cc
|
||||
@@ -22,7 +22,7 @@
|
||||
@@ -23,7 +23,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 0ccd5815839ff3bc3b05e76241959912f0730b6b..36cecfb80de305a93e6dd4aef087f169630fa502 100644
|
||||
index 03489704b2632b8a5af07ca073e83b03fe407130..21233d01ef39a959769bd0bb58cbe4c9a0daef08 100644
|
||||
--- a/chrome/renderer/media/chrome_key_systems.cc
|
||||
+++ b/chrome/renderer/media/chrome_key_systems.cc
|
||||
@@ -16,7 +16,9 @@
|
||||
@@ -20,10 +20,10 @@ index 0ccd5815839ff3bc3b05e76241959912f0730b6b..36cecfb80de305a93e6dd4aef087f169
|
||||
#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"
|
||||
@@ -201,12 +203,14 @@ static SupportedCodecs GetSupportedCodecs(
|
||||
@@ -269,12 +271,14 @@ SupportedCodecs GetSupportedCodecs(const media::CdmCapability& capability,
|
||||
|
||||
// Returns persistent-license session support.
|
||||
static EmeSessionTypeSupport GetPersistentLicenseSupport(
|
||||
bool supported_by_the_cdm) {
|
||||
EmeSessionTypeSupport GetPersistentLicenseSupport(bool supported_by_the_cdm) {
|
||||
+#if 0
|
||||
// Do not support persistent-license if the process cannot persist data.
|
||||
// TODO(crbug.com/457487): Have a better plan on this. See bug for details.
|
||||
|
||||
@@ -201,7 +201,7 @@ index 60f7ad6ffb28fa6554e02a7e031408f4d1124d86..0e8325e993178443d926249c427957bb
|
||||
}
|
||||
|
||||
diff --git a/ui/base/x/x11_global_shortcut_listener.cc b/ui/base/x/x11_global_shortcut_listener.cc
|
||||
index 658c04c865f0e0f17501fc97965adc3bd56c709a..8c693eecbca10cd8b287fdd504d498e6a5e72e96 100644
|
||||
index a772666160a71e8e31242e25a8f3383ad9b914bf..7ed78ff875ccf9c38a480d0d59f4688ada1a3ad3 100644
|
||||
--- a/ui/base/x/x11_global_shortcut_listener.cc
|
||||
+++ b/ui/base/x/x11_global_shortcut_listener.cc
|
||||
@@ -32,11 +32,13 @@ const x11::ModMask kModifiersMasks[] = {
|
||||
|
||||
@@ -102,7 +102,7 @@ index e3fc1fb2bcab31d6a7cb325a892acb26dc00d4e4..fd654d6e514de416457c283caeb1895d
|
||||
arguments.push_back("--monitor-self");
|
||||
}
|
||||
diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc
|
||||
index 686be7964d77dbba91a6265d157d05d97d5823fb..3e4585f7ba14650fa8b7e644b026147e0bac5119 100644
|
||||
index 7dd251b2fdda8c59bb630a5d3ee86e9e858f256e..93f1d5954651ef961c72b97885a708ecff2e9aa7 100644
|
||||
--- a/components/crash/core/app/crashpad_win.cc
|
||||
+++ b/components/crash/core/app/crashpad_win.cc
|
||||
@@ -89,6 +89,7 @@ base::FilePath PlatformCrashpadInitialization(
|
||||
|
||||
@@ -17,10 +17,10 @@ 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/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
|
||||
index d1f10922b82e4e0578d1c32978784216117e0696..8f0a750d1a5957b987c5ac506455587a09474461 100644
|
||||
index c2df77803f30ad948d357a9679938320702e14b4..7d4a89e10e475c8cddd8fea77eac348c54014f0e 100644
|
||||
--- a/ui/base/clipboard/clipboard_win.cc
|
||||
+++ b/ui/base/clipboard/clipboard_win.cc
|
||||
@@ -889,10 +889,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
|
||||
@@ -882,10 +882,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
|
||||
|
||||
void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
|
||||
UINT cf_format = format.ToFormatEtc().cfFormat;
|
||||
|
||||
@@ -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 8b557bdeb4b8f3660cb9aa1adaf2bf28b6a326bf..aa8ffdd580292b88ff32ea536d34080c12db1778 100644
|
||||
index 7fe69095589d1f12b12ca2e91cf30f89aaf3d986..57d230c76ae5d28bff0bd2eb4be01880189b20bd 100644
|
||||
--- a/content/app/content_main_runner_impl.cc
|
||||
+++ b/content/app/content_main_runner_impl.cc
|
||||
@@ -737,7 +737,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
@@ -738,7 +738,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -68,7 +68,7 @@ index 3038f9d25798f36811b6398f8cc0e7d83ecc41b0..68189c36c47ef85b345b0ccc40c456f8
|
||||
// Re-initializes schemes for tests.
|
||||
CONTENT_EXPORT void ReRegisterContentSchemesForTests();
|
||||
diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc
|
||||
index 17d256b852b6e7615cf4e52e4a2d7fa326a4df44..bd0512902df4484e8714cda9ab1352b1c672a1cd 100644
|
||||
index 8c71a579ee69d77547698c2135e3b4453c126b97..9b7fd8949b13d97982a100a36d9f73c9947b8853 100644
|
||||
--- a/content/public/app/content_main_delegate.cc
|
||||
+++ b/content/public/app/content_main_delegate.cc
|
||||
@@ -42,6 +42,10 @@ bool ContentMainDelegate::ShouldHandleConsoleControlEvents() {
|
||||
@@ -83,10 +83,10 @@ index 17d256b852b6e7615cf4e52e4a2d7fa326a4df44..bd0512902df4484e8714cda9ab1352b1
|
||||
return true;
|
||||
}
|
||||
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
|
||||
index dd16f2c082665e74cc3c0aaa1ddb53977ce4a7ea..1806baf2d97b36e5c5097516c82d14fce7ca41a5 100644
|
||||
index 5e45724edf07ac33c9a423ecb6b6077f19e13b04..84f77390772828554e446d1e6f99198b76e9f835 100644
|
||||
--- a/content/public/app/content_main_delegate.h
|
||||
+++ b/content/public/app/content_main_delegate.h
|
||||
@@ -65,6 +65,20 @@ class CONTENT_EXPORT ContentMainDelegate {
|
||||
@@ -69,6 +69,20 @@ class CONTENT_EXPORT ContentMainDelegate {
|
||||
// returning initialization error code. Default behavior is CHECK(false).
|
||||
virtual int TerminateForFatalInitializationError();
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ 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 41363666bbbec7a92ac563282816f0a058979bc7..82ec517dbd675ad8b4a78848b7d2a7f71512c2d5 100644
|
||||
index a221915d4ca70f4e0c31902012f4739495c601fc..771b57e0380ff3b042fdbb2434127e8dba965b03 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -307,6 +307,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
|
||||
@@ -37,7 +37,7 @@ index 41363666bbbec7a92ac563282816f0a058979bc7..82ec517dbd675ad8b4a78848b7d2a7f7
|
||||
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
|
||||
!ui::win::IsAeroGlassEnabled())) {
|
||||
if (should_lock_)
|
||||
@@ -978,6 +983,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
|
||||
@@ -976,6 +981,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
|
||||
return scoped_enable;
|
||||
}
|
||||
|
||||
|
||||
@@ -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 f75e776fc6cae207a7ba42fa7d893b3e8cb02856..6a9563fe2a7570bb0109a8dab83983c3935f49c5 100644
|
||||
index 3a817e6450f8ee3239294d1ec5ead0d0fd584b5e..4a0a1c8104ee9d2989d10b1110ef9d30453a3047 100644
|
||||
--- a/cc/trees/layer_tree_host_impl.cc
|
||||
+++ b/cc/trees/layer_tree_host_impl.cc
|
||||
@@ -1791,6 +1791,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
@@ -1799,6 +1799,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
|
||||
|
||||
gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace(
|
||||
gfx::ContentColorUsage content_color_usage) const {
|
||||
@@ -35,7 +35,7 @@ index f75e776fc6cae207a7ba42fa7d893b3e8cb02856..6a9563fe2a7570bb0109a8dab83983c3
|
||||
|
||||
// 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 7fa2b4da8c86c89b97a747a5f965485923fae7c9..dd91f7c9eff59824b6571a97be0529f62592d185 100644
|
||||
index bd5bcf4a03022869fe610015e882ff1980d8a0e8..a3fdd7ae208719bd10ddf1044a501e44e0897ae8 100644
|
||||
--- a/cc/trees/layer_tree_settings.h
|
||||
+++ b/cc/trees/layer_tree_settings.h
|
||||
@@ -95,6 +95,8 @@ class CC_EXPORT LayerTreeSettings {
|
||||
@@ -81,10 +81,10 @@ index f919df4d79a1168269c1538ac13a2a944586cf4e..fc34cf5d7dab95e7b6fc0576674b3e2b
|
||||
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
|
||||
|
||||
diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
|
||||
index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d07259b74dfaa 100644
|
||||
index 6eb1aa1766528176a1b9b77596031494f8b4fc00..67cc9e57b28d0544256c36c2744917e22b1cf43b 100644
|
||||
--- a/components/viz/service/display/gl_renderer.cc
|
||||
+++ b/components/viz/service/display/gl_renderer.cc
|
||||
@@ -87,6 +87,9 @@
|
||||
@@ -89,6 +89,9 @@
|
||||
|
||||
using gpu::gles2::GLES2Interface;
|
||||
|
||||
@@ -94,7 +94,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
|
||||
namespace viz {
|
||||
namespace {
|
||||
|
||||
@@ -677,8 +680,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
|
||||
@@ -679,8 +682,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
|
||||
void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) {
|
||||
SetBlendEnabled(quad->ShouldDrawWithBlending());
|
||||
|
||||
@@ -106,7 +106,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
|
||||
|
||||
// Use the full quad_rect for debug quads to not move the edges based on
|
||||
// partial swaps.
|
||||
@@ -1668,7 +1672,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
|
||||
@@ -1670,7 +1674,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
|
||||
params->use_color_matrix, tint_gl_composited_content_,
|
||||
params->apply_shader_based_rounded_corner &&
|
||||
ShouldApplyRoundedCorner(params->quad)),
|
||||
@@ -116,7 +116,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
|
||||
}
|
||||
|
||||
void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) {
|
||||
@@ -2141,15 +2146,16 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
|
||||
@@ -2143,15 +2148,16 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
|
||||
SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA,
|
||||
tint_gl_composited_content_,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
@@ -136,7 +136,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
|
||||
gfx::ColorTransform::TriStim col(color_f.fR, color_f.fG, color_f.fB);
|
||||
color_transform->Transform(&col, 1);
|
||||
color_f.fR = col.x();
|
||||
@@ -2371,7 +2377,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
|
||||
@@ -2373,7 +2379,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
|
||||
: NON_PREMULTIPLIED_ALPHA,
|
||||
false, false, tint_gl_composited_content_,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
@@ -146,7 +146,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
|
||||
|
||||
if (current_program_->tint_color_matrix_location() != -1) {
|
||||
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
|
||||
@@ -2470,7 +2477,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
|
||||
@@ -2472,7 +2479,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
|
||||
!quad->ShouldDrawWithBlending(), has_tex_clamp_rect,
|
||||
tint_gl_composited_content_,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
@@ -156,7 +156,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
|
||||
|
||||
if (current_program_->tint_color_matrix_location() != -1) {
|
||||
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
|
||||
@@ -2580,7 +2588,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
|
||||
@@ -2582,7 +2590,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
|
||||
// The source color space should never be RGB.
|
||||
DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB());
|
||||
|
||||
@@ -166,7 +166,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
|
||||
|
||||
#if defined(OS_WIN)
|
||||
// Force sRGB output on Windows for overlay candidate video quads to match
|
||||
@@ -2761,7 +2770,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
|
||||
@@ -2763,7 +2772,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
|
||||
|
||||
SetUseProgram(ProgramKey::VideoStream(tex_coord_precision,
|
||||
ShouldApplyRoundedCorner(quad)),
|
||||
@@ -176,7 +176,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
|
||||
|
||||
DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
|
||||
gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
|
||||
@@ -2832,8 +2842,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
|
||||
@@ -2834,8 +2844,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
|
||||
draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR);
|
||||
|
||||
// Bind the program to the GL state.
|
||||
@@ -184,21 +184,21 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
|
||||
- CurrentRenderPassColorSpace(),
|
||||
+ SetUseProgram(draw_cache_.program_key, PATCH_CS(locked_quad.color_space()),
|
||||
+ PATCH_CS(CurrentRenderPassColorSpace()),
|
||||
/*adjust_src_white_level=*/draw_cache_.is_video_frame);
|
||||
/*adjust_src_white_level=*/draw_cache_.is_video_frame,
|
||||
locked_quad.hdr_metadata());
|
||||
|
||||
if (current_program_->rounded_corner_rect_location() != -1) {
|
||||
@@ -3661,7 +3671,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
|
||||
const gfx::ColorSpace& src_color_space,
|
||||
@@ -3666,7 +3676,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
|
||||
const gfx::ColorSpace& dst_color_space,
|
||||
bool adjust_src_white_level) {
|
||||
bool adjust_src_white_level,
|
||||
absl::optional<gfx::HDRMetadata> hdr_metadata) {
|
||||
- DCHECK(dst_color_space.IsValid());
|
||||
+ if (settings_->enable_color_correct_rendering) {
|
||||
+ DCHECK(dst_color_space.IsValid());
|
||||
+ }
|
||||
gfx::ColorSpace adjusted_src_color_space = src_color_space;
|
||||
if (adjust_src_white_level) {
|
||||
// If the input color space is HDR, and it did not specify a white level,
|
||||
@@ -4040,9 +4052,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
|
||||
if (adjust_src_white_level && src_color_space.IsHDR()) {
|
||||
// TODO(b/183236148): consider using the destination's HDR static metadata
|
||||
@@ -4050,9 +4062,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
|
||||
cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple);
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
|
||||
*new_bounds = gfx::RectF(updated_dst_rect.origin(),
|
||||
gfx::SizeF((*overlay_texture)->texture.size()));
|
||||
|
||||
@@ -4262,8 +4274,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
|
||||
@@ -4272,8 +4284,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
|
||||
|
||||
PrepareGeometry(SHARED_BINDING);
|
||||
|
||||
@@ -222,14 +222,14 @@ index f2032b6f0f3794dac20f690421369cf33356394b..e6261f1e4e85470084ce37aa043d0725
|
||||
|
||||
gfx::Transform render_matrix;
|
||||
render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
|
||||
@@ -4453,3 +4465,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
|
||||
@@ -4463,3 +4475,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
|
||||
GLRenderer::OverlayTexture::~OverlayTexture() = default;
|
||||
|
||||
} // namespace viz
|
||||
+
|
||||
+#undef PATCH_CS
|
||||
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
|
||||
index f0689a0342831498b5bde01af92839137cc0ac87..47541cb43e55b01b59f1680a8628973cc6a22afb 100644
|
||||
index 262633bdb89ffefb78091788b4b48d23e0e473e6..69016f864405f87a5ee161b52b9dacf909c52949 100644
|
||||
--- a/content/browser/gpu/gpu_process_host.cc
|
||||
+++ b/content/browser/gpu/gpu_process_host.cc
|
||||
@@ -225,6 +225,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
|
||||
@@ -241,7 +241,7 @@ index f0689a0342831498b5bde01af92839137cc0ac87..47541cb43e55b01b59f1680a8628973c
|
||||
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 c54084b7b1b7b3459a4b34f4afc0891db5cdb6a7..b5b89e2c1d97b9a1f0979f76a1ac1acbd435f677 100644
|
||||
index 3a8aa147230ab18d9f1e485decc7eb4995ac111f..abf6ae39e99d4d592412c548cbac78862eeb463f 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -213,6 +213,7 @@
|
||||
@@ -252,7 +252,7 @@ index c54084b7b1b7b3459a4b34f4afc0891db5cdb6a7..b5b89e2c1d97b9a1f0979f76a1ac1acb
|
||||
#include "ui/gl/gl_switches.h"
|
||||
#include "ui/native_theme/native_theme_features.h"
|
||||
#include "url/origin.h"
|
||||
@@ -3237,6 +3238,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
|
||||
@@ -3317,6 +3318,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[] = {
|
||||
@@ -293,7 +293,7 @@ index 628c6bca129cd58a25984ff8300bfb4c33ec7ebf..ff9ce55f2701990b5b6119c18575477b
|
||||
}
|
||||
|
||||
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 f5751beeb390b556dde8598b67b5fc9270e6805b..b155ad47f19950602000cecba52b1176ef95a749 100644
|
||||
index 82757ec0893fb1a0c4a31549d85ed95194826d8c..e7ba24aec0d1aabc0093fe0ecaf72438c6009a8f 100644
|
||||
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
|
||||
@@ -25,6 +25,7 @@
|
||||
@@ -315,7 +315,7 @@ index f5751beeb390b556dde8598b67b5fc9270e6805b..b155ad47f19950602000cecba52b1176
|
||||
// is what the renderer uses if its not threaded.
|
||||
settings.enable_checker_imaging =
|
||||
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
|
||||
index e5fd0a36f83e14f13ad37525266076d791829900..f75d17d9506e7f9aad9f95a9a2026db4dda2706e 100644
|
||||
index 4e22b4cf0bd06955af5fbac32db084f41d547545..087ec6df3e7cf53e0d79c7b3edb581dc426ff3a3 100644
|
||||
--- a/ui/gfx/mac/io_surface.cc
|
||||
+++ b/ui/gfx/mac/io_surface.cc
|
||||
@@ -20,6 +20,7 @@
|
||||
|
||||
@@ -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 c4ba0addc40a9f9b304ae207b765a0ed6f1bcb45..2e21eb0b6fcb5de410e30617f1949590dc8427f2 100644
|
||||
index 4f4e4c0af566570e276090558c8427531a370ff5..b613b7462c548061d14b14fb6ef9151f7cc2a7ac 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 @@
|
||||
@@ -482,7 +482,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 b38b11e555791ca37646bc6fad9d31509cad0533..738920fccc048d0a4471dac407619afde3811def 100644
|
||||
index 499d2ce54fa960f61bd91c040baa8a989d9b3dc1..f25796e28c6381cc1a844026f9a81e0ce9ddef0f 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -712,6 +712,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
@@ -744,6 +744,9 @@ void RenderWidgetHostImpl::WasHidden() {
|
||||
if (is_hidden_)
|
||||
return;
|
||||
|
||||
@@ -20,10 +20,10 @@ index b38b11e555791ca37646bc6fad9d31509cad0533..738920fccc048d0a4471dac407619afd
|
||||
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 1490224235f9a34fc76e688349e1bb86bbcbe967..eb2a4320080c15e1b884587cf0777f30846d99ff 100644
|
||||
index fc32f198f1aa66d11fc51a793e9d0e495f5acc36..f508236c9ae6f85a90f2e14269ee8ae7bd3625bd 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.h
|
||||
@@ -850,6 +850,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
@@ -855,6 +855,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
|
||||
mojom::CreateFrameWidgetParamsPtr
|
||||
BindAndGenerateCreateFrameWidgetParamsForNewWindow();
|
||||
|
||||
@@ -34,7 +34,7 @@ index 1490224235f9a34fc76e688349e1bb86bbcbe967..eb2a4320080c15e1b884587cf0777f30
|
||||
// |routing_id| must not be MSG_ROUTING_NONE.
|
||||
// If this object outlives |delegate|, DetachDelegate() must be called when
|
||||
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 b8ae3c5d06c09139966accc3861e2c65d6310fb9..00de546240344c20548f05ff750a86223c9613ed 100644
|
||||
index d8365d0848719b16c8a068dd62861d37e2b10938..f9accc80b305d361dae0874da774e05067438059 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
|
||||
@@ -595,7 +595,7 @@ void RenderWidgetHostViewAura::HideImpl() {
|
||||
|
||||
@@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
|
||||
should continue seeking for a real fix.
|
||||
|
||||
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
|
||||
index 3654c2b2511677afd472c4ccd62b20d3e81d240c..719cef1979ff95fa778fe11e5325a41d1d4751ba 100644
|
||||
index bf827d4e83fc3efb35de8dbb30f27bf3eef1394f..817824317183fa55fe1bc2aec224d4de6967e5a8 100644
|
||||
--- a/content/browser/renderer_host/navigator.cc
|
||||
+++ b/content/browser/renderer_host/navigator.cc
|
||||
@@ -1078,6 +1078,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1059,6 +1059,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ index 3654c2b2511677afd472c4ccd62b20d3e81d240c..719cef1979ff95fa778fe11e5325a41d
|
||||
// If this is a same-process navigation and we have timestamps for unload
|
||||
// durations, fill those metrics out as well.
|
||||
if (params.unload_start && params.unload_end &&
|
||||
@@ -1124,6 +1125,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
@@ -1105,6 +1106,7 @@ void Navigator::RecordNavigationMetrics(
|
||||
first_before_unload_start_time)
|
||||
.InMilliseconds());
|
||||
}
|
||||
|
||||
@@ -11,14 +11,14 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572
|
||||
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 ba517758ddd044a32e9c364bd803e0090d19b8cb..23717632bad15eaaf34d9190d242724cc1a4a07b 100644
|
||||
index 12c7198e22e07a745949bae3e8a6765899d39875..d8a4990222ce3ba81d51400c57be3c5d94aea953 100644
|
||||
--- a/content/renderer/render_frame_impl.cc
|
||||
+++ b/content/renderer/render_frame_impl.cc
|
||||
@@ -2278,7 +2278,7 @@ blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() {
|
||||
@@ -2328,7 +2328,7 @@ const blink::WebView* RenderFrameImpl::GetWebView() const {
|
||||
}
|
||||
|
||||
const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() {
|
||||
- return GetWebFrame()->View()->GetWebPreferences();
|
||||
- return GetWebView()->GetWebPreferences();
|
||||
+ return render_view_->GetWebView()->GetWebPreferences();
|
||||
}
|
||||
|
||||
|
||||
@@ -19,10 +19,10 @@ index fb8bbb639f6b6d93581b4eb6500a54deb331f18d..71a5b130e2c956f4d43c9a5b6a21f887
|
||||
aspect_ratio.height());
|
||||
}
|
||||
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
|
||||
index 82ec517dbd675ad8b4a78848b7d2a7f71512c2d5..4a44a9f5fe9ffa69ebd7bb10e02f7b6f8acdb21c 100644
|
||||
index 771b57e0380ff3b042fdbb2434127e8dba965b03..41fa3c23b9a5d8596f2fb44d0957ab6e1f60a95a 100644
|
||||
--- a/ui/views/win/hwnd_message_handler.cc
|
||||
+++ b/ui/views/win/hwnd_message_handler.cc
|
||||
@@ -928,8 +928,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
|
||||
@@ -926,8 +926,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
|
||||
}
|
||||
|
||||
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) {
|
||||
|
||||
@@ -9,7 +9,7 @@ correctly tagged with MAP_JIT we need to use gins page allocator instead
|
||||
of the default V8 allocator. This probably can't be usptreamed.
|
||||
|
||||
diff --git a/gin/public/v8_platform.h b/gin/public/v8_platform.h
|
||||
index 967ef1dffddfb4d6e30c7b97eacc099c70f4ef31..9c870947e2747c9c73bbf9a058a689b8b422f470 100644
|
||||
index fa0e7faad9296b9be8d662324c52f40e502f2e38..a579b359c684ccd72dcbe43f40b4aa7b4779c36b 100644
|
||||
--- a/gin/public/v8_platform.h
|
||||
+++ b/gin/public/v8_platform.h
|
||||
@@ -25,6 +25,7 @@ class GIN_EXPORT V8Platform : public v8::Platform {
|
||||
|
||||
@@ -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 81acb80ef2a52b2133dcc59a1214723345095f61..634ef00866805f3953327f92f572e370ac56e015 100644
|
||||
index dcba764424f06d0b1f331ef7dc7f33b307f6a659..0655002a824c4e33b4fc984929cc7969e3305193 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -1140,6 +1140,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
@@ -1160,6 +1160,13 @@ void NetworkContext::SetNetworkConditions(
|
||||
std::move(network_conditions));
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ index 81acb80ef2a52b2133dcc59a1214723345095f61..634ef00866805f3953327f92f572e370
|
||||
// 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 22e155061860f6782b261205f6297c09f8c6e1fa..656d1de560a1db7ff4973a9e087fcb7cd9e976e0 100644
|
||||
index 093a9bcf105b925f6c8a1491f623adcfedf4aa51..efa3f4dd97c2a00da1168f88313b6e4200a7b2ff 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -254,6 +254,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -63,10 +63,10 @@ index 22e155061860f6782b261205f6297c09f8c6e1fa..656d1de560a1db7ff4973a9e087fcb7c
|
||||
void SetEnableReferrers(bool enable_referrers) override;
|
||||
#if BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
|
||||
index 6f830a84d20e39b802b44465882f9ae0627a0759..b425a47d5a70267418fee69b55080ac05328a0b5 100644
|
||||
index a1ca0c3521cc26fd5a6ee83385516d1623e749ed..3a775db4edf1e0568c6fe23566a37358d5e5e2d2 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -952,6 +952,9 @@ interface NetworkContext {
|
||||
@@ -956,6 +956,9 @@ interface NetworkContext {
|
||||
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
|
||||
NetworkConditions? conditions);
|
||||
|
||||
@@ -77,10 +77,10 @@ index 6f830a84d20e39b802b44465882f9ae0627a0759..b425a47d5a70267418fee69b55080ac0
|
||||
SetAcceptLanguage(string new_accept_language);
|
||||
|
||||
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
|
||||
index a63f76756d4cb7e5cd60d6d7f2b2c5be5b45d3bf..13cff4ac5f699e78f3fb4fb6753b94e87f4d09e2 100644
|
||||
index a0b7e16d2297de4fb6eab21cc9411a33c20a8763..e54a43392cdaf67c2d854367204605ad66ec1f10 100644
|
||||
--- a/services/network/test/test_network_context.h
|
||||
+++ b/services/network/test/test_network_context.h
|
||||
@@ -117,6 +117,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
@@ -121,6 +121,7 @@ class TestNetworkContext : public mojom::NetworkContext {
|
||||
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
|
||||
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
|
||||
mojom::NetworkConditionsPtr conditions) override {}
|
||||
|
||||
@@ -12,7 +12,7 @@ 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 ff5dda58a3db3efeea952f0ae75cf85575e1a12c..f68aefa3d56949f42690c2a807ccffa5d2fc89cd 100644
|
||||
index b627f400d16ee1c605ef7657dc3ba63319c5fd56..455b0fd461d0c32de39800d4d7cef2ceb30dc7fb 100644
|
||||
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
|
||||
@@ -155,6 +155,7 @@
|
||||
@@ -23,7 +23,7 @@ index ff5dda58a3db3efeea952f0ae75cf85575e1a12c..f68aefa3d56949f42690c2a807ccffa5
|
||||
#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"
|
||||
@@ -1787,6 +1788,16 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
@@ -1792,6 +1793,16 @@ void WebView::ApplyWebPreferences(const web_pref::WebPreferences& prefs,
|
||||
|
||||
RuntimeEnabledFeatures::SetTranslateServiceEnabled(
|
||||
prefs.translate_service_available);
|
||||
|
||||
@@ -10,10 +10,10 @@ get this standardised, but in lieu of that, this makes MessagePort a
|
||||
whole bunch more useful!
|
||||
|
||||
diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
index 002ee34ce9a1bbcbdeb5c54967a2f22b1444cc85..c22870137449bf55a62f74d702e25fa6547baca3 100644
|
||||
index cc07bc2680c8d287369b626efb0889bf8359b863..dac42ab3a11d1a01e948e979f56502e1525e0727 100644
|
||||
--- a/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
+++ b/third_party/blink/renderer/core/messaging/message_port.cc
|
||||
@@ -158,6 +158,7 @@ void MessagePort::close() {
|
||||
@@ -159,6 +159,7 @@ void MessagePort::close() {
|
||||
Entangle(pipe.TakePort0());
|
||||
}
|
||||
closed_ = true;
|
||||
|
||||
@@ -26,10 +26,10 @@ index db0681f9278b4a60f6c25faf37fdb2aba41d65a6..58655f4285d3835b51c43e0b55fe15d9
|
||||
}
|
||||
|
||||
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
|
||||
index 519e969c3088b9990cbc596aad7b87c5e1bfc133..a414b5a5dbdbf8c05d2a0f543fa498e2563c4566 100644
|
||||
index 2ba7ea70d901b17c3f8f98cb93e2bc8a97ec8853..ad2dc2a217bdc08820fc5311a2bda08e42182620 100644
|
||||
--- a/ui/native_theme/native_theme.h
|
||||
+++ b/ui/native_theme/native_theme.h
|
||||
@@ -403,6 +403,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -404,6 +404,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
SkColor GetUnprocessedSystemColor(ColorId color_id,
|
||||
ColorScheme color_scheme) const;
|
||||
|
||||
@@ -52,7 +52,7 @@ index 519e969c3088b9990cbc596aad7b87c5e1bfc133..a414b5a5dbdbf8c05d2a0f543fa498e2
|
||||
// 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
|
||||
@@ -577,6 +593,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
@@ -578,6 +594,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
|
||||
bool forced_colors_ = false;
|
||||
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
|
||||
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
|
||||
@@ -61,10 +61,10 @@ index 519e969c3088b9990cbc596aad7b87c5e1bfc133..a414b5a5dbdbf8c05d2a0f543fa498e2
|
||||
SEQUENCE_CHECKER(sequence_checker_);
|
||||
|
||||
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
|
||||
index ae908912cd5ea1b2cd43974e1b8ea1bc0c600042..d0a34eca1ded4cbba46fe1d0655a49018b667461 100644
|
||||
index eafe512bc90d967eaadddc2e355c418ecd7dd83a..581de5b8a056dc1d529568e7c4c1f5f48555f579 100644
|
||||
--- a/ui/native_theme/native_theme_win.cc
|
||||
+++ b/ui/native_theme/native_theme_win.cc
|
||||
@@ -749,6 +749,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
@@ -748,6 +748,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
|
||||
// ...unless --force-dark-mode was specified in which case caveat emptor.
|
||||
if (InForcedColorsMode() && !IsForcedDarkMode())
|
||||
return false;
|
||||
|
||||
@@ -13,7 +13,7 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass
|
||||
then refers to the list so that it can correctly determine the data source's settings.
|
||||
|
||||
diff --git a/media/blink/multibuffer_data_source.cc b/media/blink/multibuffer_data_source.cc
|
||||
index c157471b08e12edf2ff5385e78cd4cbe2e8129a9..5ef9dbd289f50359f611290d6a42b2f2aac77977 100644
|
||||
index e43037d541ad5d387d71222d831e7119bbb7c278..d49b92f3605523c62cdc267b1424b06c345a0a8c 100644
|
||||
--- a/media/blink/multibuffer_data_source.cc
|
||||
+++ b/media/blink/multibuffer_data_source.cc
|
||||
@@ -10,9 +10,11 @@
|
||||
@@ -48,12 +48,12 @@ index c157471b08e12edf2ff5385e78cd4cbe2e8129a9..5ef9dbd289f50359f611290d6a42b2f2
|
||||
+ GetStreamingSchemes()->push_back(new_scheme);
|
||||
+}
|
||||
+
|
||||
class MultibufferDataSource::ReadOperation {
|
||||
class MultiBufferDataSource::ReadOperation {
|
||||
public:
|
||||
ReadOperation(int64_t position,
|
||||
@@ -153,7 +167,14 @@ bool MultibufferDataSource::media_has_played() const {
|
||||
@@ -153,7 +167,14 @@ bool MultiBufferDataSource::media_has_played() const {
|
||||
|
||||
bool MultibufferDataSource::AssumeFullyBuffered() const {
|
||||
bool MultiBufferDataSource::AssumeFullyBuffered() const {
|
||||
DCHECK(url_data_);
|
||||
- return !url_data_->url().SchemeIsHTTPOrHTTPS();
|
||||
+
|
||||
@@ -66,12 +66,12 @@ index c157471b08e12edf2ff5385e78cd4cbe2e8129a9..5ef9dbd289f50359f611290d6a42b2f2
|
||||
+ return true;
|
||||
}
|
||||
|
||||
void MultibufferDataSource::SetReader(MultiBufferReader* reader) {
|
||||
void MultiBufferDataSource::SetReader(MultiBufferReader* reader) {
|
||||
diff --git a/media/blink/multibuffer_data_source.h b/media/blink/multibuffer_data_source.h
|
||||
index 2f35c43811e98679c739d1d672fd6dce517ea24f..b598d58c26a12f0e97ecfcb611baf46a86af4a62 100644
|
||||
index 1ee6944629ab348f327848f6bda8b521e9fc3db4..3c4dfcf25ec67a8ca1e3a2ae1941386990e63827 100644
|
||||
--- a/media/blink/multibuffer_data_source.h
|
||||
+++ b/media/blink/multibuffer_data_source.h
|
||||
@@ -32,6 +32,8 @@ class BufferedDataSourceHost;
|
||||
@@ -31,6 +31,8 @@ class BufferedDataSourceHost;
|
||||
class MediaLog;
|
||||
class MultiBufferReader;
|
||||
|
||||
|
||||
@@ -7,10 +7,10 @@ Subject: feat: allow embedders to add observers on created hunspell
|
||||
This patch is used by Electron to implement spellchecker events.
|
||||
|
||||
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
index 14e9f03d5663e68082827fb0a00f61ca03ead8d0..4ff0bc6f55de133aa0622690665ddcf42c791f5a 100644
|
||||
index 340667d184550f09077c0c6afb3e0befc9f3044e..c60be9ac250466dc882d950c4ec64787c0c19053 100644
|
||||
--- a/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
|
||||
@@ -482,6 +482,9 @@ void SpellcheckService::LoadDictionaries() {
|
||||
@@ -466,6 +466,9 @@ void SpellcheckService::LoadDictionaries() {
|
||||
std::make_unique<SpellcheckHunspellDictionary>(
|
||||
dictionary, platform_spellcheck_language, context_, this));
|
||||
hunspell_dictionaries_.back()->AddObserver(this);
|
||||
@@ -20,7 +20,7 @@ index 14e9f03d5663e68082827fb0a00f61ca03ead8d0..4ff0bc6f55de133aa0622690665ddcf4
|
||||
hunspell_dictionaries_.back()->Load();
|
||||
}
|
||||
|
||||
@@ -534,6 +537,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
|
||||
@@ -518,6 +521,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
|
||||
(!hunspell_dictionaries_.empty() || enable_if_uninitialized);
|
||||
}
|
||||
|
||||
|
||||
@@ -81,10 +81,10 @@ index 1026b739d283f0fc252fa2af83a6d4cf51bc8553..fe562ab60ce98b8bb0c5080a6428deb3
|
||||
private:
|
||||
const HWND hwnd_;
|
||||
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
|
||||
index 2ff8732060011e2e1d06861e1197c80b2fba2692..3b954f2f5ae931bf4c297141137315ebbff03cdc 100644
|
||||
index 7692a2aaf9e4aced560ee4af170e967b7d612eb9..85a2af12aee6eca62b624ae68bccf824750b367b 100644
|
||||
--- a/components/viz/service/BUILD.gn
|
||||
+++ b/components/viz/service/BUILD.gn
|
||||
@@ -135,6 +135,8 @@ viz_component("service") {
|
||||
@@ -137,6 +137,8 @@ viz_component("service") {
|
||||
"display_embedder/output_surface_provider_impl.h",
|
||||
"display_embedder/server_shared_bitmap_manager.cc",
|
||||
"display_embedder/server_shared_bitmap_manager.h",
|
||||
@@ -532,7 +532,7 @@ index 83a23404d1c029af6f7e7aa695bfe60e71d86fde..eef92d3366715774670ebcdcb76ad84d
|
||||
compositor_data.display_client->GetBoundRemote(resize_task_runner_);
|
||||
|
||||
diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom
|
||||
index 409115f95787e3cf037f762a33368b173441012f..45a7a1607b8711420ba4e1a5455a61fb7d8b75ac 100644
|
||||
index 03ad7c39128fc408d576a23e595021ffa3238423..de1c1f6984f8d81081643415d1724bce333ca940 100644
|
||||
--- a/services/viz/privileged/mojom/compositing/display_private.mojom
|
||||
+++ b/services/viz/privileged/mojom/compositing/display_private.mojom
|
||||
@@ -90,7 +90,6 @@ interface DisplayClient {
|
||||
@@ -567,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 fe4e33a62087ce5714c897d75373c061f9a1d3f9..35daaf212772863b6b5def361ad5d467af7dabd2 100644
|
||||
index 5bf36e2873bfb7dfa46ca6f010c780f1f02235ac..0378d1246930c3dc4ac8b4d1886fc5dc497dcb66 100644
|
||||
--- a/ui/compositor/compositor.h
|
||||
+++ b/ui/compositor/compositor.h
|
||||
@@ -80,6 +80,7 @@ class DisplayPrivate;
|
||||
@@ -81,6 +81,7 @@ class DisplayPrivate;
|
||||
class ExternalBeginFrameController;
|
||||
} // namespace mojom
|
||||
class ContextProvider;
|
||||
@@ -578,7 +578,7 @@ index fe4e33a62087ce5714c897d75373c061f9a1d3f9..35daaf212772863b6b5def361ad5d467
|
||||
class HostFrameSinkManager;
|
||||
class LocalSurfaceId;
|
||||
class RasterContextProvider;
|
||||
@@ -136,6 +137,16 @@ class COMPOSITOR_EXPORT ContextFactory {
|
||||
@@ -137,6 +138,16 @@ class COMPOSITOR_EXPORT ContextFactory {
|
||||
virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
|
||||
};
|
||||
|
||||
@@ -595,7 +595,7 @@ index fe4e33a62087ce5714c897d75373c061f9a1d3f9..35daaf212772863b6b5def361ad5d467
|
||||
// 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
|
||||
@@ -171,6 +182,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -172,6 +183,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
// Schedules a redraw of the layer tree associated with this compositor.
|
||||
void ScheduleDraw();
|
||||
|
||||
@@ -605,7 +605,7 @@ index fe4e33a62087ce5714c897d75373c061f9a1d3f9..35daaf212772863b6b5def361ad5d467
|
||||
// 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
|
||||
@@ -442,6 +456,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
@@ -443,6 +457,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
|
||||
|
||||
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ patch and doing further investigation in the future. This patch cannot
|
||||
be upstreamed.
|
||||
|
||||
diff --git a/sandbox/linux/bpf_dsl/bpf_dsl.cc b/sandbox/linux/bpf_dsl/bpf_dsl.cc
|
||||
index 82a40696b8756305e6af83beec351c58c9c1a9e6..5ef1852331b8ebe0834c9951fb67177226997e8b 100644
|
||||
index 846dc7a83d12be57cb91bd0a7f9e698990776684..1c3dba162b8eb4af28c78e84b5553447e4f1c76a 100644
|
||||
--- a/sandbox/linux/bpf_dsl/bpf_dsl.cc
|
||||
+++ b/sandbox/linux/bpf_dsl/bpf_dsl.cc
|
||||
@@ -305,6 +305,7 @@ Elser::~Elser() {
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: John Kleinschmidt <jkleinsc@github.com>
|
||||
Date: Thu, 9 Jul 2020 11:16:30 -0400
|
||||
Subject: fix: check IsSecureEventInputEnabled in constructor before setting
|
||||
SetPasswordInputEnabled to true
|
||||
|
||||
It appears that macOS 12 has IsSecureEventInputEnabled set to true initially.
|
||||
|
||||
diff --git a/ui/base/cocoa/secure_password_input.mm b/ui/base/cocoa/secure_password_input.mm
|
||||
index c9d003216ec51407d80b2c3ed0a77e747d203069..f10829d7fe369d2419bb1f0828d6d1ec7c8f57e1 100644
|
||||
--- a/ui/base/cocoa/secure_password_input.mm
|
||||
+++ b/ui/base/cocoa/secure_password_input.mm
|
||||
@@ -41,7 +41,7 @@ void SetPasswordInputEnabled(bool enabled) {
|
||||
namespace ui {
|
||||
|
||||
ScopedPasswordInputEnabler::ScopedPasswordInputEnabler() {
|
||||
- if (!g_password_input_counter) {
|
||||
+ if (!g_password_input_counter && !IsSecureEventInputEnabled()) {
|
||||
SetPasswordInputEnabled(true);
|
||||
}
|
||||
++g_password_input_counter;
|
||||
@@ -6,7 +6,7 @@ Subject: fix: export zlib symbols
|
||||
This patch sets ZLIB_DLL so that we properly export zlib symbols.
|
||||
|
||||
diff --git a/third_party/zlib/BUILD.gn b/third_party/zlib/BUILD.gn
|
||||
index d64cb38bcdab4fbf9449f259d4dd62d39edcbfe1..6e4cd5c43d98145df2eca6b1dbe6d0e4047c2750 100644
|
||||
index 74ecbd19ae270e3fead8702187aa0c78d42fcc4d..72cb46657a800259ce6541164909694fd54a3aaf 100644
|
||||
--- a/third_party/zlib/BUILD.gn
|
||||
+++ b/third_party/zlib/BUILD.gn
|
||||
@@ -301,6 +301,10 @@ component("zlib") {
|
||||
|
||||
@@ -8,31 +8,33 @@ we invoke it in order to expose contents.decrementCapturerCount([stayHidden, sta
|
||||
to users. We should try to upstream this.
|
||||
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.h b/content/browser/web_contents/web_contents_impl.h
|
||||
index 5212e1547796cae0c2c2508e5c0fcdab18190895..db8b468eecca3e980075072e50863738c280e1a2 100644
|
||||
index c8013e9462f10dbd2ddc78f614f04351a9568acf..0a13ec5e447c1dcb8984712bd578960750b39d6d 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -1738,9 +1738,11 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
// shown in the address bar), as opposed to one in for example a Prerender.
|
||||
bool IsPrimaryFrameTree(const FrameTree& frame_tree) const;
|
||||
@@ -1769,10 +1769,12 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
// outermost frame trees in this WebContents.
|
||||
std::vector<RenderFrameHostImpl*> GetOutermostMainFrames();
|
||||
|
||||
+ public:
|
||||
// Called when the base::ScopedClosureRunner returned by
|
||||
// IncrementCapturerCount() is destructed.
|
||||
- void DecrementCapturerCount(bool stay_hidden, bool stay_awake);
|
||||
+ void DecrementCapturerCount(bool stay_hidden, bool stay_awake) override;
|
||||
+ private:
|
||||
|
||||
+ private:
|
||||
// Calculates the PageVisibilityState for |visibility|, taking the capturing
|
||||
// state into account.
|
||||
PageVisibilityState CalculatePageVisibilityState(Visibility visibility) const;
|
||||
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
|
||||
index 3b7b5facc0cd2454a83f9034d63add1e684f438c..409bd016ee867d2e826feb441b6b8f15f56c0dd6 100644
|
||||
index e4e70e4d378cf13eb00d7327b88e2501dcfc7f84..7c0d9ee9311de772f8966bacf7908480b89c7915 100644
|
||||
--- a/content/public/browser/web_contents.h
|
||||
+++ b/content/public/browser/web_contents.h
|
||||
@@ -561,6 +561,7 @@ class WebContents : public PageNavigator,
|
||||
const gfx::Size& capture_size,
|
||||
@@ -582,6 +582,8 @@ class WebContents : public PageNavigator,
|
||||
bool stay_hidden,
|
||||
bool stay_awake) WARN_UNUSED_RESULT = 0;
|
||||
+ virtual void DecrementCapturerCount(bool stay_hidden, bool stay_awake) = 0;
|
||||
|
||||
// Returns true if audio/screenshot/video is being captured by the embedder,
|
||||
// as indicated by calls to IncrementCapturerCount().
|
||||
+ virtual void DecrementCapturerCount(bool stay_hidden, bool stay_awake) = 0;
|
||||
+
|
||||
// Getter for the capture handle, which allows a captured application to
|
||||
// opt-in to exposing information to its capturer(s).
|
||||
virtual const blink::mojom::CaptureHandleConfig& GetCaptureHandleConfig() = 0;
|
||||
|
||||
@@ -10,10 +10,10 @@ them should they exist.
|
||||
This will be upstreamed.
|
||||
|
||||
diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h
|
||||
index 07fcfad6ecf676068d3f0b44f97e748d58b13016..f165eea20ca3b120f5fb499248d65fa7befc7686 100644
|
||||
index 0fb5c91b8abcdd7e674251bafebfc2c51044ef77..8c134bae25afeb0dbbb6e33182f053bb34e2f978 100644
|
||||
--- a/printing/printing_context_mac.h
|
||||
+++ b/printing/printing_context_mac.h
|
||||
@@ -82,6 +82,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext {
|
||||
@@ -83,6 +83,10 @@ class COMPONENT_EXPORT(PRINTING) PrintingContextMac : public PrintingContext {
|
||||
// Returns true if the orientation was set.
|
||||
bool SetOrientationIsLandscape(bool landscape);
|
||||
|
||||
@@ -25,10 +25,10 @@ index 07fcfad6ecf676068d3f0b44f97e748d58b13016..f165eea20ca3b120f5fb499248d65fa7
|
||||
// Returns true if duplex mode is set.
|
||||
bool SetDuplexModeInPrintSettings(mojom::DuplexMode mode);
|
||||
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
|
||||
index 1a52ea3cd11b3ec573cfef6f6f03ab39fcb998d6..c8a17ef24a4bb62fc03b361d5153acc8f0098c6b 100644
|
||||
index 9f80fe6f10515849dd02d580db9852e6fbbbaa30..67f5b76a8141857ba02abd806341f06b07a4ebdc 100644
|
||||
--- a/printing/printing_context_mac.mm
|
||||
+++ b/printing/printing_context_mac.mm
|
||||
@@ -189,7 +189,8 @@ PMPaper MatchPaper(CFArrayRef paper_list,
|
||||
@@ -190,7 +190,8 @@ PMPaper MatchPaper(CFArrayRef paper_list,
|
||||
!SetCollateInPrintSettings(settings_->collate()) ||
|
||||
!SetDuplexModeInPrintSettings(settings_->duplex_mode()) ||
|
||||
!SetOutputColor(static_cast<int>(settings_->color())) ||
|
||||
@@ -38,7 +38,7 @@ index 1a52ea3cd11b3ec573cfef6f6f03ab39fcb998d6..c8a17ef24a4bb62fc03b361d5153acc8
|
||||
return OnError();
|
||||
}
|
||||
}
|
||||
@@ -342,6 +343,22 @@ PMPaper MatchPaper(CFArrayRef paper_list,
|
||||
@@ -343,6 +344,22 @@ PMPaper MatchPaper(CFArrayRef paper_list,
|
||||
return PMSetCopies(print_settings, copies, false) == noErr;
|
||||
}
|
||||
|
||||
@@ -100,7 +100,7 @@ index fe7fc797504dcc7097a3d79a2dab2c18de737048..20c63b1f657f2969850b31eaafdff7e5
|
||||
} else {
|
||||
// No need to bother, we don't know how many pages are available.
|
||||
diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc
|
||||
index 5e7dd30b97c4ca3e6f14636955791ab0c6b63d6d..11a521a5f261e8306a7159487ffad6e4f990a0b2 100644
|
||||
index 62108f0eb91fd04235d29a5e010aa600f76f8288..0e21b30dbe3f6daca9dce6d2b89b063c13d044ee 100644
|
||||
--- a/ui/gtk/printing/print_dialog_gtk.cc
|
||||
+++ b/ui/gtk/printing/print_dialog_gtk.cc
|
||||
@@ -238,6 +238,24 @@ void PrintDialogGtk::UpdateSettings(
|
||||
|
||||
@@ -12,7 +12,7 @@ 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 67a7140453728a685ad8fca283a1465ddc4a8a51..1b7bed03e5c3231fdd73aa369a598db5a883bfec 100644
|
||||
index f5fcfe6392a7b2f49ca491815411d110dc14d532..359f5678f52047c14ba2fa9dbadebf4e84b92146 100644
|
||||
--- a/chrome/browser/pdf/pdf_extension_util.cc
|
||||
+++ b/chrome/browser/pdf/pdf_extension_util.cc
|
||||
@@ -10,8 +10,7 @@
|
||||
|
||||
@@ -6,10 +6,10 @@ Subject: frame_host_manager.patch
|
||||
Allows embedder to intercept site instances created by chromium.
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
index 6d84bf99d112eb2877cc1b022a90cee4d1043b0a..0b03f38856a6a0b7896b7432ad10d1ef8d92a34e 100644
|
||||
index 79caf35e2fb7a752c88418216731cbc27065447c..1ffdf5ce375255fcd0fffff4d2eb526f92ecd52a 100644
|
||||
--- a/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
|
||||
@@ -2942,6 +2942,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
@@ -2936,6 +2936,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
|
||||
request->ResetStateForSiteInstanceChange();
|
||||
}
|
||||
|
||||
@@ -20,10 +20,10 @@ index 6d84bf99d112eb2877cc1b022a90cee4d1043b0a..0b03f38856a6a0b7896b7432ad10d1ef
|
||||
}
|
||||
|
||||
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
|
||||
index c24c05c17e5511d247fb93a4f987dd852742b5a4..57fac275ce40087e8928df51f50f191e07690e42 100644
|
||||
index 5ec83c0a56fc91d3c13d97dd8c58a286b6358146..7f729a5e626eb6025d9f3b761e4210eb06db3971 100644
|
||||
--- a/content/public/browser/content_browser_client.h
|
||||
+++ b/content/public/browser/content_browser_client.h
|
||||
@@ -263,6 +263,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
@@ -265,6 +265,11 @@ class CONTENT_EXPORT ContentBrowserClient {
|
||||
|
||||
virtual ~ContentBrowserClient() = default;
|
||||
|
||||
|
||||
@@ -38,10 +38,10 @@ index eaf06bd895f3ed390d1b206b2dc5adcca5c87e72..6bd634c4a66999648c51b8867c0d9b0c
|
||||
v8::Isolate* isolate() { return isolate_; }
|
||||
|
||||
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
|
||||
index f4d6372c79a7e0b91df287be19494129c391d50d..7e247ee07de099a3cff1cdfdf2dabe207d3c648b 100644
|
||||
index 8bac97b6809a1f09020db980790d538c8ff03033..5230314293c6970d99f3700ec616eb99f5fd5dbd 100644
|
||||
--- a/gin/v8_initializer.cc
|
||||
+++ b/gin/v8_initializer.cc
|
||||
@@ -216,12 +216,14 @@ void SetV8FlagsFormatted(const char* format, ...) {
|
||||
@@ -207,12 +207,14 @@ void SetV8FlagsFormatted(const char* format, ...) {
|
||||
} // namespace
|
||||
|
||||
// static
|
||||
|
||||
@@ -40,7 +40,7 @@ index 9b75a03bb11bb9e9338017a1a287209bdb0636c5..aab43444bdb1a968d9c880028144ac81
|
||||
// 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 82c37883b0760e283e1539d3c7d14176a25e9bbd..d48f443c5ea0ebd7b42f23eb1ef72a31d6e2bb37 100644
|
||||
index 420dbbdfab57b18edc0ea646acac6d9d8748471d..7f00895f75177016045cbd016bc55cbec0a5f4ee 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
|
||||
@@ -1082,6 +1082,11 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
|
||||
@@ -56,10 +56,10 @@ index 82c37883b0760e283e1539d3c7d14176a25e9bbd..d48f443c5ea0ebd7b42f23eb1ef72a31
|
||||
|
||||
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 9fcaec43515ca2a488ddee08e9dd275c966a7d40..b8508a6c11d46a7f3c7e3143924ced78a2b3ddc0 100644
|
||||
index c679229beae9440a9fc92f39be76a1d37065d586..a0468d452604a5dee05f5dd5d0bb6256d2808aea 100644
|
||||
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
|
||||
@@ -76,6 +76,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
||||
@@ -77,6 +77,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {
|
||||
bool VulkanRequested() const;
|
||||
void PostCreateThreads();
|
||||
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 c149ea34605b6640fffb0f84cf9dac3ab8fa2e49..11f211b65fddee011fedd0ff281a71549598d6b5 100644
|
||||
index 699091dadd3aa262df4d81387851fda479a48457..b1cc92faca468b9ccb9d63f5eae98ae4b9ac5e3a 100644
|
||||
--- a/tools/gritsettings/resource_ids.spec
|
||||
+++ b/tools/gritsettings/resource_ids.spec
|
||||
@@ -765,6 +765,11 @@
|
||||
@@ -782,6 +782,11 @@
|
||||
"includes": [3880],
|
||||
},
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ require a largeish patch to get working, so just redirect it to our
|
||||
implementation instead.
|
||||
|
||||
diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
index b264d431b0581fa88bd2a22a2736cf7c853cdb16..a4b29f3911b6c93732adbda61a2c92356cabd294 100644
|
||||
index f993f92509620752c861e7ae447bc375f1453e80..4f562b30cbb6079ecf62c54e1538cca4140f497c 100644
|
||||
--- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
+++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
|
||||
@@ -9,8 +9,8 @@
|
||||
|
||||
@@ -95,7 +95,7 @@ index 5a23ea7558814eec59eda349bc7194afcb70d01e..c9147bbe5a225291552082434e5db342
|
||||
// The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that
|
||||
// can only be accomplished by overriding methods.
|
||||
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
index 73e450939f1232bb8f2e19067c15c1f465ca6745..a19db25096260258ae2debc16bc5612edd62e411 100644
|
||||
index e301610a2d7cc0559e1bca7947f4f557b32b3c94..c98a6a1d02a607bb30869c14e915ed12f1941b91 100644
|
||||
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
|
||||
@@ -16,7 +16,9 @@
|
||||
|
||||
@@ -44,7 +44,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 f20d8147d52df79b27e65036d947d3a8fbef93e4..f176e98283a86bd63109f3d2aa2754081d7bb4ed 100644
|
||||
index 2ccec9187c4ed3920f3df3f78994a18f797e4f49..a0598f6c928fcffe0c3f82d5c390f8a4fc7a1d90 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
|
||||
@@ -559,10 +559,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
|
||||
@@ -114,10 +114,10 @@ index 3116e9098aad4fab8d1f8d2bb74b2437548b3566..1bb3ed4c7ec4f03c2512c6321c016fac
|
||||
// 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 e8364021255814f7d3d41688f623a189bc44f52e..c4ba0addc40a9f9b304ae207b765a0ed6f1bcb45 100644
|
||||
index 9ac29edf10f8ffd2e1e4db549a7977d8f26e8c22..4f4e4c0af566570e276090558c8427531a370ff5 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
|
||||
@@ -241,8 +241,10 @@
|
||||
@@ -240,8 +240,10 @@
|
||||
void RenderWidgetHostViewMac::MigrateNSViewBridge(
|
||||
remote_cocoa::mojom::Application* remote_cocoa_application,
|
||||
uint64_t parent_ns_view_id) {
|
||||
@@ -128,7 +128,7 @@ index e8364021255814f7d3d41688f623a189bc44f52e..c4ba0addc40a9f9b304ae207b765a0ed
|
||||
|
||||
// Disconnect from the previous bridge (this will have the effect of
|
||||
// destroying the associated bridge), and close the receiver (to allow it
|
||||
@@ -1435,8 +1437,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1438,8 +1440,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
gfx::NativeViewAccessible
|
||||
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
|
||||
@@ -139,7 +139,7 @@ index e8364021255814f7d3d41688f623a189bc44f52e..c4ba0addc40a9f9b304ae207b765a0ed
|
||||
return [GetInProcessNSView() window];
|
||||
}
|
||||
|
||||
@@ -1480,9 +1484,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1483,9 +1487,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
}
|
||||
|
||||
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
|
||||
@@ -151,7 +151,7 @@ index e8364021255814f7d3d41688f623a189bc44f52e..c4ba0addc40a9f9b304ae207b765a0ed
|
||||
}
|
||||
|
||||
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
|
||||
@@ -1976,12 +1982,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
@@ -1979,12 +1985,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
|
||||
|
||||
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
|
||||
const std::vector<uint8_t>& window_token) {
|
||||
@@ -167,10 +167,10 @@ index e8364021255814f7d3d41688f623a189bc44f52e..c4ba0addc40a9f9b304ae207b765a0ed
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
|
||||
index a7fd3c7812a65cd10a53a2e29e7dd50b0aa428e9..f19cba3289def3fbd70b6106f7c4491b320bf608 100644
|
||||
index a6b721245a5b141b7ee3170b92335a5f89eaebb6..8a370c537f62ee2246f0d64ee1f1f1613e76bf29 100644
|
||||
--- a/ui/base/BUILD.gn
|
||||
+++ b/ui/base/BUILD.gn
|
||||
@@ -328,6 +328,13 @@ component("base") {
|
||||
@@ -320,6 +320,13 @@ component("base") {
|
||||
]
|
||||
}
|
||||
|
||||
@@ -205,7 +205,7 @@ index e7adfee3210ec723c687adfcc4bee8827ef643e7..25a924a47eeb30d783ef83dbb4896c4b
|
||||
+
|
||||
#endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_
|
||||
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
index b6d860060e4ba86d8871bd19e7011a64eb057350..040a18fa5049698429d2c51b52d3240977657751 100644
|
||||
index 9f5543d22e7a72dc7ca031e04434279b5066215c..2eaaa54778f1f5d450389967ae77c5e4d578eb04 100644
|
||||
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
|
||||
@@ -30,7 +30,9 @@
|
||||
@@ -218,7 +218,7 @@ index b6d860060e4ba86d8871bd19e7011a64eb057350..040a18fa5049698429d2c51b52d32409
|
||||
@class NSView;
|
||||
|
||||
namespace remote_cocoa {
|
||||
@@ -416,11 +418,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
|
||||
@@ -420,11 +422,13 @@ class VIEWS_EXPORT NativeWidgetMacNSWindowHost
|
||||
mojo::AssociatedRemote<remote_cocoa::mojom::NativeWidgetNSWindow>
|
||||
remote_ns_window_remote_;
|
||||
|
||||
@@ -233,7 +233,7 @@ index b6d860060e4ba86d8871bd19e7011a64eb057350..040a18fa5049698429d2c51b52d32409
|
||||
// Used to force the NSApplication's focused accessibility element to be the
|
||||
// views::Views accessibility tree when the NSView for this is focused.
|
||||
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
index 1de90c3bf77b2b1d69d10cd0fbe6e963f7b48861..f437109802677f1c237116eadfc2952249daf084 100644
|
||||
index a756f7b856196606c1cd4fc26e8a907d9891d36c..2dce88094b9a697bd7f4d85a69294a098a2dd427 100644
|
||||
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
|
||||
@@ -285,14 +285,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -259,7 +259,7 @@ index 1de90c3bf77b2b1d69d10cd0fbe6e963f7b48861..f437109802677f1c237116eadfc29522
|
||||
}
|
||||
|
||||
remote_cocoa::mojom::NativeWidgetNSWindow*
|
||||
@@ -1173,6 +1181,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -1197,6 +1205,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
|
||||
const std::vector<uint8_t>& window_token,
|
||||
const std::vector<uint8_t>& view_token) {
|
||||
@@ -267,7 +267,7 @@ index 1de90c3bf77b2b1d69d10cd0fbe6e963f7b48861..f437109802677f1c237116eadfc29522
|
||||
remote_window_accessible_ =
|
||||
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
|
||||
remote_view_accessible_ =
|
||||
@@ -1180,14 +1189,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
@@ -1204,14 +1213,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
|
||||
[remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()];
|
||||
[remote_view_accessible_
|
||||
setTopLevelUIElement:remote_window_accessible_.get()];
|
||||
|
||||
@@ -46,18 +46,18 @@ index 65adc773e82d99c5dd57d52e84a71e67d676be13..f5d0318c1c4fa036a233142cd6eea0a0
|
||||
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 754d25d76da46d5a02973e314893e8d70fcf9b68..cfefed563c59f7f97304b4cb7d5b008da713fc3c 100644
|
||||
index 3e47fed937bf05eff5417d457c85cfb73af7c55f..c21833838d60cad275630be9d2d202f4c1b70c15 100644
|
||||
--- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
|
||||
+++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
|
||||
@@ -177,6 +177,7 @@
|
||||
if (property_name == "AXIndexForChildUIElement") { // UIElement
|
||||
@@ -204,6 +204,7 @@
|
||||
property_name == "AXTextMarkerRangeForUIElement") { // UIElement
|
||||
return OptionalNSObject::NotNilOrError(PropertyNodeToUIElement(arg_node));
|
||||
}
|
||||
+#ifndef MAS_BUILD
|
||||
if (property_name == "AXIndexForTextMarker") { // TextMarker
|
||||
return OptionalNSObject::NotNilOrError(PropertyNodeToTextMarker(arg_node));
|
||||
}
|
||||
@@ -184,6 +185,7 @@
|
||||
if (property_name == "AXIndexForTextMarker" ||
|
||||
property_name == "AXNextWordEndTextMarkerForTextMarker" ||
|
||||
property_name ==
|
||||
@@ -214,6 +215,7 @@
|
||||
return OptionalNSObject::NotNilOrError(
|
||||
PropertyNodeToTextMarkerRange(arg_node));
|
||||
}
|
||||
@@ -65,7 +65,7 @@ index 754d25d76da46d5a02973e314893e8d70fcf9b68..cfefed563c59f7f97304b4cb7d5b008d
|
||||
|
||||
return OptionalNSObject::NotApplicable();
|
||||
}
|
||||
@@ -249,6 +251,7 @@
|
||||
@@ -279,6 +281,7 @@
|
||||
return uielement;
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ index 754d25d76da46d5a02973e314893e8d70fcf9b68..cfefed563c59f7f97304b4cb7d5b008d
|
||||
id AttributeInvoker::DictNodeToTextMarker(
|
||||
const AXPropertyNode& dictnode) const {
|
||||
if (!dictnode.IsDict()) {
|
||||
@@ -356,6 +359,7 @@ OptionalNSObject TextMarkerRangeGetEndMarker(const OptionalNSObject& obj) {
|
||||
@@ -386,6 +389,7 @@ OptionalNSObject TextMarkerRangeGetEndMarker(const OptionalNSObject& obj) {
|
||||
return OptionalNSObject::NotNilOrError(content::AXTextMarkerFrom(
|
||||
cocoa_node, range.focus()->text_offset(), range.focus()->affinity()));
|
||||
}
|
||||
@@ -125,10 +125,10 @@ index a7d6351854d08926c4e9c43c95e9075bd4d4c728..9c89595cb6c37527b96b4afde3871333
|
||||
// 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 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fba5cc9e3d 100644
|
||||
index 30a503578611d87227e21a7d3acc1637d45ba728..41e82f5576eded04334983af2a98eba3764ca947 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
|
||||
@@ -203,6 +203,7 @@
|
||||
@@ -205,6 +205,7 @@
|
||||
NSString* const NSAccessibilityLengthForTextMarkerRangeParameterizedAttribute =
|
||||
@"AXLengthForTextMarkerRange";
|
||||
|
||||
@@ -136,7 +136,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
// Private attributes that can be used for testing text markers, e.g. in dump
|
||||
// tree tests.
|
||||
NSString* const
|
||||
@@ -214,6 +215,7 @@
|
||||
@@ -216,6 +217,7 @@
|
||||
NSString* const
|
||||
NSAccessibilityTextMarkerNodeDebugDescriptionParameterizedAttribute =
|
||||
@"AXTextMarkerNodeDebugDescription";
|
||||
@@ -144,7 +144,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
|
||||
// Other private attributes.
|
||||
NSString* const NSAccessibilityIdentifierChromeAttribute = @"ChromeAXNodeId";
|
||||
@@ -238,6 +240,7 @@
|
||||
@@ -240,6 +242,7 @@
|
||||
// VoiceOver uses -1 to mean "no limit" for AXResultsLimit.
|
||||
const int kAXResultsLimitNoLimit = -1;
|
||||
|
||||
@@ -152,7 +152,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
extern "C" {
|
||||
|
||||
// The following are private accessibility APIs required for cursor navigation
|
||||
@@ -476,6 +479,7 @@ void AddMisspelledTextAttributes(const BrowserAccessibility::AXRange& ax_range,
|
||||
@@ -478,6 +481,7 @@ void AddMisspelledTextAttributes(const BrowserAccessibility::AXRange& ax_range,
|
||||
AddMisspelledTextAttributes(ax_range, attributed_text);
|
||||
return attributed_text;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
|
||||
// Returns an autoreleased copy of the AXNodeData's attribute.
|
||||
NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility,
|
||||
@@ -747,6 +751,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
|
||||
@@ -749,6 +753,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
|
||||
#define NSAccessibilityLanguageAttribute @"AXLanguage"
|
||||
#endif
|
||||
|
||||
@@ -168,7 +168,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
bool content::IsAXTextMarker(id object) {
|
||||
if (object == nil)
|
||||
return false;
|
||||
@@ -790,6 +795,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
|
||||
@@ -792,6 +797,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
|
||||
kCFAllocatorDefault, anchor_textmarker, focus_textmarker);
|
||||
return [static_cast<id>(cf_marker_range) autorelease];
|
||||
}
|
||||
@@ -176,7 +176,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
|
||||
@implementation BrowserAccessibilityCocoa
|
||||
|
||||
@@ -829,7 +835,9 @@ + (void)initialize {
|
||||
@@ -831,7 +837,9 @@ + (void)initialize {
|
||||
{NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
|
||||
{NSAccessibilityElementBusyAttribute, @"elementBusy"},
|
||||
{NSAccessibilityEnabledAttribute, @"enabled"},
|
||||
@@ -186,7 +186,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
{NSAccessibilityExpandedAttribute, @"expanded"},
|
||||
{NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"},
|
||||
{NSAccessibilityFocusedAttribute, @"focused"},
|
||||
@@ -841,8 +849,10 @@ + (void)initialize {
|
||||
@@ -843,8 +851,10 @@ + (void)initialize {
|
||||
{NSAccessibilityHighestEditableAncestorAttribute,
|
||||
@"highestEditableAncestor"},
|
||||
{NSAccessibilityIndexAttribute, @"index"},
|
||||
@@ -197,7 +197,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
{NSAccessibilityInvalidAttribute, @"invalid"},
|
||||
{NSAccessibilityIsMultiSelectableAttribute, @"isMultiSelectable"},
|
||||
{NSAccessibilityLanguageAttribute, @"language"},
|
||||
@@ -864,13 +874,17 @@ + (void)initialize {
|
||||
@@ -867,13 +877,17 @@ + (void)initialize {
|
||||
{NSAccessibilityRowsAttribute, @"rows"},
|
||||
// TODO(aboxhall): expose
|
||||
// NSAccessibilityServesAsTitleForUIElementsAttribute
|
||||
@@ -215,7 +215,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
{NSAccessibilitySizeAttribute, @"size"},
|
||||
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
|
||||
{NSAccessibilitySubroleAttribute, @"subrole"},
|
||||
@@ -1374,6 +1388,7 @@ - (NSNumber*)enabled {
|
||||
@@ -1377,6 +1391,7 @@ - (NSNumber*)enabled {
|
||||
ax::mojom::Restriction::kDisabled);
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
// Returns a text marker that points to the last character in the document that
|
||||
// can be selected with VoiceOver.
|
||||
- (id)endTextMarker {
|
||||
@@ -1382,6 +1397,7 @@ - (id)endTextMarker {
|
||||
@@ -1385,6 +1400,7 @@ - (id)endTextMarker {
|
||||
BrowserAccessibility::AXPosition position = _owner->CreatePositionAt(0);
|
||||
return CreateTextMarker(position->CreatePositionAtEndOfContent());
|
||||
}
|
||||
@@ -231,7 +231,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
|
||||
- (NSNumber*)expanded {
|
||||
if (![self instanceActive])
|
||||
@@ -1582,6 +1598,7 @@ - (bool)findRowIndex:(BrowserAccessibilityCocoa*)toFind
|
||||
@@ -1585,6 +1601,7 @@ - (bool)findRowIndex:(BrowserAccessibilityCocoa*)toFind
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
- (NSNumber*)insertionPointLineNumber {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -1607,6 +1624,7 @@ - (NSNumber*)insertionPointLineNumber {
|
||||
@@ -1610,6 +1627,7 @@ - (NSNumber*)insertionPointLineNumber {
|
||||
caretPosition->AsTextPosition()->text_offset());
|
||||
return @(std::distance(lineBreaks.begin(), iterator));
|
||||
}
|
||||
@@ -247,7 +247,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
|
||||
// Returns whether or not this node should be ignored in the
|
||||
// accessibility tree.
|
||||
@@ -1958,8 +1976,12 @@ - (BOOL)shouldExposeTitleUIElement {
|
||||
@@ -1968,8 +1986,12 @@ - (BOOL)shouldExposeTitleUIElement {
|
||||
return content::AXTextEdit(newValue, std::u16string(), nil);
|
||||
}
|
||||
}
|
||||
@@ -260,7 +260,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
}
|
||||
|
||||
- (BOOL)instanceActive {
|
||||
@@ -2285,6 +2307,7 @@ - (NSArray*)selectedChildren {
|
||||
@@ -2295,6 +2317,7 @@ - (NSArray*)selectedChildren {
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
- (NSString*)selectedText {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -2296,11 +2319,13 @@ - (NSString*)selectedText {
|
||||
@@ -2306,11 +2329,13 @@ - (NSString*)selectedText {
|
||||
return nil;
|
||||
return base::SysUTF16ToNSString(range.GetText());
|
||||
}
|
||||
@@ -282,7 +282,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
- (NSValue*)selectedTextRange {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -2325,7 +2350,9 @@ - (NSValue*)selectedTextRange {
|
||||
@@ -2335,7 +2360,9 @@ - (NSValue*)selectedTextRange {
|
||||
int selLength = range.GetText().length();
|
||||
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
|
||||
}
|
||||
@@ -292,7 +292,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
- (id)selectedTextMarkerRange {
|
||||
if (![self instanceActive])
|
||||
return nil;
|
||||
@@ -2337,6 +2364,7 @@ - (id)selectedTextMarkerRange {
|
||||
@@ -2347,6 +2374,7 @@ - (id)selectedTextMarkerRange {
|
||||
// words correctly.
|
||||
return CreateTextMarkerRange(ax_range.AsBackwardRange());
|
||||
}
|
||||
@@ -300,7 +300,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
|
||||
- (NSValue*)size {
|
||||
if (![self instanceActive])
|
||||
@@ -2369,6 +2397,7 @@ - (NSString*)sortDirection {
|
||||
@@ -2379,6 +2407,7 @@ - (NSString*)sortDirection {
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -308,7 +308,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
// Returns a text marker that points to the first character in the document that
|
||||
// can be selected with VoiceOver.
|
||||
- (id)startTextMarker {
|
||||
@@ -2377,6 +2406,7 @@ - (id)startTextMarker {
|
||||
@@ -2387,6 +2416,7 @@ - (id)startTextMarker {
|
||||
BrowserAccessibility::AXPosition position = _owner->CreatePositionAt(0);
|
||||
return CreateTextMarker(position->CreatePositionAtStartOfContent());
|
||||
}
|
||||
@@ -316,7 +316,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
|
||||
// Returns a subrole based upon the role.
|
||||
- (NSString*)subrole {
|
||||
@@ -2706,12 +2736,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
|
||||
@@ -2716,12 +2746,14 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
|
||||
NSMutableAttributedString* attributedInnerText =
|
||||
[[[NSMutableAttributedString alloc]
|
||||
initWithString:base::SysUTF16ToNSString(innerText)] autorelease];
|
||||
@@ -331,7 +331,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
|
||||
return [attributedInnerText attributedSubstringFromRange:range];
|
||||
}
|
||||
@@ -2824,6 +2856,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
||||
@@ -2834,6 +2866,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
||||
return ToBrowserAccessibilityCocoa(cell);
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
if ([attribute
|
||||
isEqualToString:
|
||||
NSAccessibilityUIElementForTextMarkerParameterizedAttribute]) {
|
||||
@@ -3147,6 +3180,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
||||
@@ -3157,6 +3190,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
||||
|
||||
return CreateTextMarker(root->CreatePositionAt(index));
|
||||
}
|
||||
@@ -347,7 +347,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
|
||||
if ([attribute isEqualToString:
|
||||
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
|
||||
@@ -3177,6 +3211,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
||||
@@ -3187,6 +3221,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
||||
return nil;
|
||||
}
|
||||
|
||||
@@ -355,7 +355,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
if ([attribute
|
||||
isEqualToString:
|
||||
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
|
||||
@@ -3296,6 +3331,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
||||
@@ -3306,6 +3341,7 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
|
||||
|
||||
return @(child->GetIndexInParent());
|
||||
}
|
||||
@@ -363,7 +363,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
|
||||
return nil;
|
||||
}
|
||||
@@ -3825,6 +3861,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
|
||||
@@ -3838,6 +3874,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
|
||||
_owner->CreatePositionAt(range.location)->AsLeafTextPosition(),
|
||||
_owner->CreatePositionAt(NSMaxRange(range))->AsLeafTextPosition()));
|
||||
}
|
||||
@@ -371,7 +371,7 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
if ([attribute
|
||||
isEqualToString:NSAccessibilitySelectedTextMarkerRangeAttribute]) {
|
||||
BrowserAccessibility::AXRange range = CreateRangeFromTextMarkerRange(value);
|
||||
@@ -3835,6 +3872,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
|
||||
@@ -3848,6 +3885,7 @@ - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute {
|
||||
BrowserAccessibility::AXRange(range.anchor()->AsLeafTextPosition(),
|
||||
range.focus()->AsLeafTextPosition()));
|
||||
}
|
||||
@@ -380,10 +380,10 @@ index 7f10021cf452fd178ecfdddbe3ff9da795c17c3d..ec5e7bd85dc2583e9de428761d3516fb
|
||||
|
||||
- (id)accessibilityFocusedUIElement {
|
||||
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
index 840b1935491804b9ac2fd6f0c8ef1aa32f31a9ae..208d4c32864a9c6142b544488951596aa2ab115b 100644
|
||||
index ade9b849732c8b09a6584146b85a6914eaec7ca1..bef70937556c206f09446197a1c3c6dd41a41fe7 100644
|
||||
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
|
||||
@@ -496,7 +496,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
@@ -497,7 +497,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
if (native_focus_object && [native_focus_object instanceActive]) {
|
||||
[user_info setObject:native_focus_object
|
||||
forKey:ui::NSAccessibilityTextChangeElement];
|
||||
@@ -392,7 +392,7 @@ index 840b1935491804b9ac2fd6f0c8ef1aa32f31a9ae..208d4c32864a9c6142b544488951596a
|
||||
id selected_text = [native_focus_object selectedTextMarkerRange];
|
||||
if (selected_text) {
|
||||
NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
|
||||
@@ -504,6 +504,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
@@ -505,6 +505,7 @@ void PostAnnouncementNotification(NSString* announcement) {
|
||||
[user_info setObject:selected_text
|
||||
forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
|
||||
}
|
||||
@@ -471,10 +471,10 @@ index c15f3a631292b538698625328fb429ee3c9964f5..37e038753ecf1b82ec92c06b2c0729b5
|
||||
}
|
||||
|
||||
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
index c1b17a752c12b3fba2275ff09896a2bd5ee53546..e9675f50499d8d260410a29252f0d3fdac3c226c 100644
|
||||
index 717daca205b64ddbaf138f88400683dafac1a270..50ce32674525567b24b387e64b27f815585e61a0 100644
|
||||
--- a/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
|
||||
@@ -43,6 +43,7 @@
|
||||
@@ -42,6 +42,7 @@
|
||||
#include "device/bluetooth/bluetooth_socket_mac.h"
|
||||
#include "device/bluetooth/public/cpp/bluetooth_address.h"
|
||||
|
||||
@@ -482,7 +482,7 @@ index c1b17a752c12b3fba2275ff09896a2bd5ee53546..e9675f50499d8d260410a29252f0d3fd
|
||||
extern "C" {
|
||||
// Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and
|
||||
// `Karabiner` [3] to programmatically control the Bluetooth state. Calling the
|
||||
@@ -56,6 +57,7 @@
|
||||
@@ -55,6 +56,7 @@
|
||||
// [4] https://support.apple.com/kb/PH25091
|
||||
void IOBluetoothPreferenceSetControllerPowerState(int state);
|
||||
}
|
||||
@@ -490,7 +490,7 @@ index c1b17a752c12b3fba2275ff09896a2bd5ee53546..e9675f50499d8d260410a29252f0d3fd
|
||||
|
||||
namespace {
|
||||
|
||||
@@ -124,8 +126,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
|
||||
@@ -123,8 +125,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
|
||||
controller_state_function_(
|
||||
base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState,
|
||||
base::Unretained(this))),
|
||||
@@ -501,7 +501,7 @@ index c1b17a752c12b3fba2275ff09896a2bd5ee53546..e9675f50499d8d260410a29252f0d3fd
|
||||
classic_discovery_manager_(
|
||||
BluetoothDiscoveryManagerMac::CreateClassic(this)),
|
||||
low_energy_discovery_manager_(
|
||||
@@ -356,8 +360,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
|
||||
@@ -355,8 +359,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
|
||||
}
|
||||
|
||||
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {
|
||||
|
||||
@@ -7,7 +7,7 @@ This adds a callback from the network service that's used to implement
|
||||
session.setCertificateVerifyCallback.
|
||||
|
||||
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
|
||||
index 9cdf5d553feb765a77da3b959a052e86daffdd2f..81acb80ef2a52b2133dcc59a1214723345095f61 100644
|
||||
index 2928935f9c96adcf40173ddb80641c35d027d39e..dcba764424f06d0b1f331ef7dc7f33b307f6a659 100644
|
||||
--- a/services/network/network_context.cc
|
||||
+++ b/services/network/network_context.cc
|
||||
@@ -117,6 +117,11 @@
|
||||
@@ -22,7 +22,7 @@ index 9cdf5d553feb765a77da3b959a052e86daffdd2f..81acb80ef2a52b2133dcc59a12147233
|
||||
#if BUILDFLAG(IS_CT_SUPPORTED)
|
||||
#include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
|
||||
#include "components/certificate_transparency/chrome_require_ct_delegate.h"
|
||||
@@ -375,6 +380,79 @@ bool SCTAuditingDelegate::IsSCTAuditingEnabled() {
|
||||
@@ -376,6 +381,79 @@ bool SCTAuditingDelegate::IsSCTAuditingEnabled() {
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -102,7 +102,7 @@ index 9cdf5d553feb765a77da3b959a052e86daffdd2f..81acb80ef2a52b2133dcc59a12147233
|
||||
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
|
||||
|
||||
NetworkContext::PendingCertVerify::PendingCertVerify() = default;
|
||||
@@ -574,6 +652,13 @@ void NetworkContext::SetClient(
|
||||
@@ -575,6 +653,13 @@ void NetworkContext::SetClient(
|
||||
client_.Bind(std::move(client));
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ index 9cdf5d553feb765a77da3b959a052e86daffdd2f..81acb80ef2a52b2133dcc59a12147233
|
||||
void NetworkContext::CreateURLLoaderFactory(
|
||||
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
|
||||
mojom::URLLoaderFactoryParamsPtr params) {
|
||||
@@ -1933,6 +2018,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
@@ -1952,6 +2037,9 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
||||
std::move(cert_verifier));
|
||||
cert_verifier = base::WrapUnique(cert_verifier_with_trust_anchors_);
|
||||
#endif // BUILDFLAG(IS_CHROMEOS_ASH)
|
||||
@@ -127,7 +127,7 @@ index 9cdf5d553feb765a77da3b959a052e86daffdd2f..81acb80ef2a52b2133dcc59a12147233
|
||||
|
||||
builder.SetCertVerifier(IgnoreErrorsCertVerifier::MaybeWrapCertVerifier(
|
||||
diff --git a/services/network/network_context.h b/services/network/network_context.h
|
||||
index 89451c626bee5a9970a1f77f2739ce03a01e6b30..22e155061860f6782b261205f6297c09f8c6e1fa 100644
|
||||
index a0fbfe19e9c0a5ff841fd8673b331486f3b698fd..093a9bcf105b925f6c8a1491f623adcfedf4aa51 100644
|
||||
--- a/services/network/network_context.h
|
||||
+++ b/services/network/network_context.h
|
||||
@@ -90,6 +90,7 @@ class DomainReliabilityMonitor;
|
||||
@@ -147,7 +147,7 @@ index 89451c626bee5a9970a1f77f2739ce03a01e6b30..22e155061860f6782b261205f6297c09
|
||||
void ResetURLLoaderFactories() override;
|
||||
void GetCookieManager(
|
||||
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
|
||||
@@ -696,6 +699,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
@@ -700,6 +703,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
|
||||
CertVerifierWithTrustAnchors* cert_verifier_with_trust_anchors_ = nullptr;
|
||||
#endif
|
||||
|
||||
@@ -157,10 +157,10 @@ index 89451c626bee5a9970a1f77f2739ce03a01e6b30..22e155061860f6782b261205f6297c09
|
||||
// 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 e24ec4cb3c49ade12be048d96aaca2f672fb292f..6f830a84d20e39b802b44465882f9ae0627a0759 100644
|
||||
index 17693738bb1bc2d239639942816259f4b910fe5c..a1ca0c3521cc26fd5a6ee83385516d1623e749ed 100644
|
||||
--- a/services/network/public/mojom/network_context.mojom
|
||||
+++ b/services/network/public/mojom/network_context.mojom
|
||||
@@ -192,6 +192,17 @@ struct CTPolicy {
|
||||
@@ -189,6 +189,17 @@ struct CTPolicy {
|
||||
array<string> excluded_legacy_spkis;
|
||||
};
|
||||
|
||||
@@ -178,7 +178,7 @@ index e24ec4cb3c49ade12be048d96aaca2f672fb292f..6f830a84d20e39b802b44465882f9ae0
|
||||
// Parameters for constructing a network context.
|
||||
struct NetworkContextParams {
|
||||
// Name used by memory tools to identify the context.
|
||||
@@ -732,6 +743,9 @@ interface NetworkContext {
|
||||
@@ -723,6 +734,9 @@ interface NetworkContext {
|
||||
// Sets a client for this network context.
|
||||
SetClient(pending_remote<NetworkContextClient> client);
|
||||
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Cheng Zhao <zcbenz@gmail.com>
|
||||
Date: Thu, 20 Sep 2018 17:48:16 -0700
|
||||
Subject: no_cache_storage_check.patch
|
||||
|
||||
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 4c96defefe188f113015b70510a8205deddb7cdb..c309134839b138f649392775b69f3a71d1eec73a 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 {
|
||||
cache_storage_(cache_storage),
|
||||
origin_(origin),
|
||||
owner_(owner) {
|
||||
- DCHECK(!origin_.opaque());
|
||||
+ // DCHECK(!origin_.opaque());
|
||||
}
|
||||
|
||||
virtual ~CacheLoader() {}
|
||||
@@ -54,7 +54,7 @@ index 19c2beb1f1949f0dc4466a8728f151c035544b24..f7aa5f94d6dea0e6b2c1107b8ef01600
|
||||
|
||||
scoped_refptr<ServiceWorkerContextWrapper> service_worker_context_;
|
||||
diff --git a/content/browser/notifications/blink_notification_service_impl_unittest.cc b/content/browser/notifications/blink_notification_service_impl_unittest.cc
|
||||
index 9f6c32085b8808735a0cbf3502bcb1a186a200ba..ae6d2960a767bf9c20a1e14c93454cd544f4a2a3 100644
|
||||
index 2bdd5f7efcd5c891d08d328bba61bfa9436a2420..d9af5c04a80f6ff637c4f6cd1c274c99e82d0643 100644
|
||||
--- a/content/browser/notifications/blink_notification_service_impl_unittest.cc
|
||||
+++ b/content/browser/notifications/blink_notification_service_impl_unittest.cc
|
||||
@@ -139,7 +139,7 @@ class BlinkNotificationServiceImplTest : public ::testing::Test {
|
||||
@@ -108,10 +108,10 @@ index b195cb84d8bba3c51b04f8c32cf909d15bf34335..37528715db985d12771ba2dca86dcec8
|
||||
const GURL& document_url,
|
||||
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 fcb30910e0d473d5f67a823e68c5002a85b9c2f0..ec0f47781d42d55e907afd039e961a74ed9c7c9c 100644
|
||||
index f0b0a33da3ea2c38b6f83631999b936375c0233c..b6b10e30c06016eb4a56722c470d2b2d54a0209b 100644
|
||||
--- a/content/browser/renderer_host/render_process_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_process_host_impl.cc
|
||||
@@ -2169,7 +2169,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
@@ -2269,7 +2269,7 @@ void RenderProcessHostImpl::CreateNotificationService(
|
||||
document_url = rfh->GetLastCommittedURL();
|
||||
|
||||
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
|
||||
|
||||
@@ -7,13 +7,13 @@ This tweaks Chrome's pepper flash and PDF plugin support to make it
|
||||
usable from Electron.
|
||||
|
||||
diff --git a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
|
||||
index e90525fdee7b7f1e299e56899ddca51af93d7aa6..4afb696f57d83935dabd0abc97bfe80018b56977 100644
|
||||
index 66e5a32ca6021a712a82d918a6dcb44039f71bf2..ce1559ea6020825ad0fa996e3148ff2744fa00c4 100644
|
||||
--- a/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
|
||||
+++ b/chrome/browser/renderer_host/pepper/pepper_isolated_file_system_message_filter.cc
|
||||
@@ -7,17 +7,21 @@
|
||||
#include <stddef.h>
|
||||
|
||||
#include "base/stl_util.h"
|
||||
#include "base/cxx17_backports.h"
|
||||
+#if 0
|
||||
#include "chrome/browser/browser_process.h"
|
||||
#include "chrome/browser/profiles/profile.h"
|
||||
@@ -154,7 +154,7 @@ index 56a23e8f41bb418d414f11af5797b30571d4cc2b..6f9f577f16de80dd2ab194b557bbd9ec
|
||||
DISALLOW_COPY_AND_ASSIGN(PepperIsolatedFileSystemMessageFilter);
|
||||
};
|
||||
diff --git a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc
|
||||
index 7820a55f563d40865cd7bbf4a03e7f82db81043e..d9b1c4bc6abfa395782761455d4dd2e3105d7b14 100644
|
||||
index 60cfd89dfd18eced6f6d103267b80d547d2e9f26..95d36e99832f434d878a2a2fc3101a611926acb2 100644
|
||||
--- a/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc
|
||||
+++ b/chrome/renderer/pepper/chrome_renderer_pepper_host_factory.cc
|
||||
@@ -7,8 +7,13 @@
|
||||
@@ -169,40 +169,42 @@ index 7820a55f563d40865cd7bbf4a03e7f82db81043e..d9b1c4bc6abfa395782761455d4dd2e3
|
||||
#include "components/pdf/renderer/pepper_pdf_host.h"
|
||||
+#endif
|
||||
#include "content/public/renderer/renderer_ppapi_host.h"
|
||||
#include "pdf/buildflags.h"
|
||||
#include "ppapi/host/ppapi_host.h"
|
||||
#include "ppapi/host/resource_host.h"
|
||||
@@ -36,19 +41,10 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
|
||||
@@ -37,6 +42,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
|
||||
if (!host_->IsValidInstance(instance))
|
||||
return nullptr;
|
||||
|
||||
- if (host_->GetPpapiHost()->permissions().HasPermission(
|
||||
- ppapi::PERMISSION_FLASH)) {
|
||||
- switch (message.type()) {
|
||||
- case PpapiHostMsg_FlashFullscreen_Create::ID: {
|
||||
- return std::make_unique<PepperFlashFullscreenHost>(host_, instance,
|
||||
- resource);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
// TODO(raymes): PDF also needs access to the FlashFontFileHost currently.
|
||||
// We should either rename PPB_FlashFont_File to PPB_FontFile_Private or get
|
||||
// rid of its use in PDF if possible.
|
||||
+#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
+#if 0
|
||||
if (host_->GetPpapiHost()->permissions().HasPermission(
|
||||
ppapi::PERMISSION_FLASH) ||
|
||||
host_->GetPpapiHost()->permissions().HasPermission(
|
||||
@@ -75,7 +71,9 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
|
||||
ppapi::PERMISSION_FLASH)) {
|
||||
switch (message.type()) {
|
||||
@@ -46,6 +52,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
|
||||
}
|
||||
}
|
||||
}
|
||||
+#endif
|
||||
|
||||
// TODO(raymes): PDF also needs access to the FlashFontFileHost currently.
|
||||
// We should either rename PPB_FlashFont_File to PPB_FontFile_Private or get
|
||||
@@ -68,7 +75,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
|
||||
}
|
||||
}
|
||||
|
||||
-#if BUILDFLAG(ENABLE_PDF)
|
||||
+#if BUILDFLAG(ENABLE_PDF_VIEWER)
|
||||
if (host_->GetPpapiHost()->permissions().HasPermission(
|
||||
ppapi::PERMISSION_PDF)) {
|
||||
switch (message.type()) {
|
||||
@@ -79,6 +86,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
|
||||
}
|
||||
#endif
|
||||
|
||||
+#if 0
|
||||
// Permissions for the following interfaces will be checked at the
|
||||
// time of the corresponding instance's method calls. Currently these
|
||||
// interfaces are available only for whitelisted apps which may not have
|
||||
@@ -85,6 +83,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
|
||||
@@ -88,6 +96,7 @@ ChromeRendererPepperHostFactory::CreateResourceHost(
|
||||
return std::make_unique<PepperUMAHost>(host_, instance, resource);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,19 @@ index 3afa0d34a6aff1d8882592fc4a3720698124a9c4..18de9f4e9c3c9599d1ab83a638bbd887
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
#include "ui/gfx/color_palette.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc b/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc
|
||||
index 59f3c768cc3d6f359472ee4baa8534004129df12..64d2de476940c7f9c84bc9e4d544ab58b0ba5fbd 100644
|
||||
--- a/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/back_to_tab_label_button.cc
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "chrome/browser/ui/views/overlay/back_to_tab_label_button.h"
|
||||
|
||||
#include "chrome/browser/ui/views/overlay/constants.h"
|
||||
-#include "chrome/grit/generated_resources.h"
|
||||
+#include "electron/grit/electron_resources.h"
|
||||
#include "third_party/skia/include/core/SkColor.h"
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/base/metadata/metadata_impl_macros.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/close_image_button.cc b/chrome/browser/ui/views/overlay/close_image_button.cc
|
||||
index b40d96b754118c1dd1f1fb62f441a5a870d16ed9..7e205e324f5a8604ae6624c42b5b216e3070c072 100644
|
||||
--- a/chrome/browser/ui/views/overlay/close_image_button.cc
|
||||
@@ -48,7 +61,7 @@ index 4b741d67c4c20766e248f0799825103ba4f2a1ce..adf85811da98e1666e8e93e5b339e176
|
||||
#include "ui/base/l10n/l10n_util.h"
|
||||
#include "ui/gfx/paint_vector_icon.h"
|
||||
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
index c996365b075abf026b4c26bce0ec89668cf933b8..04c6218f5f59b2d0d3d8e005461fa016fc4e1f33 100644
|
||||
index da92f8e841ccd6b239b4f081518921da1d3afb79..b443212cb77afe875df37fed820175f09aca1899 100644
|
||||
--- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
+++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
|
||||
@@ -16,9 +16,11 @@
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Alexey Kuts <kruntuid@gmail.com>
|
||||
Date: Fri, 26 Jul 2019 22:32:54 +0300
|
||||
Subject: remove references to Profile from PreconnectManager
|
||||
|
||||
The PreconnectManager in Chrome only depends on Profile for testing purposes;
|
||||
this patch removes that dependency so we can reuse it.
|
||||
Ideally we would change this class in upstream to not depend on Profile.
|
||||
|
||||
diff --git a/chrome/browser/predictors/preconnect_manager.cc b/chrome/browser/predictors/preconnect_manager.cc
|
||||
index 7cbe5b3ebac99849dc784e1dc587b3a091abbf49..6de33ea6f7e452cdfbf3271827a943828e93fb8f 100644
|
||||
--- a/chrome/browser/predictors/preconnect_manager.cc
|
||||
+++ b/chrome/browser/predictors/preconnect_manager.cc
|
||||
@@ -69,7 +69,7 @@ PreresolveJob::PreresolveJob(PreresolveJob&& other) = default;
|
||||
PreresolveJob::~PreresolveJob() = default;
|
||||
|
||||
PreconnectManager::PreconnectManager(base::WeakPtr<Delegate> delegate,
|
||||
- Profile* profile)
|
||||
+ content::BrowserContext* profile)
|
||||
: delegate_(std::move(delegate)),
|
||||
profile_(profile),
|
||||
inflight_preresolves_count_(0) {
|
||||
@@ -329,11 +329,13 @@ network::mojom::NetworkContext* PreconnectManager::GetNetworkContext() const {
|
||||
if (network_context_)
|
||||
return network_context_;
|
||||
|
||||
+#if 0
|
||||
if (profile_->AsTestingProfile()) {
|
||||
// We're testing and |network_context_| wasn't set. Return nullptr to avoid
|
||||
// hitting the network.
|
||||
return nullptr;
|
||||
}
|
||||
+#endif
|
||||
|
||||
return profile_->GetDefaultStoragePartition()->GetNetworkContext();
|
||||
}
|
||||
diff --git a/chrome/browser/predictors/preconnect_manager.h b/chrome/browser/predictors/preconnect_manager.h
|
||||
index dbdde3dfd9bb160486a1d06f16ef86548798b61c..a4373ebdbe8bb833c3b782e3d3cb27a5116f976d 100644
|
||||
--- a/chrome/browser/predictors/preconnect_manager.h
|
||||
+++ b/chrome/browser/predictors/preconnect_manager.h
|
||||
@@ -22,6 +22,10 @@
|
||||
|
||||
class Profile;
|
||||
|
||||
+namespace content {
|
||||
+class BrowserContext;
|
||||
+}
|
||||
+
|
||||
namespace network {
|
||||
namespace mojom {
|
||||
class NetworkContext;
|
||||
@@ -145,7 +149,7 @@ class PreconnectManager {
|
||||
bool success) {}
|
||||
};
|
||||
|
||||
- PreconnectManager(base::WeakPtr<Delegate> delegate, Profile* profile);
|
||||
+ PreconnectManager(base::WeakPtr<Delegate> delegate, content::BrowserContext* profile);
|
||||
virtual ~PreconnectManager();
|
||||
|
||||
// Starts preconnect and preresolve jobs keyed by |url|.
|
||||
@@ -210,7 +214,7 @@ class PreconnectManager {
|
||||
network::mojom::NetworkContext* GetNetworkContext() const;
|
||||
|
||||
base::WeakPtr<Delegate> delegate_;
|
||||
- Profile* const profile_;
|
||||
+ content::BrowserContext* const profile_;
|
||||
std::list<PreresolveJobId> queued_jobs_;
|
||||
PreresolveJobMap preresolve_jobs_;
|
||||
std::map<GURL, std::unique_ptr<PreresolveInfo>> preresolve_info_;
|
||||
@@ -102,7 +102,7 @@ index f2ba13cb21d66c2067264086926341e8490b1b84..29dc7c84c22d9aa7bf0711467fa98b16
|
||||
}
|
||||
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
|
||||
index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed138ed777c 100644
|
||||
index 15dcd3179a2705ab87c525efe1a5210c07ffc17b..fc45f0449fc8bc24fe3bdc3571c9793c6789d36b 100644
|
||||
--- a/chrome/browser/printing/print_view_manager_base.cc
|
||||
+++ b/chrome/browser/printing/print_view_manager_base.cc
|
||||
@@ -28,10 +28,10 @@
|
||||
@@ -143,10 +143,10 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
|
||||
}
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
@@ -256,7 +260,9 @@ void UpdatePrintSettingsReplyOnIO(
|
||||
@@ -236,7 +240,9 @@ void UpdatePrintSettingsReplyOnIO(
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::IO);
|
||||
DCHECK(printer_query);
|
||||
auto params = mojom::PrintPagesParams::New();
|
||||
params->params = mojom::PrintParams::New();
|
||||
mojom::PrintPagesParamsPtr params = CreateEmptyPrintPagesParamsPtr();
|
||||
- if (printer_query->last_status() == PrintingContext::OK) {
|
||||
+ // We call update without first printing from defaults,
|
||||
+ // so the last printer status will still be defaulted to PrintingContext::FAILED
|
||||
@@ -154,7 +154,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
|
||||
RenderParamsFromPrintSettings(printer_query->settings(),
|
||||
params->params.get());
|
||||
params->params->document_cookie = printer_query->cookie();
|
||||
@@ -382,12 +388,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
@@ -339,12 +345,14 @@ PrintViewManagerBase::PrintViewManagerBase(content::WebContents* web_contents)
|
||||
: PrintManager(web_contents),
|
||||
queue_(g_browser_process->print_job_manager()->queue()) {
|
||||
DCHECK(queue_);
|
||||
@@ -169,7 +169,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
|
||||
}
|
||||
|
||||
PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -395,7 +403,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
@@ -352,7 +360,10 @@ PrintViewManagerBase::~PrintViewManagerBase() {
|
||||
DisconnectFromCurrentPrintJob();
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
|
||||
DisconnectFromCurrentPrintJob();
|
||||
|
||||
// Don't print / print preview crashed tabs.
|
||||
@@ -403,7 +414,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
@@ -360,7 +371,14 @@ bool PrintViewManagerBase::PrintNow(content::RenderFrameHost* rfh) {
|
||||
return false;
|
||||
|
||||
SetPrintingRFH(rfh);
|
||||
@@ -197,7 +197,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -524,9 +542,9 @@ void PrintViewManagerBase::StartLocalPrintJob(
|
||||
@@ -515,9 +533,9 @@ void PrintViewManagerBase::ScriptedPrintReply(
|
||||
void PrintViewManagerBase::UpdatePrintingEnabled() {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
// The Unretained() is safe because ForEachFrame() is synchronous.
|
||||
@@ -210,36 +210,37 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::NavigationStopped() {
|
||||
@@ -643,12 +661,13 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
@@ -631,12 +649,13 @@ void PrintViewManagerBase::DidPrintDocument(
|
||||
void PrintViewManagerBase::GetDefaultPrintSettings(
|
||||
GetDefaultPrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
+#if 0 // Printing is always enabled.
|
||||
if (!printing_enabled_.GetValue()) {
|
||||
auto params = mojom::PrintParams::New();
|
||||
GetDefaultPrintSettingsReply(std::move(callback), std::move(params));
|
||||
GetDefaultPrintSettingsReply(std::move(callback),
|
||||
mojom::PrintParams::New());
|
||||
return;
|
||||
}
|
||||
-
|
||||
+#endif
|
||||
content::RenderFrameHost* render_frame_host =
|
||||
print_manager_host_receivers_.GetCurrentTargetFrame();
|
||||
|
||||
@@ -665,11 +684,12 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
content::RenderFrameHost* render_frame_host = GetCurrentTargetFrame();
|
||||
auto callback_wrapper =
|
||||
base::BindOnce(&PrintViewManagerBase::GetDefaultPrintSettingsReply,
|
||||
@@ -654,12 +673,13 @@ void PrintViewManagerBase::UpdatePrintSettings(
|
||||
base::Value job_settings,
|
||||
UpdatePrintSettingsCallback callback) {
|
||||
DCHECK_CURRENTLY_ON(content::BrowserThread::UI);
|
||||
+ #if 0 // Printing is always enabled.
|
||||
+#if 0 // Printing is always enabled.
|
||||
if (!printing_enabled_.GetValue()) {
|
||||
UpdatePrintSettingsReply(std::move(callback), nullptr, false);
|
||||
UpdatePrintSettingsReply(std::move(callback),
|
||||
CreateEmptyPrintPagesParamsPtr(), false);
|
||||
return;
|
||||
}
|
||||
-
|
||||
+ #endif
|
||||
+#endif
|
||||
if (!job_settings.FindIntKey(kSettingPrinterType)) {
|
||||
UpdatePrintSettingsReply(std::move(callback), nullptr, false);
|
||||
return;
|
||||
@@ -709,7 +729,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
|
||||
UpdatePrintSettingsReply(std::move(callback),
|
||||
CreateEmptyPrintPagesParamsPtr(), false);
|
||||
@@ -704,7 +724,7 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
|
||||
PrintManager::PrintingFailed(cookie);
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
@@ -248,7 +249,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
|
||||
#endif
|
||||
|
||||
ReleasePrinterQuery();
|
||||
@@ -721,6 +741,11 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
|
||||
@@ -716,6 +736,11 @@ void PrintViewManagerBase::PrintingFailed(int32_t cookie) {
|
||||
}
|
||||
|
||||
void PrintViewManagerBase::ShowInvalidPrinterSettingsError() {
|
||||
@@ -260,7 +261,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
|
||||
base::ThreadTaskRunnerHandle::Get()->PostTask(
|
||||
FROM_HERE, base::BindOnce(&ShowWarningMessageBox,
|
||||
l10n_util::GetStringUTF16(
|
||||
@@ -790,9 +815,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
|
||||
@@ -785,9 +810,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
|
||||
content::NotificationService::NoDetails());
|
||||
break;
|
||||
}
|
||||
@@ -276,7 +277,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
|
||||
NOTREACHED();
|
||||
break;
|
||||
}
|
||||
@@ -901,8 +930,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -896,8 +925,10 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
DCHECK(!quit_inner_loop_);
|
||||
DCHECK(query);
|
||||
|
||||
@@ -289,7 +290,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
|
||||
|
||||
// We can't print if there is no renderer.
|
||||
if (!web_contents()->GetMainFrame()->GetRenderViewHost() ||
|
||||
@@ -923,8 +954,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
@@ -918,8 +949,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
|
||||
/*source_id=*/"");
|
||||
#endif
|
||||
|
||||
@@ -298,7 +299,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
|
||||
printing_succeeded_ = false;
|
||||
return true;
|
||||
}
|
||||
@@ -973,14 +1002,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
@@ -968,14 +997,22 @@ void PrintViewManagerBase::ReleasePrintJob() {
|
||||
content::RenderFrameHost* rfh = printing_rfh_;
|
||||
printing_rfh_ = nullptr;
|
||||
|
||||
@@ -323,7 +324,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
|
||||
// Don't close the worker thread.
|
||||
print_job_ = nullptr;
|
||||
}
|
||||
@@ -1016,7 +1053,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
@@ -1011,7 +1048,7 @@ bool PrintViewManagerBase::RunInnerMessageLoop() {
|
||||
}
|
||||
|
||||
bool PrintViewManagerBase::OpportunisticallyCreatePrintJob(int cookie) {
|
||||
@@ -333,7 +334,7 @@ index f6084545a8acf1485d862a2366eee1da56d0a565..e2882c8b4fbb5402066c9132ed5ebed1
|
||||
|
||||
if (!cookie) {
|
||||
diff --git a/chrome/browser/printing/print_view_manager_base.h b/chrome/browser/printing/print_view_manager_base.h
|
||||
index 62f4dc6083a13dd68ca510982a8073216d4f4b24..89ce604d8363c3a4d7b2f206da20167d9e722927 100644
|
||||
index b19ee4414584d0e192ea6b4b91b4e2ed59aef51b..e67bf37ca58877639a724589ca911940fd04016e 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;
|
||||
@@ -357,7 +358,7 @@ index 62f4dc6083a13dd68ca510982a8073216d4f4b24..89ce604d8363c3a4d7b2f206da20167d
|
||||
|
||||
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
|
||||
// Prints the document in |print_data| with settings specified in
|
||||
@@ -216,9 +221,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
@@ -231,9 +236,15 @@ class PrintViewManagerBase : public content::NotificationObserver,
|
||||
// The current RFH that is printing with a system printing dialog.
|
||||
content::RenderFrameHost* printing_rfh_ = nullptr;
|
||||
|
||||
@@ -374,7 +375,7 @@ index 62f4dc6083a13dd68ca510982a8073216d4f4b24..89ce604d8363c3a4d7b2f206da20167d
|
||||
// This means we are _blocking_ until all the necessary pages have been
|
||||
// rendered or the print settings are being loaded.
|
||||
diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom
|
||||
index bea375f1c23fdb6efdd6e0f7801e7bd087ddb7a3..f74c70d1c535384df1849b2d2841b27f5d0b25c6 100644
|
||||
index bfca294bd94763d7a661f9b424bbe1351f076030..a5b50dfbf2a64d87c5f9e632c0709bf5967c0f1e 100644
|
||||
--- a/components/printing/common/print.mojom
|
||||
+++ b/components/printing/common/print.mojom
|
||||
@@ -271,7 +271,7 @@ interface PrintPreviewUI {
|
||||
@@ -387,7 +388,7 @@ index bea375f1c23fdb6efdd6e0f7801e7bd087ddb7a3..f74c70d1c535384df1849b2d2841b27f
|
||||
// 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 f0811e6c7775419d2e7cceafc9aba05f8b877d58..2c6890d7b2b88064d7942774def1054a7e5d868f 100644
|
||||
index 2831dbf4235f52869d7e5e8f4c7b978a17a19c44..c76abf666d1e16175d1962eebc5f7ab7efe71924 100644
|
||||
--- a/components/printing/renderer/print_render_frame_helper.cc
|
||||
+++ b/components/printing/renderer/print_render_frame_helper.cc
|
||||
@@ -38,6 +38,7 @@
|
||||
@@ -518,7 +519,7 @@ index f0811e6c7775419d2e7cceafc9aba05f8b877d58..2c6890d7b2b88064d7942774def1054a
|
||||
// Check if |this| is still valid.
|
||||
if (!self)
|
||||
return;
|
||||
@@ -2129,7 +2170,9 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
@@ -2128,7 +2169,9 @@ void PrintRenderFrameHelper::IPCProcessed() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -529,7 +530,7 @@ index f0811e6c7775419d2e7cceafc9aba05f8b877d58..2c6890d7b2b88064d7942774def1054a
|
||||
mojom::PrintPagesParams settings;
|
||||
settings.params = mojom::PrintParams::New();
|
||||
GetPrintManagerHost()->GetDefaultPrintSettings(&settings.params);
|
||||
@@ -2153,12 +2196,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
|
||||
@@ -2152,12 +2195,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -548,7 +549,7 @@ index f0811e6c7775419d2e7cceafc9aba05f8b877d58..2c6890d7b2b88064d7942774def1054a
|
||||
notify_browser_of_print_failure_ = false;
|
||||
GetPrintManagerHost()->ShowInvalidPrinterSettingsError();
|
||||
return false;
|
||||
@@ -2529,18 +2574,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) {
|
||||
@@ -2528,18 +2573,7 @@ void PrintRenderFrameHelper::RequestPrintPreview(PrintPreviewRequestType type) {
|
||||
}
|
||||
|
||||
bool PrintRenderFrameHelper::CheckForCancel() {
|
||||
|
||||
@@ -62,10 +62,10 @@ index 083640808cd6a4a5e6e65d715c77ef58d090ba1e..d7d2fe4e0ada417769cbfe8390b8e2b1
|
||||
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 5e1dcf9487470986d771b7777033be2c32677962..ae908912cd5ea1b2cd43974e1b8ea1bc0c600042 100644
|
||||
index a02662fb29ff297a55afdb0d6e2dc336137a749d..eafe512bc90d967eaadddc2e355c418ecd7dd83a 100644
|
||||
--- a/ui/native_theme/native_theme_win.cc
|
||||
+++ b/ui/native_theme/native_theme_win.cc
|
||||
@@ -659,6 +659,18 @@ absl::optional<SkColor> NativeThemeWin::GetPlatformHighContrastColor(
|
||||
@@ -658,6 +658,18 @@ absl::optional<SkColor> NativeThemeWin::GetPlatformHighContrastColor(
|
||||
case kColorId_ThrobberWaitingColor:
|
||||
return system_colors_[SystemThemeColor::kGrayText];
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ Chrome moved the SetCursor IPC message to mojo, which we use to tell OSR about `
|
||||
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2172779
|
||||
|
||||
diff --git a/content/browser/renderer_host/render_widget_host_delegate.h b/content/browser/renderer_host/render_widget_host_delegate.h
|
||||
index c3032fa803f2f875b532e32167eaaf9133561065..8ba8c0ed7f7412c147c75b56ebf1dc7489f02ebc 100644
|
||||
index 24933acc8579ce057178ad36c42069c38df20581..483cdbe9abb299419afebe1f3abaf5d84372fadf 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_delegate.h
|
||||
+++ b/content/browser/renderer_host/render_widget_host_delegate.h
|
||||
@@ -14,6 +14,7 @@
|
||||
@@ -18,8 +18,8 @@ index c3032fa803f2f875b532e32167eaaf9133561065..8ba8c0ed7f7412c147c75b56ebf1dc74
|
||||
+#include "content/common/cursors/webcursor.h"
|
||||
#include "content/public/common/drop_data.h"
|
||||
#include "services/metrics/public/cpp/ukm_recorder.h"
|
||||
#include "third_party/blink/public/common/input/web_input_event.h"
|
||||
@@ -255,6 +256,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
|
||||
#include "third_party/abseil-cpp/absl/types/optional.h"
|
||||
@@ -256,6 +257,9 @@ class CONTENT_EXPORT RenderWidgetHostDelegate {
|
||||
// Returns the associated RenderViewHostDelegateView*, if possible.
|
||||
virtual RenderViewHostDelegateView* GetDelegateView();
|
||||
|
||||
@@ -30,10 +30,10 @@ index c3032fa803f2f875b532e32167eaaf9133561065..8ba8c0ed7f7412c147c75b56ebf1dc74
|
||||
// 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 738920fccc048d0a4471dac407619afde3811def..a75064854fb28a1b736f66c8dfa08435d7895e7b 100644
|
||||
index f25796e28c6381cc1a844026f9a81e0ce9ddef0f..158dcb7306dd41d8053b1d07780393d62e659df3 100644
|
||||
--- a/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
|
||||
@@ -1946,6 +1946,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
@@ -1978,6 +1978,8 @@ void RenderWidgetHostImpl::FilterDropData(DropData* drop_data) {
|
||||
void RenderWidgetHostImpl::SetCursor(const ui::Cursor& cursor) {
|
||||
if (view_)
|
||||
view_->UpdateCursor(WebCursor(cursor));
|
||||
@@ -43,10 +43,10 @@ index 738920fccc048d0a4471dac407619afde3811def..a75064854fb28a1b736f66c8dfa08435
|
||||
|
||||
void RenderWidgetHostImpl::ShowContextMenuAtPoint(
|
||||
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
||||
index 04e320e1b0150dbf7edd42be88c3ab6ceaecf46f..e240f8a32b1f7f69afa992861c995e668695c51f 100644
|
||||
index 952c073cfb1a2385581759b29683f1b66564d99b..362889cfb7778385937385849d285bc5c8f28f02 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.cc
|
||||
+++ b/content/browser/web_contents/web_contents_impl.cc
|
||||
@@ -4201,6 +4201,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
@@ -4334,6 +4334,11 @@ TextInputManager* WebContentsImpl::GetTextInputManager() {
|
||||
return text_input_manager_.get();
|
||||
}
|
||||
|
||||
@@ -59,10 +59,10 @@ index 04e320e1b0150dbf7edd42be88c3ab6ceaecf46f..e240f8a32b1f7f69afa992861c995e66
|
||||
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 6e731f45502bb6d8e2f65652fccb883978ad3260..5212e1547796cae0c2c2508e5c0fcdab18190895 100644
|
||||
index cd007f4547a6009877fd902b6720faa7c5e5d704..c8013e9462f10dbd2ddc78f614f04351a9568acf 100644
|
||||
--- a/content/browser/web_contents/web_contents_impl.h
|
||||
+++ b/content/browser/web_contents/web_contents_impl.h
|
||||
@@ -962,6 +962,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
@@ -969,6 +969,7 @@ class CONTENT_EXPORT WebContentsImpl : public WebContents,
|
||||
blink::mojom::FrameVisibility visibility) override;
|
||||
void SendScreenRects() override;
|
||||
TextInputManager* GetTextInputManager() override;
|
||||
@@ -71,7 +71,7 @@ index 6e731f45502bb6d8e2f65652fccb883978ad3260..5212e1547796cae0c2c2508e5c0fcdab
|
||||
bool IsShowingContextMenuOnPage() const override;
|
||||
void DidChangeScreenOrientation() override;
|
||||
diff --git a/content/public/browser/web_contents_observer.h b/content/public/browser/web_contents_observer.h
|
||||
index 3ca079e32b4aeb83440625a7bf1efbde1369a99f..df6ae54d10efc4abbd2e3d87774977d1f593ac01 100644
|
||||
index 3fc353fbfc4db00eedb858301b4d7bdd1e1a1fad..d9f4902377884488e1588cabba93a9e8cecd82c2 100644
|
||||
--- a/content/public/browser/web_contents_observer.h
|
||||
+++ b/content/public/browser/web_contents_observer.h
|
||||
@@ -13,6 +13,7 @@
|
||||
@@ -82,7 +82,7 @@ index 3ca079e32b4aeb83440625a7bf1efbde1369a99f..df6ae54d10efc4abbd2e3d87774977d1
|
||||
#include "content/public/browser/allow_service_worker_result.h"
|
||||
#include "content/public/browser/cookie_access_details.h"
|
||||
#include "content/public/browser/navigation_controller.h"
|
||||
@@ -413,6 +414,9 @@ class CONTENT_EXPORT WebContentsObserver : public IPC::Listener {
|
||||
@@ -422,6 +423,9 @@ class CONTENT_EXPORT WebContentsObserver {
|
||||
// Invoked every time the WebContents changes visibility.
|
||||
virtual void OnVisibilityChanged(Visibility visibility) {}
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user