profile
viewpoint
Cheng Zhao zcbenz Microsoft Nagoya, Japan

yue/node-gui 274

Node.js bindings to the Yue library.

zcbenz/BPlusTree 163

B+ tree implementation which stores data in file

zcbenz/chromium-source-tarball 142

Generate source tarball of Chromium automatically

electron/node-rcedit 133

Node module to edit resources of exe

zcbenz/cefode 41

Custom CEF build that has node.js API integration.

fengmk2/node-curl 33

This module no longer work, please use https://github.com/node-modules/urllib-sync instead.

zcbenz/node-fork 16

Add concurrency to node.js

electron/be 14

Scripts to help building Electron

zcbenz/dotfiles 14

My dotfiles for POSIX systems and cygwin.

zcbenz/chinese-auto-sim-to-trans 10

自动繁体转换

delete branch yue/yue

delete branch : newbase

delete time in 7 hours

push eventyue/yue

Cheng Zhao

commit sha e5e920fc9418133f3ef323e3f9bd114df7b7175b

Update base library to latest

view details

Cheng Zhao

commit sha 10c418668080d110bb6786962cdaca52639b8eda

win: Add arm64 build

view details

Cheng Zhao

commit sha 16f68da82421bbe9ad1be35ff6198358e4a37809

mac: Add arm64 build

view details

Cheng Zhao

commit sha 3b0c67aeeb6cca7623ff9a652753c7e7eaba87d9

Remove deprecated APIs

view details

Cheng Zhao

commit sha 1ba3f58f46c31a5d3b92b77d6db4a9cf071532e2

APIs that take ref should take scoped_refptr as parameter

view details

Cheng Zhao

commit sha 8315ab48bd189eece7b99f54076db7e9751bf7a7

Make type names in language bindings match docs

view details

Cheng Zhao

commit sha 9d1d5e459ecda851d4c0ac37efd6df47590b4569

Only cache system color on Gtk

view details

push time in 7 hours

PR opened electron/electron

feat: add support for share menu on macOS api-review/requested 🗳

Description of Change

Close https://github.com/electron/electron/issues/6330.

This PR adds a new MenuItem role shareMenu, that would turn a submenu into macOS share menu. There is also a new MenuItem.sharingItem property added, to specify which items to share.

Screen Shot 2020-09-25 at 16 27 53

const menu = Menu.buildFromTemplate([
  { role: 'windowMenu' },
  {
    role: 'shareMenu',
    sharingItem: {
      urls: [ 'https://github.com/electron/electron/issues/6330' ]
    }
  },
])
menu.popup(win)

There is also a new sharingItem option added to Menu's constructor, which can turn a top menu into share menu directly. This is because MenuItem roles can only be applied on submenus, while it is very common to show a top share menu directly:

Screen Shot 2020-09-25 at 16 44 03

const menu2 = new Menu({
  sharingItem: {
    filePaths: [ __filename ]
  }
})
menu2.popup(win)

Note on Menu's constructor

It is very tempting to also add role option to Menu's constructor as well, which would match the style of MenuItem's constructor, but it would be a large change as most roles can not be applied on top menus. Only adding sharingItem option to Menu makes the code simpler, and if we decide to add role to Menu in future, it will be compatible with current API.

Future extension

There could be a few possible feature requests about the share menu, like whether to show the "more" menu item, whether to hide certain items, callbacks to get notifications. Most of them can be achieved by adding new fields to the SharingItem structure.

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

Release Notes

Notes: Add support for showing macOS share menu.

+253 -7

0 comment

14 changed files

pr created time in a day

push eventelectron/electron

Electron Bot

commit sha b980d1bd6bc2f6dc81858a5a1e014cfff67fd8c1

chore: bump node in DEPS to v14.12.0 (#25593)

view details

Shelley Vohr

commit sha b807cabe1be738e3c74a05b5866f6121349eab50

chore: remove custom Node.js debugger (#25587)

view details

Electron Bot

commit sha dcd6e1f2b8a43cc7e43f474a7929696989306346

Bump v12.0.0-nightly.20200924

view details

Milan Burda

commit sha 1f856c25a98cb54eaa67c46195430a65c882c356

chore: improve renderer crash logging (#25592)

view details

Jeremy Rose

commit sha 3ceaf4aa54ef12be81a5526017609d0e631230ca

docs: document process.crashReporter apis in node children (#25579)

view details

Cheng Zhao

commit sha b5df543ae4a2d8c44046d08e0b58ccd09b907d1a

feat: add support for share menu on macOS

view details

push time in 2 days

pull request commentelectron/electron

fix: submenu should be autoreleased

@zcbenz there's another place we allocate a new NSMenu - should those be autoreleased as well?

base::scoped_nsobject behaves like std::unique_ptr, it takes a pointer of ref count 1 and releases it when destructed. So we should not pass an autoreleased pointer to it.

The behaviors of Cocoa APIs depend on the type of properties. For @property(strong) (for example submenu and image), the passed pointer would be retained and released, so we should usually pass an autoreleased pointer to it. For @property(weak) (for example delegate), nothing would happen to the passed pointer, so it is our responsibility to managed the pointer's lifetime and ensures the pointer outlives the target object.

Anyway the principle is to ensure the ref count of the pointer will eventually turn 0.

Also note that base::RefCounted and GObject objects are slightly different that, the newly allocated objects have ref count of 0, while newly allocated NSObject objects have ref count of 1.

zcbenz

comment created time in 2 days

push eventelectron/electron

Cheng Zhao

commit sha 437afa319e426bfa88d1bbc5cd31bd50174eea21

feat: add support for share menu on macOS

view details

push time in 2 days

push eventelectron/electron

Cheng Zhao

commit sha 89f5c950470fe4dfb42099d629e2ab52f6144402

feat: add support for share menu on macOS

view details

push time in 2 days

create barnchelectron/electron

branch : share-menu

created branch time in 2 days

PR opened electron/electron

fix: submenu should be autoreleased target/10-x-y target/11-x-y target/9-x-y

Description of Change

The submenu is a strong property so it must be autoreleased before being assigned.

Checklist

Release Notes

Notes: Fix memory leak when creating "Services" menu.

+1 -1

0 comment

1 changed file

pr created time in 2 days

create barnchelectron/electron

branch : fix-submenu-leak

created branch time in 2 days

PullRequestReviewEvent

pull request commentelectron/electron

docs: command line flags for GPU controls

Will this work on Windows?

I have tested the flags on a Surface Pro 7, and it seems to work (the task manager shows the GPU engine has been changed).

zcbenz

comment created time in 3 days

push eventyue/yue

Cheng Zhao

commit sha 9d1d5e459ecda851d4c0ac37efd6df47590b4569

Only cache system color on Gtk

view details

push time in 3 days

issue commentelectron/electron

Electron 6 does not launch in Win10 dark mode with DevTools extensions installed

Updating to Electron 9 should be able to fix this issue, and we are very unlikely to fix a bug that only happens for <= 8.

caesar

comment created time in 3 days

PR opened electron/electron

docs: command line flags for GPU controls target/10-x-y target/11-x-y target/9-x-y

Description of Change

Close https://github.com/electron/electron/issues/9842.

Users have been requesting for APIs to control whether to use integrated/discrete GPUs, there are actually 2 command line flags for it but they are hidden very deep inside Chromium's source code.

Checklist

Release Notes

Notes: none

+8 -0

0 comment

1 changed file

pr created time in 3 days

pull request commentelectron/electron

fix: provide asynchronous cleanup hooks in n-api

This PR requires approval from @electron/wg-upgrades

trop[bot]

comment created time in 3 days

PullRequestReviewEvent

create barnchelectron/electron

branch : gpu-flags

created branch time in 3 days

issue commentelectron/electron

Force integrated GPU

After checking Chromium's source code, I found 2 command line switches that can achieve this:

--force_high_performance_gpu
--force_low_power_gpu

I don't know if they work on Windows, reading from the code it seems that they only work on macOS. It would be appreciated if someone could verify if they also work on Windows.

Passing them via app.commandLine.appendSwitch works on macOS so I'll not add new APIs for them, I'll document the flags instead.

sindresorhus

comment created time in 3 days

PullRequestReviewEvent

push eventelectron/electron

liulun

commit sha 6aaaabd90ff16ca37dbb3ec82f24bd6c9d730d33

docs: add more info about downloadItem.setSavePath api (#25402) * docs: add more info about downloadItem.setSavePath api add more info about downloadItem.setSavePath api * Update docs/api/download-item.md ^_^ Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

view details

push time in 4 days

PR merged electron/electron

docs: add more info about downloadItem.setSavePath api

add more info about downloadItem.setSavePath api

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

Release Notes

Notes: none.

+1 -0

0 comment

1 changed file

xland

pr closed time in 4 days

PullRequestReviewEvent

push eventelectron/electron

Electron Bot

commit sha ac3e10c88c6a8b2a334e9d6790cc314dc04672a3

chore: bump chromium to 85.0.4183.98 (10-x-y) (#25275) * chore: bump chromium in DEPS to 85.0.4183.97 * chore: bump chromium in DEPS to 85.0.4183.98

view details

trop[bot]

commit sha fdbd2439a66c800524371d7eeac7a8903d112adb

fix: multiple dock icons when calling dock.show/hide (#25299) * fix: mulitple dock icons when calling dock.show/hide * test: run dock.show tests after dock.hide tests Co-authored-by: Cheng Zhao <zcbenz@gmail.com>

view details

Samuel Attard

commit sha fa3652a14f3f22acf7046e72c5922ecb4986f2ec

fix: only focus a webContents if the window was not initially hidden (#25323) (#25330) Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>

view details

trop[bot]

commit sha 303b4202009d75b6fbb187fbbb733da3053301ce

fix: avoid creating client_id file for empty DIR_CRASH_DUMPS (#25309) Co-authored-by: deepak1556 <hop2deep@gmail.com>

view details

Eryk Rakowski

commit sha f99afa4d5878e43285bf84b4e1c2504e82e477cf

feat(extensions): add support for some chrome.management APIs (#25098) (#25345) * fix: initialize management policy * fix(extensions): crash when using chrome.management * test: add tests * docs: add a note about chrome.management * fix: lint errors * fix: lint errors * fix: remove favicon_service include * fix: add missing management permission * docs: more supported apis * fix: extensions.md line endings

view details

Charles Kerr

commit sha c6eeff8055e9f712a38797808004e31516574dc2

chore: sync 10-x-y release notes script to master (#25304) * chore: sync 10-x-y release notes script to master * adds the '(Also in N-x-y)' annotations * handle sublists in release notes (#25279) * has prepare-release.js catch thrown exceptions (#24923) * syncs related tests * chore: update cache entries in release notes tests

view details

trop[bot]

commit sha 88d7bdc8c8f26b4b66b8e1ced2e155322b6ffc35

fix: bind fake mojo service for badging (#25369) * fix: bind fake mojo service for badging * Add a test Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

view details

trop[bot]

commit sha 2ccfb825df2ed9eb939a4ec30a10404ea5da1040

fix: Ensure electron delay loads the same modules as chromium (#25435) * Ensure electron delay loads the appropriate modules as chromium on windows This change adds the same module delay load list that chromium uses for electron. Some modules were already getting delay loaded from other build files in chromium but not the main list via //build/config/win:delayloads. We do not include the list of delay loads in delayloads_not_for_child_dll as those have issues being loaded in sandboxes processes. This will reduce the overall reference set impact of the electron processes. * fix: Ensure win modules are properly delayloaded * chore: fix linting Co-authored-by: Chris Davis <chrisdavis@outlook.com> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>

view details

Samuel Attard

commit sha d563c79521419407c7d9cff1686e36a8c558d3ea

fix: handle electron script errors better (#25331) (#25452) Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>

view details

Electron Bot

commit sha fbd99fbed1e78af18017c31af20a5baa934468b6

Bump v10.1.2

view details

trop[bot]

commit sha 7fc5c468e91c6266e7cd66635fa749fbfdcbe192

fix: call node::Stop on exit (#25458) * fix: call node::Stop on exit * also call Stop in node_main * oop, we were already calling set_can_call_into_js(false)?? Co-authored-by: Jeremy Rose <nornagon@nornagon.net>

view details

trop[bot]

commit sha 21a46bc0ebafab41f6ddae255d75d246d893644a

chore: log hint on renderer crash (#25472) * chore: log hint on renderer crash * Address feedback from review Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

view details

Cheng Zhao

commit sha 80ef3c7c84ea1b8c0b0275cbb3375d652151c99e

fix: ensure ready-to-show event is fired (#25476)

view details

trop[bot]

commit sha fc915754f61919e7d764c3ecab14574aa8fb64ec

fix: disable CORS when webSecurity is disabled (#25503) Co-authored-by: Cheng Zhao <zcbenz@gmail.com>

view details

Milan Burda

commit sha 552ec2267b48fd443e92aa4b912d0f8c066111d5

build: fix build with enable_pdf_viewer=false (#25494) (#25508)

view details

Shelley Vohr

commit sha a3ac80640dbaae4947c0046a811fe0b627fb7af2

fix: multiple window.print() crash (#25530)

view details

trop[bot]

commit sha 24691a4e0f85a30d13190706463005b463fcd231

fix: app.importCertificate crash on Linux (#25536) Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>

view details

Milan Burda

commit sha 63688e86497328175f94465c25132290e730f60c

build: fix buildflags in shell/utility/electron_content_utility_client.cc (#25520) Co-authored-by: Milan Burda <miburda@microsoft.com>

view details

Shelley Vohr

commit sha b8144d25f9361c24b07b1293d1d6510c1e3f152c

fix: provide asynchronous cleanup hooks in n-api

view details

push time in 4 days

push eventelectron/electron

Cheng Zhao

commit sha 22c6c891bece410ee495a1d93a1d44fe431df084

fix: unsubscribe from observers when window is closing (#25554)

view details

push time in 4 days

delete branch electron/electron

delete branch : cleanup-window-close

delete time in 4 days

PR merged electron/electron

fix: unsubscribe from observers when window is closing target/10-x-y target/11-x-y target/9-x-y

Description of Change

Close https://github.com/electron/electron/issues/25491.

Window related observers should be cleaned up when window is closing, instead of in the destructor of NativeWindow, otherwise crashes may happen due to invalid windows, as the destructor can be called much later after the window gets closed.

Checklist

Release Notes

Notes: chore

+11 -10

1 comment

3 changed files

zcbenz

pr closed time in 4 days

issue closedelectron/electron

Crash in RedrawTrafficLights

First seen here: https://app.circleci.com/pipelines/github/electron/electron/29873/workflows/923c3f7e-6bea-47bf-93af-a19497f42cf0/jobs/658750

Received signal 11 SEGV_MAPERR 07fba4266cd8
0   Electron Framework                  0x000000010a75eeb9 base::debug::CollectStackTrace(void**, unsigned long) + 9
1   Electron Framework                  0x000000010a659533 base::debug::StackTrace::StackTrace() + 19
2   Electron Framework                  0x000000010a75ed81 base::debug::(anonymous namespace)::StackDumpSignalHandler(int, __siginfo*, void*) + 2385
3   libsystem_platform.dylib            0x00007fff6a65f5fd _sigtramp + 29
4   ???                                 0xf6a3c00070001002 0x0 + 17772259662645694466
5   Electron Framework                  0x0000000104faaf35 electron::NativeWindowMac::RedrawTrafficLights() + 53
6   Electron Framework                  0x000000010a6eeefb base::TaskAnnotator::RunTask(char const*, base::PendingTask*) + 411
7   Electron Framework                  0x000000010a70dee7 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWorkImpl(base::sequence_manager::LazyNow*) + 519
8   Electron Framework                  0x000000010a70db58 base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::DoWork() + 168
9   Electron Framework                  0x000000010a77f651 base::MessagePumpCFRunLoopBase::RunWork() + 65
10  Electron Framework                  0x000000010a7746e2 base::mac::CallWithEHFrame(void () block_pointer) + 10
11  Electron Framework                  0x000000010a77f01f base::MessagePumpCFRunLoopBase::RunWorkSource(void*) + 63
12  CoreFoundation                      0x00007fff30468a54 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
13  CoreFoundation                      0x00007fff304689f3 __CFRunLoopDoSource0 + 103
14  CoreFoundation                      0x00007fff3046880d __CFRunLoopDoSources0 + 209
15  CoreFoundation                      0x00007fff30467529 __CFRunLoopRun + 937
16  CoreFoundation                      0x00007fff30466b23 CFRunLoopRunSpecific + 466
17  HIToolbox                           0x00007fff2f088abd RunCurrentEventLoopInMode + 292
18  HIToolbox                           0x00007fff2f0887d5 ReceiveNextEventCommon + 584
19  HIToolbox                           0x00007fff2f088579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
20  AppKit                              0x00007fff2d6d3c99 _DPSNextEvent + 883
21  AppKit                              0x00007fff2d6d24e0 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
22  AppKit                              0x00007fff2d6c41ee -[NSApplication run] + 658
23  Electron Framework                  0x000000010a78060c base::MessagePumpNSApplication::DoRun(base::MessagePump::Delegate*) + 348
24  Electron Framework                  0x000000010a77eb22 base::MessagePumpCFRunLoopBase::Run(base::MessagePump::Delegate*) + 130
25  Electron Framework                  0x000000010a70e71d base::sequence_manager::internal::ThreadControllerWithMessagePumpImpl::Run(bool, base::TimeDelta) + 349
26  Electron Framework                  0x000000010a6c206c base::RunLoop::Run() + 956
27  Electron Framework                  0x0000000109025f8b content::BrowserMainLoop::RunMainMessageLoopParts() + 203
28  Electron Framework                  0x0000000109028352 content::BrowserMainRunnerImpl::Run() + 82
29  Electron Framework                  0x0000000109022aab content::BrowserMain(content::MainFunctionParams const&) + 267
30  Electron Framework                  0x0000000108e3896e content::ContentMainRunnerImpl::RunServiceManager(content::MainFunctionParams&, bool) + 1406
31  Electron Framework                  0x0000000108e383c3 content::ContentMainRunnerImpl::Run(bool) + 467
32  Electron Framework                  0x000000010ce9225e service_manager::Main(service_manager::MainParams const&) + 3310
33  Electron Framework                  0x0000000106d6f708 content::ContentMain(content::ContentMainParams const&) + 120
34  Electron Framework                  0x0000000104e62486 ElectronMain + 134
35  Electron                            0x0000000103d6f551 main + 289
36  libdyld.dylib                       0x00007fff6a462cc9 start + 1
37  ???                                 0x0000000000000024 0x0 + 36
[end of stack trace]

No reliable repro yet but will update when one is found. Potentially happening near this test? https://github.com/electron/electron/blob/0d2e9679600bc757eeb34356dc9c3779d0edccee/spec-main/api-native-theme-spec.ts#L91-L95

cc @MarshallOfSound

closed time in 4 days

codebytere
PullRequestReviewEvent

delete branch electron/electron

delete branch : miniak/delete-unused-structs

delete time in 4 days

push eventelectron/electron

Milan Burda

commit sha 29c6864ee1c12bfbf4189fd5eb7f7c5e4ac26980

docs: remove unused StreamProtocolResponse / StringProtocolResponse (#25573)

view details

push time in 4 days

PR merged electron/electron

docs: remove unused StreamProtocolResponse / StringProtocolResponse new-pr 🌱 target/10-x-y target/11-x-y

Description of Change

Follow-up to #23883

Checklist

  • [x] PR description included and stakeholders cc'd
  • [x] npm test passes
  • [x] PR title follows semantic commit guidelines

Release Notes

Notes: no-notes

+0 -12

0 comment

3 changed files

miniak

pr closed time in 4 days

PullRequestReviewEvent

delete branch electron/electron

delete branch : trop/11-x-y-bp-fix-notreached-in-content-childprocesshost-getchildpath-when-enable_plugins-false-1600654119302

delete time in 4 days

push eventelectron/electron

trop[bot]

commit sha 9ff208f898fe6df3fe70d0bd4ef0165a44f6a7d3

fix: NOTREACHED in content::ChildProcessHost::GetChildPath when enable_plugins=false (#25552) Co-authored-by: Milan Burda <milan.burda@gmail.com>

view details

push time in 4 days

PullRequestReviewEvent

Pull request review commentelectron/electron

fix: allow ClientRequest responses to be throttled

 void SimpleURLLoaderWrapper::OnDataReceived(base::StringPiece string_piece,   auto array_buffer = v8::ArrayBuffer::New(isolate, string_piece.size());   auto backing_store = array_buffer->GetBackingStore();   memcpy(backing_store->Data(), string_piece.data(), string_piece.size());-  Emit("data", array_buffer);-  std::move(resume).Run();+  Emit("data", array_buffer, base::AdaptCallbackForRepeating(std::move(resume)));

Lint is failing:

$ node ./script/lint.js && npm run lint:clang-format && npm run lint:docs
--- a/shell/browser/api/electron_api_url_loader.cc
+++ b/shell/browser/api/electron_api_url_loader.cc
@@ -427,7 +427,8 @@
   auto array_buffer = v8::ArrayBuffer::New(isolate, string_piece.size());
   auto backing_store = array_buffer->GetBackingStore();
   memcpy(backing_store->Data(), string_piece.data(), string_piece.size());
-  Emit("data", array_buffer, base::AdaptCallbackForRepeating(std::move(resume)));
+  Emit("data", array_buffer,
+       base::AdaptCallbackForRepeating(std::move(resume)));
 }
 
 void SimpleURLLoaderWrapper::OnComplete(bool success) {
VerteDinde

comment created time in 4 days

PullRequestReviewEvent

push eventelectron/electron

Jaroslav Maslo

commit sha 4f54d71518e0d5918d6e5527d828f45323056917

docs: fix incorrect dialog.showMessageBox() docs (#25549)

view details

push time in 4 days

PR merged electron/electron

docs: fix incorrect dialog.showMessageBox() docs

Description of Change

dialog.showMessageBoxSync() is blocking the process, whereas dialog.showMessageBox() is not. <!-- Thank you for your Pull Request. Please provide a description above and review the requirements below.

Contributors guide: https://github.com/electron/electron/blob/master/CONTRIBUTING.md -->

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

Release Notes

Notes: none <!-- Please add a one-line description for app developers to read in the release notes, or 'none' if no notes relevant to app developers. Examples and help on special cases: https://github.com/electron/clerk/blob/master/README.md#examples -->

+1 -1

1 comment

1 changed file

devjerry

pr closed time in 4 days

PullRequestReviewEvent

push eventelectron/electron

Cheng Zhao

commit sha c50ded2b717da034d3fbfc6b7824884065c461c9

feat: add BrowserWindow.isTabletMode API (#25209)

view details

push time in 4 days

delete branch electron/electron

delete branch : win-tablet-mode

delete time in 4 days

PR merged electron/electron

feat: add BrowserWindow.isTabletMode API api-review/approved ✅

Description of Change

Fix https://github.com/electron/electron/issues/15165.

Add BrowserWindow.isTabletMode API which can be used to detect Windows 10 tablet mode.

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] PR description included and stakeholders cc'd
  • [x] relevant documentation is changed or added
  • [x] PR title follows semantic commit guidelines
  • [x] PR release notes describe the change in a way relevant to app developers, and are capitalized, punctuated, and past tense.
  • [x] This is NOT A BREAKING CHANGE. Breaking changes may not be merged to master until 11-x-y is branched.

Release Notes

Notes: Add BrowserWindow.isTabletMode API.

+32 -0

1 comment

7 changed files

zcbenz

pr closed time in 4 days

issue closedelectron/electron

Windows Tablet Mode

Is your feature request related to a problem? Please describe. In windows tablet mode, you may want to change your UI. There is apps that enlarge the title bar or hide the title bar buttons since they are useless (in tablet mode, every window is forced into fullscreen mode and minimizing is disabled). The is no way to detect tablet mode in electron.

Describe the solution you'd like Something like systemPreferences.tabletMode() and a tablet-mode-changed should be available We need a BrowserWindow instance method like window.getUserInteractionMode() that gives us the primary input mode for a view. window.resize event should be sufficient to listen to changes to tablet mode. Here is more info: https://blogs.msdn.microsoft.com/oldnewthing/20160706-00/?p=93815

Describe alternatives you've considered I looked into going to the Browser API in renderer, but there is no clear way to check if a device is in tablet mode. You can basically just check if there is touch available, which is not the same.

Additional context This is outlook hiding their title bar buttons in tablet mode. anmerkung anmerkung2

closed time in 4 days

bkniffler

pull request commentelectron/electron

fix: unsubscribe from observers when window is closing

Is this only needed to be backported for 11-x-y branch ?

I only saw the CI crash on >= 1.x, but backporting to older branches should be fine.

zcbenz

comment created time in 4 days

PR opened electron/electron

fix: unsubscribe from observers when window is closing target/11-x-y

Description of Change

Close https://github.com/electron/electron/issues/25491.

Window related observers should be cleaned up when window is closing, instead of in the destructor of NativeWindow, otherwise crashes may happen due to invalid windows, as the destructor can be called much later after the window gets closed.

Checklist

Release Notes

Notes: chore

+11 -10

0 comment

3 changed files

pr created time in 5 days

create barnchelectron/electron

branch : cleanup-window-close

created branch time in 5 days

PullRequestReviewEvent
PullRequestReviewEvent
PullRequestReviewEvent

delete branch electron/electron

delete branch : miniak/build-without-printing-10-x-y

delete time in 6 days

push eventelectron/electron

Milan Burda

commit sha 63688e86497328175f94465c25132290e730f60c

build: fix buildflags in shell/utility/electron_content_utility_client.cc (#25520) Co-authored-by: Milan Burda <miburda@microsoft.com>

view details

push time in 6 days

PR merged electron/electron

build: fix buildflags in electron_content_utility_client.cc

Description of Change

#23987 didn't add RunWindowsIconReader properly. Replicate change from #24256 instead.

Checklist

  • [x] PR description included and stakeholders cc'd
  • [x] npm test passes
  • [x] PR title follows semantic commit guidelines

Release Notes

Notes: no-notes

+32 -16

0 comment

1 changed file

miniak

pr closed time in 6 days

PullRequestReviewEvent

delete branch electron/electron

delete branch : trop/11-x-y-bp-test-retry-the-v8-samples-test-for-a-few-times-1600305814644

delete time in 6 days

push eventelectron/electron

trop[bot]

commit sha a66ba564fd1a65e2ad74d279004299a5894cd780

test: retry the "v8 samples" test for a few times (#25514) Co-authored-by: Cheng Zhao <zcbenz@gmail.com>

view details

push time in 6 days

PR merged electron/electron

test: retry the "v8 samples" test for a few times 11-x-y backport

Backport of #25477

See that PR for details.

Notes: none

+4 -1

0 comment

1 changed file

trop[bot]

pr closed time in 6 days

PullRequestReviewEvent

pull request commentelectron/electron

fix: prevent destroyed view references from causing crashes

@mlaurencin The backports need some fixes.

trop[bot]

comment created time in 6 days

push eventelectron/electron

trop[bot]

commit sha 0f4f5ac32cf35d113decbbc806381028409cbfe1

fix: prevent destroyed view references from causing crashes (#25509) * fix: prevent destroyed view references from causing crashes * Remove extraneous comments * Relocate crash test to proper location * Add WebContentsObserver * Add nullptr check and inspectable observer * Remote initial test file * Add test cases to test file * Rename and move testing file * Fix linting errors * Make functions exit early on check * Fix setBackgroundColor function call in test file * Fix styling of test file * Fix mac name mismatch and make variable name more clear Co-authored-by: Michaela Laurencin <mlaurencin@microsoft.com>

view details

push time in 6 days

delete branch electron/electron

delete branch : trop/11-x-y-bp-fix-prevent-destroyed-view-references-from-causing-crashes-1600301470074

delete time in 6 days

PR merged electron/electron

fix: prevent destroyed view references from causing crashes 11-x-y backport

Backport of #25411

See that PR for details.

Notes: Fixed crashes caused by attempting to modify destroyed views

+90 -21

0 comment

5 changed files

trop[bot]

pr closed time in 6 days

PullRequestReviewEvent
PullRequestReviewEvent

push eventelectron/electron

Valentin Hăloiu

commit sha efd003d277795f32aeb2c58b5229c97027e5148c

refactor: replace USE_X11 with OS_LINUX for sharing code with Ozone (#25522)

view details

push time in 6 days

PR merged electron/electron

refactor: replace USE_X11 with OS_LINUX for sharing code with Ozone

Description of Change

<!-- Thank you for your Pull Request. Please provide a description above and review the requirements below.

Contributors guide: https://github.com/electron/electron/blob/master/CONTRIBUTING.md -->

This pull-request is a small first step in trying to bring support for Wayland to Electron. I'm planning to follow up on this with more pull-requests in an effort to upstream these Wayland patches.

However, those patches will need some adjustments in order to make them compatible with the upcoming Chromium changes (chromium#1085700) which will soon be merged into Electron (#25488). In particular, it should be taken into consideration that the USE_X11 and USE_OZONE build flags are no longer mutually exclusive.

Also, USE_X11 is going away so it might be desirable as a long term goal to remove it from Electron too and replace it with the Ozone equivalents.

With that in mind, this pull-request replaces a few instances of #if defined(USE_X11) with #if defined(OS_LINUX) where it was identified that the guarded code could be shared with Ozone.

The more meaningful changes will come in the upcoming pull-requests but I'll be waiting for these chromium changes to be pulled into Electron first (#24984, #25488).

Checklist

<!-- Remove items that do not apply. For completed items, change [ ] to [x]. -->

  • [x] PR description included and stakeholders cc'd (@zcbenz @hedgepigdaniel)
  • [x] npm test passes
  • [x] PR title follows semantic commit guidelines

Release Notes

Notes: none

+18 -18

0 comment

9 changed files

vially

pr closed time in 6 days

PullRequestReviewEvent

push eventyue/yue

Cheng Zhao

commit sha 8315ab48bd189eece7b99f54076db7e9751bf7a7

Make type names in language bindings match docs

view details

push time in 6 days

push eventyue/yue

Cheng Zhao

commit sha e5e920fc9418133f3ef323e3f9bd114df7b7175b

Update base library to latest

view details

Cheng Zhao

commit sha 10c418668080d110bb6786962cdaca52639b8eda

win: Add arm64 build

view details

Cheng Zhao

commit sha 16f68da82421bbe9ad1be35ff6198358e4a37809

mac: Add arm64 build

view details

Cheng Zhao

commit sha 3b0c67aeeb6cca7623ff9a652753c7e7eaba87d9

Remove deprecated APIs

view details

Cheng Zhao

commit sha 1ba3f58f46c31a5d3b92b77d6db4a9cf071532e2

APIs that take ref should take scoped_refptr as parameter

view details

push time in 6 days

push eventyue/yue

Cheng Zhao

commit sha 5cbca8fdaa63748ae43050be1d4f551d218672a3

APIs that take ref should take scoped_refptr as parameter

view details

push time in 6 days

push eventyue/yue

Cheng Zhao

commit sha fa54a8e71dc5f744489e3d6eaae6ba4a81c76d4b

APIs that take ref should take scoped_refptr as parameter

view details

push time in 6 days

push eventyue/yue

Cheng Zhao

commit sha 1d2c667943a93ab0fa6ba815ac7cf06a682e4e40

APIs that take ref should take scoped_refptr as parameter

view details

push time in 6 days

push eventyue/yue

Cheng Zhao

commit sha 9c5b0ee71498dc3ea9a3db28190db89fbf713c32

Remove deprecated APIs

view details

push time in 6 days

push eventyue/yue

Cheng Zhao

commit sha 805f4de618ecbb813046bc2b1f0f41692018cf62

Remove deprecated APIs

view details

push time in 6 days

push eventyue/yue

Cheng Zhao

commit sha afac2f54ef9189003e3a868c810229471050558a

Remove deprecated APIs

view details

push time in 6 days

push eventyue/yue

Cheng Zhao

commit sha 3a206a3b64c201bbcc6c05559b17d849955960ad

mac: Add arm64 build

view details

push time in 7 days

push eventyue/yue

Cheng Zhao

commit sha 6843392d4d5765f0ca385fb3221ac5177a3ab250

mac: Add arm64 build

view details

push time in 7 days

push eventyue/yue

Cheng Zhao

commit sha dc6cc24768ea1da07d611e65f3d341608acddcfd

mac: Add arm64 build

view details

push time in 7 days

push eventyue/base

Cheng Zhao

commit sha 97094e91e0e721c1b12730b9419e8dcf7c4fa22b

Fix compilation with XCode 12 beta

view details

push time in 7 days

push eventyue/yue

Cheng Zhao

commit sha d5a4ef6a193e79563e00c378c15718183a3dc888

Update base library to latest

view details

Cheng Zhao

commit sha 040eca9285d021dbe3fb031da0955b9a9f2fb9bb

win: Add arm64 build

view details

push time in 7 days

push eventyue/base

Cheng Zhao

commit sha 3ecac2757eecff8aba6979148838b4a3d302cab8

Fix error with Wc++11-narrowing

view details

Cheng Zhao

commit sha b69552584af6a1eb94a59b1f8c3a59861de09de4

Fix compilation with non-clang

view details

push time in 7 days

push eventyue/base

Cheng Zhao

commit sha b9a3f8cebc8926ab77284becaac7796a327082e6

Fix compilation with non-clang

view details

push time in 7 days

push eventyue/yue

Cheng Zhao

commit sha beb17faea0dde7b6d76beca99ac8f41c7dde9e61

Update base library to latest

view details

Cheng Zhao

commit sha 2679143e92389bd14b18225cecc5c97c61511287

win: Add arm64 build

view details

push time in 7 days

created tagyue/build-gn

tagv0.5.0

Minimal bootstrap environment for building GN

created time in 7 days

push eventyue/build-gn

Cheng Zhao

commit sha 850d5dc7bdac4237436c6a82774d29e89bf3f7b6

Fix build with latest base

view details

Cheng Zhao

commit sha dc2681fda6cf552fd53e086f874c5c86c7edb6f8

Update build configurations to latest

view details

push time in 7 days

delete tag yue/build-gn

delete tag : v0.5.0

delete time in 7 days

created tagyue/build-gn

tagv0.5.0

Minimal bootstrap environment for building GN

created time in 7 days

delete branch yue/build-gn

delete branch : armmac

delete time in 7 days

push eventyue/build-gn

Cheng Zhao

commit sha 4bc9f587b6a1c9343adbecb9388eb73ce3bdd6c1

Update build configurations to latest

view details

push time in 7 days

push eventyue/build-gn

Cheng Zhao

commit sha 4bc9f587b6a1c9343adbecb9388eb73ce3bdd6c1

Update build configurations to latest

view details

push time in 7 days

push eventyue/yue

Cheng Zhao

commit sha 2b52c96da03bc9ddfaa3cbdb0f3a94e48f374104

win: Add arm64 build

view details

push time in 7 days

Pull request review commentelectron/electron

fix: handle async nature of [NSWindow -toggleFullScreen]

 void ViewDidMoveToSuperview(NSView* self, SEL _cmd) {   return [window_ isMiniaturized]; } +void NativeWindowMac::HandlePendingFullscreenTransitions() {+  if (pending_transitions_.empty())+    return;++  bool next_transition = pending_transitions_.pop();+  SetFullScreen(next_transition);+}+ void NativeWindowMac::SetFullScreen(bool fullscreen) {+  // [NSWindow -toggleFullScreen] is an asynchronous operation, which means+  // that it's possible to call it while a fullscreen transition is currently+  // in process. This can create weird behavior (incl. phantom windows),+  // so we want to schedule a transition for when the current one has completed.+  if (fullscreen_transition_state() != FullScreenTransitionState::NONE) {

I'm good not optimizing the transitions, but we still need to do something about duplicate calls.

Since the duplicate calls won't actually do anything, the related events will not be emitted and the HandlePendingFullscreenTransitions method won't be called. So if there are still pending transitions they won't be processed after duplicate calls.

setFullScreen(true);
setFullScreen(true);  // does not trigger events
setFullScreen(true);  // will be left in pending transitions unprocessed
codebytere

comment created time in 9 days

PullRequestReviewEvent

pull request commentelectron/electron

test: retry the "v8 samples" test for a few times

/trop run backport

zcbenz

comment created time in 10 days

delete branch electron/electron

delete branch : trop/11-x-y-bp-fix-disable-cors-when-websecurity-is-disabled-1600293372310

delete time in 10 days

push eventelectron/electron

trop[bot]

commit sha a22dfc813f7c1998138263c736c1a5067c19fd8b

fix: disable CORS when webSecurity is disabled (#25504) Co-authored-by: Cheng Zhao <zcbenz@gmail.com>

view details

push time in 10 days

PR merged electron/electron

fix: disable CORS when webSecurity is disabled 11-x-y backport

Backport of #25463

See that PR for details.

Notes: Fix CORS not being disabled by webSecurity: false.

+36 -1

0 comment

2 changed files

trop[bot]

pr closed time in 10 days

PullRequestReviewEvent
more