From e2cd0578f3c32a935c9477f3fa2b4d4aae64fcb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADtor=20Galv=C3=A3o?= Date: Wed, 18 Nov 2015 18:13:48 +0000 Subject: [PATCH 01/10] web-view-tag.md: small typo correction ('the' position swap) --- docs/api/web-view-tag.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/api/web-view-tag.md b/docs/api/web-view-tag.md index 25b0e39946..47a3050a04 100644 --- a/docs/api/web-view-tag.md +++ b/docs/api/web-view-tag.md @@ -262,7 +262,7 @@ Injects CSS into the guest page. * `code` String * `userGesture` Boolean - Default `false`. -Evaluates `code` in page. If `userGesture` is set, it will the create user +Evaluates `code` in page. If `userGesture` is set, it will create the user gesture context in the page. HTML APIs like `requestFullScreen`, which require user action, can take advantage of this option for automation. From f581730516b4810e6a3e06516b413146a309f2d1 Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Wed, 18 Nov 2015 21:06:06 +0200 Subject: [PATCH 02/10] Update browser-window.md Changed the description of the preload key to make it clear you need to provide an absolute file path and not a file url. Also mentioned that it's possible to reintroduce Node globals when node integration is off and referenced the example from process.md (related to https://github.com/atom/electron/issues/254#issuecomment-157769756). --- docs/api/browser-window.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index e5fcfb9003..48373b313e 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -86,8 +86,12 @@ It creates a new `BrowserWindow` with native properties as set by the `options`. is `true`. * `preload` String - Specifies a script that will be loaded before other scripts run in the page. This script will always have access to node APIs - no matter whether node integration is turned on for the page, and the path - of `preload` script has to be absolute path. + no matter whether node integration is turned on or off. The value should + be the absolute file path to the script. + + When node integration is turned off, the preload script can reintroduce + Node global symbols back to the global scope. See example + [here](process.md#event-loaded). * `partition` String - Sets the session used by the page. If `partition` starts with `persist:`, the page will use a persistent session available to all pages in the app with the same `partition`. if there is no `persist:` From b7ae9d33376e980e365b17dac6562442b0fc5386 Mon Sep 17 00:00:00 2001 From: Eran Tiktin Date: Thu, 19 Nov 2015 02:11:32 +0200 Subject: [PATCH 03/10] Update ipc-renderer.md Removed duplication. --- docs/api/ipc-renderer.md | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/docs/api/ipc-renderer.md b/docs/api/ipc-renderer.md index e591f9e0bc..01f0bb3a83 100644 --- a/docs/api/ipc-renderer.md +++ b/docs/api/ipc-renderer.md @@ -37,11 +37,10 @@ send arbitrary arguments. The main process handles it by listening for the * `arg` (optional) Send an event to the main process synchronously via a `channel`, you can also -send arbitrary arguments. The main process handles it by listening for the -`channel` event with `ipcMain`. +send arbitrary arguments. -The main process handles it by listening for the `channel` event with `ipc` and -replies by setting the `event.returnValue`. +The main process handles it by listening for the `channel` event with +`ipcMain` and replies by setting `event.returnValue`. __Note:__ Sending a synchronous message will block the whole renderer process, unless you know what you are doing you should never use it. From ba5f8aa09683e34b265a4503436b58b120be78e7 Mon Sep 17 00:00:00 2001 From: Kevin Ramsunder Date: Wed, 18 Nov 2015 20:04:16 -0500 Subject: [PATCH 04/10] mac-app-store-submission-guide.md: typo correction --- docs/tutorial/mac-app-store-submission-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/tutorial/mac-app-store-submission-guide.md b/docs/tutorial/mac-app-store-submission-guide.md index 4dc6f900a1..43b2d9a0a4 100644 --- a/docs/tutorial/mac-app-store-submission-guide.md +++ b/docs/tutorial/mac-app-store-submission-guide.md @@ -7,7 +7,7 @@ limitations of the MAS build. ## How to Submit Your App The following steps introduce a simple way to submit your app to Mac App Store. -However, these steps do not ensure sure your app will be approved by Apple; you +However, these steps do not ensure your app will be approved by Apple; you still need to read Apple's [Submitting Your App][submitting-your-app] guide on how to meet the Mac App Store requirements. From c63121c2f65f86f0b070690ab47396d1356f413f Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 19 Nov 2015 13:49:50 +0800 Subject: [PATCH 05/10] Update libchromiumcontent Backport https://codereview.chromium.org/1324513002. --- script/lib/config.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/lib/config.py b/script/lib/config.py index 047ecf4faa..2fb841acf3 100644 --- a/script/lib/config.py +++ b/script/lib/config.py @@ -8,7 +8,7 @@ import sys BASE_URL = os.getenv('LIBCHROMIUMCONTENT_MIRROR') or \ 'http://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' -LIBCHROMIUMCONTENT_COMMIT = '464aff2398f619b1d4d91b9187de69803919dca2' +LIBCHROMIUMCONTENT_COMMIT = '17a4337f7948a45b5ea4b8f391df152ba8db5979' PLATFORM = { 'cygwin': 'win32', From 2c06afad6ad3765ff7e55373196038498b38ae89 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 19 Nov 2015 15:10:33 +0800 Subject: [PATCH 06/10] Upload the dSYM symbols --- script/create-dist.py | 21 ++++++++++++++++++--- script/upload.py | 6 ++++++ 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/script/create-dist.py b/script/create-dist.py index d79d963c12..29f81ebd85 100755 --- a/script/create-dist.py +++ b/script/create-dist.py @@ -1,5 +1,6 @@ #!/usr/bin/env python +import glob import os import re import shutil @@ -168,6 +169,11 @@ def create_symbols(): dump_symbols = os.path.join(SOURCE_ROOT, 'script', 'dump-symbols.py') execute([sys.executable, dump_symbols, destination]) + if PLATFORM == 'darwin': + dsyms = glob.glob(os.path.join(OUT_DIR, '*.dSYM')) + for dsym in dsyms: + shutil.copytree(dsym, os.path.join(DIST_DIR, os.path.basename(dsym))) + def create_dist_zip(): dist_name = '{0}-{1}-{2}-{3}.zip'.format(PROJECT_NAME, ATOM_SHELL_VERSION, @@ -203,12 +209,21 @@ def create_symbols_zip(): ATOM_SHELL_VERSION, get_platform_key(), get_target_arch()) - zip_file = os.path.join(SOURCE_ROOT, 'dist', dist_name) + zip_file = os.path.join(DIST_DIR, dist_name) + licenses = ['LICENSE', 'LICENSES.chromium.html', 'version'] with scoped_cwd(DIST_DIR): - files = ['LICENSE', 'LICENSES.chromium.html', 'version'] dirs = ['{0}.breakpad.syms'.format(PROJECT_NAME)] - make_zip(zip_file, files, dirs) + make_zip(zip_file, licenses, dirs) + + if PLATFORM == 'darwin': + dsym_name = '{0}-{1}-{2}-{3}-dsym.zip'.format(PROJECT_NAME, + ATOM_SHELL_VERSION, + get_platform_key(), + get_target_arch()) + with scoped_cwd(DIST_DIR): + dsyms = glob.glob('*.dSYM') + make_zip(os.path.join(DIST_DIR, dsym_name), licenses, dsyms) if __name__ == '__main__': diff --git a/script/upload.py b/script/upload.py index 318bbb594a..c021d743a8 100755 --- a/script/upload.py +++ b/script/upload.py @@ -31,6 +31,10 @@ SYMBOLS_NAME = '{0}-{1}-{2}-{3}-symbols.zip'.format(PROJECT_NAME, ATOM_SHELL_VERSION, get_platform_key(), get_target_arch()) +DSYM_NAME = '{0}-{1}-{2}-{3}-dsym.zip'.format(PROJECT_NAME, + ATOM_SHELL_VERSION, + get_platform_key(), + get_target_arch()) MKSNAPSHOT_NAME = 'mksnapshot-{0}-{1}-{2}.zip'.format(ATOM_SHELL_VERSION, get_platform_key(), get_target_arch()) @@ -82,6 +86,8 @@ def main(): # Upload atom-shell with GitHub Releases API. upload_atom_shell(github, release, os.path.join(DIST_DIR, DIST_NAME)) upload_atom_shell(github, release, os.path.join(DIST_DIR, SYMBOLS_NAME)) + if PLATFORM == 'darwin': + upload_atom_shell(github, release, os.path.join(DIST_DIR, DSYM_NAME)) # Upload chromedriver and mksnapshot for minor version update. if parse_version(args.version)[2] == '0': From 9a20b33d97c6131506170621ee132646424ceeab Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 19 Nov 2015 17:08:16 +0800 Subject: [PATCH 07/10] Add isDestroyed method for classes with destroy method --- atom/browser/api/atom_api_tray.cc | 1 + atom/browser/api/atom_api_web_contents.cc | 8 ++------ atom/browser/api/atom_api_web_contents.h | 1 - atom/browser/api/atom_api_window.cc | 6 +----- atom/browser/api/atom_api_window.h | 1 - 5 files changed, 4 insertions(+), 13 deletions(-) diff --git a/atom/browser/api/atom_api_tray.cc b/atom/browser/api/atom_api_tray.cc index d3c5931ad6..5e32657f00 100644 --- a/atom/browser/api/atom_api_tray.cc +++ b/atom/browser/api/atom_api_tray.cc @@ -161,6 +161,7 @@ void Tray::BuildPrototype(v8::Isolate* isolate, v8::Local prototype) { mate::ObjectTemplateBuilder(isolate, prototype) .SetMethod("destroy", &Tray::Destroy, true) + .SetMethod("isDestroyed", &Tray::IsDestroyed, true) .SetMethod("setImage", &Tray::SetImage) .SetMethod("setPressedImage", &Tray::SetPressedImage) .SetMethod("setToolTip", &Tray::SetToolTip) diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index 1c3334e936..066ca9cc7b 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -604,10 +604,6 @@ void WebContents::Destroy() { } } -bool WebContents::IsAlive() const { - return web_contents() != NULL; -} - int WebContents::GetID() const { return web_contents()->GetRenderProcessHost()->GetID(); } @@ -996,7 +992,7 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder( if (template_.IsEmpty()) template_.Reset(isolate, mate::ObjectTemplateBuilder(isolate) .SetMethod("destroy", &WebContents::Destroy, true) - .SetMethod("isAlive", &WebContents::IsAlive, true) + .SetMethod("isDestroyed", &WebContents::IsDestroyed, true) .SetMethod("getId", &WebContents::GetID) .SetMethod("equal", &WebContents::Equal) .SetMethod("_loadURL", &WebContents::LoadURL) @@ -1066,7 +1062,7 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder( } bool WebContents::IsDestroyed() const { - return !IsAlive(); + return !web_contents(); } AtomBrowserContext* WebContents::GetBrowserContext() const { diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index ae231cd3c6..568a563e2c 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -57,7 +57,6 @@ class WebContents : public mate::TrackableObject, // mate::TrackableObject: void Destroy() override; - bool IsAlive() const; int GetID() const; bool Equal(const WebContents* web_contents) const; void LoadURL(const GURL& url, const mate::Dictionary& options); diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index 61f43f9aac..7f5b78a797 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -284,10 +284,6 @@ void Window::Close() { window_->Close(); } -bool Window::IsClosed() { - return window_->IsClosed(); -} - void Window::Focus() { window_->Focus(true); } @@ -622,8 +618,8 @@ void Window::BuildPrototype(v8::Isolate* isolate, v8::Local prototype) { mate::ObjectTemplateBuilder(isolate, prototype) .SetMethod("destroy", &Window::Destroy, true) + .SetMethod("isDestroyed", &Window::IsDestroyed, true) .SetMethod("close", &Window::Close) - .SetMethod("isClosed", &Window::IsClosed) .SetMethod("focus", &Window::Focus) .SetMethod("isFocused", &Window::IsFocused) .SetMethod("show", &Window::Show) diff --git a/atom/browser/api/atom_api_window.h b/atom/browser/api/atom_api_window.h index 1c582551cc..4161584206 100644 --- a/atom/browser/api/atom_api_window.h +++ b/atom/browser/api/atom_api_window.h @@ -89,7 +89,6 @@ class Window : public mate::TrackableObject, // APIs for NativeWindow. void Close(); - bool IsClosed(); void Focus(); bool IsFocused(); void Show(); From f2472274b7604dda90bdf122a2c2718539484268 Mon Sep 17 00:00:00 2001 From: Sota Yamashita Date: Thu, 19 Nov 2015 22:52:37 +0900 Subject: [PATCH 08/10] Rename quick-start.md -> tutorial/quick-start.md --- docs-translations/jp/{ => tutorial}/quick-start.md | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs-translations/jp/{ => tutorial}/quick-start.md (100%) diff --git a/docs-translations/jp/quick-start.md b/docs-translations/jp/tutorial/quick-start.md similarity index 100% rename from docs-translations/jp/quick-start.md rename to docs-translations/jp/tutorial/quick-start.md From bee1af3264df67583b44cc99d3c7715f78019fa6 Mon Sep 17 00:00:00 2001 From: Sota Yamashita Date: Thu, 19 Nov 2015 22:54:01 +0900 Subject: [PATCH 09/10] Create README.md --- docs-translations/jp/READE.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs-translations/jp/READE.md diff --git a/docs-translations/jp/READE.md b/docs-translations/jp/READE.md new file mode 100644 index 0000000000..32b14b0fdd --- /dev/null +++ b/docs-translations/jp/READE.md @@ -0,0 +1,3 @@ +# チュートリアル + +* [クイックスタート](tutorial/quick-start.md) From fd3b8ad62304d74b76ddba6d50ea08cd03663151 Mon Sep 17 00:00:00 2001 From: Sota Yamashita Date: Thu, 19 Nov 2015 22:54:40 +0900 Subject: [PATCH 10/10] Rename: READE.md -> README.md --- docs-translations/jp/{READE.md => README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename docs-translations/jp/{READE.md => README.md} (100%) diff --git a/docs-translations/jp/READE.md b/docs-translations/jp/README.md similarity index 100% rename from docs-translations/jp/READE.md rename to docs-translations/jp/README.md