Commit graph

6120 commits

Author SHA1 Message Date
Aleksei Kuzmin
481c70311a Move SoftwareOutputDevice to the viz service display compositor.
https://chromium-review.googlesource.com/677463
2018-03-20 10:13:14 +03:00
Samuel Attard
7c8be94a6e IPC fixes for WebContents 2018-03-20 10:13:14 +03:00
Samuel Attard
f80b328937 WebExceptionCode has been removed 2018-03-20 10:13:14 +03:00
Samuel Attard
7356be0164 Convert optional webpoint 2018-03-20 10:13:14 +03:00
Samuel Attard
a8e013dcb6 GetRenderProcessHost() has been removed for OOPI support, should use #include GetMainFrame()->GetProcess() 2018-03-20 10:13:14 +03:00
Samuel Attard
6402b23041 tracked_objects::Location --> base::Location 2018-03-20 10:08:58 +03:00
Samuel Attard
1158d35021 experimental_webgl_enabled is not supported, now use webgl1/2_enabled 2018-03-20 10:08:58 +03:00
Samuel Attard
021e383418 GetBlockingPool has been removed 2018-03-20 10:08:58 +03:00
Samuel Attard
0291dc8214 Calling non-const callbacks requires some tricks 2018-03-20 10:08:58 +03:00
Samuel Attard
ce755483ba DialogClosedCallback are not const references anymore 2018-03-20 10:08:58 +03:00
Samuel Attard
41b9825f00 WebContents are no longer IPC Sender's 2018-03-20 10:08:58 +03:00
Samuel Attard
12066a60f3 make_scoped_refptr --> WrapRefCounted 2018-03-20 10:08:58 +03:00
Samuel Attard
4666879f94 WebContentsObserver no longer provides explicit_set, we can calculate it 2018-03-20 10:08:57 +03:00
Samuel Attard
fb55db665c AllowCertificateError no longer sends overridable 2018-03-20 10:08:57 +03:00
Samuel Attard
7f50c3d08e TracingController -> Coordinator -- content tracing now uses 'endpoints' instead of 'sinks' 2018-03-20 10:08:57 +03:00
Samuel Attard
ed992ae6a1 trackable_object has moved to base namespace 2018-03-20 10:08:57 +03:00
Aleksei Kuzmin
b608152c41 Update Chrome version to 63.0.3239.84 2018-03-20 10:08:57 +03:00
Samuel Attard
0ac883c6d4
Remove the race condition between new process creation and context release (#12342)
* Remove the race condition between new process creation and old process releasing remote context

Previously there was a race condition where the getId() method would return the new context ID even
though the release was for the old context.  This changes it to send the "initial" context ID with
the release message to ensure there is no race.

* fetch context ID from remote in sandbox mode
2018-03-20 15:54:47 +11:00
Birunthan Mohanathas
20a0508a16 Update draggable regions when changing BrowserView
Fixes #12150.
2018-03-19 20:45:42 +02:00
Birunthan Mohanathas
42934a1006 Make BrowserView DragRegionViews children of the WebContents view
Previously they were children of the `InspectableWebContentsView` view,
which caused this assertion to fail:

f993888424/brightray/browser/mac/bry_inspectable_web_contents_view.mm (L162)
2018-03-19 20:45:40 +02:00
Birunthan Mohanathas
3b8ddd0997 Use NSView convertRect:toView: for BrowserView DragRegionView positioning 2018-03-19 20:44:05 +02:00
Birunthan Mohanathas
377e6c3210 Rename system_drag_exclude_areas => drag_exclude_rects 2018-03-19 20:44:05 +02:00
Birunthan Mohanathas
61160ff9e5 Store InspectableWebContents instead of InspectableWebContentsView in NativeBrowserView 2018-03-19 20:44:05 +02:00
Shelley Vohr
9599615b23
Fix nil tray title crash (#12352)
* Add check for title_ being nil

* remove print stub
2018-03-19 10:49:39 -05:00
Birunthan Mohanathas
6f6f388f38 Fix non-draggable regions on macOS (#12327)
This was a regression in 503b0ba1.
2018-03-17 06:49:11 +09:00
Charles Kerr
558ef7352d
Better GTK+ Menu color support (#12300)
* Better GTK+ Menu color support

 * Fix 'invisible menu' issue (#12275)

 * Now updates menu text color when focus changes!

 * Better caching of colors when system theme changes

 * Removed all GTK+ deprecation warnings from menubar

* Don't highlight menu text on mouseover in GTK+

* Fix textColor declaration scope error

* Simplify FocusManager connection management a bit

* Make the linter happy

* Decouple MenuBar view recoloring from rebuilding

This way we don't need to rebuild the subview each time a recolor
is needed, e.g. when window focus changes or the system theme changes

* Don't iterate child views if we don't need to

* Move variable declaration outside of a loop

* More efficient iteration of MenuBar children

* Cleaner MenuButton bounds testing

* Fix oops

* Add a nullptr check in MenuBar::GetItemCount()

* Simplify iteration in MenuBar::RebuildChildren()

* Make the linter happy

* Fix signed-unsigned comparison

* Remove declarations of nonexistent methods

* Make SubmenuButton accessor const

* Cleaner accelerator iteration

* Windows fixes
2018-03-17 06:37:36 +09:00
Robo
792837bd71 net: change mime type deduction in Change URLRequestAsarJob (#12319) 2018-03-16 16:48:26 +09:00
Charles Kerr
c2673aa970 Set appropriate defaults for webview options (#12271)
* Persist defaults to webPreferences object to JS land can read the inferred values instead of just user defined values

* Test inherited default propogation

* Refactor to remove coupling from fetching values and defaults

* Test description type

* Fix up tests
2018-03-15 13:56:46 +09:00
OJ Kwon
e7181eb89c feat(powerMonitor): expose interface to query system idle state (#11807)
* feat(BrowserWindow): expose interface to query system idle state

* test(BrowserWindow): update test cases for querySystemIdle interface

* docs(BrowserWindow): add querySystemIdle interface documentation

* refactor(powerMonitor): move querySystemIdle into powerMonitor

* test(powerMonitor): split test cases for all platform
2018-03-14 14:42:08 +09:00
Cheng Zhao
134872e9c1
Merge pull request #12198 from electron/fix_crash_handler
Fixed passing of exception to the system crash handler
2018-03-14 11:40:11 +09:00
Robo
e741bc0577 fix crash when using getWebPreferences api with devtools webContents (#12254) 2018-03-14 11:19:22 +09:00
Samuel Attard
8664dd2139
Merge pull request #12190 from electron/fix-double-preload-master
Ensure that a document has been created before sending IPC messages
2018-03-14 10:34:05 +09:00
Charles Kerr
dd2c2660b9
Fix desktop-id notification edge case (#12216)
* Fix desktop-id notification edge case

* Extract-method platform_util::GetDesktopName()

This removes duplicated code from libnotify_notifications.cc
and atom/common/linux/application_info.cc.

* Check for empty case in GetDesktopName().

* Move GetDesktopName() to brightray::util

* Remove unnecessary changes in platform_util

* Add a brightray::platform_util namespace
2018-03-12 16:02:47 +09:00
Charles Kerr
86af20ded0
Linux named notifications (#12192)
* Set name & desktop-entry on Linux notifications

* DBusMock now honors verbose mode flag

* Disable DBus Notification tests on ia32
2018-03-12 09:33:06 +09:00
Robo
06bf72da67 remove process preference lock from AtomBrowserClient (#12194) 2018-03-09 12:37:26 -05:00
Ales Pergl
4673c67835 Fixed passing of exception to the system crash handler 2018-03-09 15:46:27 +01:00
Ales Pergl
94299f6cd8 Fixed Mac build when enable_run_as_node==false 2018-03-09 13:33:04 +01:00
deepak1556
2bf1131dab add NOLINT rule for include order in renderer_client_base 2018-03-09 15:19:07 +05:30
deepak1556
3cfe66e4c3 move ipc use from rvh to rfh 2018-03-09 15:01:09 +05:30
Charles Kerr
0d12fc3033 Make the linter happy 2018-03-09 17:03:00 +09:00
Cheng Zhao
e79b18762e Enter context scope before InternalCallbackScope 2018-03-09 16:14:24 +09:00
Cheng Zhao
83f01096c0 When a render process is crashed, it might be reused 2018-03-09 16:13:51 +09:00
Cheng Zhao
5d2452608d Use InternalCallbackScope for ticking event loop 2018-03-09 15:23:40 +09:00
Shelley Vohr
1882b88c78 clean node ref and remove short circuit 2018-03-09 15:23:39 +09:00
Shelley Vohr
c8ef15cf40 update node::Environment::TickInfo calls 2018-03-09 15:23:39 +09:00
Samuel Attard
a9dcce82ed Ensure that a document has been created before sending IPC messages
* Reverts 370476c4af in favor of moving the previous logic to the new RenderFrameObserver instead of RenderViewObserver

Fixes #12045
2018-03-09 14:24:56 +11:00
Cheng Zhao
44c66fc284
Merge pull request #12167 from lyallh/menubar-autohide-fix
Fix menubar toggle alt key detection on focus
2018-03-09 10:13:32 +09:00
Aleš Pergl
0937b84b01 Use content origin in screen coordinates for calculating popup menu position (#12180) 2018-03-09 05:48:35 +09:00
Lyall Hamilton
ba24920fec Fix menubar toggle alt key detection on focus
Reset alt keypress flag on window blur so switching window via
Alt+* window manager keybindings can't incedentally trigger
annoying menubar toggles
2018-03-08 21:48:43 +13:00
Samuel Attard
8c138e74be More vibrancy fixes (#12157)
* Only set title bar to transparent when vibrant with a custom titlebar
* Correctly set the transparent state of the GpuSwitcher so vibrancy works on reload
* Document case where using frame: false without custom titleBarStyle and vibrant
2018-03-07 11:40:36 -05:00
Hari Juturu
2f4fd3324b Preload doesn't load in sandboxed render if preload path contains special chars (#12037)
* Adding missing headers

* adding ut

* Removing the file path exists check

* fixing test

* exposing window.require in UT
2018-03-07 11:40:00 -05:00
Andreas
69e7afee26 fix dev tools window interfering with mouse forward (#12132) 2018-03-07 07:44:55 -05:00
Cheng Zhao
cc6bcb6c81 Fix some flaky tests in CI (#12153)
* Guard whole InitPrefs with ScopedAllowIO

Saw a crash:
0 0x7f8d2f7d918d base::debug::StackTrace::StackTrace()
1 0x7f8d2f7d755c base::debug::StackTrace::StackTrace()
2 0x7f8d2f867caa logging::LogMessage::~LogMessage()
3 0x7f8d2fa157c7 base::ThreadRestrictions::AssertIOAllowed()
4 0x7f8d2f83453a base::OpenFile()
5 0x7f8d2f82a967 base::ReadFileToStringWithMaxSize()
6 0x7f8d2f82ad44 base::ReadFileToString()
7 0x7f8d2f846f73 JSONFileValueDeserializer::ReadFileToString()
8 0x7f8d2f84738c JSONFileValueDeserializer::Deserialize()
9 0x7f8d35a5d1f6 <unknown>
10 0x7f8d35a5c217 JsonPrefStore::ReadPrefs()
11 0x7f8d35a87d3e PrefService::InitFromStorage()
12 0x7f8d35a87c60 PrefService::PrefService()
13 0x7f8d35a91a10 PrefServiceFactory::Create()
14 0x000000e86e1b brightray::BrowserContext::InitPrefs()
15 0x000000c2bd64 atom::AtomBrowserContext::AtomBrowserContext()
16 0x000000c320db atom::AtomBrowserContext::From()
17 0x000000b4b8b5 atom::api::Session::FromPartition()

* Fix done being called twice in setInterval test

The callback passed to browser process is called asyncly, so it is
possible that multiple callbacks has already been scheduled before we
can clearInternval.

* Fix failing test when dir name has special chars

The pdfSource is not escaped while parsedURL.search is.

* Call done with Error instead of string

* Fix crash caused by not removing input observer

Solve crash:
0 libcontent.dylib content::RenderWidgetHostImpl::DispatchInputEventWithLatencyInfo(blink::WebInputEvent const&, ui::LatencyInfo*) + 214
1 libcontent.dylib content::RenderWidgetHostImpl::ForwardMouseEventWithLatencyInfo(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 1350
2 libcontent.dylib content::RenderWidgetHostViewMac::ProcessMouseEvent(blink::WebMouseEvent const&, ui::LatencyInfo const&) + 44
3 libcontent.dylib content::RenderWidgetHostInputEventRouter::RouteMouseEvent(content::RenderWidgetHostViewBase*, blink::WebMouseEvent*, ui::LatencyInfo const&) + 1817

* Print detailed error

* Run tests after server is ready
2018-03-07 14:40:27 +09:00
Cheng Zhao
411da169ac Repect old logic in windowWillUseStandardFrame 2018-03-06 16:54:20 +09:00
Cheng Zhao
78468098c5 Don't store WebContents in NativeWindow 2018-03-06 16:21:18 +09:00
Cheng Zhao
9000bd6679 views: Explicitly set initially focused view 2018-03-06 16:21:18 +09:00
Cheng Zhao
413fdc6f0d views: Show menu on window's content view 2018-03-06 16:21:18 +09:00
Cheng Zhao
9c7854aef6 NativeWindow is no longer WebContentsObserver 2018-03-06 16:21:18 +09:00
Cheng Zhao
bf862d1d07 views: Focus webContents in BrowserWindow 2018-03-06 16:21:17 +09:00
Cheng Zhao
8bbe28e998 No need to get BrowserContext from NativeWindow 2018-03-06 16:21:17 +09:00
Cheng Zhao
702f1631a3 Remove NativeWindow::FromWebContents 2018-03-06 16:21:17 +09:00
Cheng Zhao
eea4e60b73 Remove NativeWindow's webview APIs 2018-03-06 16:20:37 +09:00
Cheng Zhao
5a4c2fb61d mac: Pass the view to install 2018-03-06 16:20:37 +09:00
Cheng Zhao
498f5d65fd mac: UninstallView is not used 2018-03-06 16:20:37 +09:00
Cheng Zhao
3b3e69f8b2 Save browser_view_ in the NativeWindow
No need to store it separately in subclasses.
2018-03-06 16:20:37 +09:00
Cheng Zhao
503b0ba1b1 mac: Move draggable region code to BrowserWindow
On macOS current draggable region implementation highly relies on
WebContents, the code is only meaningful for BrowserWindow.
2018-03-06 16:20:37 +09:00
Cheng Zhao
bc34ca9e25 mac: Call setMouseDownCanMoveWindow in BrowserWindow 2018-03-06 16:20:37 +09:00
Cheng Zhao
7d4ff3b061 mac: Call SetBackgroundOpaque in BrowserWindow 2018-03-06 16:20:37 +09:00
Cheng Zhao
8a1884c407 mac: AcceleratedWidget should be window's content view 2018-03-06 16:20:37 +09:00
Cheng Zhao
e7f175d578 Only mac needs to call SetActive 2018-03-06 16:20:37 +09:00
Cheng Zhao
4c7b48e596 mac: Window's native view should be its content view 2018-03-06 16:20:37 +09:00
Cheng Zhao
1681ee35db Set WebContents background color in BrowserWindow 2018-03-06 16:20:37 +09:00
Cheng Zhao
7b8890a4c9 web_contents can't be null 2018-03-06 16:20:37 +09:00
Cheng Zhao
2eaa6d0874 Move StoreFocus/RestoreFocus to BrowserWindow 2018-03-06 16:20:37 +09:00
Cheng Zhao
cad3d694ab mac: Remove access to webContents in windowWillUseStandardFrame 2018-03-06 16:20:37 +09:00
Cheng Zhao
ca42325ade Make OnMessageBoxCallback a method since it is accessing members 2018-03-06 11:35:53 +09:00
Cheng Zhao
7516b059fe Code style fixes 2018-03-06 11:31:56 +09:00
Samuel Attard
7dec3c9320 Fixup cpplint 2018-03-06 11:19:15 +09:00
Samuel Attard
731240e0e9 Use USER_WANTS_NO_MORE_DIALOGS constant for -1 magic number 2018-03-06 11:19:15 +09:00
Charles Kerr
a5a068b2ee fix cpplint errors
atom/browser/atom_javascript_dialog_manager.cc:39:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
atom/browser/atom_javascript_dialog_manager.cc:39:  If/else bodies with multiple statements require braces  [readability/braces] [4]
atom/browser/atom_javascript_dialog_manager.cc:62:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
atom/browser/atom_javascript_dialog_manager.cc:89:  If/else bodies with multiple statements require braces  [readability/braces] [4]
2018-03-06 11:19:15 +09:00
Charles Kerr
2435ffaf09 fix cpplint error
atom/browser/atom_javascript_dialog_manager.h:9:  Include "map" not in alphabetical order  [build/include_alpha] [4]
2018-03-06 11:19:15 +09:00
Samuel Attard
795447f61a Implement dialog (alert/confirm) blocking as a user switch after the first dialog
* This is to enable more browser-like behavior so that users who run third-party code
  will not be DOS'ed with alerts and confirms.  This is already handled like this
  in most major browsers so this will greatly help these developers
2018-03-06 11:19:15 +09:00
Shelley Vohr
199cf31b9e
deprecate screen.getMenuBarHeight 2018-03-05 19:45:51 -05:00
Aleksei Kuzmin
52c0864cb8 Use version 0.0.0-dev everywhere 2018-03-05 16:24:48 +01:00
Shelley Vohr
bf491de9fe
fix styling and add spec 2018-02-28 00:22:42 -08:00
Shelley Vohr
2abc69780e
move native-mate back into the api layer 2018-02-27 13:00:42 -08:00
Shelley Vohr
837a2d4bbd
appease the linter 2018-02-26 22:25:09 -08:00
Samuel Attard
b722150d87 Don't cast manually for NativeWindow* 2018-02-27 16:13:17 +11:00
Samuel Attard
5336b4a89c Pass arguments instance through the chain in order to throw error 2018-02-27 16:11:58 +11:00
Shelley Vohr
e84d7c0cda
add warning when addTabbedWindow is called on self 2018-02-26 14:47:36 -08:00
Cheng Zhao
53229e3d6c Fix network delegate race condition (#12044)
* Fix race condition when getting network delegate

* Remove the evil URLRequestContextGetter::network_delegate

* Move the arguments instead of const referrencing

Safer and more efficient.
2018-02-26 06:23:59 -08:00
Cheng Zhao
fdd66bd76d
Merge pull request #11607 from bughit/frame_navigation_api
frame navigation API
2018-02-26 15:50:11 +09:00
Cheng Zhao
ccf30e0934 Coding style fixes 2018-02-26 15:19:44 +09:00
Cheng Zhao
f7786a9e48
Merge pull request #11230 from electron/upgrade-to-chromium-62
Upgrade to Chromium 62
2018-02-26 14:20:21 +09:00
kaylie
da9f12d1e2 restore old cb 2018-02-25 14:19:40 -08:00
Cheng Zhao
b9ab2fe0fb Disable stack dumping for 32bit ARM 2018-02-23 10:22:00 +09:00
Cheng Zhao
39e0433570 Fix build error after rebasing 2018-02-23 10:22:00 +09:00
shelley vohr
0e5b6f9300 Upgrade to node v9.3.0 (#11507)
* update submodule refs for node v9.3.0

* Define "llvm_version" for Node.js build

* NODE_MODULE_CONTEXT_AWARE_BUILTIN -> NODE_BUILTIN_MODULE_CONTEXT_AWARE

* update NodePlatform to MultiIsolatePlatform

* fix linting error

* update node ref

* REVIEW: Explicitly register builtin modules

https://github.com/nodejs/node/pull/16565

* update libcc ref

* switch libcc to c62

* REVIEW: Address node api changes

- Always start the inspector agent for https://github.com/nodejs/node/pull/17085
- Set the tracing controller for node https://github.com/nodejs/node/pull/15538
- Isolate data creation now requires plaform https://github.com/nodejs/node/pull/16700
2018-02-23 10:22:00 +09:00
Aleksei Kuzmin
f5d207f8f0 Improve process launch handle sharing API.
https://codereview.chromium.org/2950153002
2018-02-23 10:21:24 +09:00
deepak1556
5eb0a89579 REVIEW: let browser context manage cookie change sub list 2018-02-23 10:21:24 +09:00