Commit graph

18451 commits

Author SHA1 Message Date
Aleš Pergl
0937b84b01 Use content origin in screen coordinates for calculating popup menu position (#12180) 2018-03-09 05:48:35 +09:00
Jake
569b87ff83 Added session-created event documentation (#12123)
* Added session-created event documentation 

Emitted at 1c0ea0286e/lib/browser/api/session.js (L21)

* Removed trailing spaces
2018-03-08 11:32:52 +09: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
Samuel Attard
fdab98aa59
Merge pull request #12155 from electron/modify-deprecation-guarantee
Deprecations come >=1 major release before removal
2018-03-07 23:28:05 +11:00
Charles Kerr
b0820e4886
Fix broken link 2018-03-07 16:18:47 +09:00
Charles Kerr
4ab7b2d2b1 Deprecations come >=1 major release before removal 2018-03-07 16:12:28 +09:00
Shelley Vohr
c31bf8474c clean planned breaking changes for 3.0 (#12145) 2018-03-07 16:06:33 +09: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
Charles Kerr
65ee977a86 Exit gracefully on linux (#12139)
* Fix timing issue in singleton fixture.

Singleton now sends the "we've started" message out only after it's
received a `'ready'` event from `app`. Previously it sent the message
out immediately, resulting in the parent test trying to manipulate it
before Singleton's event loop was fully bootstrapped.

* Check for graceful exits on Linux, too.

Rewrite the "exits gracefully on macos" spec to run on Linux too.

* Check for graceful exits everywhere.

* Tweak comment

* Better error logging in api-app-spec.js. (#12122)

In the 'exits gracefully' test for app.exit(exitCode),
print the relevant error information if the test fails.

* Run the exit-gracefully test on macOS and Linux.

Windows does not support sending signals, but Node.js offers some
emulation with process.kill(), and subprocess.kill(). Sending signal 0
can be used to test for the existence of a process. Sending SIGINT,
SIGTERM, and SIGKILL cause the unconditional termination of the target
process.

So, we'll need a different approach if we want to test this in win32.
2018-03-06 22:01:17 -05:00
br0nstein
f170914def Fix getFocusedWindow return type (#12149) 2018-03-07 10:23:02 +09:00
Cheng Zhao
ea9d33374f
Merge pull request #12140 from electron/native-window-no-web-contents
Refactor NativeWindow (Part 2):  NativeWindow is no longer WebContentsObserver
2018-03-07 10:12:37 +09:00
Vanessa Yuen
7f664aa18c
Merge pull request #12105 from electron/update-references-to-renamed-i18n-repo
update references to renamed i18n repo
2018-03-06 19:08:20 +00:00
shelley vohr
1413f22095
Merge pull request #12103 from electron/fix-broken-links
[docs] switch footnote links to regular links syntax
2018-03-06 07:52:08 -08:00
shelley vohr
a3e33a313a
Merge pull request #12131 from nitsakh/xcode-debugging
Add XCode debugging doc
2018-03-06 07:34:05 -08: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
e73326a324
Merge pull request #11613 from electron/safe-dialogs
Implement dialog (alert/confirm) blocking as a user switch after the first dialog
2018-03-06 14:28:53 +09:00
Cheng Zhao
90bd1fd7e9 Native confirm/alert throws differently 2018-03-06 14:06:29 +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
Cheng Zhao
d8f16f4116 docs: Default message is not localized 2018-03-06 11:24:42 +09:00
Cheng Zhao
26a071ea00 docs: Defaults of safeDialogs 2018-03-06 11:21:40 +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
a3d4d461a3
Merge pull request #12135 from electron/deprecate-getMenuBarHeight
deprecate screen.getMenuBarHeight
2018-03-05 17:56:51 -08:00