diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 516f6289ac..6ca3ea5d2f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,7 +30,7 @@ possible with your report. If you can, please include: * Follow the CoffeeScript, JavaScript, C++ and Python [coding style defined in docs](/docs/development/coding-style.md). * Write documentation in [Markdown](https://daringfireball.net/projects/markdown). See the [Documentation Styleguide](/docs/styleguide.md). -* Use short, present tense commit messages. See [Commit Message Styleguide](#git-commit-messages-styleguide). +* Use short, present tense commit messages. See [Commit Message Styleguide](#git-commit-messages). ## Styleguides diff --git a/README-ko.md b/README-ko.md index 83634370eb..1481e7ce3d 100644 --- a/README-ko.md +++ b/README-ko.md @@ -41,7 +41,7 @@ Electron을 빌드 하는 방법과 프로젝트에 기여하는 방법도 문 ## 참조 문서 (번역) - [브라질 포르투칼어](https://github.com/atom/electron/tree/master/docs-translations/pt-BR) -- [한국어](https://github.com/atom/electron/tree/master/docs-translations/ko) +- [한국어](https://github.com/atom/electron/tree/master/docs-translations/ko-KR) - [일본어](https://github.com/atom/electron/tree/master/docs-translations/jp) - [스페인어](https://github.com/atom/electron/tree/master/docs-translations/es) - [중국어 간체](https://github.com/atom/electron/tree/master/docs-translations/zh-CN) diff --git a/README.md b/README.md index 54b6af5fa3..0bf29fbc3e 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ contains documents describing how to build and contribute to Electron. ## Documentation Translations - [Brazilian Portuguese](https://github.com/atom/electron/tree/master/docs-translations/pt-BR) -- [Korean](https://github.com/atom/electron/tree/master/docs-translations/ko) +- [Korean](https://github.com/atom/electron/tree/master/docs-translations/ko-KR) - [Japanese](https://github.com/atom/electron/tree/master/docs-translations/jp) - [Spanish](https://github.com/atom/electron/tree/master/docs-translations/es) - [Simplified Chinese](https://github.com/atom/electron/tree/master/docs-translations/zh-CN) diff --git a/atom.gyp b/atom.gyp index 63defa4273..3a46f242a2 100644 --- a/atom.gyp +++ b/atom.gyp @@ -4,7 +4,7 @@ 'product_name%': 'Electron', 'company_name%': 'GitHub, Inc', 'company_abbr%': 'github', - 'version%': '0.32.3', + 'version%': '0.33.1', }, 'includes': [ 'filenames.gypi', diff --git a/atom/browser/api/atom_api_app.cc b/atom/browser/api/atom_api_app.cc index 43b3d82df1..2e7596971f 100644 --- a/atom/browser/api/atom_api_app.cc +++ b/atom/browser/api/atom_api_app.cc @@ -30,6 +30,7 @@ #include "native_mate/dictionary.h" #include "native_mate/object_template_builder.h" #include "net/ssl/ssl_cert_request_info.h" +#include "ui/base/l10n/l10n_util.h" #if defined(OS_WIN) #include "base/strings/utf_string_conversions.h" @@ -248,6 +249,10 @@ void App::SetAppUserModelId(const std::string& app_id) { #endif } +std::string App::GetLocale() { + return l10n_util::GetApplicationLocale(""); +} + v8::Local App::DefaultSession(v8::Isolate* isolate) { if (default_session_.IsEmpty()) return v8::Null(isolate); @@ -278,6 +283,7 @@ mate::ObjectTemplateBuilder App::GetObjectTemplateBuilder( .SetMethod("getPath", &App::GetPath) .SetMethod("setDesktopName", &App::SetDesktopName) .SetMethod("setAppUserModelId", &App::SetAppUserModelId) + .SetMethod("getLocale", &App::GetLocale) .SetProperty("defaultSession", &App::DefaultSession); } diff --git a/atom/browser/api/atom_api_app.h b/atom/browser/api/atom_api_app.h index 255f780e57..4896a5f066 100644 --- a/atom/browser/api/atom_api_app.h +++ b/atom/browser/api/atom_api_app.h @@ -65,6 +65,7 @@ class App : public mate::EventEmitter, void SetDesktopName(const std::string& desktop_name); void SetAppUserModelId(const std::string& app_id); + std::string GetLocale(); v8::Local DefaultSession(v8::Isolate* isolate); v8::Global default_session_; diff --git a/atom/browser/api/atom_api_web_contents.cc b/atom/browser/api/atom_api_web_contents.cc index a24200e5a8..bdeb4ed4f8 100644 --- a/atom/browser/api/atom_api_web_contents.cc +++ b/atom/browser/api/atom_api_web_contents.cc @@ -15,6 +15,7 @@ #include "atom/browser/web_view_guest_delegate.h" #include "atom/common/api/api_messages.h" #include "atom/common/api/event_emitter_caller.h" +#include "atom/common/native_mate_converters/blink_converter.h" #include "atom/common/native_mate_converters/callback.h" #include "atom/common/native_mate_converters/file_path_converter.h" #include "atom/common/native_mate_converters/gfx_converter.h" @@ -27,13 +28,16 @@ #include "brightray/browser/inspectable_web_contents.h" #include "chrome/browser/printing/print_view_manager_basic.h" #include "chrome/browser/printing/print_preview_message_handler.h" +#include "content/common/view_messages.h" #include "content/public/browser/favicon_status.h" +#include "content/public/browser/native_web_keyboard_event.h" #include "content/public/browser/navigation_details.h" #include "content/public/browser/navigation_entry.h" #include "content/public/browser/plugin_service.h" #include "content/public/browser/render_frame_host.h" #include "content/public/browser/render_process_host.h" #include "content/public/browser/render_view_host.h" +#include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/resource_request_details.h" #include "content/public/browser/service_worker_context.h" #include "content/public/browser/storage_partition.h" @@ -44,6 +48,7 @@ #include "net/http/http_response_headers.h" #include "net/url_request/static_http_user_agent_settings.h" #include "net/url_request/url_request_context.h" +#include "third_party/WebKit/public/web/WebInputEvent.h" #include "atom/common/node_includes.h" @@ -115,6 +120,33 @@ struct Converter { } }; +template<> +struct Converter { + static v8::Local ToV8(v8::Isolate* isolate, + net::HttpResponseHeaders* headers) { + base::DictionaryValue response_headers; + if (headers) { + void* iter = nullptr; + std::string key; + std::string value; + while (headers->EnumerateHeaderLines(&iter, &key, &value)) { + key = base::StringToLowerASCII(key); + value = base::StringToLowerASCII(value); + if (response_headers.HasKey(key)) { + base::ListValue* values = nullptr; + if (response_headers.GetList(key, &values)) + values->AppendString(value); + } else { + scoped_ptr values(new base::ListValue()); + values->AppendString(value); + response_headers.Set(key, values.Pass()); + } + } + } + return ConvertToV8(isolate, response_headers); + } +}; + } // namespace mate @@ -126,7 +158,7 @@ namespace { v8::Persistent template_; -// The wrapWebContents funtion which is implemented in JavaScript +// The wrapWebContents function which is implemented in JavaScript using WrapWebContentsCallback = base::Callback)>; WrapWebContentsCallback g_wrap_web_contents; @@ -196,7 +228,7 @@ WebContents::WebContents(v8::Isolate* isolate, AttachAsUserData(web_contents); InitWithWebContents(web_contents); - // Save the preferences. + // Save the preferences in C++. base::DictionaryValue web_preferences; mate::ConvertFromV8(isolate, options.GetHandle(), &web_preferences); new WebContentsPreferences(web_contents, &web_preferences); @@ -409,30 +441,6 @@ void WebContents::DidStopLoading() { void WebContents::DidGetResourceResponseStart( const content::ResourceRequestDetails& details) { - v8::Locker locker(isolate()); - v8::HandleScope handle_scope(isolate()); - base::DictionaryValue response_headers; - - net::HttpResponseHeaders* headers = details.headers.get(); - if (!headers) - return; - void* iter = nullptr; - std::string key; - std::string value; - while (headers->EnumerateHeaderLines(&iter, &key, &value)) { - key = base::StringToLowerASCII(key); - value = base::StringToLowerASCII(value); - if (response_headers.HasKey(key)) { - base::ListValue* values = nullptr; - if (response_headers.GetList(key, &values)) - values->AppendString(value); - } else { - scoped_ptr values(new base::ListValue()); - values->AppendString(value); - response_headers.Set(key, values.Pass()); - } - } - Emit("did-get-response-details", details.socket_address.IsEmpty(), details.url, @@ -440,7 +448,7 @@ void WebContents::DidGetResourceResponseStart( details.http_response_code, details.method, details.referrer, - response_headers); + details.headers.get()); } void WebContents::DidGetRedirectForResourceRequest( @@ -449,7 +457,11 @@ void WebContents::DidGetRedirectForResourceRequest( Emit("did-get-redirect-request", details.url, details.new_url, - (details.resource_type == content::RESOURCE_TYPE_MAIN_FRAME)); + (details.resource_type == content::RESOURCE_TYPE_MAIN_FRAME), + details.http_response_code, + details.method, + details.referrer, + details.headers.get()); } void WebContents::DidNavigateMainFrame( @@ -640,6 +652,21 @@ bool WebContents::IsDevToolsOpened() { return managed_web_contents()->IsDevToolsViewShowing(); } +void WebContents::EnableDeviceEmulation( + const blink::WebDeviceEmulationParams& params) { + if (type_ == REMOTE) + return; + + Send(new ViewMsg_EnableDeviceEmulation(routing_id(), params)); +} + +void WebContents::DisableDeviceEmulation() { + if (type_ == REMOTE) + return; + + Send(new ViewMsg_DisableDeviceEmulation(routing_id())); +} + void WebContents::ToggleDevTools() { if (IsDevToolsOpened()) CloseDevTools(); @@ -796,6 +823,56 @@ bool WebContents::SendIPCMessage(const base::string16& channel, return Send(new AtomViewMsg_Message(routing_id(), channel, args)); } +void WebContents::SendInputEvent(v8::Isolate* isolate, + v8::Local input_event) { + const auto view = web_contents()->GetRenderWidgetHostView(); + if (!view) + return; + const auto host = view->GetRenderWidgetHost(); + if (!host) + return; + + int type = mate::GetWebInputEventType(isolate, input_event); + if (blink::WebInputEvent::isMouseEventType(type)) { + blink::WebMouseEvent mouse_event; + if (mate::ConvertFromV8(isolate, input_event, &mouse_event)) { + host->ForwardMouseEvent(mouse_event); + return; + } + } else if (blink::WebInputEvent::isKeyboardEventType(type)) { + content::NativeWebKeyboardEvent keyboard_event;; + if (mate::ConvertFromV8(isolate, input_event, &keyboard_event)) { + host->ForwardKeyboardEvent(keyboard_event); + return; + } + } else if (type == blink::WebInputEvent::MouseWheel) { + blink::WebMouseWheelEvent mouse_wheel_event; + if (mate::ConvertFromV8(isolate, input_event, &mouse_wheel_event)) { + host->ForwardWheelEvent(mouse_wheel_event); + return; + } + } + + isolate->ThrowException(v8::Exception::Error(mate::StringToV8( + isolate, "Invalid event object"))); +} + +void WebContents::BeginFrameSubscription( + const FrameSubscriber::FrameCaptureCallback& callback) { + const auto view = web_contents()->GetRenderWidgetHostView(); + if (view) { + scoped_ptr frame_subscriber(new FrameSubscriber( + isolate(), view->GetVisibleViewportSize(), callback)); + view->BeginFrameSubscription(frame_subscriber.Pass()); + } +} + +void WebContents::EndFrameSubscription() { + const auto view = web_contents()->GetRenderWidgetHostView(); + if (view) + view->EndFrameSubscription(); +} + void WebContents::SetSize(const SetSizeParams& params) { if (guest_delegate_) guest_delegate_->SetSize(params); @@ -810,6 +887,12 @@ bool WebContents::IsGuest() const { return type_ == WEB_VIEW; } +v8::Local WebContents::GetWebPreferences(v8::Isolate* isolate) { + WebContentsPreferences* web_preferences = + WebContentsPreferences::FromWebContents(web_contents()); + return mate::ConvertToV8(isolate, *web_preferences->web_preferences()); +} + mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder( v8::Isolate* isolate) { if (template_.IsEmpty()) @@ -836,6 +919,10 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder( .SetMethod("openDevTools", &WebContents::OpenDevTools) .SetMethod("closeDevTools", &WebContents::CloseDevTools) .SetMethod("isDevToolsOpened", &WebContents::IsDevToolsOpened) + .SetMethod("enableDeviceEmulation", + &WebContents::EnableDeviceEmulation) + .SetMethod("disableDeviceEmulation", + &WebContents::DisableDeviceEmulation) .SetMethod("toggleDevTools", &WebContents::ToggleDevTools) .SetMethod("inspectElement", &WebContents::InspectElement) .SetMethod("setAudioMuted", &WebContents::SetAudioMuted) @@ -854,9 +941,14 @@ mate::ObjectTemplateBuilder WebContents::GetObjectTemplateBuilder( .SetMethod("focus", &WebContents::Focus) .SetMethod("tabTraverse", &WebContents::TabTraverse) .SetMethod("_send", &WebContents::SendIPCMessage, true) + .SetMethod("sendInputEvent", &WebContents::SendInputEvent) + .SetMethod("beginFrameSubscription", + &WebContents::BeginFrameSubscription) + .SetMethod("endFrameSubscription", &WebContents::EndFrameSubscription) .SetMethod("setSize", &WebContents::SetSize) .SetMethod("setAllowTransparency", &WebContents::SetAllowTransparency) .SetMethod("isGuest", &WebContents::IsGuest) + .SetMethod("getWebPreferences", &WebContents::GetWebPreferences) .SetMethod("hasServiceWorker", &WebContents::HasServiceWorker) .SetMethod("unregisterServiceWorker", &WebContents::UnregisterServiceWorker) @@ -910,7 +1002,7 @@ mate::Handle WebContents::CreateFrom( // static mate::Handle WebContents::Create( v8::Isolate* isolate, const mate::Dictionary& options) { - auto handle = mate::CreateHandle(isolate, new WebContents(isolate, options)); + auto handle = mate::CreateHandle(isolate, new WebContents(isolate, options)); g_wrap_web_contents.Run(handle.ToV8()); return handle; } diff --git a/atom/browser/api/atom_api_web_contents.h b/atom/browser/api/atom_api_web_contents.h index 0001d3e8ef..91750ac613 100644 --- a/atom/browser/api/atom_api_web_contents.h +++ b/atom/browser/api/atom_api_web_contents.h @@ -8,6 +8,7 @@ #include #include +#include "atom/browser/api/frame_subscriber.h" #include "atom/browser/api/trackable_object.h" #include "atom/browser/common_web_contents_delegate.h" #include "content/public/browser/web_contents_observer.h" @@ -15,6 +16,10 @@ #include "native_mate/handle.h" #include "ui/gfx/image/image.h" +namespace blink { +struct WebDeviceEmulationParams; +} + namespace brightray { class InspectableWebContents; } @@ -74,6 +79,8 @@ class WebContents : public mate::TrackableObject, void CloseDevTools(); bool IsDevToolsOpened(); void ToggleDevTools(); + void EnableDeviceEmulation(const blink::WebDeviceEmulationParams& params); + void DisableDeviceEmulation(); void InspectElement(int x, int y); void InspectServiceWorker(); v8::Local Session(v8::Isolate* isolate); @@ -108,15 +115,26 @@ class WebContents : public mate::TrackableObject, void Focus(); void TabTraverse(bool reverse); - // Sending messages to browser. + // Send messages to browser. bool SendIPCMessage(const base::string16& channel, const base::ListValue& args); + // Send WebInputEvent to the page. + void SendInputEvent(v8::Isolate* isolate, v8::Local input_event); + + // Subscribe to the frame updates. + void BeginFrameSubscription( + const FrameSubscriber::FrameCaptureCallback& callback); + void EndFrameSubscription(); + // Methods for creating . void SetSize(const SetSizeParams& params); void SetAllowTransparency(bool allow); bool IsGuest() const; + // Returns the web preferences of current WebContents. + v8::Local GetWebPreferences(v8::Isolate* isolate); + protected: explicit WebContents(content::WebContents* web_contents); WebContents(v8::Isolate* isolate, const mate::Dictionary& options); diff --git a/atom/browser/api/atom_api_window.cc b/atom/browser/api/atom_api_window.cc index 1a76c3e5f0..4d866d1850 100644 --- a/atom/browser/api/atom_api_window.cc +++ b/atom/browser/api/atom_api_window.cc @@ -13,6 +13,7 @@ #include "atom/common/native_mate_converters/gurl_converter.h" #include "atom/common/native_mate_converters/image_converter.h" #include "atom/common/native_mate_converters/string16_converter.h" +#include "atom/common/node_includes.h" #include "atom/common/options_switches.h" #include "content/public/browser/render_process_host.h" #include "native_mate/constructor.h" @@ -24,8 +25,6 @@ #include "atom/browser/ui/win/taskbar_host.h" #endif -#include "atom/common/node_includes.h" - #if defined(OS_WIN) namespace mate { @@ -83,6 +82,10 @@ Window::Window(v8::Isolate* isolate, const mate::Dictionary& options) { web_contents_.Reset(isolate, web_contents.ToV8()); api_web_contents_ = web_contents.get(); + // Keep a copy of the options for later use. + mate::Dictionary(isolate, web_contents->GetWrapper(isolate)).Set( + "browserWindowOptions", options); + // Creates BrowserWindow. window_.reset(NativeWindow::Create(web_contents->managed_web_contents(), options)); @@ -116,6 +119,9 @@ void Window::OnWindowClosed() { window_->RemoveObserver(this); Emit("closed"); + + // Clean up the resources after window has been closed. + base::MessageLoop::current()->DeleteSoon(FROM_HERE, window_.release()); } void Window::OnWindowBlur() { @@ -220,10 +226,8 @@ bool Window::IsDestroyed() const { } void Window::Destroy() { - if (window_) { + if (window_) window_->CloseContents(nullptr); - window_.reset(); - } } void Window::Close() { diff --git a/atom/browser/api/frame_subscriber.cc b/atom/browser/api/frame_subscriber.cc new file mode 100644 index 0000000000..526769f9cd --- /dev/null +++ b/atom/browser/api/frame_subscriber.cc @@ -0,0 +1,66 @@ +// Copyright (c) 2015 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "atom/browser/api/frame_subscriber.h" + +#include "atom/common/node_includes.h" +#include "base/bind.h" +#include "media/base/video_frame.h" +#include "media/base/yuv_convert.h" + +namespace atom { + +namespace api { + +FrameSubscriber::FrameSubscriber(v8::Isolate* isolate, + const gfx::Size& size, + const FrameCaptureCallback& callback) + : isolate_(isolate), size_(size), callback_(callback) { +} + +bool FrameSubscriber::ShouldCaptureFrame( + const gfx::Rect& damage_rect, + base::TimeTicks present_time, + scoped_refptr* storage, + DeliverFrameCallback* callback) { + *storage = media::VideoFrame::CreateFrame(media::VideoFrame::YV12, size_, + gfx::Rect(size_), size_, + base::TimeDelta()); + *callback = base::Bind(&FrameSubscriber::OnFrameDelivered, + base::Unretained(this), + *storage); + return true; +} + +void FrameSubscriber::OnFrameDelivered( + scoped_refptr frame, base::TimeTicks, bool result) { + if (!result) + return; + + gfx::Rect rect = frame->visible_rect(); + size_t rgb_arr_size = rect.width() * rect.height() * 4; + v8::MaybeLocal buffer = node::Buffer::New(isolate_, rgb_arr_size); + if (buffer.IsEmpty()) + return; + + // Convert a frame of YUV to 32 bit ARGB. + media::ConvertYUVToRGB32(frame->data(media::VideoFrame::kYPlane), + frame->data(media::VideoFrame::kUPlane), + frame->data(media::VideoFrame::kVPlane), + reinterpret_cast( + node::Buffer::Data(buffer.ToLocalChecked())), + rect.width(), rect.height(), + frame->stride(media::VideoFrame::kYPlane), + frame->stride(media::VideoFrame::kUVPlane), + rect.width() * 4, + media::YV12); + + v8::Locker locker(isolate_); + v8::HandleScope handle_scope(isolate_); + callback_.Run(buffer.ToLocalChecked()); +} + +} // namespace api + +} // namespace atom diff --git a/atom/browser/api/frame_subscriber.h b/atom/browser/api/frame_subscriber.h new file mode 100644 index 0000000000..f7748aa579 --- /dev/null +++ b/atom/browser/api/frame_subscriber.h @@ -0,0 +1,45 @@ +// Copyright (c) 2015 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#ifndef ATOM_BROWSER_API_FRAME_SUBSCRIBER_H_ +#define ATOM_BROWSER_API_FRAME_SUBSCRIBER_H_ + +#include "base/callback.h" +#include "content/public/browser/render_widget_host_view_frame_subscriber.h" +#include "ui/gfx/geometry/size.h" +#include "v8/include/v8.h" + +namespace atom { + +namespace api { + +class FrameSubscriber : public content::RenderWidgetHostViewFrameSubscriber { + public: + using FrameCaptureCallback = base::Callback)>; + + FrameSubscriber(v8::Isolate* isolate, + const gfx::Size& size, + const FrameCaptureCallback& callback); + + bool ShouldCaptureFrame(const gfx::Rect& damage_rect, + base::TimeTicks present_time, + scoped_refptr* storage, + DeliverFrameCallback* callback) override; + + private: + void OnFrameDelivered( + scoped_refptr frame, base::TimeTicks, bool); + + v8::Isolate* isolate_; + gfx::Size size_; + FrameCaptureCallback callback_; + + DISALLOW_COPY_AND_ASSIGN(FrameSubscriber); +}; + +} // namespace api + +} // namespace atom + +#endif // ATOM_BROWSER_API_FRAME_SUBSCRIBER_H_ diff --git a/atom/browser/lib/guest-view-manager.coffee b/atom/browser/lib/guest-view-manager.coffee index 1c05b65b2d..455e969812 100644 --- a/atom/browser/lib/guest-view-manager.coffee +++ b/atom/browser/lib/guest-view-manager.coffee @@ -84,6 +84,8 @@ createGuest = (embedder, params) -> if params.allowtransparency? @setAllowTransparency params.allowtransparency + guest.allowPopups = params.allowpopups + # Dispatch events to embedder. for event in supportedWebViewEvents do (event) -> diff --git a/atom/browser/lib/guest-window-manager.coffee b/atom/browser/lib/guest-window-manager.coffee index 861b0d10aa..9a5c0ca349 100644 --- a/atom/browser/lib/guest-window-manager.coffee +++ b/atom/browser/lib/guest-window-manager.coffee @@ -4,6 +4,17 @@ BrowserWindow = require 'browser-window' frameToGuest = {} +# Merge |options| with the |embedder|'s window's options. +mergeBrowserWindowOptions = (embedder, options) -> + if embedder.browserWindowOptions? + # Inherit the original options if it is a BrowserWindow. + options.__proto__ = embedder.browserWindowOptions + else + # Or only inherit web-preferences if it is a webview. + options['web-preferences'] ?= {} + options['web-preferences'].__proto__ = embedder.getWebPreferences() + options + # Create a new guest created by |embedder| with |options|. createGuest = (embedder, url, frameName, options) -> guest = frameToGuest[frameName] @@ -40,11 +51,12 @@ createGuest = (embedder, url, frameName, options) -> # Routed window.open messages. ipc.on 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_OPEN', (event, args...) -> [url, frameName, options] = args - event.sender.emit 'new-window', event, url, frameName, 'new-window' - if event.sender.isGuest() or event.defaultPrevented + options = mergeBrowserWindowOptions event.sender, options + event.sender.emit 'new-window', event, url, frameName, 'new-window', options + if (event.sender.isGuest() and not event.sender.allowPopups) or event.defaultPrevented event.returnValue = null else - event.returnValue = createGuest event.sender, args... + event.returnValue = createGuest event.sender, url, frameName, options ipc.on 'ATOM_SHELL_GUEST_WINDOW_MANAGER_WINDOW_CLOSE', (event, guestId) -> BrowserWindow.fromId(guestId)?.destroy() diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index f40f7de8db..4d5f273340 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -39,10 +39,6 @@ #include "ui/gfx/screen.h" #include "ui/gl/gpu_switching_manager.h" -using content::NavigationEntry; -using content::RenderWidgetHostView; -using content::RenderWidgetHost; - DEFINE_WEB_CONTENTS_USER_DATA_KEY(atom::NativeWindowRelay); namespace atom { @@ -200,38 +196,6 @@ bool NativeWindow::IsDocumentEdited() { void NativeWindow::SetMenu(ui::MenuModel* menu) { } -void NativeWindow::ShowDefinitionForSelection() { - NOTIMPLEMENTED(); -} - -void NativeWindow::SetAutoHideMenuBar(bool auto_hide) { -} - -bool NativeWindow::IsMenuBarAutoHide() { - return false; -} - -void NativeWindow::SetMenuBarVisibility(bool visible) { -} - -bool NativeWindow::IsMenuBarVisible() { - return true; -} - -double NativeWindow::GetAspectRatio() { - return aspect_ratio_; -} - -gfx::Size NativeWindow::GetAspectRatioExtraSize() { - return aspect_ratio_extraSize_; -} - -void NativeWindow::SetAspectRatio(double aspect_ratio, - const gfx::Size& extra_size) { - aspect_ratio_ = aspect_ratio; - aspect_ratio_extraSize_ = extra_size; -} - bool NativeWindow::HasModalDialog() { return has_dialog_attached_; } @@ -286,6 +250,38 @@ void NativeWindow::CapturePage(const gfx::Rect& rect, kBGRA_8888_SkColorType); } +void NativeWindow::ShowDefinitionForSelection() { + NOTIMPLEMENTED(); +} + +void NativeWindow::SetAutoHideMenuBar(bool auto_hide) { +} + +bool NativeWindow::IsMenuBarAutoHide() { + return false; +} + +void NativeWindow::SetMenuBarVisibility(bool visible) { +} + +bool NativeWindow::IsMenuBarVisible() { + return true; +} + +double NativeWindow::GetAspectRatio() { + return aspect_ratio_; +} + +gfx::Size NativeWindow::GetAspectRatioExtraSize() { + return aspect_ratio_extraSize_; +} + +void NativeWindow::SetAspectRatio(double aspect_ratio, + const gfx::Size& extra_size) { + aspect_ratio_ = aspect_ratio; + aspect_ratio_extraSize_ = extra_size; +} + void NativeWindow::RequestToClosePage() { bool prevent_default = false; FOR_EACH_OBSERVER(NativeWindowObserver, diff --git a/atom/browser/native_window.h b/atom/browser/native_window.h index f09845aad3..e9a2b9433d 100644 --- a/atom/browser/native_window.h +++ b/atom/browser/native_window.h @@ -296,7 +296,6 @@ class NativeWindow : public content::WebContentsObserver, DISALLOW_COPY_AND_ASSIGN(NativeWindow); }; - // This class provides a hook to get a NativeWindow from a WebContents. class NativeWindowRelay : public content::WebContentsUserData { diff --git a/atom/browser/resources/mac/Info.plist b/atom/browser/resources/mac/Info.plist index dd4e610d91..6260173b82 100644 --- a/atom/browser/resources/mac/Info.plist +++ b/atom/browser/resources/mac/Info.plist @@ -17,7 +17,7 @@ CFBundleIconFile atom.icns CFBundleVersion - 0.32.3 + 0.33.1 LSMinimumSystemVersion 10.8.0 NSMainNibFile diff --git a/atom/browser/resources/win/atom.rc b/atom/browser/resources/win/atom.rc index cf894f6b5c..0583c2df3b 100644 --- a/atom/browser/resources/win/atom.rc +++ b/atom/browser/resources/win/atom.rc @@ -56,8 +56,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 0,32,3,0 - PRODUCTVERSION 0,32,3,0 + FILEVERSION 0,33,1,0 + PRODUCTVERSION 0,33,1,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -74,12 +74,12 @@ BEGIN BEGIN VALUE "CompanyName", "GitHub, Inc." VALUE "FileDescription", "Electron" - VALUE "FileVersion", "0.32.3" + VALUE "FileVersion", "0.33.1" VALUE "InternalName", "electron.exe" VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved." VALUE "OriginalFilename", "electron.exe" VALUE "ProductName", "Electron" - VALUE "ProductVersion", "0.32.3" + VALUE "ProductVersion", "0.33.1" VALUE "SquirrelAwareVersion", "1" END END diff --git a/atom/browser/ui/accelerator_util.cc b/atom/browser/ui/accelerator_util.cc index 41dde7acf7..e25e14b796 100644 --- a/atom/browser/ui/accelerator_util.cc +++ b/atom/browser/ui/accelerator_util.cc @@ -9,6 +9,7 @@ #include #include +#include "atom/common/keyboad_util.h" #include "base/stl_util.h" #include "base/strings/string_number_conversions.h" #include "base/strings/string_split.h" @@ -17,74 +18,6 @@ namespace accelerator_util { -namespace { - -// Return key code of the char. -ui::KeyboardCode KeyboardCodeFromCharCode(char c, bool* shifted) { - *shifted = false; - switch (c) { - case 8: case 0x7F: return ui::VKEY_BACK; - case 9: return ui::VKEY_TAB; - case 0xD: case 3: return ui::VKEY_RETURN; - case 0x1B: return ui::VKEY_ESCAPE; - case ' ': return ui::VKEY_SPACE; - - case 'a': return ui::VKEY_A; - case 'b': return ui::VKEY_B; - case 'c': return ui::VKEY_C; - case 'd': return ui::VKEY_D; - case 'e': return ui::VKEY_E; - case 'f': return ui::VKEY_F; - case 'g': return ui::VKEY_G; - case 'h': return ui::VKEY_H; - case 'i': return ui::VKEY_I; - case 'j': return ui::VKEY_J; - case 'k': return ui::VKEY_K; - case 'l': return ui::VKEY_L; - case 'm': return ui::VKEY_M; - case 'n': return ui::VKEY_N; - case 'o': return ui::VKEY_O; - case 'p': return ui::VKEY_P; - case 'q': return ui::VKEY_Q; - case 'r': return ui::VKEY_R; - case 's': return ui::VKEY_S; - case 't': return ui::VKEY_T; - case 'u': return ui::VKEY_U; - case 'v': return ui::VKEY_V; - case 'w': return ui::VKEY_W; - case 'x': return ui::VKEY_X; - case 'y': return ui::VKEY_Y; - case 'z': return ui::VKEY_Z; - - case ')': *shifted = true; case '0': return ui::VKEY_0; - case '!': *shifted = true; case '1': return ui::VKEY_1; - case '@': *shifted = true; case '2': return ui::VKEY_2; - case '#': *shifted = true; case '3': return ui::VKEY_3; - case '$': *shifted = true; case '4': return ui::VKEY_4; - case '%': *shifted = true; case '5': return ui::VKEY_5; - case '^': *shifted = true; case '6': return ui::VKEY_6; - case '&': *shifted = true; case '7': return ui::VKEY_7; - case '*': *shifted = true; case '8': return ui::VKEY_8; - case '(': *shifted = true; case '9': return ui::VKEY_9; - - case ':': *shifted = true; case ';': return ui::VKEY_OEM_1; - case '+': *shifted = true; case '=': return ui::VKEY_OEM_PLUS; - case '<': *shifted = true; case ',': return ui::VKEY_OEM_COMMA; - case '_': *shifted = true; case '-': return ui::VKEY_OEM_MINUS; - case '>': *shifted = true; case '.': return ui::VKEY_OEM_PERIOD; - case '?': *shifted = true; case '/': return ui::VKEY_OEM_2; - case '~': *shifted = true; case '`': return ui::VKEY_OEM_3; - case '{': *shifted = true; case '[': return ui::VKEY_OEM_4; - case '|': *shifted = true; case '\\': return ui::VKEY_OEM_5; - case '}': *shifted = true; case ']': return ui::VKEY_OEM_6; - case '"': *shifted = true; case '\'': return ui::VKEY_OEM_7; - - default: return ui::VKEY_UNKNOWN; - } -} - -} // namespace - bool StringToAccelerator(const std::string& description, ui::Accelerator* accelerator) { if (!base::IsStringASCII(description)) { @@ -104,7 +37,7 @@ bool StringToAccelerator(const std::string& description, // to be correct and usually only uses few special tokens. if (tokens[i].size() == 1) { bool shifted = false; - key = KeyboardCodeFromCharCode(tokens[i][0], &shifted); + key = atom::KeyboardCodeFromCharCode(tokens[i][0], &shifted); if (shifted) modifiers |= ui::EF_SHIFT_DOWN; } else if (tokens[i] == "ctrl" || tokens[i] == "control") { diff --git a/atom/browser/web_contents_preferences.cc b/atom/browser/web_contents_preferences.cc index db55eddf7e..2856598c0b 100644 --- a/atom/browser/web_contents_preferences.cc +++ b/atom/browser/web_contents_preferences.cc @@ -40,6 +40,9 @@ WebContentsPreferences::WebContentsPreferences( base::DictionaryValue* web_preferences) { web_preferences_.Swap(web_preferences); web_contents->SetUserData(UserDataKey(), this); + + // The "isGuest" is not a preferences field. + web_preferences_.Remove("isGuest", nullptr); } WebContentsPreferences::~WebContentsPreferences() { @@ -94,7 +97,7 @@ void WebContentsPreferences::AppendExtraCommandLineSwitches( if (base::FilePath(preload).IsAbsolute()) command_line->AppendSwitchNative(switches::kPreloadScript, preload); else - LOG(ERROR) << "preload script must have abosulute path."; + LOG(ERROR) << "preload script must have absolute path."; } else if (web_preferences.GetString(switches::kPreloadUrl, &preload)) { // Translate to file path if there is "preload-url" option. base::FilePath preload_path; diff --git a/atom/browser/web_contents_preferences.h b/atom/browser/web_contents_preferences.h index 83b485f449..3e36df0214 100644 --- a/atom/browser/web_contents_preferences.h +++ b/atom/browser/web_contents_preferences.h @@ -37,6 +37,9 @@ class WebContentsPreferences // $.extend(|web_preferences_|, |new_web_preferences|). void Merge(const base::DictionaryValue& new_web_preferences); + // Returns the web preferences. + base::DictionaryValue* web_preferences() { return &web_preferences_; } + private: friend class content::WebContentsUserData; diff --git a/atom/common/atom_version.h b/atom/common/atom_version.h index 8d71e91505..5f9d0f3ca0 100644 --- a/atom/common/atom_version.h +++ b/atom/common/atom_version.h @@ -6,8 +6,8 @@ #define ATOM_VERSION_H #define ATOM_MAJOR_VERSION 0 -#define ATOM_MINOR_VERSION 32 -#define ATOM_PATCH_VERSION 3 +#define ATOM_MINOR_VERSION 33 +#define ATOM_PATCH_VERSION 1 #define ATOM_VERSION_IS_RELEASE 1 diff --git a/atom/common/keyboad_util.cc b/atom/common/keyboad_util.cc new file mode 100644 index 0000000000..1baa829ff7 --- /dev/null +++ b/atom/common/keyboad_util.cc @@ -0,0 +1,73 @@ +// Copyright (c) 2015 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "atom/common/keyboad_util.h" + +namespace atom { + +// Return key code of the char. +ui::KeyboardCode KeyboardCodeFromCharCode(char c, bool* shifted) { + *shifted = false; + switch (c) { + case 8: case 0x7F: return ui::VKEY_BACK; + case 9: return ui::VKEY_TAB; + case 0xD: case 3: return ui::VKEY_RETURN; + case 0x1B: return ui::VKEY_ESCAPE; + case ' ': return ui::VKEY_SPACE; + + case 'a': return ui::VKEY_A; + case 'b': return ui::VKEY_B; + case 'c': return ui::VKEY_C; + case 'd': return ui::VKEY_D; + case 'e': return ui::VKEY_E; + case 'f': return ui::VKEY_F; + case 'g': return ui::VKEY_G; + case 'h': return ui::VKEY_H; + case 'i': return ui::VKEY_I; + case 'j': return ui::VKEY_J; + case 'k': return ui::VKEY_K; + case 'l': return ui::VKEY_L; + case 'm': return ui::VKEY_M; + case 'n': return ui::VKEY_N; + case 'o': return ui::VKEY_O; + case 'p': return ui::VKEY_P; + case 'q': return ui::VKEY_Q; + case 'r': return ui::VKEY_R; + case 's': return ui::VKEY_S; + case 't': return ui::VKEY_T; + case 'u': return ui::VKEY_U; + case 'v': return ui::VKEY_V; + case 'w': return ui::VKEY_W; + case 'x': return ui::VKEY_X; + case 'y': return ui::VKEY_Y; + case 'z': return ui::VKEY_Z; + + case ')': *shifted = true; case '0': return ui::VKEY_0; + case '!': *shifted = true; case '1': return ui::VKEY_1; + case '@': *shifted = true; case '2': return ui::VKEY_2; + case '#': *shifted = true; case '3': return ui::VKEY_3; + case '$': *shifted = true; case '4': return ui::VKEY_4; + case '%': *shifted = true; case '5': return ui::VKEY_5; + case '^': *shifted = true; case '6': return ui::VKEY_6; + case '&': *shifted = true; case '7': return ui::VKEY_7; + case '*': *shifted = true; case '8': return ui::VKEY_8; + case '(': *shifted = true; case '9': return ui::VKEY_9; + + case ':': *shifted = true; case ';': return ui::VKEY_OEM_1; + case '+': *shifted = true; case '=': return ui::VKEY_OEM_PLUS; + case '<': *shifted = true; case ',': return ui::VKEY_OEM_COMMA; + case '_': *shifted = true; case '-': return ui::VKEY_OEM_MINUS; + case '>': *shifted = true; case '.': return ui::VKEY_OEM_PERIOD; + case '?': *shifted = true; case '/': return ui::VKEY_OEM_2; + case '~': *shifted = true; case '`': return ui::VKEY_OEM_3; + case '{': *shifted = true; case '[': return ui::VKEY_OEM_4; + case '|': *shifted = true; case '\\': return ui::VKEY_OEM_5; + case '}': *shifted = true; case ']': return ui::VKEY_OEM_6; + case '"': *shifted = true; case '\'': return ui::VKEY_OEM_7; + + default: return ui::VKEY_UNKNOWN; + } +} + +} // namespace atom diff --git a/atom/common/keyboad_util.h b/atom/common/keyboad_util.h new file mode 100644 index 0000000000..0496886e40 --- /dev/null +++ b/atom/common/keyboad_util.h @@ -0,0 +1,18 @@ +// Copyright (c) 2015 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#ifndef ATOM_COMMON_KEYBOAD_UTIL_H_ +#define ATOM_COMMON_KEYBOAD_UTIL_H_ + +#include "ui/events/keycodes/keyboard_codes.h" + +namespace atom { + +// Return key code of the char, and also determine whether the SHIFT key is +// pressed. +ui::KeyboardCode KeyboardCodeFromCharCode(char c, bool* shifted); + +} // namespace atom + +#endif // ATOM_COMMON_KEYBOAD_UTIL_H_ diff --git a/atom/common/lib/asar.coffee b/atom/common/lib/asar.coffee index 900a686d44..22d0e70b34 100644 --- a/atom/common/lib/asar.coffee +++ b/atom/common/lib/asar.coffee @@ -329,7 +329,7 @@ exports.wrapFsWithAsar = (fs) -> buffer = new Buffer(info.size) fd = archive.getFd() - retrun undefined unless fd >= 0 + return undefined unless fd >= 0 fs.readSync fd, buffer, 0, info.size, info.offset buffer.toString 'utf8' diff --git a/atom/common/lib/init.coffee b/atom/common/lib/init.coffee index 4bc3e36986..acb635edea 100644 --- a/atom/common/lib/init.coffee +++ b/atom/common/lib/init.coffee @@ -1,8 +1,7 @@ -process = global.process -fs = require 'fs' -path = require 'path' -timers = require 'timers' -Module = require 'module' +fs = require 'fs' +path = require 'path' +timers = require 'timers' +Module = require 'module' process.atomBinding = (name) -> try @@ -37,6 +36,8 @@ wrapWithActivateUvLoop = (func) -> process.activateUvLoop() func.apply this, arguments process.nextTick = wrapWithActivateUvLoop process.nextTick +global.setImmediate = wrapWithActivateUvLoop timers.setImmediate +global.clearImmediate = timers.clearImmediate if process.type is 'browser' # setTimeout needs to update the polling timeout of the event loop, when @@ -45,10 +46,3 @@ if process.type is 'browser' # recalculate the timeout in browser process. global.setTimeout = wrapWithActivateUvLoop timers.setTimeout global.setInterval = wrapWithActivateUvLoop timers.setInterval - global.setImmediate = wrapWithActivateUvLoop timers.setImmediate - global.clearImmediate = wrapWithActivateUvLoop timers.clearImmediate -else - # There are no setImmediate under renderer process by default, so we need to - # manually setup them here. - global.setImmediate = setImmediate - global.clearImmediate = clearImmediate diff --git a/atom/common/native_mate_converters/blink_converter.cc b/atom/common/native_mate_converters/blink_converter.cc new file mode 100644 index 0000000000..67c7e7e95f --- /dev/null +++ b/atom/common/native_mate_converters/blink_converter.cc @@ -0,0 +1,258 @@ +// Copyright (c) 2015 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#include "atom/common/native_mate_converters/blink_converter.h" + +#include +#include + +#include "atom/common/keyboad_util.h" +#include "base/strings/string_util.h" +#include "content/public/browser/native_web_keyboard_event.h" +#include "native_mate/dictionary.h" +#include "third_party/WebKit/public/web/WebDeviceEmulationParams.h" +#include "third_party/WebKit/public/web/WebInputEvent.h" + +namespace { + +template +int VectorToBitArray(const std::vector& vec) { + int bits = 0; + for (const T& item : vec) + bits |= item; + return bits; +} + +} // namespace + +namespace mate { + +template<> +struct Converter { + static bool FromV8(v8::Isolate* isolate, v8::Handle val, + char* out) { + std::string code = base::StringToLowerASCII(V8ToString(val)); + if (code.length() != 1) + return false; + *out = code[0]; + return true; + } +}; + +template<> +struct Converter { + static bool FromV8(v8::Isolate* isolate, v8::Handle val, + blink::WebInputEvent::Type* out) { + std::string type = base::StringToLowerASCII(V8ToString(val)); + if (type == "mousedown") + *out = blink::WebInputEvent::MouseDown; + else if (type == "mouseup") + *out = blink::WebInputEvent::MouseUp; + else if (type == "mousemove") + *out = blink::WebInputEvent::MouseMove; + else if (type == "mouseenter") + *out = blink::WebInputEvent::MouseEnter; + else if (type == "mouseleave") + *out = blink::WebInputEvent::MouseLeave; + else if (type == "contextmenu") + *out = blink::WebInputEvent::ContextMenu; + else if (type == "mousewheel") + *out = blink::WebInputEvent::MouseWheel; + else if (type == "keydown") + *out = blink::WebInputEvent::KeyDown; + else if (type == "keyup") + *out = blink::WebInputEvent::KeyUp; + else if (type == "char") + *out = blink::WebInputEvent::Char; + else if (type == "touchstart") + *out = blink::WebInputEvent::TouchStart; + else if (type == "touchmove") + *out = blink::WebInputEvent::TouchMove; + else if (type == "touchend") + *out = blink::WebInputEvent::TouchEnd; + else if (type == "touchcancel") + *out = blink::WebInputEvent::TouchCancel; + return true; + } +}; + +template<> +struct Converter { + static bool FromV8(v8::Isolate* isolate, v8::Handle val, + blink::WebInputEvent::Modifiers* out) { + std::string modifier = base::StringToLowerASCII(V8ToString(val)); + if (modifier == "shift") + *out = blink::WebInputEvent::ShiftKey; + else if (modifier == "control" || modifier == "ctrl") + *out = blink::WebInputEvent::ControlKey; + else if (modifier == "alt") + *out = blink::WebInputEvent::AltKey; + else if (modifier == "meta" || modifier == "command" || modifier == "cmd") + *out = blink::WebInputEvent::MetaKey; + else if (modifier == "iskeypad") + *out = blink::WebInputEvent::IsKeyPad; + else if (modifier == "isautorepeat") + *out = blink::WebInputEvent::IsAutoRepeat; + else if (modifier == "leftbuttondown") + *out = blink::WebInputEvent::LeftButtonDown; + else if (modifier == "middlebuttondown") + *out = blink::WebInputEvent::MiddleButtonDown; + else if (modifier == "rightbuttondown") + *out = blink::WebInputEvent::RightButtonDown; + else if (modifier == "capslock") + *out = blink::WebInputEvent::CapsLockOn; + else if (modifier == "numlock") + *out = blink::WebInputEvent::NumLockOn; + else if (modifier == "left") + *out = blink::WebInputEvent::IsLeft; + else if (modifier == "right") + *out = blink::WebInputEvent::IsRight; + return true; + } +}; + +int GetWebInputEventType(v8::Isolate* isolate, v8::Local val) { + blink::WebInputEvent::Type type = blink::WebInputEvent::Undefined; + mate::Dictionary dict; + ConvertFromV8(isolate, val, &dict) && dict.Get("type", &type); + return type; +} + +bool Converter::FromV8( + v8::Isolate* isolate, v8::Local val, + blink::WebInputEvent* out) { + mate::Dictionary dict; + if (!ConvertFromV8(isolate, val, &dict)) + return false; + if (!dict.Get("type", &out->type)) + return false; + std::vector modifiers; + if (dict.Get("modifiers", &modifiers)) + out->modifiers = VectorToBitArray(modifiers); + out->timeStampSeconds = base::Time::Now().ToDoubleT(); + return true; +} + +bool Converter::FromV8( + v8::Isolate* isolate, v8::Local val, + blink::WebKeyboardEvent* out) { + mate::Dictionary dict; + if (!ConvertFromV8(isolate, val, &dict)) + return false; + if (!ConvertFromV8(isolate, val, static_cast(out))) + return false; + char code; + if (!dict.Get("keyCode", &code)) + return false; + bool shifted = false; + out->windowsKeyCode = atom::KeyboardCodeFromCharCode(code, &shifted); + if (out->windowsKeyCode == ui::VKEY_UNKNOWN) + return false; + if (shifted) + out->modifiers |= blink::WebInputEvent::ShiftKey; + out->setKeyIdentifierFromWindowsKeyCode(); + return true; +} + +bool Converter::FromV8( + v8::Isolate* isolate, v8::Local val, + content::NativeWebKeyboardEvent* out) { + mate::Dictionary dict; + if (!ConvertFromV8(isolate, val, &dict)) + return false; + if (!ConvertFromV8(isolate, val, static_cast(out))) + return false; + dict.Get("skipInBrowser", &out->skip_in_browser); + return true; +} + +bool Converter::FromV8( + v8::Isolate* isolate, v8::Local val, blink::WebMouseEvent* out) { + mate::Dictionary dict; + if (!ConvertFromV8(isolate, val, &dict)) + return false; + if (!ConvertFromV8(isolate, val, static_cast(out))) + return false; + if (!dict.Get("x", &out->x) || !dict.Get("y", &out->y)) + return false; + dict.Get("globalX", &out->globalX); + dict.Get("globalY", &out->globalY); + dict.Get("movementX", &out->movementX); + dict.Get("movementY", &out->movementY); + dict.Get("clickCount", &out->clickCount); + return true; +} + +bool Converter::FromV8( + v8::Isolate* isolate, v8::Local val, + blink::WebMouseWheelEvent* out) { + mate::Dictionary dict; + if (!ConvertFromV8(isolate, val, &dict)) + return false; + if (!ConvertFromV8(isolate, val, static_cast(out))) + return false; + dict.Get("deltaX", &out->deltaX); + dict.Get("deltaY", &out->deltaY); + dict.Get("wheelTicksX", &out->wheelTicksX); + dict.Get("wheelTicksY", &out->wheelTicksY); + dict.Get("accelerationRatioX", &out->accelerationRatioX); + dict.Get("accelerationRatioY", &out->accelerationRatioY); + dict.Get("hasPreciseScrollingDeltas", &out->hasPreciseScrollingDeltas); + dict.Get("canScroll", &out->canScroll); + return true; +} + +bool Converter::FromV8( + v8::Isolate* isolate, v8::Local val, blink::WebFloatPoint* out) { + mate::Dictionary dict; + if (!ConvertFromV8(isolate, val, &dict)) + return false; + return dict.Get("x", &out->x) && dict.Get("y", &out->y); +} + +bool Converter::FromV8( + v8::Isolate* isolate, v8::Local val, blink::WebPoint* out) { + mate::Dictionary dict; + if (!ConvertFromV8(isolate, val, &dict)) + return false; + return dict.Get("x", &out->x) && dict.Get("y", &out->y); +} + +bool Converter::FromV8( + v8::Isolate* isolate, v8::Local val, blink::WebSize* out) { + mate::Dictionary dict; + if (!ConvertFromV8(isolate, val, &dict)) + return false; + return dict.Get("width", &out->width) && dict.Get("height", &out->height); +} + +bool Converter::FromV8( + v8::Isolate* isolate, v8::Local val, + blink::WebDeviceEmulationParams* out) { + mate::Dictionary dict; + if (!ConvertFromV8(isolate, val, &dict)) + return false; + + std::string screen_position; + if (dict.Get("screenPosition", &screen_position)) { + screen_position = base::StringToLowerASCII(screen_position); + if (screen_position == "mobile") + out->screenPosition = blink::WebDeviceEmulationParams::Mobile; + else if (screen_position == "desktop") + out->screenPosition = blink::WebDeviceEmulationParams::Desktop; + else + return false; + } + + dict.Get("screenSize", &out->screenSize); + dict.Get("viewPosition", &out->viewPosition); + dict.Get("deviceScaleFactor", &out->deviceScaleFactor); + dict.Get("viewSize", &out->viewSize); + dict.Get("fitToView", &out->fitToView); + dict.Get("offset", &out->offset); + dict.Get("scale", &out->scale); + return true; +} + +} // namespace mate diff --git a/atom/common/native_mate_converters/blink_converter.h b/atom/common/native_mate_converters/blink_converter.h new file mode 100644 index 0000000000..17bb108d34 --- /dev/null +++ b/atom/common/native_mate_converters/blink_converter.h @@ -0,0 +1,85 @@ +// Copyright (c) 2015 GitHub, Inc. +// Use of this source code is governed by the MIT license that can be +// found in the LICENSE file. + +#ifndef ATOM_COMMON_NATIVE_MATE_CONVERTERS_BLINK_CONVERTER_H_ +#define ATOM_COMMON_NATIVE_MATE_CONVERTERS_BLINK_CONVERTER_H_ + +#include "native_mate/converter.h" + +namespace blink { +class WebInputEvent; +class WebMouseEvent; +class WebMouseWheelEvent; +class WebKeyboardEvent; +struct WebDeviceEmulationParams; +struct WebFloatPoint; +struct WebPoint; +struct WebSize; +} + +namespace content { +struct NativeWebKeyboardEvent; +} + +namespace mate { + +int GetWebInputEventType(v8::Isolate* isolate, v8::Local val); + +template<> +struct Converter { + static bool FromV8(v8::Isolate* isolate, v8::Local val, + blink::WebInputEvent* out); +}; + +template<> +struct Converter { + static bool FromV8(v8::Isolate* isolate, v8::Local val, + blink::WebKeyboardEvent* out); +}; + +template<> +struct Converter { + static bool FromV8(v8::Isolate* isolate, v8::Local val, + content::NativeWebKeyboardEvent* out); +}; + +template<> +struct Converter { + static bool FromV8(v8::Isolate* isolate, v8::Local val, + blink::WebMouseEvent* out); +}; + +template<> +struct Converter { + static bool FromV8(v8::Isolate* isolate, v8::Local val, + blink::WebMouseWheelEvent* out); +}; + +template<> +struct Converter { + static bool FromV8(v8::Isolate* isolate, v8::Local val, + blink::WebFloatPoint* out); +}; + +template<> +struct Converter { + static bool FromV8(v8::Isolate* isolate, v8::Local val, + blink::WebPoint* out); +}; + +template<> +struct Converter { + static bool FromV8(v8::Isolate* isolate, v8::Local val, + blink::WebSize* out); +}; + +template<> +struct Converter { + static bool FromV8(v8::Isolate* isolate, v8::Local val, + blink::WebDeviceEmulationParams* out); +}; + +} // namespace mate + +#endif // ATOM_COMMON_NATIVE_MATE_CONVERTERS_BLINK_CONVERTER_H_ diff --git a/atom/renderer/api/atom_api_web_frame.cc b/atom/renderer/api/atom_api_web_frame.cc index 6e2054453a..4506658588 100644 --- a/atom/renderer/api/atom_api_web_frame.cc +++ b/atom/renderer/api/atom_api_web_frame.cc @@ -98,6 +98,16 @@ void WebFrame::RegisterURLSchemeAsBypassingCsp(const std::string& scheme) { blink::WebString::fromUTF8(scheme)); } +void WebFrame::RegisterURLSchemeAsPrivileged(const std::string& scheme) { + // Register scheme to privileged list (https, wss, data, chrome-extension) + blink::WebString privileged_scheme(blink::WebString::fromUTF8(scheme)); + blink::WebSecurityPolicy::registerURLSchemeAsSecure(privileged_scheme); + blink::WebSecurityPolicy::registerURLSchemeAsBypassingContentSecurityPolicy( + privileged_scheme); + blink::WebSecurityPolicy::registerURLSchemeAsAllowingServiceWorkers( + privileged_scheme); +} + mate::ObjectTemplateBuilder WebFrame::GetObjectTemplateBuilder( v8::Isolate* isolate) { return mate::ObjectTemplateBuilder(isolate) @@ -116,7 +126,9 @@ mate::ObjectTemplateBuilder WebFrame::GetObjectTemplateBuilder( .SetMethod("registerUrlSchemeAsSecure", &WebFrame::RegisterURLSchemeAsSecure) .SetMethod("registerUrlSchemeAsBypassingCsp", - &WebFrame::RegisterURLSchemeAsBypassingCsp); + &WebFrame::RegisterURLSchemeAsBypassingCsp) + .SetMethod("registerUrlSchemeAsPrivileged", + &WebFrame::RegisterURLSchemeAsPrivileged); } // static diff --git a/atom/renderer/api/atom_api_web_frame.h b/atom/renderer/api/atom_api_web_frame.h index f3895353b9..a3dec6cb76 100644 --- a/atom/renderer/api/atom_api_web_frame.h +++ b/atom/renderer/api/atom_api_web_frame.h @@ -58,6 +58,7 @@ class WebFrame : public mate::Wrappable { void RegisterURLSchemeAsSecure(const std::string& scheme); void RegisterURLSchemeAsBypassingCsp(const std::string& scheme); + void RegisterURLSchemeAsPrivileged(const std::string& scheme); // mate::Wrappable: virtual mate::ObjectTemplateBuilder GetObjectTemplateBuilder( diff --git a/atom/renderer/api/lib/remote.coffee b/atom/renderer/api/lib/remote.coffee index abd86e7eee..00d22ab8cf 100644 --- a/atom/renderer/api/lib/remote.coffee +++ b/atom/renderer/api/lib/remote.coffee @@ -1,4 +1,3 @@ -process = global.process ipc = require 'ipc' v8Util = process.atomBinding 'v8_util' CallbacksRegistry = require 'callbacks-registry' diff --git a/atom/renderer/lib/init.coffee b/atom/renderer/lib/init.coffee index 9825f75be9..274c50ec5f 100644 --- a/atom/renderer/lib/init.coffee +++ b/atom/renderer/lib/init.coffee @@ -1,8 +1,7 @@ -process = global.process -events = require 'events' -path = require 'path' -url = require 'url' -Module = require 'module' +events = require 'events' +path = require 'path' +url = require 'url' +Module = require 'module' # We modified the original process.argv to let node.js load the # atom-renderer.js, we need to restore it here. diff --git a/atom/renderer/lib/override.coffee b/atom/renderer/lib/override.coffee index b60374e047..5cffdd486d 100644 --- a/atom/renderer/lib/override.coffee +++ b/atom/renderer/lib/override.coffee @@ -1,4 +1,3 @@ -process = global.process ipc = require 'ipc' remote = require 'remote' @@ -71,7 +70,6 @@ window.open = (url, frameName='', features='') -> if guestId new BrowserWindowProxy(guestId) else - console.error 'It is not allowed to open new window from this WebContents' null # Use the dialog API to implement alert(). diff --git a/atom/renderer/lib/web-view/guest-view-internal.coffee b/atom/renderer/lib/web-view/guest-view-internal.coffee index b491184fb8..2852d11228 100644 --- a/atom/renderer/lib/web-view/guest-view-internal.coffee +++ b/atom/renderer/lib/web-view/guest-view-internal.coffee @@ -16,7 +16,7 @@ WEB_VIEW_EVENTS = 'did-get-redirect-request': ['oldUrl', 'newUrl', 'isMainFrame'] 'dom-ready': [] 'console-message': ['level', 'message', 'line', 'sourceId'] - 'new-window': ['url', 'frameName', 'disposition'] + 'new-window': ['url', 'frameName', 'disposition', 'options'] 'close': [] 'crashed': [] 'gpu-crashed': [] diff --git a/atom/renderer/lib/web-view/web-view-attributes.coffee b/atom/renderer/lib/web-view/web-view-attributes.coffee index acca826a9e..e980e6c96b 100644 --- a/atom/renderer/lib/web-view/web-view-attributes.coffee +++ b/atom/renderer/lib/web-view/web-view-attributes.coffee @@ -216,6 +216,7 @@ WebViewImpl::setupWebViewAttributes = -> @attributes[webViewConstants.ATTRIBUTE_NODEINTEGRATION] = new BooleanAttribute(webViewConstants.ATTRIBUTE_NODEINTEGRATION, this) @attributes[webViewConstants.ATTRIBUTE_PLUGINS] = new BooleanAttribute(webViewConstants.ATTRIBUTE_PLUGINS, this) @attributes[webViewConstants.ATTRIBUTE_DISABLEWEBSECURITY] = new BooleanAttribute(webViewConstants.ATTRIBUTE_DISABLEWEBSECURITY, this) + @attributes[webViewConstants.ATTRIBUTE_ALLOWPOPUPS] = new BooleanAttribute(webViewConstants.ATTRIBUTE_ALLOWPOPUPS, this) @attributes[webViewConstants.ATTRIBUTE_PRELOAD] = new PreloadAttribute(this) autosizeAttributes = [ diff --git a/atom/renderer/lib/web-view/web-view-constants.coffee b/atom/renderer/lib/web-view/web-view-constants.coffee index deb678e6a1..bfb9376fa7 100644 --- a/atom/renderer/lib/web-view/web-view-constants.coffee +++ b/atom/renderer/lib/web-view/web-view-constants.coffee @@ -13,6 +13,7 @@ module.exports = ATTRIBUTE_NODEINTEGRATION: 'nodeintegration' ATTRIBUTE_PLUGINS: 'plugins' ATTRIBUTE_DISABLEWEBSECURITY: 'disablewebsecurity' + ATTRIBUTE_ALLOWPOPUPS: 'allowpopups' ATTRIBUTE_PRELOAD: 'preload' ATTRIBUTE_USERAGENT: 'useragent' diff --git a/atom/renderer/lib/web-view/web-view.coffee b/atom/renderer/lib/web-view/web-view.coffee index f5bcf0496f..65e4501975 100644 --- a/atom/renderer/lib/web-view/web-view.coffee +++ b/atom/renderer/lib/web-view/web-view.coffee @@ -292,6 +292,7 @@ registerWebViewElement = -> "inspectServiceWorker" "print" "printToPDF" + "sendInputEvent" ] # Forward proto.foo* method calls to WebViewImpl.foo*. diff --git a/docs-translations/ko/README.md b/docs-translations/ko-KR/README.md similarity index 100% rename from docs-translations/ko/README.md rename to docs-translations/ko-KR/README.md diff --git a/docs-translations/ko/api/accelerator.md b/docs-translations/ko-KR/api/accelerator.md similarity index 100% rename from docs-translations/ko/api/accelerator.md rename to docs-translations/ko-KR/api/accelerator.md diff --git a/docs-translations/ko/api/auto-updater.md b/docs-translations/ko-KR/api/auto-updater.md similarity index 100% rename from docs-translations/ko/api/auto-updater.md rename to docs-translations/ko-KR/api/auto-updater.md diff --git a/docs-translations/ko/api/chrome-command-line-switches.md b/docs-translations/ko-KR/api/chrome-command-line-switches.md similarity index 100% rename from docs-translations/ko/api/chrome-command-line-switches.md rename to docs-translations/ko-KR/api/chrome-command-line-switches.md diff --git a/docs-translations/ko/api/clipboard.md b/docs-translations/ko-KR/api/clipboard.md similarity index 100% rename from docs-translations/ko/api/clipboard.md rename to docs-translations/ko-KR/api/clipboard.md diff --git a/docs-translations/ko/api/content-tracing.md b/docs-translations/ko-KR/api/content-tracing.md similarity index 100% rename from docs-translations/ko/api/content-tracing.md rename to docs-translations/ko-KR/api/content-tracing.md diff --git a/docs-translations/ko/api/crash-reporter.md b/docs-translations/ko-KR/api/crash-reporter.md similarity index 100% rename from docs-translations/ko/api/crash-reporter.md rename to docs-translations/ko-KR/api/crash-reporter.md diff --git a/docs-translations/ko/api/dialog.md b/docs-translations/ko-KR/api/dialog.md similarity index 100% rename from docs-translations/ko/api/dialog.md rename to docs-translations/ko-KR/api/dialog.md diff --git a/docs-translations/ko/api/file-object.md b/docs-translations/ko-KR/api/file-object.md similarity index 100% rename from docs-translations/ko/api/file-object.md rename to docs-translations/ko-KR/api/file-object.md diff --git a/docs-translations/ko/api/frameless-window.md b/docs-translations/ko-KR/api/frameless-window.md similarity index 100% rename from docs-translations/ko/api/frameless-window.md rename to docs-translations/ko-KR/api/frameless-window.md diff --git a/docs-translations/ko/api/global-shortcut.md b/docs-translations/ko-KR/api/global-shortcut.md similarity index 100% rename from docs-translations/ko/api/global-shortcut.md rename to docs-translations/ko-KR/api/global-shortcut.md diff --git a/docs-translations/ko/api/ipc-main-process.md b/docs-translations/ko-KR/api/ipc-main-process.md similarity index 100% rename from docs-translations/ko/api/ipc-main-process.md rename to docs-translations/ko-KR/api/ipc-main-process.md diff --git a/docs-translations/ko/api/ipc-renderer.md b/docs-translations/ko-KR/api/ipc-renderer.md similarity index 100% rename from docs-translations/ko/api/ipc-renderer.md rename to docs-translations/ko-KR/api/ipc-renderer.md diff --git a/docs-translations/ko/api/menu-item.md b/docs-translations/ko-KR/api/menu-item.md similarity index 100% rename from docs-translations/ko/api/menu-item.md rename to docs-translations/ko-KR/api/menu-item.md diff --git a/docs-translations/ko/api/menu.md b/docs-translations/ko-KR/api/menu.md similarity index 100% rename from docs-translations/ko/api/menu.md rename to docs-translations/ko-KR/api/menu.md diff --git a/docs-translations/ko/api/native-image.md b/docs-translations/ko-KR/api/native-image.md similarity index 100% rename from docs-translations/ko/api/native-image.md rename to docs-translations/ko-KR/api/native-image.md diff --git a/docs-translations/ko/api/power-monitor.md b/docs-translations/ko-KR/api/power-monitor.md similarity index 100% rename from docs-translations/ko/api/power-monitor.md rename to docs-translations/ko-KR/api/power-monitor.md diff --git a/docs-translations/ko/api/power-save-blocker.md b/docs-translations/ko-KR/api/power-save-blocker.md similarity index 100% rename from docs-translations/ko/api/power-save-blocker.md rename to docs-translations/ko-KR/api/power-save-blocker.md diff --git a/docs-translations/ko/api/process.md b/docs-translations/ko-KR/api/process.md similarity index 100% rename from docs-translations/ko/api/process.md rename to docs-translations/ko-KR/api/process.md diff --git a/docs-translations/ko/api/protocol.md b/docs-translations/ko-KR/api/protocol.md similarity index 100% rename from docs-translations/ko/api/protocol.md rename to docs-translations/ko-KR/api/protocol.md diff --git a/docs-translations/ko/api/remote.md b/docs-translations/ko-KR/api/remote.md similarity index 99% rename from docs-translations/ko/api/remote.md rename to docs-translations/ko-KR/api/remote.md index 15c82ff0d2..756acd429a 100644 --- a/docs-translations/ko/api/remote.md +++ b/docs-translations/ko-KR/api/remote.md @@ -62,7 +62,7 @@ exports.withLocalCallback = function() { ```javascript // 랜더러 프로세스 -var mapNumbers = require("remote").require("mapNumbers"); +var mapNumbers = require("remote").require("./mapNumbers"); var withRendererCb = mapNumbers.withRendererCallback(function(x) { return x + 1; diff --git a/docs-translations/ko/api/screen.md b/docs-translations/ko-KR/api/screen.md similarity index 100% rename from docs-translations/ko/api/screen.md rename to docs-translations/ko-KR/api/screen.md diff --git a/docs-translations/ko/api/session.md b/docs-translations/ko-KR/api/session.md similarity index 100% rename from docs-translations/ko/api/session.md rename to docs-translations/ko-KR/api/session.md diff --git a/docs-translations/ko/api/shell.md b/docs-translations/ko-KR/api/shell.md similarity index 100% rename from docs-translations/ko/api/shell.md rename to docs-translations/ko-KR/api/shell.md diff --git a/docs-translations/ko/api/synopsis.md b/docs-translations/ko-KR/api/synopsis.md similarity index 100% rename from docs-translations/ko/api/synopsis.md rename to docs-translations/ko-KR/api/synopsis.md diff --git a/docs-translations/ko/api/tray.md b/docs-translations/ko-KR/api/tray.md similarity index 100% rename from docs-translations/ko/api/tray.md rename to docs-translations/ko-KR/api/tray.md diff --git a/docs-translations/ko/api/web-frame.md b/docs-translations/ko-KR/api/web-frame.md similarity index 100% rename from docs-translations/ko/api/web-frame.md rename to docs-translations/ko-KR/api/web-frame.md diff --git a/docs-translations/ko/api/web-view-tag.md b/docs-translations/ko-KR/api/web-view-tag.md similarity index 98% rename from docs-translations/ko/api/web-view-tag.md rename to docs-translations/ko-KR/api/web-view-tag.md index 90f5acb938..b3f05de7f3 100644 --- a/docs-translations/ko/api/web-view-tag.md +++ b/docs-translations/ko-KR/api/web-view-tag.md @@ -335,6 +335,14 @@ Webview 페이지를 PDF 형식으로 인쇄합니다. `webContents.printToPDF(o 예제는 [WebContents.send](web-contents.md#webcontentssendchannel-args)를 참고하세요. +### `.sendInputEvent(event)` + +* `event` Object + +페이지에 input `event`를 보냅니다. + +`event` 객체에 대해 자세한 내용을 알아보려면 [WebContents.sendInputEvent](web-contents.md##webcontentssendinputeventevent)를 참고하세요. + ## DOM 이벤트 `webview` 태그는 다음과 같은 DOM 이벤트를 가지고 있습니다: diff --git a/docs-translations/ko/api/window-open.md b/docs-translations/ko-KR/api/window-open.md similarity index 100% rename from docs-translations/ko/api/window-open.md rename to docs-translations/ko-KR/api/window-open.md diff --git a/docs-translations/ko/development/atom-shell-vs-node-webkit.md b/docs-translations/ko-KR/development/atom-shell-vs-node-webkit.md similarity index 100% rename from docs-translations/ko/development/atom-shell-vs-node-webkit.md rename to docs-translations/ko-KR/development/atom-shell-vs-node-webkit.md diff --git a/docs-translations/ko/development/build-instructions-linux.md b/docs-translations/ko-KR/development/build-instructions-linux.md similarity index 100% rename from docs-translations/ko/development/build-instructions-linux.md rename to docs-translations/ko-KR/development/build-instructions-linux.md diff --git a/docs-translations/ko/development/build-instructions-osx.md b/docs-translations/ko-KR/development/build-instructions-osx.md similarity index 100% rename from docs-translations/ko/development/build-instructions-osx.md rename to docs-translations/ko-KR/development/build-instructions-osx.md diff --git a/docs-translations/ko/development/build-instructions-windows.md b/docs-translations/ko-KR/development/build-instructions-windows.md similarity index 100% rename from docs-translations/ko/development/build-instructions-windows.md rename to docs-translations/ko-KR/development/build-instructions-windows.md diff --git a/docs-translations/ko/development/build-system-overview.md b/docs-translations/ko-KR/development/build-system-overview.md similarity index 100% rename from docs-translations/ko/development/build-system-overview.md rename to docs-translations/ko-KR/development/build-system-overview.md diff --git a/docs-translations/ko/development/coding-style.md b/docs-translations/ko-KR/development/coding-style.md similarity index 100% rename from docs-translations/ko/development/coding-style.md rename to docs-translations/ko-KR/development/coding-style.md diff --git a/docs-translations/ko/development/setting-up-symbol-server.md b/docs-translations/ko-KR/development/setting-up-symbol-server.md similarity index 100% rename from docs-translations/ko/development/setting-up-symbol-server.md rename to docs-translations/ko-KR/development/setting-up-symbol-server.md diff --git a/docs-translations/ko/development/source-code-directory-structure.md b/docs-translations/ko-KR/development/source-code-directory-structure.md similarity index 100% rename from docs-translations/ko/development/source-code-directory-structure.md rename to docs-translations/ko-KR/development/source-code-directory-structure.md diff --git a/docs-translations/ko/styleguide.md b/docs-translations/ko-KR/styleguide.md similarity index 100% rename from docs-translations/ko/styleguide.md rename to docs-translations/ko-KR/styleguide.md diff --git a/docs-translations/ko/tutorial/application-distribution.md b/docs-translations/ko-KR/tutorial/application-distribution.md similarity index 100% rename from docs-translations/ko/tutorial/application-distribution.md rename to docs-translations/ko-KR/tutorial/application-distribution.md diff --git a/docs-translations/ko/tutorial/application-packaging.md b/docs-translations/ko-KR/tutorial/application-packaging.md similarity index 100% rename from docs-translations/ko/tutorial/application-packaging.md rename to docs-translations/ko-KR/tutorial/application-packaging.md diff --git a/docs-translations/ko/tutorial/debugging-main-process.md b/docs-translations/ko-KR/tutorial/debugging-main-process.md similarity index 100% rename from docs-translations/ko/tutorial/debugging-main-process.md rename to docs-translations/ko-KR/tutorial/debugging-main-process.md diff --git a/docs-translations/ko/tutorial/desktop-environment-integration.md b/docs-translations/ko-KR/tutorial/desktop-environment-integration.md similarity index 100% rename from docs-translations/ko/tutorial/desktop-environment-integration.md rename to docs-translations/ko-KR/tutorial/desktop-environment-integration.md diff --git a/docs-translations/ko/tutorial/devtools-extension.md b/docs-translations/ko-KR/tutorial/devtools-extension.md similarity index 100% rename from docs-translations/ko/tutorial/devtools-extension.md rename to docs-translations/ko-KR/tutorial/devtools-extension.md diff --git a/docs-translations/ko/tutorial/online-offline-events.md b/docs-translations/ko-KR/tutorial/online-offline-events.md similarity index 100% rename from docs-translations/ko/tutorial/online-offline-events.md rename to docs-translations/ko-KR/tutorial/online-offline-events.md diff --git a/docs-translations/ko/tutorial/quick-start.md b/docs-translations/ko-KR/tutorial/quick-start.md similarity index 100% rename from docs-translations/ko/tutorial/quick-start.md rename to docs-translations/ko-KR/tutorial/quick-start.md diff --git a/docs-translations/ko/tutorial/using-native-node-modules.md b/docs-translations/ko-KR/tutorial/using-native-node-modules.md similarity index 100% rename from docs-translations/ko/tutorial/using-native-node-modules.md rename to docs-translations/ko-KR/tutorial/using-native-node-modules.md diff --git a/docs-translations/ko/tutorial/using-pepper-flash-plugin.md b/docs-translations/ko-KR/tutorial/using-pepper-flash-plugin.md similarity index 100% rename from docs-translations/ko/tutorial/using-pepper-flash-plugin.md rename to docs-translations/ko-KR/tutorial/using-pepper-flash-plugin.md diff --git a/docs-translations/ko/tutorial/using-selenium-and-webdriver.md b/docs-translations/ko-KR/tutorial/using-selenium-and-webdriver.md similarity index 100% rename from docs-translations/ko/tutorial/using-selenium-and-webdriver.md rename to docs-translations/ko-KR/tutorial/using-selenium-and-webdriver.md diff --git a/docs-translations/pt-BR/README.md b/docs-translations/pt-BR/README.md index 88fb26a5ea..e60d9505a2 100644 --- a/docs-translations/pt-BR/README.md +++ b/docs-translations/pt-BR/README.md @@ -17,7 +17,8 @@ ## API - Referencias * [Sinopse](../../docs/api/synopsis.md) -* [Processos](../../docs/api/process.md) +* [Processos](api/process.md) +* [Aceleradores (Teclas de Atalho)](api/accelerator.md) * [Parâmetros CLI suportados (Chrome)](../../docs/api/chrome-command-line-switches.md) DOM elementos personalizados: @@ -56,7 +57,7 @@ Módulos de ambos os processos: * [crash-reporter](../../docs/api/crash-reporter.md) * [native-image](../../docs/api/native-image.md) * [screen](../../docs/api/screen.md) -* [shell](../../docs/api/shell.md) +* [shell](api/shell.md) ## Desenvolvimento diff --git a/docs-translations/pt-BR/api/accelerator.md b/docs-translations/pt-BR/api/accelerator.md new file mode 100644 index 0000000000..87987258b1 --- /dev/null +++ b/docs-translations/pt-BR/api/accelerator.md @@ -0,0 +1,46 @@ +# Acelerador (teclas de atalhos) + +Um acelerador é uma string que representa um atalho de tecla. Isso pode conter +multiplos modificadores e códigos chaves, combinado pelo caracter `+`. + +Exemplos: + +* `Command+A` +* `Ctrl+Shift+Z` + +## Aviso sobre plataformas + +No Linux e no Windows a tecla `Command` não tem nenhum efeito, +então use `CommandOrControl` que representa a tecla `Command` existente no OSX e +`Control` no Linux e no Windows para definir aceleradores (atalhos). + +A chave `Super` está mapeada para a tecla `Windows` para Windows e Linux, +e para a tecla `Cmd` para OSX. + +## Modificadores disponiveis + +* `Command` (ou `Cmd` abreviado) +* `Control` (ou `Ctrl` abreviado) +* `CommandOrControl` (ou `CmdOrCtrl` abreviado) +* `Alt` +* `Shift` +* `Super` + +## Códigos chaves disponiveis + +* `0` to `9` +* `A` to `Z` +* `F1` to `F24` +* Punctuations like `~`, `!`, `@`, `#`, `$`, etc. +* `Plus` +* `Space` +* `Backspace` +* `Delete` +* `Insert` +* `Return` (or `Enter` as alias) +* `Up`, `Down`, `Left` and `Right` +* `Home` and `End` +* `PageUp` and `PageDown` +* `Escape` (or `Esc` for short) +* `VolumeUp`, `VolumeDown` and `VolumeMute` +* `MediaNextTrack`, `MediaPreviousTrack`, `MediaStop` and `MediaPlayPause` \ No newline at end of file diff --git a/docs-translations/pt-BR/api/process.md b/docs-translations/pt-BR/api/process.md new file mode 100644 index 0000000000..3da0dc5839 --- /dev/null +++ b/docs-translations/pt-BR/api/process.md @@ -0,0 +1,22 @@ +# process +O objeto `process` no Electron tem as seguintes diferenças de um upstream node: + +* `process.type` String - Tipo de processo, pode ser `browser` (i.e. main process) +ou `renderer`. +* `process.versions['electron']` String - Versão do Electron. +* `process.versions['chrome']` String - Versão do Chromium. +* `process.resourcesPath` String - Caminho para os códigos fontes JavaScript. + +# Métodos +O objeto `process` tem os seguintes método: + +### `process.hang` + +Afeta a thread principal do processo atual. + +## process.setFdLimit(MaxDescritores) _OS X_ _Linux_ + +* `maxDescriptors` Integer + +Define o limite do arquivo descritor para `maxDescriptors` ou para o limite do OS, +o que for menor para o processo atual. \ No newline at end of file diff --git a/docs-translations/pt-BR/api/shell.md b/docs-translations/pt-BR/api/shell.md new file mode 100644 index 0000000000..7c3f24ade5 --- /dev/null +++ b/docs-translations/pt-BR/api/shell.md @@ -0,0 +1,43 @@ +# shell + +O módulo `shell` fornece funções relacionadas intereções com o OS do usuário. + +Um exemplo para abrir uma URL no browser padrão do usuário: + +```javascript +var shell = require('shell'); +shell.openExternal('https://github.com'); +``` + +## Métodos + +O módulo `shell` tem os seguintes métodos: + +### `shell.showItemInFolder(fullPath)` + +* `fullPath` String + +Exibe o arquivo no gerenciador de arquivos padrão do sistema. Se possivel, seleciona o arquivo automaticamente. + +### `shell.openItem(fullPath)` + +* `fullPath` String + +Abre o arquivo em seu programa padrão. + +### `shell.openExternal(url)` + +* `url` String + +Abre o arquivo seguido de um protocol em seu programa padrão. (Por +exemplo, mailto:foo@bar.com.) + +### `shell.moveItemToTrash(fullPath)` + +* `fullPath` String + +Move o arquivo para a lixeira e retorna um boolean com o resultado da operação. + +### `shell.beep()` + +Toca um som beep. \ No newline at end of file diff --git a/docs/api/app.md b/docs/api/app.md index 85ad873de3..e4a8d561e2 100644 --- a/docs/api/app.md +++ b/docs/api/app.md @@ -239,6 +239,10 @@ to the npm modules spec. You should usually also specify a `productName` field, which is your application's full capitalized name, and which will be preferred over `name` by Electron. +### `app.getLocale()` + +Returns the current application locale. + ### `app.resolveProxy(url, callback)` * `url` URL diff --git a/docs/api/browser-window.md b/docs/api/browser-window.md index 29171a2ec5..f1705c2917 100644 --- a/docs/api/browser-window.md +++ b/docs/api/browser-window.md @@ -244,7 +244,7 @@ Emitted when DevTools is closed. Emitted when DevTools is focused / opened. -### Event: 'app-command' _Windows_ +### Event: 'app-command': Emitted when an [App Command](https://msdn.microsoft.com/en-us/library/windows/desktop/ms646275(v=vs.85).aspx) is invoked. These are typically related to keyboard media keys or browser diff --git a/docs/api/remote.md b/docs/api/remote.md index 1c5c831a17..55893c65f1 100644 --- a/docs/api/remote.md +++ b/docs/api/remote.md @@ -79,7 +79,7 @@ exports.withLocalCallback = function() { ```javascript // renderer process -var mapNumbers = require("remote").require("mapNumbers"); +var mapNumbers = require("remote").require("./mapNumbers"); var withRendererCb = mapNumbers.withRendererCallback(function(x) { return x + 1; diff --git a/docs/api/web-contents.md b/docs/api/web-contents.md index 92d91d170e..c2dccc3a87 100644 --- a/docs/api/web-contents.md +++ b/docs/api/web-contents.md @@ -78,6 +78,10 @@ Returns: * `oldUrl` String * `newUrl` String * `isMainFrame` Boolean +* `httpResponseCode` Integer +* `requestMethod` String +* `referrer` String +* `headers` Object Emitted when a redirect is received while requesting a resource. @@ -107,6 +111,8 @@ Returns: * `frameName` String * `disposition` String - Can be `default`, `foreground-tab`, `background-tab`, `new-window` and `other`. +* `options` Object - The options which will be used for creating the new + `BrowserWindow`. Emitted when the page requests to open a new window for a `url`. It could be requested by `window.open` or an external link like ``. @@ -415,7 +421,7 @@ win.webContents.on("did-finish-load", function() { win.webContents.printToPDF({}, function(error, data) { if (error) throw error; fs.writeFile("/tmp/print.pdf", data, function(error) { - if (err) + if (error) throw error; console.log("Write PDF successfully."); }) @@ -476,3 +482,92 @@ app.on('ready', function() { which is different from the handlers in the main process. 2. There is no way to send synchronous messages from the main process to a renderer process, because it would be very easy to cause dead locks. + +### `webContents.enableDeviceEmulation(parameters)` + +`parameters` Object, properties: + +* `screenPosition` String - Specify the screen type to emulate + (default: `desktop`) + * `desktop` + * `mobile` +* `screenSize` Object - Set the emulated screen size (screenPosition == mobile) + * `width` Integer - Set the emulated screen width + * `height` Integer - Set the emulated screen height +* `viewPosition` Object - Position the view on the screen + (screenPosition == mobile) (default: `{x: 0, y: 0}`) + * `x` Integer - Set the x axis offset from top left corner + * `y` Integer - Set the y axis offset from top left corner +* `deviceScaleFactor` Integer - Set the device scale factor (if zero defaults to + original device scale factor) (default: `0`) +* `viewSize` Object - Set the emulated view size (empty means no override) + * `width` Integer - Set the emulated view width + * `height` Integer - Set the emulated view height +* `fitToView` Boolean - Whether emulated view should be scaled down if + necessary to fit into available space (default: `false`) +* `offset` Object - Offset of the emulated view inside available space (not in + fit to view mode) (default: `{x: 0, y: 0}`) + * `x` Float - Set the x axis offset from top left corner + * `y` Float - Set the y axis offset from top left corner +* `scale` Float - Scale of emulated view inside available space (not in fit to + view mode) (default: `1`) + +Enable device emulation with the given parameters. + +### `webContents.disableDeviceEmulation()` + +Disable device emulation enabled by `webContents.enableDeviceEmulation`. + +### `webContents.sendInputEvent(event)` + +* `event` Object + * `type` String (**required**) - The type of the event, can be `mouseDown`, + `mouseUp`, `mouseEnter`, `mouseLeave`, `contextMenu`, `mouseWheel`, + `keyDown`, `keyUp`, `char`. + * `modifiers` Array - An array of modifiers of the event, can + include `shift`, `control`, `alt`, `meta`, `isKeypad`, `isAutoRepeat`, + `leftButtonDown`, `middleButtonDown`, `rightButtonDown`, `capsLock`, + `numLock`, `left`, `right`. + +Sends an input `event` to the page. + +For keyboard events, the `event` object also have following properties: + +* `keyCode` String (**required**) - A single character that will be sent as + keyboard event. Can be any ASCII character on the keyboard, like `a`, `1` + and `=`. + +For mouse events, the `event` object also have following properties: + +* `x` Integer (**required**) +* `y` Integer (**required**) +* `globalX` Integer +* `globalY` Integer +* `movementX` Integer +* `movementY` Integer +* `clickCount` Integer + +For the `mouseWheel` event, the `event` object also have following properties: + +* `deltaX` Integer +* `deltaY` Integer +* `wheelTicksX` Integer +* `wheelTicksY` Integer +* `accelerationRatioX` Integer +* `accelerationRatioY` Integer +* `hasPreciseScrollingDeltas` Boolean +* `canScroll` Boolean + +### `webContents.beginFrameSubscription(callback)` + +* `callback` Function + +Begin subscribing for presentation events and captured frames, the `callback` +will be called with `callback(frameBuffer)` when there is a presentation event. + +The `frameBuffer` is a `Buffer` that contains raw pixel data, in the format of +32bit ARGB. + +### `webContents.endFrameSubscription()` + +End subscribing for frame presentation events. diff --git a/docs/api/web-frame.md b/docs/api/web-frame.md index bdf42da300..33597543b7 100644 --- a/docs/api/web-frame.md +++ b/docs/api/web-frame.md @@ -83,4 +83,11 @@ attackers. Resources will be loaded from this `scheme` regardless of the current page's Content Security Policy. +### `webFrame.registerUrlSchemeAsPrivileged(scheme)` + +* `scheme` String + +Registers the `scheme` as secure, bypasses content security policy for resources and +allows registering ServiceWorker. + [spellchecker]: https://github.com/atom/node-spellchecker diff --git a/docs/api/web-view-tag.md b/docs/api/web-view-tag.md index 4647413b5a..3fda3a98ed 100644 --- a/docs/api/web-view-tag.md +++ b/docs/api/web-view-tag.md @@ -149,6 +149,14 @@ This value can only be modified before the first navigation, since the session of an active renderer process cannot change. Subsequent attempts to modify the value will fail with a DOM exception. +### `allowpopups` + +```html + +``` + +If "on", the guest page will be allowed to open new windows. + ## Methods The `webview` tag has the following methods: @@ -358,6 +366,15 @@ page can handle it by listening to the `channel` event of `ipc` module. See [WebContents.send](web-contents.md#webcontentssendchannel-args) for examples. +### `.sendInputEvent(event)` + +* `event` Object + +Sends an input `event` to the page. + +See [WebContents.sendInputEvent](web-contents.md##webcontentssendinputeventevent) +for detailed description of `event` object. + ## DOM events The following DOM events are available to the `webview` tag: @@ -487,7 +504,9 @@ Returns: * `url` String * `frameName` String * `disposition` String - Can be `default`, `foreground-tab`, `background-tab`, - `new-window` and `other` + `new-window` and `other`. +* `options` Object - The options which should be used for creating the new + `BrowserWindow`. Fired when the guest page attempts to open a new browser window. diff --git a/docs/api/window-open.md b/docs/api/window-open.md index c574d5d036..5d298e61e7 100644 --- a/docs/api/window-open.md +++ b/docs/api/window-open.md @@ -8,6 +8,10 @@ The proxy has limited standard functionality implemented to be compatible with traditional web pages. For full control of the new window you should create a `BrowserWindow` directly. +The newly created `BrowserWindow` will inherit parent window's options by +default, to override inherited options you can set them in the `features` +string. + ### `window.open(url[, frameName][, features])` * `url` String @@ -16,6 +20,9 @@ you should create a `BrowserWindow` directly. Creates a new window and returns an instance of `BrowserWindowProxy` class. +The `features` string follows the format of standard browser, but each feature +has to be a field of `BrowserWindow`'s options. + ### `window.opener.postMessage(message, targetOrigin)` * `message` String diff --git a/filenames.gypi b/filenames.gypi index 461c812753..99d6bc6d50 100644 --- a/filenames.gypi +++ b/filenames.gypi @@ -103,6 +103,8 @@ 'atom/browser/api/event_emitter.h', 'atom/browser/api/trackable_object.cc', 'atom/browser/api/trackable_object.h', + 'atom/browser/api/frame_subscriber.cc', + 'atom/browser/api/frame_subscriber.h', 'atom/browser/auto_updater.cc', 'atom/browser/auto_updater.h', 'atom/browser/auto_updater_delegate.h', @@ -283,9 +285,13 @@ 'atom/common/google_api_key.h', 'atom/common/id_weak_map.cc', 'atom/common/id_weak_map.h', + 'atom/common/keyboad_util.cc', + 'atom/common/keyboad_util.h', 'atom/common/linux/application_info.cc', 'atom/common/native_mate_converters/accelerator_converter.cc', 'atom/common/native_mate_converters/accelerator_converter.h', + 'atom/common/native_mate_converters/blink_converter.cc', + 'atom/common/native_mate_converters/blink_converter.h', 'atom/common/native_mate_converters/callback.h', 'atom/common/native_mate_converters/file_path_converter.h', 'atom/common/native_mate_converters/gfx_converter.cc', diff --git a/script/create-dist.py b/script/create-dist.py index c978641df3..ca7e216428 100755 --- a/script/create-dist.py +++ b/script/create-dist.py @@ -126,6 +126,8 @@ def copy_chrome_binary(binary): def copy_license(): + shutil.copy2(os.path.join(CHROMIUM_DIR, '..', 'LICENSES.chromium.html'), + DIST_DIR) shutil.copy2(os.path.join(SOURCE_ROOT, 'LICENSE'), DIST_DIR) diff --git a/spec/api-app-spec.coffee b/spec/api-app-spec.coffee index 38ef22ac80..4b1a04e008 100644 --- a/spec/api-app-spec.coffee +++ b/spec/api-app-spec.coffee @@ -26,6 +26,10 @@ describe 'app module', -> assert.equal app.getName(), 'test-name' app.setName 'Electron Test' + describe 'app.getLocale()', -> + it 'should not be empty', -> + assert.notEqual app.getLocale(), '' + describe 'BrowserWindow events', -> w = null afterEach -> diff --git a/spec/api-browser-window-spec.coffee b/spec/api-browser-window-spec.coffee index 3e4e2d5db5..de713a6545 100644 --- a/spec/api-browser-window-spec.coffee +++ b/spec/api-browser-window-spec.coffee @@ -295,11 +295,19 @@ describe 'browser-window module', -> w.minimize() describe 'will-navigate event', -> - return if isCI and process.platform is 'darwin' + @timeout 10000 it 'emits when user starts a navigation', (done) -> - @timeout 10000 - w.webContents.on 'will-navigate', (event, url) -> + url = "file://#{fixtures}/pages/will-navigate.html" + w.webContents.on 'will-navigate', (event, u) -> event.preventDefault() - assert.equal url, 'https://www.github.com/' + assert.equal u, url + done() + w.loadUrl url + + xdescribe 'beginFrameSubscription method', -> + it 'subscribes frame updates', (done) -> + w.loadUrl "file://#{fixtures}/api/blank.html" + w.webContents.beginFrameSubscription (data) -> + assert.notEqual data.length, 0 + w.webContents.endFrameSubscription() done() - w.loadUrl "file://#{fixtures}/pages/will-navigate.html" diff --git a/spec/chromium-spec.coffee b/spec/chromium-spec.coffee index 2c42cd9a4c..4dd39aff5f 100644 --- a/spec/chromium-spec.coffee +++ b/spec/chromium-spec.coffee @@ -35,6 +35,8 @@ describe 'chromium feature', -> assert.notEqual navigator.language, '' describe 'window.open', -> + @timeout 10000 + it 'returns a BrowserWindowProxy object', -> b = window.open 'about:blank', '', 'show=no' assert.equal b.closed, false @@ -50,6 +52,16 @@ describe 'chromium feature', -> window.addEventListener 'message', listener b = window.open "file://#{fixtures}/pages/window-opener-node.html", '', 'node-integration=no,show=no' + it 'inherit options of parent window', (done) -> + listener = (event) -> + window.removeEventListener 'message', listener + b.close() + size = remote.getCurrentWindow().getSize() + assert.equal event.data, "size: #{size.width} #{size.height}" + done() + window.addEventListener 'message', listener + b = window.open "file://#{fixtures}/pages/window-open-size.html", '', 'show=no' + describe 'window.opener', -> @timeout 10000 @@ -62,7 +74,7 @@ describe 'chromium feature', -> ipc.removeAllListeners 'opener' it 'is null for main window', (done) -> - ipc.on 'opener', (event, opener) -> + ipc.once 'opener', (event, opener) -> assert.equal opener, null done() BrowserWindow = remote.require 'browser-window' @@ -70,7 +82,7 @@ describe 'chromium feature', -> w.loadUrl url it 'is not null for window opened by window.open', (done) -> - ipc.on 'opener', (event, opener) -> + ipc.once 'opener', (event, opener) -> b.close() done(if opener isnt null then undefined else opener) b = window.open url, '', 'show=no' diff --git a/spec/fixtures/module/set-immediate.js b/spec/fixtures/module/set-immediate.js new file mode 100644 index 0000000000..e7d44a75d1 --- /dev/null +++ b/spec/fixtures/module/set-immediate.js @@ -0,0 +1,11 @@ +process.on('uncaughtException', function(error) { + process.send(error.message); + process.exit(1); +}); + +process.on('message', function(msg) { + setImmediate(function() { + process.send('ok'); + process.exit(0); + }); +}); diff --git a/spec/fixtures/pages/onkeyup.html b/spec/fixtures/pages/onkeyup.html new file mode 100644 index 0000000000..99e6c3e983 --- /dev/null +++ b/spec/fixtures/pages/onkeyup.html @@ -0,0 +1,9 @@ + + + + + diff --git a/spec/fixtures/pages/onmouseup.html b/spec/fixtures/pages/onmouseup.html new file mode 100644 index 0000000000..1fd38bc721 --- /dev/null +++ b/spec/fixtures/pages/onmouseup.html @@ -0,0 +1,9 @@ + + + + + diff --git a/spec/fixtures/pages/will-navigate.html b/spec/fixtures/pages/will-navigate.html index bd2ebdc1cb..8d0c9b779e 100644 --- a/spec/fixtures/pages/will-navigate.html +++ b/spec/fixtures/pages/will-navigate.html @@ -1,7 +1,7 @@ diff --git a/spec/fixtures/pages/window-open-hide.html b/spec/fixtures/pages/window-open-hide.html new file mode 100644 index 0000000000..d6eb7403ac --- /dev/null +++ b/spec/fixtures/pages/window-open-hide.html @@ -0,0 +1,12 @@ + + + + + + diff --git a/spec/fixtures/pages/window-open-size.html b/spec/fixtures/pages/window-open-size.html new file mode 100644 index 0000000000..7b06cfddf5 --- /dev/null +++ b/spec/fixtures/pages/window-open-size.html @@ -0,0 +1,8 @@ + + + + + diff --git a/spec/node-spec.coffee b/spec/node-spec.coffee index 94174c38b7..c8d569e01a 100644 --- a/spec/node-spec.coffee +++ b/spec/node-spec.coffee @@ -56,6 +56,13 @@ describe 'node feature', -> done() child.send 'message' + it 'has setImmediate working in script', (done) -> + child = child_process.fork path.join(fixtures, 'module', 'set-immediate.js') + child.on 'message', (msg) -> + assert.equal msg, 'ok' + done() + child.send 'message' + describe 'contexts', -> describe 'setTimeout in fs callback', -> it 'does not crash', (done) -> @@ -141,3 +148,7 @@ describe 'node feature', -> # Not reliable on some machines xit 'should have isTTY defined', -> assert.equal typeof(process.stdout.isTTY), 'boolean' + + describe 'vm.createContext', -> + it 'should not crash', -> + require('vm').runInNewContext('') diff --git a/spec/webview-spec.coffee b/spec/webview-spec.coffee index e4b40c28eb..c60af8d74d 100644 --- a/spec/webview-spec.coffee +++ b/spec/webview-spec.coffee @@ -86,7 +86,7 @@ describe ' tag', -> it 'preload script can still use "process" in required modules when nodeintegration is off', (done) -> webview.addEventListener 'console-message', (e) -> - assert.equal e.message, 'object function object' + assert.equal e.message, 'object undefined object' done() webview.setAttribute 'preload', "#{fixtures}/module/preload-node-off.js" webview.src = "file://#{fixtures}/api/blank.html" @@ -201,6 +201,26 @@ describe ' tag', -> webview.src = "file://#{fixtures}/pages/partition/one.html" document.body.appendChild webview + describe 'allowpopups attribute', -> + it 'can not open new window when not set', (done) -> + listener = (e) -> + assert.equal e.message, 'null' + webview.removeEventListener 'console-message', listener + done() + webview.addEventListener 'console-message', listener + webview.src = "file://#{fixtures}/pages/window-open-hide.html" + document.body.appendChild webview + + it 'can open new window when set', (done) -> + listener = (e) -> + assert.equal e.message, 'window' + webview.removeEventListener 'console-message', listener + done() + webview.addEventListener 'console-message', listener + webview.setAttribute 'allowpopups', 'on' + webview.src = "file://#{fixtures}/pages/window-open-hide.html" + document.body.appendChild webview + describe 'new-window event', -> it 'emits when window.open is called', (done) -> webview.addEventListener 'new-window', (e) -> @@ -336,3 +356,26 @@ describe ' tag', -> webview.addEventListener 'did-finish-load', listener2 webview.src = "file://#{fixtures}/pages/fullscreen.html" document.body.appendChild webview + + describe 'sendInputEvent', -> + it 'can send keyboard event', (done) -> + webview.addEventListener 'ipc-message', (e) -> + assert.equal e.channel, 'keyup' + assert.deepEqual e.args, [67, true, false] + done() + webview.addEventListener 'dom-ready', -> + webview.sendInputEvent type: 'keyup', keyCode: 'c', modifiers: ['shift'] + webview.src = "file://#{fixtures}/pages/onkeyup.html" + webview.setAttribute 'nodeintegration', 'on' + document.body.appendChild webview + + it 'can send mouse event', (done) -> + webview.addEventListener 'ipc-message', (e) -> + assert.equal e.channel, 'mouseup' + assert.deepEqual e.args, [10, 20, false, true] + done() + webview.addEventListener 'dom-ready', -> + webview.sendInputEvent type: 'mouseup', modifiers: ['ctrl'], x: 10, y: 20 + webview.src = "file://#{fixtures}/pages/onmouseup.html" + webview.setAttribute 'nodeintegration', 'on' + document.body.appendChild webview diff --git a/vendor/brightray b/vendor/brightray index d385c9b1b8..25f3a9d0a5 160000 --- a/vendor/brightray +++ b/vendor/brightray @@ -1 +1 @@ -Subproject commit d385c9b1b88da3ba1b5426861ec7c63e8c884135 +Subproject commit 25f3a9d0a5b73ec170a65f4e2e4c9ad91e23fc8c diff --git a/vendor/node b/vendor/node index 4098d45fbb..fa54694af4 160000 --- a/vendor/node +++ b/vendor/node @@ -1 +1 @@ -Subproject commit 4098d45fbb822370c19d2fe7b88162759db4eb96 +Subproject commit fa54694af4350bf1720ff47e97a07c7c09325ee2