Compare commits

...

16 Commits

Author SHA1 Message Date
Electron Bot
80b780f277 Bump v10.0.0-nightly.20200409 2020-04-09 08:32:52 -07:00
John Kleinschmidt
23ae0e6bd8 chore: remove no longer needed debugging patch (#23030) 2020-04-09 10:30:02 -04:00
Cheng Zhao
ca947307db chore: make WebContentsView take webPreferences as parameter (#22997)
* chore: add WebContentsView.webContents helper

* chore: no need to handle webContents option

* chore: Create WebContentsView in C++

* chore: make WebContentsView accept web_preferences

* fix: nativeWindowOpen still passes WebContents to BrowserWindow

* chore: no more need of WebContentsViewRelay

* test: WebContentsView now takes options

* fix: avoid creating 2 constructors
2020-04-09 16:01:16 +09:00
Shelley Vohr
de893360f7 fix: missing HandleScope in OnDownloadPathGenerated (#23005) 2020-04-08 12:47:43 -07:00
Jeremy Apthorp
29f773e008 ci: auto-3way patches and detect changes (#22976) 2020-04-08 08:59:14 -07:00
Electron Bot
fd3488f0bf Bump v10.0.0-nightly.20200408 2020-04-08 08:32:12 -07:00
Andrea Brancaleoni
5b8abe953f build: strip local/dbg symbols, from Linux binaries (#22968)
Non full stripping seems to be the cause of limited
non-determinism. Employ similar default as macOS when
stripping away symbols.

--disacard-all     Remove all local symbols (saving only global symbols).
--strip-debug      Remove the debugging symbol table entries (those created by the -g option to cc(1) and other compilers).
2020-04-08 11:29:14 -04:00
Shelley Vohr
54f8c4e6a3 fix: nullptr check when closing windows (#22948) 2020-04-07 20:41:14 -07:00
Shelley Vohr
a7469f82ac fix: persist maximizable state when toggling fullscreen (#22988) 2020-04-07 20:40:32 -07:00
Felix Rieseberg
b4447be037 docs: Update the "Electron vs NW.js" document (#22836)
* docs: Update the "Electron vs NW.js" document

* Update docs/development/electron-vs-nwjs.md

Co-Authored-By: Charles Kerr <ckerr@github.com>

* Update docs/development/electron-vs-nwjs.md

Co-Authored-By: Mark Lee <malept@users.noreply.github.com>

* Update docs/development/electron-vs-nwjs.md

Co-Authored-By: Mark Lee <malept@users.noreply.github.com>

Co-authored-by: Charles Kerr <ckerr@github.com>
Co-authored-by: Mark Lee <malept@users.noreply.github.com>
2020-04-07 18:31:40 -07:00
Jeremy Apthorp
6bf83e9244 docs: note that shell can't be used in sandboxed renderers (#22974) 2020-04-07 09:55:01 -07:00
Electron Bot
468994bf6a Bump v10.0.0-nightly.20200407 2020-04-07 08:31:39 -07:00
Samuel Attard
0d2e967960 feat: expose electron/{process} typed modules (#22937)
* feat: expose electron/{process} typed modules

* chore: update imports for common modules

* chore: update typescript generator

* chore: remap electron/* to the internal packages
2020-04-06 17:04:09 -07:00
Jeremy Apthorp
5b53f1a39c build: set merge=union for .patches (#22985) 2020-04-06 15:15:35 -07:00
Electron Bot
ccf70326c0 chore: bump chromium to 1ba9678489174a6123358a7683f37 (master) (#22719)
Co-authored-by: John Kleinschmidt <jkleinsc@github.com>
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
Co-authored-by: Andy Locascio <andy@slack-corp.com>
2020-04-06 13:09:52 -07:00
Electron Bot
c85d71903f Bump v10.0.0-nightly.20200406 2020-04-06 08:31:36 -07:00
141 changed files with 900 additions and 823 deletions

View File

@@ -231,7 +231,25 @@ step-gclient-sync: &step-gclient-sync
$GCLIENT_EXTRA_ARGS \
"$CIRCLE_REPOSITORY_URL"
gclient sync --with_branch_heads --with_tags
ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 gclient sync --with_branch_heads --with_tags
# Re-export all the patches to check if there were changes.
python src/electron/script/export_all_patches.py src/electron/patches/config.json
cd src/electron
git update-index --refresh
if ! git diff-index --quiet HEAD --; then
# There are changes to the patches. Make a git commit with the updated patches
git add patches
GIT_COMMITTER_NAME="Electron Bot" GIT_COMMITTER_EMAIL="anonymous@electronjs.org" git commit -m "update patches" --author="Electron Bot <anonymous@electronjs.org>"
# Export it
mkdir -p ../../patches
git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch
echo
echo "======================================================================"
echo "There were changes to the patches when applying."
echo "Check the CI artifacts for a patch you can apply to fix it."
echo "======================================================================"
exit 1
fi
fi
step-setup-env-for-build: &step-setup-env-for-build
@@ -981,6 +999,8 @@ steps-checkout-and-save-cache: &steps-checkout-and-save-cache
- *step-set-git-cache-path
# This sync call only runs if .circle-sync-done is an EMPTY file
- *step-gclient-sync
- store_artifacts:
path: patches
- *step-save-git-cache
# These next few steps reset Electron to the correct commit regardless of which cache was restored
- run:
@@ -1301,6 +1321,8 @@ commands:
- *step-set-git-cache-path
# This sync call only runs if .circle-sync-done is an EMPTY file
- *step-gclient-sync
- store_artifacts:
path: patches
# These next few steps reset Electron to the correct commit regardless of which cache was restored
- when:
condition: << parameters.preserve-vendor-dirs >>

1
.gitattributes vendored
View File

@@ -1,3 +1,4 @@
# `git apply` and friends don't understand CRLF, even on windows. Force those
# files to be checked out with LF endings even if core.autocrlf is true.
*.patch text eol=lf
patches/**/.patches merge=union

View File

@@ -224,7 +224,6 @@ grit("resources") {
]
# Mojo manifest overlays are generated.
source_is_generated = true
grit_flags = [
"-E",
"target_gen_dir=" + rebase_path(target_gen_dir, root_build_dir),
@@ -714,7 +713,6 @@ if (is_mac) {
sources = [
"$root_out_dir/egl_intermediates/libEGL.dylib",
"$root_out_dir/egl_intermediates/libGLESv2.dylib",
"$root_out_dir/egl_intermediates/libvulkan.dylib",
]
outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
public_deps = [ "//ui/gl:angle_library_copy" ]

2
DEPS
View File

@@ -12,7 +12,7 @@ gclient_gn_args = [
vars = {
'chromium_version':
'f3d154dbc31bd902e8eecfd48fd85d01d0eea0f2',
'0f55a0804ce1ba9678489174a6123358a7683f37',
'node_version':
'v12.16.1',
'nan_version':

View File

@@ -1 +1 @@
10.0.0-nightly.20200403
10.0.0-nightly.20200409

View File

@@ -109,11 +109,15 @@ static_library("chrome") {
]
if (use_aura) {
sources += [
"//chrome/browser/platform_util_aura.cc",
"//chrome/browser/ui/views/color_chooser_aura.cc",
"//chrome/browser/ui/views/color_chooser_aura.h",
]
sources += [ "//chrome/browser/platform_util_aura.cc" ]
if (!is_win) {
sources += [
"//chrome/browser/ui/views/color_chooser_aura.cc",
"//chrome/browser/ui/views/color_chooser_aura.h",
]
}
deps += [ "//components/feature_engagement" ]
}

View File

@@ -111,7 +111,11 @@ A `Boolean` that controls whether or not process warnings printed to `stderr` in
### `process.type` _Readonly_
A `String` representing the current process's type, can be `"browser"` (i.e. main process), `"renderer"`, or `"worker"` (i.e. web worker).
A `String` representing the current process's type, can be:
* `browser` - The main process
* `renderer` - A renderer process
* `worker` - In a web worker
### `process.versions.chrome` _Readonly_

View File

@@ -2,7 +2,7 @@
> Manage files and URLs using their default applications.
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process)
Process: [Main](../glossary.md#main-process), [Renderer](../glossary.md#renderer-process) (non-sandboxed only)
The `shell` module provides functions related to desktop integration.
@@ -14,6 +14,8 @@ const { shell } = require('electron')
shell.openExternal('https://github.com')
```
**Note:** While the `shell` module can be used in the renderer process, it will not function in a sandboxed renderer.
## Methods
The `shell` module has the following methods:

View File

@@ -1,52 +0,0 @@
# Technical Differences Between Electron and NW.js (formerly node-webkit)
__Note: Electron was previously named Atom Shell.__
Like NW.js, Electron provides a platform to write desktop applications
with JavaScript and HTML and has Node integration to grant access to the low
level system from web pages.
But there are also fundamental differences between the two projects that make
Electron a completely separate product from NW.js:
__1. Entry of Application__
In NW.js the main entry point of an application is a web page or a JS script. You specify a
html or js file in the `package.json` and it is opened in a browser window as
the application's main window (in case of an html entrypoint) or the script is executed.
In Electron, the entry point is a JavaScript script. Instead of
providing a URL directly, you manually create a browser window and load
an HTML file using the API. You also need to listen to window events
to decide when to quit the application.
Electron works more like the Node.js runtime. Electron's APIs are lower level
so you can use it for browser testing in place of [PhantomJS](http://phantomjs.org/).
__2. Build System__
In order to avoid the complexity of building all of Chromium, Electron uses [`libchromiumcontent`](https://github.com/electron/libchromiumcontent) to access
Chromium's Content API. `libchromiumcontent` is a single shared library that
includes the Chromium Content module and all of its dependencies. Users don't
need a powerful machine to build Electron.
__3. Node Integration__
In NW.js, the Node integration in web pages requires patching Chromium to
work, while in Electron we chose a different way to integrate the libuv loop
with each platform's message loop to avoid hacking Chromium. See the
[`node_bindings`][node-bindings] code for how that was done.
__4. Multi-context__
If you are an experienced NW.js user, you should be familiar with the
concept of Node context and web context. These concepts were invented because
of how NW.js was implemented.
By using the [multi-context](https://github.com/nodejs/node-v0.x-archive/commit/756b622)
feature of Node, Electron doesn't introduce a new JavaScript context in web
pages.
Note: NW.js has optionally supported multi-context since 0.13.
[node-bindings]: https://github.com/electron/electron/tree/master/atom/common

View File

@@ -0,0 +1,75 @@
# Technical Differences Between Electron and NW.js
Like [NW.js][nwjs], Electron provides a platform to write desktop applications with web
technologies. Both platforms enable developers to utilize HTML, JavaScript, and
Node.js. On the surface, they seem very similar.
There are however fundamental differences between the two projects that make
Electron a completely separate product from NW.js.
## 1) Entry of Application
In NW.js, the main entry point of an application can be an HTML web page. In
that case, NW.js will open the given entry point in a browser window.
In Electron, the entry point is always a JavaScript script. Instead of providing a
URL directly, you manually create a browser window and load an HTML file using
the API. You also need to listen to window events to decide when to quit the
application.
Electron works more like the Node.js runtime. Electron's APIs are lower level so
you can use it for browser testing in place of
[PhantomJS](http://phantomjs.org/).
## 2) Node Integration
In NW.js, the Node integration in web pages requires patching Chromium to work,
while in Electron we chose a different way to integrate the `libuv` loop with
each platform's message loop to avoid hacking Chromium. See the
[`node_bindings`][node-bindings] code for how that was done.
## 3) JavaScript Contexts
If you are an experienced NW.js user, you should be familiar with the concept of
Node context and web context. These concepts were invented because of how NW.js
was implemented.
By using the
[multi-context](https://github.com/nodejs/node-v0.x-archive/commit/756b622)
feature of Node, Electron doesn't introduce a new JavaScript context in web
pages.
Note: NW.js has optionally supported multi-context since 0.13.
## 4) Legacy Support
NW.js still offers a "legacy release" that supports Windows XP. It doesn't
receive security updates.
Given that hardware manufacturers, Microsoft, Chromium, and Node.js haven't
released even critical security updates for that system, we have to warn you
that using Windows XP is wildly insecure and outright irresponsible.
However, we understand that requirements outside our wildest imagination may
exist, so if you're looking for something like Electron that runs on Windows XP,
the NW.js legacy release might be the right fit for you.
## 5) Features
There are numerous differences in the amount of supported features. Electron has
a bigger community, more production apps using it, and [a large amount of
userland modules available on npm][electron-modules].
As an example, Electron has built-in support for automatic updates and countless
tools that make the creation of installers easier. As an example in favor of
NW.js, NW.js supports more `Chrome.*` APIs for the development of Chrome Apps.
Naturally, we believe that Electron is the better platform for polished
production applications built with web technologies (like Visual Studio Code,
Slack, or Facebook Messenger); however, we want to be fair to our web technology
friends. If you have feature needs that Electron does not meet, you might want
to try NW.js.
[nwjs]: https://nwjs.io/
[electron-modules]: https://www.npmjs.com/search?q=electron
[node-bindings]: https://github.com/electron/electron/tree/master/lib/common

View File

@@ -1,7 +1,7 @@
'use strict';
const electron = require('electron');
const { WebContentsView, TopLevelWindow, deprecate } = electron;
const { TopLevelWindow, deprecate } = electron;
const { BrowserWindow } = process.electronBinding('window');
Object.setPrototypeOf(BrowserWindow.prototype, TopLevelWindow.prototype);
@@ -13,9 +13,6 @@ BrowserWindow.prototype._init = function () {
// Avoid recursive require.
const { app } = electron;
// Create WebContentsView.
this.setContentView(new WebContentsView(this.webContents));
const nativeSetBounds = this.setBounds;
this.setBounds = (bounds, ...opts) => {
bounds = {

View File

@@ -22,19 +22,29 @@ Module._nodeModulePaths = function (from: string) {
};
// Make a fake Electron module that we will insert into the module cache
const electronModule = new Module('electron', null);
electronModule.id = 'electron';
electronModule.loaded = true;
electronModule.filename = 'electron';
Object.defineProperty(electronModule, 'exports', {
get: () => require('electron')
});
const makeElectronModule = (name: string) => {
const electronModule = new Module('electron', null);
electronModule.id = 'electron';
electronModule.loaded = true;
electronModule.filename = name;
Object.defineProperty(electronModule, 'exports', {
get: () => require('electron')
});
Module._cache[name] = electronModule;
};
Module._cache.electron = electronModule;
makeElectronModule('electron');
makeElectronModule('electron/common');
if (process.type === 'browser') {
makeElectronModule('electron/main');
}
if (process.type === 'renderer') {
makeElectronModule('electron/renderer');
}
const originalResolveFilename = Module._resolveFilename;
Module._resolveFilename = function (request: string, parent: NodeModule, isMain: boolean) {
if (request === 'electron') {
if (request === 'electron' || request.startsWith('electron/')) {
return 'electron';
} else {
return originalResolveFilename(request, parent, isMain);

View File

@@ -1,11 +1,11 @@
{
"name": "electron",
"version": "10.0.0-nightly.20200403",
"version": "10.0.0-nightly.20200409",
"repository": "https://github.com/electron/electron",
"description": "Build cross platform desktop apps with JavaScript, HTML, and CSS",
"devDependencies": {
"@electron/docs-parser": "^0.7.2",
"@electron/typescript-definitions": "^8.6.4",
"@electron/typescript-definitions": "^8.7.2",
"@octokit/rest": "^16.3.2",
"@primer/octicons": "^9.1.1",
"@types/basic-auth": "^1.1.3",

View File

@@ -9,7 +9,7 @@ Refs https://github.com/nodejs/node/pull/26960.
Upstreamed at https://boringssl-review.googlesource.com/c/boringssl/+/38524.
diff --git a/include/openssl/evp.h b/include/openssl/evp.h
index 19baa64ddba84c3dd59e65aef77d1ebbf49e43df..37217c49f7e05eb25562023bf356fdadae1bc66f 100644
index fe6c8b6adb3ec1259f1d66d7b77da3577cbaf2dc..d15cbdc394fbd0944314375115e38380462d17f4 100644
--- a/include/openssl/evp.h
+++ b/include/openssl/evp.h
@@ -723,6 +723,18 @@ OPENSSL_EXPORT int EVP_PKEY_CTX_set_rsa_padding(EVP_PKEY_CTX *ctx, int padding);

View File

@@ -48,7 +48,6 @@ dump_syms.patch
command-ismediakey.patch
tts.patch
printing.patch
verbose_generate_breakpad_symbols.patch
support_mixed_sandbox_with_zygote.patch
autofill_size_calculation.patch
fix_disable_usage_of_abort_report_np_in_mas_builds.patch
@@ -95,3 +94,4 @@ feat_add_onclose_to_messageport.patch
gin_allow_passing_an_objecttemplate_to_objecttemplatebuilder.patch
gin_forward_args_when_dispatching.patch
fix_undo_redo_broken_in_webviews.patch
fix_account_for_print_preview_disabled_when_printing_to_pdf.patch

View File

@@ -23,10 +23,10 @@ index 156ba739a984347135857f8019fda0bfb01c97ad..f4093e9bb8b54d82c6d70375977c0ad9
int32_t world_id) {}
virtual void DidClearWindowObject() {}
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index e65c52f5a019ef1a0c0a2fad07c994727e21a2ec..6c6265561512d1700b6b77a84ba127511a65483a 100644
index e9640890df219ebc384a7fe83559ecd865f8ccab..f15855248d6b7d2ff79d808aacc9dde158428cc8 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -4900,6 +4900,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
@@ -4921,6 +4921,12 @@ void RenderFrameImpl::DidCreateScriptContext(v8::Local<v8::Context> context,
observer.DidCreateScriptContext(context, world_id);
}
@@ -40,7 +40,7 @@ index e65c52f5a019ef1a0c0a2fad07c994727e21a2ec..6c6265561512d1700b6b77a84ba12751
int world_id) {
for (auto& observer : observers_)
diff --git a/content/renderer/render_frame_impl.h b/content/renderer/render_frame_impl.h
index aab87eff90494513774a0815a31a5888f435547a..07bef1588daee774f06b7732250b43e6754b5751 100644
index ac3e90f840f42a914878dcbc5c3608ac12d37175..adfb25f44ada0fc68e663bb0a3bfe01db408b941 100644
--- a/content/renderer/render_frame_impl.h
+++ b/content/renderer/render_frame_impl.h
@@ -746,6 +746,8 @@ class CONTENT_EXPORT RenderFrameImpl
@@ -67,10 +67,10 @@ index d821defb3304d476dbca602a89e911416d2ddb12..e2ff4c947e6dab395fa35664a9c50ce3
virtual void WillReleaseScriptContext(v8::Local<v8::Context>,
int32_t world_id) {}
diff --git a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
index d20d24c0ba6025af06f5f61cefd3e96e687c123d..c6cb7af9c2ec7e812954b7725f8506c1d9d115de 100644
index 81457a2e2b5723aa2ff218b4e410d55d7b7f14f8..a62f6c58bb0aaac836edfd87ab2a6f61045059dc 100644
--- a/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
+++ b/third_party/blink/renderer/bindings/core/v8/local_window_proxy.cc
@@ -215,6 +215,7 @@ void LocalWindowProxy::Initialize() {
@@ -201,6 +201,7 @@ void LocalWindowProxy::Initialize() {
}
InstallConditionalFeatures();
@@ -123,10 +123,10 @@ index 7843fbbf746a976ff8d94caabc8dec95d49e2b09..850f1aa843e34441a05bd1785896e100
int32_t world_id) = 0;
virtual bool AllowScriptExtensions() = 0;
diff --git a/third_party/blink/renderer/core/loader/empty_clients.h b/third_party/blink/renderer/core/loader/empty_clients.h
index b412f0c87075c200f05e85bad2c000242f9a1a75..07d67b2e5de39f4107931e13e461e3d796eacade 100644
index ad193eee54963de001cee76153c6fafa25b814a1..d232898dfac0ba8f4b54a96b87e604dfea7ff7fc 100644
--- a/third_party/blink/renderer/core/loader/empty_clients.h
+++ b/third_party/blink/renderer/core/loader/empty_clients.h
@@ -369,6 +369,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
@@ -340,6 +340,8 @@ class CORE_EXPORT EmptyLocalFrameClient : public LocalFrameClient {
void DidCreateScriptContext(v8::Local<v8::Context>,
int32_t world_id) override {}

View File

@@ -70,10 +70,10 @@ index 095ca3db051362319611976b9052725ab16c1b3a..13e802a5732f0b04832d6dd8031ae43e
WTF::Partitions::ArrayBufferPartition()->Free(data);
}
diff --git a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h
index 2e871b20c1e6fc3703178957fd03923f02ab1b47..8f2fd80130f1e7f957d642af4e5c22f9a5937ce4 100644
index cce802e4fc94c258607bc943d9902e6d18173c44..4f7f4eaf005aac701360e567e6faca7f2e0ff3da 100644
--- a/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h
+++ b/third_party/blink/renderer/core/typed_arrays/array_buffer/array_buffer_contents.h
@@ -106,6 +106,7 @@ class CORE_EXPORT ArrayBufferContents {
@@ -108,6 +108,7 @@ class CORE_EXPORT ArrayBufferContents {
void CopyTo(ArrayBufferContents& other);
static void* AllocateMemoryOrNull(size_t, InitializationPolicy);

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 c37432121142472010b767b7fb257e20bc60b3fc..099c94d1db7994a0608864cb05e3686a85b7070d 100644
index a46aab1db2de282e0ff3561a98bad1dac659b67a..31ce9719f63c564baf88e48c7494e030cf9d148c 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -193,6 +193,25 @@ struct HttpAuthStaticNetworkContextParams {
@@ -159,6 +159,25 @@ struct HttpAuthStaticNetworkContextParams {
= DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS;
};
@@ -39,7 +39,7 @@ index c37432121142472010b767b7fb257e20bc60b3fc..099c94d1db7994a0608864cb05e3686a
interface CertVerifierClient {
Verify(
int32 default_error,
@@ -633,6 +652,8 @@ struct URLLoaderFactoryParams {
@@ -603,6 +622,8 @@ struct URLLoaderFactoryParams {
// interface. This still respects the per-context block lists.
CorsOriginAccessPatterns? factory_bound_access_patterns;
@@ -49,7 +49,7 @@ index c37432121142472010b767b7fb257e20bc60b3fc..099c94d1db7994a0608864cb05e3686a
NetworkIsolationKey? network_isolation_key;
diff --git a/services/network/url_loader.cc b/services/network/url_loader.cc
index 9452018180979377728162209651ebd914bd95a4..6c9f3192260bcce252c7868e042bd40a205b55b8 100644
index fb4f8ad895c685922af873f96f62ad4662a70f24..07fa817025eae412f43f6311b68d26753c44ff50 100644
--- a/services/network/url_loader.cc
+++ b/services/network/url_loader.cc
@@ -486,6 +486,7 @@ URLLoader::URLLoader(
@@ -57,10 +57,10 @@ index 9452018180979377728162209651ebd914bd95a4..6c9f3192260bcce252c7868e042bd40a
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
+ mojom::TrustedURLLoaderAuthClient* url_loader_auth_client,
mojom::OriginPolicyManager* origin_policy_manager)
mojom::OriginPolicyManager* origin_policy_manager,
std::unique_ptr<TrustTokenRequestHelper> trust_token_helper)
: url_request_context_(url_request_context),
network_service_client_(network_service_client),
@@ -544,6 +545,11 @@ URLLoader::URLLoader(
@@ -546,6 +547,11 @@ URLLoader::URLLoader(
header_client_.set_disconnect_handler(
base::BindOnce(&URLLoader::OnMojoDisconnect, base::Unretained(this)));
}
@@ -72,7 +72,7 @@ index 9452018180979377728162209651ebd914bd95a4..6c9f3192260bcce252c7868e042bd40a
if (want_raw_headers_) {
options_ |= mojom::kURLLoadOptionSendSSLInfoWithResponse |
mojom::kURLLoadOptionSendSSLInfoForCertificateError;
@@ -982,7 +988,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request,
@@ -1020,7 +1026,7 @@ void URLLoader::OnReceivedRedirect(net::URLRequest* url_request,
void URLLoader::OnAuthRequired(net::URLRequest* url_request,
const net::AuthChallengeInfo& auth_info) {
@@ -81,7 +81,7 @@ index 9452018180979377728162209651ebd914bd95a4..6c9f3192260bcce252c7868e042bd40a
OnAuthCredentials(base::nullopt);
return;
}
@@ -998,11 +1004,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
@@ -1036,11 +1042,20 @@ void URLLoader::OnAuthRequired(net::URLRequest* url_request,
if (url_request->response_headers())
head->headers = url_request->response_headers();
head->auth_challenge_info = auth_info;
@@ -108,18 +108,18 @@ index 9452018180979377728162209651ebd914bd95a4..6c9f3192260bcce252c7868e042bd40a
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 5b8e727e4a8f71d646eb2502d27256dcdae22e78..8b63418451933382b414e47001b9859017b60f7f 100644
index 9a07d08baf1f52234898951f8680a8b3a5c6e82f..e99228fd574cd5291d71de6a5f77cdda2debea7c 100644
--- a/services/network/url_loader.h
+++ b/services/network/url_loader.h
@@ -106,6 +106,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -111,6 +111,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
base::WeakPtr<KeepaliveStatisticsRecorder> keepalive_statistics_recorder,
base::WeakPtr<NetworkUsageAccumulator> network_usage_accumulator,
mojom::TrustedURLLoaderHeaderClient* url_loader_header_client,
+ mojom::TrustedURLLoaderAuthClient* url_loader_auth_client,
mojom::OriginPolicyManager* origin_policy_manager);
mojom::OriginPolicyManager* origin_policy_manager,
std::unique_ptr<TrustTokenRequestHelper> trust_token_helper);
~URLLoader() override;
@@ -413,6 +414,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
@@ -422,6 +423,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) URLLoader
base::Optional<base::UnguessableToken> fetch_window_id_;
mojo::Remote<mojom::TrustedHeaderClient> header_client_;
@@ -128,7 +128,7 @@ index 5b8e727e4a8f71d646eb2502d27256dcdae22e78..8b63418451933382b414e47001b98590
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 f3a9baefc1a18924503d7a6850bc704310e50015..9b3802dbdf7a1ab3f132529b794665a68eeac673 100644
index f17117db6f2ad140d797fad6a40fcd241c9538dd..a65a15d29df7a0667db56bbd768ef85aaff71d3d 100644
--- a/services/network/url_loader_factory.cc
+++ b/services/network/url_loader_factory.cc
@@ -66,6 +66,7 @@ URLLoaderFactory::URLLoaderFactory(
@@ -144,7 +144,7 @@ index f3a9baefc1a18924503d7a6850bc704310e50015..9b3802dbdf7a1ab3f132529b794665a6
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());
context_->origin_policy_manager(), nullptr /* trust_token_helper */);
cors_url_loader_factory_->OnLoaderCreated(std::move(loader));
}
diff --git a/services/network/url_loader_factory.h b/services/network/url_loader_factory.h

View File

@@ -14,7 +14,7 @@ when there is code doing that.
This patch reverts the change to fix the crash in Electron.
diff --git a/third_party/blink/renderer/core/frame/local_frame.cc b/third_party/blink/renderer/core/frame/local_frame.cc
index ca79027e5a5252cff9de7d7310b2b38908ab6161..463fce75e89ef92c3ce3a1254a0944eaee066322 100644
index 21d0735a9ebc16a7996567d5572d8783d9eb49d9..afc9c747b108a06a2023f17bdc106a95dc02a07b 100644
--- a/third_party/blink/renderer/core/frame/local_frame.cc
+++ b/third_party/blink/renderer/core/frame/local_frame.cc
@@ -473,10 +473,6 @@ void LocalFrame::DetachImpl(FrameDetachType type) {

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 2aefec4bd9877ee9109e3ab8ca9a8ab94d21b420..14a9a3c30164ced30d4bae47ea53f29ad831ab0d 100644
index 0b154417ea7cbbf1ad4b88bc80027a67f16faa7d..c5d9cd52989c0d776ac12a5c0b88782d2c40b213 100644
--- a/third_party/blink/public/web/web_local_frame.h
+++ b/third_party/blink/public/web/web_local_frame.h
@@ -333,6 +333,9 @@ class WebLocalFrame : public WebFrame {
@@ -334,6 +334,9 @@ class WebLocalFrame : public WebFrame {
// be calling this API.
virtual v8::Local<v8::Context> MainWorldScriptContext() const = 0;
@@ -21,7 +21,7 @@ index 2aefec4bd9877ee9109e3ab8ca9a8ab94d21b420..14a9a3c30164ced30d4bae47ea53f29a
// that the script evaluated to with callback. Script execution can be
// suspend.
diff --git a/third_party/blink/renderer/core/frame/web_local_frame_impl.cc b/third_party/blink/renderer/core/frame/web_local_frame_impl.cc
index da1e0054a3bf57364055b37aad06a65a3bab783e..99cd24e4665943369f38278ba0737d2eb79e713a 100644
index 2660078b0ed37bc3313e645f59e38cd306b1fdca..9cb4f3d02fccd6f1098c9b8080f1057642aead5f 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
@@ -922,6 +922,13 @@ v8::Local<v8::Object> WebLocalFrameImpl::GlobalProxy() const {
@@ -39,7 +39,7 @@ index da1e0054a3bf57364055b37aad06a65a3bab783e..99cd24e4665943369f38278ba0737d2e
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 1a349aee35a766015692922211b225e6cdeed97a..2e248e65407833ef893784b15e3e11d8cfeec371 100644
index a8d2023b6b33f56af0dab8909f5863f4be68a311..d7582f9c2f733d4beeb294df34dcbf09ce3970ce 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
@@ -160,6 +160,8 @@ class CORE_EXPORT WebLocalFrameImpl final

View File

@@ -9,24 +9,24 @@ potentially prevent a window from being created.
TODO(loc): this patch is currently broken.
diff --git a/content/browser/frame_host/render_frame_host_impl.cc b/content/browser/frame_host/render_frame_host_impl.cc
index 47749c430a71c3060c3e258ce1671bf6b03fa8c8..f2aedf5321a13742c6e3c2c4b7492b236a2d726c 100644
index 1a500821f9fec125935641a1d34cf2131167ade7..3aa36936a96ae2afb7c7abbd64f14e4b9bf82828 100644
--- a/content/browser/frame_host/render_frame_host_impl.cc
+++ b/content/browser/frame_host/render_frame_host_impl.cc
@@ -4305,6 +4305,7 @@ void RenderFrameHostImpl::CreateNewWindow(
@@ -4295,6 +4295,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,
+ params->raw_features, params->body,
effective_transient_activation_state, params->opener_suppressed,
&no_javascript_access);
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index 4311fd59dfd8db1dfbebd898c43c3b48caf6cdd7..2ddb86702558920cb372d2c8b3423b2d53d68e56 100644
index 1e0d0a28cfe2c25b186fac6eb2d02e96730c3934..ebe258f91f77ccbb0bb0a21ad511dce9b17f4e80 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2910,9 +2910,9 @@ void WebContentsImpl::CreateNewWindow(
@@ -2944,9 +2944,9 @@ RenderFrameHostDelegate* WebContentsImpl::CreateNewWindow(
}
if (delegate_) {
- delegate_->WebContentsCreated(this, render_process_id,
- opener->GetRoutingID(), params.frame_name,
@@ -35,14 +35,14 @@ index 4311fd59dfd8db1dfbebd898c43c3b48caf6cdd7..2ddb86702558920cb372d2c8b3423b2d
+ opener->GetRoutingID(),
+ params, new_contents_impl);
}
for (auto& observer : observers_) {
diff --git a/content/common/frame.mojom b/content/common/frame.mojom
index 00d9c34304266b49e3f9703ef1aea6524d026ed5..44bb5868b8c3699230d74de0f0903af572d000fc 100644
index edf716bca261df00ac7df5a34cec8fa57c526a3c..a54941f69da3b5810084221aaa96cb39dd5f5418 100644
--- a/content/common/frame.mojom
+++ b/content/common/frame.mojom
@@ -303,6 +303,10 @@ struct CreateNewWindowParams {
@@ -304,6 +304,10 @@ struct CreateNewWindowParams {
// The window features to use for the new window.
blink.mojom.WindowFeatures features;
+
@@ -50,13 +50,13 @@ index 00d9c34304266b49e3f9703ef1aea6524d026ed5..44bb5868b8c3699230d74de0f0903af5
+ string raw_features;
+ network.mojom.URLRequestBody? body;
};
// 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 702cd0792df47809d9278dd3af40e0e70494e229..75cd0ad7a8dc1efd89683d8da192050659c5016f 100644
index 89f33b33f8c848040f3bc6e34282688efda9c4db..294db724572266f54c9559bf5278920b819bef03 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -508,6 +508,8 @@ bool ContentBrowserClient::CanCreateWindow(
@@ -512,6 +512,8 @@ bool ContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -66,7 +66,7 @@ index 702cd0792df47809d9278dd3af40e0e70494e229..75cd0ad7a8dc1efd89683d8da1920506
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 ed0460f7e3c9e2149eed89f7d35a4bb457f6b29f..5fc3d0e31927b618d04024fcc42b2061580a4f22 100644
index 26cd6d1afcb89148ed33ab733012a778e9b75c40..c9b26a69ff139d91dd0c5deb65017eed5b9fda12 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -143,6 +143,7 @@ class NetworkService;
@@ -75,9 +75,9 @@ index ed0460f7e3c9e2149eed89f7d35a4bb457f6b29f..5fc3d0e31927b618d04024fcc42b2061
struct ResourceRequest;
+class ResourceRequestBody;
} // namespace network
namespace rappor {
@@ -825,6 +826,8 @@ class CONTENT_EXPORT ContentBrowserClient {
@@ -834,6 +835,8 @@ class CONTENT_EXPORT ContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -87,13 +87,13 @@ index ed0460f7e3c9e2149eed89f7d35a4bb457f6b29f..5fc3d0e31927b618d04024fcc42b2061
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 5aa89aef4dbf3fe4ac7ce56b99c371d188584351..72a434fa612cdb4521aab981f98883af87783a80 100644
index 17281521f8109279fe68e11abc2fcec41cfdf9c0..83b951dcf55b54661c8f855a8e10984d262c91b2 100644
--- a/content/public/browser/web_contents_delegate.cc
+++ b/content/public/browser/web_contents_delegate.cc
@@ -26,6 +26,17 @@ namespace content {
WebContentsDelegate::WebContentsDelegate() = default;
+void WebContentsDelegate::WebContentsCreatedWithFullParams(
+ WebContents* source_contents,
+ int opener_render_process_id,
@@ -109,7 +109,7 @@ index 5aa89aef4dbf3fe4ac7ce56b99c371d188584351..72a434fa612cdb4521aab981f98883af
const OpenURLParams& params) {
return nullptr;
diff --git a/content/public/browser/web_contents_delegate.h b/content/public/browser/web_contents_delegate.h
index 01db3853cb915dca4873c779f06bbf84b002abf6..4a8e4cf2386594e27e2dd8117bac78531b28830c 100644
index d10b0f458416044f0b5eaeac4160ac26a2857d94..4e3a846a3825216e1a77e17fd8e03331c6fb927b 100644
--- a/content/public/browser/web_contents_delegate.h
+++ b/content/public/browser/web_contents_delegate.h
@@ -16,6 +16,7 @@
@@ -120,10 +120,10 @@ index 01db3853cb915dca4873c779f06bbf84b002abf6..4a8e4cf2386594e27e2dd8117bac7853
#include "content/public/browser/bluetooth_chooser.h"
#include "content/public/browser/bluetooth_scanning_prompt.h"
#include "content/public/browser/invalidate_type.h"
@@ -333,6 +334,13 @@ class CONTENT_EXPORT WebContentsDelegate {
@@ -327,6 +328,13 @@ class CONTENT_EXPORT WebContentsDelegate {
const std::string& partition_id,
SessionStorageNamespace* session_storage_namespace);
+ virtual void WebContentsCreatedWithFullParams(
+ WebContents* source_contents,
+ int opener_render_process_id,
@@ -135,7 +135,7 @@ index 01db3853cb915dca4873c779f06bbf84b002abf6..4a8e4cf2386594e27e2dd8117bac7853
// 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 b3388258feb1d9fd791a975b08a382addd06af3a..98855151d1f07177a20b0f6079f2f48826d215ca 100644
index f0cb4833442be24dee52e2e172a0d22474d1135b..2cad532229217a2cee604298713be7aebc24dda8 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -68,6 +68,7 @@
@@ -146,10 +146,10 @@ index b3388258feb1d9fd791a975b08a382addd06af3a..98855151d1f07177a20b0f6079f2f488
#include "content/renderer/media/audio/audio_device_factory.h"
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_frame_proxy.h"
@@ -1255,6 +1256,10 @@ WebView* RenderViewImpl::CreateView(
@@ -1254,6 +1255,10 @@ WebView* RenderViewImpl::CreateView(
}
params->features = ConvertWebWindowFeaturesToMojoWindowFeatures(features);
+ params->raw_features = features.raw_features.Utf8(
+ WTF::UTF8ConversionMode::kStrictUTF8ConversionReplacingUnpairedSurrogatesWithFFFD);
+ params->body = GetRequestBodyForWebURLRequest(request);
@@ -158,10 +158,10 @@ index b3388258feb1d9fd791a975b08a382addd06af3a..98855151d1f07177a20b0f6079f2f488
// moved on send.
bool is_background_tab =
diff --git a/content/shell/browser/web_test/web_test_content_browser_client.cc b/content/shell/browser/web_test/web_test_content_browser_client.cc
index bf7c4bf0b76a89b1ecee6edc11fcfd06fe679968..79b2ba79653a251d3a4c3a54adbcd5c10c460b19 100644
index 4cb52a0e6a50a7a4dfe7f1413a73941ccf88eee0..39f339fefc99443488c98a43fb5e1c44f0abf3fc 100644
--- a/content/shell/browser/web_test/web_test_content_browser_client.cc
+++ b/content/shell/browser/web_test/web_test_content_browser_client.cc
@@ -333,6 +333,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
@@ -335,6 +335,8 @@ bool WebTestContentBrowserClient::CanCreateWindow(
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -171,10 +171,10 @@ index bf7c4bf0b76a89b1ecee6edc11fcfd06fe679968..79b2ba79653a251d3a4c3a54adbcd5c1
bool opener_suppressed,
bool* no_javascript_access) {
diff --git a/content/shell/browser/web_test/web_test_content_browser_client.h b/content/shell/browser/web_test/web_test_content_browser_client.h
index aaf3b8fed16bc2959941effaffd3aec87017ca59..1ea96df464f61c963a6d9aa224b9607e4221daa6 100644
index e8b25e58fc99e8966513f183c544317b73d75e90..6b0ba214f64cee799e4ff4cc11bd3ba6ad5a4405 100644
--- a/content/shell/browser/web_test/web_test_content_browser_client.h
+++ b/content/shell/browser/web_test/web_test_content_browser_client.h
@@ -71,6 +71,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
@@ -73,6 +73,8 @@ class WebTestContentBrowserClient : public ShellContentBrowserClient {
const std::string& frame_name,
WindowOpenDisposition disposition,
const blink::mojom::WindowFeatures& features,
@@ -190,11 +190,11 @@ index 4f735ad0d97eaac9a57dad137e479f8a7ec33a36..0a3c5821962c85609b64b3625fa6b8d6
@@ -31,6 +31,8 @@
#ifndef THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_WINDOW_FEATURES_H_
#define THIRD_PARTY_BLINK_PUBLIC_WEB_WEB_WINDOW_FEATURES_H_
+#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"
+
namespace blink {
struct WebWindowFeatures {
@@ -60,6 +62,8 @@ struct WebWindowFeatures {
bool noreferrer = false;
@@ -203,17 +203,17 @@ index 4f735ad0d97eaac9a57dad137e479f8a7ec33a36..0a3c5821962c85609b64b3625fa6b8d6
+
+ String raw_features;
};
} // 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 07cb6e3fabfa7a32f9923dcf4fbc8cebccdbde46..58e768bfcac2561f4427c71b6c31ba73f9be4b7b 100644
index 286b15de67b7c9978cd330a4ce557db5bc705118..a47797cedcee05ec07c1e7294f3843a204f344a7 100644
--- a/third_party/blink/renderer/core/frame/local_dom_window.cc
+++ b/third_party/blink/renderer/core/frame/local_dom_window.cc
@@ -1492,6 +1492,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
@@ -1756,6 +1756,7 @@ DOMWindow* LocalDOMWindow::open(v8::Isolate* isolate,
}
WebWindowFeatures window_features = GetWindowFeaturesFromString(features);
+ window_features.raw_features = features;
FrameLoadRequest frame_request(active_document,
ResourceRequest(completed_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 ee02b316abcd49b81cd43f7e532fdac4ec1c7dda..7b8e658b9fdca2e0c34946fe6a6658df3a5404f3 100644
index 1b62c3011049b39df220c210552e9f5993d8db69..6226475ca50ef13eaaa2379f2cb2d89e3ba0a1fd 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -5289,6 +5289,7 @@ jumbo_static_library("browser") {
@@ -5309,6 +5309,7 @@ jumbo_static_library("browser") {
deps += [
"//components/spellcheck/browser",
"//components/spellcheck/common",
@@ -44,7 +44,7 @@ index f28230ea94fece5ae8ca7ac27a14da48f40fadbb..c10eea103852b9411a644e1fe20a7e20
]
}
diff --git a/components/language/core/browser/language_prefs.cc b/components/language/core/browser/language_prefs.cc
index 7e06f689632ae67e3e17d7985c6e7b6ea0057f3c..0b4676f4c40b4a0eda927a51016ec91ec230291d 100644
index 201dc7786e822d54b5d9ab8a9d02e7b4339a8d6d..a3232da24513b408403f9f7c033dcd2f3222da47 100644
--- a/components/language/core/browser/language_prefs.cc
+++ b/components/language/core/browser/language_prefs.cc
@@ -21,7 +21,7 @@

View File

@@ -91,7 +91,7 @@ index 85378bb565de617b1bd611d28c8714361747a357..d67d558b91b49835dfa9278930939480
}
return VKEY_UNKNOWN;
}
@@ -192,7 +199,10 @@ static CGEventRef EventTapCallback(CGEventTapProxy proxy,
@@ -192,7 +199,10 @@ CGEventRef MediaKeysListenerImpl::EventTapCallback(CGEventTapProxy proxy,
int key_code = (data1 & 0xFFFF0000) >> 16;
if (key_code != NX_KEYTYPE_PLAY && key_code != NX_KEYTYPE_NEXT &&
key_code != NX_KEYTYPE_PREVIOUS && key_code != NX_KEYTYPE_FAST &&

View File

@@ -46,10 +46,10 @@ index f950552abbe9e9a0002156b596438fe9aa4f01b9..23931899eb58432fd8eabf4d681d2294
// 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 23681d4192ac329a68822dbcdb06369f34e5e28a..a6f07372bdc576ad8d2cce0b04ffe2adc9ab37ad 100644
index 7a80d2f2eb940a92a2711365ddb5b52f8f8f6606..4c9ca5a3635230c1db43568cfc6ddcb264179d80 100644
--- a/ui/base/clipboard/clipboard_win.cc
+++ b/ui/base/clipboard/clipboard_win.cc
@@ -767,10 +767,10 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
@@ -768,10 +768,10 @@ void ClipboardWin::WriteBitmapFromHandle(HBITMAP source_hbitmap,
void ClipboardWin::WriteToClipboard(ClipboardFormatType format, HANDLE handle) {
UINT cf_format = format.ToFormatEtc().cfFormat;

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 212fefe521eb94dc6a9afcae1b6d49a8aeb37288..cba9294f281cdfa457e620f98daee944464cd8aa 100644
index e18afe3c8c287c4cd44ff7139c1cc4004a9704ec..281c722d81c0ad5fa7bacbe25c07a7578dfa43b6 100644
--- a/ui/views/win/hwnd_message_handler.cc
+++ b/ui/views/win/hwnd_message_handler.cc
@@ -305,6 +305,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
@@ -306,6 +306,10 @@ constexpr int kSynthesizedMouseMessagesTimeDifference = 500;
} // namespace
@@ -29,7 +29,7 @@ index 212fefe521eb94dc6a9afcae1b6d49a8aeb37288..cba9294f281cdfa457e620f98daee944
// 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.
//
@@ -356,6 +360,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
@@ -357,6 +361,7 @@ class HWNDMessageHandler::ScopedRedrawLock {
cancel_unlock_(false),
should_lock_(owner_->IsVisible() && !owner->HasChildRenderingWindow() &&
::IsWindow(hwnd_) &&
@@ -37,7 +37,7 @@ index 212fefe521eb94dc6a9afcae1b6d49a8aeb37288..cba9294f281cdfa457e620f98daee944
(!(GetWindowLong(hwnd_, GWL_STYLE) & WS_CAPTION) ||
!ui::win::IsAeroGlassEnabled())) {
if (should_lock_)
@@ -969,6 +974,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
@@ -974,6 +979,10 @@ HWNDMessageHandler::RegisterUnadjustedMouseEvent() {
return scoped_enable;
}
@@ -49,7 +49,7 @@ index 212fefe521eb94dc6a9afcae1b6d49a8aeb37288..cba9294f281cdfa457e620f98daee944
// HWNDMessageHandler, gfx::WindowImpl overrides:
diff --git a/ui/views/win/hwnd_message_handler.h b/ui/views/win/hwnd_message_handler.h
index 14cda16ddf8dab2912e23d374e3fc86a1909b430..680e6c313eb5289237c926a0da910560d1037d2d 100644
index 7b56d58faff84a72cc8cf9f77daeafdee110ce3a..d46ba47aaa31a0b893ab43e9f70dddbc48c5ea41 100644
--- a/ui/views/win/hwnd_message_handler.h
+++ b/ui/views/win/hwnd_message_handler.h
@@ -203,6 +203,8 @@ class VIEWS_EXPORT HWNDMessageHandler : public gfx::WindowImpl,

View File

@@ -20,7 +20,7 @@ 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_settings.h b/cc/trees/layer_tree_settings.h
index 499d5f149ed2a83ba0d6174d4d940b0b58e5580c..748335f21d92c858ff1efebe4ce85e7405e3bdce 100644
index ed5484e0b05ccfef76061427a8f88a72b6f9b7fe..e893b6aba90f61ae0d05532ca925a9ff7faf2195 100644
--- a/cc/trees/layer_tree_settings.h
+++ b/cc/trees/layer_tree_settings.h
@@ -101,6 +101,8 @@ class CC_EXPORT LayerTreeSettings {
@@ -66,7 +66,7 @@ index cb69e08c0185f55497089505ed5b226e57140321..362f28accc248248f3bcb54955c23528
!command_line->HasSwitch(switches::kUIDisablePartialSwap);
#if defined(OS_MACOSX)
diff --git a/components/viz/service/display/gl_renderer.cc b/components/viz/service/display/gl_renderer.cc
index 8d07647a7f4de248d3401a04b3bd9006c7a04bfe..e488ef6f758502dacd7c5ffee45987fb6bb77d49 100644
index ceb0c4ecbe0401c0190ba683bac479392726207b..ea6166d864a96769030f9b20dfda8d0f7bb8a5c9 100644
--- a/components/viz/service/display/gl_renderer.cc
+++ b/components/viz/service/display/gl_renderer.cc
@@ -84,6 +84,9 @@
@@ -204,7 +204,7 @@ index 8d07647a7f4de248d3401a04b3bd9006c7a04bfe..e488ef6f758502dacd7c5ffee45987fb
+
+#undef PATCH_CS
diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc
index bf63bb9c03852263e9341c671be1ee4e7c1a3dc2..d06e2f99739298a4de13ebbce5606b68f5523df3 100644
index d47312d5f89939eab55cfa94bd3fbd41a4bd7d2a..da2f5e9fdc0fda37c82357a12f4fa28f5c556273 100644
--- a/content/browser/gpu/gpu_process_host.cc
+++ b/content/browser/gpu/gpu_process_host.cc
@@ -209,6 +209,7 @@ GpuTerminationStatus ConvertToGpuTerminationStatus(
@@ -216,7 +216,7 @@ index bf63bb9c03852263e9341c671be1ee4e7c1a3dc2..d06e2f99739298a4de13ebbce5606b68
service_manager::switches::kGpuSandboxAllowSysVShm,
service_manager::switches::kGpuSandboxFailuresFatal,
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index 043bc132f8946ab66e42dadee9c3e1a548264238..3139ea227d5971f5e325e8847fb3dfcd786853e9 100644
index ea736817be4084f43ef5266e4a7aac3a8bdaa9d7..367baf4401edffdaaf66620cf17364aa2e9a5ca3 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -227,6 +227,7 @@
@@ -227,7 +227,7 @@ index 043bc132f8946ab66e42dadee9c3e1a548264238..3139ea227d5971f5e325e8847fb3dfcd
#include "ui/gl/gl_switches.h"
#include "ui/native_theme/native_theme_features.h"
#include "url/origin.h"
@@ -3146,6 +3147,7 @@ void RenderProcessHostImpl::PropagateBrowserCommandLineToRenderer(
@@ -3183,6 +3184,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[] = {
@@ -236,10 +236,10 @@ index 043bc132f8946ab66e42dadee9c3e1a548264238..3139ea227d5971f5e325e8847fb3dfcd
service_manager::switches::kDisableInProcessStackTraces,
service_manager::switches::kDisableSeccompFilterSandbox,
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 15ef92df7b986dab587da24c8b93b520893683c9..b87fb42a939522046f00e70aac7dc0d681243159 100644
index 640945d6c239ee1c2d1beb190fdb92c600ee348c..c7143f9a91328a0a56038d58b50abd1aed9247fa 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -2711,6 +2711,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
@@ -2681,6 +2681,9 @@ cc::LayerTreeSettings RenderWidget::GenerateLayerTreeSettings(
settings.main_frame_before_activation_enabled =
cmd.HasSwitch(cc::switches::kEnableMainFrameBeforeActivation);
@@ -294,7 +294,7 @@ index d88680239152858689121d134559765fb8fae1b7..073ed8a8f84ebf994a2b9d9fa7e78f75
gfx::ColorSpace::TransferID transfer_id =
diff --git a/ui/gfx/mac/io_surface.cc b/ui/gfx/mac/io_surface.cc
index 4c47a1132ea3d53b6c63882e98374196ac7ce069..a7f00f426cc6a75d7b942581696332756f2cb792 100644
index 2674784dca1ed12b2f5afc7b728e0c6e8cd6ca4a..5b661c70c9c89883a1aaaf1a29a9ec9fe7f16da6 100644
--- a/ui/gfx/mac/io_surface.cc
+++ b/ui/gfx/mac/io_surface.cc
@@ -16,6 +16,7 @@
@@ -305,7 +305,7 @@ index 4c47a1132ea3d53b6c63882e98374196ac7ce069..a7f00f426cc6a75d7b94258169633275
namespace gfx {
@@ -254,6 +255,11 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size,
@@ -258,6 +259,11 @@ IOSurfaceRef CreateIOSurface(const gfx::Size& size,
IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), kCGColorSpaceSRGB);
} else {
CGColorSpaceRef color_space = base::mac::GetSRGBColorSpace();
@@ -317,7 +317,7 @@ index 4c47a1132ea3d53b6c63882e98374196ac7ce069..a7f00f426cc6a75d7b94258169633275
base::ScopedCFTypeRef<CFDataRef> color_space_icc(
CGColorSpaceCopyICCProfile(color_space));
IOSurfaceSetValue(surface, CFSTR("IOSurfaceColorSpace"), color_space_icc);
@@ -270,6 +276,14 @@ bool IOSurfaceCanSetColorSpace(const ColorSpace& color_space) {
@@ -274,6 +280,14 @@ bool IOSurfaceCanSetColorSpace(const ColorSpace& color_space) {
void IOSurfaceSetColorSpace(IOSurfaceRef io_surface,
const ColorSpace& color_space) {

View File

@@ -9,7 +9,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/cont
index 7d70d057e10ccf3301e810c8a0521d644c8e907f..591305cb57a2f89067b25189b9c33d92858f01a0 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -472,7 +472,11 @@
@@ -472,7 +472,11 @@ void RenderWidgetHostViewMac::WasOccluded() {
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 d91e2f2a0a1284215ad95a2771e3cb9331ec9205..44a6712817a0682a8ff916f22c1bb034f02f4755 100644
index 5ad66a6af94f07d7a989e738ea587ce467a542d6..8c54e34e716a647a72ffce78b56f94a03a5dd978 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -614,6 +614,9 @@ void RenderWidgetHostImpl::WasHidden() {
@@ -660,6 +660,9 @@ void RenderWidgetHostImpl::WasHidden() {
if (is_hidden_)
return;
@@ -20,22 +20,21 @@ index d91e2f2a0a1284215ad95a2771e3cb9331ec9205..44a6712817a0682a8ff916f22c1bb034
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 26cf559d4a39307524432947627369c440a76929..b638b04444f36c5cac534e99891858f765993496 100644
index 013b2165038f1f21df394a0742f7927f26ab1671..894ddaa62fe8aa24eccbe7f9885a4dbb8db04206 100644
--- a/content/browser/renderer_host/render_widget_host_impl.h
+++ b/content/browser/renderer_host/render_widget_host_impl.h
@@ -175,6 +175,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
@@ -179,6 +179,9 @@ class CONTENT_EXPORT RenderWidgetHostImpl
// RenderWidgetHostImpl.
static RenderWidgetHostImpl* From(RenderWidgetHost* rwh);
+ // Electron: Prevents the widget from getting hidden.
+ bool disable_hidden_ = false;
+
void set_hung_renderer_delay(const base::TimeDelta& delay) {
hung_renderer_delay_ = delay;
}
void set_new_content_rendering_delay_for_testing(
const base::TimeDelta& delay) {
new_content_rendering_delay_ = delay;
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index 3e2190700aee..0ccdaa8d037c 100644
index 3e2190700aee4ea6184ea59d8bb4a480cd52697b..0ccdaa8d037cb71ee3eebae027a74e96ffe1e846 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -692,7 +692,7 @@ void RenderWidgetHostViewAura::HideImpl() {

View File

@@ -6,10 +6,10 @@ Subject: disable_user_gesture_requirement_for_beforeunload_dialogs.patch
See https://github.com/electron/electron/issues/10754
diff --git a/third_party/blink/renderer/core/dom/document.cc b/third_party/blink/renderer/core/dom/document.cc
index 851679dc3bb8012af65e6c87f154a8b4e1c319e7..34b996e498bcb905d87e58538d937bbe2c6934d0 100644
index ca2cb0332066db76e2e120c1534c07b95e33a670..6b3ec3427fbf5f138900c23a2a0dd7308e433bbd 100644
--- a/third_party/blink/renderer/core/dom/document.cc
+++ b/third_party/blink/renderer/core/dom/document.cc
@@ -4147,7 +4147,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
@@ -4142,7 +4142,9 @@ bool Document::DispatchBeforeUnloadEvent(ChromeClient* chrome_client,
"frame that never had a user gesture since its load. "
"https://www.chromestatus.com/feature/5082396709879808";
Intervention::GenerateReport(frame_, "BeforeUnloadNoGesture", message);

View File

@@ -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 80ecc470ab4ed4ce1cb797f7f11fe971c953145d..36521baf33900fe9ec411a365918a675fb147080 100644
index d0d646a42b3ee27f848dd0a47179e8f573e51d8f..35244d028375fe4d79ad41a864c38587ce02f749 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -1006,6 +1006,13 @@ void NetworkContext::SetNetworkConditions(
@@ -1008,6 +1008,13 @@ void NetworkContext::SetNetworkConditions(
std::move(network_conditions));
}
@@ -51,7 +51,7 @@ index 80ecc470ab4ed4ce1cb797f7f11fe971c953145d..36521baf33900fe9ec411a365918a675
// 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 8ccb5c4d0c37a5dc0c7fa713683941eaddc1c609..260f0e205b537be6b82eb6847d78d02122a054e1 100644
index 9d201f1a5ef0eaf3f8b42cbb3d2593dbd068bdd6..e32997067e57098198168675ffe3160134fb838b 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -233,6 +233,7 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -63,10 +63,10 @@ index 8ccb5c4d0c37a5dc0c7fa713683941eaddc1c609..260f0e205b537be6b82eb6847d78d021
void SetEnableReferrers(bool enable_referrers) override;
#if defined(OS_CHROMEOS)
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index 1d9ffd3de180e3256fb63a497544feeb427ae7ff..c37432121142472010b767b7fb257e20bc60b3fc 100644
index 96ba4d67bcdefef44ecd246acb883824c9e842d6..a46aab1db2de282e0ff3561a98bad1dac659b67a 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -1016,6 +1016,9 @@ interface NetworkContext {
@@ -986,6 +986,9 @@ interface NetworkContext {
SetNetworkConditions(mojo_base.mojom.UnguessableToken throttling_profile_id,
NetworkConditions? conditions);

View File

@@ -10,10 +10,10 @@ get this standardised, but in lieu of that, this makes MessagePort a
whole bunch more useful!
diff --git a/third_party/blink/renderer/core/messaging/message_port.cc b/third_party/blink/renderer/core/messaging/message_port.cc
index e2ddbafc9ea2836a302da481702e2922949ffe78..7da7071862e384bce65ecb52996b5287891a33f9 100644
index 3e71122bfbc87b481d620d67d01926690ae5270a..cd1abc51fa216215b5ab00d0a8b63638c24cbd57 100644
--- a/third_party/blink/renderer/core/messaging/message_port.cc
+++ b/third_party/blink/renderer/core/messaging/message_port.cc
@@ -156,6 +156,7 @@ void MessagePort::close() {
@@ -149,6 +149,7 @@ void MessagePort::close() {
Entangle(mojo::MessagePipe().handle0);
}
closed_ = true;
@@ -22,7 +22,7 @@ index e2ddbafc9ea2836a302da481702e2922949ffe78..7da7071862e384bce65ecb52996b5287
void MessagePort::Entangle(mojo::ScopedMessagePipeHandle handle) {
diff --git a/third_party/blink/renderer/core/messaging/message_port.h b/third_party/blink/renderer/core/messaging/message_port.h
index 2a08335398b30671a61aee0f1ebe060222a4f1ff..874aecb9c038f19cc03641a19ce51cf2f958d80c 100644
index d24804499949c237462ee455e7cec93836debca9..53e61229e73e2343414aa1ac5c5ac1ff2d3db439 100644
--- a/third_party/blink/renderer/core/messaging/message_port.h
+++ b/third_party/blink/renderer/core/messaging/message_port.h
@@ -119,6 +119,13 @@ class CORE_EXPORT MessagePort : public EventTargetWithInlineData,

View File

@@ -13,10 +13,10 @@ uses internally for things like menus and devtools.
We can remove this patch once it has in some shape been upstreamed.
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
index bfca4412f0045bdd23a76597a803145e9f7f22c5..5337fa3fe2653684ff1688f1cf8a52c908ee1d61 100644
index 68c0830f8a7e2f492fade824d0036a6f576da6d8..ed27dcca6e5d3bdbc353aba9830a278624c6d69d 100644
--- a/ui/native_theme/native_theme.cc
+++ b/ui/native_theme/native_theme.cc
@@ -53,6 +53,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors)
@@ -221,6 +221,8 @@ NativeTheme::NativeTheme(bool should_use_dark_colors)
NativeTheme::~NativeTheme() = default;
bool NativeTheme::ShouldUseDarkColors() const {
@@ -26,10 +26,10 @@ index bfca4412f0045bdd23a76597a803145e9f7f22c5..5337fa3fe2653684ff1688f1cf8a52c9
}
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index edd042cfe327810c120c4b446c043761c0d21b9f..59aaf71ea1e7931c421a46a7ca8cadb4dc77483b 100644
index 380a8e78fdeb2ad5f40b298a3efffa82a70ed2dc..af3d29313dfd14b7c367133eb1c9afe3f0b70bcc 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -348,6 +348,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
@@ -351,6 +351,22 @@ class NATIVE_THEME_EXPORT NativeTheme {
ColorId color_id,
ColorScheme color_scheme = ColorScheme::kDefault) const;
@@ -52,33 +52,20 @@ index edd042cfe327810c120c4b446c043761c0d21b9f..59aaf71ea1e7931c421a46a7ca8cadb4
// 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
@@ -478,6 +494,8 @@ class NATIVE_THEME_EXPORT NativeTheme {
PreferredColorScheme preferred_color_scheme_ =
@@ -482,6 +498,8 @@ class NATIVE_THEME_EXPORT NativeTheme {
PreferredColorScheme::kNoPreference;
mutable ColorProvider* color_provider_ = nullptr;
+ ThemeSource theme_source_ = ThemeSource::kSystem;
+
DISALLOW_COPY_AND_ASSIGN(NativeTheme);
};
diff --git a/ui/native_theme/native_theme_dark_aura.cc b/ui/native_theme/native_theme_dark_aura.cc
index 87b0abc9c646ace8cafc2b83eb4da6ffd3370237..75c677def845711ef4f3414f0a7df4f88431bf25 100644
--- a/ui/native_theme/native_theme_dark_aura.cc
+++ b/ui/native_theme/native_theme_dark_aura.cc
@@ -20,6 +20,8 @@ SkColor NativeThemeDarkAura::GetSystemColor(ColorId color_id,
}
bool NativeThemeDarkAura::ShouldUseDarkColors() const {
+ if (theme_source() == ThemeSource::kForcedLight) return false;
+ if (theme_source() == ThemeSource::kForcedDark) return true;
return true;
}
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index dedaaaeaa93e55ec784f94864d670e0659d839bf..57009894edb9ad9422e24bf40f4100964fd32d1c 100644
index 7bc92ec1d15b9f5c9f867354f2768f6edc158a92..d6ec646352a7671fa7321f60bddec6c9c18f7476 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -726,6 +726,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
@@ -729,6 +729,8 @@ bool NativeThemeWin::ShouldUseDarkColors() const {
// ...unless --force-dark-mode was specified in which case caveat emptor.
if (UsesHighContrastColors() && !IsForcedDarkMode())
return false;

View File

@@ -6,11 +6,11 @@ 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 200d25b69239fe638c27e2a4dd9935087f7401f8..c69505920aba745dd4748a2fa154f6d7f7e5b8b6 100644
index a7dc1fb163c385f1f28186ccabd5e4b9d535f43a..1b2e7f4aa70ad66769e995f6e6957aa34c48a283 100644
--- a/content/browser/renderer_host/render_view_host_impl.cc
+++ b/content/browser/renderer_host/render_view_host_impl.cc
@@ -447,6 +447,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
Send(new ViewMsg_SetBackgroundOpaque(GetRoutingID(), opaque));
@@ -452,6 +452,10 @@ void RenderViewHostImpl::SetBackgroundOpaque(bool opaque) {
GetWidget()->GetAssociatedFrameWidget()->SetBackgroundOpaque(opaque);
}
+void RenderViewHostImpl::SetSchedulerThrottling(bool allowed) {
@@ -33,12 +33,12 @@ index 70f9ea0f650b9a4b482d823a603871808f8e125c..8bd66fa4058fa5fa2ef0872c9fda2ab1
void UpdateWebkitPreferences(const WebPreferences& prefs) override;
void OnWebkitPreferencesChanged() override;
diff --git a/content/common/view_messages.h b/content/common/view_messages.h
index ee01a4430f8e3098fbf741010394ad1a8fd6528b..01327559222ebd3e9de954cf9c9137cc105cbee0 100644
index b75aee16237cad6043cd6cfbe22a166e10327a16..7a7e96bcd17e730d2a282e3c7df4a0e3c56b75e0 100644
--- a/content/common/view_messages.h
+++ b/content/common/view_messages.h
@@ -98,6 +98,9 @@ IPC_STRUCT_TRAITS_END()
// Make the RenderWidget background transparent or opaque.
IPC_MESSAGE_ROUTED1(ViewMsg_SetBackgroundOpaque, bool /* opaque */)
@@ -95,6 +95,9 @@ IPC_STRUCT_TRAITS_END()
// Messages sent from the browser to the renderer.
+// Whether to enable the Renderer scheduler background throttling.
+IPC_MESSAGE_ROUTED1(ViewMsg_SetSchedulerThrottling, bool /* allowed */)
@@ -61,7 +61,7 @@ index 893c45a5c71b4e55ea323ae60e11d12ddb099efd..db9a1ff0fe1a912db83692ab17c620cf
//
// Returns the current WebKit preferences. Note: WebPreferences is cached, so
diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc
index 98855151d1f07177a20b0f6079f2f48826d215ca..ae1d910ad32c8c26db0396f675aa81a145468945 100644
index 2cad532229217a2cee604298713be7aebc24dda8..9b8b0bd7afef3e94460d3ea05437d82a9a4cc684 100644
--- a/content/renderer/render_view_impl.cc
+++ b/content/renderer/render_view_impl.cc
@@ -1183,6 +1183,8 @@ bool RenderViewImpl::OnMessageReceived(const IPC::Message& message) {
@@ -73,7 +73,7 @@ index 98855151d1f07177a20b0f6079f2f48826d215ca..ae1d910ad32c8c26db0396f675aa81a1
IPC_MESSAGE_HANDLER(ViewMsg_UpdateTargetURL_ACK, OnUpdateTargetURLAck)
IPC_MESSAGE_HANDLER(ViewMsg_UpdateWebPreferences, OnUpdateWebPreferences)
IPC_MESSAGE_HANDLER(ViewMsg_MoveOrResizeStarted, OnMoveOrResizeStarted)
@@ -1683,6 +1685,12 @@ bool RenderViewImpl::GetContentStateImmediately() {
@@ -1700,6 +1702,12 @@ bool RenderViewImpl::GetContentStateImmediately() {
return send_content_state_immediately_;
}
@@ -87,7 +87,7 @@ index 98855151d1f07177a20b0f6079f2f48826d215ca..ae1d910ad32c8c26db0396f675aa81a1
PageVisibilityState visibility_state,
bool initial_setting) {
diff --git a/content/renderer/render_view_impl.h b/content/renderer/render_view_impl.h
index 286e207fc93b2ac2b4012b04afa3f82d51310f96..87d5e8dc312e91ebfa96e0f3c41cf7b87e677044 100644
index 701aac4f7865097899b76ee8c37db6eb32672b33..9e4ef233ce1df822d08bef03bfa5bf48774e0c24 100644
--- a/content/renderer/render_view_impl.h
+++ b/content/renderer/render_view_impl.h
@@ -413,6 +413,7 @@ class CONTENT_EXPORT RenderViewImpl : public blink::WebViewClient,
@@ -99,10 +99,10 @@ index 286e207fc93b2ac2b4012b04afa3f82d51310f96..87d5e8dc312e91ebfa96e0f3c41cf7b8
void OnUpdateTargetURLAck();
void OnUpdateWebPreferences(const WebPreferences& prefs);
diff --git a/third_party/blink/public/web/web_view.h b/third_party/blink/public/web/web_view.h
index c2c079e51358696f18f8f4733bc904f9ac6f7ed6..3f11aa7cab36f45fd26ea0eb2babe6927f5b3539 100644
index 406c19b10b2e97ba05b9b3eb5c1ac0831023b3e2..dcbaf84dceee74da60ae8cc5466e08db317e3543 100644
--- a/third_party/blink/public/web/web_view.h
+++ b/third_party/blink/public/web/web_view.h
@@ -412,6 +412,7 @@ class WebView {
@@ -402,6 +402,7 @@ class WebView {
// Scheduling -----------------------------------------------------------
virtual PageScheduler* Scheduler() const = 0;
@@ -111,10 +111,10 @@ index c2c079e51358696f18f8f4733bc904f9ac6f7ed6..3f11aa7cab36f45fd26ea0eb2babe692
// 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 4696a63b4e925b0ffde2655bbdbcc3055780dfe4..518110d89ec6f518702fd2792b56f843ee7d2d5d 100644
index 43fc2bb2de690486b38061760edec4c64cc19c0b..cd94798b733c1ea12ca60666dbabd7058aa77393 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.cc
+++ b/third_party/blink/renderer/core/exported/web_view_impl.cc
@@ -3351,12 +3351,20 @@ PageScheduler* WebViewImpl::Scheduler() const {
@@ -3355,12 +3355,20 @@ PageScheduler* WebViewImpl::Scheduler() const {
return GetPage()->GetPageScheduler();
}
@@ -138,10 +138,10 @@ index 4696a63b4e925b0ffde2655bbdbcc3055780dfe4..518110d89ec6f518702fd2792b56f843
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 1604c387fa237dbfa7c37b6d67b7f7c570076279..fb3c73ea00762e9d7ddaeecc56d4906641a10e62 100644
index 60cfa746367a03d308f0f26fef05839ecd6420b2..5c2b7a3aafbd72567c413be42d4bdf9665a97a2e 100644
--- a/third_party/blink/renderer/core/exported/web_view_impl.h
+++ b/third_party/blink/renderer/core/exported/web_view_impl.h
@@ -321,6 +321,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -328,6 +328,7 @@ class CORE_EXPORT WebViewImpl final : public WebView,
LocalDOMWindow* PagePopupWindow() const;
PageScheduler* Scheduler() const override;
@@ -149,7 +149,7 @@ index 1604c387fa237dbfa7c37b6d67b7f7c570076279..fb3c73ea00762e9d7ddaeecc56d49066
void SetVisibilityState(PageVisibilityState visibility_state,
bool is_initial_state) override;
PageVisibilityState GetVisibilityState() override;
@@ -688,6 +689,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
@@ -696,6 +697,8 @@ class CORE_EXPORT WebViewImpl final : public WebView,
// WebViewImpl::Close while handling an input event.
bool debug_inside_input_handling_ = false;

View File

@@ -0,0 +1,23 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Andy Locascio <andy@slack-corp.com>
Date: Thu, 2 Apr 2020 15:05:00 -0700
Subject: fix: account for print preview disabled when printing to pdf
Refs: https://chromium-review.googlesource.com/c/chromium/src/+/2068936
Avoid an optimization introduced in the above CL. In my limited
understanding, it seems like we slightly misuse the print preview API
and this is fallout from using it in a way the code doesn't expect.
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
index bbfab5601434cf3a050c220f237625d231c12f41..1849d0802d17e9bbe4eb669aec314a1b00351c6f 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -1462,6 +1462,7 @@ PrintRenderFrameHelper::CreatePreviewDocument() {
const std::vector<int>& pages = print_pages_params_->pages;
bool require_document_metafile =
+ !g_is_preview_enabled ||
print_renderer_ ||
print_params.printed_doc_type != SkiaDocumentType::MSKP;
if (!print_preview_context_.CreatePreviewDocument(

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 6f2e0c12e7b4a2928346f6690c2e8a072822124b..d6cad38b1e0ca9aeb96eeaaf8b1bb39fc23893ea 100644
index b106b4fdb7a1bbb95977a8a9e69baaefe56a4379..9cae89416fb89ed6d440a0bedc6187d244852cbe 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2351,11 +2351,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
@@ -2350,11 +2350,13 @@ bool WebContentsImpl::HandleMouseEvent(const blink::WebMouseEvent& event) {
WebContentsImpl* outermost = GetOutermostWebContents();
if (event.button == blink::WebPointerProperties::Button::kBack &&
outermost->controller_.CanGoBack()) {

View File

@@ -20,7 +20,7 @@ index 591305cb57a2f89067b25189b9c33d92858f01a0..a3112cb03bc73eb670631ff429f38414
#include "content/common/text_input_state.h"
#include "content/common/view_messages.h"
#include "content/public/browser/browser_context.h"
@@ -978,7 +979,12 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -978,7 +979,12 @@ gfx::Range RenderWidgetHostViewMac::ConvertCharacterRangeToCompositionRange(
}
WebContents* RenderWidgetHostViewMac::GetWebContents() {

View File

@@ -12,7 +12,7 @@ diff --git a/chrome/browser/extensions/global_shortcut_listener_mac.mm b/chrome/
index befe726af9c10b1563a7fc0bb77cc55f65943d5c..bac51f33f35f96fe4ecc764cf5ca887176642f74 100644
--- a/chrome/browser/extensions/global_shortcut_listener_mac.mm
+++ b/chrome/browser/extensions/global_shortcut_listener_mac.mm
@@ -39,7 +39,7 @@
@@ -39,7 +39,7 @@ GlobalShortcutListenerMac::GlobalShortcutListenerMac()
// global MediaKeysListener to receive media keys.
if (!content::MediaKeysListenerManager::IsMediaKeysListenerManagerEnabled()) {
media_keys_listener_ = ui::MediaKeysListener::Create(

View File

@@ -71,10 +71,10 @@ index dbfc24395349cfa40b5783590d60cc7e44b31205..499af1cdcf13cf57f97a0c28430cbe87
render_frame_host_ =
frame_tree_node_->render_manager()->GetFrameHostForNavigation(this);
diff --git a/content/browser/frame_host/render_frame_host_manager.cc b/content/browser/frame_host/render_frame_host_manager.cc
index e030711ce7c2679d9fca46e81d55772b53daa22a..32d04dc798019f901ef337e956df94431a0e19e1 100644
index 50533c338dd75f606ba542813cfe724301ad6527..3a06ae9ad9d36fea4c055e610dac5b6d66d95e7b 100644
--- a/content/browser/frame_host/render_frame_host_manager.cc
+++ b/content/browser/frame_host/render_frame_host_manager.cc
@@ -2343,6 +2343,16 @@ bool RenderFrameHostManager::InitRenderView(
@@ -2392,6 +2392,16 @@ bool RenderFrameHostManager::InitRenderView(
scoped_refptr<SiteInstance>
RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
NavigationRequest* request) {
@@ -91,7 +91,7 @@ index e030711ce7c2679d9fca46e81d55772b53daa22a..32d04dc798019f901ef337e956df9443
SiteInstance* current_site_instance = render_frame_host_->GetSiteInstance();
// All children of MHTML documents must be MHTML documents. They all live in
@@ -2362,10 +2372,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -2411,10 +2421,60 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
//
// TODO(clamy): We should also consider as a candidate SiteInstance the
// speculative SiteInstance that was computed on redirects.
@@ -156,7 +156,7 @@ index e030711ce7c2679d9fca46e81d55772b53daa22a..32d04dc798019f901ef337e956df9443
// Account for renderer-initiated reload as well.
// Needed as a workaround for https://crbug.com/1045524, remove it when it is
@@ -2407,6 +2467,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
@@ -2456,6 +2516,9 @@ RenderFrameHostManager::GetSiteInstanceForNavigationRequest(
request->ResetStateForSiteInstanceChange();
}
@@ -167,10 +167,10 @@ index e030711ce7c2679d9fca46e81d55772b53daa22a..32d04dc798019f901ef337e956df9443
}
diff --git a/content/browser/site_instance_impl.cc b/content/browser/site_instance_impl.cc
index 9dbc9bb7114e1dea5e8a24395f39bd9d068eeb76..31bddf69f2e805451d42d1a284a53f41bdaa5650 100644
index c1eb23c23901158410f224baebf7786b97e6df6b..d1a1aee132d8ecce9892477addd39a35de6ef9ee 100644
--- a/content/browser/site_instance_impl.cc
+++ b/content/browser/site_instance_impl.cc
@@ -426,6 +426,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
@@ -456,6 +456,10 @@ bool SiteInstanceImpl::HasRelatedSiteInstance(const GURL& url) {
return browsing_instance_->HasSiteInstance(url);
}
@@ -182,7 +182,7 @@ index 9dbc9bb7114e1dea5e8a24395f39bd9d068eeb76..31bddf69f2e805451d42d1a284a53f41
const GURL& url) {
return browsing_instance_->GetSiteInstanceForURL(
diff --git a/content/browser/site_instance_impl.h b/content/browser/site_instance_impl.h
index caa100b3889e17a9afdc8127e0e13bb6b86e8042..f08d3a2eb28f0f6fff89b5759eff5369b7111821 100644
index 85288dac0acfb51330669cd87cfc0343af3dfd2c..3bb39459fd3c87a0968044e02d684f6b777935bb 100644
--- a/content/browser/site_instance_impl.h
+++ b/content/browser/site_instance_impl.h
@@ -98,6 +98,7 @@ class CONTENT_EXPORT SiteInstanceImpl final : public SiteInstance,
@@ -194,7 +194,7 @@ index caa100b3889e17a9afdc8127e0e13bb6b86e8042..f08d3a2eb28f0f6fff89b5759eff5369
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 75cd0ad7a8dc1efd89683d8da192050659c5016f..54d7947751a0cc7007ba737ebdeafcda98d284ce 100644
index 294db724572266f54c9559bf5278920b819bef03..d2e28037a4005df4a4552440cb8486f5f111c764 100644
--- a/content/public/browser/content_browser_client.cc
+++ b/content/public/browser/content_browser_client.cc
@@ -58,6 +58,21 @@
@@ -220,7 +220,7 @@ index 75cd0ad7a8dc1efd89683d8da192050659c5016f..54d7947751a0cc7007ba737ebdeafcda
const MainFunctionParams& parameters) {
return nullptr;
diff --git a/content/public/browser/content_browser_client.h b/content/public/browser/content_browser_client.h
index 5fc3d0e31927b618d04024fcc42b2061580a4f22..343d94a74fb87677200021f480f7874efe33385d 100644
index c9b26a69ff139d91dd0c5deb65017eed5b9fda12..959384005b1d3f73b9aca03db2999e8de09b0bdb 100644
--- a/content/public/browser/content_browser_client.h
+++ b/content/public/browser/content_browser_client.h
@@ -233,8 +233,45 @@ class CONTENT_EXPORT ContentBrowserClient {

View File

@@ -9,7 +9,7 @@ diff --git a/base/mac/foundation_util.mm b/base/mac/foundation_util.mm
index 2a83d4d8158422c1056725679309c6ced1e531bd..f52934712f8de78193127c426d02982b36e9d422 100644
--- a/base/mac/foundation_util.mm
+++ b/base/mac/foundation_util.mm
@@ -27,7 +27,6 @@
@@ -27,7 +27,6 @@ CFTypeID SecKeyGetTypeID();
#if !defined(OS_IOS)
CFTypeID SecACLGetTypeID();
CFTypeID SecTrustedApplicationGetTypeID();
@@ -17,7 +17,7 @@ index 2a83d4d8158422c1056725679309c6ced1e531bd..f52934712f8de78193127c426d02982b
#endif
} // extern "C"
@@ -316,8 +315,7 @@ void SetBaseBundleID(const char* new_base_bundle_id) {
@@ -316,8 +315,7 @@ NSFont* CFToNSCast(CTFontRef cf_val) {
const_cast<NSFont*>(reinterpret_cast<const NSFont*>(cf_val));
DCHECK(!cf_val ||
CTFontGetTypeID() == CFGetTypeID(cf_val) ||
@@ -27,7 +27,7 @@ index 2a83d4d8158422c1056725679309c6ced1e531bd..f52934712f8de78193127c426d02982b
return ns_val;
}
@@ -385,9 +383,6 @@ CTFontRef NSToCFCast(NSFont* ns_val) {
@@ -385,9 +383,6 @@ CFCast<CTFontRef>(const CFTypeRef& cf_val) {
return (CTFontRef)(cf_val);
}

View File

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

View File

@@ -18,7 +18,7 @@ index cf88f696a46ff0ac84bcf466b44d1080438426c1..7672eee30a811001a0149edfa4eed9dc
@interface NSWindow (PrivateBrowserNativeWidgetAPI)
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle;
@end
@@ -63,10 +64,13 @@ - (NSRect)_draggableFrame NS_DEPRECATED_MAC(10_10, 10_11) {
@@ -63,10 +64,13 @@
@end
@@ -32,7 +32,7 @@ index cf88f696a46ff0ac84bcf466b44d1080438426c1..7672eee30a811001a0149edfa4eed9dc
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
// - NSThemeFrame and its subclasses will be nil if it's missing at runtime.
if ([BrowserWindowFrame class])
@@ -81,6 +85,8 @@ - (BOOL)_usesCustomDrawing {
@@ -81,6 +85,8 @@
return NO;
}
@@ -54,7 +54,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b
@interface NSWindow (PrivateAPI)
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle;
@end
@@ -18,8 +20,12 @@ - (CGFloat)_titlebarHeight {
@@ -18,8 +20,12 @@
}
@end
@@ -67,7 +67,7 @@ index 8416c7c6e052dafb2aad61c0bd3224c36e945d23..cd356beda023ab2409b16d58ca38c70b
+ (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
if ([NativeWidgetMacFramelessNSWindowFrame class]) {
return [NativeWidgetMacFramelessNSWindowFrame class];
@@ -27,4 +33,6 @@ + (Class)frameViewClassForStyleMask:(NSUInteger)windowStyle {
@@ -27,4 +33,6 @@
return [super frameViewClassForStyleMask:windowStyle];
}
@@ -108,7 +108,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1
- (BOOL)hasKeyAppearance;
- (long long)_resizeDirectionForMouseLocation:(CGPoint)location;
- (BOOL)_isConsideredOpenForPersistentState;
@@ -56,6 +58,8 @@ - (void)cr_mouseDownOnFrameView:(NSEvent*)event {
@@ -56,6 +58,8 @@
}
@end
@@ -117,7 +117,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1
@implementation NativeWidgetMacNSWindowTitledFrame
- (void)mouseDown:(NSEvent*)event {
if (self.window.isMovable)
@@ -82,6 +86,8 @@ - (BOOL)usesCustomDrawing {
@@ -82,6 +86,8 @@
}
@end
@@ -126,7 +126,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1
@implementation NativeWidgetMacNSWindow {
@private
base::scoped_nsobject<CommandDispatcher> _commandDispatcher;
@@ -163,6 +169,8 @@ - (BOOL)hasViewsMenuActive {
@@ -163,6 +169,8 @@
// NSWindow overrides.
@@ -135,7 +135,7 @@ index c10c6633e7bc61cdc3ee41fc018786731177a948..09cc91eaab41e82165d550313579c9e1
+ (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
if (windowStyle & NSWindowStyleMaskTitled) {
if (Class customFrame = [NativeWidgetMacNSWindowTitledFrame class])
@@ -174,6 +182,8 @@ + (Class)frameViewClassForStyleMask:(NSWindowStyleMask)windowStyle {
@@ -174,6 +182,8 @@
return [super frameViewClassForStyleMask:windowStyle];
}

View File

@@ -17,7 +17,7 @@ diff --git a/components/remote_cocoa/app_shim/application_bridge.mm b/components
index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209ff3cbfaaa 100644
--- a/components/remote_cocoa/app_shim/application_bridge.mm
+++ b/components/remote_cocoa/app_shim/application_bridge.mm
@@ -49,6 +49,7 @@
@@ -49,6 +49,7 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper {
// NativeWidgetNSWindowHostHelper:
id GetNativeViewAccessible() override {
@@ -25,7 +25,7 @@ index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209f
if (!remote_accessibility_element_) {
int64_t browser_pid = 0;
std::vector<uint8_t> element_token;
@@ -59,6 +60,9 @@ id GetNativeViewAccessible() override {
@@ -59,6 +60,9 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper {
ui::RemoteAccessibility::GetRemoteElementFromToken(element_token);
}
return remote_accessibility_element_.get();
@@ -35,7 +35,7 @@ index 9ddda9116e7284cbccde8a51e23ad7560dd06367..e846091ad99b0154636489e53491209f
}
void DispatchKeyEvent(ui::KeyEvent* event) override {
bool event_handled = false;
@@ -96,8 +100,10 @@ void GetWordAt(const gfx::Point& location_in_content,
@@ -96,8 +100,10 @@ class NativeWidgetBridgeOwner : public NativeWidgetNSWindowHostHelper {
mojo::AssociatedRemote<mojom::TextInputHost> text_input_host_remote_;
std::unique_ptr<NativeWidgetNSWindowBridge> bridge_;
@@ -50,7 +50,7 @@ diff --git a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
index 2ee45cb069ec5d78d9c7a3f61fdd1d444a590f41..badc4323b910f8e3957583e05af303472cb204f6 100644
--- a/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
+++ b/components/remote_cocoa/app_shim/native_widget_ns_window_bridge.mm
@@ -543,10 +543,12 @@ NSUInteger CountBridgedWindows(NSArray* child_windows) {
@@ -543,10 +543,12 @@ void NativeWidgetNSWindowBridge::CreateContentView(uint64_t ns_view_id,
// this should be treated as an error and caught early.
CHECK(bridged_view_);
@@ -67,7 +67,7 @@ diff --git a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm b/cont
index a8e5c8888cb7ea8a85de7c8e8c613cc2b3c5be15..d01468fe77703b2812865b0198b84b0b645283c4 100644
--- a/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
+++ b/content/app_shim_remote_cocoa/ns_view_bridge_factory_impl.mm
@@ -66,8 +66,10 @@ id GetFocusedBrowserAccessibilityElement() override {
@@ -66,8 +66,10 @@ class RenderWidgetHostNSViewBridgeOwner
return nil;
}
void SetAccessibilityWindow(NSWindow* window) override {
@@ -78,7 +78,7 @@ index a8e5c8888cb7ea8a85de7c8e8c613cc2b3c5be15..d01468fe77703b2812865b0198b84b0b
}
void ForwardKeyboardEvent(const content::NativeWebKeyboardEvent& key_event,
@@ -126,8 +128,10 @@ void SmartMagnify(const blink::WebGestureEvent& web_event) override {
@@ -126,8 +128,10 @@ class RenderWidgetHostNSViewBridgeOwner
mojo::AssociatedRemote<mojom::RenderWidgetHostNSViewHost> host_;
std::unique_ptr<RenderWidgetHostNSViewBridge> bridge_;
@@ -120,7 +120,7 @@ diff --git a/content/browser/renderer_host/render_widget_host_view_mac.mm b/cont
index de6fb32e1ff930fbb1c778b59ba18402741c8b44..7d70d057e10ccf3301e810c8a0521d644c8e907f 100644
--- a/content/browser/renderer_host/render_widget_host_view_mac.mm
+++ b/content/browser/renderer_host/render_widget_host_view_mac.mm
@@ -231,8 +231,10 @@
@@ -231,8 +231,10 @@ RenderWidgetHostViewMac::~RenderWidgetHostViewMac() {
void RenderWidgetHostViewMac::MigrateNSViewBridge(
remote_cocoa::mojom::Application* remote_cocoa_application,
uint64_t parent_ns_view_id) {
@@ -131,7 +131,7 @@ index de6fb32e1ff930fbb1c778b59ba18402741c8b44..7d70d057e10ccf3301e810c8a0521d64
// Disconnect from the previous bridge (this will have the effect of
// destroying the associated bridge), and close the receiver (to allow it
@@ -1348,8 +1350,10 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1348,8 +1350,10 @@ RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessible() {
gfx::NativeViewAccessible
RenderWidgetHostViewMac::AccessibilityGetNativeViewAccessibleForWindow() {
@@ -142,7 +142,7 @@ index de6fb32e1ff930fbb1c778b59ba18402741c8b44..7d70d057e10ccf3301e810c8a0521d64
return [GetInProcessNSView() window];
}
@@ -1381,9 +1385,11 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1381,9 +1385,11 @@ id RenderWidgetHostViewMac::GetFocusedBrowserAccessibilityElement() {
}
void RenderWidgetHostViewMac::SetAccessibilityWindow(NSWindow* window) {
@@ -154,7 +154,7 @@ index de6fb32e1ff930fbb1c778b59ba18402741c8b44..7d70d057e10ccf3301e810c8a0521d64
}
bool RenderWidgetHostViewMac::SyncIsWidgetForMainFrame(
@@ -1866,12 +1872,14 @@ void CombineTextNodesAndMakeCallback(SpeechCallback callback,
@@ -1866,12 +1872,14 @@ void RenderWidgetHostViewMac::StopSpeaking() {
void RenderWidgetHostViewMac::SetRemoteAccessibilityWindowToken(
const std::vector<uint8_t>& window_token) {
@@ -239,7 +239,7 @@ diff --git a/ui/views/cocoa/native_widget_mac_ns_window_host.mm b/ui/views/cocoa
index 2256c365af5b1af79458fdcb0cb9d44c9ff641fd..f4949b071a177452b0074a2436669e9846558d1a 100644
--- a/ui/views/cocoa/native_widget_mac_ns_window_host.mm
+++ b/ui/views/cocoa/native_widget_mac_ns_window_host.mm
@@ -282,14 +282,22 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -282,14 +282,22 @@ gfx::NativeViewAccessible
NativeWidgetMacNSWindowHost::GetNativeViewAccessibleForNSView() const {
if (in_process_ns_window_bridge_)
return in_process_ns_window_bridge_->ns_view();
@@ -262,7 +262,7 @@ index 2256c365af5b1af79458fdcb0cb9d44c9ff641fd..f4949b071a177452b0074a2436669e98
}
remote_cocoa::mojom::NativeWidgetNSWindow*
@@ -1118,6 +1126,7 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1118,6 +1126,7 @@ void NativeWidgetMacNSWindowHost::OnFocusWindowToolbar() {
void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
const std::vector<uint8_t>& window_token,
const std::vector<uint8_t>& view_token) {
@@ -270,7 +270,7 @@ index 2256c365af5b1af79458fdcb0cb9d44c9ff641fd..f4949b071a177452b0074a2436669e98
remote_window_accessible_ =
ui::RemoteAccessibility::GetRemoteElementFromToken(window_token);
remote_view_accessible_ =
@@ -1125,14 +1134,17 @@ void HandleAccelerator(const ui::Accelerator& accelerator,
@@ -1125,14 +1134,17 @@ void NativeWidgetMacNSWindowHost::SetRemoteAccessibilityTokens(
[remote_view_accessible_ setWindowUIElement:remote_window_accessible_.get()];
[remote_view_accessible_
setTopLevelUIElement:remote_window_accessible_.get()];

View File

@@ -44,7 +44,7 @@ diff --git a/gpu/ipc/service/image_transport_surface_overlay_mac.mm b/gpu/ipc/se
index eb46993b8f40fdc7da35dae1b850dad637f6b47d..05a9ae47620d17b5a53f991c0b3a0a5c153b599c 100644
--- a/gpu/ipc/service/image_transport_surface_overlay_mac.mm
+++ b/gpu/ipc/service/image_transport_surface_overlay_mac.mm
@@ -63,6 +63,7 @@
@@ -63,6 +63,7 @@ ImageTransportSurfaceOverlayMacBase<
template <typename BaseClass>
bool ImageTransportSurfaceOverlayMacBase<BaseClass>::Initialize(
gl::GLSurfaceFormat format) {
@@ -52,7 +52,7 @@ index eb46993b8f40fdc7da35dae1b850dad637f6b47d..05a9ae47620d17b5a53f991c0b3a0a5c
// Create the CAContext to send this to the GPU process, and the layer for
// the context.
if (use_remote_layer_api_) {
@@ -71,6 +72,7 @@
@@ -71,6 +72,7 @@ bool ImageTransportSurfaceOverlayMacBase<BaseClass>::Initialize(
[CAContext contextWithCGSConnection:connection_id options:@{}] retain]);
[ca_context_ setLayer:ca_layer_tree_coordinator_->GetCALayerForDisplay()];
}
@@ -60,7 +60,7 @@ index eb46993b8f40fdc7da35dae1b850dad637f6b47d..05a9ae47620d17b5a53f991c0b3a0a5c
return true;
}
@@ -139,7 +141,9 @@
@@ -139,7 +141,9 @@ ImageTransportSurfaceOverlayMacBase<BaseClass>::SwapBuffersInternal(
"GLImpl", static_cast<int>(gl::GetGLImplementation()),
"width", pixel_size_.width());
if (use_remote_layer_api_) {
@@ -74,7 +74,7 @@ diff --git a/ui/accelerated_widget_mac/display_ca_layer_tree.mm b/ui/accelerated
index 38f25d6314f653d7138d30c67c5ae49963863327..f2fda251ed975bd848a49b33830d329fc8954826 100644
--- a/ui/accelerated_widget_mac/display_ca_layer_tree.mm
+++ b/ui/accelerated_widget_mac/display_ca_layer_tree.mm
@@ -97,6 +97,7 @@ - (void)setContentsChanged;
@@ -97,6 +97,7 @@ void DisplayCALayerTree::UpdateCALayerTree(
}
void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) {
@@ -82,7 +82,7 @@ index 38f25d6314f653d7138d30c67c5ae49963863327..f2fda251ed975bd848a49b33830d329f
// Early-out if the remote layer has not changed.
if ([remote_layer_ contextId] == ca_context_id)
return;
@@ -121,6 +122,9 @@ - (void)setContentsChanged;
@@ -121,6 +122,9 @@ void DisplayCALayerTree::GotCALayerFrame(uint32_t ca_context_id) {
[io_surface_layer_ removeFromSuperlayer];
io_surface_layer_.reset();
}

View File

@@ -53,7 +53,7 @@ diff --git a/content/browser/accessibility/browser_accessibility_cocoa.mm b/cont
index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d5f902d3f 100644
--- a/content/browser/accessibility/browser_accessibility_cocoa.mm
+++ b/content/browser/accessibility/browser_accessibility_cocoa.mm
@@ -206,6 +206,7 @@
@@ -206,6 +206,7 @@ NSString* const
NSString* const NSAccessibilityLengthForTextMarkerRangeParameterizedAttribute =
@"AXLengthForTextMarkerRange";
@@ -61,7 +61,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
// Private attributes that can be used for testing text markers, e.g. in dump
// tree tests.
NSString* const
@@ -217,6 +218,7 @@
@@ -217,6 +218,7 @@ NSString* const
NSString* const
NSAccessibilityTextMarkerNodeDebugDescriptionParameterizedAttribute =
@"AXTextMarkerNodeDebugDescription";
@@ -69,7 +69,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
// Other private attributes.
NSString* const NSAccessibilitySelectTextWithCriteriaParameterizedAttribute =
@@ -240,6 +242,7 @@
@@ -240,6 +242,7 @@ NSDictionary* attributeToMethodNameMap = nil;
// VoiceOver uses -1 to mean "no limit" for AXResultsLimit.
const int kAXResultsLimitNoLimit = -1;
@@ -77,7 +77,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
extern "C" {
// The following are private accessibility APIs required for cursor navigation
@@ -479,6 +482,7 @@ void AddMisspelledTextAttributes(const AXPlatformRange& ax_range,
@@ -479,6 +482,7 @@ NSAttributedString* GetAttributedTextForTextMarkerRange(id marker_range) {
AddMisspelledTextAttributes(ax_range, attributed_text);
return attributed_text;
}
@@ -85,7 +85,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
// Returns an autoreleased copy of the AXNodeData's attribute.
NSString* NSStringForStringAttribute(BrowserAccessibility* browserAccessibility,
@@ -772,7 +776,9 @@ + (void)initialize {
@@ -772,7 +776,9 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
{NSAccessibilityEditableAncestorAttribute, @"editableAncestor"},
{NSAccessibilityElementBusyAttribute, @"elementBusy"},
{NSAccessibilityEnabledAttribute, @"enabled"},
@@ -95,7 +95,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
{NSAccessibilityExpandedAttribute, @"expanded"},
{NSAccessibilityFocusableAncestorAttribute, @"focusableAncestor"},
{NSAccessibilityFocusedAttribute, @"focused"},
@@ -784,8 +790,10 @@ + (void)initialize {
@@ -784,8 +790,10 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
{NSAccessibilityHighestEditableAncestorAttribute,
@"highestEditableAncestor"},
{NSAccessibilityIndexAttribute, @"index"},
@@ -106,7 +106,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
{NSAccessibilityInvalidAttribute, @"invalid"},
{NSAccessibilityIsMultiSelectableAttribute, @"isMultiSelectable"},
{NSAccessibilityLanguageAttribute, @"language"},
@@ -807,13 +815,17 @@ + (void)initialize {
@@ -807,13 +815,17 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
{NSAccessibilityRowsAttribute, @"rows"},
// TODO(aboxhall): expose
// NSAccessibilityServesAsTitleForUIElementsAttribute
@@ -124,7 +124,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
{NSAccessibilitySizeAttribute, @"size"},
{NSAccessibilitySortDirectionAttribute, @"sortDirection"},
{NSAccessibilitySubroleAttribute, @"subrole"},
@@ -1308,6 +1320,7 @@ - (NSNumber*)enabled {
@@ -1308,6 +1320,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
ax::mojom::Restriction::kDisabled];
}
@@ -132,7 +132,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
// Returns a text marker that points to the last character in the document that
// can be selected with VoiceOver.
- (id)endTextMarker {
@@ -1318,6 +1331,7 @@ - (id)endTextMarker {
@@ -1318,6 +1331,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtEndOfAnchor());
}
@@ -140,7 +140,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
- (NSNumber*)expanded {
if (![self instanceActive])
@@ -1467,6 +1481,8 @@ - (NSNumber*)index {
@@ -1467,6 +1481,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return nil;
}
@@ -149,7 +149,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
- (NSNumber*)insertionPointLineNumber {
if (![self instanceActive])
return nil;
@@ -1489,6 +1505,7 @@ - (NSNumber*)insertionPointLineNumber {
@@ -1489,6 +1505,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
caretPosition->AsTextPosition()->text_offset());
return @(std::distance(lineBreaks.begin(), iterator));
}
@@ -157,7 +157,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
// Returns whether or not this node should be ignored in the
// accessibility tree.
@@ -2166,6 +2183,7 @@ - (NSArray*)selectedChildren {
@@ -2166,6 +2183,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return ret;
}
@@ -165,7 +165,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
- (NSString*)selectedText {
if (![self instanceActive])
return nil;
@@ -2177,11 +2195,13 @@ - (NSString*)selectedText {
@@ -2177,11 +2195,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return nil;
return base::SysUTF16ToNSString(range.GetText());
}
@@ -179,7 +179,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
- (NSValue*)selectedTextRange {
if (![self instanceActive])
return nil;
@@ -2202,12 +2222,15 @@ - (NSValue*)selectedTextRange {
@@ -2202,12 +2222,15 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
int selLength = range.GetText().length();
return [NSValue valueWithRange:NSMakeRange(selStart, selLength)];
}
@@ -195,7 +195,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
- (NSValue*)size {
if (![self instanceActive])
@@ -2240,6 +2263,7 @@ - (NSString*)sortDirection {
@@ -2240,6 +2263,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return nil;
}
@@ -203,7 +203,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
// Returns a text marker that points to the first character in the document that
// can be selected with VoiceOver.
- (id)startTextMarker {
@@ -2250,6 +2274,7 @@ - (id)startTextMarker {
@@ -2250,6 +2274,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
BrowserAccessibilityPositionInstance position = root->CreatePositionAt(0);
return CreateTextMarker(position->CreatePositionAtStartOfAnchor());
}
@@ -211,7 +211,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
// Returns a subrole based upon the role.
- (NSString*)subrole {
@@ -2570,11 +2595,13 @@ - (NSAttributedString*)attributedValueForRange:(NSRange)range {
@@ -2570,11 +2595,13 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
NSMutableAttributedString* attributedValue =
[[[NSMutableAttributedString alloc] initWithString:value] autorelease];
@@ -225,7 +225,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
return [attributedValue attributedSubstringFromRange:range];
}
@@ -2677,9 +2704,8 @@ - (id)accessibilityAttributeValue:(NSString*)attribute
@@ -2677,9 +2704,8 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return ToBrowserAccessibilityCocoa(cell);
}
@@ -237,7 +237,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
BrowserAccessibilityPositionInstance position =
CreatePositionFromTextMarker(parameter);
if (!position->IsNullPosition())
@@ -2990,6 +3016,7 @@ AXPlatformRange range(std::move(lineStartPosition),
@@ -2990,6 +3016,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return CreateTextMarker(root->CreatePositionAt(index));
}
@@ -245,7 +245,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
if ([attribute isEqualToString:
NSAccessibilityBoundsForRangeParameterizedAttribute]) {
@@ -3025,6 +3052,7 @@ AXPlatformRange range(std::move(lineStartPosition),
@@ -3025,6 +3052,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return nil;
}
@@ -253,7 +253,7 @@ index bd9fa917f7b5cabb5d2b21dfb9c8b427440ff067..bd573f2d0e39218f802f35e0e3bd4e5d
if ([attribute
isEqualToString:
NSAccessibilityLineTextMarkerRangeForTextMarkerParameterizedAttribute]) {
@@ -3139,6 +3167,7 @@ AXPlatformRange range(std::move(lineStartPosition),
@@ -3139,6 +3167,7 @@ NSString* const NSAccessibilityRequiredAttributeChrome = @"AXRequired";
return @(child->GetIndexInParent());
}
@@ -265,7 +265,7 @@ diff --git a/content/browser/accessibility/browser_accessibility_manager_mac.mm
index 8e8b6b785ed6e2831f107e925c387f723f55a8fc..33324bbca5953f6f2f9d829e4c7b5d7daa3f49ea 100644
--- a/content/browser/accessibility/browser_accessibility_manager_mac.mm
+++ b/content/browser/accessibility/browser_accessibility_manager_mac.mm
@@ -534,6 +534,7 @@ void PostAnnouncementNotification(NSString* announcement) {
@@ -534,6 +534,7 @@ NSDictionary* BrowserAccessibilityManagerMac::
[user_info setObject:native_focus_object
forKey:NSAccessibilityTextChangeElement];
@@ -273,7 +273,7 @@ index 8e8b6b785ed6e2831f107e925c387f723f55a8fc..33324bbca5953f6f2f9d829e4c7b5d7d
id selected_text = [native_focus_object selectedTextMarkerRange];
if (selected_text) {
NSString* const NSAccessibilitySelectedTextMarkerRangeAttribute =
@@ -541,6 +542,7 @@ void PostAnnouncementNotification(NSString* announcement) {
@@ -541,6 +542,7 @@ NSDictionary* BrowserAccessibilityManagerMac::
[user_info setObject:selected_text
forKey:NSAccessibilitySelectedTextMarkerRangeAttribute];
}
@@ -297,7 +297,7 @@ index e59ac93d0e1554a2df5d8c74db2beba25d090228..6657c48664bdec4964b382f80309d1bf
namespace content {
@@ -22,6 +24,7 @@
@@ -22,6 +24,7 @@ namespace {
// verifies there are no existing open connections), and then indicates that
// Chrome should continue execution without access to launchservicesd.
void DisableSystemServices() {
@@ -325,7 +325,7 @@ index 7c018cce2c2d9981c94e91e5d97cff0d37548b13..cfb0fb20c81f908caac9933b820e40e0
extern "C" {
// Undocumented IOBluetooth Preference API [1]. Used by `blueutil` [2] and
// `Karabiner` [3] to programmatically control the Bluetooth state. Calling the
@@ -48,6 +49,7 @@
@@ -48,6 +49,7 @@ extern "C" {
// [4] https://support.apple.com/kb/PH25091
void IOBluetoothPreferenceSetControllerPowerState(int state);
}
@@ -333,7 +333,7 @@ index 7c018cce2c2d9981c94e91e5d97cff0d37548b13..cfb0fb20c81f908caac9933b820e40e0
namespace {
@@ -120,8 +122,10 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
@@ -120,8 +122,10 @@ BluetoothAdapterMac::BluetoothAdapterMac()
controller_state_function_(
base::BindRepeating(&BluetoothAdapterMac::GetHostControllerState,
base::Unretained(this))),
@@ -344,7 +344,7 @@ index 7c018cce2c2d9981c94e91e5d97cff0d37548b13..cfb0fb20c81f908caac9933b820e40e0
should_update_name_(true),
classic_discovery_manager_(
BluetoothDiscoveryManagerMac::CreateClassic(this)),
@@ -306,8 +310,12 @@ CBCentralManagerState GetCBManagerState(CBCentralManager* manager) {
@@ -306,8 +310,12 @@ base::WeakPtr<BluetoothAdapter> BluetoothAdapterMac::GetWeakPtr() {
}
bool BluetoothAdapterMac::SetPoweredImpl(bool powered) {

View File

@@ -7,10 +7,10 @@ This adds a callback from the network service that's used to implement
session.setCertificateVerifyCallback.
diff --git a/services/network/network_context.cc b/services/network/network_context.cc
index 059dea47ee06748f2d55ac9c214c9e8cb87de14f..80ecc470ab4ed4ce1cb797f7f11fe971c953145d 100644
index 5e37a45a033a5a01ea70d867c4fd2f50f4fd4072..d0d646a42b3ee27f848dd0a47179e8f573e51d8f 100644
--- a/services/network/network_context.cc
+++ b/services/network/network_context.cc
@@ -102,6 +102,11 @@
@@ -104,6 +104,11 @@
#include "services/network/url_loader.h"
#include "services/network/url_request_context_builder_mojo.h"
@@ -22,7 +22,7 @@ index 059dea47ee06748f2d55ac9c214c9e8cb87de14f..80ecc470ab4ed4ce1cb797f7f11fe971
#if BUILDFLAG(IS_CT_SUPPORTED)
#include "components/certificate_transparency/chrome_ct_policy_enforcer.h"
#include "components/certificate_transparency/chrome_require_ct_delegate.h"
@@ -352,6 +357,79 @@ bool UsingBuiltinCertVerifier(
@@ -354,6 +359,79 @@ bool UsingBuiltinCertVerifier(
} // namespace
@@ -102,7 +102,7 @@ index 059dea47ee06748f2d55ac9c214c9e8cb87de14f..80ecc470ab4ed4ce1cb797f7f11fe971
constexpr uint32_t NetworkContext::kMaxOutstandingRequestsPerProcess;
NetworkContext::PendingCertVerify::PendingCertVerify() = default;
@@ -520,6 +598,13 @@ void NetworkContext::SetClient(
@@ -522,6 +600,13 @@ void NetworkContext::SetClient(
client_.Bind(std::move(client));
}
@@ -116,7 +116,7 @@ index 059dea47ee06748f2d55ac9c214c9e8cb87de14f..80ecc470ab4ed4ce1cb797f7f11fe971
void NetworkContext::CreateURLLoaderFactory(
mojo::PendingReceiver<mojom::URLLoaderFactory> receiver,
mojom::URLLoaderFactoryParamsPtr params) {
@@ -1683,6 +1768,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
@@ -1696,6 +1781,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
base::CommandLine::ForCurrentProcess();
std::unique_ptr<net::CertVerifier> cert_verifier;
@@ -124,7 +124,7 @@ index 059dea47ee06748f2d55ac9c214c9e8cb87de14f..80ecc470ab4ed4ce1cb797f7f11fe971
if (g_cert_verifier_for_testing) {
cert_verifier = std::make_unique<WrappedTestingCertVerifier>();
} else {
@@ -1731,8 +1817,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
@@ -1744,8 +1830,8 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
}
#endif
#if BUILDFLAG(BUILTIN_CERT_VERIFIER_FEATURE_SUPPORTED)
@@ -135,7 +135,7 @@ index 059dea47ee06748f2d55ac9c214c9e8cb87de14f..80ecc470ab4ed4ce1cb797f7f11fe971
std::make_unique<net::CoalescingCertVerifier>(
std::make_unique<net::MultiThreadedCertVerifier>(
UsingBuiltinCertVerifier(params_->use_builtin_cert_verifier)
@@ -1742,12 +1828,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
@@ -1755,12 +1841,19 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext() {
cert_net_fetcher_))));
}
#endif
@@ -160,7 +160,7 @@ index 059dea47ee06748f2d55ac9c214c9e8cb87de14f..80ecc470ab4ed4ce1cb797f7f11fe971
std::unique_ptr<NetworkServiceNetworkDelegate> network_delegate =
std::make_unique<NetworkServiceNetworkDelegate>(
diff --git a/services/network/network_context.h b/services/network/network_context.h
index d2480f9cd2ce613221e77686986851a5281ad7bd..8ccb5c4d0c37a5dc0c7fa713683941eaddc1c609 100644
index 00f14ca8448be93c1d4ed91db3d68a1297adc728..9d201f1a5ef0eaf3f8b42cbb3d2593dbd068bdd6 100644
--- a/services/network/network_context.h
+++ b/services/network/network_context.h
@@ -84,6 +84,7 @@ class DomainReliabilityMonitor;
@@ -180,7 +180,7 @@ index d2480f9cd2ce613221e77686986851a5281ad7bd..8ccb5c4d0c37a5dc0c7fa713683941ea
void ResetURLLoaderFactories() override;
void GetCookieManager(
mojo::PendingReceiver<mojom::CookieManager> receiver) override;
@@ -644,6 +647,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
@@ -646,6 +649,8 @@ class COMPONENT_EXPORT(NETWORK_SERVICE) NetworkContext
std::unique_ptr<network::NSSTempCertsCacheChromeOS> nss_temp_certs_cache_;
#endif
@@ -190,10 +190,10 @@ index d2480f9cd2ce613221e77686986851a5281ad7bd..8ccb5c4d0c37a5dc0c7fa713683941ea
// CertNetFetcher is not used by the current platform.
scoped_refptr<net::CertNetFetcherURLRequest> cert_net_fetcher_;
diff --git a/services/network/public/mojom/network_context.mojom b/services/network/public/mojom/network_context.mojom
index b74677de805cc6f46c34b79883e0500ba337d82a..1d9ffd3de180e3256fb63a497544feeb427ae7ff 100644
index 9515fe92e0b1965285435f10817cdb07286dbe5e..96ba4d67bcdefef44ecd246acb883824c9e842d6 100644
--- a/services/network/public/mojom/network_context.mojom
+++ b/services/network/public/mojom/network_context.mojom
@@ -193,6 +193,17 @@ struct HttpAuthStaticNetworkContextParams {
@@ -159,6 +159,17 @@ struct HttpAuthStaticNetworkContextParams {
= DefaultCredentials.ALLOW_DEFAULT_CREDENTIALS;
};
@@ -211,7 +211,7 @@ index b74677de805cc6f46c34b79883e0500ba337d82a..1d9ffd3de180e3256fb63a497544feeb
// Parameters for constructing a network context.
struct NetworkContextParams {
// Name used by memory tools to identify the context.
@@ -845,6 +856,9 @@ interface NetworkContext {
@@ -815,6 +826,9 @@ interface NetworkContext {
// Sets a client for this network context.
SetClient(pending_remote<NetworkContextClient> client);

View File

@@ -108,10 +108,10 @@ index 4bf25bf1fa69f7d3869369172d375e2e489e62a1..f80ef2cecc8b111dc54e109646573a59
mojo::PendingReceiver<blink::mojom::NotificationService> receiver);
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index a79fb8ba837499b38e5fbabdde4e4aad3794857a..e788f6fcf7f2984752f21bf15956742b144bd5ce 100644
index a3fc1532583568cdef3e97123df549850c07088c..fe60749bfdbff9dc4336ccc11006745f2c2889c3 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -2060,7 +2060,7 @@ void RenderProcessHostImpl::CreateNotificationService(
@@ -2097,7 +2097,7 @@ void RenderProcessHostImpl::CreateNotificationService(
mojo::PendingReceiver<blink::mojom::NotificationService> receiver) {
DCHECK_CURRENTLY_ON(BrowserThread::UI);
storage_partition_impl_->GetPlatformNotificationContext()->CreateService(

View File

@@ -35,7 +35,7 @@ index e9b64a823ae7e25361f37190d247af0fa6a6f68a..43fdb0ad50d2b11a1bc28aa0f358c6dd
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/color_palette.h"
diff --git a/chrome/browser/ui/views/overlay/overlay_window_views.cc b/chrome/browser/ui/views/overlay/overlay_window_views.cc
index 4af5ead7df57e26ceb64ab909c4dc2de86ccfc41..294e6c08975fae62ca8dbe9e471f39a5adbf03e3 100644
index baf717117f81bbf76a99c0464c7b889d6ef56e31..1a97776018375b2017e56bc787e406e67f2539b5 100644
--- a/chrome/browser/ui/views/overlay/overlay_window_views.cc
+++ b/chrome/browser/ui/views/overlay/overlay_window_views.cc
@@ -19,7 +19,7 @@

View File

@@ -406,7 +406,7 @@ index 3695656560c54b5aa1fb08fb5e7c17d54989c597..85ffa5704d8dea809e80b1993c7c852f
// Tells the RenderFrame to switch the CSS to print media type, render every
// requested page using the print preview document's frame/node, and then
diff --git a/components/printing/renderer/print_render_frame_helper.cc b/components/printing/renderer/print_render_frame_helper.cc
index da3e127a34bdf79d3354b0822448ee75115a16e1..404388851849f9e11d7b2c5cb3798b713d660c7e 100644
index d0fe038507fccd2499ee24a82d051bd0568eb372..bbfab5601434cf3a050c220f237625d231c12f41 100644
--- a/components/printing/renderer/print_render_frame_helper.cc
+++ b/components/printing/renderer/print_render_frame_helper.cc
@@ -41,6 +41,7 @@
@@ -417,7 +417,7 @@ index da3e127a34bdf79d3354b0822448ee75115a16e1..404388851849f9e11d7b2c5cb3798b71
#include "printing/units.h"
#include "third_party/blink/public/common/associated_interfaces/associated_interface_registry.h"
#include "third_party/blink/public/common/frame/frame_owner_element_type.h"
@@ -1138,7 +1139,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
@@ -1146,7 +1147,8 @@ void PrintRenderFrameHelper::ScriptedPrint(bool user_initiated) {
web_frame->DispatchBeforePrintEvent();
if (!weak_this)
return;
@@ -427,7 +427,7 @@ index da3e127a34bdf79d3354b0822448ee75115a16e1..404388851849f9e11d7b2c5cb3798b71
if (weak_this)
web_frame->DispatchAfterPrintEvent();
}
@@ -1159,7 +1161,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
@@ -1167,7 +1169,7 @@ void PrintRenderFrameHelper::BindPrintRenderFrameReceiver(
receivers_.Add(this, std::move(receiver));
}
@@ -436,7 +436,7 @@ index da3e127a34bdf79d3354b0822448ee75115a16e1..404388851849f9e11d7b2c5cb3798b71
ScopedIPC scoped_ipc(weak_ptr_factory_.GetWeakPtr());
if (ipc_nesting_level_ > 1)
return;
@@ -1173,7 +1175,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
@@ -1181,7 +1183,7 @@ void PrintRenderFrameHelper::PrintRequestedPages() {
// If we are printing a PDF extension frame, find the plugin node and print
// that instead.
auto plugin = delegate_->GetPdfElement(frame);
@@ -445,7 +445,7 @@ index da3e127a34bdf79d3354b0822448ee75115a16e1..404388851849f9e11d7b2c5cb3798b71
if (!render_frame_gone_)
frame->DispatchAfterPrintEvent();
// WARNING: |this| may be gone at this point. Do not do any more work here and
@@ -1190,7 +1192,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
@@ -1198,7 +1200,7 @@ void PrintRenderFrameHelper::PrintForSystemDialog() {
return;
}
Print(frame, print_preview_context_.source_node(),
@@ -454,7 +454,7 @@ index da3e127a34bdf79d3354b0822448ee75115a16e1..404388851849f9e11d7b2c5cb3798b71
if (!render_frame_gone_)
frame->DispatchAfterPrintEvent();
// WARNING: |this| may be gone at this point. Do not do any more work here and
@@ -1230,6 +1232,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
@@ -1238,6 +1240,8 @@ void PrintRenderFrameHelper::PrintPreview(base::Value settings) {
if (ipc_nesting_level_ > 1)
return;
@@ -463,28 +463,7 @@ index da3e127a34bdf79d3354b0822448ee75115a16e1..404388851849f9e11d7b2c5cb3798b71
print_preview_context_.OnPrintPreview();
base::UmaHistogramEnumeration(print_preview_context_.IsForArc()
@@ -1587,13 +1591,13 @@ bool PrintRenderFrameHelper::FinalizePrintReadyDocument() {
print_preview_context_.set_error(PREVIEW_ERROR_METAFILE_CAPTURE_FAILED);
return false;
}
- } else {
- if (!CopyMetafileDataToReadOnlySharedMem(*metafile,
- &preview_params.content)) {
- LOG(ERROR) << "CopyMetafileDataToReadOnlySharedMem failed";
- print_preview_context_.set_error(PREVIEW_ERROR_METAFILE_COPY_FAILED);
- return false;
- }
+ }
+
+ if (!CopyMetafileDataToReadOnlySharedMem(*metafile,
+ &preview_params.content)) {
+ LOG(ERROR) << "CopyMetafileDataToReadOnlySharedMem failed";
+ print_preview_context_.set_error(PREVIEW_ERROR_METAFILE_COPY_FAILED);
+ return false;
}
preview_params.document_cookie = print_pages_params_->params.document_cookie;
@@ -1728,7 +1732,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -1742,7 +1746,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
auto self = weak_ptr_factory_.GetWeakPtr();
Print(duplicate_node.GetDocument().GetFrame(), duplicate_node,
@@ -495,7 +474,7 @@ index da3e127a34bdf79d3354b0822448ee75115a16e1..404388851849f9e11d7b2c5cb3798b71
// Check if |this| is still valid.
if (!self)
return;
@@ -1739,7 +1745,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
@@ -1753,7 +1759,9 @@ void PrintRenderFrameHelper::PrintNode(const blink::WebNode& node) {
void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
const blink::WebNode& node,
@@ -506,7 +485,7 @@ index da3e127a34bdf79d3354b0822448ee75115a16e1..404388851849f9e11d7b2c5cb3798b71
// If still not finished with earlier print request simply ignore.
if (prep_frame_view_)
return;
@@ -1747,7 +1755,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -1761,7 +1769,7 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
FrameReference frame_ref(frame);
int expected_page_count = 0;
@@ -515,7 +494,7 @@ index da3e127a34bdf79d3354b0822448ee75115a16e1..404388851849f9e11d7b2c5cb3798b71
DidFinishPrinting(FAIL_PRINT_INIT);
return; // Failed to init print page settings.
}
@@ -1767,8 +1775,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
@@ -1781,8 +1789,11 @@ void PrintRenderFrameHelper::Print(blink::WebLocalFrame* frame,
PrintMsg_PrintPages_Params print_settings;
auto self = weak_ptr_factory_.GetWeakPtr();
@@ -529,7 +508,7 @@ index da3e127a34bdf79d3354b0822448ee75115a16e1..404388851849f9e11d7b2c5cb3798b71
// Check if |this| is still valid.
if (!self)
return;
@@ -2003,10 +2014,23 @@ void PrintRenderFrameHelper::IPCProcessed() {
@@ -2017,10 +2028,23 @@ void PrintRenderFrameHelper::IPCProcessed() {
base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
}
@@ -556,7 +535,7 @@ index da3e127a34bdf79d3354b0822448ee75115a16e1..404388851849f9e11d7b2c5cb3798b71
// Check if the printer returned any settings, if the settings is empty, we
// can safely assume there are no printer drivers configured. So we safely
// terminate.
@@ -2026,12 +2050,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
@@ -2040,12 +2064,14 @@ bool PrintRenderFrameHelper::InitPrintSettings(bool fit_to_paper_size) {
return result;
}
@@ -576,7 +555,7 @@ index da3e127a34bdf79d3354b0822448ee75115a16e1..404388851849f9e11d7b2c5cb3798b71
Send(new PrintHostMsg_ShowInvalidPrinterSettingsError(routing_id()));
return false;
diff --git a/components/printing/renderer/print_render_frame_helper.h b/components/printing/renderer/print_render_frame_helper.h
index 7b23fdb789562ff05290819d3d48b8f382183d86..8d21b11abb3a3c09569eb661aa3167400d37aa82 100644
index 92ad8475b8268db89a5a7f22ad22547686388374..81df566a5908f1b35b9da5c2aad35ea7dec1dc3b 100644
--- a/components/printing/renderer/print_render_frame_helper.h
+++ b/components/printing/renderer/print_render_frame_helper.h
@@ -226,7 +226,7 @@ class PrintRenderFrameHelper

View File

@@ -8,7 +8,7 @@ needed in chromium but our autofill implementation uses them. This patch can be
our autofill implementation to work like Chromium's.
diff --git a/chrome/browser/ui/gtk/native_theme_gtk.cc b/chrome/browser/ui/gtk/native_theme_gtk.cc
index 37ae3743e8ad1fab49d198ef20cf1180f51aeeca..f632bb285ce044510555812e2265b5d914d86ae8 100644
index 4edbb80f12c59b329fc00eae0be4d8f04db28147..c4f550f2d394312875823acb45356f23d03e3125 100644
--- a/chrome/browser/ui/gtk/native_theme_gtk.cc
+++ b/chrome/browser/ui/gtk/native_theme_gtk.cc
@@ -341,6 +341,29 @@ base::Optional<SkColor> SkColorFromColorId(
@@ -42,25 +42,35 @@ index 37ae3743e8ad1fab49d198ef20cf1180f51aeeca..f632bb285ce044510555812e2265b5d9
// TODO(thomasanderson): Render GtkSpinner directly.
case ui::NativeTheme::kColorId_ThrobberSpinningColor:
diff --git a/ui/native_theme/common_theme.cc b/ui/native_theme/common_theme.cc
index 66f0e23521e29828602af02a9c96f74a2538bc5d..c63549672e49683f0751e22858f41e45d3dd796d 100644
index c17e1fdb8a4fb0dc2ca7528855ceb69589162f9a..92129ccd86cb20cce2c6d92d9fb79bbc6dcd2f0c 100644
--- a/ui/native_theme/common_theme.cc
+++ b/ui/native_theme/common_theme.cc
@@ -59,6 +59,14 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
case NativeTheme::kColorId_BubbleFooterBackground:
return SkColorSetRGB(0x32, 0x36, 0x39);
@@ -43,7 +43,8 @@ base::Optional<SkColor> GetHighContrastColor(
}
}
+ // Results Tables
+ case NativeTheme::kColorId_ResultsTableNormalBackground:
+ return SkColorSetRGB(0x28, 0x28, 0x28);
+ case NativeTheme::kColorId_ResultsTableNormalText:
+ return SK_ColorWHITE;
+ case NativeTheme::kColorId_ResultsTableDimmedText:
+ return SkColorSetA(base_theme->GetSystemColor(NativeTheme::kColorId_ResultsTableNormalText), 0x80);
-base::Optional<SkColor> GetDarkSchemeColor(NativeTheme::ColorId color_id) {
+base::Optional<SkColor> GetDarkSchemeColor(const NativeTheme* base_theme,
+ NativeTheme::ColorId color_id) {
switch (color_id) {
// Dialogs
case NativeTheme::kColorId_WindowBackground:
@@ -55,6 +56,14 @@ base::Optional<SkColor> GetDarkSchemeColor(NativeTheme::ColorId color_id) {
case NativeTheme::kColorId_BubbleFooterBackground:
return SkColorSetRGB(0x32, 0x36, 0x39);
+ // Results Tables
+ case NativeTheme::kColorId_ResultsTableNormalBackground:
+ return SkColorSetRGB(0x28, 0x28, 0x28);
+ case NativeTheme::kColorId_ResultsTableNormalText:
+ return SK_ColorWHITE;
+ case NativeTheme::kColorId_ResultsTableDimmedText:
+ return SkColorSetA(base_theme->GetSystemColor(NativeTheme::kColorId_ResultsTableNormalText), 0x80);
+
// FocusableBorder
case NativeTheme::kColorId_FocusedBorderColor:
return SkColorSetA(gfx::kGoogleBlue300, 0x4D);
@@ -462,6 +470,18 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
// FocusableBorder
case NativeTheme::kColorId_FocusedBorderColor:
return SkColorSetA(gfx::kGoogleBlue300, 0x4D);
@@ -461,6 +470,18 @@ SkColor GetDefaultColor(NativeTheme::ColorId color_id,
case NativeTheme::kColorId_UnfocusedBorderColor:
return gfx::kGoogleGrey300;
@@ -79,11 +89,20 @@ index 66f0e23521e29828602af02a9c96f74a2538bc5d..c63549672e49683f0751e22858f41e45
// Material spinner/throbber
case NativeTheme::kColorId_ThrobberSpinningColor:
return gfx::kGoogleBlue600;
@@ -520,7 +541,7 @@ SkColor GetAuraColor(NativeTheme::ColorId color_id,
}
if (color_scheme == NativeTheme::ColorScheme::kDark) {
- base::Optional<SkColor> color = GetDarkSchemeColor(color_id);
+ base::Optional<SkColor> color = GetDarkSchemeColor(base_theme, color_id);
if (color.has_value())
return color.value();
}
diff --git a/ui/native_theme/native_theme_color_id.h b/ui/native_theme/native_theme_color_id.h
index f2c54db5b2277ac1208989c6fa0d3e254d30b609..5e34d5e66b1c6e8562eff77c9143d3de921a1e66 100644
index 19b7c255b89dabbd263b1f583dd9b5dfa64015c3..b8be61106014bb0611111ea522108afa4ba6b914 100644
--- a/ui/native_theme/native_theme_color_id.h
+++ b/ui/native_theme/native_theme_color_id.h
@@ -117,6 +117,11 @@
@@ -118,6 +118,11 @@
OP(kColorId_TableHeaderText), \
OP(kColorId_TableHeaderBackground), \
OP(kColorId_TableHeaderSeparator), \
@@ -96,10 +115,10 @@ index f2c54db5b2277ac1208989c6fa0d3e254d30b609..5e34d5e66b1c6e8562eff77c9143d3de
OP(kColorId_ThrobberSpinningColor), \
OP(kColorId_ThrobberWaitingColor), \
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index 07db545df305a0c22375e9be3fad05621f69867a..dedaaaeaa93e55ec784f94864d670e0659d839bf 100644
index f374882c8f2fc1241608e8d9dfa6abb85ae75314..7bc92ec1d15b9f5c9f867354f2768f6edc158a92 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -639,6 +639,18 @@ SkColor NativeThemeWin::GetPlatformHighContrastColor(ColorId color_id) const {
@@ -642,6 +642,18 @@ SkColor NativeThemeWin::GetPlatformHighContrastColor(ColorId color_id) const {
case kColorId_ThrobberWaitingColor:
return system_colors_[SystemThemeColor::kGrayText];

View File

@@ -6,10 +6,10 @@ Subject: render_widget_host_view_base.patch
... something to do with OSR? and maybe <webview> as well? terrifying.
diff --git a/content/browser/renderer_host/render_widget_host_view_base.cc b/content/browser/renderer_host/render_widget_host_view_base.cc
index 6fc2ae557a265ea0965707786c38a2bf8684cf1b..de62972bd8f9c136589169b8d34bcf0a3d9a0d9c 100644
index 19c6b2e5c7053bebc77f4691ce03303f92de6d1b..f8e2b862f75732d9ec12ba9776f0bb01915b72e2 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.cc
+++ b/content/browser/renderer_host/render_widget_host_view_base.cc
@@ -614,6 +614,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
@@ -618,6 +618,13 @@ bool RenderWidgetHostViewBase::ScreenRectIsUnstableFor(
return false;
}
@@ -24,7 +24,7 @@ index 6fc2ae557a265ea0965707786c38a2bf8684cf1b..de62972bd8f9c136589169b8d34bcf0a
const blink::WebMouseEvent& event,
const ui::LatencyInfo& latency) {
diff --git a/content/browser/renderer_host/render_widget_host_view_base.h b/content/browser/renderer_host/render_widget_host_view_base.h
index fca7a56a4b7f062ed3eee37e92c9e0c893af25fc..b862113765fdeace6b214332bab05a21a4681d91 100644
index 27133fd983546181253847d02db019913ebd35c0..1183a6ef62dd9477f49e98552a9d9a4d5638df70 100644
--- a/content/browser/renderer_host/render_widget_host_view_base.h
+++ b/content/browser/renderer_host/render_widget_host_view_base.h
@@ -23,9 +23,11 @@
@@ -61,7 +61,7 @@ index fca7a56a4b7f062ed3eee37e92c9e0c893af25fc..b862113765fdeace6b214332bab05a21
// This only needs to be overridden by RenderWidgetHostViewBase subclasses
// that handle content embedded within other RenderWidgetHostViews.
gfx::PointF TransformPointToRootCoordSpaceF(
@@ -316,6 +323,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
@@ -319,6 +326,11 @@ class CONTENT_EXPORT RenderWidgetHostViewBase
virtual void ProcessGestureEvent(const blink::WebGestureEvent& event,
const ui::LatencyInfo& latency);

View File

@@ -25,7 +25,7 @@ index c242af13bdf58b1c830781badaf27aadc3c0179b..2ba56a1951c7a1a76c5a6ecef1d04235
// These are not documented, so use only after checking -respondsToSelector:.
@interface NSApplication (UndocumentedSpeechMethods)
- (void)speakString:(NSString*)string;
@@ -573,6 +578,9 @@ - (BOOL)acceptsMouseEventsWhenInactive {
@@ -573,6 +578,9 @@ void ExtractUnderlines(NSAttributedString* string,
}
- (BOOL)acceptsFirstMouse:(NSEvent*)theEvent {
@@ -35,7 +35,7 @@ index c242af13bdf58b1c830781badaf27aadc3c0179b..2ba56a1951c7a1a76c5a6ecef1d04235
return [self acceptsMouseEventsWhenInactive];
}
@@ -983,6 +991,10 @@ - (void)keyEvent:(NSEvent*)theEvent wasKeyEquivalent:(BOOL)equiv {
@@ -983,6 +991,10 @@ void ExtractUnderlines(NSAttributedString* string,
eventType == NSKeyDown &&
!(modifierFlags & NSCommandKeyMask);
@@ -46,7 +46,7 @@ index c242af13bdf58b1c830781badaf27aadc3c0179b..2ba56a1951c7a1a76c5a6ecef1d04235
// We only handle key down events and just simply forward other events.
if (eventType != NSKeyDown) {
_hostHelper->ForwardKeyboardEvent(event, latency_info);
@@ -1759,9 +1771,11 @@ - (NSAccessibilityRole)accessibilityRole {
@@ -1759,9 +1771,11 @@ void ExtractUnderlines(NSAttributedString* string,
// Since this implementation doesn't have to wait any IPC calls, this doesn't
// make any key-typing jank. --hbono 7/23/09
//
@@ -58,7 +58,7 @@ index c242af13bdf58b1c830781badaf27aadc3c0179b..2ba56a1951c7a1a76c5a6ecef1d04235
- (NSArray*)validAttributesForMarkedText {
// This code is just copied from WebKit except renaming variables.
@@ -1770,7 +1784,10 @@ - (NSArray*)validAttributesForMarkedText {
@@ -1770,7 +1784,10 @@ extern NSString* NSTextInputReplacementRangeAttributeName;
initWithObjects:NSUnderlineStyleAttributeName,
NSUnderlineColorAttributeName,
NSMarkedClauseSegmentAttributeName,

View File

@@ -52,7 +52,7 @@ Some alternatives to this patch:
None of these options seems like a substantial maintainability win over this patch to me (@nornagon).
diff --git a/chrome/BUILD.gn b/chrome/BUILD.gn
index bcb3ba42257d9c5098c8dff84adbcbb972ce3f66..288ce1fee493c371fead863977b88fe31f3e0b39 100644
index dc1faa8f3a75fa958201372f2df674c44a94b4e0..747b64ca6140ec2baae32119ad3f934abeaeeff2 100644
--- a/chrome/BUILD.gn
+++ b/chrome/BUILD.gn
@@ -1470,7 +1470,7 @@ if (is_chrome_branded && !is_android) {

View File

@@ -267,7 +267,7 @@ index 1ae8909a1404a43b34b9ef585511c7a3de39fa28..0d2a74ab5e9d55201a4992d81aecf9c2
const gfx::VectorIcon* minor_icon = nullptr;
gfx::Image icon;
diff --git a/ui/views/controls/menu/menu_item_view.cc b/ui/views/controls/menu/menu_item_view.cc
index c67fc8503db775079068d23c84bee615506ee81f..189951e6b3bdadbf9bc0bc17fb4263a4aa2deec5 100644
index c1cf9c128799d37dc69a61ca1d6bef55b3b3a660..7e32555cbd3f35f305a9686e118d3b7e0f5cdb15 100644
--- a/ui/views/controls/menu/menu_item_view.cc
+++ b/ui/views/controls/menu/menu_item_view.cc
@@ -279,6 +279,7 @@ MenuItemView* MenuItemView::AddMenuItemAt(
@@ -362,7 +362,7 @@ index c67fc8503db775079068d23c84bee615506ee81f..189951e6b3bdadbf9bc0bc17fb4263a4
PaintMinorIconAndText(canvas, style);
// Set the submenu indicator (arrow) image and color.
@@ -1244,15 +1263,20 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
@@ -1247,15 +1266,20 @@ MenuItemView::MenuItemDimensions MenuItemView::CalculateDimensions() const {
// Determine the length of the label text.
int string_width = gfx::GetStringWidth(title_, style.font_list);

View File

@@ -9,10 +9,10 @@ for every navigation to keep Node.js working properly. Once Native Modules in th
are required to be NAPI or context aware (Electron v11), this patch can be removed.
diff --git a/chrome/renderer/chrome_content_renderer_client.cc b/chrome/renderer/chrome_content_renderer_client.cc
index 6600de77c3f6c6a1a2409e0afe503d752038c9fa..9fa08ef75c82a75de4edad5694b8d07aae3fba83 100644
index 42383cda5a9ccb39e64ee65d0202bee60639623f..c9099e58ba6f552a83a7994529c7999e4e22cd07 100644
--- a/chrome/renderer/chrome_content_renderer_client.cc
+++ b/chrome/renderer/chrome_content_renderer_client.cc
@@ -1273,6 +1273,25 @@ bool ChromeContentRendererClient::AllowPopup() {
@@ -1272,6 +1272,25 @@ bool ChromeContentRendererClient::AllowPopup() {
#endif
}
@@ -92,10 +92,10 @@ index ee2079537feb23869fe4f812bcef33e1d7de29a7..93287ae0928b52f9df34834ad1a8ef0e
// |url|. If the function returns a valid |new_url|, the request must be
// updated to use it. The |attach_same_site_cookies| output parameter
diff --git a/content/renderer/render_frame_impl.cc b/content/renderer/render_frame_impl.cc
index 6c6265561512d1700b6b77a84ba127511a65483a..bb2603e365438d0369ba301c09082154333f1105 100644
index f15855248d6b7d2ff79d808aacc9dde158428cc8..69a7700c52c9ae3b70908dc55da1d31b98b05d0f 100644
--- a/content/renderer/render_frame_impl.cc
+++ b/content/renderer/render_frame_impl.cc
@@ -5662,6 +5662,23 @@ void RenderFrameImpl::BeginNavigation(
@@ -5683,6 +5683,23 @@ void RenderFrameImpl::BeginNavigation(
int cumulative_bindings = RenderProcess::current()->GetEnabledBindings();
bool should_fork = HasWebUIScheme(url) || HasWebUIScheme(old_url) ||
(cumulative_bindings & kWebUIBindingsPolicyMask);

View File

@@ -6,7 +6,7 @@ Subject: scroll_bounce_flag.patch
Patch to make scrollBounce option work.
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index 71b0c231ed5fc362b9ed425b054cae07bede6a8d..60d1361ddf59f6730d255ca7e2e4b884f8687fd0 100644
index bb9c821d210e0ddb55c0f97f837e5d7500d17d64..08dee90fc0c0dfe10c9b563e073f5abc9cb38937 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -1351,7 +1351,7 @@ bool RenderThreadImpl::IsGpuMemoryBufferCompositorResourcesEnabled() {

View File

@@ -22,7 +22,7 @@ However, the patch would need to be reviewed by the security team, as it
does touch a security-sensitive class.
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index e788f6fcf7f2984752f21bf15956742b144bd5ce..043bc132f8946ab66e42dadee9c3e1a548264238 100644
index fe60749bfdbff9dc4336ccc11006745f2c2889c3..ea736817be4084f43ef5266e4a7aac3a8bdaa9d7 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -413,6 +413,11 @@ class RendererSandboxedProcessLauncherDelegate
@@ -62,7 +62,7 @@ index e788f6fcf7f2984752f21bf15956742b144bd5ce..043bc132f8946ab66e42dadee9c3e1a5
};
const char kSessionStorageHolderKey[] = "kSessionStorageHolderKey";
@@ -1782,11 +1793,18 @@ bool RenderProcessHostImpl::Init() {
@@ -1819,11 +1830,18 @@ bool RenderProcessHostImpl::Init() {
cmd_line->PrependWrapper(renderer_prefix);
AppendRendererCommandLine(cmd_line.get());

View File

@@ -11,10 +11,10 @@ system.
See https://github.com/atom/electron/issues/3666
diff --git a/sandbox/linux/services/credentials.cc b/sandbox/linux/services/credentials.cc
index 542567f3ee58776a8ca915f1f62dcffa29141798..0f5f017b0ee63bbe7107f39143484bc6d728104e 100644
index d7b5d8c441354965ee0cb87a57d9552a4ae1f20d..dd145dd38fdbd7c426bd821baff0d9fe76201469 100644
--- a/sandbox/linux/services/credentials.cc
+++ b/sandbox/linux/services/credentials.cc
@@ -352,8 +352,10 @@ pid_t Credentials::ForkAndDropCapabilitiesInChild() {
@@ -354,8 +354,10 @@ pid_t Credentials::ForkAndDropCapabilitiesInChild() {
return pid;
}

View File

@@ -1,84 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Kleinschmidt <jkleinsc@github.com>
Date: Thu, 18 Oct 2018 17:08:28 -0700
Subject: verbose_generate_breakpad_symbols.patch
Temporarily add additional debugging statements to
generate_breakpad_symbols.py to determine why it is hanging.
diff --git a/components/crash/content/tools/generate_breakpad_symbols.py b/components/crash/content/tools/generate_breakpad_symbols.py
index a367fa2bf31591c98dd4245d42a71cd9da82f2d9..7ecc72117881fdfa64170d62f94627a7f6dda7ad 100755
--- a/components/crash/content/tools/generate_breakpad_symbols.py
+++ b/components/crash/content/tools/generate_breakpad_symbols.py
@@ -60,7 +60,10 @@ def Resolve(path, exe_path, loader_path, rpaths):
return path
-def GetSharedLibraryDependenciesLinux(binary):
+def GetSharedLibraryDependenciesLinux(binary, options):
+ if options.verbose:
+ print "GetSharedLibraryDependencies for %s" % binary
+
"""Return absolute paths to all shared library dependencies of the binary.
This implementation assumes that we're running on a Linux system."""
@@ -71,6 +74,9 @@ def GetSharedLibraryDependenciesLinux(binary):
m = lib_re.match(line)
if m:
result.append(os.path.abspath(m.group(1)))
+ if options.verbose:
+ print "Done GetSharedLibraryDependencies for %s" % binary
+ print result
return result
@@ -215,7 +221,7 @@ def GetSharedLibraryDependencies(options, binary, exe_path):
"""Return absolute paths to all shared library dependencies of the binary."""
deps = []
if options.platform == 'linux2':
- deps = GetSharedLibraryDependenciesLinux(binary)
+ deps = GetSharedLibraryDependenciesLinux(binary, options)
elif options.platform == 'android':
deps = GetSharedLibraryDependenciesAndroid(binary)
elif options.platform == 'darwin':
@@ -292,7 +298,8 @@ def CreateSymbolDir(options, output_dir, relative_hash_dir):
def GenerateSymbols(options, binaries):
"""Dumps the symbols of binary and places them in the given directory."""
-
+ if options.verbose:
+ print "Generating symbols for %s " % (' '.join(binaries))
queue = Queue.Queue()
print_lock = threading.Lock()
@@ -312,8 +319,15 @@ def GenerateSymbols(options, binaries):
reason = "Could not locate dump_syms executable."
break
+ if options.verbose:
+ with print_lock:
+ print "GetBinaryInfoFromHeaderInfo for %s" % (binary)
binary_info = GetBinaryInfoFromHeaderInfo(
subprocess.check_output([dump_syms, '-i', binary]).splitlines()[0])
+ if options.verbose:
+ with print_lock:
+ print "Done GetBinaryInfoFromHeaderInfo for %s: %s (%s)" % (binary, binary_info.name, binary_info.hash)
+
if not binary_info:
should_dump_syms = False
reason = "Could not obtain binary information."
@@ -331,8 +345,14 @@ def GenerateSymbols(options, binaries):
# See if there is a symbol file already found next to the binary
potential_symbol_files = glob.glob('%s.breakpad*' % binary)
for potential_symbol_file in potential_symbol_files:
+ if options.verbose:
+ with print_lock:
+ print "Looking at %s as a potential symbol file." % (potential_symbol_file)
with open(potential_symbol_file, 'rt') as f:
symbol_info = GetBinaryInfoFromHeaderInfo(f.readline())
+ if options.verbose:
+ with print_lock:
+ print "Got symbol_info for %s." % (potential_symbol_file)
if symbol_info == binary_info:
CreateSymbolDir(options, output_dir, binary_info.hash)
shutil.copyfile(potential_symbol_file, output_path)

View File

@@ -9,10 +9,10 @@ is needed for OSR.
Originally landed in https://github.com/electron/libchromiumcontent/pull/226.
diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
index b57520fe4254335fd31bb86673d30e79c0656d51..6f2e0c12e7b4a2928346f6690c2e8a072822124b 100644
index ebe258f91f77ccbb0bb0a21ad511dce9b17f4e80..b106b4fdb7a1bbb95977a8a9e69baaefe56a4379 100644
--- a/content/browser/web_contents/web_contents_impl.cc
+++ b/content/browser/web_contents/web_contents_impl.cc
@@ -2066,6 +2066,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2065,6 +2065,12 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
std::string unique_name;
frame_tree_.root()->SetFrameName(params.main_frame_name, unique_name);
@@ -25,7 +25,7 @@ index b57520fe4254335fd31bb86673d30e79c0656d51..6f2e0c12e7b4a2928346f6690c2e8a07
WebContentsViewDelegate* delegate =
GetContentClient()->browser()->GetWebContentsViewDelegate(this);
@@ -2076,6 +2082,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
@@ -2075,6 +2081,7 @@ void WebContentsImpl::Init(const WebContents::CreateParams& params) {
view_.reset(CreateWebContentsView(this, delegate,
&render_view_host_delegate_view_));
}

View File

@@ -8,26 +8,32 @@ This allows dragging and dropping between <webview>s.
Originally landed in https://github.com/electron/libchromiumcontent/pull/267
diff --git a/content/browser/web_contents/web_contents_view_aura.cc b/content/browser/web_contents/web_contents_view_aura.cc
index 025f82ede5c7105ffcf5cd834c8ab6392de672bc..1792809631d50e2a2761d385ffb8b526fe4d9833 100644
index 025f82ede5c7105ffcf5cd834c8ab6392de672bc..84cd07bc48e680053a012a674bd4b50fcf5123af 100644
--- a/content/browser/web_contents/web_contents_view_aura.cc
+++ b/content/browser/web_contents/web_contents_view_aura.cc
@@ -796,6 +796,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
@@ -796,9 +796,7 @@ gfx::NativeView WebContentsViewAura::GetRenderWidgetHostViewParent() const {
bool WebContentsViewAura::IsValidDragTarget(
RenderWidgetHostImpl* target_rwh) const {
- return target_rwh->GetProcess()->GetID() == drag_start_process_id_ ||
- GetRenderViewHostID(web_contents_->GetRenderViewHost()) !=
- drag_start_view_id_;
+ return true;
return target_rwh->GetProcess()->GetID() == drag_start_process_id_ ||
GetRenderViewHostID(web_contents_->GetRenderViewHost()) !=
drag_start_view_id_;
}
////////////////////////////////////////////////////////////////////////////////
diff --git a/content/browser/web_contents/web_drag_dest_mac.mm b/content/browser/web_contents/web_drag_dest_mac.mm
index b874b3c4b16ca87c9730c6caaf5788cff0ab3493..8931859b944905a80bb9d174a67d3aee0f0bf5d6 100644
index b874b3c4b16ca87c9730c6caaf5788cff0ab3493..2c82d63d646c9201abd6a669b726dae0f8bec12b 100644
--- a/content/browser/web_contents/web_drag_dest_mac.mm
+++ b/content/browser/web_contents/web_drag_dest_mac.mm
@@ -419,6 +419,7 @@ - (void)setDragStartTrackersForProcess:(int)processID {
@@ -419,9 +419,7 @@ void DropCompletionCallback(
}
- (bool)isValidDragTarget:(content::RenderWidgetHostImpl*)targetRWH {
- return targetRWH->GetProcess()->GetID() == _dragStartProcessID ||
- GetRenderViewHostID(_webContents->GetRenderViewHost()) !=
- _dragStartViewID;
+ return YES;
return targetRWH->GetProcess()->GetID() == _dragStartProcessID ||
GetRenderViewHostID(_webContents->GetRenderViewHost()) !=
_dragStartViewID;
}
@end

View File

@@ -545,12 +545,13 @@ index 0000000000000000000000000000000000000000..da9e2b42dccacc1ed9b00202c1ff73eb
+}
diff --git a/deps/llhttp/BUILD.gn b/deps/llhttp/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..e34e241e6733b19bf1b5762ad1307af0eba383f6
index 0000000000000000000000000000000000000000..ce15bc57093caa1bd84ea77e7438e892fb916427
--- /dev/null
+++ b/deps/llhttp/BUILD.gn
@@ -0,0 +1,13 @@
@@ -0,0 +1,14 @@
+config("llhttp_config") {
+ include_dirs = [ "include" ]
+ cflags = [ "-Wno-unreachable-code" ]
+}
+
+static_library("llhttp") {
@@ -616,10 +617,10 @@ index 0000000000000000000000000000000000000000..66af819990b338caa49ca59d1fe6c5ad
+}
diff --git a/deps/uv/BUILD.gn b/deps/uv/BUILD.gn
new file mode 100644
index 0000000000000000000000000000000000000000..510d86194ed71d78b2c89c7a77422afc0ef614ad
index 0000000000000000000000000000000000000000..67116f2070bb9200aace81afdf0b1e7a6e4fd0c0
--- /dev/null
+++ b/deps/uv/BUILD.gn
@@ -0,0 +1,190 @@
@@ -0,0 +1,191 @@
+config("libuv_config") {
+ include_dirs = [ "include" ]
+
@@ -664,6 +665,7 @@ index 0000000000000000000000000000000000000000..510d86194ed71d78b2c89c7a77422afc
+ "-Wno-switch",
+ "-Wno-unused-function",
+ "-Wno-unused-variable",
+ "-Wno-unreachable-code",
+ ]
+
+ libs = []

View File

@@ -8,10 +8,10 @@ patch works around that problem by using the implementations of those functions
found in the OpenSSL repo. I plan to upstream a version of this.
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 41b72d010824234c567586524d22cae6ac849edb..b2403821bb3cab4aa4587fcb757eeb101c8a7e03 100644
index 3c2393a1c674250f7bd262ee5dbc30330c9f2a58..ac1b57efaebbef7da1bb38b587146edad81289db 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -5027,7 +5027,7 @@ static unsigned int GetBytesOfRS(const ManagedEVPPKey& pkey) {
@@ -5021,7 +5021,7 @@ static unsigned int GetBytesOfRS(const ManagedEVPPKey& pkey) {
if (base_id == EVP_PKEY_DSA) {
DSA* dsa_key = EVP_PKEY_get0_DSA(pkey.get());
// Both r and s are computed mod q, so their width is limited by that of q.
@@ -20,7 +20,7 @@ index 41b72d010824234c567586524d22cae6ac849edb..b2403821bb3cab4aa4587fcb757eeb10
} else if (base_id == EVP_PKEY_EC) {
EC_KEY* ec_key = EVP_PKEY_get0_EC_KEY(pkey.get());
const EC_GROUP* ec_group = EC_KEY_get0_group(ec_key);
@@ -5056,8 +5056,8 @@ static AllocatedBuffer ConvertSignatureToP1363(Environment* env,
@@ -5050,8 +5050,8 @@ static AllocatedBuffer ConvertSignatureToP1363(Environment* env,
AllocatedBuffer buf = env->AllocateManaged(2 * n);
unsigned char* data = reinterpret_cast<unsigned char*>(buf.data());

View File

@@ -8,10 +8,10 @@ The BoringSSL incompatibilities (OPENSSL_memdup) will be shimmed in and this sho
be removed when the associated update is rolled into Chromium.
diff --git a/src/node_crypto.cc b/src/node_crypto.cc
index 7950c68f52050b7c9a6798b653a9c831256b21b5..41b72d010824234c567586524d22cae6ac849edb 100644
index e33a5d11ddbf900b26c1baa62f65bae49cdbaa24..3c2393a1c674250f7bd262ee5dbc30330c9f2a58 100644
--- a/src/node_crypto.cc
+++ b/src/node_crypto.cc
@@ -5514,18 +5514,6 @@ bool PublicKeyCipher::Cipher(Environment* env,
@@ -5508,18 +5508,6 @@ bool PublicKeyCipher::Cipher(Environment* env,
return false;
}

View File

@@ -1,7 +1,7 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: deepak1556 <hop2deep@gmail.com>
Date: Sun, 1 Mar 2020 13:59:57 -0800
Subject: [weakrefs] Rename FinalizationGroup to FinalizationRegistry for JS
Subject: Rename FinalizationGroup to FinalizationRegistry for JS
https://chromium-review.googlesource.com/c/v8/v8/+/2071236

View File

@@ -12,10 +12,10 @@ when we override ReallocateBufferMemory, so we therefore need to implement
Realloc on the v8 side.
diff --git a/include/v8.h b/include/v8.h
index 96d6cb815c5a733a1f04117781fe88909c4e67bc..b97acc4cd3d3125512b927b201ed83334f556baf 100644
index 77ac5098624a9536d1036d93232a6f3565c8c6ca..21b3d0b890bb234570e1ec241be83ac50e9066c8 100644
--- a/include/v8.h
+++ b/include/v8.h
@@ -5003,6 +5003,13 @@ class V8_EXPORT ArrayBuffer : public Object {
@@ -5041,6 +5041,13 @@ class V8_EXPORT ArrayBuffer : public Object {
*/
virtual void* AllocateUninitialized(size_t length) = 0;
@@ -30,7 +30,7 @@ index 96d6cb815c5a733a1f04117781fe88909c4e67bc..b97acc4cd3d3125512b927b201ed8333
* Free the memory block of size |length|, pointed to by |data|.
* That memory is guaranteed to be previously allocated by |Allocate|.
diff --git a/src/api/api.cc b/src/api/api.cc
index 0294e383fe47f4b16e70d84f8afa2f351fb650ab..1a2cd2c1566fab5ec67a23956bcf998e4252f84f 100644
index b2d6db3661a564d20f6d07a67bff627ba2ee75da..feda31f69bf53b392506bd87ac5d966b1e6b9329 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -528,6 +528,10 @@ void V8::SetSnapshotDataBlob(StartupData* snapshot_blob) {

View File

@@ -9,7 +9,7 @@ necessary for native modules to load.
Also, some fixes relating to mksnapshot on ARM.
diff --git a/BUILD.gn b/BUILD.gn
index 6c1088d932f3bc6eedec49a329120275a4fd8a2d..a04cd604ab7b7c300f7d7b4a7034d03397f3728f 100644
index 1ed2de137f7cec05fe583372d6bc096a4cec8ab0..f005e7f0d819f9aa5c434829e6d16e6bd7c4797e 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -311,7 +311,7 @@ config("internal_config") {
@@ -21,7 +21,7 @@ index 6c1088d932f3bc6eedec49a329120275a4fd8a2d..a04cd604ab7b7c300f7d7b4a7034d033
defines += [ "BUILDING_V8_SHARED" ]
}
}
@@ -3971,7 +3971,7 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -4004,7 +4004,7 @@ if (current_toolchain == v8_generator_toolchain) {
"src/interpreter/bytecodes.h",
]
@@ -30,7 +30,7 @@ index 6c1088d932f3bc6eedec49a329120275a4fd8a2d..a04cd604ab7b7c300f7d7b4a7034d033
deps = [
":v8_libbase",
@@ -4004,6 +4004,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
@@ -4037,6 +4037,8 @@ if (current_toolchain == v8_snapshot_toolchain) {
configs = [ ":internal_config" ]

View File

@@ -6,10 +6,10 @@ Subject: dcheck.patch
https://github.com/auchenberg/volkswagen
diff --git a/src/api/api.cc b/src/api/api.cc
index 1a2cd2c1566fab5ec67a23956bcf998e4252f84f..2de35499e25a930169af6b82e82e3c38b65da0b7 100644
index feda31f69bf53b392506bd87ac5d966b1e6b9329..edfb00f65d21190a65d8245f6d20dabb0b46a2cd 100644
--- a/src/api/api.cc
+++ b/src/api/api.cc
@@ -8689,7 +8689,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
@@ -8727,7 +8727,7 @@ void Isolate::SetPromiseRejectCallback(PromiseRejectCallback callback) {
}
void Isolate::PerformMicrotaskCheckpoint() {
@@ -19,7 +19,7 @@ index 1a2cd2c1566fab5ec67a23956bcf998e4252f84f..2de35499e25a930169af6b82e82e3c38
isolate->default_microtask_queue()->PerformCheckpoint(this);
}
diff --git a/src/heap/heap.cc b/src/heap/heap.cc
index 687122d04f0569f6b8e1bc2f177b2d9f7dc775f5..5034492ec5f88fcc5c1b6c4b3d2dea3c52258a3e 100644
index cf7abaa7a0defa244bd6b147b77ab9d01ff277f7..dc7b206cce6a7fb7df659710094c8beff3b83044 100644
--- a/src/heap/heap.cc
+++ b/src/heap/heap.cc
@@ -5474,9 +5474,9 @@ void Heap::TearDown() {

View File

@@ -12,7 +12,7 @@ This patch can be safely removed if, when it is removed, `node.lib` does not
contain any standard C++ library exports (e.g. `std::ostringstream`).
diff --git a/BUILD.gn b/BUILD.gn
index 45c7580386a2a5cb3eadf79da493f7077e52adc4..e2365d005b2c1b1a606a9621873fecca301ecb19 100644
index cede99e30985e29beaa6dd51c3a8230dc02c3ef8..436810b87f77764384d045ee5a8433881ce57ff6 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -311,6 +311,10 @@ config("internal_config") {

View File

@@ -6,10 +6,10 @@ Subject: expose_mksnapshot.patch
Needed in order to target mksnapshot for mksnapshot zip.
diff --git a/BUILD.gn b/BUILD.gn
index a04cd604ab7b7c300f7d7b4a7034d03397f3728f..45c7580386a2a5cb3eadf79da493f7077e52adc4 100644
index f005e7f0d819f9aa5c434829e6d16e6bd7c4797e..cede99e30985e29beaa6dd51c3a8230dc02c3ef8 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -3982,7 +3982,6 @@ if (current_toolchain == v8_generator_toolchain) {
@@ -4015,7 +4015,6 @@ if (current_toolchain == v8_generator_toolchain) {
if (current_toolchain == v8_snapshot_toolchain) {
v8_executable("mksnapshot") {

View File

@@ -6,7 +6,7 @@ Subject: Revert "[cleanup] Switch {OFFSET_OF} to {offsetof} where possible."
This reverts commit d287e4bc46243841c77cf9798516ee4dcc54bf43.
diff --git a/src/deoptimizer/deoptimizer.h b/src/deoptimizer/deoptimizer.h
index 58c65562d98628718066683194f829156534e1df..41034325724470b38797e32f27c5908a79dee128 100644
index 41ef7d2336e0b49fd4cc02d56556ebca2c605a49..2766ed7c6381a279d6161c058ea33fffe9860426 100644
--- a/src/deoptimizer/deoptimizer.h
+++ b/src/deoptimizer/deoptimizer.h
@@ -488,14 +488,14 @@ class Deoptimizer : public Malloced {
@@ -28,7 +28,7 @@ index 58c65562d98628718066683194f829156534e1df..41034325724470b38797e32f27c5908a
}
V8_EXPORT_PRIVATE static int GetDeoptimizedCodeCount(Isolate* isolate);
@@ -731,11 +731,11 @@ class FrameDescription {
@@ -732,11 +732,11 @@ class FrameDescription {
int parameter_count() { return parameter_count_; }
static int registers_offset() {

View File

@@ -0,0 +1,31 @@
#!/usr/bin/env python
import argparse
import json
import os
import sys
from lib import git
def export_patches(dirs):
for patch_dir, repo in dirs.iteritems():
git.export_patches(repo=repo, out_dir=patch_dir)
def parse_args():
parser = argparse.ArgumentParser(description='Export Electron patches')
parser.add_argument('config', nargs='+',
type=argparse.FileType('r'),
help='patches\' config(s) in the JSON format')
return parser.parse_args()
def main():
configs = parse_args().config
for config_json in configs:
export_patches(json.load(config_json))
if __name__ == '__main__':
main()

View File

@@ -6,115 +6,7 @@ import re
import subprocess
import sys
def guess_base_commit(repo):
"""Guess which commit the patches might be based on"""
try:
args = [
'git',
'-C',
repo,
'rev-parse',
'--verify',
'refs/patches/upstream-head',
]
upstream_head = subprocess.check_output(args).strip()
args = [
'git',
'-C',
repo,
'rev-list',
'--count',
upstream_head + '..',
]
num_commits = subprocess.check_output(args).strip()
return [upstream_head, num_commits]
except subprocess.CalledProcessError:
args = [
'git',
'-C',
repo,
'describe',
'--tags',
]
return subprocess.check_output(args).rsplit('-', 2)[0:2]
def format_patch(repo, since):
args = [
'git',
'-C',
repo,
'-c',
'core.attributesfile=' + os.path.join(os.path.dirname(os.path.realpath(__file__)), '.electron.attributes'),
# Ensure it is not possible to match anything
# Disabled for now as we have consistent chunk headers
# '-c',
# 'diff.electron.xfuncname=$^',
'format-patch',
'--keep-subject',
'--no-stat',
'--stdout',
# Per RFC 3676 the signature is separated from the body by a line with
# '-- ' on it. If the signature option is omitted the signature defaults
# to the Git version number.
'--no-signature',
# The name of the parent commit object isn't useful information in this
# context, so zero it out to avoid needless patch-file churn.
'--zero-commit',
# Some versions of git print out different numbers of characters in the
# 'index' line of patches, so pass --full-index to get consistent
# behaviour.
'--full-index',
since
]
return subprocess.check_output(args)
def split_patches(patch_data):
"""Split a concatenated series of patches into N separate patches"""
patches = []
patch_start = re.compile('^From [0-9a-f]+ ')
for line in patch_data.splitlines():
if patch_start.match(line):
patches.append([])
patches[-1].append(line)
return patches
def munge_subject_to_filename(subject):
"""Derive a suitable filename from a commit's subject"""
if subject.endswith('.patch'):
subject = subject[:-6]
return re.sub(r'[^A-Za-z0-9-]+', '_', subject).strip('_').lower() + '.patch'
def get_file_name(patch):
"""Return the name of the file to which the patch should be written"""
for line in patch:
if line.startswith('Patch-Filename: '):
return line[len('Patch-Filename: '):]
# If no patch-filename header, munge the subject.
for line in patch:
if line.startswith('Subject: '):
return munge_subject_to_filename(line[len('Subject: '):])
def remove_patch_filename(patch):
"""Strip out the Patch-Filename trailer from a patch's message body"""
force_keep_next_line = False
for i, l in enumerate(patch):
is_patchfilename = l.startswith('Patch-Filename: ')
next_is_patchfilename = i < len(patch) - 1 and patch[i+1].startswith('Patch-Filename: ')
if not force_keep_next_line and (is_patchfilename or (next_is_patchfilename and len(l.rstrip()) == 0)):
pass # drop this line
else:
yield l
force_keep_next_line = l.startswith('Subject: ')
from lib import git
def main(argv):
parser = argparse.ArgumentParser()
@@ -127,32 +19,7 @@ def main(argv):
"most recent tag or remote branch.")
args = parser.parse_args(argv)
repo = '.'
patch_range = args.patch_range
if patch_range is None:
patch_range, num_patches = guess_base_commit(repo)
sys.stderr.write("Exporting {} patches since {}\n".format(num_patches, patch_range))
patch_data = format_patch(repo, patch_range)
patches = split_patches(patch_data)
out_dir = args.output
try:
os.mkdir(out_dir)
except OSError:
pass
# remove old patches, so that deleted commits are correctly reflected in the
# patch files (as a removed file)
for p in os.listdir(out_dir):
if p.endswith('.patch'):
os.remove(os.path.join(out_dir, p))
with open(os.path.join(out_dir, '.patches'), 'w') as pl:
for patch in patches:
filename = get_file_name(patch)
with open(os.path.join(out_dir, filename), 'w') as f:
f.write('\n'.join(remove_patch_filename(patch)).rstrip('\n') + '\n')
pl.write(filename + '\n')
git.export_patches('.', args.output, patch_range=args.patch_range)
if __name__ == '__main__':

View File

@@ -7,7 +7,9 @@ structure, or make assumptions about the passed arguments or calls' outcomes.
"""
import os
import re
import subprocess
import sys
def is_repo_root(path):
@@ -126,7 +128,7 @@ def reset(repo):
def commit(repo, author, message):
""" Commit whatever in the index is now."""
"""Commit whatever in the index is now."""
# Let's setup committer info so git won't complain about it being missing.
# TODO: Is there a better way to set committer's name and email?
@@ -142,3 +144,143 @@ def commit(repo, author, message):
return_code = subprocess.call(args, env=env)
committed_successfully = (return_code == 0)
return committed_successfully
def get_upstream_head(repo):
args = [
'git',
'-C',
repo,
'rev-parse',
'--verify',
'refs/patches/upstream-head',
]
return subprocess.check_output(args).strip()
def get_commit_count(repo, commit_range):
args = [
'git',
'-C',
repo,
'rev-list',
'--count',
commit_range
]
return int(subprocess.check_output(args).strip())
def guess_base_commit(repo):
"""Guess which commit the patches might be based on"""
try:
upstream_head = get_upstream_head(repo)
num_commits = get_commit_count(repo, upstream_head + '..')
return [upstream_head, num_commits]
except subprocess.CalledProcessError:
args = [
'git',
'-C',
repo,
'describe',
'--tags',
]
return subprocess.check_output(args).rsplit('-', 2)[0:2]
def format_patch(repo, since):
args = [
'git',
'-C',
repo,
'-c',
'core.attributesfile=' + os.path.join(os.path.dirname(os.path.realpath(__file__)), '.electron.attributes'),
# Ensure it is not possible to match anything
# Disabled for now as we have consistent chunk headers
# '-c',
# 'diff.electron.xfuncname=$^',
'format-patch',
'--keep-subject',
'--no-stat',
'--stdout',
# Per RFC 3676 the signature is separated from the body by a line with
# '-- ' on it. If the signature option is omitted the signature defaults
# to the Git version number.
'--no-signature',
# The name of the parent commit object isn't useful information in this
# context, so zero it out to avoid needless patch-file churn.
'--zero-commit',
# Some versions of git print out different numbers of characters in the
# 'index' line of patches, so pass --full-index to get consistent
# behaviour.
'--full-index',
since
]
return subprocess.check_output(args)
def split_patches(patch_data):
"""Split a concatenated series of patches into N separate patches"""
patches = []
patch_start = re.compile('^From [0-9a-f]+ ')
for line in patch_data.splitlines():
if patch_start.match(line):
patches.append([])
patches[-1].append(line)
return patches
def munge_subject_to_filename(subject):
"""Derive a suitable filename from a commit's subject"""
if subject.endswith('.patch'):
subject = subject[:-6]
return re.sub(r'[^A-Za-z0-9-]+', '_', subject).strip('_').lower() + '.patch'
def get_file_name(patch):
"""Return the name of the file to which the patch should be written"""
for line in patch:
if line.startswith('Patch-Filename: '):
return line[len('Patch-Filename: '):]
# If no patch-filename header, munge the subject.
for line in patch:
if line.startswith('Subject: '):
return munge_subject_to_filename(line[len('Subject: '):])
def remove_patch_filename(patch):
"""Strip out the Patch-Filename trailer from a patch's message body"""
force_keep_next_line = False
for i, l in enumerate(patch):
is_patchfilename = l.startswith('Patch-Filename: ')
next_is_patchfilename = i < len(patch) - 1 and patch[i+1].startswith('Patch-Filename: ')
if not force_keep_next_line and (is_patchfilename or (next_is_patchfilename and len(l.rstrip()) == 0)):
pass # drop this line
else:
yield l
force_keep_next_line = l.startswith('Subject: ')
def export_patches(repo, out_dir, patch_range=None):
if patch_range is None:
patch_range, num_patches = guess_base_commit(repo)
sys.stderr.write("Exporting {} patches since {}\n".format(num_patches, patch_range))
patch_data = format_patch(repo, patch_range)
patches = split_patches(patch_data)
try:
os.mkdir(out_dir)
except OSError:
pass
# remove old patches, so that deleted commits are correctly reflected in the
# patch files (as a removed file)
for p in os.listdir(out_dir):
if p.endswith('.patch'):
os.remove(os.path.join(out_dir, p))
with open(os.path.join(out_dir, '.patches'), 'w') as pl:
for patch in patches:
filename = get_file_name(patch)
with open(os.path.join(out_dir, filename), 'w') as f:
f.write('\n'.join(remove_patch_filename(patch)).rstrip('\n') + '\n')
pl.write(filename + '\n')

View File

@@ -22,7 +22,7 @@ def strip_binary(binary_path, target_cpu):
strip = 'mips64el-redhat-linux-strip'
else:
strip = 'strip'
execute([strip, '--preserve-dates', binary_path])
execute([strip, '--discard-all', '--strip-debug', '--preserve-dates', binary_path])
def main():
args = parse_args()

View File

@@ -15,7 +15,6 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libEGL.dylib
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libGLESv2.dylib
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvulkan.dylib
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist

View File

@@ -15,7 +15,6 @@ Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Librari
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libEGL.dylib
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libswiftshader_libGLESv2.dylib
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvk_swiftshader.dylib
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/libvulkan.dylib
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Libraries/vk_swiftshader_icd.json
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/
Electron.app/Contents/Frameworks/Electron Framework.framework/Versions/A/Resources/Info.plist

View File

@@ -12,12 +12,12 @@
#include "content/browser/web_contents/web_contents_impl.h" // nogncheck
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "shell/browser/api/electron_api_web_contents_view.h"
#include "shell/browser/browser.h"
#include "shell/browser/unresponsive_suppressor.h"
#include "shell/browser/web_contents_preferences.h"
#include "shell/browser/window_list.h"
#include "shell/common/color_util.h"
#include "shell/common/gin_converters/value_converter.h"
#include "shell/common/gin_helper/constructor.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/object_template_builder.h"
@@ -32,8 +32,6 @@ namespace api {
BrowserWindow::BrowserWindow(gin::Arguments* args,
const gin_helper::Dictionary& options)
: TopLevelWindow(args->isolate(), options), weak_factory_(this) {
gin::Handle<class WebContents> web_contents;
// Use options.webPreferences in WebContents.
v8::Isolate* isolate = args->isolate();
gin_helper::Dictionary web_preferences =
@@ -60,23 +58,20 @@ BrowserWindow::BrowserWindow(gin::Arguments* args,
web_preferences.Set(options::kShow, show);
}
if (options.Get("webContents", &web_contents) && !web_contents.IsEmpty()) {
// Set webPreferences from options if using an existing webContents.
// These preferences will be used when the webContent launches new
// render processes.
auto* existing_preferences =
WebContentsPreferences::From(web_contents->web_contents());
base::DictionaryValue web_preferences_dict;
if (gin::ConvertFromV8(isolate, web_preferences.GetHandle(),
&web_preferences_dict)) {
existing_preferences->Clear();
existing_preferences->Merge(web_preferences_dict);
}
} else {
// Creates the WebContents used by BrowserWindow.
web_contents = WebContents::Create(isolate, web_preferences);
// Copy the webContents option to webPreferences. This is only used internally
// to implement nativeWindowOpen option.
if (options.Get("webContents", &value)) {
web_preferences.SetHidden("webContents", value);
}
// Creates the WebContentsView.
gin::Handle<WebContentsView> web_contents_view =
WebContentsView::Create(isolate, web_preferences);
DCHECK(web_contents_view.get());
// Save a reference of the WebContents.
gin::Handle<WebContents> web_contents =
web_contents_view->GetWebContents(isolate);
web_contents_.Reset(isolate, web_contents.ToV8());
api_web_contents_ = web_contents->GetWeakPtr();
api_web_contents_->AddObserver(this);
@@ -95,6 +90,9 @@ BrowserWindow::BrowserWindow(gin::Arguments* args,
InitWithArgs(args);
// Install the content view after TopLevelWindow's JS code is initialized.
SetContentView(gin::CreateHandle<View>(isolate, web_contents_view.get()));
#if defined(OS_MACOSX)
OverrideNSWindowContentView(web_contents->managed_web_contents());
#endif

View File

@@ -4,52 +4,32 @@
#include "shell/browser/api/electron_api_web_contents_view.h"
#include "content/public/browser/web_contents_user_data.h"
#include "base/no_destructor.h"
#include "shell/browser/api/electron_api_web_contents.h"
#include "shell/browser/browser.h"
#include "shell/browser/ui/inspectable_web_contents_view.h"
#include "shell/browser/web_contents_preferences.h"
#include "shell/common/gin_converters/value_converter.h"
#include "shell/common/gin_helper/constructor.h"
#include "shell/common/gin_helper/dictionary.h"
#include "shell/common/gin_helper/object_template_builder.h"
#include "shell/common/node_includes.h"
#if defined(OS_MACOSX)
#include "shell/browser/ui/cocoa/delayed_native_view_host.h"
#endif
namespace {
// Used to indicate whether a WebContents already has a view.
class WebContentsViewRelay
: public content::WebContentsUserData<WebContentsViewRelay> {
public:
~WebContentsViewRelay() override = default;
private:
explicit WebContentsViewRelay(content::WebContents* contents) {}
friend class content::WebContentsUserData<WebContentsViewRelay>;
electron::api::WebContentsView* view_ = nullptr;
WEB_CONTENTS_USER_DATA_KEY_DECL();
DISALLOW_COPY_AND_ASSIGN(WebContentsViewRelay);
};
WEB_CONTENTS_USER_DATA_KEY_IMPL(WebContentsViewRelay)
} // namespace
namespace electron {
namespace api {
WebContentsView::WebContentsView(v8::Isolate* isolate,
gin::Handle<WebContents> web_contents,
InspectableWebContents* iwc)
gin::Handle<WebContents> web_contents)
#if defined(OS_MACOSX)
: View(new DelayedNativeViewHost(iwc->GetView()->GetNativeView())),
: View(new DelayedNativeViewHost(
web_contents->managed_web_contents()->GetView()->GetNativeView())),
#else
: View(iwc->GetView()->GetView()),
: View(web_contents->managed_web_contents()->GetView()->GetView()),
#endif
web_contents_(isolate, web_contents->GetWrapper()),
api_web_contents_(web_contents.get()) {
@@ -59,7 +39,6 @@ WebContentsView::WebContentsView(v8::Isolate* isolate,
// managed by InspectableWebContents.
set_delete_view(false);
#endif
WebContentsViewRelay::CreateForWebContents(web_contents->web_contents());
Observe(web_contents->web_contents());
}
@@ -78,30 +57,66 @@ WebContentsView::~WebContentsView() {
}
}
gin::Handle<WebContents> WebContentsView::GetWebContents(v8::Isolate* isolate) {
return gin::CreateHandle(isolate, api_web_contents_);
}
void WebContentsView::WebContentsDestroyed() {
api_web_contents_ = nullptr;
web_contents_.Reset();
}
// static
gin::Handle<WebContentsView> WebContentsView::Create(
v8::Isolate* isolate,
const gin_helper::Dictionary& web_preferences) {
v8::Local<v8::Context> context = isolate->GetCurrentContext();
v8::Local<v8::Value> arg = gin::ConvertToV8(isolate, web_preferences);
v8::Local<v8::Object> obj;
if (GetConstructor(isolate)->NewInstance(context, 1, &arg).ToLocal(&obj)) {
gin::Handle<WebContentsView> web_contents_view;
if (gin::ConvertFromV8(isolate, obj, &web_contents_view))
return web_contents_view;
}
return gin::Handle<WebContentsView>();
}
// static
v8::Local<v8::Function> WebContentsView::GetConstructor(v8::Isolate* isolate) {
static base::NoDestructor<v8::Global<v8::Function>> constructor;
if (constructor.get()->IsEmpty()) {
constructor->Reset(
isolate, gin_helper::CreateConstructor<WebContentsView>(
isolate, base::BindRepeating(&WebContentsView::New)));
}
return v8::Local<v8::Function>::New(isolate, *constructor.get());
}
// static
gin_helper::WrappableBase* WebContentsView::New(
gin_helper::Arguments* args,
gin::Handle<WebContents> web_contents) {
// Currently we only support InspectableWebContents, e.g. the WebContents
// created by users directly. To support devToolsWebContents we need to create
// a wrapper view.
if (!web_contents->managed_web_contents()) {
args->ThrowError("The WebContents must be created by user");
return nullptr;
}
// Check if the WebContents has already been added to a view.
if (WebContentsViewRelay::FromWebContents(web_contents->web_contents())) {
args->ThrowError("The WebContents has already been added to a View");
return nullptr;
const gin_helper::Dictionary& web_preferences) {
// Check if BrowserWindow has passend |webContents| option to us.
gin::Handle<WebContents> web_contents;
if (web_preferences.GetHidden("webContents", &web_contents) &&
!web_contents.IsEmpty()) {
// Set webPreferences from options if using an existing webContents.
// These preferences will be used when the webContent launches new
// render processes.
auto* existing_preferences =
WebContentsPreferences::From(web_contents->web_contents());
base::DictionaryValue web_preferences_dict;
if (gin::ConvertFromV8(args->isolate(), web_preferences.GetHandle(),
&web_preferences_dict)) {
existing_preferences->Clear();
existing_preferences->Merge(web_preferences_dict);
}
} else {
// Create one if not.
web_contents = WebContents::Create(args->isolate(), web_preferences);
}
// Constructor call.
auto* view = new WebContentsView(args->isolate(), web_contents,
web_contents->managed_web_contents());
auto* view = new WebContentsView(args->isolate(), web_contents);
view->InitWithArgs(args);
return view;
}
@@ -109,7 +124,11 @@ gin_helper::WrappableBase* WebContentsView::New(
// static
void WebContentsView::BuildPrototype(
v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype) {}
v8::Local<v8::FunctionTemplate> prototype) {
prototype->SetClassName(gin::StringToV8(isolate, "WebContentsView"));
gin_helper::ObjectTemplateBuilder(isolate, prototype->PrototypeTemplate())
.SetProperty("webContents", &WebContentsView::GetWebContents);
}
} // namespace api
@@ -125,9 +144,7 @@ void Initialize(v8::Local<v8::Object> exports,
void* priv) {
v8::Isolate* isolate = context->GetIsolate();
gin_helper::Dictionary dict(isolate, exports);
dict.Set("WebContentsView",
gin_helper::CreateConstructor<WebContentsView>(
isolate, base::BindRepeating(&WebContentsView::New)));
dict.Set("WebContentsView", WebContentsView::GetConstructor(isolate));
}
} // namespace

View File

@@ -8,6 +8,10 @@
#include "content/public/browser/web_contents_observer.h"
#include "shell/browser/api/electron_api_view.h"
namespace gin_helper {
class Dictionary;
}
namespace electron {
class InspectableWebContents;
@@ -18,22 +22,34 @@ class WebContents;
class WebContentsView : public View, public content::WebContentsObserver {
public:
static gin_helper::WrappableBase* New(gin_helper::Arguments* args,
gin::Handle<WebContents> web_contents);
// Create a new instance of WebContentsView.
static gin::Handle<WebContentsView> Create(
v8::Isolate* isolate,
const gin_helper::Dictionary& web_preferences);
// Return the cached constructor function.
static v8::Local<v8::Function> GetConstructor(v8::Isolate* isolate);
// gin_helper::Wrappable
static void BuildPrototype(v8::Isolate* isolate,
v8::Local<v8::FunctionTemplate> prototype);
// Public APIs.
gin::Handle<WebContents> GetWebContents(v8::Isolate* isolate);
protected:
WebContentsView(v8::Isolate* isolate,
gin::Handle<WebContents> web_contents,
InspectableWebContents* iwc);
// Takes an existing WebContents.
WebContentsView(v8::Isolate* isolate, gin::Handle<WebContents> web_contents);
~WebContentsView() override;
// content::WebContentsObserver:
void WebContentsDestroyed() override;
private:
static gin_helper::WrappableBase* New(
gin_helper::Arguments* args,
const gin_helper::Dictionary& web_preferences);
// Keep a reference to v8 wrapper.
v8::Global<v8::Value> web_contents_;
api::WebContents* api_web_contents_;

View File

@@ -117,6 +117,7 @@ void ElectronDownloadManagerDelegate::OnDownloadPathGenerated(
settings.force_detached = offscreen;
v8::Isolate* isolate = v8::Isolate::GetCurrent();
v8::HandleScope scope(isolate);
gin_helper::Promise<gin_helper::Dictionary> dialog_promise(isolate);
auto dialog_callback = base::BindOnce(
&ElectronDownloadManagerDelegate::OnDownloadSaveDialogDone,

View File

@@ -120,7 +120,8 @@ void ProxyingWebSocket::OnConnectionEstablished(
mojo::PendingRemote<network::mojom::WebSocket> websocket,
mojo::PendingReceiver<network::mojom::WebSocketClient> client_receiver,
network::mojom::WebSocketHandshakeResponsePtr response,
mojo::ScopedDataPipeConsumerHandle readable) {
mojo::ScopedDataPipeConsumerHandle readable,
mojo::ScopedDataPipeProducerHandle writable) {
DCHECK(forwarding_handshake_client_);
DCHECK(!is_done_);
is_done_ = true;
@@ -128,6 +129,7 @@ void ProxyingWebSocket::OnConnectionEstablished(
client_receiver_ = std::move(client_receiver);
handshake_response_ = std::move(response);
readable_ = std::move(readable);
writable_ = std::move(writable);
response_->remote_endpoint = handshake_response_->remote_endpoint;
@@ -156,7 +158,8 @@ void ProxyingWebSocket::ContinueToCompleted() {
web_request_api_->OnCompleted(&info_, request_, net::ERR_WS_UPGRADE);
forwarding_handshake_client_->OnConnectionEstablished(
std::move(websocket_), std::move(client_receiver_),
std::move(handshake_response_), std::move(readable_));
std::move(handshake_response_), std::move(readable_),
std::move(writable_));
// Deletes |this|.
delete this;

View File

@@ -59,7 +59,8 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient,
mojo::PendingRemote<network::mojom::WebSocket> websocket,
mojo::PendingReceiver<network::mojom::WebSocketClient> client_receiver,
network::mojom::WebSocketHandshakeResponsePtr response,
mojo::ScopedDataPipeConsumerHandle readable) override;
mojo::ScopedDataPipeConsumerHandle readable,
mojo::ScopedDataPipeProducerHandle writable) override;
// network::mojom::AuthenticationHandler method:
void OnAuthRequired(const net::AuthChallengeInfo& auth_info,
@@ -149,6 +150,7 @@ class ProxyingWebSocket : public network::mojom::WebSocketHandshakeClient,
mojo::PendingReceiver<network::mojom::WebSocketClient> client_receiver_;
network::mojom::WebSocketHandshakeResponsePtr handshake_response_ = nullptr;
mojo::ScopedDataPipeConsumerHandle readable_;
mojo::ScopedDataPipeProducerHandle writable_;
extensions::WebRequestInfo info_;

View File

@@ -50,8 +50,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 10,0,0,20200403
PRODUCTVERSION 10,0,0,20200403
FILEVERSION 10,0,0,20200409
PRODUCTVERSION 10,0,0,20200409
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L

View File

@@ -207,11 +207,17 @@ bool ScopedDisableResize::disable_resize_ = false;
// If we're in simple fullscreen mode and trying to exit it
// we need to ensure we exit it properly to prevent a crash
// with NSWindowStyleMaskTitled mode
if (is_simple_fs || always_simple_fs)
// with NSWindowStyleMaskTitled mode.
if (is_simple_fs || always_simple_fs) {
shell_->SetSimpleFullScreen(!is_simple_fs);
else
} else {
bool maximizable = shell_->IsMaximizable();
[super toggleFullScreen:sender];
// Exiting fullscreen causes Cocoa to redraw the NSWindow, which resets
// the enabled state for NSWindowZoomButton. We need to persist it.
shell_->SetMaximizable(maximizable);
}
}
- (void)performMiniaturize:(id)sender {

View File

@@ -100,7 +100,6 @@ void DevToolsManagerDelegate::Inspect(content::DevToolsAgentHost* agent_host) {}
void DevToolsManagerDelegate::HandleCommand(
content::DevToolsAgentHostClientChannel* channel,
const std::string& method,
base::span<const uint8_t> message,
NotHandledCallback callback) {
std::move(callback).Run(message);

View File

@@ -24,7 +24,6 @@ class DevToolsManagerDelegate : public content::DevToolsManagerDelegate {
// DevToolsManagerDelegate implementation.
void Inspect(content::DevToolsAgentHost* agent_host) override;
void HandleCommand(content::DevToolsAgentHostClientChannel* channel,
const std::string& method,
base::span<const uint8_t> message,
NotHandledCallback callback) override;
scoped_refptr<content::DevToolsAgentHost> CreateNewTarget(

View File

@@ -10,6 +10,18 @@
#include "shell/browser/native_window.h"
#include "shell/browser/window_list_observer.h"
namespace {
template <typename T>
std::vector<base::WeakPtr<T>> ConvertToWeakPtrVector(std::vector<T*> raw_ptrs) {
std::vector<base::WeakPtr<T>> converted_to_weak;
converted_to_weak.reserve(raw_ptrs.size());
for (auto* raw_ptr : raw_ptrs) {
converted_to_weak.push_back(raw_ptr->GetWeakPtr());
}
return converted_to_weak;
}
} // namespace
namespace electron {
// static
@@ -80,20 +92,26 @@ void WindowList::RemoveObserver(WindowListObserver* observer) {
// static
void WindowList::CloseAllWindows() {
WindowVector windows = GetInstance()->windows_;
std::vector<base::WeakPtr<NativeWindow>> weak_windows =
ConvertToWeakPtrVector(GetInstance()->windows_);
#if defined(OS_MACOSX)
std::reverse(windows.begin(), windows.end());
std::reverse(weak_windows.begin(), weak_windows.end());
#endif
for (auto* const& window : windows)
if (!window->IsClosed())
for (const auto& window : weak_windows) {
if (window && !window->IsClosed())
window->Close();
}
}
// static
void WindowList::DestroyAllWindows() {
WindowVector windows = GetInstance()->windows_;
for (auto* const& window : windows)
window->CloseImmediately(); // e.g. Destroy()
std::vector<base::WeakPtr<NativeWindow>> weak_windows =
ConvertToWeakPtrVector(GetInstance()->windows_);
for (const auto& window : weak_windows) {
if (window)
window->CloseImmediately();
}
}
WindowList::WindowList() = default;

View File

@@ -27,7 +27,13 @@ declare namespace Electron {
}
class View {}
class WebContentsView {
constructor(webContents: WebContents)
constructor(options: BrowserWindowConstructorOptions)
}
namespace Main {
class TopLevelWindow extends Electron.TopLevelWindow {}
class View extends Electron.View {}
class WebContentsView extends Electron.WebContentsView {}
}
}

View File

@@ -5,7 +5,7 @@ import * as http from 'http';
import * as net from 'net';
import * as fs from 'fs';
import * as path from 'path';
import { app, BrowserWindow, Menu, session } from 'electron';
import { app, BrowserWindow, Menu, session } from 'electron/main';
import { emittedOnce } from './events-helpers';
import { closeWindow, closeAllWindows } from './window-helpers';
import { ifdescribe } from './spec-helpers';

View File

@@ -1,4 +1,4 @@
import { autoUpdater } from 'electron';
import { autoUpdater } from 'electron/main';
import { expect } from 'chai';
import { ifit, ifdescribe } from './spec-helpers';

View File

@@ -2,7 +2,7 @@ import { expect } from 'chai';
import * as ChildProcess from 'child_process';
import * as path from 'path';
import { emittedOnce } from './events-helpers';
import { BrowserView, BrowserWindow } from 'electron';
import { BrowserView, BrowserWindow } from 'electron/main';
import { closeWindow } from './window-helpers';
describe('BrowserView module', () => {

View File

@@ -1,7 +1,7 @@
import { expect } from 'chai';
import * as path from 'path';
import { ipcMain, BrowserWindow, WebPreferences, app } from 'electron';
import { ipcMain, BrowserWindow, WebPreferences, app } from 'electron/main';
import { closeWindow } from './window-helpers';
describe('BrowserWindow with affinity module', () => {

View File

@@ -5,7 +5,7 @@ import * as os from 'os';
import * as qs from 'querystring';
import * as http from 'http';
import { AddressInfo } from 'net';
import { app, BrowserWindow, BrowserView, ipcMain, OnBeforeSendHeadersListenerDetails, protocol, screen, webContents, session, WebContents } from 'electron';
import { app, BrowserWindow, BrowserView, ipcMain, OnBeforeSendHeadersListenerDetails, protocol, screen, webContents, session, WebContents } from 'electron/main';
import { emittedOnce } from './events-helpers';
import { ifit, ifdescribe } from './spec-helpers';

View File

@@ -1,5 +1,5 @@
import { expect } from 'chai';
import { app, contentTracing, TraceConfig, TraceCategoriesAndOptions } from 'electron';
import { app, contentTracing, TraceConfig, TraceCategoriesAndOptions } from 'electron/main';
import * as fs from 'fs';
import * as path from 'path';
import { ifdescribe } from './spec-helpers';

View File

@@ -1,4 +1,5 @@
import { contextBridge, BrowserWindow, ipcMain } from 'electron';
import { BrowserWindow, ipcMain } from 'electron/main';
import { contextBridge } from 'electron/renderer';
import { expect } from 'chai';
import * as fs from 'fs-extra';
import * as os from 'os';
@@ -45,10 +46,10 @@ describe('contextBridge', () => {
const generateTests = (useSandbox: boolean) => {
describe(`with sandbox=${useSandbox}`, () => {
const makeBindingWindow = async (bindingCreator: Function) => {
const preloadContent = `const electron_1 = require('electron');
const preloadContent = `const renderer_1 = require('electron');
${useSandbox ? '' : `require('v8').setFlagsFromString('--expose_gc');
const gc=require('vm').runInNewContext('gc');
electron_1.contextBridge.exposeInMainWorld('GCRunner', {
renderer_1.contextBridge.exposeInMainWorld('GCRunner', {
run: () => gc()
});`}
(${bindingCreator.toString()})();`;

View File

@@ -7,7 +7,8 @@ import * as path from 'path';
import { ifdescribe, ifit } from './spec-helpers';
import * as temp from 'temp';
import * as url from 'url';
import { ipcMain, app, BrowserWindow, crashReporter, BrowserWindowConstructorOptions } from 'electron';
import { ipcMain, app, BrowserWindow, BrowserWindowConstructorOptions } from 'electron/main';
import { crashReporter } from 'electron/common';
import { AddressInfo } from 'net';
import { closeWindow, closeAllWindows } from './window-helpers';
import { EventEmitter } from 'events';

View File

@@ -2,7 +2,7 @@ import { expect } from 'chai';
import * as http from 'http';
import * as path from 'path';
import { AddressInfo } from 'net';
import { BrowserWindow } from 'electron';
import { BrowserWindow } from 'electron/main';
import { closeAllWindows } from './window-helpers';
import { emittedOnce } from './events-helpers';

View File

@@ -1,5 +1,5 @@
import { expect } from 'chai';
import { deprecate } from 'electron';
import { deprecate } from 'electron/main';
describe('deprecate', () => {
let throwing: boolean;

View File

@@ -1,5 +1,6 @@
import { expect } from 'chai';
import { desktopCapturer, screen, BrowserWindow, SourcesOptions } from 'electron';
import { screen, BrowserWindow, SourcesOptions } from 'electron/main';
import { desktopCapturer } from 'electron/renderer';
import { emittedOnce } from './events-helpers';
import { ifdescribe, ifit } from './spec-helpers';
import { closeAllWindows } from './window-helpers';

View File

@@ -1,5 +1,5 @@
import { expect } from 'chai';
import { dialog, BrowserWindow } from 'electron';
import { dialog, BrowserWindow } from 'electron/main';
import { closeAllWindows } from './window-helpers';
import { ifit } from './spec-helpers';

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