Compare commits

...

8 Commits

Author SHA1 Message Date
Cheng Zhao
037e5d7f59 Bump v0.30.8 2015-09-26 21:34:28 +08:00
Josh Abernathy
cdfb492e4f Use 0.8.0.
This picks up the fix for https://github.com/atom/atom/issues/7061.
2015-09-26 21:33:30 +08:00
Kevin Sawicki
8075600055 Touch README 2015-09-16 09:59:21 -07:00
Cheng Zhao
0824f7235b Bump v0.30.7 2015-09-24 14:01:04 +08:00
Cheng Zhao
9fca3f1973 win: Fix leaking of fd when reading file in asar 2015-09-24 14:00:53 +08:00
Indrek Ardel
83a2772a57 Fix a typo 2015-09-24 11:37:17 +08:00
Cheng Zhao
4bebfc4421 Bump v0.30.6 2015-08-26 15:46:53 +08:00
Cheng Zhao
ffa408755f mac: Do not set rounded corner by adding layer 2015-08-26 15:45:38 +08:00
12 changed files with 38 additions and 67 deletions

View File

@@ -48,4 +48,5 @@ contains documents describing how to build and contribute to Electron.
There is an [`electron` category on the Atom forums](http://discuss.atom.io/category/electron)
as well as an `#atom-shell` channel on Freenode.
Check out [awesome-electron](https://github.com/sindresorhus/awesome-electron) for a community maintained list of useful example apps, tools and resources.
Check out [awesome-electron](https://github.com/sindresorhus/awesome-electron)
for a community maintained list of useful example apps, tools and resources.

View File

@@ -4,7 +4,7 @@
'product_name%': 'Electron',
'company_name%': 'GitHub, Inc',
'company_abbr%': 'github',
'version%': '0.30.5',
'version%': '0.30.8',
},
'includes': [
'filenames.gypi',

View File

@@ -82,9 +82,6 @@ class NativeWindowMac : public NativeWindow {
// Called to handle a mouse event.
void HandleMouseEvent(NSEvent* event);
// Clip web view to rounded corner.
void ClipWebView();
protected:
// NativeWindow:
void HandleKeyboardEvent(

View File

@@ -22,9 +22,6 @@
namespace {
// The radius of rounded corner.
const CGFloat kAtomWindowCornerRadius = 4.0;
// Prevents window from resizing during the scope.
class ScopedDisableResize {
public:
@@ -41,10 +38,6 @@ bool ScopedDisableResize::disable_resize_ = false;
} // namespace
@interface NSView (PrivateMethods)
- (CGFloat)roundedCornerRadius;
@end
// This view always takes the size of its superview. It is intended to be used
// as a NSWindow's contentView. It is needed because NSWindow's implementation
// explicitly resizes the contentView at inopportune times.
@@ -153,9 +146,6 @@ bool ScopedDisableResize::disable_resize_ = false;
}
- (void)windowDidResize:(NSNotification*)notification {
if (!shell_->has_frame())
shell_->ClipWebView();
shell_->NotifyWindowResize();
}
@@ -613,8 +603,8 @@ void NativeWindowMac::Center() {
}
void NativeWindowMac::SetTitle(const std::string& title) {
// We don't want the title to show in transparent window.
if (transparent())
// We don't want the title to show in transparent or frameless window.
if (transparent() || !has_frame())
return;
[window_ setTitle:base::SysUTF8ToNSString(title)];
@@ -804,35 +794,27 @@ void NativeWindowMac::HandleKeyboardEvent(
}
void NativeWindowMac::InstallView() {
// Make sure the bottom corner is rounded: http://crbug.com/396264.
[[window_ contentView] setWantsLayer:YES];
NSView* view = inspectable_web_contents()->GetView()->GetNativeView();
if (has_frame()) {
// Add layer with white background for the contents view.
base::scoped_nsobject<CALayer> layer([[CALayer alloc] init]);
[layer setBackgroundColor:CGColorGetConstantColor(kCGColorWhite)];
[view setLayer:layer];
[view setFrame:[[window_ contentView] bounds]];
[[window_ contentView] addSubview:view];
} else {
if (base::mac::IsOSYosemiteOrLater()) {
// In OSX 10.10, adding subviews to the root view for the NSView hierarchy
// produces warnings. To eliminate the warnings, we resize the contentView
// to fill the window, and add subviews to that.
// http://crbug.com/380412
content_view_.reset([[FullSizeContentView alloc] init]);
[content_view_
setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
[content_view_ setFrame:[[[window_ contentView] superview] bounds]];
[window_ setContentView:content_view_];
// In OSX 10.10, adding subviews to the root view for the NSView hierarchy
// produces warnings. To eliminate the warnings, we resize the contentView
// to fill the window, and add subviews to that.
// http://crbug.com/380412
content_view_.reset([[FullSizeContentView alloc] init]);
[content_view_
setAutoresizingMask:NSViewWidthSizable | NSViewHeightSizable];
[content_view_ setFrame:[[[window_ contentView] superview] bounds]];
[window_ setContentView:content_view_];
[view setFrame:[content_view_ bounds]];
[content_view_ addSubview:view];
} else {
NSView* frameView = [[window_ contentView] superview];
[view setFrame:[frameView bounds]];
[frameView addSubview:view];
}
[view setFrame:[content_view_ bounds]];
[content_view_ addSubview:view];
ClipWebView();
InstallDraggableRegionView();
[[window_ standardWindowButton:NSWindowZoomButton] setHidden:YES];
@@ -851,14 +833,6 @@ void NativeWindowMac::UninstallView() {
[view removeFromSuperview];
}
void NativeWindowMac::ClipWebView() {
if (!web_contents())
return;
NSView* webView = web_contents()->GetNativeView();
webView.layer.masksToBounds = YES;
webView.layer.cornerRadius = kAtomWindowCornerRadius;
}
void NativeWindowMac::InstallDraggableRegionView() {
NSView* webView = web_contents()->GetNativeView();
base::scoped_nsobject<NSView> controlRegion(

View File

@@ -17,7 +17,7 @@
<key>CFBundleIconFile</key>
<string>atom.icns</string>
<key>CFBundleVersion</key>
<string>0.30.5</string>
<string>0.30.8</string>
<key>LSMinimumSystemVersion</key>
<string>10.8.0</string>
<key>NSMainNibFile</key>

View File

@@ -56,8 +56,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,30,5,0
PRODUCTVERSION 0,30,5,0
FILEVERSION 0,30,8,0
PRODUCTVERSION 0,30,8,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -74,12 +74,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "GitHub, Inc."
VALUE "FileDescription", "Electron"
VALUE "FileVersion", "0.30.5"
VALUE "FileVersion", "0.30.8"
VALUE "InternalName", "electron.exe"
VALUE "LegalCopyright", "Copyright (C) 2015 GitHub, Inc. All rights reserved."
VALUE "OriginalFilename", "electron.exe"
VALUE "ProductName", "Electron"
VALUE "ProductVersion", "0.30.5"
VALUE "ProductVersion", "0.30.8"
VALUE "SquirrelAwareVersion", "1"
END
END

View File

@@ -115,6 +115,14 @@ bool FillFileInfoWithNode(Archive::FileInfo* info,
Archive::Archive(const base::FilePath& path)
: path_(path),
file_(path_, base::File::FLAG_OPEN | base::File::FLAG_READ),
#if defined(OS_WIN)
fd_(_open_osfhandle(
reinterpret_cast<intptr_t>(file_.GetPlatformFile()), 0)),
#elif defined(OS_POSIX)
fd_(file_.GetPlatformFile()),
#else
fd_(-1),
#endif
header_size_(0) {
}
@@ -269,17 +277,7 @@ bool Archive::CopyFileOut(const base::FilePath& path, base::FilePath* out) {
}
int Archive::GetFD() const {
if (!file_.IsValid())
return -1;
#if defined(OS_WIN)
return
_open_osfhandle(reinterpret_cast<intptr_t>(file_.GetPlatformFile()), 0);
#elif defined(OS_POSIX)
return file_.GetPlatformFile();
#else
return -1;
#endif
return fd_;
}
} // namespace asar

View File

@@ -69,6 +69,7 @@ class Archive {
private:
base::FilePath path_;
base::File file_;
int fd_;
uint32 header_size_;
scoped_ptr<base::DictionaryValue> header_;

View File

@@ -7,7 +7,7 @@
#define ATOM_MAJOR_VERSION 0
#define ATOM_MINOR_VERSION 30
#define ATOM_PATCH_VERSION 5
#define ATOM_PATCH_VERSION 8
#define ATOM_VERSION_IS_RELEASE 1

View File

@@ -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'

View File

@@ -8,7 +8,7 @@ from lib.config import get_target_arch
from lib.util import safe_mkdir, rm_rf, extract_zip, tempdir, download
VERSION = 'v0.7.0'
VERSION = 'v0.8.0'
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
FRAMEWORKS_URL = 'http://github.com/atom/atom-shell-frameworks/releases' \
'/download/' + VERSION