Compare commits

..

56 Commits

Author SHA1 Message Date
Electron Bot
a158c80377 Bump v9.0.0-nightly.20191224 2019-12-24 07:31:28 -08:00
Electron Bot
69f37356c1 Bump v9.0.0-nightly.20191223 2019-12-23 07:31:10 -08:00
Electron Bot
023c9a67fd Bump v9.0.0-nightly.20191222 2019-12-22 07:32:10 -08:00
Electron Bot
020cbf3595 Bump v9.0.0-nightly.20191221 2019-12-21 07:31:35 -08:00
Electron Bot
7161b2f57c Bump v9.0.0-nightly.20191220 2019-12-20 07:34:03 -08:00
Electron Bot
e02879d809 chore: bump node in DEPS to v12.14.0 (#21579) 2019-12-19 19:25:57 -08:00
Shelley Vohr
087cb1d592 refactor: update node main instance management (#21562) 2019-12-19 13:29:09 -08:00
Electron Bot
58b816431d Bump v9.0.0-nightly.20191219 2019-12-19 07:31:49 -08:00
Jeremy Apthorp
682b5d7d01 fix: set enable_negotiate_port to false in allowNTLMCredentialsForDomains (#21571)
* fix: set enable_negotiate_port to false in allowNTLMCredentialsForDomains

* read commandline switch
2019-12-19 05:53:49 -08:00
Shelley Vohr
5e244aa505 chore: make release branch pattern more robust (#21568) 2019-12-18 14:57:46 -08:00
John Kleinschmidt
b6214fdddf build: free up macos disk space on Mac publish (#21569) 2019-12-18 14:54:52 -08:00
Electron Bot
8ffc58bdba chore: bump node to v12.13.1 (master) (#21198)
* chore: bump node in DEPS to v12.13.1

* chore: remove redundant patches

* disable node tests

disable prepareStackTrack test since Node.js won't handle our case, and disable new es-module tests since it's still flagged and requires flags to run properly

* fix missing files

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

* fix: don't error if can't find advapi32.dll

* fixup! chore: bump node in DEPS to v12.13.1

* Disable native tests for now
2019-12-18 09:49:09 -08:00
Electron Bot
96a88f02fb Bump v9.0.0-nightly.20191218 2019-12-18 07:32:07 -08:00
Jeremy Apthorp
7152173d26 ci: retry uploading pdb files on appveyor (#21561) 2019-12-18 06:30:18 -08:00
Jeremy Apthorp
3effa8bc46 feat: remove deprecated base::Value-based serialization (#21560)
* feat: remove deprecated base::Value-based serialization

* add note to breaking-changes
2019-12-18 15:25:15 +09:00
Jeremy Apthorp
1cac62f0a2 feat: remove deprecated base::Value-based serialization (#21560)
* feat: remove deprecated base::Value-based serialization

* add note to breaking-changes
2019-12-18 15:24:50 +09:00
liulun
cc8bf12351 docs: replace systemPreferences.isDarkMode() with nativeTheme.shouldUseDarkColors (#21480) 2019-12-17 15:13:35 -08:00
Shelley Vohr
f0d52eaf0c build: allow getOutDir cli argument (#21545) 2019-12-17 14:00:42 -08:00
Jeremy Apthorp
54b4756a29 refactor: try just using regular [Sync] for MessageSync (#20797) 2019-12-17 11:35:28 -08:00
Electron Bot
6cc9f0c34e Bump v9.0.0-nightly.20191217 2019-12-17 07:31:56 -08:00
Shelley Vohr
dba8a0caa8 feat: enable explicit IAP restoration (#21461) 2019-12-17 07:07:11 -08:00
Jeremy Apthorp
53957d47d6 test: clean up some stale code in renderer spec runner (#21384)
* test: clean up some stale code in renderer spec runner

* remove jquery from spec

* remove extraneous close tag

* Revert "remove jquery from spec"

This reverts commit 7b885c8ca8.

* re-clean-up html

* don't highlight tags

* update session docs; clear cache on boot

* clear user-data-dir before running tests
2019-12-17 11:15:12 +09:00
Javan Makhmali
b57d218466 docs: update webContents.printToPDF() example for promisified API (#21541) 2019-12-16 16:14:13 -08:00
Mark Lee
9c442e0a7e docs: update installation docs to reflect latest @electron/get changes (#21491)
* doc: update Chinese Electron mirror URL

* doc: replace remaining references of electron-download with @electron/get

* doc: update cache dir example based on recent @electron/get cache changes
2019-12-16 08:16:55 -08:00
Electron Bot
5f2b6f71b5 Bump v9.0.0-nightly.20191216 2019-12-16 07:32:21 -08:00
Joël Charles
0bcfae752e feat: allow pages to override window.history.length (#17742)
* fix: allow pages to override window.history.length

* Update lib/renderer/window-setup.ts

Co-Authored-By: magne4000 <joel.charles91@gmail.com>

* fix: lint error
2019-12-16 11:14:27 +09:00
Milan Burda
6a03d3cc66 refactor: export internalWindowOpen from guest-window-manager (#21498) 2019-12-16 10:30:25 +09:00
Electron Bot
a7f5aafaca Bump v9.0.0-nightly.20191215 2019-12-15 07:31:37 -08:00
John Kleinschmidt
48688f9124 ci: use cmd to call gclient (#21523) 2019-12-14 14:25:33 -05:00
Electron Bot
fb20bd74e6 Revert "Bump v9.0.0-nightly.20191214"
This reverts commit f09bef3ba2.
2019-12-14 08:09:49 -08:00
Electron Bot
f09bef3ba2 Bump v9.0.0-nightly.20191214 2019-12-14 07:31:54 -08:00
Electron Bot
0f2f9a580a chore: bump chromium to 94cc24d3bb17a7406ba6c6cc6dc29 (master) (#21485) 2019-12-13 12:13:12 -08:00
loc
19cd8f3a02 fix: avoid contextBridge crash when RenderFrame address is reused (#21501)
* fix: avoid contextBridge crash when RenderFrame address is reused

Co-Authored-By: Jeremy Apthorp <nornagon@nornagon.net>

* make routing_id_ const
2019-12-13 13:13:04 -05:00
Jeremy Apthorp
c535e00187 feat: enable pointer compression and 31bit smis (#21468) 2019-12-13 10:12:24 -08:00
Milan Burda
341df4a8c2 fix: enforce parent-child relationship in custom postMessage() handler (#21496) 2019-12-13 10:10:56 -08:00
Jeremy Apthorp
a90b5f8421 chore: fix patch linter (#21495) 2019-12-13 09:18:45 -08:00
Felix Rieseberg
7932e28aa2 docs: Explain notarization, improve code-signing docs (#21373)
* docs: Explain notarization

* Update docs/tutorial/code-signing.md

Co-Authored-By: Zeke Sikelianos <zeke@github.com>
2019-12-13 11:16:20 -05:00
Victor Bennich
cf833a7650 feat: add win.getBackgroundColor() for macOS (#21448)
thanks @vbennich - great work on this 🌟
2019-12-13 11:08:30 -05:00
Electron Bot
c1210f8ad3 Revert "Bump v9.0.0-nightly.20191213"
This reverts commit e6c23e1a5e.
2019-12-13 08:01:32 -08:00
Electron Bot
e6c23e1a5e Bump v9.0.0-nightly.20191213 2019-12-13 07:34:50 -08:00
Cheng Zhao
f9a1dc10fe fix: quit after Chromium is fully started (#21488)
* fix: quit when chromium is fully started

* test: remove hacks on app.quit

* chore: RunUntilIdle is unnecessary
2019-12-13 18:57:02 +09:00
Electron Bot
b9a250a623 Bump v9.0.0-nightly.20191212 2019-12-12 07:32:26 -08:00
Robo
63e600f655 fix: sourcemaps not loading with network service (#21473)
Backports https://chromium-review.googlesource.com/c/chromium/src/+/1525270
Backports https://chromium-review.googlesource.com/c/chromium/src/+/1852212
2019-12-11 23:58:17 -08:00
Robo
aa4b36a03d fix: avoid Electron.dsym files in the main app bundle (#21447)
* ci: CHECK_DIST_MANIFEST in release builds

* fix: skip Electron.dSYM on macOS app zip
2019-12-11 12:42:57 -05:00
Electron Bot
287592b5f6 Bump v9.0.0-nightly.20191211 2019-12-11 07:31:56 -08:00
Cheng Zhao
d5192853f9 fix: name and expirationDate should be optional when setting cookie (#21454)
* fix: correctly set cookie date

* fix: name is not required for setting cookie

* test: clear cookie after each cookie test

* test: should test session property

* chore: style fixes
2019-12-11 16:44:49 +09:00
Shelley Vohr
cbe1e3a1d0 fix: MediaKey globalShortcuts not working on macOS (#21442) 2019-12-11 15:48:55 +09:00
loc
5cecc230fb fix: restore POST forms that open a new window with target=_blank (#21469)
* fix: restore parts of original ResourceRequestBody V8 conversion

Restore some of the original conversion logic in order to fix target=_blank post form submissions.

* test: add test for POST form submission
2019-12-11 15:46:25 +09:00
Electron Bot
49b47ee4ed chore: bump chromium to f755b70e34659441e72c1a928a406 (master) (#21000) 2019-12-10 16:22:35 -08:00
J. Ryan Stinnett
a5c9bd53e0 fix: restore accessibility window title on macOS (#21462)
Electron's `AtomNSWindow` implements `accessibilityAttributeValue` to
provide various accessibility info to the OS, including window titles.

Chromium 75 changed to Apple's newer accessibility API for window titles
in the super class that `AtomNSWindow` inherits from. macOS still
supports both the old and new style APIs, but it will prefer the new
style if it is implemented.  This means the Electron window title is
being ignored because the newer API at the Chromium level has taken
precedence.

By implementing the newer accessibility API in `AtomNSWindow`, this
restores correct accessibility window titles in macOS Electron apps.

This is a regression has been present since Electron 6.0.0 (the first
release including the Chromium change above).
2019-12-10 15:03:00 -08:00
Electron Bot
9e866f8315 Bump v9.0.0-nightly.20191210 2019-12-10 07:32:16 -08:00
Cheng Zhao
a6d142a112 fix: window menu should handle keys correctly (#21434)
* fix: overriding AccessiblePaneView's methods

* chore: add CL link
2019-12-10 16:15:48 +09:00
Samuel Attard
ec0edb757a chore: workflows and pipeline state were split in the circle API (#21441) 2019-12-09 11:26:43 -08:00
Cheng Zhao
3cb0ed306b fix: hiding window menu should work on startup (#21436)
* fix: menu visibility should not be overwritten on startup

* fix: removing menu for window without global menubar

* test: setMenu tests are not for mac
2019-12-09 11:17:36 -08:00
Jeremy Apthorp
7f6b308bf1 test: move remote specs to main process (#21387) 2019-12-09 10:27:30 -08:00
Electron Bot
409ef49d3a Bump v9.0.0-nightly.20191209 2019-12-09 07:32:27 -08:00
293 changed files with 2903 additions and 3780 deletions

View File

@@ -81,6 +81,7 @@ env-release-build: &env-release-build
GN_CONFIG: //electron/build/args/release.gn
STRIP_BINARIES: true
GENERATE_SYMBOLS: true
CHECK_DIST_MANIFEST: '1'
env-headless-testing: &env-headless-testing
DISPLAY: ':99.0'
@@ -444,6 +445,9 @@ step-electron-publish: &step-electron-publish
run:
name: Publish Electron Dist
command: |
if [ "`uname`" == "Darwin" ]; then
rm -rf src/out/Default/obj
fi
cd src/electron
if [ "$UPLOAD_TO_S3" == "1" ]; then
echo 'Uploading Electron release distribution to S3'

View File

@@ -383,12 +383,10 @@ source_set("electron_lib") {
"//media/mojo/mojom",
"//net:extras",
"//net:net_resources",
"//net:net_with_v8",
"//ppapi/host",
"//ppapi/proxy",
"//ppapi/shared_impl",
"//printing/buildflags",
"//services/audio/public/mojom:constants",
"//services/device/public/cpp/geolocation",
"//services/device/public/mojom",
"//services/proxy_resolver:lib",
@@ -400,7 +398,7 @@ source_set("electron_lib") {
"//third_party/electron_node:node_lib",
"//third_party/leveldatabase",
"//third_party/libyuv",
"//third_party/webrtc_overrides:init_webrtc",
"//third_party/webrtc_overrides:webrtc_component",
"//third_party/widevine/cdm:headers",
"//ui/base/idle",
"//ui/events:dom_keycode_converter",

4
DEPS
View File

@@ -11,9 +11,9 @@ gclient_gn_args = [
vars = {
'chromium_version':
'dc9525d251bf30828899e4cd7161f6dc6507023f',
'd0c764fc71894cc24d3bb17a7406ba6c6cc6dc29',
'node_version':
'v12.13.0',
'v12.14.0',
'nan_version':
'2ee313aaca52e2b478965ac50eb5082520380d1b',

View File

@@ -1 +1 @@
9.0.0-nightly.20191208
9.0.0-nightly.20191224

View File

@@ -78,7 +78,7 @@ build_script:
"https://github.com/electron/electron"
- ps: >-
if ($env:GN_CONFIG -eq 'release') {
gclient sync --with_branch_heads --with_tags --reset
$env:RUN_GCLIENT_SYNC="true"
} else {
cd src\electron
node script\generate-deps-hash.js
@@ -92,16 +92,22 @@ build_script:
python src/electron/script/update-external-binaries.py
} else {
# file does not exist, gclient sync, then zip
gclient sync --with_branch_heads --with_tags --reset
$env:RUN_GCLIENT_SYNC="true"
if ($env:TARGET_ARCH -ne 'ia32') {
# archive current source for future use
# only run on x64/woa to avoid contention saving
if ($(7z a $zipfile src -xr!android_webview -xr!electron -xr'!*\.git' -xr!third_party\WebKit\LayoutTests! -xr!third_party\blink\web_tests -xr!third_party\blink\perf_tests -slp -t7z -mmt=30;$LASTEXITCODE -ne 0)) {
Write-warning "Could not save source to shared drive; continuing anyway"
}
# only save on x64/woa to avoid contention saving
$env:SAVE_GCLIENT_SRC="true"
}
}
}
- if "%RUN_GCLIENT_SYNC%"=="true" ( gclient sync --with_branch_heads --with_tags --ignore_locks)
- ps: >-
if ($env:SAVE_GCLIENT_SRC -eq 'true') {
# archive current source for future use
# only run on x64/woa to avoid contention saving
if ($(7z a $zipfile src -xr!android_webview -xr!electron -xr'!*\.git' -xr!third_party\WebKit\LayoutTests! -xr!third_party\blink\web_tests -xr!third_party\blink\perf_tests -slp -t7z -mmt=30;$LASTEXITCODE -ne 0)) {
Write-warning "Could not save source to shared drive; continuing anyway"
}
}
- cd src
- ps: $env:BUILD_CONFIG_PATH="//electron/build/args/%GN_CONFIG%.gn"
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") %GN_EXTRA_ARGS% cc_wrapper=\"%SCCACHE_PATH%\""
@@ -140,12 +146,12 @@ build_script:
- ps: >-
if ($env:GN_CONFIG -eq 'release') {
python electron\script\zip-symbols.py
appveyor PushArtifact out/Default/symbols.zip
appveyor-retry appveyor PushArtifact out/Default/symbols.zip
} else {
# It's useful to have pdb files when debugging testing builds that are
# built on CI.
7z a pdb.zip out\Default\*.pdb
appveyor PushArtifact pdb.zip
appveyor-retry appveyor PushArtifact pdb.zip
}
- python electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.win.%TARGET_ARCH%.manifest
test_script:

View File

@@ -17,6 +17,7 @@ ffmpeg_branding = "Chrome"
enable_basic_printing = true
angle_enable_vulkan_validation_layers = false
dawn_enable_vulkan_validation_layers = false
is_cfi = false

View File

@@ -6,8 +6,6 @@ is_official_build = false
dcheck_always_on = true
symbol_level = 1
strip_absolute_paths_from_debug_symbols = false
# This may be guarded behind is_chrome_branded alongside
# proprietary_codecs https://webrtc-review.googlesource.com/c/src/+/36321,
# explicitly override here to build OpenH264 encoder/FFmpeg decoder.

View File

@@ -16,6 +16,10 @@ PATHS_TO_SKIP = [
'./libVkICD_mock_', #Skipping because these are outputs that we don't need
'./VkICD_mock_', #Skipping because these are outputs that we don't need
# Skipping because its an output of create_bundle from //build/config/mac/rules.gni
# that we don't need
'Electron.dSYM',
# //chrome/browser:resources depends on this via
# //chrome/browser/resources/ssl/ssl_error_assistant, but we don't need to
# ship it.
@@ -52,14 +56,13 @@ def main(argv):
with open(runtime_deps) as f:
for dep in f.readlines():
dep = dep.strip()
dist_files.add(dep)
if not skip_path(dep, dist_zip, target_cpu):
dist_files.add(dep)
if sys.platform == 'darwin' and not should_flatten:
execute(['zip', '-r', '-y', dist_zip] + list(dist_files))
else:
with zipfile.ZipFile(dist_zip, 'w', zipfile.ZIP_DEFLATED, allowZip64=True) as z:
for dep in dist_files:
if skip_path(dep, dist_zip, target_cpu):
continue
if os.path.isdir(dep):
for root, dirs, files in os.walk(dep):
for file in files:

View File

@@ -21,6 +21,7 @@ buildflag_header("buildflags") {
"ENABLE_ELECTRON_EXTENSIONS=$enable_electron_extensions",
"ENABLE_BUILTIN_SPELLCHECKER=$enable_builtin_spellchecker",
"ENABLE_PICTURE_IN_PICTURE=$enable_picture_in_picture",
"ENABLE_MEDIA_KEY_OVERRIDES=$enable_media_key_overrides",
"OVERRIDE_LOCATION_PROVIDER=$enable_fake_location_provider",
]
}

View File

@@ -22,6 +22,8 @@ declare_args() {
enable_picture_in_picture = true
enable_media_key_overrides = true
# Provide a fake location provider for mocking
# the geolocation responses. Disable it if you
# need to test with chromium's location provider.

View File

@@ -28,6 +28,22 @@ Electron 8.x, and has been removed in Electron 9.x. The layout zoom level limits
are now fixed at a minimum of 0.25 and a maximum of 5.0, as defined
[here](https://chromium.googlesource.com/chromium/src/+/938b37a6d2886bf8335fc7db792f1eb46c65b2ae/third_party/blink/common/page/page_zoom.cc#11).
### Sending non-JS objects over IPC now throws an exception
In Electron 8.0, IPC was changed to use the Structured Clone Algorithm,
bringing significant performance improvements. To help ease the transition, the
old IPC serialization algorithm was kept and used for some objects that aren't
serializable with Structured Clone. In particular, DOM objects (e.g. `Element`,
`Location` and `DOMMatrix`), Node.js objects backed by C++ classes (e.g.
`process.env`, some members of `Stream`), and Electron objects backed by C++
classes (e.g. `WebContents`, `BrowserWindow` and `WebFrame`) are not
serializable with Structured Clone. Whenever the old algorithm was invoked, a
deprecation warning was printed.
In Electron 9.0, the old serialization algorithm has been removed, and sending
such non-serializable objects will now throw an "object could not be cloned"
error.
## Planned Breaking API Changes (8.0)
### Values sent over IPC are now serialized with Structured Clone Algorithm

View File

@@ -1019,6 +1019,11 @@ console.log(win.getBounds())
Returns [`Rectangle`](structures/rectangle.md) - The `bounds` of the window as `Object`.
#### `win.getBackgroundColor()`
Returns `String` - Gets the background color of the window. See [Setting
`backgroundColor`](#setting-backgroundcolor).
#### `win.setContentBounds(bounds[, animate])`
* `bounds` [Rectangle](structures/rectangle.md)

View File

@@ -40,11 +40,17 @@ Retrieves the product descriptions.
### `inAppPurchase.canMakePayments()`
Returns `Boolean`, whether a user can make a payment.
Returns `Boolean` - whether a user can make a payment.
### `inAppPurchase.restoreCompletedTransactions()`
Restores finished transactions. This method can be called either to install purchases on additional devices, or to restore purchases for an application that the user deleted and reinstalled.
[The payment queue](https://developer.apple.com/documentation/storekit/skpaymentqueue?language=objc) delivers a new transaction for each previously completed transaction that can be restored. Each transaction includes a copy of the original transaction.
### `inAppPurchase.getReceiptURL()`
Returns `String`, the path to the receipt.
Returns `String` - the path to the receipt.
### `inAppPurchase.finishAllTransactions()`

View File

@@ -126,9 +126,10 @@ Clears the sessions HTTP cache.
`scheme://host:port`.
* `storages` String[] (optional) - The types of storages to clear, can contain:
`appcache`, `cookies`, `filesystem`, `indexdb`, `localstorage`,
`shadercache`, `websql`, `serviceworkers`, `cachestorage`.
`shadercache`, `websql`, `serviceworkers`, `cachestorage`. If not
specified, clear all storage types.
* `quotas` String[] (optional) - The types of quotas to clear, can contain:
`temporary`, `persistent`, `syncable`.
`temporary`, `persistent`, `syncable`. If not specified, clear all quotas.
Returns `Promise<void>` - resolves when the storage data has been cleared.

View File

@@ -1318,12 +1318,13 @@ win.loadURL('http://github.com')
win.webContents.on('did-finish-load', () => {
// Use default printing options
win.webContents.printToPDF({}, (error, data) => {
if (error) throw error
win.webContents.printToPDF({}).then(data => {
fs.writeFile('/tmp/print.pdf', data, (error) => {
if (error) throw error
console.log('Write PDF successfully.')
})
}).catch(error => {
console.log(error)
})
})
```

BIN
docs/images/gatekeeper.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

View File

@@ -3,7 +3,7 @@
Code signing is a security technology that you use to certify that an app was
created by you.
On macOS the system can detect any change to the app, whether the change is
On macOS the system can detect any change to the app, whether the change is
introduced accidentally or by malicious code.
On Windows the system assigns a trust level to your code signing certificate which
@@ -11,15 +11,18 @@ if you don't have, or if your trust level is low will cause security dialogs to
appear when users start using your application. Trust level builds over time
so it's better to start code signing as early as possible.
While it is possible to distribute unsigned apps, it is not recommended.
For example, here's what macOS users see when attempting to start an unsigned app:
While it is possible to distribute unsigned apps, it is not recommended. Both
Windows and macOS will, by default, prevent either the download or the
execution of unsigned applications. Starting with macOS Catalina (version 10.15),
users have to go through multiple manual steps to open unsigned applications.
![unsigned app warning on macOS](https://user-images.githubusercontent.com/2289/39488937-bdc854ba-4d38-11e8-88f8-7b3c125baefc.png)
![macOS Catalina Gatekeeper warning: The app cannot be opened because the developer cannot be verified](../images/gatekeeper.png)
> App can't be opened because it is from an unidentified developer
As you can see, users get two options: Move the app straight to the trash or
cancel running it. You don't want your users to see that dialog.
If you are building an Electron app that you intend to package and distribute,
it should be code signed. The Mac and Windows app stores do not allow unsigned
it should be code-signed. The Mac and Windows app stores do not allow unsigned
apps.
# Signing macOS builds
@@ -39,7 +42,20 @@ pass the `--osx-sign=true` flag to sign your build.
in your forge config.
- [`electron-builder`] has built-in code-signing capabilities. See [electron.build/code-signing](https://www.electron.build/code-signing)
For more info, see the [Mac App Store Submission Guide].
## Notarization
Starting with macOS Catalina, Apple requires applications to be notarized.
"Notarization" as defined by Apple means that you upload your previously signed
application to Apple for additional verification _before_ distributing the app
to your users.
To automate this process, you can use the [`electron-notarize`] module. You
do not necessarily need to complete this step for every build you make  just
the builds you intend to ship to users.
## Mac App Store
See the [Mac App Store Guide].
# Signing Windows builds
@@ -70,8 +86,9 @@ See the [Windows Store Guide].
[`electron-forge`]: https://github.com/electron-userland/electron-forge
[`electron-osx-sign`]: https://github.com/electron-userland/electron-osx-sign
[`electron-packager`]: https://github.com/electron/electron-packager
[`electron-notarize`]: https://github.com/electron/electron-notarize
[`electron-winstaller`]: https://github.com/electron/windows-installer
[Xcode]: https://developer.apple.com/xcode
[signing certificates]: https://github.com/electron-userland/electron-osx-sign/wiki/1.-Getting-Started#certificates
[Mac App Store Submission Guide]: mac-app-store-submission-guide.md
[signing certificates]: https://github.com/electron/electron-osx-sign/wiki/1.-Getting-Started#certificates
[Mac App Store Guide]: mac-app-store-submission-guide.md
[Windows Store Guide]: windows-store-guide.md

View File

@@ -56,7 +56,7 @@ can do so by either providing a mirror or an existing cache directory.
#### Mirror
You can use environment variables to override the base URL, the path at which to
look for Electron binaries, and the binary filename. The url used by `electron-download`
look for Electron binaries, and the binary filename. The url used by `@electron/get`
is composed as follows:
```plaintext
@@ -66,11 +66,11 @@ url = ELECTRON_MIRROR + ELECTRON_CUSTOM_DIR + '/' + ELECTRON_CUSTOM_FILENAME
For instance, to use the China mirror:
```plaintext
ELECTRON_MIRROR="https://npm.taobao.org/mirrors/electron/"
ELECTRON_MIRROR="https://cdn.npm.taobao.org/dist/electron/"
```
#### Cache
Alternatively, you can override the local cache. `electron-download` will cache
Alternatively, you can override the local cache. `@electron/get` will cache
downloaded binaries in a local directory to not stress your network. You can use
that cache folder to provide custom builds of Electron or to avoid making contact
with the network at all.
@@ -89,16 +89,26 @@ The cache contains the version's official zip file as well as a checksum, stored
a text file. A typical cache might look like this:
```sh
├── electron-v1.7.9-darwin-x64.zip
── electron-v1.8.1-darwin-x64.zip
├── electron-v1.8.2-beta.1-darwin-x64.zip
├── electron-v1.8.2-beta.2-darwin-x64.zip
├── electron-v1.8.2-beta.3-darwin-x64.zip
├── SHASUMS256.txt-1.7.9
├── SHASUMS256.txt-1.8.1
── SHASUMS256.txt-1.8.2-beta.1
├── SHASUMS256.txt-1.8.2-beta.2
├── SHASUMS256.txt-1.8.2-beta.3
├── httpsgithub.comelectronelectronreleasesdownloadv1.7.9electron-v1.7.9-darwin-x64.zip
│ └── electron-v1.7.9-darwin-x64.zip
├── httpsgithub.comelectronelectronreleasesdownloadv1.7.9SHASUMS256.txt
│ └── SHASUMS256.txt
├── httpsgithub.comelectronelectronreleasesdownloadv1.8.1electron-v1.8.1-darwin-x64.zip
│ └── electron-v1.8.1-darwin-x64.zip
├── httpsgithub.comelectronelectronreleasesdownloadv1.8.1SHASUMS256.txt
│ └── SHASUMS256.txt
├── httpsgithub.comelectronelectronreleasesdownloadv1.8.2-beta.1electron-v1.8.2-beta.1-darwin-x64.zip
│ └── electron-v1.8.2-beta.1-darwin-x64.zip
├── httpsgithub.comelectronelectronreleasesdownloadv1.8.2-beta.1SHASUMS256.txt
│ └── SHASUMS256.txt
├── httpsgithub.comelectronelectronreleasesdownloadv1.8.2-beta.2electron-v1.8.2-beta.2-darwin-x64.zip
│ └── electron-v1.8.2-beta.2-darwin-x64.zip
├── httpsgithub.comelectronelectronreleasesdownloadv1.8.2-beta.2SHASUMS256.txt
│ └── SHASUMS256.txt
├── httpsgithub.comelectronelectronreleasesdownloadv1.8.2-beta.3electron-v1.8.2-beta.3-darwin-x64.zip
│ └── electron-v1.8.2-beta.3-darwin-x64.zip
└── httpsgithub.comelectronelectronreleasesdownloadv1.8.2-beta.3SHASUMS256.txt
└── SHASUMS256.txt
```
## Skip binary download

View File

@@ -21,12 +21,12 @@ If your app has its own dark mode you should toggle it on and off in sync with t
this by listening for the theme changed event on Electron's `systemPreferences` module. E.g.
```js
const { systemPreferences } = require('electron')
const { nativeTheme } = require('electron')
systemPreferences.subscribeNotification(
'AppleInterfaceThemeChangedNotification',
function theThemeHasChanged () {
updateMyAppTheme(systemPreferences.isDarkMode())
updateMyAppTheme(nativeTheme.shouldUseDarkColors)
}
)
```

View File

@@ -116,7 +116,7 @@ BrowserWindow.getFocusedWindow = () => {
BrowserWindow.fromWebContents = (webContents) => {
for (const window of BrowserWindow.getAllWindows()) {
if (window.webContents.equal(webContents)) return window
if (window.webContents && window.webContents.equal(webContents)) return window
}
return null

View File

@@ -7,6 +7,7 @@ const path = require('path')
const url = require('url')
const { app, ipcMain, session, deprecate } = electron
const { internalWindowOpen } = require('@electron/internal/browser/guest-window-manager')
const NavigationController = require('@electron/internal/browser/navigation-controller')
const { ipcMainInternal } = require('@electron/internal/browser/ipc-main-internal')
const ipcMainUtils = require('@electron/internal/browser/ipc-main-internal-utils')
@@ -397,9 +398,7 @@ WebContents.prototype._init = function () {
width: 800,
height: 600
}
ipcMainInternal.emit('ELECTRON_GUEST_WINDOW_MANAGER_INTERNAL_WINDOW_OPEN',
event, url, referrer, frameName, disposition,
options, additionalFeatures, postData)
internalWindowOpen(event, url, referrer, frameName, disposition, options, additionalFeatures, postData)
})
// Create a new browser window for the native implementation of
@@ -421,8 +420,7 @@ WebContents.prototype._init = function () {
webContents
}
const referrer = { url: '', policy: 'default' }
ipcMainInternal.emit('ELECTRON_GUEST_WINDOW_MANAGER_INTERNAL_WINDOW_OPEN',
event, url, referrer, frameName, disposition, options)
internalWindowOpen(event, url, referrer, frameName, disposition, options)
})
}

View File

@@ -1,6 +1,7 @@
'use strict'
const { BrowserWindow, webContents } = require('electron')
const electron = require('electron')
const { BrowserWindow } = electron
const { isSameOrigin } = process.electronBinding('v8_util')
const { ipcMainInternal } = require('@electron/internal/browser/ipc-main-internal')
const ipcMainUtils = require('@electron/internal/browser/ipc-main-internal-utils')
@@ -244,13 +245,11 @@ ipcMainInternal.on('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_OPEN', (event, url, fra
}
const referrer = { url: '', policy: 'default' }
ipcMainInternal.emit('ELECTRON_GUEST_WINDOW_MANAGER_INTERNAL_WINDOW_OPEN', event,
url, referrer, frameName, disposition, options, additionalFeatures)
internalWindowOpen(event, url, referrer, frameName, disposition, options, additionalFeatures)
})
// Routed window.open messages with fully parsed options
ipcMainInternal.on('ELECTRON_GUEST_WINDOW_MANAGER_INTERNAL_WINDOW_OPEN', function (event, url, referrer,
frameName, disposition, options, additionalFeatures, postData) {
function internalWindowOpen (event, url, referrer, frameName, disposition, options, additionalFeatures, postData) {
options = mergeBrowserWindowOptions(event.sender, options)
event.sender.emit('new-window', event, url, frameName, disposition, options, additionalFeatures, referrer)
const { newGuest } = event
@@ -268,11 +267,12 @@ ipcMainInternal.on('ELECTRON_GUEST_WINDOW_MANAGER_INTERNAL_WINDOW_OPEN', functio
} else {
event.returnValue = createGuest(event.sender, url, referrer, frameName, options, postData)
}
})
}
const makeSafeHandler = function (handler) {
return (event, guestId, ...args) => {
const guestContents = webContents.fromId(guestId)
// Access webContents via electron to prevent circular require.
const guestContents = electron.webContents.fromId(guestId)
if (!guestContents) {
throw new Error(`Invalid guestId: ${guestId}`)
}
@@ -289,8 +289,8 @@ const handleMessageSync = function (channel, handler) {
ipcMainUtils.handleSync(channel, makeSafeHandler(handler))
}
const assertCanAccessWindow = function (contents, guestContents) {
if (!canAccessWindow(contents, guestContents)) {
const securityCheck = function (contents, guestContents, check) {
if (!check(contents, guestContents)) {
console.error(`Blocked ${contents.getURL()} from accessing guestId: ${guestContents.id}`)
throw new Error(`Access denied to guestId: ${guestContents.id}`)
}
@@ -303,7 +303,7 @@ const windowMethods = new Set([
])
handleMessage('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_METHOD', (event, guestContents, method, ...args) => {
assertCanAccessWindow(event.sender, guestContents)
securityCheck(event.sender, guestContents, canAccessWindow)
if (!windowMethods.has(method)) {
console.error(`Blocked ${event.sender.getURL()} from calling method: ${method}`)
@@ -321,6 +321,8 @@ handleMessage('ELECTRON_GUEST_WINDOW_MANAGER_WINDOW_POSTMESSAGE', (event, guestC
// The W3C does not seem to have word on how postMessage should work when the
// origins do not match, so we do not do |canAccessWindow| check here since
// postMessage across origins is useful and not harmful.
securityCheck(event.sender, guestContents, isRelatedWindow)
if (targetOrigin === '*' || isSameOrigin(guestContents.getURL(), targetOrigin)) {
const sourceId = event.sender.id
guestContents._sendInternal('ELECTRON_GUEST_WINDOW_POSTMESSAGE', sourceId, message, sourceOrigin)
@@ -334,7 +336,7 @@ const webContentsMethodsAsync = new Set([
])
handleMessage('ELECTRON_GUEST_WINDOW_MANAGER_WEB_CONTENTS_METHOD', (event, guestContents, method, ...args) => {
assertCanAccessWindow(event.sender, guestContents)
securityCheck(event.sender, guestContents, canAccessWindow)
if (!webContentsMethodsAsync.has(method)) {
console.error(`Blocked ${event.sender.getURL()} from calling method: ${method}`)
@@ -349,7 +351,7 @@ const webContentsMethodsSync = new Set([
])
handleMessageSync('ELECTRON_GUEST_WINDOW_MANAGER_WEB_CONTENTS_METHOD', (event, guestContents, method, ...args) => {
assertCanAccessWindow(event.sender, guestContents)
securityCheck(event.sender, guestContents, canAccessWindow)
if (!webContentsMethodsSync.has(method)) {
console.error(`Blocked ${event.sender.getURL()} from calling method: ${method}`)
@@ -358,3 +360,5 @@ handleMessageSync('ELECTRON_GUEST_WINDOW_MANAGER_WEB_CONTENTS_METHOD', (event, g
return guestContents[method](...args)
})
exports.internalWindowOpen = internalWindowOpen

View File

@@ -195,13 +195,14 @@ app.on('window-all-closed', () => {
}
})
Promise.all([
import('@electron/internal/browser/default-menu'),
app.whenReady()
]).then(([{ setDefaultApplicationMenu }]) => {
// Create default menu
setDefaultApplicationMenu()
})
const { setDefaultApplicationMenu } = require('@electron/internal/browser/default-menu')
// Create default menu.
//
// Note that the task must be added before loading any app, so we can make sure
// the call is maded before any user window is created, otherwise the default
// menu may show even when user explicitly hides the menu.
app.once('ready', setDefaultApplicationMenu)
if (packagePath) {
// Finally load app's main.js and transfer control to C++.

View File

@@ -242,7 +242,8 @@ export const windowSetup = (
Object.defineProperty(window.history, 'length', {
get: function () {
return ipcRendererInternal.sendSync('ELECTRON_NAVIGATION_CONTROLLER_LENGTH')
}
},
set () {}
})
if (guestInstanceId != null) {

View File

@@ -1,6 +1,6 @@
{
"name": "electron",
"version": "9.0.0-nightly.20191208",
"version": "9.0.0-nightly.20191224",
"repository": "https://github.com/electron/electron",
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {
@@ -130,6 +130,9 @@
"python script/check-trailing-whitespace.py --fix",
"git add filenames.auto.gni"
],
"{*.patch,.patches}": [
"node script/lint.js --patches --only --"
],
"DEPS": [
"node script/gen-hunspell-filenames.js"
]

View File

@@ -3,6 +3,13 @@ From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Fri, 18 Jan 2019 14:23:28 -0800
Subject: expose aes-{128,256}-cfb
This exposes AES-CFB ciphers through the EVP APIs. BoringSSL has
implementations for these ciphers, but Node doesn't realise that because
without this patch, they're not listed in the APIs that Node uses.
This should be upstreamed. See e.g.
https://boringssl-review.googlesource.com/c/boringssl/+/33984 for a
similar patch that was merged upstream.
diff --git a/crypto/cipher_extra/cipher_extra.c b/crypto/cipher_extra/cipher_extra.c
index b132265bc103658dba3de6e0c3dc50d3634da5b0..588a4773437c311877f275bf3679f9688cda3c46 100644

View File

@@ -8,32 +8,8 @@ Refs https://github.com/nodejs/node/pull/26960.
Upstreamed at https://boringssl-review.googlesource.com/c/boringssl/+/38524.
diff --git a/crypto/evp/p_rsa.c b/crypto/evp/p_rsa.c
index 865b36af9b830302fb1068c4965133213c1507dc..71b342f13db5f446aa15f070b6e4aef9b8c25939 100644
--- a/crypto/evp/p_rsa.c
+++ b/crypto/evp/p_rsa.c
@@ -569,6 +569,19 @@ int EVP_PKEY_CTX_get_rsa_padding(EVP_PKEY_CTX *ctx, int *out_padding) {
0, out_padding);
}
+int EVP_PKEY_CTX_set_rsa_pss_keygen_md(EVP_PKEY_CTX *ctx, const EVP_MD *md) {
+ return 0;
+}
+
+int EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(EVP_PKEY_CTX *ctx, int salt_len) {
+ return 0;
+}
+
+int EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(EVP_PKEY_CTX *ctx,
+ const EVP_MD *md) {
+ return 0;
+}
+
int EVP_PKEY_CTX_set_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int salt_len) {
return EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA,
(EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY),
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index ad9c05e052756715e3fe67bf9517863ede027d5b..d1729cfc8beefd2cb20abf05043fed43e566a312 100644
index 19baa64ddba84c3dd59e65aef77d1ebbf49e43df..37217c49f7e05eb25562023bf356fdadae1bc66f 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -723,6 +723,18 @@ OPENSSL_EXPORT int EVP_PKEY_CTX_set_rsa_padding(EVP_PKEY_CTX *ctx, int padding);

View File

@@ -1 +0,0 @@
build_win_iwyu_for_breakpad.patch

View File

@@ -1,30 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Wed, 30 Oct 2019 18:21:45 -0700
Subject: build,[win]: IWYU for //third_party/breakpad
diff --git a/src/common/windows/guid_string.h b/src/common/windows/guid_string.h
index 48a5c1d3708f9398fffbe5f5cda29b4ab2408e70..c3043bcb8817ae5be8682e22985bad2d7a498f43 100644
--- a/src/common/windows/guid_string.h
+++ b/src/common/windows/guid_string.h
@@ -34,6 +34,7 @@
#include <guiddef.h>
+#include <memory>
#include <string>
namespace google_breakpad {
diff --git a/src/tools/windows/dump_syms/dump_syms.cc b/src/tools/windows/dump_syms/dump_syms.cc
index 5b7d1777538cd3cfefd0bef45558f900798d6c51..1f22cfc2d14b2523c7ae133c1ba6fe2d66333d47 100644
--- a/src/tools/windows/dump_syms/dump_syms.cc
+++ b/src/tools/windows/dump_syms/dump_syms.cc
@@ -33,6 +33,7 @@
#include <stdio.h>
#include <wchar.h>
+#include <memory>
#include <string>
#include "common/windows/pdb_source_line_writer.h"

View File

@@ -36,7 +36,6 @@ chrome_key_systems.patch
allow_nested_error_trackers.patch
blink_initialization_order.patch
ssl_security_state_tab_helper.patch
exclude-a-few-test-files-from-build.patch
desktop_media_list.patch
proxy_config_monitor.patch
gritsettings_resource_ids.patch
@@ -56,7 +55,6 @@ fix_disable_usage_of_setapplicationisdaemon_and.patch
unsandboxed_ppapi_processes_skip_zygote.patch
patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch
build_add_electron_tracing_category.patch
disable_custom_libcxx_on_windows.patch
worker_context_will_destroy.patch
fix_breakpad_symbol_generation_on_linux_arm.patch
frame_host_manager.patch
@@ -74,16 +72,9 @@ feat_add_set_theme_source_to_allow_apps_to.patch
revert_cleanup_remove_menu_subtitles_sublabels.patch
export_fetchapi_mojo_traits_to_fix_component_build.patch
revert_remove_contentrendererclient_shouldfork.patch
build_win_disable_zc_twophase.patch
ignore_rc_check.patch
build_win_iwyu_for_smil_time.patch
remove_usage_of_incognito_apis_in_the_spellchecker.patch
chore_use_electron_resources_not_chrome_for_spellchecker.patch
feat_unset_window_aspect_ratio_on_linux.patch
fix_ambiguous_reference_to_data.patch
backport_fix_msstl_compat_in_ui_events.patch
build_win_fix_msstl_compatibility_for_pdf.patch
fix_missing_algorithm_include.patch
add_trustedauthclient_to_urlloaderfactory.patch
fix_focusowningwebcontents_to_handle_renderwidgethosts_for_oopifs.patch
feat_allow_disbaling_blink_scheduler_throttling_per_renderview.patch
feat_allow_disabling_blink_scheduler_throttling_per_renderview.patch
accessible_pane_view.patch

View File

@@ -0,0 +1,32 @@
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: fix: add back virtual methods in AccessiblePaneView
Mark SetPaneFocus and RemovePaneFocus as virtual in AccessiblePaneView, as we
need to override them in MenuBar.
Pending upstream patch: https://crrev.com/c/1959189
diff --git a/ui/views/accessible_pane_view.h b/ui/views/accessible_pane_view.h
index 813fd13860a863cd1e6e5bfec38d15f798418673..990c905e8f19dd015a625010ea30adfcb6f51ea6 100644
--- a/ui/views/accessible_pane_view.h
+++ b/ui/views/accessible_pane_view.h
@@ -35,7 +35,7 @@ class VIEWS_EXPORT AccessiblePaneView : public View,
// If |initial_focus| is not NULL, that control will get
// the initial focus, if it's enabled and focusable. Returns true if
// the pane was able to receive focus.
- bool SetPaneFocus(View* initial_focus);
+ virtual bool SetPaneFocus(View* initial_focus);
bool pane_has_focus() const { return pane_has_focus_; }
@@ -83,7 +83,7 @@ class VIEWS_EXPORT AccessiblePaneView : public View,
bool ContainsForFocusSearch(View* root, const View* v);
// Remove pane focus.
- void RemovePaneFocus();
+ virtual void RemovePaneFocus();
View* GetFirstFocusableChild();
View* GetLastFocusableChild();

View File

@@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
This should be upstreamed.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 0de66bc85b1d392fba44858e3a478d918e538393..a21e318b2108223bb4ca6a74d3c654c3ad7ba77a 100644
index 384f81bff1ae2551b180175a3ec88baf88677d12..166d2ef3e0d14a84ecbe3c5d0d0bd1c8329b3c9e 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -228,6 +228,10 @@ int GpuMain(const MainFunctionParams& parameters) {
@@ -258,6 +258,10 @@ int GpuMain(const MainFunctionParams& parameters) {
logging::SetLogMessageHandler(GpuProcessLogMessageHandler);
@@ -24,7 +24,7 @@ index 0de66bc85b1d392fba44858e3a478d918e538393..a21e318b2108223bb4ca6a74d3c654c3
// We are experiencing what appear to be memory-stomp issues in the GPU
// process. These issues seem to be impacting the task executor and listeners
// registered to it. Create the task executor on the heap to guard against
@@ -336,7 +340,6 @@ int GpuMain(const MainFunctionParams& parameters) {
@@ -366,7 +370,6 @@ int GpuMain(const MainFunctionParams& parameters) {
GpuProcess gpu_process(io_thread_priority);
#endif
@@ -33,7 +33,7 @@ index 0de66bc85b1d392fba44858e3a478d918e538393..a21e318b2108223bb4ca6a74d3c654c3
client->PostIOThreadCreated(gpu_process.io_task_runner());
diff --git a/content/public/gpu/content_gpu_client.h b/content/public/gpu/content_gpu_client.h
index 3331f7152da864712e1878b4d2a2f5e2fa34b4ed..38b14405b42813d51406671ce0c4655a85bd88d0 100644
index f68558bd2c4ff725443b0d6893ebe7da07c26a00..3dda58157f32dbc9c7d9001192c30a3a1c152437 100644
--- a/content/public/gpu/content_gpu_client.h
+++ b/content/public/gpu/content_gpu_client.h
@@ -39,6 +39,10 @@ class CONTENT_EXPORT ContentGpuClient {
@@ -44,6 +44,6 @@ index 3331f7152da864712e1878b4d2a2f5e2fa34b4ed..38b14405b42813d51406671ce0c4655a
+ // creating the message loop.
+ virtual void PreCreateMessageLoop() {}
+
// Initializes the registry. |registry| will be passed to a ConnectionFilter
// (which lives on the IO thread). Unlike other childthreads, the client must
// register additional interfaces on this registry rather than just creating
// Called during initialization once the GpuService has been initialized.
virtual void GpuServiceInitialized() {}

View File

@@ -12,7 +12,7 @@ when we override ReallocateBufferMemory, so we therefore need to implement
Realloc on the v8 side and correspondingly in gin.
diff --git a/gin/array_buffer.cc b/gin/array_buffer.cc
index a02797e94f61e8c71428633a4585a625dc5aadbd..305b7d307d233af699e3f495f85de0f8097ff311 100644
index b94a71ef856f92404e16544e22ebbadf57cff363..b15685f6907bcafeb1acd62bfe76f0713dea27f3 100644
--- a/gin/array_buffer.cc
+++ b/gin/array_buffer.cc
@@ -43,6 +43,10 @@ void* ArrayBufferAllocator::AllocateUninitialized(size_t length) {
@@ -39,10 +39,10 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f
GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index 7fb51da7c03f9bd6bfcb8724710edf72dc81c79e..138a6fca7e85db767dea0e06be735fff81fe9c49 100644
index c69cfebccd7d7bff35d2292e61bf6008f0ca7940..2cb5f5d3f89f2af13221e66b2277a28532d53deb 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -647,6 +647,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
@@ -654,6 +654,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
size, ArrayBufferContents::kDontInitialize);
}
@@ -54,7 +54,7 @@ index 7fb51da7c03f9bd6bfcb8724710edf72dc81c79e..138a6fca7e85db767dea0e06be735fff
ArrayBufferContents::FreeMemory(data);
}
diff --git a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc
index ac525b62a1282839bc906b1ee59837211a83476c..5e6c54b87e88ea2741bc7986bf76ddaa48723e56 100644
index 095ca3db051362319611976b9052725ab16c1b3a..13e802a5732f0b04832d6dd8031ae43e1240b79a 100644
--- a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc
+++ b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.cc
@@ -126,6 +126,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
@@ -70,14 +70,14 @@ index ac525b62a1282839bc906b1ee59837211a83476c..5e6c54b87e88ea2741bc7986bf76ddaa
WTF::Partitions::ArrayBufferPartition()->Free(data);
}
diff --git a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h
index 1adf4924657624059dcbe4e88cef684478787752..3b14d852b0654309cb53f933e396dc1e7b479790 100644
index 2e871b20c1e6fc3703178957fd03923f02ab1b47..8f2fd80130f1e7f957d642af4e5c22f9a5937ce4 100644
--- a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h
+++ b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h
@@ -149,6 +149,7 @@ class CORE_EXPORT ArrayBufferContents {
@@ -106,6 +106,7 @@ class CORE_EXPORT ArrayBufferContents {
void CopyTo(ArrayBufferContents& other);
static void* AllocateMemoryOrNull(size_t, InitializationPolicy);
+ static void* Realloc(void* data, size_t);
static void FreeMemory(void*);
static DataHandle CreateDataHandle(size_t, InitializationPolicy);
private:

View File

@@ -10,11 +10,11 @@ WebContents, and cancels the authentication if there's no WebContents
available, which there isn't in the case of the 'net' module.
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 6b14d8354375377526e141ee499a7583be3f22b0..eeb9e19c0ecdf4631e596e7c0927693f2239f293 100644
index def2cb5e252389879c6287d44d29e704703841cb..98d64785240bde3e182268e453dced41b432df9a 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -181,6 +181,25 @@ interface TrustedURLLoaderHeaderClient {
pending_receiver<TrustedHeaderClient> header_client);
@@ -190,6 +190,25 @@ struct HttpAuthStaticNetworkContextParams {
= DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS;
};
+interface TrustedAuthClient {
@@ -39,20 +39,20 @@ index 6b14d8354375377526e141ee499a7583be3f22b0..eeb9e19c0ecdf4631e596e7c0927693f
interface CertVerifierClient {
Verify(
int32 default_error,
@@ -559,6 +578,8 @@ struct URLLoaderFactoryParams {
// impact because of the extra process hops, so use should be minimized.
pending_remote<TrustedURLLoaderHeaderClient>? header_client;
@@ -596,6 +615,8 @@ struct URLLoaderFactoryParams {
// interface. This still respects the per-context block lists.
CorsOriginAccessPatterns? factory_bound_access_patterns;
+ pending_remote<TrustedURLLoaderAuthClient>? auth_client;
+
// If non-empty array is given, |factory_bound_allow_patterns| is used for
// CORS checks in addition to the per-context allow patterns that is managed
// via NetworkContext interface. This still respects the per-context block
// Key used to isolate shared network resources like the cache.
NetworkIsolationKey? network_isolation_key;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index d4e13ffaed76847b00cf98b248ba17ad70a9884c..33ab3ea9c60e097d8525f1066f3890a5bccd754a 100644
index 96ea5f62e5796810f87abfb2a3c400ffcc024ff0..d50831adb6ba65ece49b62ec4a8cd1a92fdb0d28 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -335,6 +335,7 @@ URLLoader::URLLoader(
@@ -334,6 +334,7 @@ URLLoader::URLLoader(
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
@@ -62,17 +62,17 @@ index d4e13ffaed76847b00cf98b248ba17ad70a9884c..33ab3ea9c60e097d8525f1066f3890a5
network_service_client_(network_service_client),
@@ -391,6 +392,11 @@ URLLoader::URLLoader(
header_client_.set_disconnect_handler(
base::BindOnce(&URLLoader::OnConnectionError, base::Unretained(this)));
base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
}
+ if (url_loader_auth_client) {
+ url_loader_auth_client->OnLoaderCreated(request_id_, auth_client_.BindNewPipeAndPassReceiver());
+ auth_client_.set_disconnect_handler(
+ base::BindOnce(&URLLoader::OnConnectionError, base::Unretained(this)));
+ base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
+ }
if (want_raw_headers_) {
options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse |
mojom::kURLLoadOptionSendSSLInfoForCertificateError;
@@ -818,7 +824,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request,
@@ -826,7 +832,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request,
void URLLoader::OnAuthRequired(net::URLRequest* url_request,
const net::AuthChallengeInfo& auth_info) {
@@ -81,31 +81,34 @@ index d4e13ffaed76847b00cf98b248ba17ad70a9884c..33ab3ea9c60e097d8525f1066f3890a5
OnAuthCredentials(base::nullopt);
return;
}
@@ -834,10 +840,18 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
@@ -842,11 +848,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
if (url_request->response_headers())
head.headers = url_request->response_headers();
head.auth_challenge_info = auth_info;
head->headers = url_request->response_headers();
head->auth_challenge_info = auth_info;
- network_context_client_->OnAuthRequired(
- fetch_window_id_, factory_params_->process_id, render_frame_id_,
- request_id_, url_request_->url(), first_auth_attempt_, auth_info, head,
- request_id_, url_request_->url(), first_auth_attempt_, auth_info,
- std::move(head),
- auth_challenge_responder_receiver_.BindNewPipeAndPassRemote());
+
+ if (auth_client_) {
+ auth_client_->OnAuthRequired(
+ fetch_window_id_, factory_params_->process_id, render_frame_id_,
+ request_id_, url_request_->url(), first_auth_attempt_, auth_info, head,
+ request_id_, url_request_->url(), first_auth_attempt_, auth_info,
+ std::move(head),
+ auth_challenge_responder_receiver_.BindNewPipeAndPassRemote());
+ } else {
+ network_context_client_->OnAuthRequired(
+ fetch_window_id_, factory_params_->process_id, render_frame_id_,
+ request_id_, url_request_->url(), first_auth_attempt_, auth_info, head,
+ request_id_, url_request_->url(), first_auth_attempt_, auth_info,
+ std::move(head),
+ auth_challenge_responder_receiver_.BindNewPipeAndPassRemote());
+ }
auth_challenge_responder_receiver_.set_disconnect_handler(
base::BindOnce(&URLLoader::DeleteSelf, base::Unretained(this)));
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
index 0a47148a52a46f8a6f12f503731623f87e15b173..db8ca018c7e99a1a1acea156b4d49a755b93cc09 100644
index 564851586d2ad5fe0ae6acd4457257ce8ed665b3..3291fe28deb20b9630589e8ea11ea1366583081c 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -85,6 +85,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -116,7 +119,7 @@ index 0a47148a52a46f8a6f12f503731623f87e15b173..db8ca018c7e99a1a1acea156b4d49a75
mojom::OriginPolicyManager* origin_policy_manager);
~URLLoader() override;
@@ -362,6 +363,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -378,6 +379,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
base::Optional<base::UnguessableToken> fetch_window_id_;
mojo::Remote<mojom::TrustedHeaderClient> header_client_;
@@ -125,7 +128,7 @@ index 0a47148a52a46f8a6f12f503731623f87e15b173..db8ca018c7e99a1a1acea156b4d49a75
std::unique_ptr<FileOpenerForUpload> file_opener_for_upload_;
diff --git a/services/network/url_loader_factory.cc b/services/network/url_loader_factory.cc
index 7145e0e96550d554bb1df85bd79818ec9a45f7b1..53225eb1b0b7f1aa2498cecc8222f9f897ac364f 100644
index 9e9baaf8ecd33e6416027014361edc332ab71e3c..cc2c59828f56988d43b680588d4625d9864aa9b6 100644
--- a/services/network/url_loader_factory.cc
+++ b/services/network/url_loader_factory.cc
@@ -65,6 +65,7 @@ URLLoaderFactory::URLLoaderFactory(
@@ -136,7 +139,7 @@ index 7145e0e96550d554bb1df85bd79818ec9a45f7b1..53225eb1b0b7f1aa2498cecc8222f9f8
cors_url_loader_factory_(cors_url_loader_factory) {
DCHECK(context);
DCHECK_NE(mojom::kInvalidProcessId, params_->process_id);
@@ -209,6 +210,7 @@ void URLLoaderFactory::CreateLoaderAndStart(
@@ -207,6 +208,7 @@ void URLLoaderFactory::CreateLoaderAndStart(
resource_scheduler_client_, std::move(keepalive_statistics_recorder),
std::move(network_usage_accumulator),
header_client_.is_bound() ? header_client_.get() : nullptr,
@@ -145,10 +148,10 @@ index 7145e0e96550d554bb1df85bd79818ec9a45f7b1..53225eb1b0b7f1aa2498cecc8222f9f8
cors_url_loader_factory_->OnLoaderCreated(std::move(loader));
}
diff --git a/services/network/url_loader_factory.h b/services/network/url_loader_factory.h
index 7b143aa49be833ddf05b7b99bea19ee0b674b79c..6d1fbca87e3827c953fdac2cfb96806114d8aea9 100644
index 7d13494649c43be52b06774f2cf5763ebe9129c0..d4b19342c44f86c685f700e4260475ff2235b298 100644
--- a/services/network/url_loader_factory.h
+++ b/services/network/url_loader_factory.h
@@ -71,6 +71,7 @@ class URLLoaderFactory : public mojom::URLLoaderFactory {
@@ -72,6 +72,7 @@ class URLLoaderFactory : public mojom::URLLoaderFactory {
mojom::URLLoaderFactoryParamsPtr params_;
scoped_refptr<ResourceSchedulerClient> resource_scheduler_client_;
mojo::Remote<mojom::TrustedURLLoaderHeaderClient> header_client_;

View File

@@ -6,10 +6,10 @@ Subject: allow new privileges in unsandboxed child processes
This allows unsandboxed renderers to launch setuid processes on Linux.
diff --git a/content/browser/child_process_launcher_helper_linux.cc b/content/browser/child_process_launcher_helper_linux.cc
index 720b92a1a3a7ab5512f839005b272e4989d2ac65..b1759109627cd00053489dcdd397e942fa9d289f 100644
index ea5258a03f83bcbda7bae296392a46cdd63d6fe1..14eed861e8828fd2ed7d8f27f9fd3bf180d04677 100644
--- a/content/browser/child_process_launcher_helper_linux.cc
+++ b/content/browser/child_process_launcher_helper_linux.cc
@@ -54,6 +54,18 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
@@ -53,6 +53,18 @@ bool ChildProcessLauncherHelper::BeforeLaunchOnLauncherThread(
const int sandbox_fd = SandboxHostLinux::GetInstance()->GetChildSocket();
options->fds_to_remap.push_back(
std::make_pair(sandbox_fd, service_manager::GetSandboxFD()));

View File

@@ -1,46 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Thu, 31 Oct 2019 14:22:50 -0700
Subject: backport: fix MSSTL compat in ui/events
Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/1893754
diff --git a/ui/events/blink/prediction/least_squares_predictor.cc b/ui/events/blink/prediction/least_squares_predictor.cc
index b43fe1893134992937fc7d97ce335344683bfa6b..8a95e17d0835afebd7594c206438cb54022853c9 100644
--- a/ui/events/blink/prediction/least_squares_predictor.cc
+++ b/ui/events/blink/prediction/least_squares_predictor.cc
@@ -5,6 +5,8 @@
#include "ui/events/blink/prediction/least_squares_predictor.h"
#include "ui/events/blink/prediction/predictor_factory.h"
+#include <algorithm>
+
namespace ui {
namespace {
diff --git a/ui/events/blink/prediction/linear_predictor.cc b/ui/events/blink/prediction/linear_predictor.cc
index e97f579d80573a1f801986c724bb33cd8bc52e8a..190fa1b3894ef5f7828e2f265566e16ce10e84c5 100644
--- a/ui/events/blink/prediction/linear_predictor.cc
+++ b/ui/events/blink/prediction/linear_predictor.cc
@@ -5,6 +5,8 @@
#include "ui/events/blink/prediction/linear_predictor.h"
#include "ui/events/blink/prediction/predictor_factory.h"
+#include <algorithm>
+
namespace ui {
LinearPredictor::LinearPredictor(EquationOrder order) {
diff --git a/ui/events/blink/prediction/linear_resampling.cc b/ui/events/blink/prediction/linear_resampling.cc
index e2a8757b779ba270cd3ae8f1735543be3cc324e0..2b2efe7f132055dfc1f650707a9cbb7a5842ca1a 100644
--- a/ui/events/blink/prediction/linear_resampling.cc
+++ b/ui/events/blink/prediction/linear_resampling.cc
@@ -4,6 +4,8 @@
#include "ui/events/blink/prediction/linear_resampling.h"
+#include <algorithm>
+
#include "ui/events/blink/prediction/predictor_factory.h"
namespace ui {

View File

@@ -3,9 +3,10 @@ From: deepak1556 <hop2deep@gmail.com>
Date: Thu, 20 Sep 2018 17:47:47 -0700
Subject: blink-worker-enable-csp-in-file-scheme.patch
This allows file:// URLs in workers to have a CSP.
diff --git a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
index b1b9f451951bb7b11eefe6453a71a6b44be838a5..0f62ba09ef99538a5b0b306f601d10c44a7a7abf 100644
index 1f8273a782a5d3580e139d724ce8a791a100dcfb..90ad0d663003c0bded47183b61bff71a0c01a196 100644
--- a/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
+++ b/third_party/blink/renderer/core/workers/worker_classic_script_loader.cc
@@ -308,7 +308,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(

View File

@@ -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 05e05fb1631851009897f3789d3e770475ce1363..e2ad5fef884532847d035430c14c25e042e2ab24 100644
index 7ea8ad8fd162fd6a97052188a8e8868dab1c1fe9..a64966e2db0e2e7b0390a322525522e05ddbb022 100644
--- a/third_party/blink/renderer/core/fileapi/file.h
+++ b/third_party/blink/renderer/core/fileapi/file.h
@@ -201,6 +201,9 @@ class CORE_EXPORT File final : public Blob {
@@ -193,6 +193,9 @@ class CORE_EXPORT File final : public Blob {
}
const String& name() const { return name_; }
@@ -21,7 +21,7 @@ index 05e05fb1631851009897f3789d3e770475ce1363..e2ad5fef884532847d035430c14c25e0
// http://dev.w3.org/2006/webapi/FileAPI/#file-attrs
int64_t lastModified() const;
diff --git a/third_party/blink/renderer/core/fileapi/file.idl b/third_party/blink/renderer/core/fileapi/file.idl
index 41b8183e858b6d955bacbb72281a08e750b6b29f..0db894ecfae63795724335d914f9f992c0755fd1 100644
index e5cf6cc926ff2670f713018dd750e79c53ee76eb..60eca3cf100b31c3d2c0c68271d98c60321e69a7 100644
--- a/third_party/blink/renderer/core/fileapi/file.idl
+++ b/third_party/blink/renderer/core/fileapi/file.idl
@@ -32,6 +32,7 @@

View File

@@ -10,10 +10,10 @@ to fix electron/electron#13787. The backport landed in Chromium 67 but the
DidCreateScriptContext re-ordering needs to be upstreamed or kept indefinitely
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index 4eb7d11483b55ef99758aa6782b3516fef706628..c384a9707d0f998b5e8bc80ad9af1ca29d9ef58c 100644
index 8095edd988c171a8ad7382d1c2f9fa63ee9e5ffc..802316843c6c270efb871a5d697c4e0d182605d0 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -210,11 +210,10 @@ void LocalWindowProxy::Initialize() {
@@ -227,11 +227,10 @@ void LocalWindowProxy::Initialize() {
GetFrame()->IsMainFrame());
MainThreadDebugger::Instance()->ContextCreated(script_state_, GetFrame(),
origin);

View File

@@ -14,10 +14,10 @@ when there is code doing that.
This patch reverts the change to fix the crash in Electron.
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index fa4e26718e2d663305a2be664d8ffbf1a64b3c34..7ba237076e14f0806b94a2fcae3894fec31d0e71 100644
index 94019ebf806be6b0a9424b43579d46bf6a0e3de4..fa827b5846fc93c59f98795da51bab0f3b33de5e 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -333,10 +333,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
@@ -344,10 +344,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
}
CHECK(!view_ || !view_->IsAttached());
@@ -28,7 +28,7 @@ index fa4e26718e2d663305a2be664d8ffbf1a64b3c34..7ba237076e14f0806b94a2fcae3894fe
if (!Client())
return;
@@ -354,6 +350,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
@@ -365,6 +361,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
// Notify ScriptController that the frame is closing, since its cleanup ends
// up calling back to LocalFrameClient via WindowProxy.
GetScriptController().ClearForClose();

View File

@@ -3,12 +3,14 @@ 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 fd5d927dda08bb8ea9fe89ae752d700c67ca1bbe..81a452bf2d2e61cbff0c4573223b0af5a5e20083 100644
index 05a33b9a2cbed57e4e037428397b59f30f83ce66..0cd308b38a158a016b099beed6a31fa1c5a487ad 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -343,6 +343,9 @@ class WebLocalFrame : public WebFrame {
@@ -341,6 +341,9 @@ class WebLocalFrame : public WebFrame {
// be calling this API.
virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
@@ -19,10 +21,10 @@ index fd5d927dda08bb8ea9fe89ae752d700c67ca1bbe..81a452bf2d2e61cbff0c4573223b0af5
// that the script evaluated to with callback. Script execution can be
// suspend.
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 81c8e59d81af696b6175f3cf6ce5441d8ae9c265..dd77b47e884a703590a3ad74513f189621ca89e6 100644
index 8c984ae92de2a53e59782bea94a143ee7fde2248..105e1e92002adde207db5c770197547ab6b55f97 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
@@ -880,6 +880,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
@@ -935,6 +935,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
return MainWorldScriptContext()->Global();
}
@@ -37,10 +39,10 @@ index 81c8e59d81af696b6175f3cf6ce5441d8ae9c265..dd77b47e884a703590a3ad74513f1896
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 16e0460b1c4d7e239e0516a52a3f375c016f37b8..1d5f93c1a79a68815273191ae89f8b995ed97256 100644
index e3d4a369e6708827497b7ef8ce38817bde8c8010..ad7fd6c34f10d10257ef5c6e5b4b916dc924f20c 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
@@ -171,6 +171,8 @@ class CORE_EXPORT WebLocalFrameImpl final
int argc,
v8::Local<v8::Value> argv[]) override;
v8::Local<v8::Context> MainWorldScriptContext() const override;

View File

@@ -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 14fd70d103a707a4aa217f662037908178daf9cf..30011a1bda4ba3c11aa1811649730e781ccb5cbf 100644
index 095c6255cfe830049137e42ecc4668d1bf877f33..87abc44f392e47a7655c127edf27f4d5ff419bb0 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -66,6 +66,7 @@

View File

@@ -3,6 +3,15 @@ From: Ales Pergl <alpergl@microsoft.com>
Date: Thu, 20 Sep 2018 17:44:29 -0700
Subject: build_gn.patch
These are variables we add to the root BUILDCONFIG so that they're available
everywhere, without having to import("//electron/.../flags.gni").
Additionally, we add the `:mas_build` config to every compiled file so that
the `MAS_BUILD` #define is available everywhere. This produces fewer patch
conflicts when upgrading than it would if we added a specific config dependency
only to those targets which had MAS_BUILD-relevant content in them. The
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 f89e7e831b79f82bd11a5dd8cee6ab49d8de724e..f8a611bf0676ce323cdbb5d639333df9875dd0ca 100644

View File

@@ -1,31 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Tue, 16 Jul 2019 14:38:52 -0700
Subject: build_win_disable_zc_twophase.patch
Temporarily disable /Zc:twoPhase when libcxx is not used on
Windows. This is to workaround the bug in crbug.com/969698#c10
until fixes have landed in upstream.
diff --git a/build/config/win/BUILD.gn b/build/config/win/BUILD.gn
index 95e32520781fc225be1c2bf7d8bfe43925d16d45..8de0cb6a8d1987f84aaca5c3bb30ead0a2019bef 100644
--- a/build/config/win/BUILD.gn
+++ b/build/config/win/BUILD.gn
@@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/c++/c++.gni")
import("//build/config/chrome_build.gni")
import("//build/config/clang/clang.gni")
import("//build/config/compiler/compiler.gni")
@@ -63,7 +64,8 @@ config("compiler") {
"/utf-8", # Assume UTF-8 by default to avoid code page dependencies.
]
- if (is_clang) {
+ if (use_custom_libcxx) {
+ # Work around crbug.com/969698#c6, bug in MSSTL <xxatomic>.
cflags += [ "/Zc:twoPhase" ]
}

View File

@@ -1,31 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Deepak Mohan <hop2deep@gmail.com>
Date: Fri, 1 Nov 2019 15:13:55 -0700
Subject: build,[win]: fix msstl compatibility for //pdf
diff --git a/pdf/document_layout.cc b/pdf/document_layout.cc
index 51064a3496f8d9354d00db6085cc9c5d23f7ec0c..b53da54e153b2078a2e18c9af38cfbbbae8da5b8 100644
--- a/pdf/document_layout.cc
+++ b/pdf/document_layout.cc
@@ -4,6 +4,8 @@
#include "pdf/document_layout.h"
+#include <algorithm>
+
#include "base/logging.h"
#include "ppapi/cpp/rect.h"
#include "ppapi/cpp/size.h"
diff --git a/pdf/draw_utils/coordinates.cc b/pdf/draw_utils/coordinates.cc
index 49c272f269ce312a72921506bd0abeeea283050f..11b7cca86116940810da374dd64ec437986ccccc 100644
--- a/pdf/draw_utils/coordinates.cc
+++ b/pdf/draw_utils/coordinates.cc
@@ -4,6 +4,7 @@
#include "pdf/draw_utils/coordinates.h"
+#include <algorithm>
#include <math.h>
#include "base/logging.h"

View File

@@ -1,19 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Wed, 30 Oct 2019 12:23:00 -0700
Subject: build,[win]: IWYU for //third_party/blink/renderer/core/svg/animation
Only affects windows release builds, identify the cause and remove this patch.
diff --git a/third_party/blink/renderer/core/svg/animation/smil_time.h b/third_party/blink/renderer/core/svg/animation/smil_time.h
index b4fec36d9ef15c5492ce6bbe544c11bdfc01ec10..7433a3a1c8578dbeb388628f1050629133c94f83 100644
--- a/third_party/blink/renderer/core/svg/animation/smil_time.h
+++ b/third_party/blink/renderer/core/svg/animation/smil_time.h
@@ -26,6 +26,7 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_SVG_ANIMATION_SMIL_TIME_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_SVG_ANIMATION_SMIL_TIME_H_
+#include <algorithm>
#include <ostream>
#include "base/time/time.h"

View File

@@ -3,12 +3,16 @@ From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu, 20 Sep 2018 17:45:32 -0700
Subject: can_create_window.patch
This adds a hook to the window creation flow so that Electron can intercede and
potentially prevent a window from being created.
TODO(loc): this patch is currently broken.
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 6dc225ede0a64d77c103b80fc76d51299170cc44..0f89422b5c73c608df289834587ec98376079ee2 100644
index b7ed7e9f59b7cde06aa468e1fec708c791327a57..14b3d4603b8143ea2660c0fad5ab8e8547f2854a 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -4307,6 +4307,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -4397,6 +4397,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,
@@ -17,10 +21,10 @@ index 6dc225ede0a64d77c103b80fc76d51299170cc44..0f89422b5c73c608df289834587ec983
&no_javascript_access);
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 23aa37d474df2b52f91d6d07a3423728f2f6e776..4583407a4a287c9fe39e013fee3a0e3a1cf9fe12 100644
index 46d534b72813c8fb6dfa2ad42f2d81b983cfdf90..9c492e3c2ebd4f6e89ee883d08522145594a8e01 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -296,6 +296,10 @@ struct CreateNewWindowParams {
@@ -302,6 +302,10 @@ struct CreateNewWindowParams {
// The window features to use for the new window.
blink.mojom.WindowFeatures features;
@@ -32,10 +36,10 @@ index 23aa37d474df2b52f91d6d07a3423728f2f6e776..4583407a4a287c9fe39e013fee3a0e3a
// 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 ee168f4c2dd6d3c81563baaa7476e80bb2aa7b95..3fdc443b408c3d8f7ffdabf6b010d5fc1ecd22d5 100644
index 602008278edca8b34ba02e5c5d236ab9342b3cc0..76261e6b09094527327e068e183d3d3b2665467b 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -506,6 +506,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -510,6 +510,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -45,10 +49,10 @@ index ee168f4c2dd6d3c81563baaa7476e80bb2aa7b95..3fdc443b408c3d8f7ffdabf6b010d5fc
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 3792cba399a4b80f9fbb7fa1c5561f4614dbba62..891b69d65de0e47719af23eb7047d22d10417019 100644
index c2af7b3b2b38997b083bc860e4abca63a53d73e4..2196584c127c8a3f80bfe55aaff3187372c19b1e 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -134,6 +134,7 @@ class NetworkService;
@@ -135,6 +135,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@@ -56,7 +60,7 @@ index 3792cba399a4b80f9fbb7fa1c5561f4614dbba62..891b69d65de0e47719af23eb7047d22d
} // namespace network
namespace rappor {
@@ -812,6 +813,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -823,6 +824,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -66,18 +70,18 @@ index 3792cba399a4b80f9fbb7fa1c5561f4614dbba62..891b69d65de0e47719af23eb7047d22d
bool opener_suppressed,
bool* no_javascript_access);
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 2ddadfe3aa8aa8be885001429c5e817063788199..08ef43b9dcd13ee48598dd50b893347635ab6b06 100644
index 2c43fe2096f9c76b6ca757dcd2d53eb596bca2c1..f815739a06a60e050003d2819ddab82be2abf3a6 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -71,6 +71,7 @@
@@ -70,6 +70,7 @@
#include "content/renderer/ime_event_guard.h"
#include "content/renderer/internal_document_state_data.h"
#include "content/renderer/loader/request_extra_data.h"
+#include "content/renderer/loader/web_url_request_util.h"
#include "content/renderer/media/audio/audio_device_factory.h"
#include "content/renderer/media/webrtc/rtc_peer_connection_handler.h"
#include "content/renderer/render_frame_impl.h"
@@ -1341,6 +1342,8 @@ WebView* RenderViewImpl::CreateView(
#include "content/renderer/render_frame_proxy.h"
@@ -1333,6 +1334,8 @@ WebView* RenderViewImpl::CreateView(
}
params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
@@ -87,10 +91,10 @@ index 2ddadfe3aa8aa8be885001429c5e817063788199..08ef43b9dcd13ee48598dd50b8933476
// moved on send.
bool is_background_tab =
diff --git a/content/shell/browser/web_test/web_test_content_browser_client.cc b/content/shell/browser/web_test/web_test_content_browser_client.cc
index 87667cbeca11db24199ece95c717dd6a42f7466c..5f5af14a08f70d9e6de4454d6f672699c3e85c8f 100644
index 5908c91e81f94575ec772fa86833fe1effe07c99..ac05f23929d1223646d6bc1956a581c48ee1f844 100644
--- a/content/shell/browser/web_test/web_test_content_browser_client.cc
+++ b/content/shell/browser/web_test/web_test_content_browser_client.cc
@@ -315,6 +315,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -331,6 +331,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -100,10 +104,10 @@ index 87667cbeca11db24199ece95c717dd6a42f7466c..5f5af14a08f70d9e6de4454d6f672699
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/shell/browser/web_test/web_test_content_browser_client.h b/content/shell/browser/web_test/web_test_content_browser_client.h
index 987f2228a312a3cb9c9a04dd682987d1af3f3fe0..30cde8a73a4ca67edd8f898ff63cf446f62bfc64 100644
index 63252a3503176be335510c0bbeaed2a39929930d..45fab07bdc9d11df755cb172f7314e6f131f31df 100644
--- a/content/shell/browser/web_test/web_test_content_browser_client.h
+++ b/content/shell/browser/web_test/web_test_content_browser_client.h
@@ -68,6 +68,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
@@ -69,6 +69,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,

View File

@@ -3,48 +3,22 @@ From: Jeremy Apthorp <jeremya@chromium.org>
Date: Wed, 10 Oct 2018 15:07:34 -0700
Subject: command-ismediakey.patch
define Command::IsMediaKey on mac; copied from //chrome/common/extensions/command.cc,
which also defines a bunch of other stuff that depends on extensions.
since we only need IsMediaKey, and we don't want the extensions stuff
(and aren't compiling command.cc), it's safe to duplicate the
definition. A candidate for upstreaming would be to move the IsMediaKey
function into //ui.
Override MediaKeysListener::IsMediaKeycode to also listen for Volume Up, Volume Down,
and Mute. We also need to patch out Chromium's usage of RemoteCommandCenterDelegate, as
it uses MPRemoteCommandCenter. MPRemoteCommandCenter makes it such that GlobalShortcuts
in Electron will not work as intended, because by design an app does not receive remote
control events until it begins playing audio. This means that a media shortcut would not kick
into effect until you, for example, began playing a YouTube video which sort of defeats the
purpose of GlobalShortcuts.
At the moment there is no upstream possibility for this; but perhaps Chromium may
consider some kind of switch, enabled by default, which would conditionally choose to avoid usage of
RemoteCommandCenterDelegate on macOS.
Also apply electron/electron@0f67b1866a9f00b852370e721affa4efda623f3a
and electron/electron@d2368d2d3b3de9eec4cc32b6aaf035cc89921bf1 as
patches.
diff --git a/chrome/browser/extensions/global_shortcut_listener_mac.mm b/chrome/browser/extensions/global_shortcut_listener_mac.mm
index befe726af9c10b1563a7fc0bb77cc55f65943d5c..46c6fe08bab8471007f78d3ef227e5195bfdf0e1 100644
--- a/chrome/browser/extensions/global_shortcut_listener_mac.mm
+++ b/chrome/browser/extensions/global_shortcut_listener_mac.mm
@@ -21,6 +21,26 @@
namespace extensions {
+// NOTE: this is defined in command.cc, but command.cc is full of
+// chrome-extensions-specific logic that we don't want to depend on.
+// Since we don't build command.cc in Electron, it's safe to re-define this
+// function here. Ideally, though, `IsMediaKey` would be the responsibility of
+// `ui::Accelerator`, rather than `extensions::Command`.
+
+// static
+bool Command::IsMediaKey(const ui::Accelerator& accelerator) {
+ if (accelerator.modifiers() != 0)
+ return false;
+
+ return (accelerator.key_code() == ui::VKEY_MEDIA_NEXT_TRACK ||
+ accelerator.key_code() == ui::VKEY_MEDIA_PREV_TRACK ||
+ accelerator.key_code() == ui::VKEY_MEDIA_PLAY_PAUSE ||
+ accelerator.key_code() == ui::VKEY_MEDIA_STOP ||
+ accelerator.key_code() == ui::VKEY_VOLUME_UP ||
+ accelerator.key_code() == ui::VKEY_VOLUME_DOWN ||
+ accelerator.key_code() == ui::VKEY_VOLUME_MUTE);
+}
+
// static
GlobalShortcutListener* GlobalShortcutListener::GetInstance() {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
diff --git a/chrome/browser/extensions/global_shortcut_listener_win.cc b/chrome/browser/extensions/global_shortcut_listener_win.cc
index c5125495b4d178ffb18be4d2d9670f7556412cbd..cddb321abb938c667a4a2089f87eab999510e9b1 100644
--- a/chrome/browser/extensions/global_shortcut_listener_win.cc
@@ -87,11 +61,33 @@ index 392cf3d58c64c088596e8d321a2ce37b0ec60b6e..43e30f47240dc10a3a9b950255d4e487
ui::Accelerator accelerator(
ui::KeyboardCodeFromXKeyEvent(x_event), modifiers);
diff --git a/ui/base/accelerators/media_keys_listener.cc b/ui/base/accelerators/media_keys_listener.cc
index 1145e1f3d79482b5bb468c3128431ac674310e5f..e9f595045e0c076e0735f27dfc38bfbc7951d372 100644
--- a/ui/base/accelerators/media_keys_listener.cc
+++ b/ui/base/accelerators/media_keys_listener.cc
@@ -13,7 +13,8 @@ MediaKeysListener::~MediaKeysListener() = default;
// static
bool MediaKeysListener::IsMediaKeycode(KeyboardCode key_code) {
return key_code == VKEY_MEDIA_PLAY_PAUSE || key_code == VKEY_MEDIA_STOP ||
- key_code == VKEY_MEDIA_PREV_TRACK || key_code == VKEY_MEDIA_NEXT_TRACK;
+ key_code == VKEY_MEDIA_PREV_TRACK || key_code == VKEY_MEDIA_NEXT_TRACK ||
+ key_code == VKEY_VOLUME_UP || key_code == VKEY_VOLUME_DOWN || key_code == VKEY_VOLUME_MUTE;
}
} // namespace ui
diff --git a/ui/base/accelerators/media_keys_listener_mac.mm b/ui/base/accelerators/media_keys_listener_mac.mm
index f4e3126a4efd66f05c4f13e40ba23db10b8cca96..bb4c1a891dd13855227b39a0e582fd4dbc342ec9 100644
index 85378bb565de617b1bd611d28c8714361747a357..94a899e76586d2c7bb199828bfa4aa1ef9ccfcbc 100644
--- a/ui/base/accelerators/media_keys_listener_mac.mm
+++ b/ui/base/accelerators/media_keys_listener_mac.mm
@@ -33,6 +33,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) {
@@ -11,6 +11,7 @@
#include <IOKit/hidsystem/ev_keymap.h>
#include "base/containers/flat_set.h"
+#include "electron/buildflags/buildflags.h"
#include "ui/base/accelerators/accelerator.h"
#include "ui/base/accelerators/system_media_controls_media_keys_listener.h"
@@ -32,6 +33,12 @@ KeyboardCode MediaKeyCodeToKeyboardCode(int key_code) {
case NX_KEYTYPE_NEXT:
case NX_KEYTYPE_FAST:
return VKEY_MEDIA_NEXT_TRACK;
@@ -104,7 +100,7 @@ index f4e3126a4efd66f05c4f13e40ba23db10b8cca96..bb4c1a891dd13855227b39a0e582fd4d
}
return VKEY_UNKNOWN;
}
@@ -193,7 +199,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
@@ -192,7 +199,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
int key_code = (data1 & 0xFFFF0000) >> 16;
if (key_code != NX_KEYTYPE_PLAY && key_code != NX_KEYTYPE_NEXT &&
key_code != NX_KEYTYPE_PREVIOUS && key_code != NX_KEYTYPE_FAST &&
@@ -116,3 +112,18 @@ index f4e3126a4efd66f05c4f13e40ba23db10b8cca96..bb4c1a891dd13855227b39a0e582fd4d
return event;
}
@@ -223,12 +233,14 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
// For Mac OS 10.12.2 or later, we want to use MPRemoteCommandCenter for
// getting media keys globally if there is a RemoteCommandCenterDelegate
// available.
+#if !BUILDFLAG(ENABLE_MEDIA_KEY_OVERRIDES)
if (scope == Scope::kGlobal) {
auto listener =
std::make_unique<SystemMediaControlsMediaKeysListener>(delegate);
if (listener->Initialize())
return listener;
}
+#endif
return std::make_unique<MediaKeysListenerImpl>(delegate, scope);
}

View File

@@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously
in atom::CommonWebContentsDelegate::ResetManageWebContents.
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 3af6a64be2f12cc4b7618f2c4db1a70fe7df0689..a81a8a3ba12b75fffd871b63bfc5c0564ea87826 100644
index c7011af100a71b1ea90bc5d059bf1cc65f43f556..84e5ed786ac73497102ce82870e71ab085c626b4 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1541,7 +1541,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
@@ -1483,7 +1483,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
NOTREACHED();
#else
base::RunLoop run_loop;

View File

@@ -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/content/browser/frame_host/navigation_controller_impl.cc b/content/browser/frame_host/navigation_controller_impl.cc
index 6d52381b3cb1aa290d33ae07c6e4c499e007b928..60e8705fb3afe5e7712a159d79fee2efa4bd3587 100644
index aacac1dc1e6c70e63dce08e81327db9fbabb5148..49ac1945ccb523dff61caf5b88a2bbc906b6fd09 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -1226,8 +1226,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
@@ -1250,8 +1250,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
return NAVIGATION_TYPE_NEW_SUBFRAME;
}
@@ -33,7 +33,7 @@ index 6d52381b3cb1aa290d33ae07c6e4c499e007b928..60e8705fb3afe5e7712a159d79fee2ef
if (rfh->GetParent()) {
// All manual subframes would be did_create_new_entry and handled above, so
@@ -1483,7 +1485,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
@@ -1507,7 +1509,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
}

View File

@@ -29,7 +29,7 @@ index a489bf6ea2179059f53e53563e993db9c7cd123b..93e237569fe94ec8526f67d915e1a735
virtual content::DesktopMediaID::Type GetMediaListType() const = 0;
};
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc
index 9d9b7435044c4b84f971bd94765eb875fbac1624..2918f91d8e1308bf5a47313e20ad3cec74918f3a 100644
index ba64a40697c7bb91d6e944ad9ea8fa50dd970633..d2600791197082c8c2e179ee4df66965234c4542 100644
--- a/chrome/browser/media/webrtc/desktop_media_list_base.cc
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc
@@ -22,6 +22,11 @@ DesktopMediaListBase::DesktopMediaListBase(base::TimeDelta update_period)
@@ -111,7 +111,7 @@ index ad7f766a36b1b6b2a8bc0f96369f1aaadf6681f7..f6c6c14a0937430df62c9b9c1132c591
protected:
virtual ~DesktopMediaListObserver() {}
diff --git a/chrome/browser/media/webrtc/native_desktop_media_list.cc b/chrome/browser/media/webrtc/native_desktop_media_list.cc
index 2b109bd1dea2aed647ec01c0660b2d4c963312f2..8567b4c84b55f1f7774ef3755dca63e94ddd7a29 100644
index d415675b3f7b757f2fb7a972e1bd96032f9ddd2c..b143433c995319e35216f359c1b57331917b1271 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -10,14 +10,15 @@
@@ -131,7 +131,7 @@ index 2b109bd1dea2aed647ec01c0660b2d4c963312f2..8567b4c84b55f1f7774ef3755dca63e9
#include "media/base/video_util.h"
#include "third_party/libyuv/include/libyuv/scale_argb.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -220,6 +221,8 @@ void NativeDesktopMediaList::Worker::RefreshThumbnails(
@@ -221,6 +222,8 @@ void NativeDesktopMediaList::Worker::RefreshThumbnails(
FROM_HERE, {BrowserThread::UI},
base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished,
media_list_));

View File

@@ -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 00971fc552171adb0ee9d4227a0bd03dfe1306be..10748277ed62c1e60bb95cfd9e8ddfe06dea4066 100644
index 08807dc1a6cabea84277de128a92bc8de2bbee63..1fd8da727592fec91056021ea9616996a8f54b92 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -305,6 +305,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
@@ -37,7 +37,7 @@ index 00971fc552171adb0ee9d4227a0bd03dfe1306be..10748277ed62c1e60bb95cfd9e8ddfe0
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
!ui::win::IsAeroGlassEnabled())) {
if (should_lock_)
@@ -976,6 +981,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
@@ -975,6 +980,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
return scoped_enable;
}
@@ -49,7 +49,7 @@ index 00971fc552171adb0ee9d4227a0bd03dfe1306be..10748277ed62c1e60bb95cfd9e8ddfe0
// HWNDMessageHandler, gfx::WindowImpl overrides:
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
index 8299c29aa1cff21c9ce66bb0a1934149f4be5d12..504bad57987009ec8c87641a52eb28d98e2d5c06 100644
index 84dae56aad5bed31caf4e885cc919473f73decd2..4d094132f2c7f7f32328b27406cde8215dc56829 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -202,6 +202,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,

View File

@@ -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 855b96ae0c398506ec81bd24c0430f2573706d80..977c07db32933a9cc04b1f0613014718d4725640 100644
index eec90ffd526a1fce7dc05bcd47764ae2f9a34796..559503c10d4887209dfd31535c714f176bd5bf45 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1822,6 +1822,12 @@ const gfx::ColorSpace& LayerTreeHostImpl::GetRasterColorSpace() const {
@@ -1816,6 +1816,12 @@ const gfx::ColorSpace& LayerTreeHostImpl::GetRasterColorSpace() const {
const gfx::ColorSpace& LayerTreeHostImpl::GetRasterColorSpaceAndId(
int* id) const {
@@ -37,10 +37,10 @@ index 855b96ae0c398506ec81bd24c0430f2573706d80..977c07db32933a9cc04b1f0613014718
// The pending tree will have the most recently updated color space, so
// prefer that.
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index 182eb5f68731afdaba5ce71d0fa67ea1051eb0dc..3dd350583c3f23445841c3e46122ae6e809508b2 100644
index 0743417d59c41ce2b4ba89f89f7f03db3849fc74..65f3ab8f48477908ed605f9c73d9d21f1a3709c3 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -96,6 +96,8 @@ class CC_EXPORT LayerTreeSettings {
@@ -100,6 +100,8 @@ class CC_EXPORT LayerTreeSettings {
bool use_rgba_4444 = false;
bool unpremultiply_and_dither_low_bit_depth_tiles = false;
@@ -62,7 +62,7 @@ index 389f2ed29bd85c35b38df92346a8d6c76ce22fd6..02cf492fa4068d10c4b8b2addee8102b
bool force_antialiasing = false;
bool force_blending_with_shaders = false;
diff --git a/components/viz/host/renderer_settings_creation.cc b/components/viz/host/renderer_settings_creation.cc
index f17aa1fa451f1b99d7f083e07edd49b11f7639e4..09f7c5d6a92d89c199b296771a8ff60c89a07083 100644
index cb69e08c0185f55497089505ed5b226e57140321..362f28accc248248f3bcb54955c2352819242fa9 100644
--- a/components/viz/host/renderer_settings_creation.cc
+++ b/components/viz/host/renderer_settings_creation.cc
@@ -13,6 +13,7 @@
@@ -83,7 +83,7 @@ index f17aa1fa451f1b99d7f083e07edd49b11f7639e4..09f7c5d6a92d89c199b296771a8ff60c
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
#if defined(OS_MACOSX)
diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
index cf811dcdec761ce6825cb1bffb83249b5e144cae..6303a6b2ab37548e580abe946be33ae75e5a0abe 100644
index 30533e787515416723ec41095119871a02fa7805..2682fb11f2c0049c3f3be9a34a2b319bc1a6ff15 100644
--- a/components/viz/service/display/gl_renderer.cc
+++ b/components/viz/service/display/gl_renderer.cc
@@ -83,6 +83,9 @@
@@ -157,10 +157,10 @@ index cf811dcdec761ce6825cb1bffb83249b5e144cae..6303a6b2ab37548e580abe946be33ae7
gfx::ColorSpace dst_color_space =
- current_frame()->current_render_pass->color_space;
+ PATCH_CS(current_frame()->current_render_pass->color_space);
#if defined(OS_WIN)
// Force sRGB output on Windows for overlay candidate video quads to match
// DirectComposition behavior in case these switch between overlays and
// compositing. See https://crbug.com/811118 for details.
@@ -2460,8 +2465,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
@@ -2463,8 +2468,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
SetUseProgram(ProgramKey::VideoStream(tex_coord_precision,
ShouldApplyRoundedCorner(quad)),
@@ -171,7 +171,7 @@ index cf811dcdec761ce6825cb1bffb83249b5e144cae..6303a6b2ab37548e580abe946be33ae7
DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
@@ -2523,8 +2528,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
@@ -2526,8 +2531,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR);
// Bind the program to the GL state.
@@ -182,7 +182,7 @@ index cf811dcdec761ce6825cb1bffb83249b5e144cae..6303a6b2ab37548e580abe946be33ae7
if (current_program_->rounded_corner_rect_location() != -1) {
SetShaderRoundedCorner(
@@ -3233,7 +3238,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
@@ -3239,7 +3244,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
const gfx::ColorSpace& src_color_space,
const gfx::ColorSpace& dst_color_space) {
@@ -193,7 +193,7 @@ index cf811dcdec761ce6825cb1bffb83249b5e144cae..6303a6b2ab37548e580abe946be33ae7
gfx::ColorSpace adjusted_color_space = src_color_space;
float sdr_white_level = current_frame()->sdr_white_level;
@@ -3612,7 +3619,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
@@ -3634,7 +3641,7 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
*overlay_texture = FindOrCreateOverlayTexture(
params.quad->render_pass_id, iosurface_width, iosurface_height,
@@ -202,7 +202,7 @@ index cf811dcdec761ce6825cb1bffb83249b5e144cae..6303a6b2ab37548e580abe946be33ae7
*new_bounds = gfx::RectF(updated_dst_rect.origin(),
gfx::SizeF((*overlay_texture)->texture.size()));
@@ -3830,8 +3837,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
@@ -3853,8 +3860,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
PrepareGeometry(SHARED_BINDING);
@@ -213,17 +213,17 @@ index cf811dcdec761ce6825cb1bffb83249b5e144cae..6303a6b2ab37548e580abe946be33ae7
gfx::Transform render_matrix;
render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
@@ -3991,3 +3998,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
@@ -4014,3 +4021,5 @@ gfx::Size GLRenderer::GetRenderPassBackingPixelSize(
}
} // namespace viz
+
+#undef PATCH_CS
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index 6deb2a50ff258ce3b1f892abccd6be2f9cf4e255..ab723f93e259453689ece2b2f447cbed1854e4c1 100644
index afda4382cde0e00a8ed19983b498c57bdf3a1cfe..347165e1806425c6bd6fe9573834fa7fb42ccafa 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -186,6 +186,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@@ -193,6 +193,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
// Command-line switches to propagate to the GPU process.
static const char* const kSwitchNames[] = {
@@ -232,10 +232,10 @@ index 6deb2a50ff258ce3b1f892abccd6be2f9cf4e255..ab723f93e259453689ece2b2f447cbed
service_manager::switches::kGpuSandboxAllowSysVShm,
service_manager::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 71e6b162a8e56e63731b61c171c20d134e7e8b47..ea6722ee4162bdc1e0d8f7548bc971d268d343c4 100644
index 89a77a7c263eccbf4d6dd29bbfd7924647bd5f2e..db1201218322a3bb3955aeea6f1f2e74abc9b898 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -226,6 +226,7 @@
@@ -228,6 +228,7 @@
#include "ui/base/ui_base_switches.h"
#include "ui/base/ui_base_switches_util.h"
#include "ui/display/display_switches.h"
@@ -243,7 +243,7 @@ index 71e6b162a8e56e63731b61c171c20d134e7e8b47..ea6722ee4162bdc1e0d8f7548bc971d2
#include "ui/gl/gl_switches.h"
#include "ui/native_theme/native_theme_features.h"
#include "url/origin.h"
@@ -3039,6 +3040,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
@@ -2988,6 +2989,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[] = {
@@ -252,10 +252,10 @@ index 71e6b162a8e56e63731b61c171c20d134e7e8b47..ea6722ee4162bdc1e0d8f7548bc971d2
service_manager::switches::kDisableInProcessStackTraces,
service_manager::switches::kDisableSeccompFilterSandbox,
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 84af6512284655c8781fd839fc50cd3a75395889..d51198f40580d023d2bfcb6a131b7e5a0e2d4769 100644
index 60fc1899350549866b1084175f8f7f31ee56e38b..120236bc3b0eadd1c5cfd51517309a4c603eb1c5 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -2976,6 +2976,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
@@ -2938,6 +2938,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
settings.main_frame_before_activation_enabled =
cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
@@ -266,7 +266,7 @@ index 84af6512284655c8781fd839fc50cd3a75395889..d51198f40580d023d2bfcb6a131b7e5a
// is what the renderer uses if its not threaded.
settings.enable_checker_imaging =
diff --git a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
index 1aedba288aed698fd1b7ac6a4ef1a67fc892f84a..0113b09e2f2bb85b4ec43a90503b9ed98e42fd0f 100644
index a947db5fb562fb4ccbfb94df88f460f1da9451f4..77c816b2c5e98a4546c74d9358dfcf3f205f1781 100644
--- a/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
+++ b/third_party/blink/renderer/platform/graphics/canvas_color_params.cc
@@ -4,6 +4,7 @@
@@ -285,7 +285,7 @@ index 1aedba288aed698fd1b7ac6a4ef1a67fc892f84a..0113b09e2f2bb85b4ec43a90503b9ed9
namespace blink {
@@ -89,6 +91,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const {
@@ -85,6 +87,11 @@ uint8_t CanvasColorParams::BytesPerPixel() const {
}
gfx::ColorSpace CanvasColorParams::GetSamplerGfxColorSpace() const {
@@ -297,7 +297,7 @@ index 1aedba288aed698fd1b7ac6a4ef1a67fc892f84a..0113b09e2f2bb85b4ec43a90503b9ed9
gfx::ColorSpace::PrimaryID primary_id = GetPrimaryID(color_space_);
// TODO(ccameron): This needs to take into account whether or not this texture
@@ -102,6 +109,11 @@ gfx::ColorSpace CanvasColorParams::GetSamplerGfxColorSpace() const {
@@ -98,6 +105,11 @@ gfx::ColorSpace CanvasColorParams::GetSamplerGfxColorSpace() const {
}
gfx::ColorSpace CanvasColorParams::GetStorageGfxColorSpace() const {

View File

@@ -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 de722efe61cb6823e62f1101b5aa3447f6795687..b258bbb12b5c607e3fec600fbc7bcb376eb00c72 100644
index b6897c88c2c433e73f092f2ccebf29f097db35b0..478a753393d37bf5dce09cfb415b51f3cd97c017 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -486,7 +486,11 @@
@@ -475,7 +475,11 @@
return;
host()->WasHidden();

View File

@@ -1,20 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Nitish Sakhawalkar <nitsakh@icloud.com>
Date: Mon, 13 May 2019 15:48:36 -0700
Subject: disable_custom_libcxx_on_windows.patch
diff --git a/build/config/c++/c++.gni b/build/config/c++/c++.gni
index 834a943deca28655f40490ab78a14496e253c143..7abf6d83b04b515881c8f797e1031082afe7a5c8 100644
--- a/build/config/c++/c++.gni
+++ b/build/config/c++/c++.gni
@@ -12,7 +12,8 @@ declare_args() {
# is not supported.
use_custom_libcxx =
is_fuchsia || is_android || is_mac || (is_ios && !use_xcode_clang) ||
- (is_win && is_clang) ||
+ # Do not use custom libcxx on windows
+ #(is_win && is_clang) ||
(is_linux &&
(!is_chromeos || default_toolchain != "//build/toolchain/cros:target"))

View File

@@ -3,12 +3,13 @@ From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu, 20 Sep 2018 17:45:47 -0700
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 98273d31f12a368675580e37e849e6afb0b9d048..089d2e596d6ba753a13f0f3f6791a35fbb40b51a 100644
index fd91861198a0cd1724a8702ba436e63644d2360e..5d591ea96af1f26664fc39baf8fdc18938e7cf7a 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -674,6 +674,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -636,6 +636,9 @@ void RenderWidgetHostImpl::WasHidden() {
if (is_hidden_)
return;
@@ -19,10 +20,10 @@ index 98273d31f12a368675580e37e849e6afb0b9d048..089d2e596d6ba753a13f0f3f6791a35f
TRACE_EVENT0("renderer_host", "RenderWidgetHostImpl::WasHidden");
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index b5c6734044e0361a2b9e3d2f6800bb9a679cd73d..477dac2d5ba5ef93f990f625d063be95b4c7a7d5 100644
index 15a23f9540896fcb76796da1de8552e319d82f32..59a675ae58b5a46e63e187184b4359a62b6368e2 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -185,6 +185,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -187,6 +187,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// RenderWidgetHostImpl.
static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);

View File

@@ -6,10 +6,10 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch
See https://github.com/electron/electron/issues/10754
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
index 511aac290866fa739e4c51d487baa8cfdbe52c78..c608456b22923568b83da5a0ae5c78c4af8c7970 100644
index fe9922d72462cd72ef9abb1d82f7033b47e7d3c7..58f3f7c6a3c60c73184597495a9f36c8b3659c68 100644
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -4150,7 +4150,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
@@ -4238,7 +4238,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
"frame that never had a user gesture since its load. "
"https://www.chromestatus.com/feature/5082396709879808";
Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message);

View File

@@ -16,20 +16,21 @@ amount of chromium code that needs to be changed for Electron
as well as keeps these storage areas limited to a bounded
size meanwhile giving application developers more space to work with.
diff --git a/content/browser/dom_storage/dom_storage_types.h b/content/browser/dom_storage/dom_storage_types.h
index 6c0b831ebaaa2c1749bbc7436ce1025656588310..96d1c73adb09d33cf591ca569f46de9b21f9a4df 100644
--- a/content/browser/dom_storage/dom_storage_types.h
+++ b/content/browser/dom_storage/dom_storage_types.h
@@ -21,7 +21,8 @@ typedef std::map<base::string16, base::NullableString16> DOMStorageValuesMap;
diff --git a/components/services/storage/dom_storage/dom_storage_constants.cc b/components/services/storage/dom_storage/dom_storage_constants.cc
index 3fd108c89c3b070a08790850db4dfd6cc8a3ce44..c393f51709efd8b28b07edfe452d2b84b14983ae 100644
--- a/components/services/storage/dom_storage/dom_storage_constants.cc
+++ b/components/services/storage/dom_storage/dom_storage_constants.cc
@@ -6,7 +6,9 @@
namespace storage {
// The quota for each storage area.
// This value is enforced in renderer processes and the browser process.
-const size_t kPerStorageAreaQuota = 10 * 1024 * 1024;
+// Electron's dom_storage_limits.patch increased this value from 10MiB to 100MiB
+const size_t kPerStorageAreaQuota = 100 * 1024 * 1024;
+
const size_t kPerStorageAreaOverQuotaAllowance = 100 * 1024;
// In the browser process we allow some overage to
// accomodate concurrent writes from different renderers
} // namespace storage
diff --git a/third_party/blink/public/mojom/dom_storage/storage_area.mojom b/third_party/blink/public/mojom/dom_storage/storage_area.mojom
index 1f1b2c6fa109aa52c4e7c7f5fcaac91beb538449..d8f15eed9be83340ffd1f2400df08558e9554710 100644
--- a/third_party/blink/public/mojom/dom_storage/storage_area.mojom

View File

@@ -1,21 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Aleksei Kuzmin <alkuzmin@microsoft.com>
Date: Thu, 20 Sep 2018 17:50:45 -0700
Subject: exclude-a-few-test-files-from-build.patch
Compilation of those files fails with the Chromium 68.
Remove the patch during the Chromium 69 upgrade.
diff --git a/third_party/blink/renderer/platform/BUILD.gn b/third_party/blink/renderer/platform/BUILD.gn
index f3ced1e7233389f421a0b3b6090ad4ffdb40a6f4..2e65ad0b41158fbec82e628a6a90ae09a6f3a0d5 100644
--- a/third_party/blink/renderer/platform/BUILD.gn
+++ b/third_party/blink/renderer/platform/BUILD.gn
@@ -1807,7 +1807,7 @@ jumbo_source_set("blink_platform_unittests_sources") {
"graphics/paint/drawing_display_item_test.cc",
"graphics/paint/drawing_recorder_test.cc",
"graphics/paint/float_clip_rect_test.cc",
- "graphics/paint/geometry_mapper_test.cc",
+ #"graphics/paint/geometry_mapper_test.cc",
"graphics/paint/geometry_mapper_transform_cache_test.cc",
"graphics/paint/paint_chunk_test.cc",
"graphics/paint/paint_chunker_test.cc",

View File

@@ -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 144714a3a1e63bb891b86cba12a27de50be7f976..e98a296a6b52ec4c6eb336e2d882a36e6f58b76c 100644
index 8b51dbe8f2859de3be2e6dc918f4eb535a8a5622..f7e687aaeb4c0df5a73a0d94bdd2d75d1f367786 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -931,6 +931,13 @@ void NetworkContext::SetNetworkConditions(
@@ -981,6 +981,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@@ -51,10 +51,10 @@ index 144714a3a1e63bb891b86cba12a27de50be7f976..e98a296a6b52ec4c6eb336e2d882a36e
// 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 f0a41d64804eab8195c389b457f6c0119d24a783..b531fa64af4ae625cd8b79c40d08b64b40a76d1e 100644
index 829a26f486e1e7c7a24f1d273e9af48df5fbd9b1..e9f22a8f1bf8d2299e275c985b4cbb93d35607a2 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -226,6 +226,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -233,6 +233,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
mojom::NetworkConditionsPtr conditions) override;
@@ -63,10 +63,10 @@ index f0a41d64804eab8195c389b457f6c0119d24a783..b531fa64af4ae625cd8b79c40d08b64b
void SetEnableReferrers(bool enable_referrers) override;
#if defined(OS_CHROMEOS)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 88e78f46415d7a416534e88c13bb45b26cc856f3..6b14d8354375377526e141ee499a7583be3f22b0 100644
index f45ea3ba79d68d6d58aedba54c5bc9d7fc4935e9..def2cb5e252389879c6287d44d29e704703841cb 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -932,6 +932,9 @@ interface NetworkContext {
@@ -970,6 +970,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);
@@ -77,7 +77,7 @@ index 88e78f46415d7a416534e88c13bb45b26cc856f3..6b14d8354375377526e141ee499a7583
SetAcceptLanguage(string new_accept_language);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index f7f7e16c5bd6d85e3a65065a61df27d92f38ff1b..62161a5e54ddcbfd37c8ebfe631cb6d697b3d530 100644
index b1d38691d37d0319f746d0db21d21ba7bec83097..40996126da04fea86452949e11b4595badbf7fdb 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -99,6 +99,7 @@ class TestNetworkContext : public mojom::NetworkContext {

View File

@@ -13,7 +13,7 @@ uses internally for things like menus and devtools.
We can remove this patch once it has in some shape been upstreamed.
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
index a91c4e3fb94c19686f3325709b3003bf4998c538..20c9959ff47d2c4a83ff91e802a1336a4c37690f 100644
index d9175ae9661218b58e9b587ad3a9dbd540bfd384..ed178ea7b3d7f8039f47402bc08cae20e74aa789 100644
--- a/ui/native_theme/native_theme.cc
+++ b/ui/native_theme/native_theme.cc
@@ -40,6 +40,8 @@ NativeTheme::NativeTheme()
@@ -26,10 +26,10 @@ index a91c4e3fb94c19686f3325709b3003bf4998c538..20c9959ff47d2c4a83ff91e802a1336a
}
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index e479fc84f7013984fc53d18cad8812fbd43cb670..47fce78d2a55c7344297ba92b0083c01e3d1b72b 100644
index 183fe5b316697e9478751bab4766238ec8e29bd2..b3855befd3586af8a36917f5a3a61b2a220842a5 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -429,6 +429,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -437,6 +437,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
ColorId color_id,
ColorScheme color_scheme = ColorScheme::kDefault) const = 0;
@@ -52,7 +52,7 @@ index e479fc84f7013984fc53d18cad8812fbd43cb670..47fce78d2a55c7344297ba92b0083c01
// 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
@@ -553,6 +569,8 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -561,6 +577,8 @@ class NATIVE_THEME_EXPORT NativeTheme {
PreferredColorScheme preferred_color_scheme_ =
PreferredColorScheme::kNoPreference;
@@ -75,10 +75,10 @@ index a8fbfee3b13672902aac05fd5a65fa8ee81f9f7e..1be6369acf0b7c02a6f862636c2b2de1
}
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index 97e72bc38a7231ce295ad943e977c69586cc6e07..a60f7b618ddd29886aac70f16e07cbc871ce38af 100644
index cff7681a4e0023a67edda37bf9865ab073b32549..83507081e0734b53fd37133014256243dda6864d 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -725,6 +725,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
@@ -706,6 +706,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
// ...unless --force-dark-mode was specified in which case caveat emptor.
if (UsesHighContrastColors() && !IsForcedDarkMode())
return false;

View File

@@ -3,12 +3,13 @@ From: deepak1556 <hop2deep@gmail.com>
Date: Fri, 29 Nov 2019 16:08:14 -0800
Subject: feat: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index f95ac8630d499c2e4dd1f874873b7264e219dfe4..cfa2a325cdcce4d6ee8e833603cccf241be0f7fc 100644
index eba0e7ff3344f571ca827f06615f0a4201ada435..f31f39afcdeb65aa4033045ac49cc7e3625a3ac8 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -431,6 +431,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -434,6 +434,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
Send(new ViewMsg_SetBackgroundOpaque(GetRoutingID(), opaque));
}
@@ -20,22 +21,22 @@ index f95ac8630d499c2e4dd1f874873b7264e219dfe4..cfa2a325cdcce4d6ee8e833603cccf24
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 5d18be58585804db41eee98f65b527ed89bbfee2..62e6fe1d025b17fb8924b8a01905b50925a148b2 100644
index 64a3ad79707ccffa18eedef01e669167e87f6044..f7d0a59ad20c8e06d4af1f93ca6d4a98dfd759d2 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -104,6 +104,7 @@ class CONTENT_EXPORT RenderViewHostImpl
@@ -103,6 +103,7 @@ class CONTENT_EXPORT RenderViewHostImpl
SiteInstanceImpl* GetSiteInstance() override;
bool IsRenderViewLive() override;
void NotifyMoveOrResizeStarted() override;
void SetWebUIProperty(const std::string& name,
const std::string& value) override;
+ void SetSchedulerThrottling(bool allowed) override;
WebPreferences GetWebkitPreferences() override;
void UpdateWebkitPreferences(const WebPreferences& prefs) override;
void OnWebkitPreferencesChanged() override;
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index ac32a53c5cd55e93342d705cc3021c4cb964c9c5..d2d1325c07658c6ffd48df8db8a5bcfbf6a0f670 100644
index a609cc1fa1558987b634dcbc41120ddc93a711a0..3b3058398e97d2f21458ee427aeeee19c78ff649 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -115,6 +115,9 @@ IPC_STRUCT_TRAITS_END()
@@ -114,6 +114,9 @@ IPC_STRUCT_TRAITS_END()
// Make the RenderWidget background transparent or opaque.
IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque, bool /* opaque */)
@@ -46,12 +47,12 @@ index ac32a53c5cd55e93342d705cc3021c4cb964c9c5..d2d1325c07658c6ffd48df8db8a5bcfb
IPC_MESSAGE_ROUTED1(ViewMsg_UpdateWebPreferences,
content::WebPreferences)
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
index a0c210b5df52598ce9bcc810d776b86cffac837c..0edc8e6f48c39c4dcc2bb3ce64363c722910a286 100644
index 95679ab2915ad496ca0018aa13874b84eb11d7fd..c278e0fc072409677beafc7f252ebcf6002f16d4 100644
--- a/content/public/browser/render_view_host.h
+++ b/content/public/browser/render_view_host.h
@@ -104,6 +104,9 @@ class CONTENT_EXPORT RenderViewHost : public IPC::Sender {
virtual void SetWebUIProperty(const std::string& name,
const std::string& value) = 0;
@@ -99,6 +99,9 @@ class CONTENT_EXPORT RenderViewHost : public IPC::Sender {
// started.
virtual void NotifyMoveOrResizeStarted() = 0;
+ // Disable/Enable scheduler throttling.
+ virtual void SetSchedulerThrottling(bool allowed) = 0;
@@ -60,10 +61,10 @@ index a0c210b5df52598ce9bcc810d776b86cffac837c..0edc8e6f48c39c4dcc2bb3ce64363c72
//
// Returns the current WebKit preferences. Note: WebPreferences is cached, so
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 08ef43b9dcd13ee48598dd50b893347635ab6b06..2929528c73e3bad0c5b784c56ff45a97b3e3e375 100644
index f815739a06a60e050003d2819ddab82be2abf3a6..0263848e99769af49641b2fad0575f714e797e5d 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1257,6 +1257,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
@@ -1251,6 +1251,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message)
IPC_MESSAGE_HANDLER(ViewMsg_SetPageScale, OnSetPageScale)
IPC_MESSAGE_HANDLER(ViewMsg_SetInitialFocus, OnSetInitialFocus)
@@ -72,7 +73,7 @@ index 08ef43b9dcd13ee48598dd50b893347635ab6b06..2929528c73e3bad0c5b784c56ff45a97
IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck)
IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences)
IPC_MESSAGE_HANDLER(ViewMsg_ClosePage, OnClosePage)
@@ -1862,6 +1864,12 @@ void RenderViewImpl::OnSetPageScale(float page_scale_factor) {
@@ -1843,6 +1845,12 @@ void RenderViewImpl::OnSetPageScale(float page_scale_factor) {
webview()->SetPageScaleFactor(page_scale_factor);
}
@@ -82,26 +83,26 @@ index 08ef43b9dcd13ee48598dd50b893347635ab6b06..2929528c73e3bad0c5b784c56ff45a97
+ webview()->SetSchedulerThrottling(allowed);
+}
+
void RenderViewImpl::ApplyPageHidden(bool hidden, bool initial_setting) {
webview()->SetIsHidden(hidden, initial_setting);
// Note: RenderWidget visibility is separately set from the IPC handlers, and
void RenderViewImpl::ApplyPageVisibilityState(
PageVisibilityState visibility_state,
bool initial_setting) {
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 0907c4cdc11b3c775e8856672c397388fa12d91f..bcab94fdd5079e459dcf4e906b22acdbac003dd9 100644
index 87994092a9b0e7ea0d33675c502408a5a47eac87..5d08253ed69e9a180251ad9693335c4ad43adba6 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -451,6 +451,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
@@ -450,6 +450,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
void OnSetInitialFocus(bool reverse);
void OnSetRendererPrefs(
const blink::mojom::RendererPreferences& renderer_prefs);
void OnSetWebUIProperty(const std::string& name, const std::string& value);
+ void OnSetSchedulerThrottling(bool allowed);
void OnSuppressDialogsUntilSwapOut();
void OnUpdateTargetURLAck();
void OnUpdateWebPreferences(const WebPreferences& prefs);
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
index bd279e31c8bbaa1d9e0f97155f912ac9501fee6c..30b1634775e6f8c9ae4e771a7d8394de06b68a61 100644
index 53d6d4ebd22ad8f3dd9badba7601dcc27a002a2a..7abf1c05c8e821de8df26938e4f098a58a06655b 100644
--- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h
@@ -402,6 +402,7 @@ class WebView {
@@ -404,6 +404,7 @@ class WebView {
// Scheduling -----------------------------------------------------------
virtual PageScheduler* Scheduler() const = 0;
@@ -110,41 +111,45 @@ index bd279e31c8bbaa1d9e0f97155f912ac9501fee6c..30b1634775e6f8c9ae4e771a7d8394de
// 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 a395c00732349a5ee65a69afac10f61ef5ccf236..8efbe8bc04e675cdb4c43fb22e310256156b94cc 100644
index 2e2b95750635fa5aedc17eabcd84fa97ed0c951a..7649f65d5f05c4609c495ddf4d47f640a010d7e4 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -3415,10 +3415,17 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3364,12 +3364,20 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
+void WebViewImpl::SetSchedulerThrottling(bool allowed) {
+ DCHECK(GetPage());
+ scheduler_throttling_allowed_ = allowed;
+ GetPage()->GetPageScheduler()->SetPageVisible(allowed ? !IsHidden() : true);
+ GetPage()->GetPageScheduler()->SetPageVisible(allowed ?
+ (GetVisibilityState() == PageVisibilityState::kVisible) : true);
+}
+
void WebViewImpl::SetIsHidden(bool hidden, bool is_initial_state) {
void WebViewImpl::SetVisibilityState(PageVisibilityState visibility_state,
bool is_initial_state) {
DCHECK(GetPage());
GetPage()->SetIsHidden(hidden, is_initial_state);
- GetPage()->GetPageScheduler()->SetPageVisible(!hidden);
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
- GetPage()->GetPageScheduler()->SetPageVisible(visibility_state ==
- PageVisibilityState::kVisible);
+ GetPage()->GetPageScheduler()->SetPageVisible(
+ scheduler_throttling_allowed_ ? !hidden : true);
+ scheduler_throttling_allowed_ ?
+ (visibility_state == PageVisibilityState::kVisible) : true);
}
bool WebViewImpl::IsHidden() {
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 e3f37ec7c3d31188503bbea2f0d8d4de5f062ecf..c9a866f74dcde800d4aadf65cef7559c55eb69d3 100644
index 7161adf93687544024d7cc9d23fe423bb4e9eca3..d55296a159e9453add9a8a63058b5a5647cf5b3e 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -313,6 +313,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
PaintLayerCompositor* Compositor() const;
@@ -310,6 +310,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
LocalDOMWindow* PagePopupWindow() const;
PageScheduler* Scheduler() const override;
+ void SetSchedulerThrottling(bool allowed) override;
void SetIsHidden(bool hidden, bool is_initial_state) override;
bool IsHidden() override;
@@ -690,6 +691,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
void SetVisibilityState(PageVisibilityState visibility_state,
bool is_initial_state) override;
PageVisibilityState GetVisibilityState() override;
@@ -682,6 +683,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// WebViewImpl::Close while handling an input event.
bool debug_inside_input_handling_ = false;

View File

@@ -1,35 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Erick Zhao <erickzhao@github.com>
Date: Thu, 1 Aug 2019 13:40:17 -0700
Subject: feat: unset window aspect ratio on linux
Electron has exposed methods to allow setting the aspect ratio
for a given window, and as a part of that needed to allow users to
reset the aspect ratio. On macOS, we can do this with existing APIs,
but on Linux this was not possible using currently exposed APIs without
this patch.
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/1895789.
diff --git a/ui/base/x/x11_window.cc b/ui/base/x/x11_window.cc
index c2cd00336856dc06499540dc601ac737348ce905..60adb7dcb326695ad97473d8a362a75461f66c2b 100644
--- a/ui/base/x/x11_window.cc
+++ b/ui/base/x/x11_window.cc
@@ -742,9 +742,14 @@ void XWindow::SetXWindowAspectRatio(const gfx::SizeF& aspect_ratio) {
long supplied_return;
XGetWMNormalHints(xdisplay_, xwindow_, &size_hints, &supplied_return);
- size_hints.flags |= PAspect;
- size_hints.min_aspect.x = size_hints.max_aspect.x = aspect_ratio.width();
- size_hints.min_aspect.y = size_hints.max_aspect.y = aspect_ratio.height();
+ // if ratio parameter has length 0, unforce the aspect ratio
+ if (aspect_ratio.IsEmpty()) {
+ size_hints.flags &= ~PAspect;
+ } else {
+ size_hints.flags |= PAspect;
+ size_hints.min_aspect.x = size_hints.max_aspect.x = aspect_ratio.width();
+ size_hints.min_aspect.y = size_hints.max_aspect.y = aspect_ratio.height();
+ }
XSetWMNormalHints(xdisplay_, xwindow_, &size_hints);
}

View File

@@ -1,29 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Wed, 30 Oct 2019 16:26:29 -0700
Subject: fix ambiguous reference to 'data'
Upstreamed: https://chromium-review.googlesource.com/c/chromium/src/+/1891762
diff --git a/base/containers/span.h b/base/containers/span.h
index 2c402495a960f348275b7f925ca5dcdbf691ff7a..0faa4ad502d3982293f4faa50525a2340dbf2abd 100644
--- a/base/containers/span.h
+++ b/base/containers/span.h
@@ -498,7 +498,7 @@ template <size_t N,
decltype(base::data(std::declval<Container&>()))>,
typename = internal::EnableIfSpanCompatibleContainer<Container&, T>>
constexpr span<T, N> make_span(Container& container) noexcept {
- return span<T, N>(data(container), size(container));
+ return span<T, N>(base::data(container), base::size(container));
}
template <
@@ -509,7 +509,7 @@ template <
decltype(base::data(std::declval<const Container&>()))>,
typename = internal::EnableIfSpanCompatibleContainer<const Container&, T>>
constexpr span<T, N> make_span(const Container& container) noexcept {
- return span<T, N>(data(container), size(container));
+ return span<T, N>(base::data(container), base::size(container));
}
template <int&... ExplicitArgumentBarrier, typename T, size_t X>

View File

@@ -6,19 +6,6 @@ Subject: fix_disable_usage_of_setapplicationisdaemon_and.patch
Disable usage of SetApplicationIsDaemon and
_LSSetApplicationLaunchServicesServerConnectionStatus in MAS builds
diff --git a/content/utility/utility_service_factory.cc b/content/utility/utility_service_factory.cc
index 2c1c7f992f2a40509d2d8854fcd7a023d7e06b6d..4c3f2dc2e1e1bf4c06764c97f9be5b5331e311bb 100644
--- a/content/utility/utility_service_factory.cc
+++ b/content/utility/utility_service_factory.cc
@@ -162,7 +162,7 @@ void UtilityServiceFactory::RunService(
std::unique_ptr<service_manager::Service>
UtilityServiceFactory::CreateAudioService(
mojo::PendingReceiver<service_manager::mojom::Service> receiver) {
-#if defined(OS_MACOSX)
+#if defined(OS_MACOSX) && !defined(MAS_BUILD)
// Don't connect to launch services when running sandboxed
// (https://crbug.com/874785).
if (service_manager::IsAudioSandboxEnabled()) {
diff --git a/sandbox/mac/system_services.cc b/sandbox/mac/system_services.cc
index caa30bb378b30331f90057fe7ce3aec724104bf8..a766daa808495f7872051e129c6ad9f76f54e4fe 100644
--- a/sandbox/mac/system_services.cc

View File

@@ -1,109 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Alex Moshchuk <alexmos@chromium.org>
Date: Tue, 19 Nov 2019 22:41:28 +0000
Subject: Fix FocusOwningWebContents to handle RenderWidgetHosts for OOPIFs.
Previously, FocusOwningWebContents() would not focus anything when
called for an OOPIF's RenderWidgetHost. This is because
GetFocusedRenderWidgetHost() would always return that RWH back,
causing FocusOwningWebContents() to skip the call to
SetAsFocusedWebContentsIfNecessary() because the passed-in RWH matched
the focused RWH.
This is usually not a problem in Chrome, because inner WebContents
can't have OOPIFs and so an inner WebContents would only need to be
focused when this is called from a main frame's RenderWidgetHost, and
the outermost WebContents would probably already be focused via other
means. However, apparently inner WebContents could have OOPIFs in
embedders like Electron, and then this becomes problematic. This CL
fixes FocusOwningWebContents() to always pass in the main frame's
RenderWidgetHost to GetFocusedRenderWidgetHost(), since the latter was
never designed to take an OOPIF's RenderWidgetHost (it expects to take
an event arriving at a main frame's RenderWidgetHostView and then
target it to a subframe's RenderWidgetHost, if needed).
The setup in the added test is similar to ProcessSwapOnInnerContents,
which was also apparently added for an Electron-specific use case
(cross-process navigations inside a <webview>) which isn't currently
possible in regular Chrome.
Change-Id: If9559caf53274d415a360a976ebddfcc323d37dd
Bug: 1026056
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1922650
Reviewed-by: James MacLean <wjmaclean@chromium.org>
Commit-Queue: Alex Moshchuk <alexmos@chromium.org>
Cr-Commit-Position: refs/heads/master@{#716803}
diff --git a/content/browser/site_per_process_browsertest.cc b/content/browser/site_per_process_browsertest.cc
index a30192cdf4ddf857c9624c9492734e56a7c69ddb..d027c7f2a82daa092447fdb8cca9baf12a39731d 100644
--- a/content/browser/site_per_process_browsertest.cc
+++ b/content/browser/site_per_process_browsertest.cc
@@ -14049,6 +14049,52 @@ IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, ProcessSwapOnInnerContents) {
EXPECT_NE(a_view, b_view);
}
+// This test ensures that WebContentsImpl::FocusOwningWebContents() focuses an
+// inner WebContents when it is given an OOPIF's RenderWidgetHost inside that
+// inner WebContents. This setup isn't currently supported in Chrome
+// (requiring issue 614463), but it can happen in embedders. See
+// https://crbug.com/1026056.
+IN_PROC_BROWSER_TEST_F(SitePerProcessBrowserTest, FocusInnerContentsFromOOPIF) {
+ GURL main_url(embedded_test_server()->GetURL(
+ "a.com", "/cross_site_iframe_factory.html?a(a)"));
+ EXPECT_TRUE(NavigateToURL(shell(), main_url));
+
+ // Set up and attach an artificial inner WebContents.
+ FrameTreeNode* child_frame =
+ web_contents()->GetFrameTree()->root()->child_at(0);
+ WebContentsImpl* inner_contents =
+ static_cast<WebContentsImpl*>(CreateAndAttachInnerContents(
+ ToRenderFrameHost(child_frame).render_frame_host()));
+ FrameTreeNode* inner_contents_root = inner_contents->GetFrameTree()->root();
+
+ // Navigate inner WebContents to b.com, and then navigate a subframe on that
+ // page to c.com.
+ GURL b_url(embedded_test_server()->GetURL(
+ "b.com", "/cross_site_iframe_factory.html?b(b)"));
+ NavigateFrameToURL(inner_contents_root, b_url);
+ GURL c_url(embedded_test_server()->GetURL("c.com", "/title1.html"));
+ FrameTreeNode* inner_child = inner_contents_root->child_at(0);
+ NavigateFrameToURL(inner_child, c_url);
+
+ // Because |inner_contents| was set up without kGuestScheme, it can actually
+ // have OOPIFs. Ensure that the subframe is in an OOPIF.
+ EXPECT_NE(inner_contents_root->current_frame_host()->GetSiteInstance(),
+ inner_child->current_frame_host()->GetSiteInstance());
+ EXPECT_TRUE(inner_child->current_frame_host()->IsCrossProcessSubframe());
+
+ // Make sure the outer WebContents is focused to start with.
+ web_contents()->Focus();
+ web_contents()->SetAsFocusedWebContentsIfNecessary();
+ EXPECT_EQ(web_contents(), web_contents()->GetFocusedWebContents());
+
+ // Focus the inner WebContents as if an event were received and dispatched
+ // directly on the |inner_child|'s RenderWidgetHost, and ensure that this
+ // took effect.
+ inner_contents->FocusOwningWebContents(
+ inner_child->current_frame_host()->GetRenderWidgetHost());
+ EXPECT_EQ(inner_contents, web_contents()->GetFocusedWebContents());
+}
+
// Check that a web frame can't navigate a remote subframe to a file: URL. The
// frame should stay at the old URL, and the navigation attempt should produce
// a console error message. See https://crbug.com/894399.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index a5c4162b3c69b534f843e1b6737392c867fc88ea..cd3ded209dbc54f64d398c2adf4cec34aea87244 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -6420,8 +6420,10 @@ void WebContentsImpl::FocusOwningWebContents(
if (!GuestMode::IsCrossProcessFrameGuest(this) && browser_plugin_guest_)
return;
+ RenderWidgetHostImpl* main_frame_widget_host =
+ GetMainFrame()->GetRenderWidgetHost();
RenderWidgetHostImpl* focused_widget =
- GetFocusedRenderWidgetHost(render_widget_host);
+ GetFocusedRenderWidgetHost(main_frame_widget_host);
if (focused_widget != render_widget_host &&
(!focused_widget ||

View File

@@ -1,76 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Thu, 7 Nov 2019 16:49:03 -0800
Subject: fix: missing algorithm include
This file had an include-what-you-use issue leading to release build
failures, as it was unable to find max in the std namespace.
Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/1904823.
diff --git a/media/base/byte_queue.cc b/media/base/byte_queue.cc
index 245fafa668568fd308e5a2806dafc1c5f0bf3dbd..c54ac79bdfbba4614b9944f73269f5f30ec9a80a 100644
--- a/media/base/byte_queue.cc
+++ b/media/base/byte_queue.cc
@@ -4,6 +4,8 @@
#include "media/base/byte_queue.h"
+#include <algorithm>
+
#include "base/logging.h"
#include "base/numerics/checked_math.h"
diff --git a/third_party/blink/public/platform/web_time_range.h b/third_party/blink/public/platform/web_time_range.h
index 2c17f7c8ce58f1255994e9e6fd74f70fa1a22b1c..4b0a59bf3308b49d2c4ffd86120759417094cb21 100644
--- a/third_party/blink/public/platform/web_time_range.h
+++ b/third_party/blink/public/platform/web_time_range.h
@@ -31,6 +31,8 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_TIME_RANGE_H_
#define THIRD_PARTY_BLINK_PUBLIC_PLATFORM_WEB_TIME_RANGE_H_
+#include <algorithm>
+
#include "third_party/blink/public/platform/web_vector.h"
namespace blink {
diff --git a/third_party/blink/renderer/core/layout/min_max_size.h b/third_party/blink/renderer/core/layout/min_max_size.h
index c3fdbde6e4bf585351b3fc8d0ce2bd2673a82b5e..4233e6c79a1d67dd6c1ca33929d0beedbf9a1116 100644
--- a/third_party/blink/renderer/core/layout/min_max_size.h
+++ b/third_party/blink/renderer/core/layout/min_max_size.h
@@ -5,6 +5,8 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_MIN_MAX_SIZE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_MIN_MAX_SIZE_H_
+#include <algorithm>
+
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/geometry/layout_unit.h"
diff --git a/third_party/blink/renderer/core/layout/ng/geometry/ng_margin_strut.h b/third_party/blink/renderer/core/layout/ng/geometry/ng_margin_strut.h
index 50f699428acf8251f14411dc30caa750cfac88bf..8236afa14ee99b5f61e6c785721abf62299cbaed 100644
--- a/third_party/blink/renderer/core/layout/ng/geometry/ng_margin_strut.h
+++ b/third_party/blink/renderer/core/layout/ng/geometry/ng_margin_strut.h
@@ -5,6 +5,8 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_GEOMETRY_NG_MARGIN_STRUT_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_GEOMETRY_NG_MARGIN_STRUT_H_
+#include <algorithm>
+
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/geometry/layout_unit.h"
diff --git a/third_party/blink/renderer/core/style/style_difference.h b/third_party/blink/renderer/core/style/style_difference.h
index 91292961f1f02e53c58653f72297ea05d78fc07b..517fbb8f5a7aa549373e3806aaec4b3d1f0ec13f 100644
--- a/third_party/blink/renderer/core/style/style_difference.h
+++ b/third_party/blink/renderer/core/style/style_difference.h
@@ -5,7 +5,9 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_STYLE_STYLE_DIFFERENCE_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_STYLE_STYLE_DIFFERENCE_H_
+#include <algorithm>
#include <iosfwd>
+
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/assertions.h"

View File

@@ -41,11 +41,40 @@ index 906a1ee4ac58b0744a32153bbaafeac4322a60e4..c90f4aead36cbf3767dc5094728963c2
// Adds the given SiteInstance to our map, to ensure that we do not create
// another SiteInstance for the same site.
void RegisterSiteInstance(SiteInstanceImpl* site_instance);
diff --git a/content/browser/frame_host/navigation_request.cc b/content/browser/frame_host/navigation_request.cc
index 413050e4779fc471da1d2219a55f0dc8378174b4..93aeacdab1e365d7dce4c6eb1c3da5916a0d05aa 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -1214,6 +1214,24 @@ void NavigationRequest::BeginNavigation() {
TRACE_EVENT_ASYNC_STEP_INTO0("navigation", "NavigationRequest", this,
"ResponseStarted");
+ // In Electron, a new process is started for every navigation when node is
+ // integrated in the renderer. Since GetFrameHostForNavigation is called more
+ // than once per navigation, we want to return the same frame host once
+ // the response has started, otherwise if the frame host that started the response
+ // and the frame host that is available for commit don't match then request will
+ // be cancelled. We rely on the NavigationRequest::state_ to determine this
+ // factor
+ //
+ // bool has_response_started =
+ // (request->state() >= NavigationRequest::WILL_PROCESS_RESPONSE &&
+ // !speculative_render_frame_host_);
+ //
+ // Hence this call is necesary before the call to GetFrameHostForNavigation. Also
+ // the state_ here is anyway going to end up being READY_TO_COMMIT because of
+ // ReadyToCommitNavigation a few lines later, so will not affect normal chromium
+ // request cycle.
+ state_ = READY_TO_COMMIT;
+
// Select an appropriate RenderFrameHost.
render_frame_host_ =
frame_tree_node_->render_manager()->GetFrameHostForNavigation(this);
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index d847c6dd1cad8077276a2097c86944780b16ff76..0a76a76e14306f2eee1961a780a08bce6b5dea64 100644
index 240850ff8ae0a73c85e840e0753c7c07135aae7a..528a02609f02c1e4912f0a10d76d74b27e201b6f 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -2130,6 +2130,16 @@ bool RenderFrameHostManager::InitRenderView(
@@ -2137,6 +2137,16 @@ bool RenderFrameHostManager::InitRenderView(
scoped_refptr<SiteInstance>
RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
NavigationRequest* request) {
@@ -62,7 +91,7 @@ index d847c6dd1cad8077276a2097c86944780b16ff76..0a76a76e14306f2eee1961a780a08bce
SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
// All children of MHTML documents must be MHTML documents. They all live in
@@ -2149,10 +2159,61 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -2156,10 +2166,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
//
// TODO(clamy): We should also consider as a candidate SiteInstance the
// speculative SiteInstance that was computed on redirects.
@@ -76,9 +105,8 @@ index d847c6dd1cad8077276a2097c86944780b16ff76..0a76a76e14306f2eee1961a780a08bce
+ delegate_->GetControllerForRenderManager().GetBrowserContext();
+ bool has_navigation_started = request->state() != NavigationRequest::NOT_STARTED;
+ bool has_response_started =
+ (request->state() == NavigationRequest::RESPONSE_STARTED ||
+ request->state() == NavigationRequest::FAILED) &&
+ !speculative_render_frame_host_;
+ (request->state() >= NavigationRequest::WILL_PROCESS_RESPONSE &&
+ !speculative_render_frame_host_);
+ // Gives user a chance to choose a custom site instance.
+ SiteInstance* affinity_site_instance = nullptr;
+ scoped_refptr<SiteInstance> overriden_site_instance;
@@ -128,7 +156,7 @@ index d847c6dd1cad8077276a2097c86944780b16ff76..0a76a76e14306f2eee1961a780a08bce
scoped_refptr<SiteInstance> dest_site_instance = GetSiteInstanceForNavigation(
request->common_params().url, request->GetSourceSiteInstance(),
@@ -2162,6 +2223,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -2169,6 +2229,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->GetRestoreType() != RestoreType::NONE, request->is_view_source(),
request->WasServerRedirect());
@@ -139,10 +167,10 @@ index d847c6dd1cad8077276a2097c86944780b16ff76..0a76a76e14306f2eee1961a780a08bce
}
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index ea72b3a9d57383a47c91795c11bd0b8fc2b92e55..2adb671d8c36ad22814b75c4be61fb3925dd2258 100644
index 6a0c85cad42da9e048fbbc7108f55368c81071c5..34b751d095fcc1e137bcb4ff44a059a3dd11b4a8 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -360,6 +360,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
@@ -369,6 +369,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
return browsing_instance_->HasSiteInstance(url);
}
@@ -154,7 +182,7 @@ index ea72b3a9d57383a47c91795c11bd0b8fc2b92e55..2adb671d8c36ad22814b75c4be61fb39
const GURL& url) {
return browsing_instance_->GetSiteInstanceForURL(
diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
index 9fc7e1710f3038e82d7fac6c3fb608cd3a7071ba..ad1e884811e8f7de4dea43f9b754d578e62b4d92 100644
index 59edc1fe0c22e82225bd2a3d8059f386d97db127..6bc92bbb5604111ecdc6b78be025bb7e7ee5ecb5 100644
--- a/content/browser/site_instance_impl.h
+++ b/content/browser/site_instance_impl.h
@@ -84,6 +84,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
@@ -166,7 +194,7 @@ index 9fc7e1710f3038e82d7fac6c3fb608cd3a7071ba..ad1e884811e8f7de4dea43f9b754d578
size_t GetRelatedActiveContentsCount() override;
bool RequiresDedicatedProcess() override;
diff --git a/content/public/browser/content_browser_client.cc b/content/public/browser/content_browser_client.cc
index 3fdc443b408c3d8f7ffdabf6b010d5fc1ecd22d5..0d0d0f8f90fd830882558b3358d4a168fe5746b7 100644
index 76261e6b09094527327e068e183d3d3b2665467b..fbd1be0f69aabdda47315e54518c0567b6aec3b8 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -49,6 +49,21 @@
@@ -192,10 +220,10 @@ index 3fdc443b408c3d8f7ffdabf6b010d5fc1ecd22d5..0d0d0f8f90fd830882558b3358d4a168
const MainFunctionParams& parameters) {
return nullptr;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 891b69d65de0e47719af23eb7047d22d10417019..425e7ab657a2de0ff11e6989a0dc34e11f883999 100644
index 2196584c127c8a3f80bfe55aaff3187372c19b1e..b391bacc010ad973ae38e70cd56f33949ee0bd20 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -215,8 +215,45 @@ struct WebPreferences;
@@ -216,8 +216,45 @@ struct WebPreferences;
// the observer interfaces.)
class CONTENT_EXPORT ContentBrowserClient {
public:
@@ -242,7 +270,7 @@ index 891b69d65de0e47719af23eb7047d22d10417019..425e7ab657a2de0ff11e6989a0dc34e1
// implementations for the browser startup code. See comments in
// browser_main_parts.h.
diff --git a/content/public/browser/site_instance.h b/content/public/browser/site_instance.h
index a3e880e20e51d988175f0e8e2c42e7f5c1740104..faadd39d01530092f4f31a896ecb60f235e7f63f 100644
index a718f53111bbaa0c248930a577f25b34e2d15494..5fafbed85e5549f0039da6414a40a653bbb72853 100644
--- a/content/public/browser/site_instance.h
+++ b/content/public/browser/site_instance.h
@@ -121,6 +121,11 @@ class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance> {

View File

@@ -3,12 +3,14 @@ From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu, 20 Sep 2018 17:47:44 -0700
Subject: gin_enable_disable_v8_platform.patch
We don't use gin to create the V8 platform, because we need to inject Node
things.
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
index 5f8aea7105a188846fd48d199bb4e0ca2017a0ab..2514f591208372d6654ff9c5be50a51a39a881cb 100644
index ee74e6ea92c64d0e95a4988557b236667f5b7e42..c3ae4c6221686479d05800c51d17d581c095e397 100644
--- a/gin/isolate_holder.cc
+++ b/gin/isolate_holder.cc
@@ -98,9 +98,10 @@ IsolateHolder::~IsolateHolder() {
@@ -103,9 +103,10 @@ IsolateHolder::~IsolateHolder() {
// static
void IsolateHolder::Initialize(ScriptMode mode,
v8::ArrayBuffer::Allocator* allocator,
@@ -36,7 +38,7 @@ index f23af2d9738f3aa76e3a49301e1c3216ee4a64b4..ede178acabc63c3c33d6ce93efd5632b
v8::Isolate* isolate() { return isolate_; }
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 9298a9c75540d40133a8fc58c128aea521f3a37c..9474b26eba6d9c41162a197e11d6a871a2dd0259 100644
index 48bd647dcf7ecd121cd250bec1f7c2fc093a03fb..02468b82e0e304a76b9653c511ed0697dfd9b5f7 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -190,12 +190,14 @@ enum LoadV8FileResult {

View File

@@ -6,11 +6,11 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids b/tools/gritsettings/resource_ids
index 99f5bdd4665b865b5bc559644b7b5a268f9bfb20..899d72e6f0802e31c4ae70f3e0a19880b2557e8f 100644
index 1699b6194dd75ffa84beb841c1dd1d7bcc25b216..45a511239f6a057f471e71d4f5aec1baf8cfc5df 100644
--- a/tools/gritsettings/resource_ids
+++ b/tools/gritsettings/resource_ids
@@ -466,6 +466,11 @@
"includes": [28880],
@@ -573,6 +573,11 @@
"includes": [20080],
},
+ "electron/electron_resources.grd": {

View File

@@ -8,10 +8,10 @@ needs to register on an isolate so that it can be used later
down in the initialization process of an isolate.
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
index 2514f591208372d6654ff9c5be50a51a39a881cb..4dd48f6a871cccb374c58adacb8ad9a80da89a5a 100644
index c3ae4c6221686479d05800c51d17d581c095e397..e4c8a194418dc62f0e0222c08fe9ad39a4b9b9af 100644
--- a/gin/isolate_holder.cc
+++ b/gin/isolate_holder.cc
@@ -52,7 +52,8 @@ IsolateHolder::IsolateHolder(
@@ -53,7 +53,8 @@ IsolateHolder::IsolateHolder(
AccessMode access_mode,
AllowAtomicsWaitMode atomics_wait_mode,
IsolateType isolate_type,
@@ -21,7 +21,7 @@ index 2514f591208372d6654ff9c5be50a51a39a881cb..4dd48f6a871cccb374c58adacb8ad9a8
: access_mode_(access_mode), isolate_type_(isolate_type) {
DCHECK(task_runner);
DCHECK(task_runner->BelongsToCurrentThread());
@@ -60,7 +61,11 @@ IsolateHolder::IsolateHolder(
@@ -61,7 +62,11 @@ IsolateHolder::IsolateHolder(
v8::ArrayBuffer::Allocator* allocator = g_array_buffer_allocator;
CHECK(allocator) << "You need to invoke gin::IsolateHolder::Initialize first";

View File

@@ -6,7 +6,7 @@ Subject: libgtkui_export.patch
Export libgtkui symbols for the GN component build.
diff --git a/chrome/browser/ui/libgtkui/gtk_util.h b/chrome/browser/ui/libgtkui/gtk_util.h
index c9712cd531c0e2114103bdf3f4cba3320b75c331..7fd8d177cec78e733c765097dcc0b9a65ed350ee 100644
index ab8707407f80dda95f0eb9ff6ff7281c7ae76195..f4a5c41e12453a6a2d6ca1e9fd1727fddb6d5809 100644
--- a/chrome/browser/ui/libgtkui/gtk_util.h
+++ b/chrome/browser/ui/libgtkui/gtk_util.h
@@ -8,6 +8,7 @@

View File

@@ -6,7 +6,7 @@ Subject: mas-audiodeviceduck.patch
Removes usage of the AudioDeviceDuck private API.
diff --git a/media/audio/mac/audio_low_latency_input_mac.cc b/media/audio/mac/audio_low_latency_input_mac.cc
index 7d55649a7e06637bdddf56428936ef8db5793f60..031aa47edb46243e1f6b212f3dbff5ba793e1f3a 100644
index 7982674799f68ab331f08291ff72244c2e7356bb..e9db50fb703a5438444f50d064702d93ab731dde 100644
--- a/media/audio/mac/audio_low_latency_input_mac.cc
+++ b/media/audio/mac/audio_low_latency_input_mac.cc
@@ -33,19 +33,23 @@

View File

@@ -6,7 +6,7 @@ Subject: mas-cgdisplayusesforcetogray.patch
Removes usage of the CGDisplayUsesForceToGray private API.
diff --git a/ui/display/mac/screen_mac.mm b/ui/display/mac/screen_mac.mm
index 95675ad6ddf61e3809833894f0962908d12be4ff..8cd379bb3d10e88c95902896684d443366c759c4 100644
index b19c27fe7ec208e53bbff9c9901f59ba595f68d8..9a4d2df4b32342c19d03f03a83563f0f178ba54c 100644
--- a/ui/display/mac/screen_mac.mm
+++ b/ui/display/mac/screen_mac.mm
@@ -116,7 +116,17 @@ Display BuildDisplayForScreen(NSScreen* screen) {

View File

@@ -7,7 +7,7 @@ Guard usages in blink of private Mac APIs by MAS_BUILD, so they can be
excluded for people who want to submit their apps to the Mac App store.
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.h b/content/browser/accessibility/browser_accessibility_cocoa.h
index 743d1364bcd13e24ecbe5ced730161d15b8c3e93..a5529ac8841b79f230f0fa8eae2b3cb226beb7d7 100644
index 9cc52238971a095421c3cde01a5df24a2f6f92cd..0216501dda1dc8b8fb4307785a0dab868bc3315a 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.h
+++ b/content/browser/accessibility/browser_accessibility_cocoa.h
@@ -109,7 +109,9 @@ struct AXTextEdit {
@@ -50,7 +50,7 @@ index 743d1364bcd13e24ecbe5ced730161d15b8c3e93..a5529ac8841b79f230f0fa8eae2b3cb2
// 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 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e53f3eb42 100644
index 9ed2e56e9ebad1f084074c37484f7f68c8f98460..91ec30df10337f96151e4b2ee1c3182048109de2 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -207,6 +207,7 @@
@@ -85,7 +85,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
// Returns an autoreleased copy of the AXNodeData's attribute.
NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility,
@@ -748,7 +752,9 @@ + (void)initialize {
@@ -773,7 +777,9 @@ + (void)initialize {
{NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
{NSAccessibilityElementBusyAttribute, @"elementBusy"},
{NSAccessibilityEnabledAttribute, @"enabled"},
@@ -95,7 +95,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
{NSAccessibilityExpandedAttribute, @"expanded"},
{NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"},
{NSAccessibilityFocusedAttribute, @"focused"},
@@ -760,8 +766,10 @@ + (void)initialize {
@@ -785,8 +791,10 @@ + (void)initialize {
{NSAccessibilityHighestEditableAncestorAttribute,
@"highestEditableAncestor"},
{NSAccessibilityIndexAttribute, @"index"},
@@ -106,7 +106,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
{NSAccessibilityInvalidAttribute, @"invalid"},
{NSAccessibilityIsMultiSelectableAttribute, @"isMultiSelectable"},
{NSAccessibilityLanguageAttribute, @"language"},
@@ -783,13 +791,17 @@ + (void)initialize {
@@ -808,13 +816,17 @@ + (void)initialize {
{NSAccessibilityRowsAttribute, @"rows"},
// TODO(aboxhall): expose
// NSAccessibilityServesAsTitleForUIElementsAttribute
@@ -124,7 +124,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
{NSAccessibilitySizeAttribute, @"size"},
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
{NSAccessibilitySubroleAttribute, @"subrole"},
@@ -1285,6 +1297,7 @@ - (NSNumber*)enabled {
@@ -1310,6 +1322,7 @@ - (NSNumber*)enabled {
ax::mojom::Restriction::kDisabled];
}
@@ -132,7 +132,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
// Returns a text marker that points to the last character in the document that
// can be selected with VoiceOver.
- (id)endTextMarker {
@@ -1295,6 +1308,7 @@ - (id)endTextMarker {
@@ -1320,6 +1333,7 @@ - (id)endTextMarker {
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
}
@@ -140,7 +140,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
- (NSNumber*)expanded {
if (![self instanceActive])
@@ -1440,6 +1454,8 @@ - (NSNumber*)index {
@@ -1469,6 +1483,8 @@ - (NSNumber*)index {
return nil;
}
@@ -149,7 +149,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
- (NSNumber*)insertionPointLineNumber {
if (![self instanceActive])
return nil;
@@ -1462,6 +1478,7 @@ - (NSNumber*)insertionPointLineNumber {
@@ -1491,6 +1507,7 @@ - (NSNumber*)insertionPointLineNumber {
caretPosition->AsTextPosition()->text_offset());
return @(std::distance(lineBreaks.begin(), iterator));
}
@@ -157,7 +157,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
// Returns whether or not this node should be ignored in the
// accessibility tree.
@@ -2147,6 +2164,7 @@ - (NSArray*)selectedChildren {
@@ -2169,6 +2186,7 @@ - (NSArray*)selectedChildren {
return ret;
}
@@ -165,7 +165,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
- (NSString*)selectedText {
if (![self instanceActive])
return nil;
@@ -2158,11 +2176,13 @@ - (NSString*)selectedText {
@@ -2180,11 +2198,13 @@ - (NSString*)selectedText {
return nil;
return base::SysUTF16ToNSString(range.GetText());
}
@@ -179,7 +179,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
- (NSValue*)selectedTextRange {
if (![self instanceActive])
return nil;
@@ -2183,12 +2203,15 @@ - (NSValue*)selectedTextRange {
@@ -2205,12 +2225,15 @@ - (NSValue*)selectedTextRange {
int selLength = range.GetText().length();
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
}
@@ -189,13 +189,13 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
- (id)selectedTextMarkerRange {
if (![self instanceActive])
return nil;
return CreateTextMarkerRange(GetSelectedRange(*owner_));
return CreateTextMarkerRange(GetSelectedRange(*_owner));
}
+#endif
- (NSValue*)size {
if (![self instanceActive])
@@ -2221,6 +2244,7 @@ - (NSString*)sortDirection {
@@ -2243,6 +2266,7 @@ - (NSString*)sortDirection {
return nil;
}
@@ -203,7 +203,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
// Returns a text marker that points to the first character in the document that
// can be selected with VoiceOver.
- (id)startTextMarker {
@@ -2231,6 +2255,7 @@ - (id)startTextMarker {
@@ -2253,6 +2277,7 @@ - (id)startTextMarker {
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
}
@@ -211,21 +211,21 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
// Returns a subrole based upon the role.
- (NSString*)subrole {
@@ -2522,11 +2547,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
@@ -2560,11 +2585,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
NSMutableAttributedString* attributedValue =
[[[NSMutableAttributedString alloc] initWithString:value] autorelease];
+#ifndef MAS_BUILD
if (!owner_->IsTextOnlyObject()) {
AXPlatformRange ax_range(owner_->CreatePositionAt(0),
owner_->CreatePositionAt(int{text.length()}));
if (!_owner->IsTextOnlyObject()) {
AXPlatformRange ax_range(_owner->CreatePositionAt(0),
_owner->CreatePositionAt(int{text.length()}));
AddMisspelledTextAttributes(ax_range, attributedValue);
}
+#endif
return [attributedValue attributedSubstringFromRange:range];
}
@@ -2629,9 +2656,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2667,9 +2694,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return ToBrowserAccessibilityCocoa(cell);
}
@@ -237,7 +237,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
BrowserAccessibilityPositionInstance position =
CreatePositionFromTextMarker(parameter);
if (!position->IsNullPosition())
@@ -2942,6 +2968,7 @@ AXPlatformRange range(std::move(lineStartPosition),
@@ -2980,6 +3006,7 @@ AXPlatformRange range(std::move(lineStartPosition),
return CreateTextMarker(root->CreatePositionAt(index));
}
@@ -245,7 +245,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
if ([attribute isEqualToString:
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
@@ -2975,6 +3002,7 @@ AXPlatformRange range(std::move(lineStartPosition),
@@ -3013,6 +3040,7 @@ AXPlatformRange range(std::move(lineStartPosition),
return nil;
}
@@ -253,7 +253,7 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
if ([attribute
isEqualToString:
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
@@ -3081,6 +3109,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
@@ -3119,6 +3147,7 @@ AXPlatformRange range(position->CreatePreviousLineStartPosition(
return @(child->GetIndexInParent());
}
@@ -262,10 +262,10 @@ index 2851641d0219164185567a100c2c19d49274c233..778da01c7eaf11ef954e213a5a6ecb5e
return nil;
}
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
index 851da832bd30e05974317601712f309b2d542ab6..dd6d4c50468ec5f3364213e43b9336f13b153a19 100644
index 9009a7f7bd5505f4a65c90ecc31dca5b2b82f248..88e4b8aad6e882d8085e77f09aa7798fcdcb56ec 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -493,6 +493,7 @@ void PostAnnouncementNotification(NSString* announcement) {
@@ -532,6 +532,7 @@ void PostAnnouncementNotification(NSString* announcement) {
[user_info setObject:native_focus_object
forKey:NSAccessibilityTextChangeElement];
@@ -273,7 +273,7 @@ index 851da832bd30e05974317601712f309b2d542ab6..dd6d4c50468ec5f3364213e43b9336f1
id selected_text = [native_focus_object selectedTextMarkerRange];
if (selected_text) {
NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
@@ -500,6 +501,7 @@ void PostAnnouncementNotification(NSString* announcement) {
@@ -539,6 +540,7 @@ void PostAnnouncementNotification(NSString* announcement) {
[user_info setObject:selected_text
forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
}
@@ -314,7 +314,7 @@ index e59ac93d0e1554a2df5d8c74db2beba25d090228..6657c48664bdec4964b382f80309d1bf
} // namespace
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
index 8e4a469b6f0675dc7b82543d5758f0c2ec226809..2fcfb6edb5f57bd25756257b77361d25768f9abf 100644
index b2425416b1993f037530619df0458d43d008bd03..39b096120b57c3192519a607d96c8a3ddab434e5 100644
--- a/device/bluetooth/bluetooth_adapter_mac.mm
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
@@ -36,6 +36,7 @@
@@ -344,7 +344,7 @@ index 8e4a469b6f0675dc7b82543d5758f0c2ec226809..2fcfb6edb5f57bd25756257b77361d25
should_update_name_(true),
classic_discovery_manager_(
BluetoothDiscoveryManagerMac::CreateClassic(this)),
@@ -303,8 +307,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
@@ -307,8 +311,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
}
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {
@@ -358,10 +358,10 @@ index 8e4a469b6f0675dc7b82543d5758f0c2ec226809..2fcfb6edb5f57bd25756257b77361d25
void BluetoothAdapterMac::RemovePairingDelegateInternal(
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
index de4f3ceb0fb01bb924c19a576fc201a14a6470cd..10ca4b247e170cb9d17a1a3c6ecac2efbffb6a5d 100644
index 3947aa5016f9a061d98cdb838c413b204dbcbd19..36ccf8cc6e0e91e0f754d22ac69e702007af6391 100644
--- a/media/audio/BUILD.gn
+++ b/media/audio/BUILD.gn
@@ -191,6 +191,12 @@ source_set("audio") {
@@ -175,6 +175,12 @@ source_set("audio") {
"mac/scoped_audio_unit.cc",
"mac/scoped_audio_unit.h",
]
@@ -375,7 +375,7 @@ index de4f3ceb0fb01bb924c19a576fc201a14a6470cd..10ca4b247e170cb9d17a1a3c6ecac2ef
"AudioToolbox.framework",
"AudioUnit.framework",
diff --git a/media/audio/mac/audio_manager_mac.cc b/media/audio/mac/audio_manager_mac.cc
index 7ec6dab821b542cb0096e7f8875ba21703463087..3e26c9dd0a296b8d9c99ca1ee9d9faba14e8d618 100644
index 26436b47942b14e419adb5780c45a9d42224d39f..215abac9672f72aeef7694e97ff260ae7546d061 100644
--- a/media/audio/mac/audio_manager_mac.cc
+++ b/media/audio/mac/audio_manager_mac.cc
@@ -882,7 +882,7 @@ AudioParameters AudioManagerMac::GetPreferredOutputStreamParameters(

View File

@@ -3,12 +3,14 @@ From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Wed, 8 May 2019 17:25:55 -0700
Subject: network_service_allow_remote_certificate_verification_logic.patch
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 a7598ca37cdd671cbafb5b69efe5d8c2932e7cd3..144714a3a1e63bb891b86cba12a27de50be7f976 100644
index e12f76b1ca50efee574a7bbf852d2f6923d528cd..8b51dbe8f2859de3be2e6dc918f4eb535a8a5622 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -91,6 +91,11 @@
@@ -93,6 +93,11 @@
#include "services/network/url_loader.h"
#include "services/network/url_request_context_builder_mojo.h"
@@ -20,7 +22,7 @@ index a7598ca37cdd671cbafb5b69efe5d8c2932e7cd3..144714a3a1e63bb891b86cba12a27de5
#if BUILDFLAG(IS_CT_SUPPORTED)
#include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
#include "components/certificate_transparency/chrome_require_ct_delegate.h"
@@ -325,6 +330,79 @@ std::string HashesToBase64String(const net::HashValueVector& hashes) {
@@ -327,6 +332,79 @@ std::string HashesToBase64String(const net::HashValueVector& hashes) {
} // namespace
@@ -100,7 +102,7 @@ index a7598ca37cdd671cbafb5b69efe5d8c2932e7cd3..144714a3a1e63bb891b86cba12a27de5
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
NetworkContext::PendingCertVerify::PendingCertVerify() = default;
@@ -477,6 +555,13 @@ void NetworkContext::SetClient(
@@ -513,6 +591,13 @@ void NetworkContext::SetClient(
client_.Bind(std::move(client));
}
@@ -114,7 +116,7 @@ index a7598ca37cdd671cbafb5b69efe5d8c2932e7cd3..144714a3a1e63bb891b86cba12a27de5
void NetworkContext::CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) {
@@ -1545,6 +1630,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
@@ -1643,6 +1728,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
base::CommandLine::ForCurrentProcess();
std::unique_ptr<net::CertVerifier> cert_verifier;
@@ -122,7 +124,7 @@ index a7598ca37cdd671cbafb5b69efe5d8c2932e7cd3..144714a3a1e63bb891b86cba12a27de5
if (g_cert_verifier_for_testing) {
cert_verifier = std::make_unique<WrappedTestingCertVerifier>();
} else {
@@ -1592,8 +1678,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
@@ -1695,8 +1781,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
}
#endif
#if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED)
@@ -133,7 +135,7 @@ index a7598ca37cdd671cbafb5b69efe5d8c2932e7cd3..144714a3a1e63bb891b86cba12a27de5
std::make_unique<net::CoalescingCertVerifier>(
std::make_unique<net::MultiThreadedCertVerifier>(
params_->use_builtin_cert_verifier
@@ -1603,12 +1689,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
@@ -1706,12 +1792,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
cert_net_fetcher_))));
}
#endif
@@ -158,10 +160,10 @@ index a7598ca37cdd671cbafb5b69efe5d8c2932e7cd3..144714a3a1e63bb891b86cba12a27de5
std::unique_ptr<NetworkServiceNetworkDelegate> network_delegate =
std::make_unique<NetworkServiceNetworkDelegate>(
diff --git a/services/network/network_context.h b/services/network/network_context.h
index 696144daa4165c33287c8d982dbcbe861871302e..f0a41d64804eab8195c389b457f6c0119d24a783 100644
index 55d2de8f1e5d538f3168808c0b3c2a19520cf824..829a26f486e1e7c7a24f1d273e9af48df5fbd9b1 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -84,6 +84,7 @@ class DomainReliabilityMonitor;
@@ -87,6 +87,7 @@ class DomainReliabilityMonitor;
namespace network {
class CertVerifierWithTrustAnchors;
@@ -169,7 +171,7 @@ index 696144daa4165c33287c8d982dbcbe861871302e..f0a41d64804eab8195c389b457f6c011
class CookieManager;
class ExpectCTReporter;
class HostResolver;
@@ -176,6 +177,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -183,6 +184,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) override;
@@ -178,7 +180,7 @@ index 696144daa4165c33287c8d982dbcbe861871302e..f0a41d64804eab8195c389b457f6c011
void ResetURLLoaderFactories() override;
void GetCookieManager(
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
@@ -586,6 +589,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -612,6 +615,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
std::unique_ptr<network::NSSTempCertsCacheChromeOS> nss_temp_certs_cache_;
#endif
@@ -186,13 +188,13 @@ index 696144daa4165c33287c8d982dbcbe861871302e..f0a41d64804eab8195c389b457f6c011
+
// CertNetFetcher used by the context's CertVerifier. May be nullptr if
// CertNetFetcher is not used by the current platform.
scoped_refptr<net::CertNetFetcherImpl> cert_net_fetcher_;
scoped_refptr<cert_verifier::CertNetFetcherURLLoader> cert_net_fetcher_;
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 8628bc8e055bf483c39b745bb63371f1e363817a..88e78f46415d7a416534e88c13bb45b26cc856f3 100644
index ee5d5864eaf9fcb4bf5f13fc5e3a6ae70a6d7a86..f45ea3ba79d68d6d58aedba54c5bc9d7fc4935e9 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -181,6 +181,17 @@ interface TrustedURLLoaderHeaderClient {
pending_receiver<TrustedHeaderClient> header_client);
@@ -190,6 +190,17 @@ struct HttpAuthStaticNetworkContextParams {
= DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS;
};
+interface CertVerifierClient {
@@ -209,7 +211,7 @@ index 8628bc8e055bf483c39b745bb63371f1e363817a..88e78f46415d7a416534e88c13bb45b2
// Parameters for constructing a network context.
struct NetworkContextParams {
// Name used by memory tools to identify the context.
@@ -760,6 +771,9 @@ interface NetworkContext {
@@ -798,6 +809,9 @@ interface NetworkContext {
// Sets a client for this network context.
SetClient(pending_remote<NetworkContextClient> client);

View File

@@ -7,7 +7,7 @@ Do not check for unique origin in CacheStorage, in Electron we may have
scripts running without an origin.
diff --git a/content/browser/cache_storage/legacy/legacy_cache_storage.cc b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
index 04d8efd155ffd10becd9e62ad0fafcc85eae6a25..d421eba832cbc090bf1de2b99509c0cb3c995973 100644
index 5852371798038ebbf1135e570c8cd17ef80d2155..ed378a22974f8aba4b3f651a1245055116fabecc 100644
--- a/content/browser/cache_storage/legacy/legacy_cache_storage.cc
+++ b/content/browser/cache_storage/legacy/legacy_cache_storage.cc
@@ -104,7 +104,7 @@ class LegacyCacheStorage::CacheLoader {

View File

@@ -68,7 +68,7 @@ index 951dc88b44e76b6736aa0ff30d548022486f0f6a..ea7f72b7aa05c31972e4abbdc6529ab0
notification_service_remote_.BindNewPipeAndPassReceiver());
diff --git a/content/browser/notifications/platform_notification_context_impl.cc b/content/browser/notifications/platform_notification_context_impl.cc
index 9ada5345a004a761b6e12ac0259d61e9fd8de5e9..9c13bd9e7d2604ef72b28029a9733153e776754f 100644
index d68765bcd17e93cdbad875311375153133ee45d9..cefaac6dded65e57dced955ae9bfa2ff65bc4e66 100644
--- a/content/browser/notifications/platform_notification_context_impl.cc
+++ b/content/browser/notifications/platform_notification_context_impl.cc
@@ -208,12 +208,13 @@ void PlatformNotificationContextImpl::Shutdown() {
@@ -107,19 +107,19 @@ index 4bf25bf1fa69f7d3869369172d375e2e489e62a1..f80ef2cecc8b111dc54e109646573a59
const url::Origin& origin,
mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
diff --git a/content/browser/renderer_interface_binders.cc b/content/browser/renderer_interface_binders.cc
index ca880850d5f538c6615fb8b3546d4726bf42b7f6..918448ace7c99bd406ff49d3903aeae98f4fc831 100644
--- a/content/browser/renderer_interface_binders.cc
+++ b/content/browser/renderer_interface_binders.cc
@@ -136,7 +136,7 @@ void RendererInterfaceBinders::InitializeParameterizedBinderRegistry() {
RenderProcessHost* host, const url::Origin& origin) {
static_cast<StoragePartitionImpl*>(host->GetStoragePartition())
->GetPlatformNotificationContext()
- ->CreateService(origin, std::move(request));
+ ->CreateService(host, origin, std::move(request));
}));
parameterized_binder_registry_.AddInterface(
base::BindRepeating(&QuotaDispatcherHost::CreateForWorker));
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index d04fe57ac79c28307e119d068e3fcc16cc1560ae..3ff0d4050a9f6b960df5e02554217abbd350d817 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2006,7 +2006,7 @@ void RenderProcessHostImpl::CreateNotificationService(
mojo::PendingReceiver<blink::mojom::NotificationService> receiver) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(
- origin, std::move(receiver));
+ this, origin, std::move(receiver));
}
void RenderProcessHostImpl::CreateWebSocketConnector(
diff --git a/content/public/browser/platform_notification_service.h b/content/public/browser/platform_notification_service.h
index ca61088079c4150fcf389504ddcf26bcf6bf69cd..d9c034c39890eef1fe3d95c6d7c0ae68eb711a89 100644
--- a/content/public/browser/platform_notification_service.h

View File

@@ -40,7 +40,7 @@ index 4bb88c55a82a83cef8330ec8157b49d5adb097ce..48f4e385a57eb0e00c90488fbf052900
+ return PP_OK;
}
diff --git a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
index d45f9a3b3b03498e96344ec741797cd649197a39..a282955a9007974905daa8611bd68fdccdfe34af 100644
index 860c5738d5731c901aeb9074074f3337d7fc4053..27435c3c91440e8c83e209097aae2b2231061eee 100644
--- a/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
+++ b/chrome/browser/renderer_host/pepper/pepper_flash_browser_host.cc
@@ -8,9 +8,11 @@
@@ -55,7 +55,7 @@ index d45f9a3b3b03498e96344ec741797cd649197a39..a282955a9007974905daa8611bd68fdc
#include "content/public/browser/browser_context.h"
#include "content/public/browser/browser_ppapi_host.h"
#include "content/public/browser/browser_task_traits.h"
@@ -42,6 +44,7 @@ using content::RenderProcessHost;
@@ -43,6 +45,7 @@ using content::RenderProcessHost;
namespace {
@@ -63,15 +63,15 @@ index d45f9a3b3b03498e96344ec741797cd649197a39..a282955a9007974905daa8611bd68fdc
// Get the CookieSettings on the UI thread for the given render process ID.
scoped_refptr<content_settings::CookieSettings> GetCookieSettings(
int render_process_id) {
@@ -55,6 +58,7 @@ scoped_refptr<content_settings::CookieSettings> GetCookieSettings(
@@ -56,6 +59,7 @@ scoped_refptr<content_settings::CookieSettings> GetCookieSettings(
}
return nullptr;
}
+#endif
void PepperBindConnectorRequest(
service_manager::mojom::ConnectorRequest connector_request) {
@@ -70,7 +74,9 @@ PepperFlashBrowserHost::PepperFlashBrowserHost(BrowserPpapiHost* host,
void PepperBindConnectorReceiver(
mojo::PendingReceiver<service_manager::mojom::Connector>
@@ -72,7 +76,9 @@ PepperFlashBrowserHost::PepperFlashBrowserHost(BrowserPpapiHost* host,
PP_Instance instance,
PP_Resource resource)
: ResourceHost(host->GetPpapiHost(), instance, resource),
@@ -81,7 +81,7 @@ index d45f9a3b3b03498e96344ec741797cd649197a39..a282955a9007974905daa8611bd68fdc
delay_timer_(FROM_HERE,
base::TimeDelta::FromSeconds(45),
this,
@@ -123,6 +129,7 @@ int32_t PepperFlashBrowserHost::OnGetLocalTimeZoneOffset(
@@ -125,6 +131,7 @@ int32_t PepperFlashBrowserHost::OnGetLocalTimeZoneOffset(
int32_t PepperFlashBrowserHost::OnGetLocalDataRestrictions(
ppapi::host::HostMessageContext* context) {
@@ -89,7 +89,7 @@ index d45f9a3b3b03498e96344ec741797cd649197a39..a282955a9007974905daa8611bd68fdc
// Getting the Flash LSO settings requires using the CookieSettings which
// belong to the profile which lives on the UI thread. We lazily initialize
// |cookie_settings_| by grabbing the reference from the UI thread and then
@@ -143,9 +150,11 @@ int32_t PepperFlashBrowserHost::OnGetLocalDataRestrictions(
@@ -145,9 +152,11 @@ int32_t PepperFlashBrowserHost::OnGetLocalDataRestrictions(
context->MakeReplyMessageContext(), document_url,
plugin_url));
}
@@ -102,7 +102,7 @@ index d45f9a3b3b03498e96344ec741797cd649197a39..a282955a9007974905daa8611bd68fdc
void PepperFlashBrowserHost::GetLocalDataRestrictions(
ppapi::host::ReplyMessageContext reply_context,
const GURL& document_url,
@@ -174,6 +183,7 @@ void PepperFlashBrowserHost::GetLocalDataRestrictions(
@@ -176,6 +185,7 @@ void PepperFlashBrowserHost::GetLocalDataRestrictions(
PpapiPluginMsg_Flash_GetLocalDataRestrictionsReply(
static_cast<int32_t>(restrictions)));
}

View File

@@ -3,6 +3,10 @@ From: Heilig Benedek <benecene@gmail.com>
Date: Sat, 10 Aug 2019 00:41:50 +0200
Subject: feat: enable picture in picture mode for video players
These files are needed to implement PiP, but the Electron build patches out
chrome's generated resources for our own. This updates the #include so that we
don't get errors for Chrome's generated resources, which are non-existent
because we don't generate them in our build.
diff --git a/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc b/chrome/browser/ui/views/overlay/back_to_tab_image_button.cc
index 8e4deafa1746eeb48802a0503fefb37bedb33d04..127c62efd2327e1f3f09e9b93a0b8344e2714f80 100644

View File

@@ -8,10 +8,10 @@ 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 c3c7d4220f7ea612e5b86645854e4f426066e18c..969dd6659bfdc0fa3cf3edf494f1623ba10134a5 100644
index 6f6539689a2d57d6dcedb04e23c00fb1fce482c5..03790f759a472bade4e201177d0f393ba645bfac 100644
--- a/chrome/browser/predictors/preconnect_manager.cc
+++ b/chrome/browser/predictors/preconnect_manager.cc
@@ -70,7 +70,7 @@ PreresolveJob::PreresolveJob(PreresolveJob&& other) = default;
@@ -69,7 +69,7 @@ PreresolveJob::PreresolveJob(PreresolveJob&& other) = default;
PreresolveJob::~PreresolveJob() = default;
PreconnectManager::PreconnectManager(base::WeakPtr<Delegate> delegate,
@@ -20,7 +20,7 @@ index c3c7d4220f7ea612e5b86645854e4f426066e18c..969dd6659bfdc0fa3cf3edf494f1623b
: delegate_(std::move(delegate)),
profile_(profile),
inflight_preresolves_count_(0) {
@@ -317,11 +317,13 @@ network::mojom::NetworkContext* PreconnectManager::GetNetworkContext() const {
@@ -327,11 +327,13 @@ network::mojom::NetworkContext* PreconnectManager::GetNetworkContext() const {
if (network_context_)
return network_context_;
@@ -35,7 +35,7 @@ index c3c7d4220f7ea612e5b86645854e4f426066e18c..969dd6659bfdc0fa3cf3edf494f1623b
return content::BrowserContext::GetDefaultStoragePartition(profile_)
->GetNetworkContext();
diff --git a/chrome/browser/predictors/preconnect_manager.h b/chrome/browser/predictors/preconnect_manager.h
index e35163576b55d772098ae2a2138c4c1cf8438eac..70cad725f9476175b31859867c640ca8c66816a8 100644
index 9c0efc9d04b9825786d22a56ab39fb80f65f59cb..d587722d4a2ff6416bab060bdc716b3051a4753b 100644
--- a/chrome/browser/predictors/preconnect_manager.h
+++ b/chrome/browser/predictors/preconnect_manager.h
@@ -22,6 +22,10 @@
@@ -49,7 +49,7 @@ index e35163576b55d772098ae2a2138c4c1cf8438eac..70cad725f9476175b31859867c640ca8
namespace network {
namespace mojom {
class NetworkContext;
@@ -138,7 +142,7 @@ class PreconnectManager {
@@ -143,7 +147,7 @@ class PreconnectManager {
static const size_t kMaxInflightPreresolves = 3;
@@ -58,7 +58,7 @@ index e35163576b55d772098ae2a2138c4c1cf8438eac..70cad725f9476175b31859867c640ca8
virtual ~PreconnectManager();
// Starts preconnect and preresolve jobs keyed by |url|.
@@ -196,7 +200,7 @@ class PreconnectManager {
@@ -208,7 +212,7 @@ class PreconnectManager {
network::mojom::NetworkContext* GetNetworkContext() const;
base::WeakPtr<Delegate> delegate_;

View File

@@ -11,7 +11,7 @@ majority of changes originally come from these PRs:
This patch also fixes callback for manual user cancellation and success.
diff --git a/chrome/browser/printing/print_job_worker.cc b/chrome/browser/printing/print_job_worker.cc
index ab32d5475a0e269d32f6ab71f7dc82aa9e02035a..9ada750416f02d23c2f9faae0c41e4a7541183f7 100644
index 55469c2b13d43e788a85315cc14a9c6eabe8ad9b..453d6cbcad219d1ae3da285ec005b6a559452ead 100644
--- a/chrome/browser/printing/print_job_worker.cc
+++ b/chrome/browser/printing/print_job_worker.cc
@@ -21,7 +21,6 @@
@@ -30,7 +30,7 @@ index ab32d5475a0e269d32f6ab71f7dc82aa9e02035a..9ada750416f02d23c2f9faae0c41e4a7
#include "printing/print_job_constants.h"
#include "printing/printed_document.h"
#include "printing/printing_utils.h"
@@ -221,9 +221,14 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings,
@@ -222,9 +222,14 @@ void PrintJobWorker::UpdatePrintSettings(base::Value new_settings,
print_backend->GetPrinterDriverInfo(printer_name));
}
@@ -48,7 +48,7 @@ index ab32d5475a0e269d32f6ab71f7dc82aa9e02035a..9ada750416f02d23c2f9faae0c41e4a7
}
#if defined(OS_CHROMEOS)
@@ -239,6 +244,13 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD(
@@ -240,6 +245,13 @@ void PrintJobWorker::UpdatePrintSettingsFromPOD(
void PrintJobWorker::GetSettingsDone(SettingsCallback callback,
PrintingContext::Result result) {
@@ -63,7 +63,7 @@ index ab32d5475a0e269d32f6ab71f7dc82aa9e02035a..9ada750416f02d23c2f9faae0c41e4a7
}
diff --git a/chrome/browser/printing/print_view_manager_base.cc b/chrome/browser/printing/print_view_manager_base.cc
index 81cb954f02363c829947dde830f340a761c80a77..60ffae6ea08187e3ddf1d86ad48f2aeca3519d48 100644
index 3d026cd11aa2c0b009812317995cd4e02161251e..2778bfd64270a2e93153f39e849316ed1ad8dbbf 100644
--- a/chrome/browser/printing/print_view_manager_base.cc
+++ b/chrome/browser/printing/print_view_manager_base.cc
@@ -27,10 +27,7 @@
@@ -167,7 +167,7 @@ index 81cb954f02363c829947dde830f340a761c80a77..60ffae6ea08187e3ddf1d86ad48f2aec
#endif
ReleasePrinterQuery();
@@ -449,9 +462,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
@@ -451,9 +464,13 @@ void PrintViewManagerBase::OnNotifyPrintJobEvent(
content::NotificationService::NoDetails());
break;
}
@@ -183,7 +183,7 @@ index 81cb954f02363c829947dde830f340a761c80a77..60ffae6ea08187e3ddf1d86ad48f2aec
NOTREACHED();
break;
}
@@ -546,8 +563,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -548,8 +565,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
DCHECK(!quit_inner_loop_);
DCHECK(query);
@@ -192,7 +192,7 @@ index 81cb954f02363c829947dde830f340a761c80a77..60ffae6ea08187e3ddf1d86ad48f2aec
// We can't print if there is no renderer.
if (!web_contents()->GetRenderViewHost() ||
@@ -562,8 +577,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
@@ -564,8 +579,6 @@ bool PrintViewManagerBase::CreateNewPrintJob(
print_job_->SetSource(PrintJob::Source::PRINT_PREVIEW, /*source_id=*/"");
#endif // defined(OS_CHROMEOS)
@@ -201,7 +201,7 @@ index 81cb954f02363c829947dde830f340a761c80a77..60ffae6ea08187e3ddf1d86ad48f2aec
printing_succeeded_ = false;
return true;
}
@@ -612,14 +625,24 @@ void PrintViewManagerBase::ReleasePrintJob() {
@@ -614,14 +627,24 @@ void PrintViewManagerBase::ReleasePrintJob() {
content::RenderFrameHost* rfh = printing_rfh_;
printing_rfh_ = nullptr;
@@ -382,19 +382,10 @@ index 9fbea6d0a2dbe55b1d600fbc217dee5aa8ae8cd5..de9bd267e408c02fd4da7d903523c0e6
// content::BrowserMessageFilter:
bool OnMessageReceived(const IPC::Message& message) override;
diff --git a/components/printing/common/print.mojom b/components/printing/common/print.mojom
index d5ff612320fb3f324b58c91b0c05e0eac689beef..254810ca174c456b6bf6966954e4e188c2460f15 100644
index 34e1cda035c042c8c4c55acd7716cf9473856fcf..199267d873f2343cdf401bb9a335dd753e0d4dfd 100644
--- a/components/printing/common/print.mojom
+++ b/components/printing/common/print.mojom
@@ -4,6 +4,8 @@
module printing.mojom;
+import "mojo/public/mojom/base/values.mojom";
+
// Interface implemented by a class that desires to render print documents for
// Chrome print preview.
interface PrintRenderer {
@@ -16,7 +18,7 @@ interface PrintRenderer {
@@ -24,7 +24,7 @@ interface PrintRenderer {
interface PrintRenderFrame {
// Tells the RenderFrame to switch the CSS to print media type, render every
// requested page, and then switch back the CSS to display media type.
@@ -404,10 +395,10 @@ index d5ff612320fb3f324b58c91b0c05e0eac689beef..254810ca174c456b6bf6966954e4e188
// 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 95bf92929983110de4489ee18f52783ddf178bcf..43c6b504f60a44daedd66f7dcf7d8d0b2cf9c6e9 100644
index 41f6c6ba9920c7fe2a0cf91458162afb70762c16..7315a2b5962f42b57d04655cea97a938bd61768f 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -38,6 +38,7 @@
@@ -39,6 +39,7 @@
#include "net/base/registry_controlled_domains/registry_controlled_domain.h"
#include "printing/buildflags/buildflags.h"
#include "printing/metafile_skia.h"
@@ -415,7 +406,7 @@ index 95bf92929983110de4489ee18f52783ddf178bcf..43c6b504f60a44daedd66f7dcf7d8d0b
#include "printing/units.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
#include "third_party/blink/public/common/frame/frame_owner_element_type.h"
@@ -1161,7 +1162,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
@@ -1166,7 +1167,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
web_frame->DispatchBeforePrintEvent();
if (!weak_this)
return;
@@ -425,7 +416,7 @@ index 95bf92929983110de4489ee18f52783ddf178bcf..43c6b504f60a44daedd66f7dcf7d8d0b
if (weak_this)
web_frame->DispatchAfterPrintEvent();
}
@@ -1197,7 +1199,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
@@ -1202,7 +1204,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
receivers_.Add(this, std::move(receiver));
}
@@ -434,7 +425,7 @@ index 95bf92929983110de4489ee18f52783ddf178bcf..43c6b504f60a44daedd66f7dcf7d8d0b
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
if (ipc_nesting_level_ > 1)
return;
@@ -1211,7 +1213,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
@@ -1216,7 +1218,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
// If we are printing a PDF extension frame, find the plugin node and print
// that instead.
auto plugin = delegate_->GetPdfElement(frame);
@@ -443,7 +434,7 @@ index 95bf92929983110de4489ee18f52783ddf178bcf..43c6b504f60a44daedd66f7dcf7d8d0b
if (!render_frame_gone_)
frame->DispatchAfterPrintEvent();
// WARNING: |this| may be gone at this point. Do not do any more work here and
@@ -1228,7 +1230,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
@@ -1233,7 +1235,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
return;
}
Print(frame, print_preview_context_.source_node(),
@@ -452,7 +443,7 @@ index 95bf92929983110de4489ee18f52783ddf178bcf..43c6b504f60a44daedd66f7dcf7d8d0b
if (!render_frame_gone_)
frame->DispatchAfterPrintEvent();
// WARNING: |this| may be gone at this point. Do not do any more work here and
@@ -1308,6 +1310,8 @@ void PrintRenderFrameHelper::OnPrintPreview(
@@ -1315,6 +1317,8 @@ void PrintRenderFrameHelper::OnPrintPreview(
if (ipc_nesting_level_ > 1)
return;
@@ -460,8 +451,8 @@ index 95bf92929983110de4489ee18f52783ddf178bcf..43c6b504f60a44daedd66f7dcf7d8d0b
+ print_preview_context_.InitWithFrame(frame);
print_preview_context_.OnPrintPreview();
UMA_HISTOGRAM_ENUMERATION("PrintPreview.PreviewEvent",
@@ -1662,7 +1666,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
base::UmaHistogramEnumeration(print_preview_context_.IsForArc()
@@ -1760,7 +1764,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
auto self = weak_ptr_factory_.GetWeakPtr();
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@@ -472,7 +463,7 @@ index 95bf92929983110de4489ee18f52783ddf178bcf..43c6b504f60a44daedd66f7dcf7d8d0b
// Check if |this| is still valid.
if (!self)
return;
@@ -1673,7 +1679,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -1771,7 +1777,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,
@@ -483,7 +474,7 @@ index 95bf92929983110de4489ee18f52783ddf178bcf..43c6b504f60a44daedd66f7dcf7d8d0b
// If still not finished with earlier print request simply ignore.
if (prep_frame_view_)
return;
@@ -1681,7 +1689,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -1779,7 +1787,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
FrameReference frame_ref(frame);
int expected_page_count = 0;
@@ -492,7 +483,7 @@ index 95bf92929983110de4489ee18f52783ddf178bcf..43c6b504f60a44daedd66f7dcf7d8d0b
DidFinishPrinting(FAIL_PRINT_INIT);
return; // Failed to init print page settings.
}
@@ -1701,8 +1709,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -1799,8 +1807,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
PrintMsg_PrintPages_Params print_settings;
auto self = weak_ptr_factory_.GetWeakPtr();
@@ -506,7 +497,7 @@ index 95bf92929983110de4489ee18f52783ddf178bcf..43c6b504f60a44daedd66f7dcf7d8d0b
// Check if |this| is still valid.
if (!self)
return;
@@ -1926,10 +1937,23 @@ void PrintRenderFrameHelper::IPCProcessed() {
@@ -2024,10 +2035,23 @@ void PrintRenderFrameHelper::IPCProcessed() {
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
}
@@ -533,7 +524,7 @@ index 95bf92929983110de4489ee18f52783ddf178bcf..43c6b504f60a44daedd66f7dcf7d8d0b
// Check if the printer returned any settings, if the settings is empty, we
// can safely assume there are no printer drivers configured. So we safely
// terminate.
@@ -1949,12 +1973,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
@@ -2047,12 +2071,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
return result;
}
@@ -553,10 +544,10 @@ index 95bf92929983110de4489ee18f52783ddf178bcf..43c6b504f60a44daedd66f7dcf7d8d0b
Send(new PrintHostMsg_ShowInvalidPrinterSettingsError(routing_id()));
return false;
diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
index dcb0da469d5aab19bc568deb07d3619f8defa76e..6ade4fcb0d9e758e69016f1b032d7d37e1a635ab 100644
index a432a1e007111d6c13c76255aa445d05b869e46c..3f66fd39345998fd11d0fd383b4262cca838abf8 100644
--- a/components/printing/renderer/print_render_frame_helper.h
+++ b/components/printing/renderer/print_render_frame_helper.h
@@ -212,7 +212,7 @@ class PrintRenderFrameHelper
@@ -224,7 +224,7 @@ class PrintRenderFrameHelper
mojo::PendingAssociatedReceiver<mojom::PrintRenderFrame> receiver);
// printing::mojom::PrintRenderFrame:
@@ -565,7 +556,7 @@ index dcb0da469d5aab19bc568deb07d3619f8defa76e..6ade4fcb0d9e758e69016f1b032d7d37
void PrintForSystemDialog() override;
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
void InitiatePrintPreview(
@@ -266,7 +266,9 @@ class PrintRenderFrameHelper
@@ -291,7 +291,9 @@ class PrintRenderFrameHelper
// WARNING: |this| may be gone after this method returns.
void Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,
@@ -576,7 +567,7 @@ index dcb0da469d5aab19bc568deb07d3619f8defa76e..6ade4fcb0d9e758e69016f1b032d7d37
// Notification when printing is done - signal tear-down/free resources.
void DidFinishPrinting(PrintingResult result);
@@ -275,12 +277,14 @@ class PrintRenderFrameHelper
@@ -300,12 +302,14 @@ class PrintRenderFrameHelper
// Initialize print page settings with default settings.
// Used only for native printing workflow.
@@ -594,10 +585,10 @@ index dcb0da469d5aab19bc568deb07d3619f8defa76e..6ade4fcb0d9e758e69016f1b032d7d37
#if BUILDFLAG(ENABLE_PRINT_PREVIEW)
// Set options for print preset from source PDF document.
diff --git a/printing/print_settings_conversion.cc b/printing/print_settings_conversion.cc
index f844f92e2cc3b094e265ab40d4e47a4ab57b6ce0..3decdb6a8faa49d6f25b9be9340ff1e3a3b5461b 100644
index e01d195261a4c993dddb77d7a355481bf02067cc..2e533a6981c86387f892f8a3aaed99478f6079ef 100644
--- a/printing/print_settings_conversion.cc
+++ b/printing/print_settings_conversion.cc
@@ -182,12 +182,14 @@ bool PrintSettingsFromJobSettings(const base::Value& job_settings,
@@ -186,12 +186,14 @@ bool PrintSettingsFromJobSettings(const base::Value& job_settings,
settings->set_dpi_xy(dpi_horizontal.value(), dpi_vertical.value());
#endif

View File

@@ -8,10 +8,10 @@ needed in chromium but our autofill implementation uses them. This patch can be
our autofill implementation to work like Chromium's.
diff --git a/chrome/browser/ui/libgtkui/native_theme_gtk.cc b/chrome/browser/ui/libgtkui/native_theme_gtk.cc
index ad87f4729fe2cec2cf6e12b5bfcaf68bccf0390d..b1c3fd0f798d520da0637268dcbd51ecde9b40a7 100644
index 9871a29db66aefdd2d9333645d9a445a5511bb7d..d7bd218fcea1428957265ba79e16df1c00037127 100644
--- a/chrome/browser/ui/libgtkui/native_theme_gtk.cc
+++ b/chrome/browser/ui/libgtkui/native_theme_gtk.cc
@@ -279,6 +279,27 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
@@ -292,6 +292,27 @@ SkColor SkColorFromColorId(ui::NativeTheme::ColorId color_id) {
case ui::NativeTheme::kColorId_TableHeaderSeparator:
return GetBorderColor("GtkTreeView#treeview.view GtkButton#button");
@@ -40,10 +40,10 @@ index ad87f4729fe2cec2cf6e12b5bfcaf68bccf0390d..b1c3fd0f798d520da0637268dcbd51ec
// TODO(thomasanderson): Render GtkSpinner directly.
case ui::NativeTheme::kColorId_ThrobberSpinningColor:
diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc
index 7fd49a2e26968daaa16ed3322b516f53ff60fb56..f902910ecc8e5b4945187e836655362ebba49204 100644
index 381f75f76757666adc5cbaf8274b0e9fed55c261..8a8ebeeeaa7942003ee7fc7898e79e12818f0c10 100644
--- a/ui/native_theme/common_theme.cc
+++ b/ui/native_theme/common_theme.cc
@@ -56,6 +56,14 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
@@ -59,6 +59,14 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
case NativeTheme::kColorId_BubbleFooterBackground:
return SkColorSetRGB(0x32, 0x36, 0x39);
@@ -57,10 +57,10 @@ index 7fd49a2e26968daaa16ed3322b516f53ff60fb56..f902910ecc8e5b4945187e836655362e
+
// FocusableBorder
case NativeTheme::kColorId_FocusedBorderColor:
return SkColorSetA(gfx::kGoogleBlue300, 0x66);
@@ -359,6 +367,18 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
return SkColorSetA(gfx::kGoogleBlue300, 0x4D);
@@ -391,6 +399,18 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
case NativeTheme::kColorId_UnfocusedBorderColor:
return SkColorSetA(SK_ColorBLACK, 0x66);
return gfx::kGoogleGrey300;
+ // Results Tables
+ case NativeTheme::kColorId_ResultsTableNormalBackground:
@@ -78,10 +78,10 @@ index 7fd49a2e26968daaa16ed3322b516f53ff60fb56..f902910ecc8e5b4945187e836655362e
case NativeTheme::kColorId_ThrobberSpinningColor:
return gfx::kGoogleBlue600;
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index f1330721a711c61211ea136286ee884bc00e1975..e479fc84f7013984fc53d18cad8812fbd43cb670 100644
index d266d92f9ceec23d38430ada176b753b34005749..183fe5b316697e9478751bab4766238ec8e29bd2 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -389,6 +389,11 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -397,6 +397,11 @@ class NATIVE_THEME_EXPORT NativeTheme {
kColorId_TableHeaderText,
kColorId_TableHeaderBackground,
kColorId_TableHeaderSeparator,
@@ -94,11 +94,11 @@ index f1330721a711c61211ea136286ee884bc00e1975..e479fc84f7013984fc53d18cad8812fb
kColorId_ThrobberSpinningColor,
kColorId_ThrobberWaitingColor,
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index 5b1804538c2e78af23c797004f250369580b4178..97e72bc38a7231ce295ad943e977c69586cc6e07 100644
index a7c06b8a046bba7096bfb41c84d2073980ffa6d3..cff7681a4e0023a67edda37bf9865ab073b32549 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -673,6 +673,17 @@ SkColor NativeThemeWin::GetSystemColor(ColorId color_id,
case kColorId_TableGroupingIndicatorColor:
@@ -619,6 +619,18 @@ SkColor NativeThemeWin::GetPlatformHighContrastColor(ColorId color_id) const {
case kColorId_ThrobberWaitingColor:
return system_colors_[SystemThemeColor::kGrayText];
+ // Results Tables
@@ -112,6 +112,7 @@ index 5b1804538c2e78af23c797004f250369580b4178..97e72bc38a7231ce295ad943e977c695
+ case kColorId_ResultsTableDimmedText:
+ return color_utils::AlphaBlend(system_colors_[SystemThemeColor::kWindowText],
+ system_colors_[SystemThemeColor::kWindow], 0.5f);
default:
break;
}
+
// Button Background
case kColorId_MenuBackgroundColor:
case kColorId_HighlightedMenuItemBackgroundColor:

View File

@@ -3,12 +3,13 @@ From: Anonymous <anonymous@electronjs.org>
Date: Thu, 20 Sep 2018 17:46:21 -0700
Subject: render_widget_host_view_base.patch
... something to do with OSR? and maybe <webview> as well? terrifying.
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index 50aad3c8d627ab4e65c1438266c2c1c68113dccf..4a708fdfacfb8fcc2ad07d5f10b475e2169b62ee 100644
index 394b9ec0b7409465b0f9700a2d4a1eb1cf538e1f..a34dcdd124746b04d116e207b10395fc02649ec1 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -631,6 +631,15 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
@@ -619,6 +619,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
return false;
}
@@ -16,16 +17,14 @@ index 50aad3c8d627ab4e65c1438266c2c1c68113dccf..4a708fdfacfb8fcc2ad07d5f10b475e2
+ RenderWidgetHost* render_widget_host,
+ RenderWidgetHost* embedder_render_widget_host,
+ WebContentsView* web_contents_view) {
+ return web_contents_view->CreateViewForWidget(
+ render_widget_host,
+ !!embedder_render_widget_host);
+ return web_contents_view->CreateViewForWidget(render_widget_host);
+}
+
void RenderWidgetHostViewBase::ProcessMouseEvent(
const blink::WebMouseEvent& event,
const ui::LatencyInfo& latency) {
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index add7df1a4432d8a6e4ebec892ab2708ba6650af5..d681d70e8ca9b2c228295336484d9b68240ce26b 100644
index 9763b72a68992fc97cf1d1ec10d55c1198ec1771..1ece7c0cdfa2ab519d5ea0ef31465cda305830fd 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -24,9 +24,11 @@
@@ -52,7 +51,7 @@ index add7df1a4432d8a6e4ebec892ab2708ba6650af5..d681d70e8ca9b2c228295336484d9b68
class WebCursor;
class DelegatedFrameHost;
struct TextInputState;
@@ -133,6 +137,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -132,6 +136,9 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
bool destination_is_loaded,
bool destination_is_frozen) final;
@@ -62,7 +61,7 @@ index add7df1a4432d8a6e4ebec892ab2708ba6650af5..d681d70e8ca9b2c228295336484d9b68
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
gfx::PointF TransformPointToRootCoordSpaceF(
@@ -350,6 +357,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -342,6 +349,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
const ui::LatencyInfo& latency);

View File

@@ -3,9 +3,14 @@ From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu, 20 Sep 2018 17:46:28 -0700
Subject: render_widget_host_view_mac.patch
This allows Electron to override `acceptsFirstMouse` on Mac so that windows can
respond to the first mouse click in their window, which is desirable for some
kinds of utility windows. Similarly for `disableAutoHideCursor`.
Additionally, disables usage of some private APIs in MAS builds.
diff --git a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
index d8de080eb6a30f16282661941b9a95da4fa41d70..326c5a13f6924643c699ca3cc2f98262a21fd907 100644
index 01159a8b5b28858e899808cc57862e54dd998b48..ff122c32e18fc16efd7c376d38499c1d69fab635 100644
--- a/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
+++ b/content/app_shim_remote_cocoa/render_widget_host_view_cocoa.mm
@@ -153,6 +153,11 @@ void ExtractUnderlines(NSAttributedString* string,
@@ -40,7 +45,7 @@ index d8de080eb6a30f16282661941b9a95da4fa41d70..326c5a13f6924643c699ca3cc2f98262
+
// We only handle key down events and just simply forward other events.
if (eventType != NSKeyDown) {
hostHelper_->ForwardKeyboardEvent(event, latency_info);
_hostHelper->ForwardKeyboardEvent(event, latency_info);
@@ -1769,9 +1781,11 @@ - (NSAccessibilityRole)accessibilityRole {
// Since this implementation doesn't have to wait any IPC calls, this doesn't
// make any key-typing jank. --hbono 7/23/09
@@ -63,17 +68,5 @@ index d8de080eb6a30f16282661941b9a95da4fa41d70..326c5a13f6924643c699ca3cc2f98262
+#endif
+ nil]);
}
return validAttributesForMarkedText_.get();
return _validAttributesForMarkedText.get();
}
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 4549c3d871d4c07333a557e311e38755c116fe45..de722efe61cb6823e62f1101b5aa3447f6795687 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -63,6 +63,7 @@
#include "ui/events/keycodes/dom/dom_keyboard_layout_map.h"
#include "ui/gfx/geometry/dip_util.h"
#include "ui/gfx/mac/coordinate_conversion.h"
+#include "ui/gl/gpu_switching_manager.h"
using blink::WebInputEvent;
using blink::WebMouseEvent;

View File

@@ -52,10 +52,10 @@ Some alternatives to this patch:
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index 88401aecde364267ee572fb93ca1be2ee6501cb7..e11c6bcf61bdc01f005cd79f88493b3fe61ec4dd 100644
index 6725c10609e153a7ea6fe4f1133c52dbbac9726c..7bfa4e30130d56294360fd371a93c9e272330e08 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1636,7 +1636,7 @@ if (is_chrome_branded && !is_android) {
@@ -1620,7 +1620,7 @@ if (is_chrome_branded && !is_android) {
}
}
@@ -64,7 +64,7 @@ index 88401aecde364267ee572fb93ca1be2ee6501cb7..e11c6bcf61bdc01f005cd79f88493b3f
chrome_paks("packed_resources") {
if (is_mac) {
output_dir = "$root_gen_dir/repack"
@@ -1660,6 +1660,12 @@ if (!is_android) {
@@ -1644,6 +1644,12 @@ if (!is_android) {
}
}

View File

@@ -112,17 +112,17 @@ index a258d038da4a2bbfc6ec13c250781166235c1fbc..f6dbaa19cdb8938204c3452622589708
+ EXPECT_EQ(7, changed_count());
}
diff --git a/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc b/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc
index 654d0bf906c4785321a1fcdad9e12a22dbbbc170..6159eca4a400112f10647defe857c72740ff2779 100644
index 326fe5abe680051a393c49ecbbdb07354ee16191..b80baf9290c054a3f254b73b4ed82f785c02b4b1 100644
--- a/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc
+++ b/chrome/browser/ui/views/menu_item_view_interactive_uitest.cc
@@ -91,8 +91,8 @@ class MenuItemViewTestInsert : public MenuTestBase {
inserted_item_ = menu()->AddMenuItemAt(
INSERT_INDEX, 1000, ASCIIToUTF16("inserted item"), base::string16(),
- nullptr, gfx::ImageSkia(), nullptr, views::MenuItemView::NORMAL,
- nullptr, gfx::ImageSkia(), nullptr, views::MenuItemView::Type::kNormal,
- ui::NORMAL_SEPARATOR);
+ base::string16(), nullptr, gfx::ImageSkia(), nullptr,
+ views::MenuItemView::NORMAL, ui::NORMAL_SEPARATOR);
+ views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR);
ASSERT_TRUE(inserted_item_);
menu()->ChildrenChanged();
@@ -130,10 +130,10 @@ index 654d0bf906c4785321a1fcdad9e12a22dbbbc170..6159eca4a400112f10647defe857c727
void Step2() {
inserted_item_ = menu()->AddMenuItemAt(
INSERT_INDEX, 1000, ASCIIToUTF16("inserted item"), base::string16(),
- nullptr, gfx::ImageSkia(), nullptr, views::MenuItemView::NORMAL,
- nullptr, gfx::ImageSkia(), nullptr, views::MenuItemView::Type::kNormal,
- ui::NORMAL_SEPARATOR);
+ base::string16(), nullptr, gfx::ImageSkia(), nullptr,
+ views::MenuItemView::NORMAL, ui::NORMAL_SEPARATOR);
+ views::MenuItemView::Type::kNormal, ui::NORMAL_SEPARATOR);
ASSERT_TRUE(inserted_item_);
menu()->ChildrenChanged();
@@ -180,10 +180,10 @@ index 73f0ab6d84d2cab6732866a6dc4b781faf630c0e..3319d058e8303066e0159d02d27ee2e8
return base::string16();
}
diff --git a/ui/base/models/menu_model.h b/ui/base/models/menu_model.h
index b0ae539ba1dc5a4c11390267c3053058e92e7f34..1e28cd2b1bc66d512ea4e0b8ae62bc8ec03d7a1b 100644
index 5bcc6204c2b579fb2cba47ba1bc156967ec87faf..34e647d56dfe583a3484fb8df0a148064eacb07b 100644
--- a/ui/base/models/menu_model.h
+++ b/ui/base/models/menu_model.h
@@ -65,6 +65,10 @@ class UI_BASE_EXPORT MenuModel : public base::SupportsWeakPtr<MenuModel> {
@@ -67,6 +67,10 @@ class UI_BASE_EXPORT MenuModel : public base::SupportsWeakPtr<MenuModel> {
// Returns the label of the item at the specified index.
virtual base::string16 GetLabelAt(int index) const = 0;
@@ -195,10 +195,10 @@ index b0ae539ba1dc5a4c11390267c3053058e92e7f34..1e28cd2b1bc66d512ea4e0b8ae62bc8e
// is rendered to the right of the label and using the font GetLabelFontAt().
virtual base::string16 GetMinorTextAt(int index) const;
diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
index 0aeeb3e47074590834de6d9ca7e3eb7dbf6a7793..5efc0589644e243a095765710302af992d53f5b8 100644
index 6a55c0f82ce3df3d8b2b31dbb67830bb5464019c..c42dee1fc9ddccf5b5556fff7282a64d14c8333d 100644
--- a/ui/base/models/simple_menu_model.cc
+++ b/ui/base/models/simple_menu_model.cc
@@ -42,6 +42,11 @@ base::string16 SimpleMenuModel::Delegate::GetLabelForCommandId(
@@ -46,6 +46,16 @@ base::string16 SimpleMenuModel::Delegate::GetLabelForCommandId(
return base::string16();
}
@@ -207,22 +207,15 @@ index 0aeeb3e47074590834de6d9ca7e3eb7dbf6a7793..5efc0589644e243a095765710302af99
+ return base::string16();
+}
+
base::string16 SimpleMenuModel::Delegate::GetMinorTextForCommandId(
int command_id) const {
return base::string16();
@@ -324,6 +329,11 @@ void SimpleMenuModel::SetLabel(int index, const base::string16& label) {
MenuItemsChanged();
}
+void SimpleMenuModel::SetSublabel(int index, const base::string16& sublabel) {
+ items_[ValidateItemIndex(index)].sublabel = sublabel;
+ MenuItemsChanged();
+}
+
void SimpleMenuModel::SetMinorText(int index,
const base::string16& minor_text) {
items_[ValidateItemIndex(index)].minor_text = minor_text;
@@ -398,6 +408,12 @@ base::string16 SimpleMenuModel::GetLabelAt(int index) const {
bool SimpleMenuModel::Delegate::GetIconForCommandId(
int command_id, gfx::Image* image_skia) const {
return false;
@@ -404,6 +414,12 @@ base::string16 SimpleMenuModel::GetLabelAt(int index) const {
return items_[ValidateItemIndex(index)].label;
}
@@ -233,27 +226,21 @@ index 0aeeb3e47074590834de6d9ca7e3eb7dbf6a7793..5efc0589644e243a095765710302af99
+}
+
base::string16 SimpleMenuModel::GetMinorTextAt(int index) const {
if (IsItemDynamicAt(index))
return delegate_->GetMinorTextForCommandId(GetCommandIdAt(index));
return items_[ValidateItemIndex(index)].minor_text;
}
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
index 3cc9d686da8f64ddc8bdc66df40b1866bdd20607..dfacbdd4a55b5f5aa4d8c67136c607f75a880278 100644
index 1ae8909a1404a43b34b9ef585511c7a3de39fa28..0d2a74ab5e9d55201a4992d81aecf9c2a83af5b8 100644
--- a/ui/base/models/simple_menu_model.h
+++ b/ui/base/models/simple_menu_model.h
@@ -44,10 +44,11 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
// Delegate should return true if |command_id| should be visible.
virtual bool IsCommandIdVisible(int command_id) const;
- // Some command ids have labels, minor text and icons that change over
- // time.
+ // Some command ids have labels, sublabels, minor text and icons that change
+ // over time.
@@ -47,6 +47,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
// Some command ids have labels and icons that change over time.
virtual bool IsItemForCommandIdDynamic(int command_id) const;
virtual base::string16 GetLabelForCommandId(int command_id) const;
+ virtual base::string16 GetSublabelForCommandId(int command_id) const;
virtual base::string16 GetMinorTextForCommandId(int command_id) const;
// Gets the icon for the item with the specified id, returning true if there
// is an icon, false otherwise.
@@ -175,6 +176,9 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
virtual bool GetIconForCommandId(int command_id,
@@ -174,6 +175,9 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
// Sets the label for the item at |index|.
void SetLabel(int index, const base::string16& label);
@@ -263,7 +250,7 @@ index 3cc9d686da8f64ddc8bdc66df40b1866bdd20607..dfacbdd4a55b5f5aa4d8c67136c607f7
// Sets the minor text for the item at |index|.
void SetMinorText(int index, const base::string16& minor_text);
@@ -201,6 +205,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
@@ -200,6 +204,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override;
int GetCommandIdAt(int index) const override;
base::string16 GetLabelAt(int index) const override;
@@ -271,7 +258,7 @@ index 3cc9d686da8f64ddc8bdc66df40b1866bdd20607..dfacbdd4a55b5f5aa4d8c67136c607f7
base::string16 GetMinorTextAt(int index) const override;
const gfx::VectorIcon* GetMinorIconAt(int index) const override;
bool IsItemDynamicAt(int index) const override;
@@ -236,6 +241,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
@@ -235,6 +240,7 @@ class UI_BASE_EXPORT SimpleMenuModel : public MenuModel {
int command_id = 0;
ItemType type = TYPE_COMMAND;
base::string16 label;
@@ -280,10 +267,10 @@ index 3cc9d686da8f64ddc8bdc66df40b1866bdd20607..dfacbdd4a55b5f5aa4d8c67136c607f7
const gfx::VectorIcon* minor_icon = nullptr;
gfx::Image icon;
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
index 0fcca1e59688eda967c59397ea932637810af27b..35e7e3dc8f18fffa1713d6821c2bef87bdfce181 100644
index 07fc2153d8ad802a6ad1db9a2fc85498ce9a2dd0..2bfb29aaebe7a5a192a469519090bdc1e35672b0 100644
--- a/ui/views/controls/menu/menu_item_view.cc
+++ b/ui/views/controls/menu/menu_item_view.cc
@@ -277,6 +277,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
@@ -278,6 +278,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
int index,
int item_id,
const base::string16& label,
@@ -291,7 +278,7 @@ index 0fcca1e59688eda967c59397ea932637810af27b..35e7e3dc8f18fffa1713d6821c2bef87
const base::string16& minor_text,
const gfx::VectorIcon* minor_icon,
const gfx::ImageSkia& icon,
@@ -297,6 +298,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
@@ -298,6 +299,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
item->SetTitle(GetDelegate()->GetLabel(item_id));
else
item->SetTitle(label);
@@ -299,45 +286,24 @@ index 0fcca1e59688eda967c59397ea932637810af27b..35e7e3dc8f18fffa1713d6821c2bef87
item->SetMinorText(minor_text);
item->SetMinorIcon(minor_icon);
if (vector_icon) {
@@ -338,21 +340,23 @@ void MenuItemView::RemoveAllMenuItems() {
@@ -339,21 +341,22 @@ void MenuItemView::RemoveAllMenuItems() {
MenuItemView* MenuItemView::AppendMenuItem(int item_id,
const base::string16& label,
Type type) {
- return AppendMenuItemImpl(item_id, label, base::string16(), nullptr,
- gfx::ImageSkia(), type, ui::NORMAL_SEPARATOR);
+ return AppendMenuItemImpl(item_id, label, base::string16(), base::string16(),
+ nullptr, gfx::ImageSkia(), type,
+ ui::NORMAL_SEPARATOR);
const gfx::ImageSkia& icon) {
- return AppendMenuItemImpl(item_id, label, icon, Type::kNormal);
+ return AppendMenuItemImpl(item_id, label, base::string16(), icon, Type::kNormal);
}
MenuItemView* MenuItemView::AppendSubMenu(int item_id,
const base::string16& label) {
- return AppendMenuItemImpl(item_id, label, base::string16(), nullptr,
- gfx::ImageSkia(), SUBMENU, ui::NORMAL_SEPARATOR);
+ return AppendMenuItemImpl(item_id, label, base::string16(), base::string16(),
+ nullptr, gfx::ImageSkia(), SUBMENU,
+ ui::NORMAL_SEPARATOR);
}
MenuItemView* MenuItemView::AppendSubMenuWithIcon(int item_id,
const base::string16& label,
const gfx::ImageSkia& icon) {
- return AppendMenuItemImpl(item_id, label, base::string16(), nullptr, icon,
- SUBMENU, ui::NORMAL_SEPARATOR);
+ return AppendMenuItemImpl(item_id, label, base::string16(), base::string16(),
+ nullptr, icon, SUBMENU, ui::NORMAL_SEPARATOR);
}
MenuItemView* MenuItemView::AppendMenuItemWithLabel(
@@ -366,12 +370,14 @@ MenuItemView* MenuItemView::AppendDelegateMenuItem(int item_id) {
const base::string16& label,
const gfx::ImageSkia& icon) {
- return AppendMenuItemImpl(item_id, label, icon, Type::kSubMenu);
+ return AppendMenuItemImpl(item_id, label, base::string16(), icon, Type::kSubMenu);
}
void MenuItemView::AppendSeparator() {
- AppendMenuItemImpl(0, base::string16(), base::string16(), nullptr,
- gfx::ImageSkia(), SEPARATOR, ui::NORMAL_SEPARATOR);
+ AppendMenuItemImpl(0, base::string16(), base::string16(), base::string16(),
+ nullptr, gfx::ImageSkia(), SEPARATOR,
+ ui::NORMAL_SEPARATOR);
- AppendMenuItemImpl(0, base::string16(), gfx::ImageSkia(), Type::kSeparator);
+ AppendMenuItemImpl(0, base::string16(), base::string16(), gfx::ImageSkia(), Type::kSeparator);
}
void MenuItemView::AddSeparatorAt(int index) {
@@ -345,35 +311,21 @@ index 0fcca1e59688eda967c59397ea932637810af27b..35e7e3dc8f18fffa1713d6821c2bef87
+ /*sub_label=*/base::string16(),
/*minor_text=*/base::string16(), /*minor_icon=*/nullptr,
/*icon=*/gfx::ImageSkia(), /*vector_icon=*/nullptr,
/*type=*/SEPARATOR,
@@ -381,21 +387,22 @@ void MenuItemView::AddSeparatorAt(int index) {
MenuItemView* MenuItemView::AppendMenuItemWithIcon(int item_id,
const base::string16& label,
const gfx::ImageSkia& icon) {
- return AppendMenuItemImpl(item_id, label, base::string16(), nullptr, icon,
- NORMAL, ui::NORMAL_SEPARATOR);
+ return AppendMenuItemImpl(item_id, label, base::string16(), base::string16(),
+ nullptr, icon, NORMAL, ui::NORMAL_SEPARATOR);
}
/*type=*/Type::kSeparator,
@@ -362,10 +365,11 @@ void MenuItemView::AddSeparatorAt(int index) {
MenuItemView* MenuItemView::AppendMenuItemImpl(
int item_id,
const base::string16& label,
+ const base::string16& sublabel,
const base::string16& minor_text,
const gfx::VectorIcon* minor_icon,
const gfx::ImageSkia& icon,
Type type,
ui::MenuSeparatorType separator_style) {
MenuItemView* MenuItemView::AppendMenuItemImpl(int item_id,
const base::string16& label,
+ const base::string16& sublabel,
const gfx::ImageSkia& icon,
Type type) {
const int index = submenu_ ? int{submenu_->children().size()} : 0;
- return AddMenuItemAt(index, item_id, label, minor_text, minor_icon, icon,
- nullptr, type, separator_style);
+ return AddMenuItemAt(index, item_id, label, sublabel, minor_text, minor_icon,
+ icon, nullptr, type, separator_style);
- return AddMenuItemAt(index, item_id, label, base::string16(), nullptr, icon,
+ return AddMenuItemAt(index, item_id, label, sublabel, base::string16(), nullptr, icon,
nullptr, type, ui::NORMAL_SEPARATOR);
}
SubmenuView* MenuItemView::CreateSubmenu() {
@@ -427,6 +434,11 @@ void MenuItemView::SetTitle(const base::string16& title) {
@@ -398,6 +402,11 @@ void MenuItemView::SetTitle(const base::string16& title) {
invalidate_dimensions(); // Triggers preferred size recalculation.
}
@@ -385,7 +337,7 @@ index 0fcca1e59688eda967c59397ea932637810af27b..35e7e3dc8f18fffa1713d6821c2bef87
void MenuItemView::SetMinorText(const base::string16& minor_text) {
minor_text_ = minor_text;
invalidate_dimensions(); // Triggers preferred size recalculation.
@@ -1016,13 +1028,23 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
@@ -988,13 +997,23 @@ void MenuItemView::PaintButton(gfx::Canvas* canvas, PaintButtonMode mode) {
(!delegate ||
delegate->ShouldReserveSpaceForSubmenuIndicator() ?
item_right_margin_ : config.arrow_to_edge_padding);
@@ -410,7 +362,7 @@ index 0fcca1e59688eda967c59397ea932637810af27b..35e7e3dc8f18fffa1713d6821c2bef87
PaintMinorIconAndText(canvas, style);
// Set the submenu indicator (arrow) image and color.
@@ -1274,6 +1296,11 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
@@ -1245,6 +1264,11 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
// Determine the length of the label text.
int string_width = gfx::GetStringWidth(title_, style.font_list);
@@ -422,7 +374,7 @@ index 0fcca1e59688eda967c59397ea932637810af27b..35e7e3dc8f18fffa1713d6821c2bef87
dimensions.standard_width = string_width + label_start +
item_right_margin_;
// Determine the length of the right-side text.
@@ -1281,9 +1308,10 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
@@ -1252,9 +1276,10 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
minor_text.empty() ? 0 : gfx::GetStringWidth(minor_text, style.font_list);
// Determine the height to use.
@@ -437,10 +389,10 @@ index 0fcca1e59688eda967c59397ea932637810af27b..35e7e3dc8f18fffa1713d6821c2bef87
std::max(dimensions.height, MenuConfig::instance().item_min_height);
diff --git a/ui/views/controls/menu/menu_item_view.h b/ui/views/controls/menu/menu_item_view.h
index e129bed9de80df5a6aeaca8e22e7d12a949ab759..d7cfa2a5d93af7b865ab01f2cc004c4215fc9986 100644
index 6a69047e9c1ba7e1a93e1d730edc7639476561dd..1720c480fb72fb7a4aed551c30a252fbb813873c 100644
--- a/ui/views/controls/menu/menu_item_view.h
+++ b/ui/views/controls/menu/menu_item_view.h
@@ -151,6 +151,7 @@ class VIEWS_EXPORT MenuItemView : public View {
@@ -152,6 +152,7 @@ class VIEWS_EXPORT MenuItemView : public View {
MenuItemView* AddMenuItemAt(int index,
int item_id,
const base::string16& label,
@@ -448,15 +400,15 @@ index e129bed9de80df5a6aeaca8e22e7d12a949ab759..d7cfa2a5d93af7b865ab01f2cc004c42
const base::string16& minor_text,
const gfx::VectorIcon* minor_icon,
const gfx::ImageSkia& icon,
@@ -214,6 +215,7 @@ class VIEWS_EXPORT MenuItemView : public View {
@@ -194,6 +195,7 @@ class VIEWS_EXPORT MenuItemView : public View {
// All the AppendXXX methods funnel into this.
MenuItemView* AppendMenuItemImpl(int item_id,
const base::string16& label,
+ const base::string16& sublabel,
const base::string16& minor_text,
const gfx::VectorIcon* minor_icon,
const gfx::ImageSkia& icon,
@@ -241,6 +243,9 @@ class VIEWS_EXPORT MenuItemView : public View {
Type type);
@@ -218,6 +220,9 @@ class VIEWS_EXPORT MenuItemView : public View {
void SetTitle(const base::string16& title);
const base::string16& title() const { return title_; }
@@ -466,7 +418,7 @@ index e129bed9de80df5a6aeaca8e22e7d12a949ab759..d7cfa2a5d93af7b865ab01f2cc004c42
// Sets the minor text.
void SetMinorText(const base::string16& minor_text);
@@ -451,7 +456,7 @@ class VIEWS_EXPORT MenuItemView : public View {
@@ -428,7 +433,7 @@ class VIEWS_EXPORT MenuItemView : public View {
void DestroyAllMenuHosts();
// Returns the text that should be displayed on the end (right) of the menu
@@ -475,7 +427,7 @@ index e129bed9de80df5a6aeaca8e22e7d12a949ab759..d7cfa2a5d93af7b865ab01f2cc004c42
base::string16 GetMinorText() const;
// Returns the icon that should be displayed to the left of the minor text.
@@ -542,6 +547,9 @@ class VIEWS_EXPORT MenuItemView : public View {
@@ -519,6 +524,9 @@ class VIEWS_EXPORT MenuItemView : public View {
// Title.
base::string16 title_;
@@ -486,31 +438,31 @@ index e129bed9de80df5a6aeaca8e22e7d12a949ab759..d7cfa2a5d93af7b865ab01f2cc004c42
base::string16 minor_text_;
diff --git a/ui/views/controls/menu/menu_item_view_unittest.cc b/ui/views/controls/menu/menu_item_view_unittest.cc
index f51bd9d85dad7771f18fc535b55b30a855eac48f..63aa8eddf51cb4821517902564e94813f6a42c02 100644
index 6b5229578e0856a07c85db7d5eb36ffee812cef8..3d90eefa5345f4dc8563dfcefb2ee1376dd668d3 100644
--- a/ui/views/controls/menu/menu_item_view_unittest.cc
+++ b/ui/views/controls/menu/menu_item_view_unittest.cc
@@ -324,10 +324,10 @@ class MenuItemViewPaintUnitTest : public ViewsTestBase {
@@ -322,10 +322,10 @@ class MenuItemViewPaintUnitTest : public ViewsTestBase {
// Provides assertion coverage for painting minor text and icons.
TEST_F(MenuItemViewPaintUnitTest, MinorTextAndIconAssertionCoverage) {
auto AddItem = [this](auto label, auto minor_label, auto minor_icon) {
- menu_item_view()->AddMenuItemAt(0, 1000, base::ASCIIToUTF16(label),
- minor_label, minor_icon, gfx::ImageSkia(),
- nullptr, views::MenuItemView::NORMAL,
- nullptr, views::MenuItemView::Type::kNormal,
- ui::NORMAL_SEPARATOR);
+ menu_item_view()->AddMenuItemAt(
+ 0, 1000, base::ASCIIToUTF16(label), base::string16(), minor_label,
+ minor_icon, gfx::ImageSkia(), nullptr, views::MenuItemView::NORMAL,
+ minor_icon, gfx::ImageSkia(), nullptr, views::MenuItemView::Type::kNormal,
+ ui::NORMAL_SEPARATOR);
};
AddItem("No minor content", base::string16(), nullptr);
AddItem("Minor text only", base::ASCIIToUTF16("minor text"), nullptr);
diff --git a/ui/views/controls/menu/menu_model_adapter.cc b/ui/views/controls/menu/menu_model_adapter.cc
index 09b72733e66d1e13182730e475b781ffefe649c0..e45e249f2a89e1bfd31cc82341a65341571ffc21 100644
index 792b864594b36526cfb77292e921f9a62e1de7e4..d37d949a0db198b89f75603720e65ef35e9dc37b 100644
--- a/ui/views/controls/menu/menu_model_adapter.cc
+++ b/ui/views/controls/menu/menu_model_adapter.cc
@@ -96,8 +96,8 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model,
@@ -99,8 +99,8 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model,
if (*type == MenuItemView::SEPARATOR) {
if (*type == MenuItemView::Type::kSeparator) {
return menu->AddMenuItemAt(menu_index, item_id, base::string16(),
- base::string16(), nullptr, gfx::ImageSkia(),
- nullptr, *type,
@@ -519,7 +471,7 @@ index 09b72733e66d1e13182730e475b781ffefe649c0..e45e249f2a89e1bfd31cc82341a65341
model->GetSeparatorTypeAt(model_index));
}
@@ -105,7 +105,8 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model,
@@ -108,7 +108,8 @@ MenuItemView* MenuModelAdapter::AddMenuItemFromModelAt(ui::MenuModel* model,
model->GetIconAt(model_index, &icon);
return menu->AddMenuItemAt(
menu_index, item_id, model->GetLabelAt(model_index),

View File

@@ -6,18 +6,13 @@ Subject: Revert "Remove ContentRendererClient::ShouldFork."
This reverts commit 6b068eb8ca4a3c7350bdafa22fc0cf0636ef8b74.
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index feea878036d61c2ed128b8e0397cfd6979eed04a..e53f7ea3d5d0fb0e02ca526042d7937a3b627936 100644
index 1950be19dff0f559354bd57b3c5281b65e6c1c5e..00ff8aa9338f221b0cca3dcb807af7a3b176c4f7 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -1225,6 +1225,25 @@ bool ChromeContentRendererClient::AllowPopup() {
#endif
}
@@ -1310,6 +1310,17 @@ bool ChromeContentRendererClient::ShouldFork(WebLocalFrame* frame,
return true;
#endif // BUILDFLAG(ENABLE_EXTENSIONS)
+bool ChromeContentRendererClient::ShouldFork(WebLocalFrame* frame,
+ const GURL& url,
+ const std::string& http_method,
+ bool is_initial_navigation,
+ bool is_server_redirect) {
+ DCHECK(!frame->Parent());
+
+ // If |url| matches one of the prerendered URLs, stop this navigation and try
@@ -29,87 +24,11 @@ index feea878036d61c2ed128b8e0397cfd6979eed04a..e53f7ea3d5d0fb0e02ca526042d7937a
+ return true;
+ }
+
+ return false;
+}
+
void ChromeContentRendererClient::WillSendRequest(
WebLocalFrame* frame,
ui::PageTransition transition_type,
diff --git a/chrome/renderer/chrome_content_renderer_client.h b/chrome/renderer/chrome_content_renderer_client.h
index 43000eb90bab005dcc058f38a5d791a3eee1cef2..de98288514c95f703d6ab3a70c6daad9943cf4f8 100644
--- a/chrome/renderer/chrome_content_renderer_client.h
+++ b/chrome/renderer/chrome_content_renderer_client.h
@@ -136,6 +136,11 @@ class ChromeContentRendererClient
base::SingleThreadTaskRunner* compositor_thread_task_runner) override;
bool RunIdleHandlerWhenWidgetsHidden() override;
bool AllowPopup() override;
+ bool ShouldFork(blink::WebLocalFrame* frame,
+ const GURL& url,
+ const std::string& http_method,
+ bool is_initial_navigation,
+ bool is_server_redirect) override;
void WillSendRequest(blink::WebLocalFrame* frame,
ui::PageTransition transition_type,
const blink::WebURL& url,
diff --git a/content/public/renderer/content_renderer_client.cc b/content/public/renderer/content_renderer_client.cc
index ccd9c50b299b00936cce032b842e509eeb157ab0..ed275b4ab86fdad2af974746841111c7c231c04c 100644
--- a/content/public/renderer/content_renderer_client.cc
+++ b/content/public/renderer/content_renderer_client.cc
@@ -105,6 +105,14 @@ bool ContentRendererClient::HandleNavigation(
return false;
}
#endif
+bool ContentRendererClient::ShouldFork(blink::WebLocalFrame* frame,
+ const GURL& url,
+ const std::string& http_method,
+ bool is_initial_navigation,
+ bool is_server_redirect) {
+ return false;
+}
+
void ContentRendererClient::WillSendRequest(blink::WebLocalFrame* frame,
ui::PageTransition transition_type,
const blink::WebURL& url,
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index a05cef66facd477057fedb388e4000475bc76830..906920393c34043d19183064a2a4506c0a03e80d 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -212,6 +212,13 @@ class CONTENT_EXPORT ContentRendererClient {
bool is_redirect);
#endif
+ // Returns true if we should fork a new process for the given navigation.
+ virtual bool ShouldFork(blink::WebLocalFrame* frame,
+ const GURL& url,
+ const std::string& http_method,
+ bool is_initial_navigation,
+ bool is_server_redirect);
+
// Notifies the embedder that the given frame is requesting the resource at
// |url|. If the function returns a valid |new_url|, the request must be
// updated to use it. The |attach_same_site_cookies| output parameter
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 303365d0a682e548325da470eadc2ffefe954945..48cde344844d2792612d4a7b2c797d9ef6fec9f7 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -6184,6 +6184,15 @@ void RenderFrameImpl::BeginNavigation(
int cumulative_bindings = RenderProcess::current()->GetEnabledBindings();
bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) ||
(cumulative_bindings & kWebUIBindingsPolicyMask);
+
+ if (!should_fork) {
+ // Give the embedder a chance.
+ bool is_initial_navigation = render_view_->history_list_length_ == 0;
+ should_fork = GetContentClient()->renderer()->ShouldFork(
+ frame_, url, info->url_request.HttpMethod().Utf8(),
+ is_initial_navigation, false /* is_redirect */);
+ }
+
if (should_fork) {
OpenURL(std::move(info));
return; // Suppress the load here.
diff --git a/content/renderer/render_view_browsertest.cc b/content/renderer/render_view_browsertest.cc
index b8c9f30a3492696bf3f2eb1996e54f09b8ef32a3..913eadc2b3faf21ca579ca094a0e90ecade246c7 100644
index 0843c01c32df484b55317f0b9332a209227d2a30..654659900e5db2a63dbc1ce961ff7ffba6ee5a6e 100644
--- a/content/renderer/render_view_browsertest.cc
+++ b/content/renderer/render_view_browsertest.cc
@@ -989,6 +989,73 @@ TEST_F(RenderViewImplTest, BeginNavigationForWebUI) {

View File

@@ -6,10 +6,10 @@ Subject: scroll_bounce_flag.patch
Patch to make scrollBounce option work.
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 9387fb21f08f9beb3c529216a879291785eb5aaf..4319f7fe502eb07c6258eb0284d63ba9be441115 100644
index faaa4cc2b07bf53e78a8401bf4ca10e7bdf4d340..9b6c0beeb1c0d109949a44a5117e1c3ce9513a02 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1539,7 +1539,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
@@ -1330,7 +1330,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {
}
bool RenderThreadImpl::IsElasticOverscrollEnabled() {

View File

@@ -6,10 +6,10 @@ Subject: ssl_security_state_tab_helper.patch
Allows populating security tab info for devtools in Electron.
diff --git a/chrome/browser/ssl/security_state_tab_helper.cc b/chrome/browser/ssl/security_state_tab_helper.cc
index bc60f256d9d1a07d04a50ad245a5de6490f5091b..e29f4e910349440cd388227d36bf303c885a651d 100644
index b9baf3cc836e04f3898b4f03b3bbf339e79ee3fc..9a7414a7323daa82b28b2894f455542551d60eac 100644
--- a/chrome/browser/ssl/security_state_tab_helper.cc
+++ b/chrome/browser/ssl/security_state_tab_helper.cc
@@ -13,21 +13,25 @@
@@ -13,22 +13,26 @@
#include "base/strings/pattern.h"
#include "base/strings/string_util.h"
#include "build/build_config.h"
@@ -19,6 +19,7 @@ index bc60f256d9d1a07d04a50ad245a5de6490f5091b..e29f4e910349440cd388227d36bf303c
#include "chrome/browser/reputation/reputation_web_contents_observer.h"
#include "chrome/browser/safe_browsing/safe_browsing_service.h"
#include "chrome/browser/safe_browsing/ui_manager.h"
#include "chrome/browser/ssl/known_interception_disclosure_infobar_delegate.h"
+#endif
#include "chrome/browser/ssl/tls_deprecation_config.h"
#include "chrome/common/chrome_features.h"
@@ -34,9 +35,9 @@ index bc60f256d9d1a07d04a50ad245a5de6490f5091b..e29f4e910349440cd388227d36bf303c
+#endif
+#include "components/prefs/pref_service.h"
#include "components/security_state/content/content_utils.h"
#include "components/security_state/core/security_state_pref_names.h"
#include "content/public/browser/browser_context.h"
#include "content/public/browser/navigation_entry.h"
@@ -50,7 +54,7 @@
@@ -52,7 +56,7 @@
#include "chrome/browser/chromeos/policy/policy_cert_service_factory.h"
#endif // defined(OS_CHROMEOS)
@@ -45,7 +46,7 @@ index bc60f256d9d1a07d04a50ad245a5de6490f5091b..e29f4e910349440cd388227d36bf303c
#include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
#endif
@@ -94,9 +98,12 @@ bool IsLegacyTLS(GURL url, int connection_status) {
@@ -96,9 +100,12 @@ bool IsLegacyTLS(GURL url, int connection_status) {
// default we treat TLS < 1.2 as Legacy, unless the "SSLVersionMin" policy is
// set.
std::string ssl_version_min_str = switches::kSSLVersionTLSv12;
@@ -61,7 +62,7 @@ index bc60f256d9d1a07d04a50ad245a5de6490f5091b..e29f4e910349440cd388227d36bf303c
}
// Convert the pref string to an SSLVersion, if it is valid. Otherwise use the
@@ -113,8 +120,9 @@ bool IsLegacyTLS(GURL url, int connection_status) {
@@ -115,8 +122,9 @@ bool IsLegacyTLS(GURL url, int connection_status) {
} // namespace
@@ -72,7 +73,7 @@ index bc60f256d9d1a07d04a50ad245a5de6490f5091b..e29f4e910349440cd388227d36bf303c
SecurityStateTabHelper::SecurityStateTabHelper(
content::WebContents* web_contents)
@@ -158,6 +166,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() {
@@ -160,6 +168,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() {
// information is still being initialized, thus no need to check for that.
state->malicious_content_status = GetMaliciousContentStatus();
@@ -80,15 +81,26 @@ index bc60f256d9d1a07d04a50ad245a5de6490f5091b..e29f4e910349440cd388227d36bf303c
ReputationWebContentsObserver* reputation_web_contents_observer =
ReputationWebContentsObserver::FromWebContents(web_contents());
state->safety_tip_info =
@@ -166,6 +175,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() {
->GetSafetyTipInfoForVisibleNavigation()
: security_state::SafetyTipInfo(
{security_state::SafetyTipStatus::kUnknown, GURL()});
@@ -177,6 +186,7 @@ SecurityStateTabHelper::GetVisibleSecurityState() {
security_state::prefs::kStricterMixedContentTreatmentEnabled)) {
state->should_suppress_mixed_content_warning = true;
}
+#endif
return state;
}
@@ -227,8 +237,10 @@ void SecurityStateTabHelper::DidFinishNavigation(
UMA_HISTOGRAM_BOOLEAN("interstitial.ssl.visited_site_after_warning", true);
}
@@ -237,6 +247,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
+#if 0
MaybeShowKnownInterceptionDisclosureDialog(
web_contents(), visible_security_state->cert_status);
+#endif
}
void SecurityStateTabHelper::DidChangeVisibleSecurityState() {
@@ -252,6 +264,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
web_contents()->GetController().GetVisibleEntry();
if (!entry)
return security_state::MALICIOUS_CONTENT_STATUS_NONE;
@@ -96,7 +108,7 @@ index bc60f256d9d1a07d04a50ad245a5de6490f5091b..e29f4e910349440cd388227d36bf303c
safe_browsing::SafeBrowsingService* sb_service =
g_browser_process->safe_browsing_service();
if (!sb_service)
@@ -319,6 +330,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
@@ -334,6 +347,7 @@ SecurityStateTabHelper::GetMaliciousContentStatus() const {
break;
}
}

View File

@@ -22,10 +22,10 @@ However, the patch would need to be reviewed by the security team, as it
does touch a security-sensitive class.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 70e105df714f0dda581b442fd9a54b7241815430..71e6b162a8e56e63731b61c171c20d134e7e8b47 100644
index 3ff0d4050a9f6b960df5e02554217abbd350d817..89a77a7c263eccbf4d6dd29bbfd7924647bd5f2e 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -411,6 +411,11 @@ class RendererSandboxedProcessLauncherDelegate
@@ -413,6 +413,11 @@ class RendererSandboxedProcessLauncherDelegate
{
}
@@ -37,7 +37,7 @@ index 70e105df714f0dda581b442fd9a54b7241815430..71e6b162a8e56e63731b61c171c20d13
~RendererSandboxedProcessLauncherDelegate() override {}
#if defined(OS_WIN)
@@ -432,6 +437,9 @@ class RendererSandboxedProcessLauncherDelegate
@@ -434,6 +439,9 @@ class RendererSandboxedProcessLauncherDelegate
#if BUILDFLAG(USE_ZYGOTE_HANDLE)
service_manager::ZygoteHandle GetZygote() override {
@@ -47,8 +47,8 @@ index 70e105df714f0dda581b442fd9a54b7241815430..71e6b162a8e56e63731b61c171c20d13
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();
base::CommandLine::StringType renderer_prefix =
@@ -446,10 +454,13 @@ class RendererSandboxedProcessLauncherDelegate
return service_manager::SANDBOX_TYPE_RENDERER;
@@ -448,10 +456,13 @@ class RendererSandboxedProcessLauncherDelegate
return service_manager::SandboxType::kRenderer;
}
-#if defined(OS_WIN)
@@ -62,7 +62,7 @@ index 70e105df714f0dda581b442fd9a54b7241815430..71e6b162a8e56e63731b61c171c20d13
};
const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey";
@@ -1705,11 +1716,18 @@ bool RenderProcessHostImpl::Init() {
@@ -1727,11 +1738,18 @@ bool RenderProcessHostImpl::Init() {
cmd_line->PrependWrapper(renderer_prefix);
AppendRendererCommandLine(cmd_line.get());
@@ -80,5 +80,5 @@ index 70e105df714f0dda581b442fd9a54b7241815430..71e6b162a8e56e63731b61c171c20d13
- std::make_unique<RendererSandboxedProcessLauncherDelegate>(),
+ std::move(delegate),
std::move(cmd_line), GetID(), this, std::move(mojo_invitation_),
base::BindRepeating(&RenderProcessHostImpl::OnMojoError, id_));
channel_->Pause();
base::BindRepeating(&RenderProcessHostImpl::OnMojoError, id_),
GetV8SnapshotFilesToPreload());

View File

@@ -6,10 +6,10 @@ Subject: unsandboxed_ppapi_processes_skip_zygote.patch
Unsandboxed ppapi processes should skip zygote.
diff --git a/content/browser/ppapi_plugin_process_host.cc b/content/browser/ppapi_plugin_process_host.cc
index b906149ca57ea427d04752565cc21dc86728a72a..8cff1826d89d6e128d40ffb748a5f2ebf9c270e0 100644
index 620bd686edb8d623f790909db745f16eba507a1a..6ca4cabbdd451b5ef4cd9ee30d3160e4d27c9030 100644
--- a/content/browser/ppapi_plugin_process_host.cc
+++ b/content/browser/ppapi_plugin_process_host.cc
@@ -124,6 +124,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate
@@ -123,6 +123,9 @@ class PpapiPluginSandboxedProcessLauncherDelegate
service_manager::ZygoteHandle GetZygote() override {
const base::CommandLine& browser_command_line =
*base::CommandLine::ForCurrentProcess();

View File

@@ -3,12 +3,16 @@ From: Anonymous <anonymous@electronjs.org>
Date: Thu, 20 Sep 2018 17:46:53 -0700
Subject: web_contents.patch
This allows overriding the RenderViewHostDelegateView of a WebContents, which
is needed for OSR.
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 5a0b39b50481123fb6b37043a2bb8f002bc754ca..c13511e26189e68376e29f38c4ae2e1cc8fd3c57 100644
index 565b430d05c7188edf08df6bb334d9f865f11e65..14827b17504ead746ce2f9fce82f2e9530a824e4 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2124,6 +2124,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2030,6 +2030,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
@@ -21,78 +25,16 @@ index 5a0b39b50481123fb6b37043a2bb8f002bc754ca..c13511e26189e68376e29f38c4ae2e1c
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -2139,6 +2145,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
&render_view_host_delegate_view_);
}
@@ -2040,6 +2046,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
view_.reset(CreateWebContentsView(this, delegate,
&render_view_host_delegate_view_));
}
+ } // !view_
CHECK(render_view_host_delegate_view_);
CHECK(view_.get());
diff --git a/content/browser/web_contents/web_contents_view_guest.cc b/content/browser/web_contents/web_contents_view_guest.cc
index c45581fd22b7ba28b76bdebfffdc872b820798c8..f22ac0e611cc79aa1bc7f85836d69e3a8e326a6e 100644
--- a/content/browser/web_contents/web_contents_view_guest.cc
+++ b/content/browser/web_contents/web_contents_view_guest.cc
@@ -68,19 +68,27 @@ gfx::NativeWindow WebContentsViewGuest::GetTopLevelNativeWindow() const {
void WebContentsViewGuest::OnGuestAttached(WebContentsView* parent_view) {
#if defined(USE_AURA)
+ if (!platform_view_->GetNativeView())
+ return;
// In aura, ScreenPositionClient doesn't work properly if we do
// not have the native view associated with this WebContentsViewGuest in the
// view hierarchy. We add this view as embedder's child here.
// This would go in WebContentsViewGuest::CreateView, but that is too early to
// access embedder_web_contents(). Therefore, we do it here.
- parent_view->GetNativeView()->AddChild(platform_view_->GetNativeView());
+ if (parent_view->GetNativeView() != platform_view_->GetNativeView()) {
+ parent_view->GetNativeView()->AddChild(platform_view_->GetNativeView());
+ }
#endif // defined(USE_AURA)
}
void WebContentsViewGuest::OnGuestDetached(WebContentsView* old_parent_view) {
#if defined(USE_AURA)
- old_parent_view->GetNativeView()->RemoveChild(
- platform_view_->GetNativeView());
+ if (!platform_view_->GetNativeView())
+ return;
+ if (old_parent_view->GetNativeView() != platform_view_->GetNativeView()) {
+ old_parent_view->GetNativeView()->RemoveChild(
+ platform_view_->GetNativeView());
+ }
#endif // defined(USE_AURA)
}
@@ -130,11 +138,22 @@ RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForWidget(
render_widget_host->GetView());
}
+ RenderWidgetHost* embedder_render_widget_host =
+ guest_->embedder_web_contents()->GetRenderViewHost()->GetWidget();
+ RenderWidgetHostViewBase* embedder_render_widget_host_view =
+ static_cast<RenderWidgetHostViewBase*>(
+ embedder_render_widget_host->GetView());
RenderWidgetHostViewBase* platform_widget =
- platform_view_->CreateViewForWidget(render_widget_host, true);
-
- return RenderWidgetHostViewGuest::Create(render_widget_host, guest_,
- platform_widget->GetWeakPtr());
+ embedder_render_widget_host_view->CreateViewForWidget(
+ render_widget_host,
+ embedder_render_widget_host,
+ platform_view_.get());
+ RenderWidgetHostViewGuest* guest_view = RenderWidgetHostViewGuest::Create(
+ render_widget_host, guest_, platform_widget->GetWeakPtr());
+ platform_widget->InitAsGuest(embedder_render_widget_host->GetView(),
+ guest_view);
+
+ return guest_view;
}
RenderWidgetHostViewBase* WebContentsViewGuest::CreateViewForChildWidget(
diff --git a/content/public/browser/web_contents.h b/content/public/browser/web_contents.h
index 075dd25454306b3f689cf58245ac448b25a64f93..750de66b8002ba66d0f2247d0075da1e51ac764c 100644
index ecee31b744ed0871a9f1052d5419075582a90baa..0ce547c74610e13f7f723da997fb0a9799c96efb 100644
--- a/content/public/browser/web_contents.h
+++ b/content/public/browser/web_contents.h
@@ -79,9 +79,12 @@ class BrowserPluginGuestDelegate;

View File

@@ -3,9 +3,12 @@ From: Anonymous <anonymous@electronjs.org>
Date: Thu, 20 Sep 2018 17:47:04 -0700
Subject: webview_cross_drag.patch
This allows dragging and dropping between <webview>s.
Originally landed in https://github.com/electron/libchromiumcontent/pull/267
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index d8f6e22f0cfc8d84adcb5291a27f8d928b37a812..392935bd098b9e1540ad9550001d066dfaa5def7 100644
index 75972bb7f6ccfe5cf7d1bd78e154f7835312fda1..5368aafddd91cc75075700c8f93e3d7ea8f6435b 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -796,6 +796,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
@@ -17,7 +20,7 @@ index d8f6e22f0cfc8d84adcb5291a27f8d928b37a812..392935bd098b9e1540ad9550001d066d
GetRenderViewHostID(web_contents_->GetRenderViewHost()) !=
drag_start_view_id_;
diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
index c4638ac6e86d6a816848cdbbdfa3e70d45086d90..18bd2fb8171568745549d490ee93887418890157 100644
index c09646513c3958e037385b98c6568e29986f9831..96d6d7633a487a5c62ab17735c016b7289b2e594 100644
--- a/content/browser/web_contents/web_drag_dest_mac.mm
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
@@ -336,6 +336,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {
@@ -25,6 +28,6 @@ index c4638ac6e86d6a816848cdbbdfa3e70d45086d90..18bd2fb8171568745549d490ee938874
- (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {
+ return YES;
return targetRWH->GetProcess()->GetID() == dragStartProcessID_ ||
GetRenderViewHostID(webContents_->GetRenderViewHost()) !=
dragStartViewID_;
return targetRWH->GetProcess()->GetID() == _dragStartProcessID ||
GetRenderViewHostID(_webContents->GetRenderViewHost()) !=
_dragStartViewID;

View File

@@ -3,12 +3,17 @@ From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu, 20 Sep 2018 17:47:12 -0700
Subject: worker_context_will_destroy.patch
This adds a hook for worker context destruction, which we use in Electron to
shutdown node integration in the worker if relevant.
An attempt to upstream this was made, but rejected:
https://chromium-review.googlesource.com/c/chromium/src/+/1954347
diff --git a/content/public/renderer/content_renderer_client.h b/content/public/renderer/content_renderer_client.h
index c1ed9f008b495d4afe05c21a81639383758b36d1..a05cef66facd477057fedb388e4000475bc76830 100644
index 6002ce70bb173f441f269ea2dc6e61716c424196..2c372d68dace9c546eae3bdbd4994ec261a6fa22 100644
--- a/content/public/renderer/content_renderer_client.h
+++ b/content/public/renderer/content_renderer_client.h
@@ -376,6 +376,11 @@ class CONTENT_EXPORT ContentRendererClient {
@@ -396,6 +396,11 @@ class CONTENT_EXPORT ContentRendererClient {
virtual void DidInitializeWorkerContextOnWorkerThread(
v8::Local<v8::Context> context) {}
@@ -21,10 +26,10 @@ index c1ed9f008b495d4afe05c21a81639383758b36d1..a05cef66facd477057fedb388e400047
// An empty URL is returned if the URL is not overriden.
virtual GURL OverrideFlashEmbedWithHTML(const GURL& url);
diff --git a/content/renderer/renderer_blink_platform_impl.cc b/content/renderer/renderer_blink_platform_impl.cc
index 9898cea44081bf3f0fac5065caebdfe8a9a1b0c3..f023a33bc08597d98996af81b448d09bf776876b 100644
index 17e84479f922cc0eca4ace413a1aea5fb87cb41c..a1fd4ca3d56476246c1a560bfbb7299f1134abf3 100644
--- a/content/renderer/renderer_blink_platform_impl.cc
+++ b/content/renderer/renderer_blink_platform_impl.cc
@@ -945,6 +945,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
@@ -883,6 +883,12 @@ void RendererBlinkPlatformImpl::WillStopWorkerThread() {
WorkerThreadRegistry::Instance()->WillStopCurrentWorkerThread();
}
@@ -38,10 +43,10 @@ index 9898cea44081bf3f0fac5065caebdfe8a9a1b0c3..f023a33bc08597d98996af81b448d09b
const v8::Local<v8::Context>& worker) {
GetContentClient()->renderer()->DidInitializeWorkerContextOnWorkerThread(
diff --git a/content/renderer/renderer_blink_platform_impl.h b/content/renderer/renderer_blink_platform_impl.h
index 583616a1277b42f342451653f1f52f16ecb746a2..51064da95f5b3e40d848b90ebe273008bda444cf 100644
index edbf232175e4555d4f810b6ef03c74f793e32bdf..1995663c3ee97c51a81de076c9a7fe05ba0e73fc 100644
--- a/content/renderer/renderer_blink_platform_impl.h
+++ b/content/renderer/renderer_blink_platform_impl.h
@@ -190,6 +190,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
@@ -181,6 +181,7 @@ class CONTENT_EXPORT RendererBlinkPlatformImpl : public BlinkPlatformImpl {
void DidStartWorkerThread() override;
void WillStopWorkerThread() override;
void WorkerContextCreated(const v8::Local<v8::Context>& worker) override;
@@ -50,10 +55,10 @@ index 583616a1277b42f342451653f1f52f16ecb746a2..51064da95f5b3e40d848b90ebe273008
const blink::WebString& header_name) override;
diff --git a/third_party/blink/public/platform/platform.h b/third_party/blink/public/platform/platform.h
index 7dd43714c3bf844c9b376e480d092f97431a9b7c..af1e2ede99d1c8e8abc1cc9a8229c4be3f513320 100644
index 915af795cbf3a1001e6deb572cf93913775237fe..e9f082fbe34022b165aeca1a37fc0f0fe5e6024a 100644
--- a/third_party/blink/public/platform/platform.h
+++ b/third_party/blink/public/platform/platform.h
@@ -654,6 +654,7 @@ class BLINK_PLATFORM_EXPORT Platform {
@@ -623,6 +623,7 @@ class BLINK_PLATFORM_EXPORT Platform {
virtual void DidStartWorkerThread() {}
virtual void WillStopWorkerThread() {}
virtual void WorkerContextCreated(const v8::Local<v8::Context>& worker) {}
@@ -62,10 +67,10 @@ index 7dd43714c3bf844c9b376e480d092f97431a9b7c..af1e2ede99d1c8e8abc1cc9a8229c4be
const WebSecurityOrigin& script_origin) {
return false;
diff --git a/third_party/blink/renderer/core/workers/worker_thread.cc b/third_party/blink/renderer/core/workers/worker_thread.cc
index d16b0ea72e4d0c0371bbb145c4f4c26b4d5c19e2..bd4af3ae2df62968aaf9001db8eda006a96d307b 100644
index e579547da621956c0dcee3c838318a8a9098ae9c..c1702a4d4e1649ffff611e840a217b81474d6e9c 100644
--- a/third_party/blink/renderer/core/workers/worker_thread.cc
+++ b/third_party/blink/renderer/core/workers/worker_thread.cc
@@ -680,6 +680,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
@@ -681,6 +681,12 @@ void WorkerThread::PrepareForShutdownOnWorkerThread() {
nested_runner_->QuitNow();
}

View File

@@ -3,12 +3,6 @@
"src/electron/patches/boringssl": "src/third_party/boringssl/src",
"src/electron/patches/breakpad": "src/third_party/breakpad/breakpad",
"src/electron/patches/perfetto": "src/third_party/perfetto",
"src/electron/patches/skia": "src/third_party/skia",
"src/electron/patches/v8": "src/v8",
"src/electron/patches/node": "src/third_party/electron_node"

View File

@@ -19,21 +19,14 @@ fixme_remove_async_id_assertion_check.patch
fixme_comment_trace_event_macro.patch
fix_key_gen_apis_are_not_available_in_boringssl.patch
fix_do_not_define_debugoptions_s_constructors_in_header.patch
src_disable_node_use_v8_platform_in_node_options.patch
build_modify_js2c_py_to_allow_injection_of_original-fs_and_custom_embedder_js.patch
refactor_allow_embedder_overriding_of_internal_fs_calls.patch
chore_prevent_warn_non_context-aware_native_modules_being_loaded.patch
chore_allow_the_node_entrypoint_to_be_a_builtin_module.patch
inherit_electron_crashpad_pipe_name_in_child_process.patch
chore_read_nobrowserglobals_from_global_not_process.patch
chore_split_createenvironment_into_createenvironment_and.patch
chore_handle_default_configuration_not_being_set_in_the_electron_env.patch
fsevents-stop-using-fsevents-to-watch-files.patch
fsevents-regression-in-watching.patch
build_bring_back_node_with_ltcg_configuration.patch
revert_tls_add_option_to_override_signature_algorithms.patch
revert_crypto_add_oaeplabel_option.patch
fix_windows_compilation_on_libuv_setsockopt.patch
fix_don_t_use_node-controlled_preparestacktrace.patch
fix_remove_uses_of_node_use_v8_platform.patch
fix_call_initializecontextruntime_in_initializecontext.patch
refactor_transferrablemodule_is_deprecated_use_compiledwasmmodule.patch
enable_31_bit_smis_on_64bit_arch_and_ptr_compression.patch

View File

@@ -3,6 +3,7 @@ From: Jeremy Apthorp <nornagon@nornagon.net>
Date: Tue, 26 Feb 2019 17:07:45 -0800
Subject: build: add GN build files
This adds GN build files for Node, so we don't have to build with GYP.
diff --git a/BUILD.gn b/BUILD.gn
new file mode 100644
@@ -882,10 +883,10 @@ index 0000000000000000000000000000000000000000..f13b471d17128468bed06e66bd03a2ea
+}
diff --git a/filenames.json b/filenames.json
new file mode 100644
index 0000000000000000000000000000000000000000..bfe6555be5239c6d9cad59e8b845638d50f31ee3
index 0000000000000000000000000000000000000000..5eb839f45aca3ed73d69b43a34c438ce254a2c6b
--- /dev/null
+++ b/filenames.json
@@ -0,0 +1,447 @@
@@ -0,0 +1,448 @@
+// This file is automatically generated by generate_gn_filenames_json.py
+// DO NOT EDIT
+{
@@ -908,7 +909,6 @@ index 0000000000000000000000000000000000000000..bfe6555be5239c6d9cad59e8b845638d
+ "//v8/include/v8-internal.h",
+ "//v8/include/v8-platform.h",
+ "//v8/include/v8-profiler.h",
+ "//v8/include/v8-testing.h",
+ "//v8/include/v8-util.h",
+ "//v8/include/v8-value-serializer-version.h",
+ "//v8/include/v8-version-string.h",
@@ -1106,6 +1106,7 @@ index 0000000000000000000000000000000000000000..bfe6555be5239c6d9cad59e8b845638d
+ "lib/internal/repl/history.js",
+ "lib/internal/repl/utils.js",
+ "lib/internal/socket_list.js",
+ "lib/internal/source_map/prepare_stack_trace.js",
+ "lib/internal/source_map/source_map.js",
+ "lib/internal/source_map/source_map_cache.js",
+ "lib/internal/test/binding.js",
@@ -1139,6 +1140,7 @@ index 0000000000000000000000000000000000000000..bfe6555be5239c6d9cad59e8b845638d
+ "lib/internal/streams/state.js",
+ "lib/internal/streams/pipeline.js",
+ "lib/internal/streams/end-of-stream.js",
+ "lib/internal/streams/from.js",
+ "deps/v8/tools/splaytree.js",
+ "deps/v8/tools/codemap.js",
+ "deps/v8/tools/consarray.js",
@@ -1539,7 +1541,7 @@ index 0000000000000000000000000000000000000000..f3c5c798c0aefcb8cf9b1570a7b4817c
+ args = rebase_path(inputs + outputs, root_build_dir)
+}
diff --git a/src/node_version.h b/src/node_version.h
index a61a186edd3c92d6f0bd760a9990b5c8ed57e6fa..e4963fdfd9b93a6f50a4f1035f63e95432dd8d8e 100644
index b974af56853d28d2154f314f5ca9a38d19efc84c..57c846c81d511051cc56d3827609b12993e70240 100644
--- a/src/node_version.h
+++ b/src/node_version.h
@@ -89,7 +89,10 @@
@@ -1572,7 +1574,7 @@ index 0000000000000000000000000000000000000000..01f62d4ae6e3b9d539444e3dff069f00
+ main(sys.argv[1:])
diff --git a/tools/generate_gn_filenames_json.py b/tools/generate_gn_filenames_json.py
new file mode 100755
index 0000000000000000000000000000000000000000..41f0138dfa9f610de1f8267080fa15e8bd9e0325
index 0000000000000000000000000000000000000000..9be5ffae55057c4072599d17384735984851de5a
--- /dev/null
+++ b/tools/generate_gn_filenames_json.py
@@ -0,0 +1,63 @@
@@ -1628,8 +1630,8 @@ index 0000000000000000000000000000000000000000..41f0138dfa9f610de1f8267080fa15e8
+ def add_headers(files, dest_dir):
+ if 'src/node.h' in files:
+ files = [f for f in files if f.endswith('.h') and f != 'src/node_version.h']
+ elif any(f.startswith('deps/v8/') for f in files):
+ files = [f.replace('deps/v8/', '//v8/', 1) for f in files]
+ elif any(f.startswith('../../v8/') for f in files):
+ files = [f.replace('../../v8/', '//v8/', 1) for f in files]
+ hs = {'files': sorted(files), 'dest_dir': dest_dir}
+ out['headers'].append(hs)
+
@@ -1670,6 +1672,30 @@ index 0000000000000000000000000000000000000000..3088ae4bdf814ae255c9805ebd393b2e
+ raise Exception("Did not modify the NMV from nodes value, this value MUST differ from node")
+
+ out_file.writelines(new_contents)
diff --git a/tools/install.py b/tools/install.py
index 655802980a6ea94d1d4ca1dc63c8c8e905fbb83a..ab1a18a215cb7393310324c6dbcacc6655bae9ef 100755
--- a/tools/install.py
+++ b/tools/install.py
@@ -163,8 +163,8 @@ def files(action):
def headers(action):
def ignore_inspector_headers(files_arg, dest):
inspector_headers = [
- 'deps/v8/include/v8-inspector.h',
- 'deps/v8/include/v8-inspector-protocol.h'
+ '../../v8/include/v8-inspector.h',
+ '../../v8/include/v8-inspector-protocol.h'
]
files_arg = [name for name in files_arg if name not in inspector_headers]
action(files_arg, dest)
@@ -186,7 +186,7 @@ def headers(action):
if sys.platform.startswith('aix'):
action(['out/Release/node.exp'], 'include/node/')
- subdir_files('deps/v8/include', 'include/node/', ignore_inspector_headers)
+ subdir_files('../../v8/include', 'include/node/', ignore_inspector_headers)
if 'false' == variables.get('node_shared_libuv'):
subdir_files('deps/uv/include', 'include/node/', action)
diff --git a/tools/js2c.py b/tools/js2c.py
index 1346b2a87046d3472577875c887b3b44a63280ed..752344d68c3f63b4c5e491b33d4576ed48f8b74f 100755
--- a/tools/js2c.py

View File

@@ -38,7 +38,7 @@ index fabaea75686161f488a03349e07049a513b98fad..5a6b01dc12fb77d5f8c26a1153ead2a1
bool Exists(const char* id);
diff --git a/tools/js2c.py b/tools/js2c.py
index 7b3e90af88b873c32f8ed51712f7dfdff3c1c706..586d0f72dcb4215ce73c23b401bce7238ed5bb0d 100755
index 752344d68c3f63b4c5e491b33d4576ed48f8b74f..a6f0805048e3c3f4dd81ce6e90b684c48e52b67c 100755
--- a/tools/js2c.py
+++ b/tools/js2c.py
@@ -187,13 +187,15 @@ namespace native_module {{
@@ -79,7 +79,7 @@ index 7b3e90af88b873c32f8ed51712f7dfdff3c1c706..586d0f72dcb4215ce73c23b401bce723
if split[0] == 'deps':
split = ['internal'] + split
else: # `lib/**/*.js` so drop the 'lib' part
@@ -273,9 +275,9 @@ def NormalizeFileName(filename):
@@ -274,9 +276,9 @@ def NormalizeFileName(filename):
return os.path.splitext(filename)[0]
@@ -91,7 +91,7 @@ index 7b3e90af88b873c32f8ed51712f7dfdff3c1c706..586d0f72dcb4215ce73c23b401bce723
# Build source code lines
definitions = []
@@ -283,14 +285,26 @@ def JS2C(source_files, target):
@@ -284,14 +286,26 @@ def JS2C(source_files, target):
for filename in source_files['.js']:
AddModule(filename, consts, macros, definitions, initializers)
@@ -122,7 +122,7 @@ index 7b3e90af88b873c32f8ed51712f7dfdff3c1c706..586d0f72dcb4215ce73c23b401bce723
write_if_chaged(out, target)
@@ -343,17 +357,21 @@ def main():
@@ -344,17 +358,21 @@ def main():
)
parser.add_argument('--target', help='output file')
parser.add_argument('--verbose', action='store_true', help='output file')

View File

@@ -6,7 +6,7 @@ Subject: Call process.log from fallback stream on Windows
(cherry picked from commit d31e629b4f2daf3500a485caab2b2990a41e3ad4)
diff --git a/lib/internal/process/stdio.js b/lib/internal/process/stdio.js
index 61892165999d92704e49d0748c5e1d3d4d9582b7..0ea488c944b8fc8e21064476180c2b417c6e1125 100644
index 08781547c489526834609861c5a906ef5183936b..e60ad6b0d4c634a8b0990da6ca090ea48715b830 100644
--- a/lib/internal/process/stdio.js
+++ b/lib/internal/process/stdio.js
@@ -192,6 +192,11 @@ function createWritableStdioStream(fd) {

Some files were not shown because too many files have changed in this diff Show More