Compare commits

...

86 Commits

Author SHA1 Message Date
Electron Bot
593af18528 Bump v13.0.0-beta.16 2021-04-19 08:01:28 -07:00
trop[bot]
df47f85646 fix: increase corner radius for vibrancy view on big sur (#28679)
* fix: increase corner radius for vibrancy view on big sur

* fix: revert git weirdness

Co-authored-by: Robin Fowler <robinfowler@Robins-MBP.broadband>
2021-04-15 15:58:42 -07:00
Electron Bot
bd3b70a6b5 Bump v13.0.0-beta.15 2021-04-15 08:04:17 -07:00
trop[bot]
9578943848 build: do not require vsts token for releases (#28648)
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-04-14 11:44:43 +02:00
Electron Bot
91de226a62 Bump v13.0.0-beta.14 2021-04-13 13:39:59 -07:00
Electron Bot
7044cb69a8 chore: cherry-pick 02f84c745fc0 from v8 (#28637)
* chore: cherry-pick 02f84c745fc0 from v8

* update patches
2021-04-13 13:29:05 -07:00
Electron Bot
66a2218723 chore: bump chromium to 91.0.4448.0 (13-x-y) (#28127)
* chore: bump chromium in DEPS to 90.0.4430.19

* build: add 'use_rts' definition

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2694187
(cherry picked from commit b820b4078d)

* chore: bump chromium in DEPS to 91.0.4441.0

* chore: update patches

(cherry picked from commit 55e50a0879)

* chore: media_internal_resources becomes resources

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2699022
(cherry picked from commit e715b9c921)

* chore: update patches

(cherry picked from commit c8148febfa)

* refactor: extensions::ViewType moved to mojom

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2710351
(cherry picked from commit 87df2766ba)

* chore: might_have_observers has been removed

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2667839
(cherry picked from commit e900271bea)

* refactor: CertVerifier is not in the network namespace anymore

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2689805
(cherry picked from commit eccfa516c5)

* refactor: ExtensionUserScriptManager is now UserScriptManager

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2657617
(cherry picked from commit 2fed02556d)

* refactor: content::SiteInstance::GetSiteForURL was removed

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2680274
(cherry picked from commit 0d94e0d1d9)

* refactor: MenuItemType was moved to mojom

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2071443
(cherry picked from commit 1a296e59c2)

* refactor: extensions::ViewType was moved to mojom

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2710351
(cherry picked from commit dc36e8e6fc)

* refacotr: grit::ResourceMap replaced with webui::ResourcePath

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2685601
(cherry picked from commit 59669e99cb)

* refactor: blink::MenuItem::Type was moved to mojom

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2071443
(cherry picked from commit be627568b2)

* refactor: CreateDataPipe deprecated form was removed

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2698090
(cherry picked from commit 77ad17b383)

* refactor: DesktopMediaList::Type replaces content::DesktopMediaType_*

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2700637
(cherry picked from commit 4e02d9407a)

* chore: wire up activation_time in OSR

Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2638372
(cherry picked from commit f51f427646)

* chore: remove deleted file from chromium_src list

(cherry picked from commit 59432fe30a)

* chore: fix lint

(cherry picked from commit 54cc68dd7a)

* update patches

(cherry picked from commit e99e6a5a8a)

* chore: update patches

(cherry picked from commit 1e16606524)

* fixup gn check

(cherry picked from commit 8f4e362d8f)

* update to xcode 12.4.0

Needed because of 8008deb41c

(cherry picked from commit fae4d87a5a)

* 2752406: [LSC] Replace base::string16 with std::u16string in //ui

https://chromium-review.googlesource.com/c/chromium/src/+/2752406
(cherry picked from commit d4bec23bde)

* 2752406: [LSC] Replace base::string16 with std::u16string in //ui

https://chromium-review.googlesource.com/c/chromium/src/+/2752406
(cherry picked from commit 9e336f5d0c)

* 2752932: Associate each AwProxyingURLLoaderFactory with a frame tree node id.

https://chromium-review.googlesource.com/c/chromium/src/+/2752932
(cherry picked from commit 08036802cb)

* 2651385: Moving Profile::shared_cors_origin_access_list_ into //content layer.

https://chromium-review.googlesource.com/c/chromium/src/+/2651385
(cherry picked from commit 676f74f3dc)

* 2734095: Introduce StoragePartitionId type to wrap current string representation.

https://chromium-review.googlesource.com/c/chromium/src/+/2734095
(cherry picked from commit 76538d2d38)

* chore: bump chromium in DEPS to 90.0.4430.19

* chore: bump chromium in DEPS to 90.0.4430.30

* chore: bump chromium in DEPS to 90.0.4430.40

* chore: bump chromium in DEPS to 90.0.4430.51

* chore: bump chromium in DEPS to 91.0.4446.0

* chore: bump chromium in DEPS to 91.0.4448.0

(cherry picked from commit 003dd6c16c)

* Update patches

(cherry picked from commit 9f5e3f6685)

* 2743594: Remove WebSize from blink.

https://chromium-review.googlesource.com/c/chromium/src/+/2743594
(cherry picked from commit b15b820bca)

* 2725403: Add URLLoaderClient::OnReceiveEarlyHints()

https://chromium-review.googlesource.com/c/chromium/src/+/2725403
(cherry picked from commit 185c343b22)

* 2651385: Moving Profile::shared_cors_origin_access_list_ into //content layer.

https://chromium-review.googlesource.com/c/chromium/src/+/2651385
(cherry picked from commit 88bbe2a352)

* 2721718: Move HostID to extensions::mojom::HostID

https://chromium-review.googlesource.com/c/chromium/src/+/2721718
(cherry picked from commit 3010dd93e3)

* 2733070: Rename observer to URLLoaderNetworkServiceObserver

https://chromium-review.googlesource.com/c/chromium/src/+/2733070
(cherry picked from commit d54bee03d0)

* Use nogncheck for content/browser/site_instance_impl.h

This is needed because  //content/browser:browser is not a visible target

(cherry picked from commit 5fc298ee5f)

* 2648046: Introduce alert notification helper .app

https://chromium-review.googlesource.com/c/chromium/src/+/2648046
(cherry picked from commit 2cd53eb46a)

* 2752406: [LSC] Replace base::string16 with std::u16string in //ui

https://chromium-review.googlesource.com/c/chromium/src/+/2752406
(cherry picked from commit f1bb6be4b9)

* only include mac notifications on mac

(cherry picked from commit 3160e608e2)

* add additional skipping of atk toolchain check

(cherry picked from commit 86d23cee40)

* 2757472: Reland "Reland "[LSC] Remove base::string16 alias""

https://chromium-review.googlesource.com/c/chromium/src/+/2757472
(cherry picked from commit 22d8f22cfb)

* 2757472: Reland "Reland "[LSC] Remove base::string16 alias""

https://chromium-review.googlesource.com/c/chromium/src/+/2757472
(cherry picked from commit ec893f8322)

* 2720306: [api] Remove deprecated [Shared]ArrayBuffer API

https://chromium-review.googlesource.com/c/v8/v8/+/2720306
(cherry picked from commit d0989802bd)

* Fixup 2721718: Move HostID to extensions::mojom::HostID

(cherry picked from commit 29dfabadfd)

* fixup 2651385: Moving Profile::shared_cors_origin_access_list_ into //content layer

(cherry picked from commit 97b6868e9c)

* Fixup 2752406: [LSC] Replace base::string16 with std::u16string in //ui

(cherry picked from commit b6d2ae0455)

* Fixup 2725403: Add URLLoaderClient::OnReceiveEarlyHints()

(cherry picked from commit 7e961d8a37)

* update node headers

(cherry picked from commit c49bc282d5)

* 2693008: Fix loading non-system cursors on Windows on browser_tests

https://chromium-review.googlesource.com/c/chromium/src/+/2693008
(cherry picked from commit 3b183854ff)

* 2757472: Reland "Reland "[LSC] Remove base::string16 alias""

https://chromium-review.googlesource.com/c/chromium/src/+/2757472
(cherry picked from commit 2d3c65beca)

* undo changes to WebContentsPreferences::GetPreloadPath to fix mac build

(cherry picked from commit deeb2de14b)

* fix StrCat issue

(cherry picked from commit 451e0931bf)

* incantations for WebContentsPreferences::GetPreloadPath wide strings

(cherry picked from commit 205f572181)

* bump nan

(cherry picked from commit 74318705c2)

* fix GetAsString maybe?

(cherry picked from commit ea62ecd188)

* windows build fixes

(cherry picked from commit 5b598037bb)

* more windows build fix

(cherry picked from commit 61cf1abd4d)

* SetAppUserModelID -> wstring

(cherry picked from commit 83d93bcbdc)

* upgrade nan dep in tests

(cherry picked from commit 4f97b9303c)

* update patch

* wstrings are cross-platform

(cherry picked from commit 7f7b1f6c8a)

* linter

(cherry picked from commit aaf03765ed)

* only bind setAppUserModelId on windows

(cherry picked from commit 640a145112)

* well that was an odyssey

(cherry picked from commit dd975328a0)

* backport fcdf35e from v8 to fix nan crash

(cherry picked from commit 606fd87d1e)

* disable typedarrays-test.js

(cherry picked from commit 01ca00ec82)

* don't defer in NSWindow creation

https://chromium-review.googlesource.com/c/chromium/src/+/2707696
(cherry picked from commit 3122820e58)

* use PartitionAllocator for ArrayBuffers in the main process

(cherry picked from commit 1f575ca3af)

* fix patches

(cherry picked from commit 54e72fa8e3)

* chore: omit some unnecessary conversions

(cherry picked from commit 0f3620099a)

* refactor: make LoginItemSettings::path a wstring

(cherry picked from commit 9127cff58b)

* refactor: make ShowTaskDialog take a wstr

(cherry picked from commit 1594c54933)

* Revert "refactor: make LoginItemSettings::path a wstring"

This reverts commit 9127cff58b.

(cherry picked from commit 9684d85101)

* fixup patches

This reverts commit 0cc08813a6.

* update patches after merge

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: Charles Kerr <charles@charleskerr.com>
2021-04-13 11:29:10 -04:00
trop[bot]
1f95fdd5ca build: better error handling for release builds (#28626)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-04-13 09:49:04 -04:00
trop[bot]
b4e70c72a6 fix: crash on invalid select-serial-port callback (#28619)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-04-12 11:40:24 -04:00
Electron Bot
61bd57f851 Bump v13.0.0-beta.13 2021-04-12 08:02:26 -07:00
trop[bot]
5ab8cb7482 fix: load source maps from custom protocols and asar bundles (#28615)
* fix: load source maps from custom protocols and asar bundles

* chore: fix lint

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2021-04-12 06:18:34 -07:00
trop[bot]
d1bb54d175 docs: define the name of the preload script (#28609)
Co-authored-by: KSneijders <32707500+KSneijders@users.noreply.github.com>
2021-04-12 00:14:18 -07:00
trop[bot]
c104b510b0 docs: systemPreferences.subscribeWorkspaceNotification return type (#28613)
Co-authored-by: Samuel Maddock <samuel.maddock@gmail.com>
2021-04-12 00:12:50 -07:00
trop[bot]
02a2d33edc build: give ASAN tests more memory to avoid SIGKILL or disabling tests (#28592)
* build: give ASAN tests more memory

* test: re-eanble asan tests

Co-authored-by: Samuel Attard <sattard@slack-corp.com>
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-04-09 18:53:06 +09:00
trop[bot]
ad8f93517e chore: don't minimize js in development (#28586)
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-04-09 16:09:53 +09:00
trop[bot]
a58b5ec3f0 docs: note that new-window event is deprecated (#28582)
* docs: note that new-window event is deprecated

* Update breaking-changes.md

* Update docs/breaking-changes.md

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-04-08 12:12:45 -04:00
Electron Bot
32e321cec1 Bump v13.0.0-beta.12 2021-04-08 08:01:27 -07:00
trop[bot]
aae1bfde05 fix: support wasm-eval csp behind WebAssemblyCSP flag (#28569)
* feat: support wasm-eval csp behind WebAssemblyCSP flag

* update patches

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
Co-authored-by: Electron Bot <electron@github.com>
2021-04-08 04:32:39 -07:00
trop[bot]
5be9028c51 fix: allow accessing file:// when web security is disabled (#28557)
* fix: allow accessing file:// when web security is disabled

* test: fix webview tests on web security

* chore: remove unused attributes

* chore: cleanup RegisterURLLoaderFactories method

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-04-07 14:59:54 +09:00
Shelley Vohr
fa5bc2206c fix: errors thrown in functions over the contextBridge (#28446)
* fix: errors thrown in functions over the contextBridge

* spec: add a test

* fix: ensure exception is a v8::Object
2021-04-07 14:57:33 +09:00
trop[bot]
e3cbd70191 fix: call UnregisterIsolate consistently (#28554)
* fix: call `UnregisterIsolate` consistently

`JavascriptEnvironment` is the class that calls `RegisterIsolate()`
so it should be the one to call `UnregisterIsolate`, and this can happen
right before disposing the aforementioned `isolate`.

See: https://github.com/electron/electron/pull/28468

* fix

Co-authored-by: Fedor Indutny <fedor@indutny.com>
2021-04-07 10:07:49 +09:00
trop[bot]
7ce5af334e fix: invoke the window open handler for _blank links (#28536)
* fix: invoke the window open handler for _blank links

* add test

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-04-07 10:05:12 +09:00
trop[bot]
5605358f99 fix: pass postData to new-window event (#28542)
* fix: pass postData to new-window event

* fix type of postBody

* fix type of UploadFile and UploadRawData to be discriminated unions

* exclude the empty string from additionalFeatures

* add a test

Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-04-07 09:59:34 +09:00
trop[bot]
6f44fa6dbd fix: dialog DCHECK on Linux (#28534)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-04-07 09:49:17 +09:00
trop[bot]
6e66699822 ci: Add goma fallback flag (#28546)
* ci: fallback to local compile if goma auth fails

* use correct flag

Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-04-07 09:48:12 +09:00
trop[bot]
71fda62839 test: disable "fs in renderer process" test under ASan (#28541)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-04-07 09:28:54 +09:00
trop[bot]
2b354894b2 fix: enable system maximization for frameless windows except if transparent (#28527)
* fix: move widget maximization check

* fix linting error

* change workaround to only effect transparent windows

* disable menu maximize and restore for transparent windows

* disable double clicking title bar max/unmax for transparent windows

* add docs change and address review

Co-authored-by: mlaurencin <mlaurencin@electronjs.org>
2021-04-06 00:54:39 -07:00
trop[bot]
114643a624 fix: reject task append to JumpList when description exceeds 260 characters (#28526)
* fix: reject task when description exceeds 260 characters

* Switched out wcslen() for size() [linear -> constant time]

* Included comment describing the need for the additional check

* Added information about character limit to documentation

* Added newline character to end of jump-list-category.md

Co-authored-by: SushiJackal <weingaben@gmail.com>
2021-04-05 23:57:18 -07:00
trop[bot]
d32f37f549 docs: the minimum supported version of macOS is now 10.11 (#28516)
* chore: the minimum supported version is now 10.11

Chromium bumped this version back in December

* Update support.md

Co-authored-by: Samuel Attard <sam@electronjs.org>
2021-04-06 08:56:09 +09:00
trop[bot]
0cba5d7a71 fix: free IsolateData in ~NodeEnvironment (#28484)
This seems to just have been missing here, leaking memory
(and breaking the API contract for Node.js embedding).

Co-authored-by: Anna Henningsen <anna@addaleax.net>
2021-04-06 08:55:02 +09:00
Electron Bot
d76937f2b9 Bump v13.0.0-beta.11 2021-04-05 08:02:44 -07:00
Electron Bot
2cf6909f48 Bump v13.0.0-beta.10 2021-04-01 08:02:20 -07:00
trop[bot]
fb1a41926a fix: put RemoteCertVerifier upstream from the caching and coalescing layers (#28433)
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-03-31 10:26:07 -07:00
trop[bot]
c87ecabf19 chore: update Community link in default menu (#28459)
Co-authored-by: Erick Zhao <erick@hotmail.ca>
2021-03-31 01:31:51 -07:00
trop[bot]
798ef785b4 fix: handle an unparsable pdf manifest (#28453)
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-03-30 23:21:17 -07:00
Antón Molleda
89e2fe2079 docs: backport current tutorials to 13-x-y (#28397) 2021-03-30 11:53:10 -07:00
trop[bot]
250438c2d9 refactor: remove more uses of v8::Isolate::GetCurrent() (#28429)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-30 00:29:28 -07:00
Electron Bot
1176449cc9 Bump v13.0.0-beta.9 2021-03-29 08:01:40 -07:00
Cheng Zhao
a06af22b99 test: load minimal dict for spellchecker (#28398) 2021-03-29 19:43:51 +09:00
trop[bot]
bda746f2e6 feat: initialize field trials from command line arguments (#28402)
Fixes: #27877

Co-authored-by: Saúl Ibarra Corretgé <s@saghul.net>
2021-03-29 00:24:59 -07:00
trop[bot]
1f7f60d505 docs: add missing line in web-contents.md (#28399)
* Update web-contents.md

The text block was rendered as part of the `features` property, not the `handler`

* fix linting

Co-authored-by: Alexander Prinzhorn <alexander@prinzhorn.it>
2021-03-29 09:48:39 +09:00
trop[bot]
50cc80c44e fix: disappearing thumbar after win.hide() (#28390)
* fix: disappearing thumbar after win.hide()

* Add descriptive comment

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-25 12:16:13 -07:00
Electron Bot
00367f0b13 Bump v13.0.0-beta.8 2021-03-25 08:02:12 -07:00
Will Anderson
5d1ada085d docs: update Node API renderer example to use contextBridge (#28370) 2021-03-24 20:40:21 -04:00
trop[bot]
5b414b6f93 fix: isolate Pepper plugins (#28372)
* fix: isolate Pepper plugins

Following suit with a recent change to the same method in Chromium, we
should also isloate Pepper plugins.

* docs: add more context to comment

* fix: remove unsupported test flag behavior

Co-authored-by: clavin <cwatford@slack-corp.com>
2021-03-24 19:53:52 -04:00
trop[bot]
831bbc4b55 feat: allow omitting submitURL when uploadToServer is false (#28283)
* feat: allow omitting submitURL when uploadToServer is false

* docs

* fix test

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-03-24 19:52:42 -04:00
trop[bot]
b89b463a63 doc: desktopCapturer menu position (#28365)
desktopCapturer can be used in both main process and renderer process

Co-authored-by: liulun <xland@live.cn>
2021-03-24 16:59:46 +09:00
trop[bot]
32d3e82d88 fix: make sure service worker scheme is registered with allowServiceWorkers (#28354)
* Fix custom scheme not registered as service worker scheme

* ServiceWorker loaders do not have WebContents associated

* Add test for service worker

* Revert "Fix custom scheme not registered as service worker scheme"

This reverts commit a249235b22.

* Add scheme to ServiceWorkerSchemes

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-03-24 16:55:13 +09:00
trop[bot]
38de02c50a fix: window.print() in pdf plugin (#28351)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-24 10:01:33 +09:00
trop[bot]
b8ef450cf6 ci: cleanup directories on arm64 machines after running tests (#28331)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-03-23 09:47:55 -04:00
trop[bot]
168bcaf8f3 fix: libuv hang on Windows (#28335)
* fix: libuv hang on Windows

* test: add a hang test

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-23 05:16:04 -07:00
trop[bot]
19d26c4a0c fix: escape URL passed to shell.openExternal on windows (#28342)
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-03-23 05:15:33 -07:00
trop[bot]
20bf768517 refactor: prefer embedder-focused InitializeNodeWithArgs (#28325)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-22 12:36:55 -07:00
Electron Bot
71f631641e Bump v13.0.0-beta.7 2021-03-22 08:02:25 -07:00
trop[bot]
5b3c90e6c6 fix: DesktopCapturer gc'd prior to capture completion (#28280)
desktopCapture.getSources() returns a promise which should resolve
when capturing finishes. Internally it creates an instance of
DesktopCapturer which is responsible for resolving or rejecting
the promise.

Between the time DesktopCapturer starts capturing frames and when
it finishes, it's possible for its handle to be GC'd leading to
it never resolving.

These changes pin the instance of DesktopCapturer until it either
finishes or errors.

fixes #25595

Co-authored-by: samuelmaddock <samuel.maddock@gmail.com>
2021-03-22 11:03:24 +09:00
trop[bot]
fb298ca3db fix: drag region offsets in BrowserViews (#28298)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-22 10:59:47 +09:00
trop[bot]
5f07df4a3d fix: bad menu position when no positioning item specified (#28276)
Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-03-19 10:20:35 +09:00
trop[bot]
3ecccf2ad3 feat: add process.contextIsolated property (#28252)
* feat: add process.contextIsolation property

* chore: rename process.contextIsolation to process.contextIsolated

* thing

Co-authored-by: Milan Burda <milan.burda@gmail.com>
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-03-18 14:01:06 -07:00
Electron Bot
4cafba5e46 Bump v13.0.0-beta.6 2021-03-18 08:01:58 -07:00
trop[bot]
3b049c9074 feat: add process.contextId used by @electron/remote (#28251)
* feat: add process.contextId used by @electron/remote

* Update docs/api/process.md

Co-authored-by: Jeremy Rose <jeremya@chromium.org>

Co-authored-by: Milan Burda <milan.burda@gmail.com>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
2021-03-18 15:16:46 +09:00
Will Anderson
0c1ee8ae8b docs: Update Quick Start Guide to work with contextIsolation (#28229)
* docs: Update Quick Start Guide for Electron 12

With `contextIsolation` enabled by default in Electron 12, the Getting Started Guide no longer works as it is written. In order for the basic example to display values from `process.versions`, we need to add a `preload.js` to the example.

* Trigger Build

* docs: add missing curly brace to quick start example code
2021-03-18 15:13:46 +09:00
trop[bot]
4cb842d5e3 fix: recalibrate simpleFullscreen when display metrics change (#28216)
* fix: recalibrate simpleFullscreen when display metrics change

* Address review feedback

* fix: compilation issues

* Address feedback from review

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-18 15:11:02 +09:00
trop[bot]
0ab21dfc98 test: disable some tests under ASan which might receive SIGKILL because of OOM (#28225)
* test: running child app under ASan might receive SIGKILL

* test: renderer process of webview might receive SIGKILL under ASan

* test: increase timeout for asan build

Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-03-17 09:54:25 +09:00
trop[bot]
e3ef14e784 docs: document the parameter structure of hookWindowMessage (#28213)
Fixes #28178

Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
2021-03-16 15:44:00 -07:00
trop[bot]
010c6fd5be fix: revert "refactor: mmap asar files (#24470)" (#28203)
This reverts commit 01a2e23194.

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
2021-03-16 19:21:21 +09:00
Electron Bot
a12d66d25e Bump v13.0.0-beta.5 2021-03-15 08:01:29 -07:00
trop[bot]
faa5d18389 fix: handle a nil backgroundColor in win.getBackgroundColor() (#28187)
* fix: handle a nil backgroundColor in win.getBackgroundColor()

* spec: add crash case

* fix: update to fix native_views transparent color

* chore: fix lint

Co-authored-by: Samuel Attard <sattard@slack-corp.com>
Co-authored-by: Samuel Attard <sam@electronjs.org>
2021-03-15 11:45:02 +09:00
Cheng Zhao
042e81aecb test: reliably wait for spellchecker to load (#28168) 2021-03-15 10:28:06 +09:00
trop[bot]
a1b46ef8a2 chore: cherry-pick 1fe571a from node (#28110)
Backports https://github.com/nodejs/node/pull/37000

Co-authored-by: deepak1556 <hop2deep@gmail.com>
2021-03-15 10:25:40 +09:00
trop[bot]
7f4ab06f11 fix: convert system colors to device color space in systemPreferences (#28173)
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-03-13 05:00:50 -08:00
trop[bot]
c11d6813e4 fix: ensure child window transparency works (#28112)
* fix: ensure child window transparency works

Windows opened via window.open and intecepted via setWindowOpenHandler
or the `new-window` event should (a) have the correct background color
and (b) that background color should be transparent if specified.

The changes in api_web_contents fix (a) and the changes in
web_contents_preferences fix (b).

Notes: Child windows with specified background colors or transpency now
work as intended

* fix: set background_color in blink prefs apply logic

* chore: update for PR comments

Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-03-12 09:18:41 -08:00
trop[bot]
c10274663c fix: change #if defined(OS_MACOSX) to #if defined(OS_MAC) (#28153)
Co-authored-by: Milan Burda <milan.burda@gmail.com>
2021-03-12 16:44:25 +09:00
trop[bot]
839137c3f4 docs: fix cookies event documentation for type generation (#28140)
Co-authored-by: Samuel Attard <sattard@slack-corp.com>
2021-03-11 16:22:45 -08:00
Electron Bot
529e7e7797 Bump v13.0.0-beta.4 2021-03-11 07:01:34 -08:00
John Kleinschmidt
2ce64944ab chore: bump chromium to 90.0.4415.0 (master) (#27694) (#28082)
* chore: bump chromium in DEPS to 520c02b46668fc608927e0fcd79b6a90885a48bf

* chore: bump chromium in DEPS to 90.0.4414.0

* resolve chromium conflicts

* resolve v8 conflicts

* fix node gn files

* 2673502: Remove RenderViewCreated use from ExtensionHost.

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

* 2676903: [mojo] Remove most legacy Binding classes.

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

* 2644847: Move self-deleting URLLoaderFactory base into //services/network.

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

* 2664006: Remove from mojo::DataPipe.

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

* 2674530: Remove CertVerifierService feature

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

* 2668748: Move OnSSLCertificateError to a new interface.

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

* 2672923: Remove RAPPOR reporting infrastructure.

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

* 2673502: Remove RenderViewCreated use from ExtensionHost.

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

* 2655126: Convert FrameHostMsg_ContextMenu and FrameMsg_ContextMenuClosed|CustomContextMenuAction to Mojo

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

* 2628705: Window Placement: Implement screen.isExtended and change event

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

* 2643161: Refactor storage::kFileSystem*Native*

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

* fix build

* only remove the biggest subdir of //ios

* chore: bump chromium in DEPS to 90.0.4415.0

* update patches

* update sysroots

* 2686147: Remove WebContentsObserver::RenderViewCreated().

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

* 2596429: Fixing how extension's split and spanning modes affect OriginAccessList.

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

* 2686026: [mojo] Delete AssociatedInterfacePtr (replaced by AssociatedRemote)

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

* 2651705: Move ui/base/dragdrop/file_info to ui/base/clipboard

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

* 358217: drawBitmap is deprecated

https://skia-review.googlesource.com/c/skia/+/358217

* fix gn check

* 2678098: Use gen/front_end as input to generate_devtools_grd

https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2678098

* 2674530: Remove CertVerifierService feature

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

* fixup 2664006: Remove from mojo::DataPipe.

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

* fixup build_add_electron_tracing_category.patch

* 2673415: [base] Prepare CrashReporterClient for string16 switch

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

* 2673413: Add CursorFactoryWin to handle Cursors on Windows

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

* 2668748: Move OnSSLCertificateError to a new interface.

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

* fix mas gn check

* update patch after merge

* Update node for .mjs files

* build: load v8_prof_processor dependencies as ESM

* chore: add patch to fix linux 32bit

Co-authored-by: Jeremy Rose <nornagon@nornagon.net>
Co-authored-by: Jeremy Rose <jeremya@chromium.org>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
(cherry picked from commit ca75bca667)

Co-authored-by: Electron Bot <electron@github.com>
2021-03-10 10:24:58 -08:00
trop[bot]
e6e1372ea7 fix: capturePage not resolving with hidden windows (#28076)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2021-03-09 13:13:33 -08:00
trop[bot]
9e723746e9 test: show full object diff (#28069)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-03-09 19:52:20 +09:00
trop[bot]
9a2ea12d71 chore: remove obsolete native node module patch (#28055)
* chore: remove obsolete native node module patch

* update patches

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Electron Bot <electron@github.com>
2021-03-09 17:05:15 +09:00
trop[bot]
877013efe4 build: call goma_ctl.py ensure_start directly (#28061)
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
2021-03-08 19:18:24 -08:00
trop[bot]
4c9317aea0 test: ignore the ready event from PDF Viewer (#28048)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-03-08 16:30:18 -05:00
trop[bot]
cc9b4dd968 docs: setWindowOpenHandler should show object return (#28035)
* Should use object return

* Fix lint

Co-authored-by: Domenic Horner <domenic@tgxn.net>
Co-authored-by: Cheng Zhao <github@zcbenz.com>
2021-03-08 11:49:02 -05:00
Electron Bot
747842c930 Bump v13.0.0-beta.3 2021-03-08 07:01:55 -08:00
trop[bot]
174e939b26 test: exit after app.relaunch is called (#28031)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-03-07 19:45:31 +09:00
trop[bot]
f8df8ea9d5 test: fix contextIsolation value for later added test (#28004)
Co-authored-by: Cheng Zhao <zcbenz@gmail.com>
2021-03-05 10:10:59 +09:00
Electron Bot
da5e0e5ac2 Bump v13.0.0-beta.2 2021-03-04 07:01:51 -08:00
Electron Bot
b136c51747 Bump v13.0.0-beta.1 2021-03-03 13:38:42 -08:00
376 changed files with 3702 additions and 2604 deletions

View File

@@ -85,17 +85,17 @@ machine-linux-2xlarge: &machine-linux-2xlarge
machine-mac: &machine-mac
macos:
xcode: "12.2.0"
xcode: "12.4.0"
machine-mac-large: &machine-mac-large
resource_class: large
macos:
xcode: "12.2.0"
xcode: "12.4.0"
machine-mac-large-arm: &machine-mac-large-arm
resource_class: large
macos:
xcode: "12.2.0"
xcode: "12.4.0"
machine-mac-arm64: &machine-mac-arm64
resource_class: electronjs/macos-arm64
@@ -230,6 +230,18 @@ step-maybe-notify-slack-success: &step-maybe-notify-slack-success
fi
when: on_success
step-maybe-cleanup-arm64-mac: &step-maybe-cleanup-arm64-mac
run:
name: Cleanup after testing
command: |
if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then
killall Electron || echo "No Electron processes left running"
killall Safari || echo "No Safari processes left running"
rm -rf ~/Library/Application\ Support/Electron*
rm -rf ~/Library/Application\ Support/electron*
fi
when: always
step-checkout-electron: &step-checkout-electron
checkout:
path: src/electron
@@ -313,9 +325,10 @@ step-setup-goma-for-build: &step-setup-goma-for-build
npm install
mkdir third_party
node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })"
node -e "require('./src/utils/goma.js').ensure()"
third_party/goma/goma_ctl.py ensure_start
echo 'export GN_GOMA_FILE='`node -e "console.log(require('./src/utils/goma.js').gnFilePath)"` >> $BASH_ENV
echo 'export LOCAL_GOMA_DIR='`node -e "console.log(require('./src/utils/goma.js').dir)"` >> $BASH_ENV
echo 'export GOMA_FALLBACK_ON_AUTH_FAILURE=true' >> $BASH_ENV
cd ..
step-restore-brew-cache: &step-restore-brew-cache
@@ -1018,7 +1031,7 @@ step-minimize-workspace-size-from-checkout: &step-minimize-workspace-size-from-c
name: Remove some unused data to avoid storing it in the workspace/cache
command: |
rm -rf src/android_webview
rm -rf src/ios
rm -rf src/ios/chrome
rm -rf src/third_party/blink/web_tests
rm -rf src/third_party/blink/perf_tests
rm -rf src/third_party/WebKit/LayoutTests
@@ -1340,6 +1353,8 @@ steps-tests: &steps-tests
- *step-maybe-notify-slack-failure
- *step-maybe-cleanup-arm64-mac
steps-test-nan: &steps-test-nan
steps:
- attach_workspace:
@@ -2311,7 +2326,7 @@ jobs:
<<: *steps-tests
linux-x64-testing-asan-tests:
<<: *machine-linux-medium
<<: *machine-linux-xlarge
environment:
<<: *env-linux-medium
<<: *env-headless-testing

View File

@@ -4,4 +4,3 @@
APPVEYOR_CLOUD_TOKEN=
CIRCLE_TOKEN=
ELECTRON_GITHUB_TOKEN=
VSTS_TOKEN=

View File

@@ -402,7 +402,10 @@ source_set("electron_lib") {
}
if (!is_mas_build) {
deps += [ "//components/crash/core/app" ]
deps += [
"//components/crash/core/app",
"//components/crash/core/browser",
]
}
sources = filenames.lib_sources
@@ -619,6 +622,9 @@ source_set("electron_lib") {
"//chrome/services/printing/public/mojom",
"//components/printing/common:mojo_interfaces",
]
if (is_mac) {
deps += [ "//chrome/services/mac_notifications/public/mojom" ]
}
}
if (enable_electron_extensions) {
@@ -632,6 +638,7 @@ source_set("electron_lib") {
"//components/zoom",
"//extensions/browser",
"//extensions/browser:core_api_provider",
"//extensions/browser/updater",
"//extensions/common",
"//extensions/common:core_api_provider",
"//extensions/renderer",

6
DEPS
View File

@@ -14,11 +14,11 @@ gclient_gn_args = [
vars = {
'chromium_version':
'1f252b391a40e2681b0d9aff6497b7401863d1fc',
'91.0.4448.0',
'node_version':
'v14.16.0',
'nan_version':
'2c4ee8a32a299eada3cd6e468bbd0a473bfea96d',
'v2.14.2',
'squirrel.mac_version':
'cdc0729c8bf8576bfef18629186e1e9ecf1b0d9f',
@@ -48,6 +48,8 @@ vars = {
# It's only needed to parse the native tests configurations.
'checkout_pyyaml': False,
'use_rts': False,
'mac_xcode_version': 'default',
# To allow running hooks without parsing the DEPS tree

View File

@@ -1 +1 @@
13.0.0-nightly.20210303
13.0.0-beta.16

View File

@@ -36,6 +36,7 @@ environment:
ELECTRON_ENABLE_STACK_DUMPING: 1
MOCHA_REPORTER: mocha-multi-reporters
MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap
GOMA_FALLBACK_ON_AUTH_FAILURE: true
notifications:
- provider: Webhook
url: https://electron-mission-control.herokuapp.com/rest/appveyor-hook

View File

@@ -19,4 +19,7 @@ enable_basic_printing = true
angle_enable_vulkan_validation_layers = false
dawn_enable_vulkan_validation_layers = false
# This breaks native node modules
libcxx_abi_unstable = false
is_cfi = false

View File

@@ -163,7 +163,7 @@ if ((globalThis.process || binding.process).argv.includes("--profile-electron-in
setImmediate: false
},
optimization: {
minimize: true,
minimize: env.mode === 'production',
minimizer: [
new TerserPlugin({
terserOptions: {

View File

@@ -22,6 +22,11 @@ template("webpack_build") {
"//electron/typings/internal-electron.d.ts",
] + invoker.inputs
mode = "development"
if (is_official_build) {
mode = "production"
}
args = [
"--config",
rebase_path(invoker.config_file),
@@ -29,6 +34,7 @@ template("webpack_build") {
"--output-path=" + rebase_path(get_path_info(invoker.out_file, "dir")),
"--env.buildflags=" +
rebase_path("$target_gen_dir/buildflags/buildflags.h"),
"--env.mode=" + mode,
]
deps += [ "buildflags" ]

View File

@@ -39,6 +39,7 @@ PATHS_TO_SKIP = [
'./crashpad_handler',
# Skip because these are outputs that we don't need.
'resources/inspector',
'gen/third_party/devtools-frontend/src'
]
def skip_path(dep, dist_zip, target_cpu):

View File

@@ -16,8 +16,6 @@ static_library("chrome") {
"//chrome/browser/accessibility/accessibility_ui.h",
"//chrome/browser/browser_process.cc",
"//chrome/browser/browser_process.h",
"//chrome/browser/crash_upload_list/crash_upload_list_crashpad.cc",
"//chrome/browser/crash_upload_list/crash_upload_list_crashpad.h",
"//chrome/browser/devtools/devtools_contents_resizing_strategy.cc",
"//chrome/browser/devtools/devtools_contents_resizing_strategy.h",
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.cc",
@@ -46,7 +44,6 @@ static_library("chrome") {
"//chrome/browser/predictors/resolve_host_client_impl.h",
"//chrome/browser/ssl/security_state_tab_helper.cc",
"//chrome/browser/ssl/security_state_tab_helper.h",
"//chrome/browser/ssl/tls_deprecation_config.cc",
"//chrome/browser/ui/views/autofill/autofill_popup_view_utils.cc",
"//chrome/browser/ui/views/autofill/autofill_popup_view_utils.h",
"//extensions/browser/app_window/size_constraints.cc",

View File

@@ -90,7 +90,7 @@ CertificateManagerModel::~CertificateManagerModel() = default;
int CertificateManagerModel::ImportFromPKCS12(
PK11SlotInfo* slot_info,
const std::string& data,
const base::string16& password,
const std::u16string& password,
bool is_extractable,
net::ScopedCERTCertificateList* imported_certs) {
return cert_db_->ImportFromPKCS12(slot_info, data, password, is_extractable,

View File

@@ -12,7 +12,6 @@
#include "base/callback.h"
#include "base/macros.h"
#include "base/memory/ref_counted.h"
#include "base/strings/string16.h"
#include "net/cert/nss_cert_database.h"
namespace content {
@@ -46,7 +45,7 @@ class CertificateManagerModel {
// Returns a net error code on failure.
int ImportFromPKCS12(PK11SlotInfo* slot_info,
const std::string& data,
const base::string16& password,
const std::u16string& password,
bool is_extractable,
net::ScopedCERTCertificateList* imported_certs);

View File

@@ -144,15 +144,14 @@ These individual tutorials expand on topics discussed in the guide above.
### Modules for the Renderer Process (Web Page):
* [contextBridge](api/context-bridge.md)
* [desktopCapturer](api/desktop-capturer.md)
* [ipcRenderer](api/ipc-renderer.md)
* [remote](api/remote.md)
* [webFrame](api/web-frame.md)
### Modules for Both Processes:
* [clipboard](api/clipboard.md)
* [crashReporter](api/crash-reporter.md)
* [desktopCapturer](api/desktop-capturer.md)
* [nativeImage](api/native-image.md)
* [shell](api/shell.md)

View File

@@ -929,6 +929,10 @@ re-add a removed item to a custom category earlier than that will result in the
entire custom category being omitted from the Jump List. The list of removed
items can be obtained using `app.getJumpListSettings()`.
**Note:** The maximum length of a Jump List item's `description` property is
260 characters. Beyond this limit, the item will not be added to the Jump
List, nor will it be displayed.
Here's a very simple example of creating a custom Jump List:
```javascript

View File

@@ -267,7 +267,7 @@ It creates a new `BrowserWindow` with native properties as set by the `options`.
be the absolute file path to the script.
When node integration is turned off, the preload script can reintroduce
Node global symbols back to the global scope. See example
[here](process.md#event-loaded).
[here](context-bridge.md#exposing-node-global-symbols).
* `sandbox` Boolean (optional) - If set, this will sandbox the renderer
associated with the window, making it compatible with the Chromium
OS-level sandbox and disabling the Node.js engine. This is not the same as
@@ -1319,6 +1319,8 @@ The native type of the handle is `HWND` on Windows, `NSView*` on macOS, and
* `message` Integer
* `callback` Function
* `wParam` any - The `wParam` provided to the WndProc
* `lParam` any - The `lParam` provided to the WndProc
Hooks a windows message. The `callback` is called when
the message is received in the WndProc.
@@ -1371,7 +1373,7 @@ Returns `Boolean` - Whether the window's document has been edited.
Returns `Promise<NativeImage>` - Resolves with a [NativeImage](native-image.md)
Captures a snapshot of the page within `rect`. Omitting `rect` will capture the whole visible page.
Captures a snapshot of the page within `rect`. Omitting `rect` will capture the whole visible page. If the page is not visible, `rect` may be empty.
#### `win.loadURL(url[, options])`

View File

@@ -80,6 +80,12 @@ This switch can not be used in `app.commandLine.appendSwitch` since it is parsed
earlier than user's app is loaded, but you can set the `ELECTRON_ENABLE_LOGGING`
environment variable to achieve the same effect.
## --force-fieldtrials=`trials`
Field trials to be forcefully enabled or disabled.
For example: `WebRTC-Audio-Red-For-Opus/Enabled/`
### --host-rules=`rules`
A comma-separated list of `rules` that control how hostnames are mapped.

View File

@@ -33,7 +33,7 @@ page you load in your renderer executes code in this world.
### Isolated World
When `contextIsolation` is enabled in your `webPreferences`, your `preload` scripts run in an
When `contextIsolation` is enabled in your `webPreferences` (this is the default behavior since Electron 12.0.0), your `preload` scripts run in an
"Isolated World". You can read more about context isolation and what it affects in the
[security](../tutorial/security.md#3-enable-context-isolation-for-remote-content) docs.
@@ -110,3 +110,22 @@ has been included below for completeness:
| `Symbol` | N/A | ❌ | ❌ | Symbols cannot be copied across contexts so they are dropped |
If the type you care about is not in the above table, it is probably not supported.
### Exposing Node Global Symbols
The `contextBridge` can be used by the preload script to give your renderer access to Node APIs.
The table of supported types described above also applies to Node APIs that you expose through `contextBridge`.
Please note that many Node APIs grant access to local system resources.
Be very cautious about which globals and APIs you expose to untrusted remote content.
```javascript
const { contextBridge } = require('electron')
const crypto = require('crypto')
contextBridge.exposeInMainWorld('nodeCrypto', {
sha256sum (data) {
const hash = crypto.createHash('sha256')
hash.update(data)
return hash.digest('hex')
}
})
```

View File

@@ -45,6 +45,8 @@ The following events are available on instances of `Cookies`:
#### Event: 'changed'
Returns:
* `event` Event
* `cookie` [Cookie](structures/cookie.md) - The cookie that was changed.
* `cause` String - The cause of the change with one of the following values:

View File

@@ -77,7 +77,8 @@ The `crashReporter` module has the following methods:
### `crashReporter.start(options)`
* `options` Object
* `submitURL` String - URL that crash reports will be sent to as POST.
* `submitURL` String (optional) - URL that crash reports will be sent to as
POST. Required unless `uploadToServer` is `false`.
* `productName` String (optional) - Defaults to `app.name`.
* `companyName` String (optional) _Deprecated_ - Deprecated alias for
`{ globalExtra: { _companyName: ... } }`.

View File

@@ -83,8 +83,10 @@ win.show()
blur effect to the content below the window (i.e. other applications open on
the user's system).
* The window will not be transparent when DevTools is opened.
* On Windows operating systems, transparent windows will not work when DWM is
* On Windows operating systems,
* transparent windows will not work when DWM is
disabled.
* transparent windows can not be maximized using the Windows system menu or by double clicking the title bar. The reasoning behind this can be seen on [this pull request](https://github.com/electron/electron/pull/28207).
* On Linux, users have to put `--enable-transparent-visuals --disable-gpu` in
the command line to disable GPU and allow ARGB to make transparent window,
this is caused by an upstream bug that [alpha channel doesn't work on some

View File

@@ -30,11 +30,13 @@ In sandboxed renderers the `process` object contains only a subset of the APIs:
* `arch`
* `platform`
* `sandboxed`
* `contextIsolated`
* `type`
* `version`
* `versions`
* `mas`
* `windowsStore`
* `contextId`
## Events
@@ -43,19 +45,6 @@ In sandboxed renderers the `process` object contains only a subset of the APIs:
Emitted when Electron has loaded its internal initialization script and is
beginning to load the web page or the main script.
It can be used by the preload script to add removed Node global symbols back to
the global scope when node integration is turned off:
```javascript
// preload.js
const _setImmediate = setImmediate
const _clearImmediate = clearImmediate
process.once('loaded', () => {
global.setImmediate = _setImmediate
global.clearImmediate = _clearImmediate
})
```
## Properties
### `process.defaultApp` _Readonly_
@@ -93,6 +82,11 @@ A `String` representing the path to the resources directory.
A `Boolean`. When the renderer process is sandboxed, this property is `true`,
otherwise it is `undefined`.
### `process.contextIsolated` _Readonly_
A `Boolean` that indicates whether the current renderer context has `contextIsolation` enabled.
It is `undefined` in the main process.
### `process.throwDeprecation`
A `Boolean` that controls whether or not deprecation warnings will be thrown as
@@ -133,6 +127,13 @@ A `String` representing Electron's version string.
A `Boolean`. If the app is running as a Windows Store app (appx), this property is `true`,
for otherwise it is `undefined`.
### `process.contextId` _Readonly_
A `String` (optional) representing a globally unique ID of the current JavaScript context.
Each frame has its own JavaScript context. When contextIsolation is enabled, the isolated
world also has a separate JavaScript context.
This property is only available in the renderer process.
## Methods
The `process` object has the following methods:

View File

@@ -19,3 +19,7 @@
property set then its `type` is assumed to be `tasks`. If the `name` property
is set but the `type` property is omitted then the `type` is assumed to be
`custom`.
**Note:** The maximum length of a Jump List item's `description` property is
260 characters. Beyond this limit, the item will not be added to the Jump
List, nor will it be displayed.

View File

@@ -17,7 +17,7 @@
* `title` String (optional) - The text to be displayed for the item in the Jump List.
Should only be set if `type` is `task`.
* `description` String (optional) - Description of the task (displayed in a tooltip).
Should only be set if `type` is `task`.
Should only be set if `type` is `task`. Maximum length 260 characters.
* `iconPath` String (optional) - The absolute path to an icon to be displayed in a
Jump List, which can be an arbitrary resource file that contains an icon
(e.g. `.ico`, `.exe`, `.dll`). You can usually specify `process.execPath` to

View File

@@ -1,6 +1,6 @@
# UploadFile Object
* `type` String - `file`.
* `type` 'file' - `file`.
* `filePath` String - Path of file to be uploaded.
* `offset` Integer - Defaults to `0`.
* `length` Integer - Number of bytes to read from `offset`.

View File

@@ -1,4 +1,4 @@
# UploadRawData Object
* `type` String - `rawData`.
* `type` 'rawData' - `rawData`.
* `bytes` Buffer - Data to be uploaded.

View File

@@ -130,6 +130,8 @@ This is necessary for events such as `NSUserDefaultsDidChangeNotification`.
* `userInfo` Record<String, unknown>
* `object` String
Returns `Number` - The ID of this subscription
Same as `subscribeNotification`, but uses `NSWorkspace.sharedWorkspace.notificationCenter`.
This is necessary for events such as `NSWorkspaceDidActivateApplicationNotification`.

View File

@@ -1184,6 +1184,7 @@ Ignore application menu shortcuts while this web contents is focused.
* `url` String - The _resolved_ version of the URL passed to `window.open()`. e.g. opening a window with `window.open('foo')` will yield something like `https://the-origin/the/current/path/foo`.
* `frameName` String - Name of the window provided in `window.open()`
* `features` String - Comma separated list of window features provided to `window.open()`.
Returns `{action: 'deny'} | {action: 'allow', overrideBrowserWindowOptions?: BrowserWindowConstructorOptions}` - `deny` cancels the creation of the new
window. `allow` will allow the new window to be created. Specifying `overrideBrowserWindowOptions` allows customization of the created window.
Returning an unrecognized value such as a null, undefined, or an object

View File

@@ -83,9 +83,9 @@ const mainWindow = new BrowserWindow()
mainWindow.webContents.setWindowOpenHandler(({ url }) => {
if (url.startsWith('https://github.com/')) {
return true
return { action: 'allow' }
}
return false
return { action: 'deny' }
})
mainWindow.webContents.on('did-create-window', (childWindow) => {

View File

@@ -136,6 +136,22 @@ systemPreferences.isHighContrastColorScheme()
nativeTheme.shouldUseHighContrastColors
```
### Deprecated: WebContents `new-window` event
The `new-window` event of WebContents has been deprecated. It is replaced by [`webContents.setWindowOpenHandler()`](api/web-contents.md#contentssetwindowopenhandlerhandler).
```js
// Deprecated in Electron 13
webContents.on('new-window', (event) => {
event.preventDefault()
})
// Replace with
webContents.setWindowOpenHandler((details) => {
return { action: 'deny' }
})
```
## Planned Breaking API Changes (12.0)
### Removed: Pepper Flash support
@@ -160,6 +176,9 @@ the previous behavior, `contextIsolation: false` must be specified in WebPrefere
We [recommend having contextIsolation enabled](https://github.com/electron/electron/blob/master/docs/tutorial/security.md#3-enable-context-isolation-for-remote-content) for the security of your application.
Another implication is that `require()` cannot be used in the renderer process unless
`nodeIntegration` is `true` and `contextIsolation` is `false`.
For more details see: https://github.com/electron/electron/issues/23506
### Removed: `crashReporter.getCrashesDirectory()`

View File

@@ -33,8 +33,7 @@ contributing, and more. Please use the issue tracker for bugs only!
To submit a bug report:
When opening a new issue in the [`electron/electron` issue tracker](https://github.com/electron/electron/issues/new/choose), users
will be presented with [a template](https://github.com/electron/electron/blob/master/.github/ISSUE_TEMPLATE/Bug_report.md)
that should be filled in.
will be presented with a template that should be filled in.
If you believe that you have found a bug in Electron, please fill out the template
to the best of your ability.

View File

@@ -8,9 +8,9 @@
<body>
<h1>Hello World!</h1>
<p>
We are using node <script>document.write(process.versions.node)</script>,
Chrome <script>document.write(process.versions.chrome)</script>,
and Electron <script>document.write(process.versions.electron)</script>.
We are using Node.js <span id="node-version"></span>,
Chromium <span id="chrome-version"></span>,
and Electron <span id="electron-version"></span>.
</p>
</body>
</html>

View File

@@ -1,18 +1,27 @@
const { app, BrowserWindow } = require('electron')
const path = require('path')
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
preload: path.join(__dirname, 'preload.js')
}
})
win.loadFile('index.html')
}
app.whenReady().then(createWindow)
app.whenReady().then(() => {
createWindow()
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
@@ -20,8 +29,3 @@ app.on('window-all-closed', () => {
}
})
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})

View File

@@ -0,0 +1,11 @@
window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)
if (element) element.innerText = text
}
for (const type of ['chrome', 'node', 'electron']) {
replaceText(`${type}-version`, process.versions[type])
}
})

View File

@@ -32,6 +32,7 @@ From a development perspective, an Electron application is essentially a Node.js
my-electron-app/
├── package.json
├── main.js
├── preload.js
└── index.html
```
@@ -55,45 +56,49 @@ The main script may look as follows:
```javascript fiddle='docs/fiddles/quick-start'
const { app, BrowserWindow } = require('electron')
const path = require('path')
function createWindow () {
const win = new BrowserWindow({
width: 800,
height: 600,
webPreferences: {
nodeIntegration: true
preload: path.join(__dirname, 'preload.js')
}
})
win.loadFile('index.html')
}
app.whenReady().then(createWindow)
app.whenReady().then(() => {
createWindow()
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
})
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit()
}
})
app.on('activate', () => {
if (BrowserWindow.getAllWindows().length === 0) {
createWindow()
}
})
```
##### What is going on above?
1. Line 1: First, you import the `app` and `BrowserWindow` modules of the `electron` package to be able to manage your application's lifecycle events, as well as create and control browser windows.
2. Line 3: After that, you define a function that creates a [new browser window](../api/browser-window.md#new-browserwindowoptions) with node integration enabled, loads `index.html` file into this window (line 12, we will discuss the file later).
3. Line 15: You create a new browser window by invoking the `createWindow` function once the Electron application [is initialized](../api/app.md#appwhenready).
4. Line 17: You add a new listener that tries to quit the application when it no longer has any open windows. This listener is a no-op on macOS due to the operating system's [window management behavior](https://support.apple.com/en-ca/guide/mac-help/mchlp2469/mac).
5. Line 23: You add a new listener that creates a new browser window only if when the application has no visible windows after being activated. For example, after launching the application for the first time, or re-launching the already running application.
2. Line 2: Second, you import the `path` package which provides utility functions for file paths.
3. Line 4: After that, you define a function that creates a [new browser window](../api/browser-window.md#new-browserwindowoptions) with a preload script, loads `index.html` file into this window (line 13, we will discuss the file later).
4. Line 16: You create a new browser window by invoking the `createWindow` function once the Electron application [is initialized](../api/app.md#appwhenready).
5. Line 18: You add a new listener that creates a new browser window only if when the application has no visible windows after being activated. For example, after launching the application for the first time, or re-launching the already running application.
6. Line 25: You add a new listener that tries to quit the application when it no longer has any open windows. This listener is a no-op on macOS due to the operating system's [window management behavior](https://support.apple.com/en-ca/guide/mac-help/mchlp2469/mac).
#### Create a web page
This is the web page you want to display once the application is initialized. This web page represents the Renderer process. You can create multiple browser windows, where each window uses its own independent Renderer. Each window can optionally be granted with full access to Node.js API through the `nodeIntegration` preference.
This is the web page you want to display once the application is initialized. This web page represents the Renderer process. You can create multiple browser windows, where each window uses its own independent Renderer. You can optionally grant access to additional Node.js APIs by exposing them from your preload script.
The `index.html` page looks as follows:
@@ -108,14 +113,38 @@ The `index.html` page looks as follows:
<body style="background: white;">
<h1>Hello World!</h1>
<p>
We are using node <script>document.write(process.versions.node)</script>,
Chrome <script>document.write(process.versions.chrome)</script>,
and Electron <script>document.write(process.versions.electron)</script>.
We are using Node.js <span id="node-version"></span>,
Chromium <span id="chrome-version"></span>,
and Electron <span id="electron-version"></span>.
</p>
</body>
</html>
```
#### Define a preload script
Your preload script (in our case, the `preload.js` file) acts as a bridge between Node.js and your web page. It allows you to expose specific APIs and behaviors to your web page rather than insecurely exposing the entire Node.js API. In this example we will use the preload script to read version information from the `process` object and update the web page with that info.
```javascript fiddle='docs/fiddles/quick-start'
window.addEventListener('DOMContentLoaded', () => {
const replaceText = (selector, text) => {
const element = document.getElementById(selector)
if (element) element.innerText = text
}
for (const type of ['chrome', 'node', 'electron']) {
replaceText(`${type}-version`, process.versions[type])
}
})
```
##### What's going on above?
1. On line 1: First you define an event listener that tells you when the web page has loaded
2. On line 2: Second you define a utility function used to set the text of the placeholders in the `index.html`
3. On line 7: Next you loop through the list of components whose version you want to display
4. On line 8: Finally, you call `replaceText` to look up the version placeholders in `index.html` and set their text value to the values from `process.versions`
#### Modify your package.json file
Your Electron application uses the `package.json` file as the main entry point (as any other Node.js application). The main script of your application is `main.js`, so modify the `package.json` file accordingly:
@@ -167,7 +196,8 @@ The simplest and the fastest way to distribute your newly created app is using
1. Import Electron Forge to your app folder:
```sh
npx @electron-forge/cli import
npm install --save-dev @electron-forge/cli
npx electron-forge import
✔ Checking your system
✔ Initializing Git Repository
@@ -282,7 +312,7 @@ ipcRenderer.invoke('perform-action', ...args)
##### Node.js API
> NOTE: To access the Node.js API from the Renderer process, you need to set the `nodeIntegration` preference to `true`.
> NOTE: To access the Node.js API from the Renderer process, you need to set the `nodeIntegration` preference to `true` and the `contextIsolation` preference to `false`. Please note that access to the Node.js API in any renderer that loads remote content is not recommended for [security reasons](../tutorial/security.md#2-do-not-enable-nodejs-integration-for-remote-content).
Electron exposes full access to Node.js API and its modules both in the Main and the Renderer processes. For example, you can read all the files from the root directory:

View File

@@ -44,7 +44,7 @@ Chromium shared library and Node.js. Vulnerabilities affecting these components
may impact the security of your application. By updating Electron to the latest
version, you ensure that critical vulnerabilities (such as *nodeIntegration bypasses*)
are already patched and cannot be exploited in your application. For more information,
see "[Use a current version of Electron](#17-use-a-current-version-of-electron)".
see "[Use a current version of Electron](#15-use-a-current-version-of-electron)".
* **Evaluate your dependencies.** While NPM provides half a million reusable packages,
it is your responsibility to choose trusted 3rd-party libraries. If you use outdated
@@ -99,9 +99,7 @@ You should at least follow these steps to improve the security of your applicati
12. [Disable or limit navigation](#12-disable-or-limit-navigation)
13. [Disable or limit creation of new windows](#13-disable-or-limit-creation-of-new-windows)
14. [Do not use `openExternal` with untrusted content](#14-do-not-use-openexternal-with-untrusted-content)
15. [Disable the `remote` module](#15-disable-the-remote-module)
16. [Filter the `remote` module](#16-filter-the-remote-module)
17. [Use a current version of Electron](#17-use-a-current-version-of-electron)
15. [Use a current version of Electron](#15-use-a-current-version-of-electron)
To automate the detection of misconfigurations and insecure patterns, it is
possible to use
@@ -665,134 +663,7 @@ const { shell } = require('electron')
shell.openExternal('https://example.com/index.html')
```
## 15) Disable the `remote` module
The `remote` module provides a way for the renderer processes to
access APIs normally only available in the main process. Using it, a
renderer can invoke methods of a main process object without explicitly sending
inter-process messages. If your desktop application does not run untrusted
content, this can be a useful way to have your renderer processes access and
work with modules that are only available to the main process, such as
GUI-related modules (dialogs, menus, etc.).
However, if your app can run untrusted content and even if you
[sandbox][sandbox] your renderer processes accordingly, the `remote` module
makes it easy for malicious code to escape the sandbox and have access to
system resources via the higher privileges of the main process. Therefore,
it should be disabled in such circumstances.
### Why?
`remote` uses an internal IPC channel to communicate with the main process.
"Prototype pollution" attacks can grant malicious code access to the internal
IPC channel, which can then be used to escape the sandbox by mimicking `remote`
IPC messages and getting access to main process modules running with higher
privileges.
Additionally, it's possible for preload scripts to accidentally leak modules to a
sandboxed renderer. Leaking `remote` arms malicious code with a multitude
of main process modules with which to perform an attack.
Disabling the `remote` module eliminates these attack vectors. Enabling
context isolation also prevents the "prototype pollution" attacks from
succeeding.
### How?
```js
// Bad if the renderer can run untrusted content
const mainWindow = new BrowserWindow({
webPreferences: {
enableRemoteModule: true
}
})
```
```js
// Good
const mainWindow = new BrowserWindow({
webPreferences: {
enableRemoteModule: false
}
})
```
```html
<!-- Bad if the renderer can run untrusted content -->
<webview enableremotemodule="true" src="page.html"></webview>
<!-- Good -->
<webview enableremotemodule="false" src="page.html"></webview>
```
> **Note:** The default value of `enableRemoteModule` is `false` starting
> from Electron 10. For prior versions, you need to explicitly disable
> the `remote` module by the means above.
## 16) Filter the `remote` module
If you cannot disable the `remote` module, you should filter the globals,
Node, and Electron modules (so-called built-ins) accessible via `remote`
that your application does not require. This can be done by blocking
certain modules entirely and by replacing others with proxies that
expose only the functionality that your app needs.
### Why?
Due to the system access privileges of the main process, functionality
provided by the main process modules may be dangerous in the hands of
malicious code running in a compromised renderer process. By limiting
the set of accessible modules to the minimum that your app needs and
filtering out the others, you reduce the toolset that malicious code
can use to attack the system.
Note that the safest option is to
[fully disable the remote module](#15-disable-the-remote-module). If
you choose to filter access rather than completely disable the module,
you must be very careful to ensure that no escalation of privilege is
possible through the modules you allow past the filter.
### How?
```js
const readOnlyFsProxy = require(/* ... */) // exposes only file read functionality
const allowedModules = new Set(['crypto'])
const proxiedModules = new Map([['fs', readOnlyFsProxy]])
const allowedElectronModules = new Set(['shell'])
const allowedGlobals = new Set()
app.on('remote-require', (event, webContents, moduleName) => {
if (proxiedModules.has(moduleName)) {
event.returnValue = proxiedModules.get(moduleName)
}
if (!allowedModules.has(moduleName)) {
event.preventDefault()
}
})
app.on('remote-get-builtin', (event, webContents, moduleName) => {
if (!allowedElectronModules.has(moduleName)) {
event.preventDefault()
}
})
app.on('remote-get-global', (event, webContents, globalName) => {
if (!allowedGlobals.has(globalName)) {
event.preventDefault()
}
})
app.on('remote-get-current-window', (event, webContents) => {
event.preventDefault()
})
app.on('remote-get-current-web-contents', (event, webContents) => {
event.preventDefault()
})
```
## 17) Use a current version of Electron
## 15) Use a current version of Electron
You should strive for always using the latest available version of Electron.
Whenever a new major version is released, you should attempt to update your

View File

@@ -94,7 +94,7 @@ Following platforms are supported by Electron:
### macOS
Only 64bit binaries are provided for macOS, and the minimum macOS version
supported is macOS 10.10 (Yosemite).
supported is macOS 10.11 (El Capitan).
Native support for Apple Silicon (`arm64`) devices was added in Electron 11.0.0.

View File

@@ -86,12 +86,12 @@ const driver = new webdriver.Builder()
// The "9515" is the port opened by chrome driver.
.usingServer('http://localhost:9515')
.withCapabilities({
chromeOptions: {
'goog:chromeOptions': {
// Here is the path to your Electron binary.
binary: '/Path-to-Your-App.app/Contents/MacOS/Electron'
}
})
.forBrowser('electron')
.forBrowser('chrome') // note: use .forBrowser('electron') for selenium-webdriver <= 3.6.0
.build()
driver.get('http://www.google.com')

View File

@@ -73,7 +73,7 @@ template("electron_extra_paks") {
"//components/resources",
"//content:content_resources",
"//content:dev_ui_content_resources",
"//content/browser/resources/media:media_internals_resources",
"//content/browser/resources/media:resources",
"//content/browser/tracing:resources",
"//content/browser/webrtc/resources",
"//electron:resources",

View File

@@ -404,6 +404,8 @@ filenames = {
"shell/browser/native_window_observer.h",
"shell/browser/net/asar/asar_url_loader.cc",
"shell/browser/net/asar/asar_url_loader.h",
"shell/browser/net/asar/asar_url_loader_factory.cc",
"shell/browser/net/asar/asar_url_loader_factory.h",
"shell/browser/net/cert_verifier_client.cc",
"shell/browser/net/cert_verifier_client.h",
"shell/browser/net/electron_url_loader_factory.cc",

View File

@@ -532,15 +532,17 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
return fs.readFile(realPath, options, callback);
}
const buffer = Buffer.alloc(info.size);
const fd = archive.getFd();
if (!(fd >= 0)) {
const error = createError(AsarError.NOT_FOUND, { asarPath, filePath });
nextTick(callback, [error]);
return;
}
logASARAccess(asarPath, filePath, info.offset);
archive.read(info.offset, info.size).then((buf) => {
const buffer = Buffer.from(buf);
callback(null, encoding ? buffer.toString(encoding) : buffer);
}, (err) => {
const error: AsarErrorObject = new Error(`EINVAL, ${err.message} while reading ${filePath} in ${asarPath}`);
error.code = 'EINVAL';
error.errno = -22;
callback(error);
fs.read(fd, buffer, 0, info.size, info.offset, (error: Error) => {
callback(error, encoding ? buffer.toString(encoding) : buffer);
});
};
@@ -573,19 +575,13 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
}
const { encoding } = options;
const buffer = Buffer.alloc(info.size);
const fd = archive.getFd();
if (!(fd >= 0)) throw createError(AsarError.NOT_FOUND, { asarPath, filePath });
logASARAccess(asarPath, filePath, info.offset);
let arrayBuffer: ArrayBuffer;
try {
arrayBuffer = archive.readSync(info.offset, info.size);
} catch (err) {
const error: AsarErrorObject = new Error(`EINVAL, ${err.message} while reading ${filePath} in ${asarPath}`);
error.code = 'EINVAL';
error.errno = -22;
throw error;
}
const buffer = Buffer.from(arrayBuffer);
return encoding ? buffer.toString(encoding) : buffer;
fs.readSync(fd, buffer, 0, info.size, info.offset);
return (encoding) ? buffer.toString(encoding) : buffer;
};
const { readdir } = fs;
@@ -697,17 +693,12 @@ export const wrapFsWithAsar = (fs: Record<string, any>) => {
return [str, str.length > 0];
}
const buffer = Buffer.alloc(info.size);
const fd = archive.getFd();
if (!(fd >= 0)) return [];
logASARAccess(asarPath, filePath, info.offset);
let arrayBuffer: ArrayBuffer;
try {
arrayBuffer = archive.readSync(info.offset, info.size);
} catch (err) {
const error: AsarErrorObject = new Error(`EINVAL, ${err.message} while reading ${filePath} in ${asarPath}`);
error.code = 'EINVAL';
error.errno = -22;
throw error;
}
const buffer = Buffer.from(arrayBuffer);
fs.readSync(fd, buffer, 0, info.size, info.offset);
const str = buffer.toString('utf8');
return [str, str.length > 0];
};

View File

@@ -10,13 +10,13 @@ class CrashReporter {
extra = {},
globalExtra = {},
ignoreSystemCrashHandler = false,
submitURL,
submitURL = '',
uploadToServer = true,
rateLimit = false,
compress = true
} = options || {};
if (submitURL == null) throw new Error('submitURL is a required option to crashReporter.start');
if (uploadToServer && !submitURL) throw new Error('submitURL must be specified when uploadToServer is true');
if (!compress) {
deprecate.log('Sending uncompressed crash reports is deprecated and will be removed in a future version of Electron. Set { compress: true } to opt-in to the new behavior. Crash reports will be uploaded gzipped, which most crash reporting servers support.');

View File

@@ -1,5 +1,5 @@
import { app, ipcMain, session, deprecate, webFrameMain } from 'electron/main';
import type { BrowserWindowConstructorOptions, MenuItem, MenuItemConstructorOptions, LoadURLOptions } from 'electron/main';
import type { BrowserWindowConstructorOptions, LoadURLOptions } from 'electron/main';
import * as url from 'url';
import * as path from 'path';
@@ -94,6 +94,7 @@ const defaultPrintingSetting = {
pagesPerSheet: 1,
isFirstRequest: false,
previewUIID: 0,
// True, if the document source is modifiable. e.g. HTML and not PDF.
previewModifiable: true,
printToPDF: true,
deviceName: 'Save as PDF',
@@ -432,7 +433,11 @@ WebContents.prototype._callWindowOpenHandler = function (event: Electron.Event,
event.preventDefault();
return null;
} else if (response.action === 'allow') {
if (typeof response.overrideBrowserWindowOptions === 'object' && response.overrideBrowserWindowOptions !== null) { return response.overrideBrowserWindowOptions; } else { return {}; }
if (typeof response.overrideBrowserWindowOptions === 'object' && response.overrideBrowserWindowOptions !== null) {
return response.overrideBrowserWindowOptions;
} else {
return {};
}
} else {
event.preventDefault();
console.error('The window open handler response must be an object with an \'action\' property of \'allow\' or \'deny\'.');
@@ -546,18 +551,6 @@ WebContents.prototype._init = function () {
ipcMain.emit(channel, event, message);
});
// Handle context menu action request from pepper plugin.
this.on('pepper-context-menu' as any, function (event: ElectronInternal.Event, params: {x: number, y: number, menu: Array<(MenuItemConstructorOptions) | (MenuItem)>}, callback: () => void) {
// Access Menu via electron.Menu to prevent circular require.
const menu = require('electron').Menu.buildFromTemplate(params.menu);
menu.popup({
window: event.sender.getOwnerBrowserWindow(),
x: params.x,
y: params.y,
callback
});
});
this.on('crashed', (event, ...args) => {
app.emit('renderer-process-crashed', event, this, ...args);
});
@@ -580,19 +573,22 @@ WebContents.prototype._init = function () {
// Make new windows requested by links behave like "window.open".
this.on('-new-window' as any, (event: ElectronInternal.Event, url: string, frameName: string, disposition: string,
rawFeatures: string, referrer: Electron.Referrer, postData: PostData) => {
openGuestWindow({
event,
embedder: event.sender,
disposition,
referrer,
postData,
overrideBrowserWindowOptions: {},
windowOpenArgs: {
url,
frameName,
features: rawFeatures
}
});
const options = this._callWindowOpenHandler(event, url, frameName, rawFeatures);
if (!event.defaultPrevented) {
openGuestWindow({
event,
embedder: event.sender,
disposition,
referrer,
postData,
overrideBrowserWindowOptions: options || {},
windowOpenArgs: {
url,
frameName,
features: rawFeatures
}
});
}
});
let windowOpenOverriddenOptions: BrowserWindowConstructorOptions | null = null;
@@ -604,6 +600,7 @@ WebContents.prototype._init = function () {
// it's technically a BrowserWindowConstructorOptions option because
// we need to access it in the renderer at init time.
backgroundColor: windowOpenOverriddenOptions.backgroundColor,
transparent: windowOpenOverriddenOptions.transparent,
...windowOpenOverriddenOptions.webPreferences
} : undefined;
this._setNextChildWebPreferences(

View File

@@ -27,7 +27,7 @@ export const setDefaultApplicationMenu = () => {
{
label: 'Community Discussions',
click: async () => {
await shell.openExternal('https://discuss.atom.io/c/electron');
await shell.openExternal('https://discord.gg/electron');
}
},
{

View File

@@ -42,7 +42,6 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition
windowOpenArgs: WindowOpenArgs,
}): BrowserWindow | undefined {
const { url, frameName, features } = windowOpenArgs;
const isNativeWindowOpen = !!guest;
const { options: browserWindowOptions, additionalFeatures } = makeBrowserWindowOptions({
embedder,
features,
@@ -57,6 +56,7 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition
windowOpenArgs,
additionalFeatures,
disposition,
postData,
referrer
});
if (didCancelEvent) return;
@@ -74,11 +74,14 @@ export function openGuestWindow ({ event, embedder, guest, referrer, disposition
webContents: guest,
...browserWindowOptions
});
if (!isNativeWindowOpen) {
if (!guest) {
// We should only call `loadURL` if the webContents was constructed by us in
// the case of BrowserWindowProxy (non-sandboxed, nativeWindowOpen: false),
// as navigating to the url when creating the window from an existing
// webContents is not necessary (it will navigate there anyway).
// This can also happen if we enter this function from OpenURLFromTab, in
// which case the browser process is responsible for initiating navigation
// in the new window.
window.loadURL(url, {
httpReferrer: referrer,
...(postData && {
@@ -146,7 +149,7 @@ function emitDeprecatedNewWindowEvent ({ event, embedder, guest, windowOpenArgs,
const isWebViewWithPopupsDisabled = embedder.getType() === 'webview' && embedder.getLastWebPreferences().disablePopups;
const postBody = postData ? {
data: postData,
headers: formatPostDataHeaders(postData as Electron.UploadRawData[])
...parseContentTypeFormat(postData)
} : null;
embedder.emit(
@@ -276,22 +279,40 @@ function getDeprecatedInheritedOptions (embedder: WebContents) {
return inheritableOptions;
}
function formatPostDataHeaders (postData: Electron.UploadRawData[]) {
function formatPostDataHeaders (postData: PostData) {
if (!postData) return;
let extraHeaders = 'content-type: application/x-www-form-urlencoded';
const { contentType, boundary } = parseContentTypeFormat(postData);
if (boundary != null) { return `content-type: ${contentType}; boundary=${boundary}`; }
if (postData.length > 0) {
const postDataFront = postData[0].bytes.toString();
const boundary = /^--.*[^-\r\n]/.exec(
postDataFront
);
if (boundary != null) {
extraHeaders = `content-type: multipart/form-data; boundary=${boundary[0].substr(
2
)}`;
return `content-type: ${contentType}`;
}
const MULTIPART_CONTENT_TYPE = 'multipart/form-data';
const URL_ENCODED_CONTENT_TYPE = 'application/x-www-form-urlencoded';
// Figure out appropriate headers for post data.
const parseContentTypeFormat = function (postData: Exclude<PostData, undefined>) {
if (postData.length) {
if (postData[0].type === 'rawData') {
// For multipart forms, the first element will start with the boundary
// notice, which looks something like `------WebKitFormBoundary12345678`
// Note, this regex would fail when submitting a urlencoded form with an
// input attribute of name="--theKey", but, uhh, don't do that?
const postDataFront = postData[0].bytes.toString();
const boundary = /^--.*[^-\r\n]/.exec(postDataFront);
if (boundary) {
return {
boundary: boundary[0].substr(2),
contentType: MULTIPART_CONTENT_TYPE
};
}
}
}
return extraHeaders;
}
// Either the form submission didn't contain any inputs (the postData array
// was empty), or we couldn't find the boundary and thus we can assume this is
// a key=value style form.
return {
contentType: URL_ENCODED_CONTENT_TYPE
};
};

View File

@@ -62,7 +62,7 @@ export function parseCommaSeparatedKeyValue (source: string, useSoonToBeDeprecat
for (const keyValuePair of source.split(',')) {
const [key, value] = keyValuePair.split('=').map(str => str.trim());
if (useSoonToBeDeprecatedBehaviorForBareKeys && value === undefined) {
bareKeys.push(key);
if (key) { bareKeys.push(key); }
continue;
}
parsed[key] = coerce(key, value);

View File

@@ -39,6 +39,10 @@ require('@electron/internal/common/init');
// The global variable will be used by ipc for event dispatching
const v8Util = process._linkedBinding('electron_common_v8_util');
// Expose process.contextId
const contextId = v8Util.getHiddenValue<string>(global, 'contextId');
Object.defineProperty(process, 'contextId', { enumerable: true, value: contextId });
const { ipcRendererInternal } = require('@electron/internal/renderer/ipc-renderer-internal');
const ipcRenderer = require('@electron/internal/renderer/api/ipc-renderer').default;

View File

@@ -89,6 +89,10 @@ Object.defineProperty(preloadProcess, 'noDeprecation', {
}
});
// Expose process.contextId
const contextId = v8Util.getHiddenValue<string>(global, 'contextId');
Object.defineProperty(preloadProcess, 'contextId', { enumerable: true, value: contextId });
process.on('loaded', () => (preloadProcess as events.EventEmitter).emit('loaded'));
process.on('exit', () => (preloadProcess as events.EventEmitter).emit('exit'));
(process as events.EventEmitter).on('document-start', () => (preloadProcess as events.EventEmitter).emit('document-start'));

View File

@@ -1,6 +1,6 @@
{
"name": "electron",
"version": "13.0.0-nightly.20210303",
"version": "13.0.0-beta.16",
"repository": "https://github.com/electron/electron",
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {

View File

@@ -57,7 +57,7 @@ index 53cb9d2dc8f1962a70dc12b648d27c32be8aca4b..84af06fc56e4aa72d4d48801d7c037ad
callback(EVP_aes_192_ctr(), "aes-192-ctr", NULL, arg);
callback(EVP_aes_256_ctr(), "aes-256-ctr", NULL, arg);
diff --git a/include/openssl/cipher.h b/include/openssl/cipher.h
index c6bec489b51ca2e71b7f81e64a8e59b534e2e91a..512a9003164e65bd4ab896ef75b173dab3a8d1db 100644
index badd496293fb9748adacff10478ea702d1155c5f..8565934bac9a810281b04946cb9f38d7623320f7 100644
--- a/include/openssl/cipher.h
+++ b/include/openssl/cipher.h
@@ -430,6 +430,7 @@ OPENSSL_EXPORT const EVP_CIPHER *EVP_des_ede3_ecb(void);

View File

@@ -10,10 +10,10 @@ this patch is required to provide ripemd160 support in the nodejs crypto
module.
diff --git a/crypto/digest_extra/digest_extra.c b/crypto/digest_extra/digest_extra.c
index 4b4bb38135e6089eaf6f47afda0199567a2397ef..43b7eca808b82a032055f56ce726ce4f38c5f2c5 100644
index 311c5cba0e359a20b34ba6c7ee84c34b6068049f..c4638d40aab0a4b9612216d68cd7fb50823a0ae6 100644
--- a/crypto/digest_extra/digest_extra.c
+++ b/crypto/digest_extra/digest_extra.c
@@ -81,6 +81,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
@@ -83,6 +83,7 @@ static const struct nid_to_digest nid_to_digest_mapping[] = {
{NID_sha384, EVP_sha384, SN_sha384, LN_sha384},
{NID_sha512, EVP_sha512, SN_sha512, LN_sha512},
{NID_md5_sha1, EVP_md5_sha1, SN_md5_sha1, LN_md5_sha1},
@@ -80,10 +80,10 @@ index d540144b293297791c087e0b968a47d368a73695..53cb9d2dc8f1962a70dc12b648d27c32
+ callback(EVP_ripemd160(), "ripemd160", NULL, arg);
}
diff --git a/include/openssl/digest.h b/include/openssl/digest.h
index 8e398e8b87f199cf947e097cf99e175bfc9870da..6c0ce559681817cae3273a50e6533468f17177ee 100644
index 66f1b5dcfd8232a697145acb2b6c2efe890d543f..67fc522172dc3ab56787fa5db3c277fd4811474a 100644
--- a/include/openssl/digest.h
+++ b/include/openssl/digest.h
@@ -89,6 +89,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_sha512_256(void);
@@ -90,6 +90,9 @@ OPENSSL_EXPORT const EVP_MD *EVP_blake2b256(void);
// MD5 and SHA-1, as used in TLS 1.1 and below.
OPENSSL_EXPORT const EVP_MD *EVP_md5_sha1(void);

View File

@@ -50,7 +50,6 @@ fix_disable_usage_of_abort_report_np_in_mas_builds.patch
fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch
fix_disable_usage_of_setapplicationisdaemon_and.patch
unsandboxed_ppapi_processes_skip_zygote.patch
patch_the_ensure_gn_version_py_script_to_work_on_mac_ci.patch
build_add_electron_tracing_category.patch
worker_context_will_destroy.patch
frame_host_manager.patch
@@ -107,3 +106,6 @@ web_contents.patch
add_trustedauthclient_to_urlloaderfactory.patch
fix_route_mouse_event_navigations_through_the_web_contents_delegate.patch
disable_unload_metrics.patch
fix_add_check_for_sandbox_then_result.patch
moves_background_color_setter_of_webview_to_blinks_webprefs_logic.patch
blink_wasm_eval_csp.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 17e1739c12ee38864e735130792321adadb43f08..7b0bfec6f18e883eb7ad7e3bfe564163592f584e 100644
index 1a2a154b743cd4ecccf1be9971f36896e982dc6e..f28a557ccc96c25fc4a93dca216e3184b88cbf8d 100644
--- a/ui/base/accelerators/accelerator.cc
+++ b/ui/base/accelerators/accelerator.cc
@@ -12,6 +12,7 @@
@@ -31,7 +31,7 @@ index 17e1739c12ee38864e735130792321adadb43f08..7b0bfec6f18e883eb7ad7e3bfe564163
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "ui/base/ui_base_features.h"
@@ -205,7 +204,15 @@ base::string16 Accelerator::GetShortcutText() const {
@@ -205,7 +204,15 @@ std::u16string Accelerator::GetShortcutText() const {
shortcut = KeyCodeToName();
#endif
@@ -41,13 +41,13 @@ index 17e1739c12ee38864e735130792321adadb43f08..7b0bfec6f18e883eb7ad7e3bfe564163
+ UsLayoutKeyboardCodeToDomCode(key_code_), flags);
+ if (c != 0) {
+ shortcut =
+ static_cast<base::string16::value_type>(
+ base::ToUpperASCII(static_cast<base::char16>(c)));
+ static_cast<std::u16string::value_type>(
+ base::ToUpperASCII(static_cast<char16_t>(c)));
+ }
#if defined(OS_WIN)
// Our fallback is to try translate the key code to a regular character
// unless it is one of digits (VK_0 to VK_9). Some keyboard
@@ -214,21 +221,14 @@ base::string16 Accelerator::GetShortcutText() const {
@@ -214,21 +221,14 @@ std::u16string Accelerator::GetShortcutText() const {
// accent' for '0'). For display in the menu (e.g. Ctrl-0 for the
// default zoom level), we leave VK_[0-9] alone without translation.
wchar_t key;
@@ -65,7 +65,7 @@ index 17e1739c12ee38864e735130792321adadb43f08..7b0bfec6f18e883eb7ad7e3bfe564163
- UsLayoutKeyboardCodeToDomCode(key_code_), false);
- if (c != 0)
- shortcut +=
- static_cast<base::string16::value_type>(base::ToUpperASCII(c));
- static_cast<std::u16string::value_type>(base::ToUpperASCII(c));
+ shortcut = key;
+ }
#endif
@@ -75,7 +75,7 @@ index 17e1739c12ee38864e735130792321adadb43f08..7b0bfec6f18e883eb7ad7e3bfe564163
}
#if defined(OS_APPLE)
@@ -411,7 +411,7 @@ base::string16 Accelerator::ApplyLongFormModifiers(
@@ -411,7 +411,7 @@ std::u16string Accelerator::ApplyLongFormModifiers(
// more information.
if (IsCtrlDown())
shortcut = ApplyModifierToAcceleratorString(shortcut, IDS_APP_CTRL_KEY);

View File

@@ -10,10 +10,10 @@ Allows Electron to restore WER when ELECTRON_DEFAULT_ERROR_MODE is set.
This should be upstreamed.
diff --git a/content/gpu/gpu_main.cc b/content/gpu/gpu_main.cc
index 5bcbb68864ed193a519b34a37f1e50c29422235a..c33f108158538c49f9d4d27b8fa89852e829c787 100644
index cc0f150d08c13e5d06c7da5df7323a3b2463785a..f66af5d6b1336fe5de22150855b4416832b8522a 100644
--- a/content/gpu/gpu_main.cc
+++ b/content/gpu/gpu_main.cc
@@ -261,6 +261,10 @@ int GpuMain(const MainFunctionParams& parameters) {
@@ -267,6 +267,10 @@ int GpuMain(const MainFunctionParams& parameters) {
// to the GpuProcessHost once the GpuServiceImpl has started.
viz::GpuServiceImpl::InstallPreInitializeLogHandler();
@@ -24,7 +24,7 @@ index 5bcbb68864ed193a519b34a37f1e50c29422235a..c33f108158538c49f9d4d27b8fa89852
// We are experiencing what appear to be memory-stomp issues in the GPU
// process. These issues seem to be impacting the task executor and listeners
// registered to it. Create the task executor on the heap to guard against
@@ -398,7 +402,6 @@ int GpuMain(const MainFunctionParams& parameters) {
@@ -404,7 +408,6 @@ int GpuMain(const MainFunctionParams& parameters) {
}
#endif

View File

@@ -10,10 +10,10 @@ DidCreateScriptContext is called, not all JS APIs are available in the
context, which can cause some preload scripts to trip.
diff --git a/content/public/renderer/render_frame_observer.h b/content/public/renderer/render_frame_observer.h
index 7d2ebf0d8a14fd89e32e35631428f43aed259c16..8efabb6b7825f6fab019d7f83e185a953bb589f1 100644
index 5a733f2086ec10d3010da52a2758e1748d1178e1..d8c7ef2e3c03f5275c1ed58849ec892f811165ef 100644
--- a/content/public/renderer/render_frame_observer.h
+++ b/content/public/renderer/render_frame_observer.h
@@ -126,6 +126,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
@@ -128,6 +128,8 @@ class CONTENT_EXPORT RenderFrameObserver : public IPC::Listener,
virtual void DidHandleOnloadEvents() {}
virtual void DidCreateScriptContext(v8::Local<v8::Context> context,
int32_t world_id) {}
@@ -23,10 +23,10 @@ index 7d2ebf0d8a14fd89e32e35631428f43aed259c16..8efabb6b7825f6fab019d7f83e185a95
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index a52fcdfcb01d8f9bf5739ba4c4bf47e610f19107..74f4881d51e671e178f8d4ff32a49b0010e9efb2 100644
index e2425d04e1008be3db9e6e887a7de589c18673a5..be3779de84dbda14c3425c5115da78ab703e9cfb 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4666,6 +4666,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4577,6 +4577,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -40,10 +40,10 @@ index a52fcdfcb01d8f9bf5739ba4c4bf47e610f19107..74f4881d51e671e178f8d4ff32a49b00
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index 9d100f04d9f094320eb99fbaba58c3da1b860ab7..80226249efe0f6192a27e2d55f2f7f57912453b0 100644
index 9ab20deefcc7339a783e9d922c55f42840cbbf8f..52e763e8cf62ea9c5e6025d2fedd66eb8c9c8470 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -598,6 +598,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -597,6 +597,8 @@ class CONTENT_EXPORT RenderFrameImpl
blink::WebLocalFrameClient::LazyLoadBehavior lazy_load_behavior) override;
void DidCreateScriptContext(v8::Local<v8::Context> context,
int world_id) override;
@@ -53,10 +53,10 @@ index 9d100f04d9f094320eb99fbaba58c3da1b860ab7..80226249efe0f6192a27e2d55f2f7f57
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 507da809f6d3448dffab4816c0675ece6cb35ba6..2711f5de447714bc1110f9abb559332bb0c4bddf 100644
index fd8b154d7a38a6444dd6ceea93b422918561d0f4..8deaf19c88fdeab5ccf7bf24a086094d255e5a1a 100644
--- a/third_party/blink/public/web/web_local_frame_client.h
+++ b/third_party/blink/public/web/web_local_frame_client.h
@@ -567,6 +567,9 @@ class BLINK_EXPORT WebLocalFrameClient {
@@ -571,6 +571,9 @@ class BLINK_EXPORT WebLocalFrameClient {
virtual void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
@@ -79,7 +79,7 @@ index be5cf4457cd379d5abc119d209d2df6520ad1022..8a0baac5bb8cb403324fb8156be62b92
if (World().IsMainWorld()) {
GetFrame()->Loader().DispatchDidClearWindowObjectInMainWorld();
diff --git a/third_party/blink/renderer/core/frame/local_frame_client.h b/third_party/blink/renderer/core/frame/local_frame_client.h
index 9a526ac4808171693146870909e058f41fe56a50..a15e379ee951504fd77b27af61b318d266274b3d 100644
index 20a509a57d8916f8fb522575e7a5dd9c2f8a9092..60193a0e5e369b09d59379415d06a74d268d0590 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client.h
@@ -294,6 +294,8 @@ class CORE_EXPORT LocalFrameClient : public FrameClient {
@@ -92,10 +92,10 @@ index 9a526ac4808171693146870909e058f41fe56a50..a15e379ee951504fd77b27af61b318d2
int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
index 0e71a094d9b67a6d1f5fb298d7057495e3a37803..cb7bfe7d79d6024b390c77285c2d47150a391c63 100644
index 76a5edbafc727c8760c4cc12d9279fb96fde3740..205cbc9f1f629e10a92d2b86a65460fd115a2149 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.cc
@@ -342,6 +342,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
@@ -272,6 +272,13 @@ void LocalFrameClientImpl::DidCreateScriptContext(
web_frame_->Client()->DidCreateScriptContext(context, world_id);
}
@@ -110,7 +110,7 @@ index 0e71a094d9b67a6d1f5fb298d7057495e3a37803..cb7bfe7d79d6024b390c77285c2d4715
v8::Local<v8::Context> context,
int32_t world_id) {
diff --git a/third_party/blink/renderer/core/frame/local_frame_client_impl.h b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
index 28d83f87c1582c8df6209f5d0a9aef130f0a4bea..3822c88091dfc803c4c57256e04bbc3946f8a869 100644
index 244a0028b7a6d14e3eb30041b36c9ef49b61018a..ea98189f0f03a9099d6963fe0fb3ae8fb0548c64 100644
--- a/third_party/blink/renderer/core/frame/local_frame_client_impl.h
+++ b/third_party/blink/renderer/core/frame/local_frame_client_impl.h
@@ -76,6 +76,8 @@ class CORE_EXPORT LocalFrameClientImpl final : public LocalFrameClient {
@@ -123,10 +123,10 @@ index 28d83f87c1582c8df6209f5d0a9aef130f0a4bea..3822c88091dfc803c4c57256e04bbc39
int32_t world_id) override;
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index 3e442a5ddf1dd775febd433e2adb4795a3e5edec..22b5d7fbc3f09ea677444adbd8cae2ecd205b037 100644
index 10a75b729c365f04545888c92c811e2da6c59919..43ad2a74d904d74fd6c39a61aa73093e5296510e 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -337,6 +337,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
@@ -344,6 +344,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) override {}

View File

@@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement
Realloc on the v8 side and correspondingly in gin.
diff --git a/gin/array_buffer.cc b/gin/array_buffer.cc
index 124c2f72a5cbc2abe8c7686c32b61718d4c95d4b..fa4a478450cc97d231496ab82c74c1a94d1f3557 100644
index 210760801f1d027196111631d34bab3eb5a10792..cdfdf91841b5f2feb248b0c5890ddcfdb5a8f9ce 100644
--- a/gin/array_buffer.cc
+++ b/gin/array_buffer.cc
@@ -43,6 +43,10 @@ void* ArrayBufferAllocator::AllocateUninitialized(size_t length) {
@@ -37,6 +37,10 @@ void* ArrayBufferAllocator::AllocateUninitialized(size_t length) {
return malloc(length);
}
@@ -27,7 +27,7 @@ index 124c2f72a5cbc2abe8c7686c32b61718d4c95d4b..fa4a478450cc97d231496ab82c74c1a9
free(data);
}
diff --git a/gin/array_buffer.h b/gin/array_buffer.h
index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f4ddb2de2 100644
index 086371af29bd8c7520485125deddca411e8b978b..2c6886ddcc47019be4d552d4fddfc1c3d00cbca0 100644
--- a/gin/array_buffer.h
+++ b/gin/array_buffer.h
@@ -21,6 +21,7 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
@@ -39,10 +39,10 @@ index 2aef366ac8194aa261cbca6abc051f7da8a988d3..3c7d66c81032636abcca4f1538ce9b7f
GIN_EXPORT static ArrayBufferAllocator* SharedInstance();
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index 4fbbdb2304a40ae4bca03dd51ce55615c5babae2..e2213b00d73f399bb14b7edfa0fb719aa12a6be5 100644
index 7f88acc40ec99f0ecd1b71270980ee6e0c3e203e..42cdbc706a33792859fece7741846c4cc922008a 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -697,6 +697,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
@@ -699,6 +699,10 @@ class ArrayBufferAllocator : public v8::ArrayBuffer::Allocator {
return result;
}
@@ -54,10 +54,10 @@ index 4fbbdb2304a40ae4bca03dd51ce55615c5babae2..e2213b00d73f399bb14b7edfa0fb719a
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 686806bcafa0939d29bbc6775748a115130feb96..20f7a9a594cf379b2dac6970bc8c02aebc3be360 100644
index ec217020077613d72eee4b5c408bd5e9eda2ae47..7ab2fa4d00eca9d4896653e29c98654ff75d4306 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
@@ -127,6 +127,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
@@ -149,6 +149,11 @@ void* ArrayBufferContents::AllocateMemoryOrNull(size_t size,
return AllocateMemoryWithFlags(size, policy, base::PartitionAllocReturnNull);
}

View File

@@ -10,10 +10,10 @@ WebContents, and cancels the authentication if there's no WebContents
available, which there isn't in the case of the 'net' module.
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index fd0f46bfd8d5b7c803042635460cd3b87d2521dc..64a7d8b08f19865cd5d824a9a48ef27abe60a02a 100644
index b35746e2850d7d724fcf3dc09ddbfea1ca56a746..491172c51c2d196573f2e835f7b81df30a33cf2f 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -228,6 +228,26 @@ struct CTPolicy {
@@ -192,6 +192,26 @@ struct CTPolicy {
array<string> excluded_legacy_spkis;
};
@@ -40,7 +40,7 @@ index fd0f46bfd8d5b7c803042635460cd3b87d2521dc..64a7d8b08f19865cd5d824a9a48ef27a
interface CertVerifierClient {
Verify(
int32 default_error,
@@ -660,6 +680,8 @@ struct URLLoaderFactoryParams {
@@ -606,6 +626,8 @@ struct URLLoaderFactoryParams {
// impact because of the extra process hops, so use should be minimized.
pending_remote<TrustedURLLoaderHeaderClient>? header_client;
@@ -50,18 +50,18 @@ index fd0f46bfd8d5b7c803042635460cd3b87d2521dc..64a7d8b08f19865cd5d824a9a48ef27a
// cookies) and to shard network resources, like the cache. If set, takes
// precedence over ResourceRequest::TrustedParams::IsolationInfo field
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 00339d4537993b97bd2a3d62e3aa95057cd41a03..165aba6599c17d74a4ffc3553f018854f7807ab0 100644
index 136c4ec48412354cbc3d77880dd34ec836694004..f484bb54c59866d13e532cd81ed28ad9f982549a 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -459,6 +459,7 @@ URLLoader::URLLoader(
@@ -465,6 +465,7 @@ URLLoader::URLLoader(
scoped_refptr<ResourceSchedulerClient> resource_scheduler_client,
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
+ mojom::TrustedURLLoaderAuthClient* url_loader_auth_client,
mojom::OriginPolicyManager* origin_policy_manager,
std::unique_ptr<TrustTokenRequestHelperFactory> trust_token_helper_factory,
const cors::OriginAccessList& origin_access_list,
@@ -523,6 +524,11 @@ URLLoader::URLLoader(
@@ -533,6 +534,11 @@ URLLoader::URLLoader(
header_client_.set_disconnect_handler(
base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
}
@@ -73,24 +73,27 @@ index 00339d4537993b97bd2a3d62e3aa95057cd41a03..165aba6599c17d74a4ffc3553f018854
if (want_raw_headers_) {
options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse |
mojom::kURLLoadOptionSendSSLInfoForCertificateError;
@@ -1169,7 +1175,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
// |this| may have been deleted.
@@ -1198,7 +1204,7 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
return;
}
- if (!network_context_client_) {
+ if (!network_context_client_ && !auth_client_) {
auto* url_loader_network_observer = GetURLLoaderNetworkServiceObserver();
- if (!url_loader_network_observer) {
+ if (!url_loader_network_observer && !auth_client_) {
OnAuthCredentials(base::nullopt);
return;
}
@@ -1185,11 +1191,19 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
if (url_request->response_headers())
head->headers = url_request->response_headers();
head->auth_challenge_info = auth_info;
- network_context_client_->OnAuthRequired(
- fetch_window_id_, factory_params_->process_id, render_frame_id_,
- request_id_, url_request_->url(), first_auth_attempt_, auth_info,
- std::move(head),
@@ -1210,10 +1216,22 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
DCHECK(!auth_challenge_responder_receiver_.is_bound());
- url_loader_network_observer->OnAuthRequired(
- fetch_window_id_, request_id_, url_request_->url(), first_auth_attempt_,
- auth_info, url_request->response_headers(),
- auth_challenge_responder_receiver_.BindNewPipeAndPassRemote());
+ auto head = mojom::URLResponseHead::New();
+ if (url_request->response_headers())
+ head->headers = url_request->response_headers();
+ head->auth_challenge_info = auth_info;
+ if (auth_client_) {
+ auth_client_->OnAuthRequired(
+ fetch_window_id_, factory_params_->process_id, render_frame_id_,
@@ -98,28 +101,27 @@ index 00339d4537993b97bd2a3d62e3aa95057cd41a03..165aba6599c17d74a4ffc3553f018854
+ std::move(head),
+ auth_challenge_responder_receiver_.BindNewPipeAndPassRemote());
+ } else {
+ network_context_client_->OnAuthRequired(
+ fetch_window_id_, factory_params_->process_id, render_frame_id_,
+ request_id_, url_request_->url(), first_auth_attempt_, auth_info,
+ std::move(head),
+ url_loader_network_observer->OnAuthRequired(
+ fetch_window_id_, request_id_, url_request_->url(), first_auth_attempt_,
+ auth_info, url_request->response_headers(),
+ auth_challenge_responder_receiver_.BindNewPipeAndPassRemote());
+ }
auth_challenge_responder_receiver_.set_disconnect_handler(
base::BindOnce(&URLLoader::DeleteSelf, base::Unretained(this)));
diff --git a/services/network/url_loader.h b/services/network/url_loader.h
index 7d0dc6685a0f1f7e5e3bcde2b5beb416f2d46030..d339b2a954067c5e2adcac6e64a6507f070e550b 100644
index f8c6112335ea43912485e76ec48d28b8609fab83..25c17fc78a03ba6a0b1a399e22bbba827e2275fb 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -129,6 +129,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -128,6 +128,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
scoped_refptr<ResourceSchedulerClient> resource_scheduler_client,
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
+ mojom::TrustedURLLoaderAuthClient* url_loader_auth_client,
mojom::OriginPolicyManager* origin_policy_manager,
std::unique_ptr<TrustTokenRequestHelperFactory>
trust_token_helper_factory,
@@ -494,6 +495,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -517,6 +518,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
base::Optional<base::UnguessableToken> fetch_window_id_;
mojo::Remote<mojom::TrustedHeaderClient> header_client_;
@@ -128,30 +130,30 @@ index 7d0dc6685a0f1f7e5e3bcde2b5beb416f2d46030..d339b2a954067c5e2adcac6e64a6507f
std::unique_ptr<FileOpenerForUpload> file_opener_for_upload_;
diff --git a/services/network/url_loader_factory.cc b/services/network/url_loader_factory.cc
index 3b9b240615e56ef11a32ac87df2d189aae5c3bfa..bd2f131da2432eb63f0cb6610e10ede219f179c4 100644
index 766d343375c24c5746fb442370b544a8cf76d58f..627efb08ed0974f0c7672085e46996048af8c244 100644
--- a/services/network/url_loader_factory.cc
+++ b/services/network/url_loader_factory.cc
@@ -77,6 +77,7 @@ URLLoaderFactory::URLLoaderFactory(
@@ -76,6 +76,7 @@ URLLoaderFactory::URLLoaderFactory(
resource_scheduler_client_(std::move(resource_scheduler_client)),
header_client_(std::move(params_->header_client)),
coep_reporter_(std::move(params_->coep_reporter)),
+ auth_client_(std::move(params_->auth_client)),
cors_url_loader_factory_(cors_url_loader_factory),
cookie_observer_(std::move(params_->cookie_observer)) {
DCHECK(context);
@@ -297,6 +298,7 @@ void URLLoaderFactory::CreateLoaderAndStart(
cookie_observer_(std::move(params_->cookie_observer)),
url_loader_network_service_observer_(
@@ -279,6 +280,7 @@ void URLLoaderFactory::CreateLoaderAndStart(
context_->require_network_isolation_key(), resource_scheduler_client_,
std::move(keepalive_statistics_recorder),
std::move(network_usage_accumulator),
header_client_.is_bound() ? header_client_.get() : nullptr,
+ auth_client_.is_bound() ? auth_client_.get() : nullptr,
context_->origin_policy_manager(), std::move(trust_token_factory),
context_->cors_origin_access_list(), std::move(cookie_observer));
context_->cors_origin_access_list(), std::move(cookie_observer),
std::move(url_loader_network_observer), std::move(devtools_observer));
diff --git a/services/network/url_loader_factory.h b/services/network/url_loader_factory.h
index 182b26816da9e82d83c47c3c73ecfdcf3003b967..903a3ad083201ed85e82169698041152278697fa 100644
index f0e423b245026a06161ab922c1aed44c9152e40a..ebce1dae5a0bceeff8e77595d4cb57166c1d236f 100644
--- a/services/network/url_loader_factory.h
+++ b/services/network/url_loader_factory.h
@@ -74,6 +74,7 @@ class URLLoaderFactory : public mojom::URLLoaderFactory {
@@ -79,6 +79,7 @@ class URLLoaderFactory : public mojom::URLLoaderFactory {
scoped_refptr<ResourceSchedulerClient> resource_scheduler_client_;
mojo::Remote<mojom::TrustedURLLoaderHeaderClient> header_client_;
mojo::Remote<mojom::CrossOriginEmbedderPolicyReporter> coep_reporter_;

View File

@@ -42,7 +42,7 @@ index 758b0b1616ecf86b7dd090adce94395851d9baf2..55f20eb6266368c65fc0ec80d52caa33
accelerated_video_decode_enabled(false),
animation_policy(
diff --git a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
index e713617a5306c8afc24559b6065aec59a0bc3e5a..80e728d1bac10c18c7799387f6c32339db615cea 100644
index ba1ba323ec45296c33b5931652a001d6bd24dbe0..663d47894592499531ff924c78b518325020dc04 100644
--- a/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
+++ b/third_party/blink/common/web_preferences/web_preferences_mojom_traits.cc
@@ -24,6 +24,11 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
@@ -57,7 +57,7 @@ index e713617a5306c8afc24559b6065aec59a0bc3e5a..80e728d1bac10c18c7799387f6c32339
!data.ReadLazyFrameLoadingDistanceThresholdsPx(
&out->lazy_frame_loading_distance_thresholds_px) ||
!data.ReadLazyImageLoadingDistanceThresholdsPx(
@@ -150,6 +155,27 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
@@ -152,6 +157,27 @@ bool StructTraits<blink::mojom::WebPreferencesDataView,
out->navigate_on_drag_drop = data.navigate_on_drag_drop();
out->v8_cache_options = data.v8_cache_options();
out->record_whole_document = data.record_whole_document();
@@ -86,7 +86,7 @@ index e713617a5306c8afc24559b6065aec59a0bc3e5a..80e728d1bac10c18c7799387f6c32339
out->accelerated_video_decode_enabled =
data.accelerated_video_decode_enabled();
diff --git a/third_party/blink/public/common/web_preferences/web_preferences.h b/third_party/blink/public/common/web_preferences/web_preferences.h
index 02c341e76e009a20f1d564ff4648ef40dd5cb9f3..4a0fd299c4cced5cfe97b209065311fa2f3f4b70 100644
index 74ed4b91cdd4c0cc0244491dfbbdf8e69e54e6f5..c15a219cc2fb2e1f9b52ad9ef7ae552466a2459c 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences.h
@@ -9,6 +9,7 @@
@@ -94,10 +94,10 @@ index 02c341e76e009a20f1d564ff4648ef40dd5cb9f3..4a0fd299c4cced5cfe97b209065311fa
#include <vector>
+#include "base/files/file_path.h"
#include "base/strings/string16.h"
#include "base/time/time.h"
#include "build/build_config.h"
@@ -159,6 +160,29 @@ struct BLINK_COMMON_EXPORT WebPreferences {
#include "net/nqe/effective_connection_type.h"
@@ -160,6 +161,29 @@ struct BLINK_COMMON_EXPORT WebPreferences {
blink::mojom::V8CacheOptions v8_cache_options;
bool record_whole_document;
@@ -128,7 +128,7 @@ index 02c341e76e009a20f1d564ff4648ef40dd5cb9f3..4a0fd299c4cced5cfe97b209065311fa
// only controls whether or not the "document.cookie" field is properly
// connected to the backing store, for instance if you wanted to be able to
diff --git a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
index 0bd751d729ecdbc556686e7d38156ca736bd7a33..a4e6b664cb28f8d7bff2955fd935cd467a64ca3b 100644
index ae180b30284c17c7319925531440161f66b873c7..2857c7fdcb18b6f9d858c038ee2a9784c141766b 100644
--- a/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
+++ b/third_party/blink/public/common/web_preferences/web_preferences_mojom_traits.h
@@ -6,6 +6,7 @@
@@ -139,7 +139,7 @@ index 0bd751d729ecdbc556686e7d38156ca736bd7a33..a4e6b664cb28f8d7bff2955fd935cd46
#include "mojo/public/cpp/bindings/struct_traits.h"
#include "net/nqe/effective_connection_type.h"
#include "third_party/blink/public/common/common_export.h"
@@ -436,6 +437,88 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
@@ -441,6 +442,88 @@ struct BLINK_COMMON_EXPORT StructTraits<blink::mojom::WebPreferencesDataView,
return r.record_whole_document;
}
@@ -229,7 +229,7 @@ index 0bd751d729ecdbc556686e7d38156ca736bd7a33..a4e6b664cb28f8d7bff2955fd935cd46
return r.cookie_enabled;
}
diff --git a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
index 1100a97287a02c3a1286513af6a36153ee6f76cb..7e5e12118f0c5c6725fb478a0198a46e500c0157 100644
index 5428fa6e79ed60774fcd6e87dcd6a602143158b7..eb21ecde85e91aef14cbe8ad6fc9e1e7d9150a61 100644
--- a/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
+++ b/third_party/blink/public/mojom/webpreferences/web_preferences.mojom
@@ -9,6 +9,7 @@ import "third_party/blink/public/mojom/css/preferred_contrast.mojom";
@@ -240,7 +240,7 @@ index 1100a97287a02c3a1286513af6a36153ee6f76cb..7e5e12118f0c5c6725fb478a0198a46e
enum PointerType {
kPointerNone = 1, // 1 << 0
@@ -210,6 +211,29 @@ struct WebPreferences {
@@ -211,6 +212,29 @@ struct WebPreferences {
V8CacheOptions v8_cache_options;
bool record_whole_document;

View File

@@ -6,81 +6,81 @@ Subject: Allow setting secondary label via SimpleMenuModel
Builds on https://chromium-review.googlesource.com/c/chromium/src/+/2208976
diff --git a/ui/base/models/simple_menu_model.cc b/ui/base/models/simple_menu_model.cc
index 0c37f6e2caead2f3004f1fbdd2abe7921ef4bea7..6f46775d96153d0c6a0795a1d6085f532daf985c 100644
index 016dab7776139c8ea7eab60569f3e5c5aeff8014..022225c4c02300667c58dc61165cc19d68eb4ca7 100644
--- a/ui/base/models/simple_menu_model.cc
+++ b/ui/base/models/simple_menu_model.cc
@@ -53,6 +53,11 @@ base::string16 SimpleMenuModel::Delegate::GetLabelForCommandId(
return base::string16();
@@ -53,6 +53,11 @@ std::u16string SimpleMenuModel::Delegate::GetLabelForCommandId(
return std::u16string();
}
+base::string16 SimpleMenuModel::Delegate::GetSecondaryLabelForCommandId(
+std::u16string SimpleMenuModel::Delegate::GetSecondaryLabelForCommandId(
+ int command_id) const {
+ return base::string16();
+ return std::u16string();
+}
+
ImageModel SimpleMenuModel::Delegate::GetIconForCommandId(
int command_id) const {
return ImageModel();
@@ -295,6 +300,11 @@ void SimpleMenuModel::SetLabel(int index, const base::string16& label) {
@@ -295,6 +300,11 @@ void SimpleMenuModel::SetLabel(int index, const std::u16string& label) {
MenuItemsChanged();
}
+void SimpleMenuModel::SetSecondaryLabel(int index, const base::string16& secondary_label) {
+void SimpleMenuModel::SetSecondaryLabel(int index, const std::u16string& secondary_label) {
+ items_[ValidateItemIndex(index)].secondary_label = secondary_label;
+ MenuItemsChanged();
+}
+
void SimpleMenuModel::SetMinorText(int index,
const base::string16& minor_text) {
const std::u16string& minor_text) {
items_[ValidateItemIndex(index)].minor_text = minor_text;
@@ -372,6 +382,12 @@ base::string16 SimpleMenuModel::GetLabelAt(int index) const {
@@ -377,6 +387,12 @@ std::u16string SimpleMenuModel::GetLabelAt(int index) const {
return items_[ValidateItemIndex(index)].label;
}
+base::string16 SimpleMenuModel::GetSecondaryLabelAt(int index) const {
+std::u16string SimpleMenuModel::GetSecondaryLabelAt(int index) const {
+ if (IsItemDynamicAt(index))
+ return delegate_->GetSecondaryLabelForCommandId(GetCommandIdAt(index));
+ return items_[ValidateItemIndex(index)].secondary_label;
+}
+
base::string16 SimpleMenuModel::GetMinorTextAt(int index) const {
std::u16string SimpleMenuModel::GetMinorTextAt(int index) const {
return items_[ValidateItemIndex(index)].minor_text;
}
diff --git a/ui/base/models/simple_menu_model.h b/ui/base/models/simple_menu_model.h
index 31669898f91d928bb63665d32ab9e4b114fecbf5..6c3f9734e2ee2cb3b6d5f9ed2787751709b013ed 100644
index 5ab6c93bb3599b72952bdc8226e6c473477b7315..1132ec877298d5d5812547ffa12a4be2f2708dc4 100644
--- a/ui/base/models/simple_menu_model.h
+++ b/ui/base/models/simple_menu_model.h
@@ -51,6 +51,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -50,6 +50,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
// Some command ids have labels and icons that change over time.
virtual bool IsItemForCommandIdDynamic(int command_id) const;
virtual base::string16 GetLabelForCommandId(int command_id) const;
+ virtual base::string16 GetSecondaryLabelForCommandId(int command_id) const;
virtual std::u16string GetLabelForCommandId(int command_id) const;
+ virtual std::u16string GetSecondaryLabelForCommandId(int command_id) const;
// Gets the icon for the item with the specified id.
virtual ImageModel GetIconForCommandId(int command_id) const;
@@ -154,6 +155,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -153,6 +154,9 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
// Sets the label for the item at |index|.
void SetLabel(int index, const base::string16& label);
void SetLabel(int index, const std::u16string& label);
+ // Sets the secondary_label for the item at |index|.
+ void SetSecondaryLabel(int index, const base::string16& secondary_label);
+ void SetSecondaryLabel(int index, const std::u16string& secondary_label);
+
// Sets the minor text for the item at |index|.
void SetMinorText(int index, const base::string16& minor_text);
void SetMinorText(int index, const std::u16string& minor_text);
@@ -183,6 +187,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -185,6 +189,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
ui::MenuSeparatorType GetSeparatorTypeAt(int index) const override;
int GetCommandIdAt(int index) const override;
base::string16 GetLabelAt(int index) const override;
+ base::string16 GetSecondaryLabelAt(int index) const override;
base::string16 GetMinorTextAt(int index) const override;
std::u16string GetLabelAt(int index) const override;
+ std::u16string GetSecondaryLabelAt(int index) const override;
std::u16string GetMinorTextAt(int index) const override;
ImageModel GetMinorIconAt(int index) const override;
bool IsItemDynamicAt(int index) const override;
@@ -219,6 +224,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
@@ -222,6 +227,7 @@ class COMPONENT_EXPORT(UI_BASE) SimpleMenuModel : public MenuModel {
int command_id = 0;
ItemType type = TYPE_COMMAND;
base::string16 label;
+ base::string16 secondary_label;
base::string16 minor_text;
std::u16string label;
+ std::u16string secondary_label;
std::u16string minor_text;
ImageModel minor_icon;
ImageModel icon;

View File

@@ -6,7 +6,7 @@ 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 07e84a8cad8689fde5f8a2c054e82851db598e8c..22b959c65d76a31d7a4c9acf1273fe61cef1204f 100644
index 870beea1249e10e59ead3d2777292deb2e559eb2..b8ab71e8395edfaa8cd8e56bbfcc315466239f06 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
@@ -366,7 +366,6 @@ void WorkerClassicScriptLoader::ProcessContentSecurityPolicy(
@@ -16,4 +16,4 @@ index 07e84a8cad8689fde5f8a2c054e82851db598e8c..22b959c65d76a31d7a4c9acf1273fe61
- !response.CurrentRequestUrl().ProtocolIs("file") &&
!response.CurrentRequestUrl().ProtocolIs("filesystem")) {
content_security_policy_ = MakeGarbageCollected<ContentSecurityPolicy>();
content_security_policy_->SetOverrideURLForSelf(
content_security_policy_->DidReceiveHeaders(

View File

@@ -15,10 +15,10 @@ Refs changes in:
This patch reverts the changes to fix associated crashes in Electron.
diff --git a/third_party/blink/renderer/core/frame/frame.cc b/third_party/blink/renderer/core/frame/frame.cc
index 9305b576b06a8020583939f357cd42902302b543..d772a31a436bf8f0617d87b5fcf5bd960bf871d9 100644
index f06a116b6a5b963308c1fd099bcbad5a72c2bce0..f2a2bfbdedfac3ba0c2100a447c22c56e5d88fbb 100644
--- a/third_party/blink/renderer/core/frame/frame.cc
+++ b/third_party/blink/renderer/core/frame/frame.cc
@@ -135,14 +135,6 @@ bool Frame::Detach(FrameDetachType type) {
@@ -118,14 +118,6 @@ bool Frame::Detach(FrameDetachType type) {
DCHECK(!IsDetached());
@@ -33,7 +33,7 @@ index 9305b576b06a8020583939f357cd42902302b543..d772a31a436bf8f0617d87b5fcf5bd96
if (type == FrameDetachType::kRemove) {
if (provisional_frame_) {
provisional_frame_->Detach(FrameDetachType::kRemove);
@@ -165,6 +157,14 @@ bool Frame::Detach(FrameDetachType type) {
@@ -148,6 +140,14 @@ bool Frame::Detach(FrameDetachType type) {
GetWindowProxyManager()->ClearForSwap();
}
@@ -49,10 +49,10 @@ index 9305b576b06a8020583939f357cd42902302b543..d772a31a436bf8f0617d87b5fcf5bd96
// its owning reference back to our owning LocalFrame.
client_->Detached(type);
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index ae17afa2ef54f16875107bb462ceac3e741e285f..214bf6868a56e77030583dccf190dac14bcdc190 100644
index 0d0e15a70e33fe2579a9c15bc52f28c918e8c4de..1a02ba1623cbdcf9853985512302a211589da198 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -670,10 +670,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -672,10 +672,6 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
}
DCHECK(!view_ || !view_->IsAttached());
@@ -63,7 +63,7 @@ index ae17afa2ef54f16875107bb462ceac3e741e285f..214bf6868a56e77030583dccf190dac1
if (!Client())
return false;
@@ -715,6 +711,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
@@ -717,6 +713,11 @@ bool LocalFrame::DetachImpl(FrameDetachType type) {
DCHECK(!view_->IsAttached());
Client()->WillBeDetached();

View File

@@ -0,0 +1,97 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Cheng Zhao <zcbenz@gmail.com>
Date: Thu, 4 Oct 2018 14:57:02 -0700
Subject: feat: support wasm-eval csp behind WebAssemblyCSP flag
This is a minimal backport of
https://chromium.googlesource.com/chromium/src/+/83913676803db53648b6a47d159102a7cf1dac36
The tracking issue in Chromium is
https://bugs.chromium.org/p/chromium/issues/detail?id=948834
diff --git a/third_party/blink/renderer/core/frame/csp/content_security_policy.cc b/third_party/blink/renderer/core/frame/csp/content_security_policy.cc
index 8b7360ea023691c9da089fe781410f82c55ed37e..c96f57f6ae5f0c4b0d9326ca43517cb778422251 100644
--- a/third_party/blink/renderer/core/frame/csp/content_security_policy.cc
+++ b/third_party/blink/renderer/core/frame/csp/content_security_policy.cc
@@ -293,7 +293,8 @@ ContentSecurityPolicy::DidReceiveHeaders(
const ContentSecurityPolicyResponseHeaders& headers) {
scoped_refptr<SecurityOrigin> self_origin =
SecurityOrigin::Create(headers.ResponseUrl());
- if (headers.ShouldParseWasmEval())
+ if (RuntimeEnabledFeatures::WebAssemblyCSPEnabled() ||
+ headers.ShouldParseWasmEval())
supports_wasm_eval_ = true;
Vector<network::mojom::blink::ContentSecurityPolicyPtr> parsed_policies;
diff --git a/third_party/blink/renderer/core/frame/csp/csp_directive_list.cc b/third_party/blink/renderer/core/frame/csp/csp_directive_list.cc
index 0312872536aca8ec4c2f57754b6d6836b00e75df..2a0fe27c2a2cc6a9bf5a56cedf129d98fa637957 100644
--- a/third_party/blink/renderer/core/frame/csp/csp_directive_list.cc
+++ b/third_party/blink/renderer/core/frame/csp/csp_directive_list.cc
@@ -625,10 +625,14 @@ bool CheckEval(const network::mojom::blink::CSPSourceList* directive) {
return !directive || directive->allow_eval;
}
+bool SupportsWasmEval(const ContentSecurityPolicy* policy) {
+ return RuntimeEnabledFeatures::WebAssemblyCSPEnabled() ||
+ policy->SupportsWasmEval();
+}
+
bool CheckWasmEval(const network::mojom::blink::CSPSourceList* directive,
const ContentSecurityPolicy* policy) {
- return !directive || directive->allow_eval ||
- (policy->SupportsWasmEval() && directive->allow_wasm_eval);
+ return !directive || (SupportsWasmEval(policy) && directive->allow_wasm_eval);
}
bool CheckHash(const network::mojom::blink::CSPSourceList* directive,
@@ -1091,9 +1095,9 @@ bool CSPDirectiveListAllowWasmCodeGeneration(
ContentSecurityPolicy::ExceptionStatus exception_status,
const String& content) {
if (reporting_disposition == ReportingDisposition::kReport) {
- String infix = policy->SupportsWasmEval()
- ? "neither 'wasm-eval' nor 'unsafe-eval' is"
- : "'unsafe-eval' is not";
+ String infix = SupportsWasmEval(policy)
+ ? "neither 'wasm-eval' nor 'unsafe-eval' is"
+ : "'unsafe-eval' is not";
return CheckWasmEvalAndReportViolation(
csp, policy,
"Refused to compile or instantiate WebAssembly module because " +
diff --git a/third_party/blink/renderer/core/frame/csp/source_list_directive.cc b/third_party/blink/renderer/core/frame/csp/source_list_directive.cc
index 17ae1426ef9662f6f640c36d8ae8bca8e443a15a..de93eb3cf7321e00351f5cfe1d7cde6635ce2b4d 100644
--- a/third_party/blink/renderer/core/frame/csp/source_list_directive.cc
+++ b/third_party/blink/renderer/core/frame/csp/source_list_directive.cc
@@ -403,10 +403,15 @@ bool ParseSource(const UChar* begin,
return true;
}
- if (policy->SupportsWasmEval() &&
- EqualIgnoringASCIICase("'wasm-eval'", token)) {
- source_list.allow_wasm_eval = true;
- return true;
+ // Temporarily behind a runtime feature
+ if (EqualIgnoringASCIICase("'wasm-eval'", token)) {
+ if (RuntimeEnabledFeatures::WebAssemblyCSPEnabled() ||
+ policy->SupportsWasmEval()) {
+ source_list.allow_wasm_eval = true;
+ return true;
+ } else {
+ return false;
+ }
}
if (EqualIgnoringASCIICase("'strict-dynamic'", token)) {
diff --git a/third_party/blink/renderer/platform/runtime_enabled_features.json5 b/third_party/blink/renderer/platform/runtime_enabled_features.json5
index 2447c80eece6fa84f01d4d84b136a7c6a799c696..6680e614b5985b6774e47472957a9b4ac2d50354 100644
--- a/third_party/blink/renderer/platform/runtime_enabled_features.json5
+++ b/third_party/blink/renderer/platform/runtime_enabled_features.json5
@@ -2146,6 +2146,9 @@
{
name: "WebAppWindowControlsOverlay",
},
+ {
+ name: "WebAssemblyCSP",
+ },
{
name: "WebAssemblyExceptions",
origin_trial_feature_name: "WebAssemblyExceptions",

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 01599517cc798843e50a7fe1c8d994c37b1cabf6..caa7048d51eeb43a4cfbbc75020e46e20b304898 100644
index 315c95a0ba24ea675d82f1d1b1840683c012de82..01709c0c3ed79dad8cacb1c7075d4dfba8dc6d84 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -367,6 +367,8 @@ class WebLocalFrame : public WebFrame {
@@ -368,6 +368,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 01599517cc798843e50a7fe1c8d994c37b1cabf6..caa7048d51eeb43a4cfbbc75020e46e2
// 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 f9e9ffead24fab0e5bf73f9a808aa07f30b4370a..e95e8d4e252b30a4f4a5ae16ca78737c48d9cca1 100644
index 88312a9f7742ab6b085f4deb42806cd7372497b2..f2fe0c14f7205a76f1efe09c710154b8efc2e213 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
@@ -1033,6 +1033,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
@@ -1037,6 +1037,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
return MainWorldScriptContext()->Global();
}
@@ -38,10 +38,10 @@ index f9e9ffead24fab0e5bf73f9a808aa07f30b4370a..e95e8d4e252b30a4f4a5ae16ca78737c
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 786f9dd51861cffd8869f2262104ec79c2066db4..7833167f3deda00f1ccd67b5904f51f6d9162a03 100644
index 44d642f4cf94000e42241ff5dafdabf4ed8fbafb..1000a606f1e5a7dea2705e0d35c9cfef8e48abfb 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
@@ -166,6 +166,8 @@ class CORE_EXPORT WebLocalFrameImpl final
v8::Local<v8::Context> MainWorldScriptContext() const override;
int32_t GetScriptContextWorldId(
v8::Local<v8::Context> script_context) const override;

View File

@@ -8,13 +8,13 @@ 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 ad3e86fb45ed6e115e62e89917fff8309a0e0705..c222819b9de97b988c9a2a49f971961e11665cad 100644
index 1a3fe9a570a1b40074396e988f376ed04e7e74ff..7087d21430e3692daf3579bf29558c650fc59fbb 100644
--- a/base/trace_event/builtin_categories.h
+++ b/base/trace_event/builtin_categories.h
@@ -73,6 +73,7 @@
@@ -75,6 +75,7 @@
X("drmcursor") \
X("dwrite") \
X("DXVA Decoding") \
X("DXVA_Decoding") \
+ X("electron") \
X("evdev") \
X("event") \

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 407ca1a239c1be1012f915721110597e81e75b29..acbde830ca61f9ead221f2ded656a2bd45091d23 100644
index 4bedf1ef1b3c642ff2839d0ad62caaedd1e1254f..ef5c81761df66c41fb8db575434280c4866d4f4a 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -123,6 +123,9 @@ if (current_os == "") {
@@ -27,7 +27,7 @@ index 407ca1a239c1be1012f915721110597e81e75b29..acbde830ca61f9ead221f2ded656a2bd
# 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
@@ -345,6 +348,7 @@ default_compiler_configs = [
@@ -336,6 +339,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/renderer_host/render_frame_host_impl.cc b/content/browser/renderer_host/render_frame_host_impl.cc
index b983f4399ceddacd050524eda2bc2936f94ae0e7..fb7b8fe6f89ffd61fa610f9085e5a9b0bbf9c379 100644
index f2d027d32e3cff2d1f0f03ed6c47ee689524ca1d..82dac3411b63e541d92b486f5e2108cce881b48e 100644
--- a/content/browser/renderer_host/render_frame_host_impl.cc
+++ b/content/browser/renderer_host/render_frame_host_impl.cc
@@ -5327,6 +5327,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -5312,6 +5312,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 b983f4399ceddacd050524eda2bc2936f94ae0e7..fb7b8fe6f89ffd61fa610f9085e5a9b0
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 0163353f96889cf405273e78bb3c7f87a0dbf6ac..d72a6ca4307a71d0f9dc8a8b4ce32e1dce305148 100644
index 4094a543f7cedb290658b63c1c2f6c91517b6020..18564b3c0adbc8ecb5c930609204be207edfd3ea 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3541,6 +3541,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
@@ -3637,6 +3637,14 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
}
auto* new_contents_impl = new_contents.get();
@@ -39,8 +39,8 @@ index 0163353f96889cf405273e78bb3c7f87a0dbf6ac..d72a6ca4307a71d0f9dc8a8b4ce32e1d
new_contents_impl->GetController().SetSessionStorageNamespace(
partition_id, session_storage_namespace);
@@ -3582,12 +3590,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
AddDestructionObserver(new_contents_impl);
@@ -3679,12 +3687,6 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
AddWebContentsDestructionObserver(new_contents_impl);
}
- if (delegate_) {
@@ -53,10 +53,10 @@ index 0163353f96889cf405273e78bb3c7f87a0dbf6ac..d72a6ca4307a71d0f9dc8a8b4ce32e1d
new_contents_impl, opener, params.target_url,
params.referrer.To<Referrer>(), params.disposition,
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 3530150bfcb34ceb1f7ae5f17808d0a07cb3d866..330906dd0518b1fb46872e3f62ecd4bfe459294c 100644
index 7f26f6ed0861bc5a351123feddddd10b479409f3..bfd5c4aca4b3c23ee092788eb97bf5dfe00ad944 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -324,6 +324,10 @@ struct CreateNewWindowParams {
@@ -528,6 +528,10 @@ struct CreateNewWindowParams {
// The impression associated with the navigation in the new window, if
// one is specified.
Impression? impression;
@@ -68,10 +68,10 @@ index 3530150bfcb34ceb1f7ae5f17808d0a07cb3d866..330906dd0518b1fb46872e3f62ecd4bf
// 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 adc83e8b9ba01d830362c3236a22fe09684ceaf8..e3088a155d552c87f009cec282f32730d9cb3655 100644
index 4516cea37427a933e961e1e646dfa1b685b6acc1..8d899d675d0eca0856269e9887371a6f633ef767 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -554,6 +554,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -552,6 +552,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -81,10 +81,10 @@ index adc83e8b9ba01d830362c3236a22fe09684ceaf8..e3088a155d552c87f009cec282f32730
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 b579683053c37211f68e75a36997a63341ac4103..ecd1d367a7634e377bffbe7590d2c21b49a56e93 100644
index fedf85bfac89c9372b0fd48e908b1c73da92c0ee..52a300a553742469ad7eea7ccb85e5e9988363b7 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -154,6 +154,7 @@ class NetworkService;
@@ -158,6 +158,7 @@ class NetworkService;
class TrustedURLLoaderHeaderClient;
} // namespace mojom
struct ResourceRequest;
@@ -92,7 +92,7 @@ index b579683053c37211f68e75a36997a63341ac4103..ecd1d367a7634e377bffbe7590d2c21b
} // namespace network
namespace sandbox {
@@ -903,6 +904,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -910,6 +911,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -102,7 +102,7 @@ index b579683053c37211f68e75a36997a63341ac4103..ecd1d367a7634e377bffbe7590d2c21b
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 11ff10f2f8a1479f045be6295d7fe7476eb3a28a..bf8e1830f3a394b611e592a1cdfc60c0f8bbcaca 100644
index ba416aebd7936d5cf7f890d071acf503765b47f6..412fa31a6fb853eb757e19e64efb0829753faed9 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -27,6 +27,17 @@ namespace content {
@@ -124,19 +124,19 @@ index 11ff10f2f8a1479f045be6295d7fe7476eb3a28a..bf8e1830f3a394b611e592a1cdfc60c0
const OpenURLParams& params) {
return nullptr;
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 39349ef0c0223f632bddd3b82fd6055344af9fb4..6aba9de130ed9abd81ecc7cae370ed5b5f2fa188 100644
index 96c3b9e9b7e10af7103c5ac85422ffcd10bbe5db..4982f8d2641c3d3162db4f553f3b6726d1bc3593 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -17,6 +17,7 @@
#include "base/strings/string16.h"
@@ -16,6 +16,7 @@
#include "base/memory/scoped_refptr.h"
#include "build/build_config.h"
#include "content/common/content_export.h"
+#include "content/common/frame.mojom.h"
#include "content/public/browser/eye_dropper.h"
#include "content/public/browser/invalidate_type.h"
#include "content/public/browser/media_stream_request.h"
@@ -337,6 +338,13 @@ class CONTENT_EXPORT WebContentsDelegate {
const std::string& partition_id,
@@ -340,6 +341,13 @@ class CONTENT_EXPORT WebContentsDelegate {
const StoragePartitionId& partition_id,
SessionStorageNamespace* session_storage_namespace);
+ virtual void WebContentsCreatedWithFullParams(
@@ -150,7 +150,7 @@ index 39349ef0c0223f632bddd3b82fd6055344af9fb4..6aba9de130ed9abd81ecc7cae370ed5b
// 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 62c54d7c23ba2d918e7fd013d28424335f83278a..050ffabf4078b93d36d2da691644697c14eb85dc 100644
index 43924d90b41a349bc496d6ca940c1c9963d2773c..2840883471055f0b09ecbc18d301e1b5de8b3d5a 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -28,6 +28,7 @@
@@ -161,7 +161,7 @@ index 62c54d7c23ba2d918e7fd013d28424335f83278a..050ffabf4078b93d36d2da691644697c
#include "third_party/blink/public/web/modules/mediastream/web_media_stream_device_observer.h"
#include "third_party/blink/public/web/web_frame_widget.h"
#include "third_party/blink/public/web/web_local_frame.h"
@@ -381,6 +382,10 @@ WebView* RenderViewImpl::CreateView(
@@ -344,6 +345,10 @@ WebView* RenderViewImpl::CreateView(
params->impression = blink::ConvertWebImpressionToImpression(*impression);
}
@@ -173,10 +173,10 @@ index 62c54d7c23ba2d918e7fd013d28424335f83278a..050ffabf4078b93d36d2da691644697c
// moved on send.
bool is_background_tab =
diff --git a/content/web_test/browser/web_test_content_browser_client.cc b/content/web_test/browser/web_test_content_browser_client.cc
index 6450bbe41aeb2fd3a43c6731390efcffc753064d..842408de6bff1c3e4be7bbfbc0e1affa6a7af8a3 100644
index 5b9926d436d85f4019a4311d247f24ca44cde192..e4f8517948ec79c6ceb0571c625cbe80cef1651d 100644
--- a/content/web_test/browser/web_test_content_browser_client.cc
+++ b/content/web_test/browser/web_test_content_browser_client.cc
@@ -442,6 +442,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -443,6 +443,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -186,7 +186,7 @@ index 6450bbe41aeb2fd3a43c6731390efcffc753064d..842408de6bff1c3e4be7bbfbc0e1affa
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/web_test/browser/web_test_content_browser_client.h b/content/web_test/browser/web_test_content_browser_client.h
index 08b5a0fd69b2ba2364e90fa66342880e4f284671..8ea32fadf0962ce87de5f107e5c0996684d5d2b7 100644
index c65d30c9187dd275488ed74bcc3a4eb918d2cbce..e4c6c828150e91f555b1b42e1988a1013ab1a1f0 100644
--- a/content/web_test/browser/web_test_content_browser_client.h
+++ b/content/web_test/browser/web_test_content_browser_client.h
@@ -83,6 +83,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
@@ -221,10 +221,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 17e2e87e0ceef4c1cfba34ba8f3ee222ac8b4ca1..0d7dc9553c24d67b0ff25fa86260689cfeff5bbe 100644
index e4f5968c7917f932a52f23efb08c3bfd7aec6d2f..7fb0c57f3e6a6668acb99e47cf46b22d2cbe0f3a 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -2019,6 +2019,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -2015,6 +2015,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
}
WebWindowFeatures window_features = GetWindowFeaturesFromString(features);

View File

@@ -9,7 +9,7 @@ we're running with contextIsolation enabled, we should be falling back
to Blink's logic. This will be upstreamed in some form.
diff --git a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
index e2213b00d73f399bb14b7edfa0fb719aa12a6be5..363f9e7a823864f67faa7ce9ec6fd914f371652e 100644
index 42cdbc706a33792859fece7741846c4cc922008a..27c5a49f539ba438d3e58fc3a4cadb116d440c24 100644
--- a/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
+++ b/third_party/blink/renderer/bindings/core/v8/v8_initializer.cc
@@ -450,7 +450,7 @@ CodeGenerationCheckCallbackInMainThread(v8::Local<v8::Context> context,

View File

@@ -35,7 +35,7 @@ index 5b4d70991e19edcdfee731c56251932bf43e535f..fe1977c5e6ce0f5b30e8be529b9efa51
#endif // CHROME_BROWSER_ANDROID_DOCUMENT_DOCUMENT_WEB_CONTENTS_DELEGATE_H_
diff --git a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
index 46322975b9eed687569df3f89f6503513caffbcd..f196c0cf671a4969015219478c58c3a175b70832 100644
index 8642c20123ec62fd6c90c8945d78bc3e04116c5b..f33ad843cc4b602c0e3312be426b81a0332afe66 100644
--- a/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
+++ b/chrome/browser/chromeos/first_run/drive_first_run_controller.cc
@@ -123,8 +123,7 @@ class DriveWebContentsManager : public content::WebContentsObserver,
@@ -95,7 +95,7 @@ index fb09bf2c5d22e3838575403b53867d0021e13b67..36e7982bbcc7c8b50bb2942ada39862b
content::RenderFrameHost* requesting_frame,
const blink::mojom::FullscreenOptions& options) final;
diff --git a/chrome/browser/ui/ash/assistant/assistant_web_view_impl.cc b/chrome/browser/ui/ash/assistant/assistant_web_view_impl.cc
index 672d5d41e33178ed6c6f62156e69b1adaf099fe8..4c0f8db8a9c40c34df8abfa89d88b0ceaef76392 100644
index e4f3632c84ebe4dcbbc3deb2f49e351c75ec93fd..58902fdaf316ad371ddb3e79e6ebc74cbbafc138 100644
--- a/chrome/browser/ui/ash/assistant/assistant_web_view_impl.cc
+++ b/chrome/browser/ui/ash/assistant/assistant_web_view_impl.cc
@@ -77,10 +77,9 @@ bool AssistantWebViewImpl::IsWebContentsCreationOverridden(
@@ -126,10 +126,10 @@ index 07014765f33bdddebcc5bc32a2713d6523faf394..f866f69f9c810d89f1a0e9e4952293f6
content::WebContents* source,
const content::OpenURLParams& params) override;
diff --git a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
index dc7f3bc886e7130c66d98ae6de73c17db746cbe5..6197db3570c860f39f381370e1af37f86a0785ea 100644
index 33f1168f834d138aefb190b7718271d6962b3532..aeb30a22349e0682586bd1bad20dc5e21fd0b08d 100644
--- a/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
+++ b/chrome/browser/ui/ash/keyboard/chrome_keyboard_web_contents.cc
@@ -64,8 +64,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
@@ -65,8 +65,7 @@ class ChromeKeyboardContentsDelegate : public content::WebContentsDelegate,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -140,10 +140,10 @@ index dc7f3bc886e7130c66d98ae6de73c17db746cbe5..6197db3570c860f39f381370e1af37f8
}
diff --git a/chrome/browser/ui/browser.cc b/chrome/browser/ui/browser.cc
index da9ba4c8de7c30842ad397c4307220ddcbd05c1f..6937a1a08a3a784399bf233c70ebca13322f7147 100644
index 19ca9ee265876d2d33ced262be84cda1d056372c..b41c489a683995c3aa582d7eccbabe679b5cbb46 100644
--- a/chrome/browser/ui/browser.cc
+++ b/chrome/browser/ui/browser.cc
@@ -1793,12 +1793,11 @@ bool Browser::IsWebContentsCreationOverridden(
@@ -1769,12 +1769,11 @@ bool Browser::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -159,10 +159,10 @@ index da9ba4c8de7c30842ad397c4307220ddcbd05c1f..6937a1a08a3a784399bf233c70ebca13
WebContents* Browser::CreateCustomWebContents(
diff --git a/chrome/browser/ui/browser.h b/chrome/browser/ui/browser.h
index 47fee21d0f5a7f68e9debd613e50cdbe03bf7656..1511ed77d9ee90ba27a4731f978f5073b7af0a38 100644
index f1c66751bff73836e58c6550f16dba060b88bd8d..94550c33ac0c84cbc37e30a4a569098af20520ab 100644
--- a/chrome/browser/ui/browser.h
+++ b/chrome/browser/ui/browser.h
@@ -788,8 +788,7 @@ class Browser : public TabStripModelObserver,
@@ -795,8 +795,7 @@ class Browser : public TabStripModelObserver,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -201,7 +201,7 @@ index 058ec72442d59989c4d6df4a7c791ecfeff0ef99..f7c8c2139382cb2e290c561624291afe
// The profile used for the presentation.
Profile* otr_profile_;
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.cc b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
index e8cee3297c218cd86b1200003e574c3713ab7afe..48216c9fccf1452f869fcfb24ba5206798c4c4e6 100644
index bf69ad20f61b6928b1a65edef324577dcc6af689..82050776a23fa7b6af4b27bd28325c10f75c5fb7 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.cc
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.cc
@@ -168,14 +168,13 @@ bool WebContentsDelegateAndroid::IsWebContentsCreationOverridden(
@@ -222,7 +222,7 @@ index e8cee3297c218cd86b1200003e574c3713ab7afe..48216c9fccf1452f869fcfb24ba52067
java_gurl);
}
diff --git a/components/embedder_support/android/delegate/web_contents_delegate_android.h b/components/embedder_support/android/delegate/web_contents_delegate_android.h
index 348c65a323c6104030f50e1336ccbd9ada9e7628..c7d6a0041de46784bb28146d5ffd53ded3e5685d 100644
index cf50204a6aeb099d25dc41d4180f8a1e32a63eda..642e88a4de3044173423fae5bfe2e30ef442f366 100644
--- a/components/embedder_support/android/delegate/web_contents_delegate_android.h
+++ b/components/embedder_support/android/delegate/web_contents_delegate_android.h
@@ -78,8 +78,7 @@ class WebContentsDelegateAndroid : public content::WebContentsDelegate {
@@ -264,10 +264,10 @@ index c5c5a7b63b5b3b62a9517cbef3ae23ce57a3c89c..4f1b7e88d6d2ae89a60311c8aeb1fcee
void AddNewContents(content::WebContents* source,
std::unique_ptr<content::WebContents> new_contents,
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 39ef587971d4c171fb5878efb7a94c3523b4b80c..14f3ebdc6fe53f8e4a9b3d6ec8d7a8875a20c392 100644
index cee5507c240fb859420eb74326e67c444c3a127c..3311b6110666851b3946ebf8071f210752425695 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -3493,8 +3493,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
@@ -3589,8 +3589,7 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
if (delegate_ && delegate_->IsWebContentsCreationOverridden(
source_site_instance, params.window_container_type,
@@ -278,10 +278,10 @@ index 39ef587971d4c171fb5878efb7a94c3523b4b80c..14f3ebdc6fe53f8e4a9b3d6ec8d7a887
opener, source_site_instance, is_new_browsing_instance,
opener->GetLastCommittedURL(), params.frame_name, params.target_url,
diff --git a/content/public/browser/web_contents_delegate.cc b/content/public/browser/web_contents_delegate.cc
index bf8e1830f3a394b611e592a1cdfc60c0f8bbcaca..12f8b5b86311eef6c9025bb170111a9334bab455 100644
index 412fa31a6fb853eb757e19e64efb0829753faed9..1378593a48932b8272bafbe70c4797befdc32f02 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -139,8 +139,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
@@ -135,8 +135,7 @@ bool WebContentsDelegate::IsWebContentsCreationOverridden(
SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -292,10 +292,10 @@ index bf8e1830f3a394b611e592a1cdfc60c0f8bbcaca..12f8b5b86311eef6c9025bb170111a93
}
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 6aba9de130ed9abd81ecc7cae370ed5b5f2fa188..d19b7ba1cbb686f72ce6989052e5f91d54a086e6 100644
index 4982f8d2641c3d3162db4f553f3b6726d1bc3593..87e11c21bd4a6f07f2897e0027b47f3e74d6e192 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -316,8 +316,7 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -319,8 +319,7 @@ class CONTENT_EXPORT WebContentsDelegate {
SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -306,7 +306,7 @@ index 6aba9de130ed9abd81ecc7cae370ed5b5f2fa188..d19b7ba1cbb686f72ce6989052e5f91d
// Allow delegate to creates a custom WebContents when
// WebContents::CreateNewWindow() is called. This function is only called
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.cc b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
index bda659c7a464a58413e7eb33a897065268ab3fc6..29950878aca7f1518265561dea79b78d82230982 100644
index 5f49edfabed15d691dc6cc7b17896165297735a7..d64baa43afcf5a0f87797995b84b60d84e1f05a2 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.cc
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.cc
@@ -212,8 +212,7 @@ bool ExtensionOptionsGuest::IsWebContentsCreationOverridden(
@@ -320,7 +320,7 @@ index bda659c7a464a58413e7eb33a897065268ab3fc6..29950878aca7f1518265561dea79b78d
// view is used for displaying embedded extension options, we want any
// external links to be opened in a new tab, not in a new guest view so we
diff --git a/extensions/browser/guest_view/extension_options/extension_options_guest.h b/extensions/browser/guest_view/extension_options/extension_options_guest.h
index 97273c32a05acf325fd0de22c4f79c1746aa23bc..4b357acd069387963347d35d82371b955147893f 100644
index 9b293d0df6c634bf44a69d607c4eee839a74b4a1..7e5b9cbdcc232c5e20eae0130d800f508411b827 100644
--- a/extensions/browser/guest_view/extension_options/extension_options_guest.h
+++ b/extensions/browser/guest_view/extension_options/extension_options_guest.h
@@ -55,8 +55,7 @@ class ExtensionOptionsGuest
@@ -334,10 +334,10 @@ index 97273c32a05acf325fd0de22c4f79c1746aa23bc..4b357acd069387963347d35d82371b95
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
index 8f4c53f3f3cae0efb507b9c8951e5e50883d5dc7..9239b5da0adb3a55c37b41a4b06d2a8ca0b88659 100644
index f3b8095088310c0811d33904bc400a4ff8c60323..c5398f93dedef93b71e64af3a2d9f2c011245b8d 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.cc
@@ -381,8 +381,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
@@ -379,8 +379,7 @@ bool MimeHandlerViewGuest::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -348,10 +348,10 @@ index 8f4c53f3f3cae0efb507b9c8951e5e50883d5dc7..9239b5da0adb3a55c37b41a4b06d2a8c
}
diff --git a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
index d9e22ce31927da93f38f6a5a153222f91580f2c2..e6c8be2ad8175cd4a5b00e69f5072ff359ad862a 100644
index 17f911eef902bd5f30c852c1f517f4c1dd22c5b0..be333612ef35a8f43e66f3ca181bd573dd40791b 100644
--- a/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
+++ b/extensions/browser/guest_view/mime_handler_view/mime_handler_view_guest.h
@@ -155,8 +155,7 @@ class MimeHandlerViewGuest
@@ -157,8 +157,7 @@ class MimeHandlerViewGuest
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -362,7 +362,7 @@ index d9e22ce31927da93f38f6a5a153222f91580f2c2..e6c8be2ad8175cd4a5b00e69f5072ff3
content::RenderFrameHost* opener,
content::SiteInstance* source_site_instance,
diff --git a/fuchsia/engine/browser/frame_impl.cc b/fuchsia/engine/browser/frame_impl.cc
index 3219179bf421a5d6056837c1c2b492a9ce008516..8b39bf68cfe789dee1398a200671ceac006a7de0 100644
index f50f4343ed5a487538ef9ce819cd19300623a3dd..282bca34f82e5a3b27bc66f0cab494e388f35b9e 100644
--- a/fuchsia/engine/browser/frame_impl.cc
+++ b/fuchsia/engine/browser/frame_impl.cc
@@ -372,8 +372,7 @@ bool FrameImpl::IsWebContentsCreationOverridden(
@@ -376,7 +376,7 @@ index 3219179bf421a5d6056837c1c2b492a9ce008516..8b39bf68cfe789dee1398a200671ceac
// can catch bad client behavior while not interfering with normal operation.
constexpr size_t kMaxPendingWebContentsCount = 10;
diff --git a/fuchsia/engine/browser/frame_impl.h b/fuchsia/engine/browser/frame_impl.h
index d6f69a298932496ed5fe29ee2ae43e35503476d4..656abba62cc533f8b8805ce4c9b5e782156aa6ed 100644
index 429c3b508ea698dc286676a84b6a3817eb14b553..03a610610cbb120e4a9c367bbb074050365cc04f 100644
--- a/fuchsia/engine/browser/frame_impl.h
+++ b/fuchsia/engine/browser/frame_impl.h
@@ -234,8 +234,7 @@ class FrameImpl : public fuchsia::web::Frame,
@@ -390,10 +390,10 @@ index d6f69a298932496ed5fe29ee2ae43e35503476d4..656abba62cc533f8b8805ce4c9b5e782
int opener_render_process_id,
int opener_render_frame_id,
diff --git a/headless/lib/browser/headless_web_contents_impl.cc b/headless/lib/browser/headless_web_contents_impl.cc
index e9c7b85e6b62960e7618a5b727e3ae43dd62e8c9..909d2c126efc4efee31e7014666d921d038fbaef 100644
index 4fdbf1c7030bb2b3765780d1e8c5a502679745de..5b59ce27eaa03897e5cbb3115b485a3ea931e871 100644
--- a/headless/lib/browser/headless_web_contents_impl.cc
+++ b/headless/lib/browser/headless_web_contents_impl.cc
@@ -197,8 +197,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
@@ -198,8 +198,7 @@ class HeadlessWebContentsImpl::Delegate : public content::WebContentsDelegate {
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -404,10 +404,10 @@ index e9c7b85e6b62960e7618a5b727e3ae43dd62e8c9..909d2c126efc4efee31e7014666d921d
->options()
->block_new_web_contents();
diff --git a/ui/views/controls/webview/web_dialog_view.cc b/ui/views/controls/webview/web_dialog_view.cc
index 39a58363e717a0b9d71b7e3ca26578f81f8fb453..4372cf1e383ef3884048fb2a06c72888abcac9e3 100644
index 2315e34e4c9cb60fee248c71e44984f68f1462d3..49a165ac686f611d8a982bf0b5481504e824b5a6 100644
--- a/ui/views/controls/webview/web_dialog_view.cc
+++ b/ui/views/controls/webview/web_dialog_view.cc
@@ -427,8 +427,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
@@ -431,8 +431,7 @@ bool WebDialogView::IsWebContentsCreationOverridden(
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,
@@ -418,10 +418,10 @@ index 39a58363e717a0b9d71b7e3ca26578f81f8fb453..4372cf1e383ef3884048fb2a06c72888
return delegate_->HandleShouldOverrideWebContentsCreation();
return false;
diff --git a/ui/views/controls/webview/web_dialog_view.h b/ui/views/controls/webview/web_dialog_view.h
index 97142bc886e1bbf05871fb6603342ed0cd15dcf8..94206bb4674e696093a5cfc027281254c3bf37ff 100644
index dadead3378af8b756b37b4efc58bee0aa121751f..62ac39757774de85e3ab2ec62c929e70993ebcf2 100644
--- a/ui/views/controls/webview/web_dialog_view.h
+++ b/ui/views/controls/webview/web_dialog_view.h
@@ -153,8 +153,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
@@ -160,8 +160,7 @@ class WEBVIEW_EXPORT WebDialogView : public ClientView,
content::SiteInstance* source_site_instance,
content::mojom::WindowContainerType window_container_type,
const GURL& opener_url,

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 68eacfbade049e2f82cb09dcb2b6944c5a200997..849bb1d3f2deb7ab89a774f61125aadf1b6fc769 100644
index de3b455eded016ac567d5716ad9de60ab66f201c..93d5497b47f47a2ae66942ff6af240a5051d5c11 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -6216,6 +6216,7 @@ static_library("browser") {
@@ -6233,6 +6233,7 @@ static_library("browser") {
deps += [
"//components/spellcheck/browser",
"//components/spellcheck/common",
@@ -44,7 +44,7 @@ index 41761e18716a7d9221511978dc4582a1804920e2..faea3d936c678e31fa29b93ae1ccd976
]
}
diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc
index c14811efa87b223729d37695d86f858dd8f366ee..444c8273e4985f7e276ad0dd0fd001b027bc0d47 100644
index fc220d8c9f297268e7e480bb518d2de0d3dd9e4f..18e27d61fab8919969756129de1f61f55790cc88 100644
--- a/components/language/core/browser/language_prefs.cc
+++ b/components/language/core/browser/language_prefs.cc
@@ -21,7 +21,7 @@

View File

@@ -7,10 +7,10 @@ Disable persiste licence support check for widevine cdm,
as its not supported in the current version of chrome.
diff --git a/chrome/renderer/media/chrome_key_systems.cc b/chrome/renderer/media/chrome_key_systems.cc
index 21606970e534c73c791ee8e11d767939c334d37a..0c6671dd5175540fcb727cb4c44ed3bffbaaf555 100644
index 11ab5f846976418badb6ad062588b781aa6142dd..aa372535b7342a01e2b0732148b56ca4d1b846de 100644
--- a/chrome/renderer/media/chrome_key_systems.cc
+++ b/chrome/renderer/media/chrome_key_systems.cc
@@ -16,7 +16,9 @@
@@ -15,7 +15,9 @@
#include "base/strings/utf_string_conversions.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
@@ -20,7 +20,7 @@ index 21606970e534c73c791ee8e11d767939c334d37a..0c6671dd5175540fcb727cb4c44ed3bf
#include "components/cdm/renderer/external_clear_key_key_system_properties.h"
#include "components/cdm/renderer/widevine_key_system_properties.h"
#include "content/public/renderer/render_thread.h"
@@ -201,12 +203,14 @@ static SupportedCodecs GetSupportedCodecs(
@@ -202,12 +204,14 @@ static SupportedCodecs GetSupportedCodecs(
// Returns persistent-license session support.
static EmeSessionTypeSupport GetPersistentLicenseSupport(
bool supported_by_the_cdm) {

View File

@@ -46,10 +46,10 @@ index e1c49f5cd9bd249398a14905a6fb41d54238e1ec..ad1c76e77e029d759547f6aded492ae6
} // namespace
diff --git a/content/browser/media/media_keys_listener_manager_impl.cc b/content/browser/media/media_keys_listener_manager_impl.cc
index 87e716364fbd154b139cf6818b0113fef9b319e0..7d3e95cad07354ec71ae9643b2af5820e8807c9a 100644
index 4145418210c2b1033390ec8a2e657cb1fcd048f8..5938f75742b793868638e693a9a8c8dc686dfc46 100644
--- a/content/browser/media/media_keys_listener_manager_impl.cc
+++ b/content/browser/media/media_keys_listener_manager_impl.cc
@@ -286,6 +286,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() {
@@ -290,6 +290,11 @@ void MediaKeysListenerManagerImpl::UpdateSystemMediaControlsEnabledControls() {
case ui::VKEY_MEDIA_STOP:
system_media_controls_->SetIsStopEnabled(should_enable);
break;

View File

@@ -8,10 +8,10 @@ run before shutdown. This is required to cleanup WebContents asynchronously
in electron::api::WebContents::ResetManagedWebContents.
diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc
index 5c3c8e53064c1f812ce16798737493de2d83e130..3b7e379c749244ce9d9af466ec45ffe66366d63c 100644
index 72693b82f5c4bcd0b5151e97820ec2de9662670c..dba51b8cdd420f8fecc45dff2a92a3110435c737 100644
--- a/content/browser/browser_main_loop.cc
+++ b/content/browser/browser_main_loop.cc
@@ -1405,7 +1405,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
@@ -1413,7 +1413,7 @@ void BrowserMainLoop::MainMessageLoopRun() {
NOTREACHED();
#else
base::RunLoop run_loop;

View File

@@ -21,10 +21,10 @@ index 9e850c0380b8a856dace5f68c80dd11a5b95a671..76993a9ec8dcd6c69cf3e58c49838264
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 1d0fb4f2a633fa5ddbe232ce19d716c22be78a37..5b81608d6e90f62f435302a53976fb18bbbf9e98 100644
index 89b4bfccd5d3278231726184547378805fb30ed5..9f0cb9d52e2f7fc0c1808500b775bc28b4514d00 100644
--- a/components/crash/core/app/crash_reporter_client.cc
+++ b/components/crash/core/app/crash_reporter_client.cc
@@ -140,6 +140,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
@@ -139,6 +139,17 @@ bool CrashReporterClient::ReportingIsEnforcedByPolicy(bool* breakpad_enabled) {
return false;
}
@@ -43,7 +43,7 @@ index 1d0fb4f2a633fa5ddbe232ce19d716c22be78a37..5b81608d6e90f62f435302a53976fb18
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 aaa9ad1d58d7f584cbf391e0cb0a61a0d25d5c69..5b02834b5ecaf4bcb7e051d9ee98cd5eb087b4fc 100644
index 39557cce474439238255ecd28030215085db0c81..5b3f980837911c710686ab91a2a81c318334080b 100644
--- a/components/crash/core/app/crash_reporter_client.h
+++ b/components/crash/core/app/crash_reporter_client.h
@@ -5,6 +5,7 @@
@@ -53,8 +53,8 @@ index aaa9ad1d58d7f584cbf391e0cb0a61a0d25d5c69..5b02834b5ecaf4bcb7e051d9ee98cd5e
+#include <map>
#include <string>
#include "base/strings/string16.h"
@@ -145,6 +146,19 @@ class CrashReporterClient {
#include "build/build_config.h"
@@ -144,6 +145,19 @@ class CrashReporterClient {
// that case, |breakpad_enabled| is set to the value enforced by policies.
virtual bool ReportingIsEnforcedByPolicy(bool* breakpad_enabled);
@@ -102,7 +102,7 @@ index eb675321436a53e82432144d43f258bed6e938e2..ae2032a12eac7c789d790e53857d11ba
arguments.push_back("--monitor-self");
}
diff --git a/components/crash/core/app/crashpad_win.cc b/components/crash/core/app/crashpad_win.cc
index c199b467ffeb007f3098ccde6879fbd71e9ec9fd..a2007514e799b77fa15cbc178d38594e4d847caa 100644
index c66a6dfc6f5ddaae7bf4ceb2f8c80af579255379..9fe127f1f67cb676492d101db21b6936efa86416 100644
--- a/components/crash/core/app/crashpad_win.cc
+++ b/components/crash/core/app/crashpad_win.cc
@@ -84,6 +84,7 @@ base::FilePath PlatformCrashpadInitialization(

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/renderer_host/navigation_controller_impl.cc b/content/browser/renderer_host/navigation_controller_impl.cc
index 12f5a1a1282b8790f21185c926f438fa4fc7499e..e10b228fb8145f0daa91948c98ba0e8ab8a8f049 100644
index 21601429c56fc374da8826cb68361ff0de56ac55..9b27a4ff1abac2b104f0ac16c9ed2e3518279d84 100644
--- a/content/browser/renderer_host/navigation_controller_impl.cc
+++ b/content/browser/renderer_host/navigation_controller_impl.cc
@@ -1313,8 +1313,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
@@ -1336,8 +1336,10 @@ NavigationType NavigationControllerImpl::ClassifyNavigation(
return NAVIGATION_TYPE_NEW_SUBFRAME;
}
@@ -33,7 +33,7 @@ index 12f5a1a1282b8790f21185c926f438fa4fc7499e..e10b228fb8145f0daa91948c98ba0e8a
if (rfh->GetParent()) {
// All manual subframes would be did_create_new_entry and handled above, so
@@ -1604,7 +1606,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewEntry(
@@ -1629,7 +1631,10 @@ void NavigationControllerImpl::RendererDidNavigateToNewEntry(
new_entry->GetFavicon() = GetLastCommittedEntry()->GetFavicon();
}
@@ -46,10 +46,10 @@ index 12f5a1a1282b8790f21185c926f438fa4fc7499e..e10b228fb8145f0daa91948c98ba0e8a
// navigation. Now we know that the renderer has updated its state accordingly
// and it is safe to also clear the browser side history.
diff --git a/ui/base/clipboard/clipboard_win.cc b/ui/base/clipboard/clipboard_win.cc
index 344b847b0e272ed999cf9a58418f5857491f678c..b0191ba503f7206ee5432e4ccd0a5d62441419db 100644
index 0763e37f028a708c6e739458ec4c87c406e79b46..2d238fde0a1eb3f22fd52cbad3b12d704af2e8ae 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -817,10 +817,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
@@ -924,10 +924,10 @@ SkBitmap ClipboardWin::ReadImageInternal(ClipboardBuffer buffer) const {
void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
UINT cf_format = format.ToFormatEtc().cfFormat;

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 829cf04246cc1dbb6a3a3ca826a652d09e990d71..cfa37c3311a888d50e0918fcf80e0b0e36db7b24 100644
index e49304a95fdb71565f61d8d1eb27de365e450eb9..2cf621a173d9c10a20e802ee44fbaa1d364f67e9 100644
--- a/content/app/content_main_runner_impl.cc
+++ b/content/app/content_main_runner_impl.cc
@@ -648,7 +648,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
@@ -722,7 +722,7 @@ int ContentMainRunnerImpl::Initialize(const ContentMainParams& params) {
}
#endif
@@ -68,12 +68,12 @@ index 3038f9d25798f36811b6398f8cc0e7d83ecc41b0..68189c36c47ef85b345b0ccc40c456f8
// Re-initializes schemes for tests.
CONTENT_EXPORT void ReRegisterContentSchemesForTests();
diff --git a/content/public/app/content_main_delegate.cc b/content/public/app/content_main_delegate.cc
index e6379748886956da819523200aa35f8f95d523ee..46110a92ba9849112889f3e93c1dccbbd4911dda 100644
index 17d256b852b6e7615cf4e52e4a2d7fa326a4df44..bd0512902df4484e8714cda9ab1352b1c672a1cd 100644
--- a/content/public/app/content_main_delegate.cc
+++ b/content/public/app/content_main_delegate.cc
@@ -36,6 +36,10 @@ int ContentMainDelegate::TerminateForFatalInitializationError() {
return 0;
@@ -42,6 +42,10 @@ bool ContentMainDelegate::ShouldHandleConsoleControlEvents() {
}
#endif
+bool ContentMainDelegate::ShouldLockSchemeRegistry() {
+ return true;
@@ -83,7 +83,7 @@ index e6379748886956da819523200aa35f8f95d523ee..46110a92ba9849112889f3e93c1dccbb
return true;
}
diff --git a/content/public/app/content_main_delegate.h b/content/public/app/content_main_delegate.h
index abb46995385fccddf8363296fb0253624a4111c7..715d0818c03cfa7e5b9877b3ab83d1488f2f040f 100644
index 4162083f789b6cf5e29e52e4bd498c377cab1a20..d6010bc0e4dba560d10c3ed4729d77b5a60eddcd 100644
--- a/content/public/app/content_main_delegate.h
+++ b/content/public/app/content_main_delegate.h
@@ -65,6 +65,20 @@ class CONTENT_EXPORT ContentMainDelegate {

View File

@@ -7,10 +7,10 @@ Subject: desktop_media_list.patch
* Free the one-time use capturer after thumbnails are fetched
diff --git a/chrome/browser/media/webrtc/desktop_media_list.h b/chrome/browser/media/webrtc/desktop_media_list.h
index a489bf6ea2179059f53e53563e993db9c7cd123b..93e237569fe94ec8526f67d915e1a7352d586b16 100644
index d7b52b0d1b8cfb823513303ec0f6322d8dc8d153..f2dbf39f81abfc6fde4064345ab0d222ee98438c 100644
--- a/chrome/browser/media/webrtc/desktop_media_list.h
+++ b/chrome/browser/media/webrtc/desktop_media_list.h
@@ -38,6 +38,9 @@ class DesktopMediaList {
@@ -52,6 +52,9 @@ class DesktopMediaList {
virtual ~DesktopMediaList() {}
@@ -20,21 +20,21 @@ index a489bf6ea2179059f53e53563e993db9c7cd123b..93e237569fe94ec8526f67d915e1a735
// Sets time interval between updates. By default list of sources and their
// thumbnail are updated once per second. If called after StartUpdating() then
// it will take effect only after the next update.
@@ -69,6 +72,7 @@ class DesktopMediaList {
@@ -83,6 +86,7 @@ class DesktopMediaList {
virtual int GetSourceCount() const = 0;
virtual const Source& GetSource(int index) const = 0;
+ virtual const std::vector<Source>& GetSources() const = 0;
virtual content::DesktopMediaID::Type GetMediaListType() const = 0;
virtual Type GetMediaListType() const = 0;
};
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.cc b/chrome/browser/media/webrtc/desktop_media_list_base.cc
index 147d5be9f7f56fb71468b56e86eb33b59d51cd66..5930fe95e33a9e5a3108c31e8c34daa9c724511c 100644
index a3e1de40e843b5450f417a0455e0e7d7dee1d1bd..2f7f96a5d56d503fc231ca3c96be243cf7cbb389 100644
--- a/chrome/browser/media/webrtc/desktop_media_list_base.cc
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.cc
@@ -20,6 +20,11 @@ DesktopMediaListBase::DesktopMediaListBase(base::TimeDelta update_period)
@@ -24,6 +24,11 @@ DesktopMediaListBase::DesktopMediaListBase(base::TimeDelta update_period,
DesktopMediaListBase::~DesktopMediaListBase() {}
DesktopMediaListBase::~DesktopMediaListBase() = default;
+void DesktopMediaListBase::AddObserver(DesktopMediaListObserver* observer) {
+ DCHECK(!observer_);
@@ -44,7 +44,7 @@ index 147d5be9f7f56fb71468b56e86eb33b59d51cd66..5930fe95e33a9e5a3108c31e8c34daa9
void DesktopMediaListBase::SetUpdatePeriod(base::TimeDelta period) {
DCHECK(!observer_);
update_period_ = period;
@@ -54,7 +59,7 @@ void DesktopMediaListBase::Update(UpdateCallback callback) {
@@ -58,7 +63,7 @@ void DesktopMediaListBase::Update(UpdateCallback callback) {
DCHECK(sources_.empty());
DCHECK(!refresh_callback_);
refresh_callback_ = std::move(callback);
@@ -53,7 +53,7 @@ index 147d5be9f7f56fb71468b56e86eb33b59d51cd66..5930fe95e33a9e5a3108c31e8c34daa9
}
int DesktopMediaListBase::GetSourceCount() const {
@@ -68,6 +73,11 @@ const DesktopMediaList::Source& DesktopMediaListBase::GetSource(
@@ -72,6 +77,11 @@ const DesktopMediaList::Source& DesktopMediaListBase::GetSource(
return sources_[index];
}
@@ -62,10 +62,10 @@ index 147d5be9f7f56fb71468b56e86eb33b59d51cd66..5930fe95e33a9e5a3108c31e8c34daa9
+ return sources_;
+}
+
DesktopMediaID::Type DesktopMediaListBase::GetMediaListType() const {
DesktopMediaList::Type DesktopMediaListBase::GetMediaListType() const {
return type_;
}
@@ -79,6 +89,12 @@ DesktopMediaListBase::SourceDescription::SourceDescription(
@@ -83,6 +93,12 @@ DesktopMediaListBase::SourceDescription::SourceDescription(
void DesktopMediaListBase::UpdateSourcesList(
const std::vector<SourceDescription>& new_sources) {
@@ -79,7 +79,7 @@ index 147d5be9f7f56fb71468b56e86eb33b59d51cd66..5930fe95e33a9e5a3108c31e8c34daa9
SourceSet new_source_set;
for (size_t i = 0; i < new_sources.size(); ++i) {
diff --git a/chrome/browser/media/webrtc/desktop_media_list_base.h b/chrome/browser/media/webrtc/desktop_media_list_base.h
index 3c09ec3111d54cb4f0b74f16a81292b779009eae..5c3667822afd47a22878b508b844a615c24f3162 100644
index a1038183d5b44ca760576bff55534b5841e2e9d2..d036a4e630e9ba8311cf7670a53b12ac33fdd2ef 100644
--- a/chrome/browser/media/webrtc/desktop_media_list_base.h
+++ b/chrome/browser/media/webrtc/desktop_media_list_base.h
@@ -27,6 +27,7 @@ class DesktopMediaListBase : public DesktopMediaList {
@@ -95,7 +95,7 @@ index 3c09ec3111d54cb4f0b74f16a81292b779009eae..5c3667822afd47a22878b508b844a615
int GetSourceCount() const override;
const Source& GetSource(int index) const override;
+ const std::vector<Source>& GetSources() const override;
content::DesktopMediaID::Type GetMediaListType() const override;
DesktopMediaList::Type GetMediaListType() const override;
static uint32_t GetImageHash(const gfx::Image& image);
diff --git a/chrome/browser/media/webrtc/desktop_media_list_observer.h b/chrome/browser/media/webrtc/desktop_media_list_observer.h
@@ -111,10 +111,10 @@ 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 63ee95a80309357293afa0684c2a1cec6a3ba105..a0098e9450b48f03b98008e0e81fe48cc2a7b293 100644
index f0efd4af8b7dde2c13d9e63d64249589f14ac24c..6c8c91f7d9574517da6faebe9c73fe3ed03310e3 100644
--- a/chrome/browser/media/webrtc/native_desktop_media_list.cc
+++ b/chrome/browser/media/webrtc/native_desktop_media_list.cc
@@ -10,14 +10,15 @@
@@ -10,15 +10,16 @@
#include "base/hash/hash.h"
#include "base/message_loop/message_pump_type.h"
#include "base/single_thread_task_runner.h"
@@ -127,11 +127,12 @@ index 63ee95a80309357293afa0684c2a1cec6a3ba105..a0098e9450b48f03b98008e0e81fe48c
-#include "chrome/grit/generated_resources.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/common/content_features.h"
+#include "electron/grit/electron_resources.h"
#include "media/base/video_util.h"
#include "third_party/libyuv/include/libyuv/scale_argb.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -257,6 +258,8 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
@@ -265,6 +266,8 @@ void NativeDesktopMediaList::Worker::RefreshNextThumbnail() {
FROM_HERE,
base::BindOnce(&NativeDesktopMediaList::UpdateNativeThumbnailsFinished,
media_list_));

View File

@@ -15,10 +15,10 @@ the redraw locking mechanism, which fixes these issues. The electron issue
can be found at https://github.com/electron/electron/issues/1821
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index c347d1610d4c3d6a6ee3c7cb17d49d54482de818..53a7c6d03146994f9af9a503646e65b5c884ab23 100644
index 0cf04f6ee625d5d8b58c68f100a599e51ff65927..e92d9cd727d1347db2d455811cc9d4c731d44676 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -304,6 +304,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
@@ -305,6 +305,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
} // namespace
@@ -29,7 +29,7 @@ index c347d1610d4c3d6a6ee3c7cb17d49d54482de818..53a7c6d03146994f9af9a503646e65b5
// A scoping class that prevents a window from being able to redraw in response
// to invalidations that may occur within it for the lifetime of the object.
//
@@ -355,6 +359,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
@@ -356,6 +360,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
cancel_unlock_(false),
should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
::IsWindow(hwnd_) &&
@@ -37,7 +37,7 @@ index c347d1610d4c3d6a6ee3c7cb17d49d54482de818..53a7c6d03146994f9af9a503646e65b5
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
!ui::win::IsAeroGlassEnabled())) {
if (should_lock_)
@@ -969,6 +974,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
@@ -971,6 +976,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
return scoped_enable;
}
@@ -49,10 +49,10 @@ index c347d1610d4c3d6a6ee3c7cb17d49d54482de818..53a7c6d03146994f9af9a503646e65b5
// HWNDMessageHandler, gfx::WindowImpl overrides:
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
index 042392a659fd6934e84d66cc985d25863e365e34..5e88e780c3da4805eae7870291188e636423042e 100644
index 56b25183faca61754617ac38dbd2972aa8d30759..40f9b694fcce86dd56233541b58055cb77d9e615 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -202,6 +202,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
@@ -201,6 +201,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,
using TouchIDs = std::set<DWORD>;
enum class DwmFrameState { kOff, kOn };

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 c07966b670c8f16b8d50a94e191ccd46a3cf9227..53bcab4feccb8ba09c21b8338495d983bb602c6f 100644
index 6423a98c5bc951446b88051de15df45ade308349..c1ef0256347ea5bc4fa9c90c91c6322ce4cc60fd 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -1771,6 +1771,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
@@ -1785,6 +1785,10 @@ void LayerTreeHostImpl::SetIsLikelyToRequireADraw(
gfx::ColorSpace LayerTreeHostImpl::GetRasterColorSpace(
gfx::ContentColorUsage content_color_usage) const {
@@ -35,7 +35,7 @@ index c07966b670c8f16b8d50a94e191ccd46a3cf9227..53bcab4feccb8ba09c21b8338495d983
// If we are likely to software composite the resource, we use sRGB because
diff --git a/cc/trees/layer_tree_settings.h b/cc/trees/layer_tree_settings.h
index 63f087b74b93efe884df3833865e9aa7af912508..eb41d143ed1dd622a362b0f008a725034d6e1a97 100644
index c02eb016dc3f772ccafcd8099b41a4aca4d8236a..317275b6315253f5f317a09b478b566536522f82 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -97,6 +97,8 @@ class CC_EXPORT LayerTreeSettings {
@@ -81,7 +81,7 @@ index 4dbfd138a467462bae4ff062d9a8062b76ecaa4c..cc7c95bb0f4e6ec6b3579ced90a0f103
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
#if defined(OS_APPLE)
diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
index 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb647689f07 100644
index a0fc635ce92491cc3df706e3e52bd8b0cacb2f15..32c497ca0b40517d70639cb16829a6283363e85a 100644
--- a/components/viz/service/display/gl_renderer.cc
+++ b/components/viz/service/display/gl_renderer.cc
@@ -88,6 +88,9 @@
@@ -94,7 +94,7 @@ index 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb6
namespace viz {
namespace {
@@ -677,8 +680,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
@@ -678,8 +681,9 @@ void GLRenderer::DoDrawQuad(const DrawQuad* quad,
void GLRenderer::DrawDebugBorderQuad(const DebugBorderDrawQuad* quad) {
SetBlendEnabled(quad->ShouldDrawWithBlending());
@@ -106,7 +106,7 @@ index 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb6
// Use the full quad_rect for debug quads to not move the edges based on
// partial swaps.
@@ -1662,7 +1666,8 @@ void GLRenderer::ChooseRPDQProgram(DrawRenderPassDrawQuadParams* params,
@@ -1666,7 +1670,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 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb6
}
void GLRenderer::UpdateRPDQUniforms(DrawRenderPassDrawQuadParams* params) {
@@ -2135,15 +2140,16 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
@@ -2139,15 +2144,16 @@ void GLRenderer::DrawSolidColorQuad(const SolidColorDrawQuad* quad,
SetUseProgram(ProgramKey::SolidColor(use_aa ? USE_AA : NO_AA,
tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@@ -136,7 +136,7 @@ index 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb6
gfx::ColorTransform::TriStim col(color_f.fR, color_f.fG, color_f.fB);
color_transform->Transform(&col, 1);
color_f.fR = col.x();
@@ -2365,7 +2371,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
@@ -2369,7 +2375,8 @@ void GLRenderer::DrawContentQuadAA(const ContentDrawQuadBase* quad,
: NON_PREMULTIPLIED_ALPHA,
false, false, tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@@ -146,7 +146,7 @@ index 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb6
if (current_program_->tint_color_matrix_location() != -1) {
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
@@ -2464,7 +2471,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
@@ -2468,7 +2475,8 @@ void GLRenderer::DrawContentQuadNoAA(const ContentDrawQuadBase* quad,
!quad->ShouldDrawWithBlending(), has_tex_clamp_rect,
tint_gl_composited_content_,
ShouldApplyRoundedCorner(quad)),
@@ -156,7 +156,7 @@ index 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb6
if (current_program_->tint_color_matrix_location() != -1) {
auto matrix = cc::DebugColors::TintCompositedContentColorTransformMatrix();
@@ -2574,7 +2582,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
@@ -2578,7 +2586,8 @@ void GLRenderer::DrawYUVVideoQuad(const YUVVideoDrawQuad* quad,
// The source color space should never be RGB.
DCHECK_NE(src_color_space, src_color_space.GetAsFullRangeRGB());
@@ -166,7 +166,7 @@ index 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb6
#if defined(OS_WIN)
// Force sRGB output on Windows for overlay candidate video quads to match
@@ -2754,7 +2763,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
@@ -2759,7 +2768,8 @@ void GLRenderer::DrawStreamVideoQuad(const StreamVideoDrawQuad* quad,
SetUseProgram(ProgramKey::VideoStream(tex_coord_precision,
ShouldApplyRoundedCorner(quad)),
@@ -176,7 +176,7 @@ index 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb6
DCHECK_EQ(GL_TEXTURE0, GetActiveTextureUnit(gl_));
gl_->BindTexture(GL_TEXTURE_EXTERNAL_OES, lock.texture_id());
@@ -2825,8 +2835,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
@@ -2830,8 +2840,8 @@ void GLRenderer::FlushTextureQuadCache(BoundGeometry flush_binding) {
draw_cache_.nearest_neighbor ? GL_NEAREST : GL_LINEAR);
// Bind the program to the GL state.
@@ -187,7 +187,7 @@ index 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb6
/*adjust_src_white_level=*/draw_cache_.is_video_frame);
if (current_program_->rounded_corner_rect_location() != -1) {
@@ -3653,7 +3663,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
@@ -3659,7 +3669,9 @@ void GLRenderer::SetUseProgram(const ProgramKey& program_key_no_color,
const gfx::ColorSpace& src_color_space,
const gfx::ColorSpace& dst_color_space,
bool adjust_src_white_level) {
@@ -198,7 +198,7 @@ index 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb6
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,
@@ -4033,9 +4045,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
@@ -4037,9 +4049,9 @@ void GLRenderer::CopyRenderPassDrawQuadToOverlayResource(
cc::MathUtil::CheckedRoundUp(iosurface_height, iosurface_multiple);
}
@@ -211,7 +211,7 @@ index 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb6
*new_bounds = gfx::RectF(updated_dst_rect.origin(),
gfx::SizeF((*overlay_texture)->texture.size()));
@@ -4255,8 +4267,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
@@ -4259,8 +4271,8 @@ void GLRenderer::FlushOverdrawFeedback(const gfx::Rect& output_rect) {
PrepareGeometry(SHARED_BINDING);
@@ -222,14 +222,14 @@ index 47ded9c4ec4cacbf14dcce9b5449d975e2fd354e..664bc4b52a9e4e600296f6a814e88bb6
gfx::Transform render_matrix;
render_matrix.Translate(0.5 * output_rect.width() + output_rect.x(),
@@ -4446,3 +4458,5 @@ GLRenderer::OverlayTexture::OverlayTexture() = default;
@@ -4450,3 +4462,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 d5d68aa5a40b577d7d7b545cdc67f60e18acdf86..8ab5b75d7eee5f3e17b997abcd84f504ec6283ea 100644
index 2425c2b99a949c3181e2b69ea8d607f103442e34..86c91453231ca4762f50387b9be51393176b9cb8 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -223,6 +223,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@@ -241,10 +241,10 @@ index d5d68aa5a40b577d7d7b545cdc67f60e18acdf86..8ab5b75d7eee5f3e17b997abcd84f504
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 896630a5f595aa39265ceea68feb355454965ba0..3c7088341ace52d0efc5084b216beeee302ae922 100644
index ae1aed1f26ae6202b4709a1931c48c55e3fae956..5629dd09ca564100bb1eb592f1176c5987eb0b71 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -218,6 +218,7 @@
@@ -214,6 +214,7 @@
#include "ui/accessibility/accessibility_switches.h"
#include "ui/base/ui_base_switches.h"
#include "ui/display/display_switches.h"
@@ -252,7 +252,7 @@ index 896630a5f595aa39265ceea68feb355454965ba0..3c7088341ace52d0efc5084b216beeee
#include "ui/gl/gl_switches.h"
#include "ui/native_theme/native_theme_features.h"
#include "url/origin.h"
@@ -3217,6 +3218,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
@@ -3152,6 +3153,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[] = {

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 cd45e6c19505e553a4632dd478d33f3ee2cce0de..2090da2ac1a23a9847d0c3c14a7a2cc2c0ff2a55 100644
index 925b5ab3e666c14f01745f59859ce25f14f64899..8c55c85010940f3ad2135841d9d780779bc2b07d 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -476,7 +476,11 @@
@@ -487,7 +487,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 1b9b2c1ad23bd562b8c1895ceac220248dd70d01..d155e69df2abb9cec5f2153c7cb3c7b45cf46bbc 100644
index 20c2816765f639ce6ecab16db124f885702064dd..d98336a4b552290aff88a0c14321a58807c7eb05 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -726,6 +726,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -709,6 +709,9 @@ void RenderWidgetHostImpl::WasHidden() {
if (is_hidden_)
return;
@@ -20,12 +20,12 @@ index 1b9b2c1ad23bd562b8c1895ceac220248dd70d01..d155e69df2abb9cec5f2153c7cb3c7b4
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 a60325e9245af18665e34f56becc65f09fddee68..f179736afc6e675d8207bda025b4fbe1295c1bec 100644
index c0ab310d13e3f567aebdb9bcf1824897dba6b637..84c0d0943007adca3ce3a9c61f123a50aa67bf37 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -835,6 +835,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
base::Optional<blink::VisualProperties> LastComputedVisualProperties() const;
@@ -833,6 +833,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
mojom::CreateFrameWidgetParamsPtr
BindAndGenerateCreateFrameWidgetParamsForNewWindow();
+ // Electron: Prevents the widget from getting hidden.
+ bool disable_hidden_ = false;
@@ -34,10 +34,10 @@ index a60325e9245af18665e34f56becc65f09fddee68..f179736afc6e675d8207bda025b4fbe1
// |routing_id| must not be MSG_ROUTING_NONE.
// If this object outlives |delegate|, DetachDelegate() must be called when
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 3fa31e92b1f49f302cb91b10fd8d7489b7f7cda3..f35127f154754225015d6d8a56f4082f78bf8d3a 100644
index 624f7f5aa5314bd810074f354073ff98bb66b3d2..6417bef874d990535a610c78e547ecba57b78369 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -605,7 +605,7 @@ void RenderWidgetHostViewAura::HideImpl() {
@@ -597,7 +597,7 @@ void RenderWidgetHostViewAura::HideImpl() {
DCHECK(visibility_ == Visibility::HIDDEN ||
visibility_ == Visibility::OCCLUDED);

View File

@@ -24,10 +24,10 @@ This patch temporarily disables the metrics so we can have green CI, and we
should continue seeking for a real fix.
diff --git a/content/browser/renderer_host/navigator.cc b/content/browser/renderer_host/navigator.cc
index f9fe438fbc14c5097c665c1e81209285646f578c..c57156ab68a65440a0ed101fbceaf5246c59e9cd 100644
index c30c380d80c15d3795365be20525ad7a01f3ca4a..8e7aeb43a436ec6be46ffcd7d319a3e2d85462e0 100644
--- a/content/browser/renderer_host/navigator.cc
+++ b/content/browser/renderer_host/navigator.cc
@@ -960,6 +960,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1017,6 +1017,7 @@ void Navigator::RecordNavigationMetrics(
.InMilliseconds());
}
@@ -35,7 +35,7 @@ index f9fe438fbc14c5097c665c1e81209285646f578c..c57156ab68a65440a0ed101fbceaf524
// If this is a same-process navigation and we have timestamps for unload
// durations, fill those metrics out as well.
if (params.unload_start && params.unload_end &&
@@ -1006,6 +1007,7 @@ void Navigator::RecordNavigationMetrics(
@@ -1063,6 +1064,7 @@ void Navigator::RecordNavigationMetrics(
first_before_unload_start_time)
.InMilliseconds());
}

View File

@@ -11,10 +11,10 @@ This regressed in https://chromium-review.googlesource.com/c/chromium/src/+/2572
Upstream: https://chromium-review.googlesource.com/c/chromium/src/+/2598393
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index e9fb8a1aff0702984e7cfc96086a7d8d07908cbb..6cde6699f0872e877667a6ed92f655fa447f2e49 100644
index 6dfa89f3117cb7b0165c352feb79e95b4a315061..31ca76bb13643b8dc1a530841f9c1941ebb43838 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -2686,7 +2686,7 @@ blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() {
@@ -2667,7 +2667,7 @@ blink::WebLocalFrame* RenderFrameImpl::GetWebFrame() {
}
const blink::web_pref::WebPreferences& RenderFrameImpl::GetBlinkPreferences() {

View File

@@ -6,10 +6,10 @@ Subject: feat: enable setting aspect ratio to 0
Make SetAspectRatio accept 0 as valid input, which would reset to null.
diff --git a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
index a409755330351e7e1684c31f7c7cc6882a2dc7af..3349f38e1df8ff7e5c70f1c177b11914e4fa3e30 100644
index 9eb420b6499dcf97a687b833b04c67be28e4074d..081463f6199eb9d9b1205685379d08f60f8ea551 100644
--- a/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
+++ b/ui/views/widget/desktop_aura/desktop_window_tree_host_win.cc
@@ -484,7 +484,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
@@ -483,7 +483,7 @@ void DesktopWindowTreeHostWin::SetOpacity(float opacity) {
}
void DesktopWindowTreeHostWin::SetAspectRatio(const gfx::SizeF& aspect_ratio) {
@@ -19,10 +19,10 @@ index a409755330351e7e1684c31f7c7cc6882a2dc7af..3349f38e1df8ff7e5c70f1c177b11914
aspect_ratio.height());
}
diff --git a/ui/views/win/hwnd_message_handler.cc b/ui/views/win/hwnd_message_handler.cc
index 53a7c6d03146994f9af9a503646e65b5c884ab23..7b0272b69132639f5074b82942c8de9729149dd5 100644
index e92d9cd727d1347db2d455811cc9d4c731d44676..3dc8185c1fcb19ba20d90e3f5e999d1c4e6c1b1f 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -919,8 +919,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
@@ -921,8 +921,11 @@ void HWNDMessageHandler::SetFullscreen(bool fullscreen) {
}
void HWNDMessageHandler::SetAspectRatio(float aspect_ratio) {

View File

@@ -33,10 +33,10 @@ index 0ccfe130f00ec3b6c75cd8ee04d5a2777e1fd00c..653829457d58bf92057cc36aa8a28970
DISALLOW_COPY_AND_ASSIGN(StaticHttpUserAgentSettings);
};
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 94992396b2cd4a017788bfdab6f944647b08bb8f..c575cd6d77f211b74f4a86d97ac6190a060e48fc 100644
index 8a00bf59c728217069000b1f1ece72e1540baf85..fc98675c01f64e6c674a7cdb4d9195edff446949 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1129,6 +1129,13 @@ void NetworkContext::SetNetworkConditions(
@@ -1139,6 +1139,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@@ -51,10 +51,10 @@ index 94992396b2cd4a017788bfdab6f944647b08bb8f..c575cd6d77f211b74f4a86d97ac6190a
// 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 c1cd4a20995af72fd386702d7baeb7d804d0844f..6377ce9636f3e86579a4877e609b80fc5aab931b 100644
index 06b1a0d550de946aa41efca2be4efde694cc24c7..fe7c5c6501838e480c2bc95823e9f562839ad99c 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -251,6 +251,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -254,6 +254,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override;
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
mojom::NetworkConditionsPtr conditions) override;
@@ -63,10 +63,10 @@ index c1cd4a20995af72fd386702d7baeb7d804d0844f..6377ce9636f3e86579a4877e609b80fc
void SetEnableReferrers(bool enable_referrers) override;
#if BUILDFLAG(IS_CHROMEOS_ASH)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 620ed2a4752ded3cbe6a2ce66fce25433d64d8f6..fd0f46bfd8d5b7c803042635460cd3b87d2521dc 100644
index 7a62dfd110555d2bf6ed4be075967ce6396855ef..b35746e2850d7d724fcf3dc09ddbfea1ca56a746 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1097,6 +1097,9 @@ interface NetworkContext {
@@ -948,6 +948,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);
@@ -77,10 +77,10 @@ index 620ed2a4752ded3cbe6a2ce66fce25433d64d8f6..fd0f46bfd8d5b7c803042635460cd3b8
SetAcceptLanguage(string new_accept_language);
diff --git a/services/network/test/test_network_context.h b/services/network/test/test_network_context.h
index 3b1c2b43688f1789efeac418063e572e7a3d0626..97fa1e18fc1038e5fcd90dbf4ae4e5f76a7deda4 100644
index f233265ccc0be9b412bf2e3e702e12614fa435c4..51006ddb52a0c4c4ea9f1cdb631cf4d75967bb66 100644
--- a/services/network/test/test_network_context.h
+++ b/services/network/test/test_network_context.h
@@ -113,6 +113,7 @@ class TestNetworkContext : public mojom::NetworkContext {
@@ -117,6 +117,7 @@ class TestNetworkContext : public mojom::NetworkContext {
void CloseIdleConnections(CloseIdleConnectionsCallback callback) override {}
void SetNetworkConditions(const base::UnguessableToken& throttling_profile_id,
mojom::NetworkConditionsPtr conditions) override {}

View File

@@ -13,11 +13,11 @@ 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 6f9221b95d5609d6bc3395bd3a3c81670877fdd0..bd4cd7cf50ea7f8816b35b3150bea8c459571231 100644
index 3ee65184e31e7851a5f192f12318b813a5d3949a..7bc2abc443eaae2860b9178cd6d04b07fe2dbfac 100644
--- a/ui/native_theme/native_theme.cc
+++ b/ui/native_theme/native_theme.cc
@@ -257,6 +257,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors)
NativeTheme::~NativeTheme() = default;
@@ -243,6 +243,8 @@ base::Optional<SkColor> NativeTheme::GetColorProviderColor(
}
bool NativeTheme::ShouldUseDarkColors() const {
+ if (theme_source() == ThemeSource::kForcedLight) return false;
@@ -26,12 +26,12 @@ index 6f9221b95d5609d6bc3395bd3a3c81670877fdd0..bd4cd7cf50ea7f8816b35b3150bea8c4
}
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index 20943ab98c28b2689d3e4f548dba95ad0e40b2da..a9364d386d42315e1fca52e4eb316569d3c7a9e0 100644
index 0196aa21e880a517461001e7bbb1f3399bbc3b37..9375f55b6ab4a897d4e837e681eedf0145af9302 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -402,6 +402,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
ColorId color_id,
ColorScheme color_scheme = ColorScheme::kDefault) const;
SkColor GetUnprocessedSystemColor(ColorId color_id,
ColorScheme color_scheme) const;
+ enum ThemeSource {
+ kSystem,
@@ -52,7 +52,7 @@ index 20943ab98c28b2689d3e4f548dba95ad0e40b2da..a9364d386d42315e1fca52e4eb316569
// 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
@@ -552,6 +568,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -568,6 +584,7 @@ class NATIVE_THEME_EXPORT NativeTheme {
bool forced_colors_ = false;
PreferredColorScheme preferred_color_scheme_ = PreferredColorScheme::kLight;
PreferredContrast preferred_contrast_ = PreferredContrast::kNoPreference;
@@ -61,10 +61,10 @@ index 20943ab98c28b2689d3e4f548dba95ad0e40b2da..a9364d386d42315e1fca52e4eb316569
DISALLOW_COPY_AND_ASSIGN(NativeTheme);
};
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index f4dff8de98066ea0ee4fb30ce832b27707791743..3d8c850111c0bbcd724c752e5b717ee46cfd5852 100644
index 90e3b67bd5c78be3ea0d0f0e4ef94bc95ea375a2..510791b29b6b16f92eecb804912992fd843c4d9c 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -741,6 +741,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
@@ -748,6 +748,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
// ...unless --force-dark-mode was specified in which case caveat emptor.
if (InForcedColorsMode() && !IsForcedDarkMode())
return false;

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 df522c390d930536a646d6a410ab98b8be0fa58d..a4a7bdfa597fa20695b515cc5b4fe8aff5bf252b 100644
index a0dc55dc6751550527437b653f8a3ce782c755de..6e42cb67cc912620e32caaa40174cbd9c34218f1 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -597,6 +597,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
@@ -601,6 +601,11 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
@@ -22,11 +22,11 @@ index df522c390d930536a646d6a410ab98b8be0fa58d..a4a7bdfa597fa20695b515cc5b4fe8af
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 df589265f13c811d6ade9cbc487a6e8ed6e67574..040de7d598e4a1c40a46a273f4144f4c220a7fcf 100644
index 1af9066790af8f8b32186313e5c620908260e0eb..ab87e44fbaba1ad5d9cdaa00ee567b2ab414b2bf 100644
--- a/content/browser/renderer_host/render_view_host_impl.h
+++ b/content/browser/renderer_host/render_view_host_impl.h
@@ -133,6 +133,7 @@ class CONTENT_EXPORT RenderViewHostImpl
SiteInstanceImpl* GetSiteInstance() override;
RenderViewHostDelegate* GetDelegate() override;
bool IsRenderViewLive() override;
+ void SetSchedulerThrottling(bool allowed) override;
@@ -34,10 +34,10 @@ index df589265f13c811d6ade9cbc487a6e8ed6e67574..040de7d598e4a1c40a46a273f4144f4c
void SendRendererPreferencesToRenderer(
const blink::RendererPreferences& preferences);
diff --git a/content/public/browser/render_view_host.h b/content/public/browser/render_view_host.h
index 4c082605daf6841205f51789c1df329cc10ce57e..f450523c978c7603af4358fb928c6be70fc3130a 100644
index 0edd8ddc099b2e66869d2d4fff42f761d3be6079..bcc704efaf27f9b042b349fa0b097917716b5acd 100644
--- a/content/public/browser/render_view_host.h
+++ b/content/public/browser/render_view_host.h
@@ -91,6 +91,9 @@ class CONTENT_EXPORT RenderViewHost {
@@ -88,6 +88,9 @@ class CONTENT_EXPORT RenderViewHost {
// Returns true if the RenderView is active and has not crashed.
virtual bool IsRenderViewLive() = 0;
@@ -48,10 +48,10 @@ index 4c082605daf6841205f51789c1df329cc10ce57e..f450523c978c7603af4358fb928c6be7
// This interface should only be implemented inside content.
friend class RenderViewHostImpl;
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 56374d40d7fdb606dc00d76fbbe5b4d24cc247a9..9c966d711235dd8f041134108e33f03f7551e49a 100644
index cd191b07a0075245449035cfbe61c16ace913506..0364e1d649b10f998630f7775f8edb3e0585d536 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -234,6 +234,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
@@ -223,6 +223,8 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
static WindowOpenDisposition NavigationPolicyToDisposition(
blink::WebNavigationPolicy policy);
@@ -61,10 +61,10 @@ index 56374d40d7fdb606dc00d76fbbe5b4d24cc247a9..9c966d711235dd8f041134108e33f03f
#if defined(OS_ANDROID)
diff --git a/third_party/blink/public/mojom/page/page.mojom b/third_party/blink/public/mojom/page/page.mojom
index e122d4ffb857023841dabcb6fed352d7586d8344..3c7cd1cb8b204024a0835150302ee8896e01ee45 100644
index 464faabf887dcdefa26a747393ccce851bf035d7..7048eec311563bd6f2b9eeba145c418a0f8f6c2d 100644
--- a/third_party/blink/public/mojom/page/page.mojom
+++ b/third_party/blink/public/mojom/page/page.mojom
@@ -73,4 +73,7 @@ interface PageBroadcast {
@@ -76,4 +76,7 @@ interface PageBroadcast {
// Set history offset and length.
SetHistoryOffsetAndLength(int32 offset, int32 length);
@@ -85,10 +85,10 @@ index e8212d4566666683d67590ef0fe11e452d71b6fc..b19500d4af881c795e84baff16e9973e
// 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 509a0dcc6620ead11ad91bafec7563c213492af2..1da5d311360171bbb8a5c5da50f6f9e676d8d13e 100644
index 222c8cda640b7255a8779f559eeba8151d63a673..a802da73e37c772760ee989ceda943a7f3ab8d6b 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -3495,6 +3495,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3516,6 +3516,13 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@@ -102,7 +102,7 @@ index 509a0dcc6620ead11ad91bafec7563c213492af2..1da5d311360171bbb8a5c5da50f6f9e6
void WebViewImpl::SetVisibilityState(
mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) {
@@ -3505,7 +3512,8 @@ void WebViewImpl::SetVisibilityState(
@@ -3528,7 +3535,8 @@ void WebViewImpl::SetVisibilityState(
}
GetPage()->SetVisibilityState(visibility_state, is_initial_state);
GetPage()->GetPageScheduler()->SetPageVisible(
@@ -113,10 +113,10 @@ index 509a0dcc6620ead11ad91bafec7563c213492af2..1da5d311360171bbb8a5c5da50f6f9e6
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 40b74bd0b01e7271aa8d729777651f8ba79245d3..e9962f2dc5dccc510ab543e97dbf1c672c86a423 100644
index 9afdc9a5f84380436c0435662ae5c633bc7482f6..25fc8941370cb9ab0dd93402f5118e0184e6aca1 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -363,6 +363,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -384,6 +384,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
LocalDOMWindow* PagePopupWindow() const;
PageScheduler* Scheduler() const override;
@@ -124,8 +124,8 @@ index 40b74bd0b01e7271aa8d729777651f8ba79245d3..e9962f2dc5dccc510ab543e97dbf1c67
void SetVisibilityState(mojom::blink::PageVisibilityState visibility_state,
bool is_initial_state) override;
mojom::blink::PageVisibilityState GetVisibilityState() override;
@@ -759,11 +760,18 @@ class CORE_EXPORT WebViewImpl final : public WebView,
SkColor background_color_override_ = Color::kTransparent;
@@ -780,11 +781,18 @@ class CORE_EXPORT WebViewImpl final : public WebView,
float zoom_factor_override_ = 0.f;
+ // TODO(bokan): Temporary debugging added to diagnose

View File

@@ -81,10 +81,10 @@ index 1026b739d283f0fc252fa2af83a6d4cf51bc8553..fe562ab60ce98b8bb0c5080a6428deb3
private:
const HWND hwnd_;
diff --git a/components/viz/service/BUILD.gn b/components/viz/service/BUILD.gn
index 0f6a5a2fa3d82ae76889ef55af14e18b86cacffc..e33cd6305f53aa9287c61bf2d38848f878a14d30 100644
index 248021aeb18072215d77081158b73dc8107f8958..970171531b4a728becba5b0142471c2c976b7e35 100644
--- a/components/viz/service/BUILD.gn
+++ b/components/viz/service/BUILD.gn
@@ -119,6 +119,8 @@ viz_component("service") {
@@ -129,6 +129,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",
@@ -484,10 +484,10 @@ index 0000000000000000000000000000000000000000..48fa86caaab3c15764f105eb7ad2aecf
+
+#endif // COMPONENTS_VIZ_SERVICE_DISPLAY_EMBEDDER_SOFTWARE_OUTPUT_DEVICE_PROXY_H_
diff --git a/components/viz/service/display_embedder/software_output_device_win.cc b/components/viz/service/display_embedder/software_output_device_win.cc
index 2bb30e5318b6b48c2e6d4b1f64a6a36c68f963d1..9e805f27a9d7d1c0aa68cdf9f48895c055ca7791 100644
index 599b06c1765ef4ddbfeb2fd96e0875098f7c6ae1..2151fc8aa710162a3870639bd6e952df9d15a0be 100644
--- a/components/viz/service/display_embedder/software_output_device_win.cc
+++ b/components/viz/service/display_embedder/software_output_device_win.cc
@@ -188,7 +188,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
@@ -191,7 +191,7 @@ void SoftwareOutputDeviceWinProxy::EndPaintDelegated(
if (!canvas_)
return;
@@ -497,10 +497,10 @@ index 2bb30e5318b6b48c2e6d4b1f64a6a36c68f963d1..9e805f27a9d7d1c0aa68cdf9f48895c0
waiting_on_draw_ack_ = true;
diff --git a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
index 8112abf9ca0bf214721f5996bb59f7458d9347d2..8b3c2a4cce0c4789fadd555b360dea2c145ae1a4 100644
index 378ff94440c9f33ed3569d9818ca92083781cc48..831afb1678c889ac162666298849617d53bdc827 100644
--- a/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
+++ b/components/viz/service/frame_sinks/root_compositor_frame_sink_impl.cc
@@ -46,7 +46,8 @@ RootCompositorFrameSinkImpl::Create(
@@ -47,7 +47,8 @@ RootCompositorFrameSinkImpl::Create(
params->gpu_compositing, params->widget, params->renderer_settings);
auto output_surface = output_surface_provider->CreateOutputSurface(
params->widget, params->gpu_compositing, display_client.get(),
@@ -532,7 +532,7 @@ index 11ac1649ed0f5be1d12e8a30b8d170f86b8e9bb8..05746d9a561c3933ae0c5578467f20b4
compositor_data.display_client->GetBoundRemote(resize_task_runner_);
diff --git a/services/viz/privileged/mojom/compositing/display_private.mojom b/services/viz/privileged/mojom/compositing/display_private.mojom
index 0c9686f3c8070000bf5b180d9c06a8817d430c4a..4538b95f6e71708144eb7752438b1b31d60cb2ca 100644
index 56268cca8cd15bc7ac676b9e12f726cccd30a0e1..ce32565a23b598a2af12943179e4d6b79c245ead 100644
--- a/services/viz/privileged/mojom/compositing/display_private.mojom
+++ b/services/viz/privileged/mojom/compositing/display_private.mojom
@@ -85,7 +85,6 @@ interface DisplayClient {
@@ -544,7 +544,7 @@ index 0c9686f3c8070000bf5b180d9c06a8817d430c4a..4538b95f6e71708144eb7752438b1b31
// Notifies that a swap has occurred and provides information about the pixel
diff --git a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
index a0b87925e0c9d02f586cc4e9446cbfcf12b7aa1c..71659834eec5237016f95f93defa9dcb30f0af52 100644
index 427017cc9c38cbcaae4009e5dd62946a11f40d57..4cbbf3416cfd8f2f53c590e00b89d1fdf09c8811 100644
--- a/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
+++ b/services/viz/privileged/mojom/compositing/frame_sink_manager.mojom
@@ -30,6 +30,7 @@ struct RootCompositorFrameSinkParams {
@@ -567,10 +567,10 @@ index 6b7fbb6cf13dc8ee6ade0878a9a2c1efc5d4d3f1..e2af75168cb914a7b3b4a6c9b6a28549
+ Draw(gfx.mojom.Rect damage_rect) => ();
};
diff --git a/ui/compositor/compositor.h b/ui/compositor/compositor.h
index e1db8f745c077b2f57b39a48aeab434fe0e98541..ddafd1f2aa38ef30776fa89ffcf5d108be963ac9 100644
index e4ff4cb0a2ec2ba5e469edc10e03abadb5bd660d..a4c55d9ca78168e23cad5ff6c0456f257acd8b8f 100644
--- a/ui/compositor/compositor.h
+++ b/ui/compositor/compositor.h
@@ -77,6 +77,7 @@ class ExternalBeginFrameController;
@@ -78,6 +78,7 @@ class ExternalBeginFrameController;
class DelegatedInkPointRenderer;
} // namespace mojom
class ContextProvider;
@@ -578,7 +578,7 @@ index e1db8f745c077b2f57b39a48aeab434fe0e98541..ddafd1f2aa38ef30776fa89ffcf5d108
class HostFrameSinkManager;
class LocalSurfaceId;
class RasterContextProvider;
@@ -133,6 +134,16 @@ class COMPOSITOR_EXPORT ContextFactory {
@@ -134,6 +135,16 @@ class COMPOSITOR_EXPORT ContextFactory {
virtual viz::HostFrameSinkManager* GetHostFrameSinkManager() = 0;
};
@@ -595,7 +595,7 @@ index e1db8f745c077b2f57b39a48aeab434fe0e98541..ddafd1f2aa38ef30776fa89ffcf5d108
// 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
@@ -167,6 +178,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -169,6 +180,9 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
// Schedules a redraw of the layer tree associated with this compositor.
void ScheduleDraw();
@@ -605,7 +605,7 @@ index e1db8f745c077b2f57b39a48aeab434fe0e98541..ddafd1f2aa38ef30776fa89ffcf5d108
// 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
@@ -435,6 +449,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
@@ -440,6 +454,8 @@ class COMPOSITOR_EXPORT Compositor : public cc::LayerTreeHostClient,
std::unique_ptr<PendingBeginFrameArgs> pending_begin_frame_args_;

View File

@@ -0,0 +1,21 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Samuel Attard <samuel.r.attard@gmail.com>
Date: Wed, 3 Mar 2021 15:52:46 -0800
Subject: fix: add CHECK for sandbox then_result
It fixes things, we do not know why, we should look at reverting this
patch and doing further investigation in the future. This patch cannot
be upstreamed.
diff --git a/sandbox/linux/bpf_dsl/bpf_dsl.cc b/sandbox/linux/bpf_dsl/bpf_dsl.cc
index 82a40696b8756305e6af83beec351c58c9c1a9e6..5ef1852331b8ebe0834c9951fb67177226997e8b 100644
--- a/sandbox/linux/bpf_dsl/bpf_dsl.cc
+++ b/sandbox/linux/bpf_dsl/bpf_dsl.cc
@@ -305,6 +305,7 @@ Elser::~Elser() {
}
Elser Elser::ElseIf(BoolExpr cond, ResultExpr then_result) const {
+ CHECK(then_result);
return Elser(Cons(std::make_pair(std::move(cond), std::move(then_result)),
clause_list_));
}

View File

@@ -7,7 +7,7 @@ Subject:
Disable usage of pthread_fchdir_np and pthread_chdir_np in MAS builds.
diff --git a/base/process/launch_mac.cc b/base/process/launch_mac.cc
index d3396d984086717e69d99cff3107ab09506b2b02..237e310b12eb9814f7da9103cf61d69e423b2920 100644
index 05ad8648a42cdca97d12167246a305373cb5aba3..e3c31792dbc3d9cc94c1e01aa3cfda4e35b6008c 100644
--- a/base/process/launch_mac.cc
+++ b/base/process/launch_mac.cc
@@ -27,8 +27,10 @@ extern "C" {

View File

@@ -7,7 +7,7 @@ This tweaks Chrome's Accessibility support at chrome://accessibility
to make it usable from Electron by removing Profile references.
diff --git a/chrome/browser/accessibility/accessibility_ui.cc b/chrome/browser/accessibility/accessibility_ui.cc
index 4453990236f07a58932f50701f31fab961d0fb9e..6193689e879f5e147ca1e6514fb2061423d31400 100644
index eed11ee2d85b655073f3e5c704a5d5349a935cb6..c36379a17d564ea96de8172fbdf057f0d85b66fc 100644
--- a/chrome/browser/accessibility/accessibility_ui.cc
+++ b/chrome/browser/accessibility/accessibility_ui.cc
@@ -20,7 +20,10 @@
@@ -97,7 +97,7 @@ index 4453990236f07a58932f50701f31fab961d0fb9e..6193689e879f5e147ca1e6514fb20614
return;
}
@@ -615,10 +622,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
@@ -614,10 +621,12 @@ void AccessibilityUIMessageHandler::RequestWebContentsTree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@@ -111,7 +111,7 @@ index 4453990236f07a58932f50701f31fab961d0fb9e..6193689e879f5e147ca1e6514fb20614
result->SetString(kTreeField, accessibility_contents);
FireWebUIListener(request_type, *(result.get()));
}
@@ -642,6 +651,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -641,6 +650,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
AXPropertyFilter::ALLOW_EMPTY);
AddPropertyFilters(property_filters, deny, AXPropertyFilter::DENY);
@@ -119,7 +119,7 @@ index 4453990236f07a58932f50701f31fab961d0fb9e..6193689e879f5e147ca1e6514fb20614
for (Browser* browser : *BrowserList::GetInstance()) {
if (browser->session_id().id() == session_id) {
std::unique_ptr<base::DictionaryValue> result(
@@ -656,6 +666,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
@@ -655,6 +665,7 @@ void AccessibilityUIMessageHandler::RequestNativeUITree(
return;
}
}
@@ -127,7 +127,7 @@ index 4453990236f07a58932f50701f31fab961d0fb9e..6193689e879f5e147ca1e6514fb20614
#endif // !defined(OS_ANDROID)
// No browser with the specified |session_id| was found.
std::unique_ptr<base::DictionaryValue> result(new base::DictionaryValue());
@@ -771,5 +782,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
@@ -770,5 +781,7 @@ void AccessibilityUIMessageHandler::RequestAccessibilityEvents(
// static
void AccessibilityUIMessageHandler::RegisterProfilePrefs(
user_prefs::PrefRegistrySyncable* registry) {

View File

@@ -10,7 +10,7 @@ them should they exist.
This will be upstreamed.
diff --git a/printing/printing_context_mac.h b/printing/printing_context_mac.h
index f63f7f2674d9562f57dea4f9c9f473aa595a0c5f..78a46dbea7ff31209748ef47d541725397d80616 100644
index 00c78a7446480a15a4dfa360ccdc438eaf1215c1..5b0db3e754ac6c9e335365173800d2e1a5ca629d 100644
--- a/printing/printing_context_mac.h
+++ b/printing/printing_context_mac.h
@@ -82,6 +82,10 @@ class PRINTING_EXPORT PrintingContextMac : public PrintingContext {
@@ -25,7 +25,7 @@ index f63f7f2674d9562f57dea4f9c9f473aa595a0c5f..78a46dbea7ff31209748ef47d5417253
// Returns true if duplex mode is set.
bool SetDuplexModeInPrintSettings(mojom::DuplexMode mode);
diff --git a/printing/printing_context_mac.mm b/printing/printing_context_mac.mm
index aa950b59390fdae9a5152affb7a7438cb78eb6f4..9b5307bda7b73cb502fe185be2a7c02e23a7722c 100644
index ff9b3e08d49cb0daec83df36257729ff2636fe66..20031e220903f0882bef091ed048f47c4c5dc61c 100644
--- a/printing/printing_context_mac.mm
+++ b/printing/printing_context_mac.mm
@@ -189,7 +189,8 @@ PMPaper MatchPaper(CFArrayRef paper_list,
@@ -62,10 +62,10 @@ index aa950b59390fdae9a5152affb7a7438cb78eb6f4..9b5307bda7b73cb502fe185be2a7c02e
PMPrintSettings print_settings =
static_cast<PMPrintSettings>([print_info_.get() PMPrintSettings]);
diff --git a/printing/printing_context_system_dialog_win.cc b/printing/printing_context_system_dialog_win.cc
index d3c8677f30d72efc49b28f293260c74c7b8d8b4e..f6e66aaa58ab1881d64dcbb320ae8b5ac7631b28 100644
index fe7fc797504dcc7097a3d79a2dab2c18de737048..20c63b1f657f2969850b31eaafdff7e500c60de8 100644
--- a/printing/printing_context_system_dialog_win.cc
+++ b/printing/printing_context_system_dialog_win.cc
@@ -52,14 +52,28 @@ void PrintingContextSystemDialogWin::AskUserForSettings(
@@ -53,14 +53,28 @@ void PrintingContextSystemDialogWin::AskUserForSettings(
PRINTPAGERANGE ranges[32];
dialog_options.nStartPage = START_PAGE_GENERAL;
if (max_pages) {
@@ -100,7 +100,7 @@ index d3c8677f30d72efc49b28f293260c74c7b8d8b4e..f6e66aaa58ab1881d64dcbb320ae8b5a
} else {
// No need to bother, we don't know how many pages are available.
diff --git a/ui/gtk/printing/print_dialog_gtk.cc b/ui/gtk/printing/print_dialog_gtk.cc
index f2ed36e1258f4f3ef1bfce972e215e3d5d7335b6..5b38bf1369a68546f0aeea8948abba995c65e7f7 100644
index d2ed5cbe4a48abe0026dda24a016da654e7e201a..d1bdf05c89e2c2aef71e8a8a2bf293725b2559d3 100644
--- a/ui/gtk/printing/print_dialog_gtk.cc
+++ b/ui/gtk/printing/print_dialog_gtk.cc
@@ -239,6 +239,24 @@ void PrintDialogGtk::UpdateSettings(

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 2b81f39b61ad77bdf5382b15d3874532f017b93b..07b77b9eda090403d7d69e19085c2f574a18007f 100644
index b5750a26185df8deed608e5d1bda8479d4a54aac..f64f3680ea16d3857db32eb2d8da8ffd3173bae1 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2960,11 +2960,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
@@ -3056,11 +3056,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
WebContentsImpl* outermost = GetOutermostWebContents();
if (event.button == blink::WebPointerProperties::Button::kBack &&
outermost->GetController().CanGoBack()) {

View File

@@ -12,7 +12,7 @@ as they will loaded as empty strings.
* IDS_UTILITY_PROCESS_PRINTING_SERVICE_NAME on Windows
diff --git a/chrome/browser/pdf/pdf_extension_util.cc b/chrome/browser/pdf/pdf_extension_util.cc
index 33fd198d1c92ad20c5f6243bc64956a7d9488e1f..40e5444e48ad8a2b15bace12cf4a28165902ccc8 100644
index 0944d8c843985ee2f72e28bca37105a681cb82bb..6b1a3a1b7f8b776323d321d0b425e040654646a9 100644
--- a/chrome/browser/pdf/pdf_extension_util.cc
+++ b/chrome/browser/pdf/pdf_extension_util.cc
@@ -9,8 +9,7 @@

View File

@@ -8,7 +8,7 @@ and respond with custom instance. Also allows for us to at-runtime
enable or disable this patch.
diff --git a/content/browser/browsing_instance.cc b/content/browser/browsing_instance.cc
index 2fdd2b3f3f8dcc14a2675b1c115d7b700a33c2e0..9f20f0f37890af424aba566f88653e6142d944eb 100644
index b21dc7ca8847378ca87df6dd1a76ff79fbbf0a07..b118ec64382a725a7ef29de617d657f1bf436189 100644
--- a/content/browser/browsing_instance.cc
+++ b/content/browser/browsing_instance.cc
@@ -77,6 +77,13 @@ scoped_refptr<SiteInstanceImpl> BrowsingInstance::GetSiteInstanceForURL(
@@ -42,10 +42,10 @@ index 65e627f2fa89352b0be27b5813d71a622bf1d326..113f4fd00f1cf994b39f64c9da387855
// another SiteInstance for the same site.
void RegisterSiteInstance(SiteInstanceImpl* site_instance);
diff --git a/content/browser/renderer_host/navigation_request.cc b/content/browser/renderer_host/navigation_request.cc
index 95f300136a587d19316d6c91a1611a0afa6fa347..e09b590396a9c660079287459cd60e4d4f06ee99 100644
index 6425cd2197aed8ff8b3a905ed5f6d38d92a27df7..c1d29c2684ed3d09ae12446e841c2c749c67c28a 100644
--- a/content/browser/renderer_host/navigation_request.cc
+++ b/content/browser/renderer_host/navigation_request.cc
@@ -1518,6 +1518,21 @@ void NavigationRequest::BeginNavigation() {
@@ -1570,6 +1570,21 @@ void NavigationRequest::BeginNavigation() {
if (IsSameDocument()) {
render_frame_host_ = frame_tree_node_->current_frame_host();
} else {
@@ -67,7 +67,7 @@ index 95f300136a587d19316d6c91a1611a0afa6fa347..e09b590396a9c660079287459cd60e4d
// Select an appropriate RenderFrameHost.
std::string frame_host_choice_reason;
render_frame_host_ =
@@ -5516,6 +5531,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
@@ -5746,6 +5761,7 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
{WILL_START_REQUEST, {
WILL_REDIRECT_REQUEST,
WILL_PROCESS_RESPONSE,
@@ -75,7 +75,7 @@ index 95f300136a587d19316d6c91a1611a0afa6fa347..e09b590396a9c660079287459cd60e4d
READY_TO_COMMIT,
DID_COMMIT,
CANCELING,
@@ -5529,10 +5545,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
@@ -5759,10 +5775,14 @@ void NavigationRequest::CheckStateTransition(NavigationState state) const {
WILL_FAIL_REQUEST,
}},
{WILL_PROCESS_RESPONSE, {
@@ -91,10 +91,10 @@ index 95f300136a587d19316d6c91a1611a0afa6fa347..e09b590396a9c660079287459cd60e4d
NOT_STARTED,
DID_COMMIT,
diff --git a/content/browser/renderer_host/navigation_request.h b/content/browser/renderer_host/navigation_request.h
index e29e67f5c91215a317d4244c7b62d89bea91a1fe..7ed0f9e6586b42b073d9dea8225baf3816516f5c 100644
index f9428e4c272254e0ddd7e564ef8ad6ef6ef30575..f518415b564c066c21a113869987436e0ae1fa4d 100644
--- a/content/browser/renderer_host/navigation_request.h
+++ b/content/browser/renderer_host/navigation_request.h
@@ -133,6 +133,10 @@ class CONTENT_EXPORT NavigationRequest
@@ -139,6 +139,10 @@ class CONTENT_EXPORT NavigationRequest
// asynchronous.
WILL_PROCESS_RESPONSE,
@@ -106,10 +106,10 @@ index e29e67f5c91215a317d4244c7b62d89bea91a1fe..7ed0f9e6586b42b073d9dea8225baf38
READY_TO_COMMIT,
diff --git a/content/browser/renderer_host/render_frame_host_manager.cc b/content/browser/renderer_host/render_frame_host_manager.cc
index 91f88109dacae55b8bb849e13d06309e89d028db..b57dbf3fb0aa6f9398cf09839d4208c5f055ee70 100644
index d3cc62fa063918b50ceb8f854bcc737f9e53193f..e09db90709c7b7b1c652d6e1b12e513d5bd6a10e 100644
--- a/content/browser/renderer_host/render_frame_host_manager.cc
+++ b/content/browser/renderer_host/render_frame_host_manager.cc
@@ -2745,6 +2745,16 @@ scoped_refptr<SiteInstance>
@@ -2804,6 +2804,16 @@ scoped_refptr<SiteInstance>
RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
NavigationRequest* request,
std::string* reason) {
@@ -126,7 +126,7 @@ index 91f88109dacae55b8bb849e13d06309e89d028db..b57dbf3fb0aa6f9398cf09839d4208c5
SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
// All children of MHTML documents must be MHTML documents. They all live in
@@ -2772,10 +2782,59 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -2831,10 +2841,59 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
//
// TODO(clamy): We should also consider as a candidate SiteInstance the
// speculative SiteInstance that was computed on redirects.
@@ -190,7 +190,7 @@ index 91f88109dacae55b8bb849e13d06309e89d028db..b57dbf3fb0aa6f9398cf09839d4208c5
// Account for renderer-initiated reload as well.
// Needed as a workaround for https://crbug.com/1045524, remove it when it is
@@ -2815,6 +2874,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -2867,6 +2926,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@@ -201,10 +201,10 @@ index 91f88109dacae55b8bb849e13d06309e89d028db..b57dbf3fb0aa6f9398cf09839d4208c5
}
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index 17ba2e76bc9b1e39c0b9e6e8938764c3096cfac4..9f36ec582037cb1b25fad95b1df5145c233f9b94 100644
index 216d9a065146a10fd6187cde30ce725ac1acf2a8..807125e8b47793efe998b76e95e94aae62259107 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -792,6 +792,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) {
@@ -1015,6 +1015,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const SiteInfo& site_info) {
return browsing_instance_->HasSiteInstance(site_info);
}
@@ -216,10 +216,10 @@ index 17ba2e76bc9b1e39c0b9e6e8938764c3096cfac4..9f36ec582037cb1b25fad95b1df5145c
const GURL& url) {
return GetRelatedSiteInstanceImpl(
diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
index 1d79bf9261aad6e649a029257f7e6848cc34ad69..64cd5e188786ed60e474aeb1cabacd3d85069ae0 100644
index 95da3d92e7732c233148ebdc8df0e8e440109bee..b32f71aaedad4e291cd18009c23845f754eea7ca 100644
--- a/content/browser/site_instance_impl.h
+++ b/content/browser/site_instance_impl.h
@@ -323,6 +323,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
@@ -409,6 +409,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
BrowserContext* GetBrowserContext() override;
const GURL& GetSiteURL() override;
scoped_refptr<SiteInstance> GetRelatedSiteInstance(const GURL& url) override;
@@ -228,10 +228,10 @@ index 1d79bf9261aad6e649a029257f7e6848cc34ad69..64cd5e188786ed60e474aeb1cabacd3d
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 e3088a155d552c87f009cec282f32730d9cb3655..d645a77362fad0033a256c2b946e8d6ce803c771 100644
index 8d899d675d0eca0856269e9887371a6f633ef767..060d1fd273f4cd8da5898c0eb5b3b21bd38d766a 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -66,6 +66,21 @@
@@ -69,6 +69,21 @@
namespace content {
@@ -254,12 +254,12 @@ index e3088a155d552c87f009cec282f32730d9cb3655..d645a77362fad0033a256c2b946e8d6c
const MainFunctionParams& parameters) {
return nullptr;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index ecd1d367a7634e377bffbe7590d2c21b49a56e93..84a0da56a65770f061728329b2a178533278aeec 100644
index 52a300a553742469ad7eea7ccb85e5e9988363b7..656706320502312bd81a3af4e4185692cc841adb 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -254,8 +254,45 @@ class CONTENT_EXPORT ContentBrowserClient {
using IsClipboardPasteAllowedCallback =
base::OnceCallback<void(ClipboardPasteAllowed)>;
@@ -257,8 +257,45 @@ class CONTENT_EXPORT ContentBrowserClient {
using IsClipboardPasteContentAllowedCallback =
base::OnceCallback<void(ClipboardPasteContentAllowed)>;
+ // Identifies the type of site instance to use for a navigation.
+ enum SiteInstanceForNavigationType {
@@ -304,7 +304,7 @@ index ecd1d367a7634e377bffbe7590d2c21b49a56e93..84a0da56a65770f061728329b2a17853
// implementations for the browser startup code. See comments in
// browser_main_parts.h.
diff --git a/content/public/browser/site_instance.h b/content/public/browser/site_instance.h
index a721f2fbab6e621085a8c7806abd92b8077340a8..e9b936e05e1d6ac8ea6eb5eb4d412b37ae4acc86 100644
index 25502c2f733b63618ca4960501228a62dd181a64..c7234855bfd176cb334a296a8b19fd10a4052a3d 100644
--- a/content/public/browser/site_instance.h
+++ b/content/public/browser/site_instance.h
@@ -135,6 +135,11 @@ class CONTENT_EXPORT SiteInstance : public base::RefCounted<SiteInstance> {

View File

@@ -7,10 +7,10 @@ We don't use gin to create the V8 platform, because we need to inject Node
things.
diff --git a/gin/isolate_holder.cc b/gin/isolate_holder.cc
index 872025f8e29907f90b6b775f1bda4ad2dc19d491..5633e066f6ec829d050f4d154d618cf664ec8dc0 100644
index 73435b1c2c008a376421f8c94059fdb61d58feed..9ded78a8fd05bf4278c9800fcd0cdea6cefa2ac8 100644
--- a/gin/isolate_holder.cc
+++ b/gin/isolate_holder.cc
@@ -107,9 +107,10 @@ IsolateHolder::~IsolateHolder() {
@@ -105,9 +105,10 @@ IsolateHolder::~IsolateHolder() {
// static
void IsolateHolder::Initialize(ScriptMode mode,
v8::ArrayBuffer::Allocator* allocator,
@@ -24,10 +24,10 @@ index 872025f8e29907f90b6b775f1bda4ad2dc19d491..5633e066f6ec829d050f4d154d618cf6
g_reference_table = reference_table;
}
diff --git a/gin/public/isolate_holder.h b/gin/public/isolate_holder.h
index a8eb7190ddb87405e8d5b810c75d3fac6bab2120..689571089c3619f45d2f03df01f83bd73df55ba2 100644
index f23af2d9738f3aa76e3a49301e1c3216ee4a64b4..ede178acabc63c3c33d6ce93efd5632bec50ba89 100644
--- a/gin/public/isolate_holder.h
+++ b/gin/public/isolate_holder.h
@@ -89,7 +89,8 @@ class GIN_EXPORT IsolateHolder {
@@ -88,7 +88,8 @@ class GIN_EXPORT IsolateHolder {
// reference pointers. Otherwise, it can be nullptr.
static void Initialize(ScriptMode mode,
v8::ArrayBuffer::Allocator* allocator,
@@ -38,7 +38,7 @@ index a8eb7190ddb87405e8d5b810c75d3fac6bab2120..689571089c3619f45d2f03df01f83bd7
v8::Isolate* isolate() { return isolate_; }
diff --git a/gin/v8_initializer.cc b/gin/v8_initializer.cc
index 2aba21ed3233460a660845b12ed7b88d33985dba..2b9e4956d8abb80f5cd44345816ed8af98d277f1 100644
index e9cc71b968428b8806db8ad5089cc84f28f8cdbb..e5eff4f655bbaa1379499c2e480a930648e8d84b 100644
--- a/gin/v8_initializer.cc
+++ b/gin/v8_initializer.cc
@@ -198,12 +198,14 @@ enum LoadV8FileResult {

View File

@@ -40,10 +40,10 @@ index 23bd3c93795488055a4db2d81c22d7fdb18b0092..5c23468ec6289f331fd4aabdb844fcb8
// 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 bb38974278df53fab6f91bfce1a94b3a686beced..957a464f86940441d70b012351d6f6d82bae284f 100644
index 8546a5b6accf1e848a6ef31bbd1e9049a165e2a2..eca11c451cb7e23412ae0942a558cd188d173951 100644
--- a/content/browser/gpu/gpu_data_manager_impl_private.cc
+++ b/content/browser/gpu/gpu_data_manager_impl_private.cc
@@ -1073,6 +1073,11 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
@@ -1075,6 +1075,11 @@ void GpuDataManagerImplPrivate::TerminateInfoCollectionGpuProcess() {
host->ForceShutdown();
}

View File

@@ -6,10 +6,10 @@ Subject: gritsettings_resource_ids.patch
Add electron resources file to the list of resource ids generation.
diff --git a/tools/gritsettings/resource_ids.spec b/tools/gritsettings/resource_ids.spec
index 91e764e8a85f041df9577d0212f9a62c65556e0d..6b4725f517593990b8b3baf6d6fe487b9926a571 100644
index cecbbaf47ca01d6a27b1fae6e973658a92a524ad..e90cd439ed661f8364394f5a1097129bc8fb5097 100644
--- a/tools/gritsettings/resource_ids.spec
+++ b/tools/gritsettings/resource_ids.spec
@@ -701,6 +701,11 @@
@@ -753,6 +753,11 @@
"includes": [3880],
},

View File

@@ -6,10 +6,10 @@ 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 5491aef735fc277521acbff97c1484fa81ef9ba4..8ff2728d1843e6d436aa2c59a6b991f2f257e864 100644
index 150276479687782e9902af2c5435c3cea9df5295..42a4f685d75f7b20082e506331507bfe0b3044bd 100644
--- a/build/config/linux/gtk/BUILD.gn
+++ b/build/config/linux/gtk/BUILD.gn
@@ -29,6 +29,8 @@ group("gtk") {
@@ -35,6 +35,8 @@ group("gtk") {
# This should probably be moved into //ui/gtk.
"//ui/ozone/platform/wayland",

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 e6348dc2ec5d57b9288380791ded9c978774e506..32decd4a731170d60e0fe633530bd1b9f95d348f 100644
index b8f419e2b78576a3f5bdc6f53ee79bf6468c52c2..103761649c95841ca4b46c3bb6a905c01b2a9625 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

@@ -7,10 +7,10 @@ Dont compare RC.exe and RC.py output.
FIXME: It has to be reverted once the script is fixed.
diff --git a/build/toolchain/win/rc/rc.py b/build/toolchain/win/rc/rc.py
index 74761866eecfe4e742af974aab71ec05817c3a6a..91ad9ac4c7d59be0cc95341d61e0e30a23869601 100755
index 2ab41225fba8d22a974286835e4c454ef2e54f54..97a61e24e726144ff56d4a68dab5240555613d1a 100755
--- a/build/toolchain/win/rc/rc.py
+++ b/build/toolchain/win/rc/rc.py
@@ -234,7 +234,10 @@ def CompareToMsRcOutput(preprocessed_output, is_utf8, flags):
@@ -245,7 +245,10 @@ def CompareToMsRcOutput(preprocessed_output, is_utf8, flags):
# Assert Microsoft rc.exe and rc.py produced identical .res files.
if rc_exe_exit_code == 0:
import filecmp

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