Compare commits

..

82 Commits

Author SHA1 Message Date
Electron Bot
09e33b3420 Bump v11.0.0-beta.1 2020-08-26 10:51:08 -07:00
Jeremy Rose
2c9e79c8d5 test: add tests for shell.moveItemToTrash (#25113) 2020-08-26 09:34:29 -07:00
Electron Bot
fdb36eb5b5 Bump v11.0.0-nightly.20200826 2020-08-26 07:32:46 -07:00
Shelley Vohr
be8db589eb fix: mitigate use of private macOS font API (#25117) 2020-08-25 21:13:42 -07:00
Shelley Vohr
c8a0b2b71d fix: prevent crash if BrowserView webContents was destroyed (#25112) 2020-08-25 20:04:13 -07:00
leonllrmc
c97f8109c2 chore: update import for use new ECMA features (#24987) 2020-08-25 09:23:44 -07:00
Electron Bot
d5ab63b1ea Bump v11.0.0-nightly.20200825 2020-08-25 07:31:28 -07:00
Keeley Hammond
7704954505 docs: add restricted header info to ClientRequest docs (#25075)
* docs: add restricted header info to docs

* docs: clarify header language

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2020-08-25 20:29:58 +09:00
Jeremy Rose
35237d3c30 fix: [linux] open directories with dbus FileManager (#25087) 2020-08-24 13:54:50 -07:00
Cheng Zhao
cd3fadc2fb fix: save normal window bounds when maximizing (#25051)
* fix: save normal window bounds when maximizing

* fix: prevent maximize being emitted twice
2020-08-24 13:32:08 -07:00
Cheng Zhao
5ed3460751 fix: register for connected standby changes (#25076) 2020-08-24 13:09:36 -07:00
Samuel Attard
8baa9deccd build: update to typescript 4 (#25091) 2020-08-24 11:23:25 -07:00
Shelley Vohr
0efcaec4d6 fix: global shortcut media keys working with accessibility (#24145)
* fix: global shortcut media keys

* update patches

Co-authored-by: Electron Bot <anonymous@electronjs.org>
2020-08-24 10:41:06 -07:00
John Kleinschmidt
d8fe7af703 ci: fix WOA failing tests (#25018)
* tests: fix failing WOA tests

tests: fix startDrag for WOA

tests: fix early-in-memory-session-create crash test on WOA

ci: cleanup user app data directories on WOA

* tests: disable nativeImage.createFromBuffer tests on WOA

* disable failing nativeImage.createFromPath on WOA

* disable another nativeImage test for WOA
2020-08-24 12:58:55 -04:00
George Xu
beaf60de0a feat: add nativeImage.createThumbnailFromPath API (#24802)
* initial commit, mac implementation

* add documentation

* convert createThumbnailFromPath to async function

* windows impl protoype

* add tests

* added test

* fix

* fix test

* clean up

* update docs

* cleaning up code

* fix test

* retrigger CI

* retrigger CI

* refactor from app to native_image

* windows build

* lint

* lint

* add smart pointers, fix test

* change tests and update docs

* fix test, remove nolint

* add renderer-main process routing to fix tests

* lint

* thanks sam

* thanks sam
2020-08-24 09:36:13 -07:00
Sofia Nguy
b403e64ef2 docs: update currently supported versions for 10.0.0 release (#25027) 2020-08-24 11:21:41 -05:00
Sofia Nguy
59670e8d8c docs: update 11.0 stable release date (#25073) 2020-08-24 11:21:17 -05:00
Shelley Vohr
024ea32313 feat: make window visual effect state customizable (#25083) 2020-08-24 11:44:48 -04:00
Electron Bot
c0440a35f2 Bump v11.0.0-nightly.20200824 2020-08-24 07:32:16 -07:00
Shelley Vohr
bea6c9e4e1 fix: reply notifs sometimes destroyed too early (#25086)
* fix: reply notifs sometimes destroyed too early

* Fix windows build
2020-08-23 21:27:46 -07:00
Alfred Xing
a23c66e4e1 feat: allow monospaced font styles to be specified for macOS tray titles (#25059)
* feat: add optional font type to macOS tray title

* test: add tests for tray font type

* docs: update API reference for Tray setTitle

* review: change API to use an options object

* review: fix string enum in docs

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

* review: return after throwing errors

* review: don't need thrower anymore now that we have args

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2020-08-23 14:39:29 -07:00
Electron Bot
13751c815e Bump v11.0.0-nightly.20200822 2020-08-22 16:45:58 -07:00
Samuel Attard
1646f938f3 Revert "refactor: use aws-sdk-js instead of boto (#24863)"
This reverts commit a3581aa992.
2020-08-22 16:42:45 -07:00
Samuel Attard
cd4c4e9f04 Revert "Bump v11.0.0-nightly.20200822"
This reverts commit bda5ec519b.
2020-08-22 16:42:41 -07:00
Electron Bot
bda5ec519b Bump v11.0.0-nightly.20200822 2020-08-22 11:29:05 -07:00
Samuel Attard
3f4c867599 build: remove mksnapshot token file 2020-08-22 02:23:14 -07:00
Samuel Attard
3e2d959817 build: fix electron_mksnapshot_zip_done check 2020-08-22 01:17:43 -07:00
Electron Bot
02f5ffbaac Bump v11.0.0-nightly.20200821 2020-08-21 20:34:09 -07:00
Samuel Attard
e2a5908665 Revert "Bump v11.0.0-nightly.20200821"
This reverts commit 1709fed85e
2020-08-21 20:32:22 -07:00
Samuel Attard
5df6c5ecce build: more space on arm64 builds, running out of ideas here (#25043)
* build: more space on arm64 builds, running out of ideas here

* build: well this is kinda nuts but off we go

* chore: rollback thingy

* chore: build snapshot for realz

* chore: do not delete hunspell

* build: use the new magic extra-disk-space circle image

* build: remove existing file, it is not a tree
2020-08-21 20:30:04 -07:00
Samuel Attard
b1e2185c5e refactor: wire will-navigate up to a navigation throttle instead of OpenURL (#25065)
* refactor: wire will-navigate up to a navigation throttle instead of OpenURL

* spec: add test for x-site _top navigation
2020-08-21 12:34:09 -07:00
shur
a17e97c3b2 feat: expose currencyCode on Product struct in IAP module (#25058)
Co-authored-by: Shur Singh <ssingh@evernote.com>
2020-08-21 10:41:40 -07:00
Jeremy Rose
5d3301769b feat: record v8 cpu samples in the main process (#24819) 2020-08-21 09:25:30 -07:00
Electron Bot
1709fed85e Bump v11.0.0-nightly.20200821 2020-08-21 07:31:43 -07:00
Samuel Attard
26f28b6ae4 fix: add handling for non-absolute extension paths (#25068) 2020-08-20 20:47:10 -07:00
Charlie Hess
42409d860b fix: Resolve bookmarks without mounting network drives (#24708) 2020-08-20 15:01:08 -07:00
Charles Kerr
d9a1c453ab fix: revert 6ecf729 to fix Linux titlebar dark mode (#25055)
Fixes #24741
2020-08-20 16:53:06 -04:00
Electron Bot
2d502b8ac6 Bump v11.0.0-nightly.20200820 2020-08-20 07:31:57 -07:00
Shelley Vohr
9631eafa1f fix: DCHECK on print job cancellation (#25031) 2020-08-20 15:28:24 +09:00
Shelley Vohr
53668445ba feat: reinvigorate visibleOnFullscreen option (#24956) 2020-08-19 13:31:25 -07:00
Cheng Zhao
52d7afa4ef fix: calculate frame when setting window placement (#25014) 2020-08-19 12:34:15 -07:00
Jeremy Rose
9021843850 fix: enable TLS renegotiation in node (#25022) 2020-08-19 11:18:16 -07:00
Electron Bot
3313e00578 Bump v11.0.0-nightly.20200819 2020-08-19 07:32:52 -07:00
Eryk Rakowski
9e53112ee1 fix(extensions): enable WebSQL in background pages (#24798)
* fix(extensions): enable WebSQL in background pages

* fix: apply suggestions

* fix: remove duplicate include

* fix: remove trailing spaces
2020-08-19 09:41:47 +09:00
Shelley Vohr
ff24caf798 test: use custom partition for sw tests (#24999) 2020-08-18 09:31:24 -07:00
Electron Bot
a1eceee48f Bump v11.0.0-nightly.20200818 2020-08-18 07:32:07 -07:00
GitHubPang
5c5e006e46 docs: fix typos (#24982)
* docs: sync table of content from pull-requests.md to CONTRIBUTING.md

This also fixes some incorrect / dead links.

* docs: fix a bunch of typos
2020-08-18 16:55:16 +09:00
Vlad Hashimoto
b55e8dc578 docs: update default value for enableRemoteModule in BrowserWindow (#24955) 2020-08-18 16:54:47 +09:00
Samuel Attard
29d9c02ab9 build: increase available space on mac arm64 vm (#25008) 2020-08-17 22:06:59 -07:00
Tierney Cyren
303fcc69be fix(docs): update outdated ref to NSP (#24925)
removes an outdated reference to Node Security Project, which was acquired by npm some time ago. The new workflow for the same process (now the npm advisories page) has been added.
2020-08-17 19:29:45 -07:00
Samuel Attard
ab6769d7f8 build: upload windows breakpad symbols (#25000) 2020-08-17 14:52:08 -07:00
Jeremy Rose
bac2f46ba9 fix: browser contexts live forever (#24964) 2020-08-17 13:21:53 -07:00
Shelley Vohr
befbbc27d8 fix: pdf download not working (#24946) 2020-08-17 08:25:20 -07:00
Electron Bot
db13dcb8d2 Bump v11.0.0-nightly.20200817 2020-08-17 07:31:30 -07:00
Electron Bot
53033a66b1 chore: bump chromium to 7d4ac110045b7647fa8a81f5f0709 (master) (#24970)
* chore: bump chromium in DEPS to 760c905ccca34d8ed83c54f6a42c42a375792a6b

* chore: update patches

- Introduce WebContentsObserverList to encapsulate common behaviour
  https://chromium-review.googlesource.com/c/chromium/src/+/2343269
- DumpAccTree mac testing: refactor tree formatter logic to make it
suitable for nested attribute calls
  https://chromium-review.googlesource.com/c/chromium/src/+/2274545
- Fix FontPlatformDataMacTest.VariableOpticalSizingThreshold for Big Sur
  https://chromium-review.googlesource.com/c/chromium/src/+/2351299

* chore: bump chromium in DEPS to b04584161e07d4ac110045b7647fa8a81f5f0709

* chore: update patches

* [printing] Move printing::MarginType to //printing/mojom/print.mojom

https://chromium-review.googlesource.com/c/chromium/src/+/2341222

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2020-08-14 18:51:28 -07:00
Electron Bot
4ef827c13c Bump v11.0.0-nightly.20200814 2020-08-14 07:31:18 -07:00
Jeremy Rose
a3581aa992 refactor: use aws-sdk-js instead of boto (#24863)
* refactor: use js instead of boto for s3put

* replace merge-electron-checksums.py with js, remove boto

* fix auth

* actually pass the env to execute()
2020-08-13 13:25:40 -04:00
Electron Bot
627467d08a Bump v11.0.0-nightly.20200813 2020-08-13 07:31:18 -07:00
Tierney Cyren
8f30333322 docs: add Notification section to SECURITY.md (#24926)
adds a new section pointing to a relevant doc in Governance that defines how we notify end-users of security issues.
2020-08-12 17:31:29 -07:00
Electron Bot
8798571a77 chore: bump chromium to 0e4ca9c0a63d7a39bd910997ad4c6 (master) (#24687)
* chore: bump chromium in DEPS to 1f1c4d91f6eaa4a033ec8f499d63a0717f79a42a

* viz: Do not apply white level scaling for RGBA fp16 HDR video

https://chromium-review.googlesource.com/c/chromium/src/+/2296006

* Move WebPreferences to WebContents

https://chromium-review.googlesource.com/c/chromium/src/+/2263635

* Fix missing WeakPtr check in PreconnectManager

https://chromium-review.googlesource.com/c/chromium/src/+/2309029

* Fixup swiftshader roll revision

* Update patch indices

* Move WebDeviceEmulationParams into common.

https://chromium-review.googlesource.com/c/chromium/src/+/2303356

* Move EnableDisableDeviceEmulation to blink mojom messages

https://chromium-review.googlesource.com/c/chromium/src/+/2303367

* PDF Viewer: Remove flag for two-up view

https://chromium-review.googlesource.com/c/chromium/src/+/2311130

* Add mojom definition for DeviceEmulationParams.

https://chromium-review.googlesource.com/c/chromium/src/+/2303491

* Remove ServiceWorkerContextWatcher from PaymentAppInstaller

https://chromium-review.googlesource.com/c/chromium/src/+/2291186

* Loader: Move transferrable_url_loader.mojom into blink's mojom directory

https://chromium-review.googlesource.com/c/chromium/src/+/2306123

* chore: bump chromium in DEPS to 4974f436479739025a90ebc2cc2e36d67ee1ac46

* mac: Work around Xcode 12b3 SDK bug

https://chromium-review.googlesource.com/c/chromium/src/+/2315078

* Reland Update core items for macOS Big Sur.

https://chromium-review.googlesource.com/c/chromium/src/+/2315162

* Update Swiftshader revision

* mac/arm64: When cross-building the snapshot, use page size of the target ISA instead of the host.

https://chromium-review.googlesource.com/c/v8/v8/+/2310575

* Update patch indices

* Rename {,Non}ClientView::CanClose() to OnWindowCloseRequested()

https://chromium-review.googlesource.com/c/chromium/src/+/2247838

* chore: bump chromium in DEPS to e9465d70d1dea539400f0fddad43358ea3c31d71

* chore: bump chromium in DEPS to bd5b71c5f20288eb26068a39ae6e0579566a51c5

* chore: bump chromium in DEPS to 786ee543048bd07d07c5ac50b7dbbdd6bdd8dcce

* chore: bump chromium in DEPS to 34eb6ecbf2c5894b648900bf771a2a29de204798

* chore: bump chromium in DEPS to 567ff038d68e3adb8116a01eec863cdf34d775f5

* chore: bump chromium in DEPS to 340b45c8d4ceb2dd61969fc34e1928d3c46db48c

* chore: update patches

* chore: base::DeleteFile with two params is removed

Should use base::DeleteFile and base::DeletePathRecursively when
appropriate

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2313376

* chore: add patch for NodePlatform::PostJob impl

* chore: update patches

* chore: extension file access is now instrumented

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2209995

* chore: implement SetWindowFrameInScreen in OSR RWHV

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2321409

* chore: NotifyUserActivation requires a type now

This is just for a histogram thing and therefore it does not matter what
we pass in

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2281303

* chore: update patches

* chore: bump chromium in DEPS to cd570e6dd3dcb84463ac252b04e92ceb02d8400c

* chore: update patches

* chore: bump chromium in DEPS to 0187908a31866992b90c59719ac1d016328f6ee0

* chore: bump chromium in DEPS to 3c9df38c508f3dba26a75248beed4882ddfb98e9

* chore: bump chromium in DEPS to 1a47d3b9cee710bd3c958c4f2d8b205710df9d50

* chore: bump chromium in DEPS to baac93040d96abdab72d46dd034c60f86e108702

* chore: bump chromium in DEPS to 13836145f97299e636491de38064b78861c4fb2e

* update patches

* change OS_MACOSX -> OS_MAC

Refs: https://bugs.chromium.org/p/chromium/issues/detail?id=1105907

* patch: add header for ToExecutionContext in WebMessagePortConverter

* chore: bump chromium in DEPS to 91ab9b6ac5d04dc034a03ad847fbfa8261328c2b

* update patches

* NeedToFireBeforeUnloadOrUnload -> NeedToFireBeforeUnloadOrUnloadEvents

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2288711

* chore: bump chromium in DEPS to 290deb11f0e30cb1382fd8f8793d340560283c23

* update patches

* add dragdrop header for autofill popup

* int -> x11::Time

* patch out accessibility private API use

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2330812

* remove usage of XEvent

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2317767

* trigger recalculation of WebPreferences before renderer initialization

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2263635

* chore: bump chromium in DEPS to 6bdb484583b99c96ef3388d0c2184326581b2d5a

* chore: bump chromium in DEPS to 1eb2a79cde04fd5c8ae51b4d813e6521635269e5

* chore: bump chromium in DEPS to 3dc8e3c0f400e4ca9c0a63d7a39bd910997ad4c6

* chore: update patches

* fixup! trigger recalculation of WebPreferences before renderer initialization

* views: Make MenuButton and RadioButton default constructible

https://chromium-review.googlesource.com/c/chromium/src/+/2339586

* chore: fix code style

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
Co-authored-by: Andy Locascio <andy@slack-corp.com>
Co-authored-by: deepak1556 <hop2deep@gmail.com>
2020-08-12 11:33:58 -07:00
Electron Bot
3d2afa45c3 Bump v11.0.0-nightly.20200812 2020-08-12 07:32:30 -07:00
Electron Bot
4080b04911 Bump v11.0.0-nightly.20200811 2020-08-11 07:37:50 -07:00
Electron Bot
b09c828dd3 Revert "Bump v11.0.0-nightly.20200811"
This reverts commit f3363bde26.
2020-08-11 07:36:50 -07:00
Electron Bot
f3363bde26 Bump v11.0.0-nightly.20200811 2020-08-11 07:36:24 -07:00
Electron Bot
f136bf406f Revert "Bump v11.0.0-nightly.20200811"
This reverts commit 77ee3da77c.
2020-08-11 07:35:30 -07:00
Electron Bot
77ee3da77c Bump v11.0.0-nightly.20200811 2020-08-11 07:34:51 -07:00
GitHubPang
47f88b65b7 docs: fix typo in api/ipc-renderer (#24901) 2020-08-11 07:31:38 -07:00
Olawanle Joel
d7909b507f docs: fixed minor typos (#24912)
I was going through the entire documentation and decided to fix this to the best of my knowledge.
2020-08-11 07:30:45 -07:00
Teo Koon Peng
14aba3f0de fix: export libuv symbols (#24659)
* fix: export libuv symbols

* add test for linux and windows

* mac linker flags

* assuming same foo.so path for macos

* use --whole-archive flag for mac as well

* use force_load for mac

* refactor: use napi c api directly

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2020-08-11 19:17:18 +09:00
Shelley Vohr
7ded768743 fix: pdf viewer template strings (#24913) 2020-08-10 22:46:58 -07:00
Samuel Attard
47d451ae52 fix: ts-node node is not a thing 2020-08-10 20:25:29 -07:00
Charles Kerr
7e84d3a2c1 build: in release notes script, do not assume electron dirname (#24927) 2020-08-10 16:56:54 -07:00
Samuel Attard
29a7b8f805 fix: add deps on the new devtools highlighter (#24921) 2020-08-10 16:54:05 -07:00
Shelley Vohr
16c32d2eb2 build: handle unhandled promise rejection in notes (#24923)
Handle any potential Git processes without throwing unhandled rejection errors.
2020-08-10 10:18:08 -07:00
Samuel Attard
047650b564 chore: update patches (#24919) 2020-08-10 08:23:21 -07:00
Shelley Vohr
8311078a96 fix: don't try to init mmap on missing asar (#24890) 2020-08-10 08:22:49 -07:00
Electron Bot
a9eaebb7f4 Bump v11.0.0-nightly.20200810 2020-08-10 07:32:34 -07:00
Samuel Attard
01c9113e2b build: fix path to git attributes for for patch export (#24896) 2020-08-10 07:10:15 -07:00
Jeremy Rose
481b19bee6 fix: send guid with linux crashes (#24881) 2020-08-07 15:30:49 -07:00
Samuel Attard
433956ce4f build: remove the tools folder (#24880) 2020-08-07 14:13:09 -07:00
Samuel Attard
b0ea1e14e1 build: type check the script folder during lint (#24892) 2020-08-07 13:49:07 -07:00
Samuel Attard
4d50f3f62c build: convert some scripts to TS (#24891) 2020-08-07 13:48:46 -07:00
300 changed files with 2781 additions and 1650 deletions

View File

@@ -95,7 +95,7 @@ machine-mac-large: &machine-mac-large
machine-mac-large-arm: &machine-mac-large-arm
resource_class: large
macos:
xcode: "12.0.0-UA"
xcode: "12.0.0-large"
# Build configurations options.
env-testing-build: &env-testing-build
@@ -137,8 +137,9 @@ env-arm: &env-arm
TARGET_ARCH: arm
env-apple-silicon: &env-apple-silicon
GN_EXTRA_ARGS: 'target_cpu = "arm64"'
GN_EXTRA_ARGS: 'target_cpu = "arm64" use_prebuilt_v8_context_snapshot = true'
TARGET_ARCH: arm64
USE_PREBUILT_V8_CONTEXT_SNAPSHOT: 1
env-arm64: &env-arm64
GN_EXTRA_ARGS: 'target_cpu = "arm64" fatal_linker_warnings = false enable_linux_installer = false'
@@ -151,9 +152,10 @@ env-mas: &env-mas
MAS_BUILD: 'true'
env-mas-apple-silicon: &env-mas-apple-silicon
GN_EXTRA_ARGS: 'target_cpu = "arm64" is_mas_build = true'
GN_EXTRA_ARGS: 'target_cpu = "arm64" is_mas_build = true use_prebuilt_v8_context_snapshot = true'
MAS_BUILD: 'true'
TARGET_ARCH: arm64
USE_PREBUILT_V8_CONTEXT_SNAPSHOT: 1
# Misc build configuration options.
env-enable-sccache: &env-enable-sccache
@@ -335,22 +337,78 @@ step-get-more-space-on-mac: &step-get-more-space-on-mac
command: |
if [ "`uname`" == "Darwin" ]; then
sudo mkdir -p $TMPDIR/del-target
if [ "$TARGET_ARCH" == "arm64" ]; then
# Remount the root volume as writable, don't ask questions plz
sudo mount -uw /
fi
tmpify() {
if [ -d "$1" ]; then
sudo mv $1 $TMPDIR/del-target/$(echo $1|shasum -a 256|head -n1|cut -d " " -f1)
sudo mv "$1" $TMPDIR/del-target/$(echo $1|shasum -a 256|head -n1|cut -d " " -f1)
fi
}
strip_arm_deep() {
opwd=$(pwd)
cd $1
f=$(find . -perm +111 -type f)
for fp in $f
do
if [[ $(file "$fp") == *"universal binary"* ]]; then
if [[ $(file "$fp") == *"arm64e)"* ]]; then
sudo lipo -remove arm64e "$fp" -o "$fp" || true
fi
if [[ $(file "$fp") == *"arm64)"* ]]; then
sudo lipo -remove arm64 "$fp" -o "$fp" || true
fi
fi
done
cd $opwd
}
tmpify /Library/Developer/CoreSimulator
tmpify ~/Library/Developer/CoreSimulator
tmpify $(xcode-select -p)/Platforms/AppleTVOS.platform
tmpify $(xcode-select -p)/Platforms/iPhoneOS.platform
tmpify $(xcode-select -p)/Platforms/WatchOS.platform
tmpify $(xcode-select -p)/Platforms/WatchSimulator.platform
tmpify $(xcode-select -p)/Platforms/AppleTVSimulator.platform
tmpify $(xcode-select -p)/Platforms/iPhoneSimulator.platform
tmpify $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios
tmpify $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift
tmpify $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0
tmpify ~/.rubies
tmpify ~/Library/Caches/Homebrew
tmpify /usr/local/Homebrew
sudo rm -rf $TMPDIR/del-target
if [ "$TARGET_ARCH" == "arm64" ]; then
sudo rm -rf "/System/Library/Desktop Pictures"
sudo rm -rf /System/Library/Templates/Data
sudo rm -rf /System/Library/Speech/Voices
sudo rm -rf "/System/Library/Screen Savers"
sudo rm -rf /System/Volumes/Data/Library/Developer/CommandLineTools/SDKs
sudo rm -rf "/System/Volumes/Data/Library/Application Support/Apple/Photos/Print Products"
sudo rm -rf /System/Volumes/Data/Library/Java
sudo rm -rf /System/Volumes/Data/Library/Ruby
sudo rm -rf /System/Volumes/Data/Library/Printers
sudo rm -rf /System/iOSSupport
sudo rm -rf /System/Applications/*.app
sudo rm -rf /System/Applications/Utilities/*.app
sudo rm -rf /System/Library/LinguisticData
sudo rm -rf /System/Volumes/Data/private/var/db/dyld/*
# sudo rm -rf /System/Library/Fonts/*
# sudo rm -rf /System/Library/PreferencePanes
sudo rm -rf /System/Library/AssetsV2/*
sudo rm -rf /Applications/Safari.app
sudo rm -rf ~/project/src/build/linux
sudo rm -rf ~/project/src/third_party/catapult/tracing/test_data
sudo rm -rf ~/project/src/third_party/angle/third_party/VK-GL-CTS
# lipo off some huge binaries arm64 versions to save space
strip_arm_deep $(xcode-select -p)/../SharedFrameworks
strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr
fi
fi
background: true
@@ -450,6 +508,27 @@ step-electron-build: &step-electron-build
rm -f src/out/Default/libffmpeg.so
fi
cd src
# Enable if things get really bad
# if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then
# diskutil erasevolume HFS+ "xcode_disk" `hdiutil attach -nomount ram://12582912`
# mv /Applications/Xcode-12.beta.5.app /Volumes/xcode_disk/
# ln -s /Volumes/xcode_disk/Xcode-12.beta.5.app /Applications/Xcode-12.beta.5.app
# fi
# Lets generate a snapshot and mksnapshot and then delete all the x-compiled generated files to save space
if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" == "1" ]; then
ninja -C out/Default electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
ninja -C out/Default tools/v8_context_snapshot -j $NUMBER_OF_NINJA_PROCESSES
gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
rm -rf out/Default/clang_x64_v8_arm64/obj
# Regenerate because we just deleted some ninja files
if [ "$USE_GOMA" == "true" ]; then
gn gen out/Default --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS"
else
gn gen out/Default --args="import(\"$GN_CONFIG\") cc_wrapper=\"$SCCACHE_PATH\" $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS"
fi
fi
ninja -C out/Default electron -j $NUMBER_OF_NINJA_PROCESSES
node electron/script/check-symlinks.js
@@ -699,8 +778,10 @@ step-mksnapshot-build: &step-mksnapshot-build
name: mksnapshot build
command: |
cd src
ninja -C out/Default electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES
gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" != "1" ]; then
ninja -C out/Default electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES
gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
fi
if [ "`uname`" != "Darwin" ]; then
if [ "$TARGET_ARCH" == "arm" ]; then
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/mksnapshot
@@ -713,7 +794,7 @@ step-mksnapshot-build: &step-mksnapshot-build
electron/script/strip-binaries.py --file $PWD/out/Default/v8_context_snapshot_generator
fi
fi
if [ "$SKIP_DIST_ZIP" != "1" ]; then
if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" != "1" ] && [ "$SKIP_DIST_ZIP" != "1" ]; then
ninja -C out/Default electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
(cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S)
fi
@@ -930,6 +1011,9 @@ step-minimize-workspace-size-from-checkout: &step-minimize-workspace-size-from-c
rm -rf src/third_party/blink/web_tests
rm -rf src/third_party/blink/perf_tests
rm -rf src/third_party/WebKit/LayoutTests
rm -rf third_party/electron_node/deps/openssl
rm -rf third_party/electron_node/deps/v8
rm -rf chrome/test/data/xr/webvr_info
# Save the src cache based on the deps hash
step-save-src-cache: &step-save-src-cache
@@ -1037,6 +1121,11 @@ steps-lint: &steps-lint
cd src/electron
node script/yarn install --frozen-lockfile
node script/yarn lint
- run:
name: Run Script Typechecker
command: |
cd src/electron
node script/yarn tsc -p tsconfig.script.json
steps-checkout-and-save-cache: &steps-checkout-and-save-cache
steps:

View File

@@ -49,6 +49,10 @@ if (is_linux) {
}
}
declare_args() {
use_prebuilt_v8_context_snapshot = false
}
branding = read_file("shell/app/BRANDING.json", "json")
electron_project_name = branding.project_name
electron_product_name = branding.product_name
@@ -170,7 +174,7 @@ action("electron_js2c") {
inputs = sources + [ "//third_party/electron_node/tools/js2c.py" ]
outputs = [ "$root_gen_dir/electron_natives.cc" ]
script = "tools/js2c.py"
script = "build/js2c.py"
args = [ rebase_path("//third_party/electron_node") ] +
rebase_path(outputs, root_build_dir) +
rebase_path(sources, root_build_dir)
@@ -360,6 +364,7 @@ source_set("electron_lib") {
"//services/viz/privileged/mojom/compositing",
"//skia",
"//third_party/blink/public:blink",
"//third_party/blink/public:blink_devtools_inspector_resources",
"//third_party/boringssl",
"//third_party/electron_node:node_lib",
"//third_party/inspector_protocol:crdtp",
@@ -687,6 +692,15 @@ if (is_mac) {
sources = [ "shell/common/resources/mac/MainMenu.xib" ]
}
action("fake_v8_context_snapshot_generator") {
script = "build/fake_v8_context_snapshot_generator.py"
args = [
rebase_path("$root_out_dir/v8_context_snapshot.bin"),
rebase_path("$root_out_dir/fake/v8_context_snapshot.bin"),
]
outputs = [ "$root_out_dir/fake/v8_context_snapshot.bin" ]
}
bundle_data("electron_framework_resources") {
public_deps = [ ":packed_resources" ]
sources = []
@@ -697,8 +711,13 @@ if (is_mac) {
if (v8_use_external_startup_data) {
public_deps += [ "//v8" ]
if (use_v8_context_snapshot) {
sources += [ "$root_out_dir/v8_context_snapshot.bin" ]
public_deps += [ "//tools/v8_context_snapshot" ]
if (use_prebuilt_v8_context_snapshot) {
sources += [ "$root_out_dir/fake/v8_context_snapshot.bin" ]
public_deps += [ ":fake_v8_context_snapshot_generator" ]
} else {
sources += [ "$root_out_dir/v8_context_snapshot.bin" ]
public_deps += [ "//tools/v8_context_snapshot" ]
}
} else {
sources += [ "$root_out_dir/snapshot_blob.bin" ]
}
@@ -813,6 +832,9 @@ if (is_mac) {
"-Wl,-install_name,@rpath/$output_name.framework/$output_name",
"-rpath",
"@loader_path/Libraries",
# Required for exporting all symbols of libuv.
"-Wl,-force_load,obj/third_party/electron_node/deps/uv/libuv.a",
]
if (is_component_build) {
ldflags += [
@@ -1144,7 +1166,14 @@ if (is_mac) {
]
}
if (is_linux) {
ldflags = [ "-pie" ]
ldflags = [
"-pie",
# Required for exporting all symbols of libuv.
"-Wl,--whole-archive",
"obj/third_party/electron_node/deps/uv/libuv.a",
"-Wl,--no-whole-archive",
]
if (!is_component_build && is_component_ffmpeg) {
configs += [ "//build/config/gcc:rpath_for_built_shared_libraries" ]

View File

@@ -47,17 +47,17 @@ dependencies, and tools contained in the `electron/electron` repository.
* [Step 1: Fork](https://electronjs.org/docs/development/pull-requests#step-1-fork)
* [Step 2: Build](https://electronjs.org/docs/development/pull-requests#step-2-build)
* [Step 3: Branch](https://electronjs.org/docs/development/pull-requests#step-3-branch)
* [The Process of Making Changes](https://electronjs.org/docs/development/pull-requests#the-process-of-making-changes)
* [Making Changes](https://electronjs.org/docs/development/pull-requests#making-changes)
* [Step 4: Code](https://electronjs.org/docs/development/pull-requests#step-4-code)
* [Step 5: Commit](https://electronjs.org/docs/development/pull-requests#step-5-commit)
* [Commit message guidelines](https://electronjs.org/docs/development/pull-requests#commit-message-guidelines)
* [Step 6: Rebase](https://electronjs.org/docs/development/pull-requests#step-6-rebase)
* [Step 7: Test](https://electronjs.org/docs/development/pull-requests#step-7-test)
* [Step 8: Push](https://electronjs.org/docs/development/pull-requests#step-8-push)
* [Step 8: Opening the Pull Request](https://electronjs.org/docs/development/pull-requests#step-8-opening-the-pull-request)
* [Step 9: Discuss and Update](#step-9-discuss-and-update)
* [Step 9: Opening the Pull Request](https://electronjs.org/docs/development/pull-requests#step-9-opening-the-pull-request)
* [Step 10: Discuss and Update](https://electronjs.org/docs/development/pull-requests#step-10-discuss-and-update)
* [Approval and Request Changes Workflow](https://electronjs.org/docs/development/pull-requests#approval-and-request-changes-workflow)
* [Step 10: Landing](https://electronjs.org/docs/development/pull-requests#step-10-landing)
* [Step 11: Landing](https://electronjs.org/docs/development/pull-requests#step-11-landing)
* [Continuous Integration Testing](https://electronjs.org/docs/development/pull-requests#continuous-integration-testing)
## Style Guides

2
DEPS
View File

@@ -14,7 +14,7 @@ gclient_gn_args = [
vars = {
'chromium_version':
'93a6ebbe22f1a093e6a0cb5e72ba78990fe39824',
'b04584161e07d4ac110045b7647fa8a81f5f0709',
'node_version':
'v12.18.3',
'nan_version':

View File

@@ -1 +1 @@
11.0.0-nightly.20200807
11.0.0-beta.1

View File

@@ -6,7 +6,11 @@ To report a security issue, email [security@electronjs.org](mailto:security@elec
The Electron team will send a response indicating the next steps in handling your report. After the initial reply to your report, the security team will keep you informed of the progress towards a fix and full announcement, and may ask for additional information or guidance.
Report security bugs in third-party modules to the person or team maintaining the module. You can also report a vulnerability through the [Node Security Project](https://nodesecurity.io/report).
Report security bugs in third-party modules to the person or team maintaining the module. You can also report a vulnerability through the [npm contact form](https://www.npmjs.com/support) by selecting "I'm reporting a security vulnerability".
## The Electron Security Notification Process
For context on Electron's security notification process, please see the [Notifications](https://github.com/electron/governance/blob/master/wg-security/membership-and-notifications.md#notifications) section of the Security WG's [Membership and Notifications](https://github.com/electron/governance/blob/master/wg-security/membership-and-notifications.md) Governance document.
## Learning More About Security
To learn more about securing an Electron application, please see the [security tutorial](docs/tutorial/security.md).

View File

@@ -87,7 +87,11 @@ steps:
- powershell: |
Get-Process | Where Name Like "electron*" | Stop-Process
Get-Process | Where Name Like "MicrosoftEdge*" | Stop-Process
Get-Process | Where Name Like "msedge*" | Stop-Process
displayName: 'Kill processes left running from last test run'
condition: always()
- powershell: |
Remove-Item -path $env:APPDATA/Electron* -Recurse
displayName: 'Delete user app data directories'
condition: always()

View File

@@ -0,0 +1,8 @@
import os
import shutil
import sys
if os.path.exists(sys.argv[2]):
os.remove(sys.argv[2])
shutil.copy(sys.argv[1], sys.argv[2])

View File

@@ -360,7 +360,7 @@ bool CheckCookie(const base::FilePath& path, const base::FilePath& cookie) {
}
bool IsAppSandboxed() {
#if defined(OS_MACOSX)
#if defined(OS_MAC)
// NB: There is no sane API for this, we have to just guess by
// reading tea leaves
base::FilePath home_dir;
@@ -371,7 +371,7 @@ bool IsAppSandboxed() {
return home_dir.value().find("Library/Containers") != std::string::npos;
#else
return false;
#endif // defined(OS_MACOSX)
#endif // defined(OS_MAC)
}
bool ConnectSocket(ScopedSocket* socket,
@@ -421,7 +421,7 @@ bool ConnectSocket(ScopedSocket* socket,
}
}
#if defined(OS_MACOSX)
#if defined(OS_MAC)
bool ReplaceOldSingletonLock(const base::FilePath& symlink_content,
const base::FilePath& lock_path) {
// Try taking an flock(2) on the file. Failure means the lock is taken so we
@@ -447,14 +447,14 @@ bool ReplaceOldSingletonLock(const base::FilePath& symlink_content,
// lock. We never flock() the lock file from now on. I.e. we assume that an
// old version of Chrome will not run with the same user data dir after this
// version has run.
if (!base::DeleteFile(lock_path, false)) {
if (!base::DeleteFile(lock_path)) {
PLOG(ERROR) << "Could not delete old singleton lock.";
return false;
}
return SymlinkPath(symlink_content, lock_path);
}
#endif // defined(OS_MACOSX)
#endif // defined(OS_MAC)
} // namespace
@@ -970,7 +970,7 @@ bool ProcessSingleton::Create() {
if (!SymlinkPath(symlink_content, lock_path_)) {
// TODO(jackhou): Remove this case once this code is stable on Mac.
// http://crbug.com/367612
#if defined(OS_MACOSX)
#if defined(OS_MAC)
// On Mac, an existing non-symlink lock file means the lock could be held by
// the old process singleton code. If we can successfully replace the lock,
// continue as normal.

View File

@@ -370,7 +370,7 @@ Returns:
Emitted when the GPU process crashes or is killed.
**Deprecated:** This event is superceded by the `child-process-gone` event
which contains more information about why the child process dissapeared. It
which contains more information about why the child process disappeared. It
isn't always because it crashed. The `killed` boolean can be replaced by
checking `reason === 'killed'` when you switch to that event.
@@ -385,7 +385,7 @@ Returns:
Emitted when the renderer process of `webContents` crashes or is killed.
**Deprecated:** This event is superceded by the `render-process-gone` event
which contains more information about why the render process dissapeared. It
which contains more information about why the render process disappeared. It
isn't always because it crashed. The `killed` boolean can be replaced by
checking `reason === 'killed'` when you switch to that event.
@@ -405,7 +405,7 @@ Returns:
* `launch-failure` - Process never successfully launched
* `integrity-failure` - Windows code integrity checks failed
Emitted when the renderer process unexpectedly dissapears. This is normally
Emitted when the renderer process unexpectedly disappears. This is normally
because it was crashed or killed.
#### Event: 'child-process-gone'
@@ -435,7 +435,7 @@ Returns:
* `name` String (optional) - The name of the process. i.e. for plugins it might be Flash.
Examples for utility: `Audio Service`, `Content Decryption Module Service`, `Network Service`, `Video Capture`, etc.
Emitted when the child process unexpectedly dissapears. This is normally
Emitted when the child process unexpectedly disappears. This is normally
because it was crashed or killed. It does not include renderer processes.
### Event: 'accessibility-support-changed' _macOS_ _Windows_
@@ -1222,7 +1222,7 @@ Returns `Object`:
* `path` String _Windows_ - The executable to an app that corresponds to a registry entry.
* `args` String[] _Windows_ - the command-line arguments to pass to the executable.
* `scope` String _Windows_ - one of `user` or `machine`. Indicates whether the registry entry is under `HKEY_CURRENT USER` or `HKEY_LOCAL_MACHINE`.
* `enabled` Boolean _Windows_ - `true` if the app registry key is startup approved and therfore shows as `enabled` in Task Manager and Windows settings.
* `enabled` Boolean _Windows_ - `true` if the app registry key is startup approved and therefore shows as `enabled` in Task Manager and Windows settings.
### `app.setLoginItemSettings(settings)` _macOS_ _Windows_
@@ -1356,7 +1356,7 @@ method returns false. If we fail to perform the copy, then this method will
throw an error. The message in the error should be informative and tell
you exactly what went wrong.
By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the pre-existing running app will assume focus and the the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing.
By default, if an app of the same name as the one being moved exists in the Applications directory and is _not_ running, the existing app will be trashed and the active app moved into its place. If it _is_ running, the pre-existing running app will assume focus and the previously active app will quit itself. This behavior can be changed by providing the optional conflict handler, where the boolean returned by the handler determines whether or not the move conflict is resolved with default behavior. i.e. returning `false` will ensure no further action is taken, returning `true` will result in the default behavior and the method continuing.
For example:

View File

@@ -40,16 +40,6 @@ A [`WebContents`](web-contents.md) object owned by this view.
Objects created with `new BrowserView` have the following instance methods:
#### `view.destroy()`
Force closing the view, the `unload` and `beforeunload` events won't be emitted
for the web page. After you're done with a view, call this function in order to
free memory and other resources as soon as possible.
#### `view.isDestroyed()`
Returns `Boolean` - Whether the view is destroyed.
#### `view.setAutoResize(options)` _Experimental_
* `options` Object

View File

@@ -207,11 +207,15 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
* `opacity` Number (optional) - Set the initial opacity of the window, between 0.0 (fully
transparent) and 1.0 (fully opaque). This is only implemented on Windows and macOS.
* `darkTheme` Boolean (optional) - Forces using dark theme for the window, only works on
some GTK desktop environments. Default is [`nativeTheme.shouldUseDarkColors`](native-theme.md).
some GTK+3 desktop environments. Default is `false`.
* `transparent` Boolean (optional) - Makes the window [transparent](frameless-window.md#transparent-window).
Default is `false`. On Windows, does not work unless the window is frameless.
* `type` String (optional) - The type of window, default is normal window. See more about
this below.
* `visualEffectState` String (optional) - Specify how the material appearance should reflect window activity state on macOS. Must be used with the `vibrancy` property. Possible values are:
* `followWindow` - The backdrop should automatically appear active when the window is active, and inactive when it is not. This is the default.
* `active` - The backdrop should always appear active.
* `inactive` - The backdrop should always appear inactive.
* `titleBarStyle` String (optional) - The style of window title bar.
Default is `default`. Possible values are:
* `default` - Results in the standard gray opaque Mac title
@@ -271,7 +275,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
the `nodeIntegration` option and the APIs available to the preload script
are more limited. Read more about the option [here](sandbox-option.md).
* `enableRemoteModule` Boolean (optional) - Whether to enable the [`remote`](remote.md) module.
Default is `true`.
Default is `false`.
* `session` [Session](session.md#class-session) (optional) - Sets the session used by the
page. Instead of passing the Session object directly, you can also choose to
use the `partition` option instead, which accepts a partition string. When
@@ -1669,9 +1673,12 @@ Sets whether the menu bar should be visible. If the menu bar is auto-hide, users
Returns `Boolean` - Whether the menu bar is visible.
#### `win.setVisibleOnAllWorkspaces(visible)`
#### `win.setVisibleOnAllWorkspaces(visible[, options])`
* `visible` Boolean
* `options` Object (optional)
* `visibleOnFullScreen` Boolean (optional) _macOS_ - Sets whether
the window should be visible above fullscreen windows
Sets whether the window should be visible on all workspaces.

View File

@@ -171,6 +171,20 @@ lowercasing. It can be called only before first write. Calling this method after
the first write will throw an error. If the passed value is not a `String`, its
`toString()` method will be called to obtain the final value.
Certain headers are restricted from being set by apps. These headers are
listed below. More information on restricted headers can be found in
[Chromium's header utils](https://source.chromium.org/chromium/chromium/src/+/master:services/network/public/cpp/header_util.cc;drc=1562cab3f1eda927938f8f4a5a91991fefde66d3;bpv=1;bpt=1;l=22).
* `Content-Length`
* `Host`
* `Trailer` or `Te`
* `Upgrade`
* `Cookie2`
* `Keep-Alive`
* `Transfer-Encoding`
Additionally, setting the `Connection` header to the value `upgrade` is also disallowed.
#### `request.getHeader(name)`
* `name` String - Specify an extra header name.

View File

@@ -170,7 +170,7 @@ your crash reporting backend you should stitch together keys in this format.
* `key` String - Parameter key, must be no longer than 39 bytes.
Remove a extra parameter from the current set of parameters. Future crashes
Remove an extra parameter from the current set of parameters. Future crashes
will not include this parameter.
### `crashReporter.getParameters()`

View File

@@ -269,7 +269,7 @@ Shows a message box, it will block the process until the message box is closed.
It returns the index of the clicked button.
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
If `browserWindow` is not shown dialog will not be attached to it. In such case It will be displayed as independed window.
If `browserWindow` is not shown dialog will not be attached to it. In such case it will be displayed as an independent window.
### `dialog.showMessageBox([browserWindow, ]options)`

View File

@@ -108,7 +108,7 @@ ipcMain.handle('some-name', async (event, someArgument) => {
If you need to transfer a [`MessagePort`][] to the main process, use [`ipcRenderer.postMessage`](#ipcrendererpostmessagechannel-message-transfer).
If you do not need a respons to the message, consider using [`ipcRenderer.send`](#ipcrenderersendchannel-args).
If you do not need a response to the message, consider using [`ipcRenderer.send`](#ipcrenderersendchannel-args).
### `ipcRenderer.sendSync(channel, ...args)`

View File

@@ -1,6 +1,6 @@
## Modernization
The Electron team is currently undergoing an initiative to modernize our API in a few concrete ways. These include: updating our modules to use idiomatic JS properties instead of separate `getPropertyX` and `setpropertyX`, converting callbacks to promises, and removing some other anti-patterns present in our APIs. The current status of the Promise intiative can be tracked in the [promisification](promisification.md) tracking file.
The Electron team is currently undergoing an initiative to modernize our API in a few concrete ways. These include: updating our modules to use idiomatic JS properties instead of separate `getPropertyX` and `setpropertyX`, converting callbacks to promises, and removing some other anti-patterns present in our APIs. The current status of the Promise initiative can be tracked in the [promisification](promisification.md) tracking file.
As we work to perform these updates, we seek to create the least disruptive amount of change at any given time, so as many changes as possible will be introduced in a backward compatible manner and deprecated after enough time has passed to give users a chance to upgrade their API calls.

View File

@@ -119,6 +119,13 @@ Returns `NativeImage`
Creates an empty `NativeImage` instance.
### `nativeImage.createThumbnailFromPath(path, maxSize)` _macOS_ _Windows_
* `path` String - path to a file that we intend to construct a thumbnail out of.
* `maxSize` [Size](structures/size.md) - the maximum width and height (positive numbers) the thumbnail returned can be. The Windows implementation will ignore `maxSize.height` and scale the height according to `maxSize.width`.
Returns `Promise<NativeImage>` - fulfilled with the file's thumbnail preview image, which is a [NativeImage](native-image.md).
### `nativeImage.createFromPath(path)`
* `path` String

View File

@@ -58,7 +58,7 @@ Your application should then always use `shouldUseDarkColors` to determine what
### `nativeTheme.shouldUseHighContrastColors` _macOS_ _Windows_ _Readonly_
A `Boolean` for if the OS / Chromium currently has high-contrast mode enabled
or is being instructed to show a high-constrast UI.
or is being instructed to show a high-contrast UI.
### `nativeTheme.shouldUseInvertedColorScheme` _macOS_ _Windows_ _Readonly_

View File

@@ -389,7 +389,7 @@ session.fromPartition('some-partition').setPermissionRequestHandler((webContents
* `permission` String - Enum of 'media'.
* `requestingOrigin` String - The origin URL of the permission check
* `details` Object - Some properties are only available on certain permission types.
* `securityOrigin` String - The security orign of the `media` check.
* `securityOrigin` String - The security origin of the `media` check.
* `mediaType` String - The type of media access being requested, can be `video`,
`audio` or `unknown`
* `requestingUrl` String - The last URL the requesting frame loaded
@@ -526,7 +526,7 @@ Returns `String[]` - An array of language codes the spellchecker is enabled for.
will fallback to using `en-US`. By default on launch if this setting is an empty list Electron will try to populate this
setting with the current OS locale. This setting is persisted across restarts.
**Note:** On macOS the OS spellchecker is used and has it's own list of languages. This API is a no-op on macOS.
**Note:** On macOS the OS spellchecker is used and has its own list of languages. This API is a no-op on macOS.
#### `ses.setSpellCheckerDictionaryDownloadURL(url)`

View File

@@ -30,7 +30,7 @@ Show the given file in a file manager. If possible, select the file.
* `path` String
Returns `Promise<String>` - Resolves with an string containing the error message corresponding to the failure if a failure occurred, otherwise "".
Returns `Promise<String>` - Resolves with a string containing the error message corresponding to the failure if a failure occurred, otherwise "".
Open the given file in the desktop's default manner.

View File

@@ -19,5 +19,5 @@
available.
* `appIcon` [NativeImage](../native-image.md) - An icon image of the
application that owns the window or null if the source has a type screen.
The size of the icon is not known in advance and depends on what the
The size of the icon is not known in advance and depends on what
the application provides.

View File

@@ -7,7 +7,7 @@
* `isDefault` Boolean - whether or not a given printer is set as the default printer on the OS.
* `options` Object - an object containing a variable number of platform-specific printer information.
The number represented by `status` means different things on different platforms: on Windows it's potential values can be found [here](https://docs.microsoft.com/en-us/windows/win32/printdocs/printer-info-2), and on Linux and macOS they can be found [here](https://www.cups.org/doc/cupspm.html).
The number represented by `status` means different things on different platforms: on Windows its potential values can be found [here](https://docs.microsoft.com/en-us/windows/win32/printdocs/printer-info-2), and on Linux and macOS they can be found [here](https://www.cups.org/doc/cupspm.html).
## Example

View File

@@ -7,4 +7,5 @@
* `contentLengths` Number[] - The total size of the content, in bytes.
* `price` Number - The cost of the product in the local currency.
* `formattedPrice` String - The locale formatted price of the product.
* `currencyCode` String - 3 character code presenting a product's currency based on the ISO 4217 standard.
* `isDownloadable` Boolean - A Boolean value that indicates whether the App Store has downloadable content for this product. `true` if at least one file has been associated with the product.

View File

@@ -406,7 +406,7 @@ systemPreferences.promptTouchID('To get consent for a Security-Gated Thing').the
})
```
This API itself will not protect your user data; rather, it is a mechanism to allow you to do so. Native apps will need to set [Access Control Constants](https://developer.apple.com/documentation/security/secaccesscontrolcreateflags?language=objc) like [`kSecAccessControlUserPresence`](https://developer.apple.com/documentation/security/secaccesscontrolcreateflags/ksecaccesscontroluserpresence?language=objc) on the their keychain entry so that reading it would auto-prompt for Touch ID biometric consent. This could be done with [`node-keytar`](https://github.com/atom/node-keytar), such that one would store an encryption key with `node-keytar` and only fetch it if `promptTouchID()` resolves.
This API itself will not protect your user data; rather, it is a mechanism to allow you to do so. Native apps will need to set [Access Control Constants](https://developer.apple.com/documentation/security/secaccesscontrolcreateflags?language=objc) like [`kSecAccessControlUserPresence`](https://developer.apple.com/documentation/security/secaccesscontrolcreateflags/ksecaccesscontroluserpresence?language=objc) on their keychain entry so that reading it would auto-prompt for Touch ID biometric consent. This could be done with [`node-keytar`](https://github.com/atom/node-keytar), such that one would store an encryption key with `node-keytar` and only fetch it if `promptTouchID()` resolves.
**NOTE:** This API will return a rejected Promise on macOS systems older than Sierra 10.12.2.

View File

@@ -217,9 +217,11 @@ Sets the `image` associated with this tray icon when pressed on macOS.
Sets the hover text for this tray icon.
#### `tray.setTitle(title)` _macOS_
#### `tray.setTitle(title[, options])` _macOS_
* `title` String
* `options` Object (optional)
* `fontType` String (optional) - The font family variant to display, can be `monospaced` or `monospacedDigit`. `monospaced` is available in macOS 10.15+ and `monospacedDigit` is available in macOS 10.11+. When left blank, the title uses the default system font.
Sets the title displayed next to the tray icon in the status bar (Support ANSI colors).

View File

@@ -256,7 +256,7 @@ Returns:
Emitted after a server side redirect occurs during navigation. For example a 302
redirect.
This event can not be prevented, if you want to prevent redirects you should
This event cannot be prevented, if you want to prevent redirects you should
checkout out the `will-redirect` event above.
#### Event: 'did-navigate'
@@ -348,7 +348,7 @@ Returns:
Emitted when the renderer process crashes or is killed.
**Deprecated:** This event is superceded by the `render-process-gone` event
which contains more information about why the render process dissapeared. It
which contains more information about why the render process disappeared. It
isn't always because it crashed. The `killed` boolean can be replaced by
checking `reason === 'killed'` when you switch to that event.
@@ -367,7 +367,7 @@ Returns:
* `launch-failure` - Process never successfully launched
* `integrity-failure` - Windows code integrity checks failed
Emitted when the renderer process unexpectedly dissapears. This is normally
Emitted when the renderer process unexpectedly disappears. This is normally
because it was crashed or killed.
#### Event: 'unresponsive'
@@ -720,7 +720,7 @@ This event can be used to configure `webPreferences` for the `webContents`
of a `<webview>` before it's loaded, and provides the ability to set settings
that can't be set via `<webview>` attributes.
**Note:** The specified `preload` script option will be appear as `preloadURL`
**Note:** The specified `preload` script option will appear as `preloadURL`
(not `preload`) in the `webPreferences` object emitted with this event.
#### Event: 'did-attach-webview'
@@ -1255,7 +1255,7 @@ is large then 0.
#### `contents.incrementCapturerCount([size, stayHidden])`
* `size` [Size](structures/size.md) (optional) - The perferred size for the capturer.
* `size` [Size](structures/size.md) (optional) - The preferred size for the capturer.
* `stayHidden` Boolean (optional) - Keep the page hidden instead of visible.
Increase the capturer count by one. The page is considered visible when its browser window is
@@ -1311,7 +1311,7 @@ Returns [`PrinterInfo[]`](structures/printer-info.md)
* `success` Boolean - Indicates success of the print call.
* `failureReason` String - Error description called back if the print fails.
When a custom `pageSize` is passed, Chromium attempts to validate platform specific minumum values for `width_microns` and `height_microns`. Width and height must both be minimum 353 microns but may be higher on some operating systems.
When a custom `pageSize` is passed, Chromium attempts to validate platform specific minimum values for `width_microns` and `height_microns`. Width and height must both be minimum 353 microns but may be higher on some operating systems.
Prints window's web page. When `silent` is set to `true`, Electron will pick
the system's default printer if `deviceName` is empty and the default settings for printing.

View File

@@ -233,7 +233,7 @@ Try not to be discouraged. If you feel that a review is unfair, say so or seek
the input of another project contributor. Often such comments are the result of
a reviewer having taken insufficient time to review and are not ill-intended.
Such difficulties can often be resolved with a bit of patience. That said,
reviewers should be expected to provide helpful feeback.
reviewers should be expected to provide helpful feedback.
### Step 11: Landing

View File

@@ -16,5 +16,6 @@
| 7.0.0 | 2019-08-01 | 2019-10-22 | M78 | v12.8 |
| 8.0.0 | 2019-10-24 | 2020-02-04 | M80 | v12.13 |
| 9.0.0 | 2020-02-06 | 2020-05-19 | M83 | v12.14 |
| 10.0.0 | 2020-05-21 | 2020-08-25 | M85 | v12.x |
| 11.0.0 | TBD | TBD | TBD| TBD |
| 10.0.0 | 2020-05-21 | 2020-08-25 | M85 | v12.16 |
| 11.0.0 | 2020-08-27 | 2020-11-17 | M87 | v12.x |
| 12.0.0 | TBD | TBD | TBD | TBD |

View File

@@ -13,11 +13,11 @@ to automate the `Info.plist` changes during app build time.
## Automatically updating the native interfaces
"Native Interfaces" include the file picker, window border, dialogs, context menus and more; basically,
"Native Interfaces" include the file picker, window border, dialogs, context menus, and more; basically,
anything where the UI comes from macOS and not your app. As of Electron 7.0.0, the default behavior
is to opt in to this automatic theming from the OS. If you wish to opt out and are using Electron
is to opt into this automatic theming from the OS. If you wish to opt-out and are using Electron
&gt; 8.0.0, you must set the `NSRequiresAquaSystemAppearance` key in the `Info.plist` file to `true`.
Please note that Electron 8.0.0 and above will not let your opt out of this theming, due to the use
Please note that Electron 8.0.0 and above will not let you opt-out of this theming, due to the use
of the macOS 10.14 SDK.
## Automatically updating your own interfaces

View File

@@ -58,9 +58,9 @@ threshold, we will attempt to support backwards compatibility beyond two version
until the maintainers feel the maintenance burden is too high to continue doing so.
### Currently supported versions
- 10.x.y
- 9.x.y
- 8.x.y
- 7.x.y
### End-of-life

View File

@@ -26,7 +26,7 @@ if (process.arch === 'x64') {
If you want to target arm64, logic like this will typically select the wrong architecture, so carefully check your application and build scripts for conditions like this. In custom build and packaging scripts, you should always check the value of `npm_config_arch` in the environment, rather than relying on the current process arch.
### Native modules
If you use native modules, you must make sure that that they compile against v142 of the MSVC compiler (provided in Visual Studio 2017). You must also check that any pre-built `.dll` or or `.lib` files provided or referenced by the native module are available for Windows on Arm.
If you use native modules, you must make sure that they compile against v142 of the MSVC compiler (provided in Visual Studio 2017). You must also check that any pre-built `.dll` or `.lib` files provided or referenced by the native module are available for Windows on Arm.
### Testing your app
To test your app, use a Windows on Arm device running Windows 10 (version 1903 or later). Make sure that you copy your application over to the target device - Chromium's sandbox will not work correctly when loading your application assets from a network location.
@@ -84,7 +84,7 @@ After completing all of the above, open your cross-compilation command prompt an
Debugging native modules can be done with Visual Studio 2017 (running on your development machine) and corresponding [Visual Studio Remote Debugger](https://docs.microsoft.com/en-us/visualstudio/debugger/remote-debugging-cpp?view=vs-2019) running on the target device. To debug:
1. Lanch your app `.exe` on the target device via the _Command Prompt_ (passing `--inspect-brk` to pause it before any native modules are loaded).
1. Launch your app `.exe` on the target device via the _Command Prompt_ (passing `--inspect-brk` to pause it before any native modules are loaded).
2. Launch Visual Studio 2017 on your development machine.
3. Connect to the target device by selecting _Debug > Attach to Process..._ and enter the device's IP address and the port number displayed by the Visual Studio Remote Debugger tool.
4. Click _Refresh_ and select the [appropriate Electron process to attach](../development/debug-instructions-windows.md).

View File

@@ -55,6 +55,7 @@ template("electron_extra_paks") {
output = "${invoker.output_dir}/resources.pak"
sources = [
"$root_gen_dir/chrome/dev_ui_browser_resources.pak",
"$root_gen_dir/chrome/print_preview_pdf_resources.pak",
"$root_gen_dir/components/components_resources.pak",
"$root_gen_dir/content/browser/resources/media/media_internals_resources.pak",
"$root_gen_dir/content/browser/tracing/tracing_resources.pak",
@@ -64,11 +65,13 @@ template("electron_extra_paks") {
"$root_gen_dir/mojo/public/js/mojo_bindings_resources.pak",
"$root_gen_dir/net/net_resources.pak",
"$root_gen_dir/third_party/blink/public/resources/blink_resources.pak",
"$root_gen_dir/third_party/blink/public/resources/inspector_overlay_resources.pak",
"$root_gen_dir/ui/resources/webui_resources.pak",
"$target_gen_dir/electron_resources.pak",
]
deps = [
"//chrome/browser:dev_ui_browser_resources",
"//chrome/browser/resources:print_preview_pdf_resources",
"//components/resources",
"//content:content_resources",
"//content:dev_ui_content_resources",
@@ -78,6 +81,7 @@ template("electron_extra_paks") {
"//electron:resources",
"//mojo/public/js:resources",
"//net:net_resources",
"//third_party/blink/public:devtools_inspector_resources",
"//third_party/blink/public:resources",
"//ui/resources",
]

View File

@@ -138,7 +138,6 @@ auto_filenames = {
"lib/common/api/clipboard.ts",
"lib/common/api/deprecate.ts",
"lib/common/api/module-list.ts",
"lib/common/api/native-image.ts",
"lib/common/api/shell.ts",
"lib/common/define-properties.ts",
"lib/common/type-utils.ts",
@@ -148,6 +147,7 @@ auto_filenames = {
"lib/renderer/api/crash-reporter.ts",
"lib/renderer/api/desktop-capturer.ts",
"lib/renderer/api/ipc-renderer.ts",
"lib/renderer/api/native-image.ts",
"lib/renderer/api/remote.ts",
"lib/renderer/api/web-frame.ts",
"lib/renderer/inspector.ts",
@@ -207,6 +207,7 @@ auto_filenames = {
"lib/browser/api/menu.ts",
"lib/browser/api/message-channel.ts",
"lib/browser/api/module-list.ts",
"lib/browser/api/native-image.ts",
"lib/browser/api/native-theme.ts",
"lib/browser/api/net-log.ts",
"lib/browser/api/net.ts",
@@ -241,7 +242,6 @@ auto_filenames = {
"lib/common/api/clipboard.ts",
"lib/common/api/deprecate.ts",
"lib/common/api/module-list.ts",
"lib/common/api/native-image.ts",
"lib/common/api/shell.ts",
"lib/common/define-properties.ts",
"lib/common/init.ts",
@@ -264,7 +264,6 @@ auto_filenames = {
"lib/common/api/clipboard.ts",
"lib/common/api/deprecate.ts",
"lib/common/api/module-list.ts",
"lib/common/api/native-image.ts",
"lib/common/api/shell.ts",
"lib/common/define-properties.ts",
"lib/common/init.ts",
@@ -279,6 +278,7 @@ auto_filenames = {
"lib/renderer/api/exports/electron.ts",
"lib/renderer/api/ipc-renderer.ts",
"lib/renderer/api/module-list.ts",
"lib/renderer/api/native-image.ts",
"lib/renderer/api/remote.ts",
"lib/renderer/api/web-frame.ts",
"lib/renderer/init.ts",
@@ -307,7 +307,6 @@ auto_filenames = {
"lib/common/api/clipboard.ts",
"lib/common/api/deprecate.ts",
"lib/common/api/module-list.ts",
"lib/common/api/native-image.ts",
"lib/common/api/shell.ts",
"lib/common/define-properties.ts",
"lib/common/init.ts",
@@ -321,6 +320,7 @@ auto_filenames = {
"lib/renderer/api/exports/electron.ts",
"lib/renderer/api/ipc-renderer.ts",
"lib/renderer/api/module-list.ts",
"lib/renderer/api/native-image.ts",
"lib/renderer/api/remote.ts",
"lib/renderer/api/web-frame.ts",
"lib/renderer/ipc-renderer-internal-utils.ts",

View File

@@ -450,6 +450,7 @@ filenames = {
"shell/common/api/electron_api_native_image.cc",
"shell/common/api/electron_api_native_image.h",
"shell/common/api/electron_api_native_image_mac.mm",
"shell/common/api/electron_api_native_image_win.cc",
"shell/common/api/electron_api_shell.cc",
"shell/common/api/electron_api_v8_util.cc",
"shell/common/api/electron_bindings.cc",

View File

@@ -16,6 +16,7 @@ export const browserModuleList: ElectronInternal.ModuleEntry[] = [
{ name: 'Menu', loader: () => require('./menu') },
{ name: 'MenuItem', loader: () => require('./menu-item') },
{ name: 'MessageChannelMain', loader: () => require('./message-channel') },
{ name: 'nativeImage', loader: () => require('./native-image') },
{ name: 'nativeTheme', loader: () => require('./native-theme') },
{ name: 'net', loader: () => require('./net') },
{ name: 'netLog', loader: () => require('./net-log') },

View File

@@ -18,6 +18,7 @@ export const browserModuleNames = [
'inAppPurchase',
'Menu',
'MenuItem',
'nativeImage',
'nativeTheme',
'net',
'netLog',

View File

@@ -4,7 +4,6 @@ import * as fs from 'fs';
import { Socket } from 'net';
import * as path from 'path';
import * as util from 'util';
const Module = require('module');
// We modified the original process.argv to let node.js load the init.js,

View File

@@ -1,6 +1,6 @@
import { app } from 'electron/main';
import type { IpcMainInvokeEvent, WebContents } from 'electron/main';
import { clipboard, crashReporter } from 'electron/common';
import { clipboard, crashReporter, nativeImage } from 'electron/common';
import * as fs from 'fs';
import { ipcMainInternal } from '@electron/internal/browser/ipc-main-internal';
import * as ipcMainUtils from '@electron/internal/browser/ipc-main-internal-utils';
@@ -136,3 +136,7 @@ ipcMainUtils.handleSync('ELECTRON_CRASH_REPORTER_SET_UPLOAD_TO_SERVER', (event:
ipcMainUtils.handleSync('ELECTRON_CRASH_REPORTER_GET_CRASHES_DIRECTORY', () => {
return crashReporter.getCrashesDirectory();
});
ipcMainInternal.handle('ELECTRON_NATIVE_IMAGE_CREATE_THUMBNAIL_FROM_PATH', async (_, path: string, size: Electron.Size) => {
return typeUtils.serialize(await nativeImage.createThumbnailFromPath(path, size));
});

View File

@@ -1,7 +1,6 @@
// Common modules, please sort alphabetically
export const commonModuleList: ElectronInternal.ModuleEntry[] = [
{ name: 'clipboard', loader: () => require('./clipboard') },
{ name: 'nativeImage', loader: () => require('./native-image') },
{ name: 'shell', loader: () => require('./shell') },
// The internal modules, invisible unless you know their names.
{ name: 'deprecate', loader: () => require('./deprecate'), private: true }

View File

@@ -7,6 +7,7 @@ export const rendererModuleList: ElectronInternal.ModuleEntry[] = [
{ name: 'contextBridge', loader: () => require('./context-bridge') },
{ name: 'crashReporter', loader: () => require('./crash-reporter') },
{ name: 'ipcRenderer', loader: () => require('./ipc-renderer') },
{ name: 'nativeImage', loader: () => require('./native-image') },
{ name: 'webFrame', loader: () => require('./web-frame') }
];

View File

@@ -0,0 +1,10 @@
import { ipcRendererInternal } from '@electron/internal/renderer/ipc-renderer-internal';
import { deserialize } from '@electron/internal/common/type-utils';
const { nativeImage } = process._linkedBinding('electron_common_native_image');
nativeImage.createThumbnailFromPath = async (path: string, size: Electron.Size) => {
return deserialize(await ipcRendererInternal.invoke('ELECTRON_NATIVE_IMAGE_CREATE_THUMBNAIL_FROM_PATH', path, size));
};
export default nativeImage;

View File

@@ -165,13 +165,13 @@ if (nodeIntegration) {
// non context-isolated environment
if (!contextIsolation) {
process.once('loaded', function () {
delete global.process;
delete global.Buffer;
delete global.setImmediate;
delete global.clearImmediate;
delete global.global;
delete global.root;
delete global.GLOBAL;
delete (global as any).process;
delete (global as any).Buffer;
delete (global as any).setImmediate;
delete (global as any).clearImmediate;
delete (global as any).global;
delete (global as any).root;
delete (global as any).GLOBAL;
});
}
}

View File

@@ -13,7 +13,7 @@ export const moduleList: ElectronInternal.ModuleEntry[] = [
},
{
name: 'nativeImage',
loader: () => require('@electron/internal/common/api/native-image')
loader: () => require('@electron/internal/renderer/api/native-image')
},
{
name: 'webFrame',

View File

@@ -1,6 +1,6 @@
#!/usr/bin/env node
const version = require('./package').version
const {version} = require('./package')
const fs = require('fs')
const os = require('os')

View File

@@ -1,30 +1,30 @@
{
"name": "electron",
"version": "11.0.0-nightly.20200807",
"version": "11.0.0-beta.1",
"repository": "https://github.com/electron/electron",
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {
"@electron/docs-parser": "^0.9.1",
"@electron/typescript-definitions": "^8.7.4",
"@electron/typescript-definitions": "^8.7.5",
"@octokit/rest": "^18.0.3",
"@primer/octicons": "^10.0.0",
"@types/basic-auth": "^1.1.3",
"@types/busboy": "^0.2.3",
"@types/chai": "^4.2.11",
"@types/chai": "^4.2.12",
"@types/chai-as-promised": "^7.1.3",
"@types/dirty-chai": "^2.0.2",
"@types/express": "^4.17.7",
"@types/fs-extra": "^9.0.1",
"@types/mocha": "^7.0.2",
"@types/node": "^12.12.6",
"@types/semver": "^7.3.1",
"@types/semver": "^7.3.3",
"@types/send": "^0.14.5",
"@types/split": "^1.0.0",
"@types/uuid": "^3.4.6",
"@types/webpack": "^4.41.21",
"@types/webpack-env": "^1.15.2",
"@typescript-eslint/eslint-plugin": "^3.6.0",
"@typescript-eslint/parser": "^3.6.0",
"@typescript-eslint/eslint-plugin": "^3.9.1",
"@typescript-eslint/parser": "^3.9.1",
"asar": "^3.0.3",
"check-for-leaks": "^1.2.1",
"colors": "^1.4.0",
@@ -58,9 +58,9 @@
"tap-xunit": "^2.4.1",
"temp": "^0.8.3",
"timers-browserify": "1.4.2",
"ts-loader": "^7.0.5",
"ts-loader": "^8.0.2",
"ts-node": "6.2.0",
"typescript": "^3.9.6",
"typescript": "^4.0.2",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12"
},
@@ -108,7 +108,7 @@
"node script/lint.js --js --fix --only --"
],
"*.{js,ts,d.ts}": [
"node script/gen-filenames.js"
"ts-node script/gen-filenames.ts"
],
"*.{cc,mm,c,h}": [
"python script/run-clang-format.py -r -c --fix"
@@ -124,13 +124,13 @@
"node script/lint.js --py --fix --only --"
],
"docs/api/**/*.md": [
"node script/gen-filenames.js",
"ts-node script/gen-filenames.ts",
"python script/check-trailing-whitespace.py --fix",
"git add filenames.auto.gni"
],
"{*.patch,.patches}": [
"node script/lint.js --patches --only --",
"node script/check-patch-diff.js"
"ts-node script/check-patch-diff.ts"
],
"DEPS": [
"node script/gen-hunspell-filenames.js"

View File

@@ -97,12 +97,6 @@ feat_add_streaming-protocol_registry_to_multibuffer_data_source.patch
use_electron_resources_in_icon_reader_service.patch
fix_patch_out_profile_refs_in_accessibility_ui.patch
remove_some_deps_that_do_not_work_on_arm64.patch
chore_add_allocator_patches_for_apple_silicon.patch
chore_disable_failing_blink_font_dcheck_on_big_sur.patch
fix_check_issecureeventinputenabled_in_constructor_before_setting.patch
skip_atk_toolchain_check.patch
fix_missing_weakptr_check_in_preconnectmanager.patch
revert_swiftshader_roll_in_deps.patch
worker_feat_add_hook_to_notify_script_ready.patch
mac_work_around_xcode_12b3_sdk_bug.patch
fix_provide_axtextchangevaluestartmarker_a11y_value_change.patch

View File

@@ -10,7 +10,7 @@ This patch makes three changes to Accelerator::GetShortcutText to improve shortc
3. Ctrl-Shift-= should show as Ctrl-+
diff --git a/ui/base/accelerators/accelerator.cc b/ui/base/accelerators/accelerator.cc
index 7f26ef86fe967663a50bb556b49a37e1d10d5462..c83431034b9ddf0084f2ee2fc2538e4fb5aa0f0c 100644
index 627e077480fe8b19512cbb3e04791041317108eb..ad39d5bf90bb66ed0a21d01b7ff124cc018e96fb 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -12,6 +12,7 @@
@@ -25,7 +25,7 @@ index 7f26ef86fe967663a50bb556b49a37e1d10d5462..c83431034b9ddf0084f2ee2fc2538e4f
#include <windows.h>
#endif
-#if !defined(OS_WIN) && (defined(USE_AURA) || defined(OS_MACOSX))
-#if !defined(OS_WIN) && (defined(USE_AURA) || defined(OS_APPLE))
#include "ui/events/keycodes/keyboard_code_conversion.h"
-#endif
@@ -60,7 +60,7 @@ index 7f26ef86fe967663a50bb556b49a37e1d10d5462..c83431034b9ddf0084f2ee2fc2538e4f
- // VKEY_UNKNOWN), |::MapVirtualKeyW| returns 0.
- if (key != 0)
- shortcut += key;
-#elif defined(USE_AURA) || defined(OS_MACOSX) || defined(OS_ANDROID)
-#elif defined(USE_AURA) || defined(OS_APPLE) || defined(OS_ANDROID)
- const uint16_t c = DomCodeToUsLayoutCharacter(
- UsLayoutKeyboardCodeToDomCode(key_code_), false);
- if (c != 0)
@@ -74,7 +74,7 @@ index 7f26ef86fe967663a50bb556b49a37e1d10d5462..c83431034b9ddf0084f2ee2fc2538e4f
+ base::StringPrintf("F%d", key_code_ - VKEY_F1 + 1));
}
#if defined(OS_MACOSX)
#if defined(OS_APPLE)
@@ -410,7 +410,7 @@ base::string16 Accelerator::ApplyLongFormModifiers(
// more information.
if (IsCtrlDown())

View File

@@ -10,7 +10,7 @@ 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 1a2c3b6a910c24b7d124ea1b3180a3c9655580d8..e6795df82114e85cbda78ca89ca0716f963ba180 100644
index ed134d1d40fb23808a4cc251be50a7fbd833b49b..5aaf2356cc2c0fec9a90f3201f1e16553c69a5e3 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -255,6 +255,10 @@ int GpuMain(const MainFunctionParams& parameters) {

View File

@@ -10,7 +10,7 @@ DidCreateScriptContext is called, not all JS APIs are available in the
context, which can cause some preload scripts to trip.
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index 3e059605c55d88d52cf2544d6aca3446efee5750..398229becb8fd00022b08cc6afed7d1875766e25 100644
index e1bd458060e2eba703562121f134d0eede7c1986..7b9f534dbfff58c0778a2a4b0c79adb73c8fc377 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -115,6 +115,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -23,10 +23,10 @@ index 3e059605c55d88d52cf2544d6aca3446efee5750..398229becb8fd00022b08cc6afed7d18
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 05170b53a9491e2a77e8c6a0705e525001ea879b..899c4265fe65fc8dbd3d2e621b801635ae0efbb1 100644
index 62f6c5fd2ca94ac36851a952b5c1be3430331d60..68d2666696de00c28d57f9745f5ca902d2c16bc9 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4791,6 +4791,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4940,6 +4940,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -40,10 +40,10 @@ index 05170b53a9491e2a77e8c6a0705e525001ea879b..899c4265fe65fc8dbd3d2e621b801635
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 3565ba8fe1b6f244c632410302f5bd7663555480..d7c08d6126e20d03500e4a5630af1d81252b7289 100644
index 0a1647b88f70b6a669e922fdc6bf3b55a3acd745..9befc7bd8fd78de9cdea25dbc860af651d87c042 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -737,6 +737,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -729,6 +729,8 @@ class CONTENT_EXPORT RenderFrameImpl
bool ShouldTrackUseCounter(const blink::WebURL& url) override;
void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override;
@@ -53,10 +53,10 @@ index 3565ba8fe1b6f244c632410302f5bd7663555480..d7c08d6126e20d03500e4a5630af1d81
int world_id) override;
void DidChangeScrollOffset() override;
diff --git a/third_party/blink/public/web/web_local_frame_client.h b/third_party/blink/public/web/web_local_frame_client.h
index 69a2f020dfc4bafab21158504072da888353b5d6..685c329ceccaf56ea42181dc9ed2592dd9bb1c4f 100644
index e07d735a401ac23b3516fecef5a6a6094d2d0af3..e1d1502e839822277fef42e4e43e4f771485e335 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -533,6 +533,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -532,6 +532,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
@@ -67,7 +67,7 @@ index 69a2f020dfc4bafab21158504072da888353b5d6..685c329ceccaf56ea42181dc9ed2592d
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index 4e2f84beb37dd435afcc9ee0ad8b519f0e2af78a..2341fe4301ccc95a73197c60bd9301f14b9ed2ae 100644
index 5467a8c10153d7e88d58d8bcbccbd1716a82870a..9311077be9fd1540e504aa1995bfb6171119d200 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -203,6 +203,7 @@ void LocalWindowProxy::Initialize() {
@@ -79,10 +79,10 @@ index 4e2f84beb37dd435afcc9ee0ad8b519f0e2af78a..2341fe4301ccc95a73197c60bd9301f1
if (World().IsMainWorld()) {
GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld();
diff --git a/third_party/blink/renderer/core/exported/local_frame_client_impl.cc b/third_party/blink/renderer/core/exported/local_frame_client_impl.cc
index 0b86910c15476dc6c3e622b69e1feca913a64ab3..9c9dc1b65aaa68026aadb2c9d688eabf8cf39cb9 100644
index b849df64ee16f08d2370638fbe14ed364b2c0650..f38e3cfb85d5d5da9a429fd51dec0cd335a1a930 100644
--- a/third_party/blink/renderer/core/exported/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/exported/local_frame_client_impl.cc
@@ -391,6 +391,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -392,6 +392,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
web_frame_->Client()->DidCreateScriptContext(context, world_id);
}
@@ -97,10 +97,10 @@ index 0b86910c15476dc6c3e622b69e1feca913a64ab3..9c9dc1b65aaa68026aadb2c9d688eabf
v8::Local<v8::Context> context,
int32_t world_id) {
diff --git a/third_party/blink/renderer/core/exported/local_frame_client_impl.h b/third_party/blink/renderer/core/exported/local_frame_client_impl.h
index c6f2faae9cf81ac25f6f519b4a8396809fe15628..f0e07659e523f0c65bda4179909cda99249d97b8 100644
index dd60568c183c164bede36c69260866399b7e4b79..ab05496705b4aeeedf14af4c509a32c1d4382bb8 100644
--- a/third_party/blink/renderer/core/exported/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/exported/local_frame_client_impl.h
@@ -78,6 +78,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -77,6 +77,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) override;
@@ -110,10 +110,10 @@ index c6f2faae9cf81ac25f6f519b4a8396809fe15628..f0e07659e523f0c65bda4179909cda99
int32_t world_id) override;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index d6e732bb2e30a8f4083c2982ffdcffb24b055210..3b97b94b547713135218f675297f8f5b7b80bf64 100644
index 831ce5ccc32676790307d49416a3a40e7e3652bc..8898a6162a759a3a4d313d8956051b6208acd4af 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -286,6 +286,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -289,6 +289,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) = 0;
@@ -123,7 +123,7 @@ index d6e732bb2e30a8f4083c2982ffdcffb24b055210..3b97b94b547713135218f675297f8f5b
int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index 27b5af56ca300fe072ec1410ffe087896a9f0bf2..ac9f95c623bcdd793d1671f6ee7d5d87a7c4b52e 100644
index c233b9b5067c7833e773926585bcb774641faf05..2d2bee9cf782851a93d1e2e021f3890893fa11f2 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -331,6 +331,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {

View File

@@ -39,11 +39,11 @@ 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 77724df403e7ec9f1995e62b8737cb1d46ce20b1..244412c9a52ba701b161d1391e5f3cfb73307afc 100644
index 211ea701aba4935ed5641914493fd90e277f18f5..7c2ae147254dad017214d2535203a18719294768 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -672,6 +672,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
size, ArrayBufferContents::kDontInitialize);
@@ -689,6 +689,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
return result;
}
+ void* Realloc(void* data, size_t size) override {
@@ -51,13 +51,13 @@ index 77724df403e7ec9f1995e62b8737cb1d46ce20b1..244412c9a52ba701b161d1391e5f3cfb
+ }
+
void Free(void* data, size_t size) override {
ArrayBufferContents::FreeMemory(data);
}
if (max_allocation_ != 0 && data)
total_allocation_.fetch_sub(size, std::memory_order_relaxed);
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 5026ce05c5eb0be037ce4085488eb473828175a5..639173c18ddb743a4abe650cefdd94d257437262 100644
index 686806bcafa0939d29bbc6775748a115130feb96..20f7a9a594cf379b2dac6970bc8c02aebc3be360 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
@@ -128,6 +128,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
@@ -127,6 +127,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
return AllocateMemoryWithFlags(size, policy, base::PartitionAllocReturnNull);
}

View File

@@ -10,7 +10,7 @@ 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 41f5c3db2171cbe015dcb8c6a4436b94c377fec8..621dcf406e899ed9561568a812b6eea042e8c427 100644
index 7dc2d14d47d395e3b8046cae8788c4e04bc8e7f3..55068e71568a022bbf335147e6b35c24402d43ad 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -214,6 +214,25 @@ struct CTPolicy {
@@ -39,7 +39,7 @@ index 41f5c3db2171cbe015dcb8c6a4436b94c377fec8..621dcf406e899ed9561568a812b6eea0
interface CertVerifierClient {
Verify(
int32 default_error,
@@ -640,6 +659,8 @@ struct URLLoaderFactoryParams {
@@ -647,6 +666,8 @@ struct URLLoaderFactoryParams {
// impact because of the extra process hops, so use should be minimized.
pending_remote<TrustedURLLoaderHeaderClient>? header_client;
@@ -49,10 +49,10 @@ index 41f5c3db2171cbe015dcb8c6a4436b94c377fec8..621dcf406e899ed9561568a812b6eea0
// the per-context allow patterns that is managed via NetworkContext
// interface. This still respects the per-context block lists.
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index a5c25e290ef79c33117e14c02c05c86ebd558527..b21b39385ba3a15546eb38a26cb14a317bb64227 100644
index c209506ca5f450f4611cb339f6d9876175eb713e..d4ff5100be651655140ca024fec12a7d98baa00e 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -472,6 +472,7 @@ URLLoader::URLLoader(
@@ -473,6 +473,7 @@ URLLoader::URLLoader(
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
@@ -60,7 +60,7 @@ index a5c25e290ef79c33117e14c02c05c86ebd558527..b21b39385ba3a15546eb38a26cb14a31
mojom::OriginPolicyManager* origin_policy_manager,
std::unique_ptr<TrustTokenRequestHelperFactory> trust_token_helper_factory,
mojo::PendingRemote<mojom::CookieAccessObserver> cookie_observer)
@@ -535,6 +536,11 @@ URLLoader::URLLoader(
@@ -536,6 +537,11 @@ URLLoader::URLLoader(
header_client_.set_disconnect_handler(
base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
}
@@ -72,7 +72,7 @@ index a5c25e290ef79c33117e14c02c05c86ebd558527..b21b39385ba3a15546eb38a26cb14a31
if (want_raw_headers_) {
options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse |
mojom::kURLLoadOptionSendSSLInfoForCertificateError;
@@ -1062,7 +1068,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
@@ -1120,7 +1126,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
// |this| may have been deleted.
return;
}
@@ -81,7 +81,7 @@ index a5c25e290ef79c33117e14c02c05c86ebd558527..b21b39385ba3a15546eb38a26cb14a31
OnAuthCredentials(base::nullopt);
return;
}
@@ -1078,11 +1084,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
@@ -1136,11 +1142,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
if (url_request->response_headers())
head->headers = url_request->response_headers();
head->auth_challenge_info = auth_info;
@@ -108,10 +108,10 @@ index a5c25e290ef79c33117e14c02c05c86ebd558527..b21b39385ba3a15546eb38a26cb14a31
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 9f4d85ca7913c8de998e18560c6755cec51135d8..04748acc74ce55a335abb1865bb9bef9ae7a33c6 100644
index 51c6034e14c0ddbbf69e02f293590a810328bcbb..63b8b0a5349d0a6401cb6c71b116958d13acaf15 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -116,6 +116,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -118,6 +118,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
@@ -119,7 +119,7 @@ index 9f4d85ca7913c8de998e18560c6755cec51135d8..04748acc74ce55a335abb1865bb9bef9
mojom::OriginPolicyManager* origin_policy_manager,
std::unique_ptr<TrustTokenRequestHelperFactory>
trust_token_helper_factory,
@@ -457,6 +458,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -471,6 +472,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
base::Optional<base::UnguessableToken> fetch_window_id_;
mojo::Remote<mojom::TrustedHeaderClient> header_client_;

View File

@@ -30,10 +30,18 @@ index ad603aa7c557bfd4f571a541d70e2edf9ae757d9..d4b0bf8f5e8f3af9328b0099b65d9963
} // namespace blink
diff --git a/third_party/blink/renderer/core/exported/web_message_port_converter.cc b/third_party/blink/renderer/core/exported/web_message_port_converter.cc
index 333760d667f6b98b3e7674bf9082f999743dadfa..fc2f517de1951380482fbfa92c038041e15d9c3e 100644
index 333760d667f6b98b3e7674bf9082f999743dadfa..749a5c06ad468ee1ceb602944d3090ae9bbe616d 100644
--- a/third_party/blink/renderer/core/exported/web_message_port_converter.cc
+++ b/third_party/blink/renderer/core/exported/web_message_port_converter.cc
@@ -21,4 +21,15 @@ WebMessagePortConverter::DisentangleAndExtractMessagePortChannel(
@@ -6,6 +6,7 @@
#include "third_party/blink/public/common/messaging/message_port_channel.h"
#include "third_party/blink/renderer/bindings/core/v8/script_value.h"
+#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_core.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_message_port.h"
#include "third_party/blink/renderer/core/messaging/message_port.h"
@@ -21,4 +22,15 @@ WebMessagePortConverter::DisentangleAndExtractMessagePortChannel(
return port->Disentangle();
}

View File

@@ -6,10 +6,10 @@ 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 8dbcdb1132c74d4a459932a9634e5f15aef92a9a..71b50717ae1a10ef3009e808f813d389af873888 100644
index 7acd62e8657cce14733fa9d2449f3c48ad0dc0a6..f4c6c8b6361a6ae8403b13137cc213803892db5e 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
@@ -373,7 +373,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
@@ -369,7 +369,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
// document (which is implemented in WorkerMessagingProxy, and
// m_contentSecurityPolicy should be left as nullptr to inherit the policy).
if (!response.CurrentRequestUrl().ProtocolIs("blob") &&

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 25a7913d239dddbe623195323f0abc1c3fd8d752..b59873bdd37ebf5008a98946163c4a6f7b47884b 100644
index 97cd8eb72e9932797089787dc13dcd0f540f2b78..edf0e4e8786997556509c8bb997bbc9859a5147e 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -550,10 +550,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
@@ -563,10 +563,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
}
CHECK(!view_ || !view_->IsAttached());
@@ -28,7 +28,7 @@ index 25a7913d239dddbe623195323f0abc1c3fd8d752..b59873bdd37ebf5008a98946163c4a6f
if (!Client())
return;
@@ -571,6 +567,10 @@ void LocalFrame::DetachImpl(FrameDetachType type) {
@@ -584,6 +580,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

@@ -7,10 +7,10 @@ This exposes a method for obtaining a reference to an isolated world, which is
otherwise not available in the Blink API.
diff --git a/third_party/blink/public/web/web_local_frame.h b/third_party/blink/public/web/web_local_frame.h
index c050c98f673cbf98964f14075d64748ec64ae4e7..7aea95528d3ac342b62b21382f1e53e8b0b00163 100644
index 9bda8d2fae9929485d2278de8b7ba9d4395e24b3..73e6de07678f24b983fcc6ebfba2ef000f9eac1c 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -348,6 +348,8 @@ class WebLocalFrame : public WebFrame {
@@ -350,6 +350,8 @@ class WebLocalFrame : public WebFrame {
// Returns the world ID associated with |script_context|.
virtual int32_t GetScriptContextWorldId(
v8::Local<v8::Context> script_context) const = 0;
@@ -20,10 +20,10 @@ index c050c98f673cbf98964f14075d64748ec64ae4e7..7aea95528d3ac342b62b21382f1e53e8
// Executes script in the context of the current page and returns the value
// that the script evaluated to with callback. Script execution can be
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index 0863431d7e9cde2cdd178d02677e0d721437dce5..79bce62ad35f086cdef758eac5f0b07cd8764209 100644
index 584792c678e3f8bf965d59df16422b70a844542b..60109fdcc7499843d10c5c7e9f8e22deff6c007c 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
@@ -942,6 +942,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
@@ -950,6 +950,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
return MainWorldScriptContext()->Global();
}
@@ -38,7 +38,7 @@ index 0863431d7e9cde2cdd178d02677e0d721437dce5..79bce62ad35f086cdef758eac5f0b07c
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 a34fe16b62f51dbd6bae266504dbb3ff7eb0075f..d1150daf6d15f94bf83a0791a1f357dc434058a8 100644
index a6c74bdad96fc535a52b40bf7927782d2198aefb..0f7e00f7ff58fbea3a797b6b1d90f316582d22af 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
@@ -162,6 +162,8 @@ class CORE_EXPORT WebLocalFrameImpl final

View File

@@ -6,7 +6,7 @@ Subject: boringssl BUILD.gn
Build BoringSSL with some extra functions that nodejs needs.
diff --git a/third_party/boringssl/BUILD.gn b/third_party/boringssl/BUILD.gn
index b435499f459b6c128ce516be7d69089d096c5827..5c024d321dda7cf7810190ac9afc6d563385024c 100644
index fab890501a2a94ecbd423dd9ef91ba57eb9f5de1..a5c8558194c9e694f5dd683b4db9b914c43ed260 100644
--- a/third_party/boringssl/BUILD.gn
+++ b/third_party/boringssl/BUILD.gn
@@ -46,6 +46,19 @@ config("no_asm_config") {

View File

@@ -10,10 +10,10 @@ breakpad independently, as a "browser" process. This patches
crash annotation.
diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc
index a3599b4403b7be33cb4aa300746c3ade962627de..342f16a4c8418c1e56703d8969d0f31d834ad74c 100644
index 72ee7e8df3d62eca301b08586f06d51711e941b5..fdd76ee1490e39dbfcd39bbff6686864a5c5af29 100644
--- a/components/crash/core/app/breakpad_linux.cc
+++ b/components/crash/core/app/breakpad_linux.cc
@@ -719,8 +719,13 @@ bool CrashDone(const MinidumpDescriptor& minidump,
@@ -716,8 +716,13 @@ bool CrashDone(const MinidumpDescriptor& minidump,
log_path[log_path_len] = '\0';
info.log_filename = log_path;
#endif
@@ -29,7 +29,7 @@ index a3599b4403b7be33cb4aa300746c3ade962627de..342f16a4c8418c1e56703d8969d0f31d
info.distro = base::g_linux_distro;
info.distro_length = my_strlen(base::g_linux_distro);
info.upload = upload;
@@ -2041,8 +2046,13 @@ void InitCrashReporter(const std::string& process_type) {
@@ -2023,8 +2028,13 @@ void InitCrashReporter(const std::string& process_type) {
process_type == kWebViewSingleProcessType ||
process_type == kBrowserProcessType ||
#endif

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 31f563dd4d59ce23c1c6e31aa80c68089e5f2195..1a6b644ce88a5aece4382b66479da60e21194564 100644
index 732db68d17821b29041dd387e7e00b305c52a34c..d81a915e77a4dff952e6e81df7937292f4899d7d 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -73,6 +73,7 @@

View File

@@ -14,7 +14,7 @@ tradeoff is that switching from MAS_BUILD to !MAS_BUILD or vice-versa will
rebuild the entire tree.
diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 284a7da8868dc7fc46768c9ea92cc1506d887c02..d66ed569ada79aa1ee728989cb1f9809e30a9155 100644
index e011502180b5a94bd32bcebb301c91314d12653e..12569e571f52a07ea5e9b104314427df1ccb558f 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -123,6 +123,9 @@ if (current_os == "") {
@@ -27,7 +27,7 @@ index 284a7da8868dc7fc46768c9ea92cc1506d887c02..d66ed569ada79aa1ee728989cb1f9809
# Set to enable the official build level of optimization. This has nothing
# to do with branding, but enables an additional level of optimization above
# release (!is_debug). This might be better expressed as a tri-state
@@ -439,6 +442,7 @@ default_compiler_configs = [
@@ -440,6 +443,7 @@ default_compiler_configs = [
"//build/config/compiler/pgo:default_pgo_flags",
"//build/config/coverage:default_coverage",
"//build/config/sanitizers:default_sanitizer_flags",

View File

@@ -9,10 +9,10 @@ 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 1483547eff57f9d3ee6e1874ac733f88a0c5093b..ccb2a4790d2a8b709011529ecd5fda1ba0e0ab22 100644
index 795238249222dd246c2254434a4454b9d2aedd7c..ca9463ee9326816fca51d1ef75634973a12cd4b9 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -4661,6 +4661,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -4883,6 +4883,7 @@ void RenderFrameHostImpl::CreateNewWindow(
last_committed_origin_, params->window_container_type,
params->target_url, params->referrer.To<Referrer>(),
params->frame_name, params->disposition, *params->features,
@@ -21,10 +21,10 @@ index 1483547eff57f9d3ee6e1874ac733f88a0c5093b..ccb2a4790d2a8b709011529ecd5fda1b
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 3d2866b5748e74e8e99dc37352ba7534c816b29b..502893ba5219f64ed9c84f83c40b28188966d2a0 100644
index b92cebd04eacb5b6fa3ff3d4c06388e7c8eac942..3ab23d0c634e8379573a4d818bbbe6200a88d073 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3089,9 +3089,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
@@ -3420,9 +3420,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
}
if (delegate_) {
@@ -36,12 +36,12 @@ index 3d2866b5748e74e8e99dc37352ba7534c816b29b..502893ba5219f64ed9c84f83c40b2818
+ params, new_contents_impl);
}
for (auto& observer : observers_) {
observers_.ForEachObserver([&](WebContentsObserver* observer) {
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index eff5643a896cfb16fce10306ec4a40dd89ccce71..e5c32de563f673aa4da61c93292a767fce3cfe57 100644
index c969ed9b17b915f713d9b82114c7b637c8fd90df..9530a1936b0a801a4c6152dd53ec5105d5d712e0 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -283,6 +283,10 @@ struct CreateNewWindowParams {
@@ -264,6 +264,10 @@ struct CreateNewWindowParams {
// The window features to use for the new window.
blink.mojom.WindowFeatures features;
@@ -53,10 +53,10 @@ index eff5643a896cfb16fce10306ec4a40dd89ccce71..e5c32de563f673aa4da61c93292a767f
// 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 762329d64784898db41d167cd8d4865bfff02830..2e1b2be0a96ef14e0d5d0cec0ce114ad97b4bf37 100644
index 479e52d0c08050704f65fbf02779261446a107fe..0e150a89b451e7ae464f1bd5e38c412f58aa8568 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -531,6 +531,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -543,6 +543,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -66,10 +66,10 @@ index 762329d64784898db41d167cd8d4865bfff02830..2e1b2be0a96ef14e0d5d0cec0ce114ad
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 f800969fb25cac51a7f6732e37d3d1cecf906557..f2b64eb90f80c94a9b8a7374b5733a609446346b 100644
index 5f73f4713eae097b544ba38c4117621d3a1b77e4..170beaff3f579d3fcf9c461f6a41350e8c9439cc 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -147,6 +147,7 @@ class NetworkService;
@@ -149,6 +149,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@@ -77,7 +77,7 @@ index f800969fb25cac51a7f6732e37d3d1cecf906557..f2b64eb90f80c94a9b8a7374b5733a60
} // namespace network
namespace sandbox {
@@ -857,6 +858,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -869,6 +870,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -87,7 +87,7 @@ index f800969fb25cac51a7f6732e37d3d1cecf906557..f2b64eb90f80c94a9b8a7374b5733a60
bool opener_suppressed,
bool* no_javascript_access);
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index b30f242d2b61b10f68f016bc1e93419b520d3b06..bfbad0007797d9c3fff78fae121aa2546b22eb95 100644
index 5631ce92ac15737d4aff4d08e4a285bc507b6d47..04428e426ff43570deb01edf33400824f9a5206c 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -26,6 +26,17 @@ namespace content {
@@ -109,7 +109,7 @@ index b30f242d2b61b10f68f016bc1e93419b520d3b06..bfbad0007797d9c3fff78fae121aa254
const OpenURLParams& params) {
return nullptr;
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index cca58342b48bb6b139b177954eee400ccd4951d8..a43cdce2859c25d0749a9ad87e54f19f0ae7b023 100644
index 61ed37a5868fd53f669d40c62542d6271daea91d..c1d7b01d0d63f9f1ba90a32511f69318c9ec10fb 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -17,6 +17,7 @@
@@ -135,7 +135,7 @@ index cca58342b48bb6b139b177954eee400ccd4951d8..a43cdce2859c25d0749a9ad87e54f19f
// typically happens when popups are created.
virtual void WebContentsCreated(WebContents* source_contents,
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 6c2ad75a5fd7d7f21aacd0430029ff9716a87e3c..d9792ba47cf8621549676564ef4c162b0714d45d 100644
index 49619a9b5683a3e53c53c9b750c6ea6a0efc92b2..e7c03ac99a0a9cf80d65797a81065f8997cf4646 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -67,6 +67,7 @@
@@ -146,7 +146,7 @@ index 6c2ad75a5fd7d7f21aacd0430029ff9716a87e3c..d9792ba47cf8621549676564ef4c162b
#include "content/renderer/media/audio/audio_device_factory.h"
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_frame_proxy.h"
@@ -1229,6 +1230,10 @@ WebView* RenderViewImpl::CreateView(
@@ -1209,6 +1210,10 @@ WebView* RenderViewImpl::CreateView(
}
params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
@@ -158,10 +158,10 @@ index 6c2ad75a5fd7d7f21aacd0430029ff9716a87e3c..d9792ba47cf8621549676564ef4c162b
// 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 955bec3a920365a6c0d682b9ac4935cd8d242f5f..16956bed44b7e211b2b464bd136c950609129980 100644
index c22aeb8e80440061f33271762b373912ef30cc48..5418efe944e0e897adb754f790ba8182c20f87ec 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
@@ -365,6 +365,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -381,6 +381,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -171,10 +171,10 @@ index 955bec3a920365a6c0d682b9ac4935cd8d242f5f..16956bed44b7e211b2b464bd136c9506
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 150d1a8808d326d4ca9d445fa92ec08c95e02b62..5c837fcbe7ee66d6f500e4453fe56ca7b32394cf 100644
index a79ff68cb0a9fa9f65b780c06df4b62696e34891..70c0073aac1e7b133b847d62ef4d87293ec5956c 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
@@ -76,6 +76,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
@@ -77,6 +77,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -206,10 +206,10 @@ index 4f735ad0d97eaac9a57dad137e479f8a7ec33a36..0a3c5821962c85609b64b3625fa6b8d6
} // namespace blink
diff --git a/third_party/blink/renderer/core/frame/local_dom_window.cc b/third_party/blink/renderer/core/frame/local_dom_window.cc
index d0e5c20a2a1e5807a645488cc4832e02b3f2a5ad..a8a7cef09e81a19906558a0243efa9d3a8498f3c 100644
index 7a4451acee7822fc525d000f7b54a9922b1bd788..3c950eaa5bfb98b398a4daaec182745e87cc73d2 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -1976,6 +1976,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -1915,6 +1915,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
}
WebWindowFeatures window_features = GetWindowFeaturesFromString(features);

View File

@@ -1,24 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <marshallofsound@electronjs.org>
Date: Mon, 6 Jul 2020 20:49:19 -0700
Subject: chore: add allocator patches for apple silicon
Once these are available upstream we can remove this patch.
diff --git a/base/mac/mac_util.h b/base/mac/mac_util.h
index e24439cee6c81afc74bfcb557cbdab6785a32794..f84128e76f380a86b74d354787c741c2217b6b69 100644
--- a/base/mac/mac_util.h
+++ b/base/mac/mac_util.h
@@ -132,6 +132,12 @@ DEFINE_IS_OS_FUNCS(15, TEST_DEPLOYMENT_TARGET)
DEFINE_IS_OS_FUNCS(15, IGNORE_DEPLOYMENT_TARGET)
#endif
+#ifdef MAC_OS_X_VERSION_10_16
+DEFINE_IS_OS_FUNCS(16, TEST_DEPLOYMENT_TARGET)
+#else
+DEFINE_IS_OS_FUNCS(16, IGNORE_DEPLOYMENT_TARGET)
+#endif
+
#undef IGNORE_DEPLOYMENT_TARGET
#undef TEST_DEPLOYMENT_TARGET
#undef DEFINE_IS_OS_FUNCS_CR_MIN_REQUIRED

View File

@@ -1,26 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <marshallofsound@electronjs.org>
Date: Mon, 6 Jul 2020 20:52:09 -0700
Subject: chore: disable failing blink font DCHECK on Big Sur
Once these are available upstream we can remove this patch.
diff --git a/third_party/blink/renderer/platform/fonts/mac/font_platform_data_mac.mm b/third_party/blink/renderer/platform/fonts/mac/font_platform_data_mac.mm
index d6abddab51bc95768467b3d84a55e07dec262f26..0678c9d30e162beb9fec6f98ae82e31b042723cf 100644
--- a/third_party/blink/renderer/platform/fonts/mac/font_platform_data_mac.mm
+++ b/third_party/blink/renderer/platform/fonts/mac/font_platform_data_mac.mm
@@ -59,10 +59,10 @@ bool VariableAxisChangeEffective(SkTypeface* typeface,
return false;
SkFontParameters::Variation::Axis axes_parameters[num_axes];
- int returned_axes =
- typeface->getVariationDesignParameters(axes_parameters, num_axes);
- DCHECK_EQ(num_axes, returned_axes);
- DCHECK_GE(num_axes, 0);
+ // int returned_axes =
+ // typeface->getVariationDesignParameters(axes_parameters, num_axes);
+ // DCHECK_EQ(num_axes, returned_axes);
+ // DCHECK_GE(num_axes, 0);
float clamped_new_value = new_value;
for (auto& axis_parameters : axes_parameters) {

View File

@@ -7,10 +7,10 @@ spellchecker uses a few IDS_ resources. We need to load these from
Electrons grit header instead of Chromes
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 1a43043910b445d2195e173f26e9b0b39abc88ff..fab18a88d821edea23e5bc9db771ad4f233749b2 100644
index 178c8d95431e9bcfa7a3beae42d950451d78c047..781eee7436868d164549aa2932685223cdd7aca5 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -5528,6 +5528,7 @@ static_library("browser") {
@@ -5602,6 +5602,7 @@ static_library("browser") {
deps += [
"//components/spellcheck/browser",
"//components/spellcheck/common",
@@ -19,7 +19,7 @@ index 1a43043910b445d2195e173f26e9b0b39abc88ff..fab18a88d821edea23e5bc9db771ad4f
if (!is_android) {
diff --git a/chrome/browser/spellchecker/spellcheck_factory.cc b/chrome/browser/spellchecker/spellcheck_factory.cc
index cf9c14cddfdf94d3819f42918ac3687b7b005e44..1379322e526fad5735c8caaaf813ca540534b3b8 100644
index 2b7aa1add57dccbcbf8202cead5b7d2d5a174270..2ba03fc045f2e4bb12f173aacb6581ccb20bfc5a 100644
--- a/chrome/browser/spellchecker/spellcheck_factory.cc
+++ b/chrome/browser/spellchecker/spellcheck_factory.cc
@@ -6,7 +6,7 @@
@@ -44,10 +44,10 @@ index f28230ea94fece5ae8ca7ac27a14da48f40fadbb..c10eea103852b9411a644e1fe20a7e20
]
}
diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc
index 201dc7786e822d54b5d9ab8a9d02e7b4339a8d6d..a3232da24513b408403f9f7c033dcd2f3222da47 100644
index 9223b194237b0d7b4df7a9d47e00d14fbcabf2d7..dfd916986804f5ffa8ec8a7e29ad507fb4d1a5aa 100644
--- a/components/language/core/browser/language_prefs.cc
+++ b/components/language/core/browser/language_prefs.cc
@@ -21,7 +21,7 @@
@@ -20,7 +20,7 @@
#include "components/pref_registry/pref_registry_syncable.h"
#include "components/prefs/pref_service.h"
#include "components/prefs/scoped_user_pref_update.h"

View File

@@ -74,7 +74,7 @@ index 6052fd13ff3d63cf8a4b019b058efb61aad39c3b..42eac7a7b656096c1d2039e340037ac8
}
return VKEY_UNKNOWN;
}
@@ -193,7 +199,10 @@ CGEventRef MediaKeysListenerImpl::EventTapCallback(CGEventTapProxy proxy,
@@ -193,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 &&

View File

@@ -8,7 +8,7 @@ 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 50536c86ff6be648bbbfd01551a5c140ffc75b67..1a1c8102df1ea1d210146672167ae4c3e12f0f1d 100644
index 5bcf1709d610438ff8ebc37dc65ed4d5e01ece7e..1a4f1aff0644412bdff44be7b859d5e8b4508a72 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1436,7 +1436,7 @@ void BrowserMainLoop::MainMessageLoopRun() {

View File

@@ -13,7 +13,7 @@ Ultimately we should remove the option to disable compression, and
subsequently remove this patch.
diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc
index 342f16a4c8418c1e56703d8969d0f31d834ad74c..454e1c0d58a39cbf23da32f56af7cdf16e9085f0 100644
index fdd76ee1490e39dbfcd39bbff6686864a5c5af29..4e717ba90066bc75bf173b5027100a05cc1c8749 100644
--- a/components/crash/core/app/breakpad_linux.cc
+++ b/components/crash/core/app/breakpad_linux.cc
@@ -109,6 +109,8 @@ void SetUploadURL(const std::string& url) {
@@ -25,7 +25,7 @@ index 342f16a4c8418c1e56703d8969d0f31d834ad74c..454e1c0d58a39cbf23da32f56af7cdf1
#endif
bool g_is_node = false;
@@ -1336,56 +1338,60 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
@@ -1320,56 +1322,60 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
#else // defined(OS_CHROMEOS)
@@ -127,7 +127,7 @@ index 342f16a4c8418c1e56703d8969d0f31d834ad74c..454e1c0d58a39cbf23da32f56af7cdf1
static const char header_msg[] =
"--header=Content-Type: multipart/form-data; boundary=";
const size_t header_content_type_size =
@@ -1412,7 +1418,8 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
@@ -1396,7 +1402,8 @@ void ExecUploadProcessOrTerminate(const BreakpadInfo& info,
static const char kWgetBinary[] = "/usr/bin/wget";
const char* args[] = {
kWgetBinary,
@@ -137,7 +137,7 @@ index 342f16a4c8418c1e56703d8969d0f31d834ad74c..454e1c0d58a39cbf23da32f56af7cdf1
header_content_type,
post_file,
g_upload_url,
@@ -2055,6 +2062,7 @@ void InitCrashReporter(const std::string& process_type) {
@@ -2037,6 +2044,7 @@ void InitCrashReporter(const std::string& process_type) {
#if !defined(OS_CHROMEOS)
SetUploadURL(GetCrashReporterClient()->GetUploadUrl());

View File

@@ -9,7 +9,7 @@ rate-limiting, compression and global annotations.
This should be upstreamed.
diff --git a/components/crash/core/app/breakpad_linux.cc b/components/crash/core/app/breakpad_linux.cc
index d2ca4a9056e56c1e3e38a5aeaf97daa3a731de3c..a3599b4403b7be33cb4aa300746c3ade962627de 100644
index 9b07ab4667e691c0c8db4c71251b04d0cdf71ff3..72ee7e8df3d62eca301b08586f06d51711e941b5 100644
--- a/components/crash/core/app/breakpad_linux.cc
+++ b/components/crash/core/app/breakpad_linux.cc
@@ -111,6 +111,7 @@ void SetUploadURL(const std::string& url) {
@@ -21,10 +21,10 @@ index d2ca4a9056e56c1e3e38a5aeaf97daa3a731de3c..a3599b4403b7be33cb4aa300746c3ade
uint64_t g_process_start_time = 0;
pid_t g_pid = 0;
diff --git a/components/crash/core/app/crash_reporter_client.cc b/components/crash/core/app/crash_reporter_client.cc
index 44e81b2f95f6332df16cfa00bdd26c7abbc733dc..9b3db694b920048735789d4db0f8670addd22b40 100644
index d18efa945502bfbb7f2d6fe659472f8e495600da..0acaaaeb6aa80747c9230ec81419cae884444c5e 100644
--- a/components/crash/core/app/crash_reporter_client.cc
+++ b/components/crash/core/app/crash_reporter_client.cc
@@ -148,6 +148,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
@@ -140,6 +140,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
return false;
}
@@ -43,7 +43,7 @@ index 44e81b2f95f6332df16cfa00bdd26c7abbc733dc..9b3db694b920048735789d4db0f8670a
unsigned int CrashReporterClient::GetCrashDumpPercentage() {
return 100;
diff --git a/components/crash/core/app/crash_reporter_client.h b/components/crash/core/app/crash_reporter_client.h
index 05538423d0b9ad0d83e9326a58f8856e0403fed2..06d9f1e3b57db5cf33555eb5ad837f8d66aa8b3d 100644
index 1f33fd0baf1e8bed001260184e9d34cb77313b03..63c09694bedf3995235a1755d35d4d78ed32619a 100644
--- a/components/crash/core/app/crash_reporter_client.h
+++ b/components/crash/core/app/crash_reporter_client.h
@@ -5,6 +5,7 @@
@@ -54,7 +54,7 @@ index 05538423d0b9ad0d83e9326a58f8856e0403fed2..06d9f1e3b57db5cf33555eb5ad837f8d
#include <string>
#include "base/strings/string16.h"
@@ -150,6 +151,19 @@ class CrashReporterClient {
@@ -145,6 +146,19 @@ class CrashReporterClient {
// that case, |breakpad_enabled| is set to the value enforced by policies.
virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled);
@@ -75,10 +75,10 @@ index 05538423d0b9ad0d83e9326a58f8856e0403fed2..06d9f1e3b57db5cf33555eb5ad837f8d
// Used by WebView to sample crashes without generating the unwanted dumps. If
// the returned value is less than 100, crash dumping will be sampled to that
diff --git a/components/crash/core/app/crashpad_mac.mm b/components/crash/core/app/crashpad_mac.mm
index 0b594d053d7c7f2a8eae9a15e62daacab52ffa64..96210530f699a2331f57415beddc20ed19b9cb4b 100644
index aa7c3302f2e3fc7129381b355ed4fa1bc386f8cb..d7dd05118f3c90f5ab570f59685c43bd180885e5 100644
--- a/components/crash/core/app/crashpad_mac.mm
+++ b/components/crash/core/app/crashpad_mac.mm
@@ -67,6 +67,8 @@ std::map<std::string, std::string> GetProcessSimpleAnnotations() {
@@ -71,6 +71,8 @@
} // @autoreleasepool
return process_annotations;
}();
@@ -87,7 +87,7 @@ index 0b594d053d7c7f2a8eae9a15e62daacab52ffa64..96210530f699a2331f57415beddc20ed
return annotations;
}
@@ -137,6 +139,13 @@ base::FilePath PlatformCrashpadInitialization(
@@ -141,6 +143,13 @@ void DumpProcessWithoutCrashing(task_t task_port) {
std::vector<std::string> arguments;

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 954d5401b71bb090c1c533783398298f28eeefbd..dd9051afe099cb1ef3aebb825cf05c347b4abbf4 100644
index e026cf1322138009de75accc0e332e1e88267030..739e3ccb60d7a81fdb9af42b50d7ef8cd2811ff3 100644
--- a/content/browser/frame_host/navigation_controller_impl.cc
+++ b/content/browser/frame_host/navigation_controller_impl.cc
@@ -1271,8 +1271,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
@@ -1279,8 +1279,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
return NAVIGATION_TYPE_NEW_SUBFRAME;
}
@@ -33,7 +33,7 @@ index 954d5401b71bb090c1c533783398298f28eeefbd..dd9051afe099cb1ef3aebb825cf05c34
if (rfh->GetParent()) {
// All manual subframes would be did_create_new_entry and handled above, so
@@ -1528,7 +1530,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
@@ -1555,7 +1557,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewPage(
new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
}

View File

@@ -19,10 +19,10 @@ https://chromium-review.googlesource.com/c/chromium/src/+/1901591, we should try
re-submitting the patch.
diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc
index 8ca7ccfad7d9d8f874f7a6a0507c787492f99ecb..40a17e6f4a0ee9e7490a32d1307dd74dd0f923d6 100644
index 436d3628cc37df2612adbe2da6bbddd66c737ca4..51e0655bc3bce3640e26952513f1619f14cdf997 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -662,7 +662,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
@@ -663,7 +663,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
}
#endif

View File

@@ -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 af3a6dab055f2e2215e4602697dbe35507b7ed96..fcb06b764b618fe7162243b6e52e53261b473bee 100644
index e08e556858e4079d953027399e04056f62e2db78..2aa72571e44a9027d5bd84498d65f835da87935b 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -10,13 +10,14 @@

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 c389d38fbf98374a2c7677a95624eb87c1466b3f..e90709822d6d0462931efc979c00586749c01a3c 100644
index 5c87f4ea0d6426606a1001f51aea1aa8b0ecaa8b..16fa2e95b89b569c76b57c1a57d0336ac3b8ea54 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1857,6 +1857,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
@@ -1748,6 +1748,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace(
gfx::ContentColorUsage content_color_usage) const {
@@ -48,7 +48,7 @@ index eaff59cabf659c0d3ffe46c394c51b6d30c05806..899be4f3d9cdb82e03d34ee940f26af8
// Image Decode Service and raster tiles without images until the decode is
// ready.
diff --git a/components/viz/common/display/renderer_settings.h b/components/viz/common/display/renderer_settings.h
index 758390280505913d1562dd84e6333924ded0d68f..32856ca4132c205bc142bf033e4f6d5d84f74329 100644
index 733d83e802b0c99d5d237ab5d0deea2385c4e899..f3dc39b3bd3e85cd7f68b81210b3bd64b8ae37ee 100644
--- a/components/viz/common/display/renderer_settings.h
+++ b/components/viz/common/display/renderer_settings.h
@@ -23,6 +23,7 @@ class VIZ_COMMON_EXPORT RendererSettings {
@@ -60,18 +60,18 @@ index 758390280505913d1562dd84e6333924ded0d68f..32856ca4132c205bc142bf033e4f6d5d
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 02a2c735ff694c4890b5fb6a148724b3650c7346..817a7e1a6a5c244d744c56baa1062946f16c15d8 100644
index b06ea5f9fe36162dc9bcec32f604b1a8fc10f825..d53e7a0055dbdfe937a51939a312272317749f2a 100644
--- a/components/viz/host/renderer_settings_creation.cc
+++ b/components/viz/host/renderer_settings_creation.cc
@@ -14,6 +14,7 @@
@@ -16,6 +16,7 @@
#include "components/viz/common/features.h"
#include "components/viz/common/switches.h"
#include "ui/base/ui_base_switches.h"
+#include "ui/gfx/switches.h"
#if defined(OS_MACOSX)
#if defined(OS_APPLE)
#include "ui/base/cocoa/remote_layer_api.h"
@@ -51,6 +52,8 @@ bool GetSwitchValueAsInt(const base::CommandLine* command_line,
@@ -53,6 +54,8 @@ bool GetSwitchValueAsInt(const base::CommandLine* command_line,
RendererSettings CreateRendererSettings() {
RendererSettings renderer_settings;
base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
@@ -79,9 +79,9 @@ index 02a2c735ff694c4890b5fb6a148724b3650c7346..817a7e1a6a5c244d744c56baa1062946
+ !command_line->HasSwitch(switches::kDisableColorCorrectRendering);
renderer_settings.partial_swap_enabled =
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
#if defined(OS_MACOSX)
#if defined(OS_APPLE)
diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
index a87c1992018071ecce8e4a640abebfeaf4e742eb..80ac0ab3b0edb12ca1846b8960143659775dbfa1 100644
index 3dc5c652835653a70e0bc87f33525c401aec8ed2..5b524aa6eb50a1dc816e04841c60a690c83e4a8c 100644
--- a/components/viz/service/display/gl_renderer.cc
+++ b/components/viz/service/display/gl_renderer.cc
@@ -89,6 +89,9 @@
@@ -94,7 +94,7 @@ index a87c1992018071ecce8e4a640abebfeaf4e742eb..80ac0ab3b0edb12ca1846b8960143659
namespace viz {
namespace {
@@ -592,8 +595,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
@@ -596,8 +599,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) {
SetBlendEnabled(quad->ShouldDrawWithBlending());
@@ -106,7 +106,7 @@ index a87c1992018071ecce8e4a640abebfeaf4e742eb..80ac0ab3b0edb12ca1846b8960143659
// Use the full quad_rect for debug quads to not move the edges based on
// partial swaps.
@@ -1564,7 +1568,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
@@ -1574,7 +1578,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
params->use_color_matrix, tint_gl_composited_content_,
params->apply_shader_based_rounded_corner &&
ShouldApplyRoundedCorner(params->quad)),
@@ -116,7 +116,7 @@ index a87c1992018071ecce8e4a640abebfeaf4e742eb..80ac0ab3b0edb12ca1846b8960143659
}
void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) {
@@ -2035,7 +2040,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
@@ -2045,7 +2050,8 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA,
tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@@ -126,7 +126,7 @@ index a87c1992018071ecce8e4a640abebfeaf4e742eb..80ac0ab3b0edb12ca1846b8960143659
SetShaderColor(color, opacity);
if (current_program_->rounded_corner_rect_location() != -1) {
SetShaderRoundedCorner(
@@ -2190,7 +2196,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
@@ -2200,7 +2206,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
: NON_PREMULTIPLIED_ALPHA,
false, false, tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@@ -136,7 +136,7 @@ index a87c1992018071ecce8e4a640abebfeaf4e742eb..80ac0ab3b0edb12ca1846b8960143659
if (current_program_->tint_color_matrix_location() != -1) {
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
@@ -2286,7 +2293,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
@@ -2296,7 +2303,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
!quad->ShouldDrawWithBlending(), has_tex_clamp_rect,
tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@@ -146,7 +146,7 @@ index a87c1992018071ecce8e4a640abebfeaf4e742eb..80ac0ab3b0edb12ca1846b8960143659
if (current_program_->tint_color_matrix_location() != -1) {
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
@@ -2388,7 +2396,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
@@ -2397,7 +2405,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
// The source color space should never be RGB.
DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB());
@@ -156,7 +156,7 @@ index a87c1992018071ecce8e4a640abebfeaf4e742eb..80ac0ab3b0edb12ca1846b8960143659
#if defined(OS_WIN)
// Force sRGB output on Windows for overlay candidate video quads to match
@@ -2552,7 +2561,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
@@ -2563,7 +2572,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
SetUseProgram(ProgramKey::VideoStream(tex_coord_precision,
ShouldApplyRoundedCorner(quad)),
@@ -166,29 +166,29 @@ index a87c1992018071ecce8e4a640abebfeaf4e742eb..80ac0ab3b0edb12ca1846b8960143659
DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
@@ -2617,8 +2627,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
@@ -2628,8 +2638,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR);
// Bind the program to the GL state.
- SetUseProgram(draw_cache_.program_key, locked_quad.color_space(),
- CurrentRenderPassColorSpace());
- CurrentRenderPassColorSpace(),
+ SetUseProgram(draw_cache_.program_key, PATCH_CS(locked_quad.color_space()),
+ PATCH_CS(CurrentRenderPassColorSpace()));
+ PATCH_CS(CurrentRenderPassColorSpace()),
/*adjust_src_white_level=*/draw_cache_.is_video_frame);
if (current_program_->rounded_corner_rect_location() != -1) {
SetShaderRoundedCorner(
@@ -3363,7 +3373,9 @@ void GLRenderer::PrepareGeometry(BoundGeometry binding) {
void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
@@ -3376,7 +3386,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
const gfx::ColorSpace& src_color_space,
const gfx::ColorSpace& dst_color_space) {
const gfx::ColorSpace& dst_color_space,
bool adjust_src_white_level) {
- DCHECK(dst_color_space.IsValid());
+ if (settings_->enable_color_correct_rendering) {
+ DCHECK(dst_color_space.IsValid());
+ }
// If the input color space is PQ, and it did not specify a white level,
// override it with the frame's white level.
@@ -3745,9 +3757,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
gfx::ColorSpace adjusted_src_color_space = src_color_space;
if (adjust_src_white_level) {
// If the input color space is HDR, and it did not specify a white level,
@@ -3759,9 +3771,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple);
}
@@ -201,7 +201,7 @@ index a87c1992018071ecce8e4a640abebfeaf4e742eb..80ac0ab3b0edb12ca1846b8960143659
*new_bounds = gfx::RectF(updated_dst_rect.origin(),
gfx::SizeF((*overlay_texture)->texture.size()));
@@ -3966,8 +3978,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
@@ -3980,8 +3992,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
PrepareGeometry(SHARED_BINDING);
@@ -212,17 +212,17 @@ index a87c1992018071ecce8e4a640abebfeaf4e742eb..80ac0ab3b0edb12ca1846b8960143659
gfx::Transform render_matrix;
render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
@@ -4089,3 +4101,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
@@ -4103,3 +4115,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
GLRenderer::OverlayTexture::~OverlayTexture() = default;
} // namespace viz
+
+#undef PATCH_CS
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index b8032917cce5224403304c5f41674533e3d59528..2e871204e8dc9bf13315ba9a1448ab7ce157180c 100644
index 9b200dbd44e0e5524276c8784c873fb720961baa..cef79334b88bf1b947360ed890fbf2f99eb1f483 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -220,6 +220,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@@ -221,6 +221,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
// Command-line switches to propagate to the GPU process.
static const char* const kSwitchNames[] = {
@@ -231,10 +231,10 @@ index b8032917cce5224403304c5f41674533e3d59528..2e871204e8dc9bf13315ba9a1448ab7c
sandbox::policy::switches::kGpuSandboxAllowSysVShm,
sandbox::policy::switches::kGpuSandboxFailuresFatal,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index f3b77a295f334ffa696f1085a4ca5c0c86479987..872f9d0ac32970950c9a552431c7613e87f1ad94 100644
index eb99c6f7ef7ca70c6d074d2d0aecd24da383ab76..b169770b27e21ebb2cb137b45c4ee66c4f71e878 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -225,6 +225,7 @@
@@ -226,6 +226,7 @@
#include "ui/accessibility/accessibility_switches.h"
#include "ui/base/ui_base_switches.h"
#include "ui/display/display_switches.h"
@@ -242,7 +242,7 @@ index f3b77a295f334ffa696f1085a4ca5c0c86479987..872f9d0ac32970950c9a552431c7613e
#include "ui/gl/gl_switches.h"
#include "ui/native_theme/native_theme_features.h"
#include "url/origin.h"
@@ -3271,6 +3272,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
@@ -3291,6 +3292,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[] = {
@@ -295,7 +295,7 @@ index 3dc0fb19b33daf14cbf8550cbb58e3e146830f26..da34be87f36c6e50286d0ef24cade531
}
diff --git a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
index d8a737f5008f3b60f4ac74592cb23f8b04c4577a..178b84bccb6ad131391dbb6c856df2e766b0d221 100644
index 95e818f1406eb1a73a746b73a608137ab5c6e894..6e1d3b3b1add4eda90560856b6915d46796d4b4b 100644
--- a/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
+++ b/third_party/blink/renderer/platform/widget/compositing/layer_tree_settings.cc
@@ -23,6 +23,7 @@
@@ -317,18 +317,18 @@ index d8a737f5008f3b60f4ac74592cb23f8b04c4577a..178b84bccb6ad131391dbb6c856df2e7
// is what the renderer uses if its not threaded.
settings.enable_checker_imaging =
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
index 2674784dca1ed12b2f5afc7b728e0c6e8cd6ca4a..93a9652b71d86441e15b87aafd7a6b1a13f45830 100644
index fdb5fbcff837f989ab73c04dd45c4b1d9f78d8da..34b46fbdc36b9655eb7ea09c25f72a39d0e511a7 100644
--- a/ui/gfx/mac/io_surface.cc
+++ b/ui/gfx/mac/io_surface.cc
@@ -16,6 +16,7 @@
@@ -18,6 +18,7 @@
#include "base/trace_event/trace_event.h"
#include "ui/gfx/buffer_format_util.h"
#include "ui/gfx/icc_profile.h"
+#include "ui/gfx/switches.h"
namespace gfx {
@@ -119,6 +120,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) {
#if defined(__MAC_11_0) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_16
// https://crbug.com/1108561: This is supposed to be deprecated (but available)
@@ -140,6 +141,14 @@ void IOSurfaceMachPortTraits::Release(mach_port_t port) {
// Common method used by IOSurfaceSetColorSpace and IOSurfaceCanSetColorSpace.
bool IOSurfaceSetColorSpace(IOSurfaceRef io_surface,
const ColorSpace& color_space) {
@@ -343,7 +343,7 @@ index 2674784dca1ed12b2f5afc7b728e0c6e8cd6ca4a..93a9652b71d86441e15b87aafd7a6b1a
// Allow but ignore invalid color spaces.
if (!color_space.IsValid())
return true;
@@ -253,6 +262,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size,
@@ -274,6 +283,15 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size,
DCHECK_EQ(kIOReturnSuccess, r);
}

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 b5e4f8fb0e914078ae40d034e1b785f77607bbea..e8a6199632a3110ae5d0238dfe3568df9224f353 100644
index 764d23f23ce2c7bc8068d0fbd97da08fd81b35dd..da3aac955c09c46fb7091d606bf0c4c8e7c6fa2f 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -478,7 +478,11 @@ void RenderWidgetHostViewMac::WasOccluded() {
@@ -478,7 +478,11 @@
return;
host()->WasHidden();

View File

@@ -6,10 +6,10 @@ Subject: disable_hidden.patch
Electron uses this to disable background throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc
index 0579758b91619b914b552e947bcba30c249945ec..6c729512a82fc384200565bd427e0c3065ed9d28 100644
index 7dcc21f67320402a88b4ce7d6606a1e7d4c46ea3..77bc5b22fd03af3e576b3bec10ac8b747b013937 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -723,6 +723,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -739,6 +739,9 @@ void RenderWidgetHostImpl::WasHidden() {
if (is_hidden_)
return;
@@ -20,10 +20,10 @@ index 0579758b91619b914b552e947bcba30c249945ec..6c729512a82fc384200565bd427e0c30
blink::mojom::PointerLockResult::kWrongDocument);
diff --git a/content/browser/renderer_host/render_widget_host_impl.h b/content/browser/renderer_host/render_widget_host_impl.h
index 168049a5efc1f7816328e66c95ecf7353853a571..deeb6970b8e8b473a1bcf63dab57b73edfc13124 100644
index ec4696ba8628cef696c0a7147a0cc6c95d409089..b4cf9688ee7599f6892dd741908a056c076b6151 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -174,6 +174,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -175,6 +175,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// RenderWidgetHostImpl.
static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
@@ -34,7 +34,7 @@ index 168049a5efc1f7816328e66c95ecf7353853a571..deeb6970b8e8b473a1bcf63dab57b73e
const base::TimeDelta& delay) {
new_content_rendering_delay_ = delay;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index b736fef38e6f27bf16e60efe9464f342b74a50e9..9f2e1974ff7b7f4970a23accde1d9285b8bf001a 100644
index dc010ee921dd606f04c8c176f4e3d90047f2c297..f97062555915eaab5c941e1793dafd4628b94d84 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -622,7 +622,7 @@ void RenderWidgetHostViewAura::HideImpl() {

View File

@@ -33,7 +33,7 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970
DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
};
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index e4d92e5fe7c8a0adaa9852631554878b9c7aa541..4c5e55396ee2115c67d711613f65b7e116ec1023 100644
index f5ef11a3bed2a5eb3f699f9ee0ee37fbf5fe531a..7e01e5ef3fb8d548f2015b4de7d6834489a2bde0 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1082,6 +1082,13 @@ void NetworkContext::SetNetworkConditions(
@@ -51,7 +51,7 @@ index e4d92e5fe7c8a0adaa9852631554878b9c7aa541..4c5e55396ee2115c67d711613f65b7e1
// 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 4a06b262f880e6f15516e62960191dc1cdc829b9..37d4085272f39f451ca7a4b58c27b25771432c88 100644
index 75531d963c4ee8bb4197b30c93623e556f404155..26eeeef6e76a8a529377889b986aaf748c51912c 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -243,6 +243,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -63,10 +63,10 @@ index 4a06b262f880e6f15516e62960191dc1cdc829b9..37d4085272f39f451ca7a4b58c27b257
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 64b71f2bce79b52c81717e8f5ce87d7b7aa86242..41f5c3db2171cbe015dcb8c6a4436b94c377fec8 100644
index 0b97c9fe29f24b1305740506458b0b6a02263c3c..7dc2d14d47d395e3b8046cae8788c4e04bc8e7f3 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1050,6 +1050,9 @@ interface NetworkContext {
@@ -1061,6 +1061,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);
@@ -77,7 +77,7 @@ index 64b71f2bce79b52c81717e8f5ce87d7b7aa86242..41f5c3db2171cbe015dcb8c6a4436b94
SetAcceptLanguage(string new_accept_language);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index 0dfed1a77748e3a3efe3fdeb46996f7ca21bec33..f103c782922396a842bccae9dd3ca9f37f4da66e 100644
index ff4bb599026ce57e46d5dd9d017a07308c4e83cd..8a0f77aa2b4a054d9a4b24e6e81785dd8fc6a5ea 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -105,6 +105,7 @@ class TestNetworkContext : public mojom::NetworkContext {

View File

@@ -22,10 +22,10 @@ index 9e9de51e37ee46266c647bd9c0c27e02a42bf5f1..d16727bed1a99b8171d0c7c5c5b7f382
void MessagePort::Entangle(MessagePortDescriptor port) {
diff --git a/third_party/blink/renderer/core/messaging/message_port.h b/third_party/blink/renderer/core/messaging/message_port.h
index d30195fc3cf96279426c7c23fa6f99f7cd193b26..95dc5b61a01452e64e5008e772367897445ca312 100644
index 7a83dce5113dc77d3654997db09ff9bc4cfeb3e2..85987f99ee144060cee11719726eb823bf58c645 100644
--- a/third_party/blink/renderer/core/messaging/message_port.h
+++ b/third_party/blink/renderer/core/messaging/message_port.h
@@ -121,6 +121,13 @@ class CORE_EXPORT MessagePort : public EventTargetWithInlineData,
@@ -120,6 +120,13 @@ class CORE_EXPORT MessagePort : public EventTargetWithInlineData,
return GetAttributeEventListener(event_type_names::kMessageerror);
}

View File

@@ -13,10 +13,10 @@ 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 eee37be164598cda0601f3580d0cbf51a22f4c61..6b724ff4006182ed2a3d381637a923a28754caa0 100644
index 432c107708d5578326c4b796861d4bb662297c90..e830e10508218d1146a4b1343b2a8dc2d5e73569 100644
--- a/ui/native_theme/native_theme.cc
+++ b/ui/native_theme/native_theme.cc
@@ -249,6 +249,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors)
@@ -253,6 +253,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors)
NativeTheme::~NativeTheme() = default;
bool NativeTheme::ShouldUseDarkColors() const {
@@ -26,7 +26,7 @@ index eee37be164598cda0601f3580d0cbf51a22f4c61..6b724ff4006182ed2a3d381637a923a2
}
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index f4e9cc14b0b8406d255bbed56d98dcf61f24a405..e1b9298532b2676aa4d9cdacb15e9398be3ccc3f 100644
index e2ca7dd198390ebc923facd690904faeb8300e62..f2f53775abb0ba2954cbb3ec431d84c3e03ad6f8 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -392,6 +392,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -52,7 +52,7 @@ index f4e9cc14b0b8406d255bbed56d98dcf61f24a405..e1b9298532b2676aa4d9cdacb15e9398
// 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
@@ -527,6 +543,8 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -530,6 +546,8 @@ class NATIVE_THEME_EXPORT NativeTheme {
bool is_high_contrast_ = false;
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;

View File

@@ -13,7 +13,7 @@ other protocols to register their streaming behavior. MultibufferDataSource::Ass
then refers to the list so that it can correctly determine the data source's settings.
diff --git a/media/blink/multibuffer_data_source.cc b/media/blink/multibuffer_data_source.cc
index 0f6ae1fb8b4ff9f24ce3f407b7359e016fc6de5f..947812e1d877ad0c9434ea958598dd9a38227d46 100644
index d41162d5295a70ba48640610d3de39a73849ac4a..287b5294f28a4b74e967b9fbf796a859a38ad737 100644
--- a/media/blink/multibuffer_data_source.cc
+++ b/media/blink/multibuffer_data_source.cc
@@ -10,9 +10,11 @@
@@ -28,7 +28,7 @@ index 0f6ae1fb8b4ff9f24ce3f407b7359e016fc6de5f..947812e1d877ad0c9434ea958598dd9a
#include "media/base/media_log.h"
#include "media/blink/buffered_data_source_host_impl.h"
#include "media/blink/multibuffer_reader.h"
@@ -65,10 +67,22 @@ const int kUpdateBufferSizeFrequency = 32;
@@ -59,10 +61,22 @@ const int kUpdateBufferSizeFrequency = 32;
// How long to we delay a seek after a read?
constexpr base::TimeDelta kSeekDelay = base::TimeDelta::FromMilliseconds(20);
@@ -51,7 +51,7 @@ index 0f6ae1fb8b4ff9f24ce3f407b7359e016fc6de5f..947812e1d877ad0c9434ea958598dd9a
class MultibufferDataSource::ReadOperation {
public:
ReadOperation(int64_t position,
@@ -158,7 +172,14 @@ bool MultibufferDataSource::media_has_played() const {
@@ -152,7 +166,14 @@ bool MultibufferDataSource::media_has_played() const {
bool MultibufferDataSource::AssumeFullyBuffered() const {
DCHECK(url_data_);
@@ -68,10 +68,10 @@ index 0f6ae1fb8b4ff9f24ce3f407b7359e016fc6de5f..947812e1d877ad0c9434ea958598dd9a
void MultibufferDataSource::SetReader(MultiBufferReader* reader) {
diff --git a/media/blink/multibuffer_data_source.h b/media/blink/multibuffer_data_source.h
index 3da5a7bba5e7cc0f54998a81649f4dd9d78aa7be..938ae6ebc92315b3a75019c3bc8c9058106f7695 100644
index 013ce7404ddba2a02bea78a72b535377e8d4e17c..9a283e238f8b1f0cca7f1ca2d3d68847529e0f7c 100644
--- a/media/blink/multibuffer_data_source.h
+++ b/media/blink/multibuffer_data_source.h
@@ -30,6 +30,8 @@ class BufferedDataSourceHost;
@@ -31,6 +31,8 @@ class BufferedDataSourceHost;
class MediaLog;
class MultiBufferReader;

View File

@@ -6,10 +6,10 @@ Subject: feat: allow disabling blink scheduler throttling per RenderView
This allows us to disable throttling for hidden windows.
diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc
index d34b836b842cb5c82f79bf2aa9d8334077422cbf..c56d26581500de448ded221a7b872b1d7d365aac 100644
index 79d364af3582014f71e7d0d9cff870e802f5d40b..4fd0c9fa5cf930361f45f46596463cd3d20308e2 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -511,6 +511,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -525,6 +525,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
@@ -21,7 +21,7 @@ index d34b836b842cb5c82f79bf2aa9d8334077422cbf..c56d26581500de448ded221a7b872b1d
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 e00204b089349c6356acaac6a8918c8b74936486..b77b8028772f9e1afdc62606094defbe40074fbe 100644
index a66502aebe95f17a7f8b562d0cf4296da77ecb38..a838821ebd19a86c32bcadd2a00000814de56e77 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -110,6 +110,7 @@ class CONTENT_EXPORT RenderViewHostImpl
@@ -29,11 +29,11 @@ index e00204b089349c6356acaac6a8918c8b74936486..b77b8028772f9e1afdc62606094defbe
bool IsRenderViewLive() override;
void NotifyMoveOrResizeStarted() override;
+ void SetSchedulerThrottling(bool allowed) override;
WebPreferences GetWebkitPreferences() override;
void UpdateWebkitPreferences(const WebPreferences& prefs) override;
void OnWebkitPreferencesChanged() override;
void SendWebPreferencesToRenderer();
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index 19fa7ac26926231b01fe19f7adf62dd0e08edb1b..d4d3b97811a656d40884d7e4b872fdf72dfb11fa 100644
index 1a18cbf17c044f78667feabfebdaf3552ee00c60..5b47f89909c372fb7fc6d00a07847cf660411ed1 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -94,6 +94,9 @@ IPC_STRUCT_TRAITS_END()
@@ -47,24 +47,24 @@ index 19fa7ac26926231b01fe19f7adf62dd0e08edb1b..d4d3b97811a656d40884d7e4b872fdf7
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 dfd856eb481114fea9da3e26b4080c9a8473acf6..604a95a0427705eca523e91b08a136f806da68f0 100644
index 50601f801e08a90d8556007617a0310bc3bfe2e3..f1f03eb2eb91567cbda2f8b9abe9979ec7ba3e57 100644
--- a/content/public/browser/render_view_host.h
+++ b/content/public/browser/render_view_host.h
@@ -96,6 +96,9 @@ class CONTENT_EXPORT RenderViewHost : public IPC::Sender {
@@ -95,6 +95,9 @@ class CONTENT_EXPORT RenderViewHost : public IPC::Sender {
// started.
virtual void NotifyMoveOrResizeStarted() = 0;
+ // Disable/Enable scheduler throttling.
+ virtual void SetSchedulerThrottling(bool allowed) = 0;
+
// TODO(mustaq): Replace "Webkit" from the following three method names.
//
// Returns the current WebKit preferences. Note: WebPreferences is cached, so
private:
// This interface should only be implemented inside content.
friend class RenderViewHostImpl;
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index d9792ba47cf8621549676564ef4c162b0714d45d..d57a8432e8638036f309f317e6f857757ed54549 100644
index e7c03ac99a0a9cf80d65797a81065f8997cf4646..64ed7fa44cc2d04a67707459974c8568f7166a7b 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1165,6 +1165,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
@@ -1148,6 +1148,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
bool handled = true;
IPC_BEGIN_MESSAGE_MAP(RenderViewImpl, message)
@@ -73,7 +73,7 @@ index d9792ba47cf8621549676564ef4c162b0714d45d..d57a8432e8638036f309f317e6f85775
IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck)
IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences)
IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
@@ -1660,6 +1662,12 @@ bool RenderViewImpl::GetContentStateImmediately() {
@@ -1615,6 +1617,12 @@ bool RenderViewImpl::GetContentStateImmediately() {
return send_content_state_immediately_;
}
@@ -87,10 +87,10 @@ index d9792ba47cf8621549676564ef4c162b0714d45d..d57a8432e8638036f309f317e6f85775
webkit_preferences_ = prefs;
ApplyWebPreferences(webkit_preferences_, GetWebView());
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 8f81196e2f173fc5d055122ae510c236628cd6b5..f49baf8aad5ffc020f456cdc4c05d983066f32f3 100644
index 7467f976818c5614b890fa0cdaa4cc08bc10d494..4dd7f6e5949c2c749d192a88893298f89270d0bb 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -391,6 +391,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
@@ -387,6 +387,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
void OnSetHistoryOffsetAndLength(int history_offset, int history_length);
void OnSetRendererPrefs(
const blink::mojom::RendererPreferences& renderer_prefs);
@@ -99,10 +99,10 @@ index 8f81196e2f173fc5d055122ae510c236628cd6b5..f49baf8aad5ffc020f456cdc4c05d983
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 b5562d3ea4cec46f2a763caab823db3160331084..e88ae7c76397f51d07ccdb680ce2344a61c9aa38 100644
index 9e8f2404a58687353464fa86600696e1b46e9158..b3e78fe9bb232f650a4c12bbafd36d3fc4c500b3 100644
--- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h
@@ -388,6 +388,7 @@ class WebView {
@@ -395,6 +395,7 @@ class WebView {
// Scheduling -----------------------------------------------------------
virtual PageScheduler* Scheduler() const = 0;
@@ -111,10 +111,10 @@ index b5562d3ea4cec46f2a763caab823db3160331084..e88ae7c76397f51d07ccdb680ce2344a
// 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 fc961dd8c7e5285dc04c5e8e5f6f8eeecb49b50b..7ae0213d684f950a3f123ab3dff7343a675babf9 100644
index e42105c01b698fe891bd67a0e888e15aa805ce94..2ce7fdccf8af5f1daa2df41502ca55971dd7eb1e 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -3369,6 +3369,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3447,6 +3447,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@@ -128,7 +128,7 @@ index fc961dd8c7e5285dc04c5e8e5f6f8eeecb49b50b..7ae0213d684f950a3f123ab3dff7343a
void WebViewImpl::SetVisibilityState(
mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) {
@@ -3379,7 +3386,8 @@ void WebViewImpl::SetVisibilityState(
@@ -3457,7 +3464,8 @@ void WebViewImpl::SetVisibilityState(
}
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
GetPage()->GetPageScheduler()->SetPageVisible(
@@ -139,10 +139,10 @@ index fc961dd8c7e5285dc04c5e8e5f6f8eeecb49b50b..7ae0213d684f950a3f123ab3dff7343a
mojom::blink::PageVisibilityState WebViewImpl::GetVisibilityState() {
diff --git a/third_party/blink/renderer/core/exported/web_view_impl.h b/third_party/blink/renderer/core/exported/web_view_impl.h
index 395899d96358e2af8f7c6ca7f44ae1ec38bbe0ed..aee2b40effb2050f309e09642edf56e44859e714 100644
index dfa50fbdd17f13341fb425f7dc4b94c1abf42696..13c4e853445ed19b388caac9b98de91415f7f02f 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -329,6 +329,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -339,6 +339,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
LocalDOMWindow* PagePopupWindow() const;
PageScheduler* Scheduler() const override;
@@ -150,7 +150,7 @@ index 395899d96358e2af8f7c6ca7f44ae1ec38bbe0ed..aee2b40effb2050f309e09642edf56e4
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -681,6 +682,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -699,6 +700,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// WebViewImpl::Close while handling an input event.
bool debug_inside_input_handling_ = false;

View File

@@ -5,10 +5,10 @@ Subject: feat: allow embedders to add observers on created hunspell
dictionaries
diff --git a/chrome/browser/spellchecker/spellcheck_service.cc b/chrome/browser/spellchecker/spellcheck_service.cc
index d3dfa5e970db93ab71d701f72079194a5499fdfd..eab3b7bafa0f3571df8ca7f7ff561a0f46de8f59 100644
index 91f757ace16fd2b65080cd02a77f2267bc62ecaf..74387d4394e017e812821774475ee5703d134bf4 100644
--- a/chrome/browser/spellchecker/spellcheck_service.cc
+++ b/chrome/browser/spellchecker/spellcheck_service.cc
@@ -482,6 +482,9 @@ void SpellcheckService::LoadDictionaries() {
@@ -455,6 +455,9 @@ void SpellcheckService::LoadDictionaries() {
std::make_unique<SpellcheckHunspellDictionary>(
dictionary, platform_spellcheck_language, context_, this));
hunspell_dictionaries_.back()->AddObserver(this);
@@ -18,8 +18,8 @@ index d3dfa5e970db93ab71d701f72079194a5499fdfd..eab3b7bafa0f3571df8ca7f7ff561a0f
hunspell_dictionaries_.back()->Load();
}
@@ -514,6 +517,20 @@ SpellcheckService::GetHunspellDictionaries() {
return hunspell_dictionaries_;
@@ -507,6 +510,20 @@ bool SpellcheckService::IsSpellcheckEnabled() const {
(!hunspell_dictionaries_.empty() || enable_if_uninitialized);
}
+void SpellcheckService::SetHunspellObserver(SpellcheckHunspellDictionary::Observer* observer) {
@@ -40,19 +40,19 @@ index d3dfa5e970db93ab71d701f72079194a5499fdfd..eab3b7bafa0f3571df8ca7f7ff561a0f
std::string locale,
std::string path,
diff --git a/chrome/browser/spellchecker/spellcheck_service.h b/chrome/browser/spellchecker/spellcheck_service.h
index bc7a644062d62f9483bc5971723239f9814a282b..05aa35ef3d960aa2f823c308ffe51086308dd9d2 100644
index 29ea018d1df9f34204d26766fe010e6b38def7da..68af07c361ee1934e3f76497429c9d30f0212283 100644
--- a/chrome/browser/spellchecker/spellcheck_service.h
+++ b/chrome/browser/spellchecker/spellcheck_service.h
@@ -134,6 +134,8 @@ class SpellcheckService : public KeyedService,
const std::vector<std::unique_ptr<SpellcheckHunspellDictionary>>&
GetHunspellDictionaries();
@@ -141,6 +141,8 @@ class SpellcheckService : public KeyedService,
// dictionaries available.
bool IsSpellcheckEnabled() const;
+ void SetHunspellObserver(SpellcheckHunspellDictionary::Observer* observer);
+
// Load a dictionary from a given path. Format specifies how the dictionary
// is stored. Return value is true if successful.
bool LoadExternalDictionary(std::string language,
@@ -306,6 +308,8 @@ class SpellcheckService : public KeyedService,
@@ -319,6 +321,8 @@ class SpellcheckService : public KeyedService,
// A pointer to the BrowserContext which this service refers to.
content::BrowserContext* context_;

View File

@@ -8,7 +8,7 @@ rendering with the viz compositor by way of a custom HostDisplayClient
and LayeredWindowUpdater.
diff --git a/components/viz/host/host_display_client.cc b/components/viz/host/host_display_client.cc
index 3547ee865c220731a6b4be4c1b32ec899b3dd11f..715bfa4b5db5fc4beb83c26b1eedda82c87a245b 100644
index c80e6831d4af6c704609f69182cb8c4e216b9987..28c4f42fbcd04e08ac02b4b9f5b2aa4decd35557 100644
--- a/components/viz/host/host_display_client.cc
+++ b/components/viz/host/host_display_client.cc
@@ -43,9 +43,13 @@ void HostDisplayClient::OnDisplayReceivedCALayerParams(
@@ -41,7 +41,7 @@ index 3547ee865c220731a6b4be4c1b32ec899b3dd11f..715bfa4b5db5fc4beb83c26b1eedda82
#if defined(OS_LINUX) && !defined(OS_CHROMEOS)
void HostDisplayClient::DidCompleteSwapWithNewSize(const gfx::Size& size) {
diff --git a/components/viz/host/host_display_client.h b/components/viz/host/host_display_client.h
index cedf833d23589dc3157168cfc7e6d3bb12939f7a..4437a7875076ef5a99ddcd767036ec37c2d48d44 100644
index 521ea99a35da33947aba209e8ef8a4d56dac4696..0741427b1fc27d4abf8d5bd42b105810cf459e18 100644
--- a/components/viz/host/host_display_client.h
+++ b/components/viz/host/host_display_client.h
@@ -31,17 +31,17 @@ class VIZ_HOST_EXPORT HostDisplayClient : public mojom::DisplayClient {
@@ -53,7 +53,7 @@ index cedf833d23589dc3157168cfc7e6d3bb12939f7a..4437a7875076ef5a99ddcd767036ec37
// mojom::DisplayClient implementation:
+ void IsOffscreen(IsOffscreenCallback callback) override;
+
#if defined(OS_MACOSX)
#if defined(OS_APPLE)
void OnDisplayReceivedCALayerParams(
const gfx::CALayerParams& ca_layer_params) override;
#endif
@@ -94,10 +94,10 @@ index 1026b739d283f0fc252fa2af83a6d4cf51bc8553..fe562ab60ce98b8bb0c5080a6428deb3
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 5f8fbe5b245946b8c6307f2026842277d7be4664..fa78160ebdb8cbc975047e933d7b086b7f226b4f 100644
index d991c2126b239622f5712cfde6a78139faab2ad9..b52a92991ceea74fd2153ea86ad97e25e53827e0 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -113,6 +113,8 @@ viz_component("service") {
@@ -115,6 +115,8 @@ viz_component("service") {
"display_embedder/output_surface_provider_impl.h",
"display_embedder/server_shared_bitmap_manager.cc",
"display_embedder/server_shared_bitmap_manager.h",
@@ -107,7 +107,7 @@ index 5f8fbe5b245946b8c6307f2026842277d7be4664..fa78160ebdb8cbc975047e933d7b086b
"display_embedder/software_output_surface.h",
"display_embedder/viz_process_context_provider.cc",
diff --git a/components/viz/service/display_embedder/output_surface_provider_impl.cc b/components/viz/service/display_embedder/output_surface_provider_impl.cc
index 0b2971f1d77d00c37894230c6ae487b0f88a397e..09de8f413d8b03f0f5da3182bbf7753867776d24 100644
index 649ecffb549639ab88ba6eba7bb720b3b56f9f82..5e7d0651b18bd3c3b29891d90e5e7631288ca262 100644
--- a/components/viz/service/display_embedder/output_surface_provider_impl.cc
+++ b/components/viz/service/display_embedder/output_surface_provider_impl.cc
@@ -22,6 +22,7 @@
@@ -130,7 +130,7 @@ index 0b2971f1d77d00c37894230c6ae487b0f88a397e..09de8f413d8b03f0f5da3182bbf77538
if (headless_)
return std::make_unique<SoftwareOutputDevice>();
+#if !defined(OS_MACOSX)
+#if !defined(OS_MAC)
+ {
+ mojo::ScopedAllowSyncCallForTesting allow_sync;
+ DCHECK(display_client);
@@ -455,7 +455,7 @@ index 2bb30e5318b6b48c2e6d4b1f64a6a36c68f963d1..9e805f27a9d7d1c0aa68cdf9f48895c0
waiting_on_draw_ack_ = true;
diff --git a/content/browser/compositor/viz_process_transport_factory.cc b/content/browser/compositor/viz_process_transport_factory.cc
index 858d6f4a7428a081cb0f47a1d49b70e489d2d834..dedb7d158cef10f76a38fdb4df9a379997d7c3c3 100644
index 04da825a6b5d8cbbfd92ff8aef37ebc4056d33da..0207cd5d731d4a9998fb7cc5810d54f42086e42b 100644
--- a/content/browser/compositor/viz_process_transport_factory.cc
+++ b/content/browser/compositor/viz_process_transport_factory.cc
@@ -407,8 +407,13 @@ void VizProcessTransportFactory::OnEstablishedGpuChannel(
@@ -496,10 +496,10 @@ index c9a75d59b7eb480c3e64e14bdcb9516150ec368c..7370f0b80057ce7b24560c41b70c0bab
// (https://crbug.com/811945)
friend class ui::Compositor;
diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom
index d88fab3b7d0a968b2a5503e04a0812dc1edeaf28..4f66ac576ca495630cba4f82f0e5e0ebda434ddd 100644
index 0c9686f3c8070000bf5b180d9c06a8817d430c4a..a69b9613a61ef68624b3f69dc087603ad5cfd0c2 100644
--- a/services/viz/privileged/mojom/compositing/display_private.mojom
+++ b/services/viz/privileged/mojom/compositing/display_private.mojom
@@ -74,12 +74,14 @@ interface DisplayPrivate {
@@ -80,12 +80,14 @@ interface DisplayPrivate {
};
interface DisplayClient {
@@ -527,18 +527,18 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549
+ Draw(gfx.mojom.Rect damage_rect) => ();
};
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index 438dd212d881abf70362f12391b6a85f697785d0..34bd0cbf18714ac24355e603806cc36986f24e30 100644
index 13665946e08abe7161b710b52d20307d9d248b84..eb530286d5e30691deee2285b6e78a8ee7dd6dd9 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -74,6 +74,7 @@ class DisplayPrivate;
class ExternalBeginFrameController;
@@ -75,6 +75,7 @@ class ExternalBeginFrameController;
class DelegatedInkPointRenderer;
} // namespace mojom
class ContextProvider;
+class HostDisplayClient;
class HostFrameSinkManager;
class LocalSurfaceIdAllocation;
class RasterContextProvider;
@@ -127,6 +128,15 @@ class COMPOSITOR_EXPORT ContextFactory {
@@ -128,6 +129,15 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
};
@@ -554,7 +554,7 @@ index 438dd212d881abf70362f12391b6a85f697785d0..34bd0cbf18714ac24355e603806cc369
// Compositor object to take care of GPU painting.
// A Browser compositor object is responsible for generating the final
// displayable form of pixels comprising a single widget's contents. It draws an
@@ -161,6 +171,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -162,6 +172,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@@ -564,7 +564,7 @@ index 438dd212d881abf70362f12391b6a85f697785d0..34bd0cbf18714ac24355e603806cc369
// Sets the root of the layer tree drawn by this Compositor. The root layer
// must have no parent. The compositor's root layer is reset if the root layer
// is destroyed. NULL can be passed to reset the root layer, in which case the
@@ -424,6 +437,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -435,6 +448,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;
@@ -574,7 +574,7 @@ index 438dd212d881abf70362f12391b6a85f697785d0..34bd0cbf18714ac24355e603806cc369
Layer* root_layer_ = nullptr;
diff --git a/ui/gfx/ca_layer_params.h b/ui/gfx/ca_layer_params.h
index 4014e64a75da88cf66c02e8adb71171c2666cab7..25e57784e1a1ffc546b003daa4cd0059c468432f 100644
index 64af450ed36a982124c6fcce7056b4058140747a..dcee2ec9de0e759b868b0de2c7106b2cf084c41c 100644
--- a/ui/gfx/ca_layer_params.h
+++ b/ui/gfx/ca_layer_params.h
@@ -6,6 +6,7 @@
@@ -606,7 +606,7 @@ index de00e766ba17532e10dcf5d0fd31fa344920a9f7..7aaedf83ad22dcc1d2dd39a31cf7e08b
float scale_factor;
};
diff --git a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc
index d6ec9ef087f00d4c8d7c495b7e57a1d9c3c8b3bb..1b1aafcf75e422b4c94bdc8da895488245cdf360 100644
index c1f21d7f4348df96f7be5c0adb1b9650304048e0..760c849aebba70e575e59883655d707f36c5424a 100644
--- a/ui/gfx/mojom/ca_layer_params_mojom_traits.cc
+++ b/ui/gfx/mojom/ca_layer_params_mojom_traits.cc
@@ -52,6 +52,9 @@ bool StructTraits<gfx::mojom::CALayerParamsDataView, gfx::CALayerParams>::Read(

View File

@@ -1,26 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Shelley Vohr <shelley.vohr@gmail.com>
Date: Mon, 20 Jul 2020 14:02:56 -0700
Subject: fix: missing WeakPtr check in PreconnectManager
https://chromium-review.googlesource.com/c/chromium/src/+/2295780
added UKM around prefetch accuracy stats, which involved an added line
in PreconnectManager::TryToLaunchPreresolveJobs() that did not check
the WeakPtr before using it. This fixes that.
Upstreamed at: https://chromium-review.googlesource.com/c/chromium/src/+/2309029
diff --git a/chrome/browser/predictors/preconnect_manager.cc b/chrome/browser/predictors/preconnect_manager.cc
index 78216f0083281b4f1e0209f766753d0dc9c796c4..bd81f631b15cc4cb8c54afd51bd8739f4256ae33 100644
--- a/chrome/browser/predictors/preconnect_manager.cc
+++ b/chrome/browser/predictors/preconnect_manager.cc
@@ -231,7 +231,8 @@ void PreconnectManager::TryToLaunchPreresolveJobs() {
weak_factory_.GetWeakPtr(), job_id));
if (info) {
++info->inflight_count;
- delegate_->PreconnectInitiated(info->url, job->url);
+ if (delegate_)
+ delegate_->PreconnectInitiated(info->url, job->url);
}
++inflight_preresolves_count_;
} else {

View File

@@ -1,168 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <samuel.r.attard@gmail.com>
Date: Thu, 30 Jul 2020 16:02:55 -0700
Subject: fix: provide AXTextChangeValueStartMarker a11y value change
notifications
This will be upstreamed and can be removed once it has landed there.
Upstream attempt: https://chromium-review.googlesource.com/c/chromium/src/+/2330812
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.h b/content/browser/accessibility/browser_accessibility_cocoa.h
index f56a191cb01fbcf91f60abc312ee5277bf857929..fa5429e2da1124fc1c2ff4fb6fed7aeb4dabdbea 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.h
+++ b/content/browser/accessibility/browser_accessibility_cocoa.h
@@ -19,13 +19,14 @@ namespace content {
// support character echo and other announcements during editing.
struct AXTextEdit {
AXTextEdit() = default;
- AXTextEdit(base::string16 inserted_text, base::string16 deleted_text)
- : inserted_text(inserted_text), deleted_text(deleted_text) {}
+ AXTextEdit(base::string16 inserted_text, base::string16 deleted_text, id edit_text_marker)
+ : inserted_text(inserted_text), deleted_text(deleted_text), edit_text_marker(edit_text_marker) {}
bool IsEmpty() const { return inserted_text.empty() && deleted_text.empty(); }
base::string16 inserted_text;
base::string16 deleted_text;
+ id edit_text_marker;
};
// Returns true if the given object is AXTextMarker object.
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/content/browser/accessibility/browser_accessibility_cocoa.mm
index 090c8fdc3b374ed937d3e04ccd5d91772acc7d9d..8a96c55b638b33f390372c2a30228dabad08665a 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -1882,7 +1882,11 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
base::string16 deletedText = oldValue.substr(i, oldValue.length() - i - j);
base::string16 insertedText = newValue.substr(i, newValue.length() - i - j);
- return content::AXTextEdit(insertedText, deletedText);
+#ifndef MAS_BUILD
+ return content::AXTextEdit(insertedText, deletedText, CreateTextMarker(_owner->CreatePositionAt(i)));
+#else
+ return content::AXTextEdit(insertedText, deletedText, nil);
+#endif
}
- (BOOL)instanceActive {
@@ -2257,7 +2261,7 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
- (id)selectedTextMarkerRange {
if (![self instanceActive])
return nil;
- return CreateTextMarkerRange(GetSelectedRange(*_owner));
+ return CreateTextMarkerRange(GetSelectedRange(*_owner).AsBackwardRange());
}
#endif
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.h b/content/browser/accessibility/browser_accessibility_manager_mac.h
index 8fb447a74cb6e818c221131aba5f57c5f8b8094d..b930963467642738db3ec0109b4a6681ade03b2c 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.h
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.h
@@ -60,7 +60,8 @@ class CONTENT_EXPORT BrowserAccessibilityManagerMac
NSDictionary* GetUserInfoForValueChangedNotification(
const BrowserAccessibilityCocoa* native_node,
const base::string16& deleted_text,
- const base::string16& inserted_text) const;
+ const base::string16& inserted_text,
+ id edit_text_marker) const;
void AnnounceActiveDescendant(BrowserAccessibility* node) const;
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
index 5972939a070908521e82845b084d2d3b9f9a73f8..fda1d2f9fdccbff035d05f0dfc39238a8a667522 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -94,6 +94,7 @@ NSString* const NSAccessibilityTextSelectionChangedFocus =
NSString* const NSAccessibilityTextChangeElement = @"AXTextChangeElement";
NSString* const NSAccessibilityTextEditType = @"AXTextEditType";
NSString* const NSAccessibilityTextChangeValue = @"AXTextChangeValue";
+NSString* const NSAccessibilityChangeValueStartMarker = @"AXTextChangeValueStartMarker";
NSString* const NSAccessibilityTextChangeValueLength =
@"AXTextChangeValueLength";
NSString* const NSAccessibilityTextChangeValues = @"AXTextChangeValues";
@@ -313,16 +314,18 @@ void BrowserAccessibilityManagerMac::FireGeneratedEvent(
if (base::mac::IsAtLeastOS10_11() && !text_edits_.empty()) {
base::string16 deleted_text;
base::string16 inserted_text;
- int32_t id = node->GetId();
- const auto iterator = text_edits_.find(id);
+ int32_t id_ = node->GetId();
+ id edit_text_marker = nil;
+ const auto iterator = text_edits_.find(id_);
if (iterator != text_edits_.end()) {
AXTextEdit text_edit = iterator->second;
deleted_text = text_edit.deleted_text;
inserted_text = text_edit.inserted_text;
+ edit_text_marker = text_edit.edit_text_marker;
}
NSDictionary* user_info = GetUserInfoForValueChangedNotification(
- native_node, deleted_text, inserted_text);
+ native_node, deleted_text, inserted_text, edit_text_marker);
BrowserAccessibility* root = GetRoot();
if (!root)
@@ -546,27 +549,34 @@ NSDictionary*
BrowserAccessibilityManagerMac::GetUserInfoForValueChangedNotification(
const BrowserAccessibilityCocoa* native_node,
const base::string16& deleted_text,
- const base::string16& inserted_text) const {
+ const base::string16& inserted_text,
+ id edit_text_marker) const {
DCHECK(native_node);
if (deleted_text.empty() && inserted_text.empty())
return nil;
NSMutableArray* changes = [[[NSMutableArray alloc] init] autorelease];
if (!deleted_text.empty()) {
- [changes addObject:@{
- NSAccessibilityTextEditType : @(AXTextEditTypeDelete),
- NSAccessibilityTextChangeValueLength : @(deleted_text.length()),
- NSAccessibilityTextChangeValue : base::SysUTF16ToNSString(deleted_text)
- }];
+ NSMutableDictionary* change = [[[NSMutableDictionary alloc] initWithCapacity:4] autorelease];
+ change[NSAccessibilityTextEditType] = @(AXTextEditTypeDelete);
+ change[NSAccessibilityTextChangeValueLength] = @(deleted_text.length());
+ change[NSAccessibilityTextChangeValue] = base::SysUTF16ToNSString(deleted_text);
+ if (edit_text_marker) {
+ change[NSAccessibilityChangeValueStartMarker] = edit_text_marker;
+ }
+ [changes addObject:change];
}
if (!inserted_text.empty()) {
// TODO(nektar): Figure out if this is a paste operation instead of typing.
// Changes to Blink would be required.
- [changes addObject:@{
- NSAccessibilityTextEditType : @(AXTextEditTypeTyping),
- NSAccessibilityTextChangeValueLength : @(inserted_text.length()),
- NSAccessibilityTextChangeValue : base::SysUTF16ToNSString(inserted_text)
- }];
+ NSMutableDictionary* change = [[[NSMutableDictionary alloc] initWithCapacity:4] autorelease];
+ change[NSAccessibilityTextEditType] = @(AXTextEditTypeTyping);
+ change[NSAccessibilityTextChangeValueLength] = @(inserted_text.length());
+ change[NSAccessibilityTextChangeValue] = base::SysUTF16ToNSString(inserted_text);
+ if (edit_text_marker) {
+ change[NSAccessibilityChangeValueStartMarker] = edit_text_marker;
+ }
+ [changes addObject:change];
}
return @{
diff --git a/ui/accessibility/ax_range.h b/ui/accessibility/ax_range.h
index 62db9d3c0ff251e40dd5016901e40a3083cb786f..2d263e1c7eaf806a76eba6ee79919ef87d3eb04b 100644
--- a/ui/accessibility/ax_range.h
+++ b/ui/accessibility/ax_range.h
@@ -131,6 +131,12 @@ class AXRange {
: AXRange(anchor_->Clone(), focus_->Clone());
}
+ AXRange AsBackwardRange() const {
+ return (CompareEndpoints(anchor(), focus()).value_or(0) < 0)
+ ? AXRange(focus_->Clone(), anchor_->Clone())
+ : AXRange(anchor_->Clone(), focus_->Clone());
+ }
+
bool IsCollapsed() const { return !IsNull() && *anchor_ == *focus_; }
// We define a "leaf text range" as an AXRange whose endpoints are leaf text

View File

@@ -13,10 +13,10 @@ This patch can be removed once app.allowRendererProcessReuse is forced
to true as then Chromiums assumptions around processes become correct.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 502893ba5219f64ed9c84f83c40b28188966d2a0..6a30734d3314041af985a1f9056595a23a10d6a9 100644
index 3ab23d0c634e8379573a4d818bbbe6200a88d073..0e16e0d4c0b84e4f6cdf73d4061a53609dcbe647 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2499,11 +2499,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
@@ -2830,11 +2830,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
WebContentsImpl* outermost = GetOutermostWebContents();
if (event.button == blink::WebPointerProperties::Button::kBack &&
outermost->controller_.CanGoBack()) {

View File

@@ -8,11 +8,59 @@ The new kGlobalRequiresAccessibility Scope type should be upstreamed
and then we can use that and minimize this patch to just the change in
global_shortcut_listener_mac.mm
diff --git a/chrome/browser/extensions/global_shortcut_listener.cc b/chrome/browser/extensions/global_shortcut_listener.cc
index bc009606d01469125052e68a9cdc82aaa697c764..ff18043cb07d748a49adea9874517fb29e3e7f9f 100644
--- a/chrome/browser/extensions/global_shortcut_listener.cc
+++ b/chrome/browser/extensions/global_shortcut_listener.cc
@@ -7,6 +7,7 @@
#include "base/check.h"
#include "base/notreached.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/media_keys_listener_manager.h"
#include "ui/base/accelerators/accelerator.h"
using content::BrowserThread;
@@ -66,6 +67,22 @@ void GlobalShortcutListener::UnregisterAccelerator(
StopListening();
}
+// static
+void GlobalShortcutListener::SetShouldUseInternalMediaKeyHandling(bool should_use) {
+ if (content::MediaKeysListenerManager::
+ IsMediaKeysListenerManagerEnabled()) {
+ content::MediaKeysListenerManager* media_keys_listener_manager =
+ content::MediaKeysListenerManager::GetInstance();
+ DCHECK(media_keys_listener_manager);
+
+ if (should_use) {
+ media_keys_listener_manager->EnableInternalMediaKeyHandling();
+ } else {
+ media_keys_listener_manager->DisableInternalMediaKeyHandling();
+ }
+ }
+}
+
void GlobalShortcutListener::UnregisterAccelerators(Observer* observer) {
CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (IsShortcutHandlingSuspended())
diff --git a/chrome/browser/extensions/global_shortcut_listener.h b/chrome/browser/extensions/global_shortcut_listener.h
index 9aec54a3263d24491d24013a80b719dfc834ecd4..001a6cb2a5eb701351fa924109b43fab6f30748d 100644
--- a/chrome/browser/extensions/global_shortcut_listener.h
+++ b/chrome/browser/extensions/global_shortcut_listener.h
@@ -31,6 +31,8 @@ class GlobalShortcutListener {
static GlobalShortcutListener* GetInstance();
+ static void SetShouldUseInternalMediaKeyHandling(bool should_use);
+
// Register an observer for when a certain |accelerator| is struck. Returns
// true if register successfully, or false if 1) the specificied |accelerator|
// has been registered by another caller or other native applications, or
diff --git a/chrome/browser/extensions/global_shortcut_listener_mac.mm b/chrome/browser/extensions/global_shortcut_listener_mac.mm
index befe726af9c10b1563a7fc0bb77cc55f65943d5c..bac51f33f35f96fe4ecc764cf5ca887176642f74 100644
--- a/chrome/browser/extensions/global_shortcut_listener_mac.mm
+++ b/chrome/browser/extensions/global_shortcut_listener_mac.mm
@@ -39,7 +39,7 @@ GlobalShortcutListenerMac::GlobalShortcutListenerMac()
@@ -39,7 +39,7 @@
// global MediaKeysListener to receive media keys.
if (!content::MediaKeysListenerManager::IsMediaKeysListenerManagerEnabled()) {
media_keys_listener_ = ui::MediaKeysListener::Create(
@@ -21,6 +69,26 @@ index befe726af9c10b1563a7fc0bb77cc55f65943d5c..bac51f33f35f96fe4ecc764cf5ca8871
DCHECK(media_keys_listener_);
}
}
diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
index 28dc8c8451940b18e74384aad10d4d9e886b31a3..f9e1854ed72cc5a9f2431df066eb72f5242569f1 100644
--- a/content/browser/media/media_keys_listener_manager_impl.cc
+++ b/content/browser/media/media_keys_listener_manager_impl.cc
@@ -177,8 +177,14 @@ void MediaKeysListenerManagerImpl::EnsureMediaKeysListener() {
EnsureAuxiliaryServices();
- media_keys_listener_ = ui::MediaKeysListener::Create(
+ if (!media_key_handling_enabled_) {
+ media_keys_listener_ = ui::MediaKeysListener::Create(
+ this, ui::MediaKeysListener::Scope::kGlobalRequiresAccessibility);
+ } else {
+ media_keys_listener_ = ui::MediaKeysListener::Create(
this, ui::MediaKeysListener::Scope::kGlobal);
+ }
+
DCHECK(media_keys_listener_);
media_keys_listener_->SetIsMediaPlaying(is_media_playing_);
diff --git a/ui/base/accelerators/media_keys_listener.h b/ui/base/accelerators/media_keys_listener.h
index 6787fa39da18ec26c215e4cbe0b3f69093323f8c..ec10c46cde437a935edfdf79e5ba9622c6ba1d67 100644
--- a/ui/base/accelerators/media_keys_listener.h

View File

@@ -42,10 +42,10 @@ index 7f588450c441ed2b17db06afb38075bbfadfc633..e56178401374f3c6a9536056511fb63a
// 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 2cf0ea5f20c09a6bc9948b4485f3f023c5c53b59..81f95e2ad9d0200c779f277d190ad870ebf91d3f 100644
index a6d3bafd08336a07012e46aba6d611c62e61c7cf..f7b03517380b653071384a9686924b584efadde7 100644
--- a/content/browser/frame_host/navigation_request.cc
+++ b/content/browser/frame_host/navigation_request.cc
@@ -1447,6 +1447,21 @@ void NavigationRequest::BeginNavigation() {
@@ -1475,6 +1475,21 @@ void NavigationRequest::BeginNavigation() {
// it immediately.
EnterChildTraceEvent("ResponseStarted", this);
@@ -67,7 +67,7 @@ index 2cf0ea5f20c09a6bc9948b4485f3f023c5c53b59..81f95e2ad9d0200c779f277d190ad870
// Select an appropriate RenderFrameHost.
render_frame_host_ =
frame_tree_node_->render_manager()->GetFrameHostForNavigation(this);
@@ -4893,6 +4908,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
@@ -5043,6 +5058,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
{WILL_START_REQUEST, {
WILL_REDIRECT_REQUEST,
WILL_PROCESS_RESPONSE,
@@ -75,7 +75,7 @@ index 2cf0ea5f20c09a6bc9948b4485f3f023c5c53b59..81f95e2ad9d0200c779f277d190ad870
READY_TO_COMMIT,
DID_COMMIT,
CANCELING,
@@ -4906,10 +4922,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
@@ -5056,10 +5072,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
WILL_FAIL_REQUEST,
}},
{WILL_PROCESS_RESPONSE, {
@@ -91,10 +91,10 @@ index 2cf0ea5f20c09a6bc9948b4485f3f023c5c53b59..81f95e2ad9d0200c779f277d190ad870
NOT_STARTED,
DID_COMMIT,
diff --git a/content/browser/frame_host/navigation_request.h b/content/browser/frame_host/navigation_request.h
index ccaa4324303df603bb7bc24077f58920420e0dae..8af5643e2105c8e307b7b736b72807e5aa9085b9 100644
index cfcc6cd6cbc2723156a2bce1cd8a98a979952a04..a6736ae58641501041a676505ea8a3680f90cdf7 100644
--- a/content/browser/frame_host/navigation_request.h
+++ b/content/browser/frame_host/navigation_request.h
@@ -142,6 +142,10 @@ class CONTENT_EXPORT NavigationRequest
@@ -162,6 +162,10 @@ class CONTENT_EXPORT NavigationRequest
// asynchronous.
WILL_PROCESS_RESPONSE,
@@ -106,10 +106,10 @@ index ccaa4324303df603bb7bc24077f58920420e0dae..8af5643e2105c8e307b7b736b72807e5
READY_TO_COMMIT,
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index a1f68822b0d4fb8eaac271a5bf4aaeaf0765c124..23843f36808d37a753acc92199e82e7568df92da 100644
index 3223378b661e6a53e62d7981c90beb67a51dc900..f83175d673e280e81ae3175d98172763f9c016ae 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -2335,6 +2335,16 @@ bool RenderFrameHostManager::InitRenderView(
@@ -2383,6 +2383,16 @@ bool RenderFrameHostManager::InitRenderView(
scoped_refptr<SiteInstance>
RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
NavigationRequest* request) {
@@ -126,7 +126,7 @@ index a1f68822b0d4fb8eaac271a5bf4aaeaf0765c124..23843f36808d37a753acc92199e82e75
SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
// All children of MHTML documents must be MHTML documents. They all live in
@@ -2354,10 +2364,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -2402,10 +2412,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
//
// TODO(clamy): We should also consider as a candidate SiteInstance the
// speculative SiteInstance that was computed on redirects.
@@ -191,7 +191,7 @@ index a1f68822b0d4fb8eaac271a5bf4aaeaf0765c124..23843f36808d37a753acc92199e82e75
// Account for renderer-initiated reload as well.
// Needed as a workaround for https://crbug.com/1045524, remove it when it is
@@ -2383,6 +2443,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -2431,6 +2491,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@@ -202,10 +202,10 @@ index a1f68822b0d4fb8eaac271a5bf4aaeaf0765c124..23843f36808d37a753acc92199e82e75
}
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index 5a7ccbd331b4b6a898abea1d1c0081ff6ab20fea..2163cdc8808a3aec0a94df8a352594a8515f0f79 100644
index b167aaf428df5feeac16c68beec3e947d44cd61f..c2ad9320b242c228b295a7fe20cc258282d95a09 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -497,6 +497,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) {
@@ -505,6 +505,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) {
return browsing_instance_->HasSiteInstance(site_info);
}
@@ -217,10 +217,10 @@ index 5a7ccbd331b4b6a898abea1d1c0081ff6ab20fea..2163cdc8808a3aec0a94df8a352594a8
const GURL& url) {
return browsing_instance_->GetSiteInstanceForURL(
diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
index e5d26881312d422ef34b8d769528a7ad4e5c8dd4..48bf203e49584b337dc5cca99339f74107f8ca97 100644
index 9fffa8c2c602aa373400dfb0d1c817f34b75bc8f..f898ab9291f66ac0cfbf0317f47befc8d832b364 100644
--- a/content/browser/site_instance_impl.h
+++ b/content/browser/site_instance_impl.h
@@ -183,6 +183,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
@@ -184,6 +184,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
BrowserContext* GetBrowserContext() override;
const GURL& GetSiteURL() override;
scoped_refptr<SiteInstance> GetRelatedSiteInstance(const GURL& url) override;
@@ -229,10 +229,10 @@ index e5d26881312d422ef34b8d769528a7ad4e5c8dd4..48bf203e49584b337dc5cca99339f741
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 2e1b2be0a96ef14e0d5d0cec0ce114ad97b4bf37..b8c89b77f1e0f5e78c7ca8f55eb5f4547fc40f54 100644
index 0e150a89b451e7ae464f1bd5e38c412f58aa8568..187e8bc17e2dfb662c283bacaeda9764c2fdc11e 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -61,6 +61,21 @@
@@ -62,6 +62,21 @@
namespace content {
@@ -255,10 +255,10 @@ index 2e1b2be0a96ef14e0d5d0cec0ce114ad97b4bf37..b8c89b77f1e0f5e78c7ca8f55eb5f454
const MainFunctionParams& parameters) {
return nullptr;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index f2b64eb90f80c94a9b8a7374b5733a609446346b..28f170b9455835f0c90af3411538b098e4fe75e9 100644
index 170beaff3f579d3fcf9c461f6a41350e8c9439cc..a29cde8ecd97077c4e60e40e2c91083275781602 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -247,8 +247,45 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -249,8 +249,45 @@ class CONTENT_EXPORT ContentBrowserClient {
using IsClipboardPasteAllowedCallback =
base::OnceCallback<void(ClipboardPasteAllowed)>;

View File

@@ -38,7 +38,7 @@ index f23af2d9738f3aa76e3a49301e1c3216ee4a64b4..ede178acabc63c3c33d6ce93efd5632b
v8::Isolate* isolate() { return isolate_; }
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 630814e5af46abc3d035a8ec12a83016a94fc323..00e24954441630d45ba42759755ee432c3e80cde 100644
index 3484c3f307f346e6b7fc75c365b28a4935b99263..cbaa537b4e58b772df1e9f864ecaa50d0719c802 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -191,12 +191,14 @@ enum LoadV8FileResult {

View File

@@ -28,7 +28,7 @@ index 919ccd3f86aaecc841182de67ed94cab1008ae3d..cd9a0c9d1842daf1536b88e9d10c447c
void GpuDataManagerImpl::UpdateGpuFeatureInfo(
diff --git a/content/browser/gpu/gpu_data_manager_impl.h b/content/browser/gpu/gpu_data_manager_impl.h
index 8af48d23b020779c1714fc7ca70966e8d33f7252..5dfa29db15467f8fc55f86a2a225380c70d4aaab 100644
index 207e27419b1e82bfb1a59399b257b434a820d577..1aa131759978cae4cd3ee3f379282bd5bb03c1e9 100644
--- a/content/browser/gpu/gpu_data_manager_impl.h
+++ b/content/browser/gpu/gpu_data_manager_impl.h
@@ -95,6 +95,7 @@ class CONTENT_EXPORT GpuDataManagerImpl : public GpuDataManager,
@@ -37,10 +37,10 @@ index 8af48d23b020779c1714fc7ca70966e8d33f7252..5dfa29db15467f8fc55f86a2a225380c
void TerminateInfoCollectionGpuProcess();
+ bool DxdiagDx12VulkanRequested() const;
#endif
// Update the GPU feature info. This updates the blacklist and enabled status
// Update the GPU feature info. This updates the blocklist and enabled status
// of GPU rasterization. In the future this will be used for more features.
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.cc b/content/browser/gpu/gpu_data_manager_impl_private.cc
index 462ac6dcb6e83fdc478de35eb4fb0636590e48b9..b8b627b2a04e58f82967d28c63f941a1162df226 100644
index 6f93628f837950cc9af5ca09179a1894c0b215ad..4c70fd640a7a2c75894826552649f46a49223c87 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -1060,6 +1060,11 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
@@ -56,7 +56,7 @@ index 462ac6dcb6e83fdc478de35eb4fb0636590e48b9..b8b627b2a04e58f82967d28c63f941a1
void GpuDataManagerImplPrivate::UpdateGpuFeatureInfo(
diff --git a/content/browser/gpu/gpu_data_manager_impl_private.h b/content/browser/gpu/gpu_data_manager_impl_private.h
index 7afb818da963271751f6ff7d876505c739ec3fae..7453817e192e01b06b8680a2209bc5c8794bb959 100644
index 18f1d94764048b19a53b68622ea2f133ccf4c11b..1e6230534a85ccd23736a73f7285a5fed6ad7f0d 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.h
+++ b/content/browser/gpu/gpu_data_manager_impl_private.h
@@ -75,6 +75,7 @@ class CONTENT_EXPORT GpuDataManagerImplPrivate {

View File

@@ -6,7 +6,7 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
index d81313ef3f6759bfab0b60b0edfaaf71b87e53f5..82875eb522c6cec3ff426d75f51243d23ce8750a 100644
index b6e69f3047b967e705b895696a832adc06387b24..d5eb3c3e6ebb85868bead891e8b53f677328df49 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -649,6 +649,11 @@

View File

@@ -6,7 +6,7 @@ Subject: gtk_visibility.patch
Allow electron to depend on GTK in the GN build.
diff --git a/build/config/linux/gtk/BUILD.gn b/build/config/linux/gtk/BUILD.gn
index a73160222398b0beb02a8f2c7f2e2f05a1b6e339..5a9ca1ca4f96a2a106eab3d92224a67d1620134f 100644
index 0ba7dc322db2d48cb66d76630532c13ff02767e7..5721080a1b596095e42343be9c2f94004cbce4cd 100644
--- a/build/config/linux/gtk/BUILD.gn
+++ b/build/config/linux/gtk/BUILD.gn
@@ -29,6 +29,8 @@ group("gtk") {

View File

@@ -8,7 +8,7 @@ require a largeish patch to get working, so just redirect it to our
implementation instead.
diff --git a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
index a692d5e33cfdad762eb0c59c6e14fab2675c603b..121424e9523a7977be64cbcd5b99ccb2947dff7e 100644
index f8693f150ace948f73a4201d4f0ae5efbaa99656..c92e46c5a2545990b68c1beed77620328ee3dc12 100644
--- a/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
+++ b/chrome/browser/plugins/plugin_response_interceptor_url_loader_throttle.cc
@@ -9,8 +9,8 @@

View File

@@ -1,56 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Mentovai <mark@chromium.org>
Date: Thu, 23 Jul 2020 02:02:37 +0000
Subject: mac: Work around Xcode 12b3 SDK bug
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The macOS 11.0 20A5323l SDK in Xcode 12b3 12A8169g totally hides the
kCGColorSpaceITUR_2020_PQ_EOTF declaration in an #if whenever the SDK
version is ≥ 10.16, which of course it always is. Chrome does use that
constant, so work around the SDK bug by providing our a local
declaration when that SDK version is in use.
Bug: 1108561
Change-Id: I6ed31d30705bc754616e413c38fb250a7934484d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2315078
Reviewed-by: Avi Drissman <avi@chromium.org>
Commit-Queue: Avi Drissman <avi@chromium.org>
Commit-Queue: Mark Mentovai <mark@chromium.org>
Auto-Submit: Mark Mentovai <mark@chromium.org>
Cr-Commit-Position: refs/heads/master@{#791119}
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
index 93a9652b71d86441e15b87aafd7a6b1a13f45830..5e06d0b7804e90cd044c64188ed113c9593dd8be 100644
--- a/ui/gfx/mac/io_surface.cc
+++ b/ui/gfx/mac/io_surface.cc
@@ -4,6 +4,8 @@
#include "ui/gfx/mac/io_surface.h"
+#include <Availability.h>
+#include <CoreGraphics/CoreGraphics.h>
#include <stddef.h>
#include <stdint.h>
@@ -18,6 +20,19 @@
#include "ui/gfx/icc_profile.h"
#include "ui/gfx/switches.h"
+#if defined(__MAC_11_0) && __MAC_OS_X_VERSION_MAX_ALLOWED >= __MAC_10_16
+// https://crbug.com/1108561: This is supposed to be deprecated (but available)
+// through 10.15.4, but the macOS 11.0 20A5323l SDK from Xcode 12b3 12A8169g
+// doesnt declare it at all when the SDK version is 10.16 or later, which of
+// course it always is. Its a bug in the SDK. Work around it with the
+// declaration thats hidden.
+//
+// TODO(https://crbug.com/1108627): remove this workaround if and when the SDK
+// bug is fixed.
+CG_EXTERN const CFStringRef kCGColorSpaceITUR_2020_PQ_EOTF
+CG_AVAILABLE_BUT_DEPRECATED(10.14.6, 10.15.4, 12.6, 13.4);
+#endif
+
namespace gfx {
namespace {

View File

@@ -9,7 +9,7 @@ diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
index be12912dcd0ef0cf046ee2d4033a18ecfdf1e992..d2af322a9d5751105e2c8fe023aad9a91027bf05 100644
--- a/base/mac/foundation_util.mm
+++ b/base/mac/foundation_util.mm
@@ -28,12 +28,6 @@ CFTypeID SecKeyGetTypeID();
@@ -28,12 +28,6 @@
#if !defined(OS_IOS)
CFTypeID SecACLGetTypeID();
CFTypeID SecTrustedApplicationGetTypeID();
@@ -22,7 +22,7 @@ index be12912dcd0ef0cf046ee2d4033a18ecfdf1e992..d2af322a9d5751105e2c8fe023aad9a9
#endif
} // extern "C"
@@ -326,8 +320,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) {
@@ -326,8 +320,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) {
const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
DCHECK(!cf_val ||
CTFontGetTypeID() == CFGetTypeID(cf_val) ||
@@ -32,7 +32,7 @@ index be12912dcd0ef0cf046ee2d4033a18ecfdf1e992..d2af322a9d5751105e2c8fe023aad9a9
return ns_val;
}
@@ -398,9 +391,6 @@ CFCast<CTFontRef>(const CFTypeRef& cf_val) {
@@ -398,9 +391,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
return (CTFontRef)(cf_val);
}

View File

@@ -18,7 +18,7 @@ index 94afefcee81b87c05bf9b1199d90d3d4b5ea84a6..2ec7f04c71824b47de1ddbf1f0e8625d
extern "C" {
// Kill ring calls. Would be better to use NSKillRing.h, but that's not
@@ -39,38 +40,53 @@ NSString* _NSYankFromKillRing();
@@ -39,38 +40,53 @@
void _NSNewKillRingSequence();
void _NSSetKillRingToYankedState();
}
@@ -92,7 +92,7 @@ index 8f4ae94bc1d8188d041654c50511f3346eee79de..fa06f47abbff3dcda937bf0b794f616e
namespace blink {
@@ -95,10 +97,12 @@ bool ThemePainterMac::PaintTextField(const Node* node,
@@ -95,10 +97,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame,
// behavior change while remaining a fragile solution.
// https://bugs.chromium.org/p/chromium/issues/detail?id=658085#c3
if (!use_ns_text_field_cell) {
@@ -105,7 +105,7 @@ index 8f4ae94bc1d8188d041654c50511f3346eee79de..fa06f47abbff3dcda937bf0b794f616e
return false;
}
@@ -186,10 +190,12 @@ bool ThemePainterMac::PaintTextArea(const Node* node,
@@ -186,10 +190,12 @@ void _NSDrawCarbonThemeListBox(NSRect frame,
const IntRect& r) {
ScopedColorSchemeAppearance appearance(style.UsedColorScheme());
LocalCurrentGraphicsContext local_context(paint_info.context, r);

View File

@@ -18,7 +18,7 @@ index 69580888047c4ac6abb68873315bcafb78dda706..aa347913a75084f669bf7d89fbcc919b
@interface NSWindow (PrivateBrowserNativeWidgetAPI)
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle;
@end
@@ -63,6 +64,8 @@
@@ -63,6 +64,8 @@ - (NSRect)_draggableFrame NS_DEPRECATED_MAC(10_10, 10_11) {
@end
@@ -27,7 +27,7 @@ index 69580888047c4ac6abb68873315bcafb78dda706..aa347913a75084f669bf7d89fbcc919b
@implementation BrowserNativeWidgetWindow
// Prevent detached tabs from glitching when the window is partially offscreen.
@@ -84,6 +87,7 @@
@@ -84,6 +87,7 @@ - (NSRect)constrainFrameRect:(NSRect)rect toScreen:(NSScreen*)screen {
// NSWindow (PrivateAPI) overrides.
@@ -35,7 +35,7 @@ index 69580888047c4ac6abb68873315bcafb78dda706..aa347913a75084f669bf7d89fbcc919b
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
// - NSThemeFrame and its subclasses will be nil if it's missing at runtime.
if ([BrowserWindowFrame class])
@@ -98,6 +102,8 @@
@@ -98,6 +102,8 @@ - (BOOL)_usesCustomDrawing {
return NO;
}
@@ -57,7 +57,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b
@interface NSWindow (PrivateAPI)
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle;
@end
@@ -18,8 +20,12 @@
@@ -18,8 +20,12 @@ - (CGFloat)_titlebarHeight {
}
@end
@@ -70,7 +70,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
if ([NativeWidgetMacFramelessNSWindowFrame class]) {
return [NativeWidgetMacFramelessNSWindowFrame class];
@@ -27,4 +33,6 @@
@@ -27,4 +33,6 @@ + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
return [super frameViewClassForStyleMask:windowStyle];
}
@@ -98,10 +98,10 @@ index e03bbc724cfd01967e71998394361556df1c4915..783745b11365c04c1e1052197d20d494
// The NSWindow used by BridgedNativeWidget. Provides hooks into AppKit that
// can only be accomplished by overriding methods.
diff --git a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
index 757c72d98de11f611309f4f5af8d0d9aab639181..a6319a0760308df6bac6b39ad3500ad77c1b6525 100644
index 5e5a39c2920b748823d21f15bc054733d7aa6441..980c4cef13bacb46e92264bf38f3934626515190 100644
--- a/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
+++ b/components/remote_cocoa/app_shim/native_widget_mac_nswindow.mm
@@ -16,7 +16,9 @@
@@ -15,7 +15,9 @@
#import "ui/base/cocoa/window_size_constants.h"
@interface NSWindow (Private)
@@ -111,7 +111,7 @@ index 757c72d98de11f611309f4f5af8d0d9aab639181..a6319a0760308df6bac6b39ad3500ad7
- (BOOL)hasKeyAppearance;
- (long long)_resizeDirectionForMouseLocation:(CGPoint)location;
- (BOOL)_isConsideredOpenForPersistentState;
@@ -58,6 +60,8 @@
@@ -57,6 +59,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
}
@end
@@ -119,8 +119,8 @@ index 757c72d98de11f611309f4f5af8d0d9aab639181..a6319a0760308df6bac6b39ad3500ad7
+
@implementation NativeWidgetMacNSWindowTitledFrame
- (void)mouseDown:(NSEvent*)event {
if (base::mac::IsAtMostOS10_11() && self.window.isMovable)
@@ -84,6 +88,8 @@
if (self.window.isMovable)
@@ -83,6 +87,8 @@ - (BOOL)usesCustomDrawing {
}
@end
@@ -129,7 +129,7 @@ index 757c72d98de11f611309f4f5af8d0d9aab639181..a6319a0760308df6bac6b39ad3500ad7
@implementation NativeWidgetMacNSWindow {
@private
base::scoped_nsobject<CommandDispatcher> _commandDispatcher;
@@ -165,6 +171,8 @@
@@ -164,6 +170,8 @@ - (BOOL)hasViewsMenuActive {
// NSWindow overrides.
@@ -138,7 +138,7 @@ index 757c72d98de11f611309f4f5af8d0d9aab639181..a6319a0760308df6bac6b39ad3500ad7
+ (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
if (windowStyle & NSWindowStyleMaskTitled) {
if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
@@ -176,6 +184,8 @@
@@ -175,6 +183,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
return [super frameViewClassForStyleMask:windowStyle];
}

View File

@@ -17,7 +17,7 @@ diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components
index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209ff3cbfaaa 100644
--- a/components/remote_cocoa/app_shim/application_bridge.mm
+++ b/components/remote_cocoa/app_shim/application_bridge.mm
@@ -49,6 +49,7 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper {
@@ -49,6 +49,7 @@
// NativeWidgetNSWindowHostHelper:
id GetNativeViewAccessible() override {
@@ -25,7 +25,7 @@ index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209f
if (!remote_accessibility_element_) {
int64_t browser_pid = 0;
std::vector<uint8_t> element_token;
@@ -59,6 +60,9 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper {
@@ -59,6 +60,9 @@ id GetNativeViewAccessible() override {
ui::RemoteAccessibility::GetRemoteElementFromToken(element_token);
}
return remote_accessibility_element_.get();
@@ -35,7 +35,7 @@ index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209f
}
void DispatchKeyEvent(ui::KeyEvent* event) override {
bool event_handled = false;
@@ -96,8 +100,10 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper {
@@ -96,8 +100,10 @@ void GetWordAt(const gfx::Point& location_in_content,
mojo::AssociatedRemote<mojom::TextInputHost> text_input_host_remote_;
std::unique_ptr<NativeWidgetNSWindowBridge> bridge_;
@@ -50,7 +50,7 @@ diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index 2ee45cb069ec5d78d9c7a3f61fdd1d444a590f41..badc4323b910f8e3957583e05af303472cb204f6 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -543,10 +543,12 @@ void NativeWidgetNSWindowBridge::CreateContentView(uint64_t ns_view_id,
@@ -543,10 +543,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
// this should be treated as an error and caught early.
CHECK(bridged_view_);
@@ -67,7 +67,7 @@ diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/cont
index c3a9fbf0f9d2b80c1de42a22ad094a286f0b559b..02493d4b62c98a3aebd3e460c459218a4dc4ea8e 100644
--- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
+++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
@@ -70,8 +70,10 @@ class RenderWidgetHostNSViewBridgeOwner
@@ -70,8 +70,10 @@ id GetFocusedBrowserAccessibilityElement() override {
return nil;
}
void SetAccessibilityWindow(NSWindow* window) override {
@@ -78,7 +78,7 @@ index c3a9fbf0f9d2b80c1de42a22ad094a286f0b559b..02493d4b62c98a3aebd3e460c459218a
}
void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event,
@@ -133,8 +135,10 @@ class RenderWidgetHostNSViewBridgeOwner
@@ -133,8 +135,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override {
mojo::AssociatedRemote<mojom::RenderWidgetHostNSViewHost> host_;
std::unique_ptr<RenderWidgetHostNSViewBridge> bridge_;
@@ -90,7 +90,7 @@ index c3a9fbf0f9d2b80c1de42a22ad094a286f0b559b..02493d4b62c98a3aebd3e460c459218a
DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostNSViewBridgeOwner);
};
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.h b/content/browser/renderer_host/render_widget_host_view_mac.h
index 90f5455272c6685f6d5abeb6c636234f49618422..d13cc2c15ae553c2d20562deea62173b7d933f59 100644
index 82f2b94d4fe1688fd19d5321c4a4398dda3b8d33..b00517cb5b5acdce7b58552967858b93d2474110 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.h
+++ b/content/browser/renderer_host/render_widget_host_view_mac.h
@@ -47,7 +47,9 @@ class ScopedPasswordInputEnabler;
@@ -103,7 +103,7 @@ index 90f5455272c6685f6d5abeb6c636234f49618422..d13cc2c15ae553c2d20562deea62173b
@class RenderWidgetHostViewCocoa;
namespace content {
@@ -640,10 +642,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
@@ -641,10 +643,12 @@ class CONTENT_EXPORT RenderWidgetHostViewMac
// EnsureSurfaceSynchronizedForWebTest().
uint32_t latest_capture_sequence_number_ = 0u;
@@ -117,10 +117,10 @@ index 90f5455272c6685f6d5abeb6c636234f49618422..d13cc2c15ae553c2d20562deea62173b
// Used to force the NSApplication's focused accessibility element to be the
// content::BrowserAccessibilityCocoa accessibility tree when the NSView for
diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/content/browser/renderer_host/render_widget_host_view_mac.mm
index ed223cdb6ea7a0f6130547b7988982bb44aa157d..b5e4f8fb0e914078ae40d034e1b785f77607bbea 100644
index c716b747db822a4dfd97c07e0abeb4d1e4b79e03..764d23f23ce2c7bc8068d0fbd97da08fd81b35dd 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -233,8 +233,10 @@ RenderWidgetHostViewMac::~RenderWidgetHostViewMac() {
@@ -233,8 +233,10 @@
void RenderWidgetHostViewMac::MigrateNSViewBridge(
remote_cocoa::mojom::Application* remote_cocoa_application,
uint64_t parent_ns_view_id) {
@@ -131,7 +131,7 @@ index ed223cdb6ea7a0f6130547b7988982bb44aa157d..b5e4f8fb0e914078ae40d034e1b785f7
// Disconnect from the previous bridge (this will have the effect of
// destroying the associated bridge), and close the receiver (to allow it
@@ -1377,8 +1379,10 @@ RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessible() {
@@ -1383,8 +1385,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -142,7 +142,7 @@ index ed223cdb6ea7a0f6130547b7988982bb44aa157d..b5e4f8fb0e914078ae40d034e1b785f7
return [GetInProcessNSView() window];
}
@@ -1410,9 +1414,11 @@ id RenderWidgetHostViewMac::GetFocusedBrowserAccessibilityElement() {
@@ -1416,9 +1420,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -154,7 +154,7 @@ index ed223cdb6ea7a0f6130547b7988982bb44aa157d..b5e4f8fb0e914078ae40d034e1b785f7
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -1899,12 +1905,14 @@ void RenderWidgetHostViewMac::StopSpeaking() {
@@ -1905,12 +1911,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
const std::vector<uint8_t>& window_token) {
@@ -170,10 +170,10 @@ index ed223cdb6ea7a0f6130547b7988982bb44aa157d..b5e4f8fb0e914078ae40d034e1b785f7
///////////////////////////////////////////////////////////////////////////////
diff --git a/ui/base/BUILD.gn b/ui/base/BUILD.gn
index d1aa0aaf5a949683e37a26ada1b1f178d9d82721..6dc85fa624d49e0222f7d25c2602dc6e4b2a2b56 100644
index 88883f2c90d89e719ba2c1d1541c73a13f7f2e0c..60b80facdae6eb6fed22b4a7e20a31f2928ab5fe 100644
--- a/ui/base/BUILD.gn
+++ b/ui/base/BUILD.gn
@@ -309,6 +309,13 @@ jumbo_component("base") {
@@ -313,6 +313,13 @@ component("base") {
]
}
@@ -208,7 +208,7 @@ index e7adfee3210ec723c687adfcc4bee8827ef643e7..25a924a47eeb30d783ef83dbb4896c4b
+
#endif // UI_BASE_COCOA_REMOTE_ACCESSIBILITY_API_H_
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.h b/ui/views/cocoa/native_widget_mac_ns_window_host.h
index 06427b2009ceb2cecf39d783fd1c3477cd5e66f9..1a2cd7a0e52e6345472f29283dfe94be506a338a 100644
index 492386c61ac6701fc38c5e90976b4e5f638189de..6050916081ebeb426ee6cf5dd67962f0961a1a94 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.h
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.h
@@ -29,7 +29,9 @@
@@ -236,10 +236,10 @@ index 06427b2009ceb2cecf39d783fd1c3477cd5e66f9..1a2cd7a0e52e6345472f29283dfe94be
// Used to force the NSApplication's focused accessibility element to be the
// views::Views accessibility tree when the NSView for this is focused.
diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
index 2256c365af5b1af79458fdcb0cb9d44c9ff641fd..f4949b071a177452b0074a2436669e9846558d1a 100644
index 39c39c1585e71e276cbbd073c81eac2b3f0ed655..ae5bd658ed21d03710fe3aa7d9f19cce9476fac4 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -282,14 +282,22 @@ gfx::NativeViewAccessible
@@ -283,14 +283,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const {
if (in_process_ns_window_bridge_)
return in_process_ns_window_bridge_->ns_view();
@@ -262,7 +262,7 @@ index 2256c365af5b1af79458fdcb0cb9d44c9ff641fd..f4949b071a177452b0074a2436669e98
}
remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1118,6 +1126,7 @@ void NativeWidgetMacNSWindowHost::OnFocusWindowToolbar() {
@@ -1121,6 +1129,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {
@@ -270,7 +270,7 @@ index 2256c365af5b1af79458fdcb0cb9d44c9ff641fd..f4949b071a177452b0074a2436669e98
remote_window_accessible_ =
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
remote_view_accessible_ =
@@ -1125,14 +1134,17 @@ void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
@@ -1128,14 +1137,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
[remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()];
[remote_view_accessible_
setTopLevelUIElement:remote_window_accessible_.get()];

View File

@@ -44,7 +44,7 @@ diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/se
index 67e0efb23c717c3194f27695215a8bd20dbbb957..cf02fab328d9fe7a6e9f53c712a7c1c871b8b304 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
@@ -51,7 +51,7 @@ ImageTransportSurfaceOverlayMacBase<BaseClass>::
@@ -51,7 +51,7 @@
ca_layer_tree_coordinator_.reset(new ui::CALayerTreeCoordinator(
use_remote_layer_api_, allow_av_sample_buffer_display_layer));
@@ -53,7 +53,7 @@ index 67e0efb23c717c3194f27695215a8bd20dbbb957..cf02fab328d9fe7a6e9f53c712a7c1c8
// Create the CAContext to send this to the GPU process, and the layer for
// the context.
if (use_remote_layer_api_) {
@@ -60,6 +60,7 @@ ImageTransportSurfaceOverlayMacBase<BaseClass>::
@@ -60,6 +60,7 @@
options:@{}] retain]);
[ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()];
}
@@ -61,7 +61,7 @@ index 67e0efb23c717c3194f27695215a8bd20dbbb957..cf02fab328d9fe7a6e9f53c712a7c1c8
}
template <typename BaseClass>
@@ -140,7 +141,9 @@ ImageTransportSurfaceOverlayMacBase<BaseClass>::SwapBuffersInternal(
@@ -140,7 +141,9 @@
"GLImpl", static_cast<int>(gl::GetGLImplementation()),
"width", pixel_size_.width());
if (use_remote_layer_api_) {
@@ -75,7 +75,7 @@ diff --git a/ui/accelerated_widget_mac/display_ca_layer_tree.mm b/ui/accelerated
index 0db8f3e223e3cb8e289af63a50104fb6823ed46a..d7969cf08317731bf8e1c8545a07734412593e37 100644
--- a/ui/accelerated_widget_mac/display_ca_layer_tree.mm
+++ b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
@@ -98,6 +98,7 @@ void DisplayCALayerTree::UpdateCALayerTree(
@@ -98,6 +98,7 @@ - (void)setContentsChanged;
}
void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) {
@@ -83,7 +83,7 @@ index 0db8f3e223e3cb8e289af63a50104fb6823ed46a..d7969cf08317731bf8e1c8545a077344
// Early-out if the remote layer has not changed.
if ([remote_layer_ contextId] == ca_context_id)
return;
@@ -122,6 +123,9 @@ void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) {
@@ -122,6 +123,9 @@ - (void)setContentsChanged;
[io_surface_layer_ removeFromSuperlayer];
io_surface_layer_.reset();
}

View File

@@ -7,40 +7,10 @@ Guard usages in blink of private Mac APIs by MAS_BUILD, so they can be
excluded for people who want to submit their apps to the Mac App store.
diff --git a/content/browser/accessibility/accessibility_tree_formatter_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
index 6074fd6fb7da7c0e927fa81e8095729349520417..d6e93ab7cea23fe9592110967a1c9cfa0481551d 100644
index 3846ac2e4ff654f77f8f66ace3bd87410534e34d..4cd4cd7f32f49c71134880252f5e5bdde8168d09 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_mac.mm
+++ b/content/browser/accessibility/accessibility_tree_formatter_mac.mm
@@ -341,11 +341,13 @@ AccessibilityTreeFormatterMac::ParamByPropertyNode(
param = PropertyNodeToRange(property_node);
} else if (property_name == "AXIndexForChildUIElement") { // UIElement
param = PropertyNodeToUIElement(property_node, line_indexes_map);
+#ifndef MAS_BUILD
} else if (property_name == "AXIndexForTextMarker") { // TextMarker
param = PropertyNodeToTextMarker(property_node, line_indexes_map);
} else if (property_name ==
"AXStringForTextMarkerRange") { // TextMarkerRange
param = PropertyNodeToTextMarkerRange(property_node, line_indexes_map);
+#endif
}
return param;
@@ -433,6 +435,7 @@ AccessibilityTreeFormatterMac::PropertyNodeToUIElement(
return uielement;
}
+#ifndef MAS_BUILD
id AccessibilityTreeFormatterMac::DictNodeToTextMarker(
const PropertyNode& dictnode,
const LineIndexesMap& line_indexes_map) const {
@@ -512,6 +515,7 @@ id AccessibilityTreeFormatterMac::PropertyNodeToTextMarkerRange(
return content::AXTextMarkerRangeFrom(anchor_textmarker, focus_textmarker);
}
+#endif
base::Value AccessibilityTreeFormatterMac::PopulateSize(
const BrowserAccessibilityCocoa* cocoa_node) const {
@@ -573,7 +577,7 @@ base::Value AccessibilityTreeFormatterMac::PopulateObject(
@@ -299,7 +299,7 @@ OptionalNSObject InvokeAttributeFor(
0 == strcmp([value objCType], @encode(NSRange))) {
return PopulateRange([value rangeValue]);
}
@@ -49,7 +19,7 @@ index 6074fd6fb7da7c0e927fa81e8095729349520417..d6e93ab7cea23fe9592110967a1c9cfa
// AXTextMarker
if (content::IsAXTextMarker(value)) {
return PopulateTextPosition(content::AXTextMarkerToPosition(value).get(),
@@ -584,7 +588,7 @@ base::Value AccessibilityTreeFormatterMac::PopulateObject(
@@ -310,7 +310,7 @@ OptionalNSObject InvokeAttributeFor(
if (content::IsAXTextMarkerRange(value)) {
return PopulateTextMarkerRange(value, line_indexes_map);
}
@@ -58,7 +28,7 @@ index 6074fd6fb7da7c0e927fa81e8095729349520417..d6e93ab7cea23fe9592110967a1c9cfa
// Accessible object
if ([value isKindOfClass:[BrowserAccessibilityCocoa class]]) {
return base::Value(NodeToLineIndex(value, line_indexes_map));
@@ -635,7 +639,7 @@ base::Value AccessibilityTreeFormatterMac::PopulateTextPosition(
@@ -361,7 +361,7 @@ OptionalNSObject InvokeAttributeFor(
kConstValuePrefix + affinity);
return set;
}
@@ -67,7 +37,7 @@ index 6074fd6fb7da7c0e927fa81e8095729349520417..d6e93ab7cea23fe9592110967a1c9cfa
base::Value AccessibilityTreeFormatterMac::PopulateTextMarkerRange(
id object,
const LineIndexesMap& line_indexes_map) const {
@@ -650,7 +654,7 @@ base::Value AccessibilityTreeFormatterMac::PopulateTextMarkerRange(
@@ -376,7 +376,7 @@ OptionalNSObject InvokeAttributeFor(
dict.SetPath("focus", PopulateTextPosition(range.focus(), line_indexes_map));
return dict;
}
@@ -76,11 +46,47 @@ index 6074fd6fb7da7c0e927fa81e8095729349520417..d6e93ab7cea23fe9592110967a1c9cfa
base::Value AccessibilityTreeFormatterMac::PopulateArray(
NSArray* node_array,
const LineIndexesMap& line_indexes_map) const {
diff --git a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
index a6d1fc76a58b03a0a35a9724850fe9ee84fe7909..d3e251cc3273d38a8930d00615a1423b4487b8de 100644
--- a/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
+++ b/content/browser/accessibility/accessibility_tree_formatter_utils_mac.mm
@@ -153,6 +153,7 @@
if (property_name == "AXIndexForChildUIElement") { // UIElement
return OptionalNSObject::NotNilOrError(PropertyNodeToUIElement(arg_node));
}
+#ifndef MAS_BUILD
if (property_name == "AXIndexForTextMarker") { // TextMarker
return OptionalNSObject::NotNilOrError(PropertyNodeToTextMarker(arg_node));
}
@@ -160,6 +161,7 @@
return OptionalNSObject::NotNilOrError(
PropertyNodeToTextMarkerRange(arg_node));
}
+#endif
return OptionalNSObject::NotApplicable();
}
@@ -226,6 +228,7 @@
return uielement;
}
+#ifndef MAS_BUILD
id AttributeInvoker::DictNodeToTextMarker(const PropertyNode& dictnode) const {
if (!dictnode.IsDict()) {
TEXTMARKER_FAIL(dictnode, "dictionary is expected")
@@ -293,6 +296,7 @@
return content::AXTextMarkerRangeFrom(anchor_textmarker, focus_textmarker);
}
+#endif
} // namespace a11y
} // namespace content
diff --git a/content/browser/accessibility/browser_accessibility_cocoa.h b/content/browser/accessibility/browser_accessibility_cocoa.h
index d1d406e383d80cf7bc233c87d383084f130f73d5..f56a191cb01fbcf91f60abc312ee5277bf857929 100644
index cb253906ddd9b70df1618a1c3738fc64389b5432..318af1ec3a11ee53a1146909f76c9cea7f78be1e 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.h
+++ b/content/browser/accessibility/browser_accessibility_cocoa.h
@@ -132,7 +132,9 @@ id AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker);
@@ -137,7 +137,9 @@ id AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker);
@property(nonatomic, readonly) NSNumber* enabled;
// Returns a text marker that points to the last character in the document that
// can be selected with Voiceover.
@@ -90,7 +96,7 @@ index d1d406e383d80cf7bc233c87d383084f130f73d5..f56a191cb01fbcf91f60abc312ee5277
@property(nonatomic, readonly) NSNumber* expanded;
@property(nonatomic, readonly) NSNumber* focused;
@property(nonatomic, readonly) NSNumber* grabbed;
@@ -143,7 +145,9 @@ id AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker);
@@ -148,7 +150,9 @@ id AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker);
@property(nonatomic, readonly, getter=isIgnored) BOOL ignored;
// Index of a row, column, or tree item.
@property(nonatomic, readonly) NSNumber* index;
@@ -100,7 +106,7 @@ index d1d406e383d80cf7bc233c87d383084f130f73d5..f56a191cb01fbcf91f60abc312ee5277
@property(nonatomic, readonly) NSString* invalid;
@property(nonatomic, readonly) NSNumber* isMultiSelectable;
@property(nonatomic, readonly) NSString* placeholderValue;
@@ -166,14 +170,18 @@ id AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker);
@@ -171,14 +175,18 @@ id AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker);
// The object is selected as a whole.
@property(nonatomic, readonly) NSNumber* selected;
@property(nonatomic, readonly) NSArray* selectedChildren;
@@ -120,10 +126,10 @@ index d1d406e383d80cf7bc233c87d383084f130f73d5..f56a191cb01fbcf91f60abc312ee5277
// 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 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d91772acc7d9d 100644
index d203e3a6a80d3347e22c84384359de3df50a1f0c..7d38e86e76e1f1ae70300141091d0fb98fdc208c 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -208,6 +208,7 @@ NSString* const
@@ -208,6 +208,7 @@
NSString* const NSAccessibilityLengthForTextMarkerRangeParameterizedAttribute =
@"AXLengthForTextMarkerRange";
@@ -131,7 +137,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
// Private attributes that can be used for testing text markers, e.g. in dump
// tree tests.
NSString* const
@@ -219,6 +220,7 @@ NSString* const
@@ -219,6 +220,7 @@
NSString* const
NSAccessibilityTextMarkerNodeDebugDescriptionParameterizedAttribute =
@"AXTextMarkerNodeDebugDescription";
@@ -139,7 +145,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
// Other private attributes.
NSString* const NSAccessibilitySelectTextWithCriteriaParameterizedAttribute =
@@ -242,6 +244,7 @@ NSDictionary* attributeToMethodNameMap = nil;
@@ -242,6 +244,7 @@
// VoiceOver uses -1 to mean "no limit" for AXResultsLimit.
const int kAXResultsLimitNoLimit = -1;
@@ -147,7 +153,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
extern "C" {
// The following are private accessibility APIs required for cursor navigation
@@ -470,6 +473,7 @@ NSAttributedString* GetAttributedTextForTextMarkerRange(id marker_range) {
@@ -470,6 +473,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range,
AddMisspelledTextAttributes(ax_range, attributed_text);
return attributed_text;
}
@@ -155,7 +161,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
// Returns an autoreleased copy of the AXNodeData's attribute.
NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility,
@@ -727,6 +731,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
@@ -741,6 +745,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
#define NSAccessibilityLanguageAttribute @"AXLanguage"
#endif
@@ -163,7 +169,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
bool content::IsAXTextMarker(id object) {
if (object == nil)
return false;
@@ -770,6 +775,7 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -784,6 +789,7 @@ bool IsSelectedStateRelevant(BrowserAccessibility* item) {
kCFAllocatorDefault, anchor_textmarker, focus_textmarker);
return [static_cast<id>(cf_marker_range) autorelease];
}
@@ -171,7 +177,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
@implementation BrowserAccessibilityCocoa
@@ -807,7 +813,9 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -821,7 +827,9 @@ + (void)initialize {
{NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
{NSAccessibilityElementBusyAttribute, @"elementBusy"},
{NSAccessibilityEnabledAttribute, @"enabled"},
@@ -181,7 +187,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
{NSAccessibilityExpandedAttribute, @"expanded"},
{NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"},
{NSAccessibilityFocusedAttribute, @"focused"},
@@ -819,8 +827,10 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -833,8 +841,10 @@ + (void)initialize {
{NSAccessibilityHighestEditableAncestorAttribute,
@"highestEditableAncestor"},
{NSAccessibilityIndexAttribute, @"index"},
@@ -192,7 +198,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
{NSAccessibilityInvalidAttribute, @"invalid"},
{NSAccessibilityIsMultiSelectableAttribute, @"isMultiSelectable"},
{NSAccessibilityLanguageAttribute, @"language"},
@@ -842,13 +852,17 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -856,13 +866,17 @@ + (void)initialize {
{NSAccessibilityRowsAttribute, @"rows"},
// TODO(aboxhall): expose
// NSAccessibilityServesAsTitleForUIElementsAttribute
@@ -210,7 +216,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
{NSAccessibilitySizeAttribute, @"size"},
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
{NSAccessibilitySubroleAttribute, @"subrole"},
@@ -1336,6 +1350,7 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -1350,6 +1364,7 @@ - (NSNumber*)enabled {
ax::mojom::Restriction::kDisabled];
}
@@ -218,7 +224,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
// Returns a text marker that points to the last character in the document that
// can be selected with VoiceOver.
- (id)endTextMarker {
@@ -1346,6 +1361,7 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -1360,6 +1375,7 @@ - (id)endTextMarker {
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
}
@@ -226,7 +232,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
- (NSNumber*)expanded {
if (![self instanceActive])
@@ -1495,6 +1511,8 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -1509,6 +1525,8 @@ - (NSNumber*)index {
return nil;
}
@@ -235,7 +241,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
- (NSNumber*)insertionPointLineNumber {
if (![self instanceActive])
return nil;
@@ -1517,6 +1535,7 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -1531,6 +1549,7 @@ - (NSNumber*)insertionPointLineNumber {
caretPosition->AsTextPosition()->text_offset());
return @(std::distance(lineBreaks.begin(), iterator));
}
@@ -243,7 +249,20 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
// Returns whether or not this node should be ignored in the
// accessibility tree.
@@ -2193,6 +2212,7 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -1894,8 +1913,12 @@ - (BOOL)shouldExposeTitleUIElement {
return content::AXTextEdit(newValue, base::string16(), nil);
}
}
+#ifndef MAS_BUILD
return content::AXTextEdit(insertedText, deletedText,
CreateTextMarker(_owner->CreatePositionAt(i)));
+#else
+ return content::AXTextEdit(insertedText, deletedText, nil);
+#endif
}
- (BOOL)instanceActive {
@@ -2225,6 +2248,7 @@ - (NSArray*)selectedChildren {
return ret;
}
@@ -251,7 +270,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
- (NSString*)selectedText {
if (![self instanceActive])
return nil;
@@ -2204,11 +2224,13 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -2236,11 +2260,13 @@ - (NSString*)selectedText {
return nil;
return base::SysUTF16ToNSString(range.GetText());
}
@@ -265,7 +284,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
- (NSValue*)selectedTextRange {
if (![self instanceActive])
return nil;
@@ -2229,12 +2251,15 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -2261,7 +2287,9 @@ - (NSValue*)selectedTextRange {
int selLength = range.GetText().length();
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
}
@@ -275,13 +294,15 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
- (id)selectedTextMarkerRange {
if (![self instanceActive])
return nil;
return CreateTextMarkerRange(GetSelectedRange(*_owner));
@@ -2269,6 +2297,7 @@ - (id)selectedTextMarkerRange {
// words correctly.
return CreateTextMarkerRange(GetSelectedRange(*_owner).AsBackwardRange());
}
+#endif
- (NSValue*)size {
if (![self instanceActive])
@@ -2267,6 +2292,7 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -2301,6 +2330,7 @@ - (NSString*)sortDirection {
return nil;
}
@@ -289,7 +310,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
// Returns a text marker that points to the first character in the document that
// can be selected with VoiceOver.
- (id)startTextMarker {
@@ -2277,6 +2303,7 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -2311,6 +2341,7 @@ - (id)startTextMarker {
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
}
@@ -297,7 +318,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
// Returns a subrole based upon the role.
- (NSString*)subrole {
@@ -2599,11 +2626,13 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -2630,11 +2661,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
NSMutableAttributedString* attributedInnerText =
[[[NSMutableAttributedString alloc]
initWithString:base::SysUTF16ToNSString(innerText)] autorelease];
@@ -311,7 +332,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
return [attributedInnerText attributedSubstringFromRange:range];
}
@@ -2707,9 +2736,8 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -2738,9 +2771,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
return ToBrowserAccessibilityCocoa(cell);
}
@@ -323,7 +344,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
BrowserAccessibilityPositionInstance position =
CreatePositionFromTextMarker(parameter);
if (!position->IsNullPosition())
@@ -3022,6 +3050,7 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -3053,6 +3085,7 @@ AXPlatformRange range(std::move(lineStartPosition),
return CreateTextMarker(root->CreatePositionAt(index));
}
@@ -331,7 +352,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
if ([attribute isEqualToString:
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
@@ -3057,6 +3086,7 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -3088,6 +3121,7 @@ AXPlatformRange range(std::move(lineStartPosition),
return nil;
}
@@ -339,7 +360,7 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
if ([attribute
isEqualToString:
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
@@ -3171,6 +3201,7 @@ id content::AXTextMarkerRangeFrom(id anchor_textmarker, id focus_textmarker) {
@@ -3202,6 +3236,7 @@ AXPlatformRange range(std::move(lineStartPosition),
return @(child->GetIndexInParent());
}
@@ -348,10 +369,10 @@ index 474ae88c323e9a10bd8486482507f0d749214963..090c8fdc3b374ed937d3e04ccd5d9177
return nil;
}
diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm b/content/browser/accessibility/browser_accessibility_manager_mac.mm
index aaf53dd214037f103ea7399d0702b1e2ffff1b56..5972939a070908521e82845b084d2d3b9f9a73f8 100644
index 87dafcd74b0c037a1aa3cdfe305d586218f12aa7..cdf2bde5ed2bd740797c7c3d422f78517937ab2d 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -527,6 +527,7 @@ NSDictionary* BrowserAccessibilityManagerMac::
@@ -533,6 +533,7 @@ void PostAnnouncementNotification(NSString* announcement) {
[user_info setObject:native_focus_object
forKey:NSAccessibilityTextChangeElement];
@@ -359,7 +380,7 @@ index aaf53dd214037f103ea7399d0702b1e2ffff1b56..5972939a070908521e82845b084d2d3b
id selected_text = [native_focus_object selectedTextMarkerRange];
if (selected_text) {
NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
@@ -534,6 +535,7 @@ NSDictionary* BrowserAccessibilityManagerMac::
@@ -540,6 +541,7 @@ void PostAnnouncementNotification(NSString* announcement) {
[user_info setObject:selected_text
forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
}
@@ -383,7 +404,7 @@ index 28ca1646af0b0cce40d27baec71cbe65adc334fa..bae65c1f485bc02eb9ef2ebf7018af4a
namespace content {
@@ -22,6 +24,7 @@ namespace {
@@ -22,6 +24,7 @@
// verifies there are no existing open connections), and then indicates that
// Chrome should continue execution without access to launchservicesd.
void DisableSystemServices() {
@@ -399,19 +420,57 @@ index 28ca1646af0b0cce40d27baec71cbe65adc334fa..bae65c1f485bc02eb9ef2ebf7018af4a
}
} // namespace
diff --git a/content/renderer/theme_helper_mac.mm b/content/renderer/theme_helper_mac.mm
index 1db129740992672a4e8be8100da18b6813f1a4f8..5b1e456020ac859c826dbef2826cacf3bb60108b 100644
--- a/content/renderer/theme_helper_mac.mm
+++ b/content/renderer/theme_helper_mac.mm
@@ -7,11 +7,11 @@
#include <Cocoa/Cocoa.h>
#include "base/strings/sys_string_conversions.h"
-
+#if !defined(MAS_BUILD)
extern "C" {
bool CGFontRenderingGetFontSmoothingDisabled(void) API_AVAILABLE(macos(10.14));
}
-
+#endif
namespace content {
void SystemColorsDidChange(int aqua_color_variant,
@@ -59,8 +59,19 @@ void SystemColorsDidChange(int aqua_color_variant,
bool IsSubpixelAntialiasingAvailable() {
if (__builtin_available(macOS 10.14, *)) {
// See https://trac.webkit.org/changeset/239306/webkit for more info.
+#if !defined(MAS_BUILD)
return !CGFontRenderingGetFontSmoothingDisabled();
+#else
+ NSUserDefaults* defaults = [NSUserDefaults standardUserDefaults];
+ NSString *default_key = @"CGFontRenderingGetFontSmoothingDisabled";
+ // Check that key exists since boolForKey defaults to NO when the
+ // key is missing and this key in fact defaults to YES;
+ if ([defaults objectForKey:default_key] == nil)
+ return false;
+ return ![defaults boolForKey:default_key];
+#endif
}
+
return true;
}
diff --git a/device/bluetooth/bluetooth_adapter_mac.mm b/device/bluetooth/bluetooth_adapter_mac.mm
index 3aec8bc1fe1a619f2c4ec42ef438ae49fe0f5812..76dc23dfa26beb3b92bd87eb60fe3868ed0a703f 100644
index 933483c36d94336c8e9cc56a53bc86aee01e12d0..a48b4af66fb4edcf74caef5bec68c53be5469fe8 100644
--- a/device/bluetooth/bluetooth_adapter_mac.mm
+++ b/device/bluetooth/bluetooth_adapter_mac.mm
@@ -36,6 +36,7 @@
#include "device/bluetooth/bluetooth_low_energy_peripheral_manager_delegate.h"
@@ -37,6 +37,7 @@
#include "device/bluetooth/bluetooth_socket_mac.h"
#include "device/bluetooth/public/cpp/bluetooth_address.h"
+#ifndef MAS_BUILD
extern "C" {
// Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and
// `Karabiner` [3] to programmatically control the Bluetooth state. Calling the
@@ -49,6 +50,7 @@ extern "C" {
@@ -50,6 +51,7 @@
// [4] https://support.apple.com/kb/PH25091
void IOBluetoothPreferenceSetControllerPowerState(int state);
}
@@ -419,7 +478,7 @@ index 3aec8bc1fe1a619f2c4ec42ef438ae49fe0f5812..76dc23dfa26beb3b92bd87eb60fe3868
namespace {
@@ -118,8 +120,10 @@ BluetoothAdapterMac::BluetoothAdapterMac()
@@ -119,8 +121,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
controller_state_function_(
base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState,
base::Unretained(this))),
@@ -430,7 +489,7 @@ index 3aec8bc1fe1a619f2c4ec42ef438ae49fe0f5812..76dc23dfa26beb3b92bd87eb60fe3868
should_update_name_(true),
classic_discovery_manager_(
BluetoothDiscoveryManagerMac::CreateClassic(this)),
@@ -306,8 +310,12 @@ base::WeakPtr<BluetoothAdapter> BluetoothAdapterMac::GetWeakPtr() {
@@ -307,8 +311,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
}
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {
@@ -444,7 +503,7 @@ index 3aec8bc1fe1a619f2c4ec42ef438ae49fe0f5812..76dc23dfa26beb3b92bd87eb60fe3868
void BluetoothAdapterMac::RemovePairingDelegateInternal(
diff --git a/media/audio/BUILD.gn b/media/audio/BUILD.gn
index bf4b736b05f38fb7022d0d15860d88672bd6def5..f49bb226163d74759c8f02a29abfc3e1ed17bf9f 100644
index 0e8a5903f6b24e31c2b71037e94870aafbf30112..ea6b5c203fb6b34be36b86a2a3edcd5c69549fc5 100644
--- a/media/audio/BUILD.gn
+++ b/media/audio/BUILD.gn
@@ -171,6 +171,12 @@ source_set("audio") {
@@ -474,7 +533,7 @@ index a994f74bb68d1e57ffa787e159f0a6c69e7b6953..1d84f84b59b2bae75c10c00da730022e
}
diff --git a/net/dns/dns_config_service_posix.cc b/net/dns/dns_config_service_posix.cc
index d8224724a8920330ef2ff8179f87b84bb8a58045..4f61e4441e6597306140847f2de567f3f094677e 100644
index 3206f81a75f4b7ea3a4257293dc92c3ada4c1327..2bcbf81008783dc8f6a10a65fac07875ee442e72 100644
--- a/net/dns/dns_config_service_posix.cc
+++ b/net/dns/dns_config_service_posix.cc
@@ -247,6 +247,7 @@ class DnsConfigServicePosix::Watcher {

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