Skip to content

Commit

Permalink
Merge branch '15-x-y' into cherry-pick/15-x-y/chromium/1fcfb942bd
Browse files Browse the repository at this point in the history
  • Loading branch information
electron-bot committed Nov 22, 2021
2 parents b4754a5 + 16be926 commit d00825d
Show file tree
Hide file tree
Showing 8 changed files with 671 additions and 14 deletions.
2 changes: 1 addition & 1 deletion docs/tutorial/application-distribution.md
Expand Up @@ -56,7 +56,7 @@ will then be your distribution to deliver to users.

### With an app source code archive

Instead of from shipping your app by copying all of its source files, you can
Instead of shipping your app by copying all of its source files, you can
package your app into an [asar] archive to improve the performance of reading
files on platforms like Windows, if you are not already using a bundler such
as Parcel or Webpack.
Expand Down
1 change: 1 addition & 0 deletions patches/chromium/.patches
Expand Up @@ -115,3 +115,4 @@ move_networkstateobserver_from_document_to_window.patch
cherry-pick-0894af410c4e.patch
cherry-pick-91dd4f79ab5b.patch
cachestorage_store_partial_opaque_responses.patch
cherry-pick-a5f54612590d.patch
649 changes: 649 additions & 0 deletions patches/chromium/cherry-pick-a5f54612590d.patch

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions script/lint.js
Expand Up @@ -14,10 +14,6 @@ const DEPOT_TOOLS = path.resolve(SOURCE_ROOT, '..', 'third_party', 'depot_tools'

const IGNORELIST = new Set([
['shell', 'browser', 'resources', 'win', 'resource.h'],
['shell', 'browser', 'notifications', 'mac', 'notification_center_delegate.h'],
['shell', 'browser', 'ui', 'cocoa', 'event_dispatching_window.h'],
['shell', 'browser', 'ui', 'cocoa', 'NSColor+Hex.h'],
['shell', 'browser', 'ui', 'cocoa', 'NSString+ANSI.h'],
['shell', 'common', 'node_includes.h'],
['spec', 'static', 'jquery-2.0.3.min.js'],
['spec', 'ts-smoke', 'electron', 'main.ts'],
Expand Down Expand Up @@ -81,7 +77,7 @@ const LINTERS = [{
}, {
key: 'objc',
roots: ['shell'],
test: filename => filename.endsWith('.mm'),
test: filename => filename.endsWith('.mm') || (filename.endsWith('.h') && isObjCHeader(filename)),
run: (opts, filenames) => {
if (opts.fix) {
spawnAndCheckExitCode('python', ['script/run-clang-format.py', '--fix', ...filenames]);
Expand All @@ -95,7 +91,7 @@ const LINTERS = [{
'-whitespace/indent',
'-whitespace/parens'
];
cpplint(['--extensions=mm', `--filter=${filter.join(',')}`, ...filenames]);
cpplint(['--extensions=mm,h', `--filter=${filter.join(',')}`, ...filenames]);
}
}, {
key: 'python',
Expand Down
9 changes: 5 additions & 4 deletions shell/browser/api/electron_api_browser_view.cc
Expand Up @@ -155,11 +155,12 @@ gfx::Rect BrowserView::GetBounds() {
}

void BrowserView::SetBackgroundColor(const std::string& color_name) {
if (!web_contents())
return;
view_->SetBackgroundColor(ParseHexColor(color_name));

auto* wc = web_contents()->web_contents();
wc->SetPageBaseBackgroundColor(ParseHexColor(color_name));
if (web_contents()) {
auto* wc = web_contents()->web_contents();
wc->SetPageBaseBackgroundColor(ParseHexColor(color_name));
}
}

v8::Local<v8::Value> BrowserView::GetWebContents(v8::Isolate* isolate) {
Expand Down
5 changes: 5 additions & 0 deletions shell/browser/mac/electron_application.h
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.

#ifndef SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_
#define SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_

#include "base/callback.h"
#include "base/mac/scoped_nsobject.h"
#include "base/mac/scoped_sending_event.h"
Expand Down Expand Up @@ -45,3 +48,5 @@
withUserInfo:(NSDictionary*)userInfo;

@end

#endif // SHELL_BROWSER_MAC_ELECTRON_APPLICATION_H_
5 changes: 5 additions & 0 deletions shell/browser/mac/electron_application_delegate.h
Expand Up @@ -2,6 +2,9 @@
// Use of this source code is governed by the MIT license that can be
// found in the LICENSE file.

#ifndef SHELL_BROWSER_MAC_ELECTRON_APPLICATION_DELEGATE_H_
#define SHELL_BROWSER_MAC_ELECTRON_APPLICATION_DELEGATE_H_

#import <Cocoa/Cocoa.h>

#import "shell/browser/ui/cocoa/electron_menu_controller.h"
Expand All @@ -15,3 +18,5 @@
- (void)setApplicationDockMenu:(electron::ElectronMenuModel*)model;

@end

#endif // SHELL_BROWSER_MAC_ELECTRON_APPLICATION_DELEGATE_H_
Expand Up @@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE-CHROMIUM file.

#ifndef SHELL_BROWSER_UI_COCOA_BRY_INSPECTABLE_WEB_CONTENTS_VIEW_H_
#define SHELL_BROWSER_UI_COCOA_BRY_INSPECTABLE_WEB_CONTENTS_VIEW_H_
#ifndef SHELL_BROWSER_UI_COCOA_ELECTRON_INSPECTABLE_WEB_CONTENTS_VIEW_H_
#define SHELL_BROWSER_UI_COCOA_ELECTRON_INSPECTABLE_WEB_CONTENTS_VIEW_H_

#import <AppKit/AppKit.h>

Expand Down Expand Up @@ -52,4 +52,4 @@ using electron::InspectableWebContentsViewMac;

@end

#endif // SHELL_BROWSER_UI_COCOA_BRY_INSPECTABLE_WEB_CONTENTS_VIEW_H_
#endif // SHELL_BROWSER_UI_COCOA_ELECTRON_INSPECTABLE_WEB_CONTENTS_VIEW_H_

0 comments on commit d00825d

Please sign in to comment.