mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-13 06:01:28 +00:00
Merge branch 'master' of git://github.com/280north/cappuccino
This commit is contained in:
@@ -132,10 +132,11 @@ ObjectiveJFlattener.prototype.buildApplicationJS = function(applicationRoot) {
|
||||
|
||||
buffer.push("(function(){");
|
||||
|
||||
buffer.push("var appURL = new CFURL('.', ObjectiveJ.pageURL);")
|
||||
|
||||
buffer.push(this.bundleBuffer.join("\n"));
|
||||
|
||||
buffer.push("var nodeStack = [];");
|
||||
buffer.push("var appURL = new CFURL('.', ObjectiveJ.pageURL);")
|
||||
buffer.push("var applicationRoot = ObjectiveJ.StaticResource.resourceAtURL(appURL, true);");
|
||||
buffer.push("var currentNode = null;");
|
||||
buffer.push("var newNode;");
|
||||
@@ -179,7 +180,8 @@ ObjectiveJFlattener.prototype.serializeStaticResources = function(node, depth) {
|
||||
stream.print("Writing bundle: \0cyan("+bundle.path()+"\0)");
|
||||
print(bundle.infoDictionary())
|
||||
|
||||
this.bundleBuffer.push("var bundle = new CFBundle("+JSON.stringify(this.rootPath.relative(bundle.path()).toString())+");");
|
||||
var relative = this.rootPath.relative(bundle.path()).toString();
|
||||
this.bundleBuffer.push("var bundle = new CFBundle("+(relative ? JSON.stringify(relative) : "appURL")+");");
|
||||
this.bundleBuffer.push("bundle._loadStatus = " + (1<<4) + ";");
|
||||
if (bundle.infoDictionary()) {
|
||||
this.bundleBuffer.push("bundle._infoDictionary = CFPropertyList.propertyListFromString(" +
|
||||
|
||||
+1
-1
@@ -238,7 +238,7 @@ function pressEnvironment(rootPath, outputFiles, environment, options) {
|
||||
total++;
|
||||
totalBytes += aFileExecutable.code().length
|
||||
}, this);
|
||||
stream.print(ObjectiveJ.sprintf(
|
||||
stream.print(_OBJJ.sprintf(
|
||||
"Saved \0green(%f%%\0) (\0blue(%s\0)); Total required files: \0magenta(%d\0) (\0blue(%s\0)) of \0magenta(%d\0) (\0blue(%s\0));",
|
||||
Math.round(((includedBytes - totalBytes) / totalBytes) * -100),
|
||||
bytesToString(totalBytes - includedBytes),
|
||||
|
||||
@@ -79,7 +79,8 @@ ObjectiveJRuntimeAnalyzer.prototype.initializeGlobalRecorder = function()
|
||||
});
|
||||
}
|
||||
else if (!currentFile) {
|
||||
CPLog.warn("currentFile is null. WTF.")
|
||||
// I don't know why this happens. It shouldn't.
|
||||
// CPLog.debug("currentFile is null.");
|
||||
}
|
||||
|
||||
before = after;
|
||||
|
||||
+13
-43
@@ -65,9 +65,7 @@ CFDictionary.prototype.containsKey = function(/*String*/ aKey)
|
||||
return hasOwnProperty.apply(this._buckets, [aKey]);
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
CFDictionary.prototype.containsKey.displayName = "CFDictionary.containsKey";
|
||||
#endif
|
||||
DISPLAY_NAME(CFDictionary.prototype.containsKey);
|
||||
|
||||
CFDictionary.prototype.containsValue = function(/*id*/ anObject)
|
||||
{
|
||||
@@ -83,30 +81,21 @@ CFDictionary.prototype.containsValue = function(/*id*/ anObject)
|
||||
return NO;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
CFDictionary.prototype.containsValue.displayName = "CFDictionary.containsValue";
|
||||
#endif
|
||||
|
||||
DISPLAY_NAME(CFDictionary.prototype.containsValue);
|
||||
|
||||
CFDictionary.prototype.count = function()
|
||||
{
|
||||
return this._count;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
CFDictionary.prototype.count.displayName = "CFDictionary.count";
|
||||
#endif
|
||||
|
||||
DISPLAY_NAME(CFDictionary.prototype.count);
|
||||
|
||||
CFDictionary.prototype.countOfKey = function(/*String*/ aKey)
|
||||
{
|
||||
return this.containsKey(aKey) ? 1 : 0;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
CFDictionary.prototype.countOfKey.displayName = "CFDictionary.countOfKey";
|
||||
#endif
|
||||
|
||||
DISPLAY_NAME(CFDictionary.prototype.countOfKey);
|
||||
|
||||
CFDictionary.prototype.countOfValue = function(/*id*/ anObject)
|
||||
{
|
||||
@@ -123,19 +112,14 @@ CFDictionary.prototype.countOfValue = function(/*id*/ anObject)
|
||||
return countOfValue;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
CFDictionary.prototype.countOfValue.displayName = "CFDictionary.countOfValue";
|
||||
#endif
|
||||
|
||||
DISPLAY_NAME(CFDictionary.prototype.countOfValue);
|
||||
|
||||
CFDictionary.prototype.keys = function()
|
||||
{
|
||||
return this._keys.slice();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
CFDictionary.prototype.keys.displayName = "CFDictionary.keys";
|
||||
#endif
|
||||
DISPLAY_NAME(CFDictionary.prototype.keys);
|
||||
|
||||
CFDictionary.prototype.valueForKey = function(/*String*/ aKey)
|
||||
{
|
||||
@@ -147,9 +131,7 @@ CFDictionary.prototype.valueForKey = function(/*String*/ aKey)
|
||||
return buckets[aKey];
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
CFDictionary.prototype.valueForKey.displayName = "CFDictionary.valueForKey";
|
||||
#endif
|
||||
DISPLAY_NAME(CFDictionary.prototype.valueForKey);
|
||||
|
||||
CFDictionary.prototype.toString = function()
|
||||
{
|
||||
@@ -168,9 +150,7 @@ CFDictionary.prototype.toString = function()
|
||||
return string + "}";
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
CFDictionary.prototype.toString.displayName = "CFDictionary.toString";
|
||||
#endif
|
||||
DISPLAY_NAME(CFDictionary.prototype.toString);
|
||||
|
||||
GLOBAL(CFMutableDictionary) = function(/*CFDictionary*/ aDictionary)
|
||||
{
|
||||
@@ -195,9 +175,7 @@ CFMutableDictionary.prototype.addValueForKey = function(/*String*/ aKey, /*Objec
|
||||
this._buckets[aKey] = aValue;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
CFMutableDictionary.prototype.addValueForKey.displayName = "CFMutableDictionary.addValueForKey";
|
||||
#endif
|
||||
DISPLAY_NAME(CFMutableDictionary.prototype.addValueForKey);
|
||||
|
||||
CFMutableDictionary.prototype.removeValueForKey = function(/*String*/ aKey)
|
||||
{
|
||||
@@ -228,9 +206,7 @@ CFMutableDictionary.prototype.removeValueForKey = function(/*String*/ aKey)
|
||||
delete this._buckets[aKey];
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
CFMutableDictionary.prototype.removeValueForKey.displayName = "CFMutableDictionary.removeValueForKey";
|
||||
#endif
|
||||
DISPLAY_NAME(CFMutableDictionary.prototype.removeValueForKey);
|
||||
|
||||
CFMutableDictionary.prototype.removeAllValues = function()
|
||||
{
|
||||
@@ -239,9 +215,7 @@ CFMutableDictionary.prototype.removeAllValues = function()
|
||||
this._buckets = { };
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
CFMutableDictionary.prototype.removeAllValues.displayName = "CFMutableDictionary.removeAllValues";
|
||||
#endif
|
||||
DISPLAY_NAME(CFMutableDictionary.prototype.removeAllValues);
|
||||
|
||||
CFMutableDictionary.prototype.replaceValueForKey = function(/*String*/ aKey, /*Object*/ aValue)
|
||||
{
|
||||
@@ -251,9 +225,7 @@ CFMutableDictionary.prototype.replaceValueForKey = function(/*String*/ aKey, /*O
|
||||
this._buckets[aKey] = aValue;
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
CFMutableDictionary.prototype.replaceValueForKey.displayName = "CFMutableDictionary.replaceValueForKey";
|
||||
#endif
|
||||
DISPLAY_NAME(CFMutableDictionary.prototype.replaceValueForKey);
|
||||
|
||||
CFMutableDictionary.prototype.setValueForKey = function(/*String*/ aKey, /*Object*/ aValue)
|
||||
{
|
||||
@@ -267,6 +239,4 @@ CFMutableDictionary.prototype.setValueForKey = function(/*String*/ aKey, /*Objec
|
||||
this.addValueForKey(aKey, aValue);
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
CFMutableDictionary.prototype.setValueForKey.displayName = "CFMutableDictionary.setValueForKey";
|
||||
#endif
|
||||
DISPLAY_NAME(CFMutableDictionary.prototype.setValueForKey);
|
||||
|
||||
@@ -121,7 +121,7 @@ function CFURLGetParts(/*CFURL*/ aURL)
|
||||
if (parts.path)
|
||||
{
|
||||
var split = parts.path.split("/"),
|
||||
pathComponents = parts.pathComponents;
|
||||
pathComponents = parts.pathComponents,
|
||||
index = 0,
|
||||
count = split.length;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user