From 18f5fcde60007f6b22878f08de3022405a9e5203 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Wed, 20 Apr 2016 09:18:50 +0900 Subject: [PATCH] Fix some coding style issues --- atom/browser/native_window.cc | 1 + atom/browser/native_window_mac.mm | 6 +++--- atom/browser/net/atom_network_delegate.h | 1 + docs/api/dialog.md | 1 - 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/atom/browser/native_window.cc b/atom/browser/native_window.cc index 091a7b8a3fb1..2379bdd053c5 100644 --- a/atom/browser/native_window.cc +++ b/atom/browser/native_window.cc @@ -54,6 +54,7 @@ NativeWindow::NativeWindow( enable_larger_than_screen_(false), is_closed_(false), has_dialog_attached_(false), + sheet_offset_(0.0), aspect_ratio_(0.0), inspectable_web_contents_(inspectable_web_contents), weak_factory_(this) { diff --git a/atom/browser/native_window_mac.mm b/atom/browser/native_window_mac.mm index c35c177ac298..5f980fed62cf 100644 --- a/atom/browser/native_window_mac.mm +++ b/atom/browser/native_window_mac.mm @@ -243,13 +243,13 @@ bool ScopedDisableResize::disable_resize_ = false; return NO; } -- (NSRect)window:(NSWindow *)window willPositionSheet:(NSWindow *)sheet usingRect:(NSRect)rect { - NSView * view = window.contentView; +- (NSRect)window:(NSWindow*)window + willPositionSheet:(NSWindow*)sheet usingRect:(NSRect)rect { + NSView* view = window.contentView; rect.origin.y = view.frame.size.height - shell_->GetSheetOffset(); return rect; } - @end @interface AtomNSWindow : NSWindow { diff --git a/atom/browser/net/atom_network_delegate.h b/atom/browser/net/atom_network_delegate.h index 92ea6415e69e..701a953c265e 100644 --- a/atom/browser/net/atom_network_delegate.h +++ b/atom/browser/net/atom_network_delegate.h @@ -121,6 +121,7 @@ class AtomNetworkDelegate : public brightray::NetworkDelegate { std::map callbacks_; base::Lock lock_; + // Client id for devtools network emulation. std::string client_id_; diff --git a/docs/api/dialog.md b/docs/api/dialog.md index 32b8628567af..1cea9da119ad 100644 --- a/docs/api/dialog.md +++ b/docs/api/dialog.md @@ -122,7 +122,6 @@ it is usually used to report errors in early stage of startup. If called before the app `ready`event on Linux, the message will be emitted to stderr, and no GUI dialog will appear. - ## Sheets On Mac OS X, dialogs are presented as sheets attached to a window if you provide