Commit graph

476 commits

Author SHA1 Message Date
Cheng Zhao
0ab9cc30d2
refactor: pass base::Value by value in JS API implementations (#20809)
* refactor: move the arg instead of const reference it

* refactor: avoid unnecessary copies of base::Value in arg

* refactor: pass-by-value in dict_util

* refactor: avoid unnecessary reference
2019-10-30 14:30:59 +09:00
Shelley Vohr
5d00494f8d
fix: do not DCHECK non-const methods (#20833) 2019-10-29 13:35:38 -07:00
Electron Bot
79d3901859 Bump v8.0.0-nightly.20191029 2019-10-29 08:31:39 -07:00
Milan Burda
0f7ebff81e fix: pass frameId to v8Util.setRemoteCallbackFreer() (#20732) 2019-10-29 15:40:09 +09:00
Electron Bot
b6246dcf12 chore: bump chromium to f5b345dd470f14eef6e44732ccf23 (master) (#20649) 2019-10-28 15:12:35 -07:00
Shelley Vohr
fb8b1fd1c9 fix: prevent menu gc during popup (#20745) 2019-10-28 14:26:48 -04:00
Electron Bot
d0cdd12521 Bump v8.0.0-nightly.20191028 2019-10-28 08:31:41 -07:00
Electron Bot
e8d85b6ded Bump v8.0.0-nightly.20191027 2019-10-27 08:31:07 -07:00
Electron Bot
8f1ad8a4e5 Bump v8.0.0-nightly.20191026 2019-10-26 08:32:27 -07:00
Electron Bot
4ec6d10969 Bump v8.0.0-nightly.20191025 2019-10-25 08:31:50 -07:00
Cheng Zhao
0fe6767d6b
chore: remove native_mate (Part 11) (#20719)
* refactor: convert Menu and globalShortcut to gin

* refactor: convert api::Cookies to gin

* refactor: convert View and WebContentsView to gin

* refactor: convert WebContents related classes to gin

* refactor: convert powerMonitor to gin

* refactor: prepare for header change

* refactor: remove last uses of mate::EventEmitter

* refactor: remove mate::EventEmitter

* refactor: move trackable_object to gin_helper

* fix: custom converter should not use Handle

* fix: no more need to check if icon is empty

It was a bug that the Handle<NativeImage> can be non-empty when the
image file does not exist. The bug was caused by the converter code
writing out the image even when the convertion fails.

The bug was work-arounded by adding an additional check, but since the
original bug had been fixed, the additional check is no longer needed.

* fix: should always set frameId even when callback is null

* fix: do not mix gin/mate handles for NativeImage
2019-10-25 22:03:28 +09:00
Electron Bot
e196a397ad Bump v8.0.0-nightly.20191024 2019-10-24 08:32:48 -07:00
CezaryKulakowski
510a916f82 fix: return proper values for WM_GETMINMAXINFO (#20519)
* fix: set proper constraints for windows with defined maxWidth

When BrowserWindow has set constraints for width (max or min) it
won't behave correctly during first attempt of resizing it. When
maxWidth is defined and maxWidth equals its width it will shrink
rapidly when user tries to expand its width. On the other hand
when minWidth is defined and minWidth equals its width it's
possible to decrease its width with a few pixels.

Notes: Fixed improper behaviour of window with width constraint set during resize.

* fix: prevent crash when WM_GETMINMAXINFO is called on initing window
2019-10-24 15:06:04 +09:00
Cheng Zhao
be955a9721
chore: remove native_mate (Part 10) (#20696)
* refactor: remove direct uses of event_emitter_deprecated.h

* refactor: remove event_emitter_deprecated.h in api::App

* refactor: use std::move to save a copy

* fix: windows and linux builds
2019-10-24 14:47:58 +09:00
Jeremy Apthorp
77414813b4 chore: remove _ns suffixes (#20691)
* chore: remove _ns suffixes

* lint
2019-10-24 09:51:06 +09:00
Shelley Vohr
db4d01c517
refactor: move CompileAndCall to a helper (#20675) 2019-10-23 09:26:32 -07:00
Electron Bot
18907389da Bump v8.0.0-nightly.20191023 2019-10-23 08:32:02 -07:00
Jeremy Apthorp
2abea22b4b fix: explicitly cancel redirects when mode is 'error' (#20686) 2019-10-23 09:10:37 +09:00
Jeremy Apthorp
cde2aae6b5
fix: properly free remote objects (#20671) 2019-10-22 16:54:38 -07:00
Electron Bot
2658cae3ea Bump v8.0.0-nightly.20191022 2019-10-22 08:31:48 -07:00
Shelley Vohr
aa26e8b946
fix: macOS getColor inconsistencies (#20611) 2019-10-21 14:31:03 -07:00
Shelley Vohr
9a5cd4c8d2
fix: use xib file to construct macOS Menu (#20615) 2019-10-21 14:11:09 -07:00
Electron Bot
417f9e27e1 Bump v8.0.0-nightly.20191021 2019-10-21 08:32:10 -07:00
Cheng Zhao
eb0e55c514
chore: remove native_mate (Part 9) (#20645)
* refactor: remove a few uses of native_mate/gfx_converter.h

* refactor: deprecate mate::EventEmitter

* refactor: add gin_helper::EventEmitter

* refactor: convert a few classes to use gin_helper::EventEmitter

* refactor: get rid of native_mate_converters/gfx_converter.h

* fix: follow native_mate on reporting errors

* fix: gin is weak at guessing parameter types

* fix: incorrect full class name

* fix: gin::Handle does not accept null
2019-10-21 16:05:40 +09:00
Electron Bot
820dab295f Bump v8.0.0-nightly.20191020 2019-10-20 08:31:06 -07:00
Electron Bot
956127ee5e Bump v8.0.0-nightly.20191019 2019-10-19 08:31:24 -07:00
Electron Bot
3ac3fbdbfb chore: bump chromium to e049d599a8332b9b2785b0178be74 (master) (#20314) 2019-10-18 12:57:34 -07:00
Samuel Attard
0090616f7b
feat: add a new contextBridge module (#20307)
* feat: add a new contextBridge module

* chore: fix docs linting

* feat: add support for function arguments being proxied

* chore: ensure that contextBridge can only be used when contextIsolation is enabled

* docs: getReverseBinding can be null

* docs: fix broken links in md file

* feat: add support for promises in function parameters

* fix: linting failure for explicit constructor

* Update atom_api_context_bridge.cc

* chore: update docs and API design as per feedback

* refactor: remove reverse bindings and handle GC'able functions across the bridge

* chore: only expose debugGC in testing builds

* fix: do not proxy promises as objects

* spec: add complete spec coverage for contextBridge

* spec: add tests for null/undefined and the anti-overwrite logic

* chore: fix linting

* spec: add complex nested back-and-forth function calling

* fix: expose contextBridge in sandboxed renderers

* refactor: improve security of default_app using the new contextBridge module

* s/bindAPIInMainWorld/exposeInMainWorld

* chore: sorry for this commit, its a big one, I fixed like everything and refactored a lot

* chore: remove PassedValueCache as it is unused now

Values transferred from context A to context B are now cachde in the RenderFramePersistenceStore

* chore: move to anonymous namespace

* refactor: remove PassValueToOtherContextWithCache

* chore: remove commented unused code blocks

* chore: remove .only

* chore: remote commented code

* refactor: extract RenderFramePersistenceStore

* spec: ensure it works with numbered keys

* fix: handle number keys correctly

* fix: sort out the linter

* spec: update default_app asar spec for removed file

* refactor: change signatures to return v8 objects directly rather than the mate dictionary handle

* refactor: use the v8 serializer to support cloneable buffers and other object types

* chore: fix linting

* fix: handle hash collisions with a linked list in the map

* fix: enforce a recursion limit on the context bridge

* chore: fix linting

* chore: remove TODO

* chore: adapt for PR feedback

* chore: remove .only

* chore: clean up docs and clean up the proxy map when objects are released

* chore: ensure we cache object values that are cloned through the V8 serializer
2019-10-18 12:57:09 -07:00
Electron Bot
e74b21bff5 Bump v8.0.0-nightly.20191018 2019-10-18 08:31:50 -07:00
Cheng Zhao
19223952a8
chore: remove native_mate (Part 8) (#20598)
* refactor: convert methods of AutoUpdater to gin

* refactor: converter in map_converter.h is no more needed

* refactor: use gin in crash_reporter

* refactor: remove native_mate_converters/map_converter.h

* refactor: implement gfx_converter with gin

* refactor: convert methods of NativeImage to gin

* refactor: add gin_helper::Arguments

* fix: use gin_helper::Arguments to parse multi-type parameters
2019-10-18 09:31:29 +09:00
Electron Bot
86258c6cff Bump v8.0.0-nightly.20191017 2019-10-17 08:33:48 -07:00
Electron Bot
e06b0aa73b Bump v8.0.0-nightly.20191016 2019-10-16 08:31:19 -07:00
Electron Bot
dceabf231b Bump v8.0.0-nightly.20191015 2019-10-15 08:31:28 -07:00
Cheng Zhao
1ecfcc8c70
chore: remove native_mate (Part 7) (#20561)
* refactor: use gin converters in api::Protocol

* refactor: convert JS constructor impl to gin

* refactor: use InitWithArgs helper

* fix: gin_helper::Dictionary should behave the same with mate

* fix cpplint warnings

* refactor: no more need to patch gin/dictionary.h
2019-10-15 10:15:23 +09:00
Electron Bot
6c6bff81ac chore: bump node to v12.10.0 (master) (#20129)
Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
2019-10-14 15:46:10 -07:00
Electron Bot
dfac05805d Bump v8.0.0-nightly.20191014 2019-10-14 08:30:58 -07:00
Robo
5c2c30142c
fix: append network switches to network service process (#20546) 2019-10-13 18:21:41 -07:00
Electron Bot
5bd7b6ad50 Bump v8.0.0-nightly.20191013 2019-10-13 08:31:09 -07:00
Electron Bot
2cf64d0200 Bump v8.0.0-nightly.20191012 2019-10-12 08:32:39 -07:00
Cheng Zhao
1b2c6a33b3 fix: do not manually parse content-type (#20538) 2019-10-11 14:54:50 -04:00
Electron Bot
d21519ed2e Bump v8.0.0-nightly.20191011 2019-10-11 08:31:51 -07:00
Shelley Vohr
812de5d3bf fix: properly register custom url evt handling (#20518) 2019-10-10 08:54:03 -07:00
Electron Bot
ec2c1db0e4 Bump v8.0.0-nightly.20191010 2019-10-10 08:31:27 -07:00
Milan Burda
bb2ab01f99 fix: when building with enable_plugins=false (#20354)
* fix: when building with enable_plugins=false

* build: exclude printing service to avoid patch

* build: update plugins patch from upstream
2019-10-09 19:59:37 +02:00
Jeremy Apthorp
2fad53e66b refactor: use v8 serialization for ipc (#20214)
* refactor: use v8 serialization for ipc

* cloning process.env doesn't work

* serialize host objects by enumerating key/values

* new serialization can handle NaN, Infinity, and undefined correctly

* can't allocate v8 objects during GC

* backport microtasks fix

* fix compile

* fix node_stream_loader reentrancy

* update subframe spec to expect undefined instead of null

* write undefined instead of crashing when serializing host objects

* fix webview spec

* fix download spec

* buffers are transformed into uint8arrays

* can't serialize promises

* fix chrome.i18n.getMessage

* fix devtools tests

* fix zoom test

* fix debug build

* fix lint

* update ipcRenderer tests

* fix printToPDF test

* update patch

* remove accidentally re-added remote-side spec

* wip

* don't attempt to serialize host objects

* jump through different hoops to set options.webContents sometimes

* whoops

* fix lint

* clean up error-handling logic

* fix memory leak

* fix lint

* convert host objects using old base::Value serialization

* fix lint more

* fall back to base::Value-based serialization

* remove commented-out code

* add docs to breaking-changes.md

* Update breaking-changes.md

* update ipcRenderer and WebContents docs

* lint

* use named values for format tag

* save a memcpy for ~30% speedup

* get rid of calls to ShallowClone

* extra debugging for paranoia

* d'oh, use the correct named tags

* apparently msstl doesn't like this DCHECK

* funny story about that DCHECK

* disable remote-related functions when enable_remote_module = false

* nits

* use EnableIf to disable remote methods in mojom

* fix include

* review comments
2019-10-09 13:59:08 -04:00
Electron Bot
c250cd6e7c Bump v8.0.0-nightly.20191009 2019-10-09 08:33:39 -07:00
Shelley Vohr
f80a17c5be feat: allow Linux/Windows users to set notification timeout (#20153)
* feat: allow Linux users to set notification timeout

* implement on windows
2019-10-09 11:22:21 -04:00
Cheng Zhao
5e11be6898
fix: cookies.get should be able to filter domain (#20471)
* fix: use GetAllCookies when url is empty

* test: get cookie without url
2019-10-09 15:57:40 +09:00
Jeremy Apthorp
ebd55c1147
fix: fix crash in crashReporter.getUploadedReports (#20428) 2019-10-08 16:35:28 -07:00
Electron Bot
94ec4ecabe Bump v8.0.0-nightly.20191008 2019-10-08 08:32:37 -07:00
Shelley Vohr
c16a186de0 feat: improve TouchBarButton accessibility (#20454) 2019-10-08 11:13:57 -04:00
Shelley Vohr
8d9ba87e05
fix: properly free IsolateData in node_main (#20446) 2019-10-08 09:03:04 +02:00
Electron Bot
f3cf2566c1 Bump v8.0.0-nightly.20191007 2019-10-07 08:32:42 -07:00
Electron Bot
e26fa9090d Bump v8.0.0-nightly.20191006 2019-10-06 08:33:20 -07:00
Electron Bot
8dae38639a Bump v8.0.0-nightly.20191005 2019-10-05 08:31:32 -07:00
Milan Burda
ccff140046 feat: add --enable-api-filtering-logging commandline switch (#20335) 2019-10-04 10:49:09 -07:00
Electron Bot
e1eb9519f5 Bump v8.0.0-nightly.20191004 2019-10-04 08:31:45 -07:00
Shelley Vohr
513c8536c0
refactor: implement sublabel fns in MenuModel (#20150) 2019-10-04 08:58:54 +02:00
Shelley Vohr
82ff142f9c chore: remove unused l10n_util includes (#20412) 2019-10-04 09:31:38 +09:00
Shelley Vohr
80af35e0cd
chore: enable native unittesting (#20293) 2019-10-03 22:21:30 +02:00
Electron Bot
8a2ba597bb Bump v8.0.0-nightly.20191003 2019-10-03 08:32:50 -07:00
Shelley Vohr
e543fe702c fix: recentDocuments menu role on macOS (#20398) 2019-10-03 14:25:14 +09:00
Electron Bot
1c0a21a8bc Bump v8.0.0-nightly.20191002 2019-10-02 08:32:04 -07:00
Milan Burda
2f03d393c3 feat: allow inspection of specific shared workers (#20389) 2019-10-02 14:38:27 +02:00
Milan Burda
bf978e09e4 fix: allow paths to asar archives to contain the .asar extension in directories (#20342) 2019-10-02 13:33:07 +09:00
Cheng Zhao
4ac4b34ae9
chore: remove native_mate (Part 6) (#20391) 2019-10-02 09:30:55 +09:00
Cheng Zhao
ef690c035d fix: correctly crash when there is no crashReporter (#20388)
* fix: correctly crash when there is no crashReporter

* test: correctly crash when there is crashReporter
2019-10-01 13:20:21 -04:00
Electron Bot
969b4d1dd3 Bump v8.0.0-nightly.20191001 2019-10-01 08:31:25 -07:00
Jeremy Apthorp
a9e695d05f
test: move more web contents specs (#20099) 2019-09-30 15:00:47 -07:00
Electron Bot
37e34395de Bump v8.0.0-nightly.20190930 2019-09-30 08:32:02 -07:00
Electron Bot
4f815d8469 Bump v8.0.0-nightly.20190929 2019-09-29 08:31:20 -07:00
Electron Bot
e099edc2c2 Bump v8.0.0-nightly.20190928 2019-09-28 08:31:51 -07:00
Electron Bot
5e942cea8d Bump v8.0.0-nightly.20190927 2019-09-27 08:33:09 -07:00
Electron Bot
efe6e7b04d Bump v8.0.0-nightly.20190926 2019-09-26 08:33:14 -07:00
Jeremy Apthorp
593f1774e9
fix: backport Node nested microtask fix (#20303) 2019-09-25 17:38:50 -04:00
Electron Bot
0653e31767 Revert "Bump v8.0.0-nightly.20190925"
This reverts commit b18fb96ecf.
2019-09-25 08:37:31 -07:00
Electron Bot
b18fb96ecf Bump v8.0.0-nightly.20190925 2019-09-25 08:32:11 -07:00
Electron Bot
597a8b5ec7 Bump v8.0.0-nightly.20190924 2019-09-24 08:31:12 -07:00
Electron Bot
c25f0a1779 Bump v8.0.0-nightly.20190923 2019-09-23 08:31:45 -07:00
Electron Bot
bac15ef86f Bump v8.0.0-nightly.20190922 2019-09-22 08:32:05 -07:00
Electron Bot
297b81fa1d Bump v8.0.0-nightly.20190921 2019-09-21 08:31:38 -07:00
Electron Bot
913ec1e0d0 chore: bump chromium to 0239d631f03d0111f77b0b98c7765 (master) (#20285) 2019-09-21 10:51:28 -04:00
Electron Bot
1e0b87732f Bump v8.0.0-nightly.20190920 2019-09-20 08:32:01 -07:00
Milan Burda
b136819371 refactor: move GetCursorBlinkInterval() to a helper function (#20060) 2019-09-19 11:43:21 -07:00
Electron Bot
e459114149 Bump v8.0.0-nightly.20190919 2019-09-19 08:31:13 -07:00
Cheng Zhao
624ba4f642 chore: remove native_mate (Part 5) (#20264)
* deprecate native_mate/native_mate/object_template_builder.h

* add gin_helper/object_template_builder.h

* add patch to avoid ambiguous error

* remove usage of object_template_builder_deprecated.h in a few files

* add note we should remove gin_helper/object_template_builder.h in future
2019-09-19 08:09:15 -07:00
Charles Kerr
63f08fcdb0 fix: use coordinate offsets in ShowAutofillPopup (#20232)
* fix: use coordinate offsets in ShowAutofillPopup

* fix: silence coord int->float narrowing conversion

Minor fix to silence clang-tidy warning about implicit range narrowing.
Not a huge deal but the revision is also easier to read.

clang-tidy: bugprone-narrowing-conversions
2019-09-19 08:05:57 -07:00
Gellert Hegyi
3f5833ce5d fixes widget host fetching from render view host (#20239) 2019-09-19 05:47:12 -04:00
Shelley Vohr
ffe2182883
feat: set urgency on linux notifications (#20152) 2019-09-18 22:35:20 -07:00
Shelley Vohr
b0fe3e20e6 fix: reset capturers at the very end (#20270) 2019-09-18 16:20:41 -04:00
Electron Bot
eb2d2264d0 chore: bump chromium to 63be48daea281d4f8c834c2e707a7 (master) (#19923) 2019-09-18 15:58:00 -04:00
Milan Burda
11cd0db86b build: add enable_remote_module build flag (#19821) 2019-09-18 09:52:06 -07:00
Electron Bot
8bf74164e2 Bump v8.0.0-nightly.20190918 2019-09-18 08:31:27 -07:00
loc
d2a94e6b13 fix: free screen and window capturers immediately after we're finished with them (#20156)
fix #17937, #19908
2019-09-17 09:48:31 -07:00
Electron Bot
dfd2135647 Bump v8.0.0-nightly.20190917 2019-09-17 08:32:25 -07:00
Samuel Attard
0e61709fa7
fix: emit updated on NativeTheme on the UI thread to avoid DCHECK (#20137)
* fix: emit updated on NativeTheme on the UI thread to avoid DCHECK

* Update atom_api_native_theme.cc

* spec: wait a few ticks for async events to emit so that test events do not leak into each other
2019-09-16 16:08:01 -07:00
Charles Kerr
2b316f3843
refactor: run clang-tidy (#20231)
* refactor: clang-tidy modernize-use-nullptr

* refactor: clang-tidy modernize-use-equals-default

* refactor: clang-tidy modernize-make-unique

* refactor: omit nullptr arg from unique_ptr.reset()

As per comment by @miniak
2019-09-16 18:12:00 -04:00
Samuel Attard
660e566201
fix: don't expose nativeTheme in the renderer process (#20139)
Exposing these in the renderer didn't make sense as they weren't backed
by the same instance / value store.  This API should be browser only
especially now that we have nativeTheme.themeSource.  Exposing in
//common was a mistake from the beginning.
2019-09-16 14:23:13 -07:00
Electron Bot
816bc5c8a7 Bump v8.0.0-nightly.20190915 2019-09-15 08:31:55 -07:00
Electron Bot
99f1b96c4f Bump v8.0.0-nightly.20190914 2019-09-14 08:31:07 -07:00
Electron Bot
c485c1e4b0 Bump v8.0.0-nightly.20190913 2019-09-13 08:31:01 -07:00
Charles Kerr
b2652beceb
refactor: apply some 'clang-tidy -fix' changes (#20172)
* refactor: fix clang-tidy vector operation warnings

Fix vector population performance-inefficient-vector-operation warnings
generated by clang-tidy

* refactor: fix clang-tidy emplace_back warnings

In cases where a temporary is created to be passed
to push_back(), replace it with emplace_back().

Warning: modernize-use-emplace

* refactor: fix clang-tidy loop iteration warnings

When practical, use range-based for loops instead of C-style for loops.

clang-tiny check: modernize-loop-convert

* refactor: fix clang-tidy string initialize warning

Remove redundant empty string initialization.

clang-tidy check: readability-redundant-string-init
2019-09-13 10:26:59 -04:00
Shelley Vohr
3ec17a88ba
fix: crash when exiting simple fullscreen on macOS (#20144) 2019-09-12 13:38:16 -04:00
Electron Bot
5dee8a5717 Bump v8.0.0-nightly.20190912 2019-09-12 08:32:04 -07:00
Electron Bot
ace0284eef Bump v8.0.0-nightly.20190911 2019-09-11 08:31:12 -07:00
Electron Bot
0b26d7a0e2 Bump v8.0.0-nightly.20190910 2019-09-10 08:31:47 -07:00
Electron Bot
5f59c6ddfe Bump v8.0.0-nightly.20190909 2019-09-09 08:32:20 -07:00
Electron Bot
d84e2e3972 Bump v8.0.0-nightly.20190908 2019-09-08 08:31:31 -07:00
Cheng Zhao
49bd74ff0e
chore: remove native_mate (Part 4) (#20146)
* avoid patching gin::Dictionary by using our wrapper

* remove SetHidden from mate::Dictionary
2019-09-09 00:10:18 +09:00
Electron Bot
6e9a23a884 Bump v8.0.0-nightly.20190907 2019-09-07 08:33:10 -07:00
Electron Bot
0979fb7eee Bump v8.0.0-nightly.20190906 2019-09-06 13:07:01 -07:00
Samuel Attard
9ab06af786 Revert "Bump v8.0.0-nightly.20190906"
This reverts commit 432ae81823.
2019-09-06 13:05:43 -07:00
Shelley Vohr
6087f89aac
refactor: use base::StringPiece over std::string (#20119) 2019-09-06 09:05:12 -07:00
Electron Bot
432ae81823 Bump v8.0.0-nightly.20190906 2019-09-06 08:31:28 -07:00
Cheng Zhao
2c23e44ed9
chore: remove native_mate (Part 3) (#20131)
* use gin converter in atom_api_menu

* please only put necessary includes in header

Having include in header means they have dependency relationship,
putting arbitrary includes really really really really really makes
refacoring much harder.

* remove some simple uses of callback_converter_deprecated.h

* use gin callback converter in file_dialog code

* use gin in ErrorThrower

* use gin in atom_bundle_mover

* fix mistake in node stream

* deprecate native_mate version of event_emitter_caller

* use gin in node_bindings

* remove usages of native_mate event_emitter_caller.h except for EventEmitter

* fix compilation on Windows

* gin::Arguments behaves differently on GetNext

* just use StringToV8
2019-09-06 14:52:54 +09:00
John Kleinschmidt
7be1905023 fix: resolve crash loading file based serviceworkers (#20132) 2019-09-06 10:01:22 +09:00
Shelley Vohr
20e3c519dd fix: ensure popup and closepopup are posted in order (#20114) 2019-09-05 16:37:09 -04:00
Steven Barbaro
93da8e2b3d fix: Debug builds on Windows. (#20117) 2019-09-05 12:38:56 -07:00
Samuel Attard
0d16be9560
feat: add nativeTheme.themeSource to allow apps to override Chromiums theme choice (#19960)
* feat: add nativeTheme.shouldUseDarkColorsOverride to allow apps to override Chromiums theme choice

* spec: add tests for shouldUseDarkColorsOverride

* chore: add missing forward declarations

* refactor: rename overrideShouldUseDarkColors to themeSource

* chore: only run appLevelAppearance specs on Mojave and up

* chore: update patch with more info and no define

* Update spec-main/api-native-theme-spec.ts

Co-Authored-By: Jeremy Apthorp <jeremya@chromium.org>

* Update api-native-theme-spec.ts

* Update api-native-theme-spec.ts

* Update api-native-theme-spec.ts
2019-09-05 10:57:04 -07:00
Samuel Attard
137622931b
fix: ensure document.visibilityState aligns with the visibility of the TopLevelWindow (#19988)
* fix: ensure document.visibilityState aligns with the visibility of the
TopLevelWindow

* chore: disable the specs on linux on CI
2019-09-05 10:56:06 -07:00
Electron Bot
cd096289e9 Bump v8.0.0-nightly.20190905 2019-09-05 08:37:04 -07:00
Samuel Attard
8b523cf88a
fix: ensure modeL_ exists before calling delegate methods (#20111)
This is a speculative fix for a crash we are seeing in `menuDidClose`.  We
can't repro the crash but the traces have it happening in this method
and just by reading through the impl the only part that jumps out as
Might Crash is this `model_` call.  Other methods in the menu controller
check `model_` before using it so it probably makes sense to do that here
as well.
2019-09-04 13:42:23 -07:00
Cheng Zhao
81ae154714 chore: remove native_mate (Part 2) (#20106)
* add notice to files being removed

* add gin version of function_template.h

* rename callback.h to avoid confliction

* add gin version of callback_converter

* add gin converter for OnceCallback

* remove callback_converter_gin_adapter.h

* remove gin_util.h and gin_utils.h

* fix lint warning

* add helper for setting methods
2019-09-04 08:45:25 -07:00
Electron Bot
504cdb13f0 Bump v8.0.0-nightly.20190904 2019-09-04 08:32:24 -07:00
Cheng Zhao
b601f3a031
chore: remove native_mate (Part 1) (#20085)
* move Destroyable utilities out of native_mate

* do not set "destroy" in ObjectTemplateBuilder

* remove ObjectTemplateBuilder::MakeDestroyable

* do not pollute gin namespace

* add more comments

* remove hack of Arguments
2019-09-04 11:14:16 +09:00
Cheng Zhao
96b42bddb8
fix: implement ses.getBlobData() for NetworkService (#20041)
* pass data pipe to JS

* implement reading buffer

* re-enable ses.getBlobData test

* remove AtomBlobReader
2019-09-04 07:54:14 +09:00
Samuel Attard
cc9436f288
chore: add SetGTKDarkThemeEnabled(enabled) internal helper to allow dynamic theme selection on linux (#19964)
This is just a after-creation setter for the `darkTheme` constructor option.  This is delibrately
a method and not a property as there is no getter.
2019-09-03 12:59:48 -07:00
Electron Bot
39475f9404 Bump v8.0.0-nightly.20190903 2019-09-03 08:32:24 -07:00
Electron Bot
614079654c Bump v8.0.0-nightly.20190902 2019-09-02 08:34:32 -07:00
Electron Bot
51015c5b48 Bump v8.0.0-nightly.20190901 2019-09-01 08:31:00 -07:00
Samuel Attard
c621a36320
fix: ensure that the "top" coordinate of the inner frame is correct (#20051)
On multi-monitor setups where the monitors are not all origined at 0 on
the Y coordinate (E.g. vertical stacked monitors) the maximize
calculation was incorrect as it assumed top was "0".  This instead
adjusts the math to calculate the correct top value.
2019-08-30 15:45:59 -07:00
Electron Bot
e96a042223 Bump v8.0.0-nightly.20190830 2019-08-30 08:32:04 -07:00
Shelley Vohr
5cbbd489d5 fix: honor cursor blink rate (#20020)
* fix: honor cursor blink rate on macOS

* fix: honor cursor blink rate on Linux

* fix: honor cursor blink rate on Windows

* refactor: clean up os_win cursor blink logic

* remove unneeded include
2019-08-30 09:39:46 -05:00
Samuel Attard
654338693f
fix: Revert "fix: make sure that menu bar gets focus even when you click an item to focus it first (#19710)" (#20019)
This reverts commit 27b2747b61.
2019-08-29 15:06:39 -07:00
Electron Bot
6b55584923 Bump v8.0.0-nightly.20190829 2019-08-29 08:31:27 -07:00
Alexey Kuzmin
c03288f458 chore: add missing includes (#20003) 2019-08-29 15:57:11 +09:00
Jeremy Apthorp
90d62e5b98 fix: nws13n: make ses.setUserAgent work (#20014)
* refactor tests to better control window creation

* fix: nws13n: make ses.setUserAgent work
2019-08-29 15:50:14 +09:00
Cheng Zhao
b3947d6a83
chore: cache URLLoaderFactory per-session (#19998)
* cache the URLLoaderFactory in AtomBrowserContext

* use cached loader factory in AtomURLLoaderFactory
2019-08-29 15:07:46 +09:00
Milan Burda
eed72c35d7 feat: add session.downloadURL() (#19889) 2019-08-28 20:27:20 -07:00
Milan Burda
01fdb80f7c refactor: implement isRemoteModuleEnabled via getLastWebPreferences() (#19220) 2019-08-28 15:57:03 -07:00
Charles Kerr
217ed9aabc
fix: gtk_init() called 2x in AtomBrowserMainParts (#19986)
Fixes #19984.
2019-08-28 12:36:03 -05:00
Electron Bot
3bc5302d78 Bump v8.0.0-nightly.20190828 2019-08-28 08:31:11 -07:00
Charles Kerr
987300c97a
refactor: omit redundant map searches (#19929)
* refactor: don't walk maps twice to remove elements

* refactor: don't walk maps twice to read elements

* refactor: don't walk maps twice to insert elements

* refactor: don't walk map 3x on UvTaskRunner timeout

* refactor: more don't-walk-maps-twice cleanup

* fixup! refactor: don't walk maps twice to insert elements

* refactor: don't walk containers twice when erasing

* refactor: omit excess lookups in RemoteObjectFreer
2019-08-28 09:39:21 -05:00
Heilig Benedek
27ce6a9cd3 fix: handle WM_GETMINMAXINFO instead of letting chromium do it (#19928)
* fix: remove WM_GETMINMAXINFO workaround since it's no longer needed

* fix: handle WM_GETMINMAXINFO ourselves

* fix: remove part of the chromium WM_GETMINMAXINFO handler
2019-08-28 09:34:34 +09:00
Marat Abdullin
ae9424d93a feat: add "accessibleTitle" property to a BrowserWindow instance (#19698)
Sometimes it's necessary to convey more information about the window to screen reader users only (simply putting everything to the window title might be unnecessarily noisy).

For example, Chromium uses that technique to tell screen reader users that the window is in incognito mode (the incognito window looks differently and doesn't have «incognito» in the title, but for blind users the screen reader will announce that it's incognito).
2019-08-28 00:35:34 +02:00
Jeremy Apthorp
1dcda7b809
chore: DCHECK for correct thread in EventEmitter::EmitWithSender (#19959) 2019-08-27 15:15:52 -07:00
Jeremy Apthorp
4b8e1588b4
fix: remove unused header from extensions-only file (#19947) 2019-08-27 10:59:22 -07:00
Cheng Zhao
4eee71ffbf feat: migrate webRequest module to NetworkService (Part 9) (#19976)
* no need to get WebContents for URLLoaderFactory

* consult embedder for network_factory created in net module

* set disable_web_security to false

* re-enable webRequest tests in net module
2019-08-27 09:12:33 -07:00
Electron Bot
bdb20d53cb Bump v8.0.0-nightly.20190827 2019-08-27 08:31:13 -07:00
Charles Kerr
7e61cd0dfb
fix: i18n of gtk msgbox buttons (#19904)
* fix: i18n of gtk msgbox buttons

similar to #19756 (12df0e8) but for messageboxes

* refactor: DRY the gtk+ button mnemonics

* fix: don't compile gtk_util on non-Linux platforms

rename from `gtk_util.[cc,h]` to `util_gtk.[cc,h]` so that it gets
picked up by the `extra_source_filters` rule in `BUILD.gn`.

* fix: make linter happy

It really shows that I cannot build locally atm... :P
2019-08-27 09:57:12 -05:00