bug 157638, "Land VENKMAN_FLOATS_MY_BOAT branch", a=scc
Landing the 3 month old branch, which fixes the following bugs...
121409, 103898, 116102, 116099, 127750, 127099, 121501, 127102, 127737, 127733, 150481, 156776, 156769, 153381, 153066, 152946, 127752, 116286, 143682, 130398, 129692, 156111, 127736, 130050, 139565, 128604, 127751, 127732, 127727, 103425, 85634, 139557, 125394
This commit is contained in:
rginda%netscape.com 2002-07-18 00:54:32 +00:00
Родитель 14d3a7e5dd
Коммит 92b1e3b67c
74 изменённых файлов: 14219 добавлений и 5538 удалений

Просмотреть файл

@ -36,13 +36,41 @@
/* components defined in this file */
const CLINE_SERVICE_CTRID =
"@mozilla.org/commandlinehandler/general-startup;1?type=venkman";
const CATMAN_CTRID = "@mozilla.org/categorymanager;1";
const CLINE_SERVICE_CID =
Components.ID("{18269616-1dd2-11b2-afa8-b612439bda27}");
const JSDPROT_HANDLER_CTRID =
"@mozilla.org/network/protocol;1?name=x-jsd";
const JSDPROT_HANDLER_CID =
Components.ID("{12ec790d-304e-4525-89a9-3e723d489d14}");
const nsICmdLineHandler = Components.interfaces.nsICmdLineHandler;
const nsICategoryManager = Components.interfaces.nsICategoryManager;
const nsISupports = Components.interfaces.nsISupports;
/* components used by this file */
const CATMAN_CTRID = "@mozilla.org/categorymanager;1";
const STRING_STREAM_CTRID = "@mozilla.org/io/string-input-stream;1";
const MEDIATOR_CTRID =
"@mozilla.org/appshell/window-mediator;1";
const SIMPLEURI_CTRID = "@mozilla.org/network/simple-uri;1";
const nsIWindowMediator = Components.interfaces.nsIWindowMediator;
const nsICmdLineHandler = Components.interfaces.nsICmdLineHandler;
const nsICategoryManager = Components.interfaces.nsICategoryManager;
const nsIProtocolHandler = Components.interfaces.nsIProtocolHandler;
const nsIURI = Components.interfaces.nsIURI;
const nsIURL = Components.interfaces.nsIURL;
const nsIStringInputStream = Components.interfaces.nsIStringInputStream;
const nsIChannel = Components.interfaces.nsIChannel;
const nsIRequest = Components.interfaces.nsIRequest;
const nsIProgressEventSink = Components.interfaces.nsIProgressEventSink;
const nsISupports = Components.interfaces.nsISupports;
function findDebuggerWindow ()
{
var windowManager =
Components.classes[MEDIATOR_CTRID].getService(nsIWindowMediator);
var window = windowManager.getMostRecentWindow("mozapp:venkman");
return window;
}
/* Command Line handler service */
function CLineService()
@ -50,17 +78,17 @@ function CLineService()
CLineService.prototype.commandLineArgument = "-venkman";
CLineService.prototype.prefNameForStartup = "general.startup.venkman";
CLineService.prototype.chromeUrlForTask="chrome://venkman/content";
CLineService.prototype.helpText = "Start with JavaScript debugger";
CLineService.prototype.handlesArgs=false;
CLineService.prototype.defaultArgs ="";
CLineService.prototype.openWindowWithArgs=false;
CLineService.prototype.chromeUrlForTask = "chrome://venkman/content";
CLineService.prototype.helpText = "Start with JavaScript Debugger.";
CLineService.prototype.handlesArgs = false;
CLineService.prototype.defaultArgs = "";
CLineService.prototype.openWindowWithArgs = false;
/* factory for command line handler service (CLineService) */
var CLineFactory = new Object();
CLineFactory.createInstance =
function (outer, iid) {
function clf_create (outer, iid) {
if (outer != null)
throw Components.results.NS_ERROR_NO_AGGREGATION;
@ -70,6 +98,277 @@ function (outer, iid) {
return new CLineService();
}
/* x-jsd: protocol handler */
const JSD_DEFAULT_PORT = 2206; /* Dana's apartment number. */
/* protocol handler factory object */
var JSDProtocolHandlerFactory = new Object();
JSDProtocolHandlerFactory.createInstance =
function jsdhf_create (outer, iid) {
if (outer != null)
throw Components.results.NS_ERROR_NO_AGGREGATION;
if (!iid.equals(nsIProtocolHandler) && !iid.equals(nsISupports))
throw Components.results.NS_ERROR_INVALID_ARG;
return new JSDProtocolHandler();
}
function JSDURI (spec, charset)
{
this.spec = this.prePath = spec;
this.charset = this.originCharset = charset;
}
JSDURI.prototype.QueryInterface =
function jsdch_qi (iid)
{
if (!iid.equals(nsIURI) && !iid.equals(nsIURL) &&
!iid.equals(nsISupports))
throw Components.results.NS_ERROR_NO_INTERFACE;
return this;
}
JSDURI.prototype.scheme = "x-jsd";
JSDURI.prototype.fileBaseName =
JSDURI.prototype.fileExtension =
JSDURI.prototype.filePath =
JSDURI.prototype.param =
JSDURI.prototype.query =
JSDURI.prototype.ref =
JSDURI.prototype.directory =
JSDURI.prototype.fileName =
JSDURI.prototype.username =
JSDURI.prototype.password =
JSDURI.prototype.hostPort =
JSDURI.prototype.path =
JSDURI.prototype.asciiHost =
JSDURI.prototype.userPass = "";
JSDURI.prototype.port = JSD_DEFAULT_PORT;
JSDURI.prototype.schemeIs =
function jsduri_schemeis (scheme)
{
return scheme.toLowerCase() == "x-jsd";
}
JSDURI.prototype.getCommonBaseSpec =
function jsduri_commonbase (uri)
{
return "x-jsd:";
}
JSDURI.prototype.getRelativeSpec =
function jsduri_commonbase (uri)
{
return uri;
}
JSDURI.prototype.equals =
function jsduri_equals (uri)
{
return uri.spec == this.spec;
}
JSDURI.prototype.clone =
function jsduri_clone ()
{
return new JSDURI (this.spec);
}
JSDURI.prototype.resolve =
function jsduri_resolve(path)
{
//dump ("resolve " + path + " from " + this.spec + "\n");
if (path[0] == "#")
return this.spec + path;
return path;
}
function JSDProtocolHandler()
{
/* nothing here */
}
JSDProtocolHandler.prototype.scheme = "x-jsd";
JSDProtocolHandler.prototype.defaultPort = JSD_DEFAULT_PORT;
JSDProtocolHandler.prototype.protocolFlags = nsIProtocolHandler.URI_NORELATIVE;
JSDProtocolHandler.prototype.allowPort =
function jsdph_allowport (aPort, aScheme)
{
return false;
}
JSDProtocolHandler.prototype.newURI =
function jsdph_newuri (spec, charset, baseURI)
{
if (baseURI)
{
debug ("-*- jsdHandler: aBaseURI passed to newURI, bailing.\n");
return null;
}
var clazz = Components.classes[SIMPLEURI_CTRID];
var uri = clazz.createInstance(nsIURI);
uri.spec = spec;
return uri;
}
JSDProtocolHandler.prototype.newChannel =
function jsdph_newchannel (uri)
{
return new JSDChannel (uri);
}
function JSDChannel (uri)
{
this.URI = uri;
this.originalURI = uri;
this._isPending = true;
var clazz = Components.classes[STRING_STREAM_CTRID];
this.stringStream = clazz.createInstance(nsIStringInputStream);
}
JSDChannel.prototype.QueryInterface =
function jsdch_qi (iid)
{
if (!iid.equals(nsIChannel) && !iid.equals(nsIRequest) &&
!iid.equals(nsISupports))
throw Components.results.NS_ERROR_NO_INTERFACE;
return this;
}
/* nsIChannel */
JSDChannel.prototype.loadAttributes = null;
JSDChannel.prototype.contentType = "text/html";
JSDChannel.prototype.contentLength = -1;
JSDChannel.prototype.owner = null;
JSDChannel.prototype.loadGroup = null;
JSDChannel.prototype.notificationCallbacks = null;
JSDChannel.prototype.securityInfo = null;
JSDChannel.prototype.open =
function jsdch_open()
{
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
}
JSDChannel.prototype.asyncOpen =
function jsdch_aopen (streamListener, context)
{
this.streamListener = streamListener;
this.context = context;
if (this.loadGroup)
this.loadGroup.addRequest (this, null);
var window = findDebuggerWindow();
var ary = this.URI.spec.match (/x-jsd:([^:]+)/);
var exception;
if (window && "console" in window && ary)
{
try
{
window.asyncOpenJSDURL (this, streamListener, context);
return;
}
catch (ex)
{
exception = ex;
}
}
var str =
"<html><head><title>Error</title></head><body>Could not load &lt;<b>" +
this.URI.spec + "</b>&gt;<br>";
if (!ary)
{
str += "<b>Error parsing uri.</b>";
}
else if (exception)
{
str += "<b>Internal error: " + exception + "</b><br><pre>" +
exception.stack;
}
else
{
str += "<b>Debugger is not running.</b>";
}
str += "</body></html>";
this.respond (str);
}
JSDChannel.prototype.respond =
function jsdch_respond (str)
{
this.streamListener.onStartRequest (this, this.context);
var len = str.length;
this.stringStream.setData (str, len);
this.streamListener.onDataAvailable (this, this.context,
this.stringStream, 0, len);
this.streamListener.onStopRequest (this, this.context,
Components.results.NS_OK);
if (this.loadGroup)
this.loadGroup.removeRequest (this, null, Components.results.NS_OK);
this._isPending = false;
}
/* nsIRequest */
JSDChannel.prototype.isPending =
function jsdch_ispending ()
{
return this._isPending;
}
JSDChannel.prototype.status = Components.results.NS_OK;
JSDChannel.prototype.cancel =
function jsdch_cancel (status)
{
if (this._isPending)
{
this._isPending = false;
this.streamListener.onStopRequest (this, this.context, status);
if (this.loadGroup)
{
try
{
this.loadGroup.removeRequest (this, null, status);
}
catch (ex)
{
debug ("we're not in the load group?\n");
}
}
}
this.status = status;
}
JSDChannel.prototype.suspend =
JSDChannel.prototype.resume =
function jsdch_notimpl ()
{
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
}
/*****************************************************************************/
var Module = new Object();
Module.registerSelf =
@ -77,7 +376,8 @@ function (compMgr, fileSpec, location, type)
{
debug("*** Registering -venkman handler.\n");
compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
compMgr =
compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar);
compMgr.registerFactoryLocation(CLINE_SERVICE_CID,
"Venkman CommandLine Service",
@ -90,7 +390,26 @@ function (compMgr, fileSpec, location, type)
catman.addCategoryEntry("command-line-argument-handlers",
"venkman command line handler",
CLINE_SERVICE_CTRID, true, true);
debug("*** Registering x-jsd protocol handler.\n");
compMgr.registerFactoryLocation(JSDPROT_HANDLER_CID,
"x-jsd protocol handler",
JSDPROT_HANDLER_CTRID,
fileSpec,
location,
type);
try
{
const JSD_CTRID = "@mozilla.org/js/jsd/debugger-service;1";
const jsdIDebuggerService = Components.interfaces.jsdIDebuggerService;
var jsds = Components.classes[JSD_CTRID].getService(jsdIDebuggerService);
jsds.initAtStartup = true;
}
catch (ex)
{
debug ("*** ERROR initializing debugger service");
debug (ex);
}
}
Module.unregisterSelf =
@ -109,11 +428,8 @@ function (compMgr, cid, iid) {
if (cid.equals(CLINE_SERVICE_CID))
return CLineFactory;
if (cid.equals(IRCCNT_HANDLER_CID))
return IRCContentHandlerFactory;
if (cid.equals(IRCPROT_HANDLER_CID))
return IRCProtocolHandlerFactory;
if (cid.equals(JSDPROT_HANDLER_CID))
return JSDProtocolHandlerFactory;
if (!iid.equals(Components.interfaces.nsIFactory))
throw Components.results.NS_ERROR_NOT_IMPLEMENTED;

Просмотреть файл

@ -33,7 +33,7 @@ function getAccessKey (str)
return str[i + 1];
}
function CommandRecord (name, func, usage, help, label, flags)
function CommandRecord (name, func, usage, help, label, flags, keystr)
{
this.name = name;
this.func = func;
@ -41,11 +41,13 @@ function CommandRecord (name, func, usage, help, label, flags)
this.scanUsage();
this.help = help;
this.label = label ? label : name;
this.labelstr = label.replace ("&", "");
this.flags = flags;
this._enabled = true;
this.key = null;
this.keystr = MSG_VAL_NA;
this.uiElements = new Object();
this.keyNodes = new Array();
this.keystr = keystr;
this.uiElements = new Array();
}
CommandRecord.prototype.__defineGetter__ ("enabled", cr_getenable);
@ -57,7 +59,7 @@ function cr_getenable ()
CommandRecord.prototype.__defineSetter__ ("enabled", cr_setenable);
function cr_setenable (state)
{
for (var i in this.uiElements)
for (var i = 0; i < this.uiElements.length; ++i)
{
if (state)
this.uiElements[i].removeAttribute ("disabled");
@ -96,7 +98,7 @@ function cr_scanusage()
var capNext = false;
this._usage = spec;
this.argNames = new Array();
this.argNames = new Array();
for (var i = 0; i < len; ++i)
{
@ -141,7 +143,7 @@ function cr_getdocs(flagFormatter)
var str;
str = getMsg(MSN_DOC_COMMANDLABEL,
[this.label.replace("&", ""), this.name]) + "\n";
str += getMsg(MSN_DOC_KEY, this.keystr) + "\n";
str += getMsg(MSN_DOC_KEY, this.keystr ? this.keystr : MSG_VAL_NA) + "\n";
str += getMsg(MSN_DOC_SYNTAX, [this.name, this.usage]) + "\n";
str += MSG_DOC_NOTES + "\n";
str += (flagFormatter ? flagFormatter(this.flags) : this.flags) + "\n\n";
@ -152,151 +154,137 @@ function cr_getdocs(flagFormatter)
CommandRecord.prototype.argNames = new Array();
function CommandManager ()
function CommandManager (defaultBundle)
{
this.commands = new Object();
this.defaultBundle = defaultBundle;
}
CommandManager.prototype.defineCommands =
function cmgr_defcmds (cmdary)
{
var len = cmdary.length;
var commands = new Object();
var bundle = ("stringBundle" in cmdary ?
cmdary.stringBundle :
this.defaultBundle);
for (var i = 0; i < len; ++i)
{
var name = cmdary[i][0];
var func = cmdary[i][1];
var flags = cmdary[i][2];
var usage = getMsgFrom(bundle, "cmd." + name + ".params", null, "");
var helpDefault;
var labelDefault = name;
var aliasFor;
if (flags & CMD_NO_HELP)
helpDefault = MSG_NO_HELP;
if (typeof func == "string")
{
var ary = func.match(/(\S+)/);
if (ary)
aliasFor = ary[1];
helpDefault = getMsg (MSN_DEFAULT_ALIAS_HELP, func);
labelDefault = getMsgFrom (bundle,
"cmd." + aliasFor + ".label", null, name);
}
var label = getMsgFrom(bundle,
"cmd." + name + ".label", null, labelDefault);
var help = getMsgFrom(bundle,
"cmd." + name + ".help", null, helpDefault);
var keystr = getMsgFrom (bundle, "cmd." + name + ".key", null, "");
var command = new CommandRecord (name, func, usage, help, label, flags,
keystr);
if (aliasFor)
command.aliasFor = aliasFor;
this.addCommand(command);
commands[name] = command;
}
return commands;
}
CommandManager.prototype.installKeys =
function cmgr_instkeys (document, commands)
{
var parentElem = document.getElementById("dynamic-keys");
if (!parentElem)
{
parentElem = document.createElement("keyset");
parentElem.setAttribute ("id", "dynamic-keys");
document.firstChild.appendChild (parentElem);
}
if (!commands)
commands = this.commands;
for (var c in commands)
this.installKey (parentElem, commands[c]);
}
/**
* Internal use only.
* Create a <key> node relative to a DOM node. Usually called once per command,
* per document, so that accelerator keys work in all application windows.
*
* |showPopup| is called from the "onpopupshowing" event of menus
* managed by the CommandManager. If a command is disabled, represents a command
* that cannot be "satisfied" by the current command context |cx|, or has an
* "enabledif" attribute that eval()s to false, then the menuitem is disabled.
* In addition "checkedif" and "visibleif" attributes are eval()d and
* acted upon accordingly.
* @param parentElem A reference to the DOM node which should contain the new
* <key> node.
* @param command reference to the CommandRecord to install.
*/
CommandManager.showPopup =
function cmgr_showpop (id)
CommandManager.prototype.installKey =
function cmgr_instkey (parentElem, command)
{
/* returns true if the command context has the properties required to
* execute the command associated with |menuitem|.
*/
function satisfied()
if (!command.keystr)
return;
var ary = command.keystr.match (/(.*\s)?([\S]+)$/);
if (!ASSERT(ary, "couldn't parse key string ``" + command.keystr +
"'' for command ``" + command.name + "''"))
{
if (menuitem.hasAttribute("isSeparator"))
return true;
if (!("commandManager" in cx))
{
dd ("no commandManager in cx");
return false;
}
var name = menuitem.getAttribute("commandname");
if (!ASSERT (name in cx.commandManager.commands,
"menu contains unknown command '" + name + "'"))
return false;
var command = cx.commandManager.commands[name];
var rv = cx.commandManager.isCommandSatisfied(cx, command);
delete cx.parseError;
return rv;
return;
}
/* Convenience function for "enabledif", etc, attributes. */
function has (prop)
{
return (prop in cx);
}
var key = document.createElement ("key");
key.setAttribute ("id", "key:" + command.name);
key.setAttribute ("oncommand", "dispatch('" + command.name + "');");
key.setAttribute ("modifiers", ary[1]);
if (ary[2].indexOf("VK_") == 0)
key.setAttribute ("keycode", ary[2]);
else
key.setAttribute ("key", ary[2]);
/* evals the attribute named |attr| on the node |node|. */
function evalIfAttribute (node, attr)
parentElem.appendChild(key);
command.keyNodes.push(key);
}
CommandManager.prototype.uninstallKeys =
function cmgr_uninstkeys (commands)
{
if (!commands)
commands = this.commands;
for (var c in commands)
this.uninstallKey (commands[c]);
}
CommandManager.prototype.uninstallKey =
function cmgr_uninstkey (command)
{
for (var i in command.keyNodes)
{
var ex;
var expr = node.getAttribute(attr);
if (!expr)
return true;
expr = expr.replace (/\Wor\W/gi, " || ");
expr = expr.replace (/\Wand\W/gi, " && ");
try
{
return eval("(" + expr + ")");
/* document may no longer exist in a useful state. */
command.keyNodes[i].parentNode.removeChild(command.keyNodes[i]);
}
catch (ex)
{
dd ("caught exception evaling '" + node.getAttribute("id") + "'.'" +
attr + "'\n" + ex);
dd ("*** caught exception uninstalling key node: " + ex);
}
return true;
}
var cx;
/* If the host provided a |contextFunction|, use it now. Remember the
* return result as this.cx for use if something from this menu is actually
* dispatched. this.cx is deleted in |hidePopup|. */
if (typeof this.contextFunction == "function")
cx = this.cx = this.contextFunction (id);
else
cx = new Object();
/* make this a member of cx so the |this| value is useful to attriutes. */
var popup = document.getElementById (id);
var menuitem = popup.firstChild;
do
{
/* should it be visible? */
if (menuitem.hasAttribute("visibleif"))
{
if (evalIfAttribute(menuitem, "visibleif"))
menuitem.removeAttribute ("hidden");
else
{
menuitem.setAttribute ("hidden", "true");
continue;
}
}
/* ok, it's visible, maybe it should be disabled? */
if (satisfied())
{
if (menuitem.hasAttribute("enabledif"))
{
if (evalIfAttribute(menuitem, "enabledif"))
menuitem.removeAttribute ("disabled");
else
menuitem.setAttribute ("disabled", "true");
}
else
menuitem.removeAttribute ("disabled");
}
else
{
menuitem.setAttribute ("disabled", "true");
}
/* should it have a check? */
if (menuitem.hasAttribute("checkedif"))
{
if (evalIfAttribute(menuitem, "checkedif"))
menuitem.setAttribute ("checked", "true");
else
menuitem.removeAttribute ("checked");
}
} while ((menuitem = menuitem.nextSibling));
return true;
}
/**
* Internal use only.
*
* |hidePopup| is called from the "onpopuphiding" event of menus
* managed by the CommandManager. Here we just clean up the context, which
* would have (and may have) become the event object used by any command
* dispatched while the menu was open.
*/
CommandManager.hidePopup =
function cmgr_hidepop (id)
{
delete this.cx;
}
/**
@ -308,255 +296,120 @@ function cmgr_add (command)
this.commands[command.name] = command;
}
/**
* Set the accelerator key used to trigger a command. Multiple keys can be
* assigned to a command, but only the last one will appear in the documentation
* entry for the command.
* @param parent ID of the keyset to add the <key> to.
* @param command reference to the CommandRecord which should be dispatced.
* @param keystr String representation of the key, in the format
* <modifiers> (<key>|<keycode>), where the parameter names
* represent attributes on the <key> object.
*/
CommandManager.prototype.setKey =
function cmgr_add (parent, command, keystr)
CommandManager.prototype.removeCommands =
function cmgr_removes (commands)
{
var parentElem = document.getElementById(parent);
if (!ASSERT(parentElem, "setKey: couldn't get parent '" + parent +
"' for " + command.name))
return;
for (var c in commands)
this.removeCommand(commands[c]);
}
var ary = keystr.match (/(.*\s)?([\S]+)$/);
var key = document.createElement ("key");
key.setAttribute ("id", "key:" + command.name);
key.setAttribute ("oncommand",
"dispatch('" + command.name + "');");
key.setAttribute ("modifiers", ary[1]);
if (ary[2].indexOf("VK_") == 0)
key.setAttribute ("keycode", ary[2]);
CommandManager.prototype.removeCommand =
function cmgr_remove (command)
{
delete this.commands[command.name];
}
/**
* Register a hook for a particular command name. |id| is a human readable
* identifier for the hook, and can be used to unregister the hook. If you
* re-use a hook id, the previous hook function will be replaced.
* If |before| is |true|, the hook will be called *before* the command executes,
* if |before| is |false|, or not specified, the hook will be called *after*
* the command executes.
*/
CommandManager.prototype.addHook =
function cmgr_hook (commandName, func, id, before)
{
if (!ASSERT(commandName in this.commands,
"Unknown command '" + commandName + "'"))
{
return;
}
var command = this.commands[commandName];
if (before)
{
if (!("beforeHookNames" in command))
command.beforeHookNames = new Array();
if (!("beforeHooks" in command))
command.beforeHooks = new Object();
if (id in command.beforeHooks)
{
arrayRemoveAt(command.beforeHookNames,
command.beforeHooks[id][id + "_hookIndex"]);
}
command.beforeHooks[id] = func;
command.beforeHookNames.push(id);
}
else
key.setAttribute ("key", ary[2]);
parentElem.appendChild(key);
command.key = key;
command.keystr = keystr;
{
if (!("afterHookNames" in command))
command.afterHookNames = new Array();
if (!("afterHooks" in command))
command.afterHooks = new Object();
func[id + "_hookIndex"] = command.afterHookNames.length
command.afterHooks[id] = func;
command.afterHookNames.push(id);
}
}
/**
* Internal use only.
*
* Registers event handlers on a given menu.
*/
CommandManager.prototype.hookPopup =
function cmgr_hookpop (id)
CommandManager.prototype.addHooks =
function cmgr_hooks (hooks, prefix)
{
var element = document.getElementById (id);
element.setAttribute ("onpopupshowing",
"return CommandManager.showPopup('" + id + "');");
element.setAttribute ("onpopuphiding",
"return CommandManager.hidePopup();");
if (!prefix)
prefix = "";
for (var h in hooks)
{
this.addHook(h, hooks[h], prefix + ":" + h,
("before" in hooks[h]) ? hooks[h].before : false);
}
}
/**
* Appends a sub-menu to an existing menu.
* @param parent ID of the parent menu to add this submenu to.
* @param id ID of the sub-menu to add.
* @param label Text to use for this sub-menu. The & character can be
* used to indicate the accesskey.
* @param attribs Object containing CSS attributes to set on the element.
*/
CommandManager.prototype.appendSubMenu =
function cmgr_addsmenu (parent, id, label, attribs)
CommandManager.prototype.removeHooks =
function cmgr_remhooks (hooks, prefix)
{
var menu = document.getElementById (id);
if (!menu)
{
var parentElem = document.getElementById(parent + "-popup");
if (!parentElem)
parentElem = document.getElementById(parent);
if (!ASSERT(parentElem, "addSubMenu: couldn't get parent '" + parent +
"' for " + id))
return;
if (!prefix)
prefix = "";
menu = document.createElement ("menu");
menu.setAttribute ("id", id);
parentElem.appendChild(menu);
}
menu.setAttribute ("accesskey", getAccessKey(label));
menu.setAttribute ("label", label.replace("&", ""));
menu.setAttribute ("isSeparator", true);
var menupopup = document.createElement ("menupopup");
menupopup.setAttribute ("id", id + "-popup");
if (typeof attribs == "object")
for (var h in hooks)
{
for (var p in attribs)
menupopup.setAttribute (p, attribs[p]);
this.removeHook(h, prefix + ":" + h,
("before" in hooks[h]) ? hooks[h].before : false);
}
menu.appendChild(menupopup);
this.hookPopup (id + "-popup");
}
/**
* Appends a popup to an existing popupset.
* @param parent ID of the popupset to add this popup to.
* @param id ID of the popup to add.
* @param label Text to use for this popup. Popup menus don't normally have
* labels, but we set a "label" attribute anyway, in case
* the host wants it for some reason. Any "&" characters will
* be stripped.
* @param attribs Object containing CSS attributes to set on the element.
*/
CommandManager.prototype.appendPopupMenu =
function cmgr_addsmenu (parent, id, label, attribs)
CommandManager.prototype.removeHook =
function cmgr_unhook (commandName, id, before)
{
var parentElem = document.getElementById (parent);
if (!ASSERT(parentElem, "addPopupMenu: couldn't get parent '" + parent +
"' for " + id))
return;
var command = this.commands[commandName];
var popup = document.createElement ("popup");
popup.setAttribute ("label", label.replace("&", ""));
popup.setAttribute ("id", id);
if (typeof attribs == "object")
if (before)
{
for (var p in attribs)
popup.setAttribute (p, attribs[p]);
arrayRemoveAt(command.beforeHookNames,
command.beforeHooks[id][id + "_hookIndex"]);
delete command.beforeHooks[id][id + "_hookIndex"];
delete command.beforeHooks[id];
if (keys(command.beforeHooks).length == 0)
{
delete command.beforeHookNames;
delete command.beforeHooks;
}
}
else
{
arrayRemoveAt(command.afterHookNames,
command.afterHooks[id][id + "_hookIndex"]);
delete command.afterHooks[id][id + "_hookIndex"];
delete command.afterHooks[id];
if (command.afterHookNames.length == 0)
{
delete command.afterHookNames;
delete command.afterHooks;
}
}
parentElem.appendChild(popup);
this.hookPopup (id);
}
/**
* Appends a menuitem to an existing menu or popup.
* @param parent ID of the popup to add this menuitem to.
* @param command A reference to the CommandRecord this menu item will represent.
* @param attribs Object containing CSS attributes to set on the element.
*/
CommandManager.prototype.appendMenuItem =
function cmgr_addmenu (parent, command, attribs)
{
if (command == "-")
{
this.appendMenuSeparator(parent, attribs);
return;
}
var parentElem = document.getElementById(parent + "-popup");
if (!parentElem)
parentElem = document.getElementById(parent);
if (!ASSERT(parentElem, "appendMenuItem: couldn't get parent '" + parent +
"' for " + command.name))
return;
var menuitem = document.createElement ("menuitem");
var id = parent + ":" + command.name;
menuitem.setAttribute ("id", id);
menuitem.setAttribute ("commandname", command.name);
menuitem.setAttribute ("key", "key:" + command.name);
menuitem.setAttribute ("accesskey", getAccessKey(command.label));
menuitem.setAttribute ("label", command.label.replace("&", ""));
menuitem.setAttribute ("oncommand",
"dispatch('" + command.name + "');");
if (typeof attribs == "object")
{
for (var p in attribs)
menuitem.setAttribute (p, attribs[p]);
}
command.uiElements[id] = menuitem;
parentElem.appendChild (menuitem);
}
/**
* Appends a menuseparator to an existing menu or popup.
* @param parent ID of the popup to add this menuitem to.
*/
CommandManager.prototype.appendMenuSeparator =
function cmgr_addsep (parent)
{
var parentElem = document.getElementById(parent + "-popup");
if (!parentElem)
parentElem = document.getElementById(parent);
if (!ASSERT(parentElem, "appendMenuSeparator: couldn't get parent '" +
parent + "'"))
return;
var menuitem = document.createElement ("menuseparator");
menuitem.setAttribute ("isSeparator", true);
if (typeof attribs == "object")
{
for (var p in attribs)
menuitem.setAttribute (p, attribs[p]);
}
parentElem.appendChild (menuitem);
}
/**
* Appends a toolbaritem to an existing box element.
* @param parent ID of the box to add this toolbaritem to.
* @param command A reference to the CommandRecord this toolbaritem will
* represent.
* @param attribs Object containing CSS attributes to set on the element.
*/
CommandManager.prototype.appendToolbarItem =
function cmgr_addtb (parent, command, attribs)
{
if (command == "-")
{
this.appendToolbarSeparator(parent, attribs);
return;
}
var parentElem = document.getElementById(parent);
if (!ASSERT(parentElem, "appendToolbarItem: couldn't get parent '" + parent +
"' for " + command.name))
return;
var tbitem = document.createElement ("toolbarbutton");
// separate toolbar id's with a "-" character, because : intereferes with css
var id = parent + "-" + command.name;
tbitem.setAttribute ("id", id);
tbitem.setAttribute ("class", "toolbarbutton-1");
tbitem.setAttribute ("label", command.label.replace("&", ""));
tbitem.setAttribute ("oncommand",
"dispatch('" + command.name + "');");
if (typeof attribs == "object")
{
for (var p in attribs)
tbitem.setAttribute (p, attribs[p]);
}
command.uiElements[id] = tbitem;
parentElem.appendChild (tbitem);
}
/**
* Appends a toolbarseparator to an existing box.
* @param parent ID of the box to add this toolbarseparator to.
*/
CommandManager.prototype.appendToolbarSeparator =
function cmgr_addmenu (parent)
{
var parentElem = document.getElementById(parent);
if (!ASSERT(parentElem, "appendToolbarSeparator: couldn't get parent '" +
parent + "'"))
return;
var tbitem = document.createElement ("toolbarseparator");
tbitem.setAttribute ("isSeparator", true);
if (typeof attribs == "object")
{
for (var p in attribs)
tbitem.setAttribute (p, attribs[p]);
}
parentElem.appendChild (tbitem);
}
/**
@ -574,8 +427,8 @@ function cmgr_list (partialName, flags)
* all commands if |partialName| is not specified */
function compare (a, b)
{
a = a.label.toLowerCase().replace("&", "");
b = b.label.toLowerCase().replace("&", "");
a = a.labelstr.toLowerCase();
b = b.labelstr.toLowerCase();
if (a == b)
return 0;
@ -723,7 +576,7 @@ function parse_parseargsraw (e)
}
}
if (e.inputData)
if ("inputData" in e && e.inputData)
{
/* if data has been provided, parse it */
e.unparsedData = e.inputData;
@ -792,7 +645,7 @@ function parse_parseargsraw (e)
* Returns true if |e| has the properties required to call the command |command|.
* If |command| is not provided, |e.command| is used instead.
* @param e Event object to test against the command.
* @param command Command to text.
* @param command Command to test.
*/
CommandManager.prototype.isCommandSatisfied =
function cmgr_isok (e, command)
@ -821,7 +674,7 @@ function cmgr_isok (e, command)
}
/**
* Internally use only.
* Internal use only.
* See parseArguments above and the |argTypes| object below.
*
* Parses the next argument by calling an appropriate parser function, or the
@ -868,7 +721,7 @@ function at_alias (list, type)
* Parses an integer, stores result in |e[name]|.
*/
CommandManager.prototype.argTypes["int"] =
function parse_number (e, name)
function parse_int (e, name)
{
var ary = e.unparsedData.match (/(\d+)(?:\s+(.*))?$/);
if (!ary)
@ -886,7 +739,7 @@ function parse_number (e, name)
* Stores result in |e[name]|.
*/
CommandManager.prototype.argTypes["word"] =
function parse_number (e, name)
function parse_word (e, name)
{
var ary = e.unparsedData.match (/(\S+)(?:\s+(.*))?$/);
if (!ary)
@ -905,13 +758,13 @@ function parse_number (e, name)
* Stores result in |e[name]|.
*/
CommandManager.prototype.argTypes["state"] =
function parse_number (e, name)
function parse_state (e, name)
{
var ary =
e.unparsedData.match (/(true|on|yes|1|false|off|no|0)(?:\s+(.*))?$/i);
if (!ary)
return false;
if (ary[1].toLowerCase().search(/true|on|yes|1/i) != -1)
if (ary[1].search(/true|on|yes|1/i) != -1)
e[name] = true;
else
e[name] = false;
@ -929,7 +782,7 @@ function parse_number (e, name)
* Stores result in |e[name]|.
*/
CommandManager.prototype.argTypes["toggle"] =
function parse_number (e, name)
function parse_toggle (e, name)
{
var ary = e.unparsedData.match
(/(toggle|true|on|yes|1|false|off|no|0)(?:\s+(.*))?$/i);
@ -954,7 +807,7 @@ function parse_number (e, name)
* Stores result in |e[name]|.
*/
CommandManager.prototype.argTypes["rest"] =
function parse_number (e, name)
function parse_rest (e, name)
{
e[name] = e.unparsedData;
e.unparsedData = "";

Просмотреть файл

@ -92,6 +92,11 @@ function htmlBR(attribs)
return HTML("html:br", attribs, argumentsAsArray(arguments, 1));
}
function htmlWBR(attribs)
{
return HTML("html:wbr", attribs, argumentsAsArray(arguments, 1));
}
function htmlImg(attribs, src)
{
var img = HTML("html:img", attribs, argumentsAsArray(arguments, 2));

Просмотреть файл

@ -0,0 +1,497 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The JavaScript Debugger
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
function MenuManager (commandManager, menuSpecs, contextFunction, commandStr)
{
var menuManager = this;
this.commandManager = commandManager;
this.menuSpecs = menuSpecs;
this.contextFunction = contextFunction;
this.commandStr = commandStr;
this.onPopupShowing =
function mmgr_onshow (event) { return menuManager.showPopup (event); };
this.onPopupHiding =
function mmgr_onhide (event) { return menuManager.hidePopup (event); };
}
/**
* Internal use only.
*
* Registers event handlers on a given menu.
*/
MenuManager.prototype.hookPopup =
function mmgr_hookpop (node)
{
node.addEventListener ("popupshowing", this.onPopupShowing, false);
node.addEventListener ("popuphiding", this.onPopupHiding, false);
}
/**
* Internal use only.
*
* |showPopup| is called from the "onpopupshowing" event of menus
* managed by the CommandManager. If a command is disabled, represents a command
* that cannot be "satisfied" by the current command context |cx|, or has an
* "enabledif" attribute that eval()s to false, then the menuitem is disabled.
* In addition "checkedif" and "visibleif" attributes are eval()d and
* acted upon accordingly.
*/
MenuManager.prototype.showPopup =
function mmgr_showpop (event)
{
//dd ("showPopup {");
/* returns true if the command context has the properties required to
* execute the command associated with |menuitem|.
*/
function satisfied()
{
if (menuitem.hasAttribute("isSeparator"))
return true;
if (!("menuManager" in cx))
{
dd ("no menuManager in cx");
return false;
}
var name = menuitem.getAttribute("commandname");
var commandManager = cx.menuManager.commandManager;
var commands = commandManager.commands;
if (!ASSERT (name in commands,
"menu contains unknown command '" + name + "'"))
{
return false;
}
var rv = commandManager.isCommandSatisfied(cx, commands[name]);
delete cx.parseError;
return rv;
};
/* Convenience function for "enabledif", etc, attributes. */
function has (prop)
{
return (prop in cx);
};
/* evals the attribute named |attr| on the node |node|. */
function evalIfAttribute (node, attr)
{
var ex;
var expr = node.getAttribute(attr);
if (!expr)
return true;
expr = expr.replace (/\Wand\W/gi, " && ");
try
{
return eval("(" + expr + ")");
}
catch (ex)
{
dd ("caught exception evaling '" + node.getAttribute("id") + "'.'" +
attr + "'\n" + ex);
}
return true;
};
var cx;
var popup = event.originalTarget;
var menuitem = popup.firstChild;
/* If the host provided a |contextFunction|, use it now. Remember the
* return result as this.cx for use if something from this menu is actually
* dispatched. this.cx is deleted in |hidePopup|. */
if (typeof this.contextFunction == "function")
{
cx = this.cx = this.contextFunction (popup.getAttribute("menuName"),
event);
}
else
{
cx = this.cx = { menuManager: this, originalEvent: event };
}
do
{
/* should it be visible? */
if (menuitem.hasAttribute("visibleif"))
{
if (evalIfAttribute(menuitem, "visibleif"))
menuitem.removeAttribute ("hidden");
else
{
menuitem.setAttribute ("hidden", "true");
continue;
}
}
/* ok, it's visible, maybe it should be disabled? */
if (satisfied())
{
if (menuitem.hasAttribute("enabledif"))
{
if (evalIfAttribute(menuitem, "enabledif"))
menuitem.removeAttribute ("disabled");
else
menuitem.setAttribute ("disabled", "true");
}
else
menuitem.removeAttribute ("disabled");
}
else
{
menuitem.setAttribute ("disabled", "true");
}
/* should it have a check? */
if (menuitem.hasAttribute("checkedif"))
{
if (evalIfAttribute(menuitem, "checkedif"))
menuitem.setAttribute ("checked", "true");
else
menuitem.removeAttribute ("checked");
}
} while ((menuitem = menuitem.nextSibling));
//dd ("}");
return true;
}
/**
* Internal use only.
*
* |hidePopup| is called from the "onpopuphiding" event of menus
* managed by the CommandManager. Nothing to do here anymore.
* We used to just clean up this.cx, but that's a problem for nested
* menus.
*/
MenuManager.prototype.hidePopup =
function mmgr_hidepop (id)
{
return true;
}
/**
* Appends a sub-menu to an existing menu.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param id ID of the sub-menu to add.
* @param label Text to use for this sub-menu. The & character can be
* used to indicate the accesskey.
* @param attribs Object containing CSS attributes to set on the element.
*/
MenuManager.prototype.appendSubMenu =
function mmgr_addsmenu (parentNode, beforeNode, menuName, domId, label, attribs)
{
var document = parentNode.ownerDocument;
/* sometimes the menu is already there, for overlay purposes. */
var menu = document.getElementById(domId);
if (!menu)
{
menu = document.createElement ("menu");
menu.setAttribute ("id", domId);
parentNode.insertBefore(menu, beforeNode);
}
var menupopup = menu.firstChild;
if (!menupopup)
{
menupopup = document.createElement ("menupopup");
menupopup.setAttribute ("id", domId + "-popup");
menu.appendChild(menupopup);
menupopup = menu.firstChild;
}
menupopup.setAttribute ("menuName", menuName);
menu.setAttribute ("accesskey", getAccessKey(label));
menu.setAttribute ("label", label.replace("&", ""));
menu.setAttribute ("isSeparator", true);
if (typeof attribs == "object")
{
for (var p in attribs)
menu.setAttribute (p, attribs[p]);
}
this.hookPopup (menupopup);
return menupopup;
}
/**
* Appends a popup to an existing popupset.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param id ID of the popup to add.
* @param label Text to use for this popup. Popup menus don't normally have
* labels, but we set a "label" attribute anyway, in case
* the host wants it for some reason. Any "&" characters will
* be stripped.
* @param attribs Object containing CSS attributes to set on the element.
*/
MenuManager.prototype.appendPopupMenu =
function mmgr_addpmenu (parentNode, beforeNode, menuName, id, label, attribs)
{
var document = parentNode.ownerDocument;
var popup = document.createElement ("popup");
popup.setAttribute ("id", id);
if (label)
popup.setAttribute ("label", label.replace("&", ""));
if (typeof attribs == "object")
{
for (var p in attribs)
popup.setAttribute (p, attribs[p]);
}
popup.setAttribute ("menuName", menuName);
parentNode.insertBefore(popup, beforeNode);
this.hookPopup (popup);
return popup;
}
/**
* Appends a menuitem to an existing menu or popup.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param command A reference to the CommandRecord this menu item will represent.
* @param attribs Object containing CSS attributes to set on the element.
*/
MenuManager.prototype.appendMenuItem =
function mmgr_addmenu (parentNode, beforeNode, commandName, attribs)
{
var menuManager = this;
var document = parentNode.ownerDocument;
if (commandName == "-")
return this.appendMenuSeparator(parentNode, beforeNode, attribs);
var parentId = parentNode.getAttribute("id");
if (!ASSERT(commandName in this.commandManager.commands,
"unknown command " + commandName + " targeted for " +
parentId))
{
return null;
}
var command = this.commandManager.commands[commandName];
var menuitem = document.createElement ("menuitem");
menuitem.setAttribute ("id", parentId + ":" + commandName);
menuitem.setAttribute ("commandname", command.name);
menuitem.setAttribute ("key", "key:" + command.name);
menuitem.setAttribute ("accesskey", getAccessKey(command.label));
menuitem.setAttribute ("label", command.label.replace("&", ""));
menuitem.setAttribute ("oncommand", this.commandStr);
if (typeof attribs == "object")
{
for (var p in attribs)
menuitem.setAttribute (p, attribs[p]);
}
command.uiElements.push(menuitem);
parentNode.insertBefore (menuitem, beforeNode);
return menuitem;
}
/**
* Appends a menuseparator to an existing menu or popup.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param attribs Object containing CSS attributes to set on the element.
*/
MenuManager.prototype.appendMenuSeparator =
function mmgr_addsep (parentNode, beforeNode, attribs)
{
var document = parentNode.ownerDocument;
var menuitem = document.createElement ("menuseparator");
menuitem.setAttribute ("isSeparator", true);
if (typeof attribs == "object")
{
for (var p in attribs)
menuitem.setAttribute (p, attribs[p]);
}
parentNode.insertBefore (menuitem, beforeNode);
return menuitem;
}
/**
* Appends a toolbaritem to an existing box element.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param command A reference to the CommandRecord this toolbaritem will
* represent.
* @param attribs Object containing CSS attributes to set on the element.
*/
MenuManager.prototype.appendToolbarItem =
function mmgr_addtb (parentNode, beforeNode, commandName, attribs)
{
if (commandName == "-")
return this.appendToolbarSeparator(parentNode, beforeNode, attribs);
var parentId = parentNode.getAttribute("id");
if (!ASSERT(commandName in this.commandManager.commands,
"unknown command " + commandName + " targeted for " +
parentId))
{
return null;
}
var command = this.commandManager.commands[commandName];
var document = parentNode.ownerDocument;
var tbitem = document.createElement ("toolbarbutton");
var id = parentNode.getAttribute("id") + ":" + commandName;
tbitem.setAttribute ("id", id);
tbitem.setAttribute ("class", "toolbarbutton-1");
tbitem.setAttribute ("label", command.label.replace("&", ""));
tbitem.setAttribute ("oncommand",
"dispatch('" + commandName + "');");
if (typeof attribs == "object")
{
for (var p in attribs)
tbitem.setAttribute (p, attribs[p]);
}
command.uiElements.push(tbitem);
parentNode.insertBefore (tbitem, beforeNode);
return tbitem;
}
/**
* Appends a toolbarseparator to an existing box.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param attribs Object containing CSS attributes to set on the element.
*/
MenuManager.prototype.appendToolbarSeparator =
function mmgr_addmenu (parentNode, beforeNode, attribs)
{
var document = parentNode.ownerDocument;
var tbitem = document.createElement ("toolbarseparator");
tbitem.setAttribute ("isSeparator", true);
if (typeof attribs == "object")
{
for (var p in attribs)
tbitem.setAttribute (p, attribs[p]);
}
parentNode.appendChild (tbitem);
return tbitem;
}
/**
* Creates menu DOM nodes from a menu specification.
* @param parentNode DOM Node to insert into
* @param beforeNode DOM Node already contained by parentNode, to insert before
* @param menuSpec array of menu items
*/
MenuManager.prototype.createMenu =
function mmgr_newmenu (parentNode, beforeNode, menuName, domId, attribs)
{
if (typeof domId == "undefined")
domId = menuName;
if (!ASSERT(menuName in this.menuSpecs, "unknown menu name " + menuName))
return null;
var menuSpec = this.menuSpecs[menuName];
var subMenu = this.appendSubMenu (parentNode, beforeNode, menuName, domId,
menuSpec.label, attribs);
this.createMenuItems (subMenu, null, menuSpec.items);
return subMenu;
}
MenuManager.prototype.createMenuItems =
function mmgr_newitems (parentNode, beforeNode, menuItems)
{
function itemAttribs()
{
return (1 in menuItems[i]) ? menuItems[i][1] : null;
};
var parentId = parentNode.getAttribute("id");
for (var i in menuItems)
{
var itemName = menuItems[i][0];
if (itemName[0] == ">")
{
itemName = itemName.substr(1);
if (!ASSERT(itemName in this.menuSpecs,
"unknown submenu " + itemName + " referenced in " +
parentId))
{
continue;
}
this.createMenu (parentNode, beforeNode, itemName,
parentId + ":" + itemName, itemAttribs());
}
else if (itemName in this.commandManager.commands)
{
this.appendMenuItem (parentNode, beforeNode, itemName,
itemAttribs());
}
else if (itemName == "-")
{
this.appendMenuSeparator (parentNode, beforeNode, itemAttribs());
}
else
{
dd ("unknown command " + itemName + " referenced in " + parentId);
}
}
}

Просмотреть файл

@ -0,0 +1,4 @@
# full-url, file-name, function-name, start-line, end-line, call-count, recurse-depth, total-time, min-time, max-time, avg-time
@-item-start
$full-url, $file-name, $function-name, $start-line, $end-line, $call-count, $recurse-depth, $total-time, $min-time, $max-time, $avg-time
@-item-end

Просмотреть файл

@ -70,14 +70,16 @@
<span class="value">$user-agent</span><br>
<span class="label">JavaScript Debugger Version:</span>
<span class="value">$venkman-agent</span><br>
<span class="label">Sorted By:</span>
<span class="value">$sort-key</span><br>
<a name="section0"></a>
<!--@section-start-->
@-section-start
<hr>
<span class="section-box">
<a name="section$section-number"></a>
<h2 class="section-title">$section-link</h2>
<a name="range$section-number:0"></a>
<!--@range-start-->
@-range-start
<span class="range-box">
<a name="range$section-number:$range-number"></a>
<h3>$range-min - $range-max ms</h3>
@ -85,7 +87,7 @@
<a href="#section$section-number-next">Next File</a> |
<a href="#range$section-number:$range-number-prev">Previous Range</a> |
<a href="#range$section-number:$range-number-next">Next Range</a> ]
<!--@item-start-->
@-item-start
<span class="graph-box">
<span class="graph-title">
<a name="item$section-number:$range-number-next:$item-number"></a>
@ -103,12 +105,12 @@
width="$item-above-pct%">
</span>
</span>
<!--@item-end-->
@-item-end
</span>
<!--@range-end-->
@-range-end
<br>
</span>
<!--@section-end-->
@-section-end
<hr>
<a href="http://www.mozilla.org/projects/venkman/">No job is too big, no fee is too big.</a>
</body>

Просмотреть файл

@ -0,0 +1,30 @@
Venkman Profile Report
Created .......... $full-date
User Agent ....... $user-agent
Debugger Version . $venkman-agent
Sorted By ........ $sort-key
=================================================================================
@-section-start
$section-number <$full-url>
@-range-start
$file-name: $range-min - $range-max milliseconds
@-item-start
Function Name: $function-name (Lines $start-line - $end-line)
Total Calls: $call-count (max recurse $recurse-depth)
Total Time: $total-time (min/max/avg $min-time/$max-time/$avg-time)
@-item-end
-------------------------------------------------------------------------------
@-range-end
=================================================================================
@-section-end
Thanks for using Venkman, the Mozilla JavaScript Debugger.
<http://www.mozilla.org/projects/venkman>

Просмотреть файл

@ -0,0 +1,43 @@
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://venkman/content/profile.xml" type="text/xsl"?>
<profile xmlns="http://www.mozilla.org/venkman/0.9/profiler"
collected="$full-date"
useragent="$user-agent"
version="$venkman-agent"
sortkey="$sort-key">
@-section-start
<section section="S$section-number"
prevsection="S$section-number-prev"
nextsection="S$section-number-next"
href="$full-url"
filename="$file-name">
@-range-start
<range range="S$section-number:$range-number"
prevsection="S$section-number-prev"
nextsection="S$section-number-next"
prevrange="S$section-number:$range-number-prev"
nextrange="S$section-number:$range-number-next"
min="$range-min"
max="$range-max">
@-item-start
<item item="S$section-number:$range-number:$item-number"
itemnumber="$item-number"
summary="$item-summary"
minpercent="$item-min-pct"
belowpercent="$item-below-pct"
abovepercent="$item-above-pct"
mintime="$min-time"
maxtime="$max-time"
totaltime="$total-time"
callcount="$call-count"
function="$function-name"
filename="$file-name"
fileurl="$full-url"
startline="$start-line"
endline="$end-line"/>
@-item-end
</range>
@-range-end
</section>
@-section-end
</profile>

Просмотреть файл

@ -33,8 +33,7 @@
*
*/
var sampleShare = new Object();
var sampleTree = new TreeOView(sampleShare);
var sampleTree = new XULTreeView();
function SampleRecord (name, gender)
{
@ -44,7 +43,7 @@ function SampleRecord (name, gender)
this.gender = gender;
}
SampleRecord.prototype = new TreeOViewRecord(sampleShare);
SampleRecord.prototype = new XULTreeViewRecord(sampleTree.share);
sampleTree.childData.appendChild (new SampleRecord ("vinnie", "male"));
var betty = new SampleRecord ("betty", "female");
@ -108,7 +107,6 @@ function nativeFrameTest()
{
function compare(a, b)
{
debugger;
if (a > b)
return 1;
@ -126,6 +124,7 @@ function dbg()
{
var a = 0;
dbg2();
nativeFrameTest();
var c = 0;
}
@ -141,7 +140,33 @@ function dbg2()
var fun = dbg;
var obj = new Object();
debugger;
guessThis();
try
{
guessThis();
throwSomething();
}
catch (ex)
{
dd ("caught " + ex);
}
var rv = returnSomething();
dd ("returned " + rv);
}
function throwSomething()
{
var str = "this is a test";
var obj = { message: "this is only a test" };
throw "momma from the train";
}
function returnSomething()
{
var str = "this is a test";
var obj = { message: "this is only a test" };
return "your library books on time!";
}
function dt()
@ -178,4 +203,3 @@ function switchTest ()
break;
}
}

Просмотреть файл

@ -31,7 +31,6 @@
</treecols>
<treechildren id="sample-body"/>
</tree>
<button onclick="document.location.href=document.location.href" label="reload"/>
<button onclick="toggleBetty()" label="toggle betty"/>
<button onclick="dt()" label="dump tree"/>

Просмотреть файл

@ -49,7 +49,9 @@
*/
function BasicOView()
{}
{
this.tree = null;
}
/* functions *you* should call to initialize and maintain the tree state */
@ -73,7 +75,7 @@ function bov_setcn (aryNames)
/*
* scroll the source so |line| is at either the top, center, or bottom
* of the view, delepding on the value of |align|.
* of the view, depending on the value of |align|.
*
* line is the one based target line.
* if align is negative, the line will be scrolled to the top, if align is
@ -83,6 +85,9 @@ function bov_setcn (aryNames)
BasicOView.prototype.scrollTo =
function bov_scrollto (line, align)
{
if (!this.tree)
return;
var headerRows = 1;
var first = this.tree.getFirstVisibleRow();
@ -113,7 +118,7 @@ function bov_scrollto (line, align)
if (line < viz) /* underscroll, can't put a row from the first page at */
line = 0; /* the bottom. */
else
line = line - total_viz + headerRows;
line = line - viz + headerRows;
this.tree.scrollToRow(line);
}
@ -259,6 +264,10 @@ function bov_getcelltxt (row, colID)
if (!this.columnNames)
return "";
var ary = colID.match (/:(.*)/);
if (ary)
colID = ary[1];
var col = this.columnNames[colID];
if (typeof col == "undefined")
@ -320,32 +329,32 @@ function bov_pactcell (action)
}
/*
* record for the TreeOView. these things take care of keeping the TreeOView
* record for the XULTreeView. these things take care of keeping the XULTreeView
* properly informed of changes in value and child count. you shouldn't have
* to maintain tree state at all.
*
* |share| should be an otherwise empty object to store cache data.
* you should use the same object as the |share| for the TreeOView that you
* you should use the same object as the |share| for the XULTreeView that you
* indend to contain these records.
*
*/
function TreeOViewRecord(share)
function XULTreeViewRecord(share)
{
this._share = share;
this.visualFootprint = 1;
this.childIndex = -1;
//this.childIndex = -1;
this.isHidden = true; /* records are considered hidden until they are
* inserted into a live tree */
}
TreeOViewRecord.prototype.isContainerOpen = false;
XULTreeViewRecord.prototype.isContainerOpen = false;
/*
* walk the parent tree to find our tree container. return null if there is
* none
*/
TreeOViewRecord.prototype.findContainerTree =
function tovr_gettree ()
XULTreeViewRecord.prototype.findContainerTree =
function xtvr_gettree ()
{
if (!("parentRecord" in this))
return null;
@ -364,9 +373,56 @@ function tovr_gettree ()
return null;
}
XULTreeViewRecord.prototype.__defineGetter__("childIndex", xtvr_getChildIndex);
function xtvr_getChildIndex ()
{
//dd ("getChildIndex {");
if (!("parentRecord" in this))
{
delete this._childIndex;
//dd ("} -1");
return -1;
}
if ("_childIndex" in this)
{
if ("childData" in this && this._childIndex in this.childData &&
this.childData[this._childIndex] == this)
{
//dd ("} " + this._childIndex);
return this._childIndex;
}
}
var childData = this.parentRecord.childData;
var len = childData.length;
for (var i = 0; i < len; ++i)
{
if (childData[i] == this)
{
this._childIndex = i;
//dd ("} " + this._childIndex);
return i;
}
}
delete this._childIndex;
//dd ("} -1");
return -1;
}
XULTreeViewRecord.prototype.__defineSetter__("childIndex", xtvr_setChildIndex);
function xtvr_setChildIndex ()
{
dump ("xtvr: childIndex is read only, ignore attempt to write to it\n");
if (typeof getStackTrace == "function")
dump (getStackTrace());
}
/* count the number of parents, not including the root node */
TreeOViewRecord.prototype.__defineGetter__("level", tovr_getLevel);
function tovr_getLevel ()
XULTreeViewRecord.prototype.__defineGetter__("level", xtvr_getLevel);
function xtvr_getLevel ()
{
if (!("parentRecord" in this))
return -1;
@ -385,14 +441,14 @@ function tovr_getLevel ()
* to change your mind later. Do not attach a different name to the same colID,
* and do no rename the colID. You have been warned.
*/
TreeOViewRecord.prototype.setColumnPropertyName =
function tovr_setcol (colID, propertyName)
XULTreeViewRecord.prototype.setColumnPropertyName =
function xtvr_setcol (colID, propertyName)
{
function tovr_getValueShim ()
function xtvr_getValueShim ()
{
return this._colValues[colID];
}
function tovr_setValueShim (newValue)
function xtvr_setValueShim (newValue)
{
this._colValues[colID] = newValue;
/* XXX this.invalidate(); */
@ -408,13 +464,13 @@ function tovr_setcol (colID, propertyName)
}
else
{
this.__defineGetter__(propertyName, tovr_getValueShim);
this.__defineSetter__(propertyName, tovr_setValueShim);
this.__defineGetter__(propertyName, xtvr_getValueShim);
this.__defineSetter__(propertyName, xtvr_setValueShim);
}
}
TreeOViewRecord.prototype.setColumnPropertyValue =
function tovr_setcolv (colID, value)
XULTreeViewRecord.prototype.setColumnPropertyValue =
function xtvr_setcolv (colID, value)
{
this._colValues[colID] = value;
}
@ -422,8 +478,8 @@ function tovr_setcolv (colID, value)
/*
* set the default sort column and resort.
*/
TreeOViewRecord.prototype.setSortColumn =
function tovr_setcol (colID, dir)
XULTreeViewRecord.prototype.setSortColumn =
function xtvr_setcol (colID, dir)
{
//dd ("setting sort column to " + colID);
this._share.sortColumn = colID;
@ -436,8 +492,8 @@ function tovr_setcol (colID, dir)
* sort. setting this to 0 will *not* recover the natural insertion order,
* it will only affect newly added items.
*/
TreeOViewRecord.prototype.setSortDirection =
function tovr_setdir (dir)
XULTreeViewRecord.prototype.setSortDirection =
function xtvr_setdir (dir)
{
this._share.sortDirection = dir;
}
@ -445,8 +501,8 @@ function tovr_setdir (dir)
/*
* invalidate this row in the tree
*/
TreeOViewRecord.prototype.invalidate =
function tovr_invalidate()
XULTreeViewRecord.prototype.invalidate =
function xtvr_invalidate()
{
var tree = this.findContainerTree();
if (tree)
@ -460,8 +516,8 @@ function tovr_invalidate()
/*
* invalidate any data in the cache.
*/
TreeOViewRecord.prototype.invalidateCache =
function tovr_killcache()
XULTreeViewRecord.prototype.invalidateCache =
function xtvr_killcache()
{
this._share.rowCache = new Object();
this._share.lastComputedIndex = -1;
@ -470,11 +526,11 @@ function tovr_killcache()
/*
* default comparator function for sorts. if you want a custom sort, override
* this method. We declare tovr_sortcmp as a top level function, instead of
* this method. We declare xtvr_sortcmp as a top level function, instead of
* a function expression so we can refer to it later.
*/
TreeOViewRecord.prototype.sortCompare = tovr_sortcmp;
function tovr_sortcmp (a, b)
XULTreeViewRecord.prototype.sortCompare = xtvr_sortcmp;
function xtvr_sortcmp (a, b)
{
var sc = a._share.sortColumn;
var sd = a._share.sortDirection;
@ -499,11 +555,11 @@ function tovr_sortcmp (a, b)
* the local parameter is used internally to control whether or not the
* sorted rows are invalidated. don't use it yourself.
*/
TreeOViewRecord.prototype.resort =
function tovr_resort (leafSort)
XULTreeViewRecord.prototype.resort =
function xtvr_resort (leafSort)
{
if (!("childData" in this) || this.childData.length < 1 ||
(this.childData[0].sortCompare == tovr_sortcmp &&
(this.childData[0].sortCompare == xtvr_sortcmp &&
!("sortColumn" in this._share) || this._share.sortDirection == 0))
{
/* if we have no children, or we have the default sort compare and no
@ -515,7 +571,7 @@ function tovr_resort (leafSort)
for (var i = 0; i < this.childData.length; ++i)
{
this.childData[i].childIndex = i;
//this.childData[i].childIndex = i;
if ("isContainerOpen" in this.childData[i] &&
this.childData[i].isContainerOpen)
this.childData[i].resort(true);
@ -535,7 +591,7 @@ function tovr_resort (leafSort)
(rowIndex + this.visualFootprint - 1));
*/
tree.tree.invalidateRange (rowIndex,
rowIndex + this.visualFootprint - 1);
rowIndex + this.visualFootprint - 1);
}
}
/*
@ -549,33 +605,37 @@ function tovr_resort (leafSort)
* call this to indicate that this node may have children at one point. make
* sure to call it before adding your first child.
*/
TreeOViewRecord.prototype.reserveChildren =
function tovr_rkids ()
XULTreeViewRecord.prototype.reserveChildren =
function xtvr_rkids (always)
{
if (!("childData" in this))
this.childData = new Array();
if (!("isContainerOpen" in this))
this.isContainerOpen = false;
if (always)
this.alwaysHasChildren = true;
else
delete this.alwaysHasChildren;
}
/*
* add a child to the end of the child list for this record. takes care of
* updating the tree as well.
*/
TreeOViewRecord.prototype.appendChild =
function tovr_appchild (child)
XULTreeViewRecord.prototype.appendChild =
function xtvr_appchild (child)
{
if (!(child instanceof TreeOViewRecord))
throw Components.results.NS_ERROR_INVALID_PARAM;
if (!(child instanceof XULTreeViewRecord))
throw Components.results.NS_ERROR_INVALID_ARG;
child.isHidden = false;
child.parentRecord = this;
child.childIndex = this.childData.length;
//child.childIndex = this.childData.length;
this.childData.push(child);
if ("isContainerOpen" in this && this.isContainerOpen)
{
//dd ("appendChild: " + tov_formatRecord(child, ""));
//dd ("appendChild: " + xtv_formatRecord(child, ""));
if (this.calculateVisualRow() >= 0)
{
var tree = this.findContainerTree();
@ -595,8 +655,8 @@ function tovr_appchild (child)
* add a list of children to the end of the child list for this record.
* faster than multiple appendChild() calls.
*/
TreeOViewRecord.prototype.appendChildren =
function tovr_appchild (children)
XULTreeViewRecord.prototype.appendChildren =
function xtvr_appchild (children)
{
var idx = this.childData.length;
var delta = 0;
@ -606,8 +666,9 @@ function tovr_appchild (children)
var child = children[i];
child.isHidden = false;
child.parentRecord = this;
this.childData[idx] = child;
child.childIndex = idx++;
this.childData.push(child);
// this.childData[idx] = child;
//child.childIndex = idx++;
delta += child.visualFootprint;
}
@ -627,27 +688,28 @@ function tovr_appchild (children)
* remove a child from this record. updates the tree too. DONT call this with
* an index not actually contained by this record.
*/
TreeOViewRecord.prototype.removeChildAtIndex =
function tovr_remchild (index)
XULTreeViewRecord.prototype.removeChildAtIndex =
function xtvr_remchild (index)
{
if (!ASSERT(this.childData.length, "removing from empty childData"))
return;
for (var i = index + 1; i < this.childData.length; ++i)
--this.childData[i].childIndex;
//for (var i = index + 1; i < this.childData.length; ++i)
// --this.childData[i].childIndex;
var fpDelta = -this.childData[index].visualFootprint;
var changeStart = this.childData[index].calculateVisualRow();
this.childData[index].childIndex = -1;
//this.childData[index].childIndex = -1;
delete this.childData[index].parentRecord;
arrayRemoveAt (this.childData, index);
if ("isContainerOpen" in this && this.isContainerOpen)
{
if (this.calculateVisualRow() >= 0)
{
this.resort(true); /* resort, don't invalidate. we're going to do
* that in the onVisualFootprintChanged call. */
}
//XXX why would we need to resort on a remove?
//if (this.calculateVisualRow() >= 0)
//{
// this.resort(true); /* resort, don't invalidate. we're going to do
// * that in the onVisualFootprintChanged call. */
// }
this.onVisualFootprintChanged (changeStart, fpDelta);
}
}
@ -655,8 +717,8 @@ function tovr_remchild (index)
/*
* hide this record and all descendants.
*/
TreeOViewRecord.prototype.hide =
function tovr_hide ()
XULTreeViewRecord.prototype.hide =
function xtvr_hide ()
{
if (this.isHidden)
return;
@ -674,8 +736,8 @@ function tovr_hide ()
/*
* unhide this record and all descendants.
*/
TreeOViewRecord.prototype.unHide =
function tovr_uhide ()
XULTreeViewRecord.prototype.unHide =
function xtvr_uhide ()
{
if (!this.isHidden)
return;
@ -690,8 +752,8 @@ function tovr_uhide ()
* open this record, exposing it's children. DONT call this method if the record
* has no children.
*/
TreeOViewRecord.prototype.open =
function tovr_open ()
XULTreeViewRecord.prototype.open =
function xtvr_open ()
{
if (this.isContainerOpen)
return;
@ -707,6 +769,7 @@ function tovr_open ()
delta += this.childData[i].visualFootprint;
}
/* this resort should only happen if the sort column changed */
this.resort(true);
this.visualFootprint += delta;
if ("parentRecord" in this)
@ -721,8 +784,8 @@ function tovr_open ()
* close this record, hiding it's children. DONT call this method if the record
* has no children, or if it is already closed.
*/
TreeOViewRecord.prototype.close =
function tovr_close ()
XULTreeViewRecord.prototype.close =
function xtvr_close ()
{
if (!this.isContainerOpen)
return;
@ -745,8 +808,8 @@ function tovr_close ()
* called when a node above this one grows or shrinks. we need to adjust
* our own visualFootprint to match the change, and pass the message on.
*/
TreeOViewRecord.prototype.onVisualFootprintChanged =
function tovr_vpchange (start, amount)
XULTreeViewRecord.prototype.onVisualFootprintChanged =
function xtvr_vpchange (start, amount)
{
/* if we're not hidden, but this notification came from a hidden node
* (start == -1), ignore it, it doesn't affect us. */
@ -775,8 +838,8 @@ function tovr_vpchange (start, amount)
* node21 4
* node3 5
*/
TreeOViewRecord.prototype.calculateVisualRow =
function tovr_calcrow ()
XULTreeViewRecord.prototype.calculateVisualRow =
function xtvr_calcrow ()
{
/* if this is the second time in a row that someone asked us, fetch the last
* result from the cache. */
@ -805,7 +868,8 @@ function tovr_calcrow ()
++vrow;
/* add in the footprint for all of the earlier siblings */
for (var i = 0; i < this.childIndex; ++i)
var ci = this.childIndex;
for (var i = 0; i < ci; ++i)
{
if (!this.parentRecord.childData[i].isHidden)
vrow += this.parentRecord.childData[i].visualFootprint;
@ -824,8 +888,8 @@ function tovr_calcrow ()
* with a targetRow less than this record's visual row, or greater than this
* record's visual row + the number of visible children it has.
*/
TreeOViewRecord.prototype.locateChildByVisualRow =
function tovr_find (targetRow, myRow)
XULTreeViewRecord.prototype.locateChildByVisualRow =
function xtvr_find (targetRow, myRow)
{
if (targetRow in this._share.rowCache)
return this._share.rowCache[targetRow];
@ -887,16 +951,16 @@ function tovr_find (targetRow, myRow)
return null;
}
/* TOLabelRecords can be used to drop a label into an arbitrary place in an
* arbitrary tree. normally, specializations of TreeOViewRecord are tied to
* a specific tree because of implementation details. TOLabelRecords are
/* XTLabelRecords can be used to drop a label into an arbitrary place in an
* arbitrary tree. normally, specializations of XULTreeViewRecord are tied to
* a specific tree because of implementation details. XTLabelRecords are
* specially designed (err, hacked) to work around these details. this makes
* them slower, but more generic.
*
* we set up a getter for _share that defers to the parent object. this lets
* TOLabelRecords work in any tree.
* XTLabelRecords work in any tree.
*/
function TOLabelRecord (columnName, label, blankCols)
function XTLabelRecord (columnName, label, blankCols)
{
this.setColumnPropertyName (columnName, "label");
this.label = label;
@ -909,21 +973,21 @@ function TOLabelRecord (columnName, label, blankCols)
}
}
TOLabelRecord.prototype = new TreeOViewRecord (null);
XTLabelRecord.prototype = new XULTreeViewRecord (null);
TOLabelRecord.prototype.__defineGetter__("_share", tolr_getshare);
XTLabelRecord.prototype.__defineGetter__("_share", tolr_getshare);
function tolr_getshare()
{
if ("parentRecord" in this)
return this.parentRecord._share;
ASSERT (0, "TOLabelRecord cannot be the root of a visible tree.");
ASSERT (0, "XTLabelRecord cannot be the root of a visible tree.");
return null;
}
/* TORootRecord is used internally by TreeOView, you probably don't need to make
/* XTRootRecord is used internally by XULTreeView, you probably don't need to make
* any of these */
function TORootRecord (tree, share)
function XTRootRecord (tree, share)
{
this._share = share;
this._treeView = tree;
@ -933,23 +997,23 @@ function TORootRecord (tree, share)
this.isContainerOpen = true;
}
/* no cache passed in here, we set it in the TORootRecord contructor instead. */
TORootRecord.prototype = new TreeOViewRecord (null);
/* no cache passed in here, we set it in the XTRootRecord contructor instead. */
XTRootRecord.prototype = new XULTreeViewRecord (null);
TORootRecord.prototype.open =
TORootRecord.prototype.close =
XTRootRecord.prototype.open =
XTRootRecord.prototype.close =
function torr_notimplemented()
{
/* don't do this on a root node */
}
TORootRecord.prototype.calculateVisualRow =
XTRootRecord.prototype.calculateVisualRow =
function torr_calcrow ()
{
return null;
}
TORootRecord.prototype.resort =
XTRootRecord.prototype.resort =
function torr_resort ()
{
if ("_treeView" in this && this._treeView.frozen) {
@ -958,7 +1022,7 @@ function torr_resort ()
}
if (!("childData" in this) || this.childData.length < 1 ||
(this.childData[0].sortCompare == tovr_sortcmp &&
(this.childData[0].sortCompare == xtvr_sortcmp &&
!("sortColumn" in this._share) || this._share.sortDirection == 0))
{
/* if we have no children, or we have the default sort compare but we're
@ -970,7 +1034,7 @@ function torr_resort ()
for (var i = 0; i < this.childData.length; ++i)
{
this.childData[i].childIndex = i;
//this.childData[i].childIndex = i;
if ("isContainerOpen" in this.childData[i] &&
this.childData[i].isContainerOpen)
this.childData[i].resort(true);
@ -978,7 +1042,7 @@ function torr_resort ()
this.childData[i].sortIsInvalid = true;
}
if ("_treeView" in this && "tree" in this._treeView)
if ("_treeView" in this && this._treeView.tree)
{
/*
dd ("root node: invalidating 0 - " + this.visualFootprint +
@ -989,7 +1053,7 @@ function torr_resort ()
}
}
TORootRecord.prototype.locateChildByVisualRow =
XTRootRecord.prototype.locateChildByVisualRow =
function torr_find (targetRow)
{
if (targetRow in this._share.rowCache)
@ -1023,14 +1087,15 @@ function torr_find (targetRow)
return null;
}
TORootRecord.prototype.onVisualFootprintChanged =
XTRootRecord.prototype.onVisualFootprintChanged =
function torr_vfpchange (start, amount)
{
if (!this._treeView.frozen)
{
this.invalidateCache();
this.visualFootprint += amount;
if ("_treeView" in this && "tree" in this._treeView)
if ("_treeView" in this && "tree" in this._treeView &&
this._treeView.tree)
{
if (amount != 0)
this._treeView.tree.rowCountChanged (start, amount);
@ -1053,14 +1118,18 @@ function torr_vfpchange (start, amount)
}
/*
* TreeOView provides functionality of tree whose elements have multiple
* XULTreeView provides functionality of tree whose elements have multiple
* levels of children.
*/
function TreeOView(share)
function XULTreeView(share)
{
this.childData = new TORootRecord(this, share);
if (!share)
share = new Object();
this.childData = new XTRootRecord(this, share);
this.childData.invalidateCache();
this.tree = null;
this.share = share;
this.frozen = 0;
}
@ -1074,8 +1143,8 @@ function TreeOView(share)
* Freeze/thaws are nestable, the tree will not update until the number of
* thaw() calls matches the number of freeze() calls.
*/
TreeOView.prototype.freeze =
function tov_freeze ()
XULTreeView.prototype.freeze =
function xtv_freeze ()
{
if (++this.frozen == 1)
{
@ -1088,11 +1157,9 @@ function tov_freeze ()
/*
* Reflect any changes to the tee content since the last freeze.
*/
TreeOView.prototype.thaw =
function tov_thaw ()
XULTreeView.prototype.thaw =
function xtv_thaw ()
{
//dd ("thaw " + (this.frozen - 1));
if (this.frozen == 0)
{
ASSERT (0, "not frozen");
@ -1110,14 +1177,59 @@ function tov_thaw ()
delete this.needsResort;
}
delete this.changeStart;
delete this.changeAmount;
}
XULTreeView.prototype.saveBranchState =
function xtv_savebranch (target, source, recurse)
{
var len = source.length;
for (var i = 0; i < len; ++i)
{
if (source[i].isContainerOpen)
{
target[i] = new Object();
target[i].name = source[i]._colValues["col-0"];
if (recurse)
this.saveBranchState (target[i], source[i].childData, true);
}
}
}
XULTreeView.prototype.restoreBranchState =
function xtv_restorebranch (target, source, recurse)
{
for (var i in source)
{
if (typeof source[i] == "object")
{
var name = source[i].name;
var len = target.length;
for (var j = 0; j < len; ++j)
{
if (target[j]._colValues["col-0"] == name &&
"childData" in target[j])
{
//dd ("opening " + name);
target[j].open();
if (recurse)
{
this.restoreBranchState (target[j].childData,
source[i], true);
}
break;
}
}
}
}
}
/* scroll the line specified by |line| to the center of the tree */
TreeOView.prototype.centerLine =
function tov_ctrln (line)
XULTreeView.prototype.centerLine =
function xtv_ctrln (line)
{
var first = this.tree.getFirstVisibleRow();
var last = this.tree.getLastVisibleRow();
@ -1128,8 +1240,8 @@ function tov_ctrln (line)
* functions the tree will call to retrieve the list state (nsITreeView.)
*/
TreeOView.prototype.__defineGetter__("rowCount", tov_getRowCount);
function tov_getRowCount ()
XULTreeView.prototype.__defineGetter__("rowCount", xtv_getRowCount);
function xtv_getRowCount ()
{
if (!this.childData)
return 0;
@ -1137,8 +1249,8 @@ function tov_getRowCount ()
return this.childData.visualFootprint;
}
TreeOView.prototype.isContainer =
function tov_isctr (index)
XULTreeView.prototype.isContainer =
function xtv_isctr (index)
{
var row = this.childData.locateChildByVisualRow (index);
/*
@ -1148,11 +1260,11 @@ function tov_isctr (index)
return rv;
*/
return Boolean(row && "childData" in row);
return Boolean(row && ("alwaysHasChildren" in row || "childData" in row));
}
TreeOView.prototype.__defineGetter__("selectedIndex", tov_getsel);
function tov_getsel()
XULTreeView.prototype.__defineGetter__("selectedIndex", xtv_getsel);
function xtv_getsel()
{
if (!this.tree || this.tree.selection.getRangeCount() < 1)
return -1;
@ -1162,8 +1274,8 @@ function tov_getsel()
return min.value;
}
TreeOView.prototype.__defineSetter__("selectedIndex", tov_setsel);
function tov_setsel(i)
XULTreeView.prototype.__defineSetter__("selectedIndex", xtv_setsel);
function xtv_setsel(i)
{
this.tree.selection.clearSelection();
if (i != -1)
@ -1171,10 +1283,10 @@ function tov_setsel(i)
return i;
}
TreeOView.prototype.scrollTo = BasicOView.prototype.scrollTo;
XULTreeView.prototype.scrollTo = BasicOView.prototype.scrollTo;
TreeOView.prototype.isContainerOpen =
function tov_isctropen (index)
XULTreeView.prototype.isContainerOpen =
function xtv_isctropen (index)
{
var row = this.childData.locateChildByVisualRow (index);
/*
@ -1186,8 +1298,8 @@ function tov_isctropen (index)
return row && row.isContainerOpen;
}
TreeOView.prototype.toggleOpenState =
function tov_toggleopen (index)
XULTreeView.prototype.toggleOpenState =
function xtv_toggleopen (index)
{
var row = this.childData.locateChildByVisualRow (index);
//ASSERT(row, "bogus row");
@ -1200,8 +1312,8 @@ function tov_toggleopen (index)
}
}
TreeOView.prototype.isContainerEmpty =
function tov_isctrempt (index)
XULTreeView.prototype.isContainerEmpty =
function xtv_isctrempt (index)
{
var row = this.childData.locateChildByVisualRow (index);
/*
@ -1210,17 +1322,23 @@ function tov_isctrempt (index)
dd ("isContainerEmpty: row " + index + " returning " + rv);
return rv;
*/
return !row || !row.childData;
if ("alwaysHasChildren" in row)
return false;
if (!row || !("childData" in row))
return true;
return !row.childData.length;
}
TreeOView.prototype.isSeparator =
function tov_isseparator (index)
XULTreeView.prototype.isSeparator =
function xtv_isseparator (index)
{
return false;
}
TreeOView.prototype.getParentIndex =
function tov_getpi (index)
XULTreeView.prototype.getParentIndex =
function xtv_getpi (index)
{
var row = this.childData.locateChildByVisualRow (index);
//ASSERT(row, "bogus row " + index);
@ -1229,8 +1347,8 @@ function tov_getpi (index)
return (rv != null) ? rv : -1;
}
TreeOView.prototype.hasNextSibling =
function tov_hasnxtsib (rowIndex, afterIndex)
XULTreeView.prototype.hasNextSibling =
function xtv_hasnxtsib (rowIndex, afterIndex)
{
var row = this.childData.locateChildByVisualRow (rowIndex);
/*
@ -1243,8 +1361,8 @@ function tov_hasnxtsib (rowIndex, afterIndex)
return row.childIndex < row.parentRecord.childData.length - 1;
}
TreeOView.prototype.getLevel =
function tov_getlvl (index)
XULTreeView.prototype.getLevel =
function xtv_getlvl (index)
{
var row = this.childData.locateChildByVisualRow (index);
/*
@ -1259,60 +1377,65 @@ function tov_getlvl (index)
return row.level;
}
TreeOView.prototype.getImageSrc =
function tov_getimgsrc (index, colID)
XULTreeView.prototype.getImageSrc =
function xtv_getimgsrc (index, colID)
{
}
TreeOView.prototype.getProgressMode =
function tov_getprgmode (index, colID)
XULTreeView.prototype.getProgressMode =
function xtv_getprgmode (index, colID)
{
}
TreeOView.prototype.getCellValue =
function tov_getcellval (index, colID)
XULTreeView.prototype.getCellValue =
function xtv_getcellval (index, colID)
{
}
TreeOView.prototype.getCellText =
function tov_getcelltxt (index, colID)
XULTreeView.prototype.getCellText =
function xtv_getcelltxt (index, colID)
{
var row = this.childData.locateChildByVisualRow (index);
//ASSERT(row, "bogus row " + index);
var ary = colID.match (/:(.*)/);
if (ary)
colID = ary[1];
if (row && row._colValues && colID in row._colValues)
return row._colValues[colID];
else
return "";
}
TreeOView.prototype.getCellProperties =
function tov_cellprops (row, colID, properties)
XULTreeView.prototype.getCellProperties =
function xtv_cellprops (row, colID, properties)
{}
TreeOView.prototype.getColumnProperties =
function tov_colprops (colID, elem, properties)
XULTreeView.prototype.getColumnProperties =
function xtv_colprops (colID, elem, properties)
{}
TreeOView.prototype.getRowProperties =
function tov_rowprops (index, properties)
XULTreeView.prototype.getRowProperties =
function xtv_rowprops (index, properties)
{}
TreeOView.prototype.isSorted =
function tov_issorted (index)
XULTreeView.prototype.isSorted =
function xtv_issorted (index)
{
return false;
}
TreeOView.prototype.canDropOn =
function tov_dropon (index)
XULTreeView.prototype.canDropOn =
function xtv_dropon (index)
{
var row = this.childData.locateChildByVisualRow (index);
//ASSERT(row, "bogus row " + index);
return (row && ("canDropOn" in row) && row.canDropOn());
}
TreeOView.prototype.canDropBeforeAfter =
function tov_dropba (index, before)
XULTreeView.prototype.canDropBeforeAfter =
function xtv_dropba (index, before)
{
var row = this.childData.locateChildByVisualRow (index);
//ASSERT(row, "bogus row " + index);
@ -1320,64 +1443,65 @@ function tov_dropba (index, before)
row.canDropBeforeAfter(before));
}
TreeOView.prototype.drop =
function tov_drop (index, orientation)
XULTreeView.prototype.drop =
function xtv_drop (index, orientation)
{
var row = this.childData.locateChildByVisualRow (index);
//ASSERT(row, "bogus row " + index);
return (row && ("drop" in row) && row.drop(orientation));
}
TreeOView.prototype.setTree =
function tov_seto (tree)
XULTreeView.prototype.setTree =
function xtv_seto (tree)
{
this.childData.invalidateCache();
this.tree = tree;
}
TreeOView.prototype.cycleHeader =
function tov_cyclehdr (colID, elt)
XULTreeView.prototype.cycleHeader =
function xtv_cyclehdr (colID, elt)
{
}
TreeOView.prototype.selectionChanged =
function tov_selchg ()
XULTreeView.prototype.selectionChanged =
function xtv_selchg ()
{
}
TreeOView.prototype.cycleCell =
function tov_cyclecell (row, colID)
XULTreeView.prototype.cycleCell =
function xtv_cyclecell (row, colID)
{
}
TreeOView.prototype.isEditable =
function tov_isedit (row, colID)
XULTreeView.prototype.isEditable =
function xtv_isedit (row, colID)
{
return false;
}
TreeOView.prototype.setCellText =
function tov_setct (row, colID, value)
XULTreeView.prototype.setCellText =
function xtv_setct (row, colID, value)
{
}
TreeOView.prototype.performAction =
function tov_pact (action)
XULTreeView.prototype.performAction =
function xtv_pact (action)
{
}
TreeOView.prototype.performActionOnRow =
function tov_pactrow (action)
XULTreeView.prototype.performActionOnRow =
function xtv_pactrow (action)
{
}
TreeOView.prototype.performActionOnCell =
function tov_pactcell (action)
XULTreeView.prototype.performActionOnCell =
function xtv_pactcell (action)
{
}
/*******************************************************************************/
function tov_formatRecord (rec, indent)
function xtv_formatRecord (rec, indent)
{
var str = "";
@ -1395,16 +1519,16 @@ function tov_formatRecord (rec, indent)
return (indent + str);
}
function tov_formatBranch (rec, indent, recurse)
function xtv_formatBranch (rec, indent, recurse)
{
var str = "";
for (var i = 0; i < rec.childData.length; ++i)
{
str += tov_formatRecord (rec.childData[i], indent) + "\n";
str += xtv_formatRecord (rec.childData[i], indent) + "\n";
if (recurse)
{
if ("childData" in rec.childData[i])
str += tov_formatBranch(rec.childData[i], indent + " ",
str += xtv_formatBranch(rec.childData[i], indent + " ",
--recurse);
}
}

Просмотреть файл

@ -0,0 +1,88 @@
<?xml version="1.0"?>
<!--
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.1 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is The JavaScript Debugger
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation
- Portions created by Netscape are
- Copyright (C) 1998 Netscape Communications Corporation.
- All Rights Reserved.
-
- Alternatively, the contents of this file may be used under the
- terms of the GNU Public License (the "GPL"), in which case the
- provisions of the GPL are applicable instead of those above.
- If you wish to allow use of your version of this file only
- under the terms of the GPL and not to allow others to use your
- version of this file under the MPL, indicate your decision by
- deleting the provisions above and replace them with the notice
- and other provisions required by the GPL. If you do not delete
- the provisions above, a recipient may use your version of this
- file under either the MPL or the GPL.
-
- Contributor(s):
- Robert Ginda, <rginda@netscape.com>, original author
-
-->
<bindings xmlns="http://www.mozilla.org/xbl"
xmlns:xbl="http://www.mozilla.org/xbl"
xmlns:xul=
"http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<binding id="floatingview">
<content>
<xul:vbox id="view-frame-p" flex="1"
ondragover="console.dnd.dragOver(event, console.viewProxy);"
ondragexit="console.dnd.dragExit(event, console.viewProxy);"
ondragdrop="console.dnd.drop(event, console.viewProxy);">
<xul:vbox class="view-outer"
ondraggesture="console.dnd.startDrag(event, console.viewProxyTitle);">
<xul:hbox id="view-title">
<xul:image class="view-title-pop"
xbl:inherits="parentid=id"
onclick="console.dispatch('toggle-float', { viewId: this.getAttribute('parentid')});"/>
<xul:hbox class="view-title-grippy" flex="1">
<xul:hbox flex="1" class="view-title-margin-left"/>
<xul:label id="view-title-text" xbl:inherits="value=title"/>
<xul:hbox flex="1" class="view-title-margin-right"/>
</xul:hbox>
<xul:image class="view-title-close"
xbl:inherits="parentid=id"
onclick="console.dispatch('toggle-view', { viewId: this.getAttribute('parentid')});"/>
</xul:hbox>
</xul:vbox>
<children/>
</xul:vbox>
</content>
<implementation>
<property name="ownerWindow" onget="return window;"/>
<property name="proxyIcon" onget="return document.getAnonymousNodes(this)[0].firstChild.firstChild.firstChild;"/>
</implementation>
</binding>
<binding id="viewcontainer">
<content>
<xul:box xbl:inherits="type" class="view-container" flex="1">
<children/>
</xul:box>
</content>
<implementation>
<property name="ownerWindow" onget="return window;"/>
</implementation>
</binding>
</bindings>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -51,7 +51,7 @@ function initDev()
["multialias", "help pref; help props", CMD_CONSOLE | CMD_NO_HELP]];
defineVenkmanCommands (cmdary);
console.commandManager.defineCommands (cmdary);
if (!("devState" in console.pluginState))
{
@ -156,6 +156,12 @@ function cmdDumpScripts(e)
function cmdReloadUI()
{
if ("frames" in console)
{
display (MSG_NOTE_NOSTACK, MT_ERROR);
return;
}
var bs = Components.classes["@mozilla.org/intl/stringbundle;1"];
bs = bs.createInstance(Components.interfaces.nsIStringBundleService);
bs.flushBundles();
@ -242,17 +248,6 @@ function cmdTestFilters ()
function cmdTreeTest()
{
var w = openDialog("chrome://venkman/content/tests/tree.xul", "", "");
var testsFilter = {
globalObject: w,
flags: jsdIFilter.FLAG_ENABLED | jsdIFilter.FLAG_PASS,
urlPattern: null,
startLine: 0,
endLine: 0
};
/* make sure this filter goes at the top, so the system
* "chrome://venkman/ *" filter doesn't get to it first.
*/
console.jsds.insertFilter (testsFilter, null);
}
initDev();

Просмотреть файл

@ -0,0 +1,71 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The JavaScript Debugger
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
var dd = opener.dd;
var console = opener.console;
var dispatch = console.dispatch;
var windowId;
function onLoad()
{
var ary = document.location.search.match(/(?:\?|&)id=([^&]+)/);
if (!ary)
{
dd ("No window id in url " + document.location);
return;
}
windowId = ary[1];
if ("arguments" in window && 0 in window.arguments &&
typeof window.arguments[0] == "function")
{
window.arguments[0](window);
}
if (console.prefs["menubarInFloaters"])
console.createMainMenu (window.document);
}
function onClose()
{
window.isClosing = true;
return true;
}
function onUnload()
{
console.viewManager.destroyWindow (windowId);
}

Просмотреть файл

@ -0,0 +1,75 @@
<?xml version="1.0"?>
<!--
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.1 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is The JavaScript Debugger
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation
- Portions created by Netscape are
- Copyright (C) 1998 Netscape Communications Corporation.
- All Rights Reserved.
-
- Alternatively, the contents of this file may be used under the
- terms of the GNU Public License (the "GPL"), in which case the
- provisions of the GPL are applicable instead of those above.
- If you wish to allow use of your version of this file only
- under the terms of the GPL and not to allow others to use your
- version of this file under the MPL, indicate your decision by
- deleting the provisions above and replace them with the notice
- and other provisions required by the GPL. If you do not delete
- the provisions above, a recipient may use your version of this
- file under either the MPL or the GPL.
-
- Contributor(s):
- Robert Ginda, <rginda@netscape.com>, original author
-
-->
<!DOCTYPE window SYSTEM "chrome://venkman/locale/venkman.dtd" >
<?xml-stylesheet href="chrome://venkman/skin/venkman.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://venkman/content/venkman-views.xul"?>
<?xul-overlay href="chrome://venkman/content/venkman-menus.xul"?>
<window id="venkman-window"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="onLoad();" onclose="return onClose();"
onunload="return onUnload();"
width="320" height="200"
persist="width height screenX screenY" title="&MainWindow.title;"
windowtype="mozapp:venkman:floater">
<script>
var DEBUG = true;
</script>
<script src="chrome://venkman/content/venkman-utils.js"/>
<script src="chrome://venkman/content/venkman-floater.js"/>
<popupset id="dynamic-popups"/>
<overlaytarget id="menu-overlay-target"/>
<overlaytarget id="views-overlay-target"/>
<viewcontainer id="root-container" flex="1" type="horizontal">
<viewcontainer id="initial-container" type="vertical" flex="1"/>
</viewcontainer>
<overlaytarget id="statusbar-overlay-target"/>
</window>

Просмотреть файл

@ -46,13 +46,13 @@ function initHandlers()
console.wwObserver = {observe: wwObserve};
console.windowWatcher.registerNotification (console.wwObserver);
console.windows.hookedWindows = new Array();
console.hookedWindows = new Array();
var enumerator = console.windowWatcher.getWindowEnumerator();
while (enumerator.hasMoreElements())
{
var win = enumerator.getNext();
if (win.location.href != "chrome://venkman/content/venkman.xul")
if (!isWindowFiltered(win))
{
console.onWindowOpen(win);
console.onWindowLoad();
@ -63,92 +63,72 @@ function initHandlers()
function destroyHandlers()
{
console.windowWatcher.unregisterNotification (console.wwObserver);
while (console.windows.hookedWindows.length)
while (console.hookedWindows.length)
{
var win = console.windows.hookedWindows.pop();
var win = console.hookedWindows.pop();
win.removeEventListener ("load", console.onWindowLoad, false);
win.removeEventListener ("unload", console.onWindowUnload, false);
}
}
console.onWindowOpen =
function isWindowFiltered (window)
{
var href = window.location.href;
var rv = ((href.search (/^chrome:\/\/venkman\//) != -1 &&
href.search (/test/) == -1) ||
(console.prefs["enableChromeFilter"] &&
href.search (/navigator.xul($|\?)/) == -1));
//dd ("isWindowFiltered " + window.location.href + ", returning " + rv);
return rv;
}
console.onWindowOpen =
function con_winopen (win)
{
if ("ChromeWindow" in win && win instanceof win.ChromeWindow &&
(win.location.href == "about:blank" || win.location.href == ""))
{
//dd ("not loaded yet?");
setTimeout (con_winopen, 100, win);
setTimeout (con_winopen, 0, win);
return;
}
if (isWindowFiltered(win))
return;
}
//dd ("window opened: " + win); // + ", " + getInterfaces(win));
console.windows.appendChild (new WindowRecord(win, ""));
console.windows.hookedWindows.push(win);
//dd ("window opened: " + win + " ``" + win.location + "''");
console.hookedWindows.push(win);
dispatch ("hook-window-opened", {window: win});
win.addEventListener ("load", console.onWindowLoad, false);
win.addEventListener ("unload", console.onWindowUnload, false);
console.scriptsView.freeze();
//console.scriptsView.freeze();
}
console.onWindowLoad =
function con_winload (e)
{
console.scriptsView.thaw();
dispatch ("hook-window-loaded", {event: e});
}
console.onWindowUnload =
function con_winunload (e)
{
console.scriptsView.thaw();
dispatch ("hook-window-unloaded", {event: e});
// dd (dumpObjectTree(e));
}
console.onWindowClose =
function con_winunload (win)
function con_winclose (win)
{
//dd ("window closed: " + win);
if (win.location.href != "chrome://venkman/content/venkman.xul")
{
var winRecord = console.windows.locateChildByWindow(win);
if (!ASSERT(winRecord, "onWindowClose: Can't find window record."))
return;
console.windows.removeChildAtIndex(winRecord.childIndex);
var idx = arrayIndexOf(console.windows.hookedWindows, win);
if (idx != -1)
arrayRemoveAt(console.windows.hookedWindows, idx);
}
console.scriptsView.freeze();
}
if (isWindowFiltered(win))
return;
console.onDebugTrap =
function con_ondt ()
{
var frame = setCurrentFrameByIndex(0);
var type = console.trapType;
var frameRec = console.stackView.stack.childData[0];
console.pushStatus (getMsg(MSN_STATUS_STOPPED, [frameRec.functionName,
frameRec.location]));
if (type != jsdIExecutionHook.TYPE_INTERRUPTED ||
console._lastStackDepth != console.frames.length)
{
display (formatFrame(frame));
}
displaySource (frame.script.fileName, frame.line,
(type == jsdIExecutionHook.TYPE_INTERRUPTED) ? 0 : 2);
console._lastStackDepth = console.frames.length;
console.stackView.restoreState();
enableDebugCommands()
}
console.onDebugContinue =
function con_ondc ()
{
console.popStatus();
console.sourceView.tree.invalidate();
//dd ("window closed: " + win + " ``" + win.location + "''");
var i = arrayIndexOf(console.hookedWindows, win);
ASSERT (i != console.hookedWindows.length,
"WARNING: Can't find hook window for closed window " + i + ".");
arrayRemoveAt(console.hookedWindows, i);
dispatch ("hook-window-closed", {window: win});
//console.scriptsView.freeze();
}
console.onLoad =
@ -164,24 +144,25 @@ function con_load (e)
}
catch (ex)
{
window.alert (getMsg (MSN_ERR_STARTUP, formatException(ex)));
if ("bundleList" in console)
window.alert (getMsg (MSN_ERR_STARTUP, formatException(ex)));
else
window.alert (formatException(ex));
console.startupException = ex;
}
}
console.onClose =
function con_onclose (e)
{
if (typeof console == "object" && "frames" in console)
{
if (confirm(MSG_QUERY_CLOSE))
{
console.__exitAfterContinue__ = true;
dispatch ("cont");
}
return false;
}
return true;
dd ("onclose");
if (typeof console != "object" || "startupException" in console)
return true;
dd ("onclose: dispatching");
return dispatch ("hook-venkman-query-exit");
}
console.onUnload =
@ -189,375 +170,51 @@ function con_unload (e)
{
dd ("Application venkman, 'JavaScript Debugger' unloading.");
if (typeof console != "object")
return;
dispatch ("hook-venkman-exit");
destroy();
return true;
}
console.onFrameChanged =
function con_fchanged (currentFrame, currentFrameIndex)
console.onMouseOver =
function con_mouseover (e)
{
var stack = console.stackView.stack;
var element = e.originalTarget;
if (!("_lastElement" in console))
console._lastElement = null;
if (currentFrame)
while (element)
{
if (currentFrame.isNative)
if (element == console._lastElement)
return;
var frameRecord = stack.childData[currentFrameIndex];
var vr = frameRecord.calculateVisualRow();
console.stackView.selectedIndex = vr;
console.stackView.scrollTo (vr, 0);
var containerRec = console.scripts[currentFrame.script.fileName];
if (containerRec)
if ("getAttribute" in element)
{
dispatch ("find-url-soft", {url: containerRec.fileName,
rangeStart: currentFrame.script.baseLineNumber,
rangeEnd: currentFrame.script.baseLineNumber +
currentFrame.script.lineExtent - 1,
lineNumber: currentFrame.line});
}
else
{
dd ("frame from unknown source");
}
}
else
{
stack.close();
stack.childData = new Array();
stack.hide();
}
}
console.onInputCompleteLine =
function con_icline (e)
{
if (console.inputHistory.length == 0 || console.inputHistory[0] != e.line)
console.inputHistory.unshift (e.line);
if (console.inputHistory.length > console.prefs["input.history.max"])
console.inputHistory.pop();
console.lastHistoryReferenced = -1;
console.incompleteLine = "";
var ev = {isInteractive: true, initialEvent: e};
dispatch (e.line, ev, CMD_CONSOLE);
}
console.onSingleLineKeypress =
function con_slkeypress (e)
{
var w;
var newOfs;
switch (e.keyCode)
{
case 13:
if (!e.target.value)
var status = element.getAttribute ("venkmanstatustext");
if (status)
{
console.status = status;
console._lastElement = element;
return;
e.line = e.target.value;
console.onInputCompleteLine (e);
e.target.value = "";
break;
case 38: /* up */
if (console.lastHistoryReferenced == -2)
{
console.lastHistoryReferenced = -1;
e.target.value = console.incompleteLine;
}
else if (console.lastHistoryReferenced <
console.inputHistory.length - 1)
{
e.target.value =
console.inputHistory[++console.lastHistoryReferenced];
}
break;
case 40: /* down */
if (console.lastHistoryReferenced > 0)
e.target.value =
console.inputHistory[--console.lastHistoryReferenced];
else if (console.lastHistoryReferenced == -1)
{
e.target.value = "";
console.lastHistoryReferenced = -2;
}
else
{
console.lastHistoryReferenced = -1;
e.target.value = console.incompleteLine;
}
break;
case 33: /* pgup */
w = window.frames[0];
newOfs = w.pageYOffset - (w.innerHeight / 2);
if (newOfs > 0)
w.scrollTo (w.pageXOffset, newOfs);
else
w.scrollTo (w.pageXOffset, 0);
break;
case 34: /* pgdn */
w = window.frames[0];
newOfs = w.pageYOffset + (w.innerHeight / 2);
if (newOfs < (w.innerHeight + w.pageYOffset))
w.scrollTo (w.pageXOffset, newOfs);
else
w.scrollTo (w.pageXOffset, (w.innerHeight + w.pageYOffset));
break;
case 9: /* tab */
e.preventDefault();
console.onTabCompleteRequest(e);
break;
default:
console.lastHistoryReferenced = -1;
console.incompleteLine = e.target.value;
break;
}
}
console.onProjectSelect =
function con_projsel (e)
{
if (console.projectView.selectedIndex == -1)
return;
console.scriptsView.selectedIndex = -1;
console.stackView.selectedIndex = -1;
console.sourceView.selectedIndex = -1;
var rowIndex = console.projectView.selectedIndex;
if (rowIndex == -1 || rowIndex > console.projectView.rowCount)
return;
var row =
console.projectView.childData.locateChildByVisualRow(rowIndex);
if (!row)
{
ASSERT (0, "bogus row index " + rowIndex);
return;
}
if (row instanceof BPRecord)
dispatch ("find-bp", {breakpointRec: row});
else if (row instanceof FileRecord || row instanceof WindowRecord)
dispatch ("find-url", {url: row.url});
}
console.onStackSelect =
function con_stacksel (e)
{
if (console.stackView.selectedIndex == -1)
return;
console.scriptsView.selectedIndex = -1;
console.projectView.selectedIndex = -1;
console.sourceView.selectedIndex = -1;
var rowIndex = console.stackView.selectedIndex;
if (rowIndex == -1 || rowIndex > console.stackView.rowCount)
return;
var row =
console.stackView.childData.locateChildByVisualRow(rowIndex);
if (!row)
{
ASSERT (0, "bogus row index " + rowIndex);
return;
}
var source;
var sourceView = console.sourceView;
if (row instanceof FrameRecord)
{
dispatch ("frame", {frameIndex: row.childIndex});
}
else if (row instanceof ValueRecord && row.jsType == jsdIValue.TYPE_OBJECT)
{
if (row.parentRecord instanceof FrameRecord &&
row == row.parentRecord.scopeRec)
}
if ("localName" in element && element.localName == "floatingview")
{
console.status = console.viewManager.computeLocation (element);
console._lastElement = element;
return;
dispatch ("find-creator", {jsdValue: row.value});
}
}
console.onScriptSelect =
function con_scptsel (e)
{
if (console.scriptsView.selectedIndex == -1)
return;
console.projectView.selectedIndex = -1;
console.stackView.selectedIndex = -1;
console.sourceView.selectedIndex = -1;
var rowIndex = console.scriptsView.selectedIndex;
if (rowIndex == -1 || rowIndex > console.scriptsView.rowCount)
{
dd ("row out of bounds");
return;
}
var row =
console.scriptsView.childData.locateChildByVisualRow(rowIndex);
ASSERT (row, "bogus row");
if (row instanceof ScriptRecord)
dispatch ("find-script", {scriptRec: row});
else if (row instanceof ScriptContainerRecord)
dispatch ("find-url", {url: row.fileName});
}
console.onScriptClick =
function con_scptclick (e)
{
if (e.originalTarget.localName == "treecol")
{
/* resort by column */
var rowIndex = new Object();
var colID = new Object();
var childElt = new Object();
var obo = console.scriptsView.tree;
obo.getCellAt(e.clientX, e.clientY, rowIndex, colID, childElt);
var prop;
switch (colID.value)
{
case "script-name":
prop = "functionName";
break;
case "script-line-start":
prop = "baseLineNumber";
break;
case "script-line-extent":
prop = "lineExtent";
break;
}
var scriptsRoot = console.scriptsView.childData;
var dir = (prop == scriptsRoot._share.sortColumn) ?
scriptsRoot._share.sortDirection * -1 : 1;
dd ("sort direction is " + dir);
scriptsRoot.setSortColumn (prop, dir);
element = element.parentNode;
}
}
console.onSourceSelect =
function con_sourcesel (e)
{
if (console.sourceView.selectedIndex == -1)
return;
console.scriptsView.selectedIndex = -1;
console.stackView.selectedIndex = -1;
console.projectView.selectedIndex = -1;
}
console.onSourceClick =
function con_sourceclick (e)
{
var target = e.originalTarget;
if (target.localName == "treechildren")
{
var row = new Object();
var colID = new Object();
var childElt = new Object();
var tree = console.sourceView.tree;
tree.getCellAt(e.clientX, e.clientY, row, colID, childElt);
if (row.value == -1)
return;
colID = colID.value;
row = row.value;
if (colID == "breakpoint-col")
{
if ("onMarginClick" in console.sourceView.childData)
console.sourceView.childData.onMarginClick (e, row + 1);
}
}
}
console.onTabCompleteRequest =
function con_tabcomplete (e)
{
var selStart = e.target.selectionStart;
var selEnd = e.target.selectionEnd;
var v = e.target.value;
if (selStart != selEnd)
{
/* text is highlighted, just move caret to end and exit */
e.target.selectionStart = e.target.selectionEnd = v.length;
return;
}
var firstSpace = v.indexOf(" ");
if (firstSpace == -1)
firstSpace = v.length;
var pfx;
var d;
if ((selStart <= firstSpace))
{
/* The cursor is positioned before the first space, so we're completing
* a command
*/
var partialCommand = v.substring(0, firstSpace).toLowerCase();
var cmds = console.commandManager.listNames(partialCommand, CMD_CONSOLE);
if (!cmds)
/* partial didn't match a thing */
display (getMsg(MSN_NO_CMDMATCH, partialCommand), MT_ERROR);
else if (cmds.length == 1)
{
/* partial matched exactly one command */
pfx = cmds[0];
if (firstSpace == v.length)
v = pfx + " ";
else
v = pfx + v.substr (firstSpace);
e.target.value = v;
e.target.selectionStart = e.target.selectionEnd = pfx.length + 1;
}
else if (cmds.length > 1)
{
/* partial matched more than one command */
d = new Date();
if ((d - console._lastTabUp) <= console.prefs["input.dtab.time"])
display (getMsg (MSN_CMDMATCH,
[partialCommand, cmds.join(MSG_COMMASP)]));
else
console._lastTabUp = d;
pfx = getCommonPfx(cmds);
if (firstSpace == v.length)
v = pfx;
else
v = pfx + v.substr (firstSpace);
e.target.value = v;
e.target.selectionStart = e.target.selectionEnd = pfx.length;
}
}
}
window.onresize =
function ()
{
console.scrollDown();
dispatch ("hook-window-resized", { window: window });
// console.scrollDown();
}

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -34,196 +34,242 @@
*/
function initMenus()
{
var lastMenu;
var cm = console.commandManager;
/*
* The C(), M(), m(), and t() functions are defined below. They are
* Venkman specific wrappers around calls the the CommandManager.
*
* C(id, name)
* Creates a new context menu attached to the object with the id |id|.
* The label will be derived from the string named "mnu." + |name|.
*
* M(parent, name)
* Creates a new menu dropdown in an existing menu bar with the id |parent|.
* The label will be derived from the string named "mnu." + |name|.
*
* m(commandName)
* Creates a menuitem for the command named commandName.
*
* t(parent, commandName)
* Creates a toolbaritem for the command named |commandName| in the toolbar
* with the id |parent|.
*/
/* main toolbar */
t("maintoolbar", "stop");
t("maintoolbar", "-");
t("maintoolbar", "cont");
t("maintoolbar", "next");
t("maintoolbar", "step");
t("maintoolbar", "finish");
t("maintoolbar", "-");
t("maintoolbar", "profile-tb");
t("maintoolbar", "pprint");
M("mainmenu", "file");
m("open-url");
m("find-file");
m("-");
m("close");
m("save-source");
m("save-profile");
m("-");
m("quit");
/* View menu */
M("mainmenu", "view");
m("reload");
m("pprint", {type: "checkbox",
checkedif: "console.sourceView.prettyPrint"});
m("-");
m("toggle-chrome", {type: "checkbox",
checkedif: "console.enableChromeFilter"});
/* Debug menu */
M("mainmenu", "debug");
m("stop", {type: "checkbox",
checkedif: "console.jsds.interruptHook"});
m("cont");
m("next");
m("step");
m("finish");
m("-");
m("em-ignore", {type: "radio", name: "em",
checkedif: "console.errorMode == EMODE_IGNORE"});
m("em-trace", {type: "radio", name: "em",
checkedif: "console.errorMode == EMODE_TRACE"});
m("em-break", {type: "radio", name: "em",
checkedif: "console.errorMode == EMODE_BREAK"});
m("-");
m("tm-ignore", {type: "radio", name: "tm",
checkedif: "console.throwMode == TMODE_IGNORE"});
m("tm-trace", {type: "radio", name: "tm",
checkedif: "console.throwMode == TMODE_TRACE"});
m("tm-break", {type: "radio", name: "tm",
checkedif: "console.throwMode == TMODE_BREAK"});
m("-");
m("toggle-ias",
{type: "checkbox",
checkedif: "console.jsds.initAtStartup"});
M("mainmenu", "profile");
m("toggle-profile", {type: "checkbox",
checkedif:
"console.jsds.flags & COLLECT_PROFILE_DATA"});
m("clear-profile");
m("save-profile");
/* Context menu for console view */
C("output-iframe", "console");
m("stop", {type: "checkbox",
checkedif: "console.jsds.interruptHook"});
m("cont");
m("next");
m("step");
m("finish");
m("-");
m("em-ignore", {type: "radio", name: "em",
checkedif: "console.errorMode == EMODE_IGNORE"});
m("em-trace", {type: "radio", name: "em",
checkedif: "console.errorMode == EMODE_TRACE"});
m("em-break", {type: "radio", name: "em",
checkedif: "console.errorMode == EMODE_BREAK"});
m("-");
m("tm-ignore", {type: "radio", name: "tm",
checkedif: "console.throwMode == TMODE_IGNORE"});
m("tm-trace", {type: "radio", name: "tm",
checkedif: "console.throwMode == TMODE_TRACE"});
m("tm-break", {type: "radio", name: "tm",
checkedif: "console.throwMode == TMODE_BREAK"});
/* Context menu for project view */
C("project-tree", "project");
m("find-url");
m("-");
m("clear-all", {enabledif:
"cx.target instanceof BPRecord || " +
"(has('breakpointLabel') && cx.target.childData.length)"});
m("clear");
m("-");
m("save-profile", {enabledif: "has('url')"});
/* Context menu for source view */
C("source-tree", "source");
m("save-source");
m("-");
m("break", {enabledif: "cx.lineIsExecutable && !has('breakpointRec')"});
m("fbreak", {enabledif: "!cx.lineIsExecutable && !has('breakpointRec')"});
m("clear");
m("-");
m("cont");
m("next");
m("step");
m("finish");
m("-");
m("pprint", {type: "checkbox",
checkedif: "console.sourceView.prettyPrint"});
/* Context menu for script view */
C("script-list-tree", "script");
m("find-url");
m("find-script");
m("clear-script", {enabledif: "cx.target.bpcount"});
m("-");
m("save-profile");
m("clear-profile");
/* Context menu for stack view */
C("stack-tree", "stack");
m("frame", {enabledif: "cx.target instanceof FrameRecord"});
m("find-creator", {enabledif: "cx.target instanceof ValueRecord && " +
"cx.target.jsType == jsdIValue.TYPE_OBJECT"});
m("find-ctor", {enabledif: "cx.target instanceof ValueRecord && " +
"cx.target.jsType == jsdIValue.TYPE_OBJECT"});
function M(parent, id, attribs)
{
function onMenuCommand (event, window)
{
lastMenu = parent + ":" + id;
console.commandManager.appendSubMenu(parent, lastMenu,
getMsg("mnu." + id));
}
function C(elementId, id)
{
lastMenu = "popup:" + id;
console.commandManager.appendPopupMenu("dynamicPopups", lastMenu,
getMsg("popup." + id));
var elemObject = document.getElementById(elementId);
elemObject.setAttribute ("context", lastMenu);
}
function m(command, attribs)
{
if (command != "-")
var params;
var commandName = event.originalTarget.getAttribute("commandname");
if ("cx" in console.menuManager && console.menuManager.cx)
{
if (!(command in cm.commands))
{
dd("no such command: " + command)
return;
}
command = cm.commands[command];
console.menuManager.cx.sourceWindow = window;
params = console.menuManager.cx;
}
console.commandManager.appendMenuItem(lastMenu, command, attribs);
}
else
{
params = { sourceWindow: window };
}
dispatch (commandName, params);
delete console.menuManager.cx;
};
function t(parent, command, attribs)
{
if (command != "-")
command = cm.commands[command];
console.commandManager.appendToolbarItem(parent, command, attribs);
}
console.onMenuCommand = onMenuCommand;
console.menuSpecs = new Object();
var menuManager =
console.menuManager = new MenuManager(console.commandManager,
console.menuSpecs,
getCommandContext,
"console.onMenuCommand(event, " +
"window);");
console.menuSpecs["maintoolbar"] = {
items:
[
["stop"],
["-"],
["cont"],
["next"],
["step"],
["finish"],
["-"],
["profile-tb"],
["toggle-pprint"]
]
};
console.menuSpecs["mainmenu:file"] = {
label: MSG_MNU_FILE,
items:
[
["open-url"],
["find-file"],
["-"],
["close"],
["save-source-tab", { enabledif: "console.views.source2.canSave()" }],
["save-profile"],
["-"],
["quit"]
]
};
console.menuSpecs["mainmenu:view"] = {
label: MSG_MNU_VIEW,
items:
[
[">popup:showhide"],
["-"],
["reload-source-tab"],
["toggle-source-coloring",
{type: "checkbox",
checkedif: "console.prefs['services.source.sourceColoring'] " +
"== 'true'"} ],
["toggle-pprint",
{type: "checkbox",
checkedif: "console.prefs['prettyprint']"}],
["-"],
[">session:colors"],
["-"],
["save-default-layout"],
["toggle-save-layout",
{type: "checkbox",
checkedif: "console.prefs['saveLayoutOnExit']"}]
]
};
console.menuSpecs["mainmenu:debug"] = {
label: MSG_MNU_DEBUG,
items:
[
["stop",
{type: "checkbox",
checkedif: "console.jsds.interruptHook"}],
["cont"],
["next"],
["step"],
["finish"],
["-"],
[">popup:emode"],
[">popup:tmode"],
["-"],
["toggle-chrome",
{type: "checkbox",
checkedif: "console.prefs['enableChromeFilter']"}]
/*
["toggle-ias",
{type: "checkbox",
checkedif: "console.jsds.initAtStartup"}]
*/
]
};
console.menuSpecs["mainmenu:help"] = {
label: MSG_MNU_HELP,
items:
[
["mozilla-help"],
["help"],
["-"],
["version"],
["about-mozilla"]
]
};
console.menuSpecs["mainmenu:profile"] = {
label: MSG_MNU_PROFILE,
items:
[
["toggle-profile",
{type: "checkbox",
checkedif: "console.jsds.flags & COLLECT_PROFILE_DATA"}],
["clear-profile"],
["save-profile"]
]
};
console.menuSpecs["popup:emode"] = {
label: MSG_MNU_EMODE,
items:
[
["em-ignore",
{type: "radio", name: "em",
checkedif: "console.errorMode == EMODE_IGNORE"}],
["em-trace",
{type: "radio", name: "em",
checkedif: "console.errorMode == EMODE_TRACE"}],
["em-break",
{type: "radio", name: "em",
checkedif: "console.errorMode == EMODE_BREAK"}]
]
};
console.menuSpecs["popup:tmode"] = {
label: MSG_MNU_TMODE,
items:
[
["tm-ignore",
{type: "radio", name: "tm",
checkedif: "console.throwMode == TMODE_IGNORE"}],
["tm-trace",
{type: "radio", name: "tm",
checkedif: "console.throwMode == TMODE_TRACE"}],
["tm-break",
{type: "radio", name: "tm",
checkedif: "console.throwMode == TMODE_BREAK"}]
]
};
console.menuSpecs["popup:showhide"] = {
label: MSG_MNU_SHOWHIDE,
items: [ /* filled by initViews() */ ]
};
}
console.createMainMenu = createMainMenu;
function createMainMenu(document)
{
var mainmenu = document.getElementById("mainmenu");
var menuManager = console.menuManager;
for (var id in console.menuSpecs)
{
if (id.indexOf("mainmenu:") == 0)
menuManager.createMenu (mainmenu, null, id);
}
mainmenu.removeAttribute ("collapsed");
var toolbox = document.getElementById("main-toolbox");
toolbox.removeAttribute ("collapsed");
}
console.createMainToolbar = createMainToolbar;
function createMainToolbar(document)
{
var maintoolbar = document.getElementById("maintoolbar");
var menuManager = console.menuManager;
var spec = console.menuSpecs["maintoolbar"];
for (var i in spec.items)
{
menuManager.appendToolbarItem (maintoolbar, null, spec.items[i]);
}
maintoolbar = document.getElementById("maintoolbar-outer");
maintoolbar.removeAttribute ("collapsed");
var toolbox = document.getElementById("main-toolbox");
toolbox.removeAttribute ("collapsed");
}
function getCommandContext (id, event)
{
var cx = { originalEvent: event };
if (id in console.menuSpecs)
{
if ("getContext" in console.menuSpecs[id])
cx = console.menuSpecs[id].getContext(cx);
else if ("cx" in console.menuManager)
{
//dd ("using existing context");
cx = console.menuManager.cx;
}
else
{
//dd ("no context at all");
}
}
else
{
dd ("getCommandContext: unknown menu id " + id);
}
if (typeof cx == "object")
{
if (!("menuManager" in cx))
cx.menuManager = console.menuManager;
if (!("contextSource" in cx))
cx.contextSource = id;
if ("dbgContexts" in console && console.dbgContexts)
dd ("context '" + id + "'\n" + dumpObjectTree(cx));
}
return cx;
}

Просмотреть файл

@ -44,12 +44,9 @@
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<overlaytarget id="menu-overlay-target">
<!-- parents for the command manager-managed objects -->
<keyset id="dynamicKeys"/>
<popupset id="dynamicPopups"/>
<!-- Commands -->
<commandset id="venkmanCommands">
<commandset id="venkman-commands">
<!-- Edit commands -->
<commandset id="selectEditMenuItems"/>
@ -88,8 +85,8 @@
</keyset>
<!-- Main menu bar -->
<toolbox flex="1">
<menubar id="mainmenu" persist="collapsed"
<toolbox flex="1" id="main-toolbox" collapsed="true">
<menubar id="mainmenu" persist="collapsed" collapsed="true"
grippytooltiptext="&MenuBar.tooltip;">
<!-- File menu placeholder, see venkman-menus.js -->
@ -127,12 +124,18 @@
<!-- Tasks menu -->
<menu id="windowMenu"/>
<!-- Help menu -->
<menu id="mainmenu:help"/>
</menubar>
<!-- Debug toolbar -->
<toolbar class="toolbar-primary chromeclass-toolbar" id="maintoolbar-outer"
grippytooltiptext="&DebugBar.tooltip;">
<hbox id="maintoolbar"/>
grippytooltiptext="&DebugBar.tooltip;" collapsed="true">
<hbox id="maintoolbar">
</hbox>
<textbox id="paint-hack"
style="border: none; background: none; height: 0px; width: 0px"/>
</toolbar>
</toolbox>
@ -143,7 +146,7 @@
<overlaytarget id="statusbar-overlay-target">
<statusbar class="chromeclass-status" id="status-bar" flex="1">
<statusbarpanel id="component-bar"/>
<statusbarpanel id="status-text" label="&StatusText.label;" flex="1"
<statusbarpanel id="status-text" label="" flex="1"
crop="right"/>
<statusbarpanel class="statusbarpanel-iconic" id="offline-status"
hidden="true" offline="true"/>

Просмотреть файл

@ -33,27 +33,81 @@
*
*/
console._bundle = srGetStrBundle("chrome://venkman/locale/venkman.properties");
function initMsgs ()
{
console.bundleList = new Array();
console.defaultBundle =
initStringBundle("chrome://venkman/locale/venkman.properties");
}
function initStringBundle (bundlePath)
{
const nsIPropertyElement = Components.interfaces.nsIPropertyElement;
var pfx;
if (console.bundleList.length == 0)
pfx = "";
else
pfx = console.bundleList.length + ":";
var bundle = srGetStrBundle(bundlePath);
console.bundleList.push(bundle);
var enumer = bundle.getSimpleEnumeration();
while (enumer.hasMoreElements())
{
var prop = enumer.getNext().QueryInterface(nsIPropertyElement);
var ary = prop.key.match (/^(msg|msn)/);
if (ary)
{
var constValue;
var constName = prop.key.toUpperCase().replace (/\./g, "_");
if (ary[1] == "msn")
constValue = pfx + prop.key;
else
constValue = prop.value.replace (/^\"/, "").replace (/\"$/, "");
window[constName] = constValue;
}
}
return bundle;
}
function getMsg (msgName, params, deflt)
{
try
{
var bundle;
var ary = msgName.match (/(\d+):(.+)/);
if (ary)
{
return (getMsgFrom(console.bundleList[ary[1]], ary[2], params,
deflt));
}
return (getMsgFrom(console.bundleList[0], msgName, params, deflt));
}
catch (ex)
{
ASSERT (0, "Caught exception getting message: " + msgName + "/" +
params);
return deflt ? deflt : msgName;
}
}
function getMsgFrom (bundle, msgName, params, deflt)
{
try
{
var rv;
if (params && params instanceof Array)
{
rv = console._bundle.formatStringFromName (msgName, params,
params.length);
}
rv = bundle.formatStringFromName (msgName, params, params.length);
else if (params)
{
rv = console._bundle.formatStringFromName (msgName, [params], 1);
}
rv = bundle.formatStringFromName (msgName, [params], 1);
else
{
rv = console._bundle.GetStringFromName (msgName);
}
rv = bundle.GetStringFromName (msgName);
/* strip leading and trailing quote characters, see comment at the
* top of venkman.properties.
@ -73,6 +127,8 @@ function getMsg (msgName, params, deflt)
}
return deflt;
}
return null;
}
/* message types, don't localize */
@ -92,6 +148,11 @@ const MT_EVAL_OUT = "EVAL-OUT";
const MT_FEVAL_IN = "FEVAL-IN";
const MT_FEVAL_OUT = "FEVAL-OUT";
/* these messages might be needed to report an exception at startup, before
* initMsgs() has been called. */
window.MSN_ERR_STARTUP = "msg.err.startup";
window.MSN_FMT_JSEXCEPTION = "msn.fmt.jsexception";
/* exception number -> localized message name map, keep in sync with ERR_* from
* venkman-static.js */
const exceptionMsgNames = ["err.notimplemented",
@ -101,162 +162,3 @@ const exceptionMsgNames = ["err.notimplemented",
"err.no.debugger",
"err.failure",
"err.no.stack"];
/* message values for non-parameterized messages */
const MSG_ERR_NO_STACK = getMsg("msg.err.nostack");
const MSG_ERR_DISABLED = getMsg("msg.err.disabled");
const MSG_ERR_INTERNAL_BPT = getMsg("msg.err.internal.bpt");
const MSG_TYPE_BOOLEAN = getMsg("msg.type.boolean");
const MSG_TYPE_DOUBLE = getMsg("msg.type.double");
const MSG_TYPE_FUNCTION = getMsg("msg.type.function");
const MSG_TYPE_INT = getMsg("msg.type.int");
const MSG_TYPE_NULL = getMsg("msg.type.null");
const MSG_TYPE_OBJECT = getMsg("msg.type.object");
const MSG_TYPE_STRING = getMsg("msg.type.string");
const MSG_TYPE_UNKNOWN = getMsg("msg.type.unknown");
const MSG_TYPE_VOID = getMsg("msg.type.void");
const MSG_CLASS_XPCOBJ = getMsg("msg.class.xpcobj");
const MSG_BLACKLIST = getMsg("msg.blacklist");
const MSG_WINDOW_REC = getMsg("msg.window.rec");
const MSG_FILES_REC = getMsg("msg.files.rec");
const MSG_BREAK_REC = getMsg("msg.break.rec");
const MSG_CALL_STACK = getMsg("msg.callstack");
const MSG_WORD_NATIVE = getMsg("msg.val.native");
const MSG_WORD_SCRIPT = getMsg("msg.val.script");
const MSG_WORD_THIS = getMsg("msg.val.this");
const MSG_WORD_BREAKPOINT = getMsg("msg.val.breakpoint");
const MSG_WORD_DEBUG = getMsg("msg.val.debug");
const MSG_WORD_DEBUGGER = getMsg("msg.val.debugger");
const MSG_WORD_THROW = getMsg("msg.val.throw");
const MSG_WORD_SCOPE = getMsg("msg.val.scope");
const MSG_COMMASP = getMsg("msg.val.commasp", " ");
const MSG_VAL_CONSOLE = getMsg("msg.val.console");
const MSG_VAL_UNKNOWN = getMsg("msg.val.unknown");
const MSG_VAL_NA = getMsg("msg.val.na");
const MSG_VAL_OBJECT = getMsg("msg.val.object");
const MSG_VAL_EXPR = getMsg("msg.val.expression");
const MSG_VAL_PROTO = getMsg("msg.val.proto");
const MSG_VAL_PARENT = getMsg("msg.val.parent");
const MSG_VAL_EXCEPTION = getMsg("msg.val.exception");
const MSG_VAL_ON = getMsg("msg.val.on");
const MSG_VAL_OFF = getMsg("msg.val.off");
const MSG_VAL_TLSCRIPT = getMsg("msg.val.tlscript");
const MSG_URL_NATIVE = getMsg("msg.url.native");
const MSG_VF_ENUMERABLE = getMsg("vf.enumerable");
const MSG_VF_READONLY = getMsg("vf.readonly");
const MSG_VF_PERMANENT = getMsg("vf.permanent");
const MSG_VF_ALIAS = getMsg("vf.alias");
const MSG_VF_ARGUMENT = getMsg("vf.argument");
const MSG_VF_VARIABLE = getMsg("vf.variable");
const MSG_VF_HINTED = getMsg("vf.hinted");
const MSG_HELLO = getMsg("msg.hello");
const MSG_QUERY_CLOSE = getMsg("msg.query.close");
const MSG_STATUS_DEFAULT = getMsg("msg.status.default");
const MSG_TIP_HELP = getMsg("msg.tip.help");
const MSG_NO_BREAKPOINTS_SET = getMsg("msg.no.breakpoints.set");
const MSG_NO_FBREAKS_SET = getMsg("msg.no.fbreaks.set");
const MSG_EMODE_IGNORE = getMsg("msg.emode.ignore");
const MSG_EMODE_TRACE = getMsg("msg.emode.trace");
const MSG_EMODE_BREAK = getMsg("msg.emode.break");
const MSG_TMODE_IGNORE = getMsg("msg.tmode.ignore");
const MSG_TMODE_TRACE = getMsg("msg.tmode.trace");
const MSG_TMODE_BREAK = getMsg("msg.tmode.break");
const MSG_NO_HELP = getMsg("msg.no.help");
const MSG_NOTE_CONSOLE = getMsg("msg.note.console");
const MSG_NOTE_NEEDSTACK = getMsg("msg.note.needstack");
const MSG_NOTE_NOSTACK = getMsg("msg.note.nostack");
const MSG_DOC_NOTES = getMsg("msg.doc.notes");
const MSG_DOC_DESCRIPTION = getMsg("msg.doc.description");
const MSG_PROFILE_CLEARED = getMsg("msg.profile.cleared");
const MSG_OPEN_FILE = getMsg("msg.open.file");
const MSG_OPEN_URL = getMsg("msg.open.url");
const MSG_SAVE_PROFILE = getMsg("msg.save.profile");
const MSG_SAVE_SOURCE = getMsg("msg.save.source");
/* message names for parameterized messages */
const MSN_ERR_INTERNAL_DISPATCH = "msg.err.internal.dispatch";
const MSN_CHROME_FILTER = "msg.chrome.filter";
const MSN_ERR_NO_SCRIPT = "msg.err.noscript";
const MSN_IASMODE = "msg.iasmode";
const MSN_EXTRA_PARAMS = "msg.extra.params";
const MSN_DOC_COMMANDLABEL = "msg.doc.commandlabel";
const MSN_DOC_KEY = "msg.doc.key";
const MSN_DOC_SYNTAX = "msg.doc.syntax";
const MSN_ERR_SCRIPTLOAD = "err.subscript.load";
const MSN_ERR_NO_COMMAND = "msg.err.nocommand";
const MSN_ERR_NOTIMPLEMENTED = "msg.err.notimplemented";
const MSN_ERR_AMBIGCOMMAND = "msg.err.ambigcommand";
const MSN_ERR_BP_NOSCRIPT = "msg.err.bp.noscript";
const MSN_ERR_BP_NOLINE = "msg.err.bp.noline";
const MSN_ERR_BP_NODICE = "msg.err.bp.nodice";
const MSN_ERR_BP_NOINDEX = "msg.err.bp.noindex";
const MSN_ERR_REQUIRED_PARAM = "err.required.param"; /* also used as exception */
const MSN_ERR_INVALID_PARAM = "err.invalid.param"; /* also used as exception */
const MSN_ERR_SOURCE_LOAD_FAILED = "msg.err.source.load.failed";
const MSN_ERR_STARTUP = "msg.err.startup";
const MSN_FMT_ARGUMENT = "fmt.argument";
const MSN_FMT_PROPERTY = "fmt.property";
const MSN_FMT_SCRIPT = "fmt.script";
const MSN_FMT_FRAME = "fmt.frame";
const MSN_FMT_VALUE_LONG = "fmt.value.long";
const MSN_FMT_VALUE_MED = "fmt.value.med";
const MSN_FMT_VALUE_SHORT = "fmt.value.short";
const MSN_FMT_OBJECT = "fmt.object";
const MSN_FMT_JSEXCEPTION = "fmt.jsexception";
const MSN_FMT_BADMOJO = "fmt.badmojo";
const MSN_FMT_TMP_ASSIGN = "fmt.tmp.assign";
const MSN_FMT_LONGSTR = "fmt.longstr";
const MSN_FMT_USAGE = "fmt.usage";
const MSN_FMT_GUESSEDNAME = "fmt.guessedname";
const MSN_FMT_PREFVALUE = "fmt.prefvalue";
const MSN_NO_PROPERTIES = "msg.noproperties";
const MSN_NO_CMDMATCH = "msg.no-commandmatch";
const MSN_CMDMATCH = "msg.commandmatch";
const MSN_CMDMATCH_ALL = "msg.commandmatch.all";
const MSN_PROPS_HEADER = "msg.props.header";
const MSN_PROPSD_HEADER = "msg.propsd.header";
const MSN_BP_HEADER = "msg.bp.header";
const MSN_BP_LINE = "msg.bp.line";
const MSN_BP_CREATED = "msg.bp.created";
const MSN_BP_DISABLED = "msg.bp.disabled";
const MSN_BP_CLEARED = "msg.bp.cleared";
const MSN_BP_EXISTS = "msg.bp.exists";
const MSN_FBP_HEADER = "msg.fbp.header";
const MSN_FBP_LINE = "msg.fbp.line";
const MSN_FBP_CREATED = "msg.fbp.created";
const MSN_FBP_DISABLED = "msg.fbp.disabled";
const MSN_FBP_EXISTS = "msg.fbp.exists";
const MSN_SOURCE_LINE = "msg.source.line";
const MSN_EXCP_TRACE = "msg.exception.trace";
const MSN_ERPT_ERROR = "msg.erpt.error";
const MSN_ERPT_WARN = "msg.erpt.warn";
const MSN_PROFILE_LOST = "msg.profile.lost";
const MSN_PROFILE_STATE = "msg.profile.state";
const MSN_PROFILE_SAVED = "msg.profile.saved";
const MSN_VERSION = "msg.version";
const MSN_DEFAULT_ALIAS_HELP = "msg.default.alias.help";
const MSN_CONT = "msg.cont";
const MSN_EVAL_ERROR = "msg.eval.error";
const MSN_EVAL_THREW = "msg.eval.threw";
const MSN_STOP = "msg.stop";
const MSN_SUBSCRIPT_LOADED = "msg.subscript.load";
const MSN_STATUS_LOADING = "msg.status.loading";
const MSN_STATUS_MARKING = "msg.status.marking";
const MSN_STATUS_STOPPED = "msg.status.stopped";

Просмотреть файл

@ -33,18 +33,6 @@
*
*/
function htmlSpacer (attribs, contents)
{
if (!attribs)
attribs = {"class": "spacer-node"};
else if (attribs["class"])
attribs["class"] += " spacer-node";
else
attribs["class"] = "spacer-node";
return htmlImg (attribs, contents);
}
function CMungerEntry (name, regex, className, tagName)
{
@ -92,8 +80,14 @@ CMunger.prototype.munge =
function mng_munge (text, containerTag, data)
{
var entry;
var ary;
var ary;
if (!text) //(ASSERT(text, "no text to munge"))
return "";
if (typeof text != "string")
text = String(text);
if (!containerTag)
containerTag =
document.createElementNS (NS_XHTML, this.tagName);
@ -150,7 +144,7 @@ function mng_munge (text, containerTag, data)
for (var i in wordParts)
{
subTag.appendChild (document.createTextNode (wordParts[i]));
subTag.appendChild (htmlSpacer());
subTag.appendChild (htmlWBR());
}
containerTag.appendChild (subTag);

Просмотреть файл

@ -0,0 +1,120 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The JavaScript Debugger
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
a.venkman-link {
text-decoration: none;
}
a.venkman-link:hover {
text-decoration: underline;
}
#output-table {
width: 100%;
}
.msg { /* .msg = a single message in the */
width: 100%; /* output window */
font: 11pt lucida, sans-serif;
font-family: monospace;
white-space: -moz-pre-wrap;
}
.msg-data[msg-type="USAGE"] {
font-weight: bold;
font-style: italic;
}
.msg-data[msg-type="STEP"] {
font-weight: bold;
}
.msg-data:before {
margin-right: 5px;
content: "-";
font-weight: bold;
}
.msg-data[msg-type="ERROR"]:before {
content: "!!";
}
.msg-data[msg-type="STOP"]:before,
.msg-data[msg-type="CONT"]:before {
content: "*";
}
.msg-data[msg-type="ETRACE"]:before {
content: "X";
}
.msg-data[msg-type="HELP"]:before {
content: "Help:";
}
.msg-data[msg-type="USAGE"]:before {
font-style: normal;
content: "Usage:";
}
.msg-data[msg-type="SOURCE"]:before {
padding-right: 20px;
content: ":";
}
.msg-data[msg-type="STEP"]:before {
padding-right: 20px;
content: "|";
}
.msg-data[msg-type="EVAL-IN"]:before {
font-weight: normal;
content: "<<";
}
.msg-data[msg-type="EVAL-OUT"]:before {
font-weight: normal;
content: ">>";
}
.msg-data[msg-type="FEVAL-IN"]:before {
font-weight: normal;
content: ">";
}
.msg-data[msg-type="FEVAL-IN"]:before {
font-weight: normal;
content: "<";
}

Просмотреть файл

@ -1,6 +1,21 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<LINK REL=StyleSheet HREF='chrome://venkman/skin/venkman-output-default.css'
TYPE='text/css' MEDIA='screen'>
<body id="venkman-body"><table border="0" cellpadding="0" cellspacing="0" id="output-table"><tbody id="output-tbody"></tbody></table></body>
<head>
<script>
var css = "chrome://venkman/skin/venkman-output-default.css";
if (document.location.search)
css = document.location.search.substr(1);
document.write ("<LINK REL=StyleSheet HREF='" + css +
"' TYPE='text/css' MEDIA='screen'>");
</script>
</head>
<body id="venkman-session-body">
<table border="0" cellpadding="0" cellspacing="0" id="session-output-table">
</table>
</body>
</html>

Просмотреть файл

@ -48,28 +48,45 @@ function initPrefs()
console.prefs.prefBranch =
console.prefs.prefService.getBranch("extensions.venkman.");
console.prefs.prefNames = new Array();
console.prefs.prefNameMap = new Object();
// console.addPref ("input.commandchar", "/");
console.addPref ("enableChromeFilter", false);
console.addPref ("profile.template.html",
"chrome://venkman/content/profile.html.tpl");
console.addPref ("profile.ranges",
"1000000, 5000, 2500, 1000, 750, 500, 250, 100, 75, 50, " +
"25, 10, 7.5, 5, 2.5, 1, 0.75, 0.5, 0.25");
console.addPref ("sourcetext.tab.width", 4);
console.addPref ("input.history.max", 20);
console.addPref ("input.dtab.time", 500);
// console.addPref ("input.commandchar", "/");
console.addPref ("maxStringLength", 100);
console.addPref ("startupCount", 0);
console.addPref ("enableChromeFilter", true);
console.addPref ("tabWidth", 4);
console.addPref ("initialScripts", "");
var list = console.prefs.prefBranch.getChildList("extensions.venkman.", {});
console.addPref ("prettyprint", false);
console.addPref ("guessContext", 5);
console.addPref ("guessPattern", "(\\w+)\\s*[:=]\\s*$");
console.addPref ("permitStartupHit", true);
console.addPref ("statusDuration", 5 * 1000);
console.addPref ("menubarInFloaters",
navigator.platform.indexOf ("Mac") != -1);
var list = console.prefs.prefBranch.getChildList("", {});
for (var p in list)
{
dd ("pref list " + list[p]);
if (!(list[p] in console.prefs))
{
console.addPref(list[p]);
}
}
}
console.listPrefs =
function con_listprefs (prefix)
{
var list = new Array();
var names = console.prefs.prefNames;
for (var i = 0; i < names.length; ++i)
{
if (!prefix || names[i].indexOf(prefix) == 0)
list.push (names[i]);
}
return list;
}
console.addPref =
function con_addpref (prefName, defaultValue)
{
@ -146,7 +163,7 @@ function con_addpref (prefName, defaultValue)
if (prefName in console.prefs)
return;
console.prefs.prefNames.push(prefName);
console.prefs.prefNames.push(prefName);
console.prefs.prefNames.sort();
console.prefs.__defineGetter__(prefName, prefGetter);
console.prefs.__defineSetter__(prefName, prefSetter);

Просмотреть файл

@ -0,0 +1,384 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The JavaScript Debugger
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
function initProfiler ()
{
console.addPref ("profile.template.xml",
"chrome://venkman/content/profile.xml.tpl");
console.addPref ("profile.template.html",
"chrome://venkman/content/profile.html.tpl");
console.addPref ("profile.template.csv",
"chrome://venkman/content/profile.csv.tpl");
console.addPref ("profile.template.txt",
"chrome://venkman/content/profile.txt.tpl");
console.addPref ("profile.ranges.default",
"1000000, 5000, 2500, 1000, 750, 500, 250, 100, 75, 50, " +
"25, 10, 7.5, 5, 2.5, 1, 0.75, 0.5, 0.25");
}
function ProfileReport (reportTemplate, file, rangeList, scriptInstanceList)
{
this.reportTemplate = reportTemplate;
this.file = file;
this.rangeList = rangeList;
this.scriptInstanceList = scriptInstanceList;
this.key = "total";
}
console.profiler = new Object();
console.profiler.__defineSetter__ ("enabled", pro_setenable);
function pro_setenable(state)
{
if (state)
console.jsds.flags |= COLLECT_PROFILE_DATA;
else
console.jsds.flags &= ~COLLECT_PROFILE_DATA;
}
console.profiler.__defineGetter__ ("enabled", pro_getenable);
function pro_getenable(state)
{
return Boolean(console.jsds.flags & COLLECT_PROFILE_DATA);
}
console.profiler.summarizeScriptWrapper =
function pro_sumscript (scriptWrapper, key)
{
var ex;
try
{
var jsdScript = scriptWrapper.jsdScript;
if (!jsdScript.isValid)
return null;
var ccount = jsdScript.callCount;
if (!ccount)
return null;
var tot_ms = roundTo(jsdScript.totalExecutionTime, 2);
var min_ms = roundTo(jsdScript.minExecutionTime, 2);
var max_ms = roundTo(jsdScript.maxExecutionTime, 2);
var avg_ms = roundTo(jsdScript.totalExecutionTime / ccount, 2);
var recurse = jsdScript.maxRecurseDepth;
var summary = new Object();
summary.total = tot_ms;
summary.ccount = ccount;
summary.avg = avg_ms;
summary.min = min_ms;
summary.max = max_ms;
summary.recurse = recurse;
summary.url = jsdScript.fileName;
summary.file = getFileFromPath(summary.url);
summary.base = jsdScript.baseLineNumber;
summary.end = summary.base + jsdScript.lineExtent;
summary.fun = scriptWrapper.functionName;
summary.str = getMsg(MSN_FMT_PROFILE_STR,
[summary.fun, summary.base, summary.end, ccount,
(summary.recurse ?
getMsg(MSN_FMT_PROFILE_RECURSE, recurse) : ""),
tot_ms, min_ms, max_ms, avg_ms]);
summary.key = summary[key];
return summary;
}
catch (ex)
{
/* This function is called under duress, and the script representd
* by |s| may get collected at any point. When that happens,
* attempting to access to the profile data will throw this
* exception.
*/
if ("result" in ex &&
ex.result == Components.results.NS_ERROR_NOT_AVAILABLE)
{
display (getMsg(MSN_PROFILE_LOST, formatScript(jsdScript)), MT_WARN);
}
else
{
dd ("rethrow");
dd (dumpObjectTree(ex));
throw ex;
}
}
return null;
}
console.profiler.summarizeScriptInstance =
function pro_suminst (scriptInstance, key)
{
var summaryList = new Array();
var summary;
if (scriptInstance.topLevel)
summary = this.summarizeScriptWrapper (scriptInstance.topLevel, key);
if (summary)
summaryList.push (summary);
for (var f in scriptInstance.functions)
{
summary = this.summarizeScriptWrapper(scriptInstance.functions[f], key);
if (summary)
summaryList.push(summary);
}
return summaryList;
}
console.profiler.generateReportSection =
function pro_rptinst (profileReport, scriptInstance, sectionData)
{
function keyCompare (a, b)
{
if (a.key < b.key)
return 1;
if (a.key > b.key)
return -1;
return 0;
};
function scale(K, x) { return roundTo(K * x, 2); };
const MAX_WIDTH = 90;
var summaryList = this.summarizeScriptInstance (scriptInstance,
profileReport.key);
if (!summaryList.length)
return false;
summaryList = summaryList.sort(keyCompare);
var file = profileReport.file;
var reportTemplate = profileReport.reportTemplate;
var rangeList = profileReport.rangeList ? profileReport.rangeList : [1, 0];
var finalRangeIndex = rangeList.length - 1;
var previousRangeIndex;
var rangeIter = 0;
var rangeIndex = 0;
var K = 1;
var i;
if (typeof summaryList[0].key == "number")
{
for (i = 0; i < rangeList.length; ++i)
rangeList[i] = Number(rangeList[i]);
}
if ("sectionHeader" in reportTemplate)
{
file.write(replaceStrings(reportTemplate.sectionHeader,
sectionData));
}
for (i = 0; i < summaryList.length; ++i)
{
var summary = summaryList[i];
var rangeData;
while (summary.key &&
rangeIndex < finalRangeIndex &&
summary.key < rangeList[rangeIndex])
{
++rangeIndex;
}
if (previousRangeIndex != rangeIndex)
{
if (rangeIter > 0 && ("rangeFooter" in reportTemplate))
{
file.write(replaceStrings(reportTemplate.rangeFooter,
rangeData));
}
var maxRange = (rangeIndex > 0 ?
rangeList[rangeIndex - 1] : summary.key);
var minRange = (rangeIndex < finalRangeIndex ?
rangeList[rangeIndex + 1] : summary.key);
K = MAX_WIDTH / maxRange;
rangeData = {
"\\$range-min" : minRange,
"\\$range-max" : maxRange,
"\\$range-number-prev": rangeIter > 0 ? rangeIter - 1 : 0,
"\\$range-number-next": rangeIter + 1,
"\\$range-number" : rangeIter,
"__proto__" : sectionData
};
if ("rangeHeader" in reportTemplate)
{
file.write(replaceStrings(reportTemplate.rangeHeader,
rangeData));
}
previousRangeIndex = rangeIndex;
++rangeIter;
}
var summaryData = {
"\\$item-number-next": i + 1,
"\\$item-number-prev": i - 1,
"\\$item-number" : i,
"\\$item-name" : summary.url,
"\\$item-summary" : summary.str,
"\\$item-min-pct" : scale(K, summary.min),
"\\$item-below-pct" : scale(K, summary.avg - summary.min),
"\\$item-above-pct" : scale(K, summary.max - summary.avg),
"\\$max-time" : summary.max,
"\\$min-time" : summary.min,
"\\$avg-time" : summary.avg,
"\\$total-time" : summary.total,
"\\$call-count" : summary.ccount,
"\\$recurse-depth" : summary.recurse,
"\\$function-name" : summary.fun,
"\\$start-line" : summary.base,
"\\$end-line" : summary.end,
"__proto__" : rangeData
};
if ("itemBody" in reportTemplate)
file.write(replaceStrings(reportTemplate.itemBody, summaryData));
}
if ("rangeFooter" in reportTemplate)
{
/* close the final range */
file.write(replaceStrings(reportTemplate.rangeFooter,
rangeData));
}
if ("sectionFooter" in reportTemplate)
{
file.write(replaceStrings(reportTemplate.sectionFooter,
sectionData));
}
return true;
}
console.profiler.generateReport =
function pro_rptall (profileReport)
{
var profiler = this;
var sectionCount = 0;
function generateReportChunk (i)
{
/* we build the report in chunks, with setTimeouts in between,
* so the UI can come up for air. */
var scriptInstance = profileReport.scriptInstanceList[i];
var url = scriptInstance.url;
var sectionData = {
"\\$section-number-prev": (sectionCount > 0) ? sectionCount - 1 : 0,
"\\$section-number-next": sectionCount + 1,
"\\$section-number" : sectionCount,
"\\$section-link" : (url ? "<a class='section-link' href='" +
url + "'>" + url + "</a>" : MSG_VAL_NA),
"\\$full-url" : url,
"\\$file-name" : getFileFromPath(url),
"__proto__" : reportData
};
var hadData = profiler.generateReportSection (profileReport,
scriptInstance,
sectionData);
if (++i == profileReport.scriptInstanceList.length)
{
if ("reportFooter" in reportTemplate)
file.write(replaceStrings(reportTemplate.reportFooter,
reportData));
if ("onComplete" in profileReport)
profileReport.onComplete(i);
}
else
{
if (hadData)
{
++sectionCount;
console.status = getMsg(MSN_PROFILE_SAVING, [i, last]);
setTimeout (generateReportChunk, 10, i);
}
else
{
generateReportChunk (i);
}
}
};
var reportData = {
"\\$full-date" : String(Date()),
"\\$user-agent" : navigator.userAgent,
"\\$venkman-agent": console.userAgent,
"\\$sort-key" : profileReport.key
};
var reportTemplate = profileReport.reportTemplate;
var file = profileReport.file;
if ("reportHeader" in reportTemplate)
file.write(replaceStrings(reportTemplate.reportHeader, reportData));
var length = profileReport.scriptInstanceList.length;
var last = length - 1;
generateReportChunk (0);
}
console.profiler.loadTemplate =
function pro_load (url)
{
var lines = loadURLNow(url);
if (!lines)
return null;
var sections = {
"reportHeader" : /@-section-start/mi,
"sectionHeader" : /@-range-start/mi,
"rangeHeader" : /@-item-start/mi,
"itemBody" : /@-item-end/mi,
"rangeFooter" : /@-range-end/mi,
"sectionFooter" : /@-section-end/mi,
"reportFooter" : 0
};
var reportTemplate = parseSections (lines, sections);
//dd(dumpObjectTree (reportTemplate));
return reportTemplate;
}

Просмотреть файл

@ -0,0 +1,871 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The JavaScript Debugger
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
function initRecords()
{
var atomsvc = console.atomService;
WindowRecord.prototype.property = atomsvc.getAtom("item-window");
FileContainerRecord.prototype.property = atomsvc.getAtom("item-files");
FileRecord.prototype.property = atomsvc.getAtom("item-file");
FrameRecord.prototype.property = atomsvc.getAtom("item-frame");
FrameRecord.prototype.atomCurrent = atomsvc.getAtom("current-frame-flag");
console.addPref ("valueRecord.brokenObjects", "^JavaPackage$");
try
{
ValueRecord.prototype.brokenObjects =
new RegExp (console.prefs["valueRecord.brokenObjects"]);
}
catch (ex)
{
display (MSN_ERR_INVALID_PREF,
["valueRecord.brokenObjects",
console.prefs["valueRecord.brokenObjects"]], MT_ERROR);
display (formatException(ex), MT_ERROR);
ValueRecord.prototype.brokenObjects = /^JavaPackage$/;
}
ValueRecord.prototype.atomVoid = atomsvc.getAtom("item-void");
ValueRecord.prototype.atomNull = atomsvc.getAtom("item-null");
ValueRecord.prototype.atomBool = atomsvc.getAtom("item-bool");
ValueRecord.prototype.atomInt = atomsvc.getAtom("item-int");
ValueRecord.prototype.atomDouble = atomsvc.getAtom("item-double");
ValueRecord.prototype.atomString = atomsvc.getAtom("item-string");
ValueRecord.prototype.atomFunction = atomsvc.getAtom("item-function");
ValueRecord.prototype.atomObject = atomsvc.getAtom("item-object");
ValueRecord.prototype.atomError = atomsvc.getAtom("item-error");
ValueRecord.prototype.atomException = atomsvc.getAtom("item-exception");
ValueRecord.prototype.atomHinted = atomsvc.getAtom("item-hinted");
}
/*******************************************************************************
* Breakpoint Record.
* One prototype for all breakpoint types, works only in the Breakpoints View.
*******************************************************************************/
function BPRecord (breakWrapper)
{
this.setColumnPropertyName ("col-0", "name");
this.setColumnPropertyName ("col-1", "line");
this.breakWrapper = breakWrapper;
if ("pc" in breakWrapper)
{
this.type = "instance";
this.name = breakWrapper.scriptWrapper.functionName;
this.line = getMsg(MSN_FMT_PC, String(breakWrapper.pc));
}
else if (breakWrapper instanceof FutureBreakpoint)
{
this.type = "future";
var ary = breakWrapper.url.match(/\/([^\/?]+)(\?|$)/);
if (ary)
this.name = ary[1];
else
this.name = breakWrapper.url;
this.line = breakWrapper.lineNumber;
}
}
BPRecord.prototype = new XULTreeViewRecord(console.views.breaks.share);
/*******************************************************************************
* Stack Frame Record.
* Represents a jsdIStackFrame, for use in the Stack View only.
*******************************************************************************/
function FrameRecord (jsdFrame)
{
if (!(jsdFrame instanceof jsdIStackFrame))
throw new BadMojo (ERR_INVALID_PARAM, "value");
this.setColumnPropertyName ("col-0", "functionName");
this.setColumnPropertyName ("col-1", "location");
this.functionName = jsdFrame.functionName;
if (!jsdFrame.isNative)
{
this.scriptWrapper = getScriptWrapper(jsdFrame.script);
this.location = getMsg(MSN_FMT_FRAME_LOCATION,
[getFileFromPath(jsdFrame.script.fileName),
jsdFrame.line, jsdFrame.pc]);
this.functionName = this.scriptWrapper.functionName;
}
else
{
this.scriptWrapper = null;
this.location = MSG_URL_NATIVE;
}
this.jsdFrame = jsdFrame;
}
FrameRecord.prototype = new XULTreeViewRecord (console.views.stack.share);
/*******************************************************************************
* Window Record.
* Represents a DOM window with files and child windows. For use in the
* Windows View.
*******************************************************************************/
function WindowRecord (win, baseURL)
{
function none() { return ""; };
this.setColumnPropertyName ("col-0", "displayName");
this.window = win;
this.url = win.location.href;
if (this.url.search(/^\w+:/) == -1)
{
if (this.url[0] == "/")
this.url = win.location.host + this.url;
else
this.url = baseURL + this.url;
this.baseURL = baseURL;
}
else
{
this.baseURL = getPathFromURL(this.url);
}
this.reserveChildren(true);
this.shortName = getFileFromPath (this.url);
if (console.prefs["enableChromeFilter"] && this.shortName == "navigator.xul")
{
this.displayName = MSG_NAVIGATOR_XUL;
}
else
{
this.filesRecord = new FileContainerRecord(this);
this.displayName = this.shortName;
}
}
WindowRecord.prototype = new XULTreeViewRecord(console.views.windows.share);
WindowRecord.prototype.onPreOpen =
function wr_preopen()
{
this.childData = new Array();
if ("filesRecord" in this)
this.appendChild(this.filesRecord);
var framesLength = this.window.frames.length;
for (var i = 0; i < framesLength; ++i)
{
this.appendChild(new WindowRecord(this.window.frames[i].window,
this.baseURL));
}
}
/*******************************************************************************
* "File Container" Record.
* List of script tags found in the parent record's |window.document| property.
* For use in the Windows View, as a child of a WindowRecord.
*******************************************************************************/
function FileContainerRecord (windowRecord)
{
function files() { return MSG_FILES_REC; }
function none() { return ""; }
this.setColumnPropertyName ("col-0", files);
this.windowRecord = windowRecord;
this.reserveChildren(true);
}
FileContainerRecord.prototype =
new XULTreeViewRecord(console.views.windows.share);
FileContainerRecord.prototype.onPreOpen =
function fcr_getkids ()
{
if (!("parentRecord" in this))
return;
this.childData = new Array();
var doc = this.windowRecord.window.document;
var nodeList = doc.getElementsByTagName("script");
dd (nodeList.length + "nodes");
for (var i = 0; i < nodeList.length; ++i)
{
var url = nodeList.item(i).getAttribute("src");
if (url)
{
if (url.search(/^\w+:/) == -1)
url = getPathFromURL (this.windowRecord.url) + url;
this.appendChild(new FileRecord(url));
}
}
}
/*******************************************************************************
* File Record
* Represents a URL, for use in the Windows View only.
*******************************************************************************/
function FileRecord (url)
{
function none() { return ""; }
this.setColumnPropertyName ("col-0", "shortName");
this.url = url;
this.shortName = getFileFromPath(url);
}
FileRecord.prototype = new XULTreeViewRecord(console.views.windows.share);
/*******************************************************************************
* Script Instance Record.
* Represents a ScriptInstance, for use in the Scripts View only.
*******************************************************************************/
function ScriptInstanceRecord(scriptInstance)
{
if (!ASSERT(scriptInstance.isSealed,
"Attempt to create ScriptInstanceRecord for unsealed instance"))
{
return null;
}
this.setColumnPropertyName ("col-0", "displayName");
this.setColumnPropertyValue ("col-1", "");
this.setColumnPropertyValue ("col-2", "");
this.reserveChildren(true);
this.url = scriptInstance.url;
var sv = console.views.scripts;
this.fileType = sv.atomUnknown;
this.shortName = this.url;
this.group = 4;
this.scriptInstance = scriptInstance;
this.lastScriptCount = 0;
this.sequence = scriptInstance.sequence;
this.shortName = getFileFromPath(this.url);
var ary = this.shortName.match (/\.(js|html|xul|xml)$/i);
if (ary)
{
switch (ary[1].toLowerCase())
{
case "js":
this.fileType = sv.atomJS;
this.group = 0;
break;
case "html":
this.group = 1;
this.fileType = sv.atomHTML;
break;
case "xul":
this.group = 2;
this.fileType = sv.atomXUL;
break;
case "xml":
this.group = 3;
this.fileType = sv.atomXML;
break;
}
}
this.displayName = this.shortName;
this.sortName = this.shortName.toLowerCase();
return this;
}
ScriptInstanceRecord.prototype =
new XULTreeViewRecord(console.views.scripts.share);
ScriptInstanceRecord.prototype.onDragStart =
function scr_dragstart (e, transferData, dragAction)
{
transferData.data = new TransferData();
transferData.data.addDataForFlavour("text/x-venkman-file", this.fileName);
transferData.data.addDataForFlavour("text/x-moz-url", this.fileName);
transferData.data.addDataForFlavour("text/unicode", this.fileName);
transferData.data.addDataForFlavour("text/html",
"<a href='" + this.fileName +
"'>" + this.fileName + "</a>");
return true;
}
ScriptInstanceRecord.prototype.super_resort = XTRootRecord.prototype.resort;
ScriptInstanceRecord.prototype.resort =
function scr_resort ()
{
console._groupFiles = console.prefs["scriptsView.groupFiles"];
this.super_resort();
delete console._groupFiles;
}
ScriptInstanceRecord.prototype.sortCompare =
function scr_compare (a, b)
{
if (0)
{
if (a.group < b.group)
return -1;
if (a.group > b.group)
return 1;
}
if (a.sortName < b.sortName)
return -1;
if (a.sortName > b.sortName)
return 1;
if (a.sequence < b.sequence)
return -1;
if (a.sequence > b.sequence)
return 1;
dd ("ack, all equal?");
return 0;
}
ScriptInstanceRecord.prototype.onPreOpen =
function scr_preopen ()
{
if (!this.scriptInstance.sourceText.isLoaded)
this.scriptInstance.sourceText.loadSource();
if (this.lastScriptCount != this.scriptInstance.scriptCount)
{
var sr;
console.views.scripts.freeze();
this.childData = new Array();
var scriptWrapper = this.scriptInstance.topLevel;
if (scriptWrapper)
{
sr = new ScriptRecord(scriptWrapper);
scriptWrapper.scriptRecord = sr;
this.appendChild(sr);
}
var functions = this.scriptInstance.functions;
for (var f in functions)
{
if (functions[f].jsdScript.isValid)
{
sr = new ScriptRecord(functions[f]);
functions[f].scriptRecord = sr;
this.appendChild(sr);
}
}
console.views.scripts.thaw();
this.lastScriptCount = this.scriptInstance.scriptCount;
}
}
/*******************************************************************************
* Script Record.
* Represents a ScriptWrapper, for use in the Scripts View only.
*******************************************************************************/
function ScriptRecord(scriptWrapper)
{
this.setColumnPropertyName ("col-0", "functionName");
this.setColumnPropertyName ("col-1", "baseLineNumber");
this.setColumnPropertyName ("col-2", "lineExtent");
this.functionName = scriptWrapper.functionName
this.baseLineNumber = scriptWrapper.jsdScript.baseLineNumber;
this.lineExtent = scriptWrapper.jsdScript.lineExtent;
this.scriptWrapper = scriptWrapper;
this.jsdurl = "jsd:sourcetext?url=" +
escape(this.scriptWrapper.jsdScript.fileName) +
"&base=" + this.baseLineNumber + "&extent=" + this.lineExtent +
"&name=" + this.functionName;
}
ScriptRecord.prototype = new XULTreeViewRecord(console.views.scripts.share);
ScriptRecord.prototype.onDragStart =
function sr_dragstart (e, transferData, dragAction)
{
var fileName = this.script.fileName;
transferData.data = new TransferData();
transferData.data.addDataForFlavour("text/x-jsd-url", this.jsdurl);
transferData.data.addDataForFlavour("text/x-moz-url", fileName);
transferData.data.addDataForFlavour("text/unicode", fileName);
transferData.data.addDataForFlavour("text/html",
"<a href='" + fileName +
"'>" + fileName + "</a>");
return true;
}
/*******************************************************************************
* Value Record.
* Use this to show a jsdIValue in any tree.
*******************************************************************************/
function ValueRecord (value, name, flags)
{
if (!(value instanceof jsdIValue))
throw new BadMojo (ERR_INVALID_PARAM, "value", String(value));
this.setColumnPropertyName ("col-0", "displayName");
this.setColumnPropertyName ("col-1", "displayType");
this.setColumnPropertyName ("col-2", "displayValue");
this.setColumnPropertyName ("col-3", "displayFlags");
this.displayName = name;
this.displayFlags = formatFlags(flags);
this.name = name;
this.flags = flags;
this.value = value;
this.jsType = null;
this.onPreRefresh = false;
this.refresh();
delete this.onPreRefresh;
}
ValueRecord.prototype = new XULTreeViewRecord (null);
ValueRecord.prototype.__defineGetter__("_share", vr_getshare);
function vr_getshare()
{
if ("__share" in this)
return this.__share;
if ("parentRecord" in this)
return this.__share = this.parentRecord._share;
ASSERT (0, "ValueRecord cannot be the root of a visible tree.");
return null;
}
ValueRecord.prototype.showFunctions = true;
ValueRecord.prototype.showECMAProps = true;
ValueRecord.prototype.getProperties =
function vr_getprops (properties)
{
if ("valueIsException" in this || this.flags & PROP_EXCEPTION)
properties.AppendElement (this.atomException);
if (this.flags & PROP_ERROR)
properties.AppendElement (this.atomError);
if (this.flags & PROP_HINTED)
properties.AppendElement (this.atomHinted);
properties.AppendElement (this.property);
}
ValueRecord.prototype.onPreRefresh =
function vr_prerefresh ()
{
if (!ASSERT("parentRecord" in this, "onPreRefresh with no parent"))
return;
if ("isECMAProto" in this)
{
if (this.parentRecord.value.jsPrototype)
this.value = this.parentRecord.value.jsPrototype;
else
this.value = console.jsds.wrapValue(null);
}
else if ("isECMAParent" in this)
{
if (this.parentRecord.value.jsParent)
this.value = this.parentRecord.value.jsParent;
else
this.value = console.jsds.wrapValue(null);
}
else
{
var value = this.parentRecord.value;
var prop = value.getProperty (this.name);
if (prop)
{
this.flags = prop.flags;
this.value = prop.value;
}
else
{
var jsval = value.getWrappedValue();
this.value = console.jsds.wrapValue(jsval[this.name]);
this.flags = PROP_ENUMERATE | PROP_HINTED;
}
}
}
ValueRecord.prototype.refresh =
function vr_refresh ()
{
if (this.onPreRefresh)
{
try
{
this.onPreRefresh();
delete this.valueIsException;
}
catch (ex)
{
dd ("caught exception refreshing " + this.displayName);
dd (dumpObjectTree(ex));
if (!(ex instanceof jsdIValue))
ex = console.jsds.wrapValue(ex);
this.value = ex;
this.valueIsException = true;
}
}
this.jsType = this.value.jsType;
delete this.alwaysHasChildren;
var strval;
switch (this.jsType)
{
case TYPE_VOID:
this.displayValue = MSG_TYPE_VOID
this.displayType = MSG_TYPE_VOID;
this.property = this.atomVoid;
break;
case TYPE_NULL:
this.displayValue = MSG_TYPE_NULL;
this.displayType = MSG_TYPE_NULL;
this.property = this.atomNull;
break;
case TYPE_BOOLEAN:
this.displayValue = this.value.stringValue;
this.displayType = MSG_TYPE_BOOLEAN;
this.property = this.atomBool;
break;
case TYPE_INT:
this.displayValue = this.value.intValue;
this.displayType = MSG_TYPE_INT;
this.property = this.atomInt;
break;
case TYPE_DOUBLE:
this.displayValue = this.value.doubleValue;
this.displayType = MSG_TYPE_DOUBLE;
this.property = this.atomDouble;
break;
case TYPE_STRING:
strval = this.value.stringValue.quote();
if (strval.length > console.prefs["maxStringLength"])
strval = getMsg(MSN_FMT_LONGSTR, strval.length);
this.displayValue = strval;
this.displayType = MSG_TYPE_STRING;
this.property = this.atomString;
break;
case TYPE_FUNCTION:
case TYPE_OBJECT:
this.displayType = MSG_TYPE_OBJECT;
this.property = this.atomObject;
this.alwaysHasChildren = true;
this.value.refresh();
var ctor = this.value.jsClassName;
if (ctor == "Function")
{
this.displayType = MSG_TYPE_FUNCTION;
ctor = (this.value.isNative ? MSG_CLASS_NATIVE_FUN :
MSG_CLASS_SCRIPT_FUN);
this.property = this.atomFunction;
}
if (ctor == "Object")
{
if (this.value.jsConstructor)
ctor = this.value.jsConstructor.jsFunctionName;
}
else if (ctor == "XPCWrappedNative_NoHelper")
{
ctor = MSG_CLASS_CONST_XPCOBJ;
}
else if (ctor == "XPC_WN_ModsAllowed_Proto_JSClass")
{
ctor = MSG_CLASS_XPCOBJ;
}
if (ctor != "String")
{
var propCount;
if (this.brokenObjects.test(ctor))
{
/* XXX these objects do Bad Things when you enumerate
* over them. */
propCount = 0;
}
else
{
propCount = this.countProperties();
}
this.displayValue = getMsg (MSN_FMT_OBJECT_VALUE,
[ctor, propCount]);
}
else
{
strval = this.value.stringValue.quote();
if (strval.length > console.prefs["maxStringLength"])
strval = getMsg(MSN_FMT_LONGSTR, strval.length);
this.displayValue = strval;
}
/* if we have children, refresh them. */
if ("childData" in this && this.childData.length > 0)
{
if (!this.refreshChildren())
{
dd ("refreshChilren failed for " + this.displayName);
delete this.childData;
this.close();
}
}
break;
default:
ASSERT (0, "invalid value");
}
}
ValueRecord.prototype.countProperties =
function vr_countprops ()
{
var c = 0;
var jsval = this.value.getWrappedValue();
try
{
for (var p in jsval)
++c;
}
catch (ex)
{
dd ("caught exception counting properties\n" + ex);
}
return c;
}
ValueRecord.prototype.listProperties =
function vr_listprops ()
{
//dd ("listProperties {");
var i;
var jsval = this.value.getWrappedValue();
var propMap = new Object();
/* get the enumerable properties */
for (var p in jsval)
{
var value;
try
{
value = console.jsds.wrapValue(jsval[p]);
if (this.showFunctions || value.jsType != TYPE_FUNCTION)
{
propMap[p] = { name: p, value: value,
flags: PROP_ENUMERATE | PROP_HINTED };
}
else
{
//dd ("not including function " + name);
propMap[p] = null;
}
}
catch (ex)
{
propMap[p] = { name: p, value: console.jsds.wrapValue(ex),
flags: PROP_EXCEPTION };
}
}
/* get the local properties, may or may not be enumerable */
var localProps = new Object()
this.value.getProperties(localProps, {});
localProps = localProps.value;
var len = localProps.length;
for (i = 0; i < len; ++i)
{
var prop = localProps[i];
if (!ASSERT(prop, "prop[" + i + "] is null"))
continue;
var name = prop.name.stringValue;
if (!(name in propMap))
{
if (this.showFunctions || prop.value.jsType != TYPE_FUNCTION)
{
//dd ("localProps: adding " + name + ", " + prop);
propMap[name] = { name: name, value: prop.value,
flags: prop.flags };
}
else
{
//dd ("not including function " + name);
propMap[name] = null;
}
}
else
{
if (propMap[name])
propMap[name].flags = prop.flags;
}
}
/* sort the property list */
var nameList = keys(propMap);
nameList.sort();
var propertyList = new Array();
for (i = 0; i < nameList.length; ++i)
{
name = nameList[i];
if (propMap[name])
propertyList.push (propMap[name]);
}
//dd ("} " + propertyList.length + " properties");
return propertyList;
}
ValueRecord.prototype.refreshChildren =
function vr_refreshkids ()
{
var leadingProps = 0;
this.propertyList = this.listProperties();
for (var i = 0; i < this.childData.length; ++i)
{
if ("isECMAParent" in this.childData[i] ||
"isECMAProto" in this.childData[i])
{
++leadingProps;
}
else if (this.childData.length - leadingProps !=
this.propertyList.length)
{
dd ("refreshChildren: property length mismatch");
return false;
}
else if (this.childData[i]._colValues["col-0"] !=
this.propertyList[i - leadingProps].name)
{
dd ("refreshChildren: " +
this.childData[i]._colValues["col-0"] + " != " +
this.propertyList[i - leadingProps].name);
return false;
}
this.childData[i].refresh();
}
if (this.childData.length - leadingProps !=
this.propertyList.length)
{
dd ("refreshChildren: property length mismatch");
return false;
}
return true;
}
ValueRecord.prototype.onPreOpen =
function vr_preopen()
{
try
{
if (!ASSERT(this.value.jsType == TYPE_OBJECT ||
this.value.jsType == TYPE_FUNCTION,
"onPreOpen called for non object?"))
{
return;
}
this.childData = new Array();
this.propertyList = this.listProperties();
if (this.showECMAProps)
{
var rec;
if (this.value.jsPrototype)
{
rec = new ValueRecord(this.value.jsPrototype,
MSG_VAL_PROTO);
rec.isECMAProto = true;
this.appendChild (rec);
}
if (this.value.jsParent)
{
rec = new ValueRecord(this.value.jsParent,
MSG_VAL_PARENT);
rec.isECMAParent = true;
this.appendChild (rec);
}
}
for (var i = 0; i < this.propertyList.length; ++i)
{
var prop = this.propertyList[i];
this.appendChild(new ValueRecord(prop.value,
prop.name,
prop.flags));
}
}
catch (ex)
{
display (getMsg (MSN_ERR_FAILURE, ex), MT_ERROR);
}
}
ValueRecord.prototype.onPostClose =
function vr_destroy()
{
this.childData = new Array();
delete this.propertyList;
}

Просмотреть файл

@ -57,15 +57,19 @@
<script src="chrome://communicator/content/contentAreaDD.js"/>
<script src="chrome://global/content/strres.js"/>
<script src="chrome://venkman/content/command-manager.js"/>
<script src="chrome://venkman/content/menu-manager.js"/>
<script src="chrome://venkman/content/view-manager.js"/>
<script src="chrome://venkman/content/tree-utils.js"/>
<script src="chrome://venkman/content/file-utils.js"/>
<script src="chrome://venkman/content/html-consts.js"/>
<script src="chrome://venkman/content/command-manager.js"/>
<script src="chrome://venkman/content/venkman-utils.js"/>
<script src="chrome://venkman/content/venkman-static.js"/>
<script src="chrome://venkman/content/venkman-handlers.js"/>
<script src="chrome://venkman/content/venkman-debugger.js"/>
<script src="chrome://venkman/content/venkman-profiler.js"/>
<script src="chrome://venkman/content/venkman-jsdurl.js"/>
<script src="chrome://venkman/content/venkman-url-loader.js"/>
<script src="chrome://venkman/content/venkman-commands.js"/>
<script src="chrome://venkman/content/venkman-prefs.js"/>
@ -73,7 +77,8 @@
<script src="chrome://venkman/content/venkman-menus.js"/>
<script src="chrome://venkman/content/venkman-msg.js"/>
<script src="chrome://venkman/content/venkman-munger.js"/>
<script src="chrome://venkman/content/venkman-trees.js"/>
<script src="chrome://venkman/content/venkman-views.js"/>
<script src="chrome://venkman/content/venkman-records.js"/>
</overlaytarget>

Просмотреть файл

@ -0,0 +1,15 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<LINK REL=StyleSheet HREF='chrome://venkman/skin/venkman-source2-default.css'
TYPE='text/css' MEDIA='screen'>
</head>
<body id="venkman-source2-body">
<table border="0" cellpadding="0" cellspacing="0" id="source2-table">
</table>
</body>
</html>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -83,7 +83,7 @@ function (request, data)
StreamListener.prototype.onStopRequest =
function (request, data, status)
{
//dd ("onStopRequest(): status: " + status + "\n" /* + this.data*/);
dd ("onStopRequest(): status: " + status + "\n" /* + this.data*/);
if (typeof this.observer.onComplete == "function")
this.observer.onComplete (this.data, this.url, status);
}

Просмотреть файл

@ -58,10 +58,17 @@ if (DEBUG) {
var _dd_currentIndent = "";
var _dd_lastDumpWasOpen = false;
var _dd_timeStack = new Array();
var _dd_disableDepth = Number.MAX_VALUE;
var _dd_currentDepth = 0;
dd = function _dd (str) {
if (typeof str != "string") {
dumpln (str);
} else if (str[str.length - 1] == "{") {
++_dd_currentDepth;
if (_dd_currentDepth >= _dd_disableDepth)
return;
if (str.indexOf("OFF") == 0)
_dd_disableDepth = _dd_currentDepth;
_dd_timeStack.push (new Date());
if (_dd_lastDumpWasOpen)
dump("\n");
@ -69,16 +76,21 @@ if (DEBUG) {
_dd_currentIndent += _dd_singleIndent;
_dd_lastDumpWasOpen = true;
} else if (str[0] == "}") {
if (--_dd_currentDepth >= _dd_disableDepth)
return;
_dd_disableDepth = Number.MAX_VALUE;
var sufx = (new Date() - _dd_timeStack.pop()) / 1000 + " sec";
_dd_currentIndent =
_dd_currentIndent.substr (0, _dd_currentIndent.length -
_dd_indentLength);
if (_dd_lastDumpWasOpen)
dumpln ("} " + sufx);
dumpln (str + " " + sufx);
else
dumpln (_dd_pfx + _dd_currentIndent + str + " " + sufx);
_dd_lastDumpWasOpen = false;
} else {
if (_dd_currentDepth >= _dd_disableDepth)
return;
if (_dd_lastDumpWasOpen)
dump ("\n");
dumpln (_dd_pfx + _dd_currentIndent + str);
@ -134,39 +146,46 @@ function dumpObjectTree (o, recurse, compress, level)
for (i in o)
{
var t = typeof o[i];
switch (t)
var t;
try
{
case "function":
var sfunc = String(o[i]).split("\n");
if (sfunc[2] == " [native code]")
sfunc = "[native code]";
else
sfunc = sfunc.length + " lines";
s += pfx + tee + i + " (function) " + sfunc + "\n";
break;
case "object":
s += pfx + tee + i + " (object) " + o[i] + "\n";
if (!compress)
s += pfx + "|\n";
if ((i != "parent") && (recurse))
s += dumpObjectTree (o[i], recurse - 1,
compress, level + 1);
break;
case "string":
if (o[i].length > 200)
s += pfx + tee + i + " (" + t + ") " +
o[i].length + " chars\n";
else
s += pfx + tee + i + " (" + t + ") '" + o[i] + "'\n";
break;
default:
s += pfx + tee + i + " (" + t + ") " + o[i] + "\n";
t = typeof o[i];
switch (t)
{
case "function":
var sfunc = String(o[i]).split("\n");
if (sfunc[2] == " [native code]")
sfunc = "[native code]";
else
sfunc = sfunc.length + " lines";
s += pfx + tee + i + " (function) " + sfunc + "\n";
break;
case "object":
s += pfx + tee + i + " (object) " + o[i] + "\n";
if (!compress)
s += pfx + "|\n";
if ((i != "parent") && (recurse))
s += dumpObjectTree (o[i], recurse - 1,
compress, level + 1);
break;
case "string":
if (o[i].length > 200)
s += pfx + tee + i + " (" + t + ") " +
o[i].length + " chars\n";
else
s += pfx + tee + i + " (" + t + ") '" + o[i] + "'\n";
break;
default:
s += pfx + tee + i + " (" + t + ") " + o[i] + "\n";
}
}
catch (ex)
{
s += pfx + tee + i + " (exception) " + ex + "\n";
}
if (!compress)
@ -180,6 +199,29 @@ function dumpObjectTree (o, recurse, compress, level)
}
function getChildById (element, id)
{
var nl = element.getElementsByAttribute("id", id);
return nl.item(0);
}
function openTopWin (url)
{
var window = getWindowByType ("navigator:browser");
if (window)
{
var base = getBaseWindowFromWindow (window);
if (base.enabled)
{
window.focus();
window._content.location.href = url;
return window;
}
}
return openDialog (getBrowserURL(), "_blank", "chrome,all,dialog=no", url);
}
function getWindowByType (windowType)
{
const MEDIATOR_CONTRACTID =
@ -192,6 +234,101 @@ function getWindowByType (windowType)
return windowManager.getMostRecentWindow(windowType);
}
function htmlVA (attribs, href, contents)
{
if (!attribs)
attribs = {"class": "venkman-link", target: "_content"};
else if (attribs["class"])
attribs["class"] += " venkman-link";
else
attribs["class"] = "venkman-link";
if (!contents)
{
contents = htmlSpan();
insertHyphenatedWord (href, contents);
}
return htmlA (attribs, href, contents);
}
function insertHyphenatedWord (longWord, containerTag)
{
var wordParts = splitLongWord (longWord, MAX_WORD_LEN);
containerTag.appendChild (htmlWBR());
for (var i = 0; i < wordParts.length; ++i)
{
containerTag.appendChild (document.createTextNode (wordParts[i]));
if (i != wordParts.length)
containerTag.appendChild (htmlWBR());
}
}
function insertLink (matchText, containerTag)
{
var href;
if (matchText.indexOf ("://") == -1 && matchText.indexOf("x-jsd") != 0)
href = "http://" + matchText;
else
href = matchText;
var anchor = htmlVA (null, href, matchText);
containerTag.appendChild (anchor);
}
function toBool (val)
{
switch (typeof val)
{
case "boolean":
return val;
case "number":
return val != 0;
default:
val = String(val);
/* fall through */
case "string":
return (val.search(/true|on|yes|1/i) != -1);
}
return null;
}
/* some of the drag and drop code has an annoying appetite for exceptions. any
* exception raised during a dnd operation causes the operation to fail silently.
* passing the function through one of these adapters lets you use "return
* false on planned failure" symantics, and dumps any exceptions caught
* to the console. */
function Prophylactic (parentObj, fun)
{
function adapter ()
{
var ex;
var rv = false;
try
{
rv = fun.apply (parentObj, arguments);
}
catch (ex)
{
dd ("Prophylactic caught an exception:\n" +
dumpObjectTree(ex));
}
if (!rv)
throw "goodger";
return rv;
};
return adapter;
}
function argumentsAsArray (args, start)
{
if (typeof start == "undefined")
@ -272,7 +409,8 @@ function Clone (obj)
function getXULWindowFromWindow (win)
{
var ex;
var rv;
//dd ("getXULWindowFromWindow: before: getInterface is " + win.getInterface);
try
{
var requestor = win.QueryInterface(nsIInterfaceRequestor);
@ -280,20 +418,23 @@ function getXULWindowFromWindow (win)
var dsti = nav.QueryInterface(nsIDocShellTreeItem);
var owner = dsti.treeOwner;
requestor = owner.QueryInterface(nsIInterfaceRequestor);
return requestor.getInterface(nsIXULWindow);
rv = requestor.getInterface(nsIXULWindow);
}
catch (ex)
{
rv = null;
//dd ("not a nsIXULWindow: " + formatException(ex));
/* ignore no-interface exception */
}
return null;
//dd ("getXULWindowFromWindow: after: getInterface is " + win.getInterface);
return rv;
}
function getBaseWindowFromWindow (win)
{
var ex;
var rv;
//dd ("getBaseWindowFromWindow: before: getInterface is " + win.getInterface);
try
{
var requestor = win.QueryInterface(nsIInterfaceRequestor);
@ -301,15 +442,17 @@ function getBaseWindowFromWindow (win)
var dsti = nav.QueryInterface(nsIDocShellTreeItem);
var owner = dsti.treeOwner;
requestor = owner.QueryInterface(nsIInterfaceRequestor);
return requestor.getInterface(nsIBaseWindow);
rv = requestor.getInterface(nsIBaseWindow);
}
catch (ex)
{
rv = null;
//dd ("not a nsIXULWindow: " + formatException(ex));
/* ignore no-interface exception */
}
return null;
//dd ("getBaseWindowFromWindow: after: getInterface is " + win.getInterface);
return rv;
}
function getPathFromURL (url)
@ -418,6 +561,37 @@ function keys (o)
}
function parseSections (str, sections)
{
var rv = new Object();
var currentSection;
for (var s in sections)
{
if (!currentSection)
currentSection = s;
if (sections[s])
{
var i = str.search(sections[s]);
if (i != -1)
{
rv[currentSection] = str.substr(0, i);
currentSection = 0;
str = RegExp.rightContext;
str = str.replace(/^(\n|\r|\r\n)/, "");
}
}
else
{
rv[currentSection] = str;
str = "";
break;
}
}
return rv;
}
function replaceStrings (str, obj)
{
@ -434,7 +608,6 @@ function stringTrim (s)
return "";
s = s.replace (/^\s+/, "");
return s.replace (/\s+$/, "");
}
function formatDateOffset (seconds, format)
@ -506,6 +679,21 @@ function arraySpeak (ary, single, plural)
}
function arrayOrFlag (ary, i, flag)
{
if (i in ary)
ary[i] |= flag;
else
ary[i] = flag;
}
function arrayAndFlag (ary, i, flag)
{
if (i in ary)
ary[i] &= flag;
else
ary[i] = 0;
}
function arrayContains (ary, elem)
{

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -0,0 +1,260 @@
<?xml version="1.0"?>
<!--
-
- The contents of this file are subject to the Mozilla Public License
- Version 1.1 (the "License"); you may not use this file except in
- compliance with the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is The JavaScript Debugger
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation
- Portions created by Netscape are
- Copyright (C) 1998 Netscape Communications Corporation.
- All Rights Reserved.
-
- Alternatively, the contents of this file may be used under the
- terms of the GNU Public License (the "GPL"), in which case the
- provisions of the GPL are applicable instead of those above.
- If you wish to allow use of your version of this file only
- under the terms of the GPL and not to allow others to use your
- version of this file under the MPL, indicate your decision by
- deleting the provisions above and replace them with the notice
- and other provisions required by the GPL. If you do not delete
- the provisions above, a recipient may use your version of this
- file under either the MPL or the GPL.
-
- Contributor(s):
- Robert Ginda, <rginda@netscape.com>, original author
-
-->
<!DOCTYPE window SYSTEM "chrome://venkman/locale/venkman.dtd" >
<overlay id="venkman-views-overlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<overlaytarget id="views-overlay-target" hidden="true">
<!-- breakpoint view -->
<floatingview id="breaks" title="&Break.label;" flex="1">
<vbox id="break-view-content" flex="1">
<tree flex="1" id="break-tree" persist="height" hidecolumnpicker="true"
ondblclick="console.views.breaks.onDblClick(event);"
context="context:breaks">
<treecols>
<treecol id="breaks:col-0" label="&BreakCol0.label;"
primary="true" flex="5" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="breaks:col-1" flex="1" label="&BreakCol1.label;"
persist="hidden width"/>
<splitter class="tree-splitter"/>
</treecols>
<treechildren id="break-body"/>
</tree>
</vbox>
</floatingview>
<!-- locals view -->
<floatingview id="locals" title="&Locals.label;" flex="1">
<vbox id="locals-view-content" flex="1">
<tree flex="1" id="locals-tree" persist="height"
ondblclick="console.views.locals.onDblClick(event);"
context="context:locals">
<treecols>
<treecol id="locals:col-0" label="&LocalsCol0.header;" primary="true"
flex="1" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="locals:col-1" flex="1" label="&LocalsCol1.header;"
persist="hidden width" hidden="true"/>
<splitter class="tree-splitter"/>
<treecol id="locals:col-2" flex="1" label="&LocalsCol2.header;"
persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="locals:col-3" flex="1" label="&LocalsCol3.header;"
persist="hidden width" hidden="true"/>
</treecols>
<treechildren id="locals-body"/>
</tree>
</vbox>
</floatingview>
<!-- session view -->
<floatingview id="session" title="&Session.label;" flex="1">
<vbox id="session-view-content" flex="1" persist="width">
<browser id="session-output-iframe" flex="1" type="content"
src="about:blank" context="context:session"/>
<textbox id="session-sl-input" class="input-widget"
onkeypress="console.views.session.onSLKeyPress(event);"/>
</vbox>
</floatingview>
<!-- scripts view -->
<floatingview id="scripts" title="&Scripts.label;" flex="1">
<vbox id="scripts-view-content" flex="1">
<tree flex="1" id="scripts-tree" persist="height"
ondblclick="console.views.scripts.onDblClick(event);"
context="context:scripts">
<treecols>
<treecol id="scripts:col-0" label="&ScriptsCol0.header;"
primary="true" flex="5" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="scripts:col-1" flex="1" label="&ScriptsCol1.header;"
persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="scripts:col-2" flex="1" label="&ScriptsCol2.header;"
persist="hidden width" hidden="true"/>
</treecols>
<treechildren id="script-list-body"/>
</tree>
</vbox>
</floatingview>
<!-- source2 view -->
<floatingview id="source2" title="&Source.label;" flex="1">
<stack flex="1">
<vbox flex="1" pack="center" align="center">
<label id="source2-version-label" value="Venkman!"/>
<label id="source2-help-label" value="I feel so funky"/>
</vbox>
<tabbox id="source2-tabbox" flex="1">
<tabs id="source2-tabs">
<!--
We've got to put this placeholder tab in the tabs element to avoid
bogus strict warnings and exceptions.
-->
<tab id="source2-bloke" hidden="true"/>
</tabs>
<tabpanels id="source2-deck" flex="1"/>
</tabbox>
</stack>
</floatingview>
<!-- source view -->
<floatingview id="source" title="&Source.label;" flex="1">
<vbox id="source-view-content" flex="1">
<toolbox>
<toolbar id="source-header" grippytooltiptext="&SourceHeader.tip;">
<label id="source-url" flex="1" crop="left"/>
</toolbar>
</toolbox>
<tree id="source-tree" flex="1" persist="width"
onclick="console.views.source.onClick(event);"
onselect="console.views.source.onSelect(event);"
context="context:source">
<treecols>
<treecol id="source:col-0" width="20px"
display="&SourceCol0.display;" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="source:col-1" width="50px"
display="&SourceCol1.display;" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="source:col-2" flex="1" display=""
ignoreincolumnpicker="true" persist="hidden width"/>
</treecols>
<treechildren id="source-tree-body"/>
</tree>
</vbox>
</floatingview>
<!-- stack view -->
<floatingview id="stack" title="&Stack.label;" flex="1"
grippytooltiptext="&Stack.label;">
<vbox id="stack-view-content" flex="1">
<tree flex="2" id="stack-tree" persist="width" context="context:stack"
ondblclick="console.views.stack.onDblClick(event);">
<treecols>
<treecol id="stack:col-0" flex="1" persist="hidden width"
label="&StackCol0.header;"/>
<splitter class="tree-splitter"/>
<treecol flex="2" id="stack:col-1" persist="hidden width"
label="&StackCol1.header;"/>
<splitter class="tree-splitter"/>
</treecols>
<treechildren id="stack-body"/>
</tree>
</vbox>
</floatingview>
<!-- watch view -->
<floatingview id="watches" title="&Watch.label;" flex="1">
<vbox id="watch-view-content" flex="1">
<tree flex="1" id="watch-tree" persist="height"
ondblclick="console.views.watches.onDblClick(event);"
context="context:watches">
<treecols>
<treecol id="watches:col-0" flex="1" persist="hidden width"
primary="true" label="&WatchCol0.header;"/>
<splitter class="tree-splitter"/>
<treecol flex="1" id="watches:col-1" persist="hidden width"
hidden="true" label="&WatchCol1.header;"/>
<splitter class="tree-splitter"/>
<treecol flex="1" id="watches:col-2" persist="hidden width"
label="&WatchCol2.header;"/>
<splitter class="tree-splitter"/>
<treecol flex="1" id="watches:col-3" persist="hidden width"
label="&WatchCol3.header;" hidden="true"/>
</treecols>
<treechildren id="watch-body" flex="1"/>
</tree>
</vbox>
</floatingview>
<!-- windows view -->
<floatingview id="windows" title="&Windows.label;" flex="1">
<vbox id="windows-view-content" flex="1">
<tree flex="1" id="windows-tree" persist="height"
ondblclick="console.views.windows.onDblClick(event);"
hidecolumnpicker="true">
<treecols>
<treecol id="windows:col-0" label="&WindowsCol0.label;"
primary="true" flex="1" persist="hidden width"/>
</treecols>
<treechildren id="windows-body"/>
</tree>
</vbox>
</floatingview>
</overlaytarget>
</overlay>

Просмотреть файл

@ -36,142 +36,37 @@
-
-->
<!DOCTYPE window SYSTEM "chrome://venkman/locale/venkman.dtd" >
<!DOCTYPE window SYSTEM "chrome://venkman/locale/venkman.dtd">
<?xml-stylesheet href="chrome://venkman/skin/venkman.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://venkman/content/venkman-menus.xul"?>
<?xul-overlay href="chrome://venkman/content/venkman-scripts.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://venkman/content/venkman-views.xul"?>
<window id="venkman-window"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="console.onLoad();" onclose="return console.onClose();"
onunload="return console.onUnload();"
width="640" height="480"
onmouseover="console.onMouseOver(event);"
width="800" height="600"
persist="width height screenX screenY" title="&MainWindow.title;"
windowtype="mozapp:venkman">
<!-- parents for the command manager-managed objects -->
<keyset id="dynamic-keys"/>
<popupset id="dynamic-popups"/>
<overlaytarget id="scripts-overlay-target"/>
<overlaytarget id="menu-overlay-target"/>
<overlaytarget id="views-overlay-target"/>
<vbox flex="1">
<hbox flex="1" id="top-hbox" persist="height">
<vbox flex="1" id="top-left-pane" persist="width">
<!-- project view -->
<tree flex="1" id="project-tree" persist="height"
ondblclick="console.onProjectSelect(event);">
<treecols>
<treecol id="project-col-0" label="" primary="true" flex="5"
persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="project-col-1" flex="1" label = ""
persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="project-col-2" flex="1" label = ""
persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="project-col-3" flex="1" label = ""
persist="hidden width"/>
</treecols>
<treechildren id="project-body"/>
</tree>
<splitter collapse="before"><grippy/></splitter>
<!-- script view -->
<tree flex="1" id="script-list-tree" persist="height"
ondblclick="console.onScriptSelect(event);"
onclick="console.onScriptClick(event);">
<treecols>
<treecol id="script-name" label="&ScriptCol0.header;"
primary="true" flex="5" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol flex="1" id="script-line-start"
label="&ScriptCol1.header;" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol flex="1" id="script-line-extent"
label="&ScriptCol2.header;" persist="hidden width" hidden="true"/>
</treecols>
<treechildren id="script-list-body"/>
</tree>
</vbox>
<splitter collapse="before"><grippy/></splitter>
<!-- source view -->
<tree id="source-tree" flex="50" persist="width"
onselectXXX="console.onSourceSelect(event);"
onclick="console.onSourceClick(event);">
<treecols>
<treecol id="breakpoint-col" flex="3"
display="&SourceCol0.display;" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="source-line-number" flex="7"
display="&SourceCol1.display;" persist="hidden width"/>
<splitter class="tree-splitter"/>
<treecol id="source-line-text" flex="90"
ignoreincolumnpicker="true" persist="hidden width"/>
</treecols>
<treechildren id="source-tree-body"/>
</tree>
</hbox>
<splitter collapse="after" persist="top"><grippy/></splitter>
<hbox id="bottom-hbox" persist="height">
<!-- stack view -->
<tree flex="2" id="stack-tree" persist="width"
ondblclick="console.onStackSelect(event);">
<treecols>
<treecol id="stack-col-0" flex="1" persist="hidden width"
primary="true" label="&StackCol0.header;"/>
<splitter class="tree-splitter"/>
<treecol flex="2" id="stack-col-1" persist="hidden width"
hidden="true" label="&StackCol1.header;"/>
<splitter class="tree-splitter"/>
<treecol flex="1" id="stack-col-2" persist="hidden width"
label="&StackCol2.header;"/>
<splitter class="tree-splitter"/>
<treecol flex="1" id="stack-col-3" persist="hidden width"
label="&StackCol3.header;" hidden="true"/>
</treecols>
<treechildren id="stack-body"/>
</tree>
<splitter collapse="after" persist="left"><grippy/></splitter>
<!-- console view -->
<vbox id="console-box" flex="50" persist="width">
<iframe id="output-iframe" flex="1"
ondraggesture=
"nsDragAndDrop.startDrag(event, contentAreaDNDObserver);"
src="chrome://venkman/content/venkman-output-window.html"
type="content"/>
<textbox id="input-single-line" class="input-widget"
onkeypress="console.onSingleLineKeypress(event);"/>
</vbox>
</hbox>
</vbox>
<viewcontainer id="root-container" flex="1" type="horizontal">
<viewcontainer id="initial-container" type="vertical" flex="1"/>
</viewcontainer>
<overlaytarget id="statusbar-overlay-target"/>

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -3,6 +3,10 @@ venkman.jar:
locale/en-US/venkman/contents.rdf (locale/en-US/contents.rdf)
skin/modern/venkman/contents.rdf (skin/contents.rdf)
content/venkman/venkman.xul (content/venkman.xul)
content/venkman/venkman-views.xul (content/venkman-views.xul)
content/venkman/venkman-floater.xul (content/venkman-floater.xul)
content/venkman/venkman-floater.js (content/venkman-floater.js)
content/venkman/venkman-bindings.xml (content/venkman-bindings.xml)
content/venkman/venkman-menus.xul (content/venkman-menus.xul)
content/venkman/venkman-menus.js (content/venkman-menus.js)
content/venkman/venkman-scripts.xul (content/venkman-scripts.xul)
@ -11,17 +15,22 @@ venkman.jar:
content/venkman/venkman-handlers.js (content/venkman-handlers.js)
content/venkman/venkman-static.js (content/venkman-static.js)
content/venkman/venkman-debugger.js (content/venkman-debugger.js)
content/venkman/venkman-profiler.js (content/venkman-profiler.js)
content/venkman/venkman-jsdurl.js (content/venkman-jsdurl.js)
content/venkman/venkman-url-loader.js (content/venkman-url-loader.js)
content/venkman/venkman-commands.js (content/venkman-commands.js)
content/venkman/venkman-prefs.js (content/venkman-prefs.js)
content/venkman/venkman-eval.js (content/venkman-eval.js)
content/venkman/venkman-msg.js (content/venkman-msg.js)
content/venkman/venkman-munger.js (content/venkman-munger.js)
content/venkman/venkman-trees.js (content/venkman-trees.js)
content/venkman/venkman-views.js (content/venkman-views.js)
content/venkman/venkman-records.js (content/venkman-records.js)
content/venkman/tree-utils.js (content/tree-utils.js)
content/venkman/file-utils.js (content/file-utils.js)
content/venkman/html-consts.js (content/html-consts.js)
content/venkman/command-manager.js (content/command-manager.js)
content/venkman/menu-manager.js (content/menu-manager.js)
content/venkman/view-manager.js (content/view-manager.js)
content/venkman/tests/testpage.html (content/tests/testpage.html)
content/venkman/tests/tree.js (content/tests/tree.js)
content/venkman/tests/tree.xul (content/tests/tree.xul)
@ -29,19 +38,32 @@ venkman.jar:
content/venkman/venkman-overlay.js (content/venkman-overlay.js)
skin/modern/venkman/venkman.css (skin/venkman.css)
locale/en-US/venkman/venkman.dtd (locale/en-US/venkman.dtd)
locale/en-US/venkman/venkman.properties (locale/en-US/venkman.properties)
locale/en-US/venkman/venkman-overlay.dtd (locale/en-US/venkman-overlay.dtd)
content/venkman/venkman-output-window.html (content/venkman-output-window.html)
content/venkman/profile.html.tpl (content/profile.html.tpl)
skin/modern/venkman/images/stop.png (skin/images/stop.png)
skin/modern/venkman/images/stop-checked.png (skin/images/stop-checked.png)
locale/en-US/venkman/venkman.properties (locale/en-US/venkman.properties)
locale/en-US/venkman/venkman-overlay.dtd (locale/en-US/venkman-overlay.dtd)
locale/en-US/venkman/venkman-help.tpl (locale/en-US/venkman-help.tpl)
content/venkman/venkman-output-window.html (content/venkman-output-window.html)
content/venkman/profile.csv.tpl (content/profile.csv.tpl)
content/venkman/profile.txt.tpl (content/profile.txt.tpl)
content/venkman/profile.html.tpl (content/profile.html.tpl)
content/venkman/profile.xml.tpl (content/profile.xml.tpl)
content/venkman/venkman-output-base.css (content/venkman-output-base.css)
skin/modern/venkman/images/clear.png (skin/images/clear.png)
skin/modern/venkman/images/shaded.png (skin/images/shaded.png)
skin/modern/venkman/images/arrow-left.png (skin/images/arrow-left.png)
skin/modern/venkman/images/arrow-right.png (skin/images/arrow-right.png)
skin/modern/venkman/images/arrow-up.png (skin/images/arrow-up.png)
skin/modern/venkman/images/arrow-down.png (skin/images/arrow-down.png)
skin/modern/venkman/images/view-pop-button.png (skin/images/view-pop-button.png)
skin/modern/venkman/images/view-close-button.png (skin/images/view-close-button.png)
skin/modern/venkman/images/stop.png (skin/images/stop.png)
skin/modern/venkman/images/stop-checked.png (skin/images/stop-checked.png)
skin/modern/venkman/images/stop-checked-hov.png (skin/images/stop-checked-hov.png)
skin/modern/venkman/images/stop-hov.png (skin/images/stop-hov.png)
skin/modern/venkman/images/stop-act.png (skin/images/stop-act.png)
skin/modern/venkman/images/stop-dis.png (skin/images/stop-dis.png)
skin/modern/venkman/images/profile.png (skin/images/profile.png)
skin/modern/venkman/images/profile-act.png (skin/images/profile.png)
skin/modern/venkman/images/profile-checked.png (skin/images/profile-checked.png)
skin/modern/venkman/images/stop-hov.png (skin/images/stop-hov.png)
skin/modern/venkman/images/stop-act.png (skin/images/stop-act.png)
skin/modern/venkman/images/stop-dis.png (skin/images/stop-dis.png)
skin/modern/venkman/images/profile.png (skin/images/profile.png)
skin/modern/venkman/images/profile-act.png (skin/images/profile.png)
skin/modern/venkman/images/profile-checked.png (skin/images/profile-checked.png)
skin/modern/venkman/images/profile-hov.png (skin/images/profile-hov.png)
skin/modern/venkman/images/profile-checked-hov.png (skin/images/profile-checked-hov.png)
skin/modern/venkman/images/prettyprint.png (skin/images/prettyprint.png)
@ -67,15 +89,15 @@ venkman.jar:
skin/modern/venkman/images/step-out-dis.png (skin/images/step-out-dis.png)
skin/modern/venkman/images/breakpoint-line.gif (skin/images/breakpoint-line.gif)
skin/modern/venkman/images/breakpoint-future-line.gif (skin/images/breakpoint-future-line.gif)
skin/modern/venkman/images/breakpoint-future.gif (skin/images/breakpoint-future.gif)
skin/modern/venkman/images/code-line.gif (skin/images/code-line.gif)
skin/modern/venkman/images/code-line-dis.gif (skin/images/code-line-dis.gif)
skin/modern/venkman/images/proj-blacklist.png (skin/images/proj-blacklist.png)
skin/modern/venkman/images/proj-bl-item.png (skin/images/proj-bl-item.png)
skin/modern/venkman/images/proj-windows.png (skin/images/proj-windows.png)
skin/modern/venkman/images/proj-window.png (skin/images/proj-window.png)
skin/modern/venkman/images/proj-files.png (skin/images/proj-files.png)
skin/modern/venkman/images/proj-breakpoints.png (skin/images/proj-breakpoints.png)
skin/modern/venkman/images/proj-breakpoint.png (skin/images/proj-breakpoint.png)
skin/modern/venkman/images/windows.png (skin/images/windows.png)
skin/modern/venkman/images/window.png (skin/images/window.png)
skin/modern/venkman/images/files.png (skin/images/files.png)
skin/modern/venkman/images/stack.png (skin/images/stack.png)
skin/modern/venkman/images/breakpoints.png (skin/images/breakpoints.png)
skin/modern/venkman/images/breakpoint.png (skin/images/breakpoint.png)
skin/modern/venkman/images/file-function.png (skin/images/file-function.png)
skin/modern/venkman/images/file-function-bp.png (skin/images/file-function-bp.png)
skin/modern/venkman/images/file-function-guess.png (skin/images/file-function-guess.png)
@ -90,14 +112,18 @@ venkman.jar:
skin/modern/venkman/images/file-html-bp.png (skin/images/file-html-bp.png)
skin/modern/venkman/images/file-xul-bp.png (skin/images/file-xul-bp.png)
skin/modern/venkman/images/file-xml-bp.png (skin/images/file-xml-bp.png)
skin/modern/venkman/images/watch-stack.png (skin/images/watch-stack.png)
skin/modern/venkman/images/watch-frame.png (skin/images/watch-frame.png)
skin/modern/venkman/images/watch-void.png (skin/images/watch-void.png)
skin/modern/venkman/images/watch-null.png (skin/images/watch-null.png)
skin/modern/venkman/images/watch-bool.png (skin/images/watch-bool.png)
skin/modern/venkman/images/watch-int.png (skin/images/watch-int.png)
skin/modern/venkman/images/watch-double.png (skin/images/watch-double.png)
skin/modern/venkman/images/watch-string.png (skin/images/watch-string.png)
skin/modern/venkman/images/watch-function.png (skin/images/watch-function.png)
skin/modern/venkman/images/watch-object.png (skin/images/watch-object.png)
skin/modern/venkman/images/value-frame.png (skin/images/value-frame.png)
skin/modern/venkman/images/value-void.png (skin/images/value-void.png)
skin/modern/venkman/images/value-null.png (skin/images/value-null.png)
skin/modern/venkman/images/value-bool.png (skin/images/value-bool.png)
skin/modern/venkman/images/value-int.png (skin/images/value-int.png)
skin/modern/venkman/images/value-double.png (skin/images/value-double.png)
skin/modern/venkman/images/value-string.png (skin/images/value-string.png)
skin/modern/venkman/images/value-function.png (skin/images/value-function.png)
skin/modern/venkman/images/value-object.png (skin/images/value-object.png)
skin/modern/venkman/images/current-frame.gif (skin/images/current-frame.gif)
skin/modern/venkman/venkman-help.css (skin/venkman-help.css)
skin/modern/venkman/venkman-source.css (skin/venkman-source.css)
skin/modern/venkman/venkman-output-default.css (skin/venkman-output-default.css)
skin/modern/venkman/venkman-output-dark.css (skin/venkman-output-dark.css)
skin/modern/venkman/venkman-output-light.css (skin/venkman-output-light.css)

Просмотреть файл

@ -0,0 +1,163 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<link rel="stylesheet" href="$css" type="text/css" media="screen">
<title>Venkman Help System</title>
<script>
function onLoad ()
{
var searchStart = document.location.href.indexOf("?");
if (searchStart != -1)
{
var href = document.location.href;
var result = parseSearch(href.substr(searchStart + 1));
if ("search" in result)
{
document.getElementById("search").value =
unescape(result.search);
}
if ("within" in result)
{
var within = parseInt(result.within);
if (within & 0x01)
document.getElementById("command-names").checked = true;
if (within & 0x02)
document.getElementById("ui-labels").checked = true;
if (within & 0x04)
document.getElementById("help-text").checked = true;
}
else
{
document.getElementById("command-names").checked = true;
document.getElementById("ui-labels").checked = true;
}
}
else
{
document.getElementById("command-names").checked = true;
document.getElementById("ui-labels").checked = true;
}
}
function onKeyUp (event)
{
if (event.keyCode == 13)
onSearch();
}
function onSearch ()
{
var search = document.getElementById("search").value;
var within = 0;
if (document.getElementById("command-names").checked)
within |= 0x01;
if (document.getElementById("ui-labels").checked)
within |= 0x02;
if (document.getElementById("help-text").checked)
within |= 0x04;
document.location.href = "x-jsd:help?search=" + escape(search) +
"&within=" + within;
}
function parseSearch (search)
{
var parseResult = new Object();
var ary = search.match(/([^&]+)/);
while (ary)
{
var rest = RegExp.rightContext.substr(1);
var assignment = ary[1];
ary = assignment.match(/(.+)=(.*)/);
if (ary)
{
/* only set the property the first time we see it */
if (2 in ary && !(ary[1] in parseResult))
parseResult[ary[1]] = ary[2];
}
ary = rest.match(/([^&]+)/);
}
return parseResult;
}
</script>
</head>
<body id="venkman-help" onload="onLoad();"
hasSearched="$has-searched" matchCount="$match-count">
<a name="top"></a>
<div id="help-menu">
<span class="newbie-help">
<p>
Welcome to the <b>Venkman Help System</b>. From here you can search
for help on the various commands avaialble in Venkman. To search for a
particular command, type your search term in the box below and click
<b>Go</b>, or press <b>Enter</b>.
</span>
<span class="newbie-help">
The check boxes control which fields the search is performed on...
<ul>
<li><b>Command Names</b> matches the command name, as you might enter
it in the </b>Session View</b>.
<li><b>User Interface Labels</b> matches the label used when the
command appears in a <b>menu</b> or <b>toolbar button</b>.
<li><b>Descriptions</b> matches the body of the help text.
</ul>
</span>
<p class="search-input">
Search: <input type="text" id="search" onkeyup="onKeyUp(event)"/>
<input type="button" onclick="onSearch()" value="Go">
<input type="checkbox" id="command-names" value="1">
<label for="command-names">Command Names</label>
<input type="checkbox" id="ui-labels" value="1">
<label for="ui-labels">User Interface Labels</label>
<input type="checkbox" id="help-text" value="1">
<label for="help-text">Descriptions</label>
<p class="quick-searches">
[ <a href="x-jsd:help">Session View Commands</a> |
<a href="x-jsd:help?search="><b>All</b> Commands</a> |
<a href="x-jsd:help?search=%5E%5Ba-c%5D&within=2">A-C</a> |
<a href="x-jsd:help?search=%5E%5Bd-f%5D&within=2">D-F</a> |
<a href="x-jsd:help?search=%5E%5Bg-i%5D&within=2">G-I</a> |
<a href="x-jsd:help?search=%5E%5Bj-l%5D&within=2">J-L</a> |
<a href="x-jsd:help?search=%5E%5Bm-o%5D&within=2">M-O</a> |
<a href="x-jsd:help?search=%5E%5Bp-r%5D&within=2">P-R</a> |
<a href="x-jsd:help?search=%5E%5Bs-u%5D&within=2">S-U</a> |
<a href="x-jsd:help?search=%5E%5Bv-z%5D&within=2">V-Z</a> ]
</div>
<span id="match-count">Found $match-count matching command(s).</span>
<span id="command-list">
@-header-end
<span class="command">
<span class="label" item="command-name">Command Name:</span>
<span class="value" item="command-name"><a href="x-jsd:help?search=$command-name">$command-name</a></span><br>
<span class="label" item="ui-label">User Interface Label:</span>
<span class="value" item="ui-label"><a href="x-jsd:help?search=$ui-label-safe&within=2">$ui-label</a></span><br>
<br>
<span class="label" item="usage">Usage:</span> <span class="value" item="usage">$command-name $params</span><br>
<br>
<span class="label" item="accel-key">Accelerator Key:</span> $key<br>
<br>
<span class="label" item="description">Description:</span><br>
<span class="value" item="description">$desc</span>
<span class="goto-top"><a href="#top">Back To Top</a></span>
</span>
<hr>
@-command-end
<font color="red"><b>No commands found</b></font>
@-nomatch-end
</span>
</body>
</html>

Просмотреть файл

@ -36,57 +36,58 @@
<!ENTITY MainWindow.title "JavaScript Debugger">
<!-- view menu -->
<!ENTITY PPrint.label "Pretty Print">
<!ENTITY PPrint.aKey "P">
<!ENTITY Reload.label "Reload Source">
<!ENTITY Reload.aKey "R">
<!-- debug menu -->
<!ENTITY Debug.label "Debug">
<!ENTITY Debug.aKey "D">
<!ENTITY Cont.label "Continue">
<!ENTITY Cont.aKey "C">
<!ENTITY StepIn.label "Step Into">
<!ENTITY StepIn.aKey "I">
<!ENTITY StepOver.label "Step Over">
<!ENTITY StepOver.aKey "O">
<!ENTITY StepOut.label "Step Out">
<!ENTITY StepOut.aKey "t">
<!ENTITY Stop.label "Stop">
<!ENTITY Stop.aKey "p">
<!ENTITY TModeIgnore.label "Ignore Exceptions">
<!ENTITY TModeIgnore.aKey "g">
<!ENTITY TModeTrace.label "Trace Exceptions">
<!ENTITY TModeTrace.aKey "r">
<!ENTITY TModeBreak.label "Stop for Exceptions">
<!ENTITY TModeBreak.aKey "E">
<!ENTITY InitAtStartup.label "Initialize at Startup">
<!ENTITY InitAtStartup.aKey "n">
<!-- help menu -->
<!ENTITY Help.commands "Command Reference">
<!ENTITY Help.about "About Venkman">
<!-- toolips -->
<!ENTITY Cont.tooltip "Continue debugging">
<!ENTITY Stop.tooltip "Stop the current operation">
<!ENTITY Cont.tooltip "Continue debugging">
<!ENTITY Stop.tooltip "Stop the current operation">
<!ENTITY StepOver.tooltip "Step over statement">
<!ENTITY StepIn.tooltip "Step into statement">
<!ENTITY StepOut.tooltip "Step out of statement">
<!ENTITY StepIn.tooltip "Step into statement">
<!ENTITY StepOut.tooltip "Step out of statement">
<!ENTITY DebugBar.tooltip "Debugging Toolbar">
<!ENTITY MenuBar.tooltip "Menu Bar">
<!ENTITY MenuBar.tooltip "Menu Bar">
<!-- status bar -->
<!ENTITY StatusText.label "Welcome to the JavaScript Debugger">
<!-- breakpoint view -->
<!ENTITY Break.label "Breakpoints">
<!ENTITY BreakCol0.label "Name">
<!ENTITY BreakCol1.label "Line/PC">
<!-- source tree -->
<!-- locals view -->
<!ENTITY Locals.label "Local Variables">
<!ENTITY LocalsCol0.header "Name">
<!ENTITY LocalsCol1.header "Type">
<!ENTITY LocalsCol2.header "Value">
<!ENTITY LocalsCol3.header "Flags">
<!-- session view -->
<!ENTITY Session.label "Interactive Session">
<!-- script view -->
<!ENTITY Scripts.label "Loaded Scripts">
<!ENTITY ScriptsCol0.header "Name">
<!ENTITY ScriptsCol1.header "Line">
<!ENTITY ScriptsCol2.header "Length">
<!-- source view -->
<!ENTITY Source.label "Source Code">
<!ENTITY SourceHeader.tip "Source Toolbar">
<!ENTITY SourceCol0.display "Margin">
<!ENTITY SourceCol1.display "Line Number">
<!-- script tree -->
<!ENTITY ScriptCol0.header "Name">
<!ENTITY ScriptCol1.header "Line">
<!ENTITY ScriptCol2.header "Length">
<!-- stack view -->
<!ENTITY Stack.label "Call Stack">
<!ENTITY StackCol0.header "Name">
<!ENTITY StackCol1.header "Location">
<!-- stack/expression tree -->
<!ENTITY StackCol0.header "Name">
<!ENTITY StackCol1.header "Type">
<!ENTITY StackCol2.header "Value">
<!ENTITY StackCol3.header "Flags">
<!-- watch view -->
<!ENTITY Watch.label "Watches">
<!ENTITY WatchCol0.header "Name">
<!ENTITY WatchCol1.header "Type">
<!ENTITY WatchCol2.header "Value">
<!ENTITY WatchCol3.header "Flags">
<!-- window view -->
<!ENTITY Windows.label "Open Windows">
<!ENTITY WindowsCol0.label "File">

Просмотреть файл

@ -45,11 +45,16 @@
# my.message3 = "foo "
# my.message3 = foo "
# Both of these produce the word ``foo'', followed by 10 spaces.
# my.message4 = A sphincter says "what?""
# my.message4 = "A sphincter says "what?""
# my.message4 = A sphincter says, "what?""
# my.message4 = "A sphincter says, "what?""
# Both of these produce the phrase ``A sphincter says "what?"''
#
msg.locale.version = 0.9.x
msg.bad.locale = This version of Venkman is meant to work with a ``%1$S'' locale, but you are currently using a locale marked ``%2$S''. Chances are, you're going to have problems. Please change to the default locale, or upgrade your language pack.
msg.release.url = http://www.mozilla.org/releases/
## exception descriptions ##
err.notimplemented = Not implemented
err.required.param = Missing required parameter %1$S
@ -57,39 +62,59 @@ err.invalid.param = Invalid value for parameter %1$S (%2$S)
# 1 url, 2 fileName, 3 lineNumber, 4 reason
err.subscript.load = Error loading subscript from <%1$S>.
err.no.debugger = JS Debugger Service is not installed.
err.failure = Unclassified failure.
err.failure = Operation Failed: %1$S
err.no.stack = No Stack
err.no.source = No scripts loaded match ``%1$S''.
## error messages ##
msg.err.nostack = No stack
msg.err.noscript = No debuggable scripts found for ``%1$S''
msg.err.nocommand = No such command, ``%1$S''
msg.err.disabled = Sorry, ``%1$S'' is currently disabled
msg.err.notimplemented = Sorry, ``%1$S'' has not been implemented
msg.err.ambigcommand = Ambiguous command, ``%1$S'', %2$S commands match [%3$S]
msg.err.bp.noscript = <%1$S> URL not loaded
msg.err.bp.noline = <%1$S> contains no code at line %2$S
msg.err.bp.nodice = No breakpoint set at <%1$S> line %2$S
msg.err.bp.noindex = No breakpoint at index %1$S
msg.err.source.load.failed = Error loading URL <%1$S>: %2$S
msg.err.startup = An exception occurred while initializing, please file a bug.\n%1$S
msn.err.unknown.reason = Unknown reason
msn.err.required.param = Missing required parameter %1$S
msn.err.invalid.param = Invalid value for parameter %1$S (%2$S)
msn.err.invalid.pref = Invalid value for preference %1$S (%2$S)
msn.err.scriptload = Error loading subscript from <%1$S>.
msn.err.no.source = No scripts loaded match ``%1$S''.
msn.err.no.command = No command named ``%1$S''.
msn.err.no.such.view = No such view ``%1$S''.
msg.err.no.stack = No stack
msn.err.noscript = No debuggable scripts found for ``%1$S''
msn.err.disabled = Sorry, ``%1$S'' is currently disabled
msn.err.notimplemented = Sorry, ``%1$S'' has not been implemented
msn.err.ambigcommand = Ambiguous command, ``%1$S'', %2$S commands match [%3$S]
msn.err.bp.noline = No scripts matching <%1$S> contain executable code at line %2$S
msn.err.bp.nodice = No breakpoint set at <%1$S> line %2$S
msn.err.startup = An exception occurred while initializing, please file a bug.\n%1$S
msn.err.cant.match = Error loading template: Can't match ``%1$S''.
msg.err.internal.bpt = Internal error handling breakpoint.
msg.err.internal.dispatch = Internal error dispatching command ``%1$S''.
msn.err.internal.hook = Internal error processing hook ``%1$S''.
msn.err.failure = Operation Failed: %1$S
msn.err.no.section = Missing section before ``%1$S'' in <%2$S>.
msn.err.no.template = No pref for template named ``%1$S''.
msn.err.internal.dispatch = Internal error dispatching command ``%1$S''.
msn.err.source.load.failed = Error loading URL <%1$S>: %2$S.
msn.err.no.such.container = No such container ``%1$S''.
msg.err.format.not.available = Source not available in requested format.
msn.jsdurl.errpage = <html><head><title>Error</title></head><body>Error loading &lt;<b>%1$S</b>&gt;<br>%2$S</body></html>
msg.err.jsdurl.parse = Error parsing URL.
msg.err.jsdurl.nosource = URL has no textual source.
msg.err.jsdurl.noservice = No such service.
msg.err.jsdurl.search = Error in search pattern.
msg.err.jsdurl.sourcetext = Error locating source text.
msn.err.jsdurl.template = Error loading template named ``%1$S''.
## "values" ##
msg.val.commasp = ,%1$S
msg.val.unknown = <unknown>
msg.val.console = <console>
msg.val.na = <not-available>
msg.val.none = <none>
msg.val.object = <object>
msg.val.expression = <expression>
msg.val.proto = [[Prototype]]
msg.val.parent = [[Parent]]
## words ##
msg.val.native = native
msg.val.script = script
msg.val.min = min
msg.val.max = max
msg.val.this = this
msg.val.breakpoint = breakpoint
msg.val.debug = error handler
@ -116,129 +141,160 @@ msg.type.string = string
msg.type.unknown = unknown
msg.type.void = void
msg.class.xpcobj = XPComponent
msg.blacklist = Blacklist
msg.window.rec = Windows
msg.files.rec = Files
msg.break.rec = Breakpoints
msg.callstack = Call Stack
msg.class.xpcobj = XPComponent
msg.class.const.xpcobj = const XPComponent
msg.class.native.fun = Native Function
msg.class.script.fun = Script Function
## messages ##
msg.query.close = Debugging in progress, close anyway?
msg.status.default = Welcome to the JavaScript Debugger
msg.status.loading = Loading source for ``%1$S''
msg.status.marking = Marking source for ``%1$S''
msg.status.stopped = Stopped in %1$S, %2$S
msn.status.loading = Loading source for ``%1$S''
msn.status.marking = Marking source for ``%1$S''
msn.status.stopped = Stopped in %1$S, %2$S
msg.stop = Stopped for %1$S.
msg.cont = Continuing from %1$S.
msg.subscript.load = Subscript <%1$S> loaded with result ``%2$S''.
msg.cant.pprint = Unable to Pretty Print this function.
msg.commasp = , "
msn.stop = Stopped for %1$S.
msn.cont = Continuing from %1$S.
msn.subscript.loaded = Subscript <%1$S> loaded with result ``%2$S''.
# 1 exception name, 2 fileName, 3 lineNumber
msg.eval.error = %1$S: <%2$S>, line %3$S
msg.eval.threw = Caught exception: %1$S
msg.hello = Welcome to ``Venkman'', the JavaScript debugger. Visit the Venkman homepage <http://www.mozilla.org/projects/venkman/> for more information, or <chrome://venkman/content/tests/testpage.html> for a sample debugging target.
msg.version = You are running Venkman version %1$S.
msg.tip.help = Use ``help <command-name>'' for help on specific commands.
msg.no.breakpoints.set = No breakpoints set.
msn.eval.error = %1$S: <%2$S>, line %3$S
msn.eval.threw = Caught exception: %1$S
msg.hello = Welcome to ``Venkman'', the JavaScript debugger. Please read the FAQ at <http://www.hacksrus.com/~ginda/venkman/faq/venkman-faq.html>. Visit the Venkman homepage <http://www.mozilla.org/projects/venkman/> for more information.
msn.version = You are running Venkman version %1$S.
msg.tip1.help = Use ``help <command-name>'' for help on specific commands.
msg.tip2.help = Visit <x-jsd:help> for a searchable command reference.
msg.no.breaks.set = No breakpoints set.
msg.no.fbreaks.set = No future breakpoints set.
msg.noproperties = %1$S has no properties.
msg.no-commandmatch = No commands match ``%1$S''.
msg.commandmatch = Commands matching ``%1$S'' are [%2$S].
msg.commandmatch.all = Implemented commands are %1$S.
msg.props.header = Properties of %1$S in debug target scope:
msg.propsd.header = Properties of %1$S in debugger scope:
msg.bp.header = %1$S breakpoints set:
# 1 index, 2 file name, 3 line, 4 match count
msg.bp.line = #%1$S <%2$S> line %3$S (%4$S scripts match.)
msg.bp.created = Breakpoint at <%1$S> line %2$S created (%3$S scripts match.)
msg.bp.disabled = Breakpoint at <%1$S> line %2$S disabled (%3$S scripts match.)
msg.bp.cleared = Breakpoint at <%1$S> line %2$S deleted (%3$S scripts match.)
msg.bp.exists = Breakpoint at <%1$S> line %2$S already set.
msg.fbp.header = %1$S future breakpoints set:
msn.no.properties = %1$S has no properties.
msn.no.cmdmatch = No commands match ``%1$S''.
msn.cmdmatch = Commands matching ``%1$S'' are [%2$S].
msn.cmdmatch.all = Implemented commands are %1$S.
msn.props.header = Properties of %1$S in debug target scope:
msn.propsd.header = Properties of %1$S in debugger scope:
msn.bp.header = %1$S breakpoints set:
# 1 index, 2 file name, 3 line
msg.fbp.line = #%1$S %2$S:%3$S
msg.fbp.created = Future breakpoint at <%1$S> line %2$S created.
msg.fbp.disabled = Future breakpoint at <%1$S> line %2$S deleted.
msg.fbp.exists = Future breakpoint at <%1$S> line %2$S already set.
msg.source.line = %1$S: %2$S
msn.bp.line = #%1$S <%2$S> line %3$S
msn.bp.created = Breakpoint at <%1$S> line %2$S created
msn.bp.cleared = Breakpoint at <%1$S> line %2$S deleted
msn.bp.exists = Breakpoint at <%1$S> line %2$S already set.
msn.watch.header = %1$S watches set:
# 1 index, 2 file name, 3 line
msn.fbp.line = #%1$S <%2$S> line %3$S
msn.fbp.created = Future breakpoint at <%1$S> line %2$S created.
msn.fbp.cleared = Future breakpoint at <%1$S> line %2$S cleared.
msn.fbp.exists = Future breakpoint at <%1$S> line %2$S already set.
msn.source.line = %1$S: %2$S
msg.emode.ignore = Errors will now be ignored.
msg.emode.trace = Errors will now be traced.
msg.emode.break = Errors will now stop the debug target.
msg.tmode.ignore = Exceptions will now be ignored.
msg.tmode.trace = Exceptions will now be traced.
msg.tmode.break = Exceptions will now stop the debug target.
msg.iasmode = Initialize at Startup is now %1$S.
msg.chrome.filter = Chrome filtering is now %1$S.
msn.iasmode = Initialize at Startup is now %1$S.
msn.save.layout = Save Layout on Exit is now %1$S.
msn.layout.list = The following layouts have already been saved [%1$S]. Use ``save-layout <name>'' to save the current layout, or ``restore-layout <name>'' to restore a specific layout.
msn.chrome.filter = Chrome filtering is now %1$S.
# 1 value, 2 frame
msg.exception.trace = Exception %1$S thrown from %2$S.
msn.exception.trace = Exception ``%1$S'' thrown from %2$S.
# 1 message, 2 flags, 3 file, 4 line, 5 pos
msg.erpt.error = Error ``%1$S'' [%2$S] in file ``%3$S'', line %4$S, character %5$S.
msg.erpt.warn = Warning ``%1$S'' [%2$S] in file ``%3$S'', line %4$S, character %5$S.
msg.profile.lost = Lost profile data for script %1$S.
msg.profile.state = Profile data collection is now %1$S.
msg.profile.saved = Profile data saved to <%1$S>.
msn.erpt.error = Error ``%1$S'' [%2$S] in file ``%3$S'', line %4$S, character %5$S.
msn.erpt.warn = Warning ``%1$S'' [%2$S] in file ``%3$S'', line %4$S, character %5$S.
msn.profile.lost = Lost profile data for script %1$S.
msn.profile.state = Profile data collection is now %1$S.
msn.profile.saved = Profile data saved to <%1$S>.
msg.profile.cleared = Profile data cleared.
msn.profile.saving = Generating profile report, file %1$S of %2$S
msg.open.file = Open File...
msg.open.url = Enter a URL to Load...
msg.save.profile = Save Profile Data As...
msg.save.source = Save Source As...
msg.navigator.xul = Navigator Window
## property value flags ##
vf.enumerable = e
vf.readonly = r
vf.permanent = p
vf.alias = A
vf.argument = a
vf.variable = v
vf.hinted = h
msg.vf.enumerable = e
msg.vf.readonly = r
msg.vf.permanent = p
msg.vf.alias = A
msg.vf.argument = a
msg.vf.variable = v
msg.vf.error = E
msg.vf.exception = X
msg.vf.hinted = h
## formatting ##
# 1: argument name, 2: value
fmt.argument = %1$S=%2$S"
msn.fmt.argument = %1$S=%2$S"
# 1: property flags, 2: property name, 3: property value
fmt.property = [%1$S] %2$S = %3$S"
msn.fmt.property = [%1$S] %2$S = %3$S"
# 1: function name, 2: filename
fmt.script = function %1$S in <%2$S>
msn.fmt.script = function %1$S in <%2$S>
# 1: function name, 2: arguments, 3: filename, 4: line number
fmt.frame = function %1$S(%2$S) in <%3$S> line %4$S
msn.fmt.frame = function %1$S(%2$S) in <%3$S> line %4$S
# 1: type, 2: class name, 3: value
fmt.value.long = [%1$S] [class: %2$S] %3$S"
msn.fmt.value.long = [%1$S] [class: %2$S] %3$S"
# 1: type, 2: value
fmt.value.med = [%1$S] %2$S"
msn.fmt.value.med = [%1$S] %2$S"
# 1: type, 2: value
fmt.value.short = %1$S:%2$S"
msn.fmt.value.short = %1$S:%2$S"
# 1: property count
fmt.object = %1$S properties
msn.fmt.object = %1$S properties
# 1: ctor name, 2: property count
msn.fmt.object.value = {%1$S:%2$S}
# 1: JS exception name, 2: error text, 3: file name, 4: line number
fmt.jsexception = %1$S: %2$S @ <%3$S> %4$S"
msn.fmt.jsexception = %1$S: %2$S @ <%3$S> %4$S"
# 1: error number, 2: error text, 3: file name, 4: line number, 5: function name
fmt.badmojo = BadMojo %1$S: %2$S @ <%3$S> line %4$S (%5$S)
msn.fmt.badmojo = BadMojo %1$S: %2$S @ <%3$S> line %4$S (%5$S)
# 1: var number, 2: value
fmt.tmp.assign = $[%1$S] = %2$S"
msn.fmt.tmp.assign = $[%1$S] = %2$S"
# 1: string length
fmt.longstr = %1$S characters
msn.fmt.longstr = %1$S characters
# 1: command name 2: parameters
fmt.usage = %1$S %2$S
msn.fmt.usage = %1$S %2$S
# 1: function name
fmt.guessedname = [%1$S]
msn.fmt.guessedname = [%1$S]
# 1: program counter
msn.fmt.pc = [%1$S]
# 1: pref name 2: value
fmt.prefvalue = Preference ``%1$S'' is ``%2$S''
msn.fmt.prefvalue = Preference ``%1$S'' is ``%2$S''
# 1: index, 2: label, 3: value
msn.fmt.watch.item = %1$S: %2$S = %3$S
# 1: on|off
msn.fmt.pprint = Pretty Print is %1$S.
# 1: frame number, 2: frame string
msn.fmt.frame.line = #%1$S: %2$S
# 1: file name, 2: line number, 3: pc
msn.fmt.frame.location = %1$S, line %2$S, pc %3$S
# 1: function name, 2: start line, 3: end line, 4: call count, 5: recurse,
# 6: total, 7: min, 8: max, 9: avg
msn.fmt.profile.str = %1$S: %2$S-%3$S, %4$S call(s)%5$S, %6$Sms total, %7$Sms max, %8$Sms avg
# 1: max recurse depth
msn.fmt.profile.recurse = " (max depth %1$S)
## menu headings ##
mnu.file = &File
mnu.debug = &Debug
mnu.profile = &Profile
mnu.view = &View
popup.project = Project View Context Menu
popup.source = Source View Context Menu
popup.script = Script View Context Menu
popup.stack = Stack View Context Menu
popup.console = Console View Context Menu
msg.mnu.file = &File
msg.mnu.debug = &Debug
msg.mnu.profile = &Profile
msg.mnu.view = &View
msg.mnu.help = &Help
msg.mnu.emode = &Error Trigger
msg.mnu.tmode = Throw Tri&gger
msg.mnu.showhide = Sho&w/Hide
msg.mnu.session.colors = Interactive Session Co&lors
msg.mnu.scripts.instance = F&ile Options
msg.mnu.scripts.wrapper = Func&tion Options
msg.default.alias.help = This command is an alias for ``%1$S''.
msg.no.help = Help not available.
msg.extra.params = Extra parameters ``%1$S'' ignored.
msn.sourceheader.url = <%1$S> Line %2$S
msn.default.alias.help = This command is an alias for |%1$S|.
msn.launch.count = Recorded local starutp %1$S, global %2$S.
msg.no.help = Help not available.
msn.extra.params = Extra parameters ``%1$S'' ignored.
msg.files.rec = Files
#msg.doc.consolehdr = Console Commands
#msg.doc.menuhdr = Menus
#msg.doc.popuphdr = Popups
@ -248,42 +304,130 @@ msg.note.console = This command is available from the console.
msg.note.noconsole = This command is NOT available from the console.
msg.note.needstack = You must be stopped at a breakpoint to use this command.
msg.note.nostack = You CANNOT be stopped at a breakpoint to use this command.
msg.doc.commandlabel = " Command Name: ``%1$S'' (%2$S)
msg.doc.key = "Keyboard Shortcut: %1$S
msg.doc.syntax = " Syntax: %1$S %2$S
msn.doc.commandlabel = " Command Name: ``%1$S'' (%2$S)
msn.doc.key = "Keyboard Shortcut: %1$S
msn.doc.syntax = " Syntax: %1$S %2$S
msg.doc.notes = Notes:
msg.doc.description = Description:
msn.session.css = Interactive Session now using CSS from <%1$S>.
msg.source2.help = Please select a source file to display.
msg.margin.break = " B "
msg.margin.fbreak = " F "
msg.margin.breakable = " - "
msg.margin.none = " "
###################### DO NO LOCALIZE THE *.params STRINGS ######################
## hooks ##
cmd.hook-break-clear.params = <break-wrapper>
cmd.hook-break-clear.help = Called when a breakpoint instance is cleared.
cmd.hook-break-set.params = <break-wrapper>
cmd.hook-break-set.help = Called when a breakpoint instance is set.
cmd.hook-debug-stop.help = Called when the debugger stops execution of the debug target.
cmd.hook-debug-continue.help = Called when the debugger continues execution of the debug target.
cmd.hook-display-sourcetext.params = <source-text> [<target-line> [<details>]]
cmd.hook-display-sourcetext.help = Called when the source text object <source-text> should be presented to the user. <target-line> is the line which should appear at or near the top of the display. If <details> is provided, it will be an object representing details about where the <source-text> object was derived from.
cmd.hook-display-sourcetext-soft.params = <source-text> [<target-line> [<details>]]
cmd.hook-display-sourcetext-soft.help = Functions the same as |hook-display-sourcetext|, except the display should not be scrolled if <target-line> is already visible.
cmd.hook-eval-done.help = Called when an expression is evaluated.
cmd.hook-fbreak-clear.params = <fbreak>
cmd.hook-fbreak-clear.help = Called when a breakpoint instace is cleared.
cmd.hook-fbreak-set.params = <fbreak>
cmd.hook-fbreak-set.help = Called when a breakpoint instace is set.
cmd.hook-guess-complete.params = <script-instance>
cmd.hook-guess-complete.help = Called when function name guessing has completed for the script instance <script-instance>.
cmd.hook-session-display.params = <message> <msgtype>
cmd.hook-session-display.help = Called when a message should be appended to the interactive session display. <message> is the message as a string, or DOM node, <msgtype> is the message's type code.
cmd.hook-script-manager-created.params = <script-manager>
cmd.hook-script-manager-created.help = Called when a new script manager is created. Script managers delegate commands to one or more script-instance objects. <script-manager> will be the new script manager object. Script managers can be found keyed by URL in the |console.scriptManagers| object.
cmd.hook-script-manager-destroyed.params = <script-manager>
cmd.hook-script-manager-destroyed.help = Called after <script-manager> has been removed from the |console.scriptManagers| object. This happens after last contained script-instance is destroyed.
cmd.hook-script-instance-created.params = <script-instance>
cmd.hook-script-instance-created.help = Called when a new script instance is created. Script instances delegate commands to one or more script-wrappers.
cmd.hook-script-instance-sealed.params = <script-instance>
cmd.hook-script-instance-sealed.help = Called when <script-instance> is sealed. Script instances are ``sealed'' when the top level function is created. This signifies that the script source has been completely compiled. Any non-function scripts created after this point will appear as a transient in the parent script-manager.
cmd.hook-script-instance-destroyed.params = <script-instance>
cmd.hook-script-instance-destroyed.help = Called when the final script-wrapper contained by <script-instance> is invalidated.
cmd.hook-source-load-complete.params = <sourceText> <status>
cmd.hook-source-load-complete.help = Called when the source text represented by the object <sourceText> is loaded (or reloaded.) <status> indicates the status of the load. A <status> of 0 indicates success, non-zero values indicate a failure.
cmd.hook-transient-script.params = <script-wrapper>
cmd.hook-transient-script.help = Called when a script object that appears to be transient (the result of an eval, setTimeout, etc.) is created by the JavaScript engine.
cmd.hook-window-closed.params = <window>
cmd.hook-window-closed.help = Called when a window object is destroyed. <window> is a reference to the DOM window object for the window.
cmd.hook-window-loaded.params = <event>
cmd.hook-window-loaded.help = Called when a source file is loaded into a window object. <event> is a reference to the DOM event passed to the onLoad handler of the window.
cmd.hook-window-opened.params = <window>
cmd.hook-window-opened.help = Called when a new window object is opened. The source for this window will most likely *not* be loaded at this point. <window> is a reference to the DOM window object for the new window.
cmd.hook-window-resized.params = <window>
cmd.hook-window-resized.help = Called when the man Venkman window or a floating windoe is resized. <window> will be a reference to the window object.
cmd.hook-window-unloaded.params = <event>
cmd.hook-window-unloaded.help = Called when a source file is unloaded from a window object. <event> is a reference to the DOM event passed to the onUnload handler of the window.
cmd.hook-venkman-exit.help = Called before the debugger exits.
cmd.hook-venkman-query-exit.help = Called when the debugger would like to exit. A hook function can set |returnValue| on the event to |false| to cancel the exit.
cmd.hook-venkman-started.help = Called when the debugger first starts up.
## commands ##
cmd.break.label = &Set Breakpoint
cmd.break.params = [<file-name> <line-number>]
cmd.break.help = Set a breakpoint in the file named <file-name> at the line number <line-number>. <file-name> can be a substring of the actual filename. If no parameters are specified all active breakpoints will be listed. See also: clear.
cmd.about-mozilla.label = &About Mozilla
cmd.about-mozilla.help = Display information about your Mozilla installation.
cmd.bp-props.label = Breakpoint &Properties
cmd.bp-props.params = <breakpoint-rec>
cmd.bp-props.help = Displays a properties dialog for the selected breakpoint <brekpoint-rec>.
cmd.break.label = S&et Breakpoint
cmd.break.params = [<url-pattern> <line-number>]
cmd.break.help = Set a breakpoint in all urls matching <url-pattern> at the line number <line-number>. If no parameters are specified all active breakpoints will be listed. See also: clear.
cmd.chrome-filter.params = [<toggle>]
cmd.chrome-filter.help = Enables or disabled the filtering of chrome: urls. With chrome: filtering on, the JavaScript files which make up the browser will not be displayed in the Script View, and the debugger will not step through them while debugging.
cmd.toggle-chrome.label = &Hide Browser Files
cmd.chrome-filter.help = Enables or disabled the filtering of chrome: urls. With chrome: filtering on, the JavaScript files which make up the browser will not be displayed in the Script View, and the debugger will not step through them while debugging. The value of <toggle> can be |true|, |on|, |yes|, or |1| to turn the flag on; |false|, |off|, |no|, or |0| to turn it off; or |toggle| to invert the current state. If <toggle> is not provided, the current state will be displayed.
cmd.clear.label = &Clear Breakpoint
cmd.clear.params = <breakpoint-index> [<...>]
cmd.clear.help = Clears breakpoint at index <breakpoint-index>. See also: break.
cmd.clear.label = C&lear Breakpoint
cmd.clear.params = <url-pattern> [<line-number>]
cmd.clear.help = Clears breakpoints in files which match <url-pattern>. If <line-number> is provided, only breakpoints at that line will be cleared.
cmd.clear-all.label = &Clear All Breakpoints
cmd.clear-all.label = Clear &All Breakpoints
cmd.clear-all.help = Clears every breakpoint currently defined.
cmd.clear-break.label = &Clear Breakpoint(s)
cmd.clear-break.params = <break-wrapper> [<...>]
cmd.clear-break.help = Clear the breakpoint wrapped by <break-wrapper>. If <break-wrapper> is a future breakpoint object, all child breakpoints will be cleared, but the future breakpoint will remain.
cmd.clear-fbreak.label = Clear &Future Breakpoint(s)
cmd.clear-fbreak.params = <break-wrapper> [<...>]
cmd.clear-fbreak.help = Clear the future breakpoint wrapped by <break-wrapper>. If <break-wrapper> is a breakpoint instance object, the instance's parent future breakpoint will be cleared, but the instance will remain. If the instance has no parent future breakpoint, the wrapper will be ignored.
cmd.clear-profile.label = C&lear Profile Data
cmd.clear-profile.help = Zeros out any existing profile data.
cmd.clear-script.label = &Clear Script Breakpoints
cmd.clear-script.params = <script-rec> [<...>]
cmd.clear-script.help = Clear all breakpoints in <script-rec>.
cmd.clear-script.label = &Clear Script Breakpoint(s)
cmd.clear-script.params = <script-wrapper> [<...>]
cmd.clear-script.help = Clear all breakpoints in the script wrapped by <script-wrapper>.
cmd.close.label = &Close
cmd.close.key = accel W
@ -296,19 +440,39 @@ cmd.cont.label = &Continue
cmd.cont.key = VK_F5
cmd.cont.help = Continue execution of the debug target.
cmd.debug-script.label = Don't &Debug
cmd.debug-script.params = <toggle> <script-wrapper> [<...>]
cmd.debug-script.help = Enable or disable debugging in the script wrapper <script-wrapper>. While debugging is disabled, Venkman will *not* stop in the disabled scripts. The value of <toggle> can be |true|, |on|, |yes|, or |1| to turn the flag on; |false|, |off|, |no|, or |0| to turn it off; or |toggle| to invert the current state.
cmd.debug-instance-on.label = &Don't Debug Contained Functions
cmd.debug-instance-on.params = <script-instance> [<...>]
cmd.debug-instance-on.help = Disable debugging in all functions contained by the script instance <script-instance>.
cmd.debug-instance-off.label = D&ebug Contained Functions
cmd.debug-instance-off.params = <script-instance> [<...>]
cmd.debug-instance-off.help = Enable debugging in all functions contained by the script instance <script-instance>.
cmd.debug-instance.label = &Toggle Debugging Contained Functions
cmd.debug-instance.params = <toggle> <script-instance> [<...>]
cmd.debug-instance.help = Enable or disable debugging in all functions contained by the script instance <script-instance>. While debugging is disabled, Venkman will *not* stop in the disabled scripts. The value of <toggle> can be |true|, |on|, |yes|, or |1| to turn the flag on; |false|, |off|, |no|, or |0| to turn it off; or |toggle| to invert the current state. If <toggle> is not provided, the current state will be displayed.
cmd.debug-transient.label = Don't Debug Eval/Ti&meouts
cmd.debug-transient.params = <toggle> <url> [<...>]
cmd.debug-transient.help = Enable or disable debugging of transient scripts (like setTimeout() or eval()) associated with the url <url>. The value of <toggle> can be |true|, |on|, |yes|, or |1| to turn the flag on; |false|, |off|, |no|, or |0| to turn it off; or |toggle| to invert the current state.
cmd.dumpprofile.label = Dump Profile Data
cmd.dumpprofile.params = [<file-name>]
cmd.dumptree.params = <tree> [<depth>]
cmd.emode.params = [<mode>]
cmd.emode.help = Sets what action the debugger should take when an error occurs in the debug target. ``emode ignore'' ignores all errors, ``emode trace'' shows a log of the error in the console, and ``emode break'' stops excecution when an error is thrown. ``emode'' without any parameter will display the current error mode. Note that ``emode'' controls what happens whan an exception goes uncaught, to control what happens when an exception is *thrown*, use ``tmode''.
cmd.emode.help = Sets what action the debugger should take when an error occurs in the debug target. |emode ignore| ignores all errors, |emode trace| shows a log of the error in the console, and |emode break| stops excecution when an error is thrown. |emode| without any parameter will display the current error mode. Note that |emode| controls what happens whan an exception goes uncaught, to control what happens when an exception is *thrown*, use |tmode|.
cmd.eval.params = <script-text>
cmd.eval.help = Evaluates <script-text> in the scope of the debug target's current frame. See also: frame, where, props, and evald.
cmd.eval.help = Evaluates <script-text> in the scope of the debug target's current frame. See also: |frame|, |where|, |props|, and |evald|.
cmd.evald.params = <script-text>
cmd.evald.help = Evaluates <script-text> in the debugger's scope. See also: eval.
cmd.evald.help = Evaluates <script-text> in the debugger's scope. See also: |eval|.
cmd.em-break.label = Stop for E&rrors
cmd.em-cycle.label = Cycle Error Mode
@ -317,12 +481,23 @@ cmd.em-ignore.label = Ig&nore Errors
cmd.em-trace.label = Tr&ace Errors
cmd.fbreak.label = Set &Future Breakpoint
cmd.fbreak.params = [<file-name> <line-number>]
cmd.fbreak.help = Sets a ``future'' breakpoint. Any time a script whose file name matches <file-name> is loaded, a breakpoint a <line-number> is set. Setting a breakpoint at line 1 will cause the debugger to break when the script is loaded. fbreak with no parameters will list all future breakponts. See also: break
cmd.fbreak.params = [<url-pattern> <line-number>]
cmd.fbreak.help = Sets a ``future'' breakpoint. Any time a script whose file name matches <url-pattern> is loaded, a breakpoint a <line-number> is set. Setting a breakpoint at line 1 will cause the debugger to break when the script is loaded. fbreak with no parameters will list all future breakponts. This command is the same as |set-fbreak|, except the parameters are optional. See also: |break|.
cmd.set-fbreak.label = Set &Future Breakpoint
cmd.set-fbreak.params = <url-pattern> <line-number>
cmd.set-fbreak.help = Sets a ``future'' breakpoint. Any time a script whose file name matches <url-pattern> is loaded, a breakpoint a <line-number> is set. Setting a breakpoint at line 1 will cause the debugger to break when the script is loaded. This command is the same as |fbreak|, except the parameters are not optional. See also: |break|.
cmd.fclear.label = Clear F&uture Breakpoint
cmd.fclear.params = <url-pattern> [<line-number>]
cmd.fclear.help = Clears the future breakpoint(s) set for <url-pattern>. If <line-number> is specified, only future breakpoints at that line are cleared.
cmd.fclear-all.label = Clear All Fu&ture Breakpoints
cmd.fclear-all.help = Clears all future breakpoints currently defined.
cmd.find-bp.label = Find &Breakpoint
cmd.find-bp.params = <breakpoint-rec>
cmd.find-bp.help = Focus the breakpoint specified by the BreakpointRecord <breakpoint-rec>
cmd.find-bp.params = <breakpoint>
cmd.find-bp.help = Focus the breakpoint specified by the Breakpoint object <breakpoint>.
cmd.find-creator.label = Find &Creator
cmd.find-creator.params = <jsd-value>
@ -337,25 +512,31 @@ cmd.find-file.key = accel O
cmd.find-file.params = [<file-name>]
cmd.find-file.help = Displays the contents of the file located at <file-name> in the script view, where <file-name> is an operating system specific path string. If <file-name> is not provided, or is the character '?', a file chooser widget will be displayed.
cmd.find-url-soft.label = &Soft Focus URL
cmd.find-url-soft.params = <url> <line-number>
cmd.find-url-soft.help = Displays the contents of the URL <url> in the source view. If <line-number> is not already in the center two thirds of the source view, the view is not scrolled, otherwise, the view is scrolled so that <line-number> is two lines from the top of the view.
cmd.open-url.help = Prompts the user for a url to load in the source view.
cmd.open-url.label = Open Web &Location...
cmd.open-url.key = accel shift L
cmd.find-url.label = Find &URL
cmd.find-url.params = <url> [<range-start> [<range-end>]]
cmd.find-url.help = Displays the contents of the URL <url> in the source view. If <range-start> is provided, the source will be scrolled to that line. If <range-end> is also provided, all of the text between <range-start> and <range-end> will be highlighted.
cmd.find-frame.label = Find &Frame Source
cmd.find-frame.params = <frame-rec>
cmd.find-frame.help = Focus the stack frame specified by the frame record <frame-rec>.
cmd.find-frame.params = <frame-index>
cmd.find-frame.help = Focus the stack frame specified by the frame at index <frame-index>.
cmd.find-script.label = Find F&unction
cmd.find-script.params = <script-rec>
cmd.find-script.help = Focus the stack script specified by the ScriptRecord <script-rec>.
cmd.find-script.params = <script-wrapper> [<target-pc>]
cmd.find-script.help = Focus the script wrapped by <script-wrapper>. If <target-pc> is provided, the view will be scrolled to display the associated line.
cmd.find-sourcetext.params = <source-text> [<range-start> [<range-end> [<details> [<target-line>]]]]
cmd.find-sourcetext.help = Displays the source text object <sourceText>. All of the text between <range-start> and <range-end> will be highlighted. If <details> is provided, it will be an object representing details about where the <source-text> object was derived from. If <target-line> is provided, the view will be scrolled to that line, otherwise the view will be scrolled to <range-start>.
cmd.find-sourcetext-soft.params = <source-text> [<range-start> [<range-end> [<details> [<target-line>]]]]
cmd.find-sourcetext-soft.help = Functions the same as |find-sourcetext|, except the view is not scrolled if <target-line> is already visible.
cmd.find-scriptinstance.label = &Find Script Instance
cmd.find-scriptinstance.params = <script-instance> [<range-start> [<range-end> [<details> [<target-line>]]]]
cmd.find-scriptinstance.help = Displays the source text associated with the script instance <script-instance>. All of the text between <range-start> and <range-end> will be highlighted. If <details> is provided, it will be an object representing details about where the <url> object was derived from. If <target-line> is provided, the view will be scrolled to that line, otherwise the view will be scrolled to <range-start>.
cmd.find-url.label = &Find URL
cmd.find-url.params = <url> [<range-start> [<range-end> [<details> [<target-line>]]]]
cmd.find-url.help = Displays the contents of the URL <url> in the source view. All of the text between <range-start> and <range-end> will be highlighted. If <details> is provided, it will be an object representing details about where the <url> object was derived from. If <target-line> is provided, the view will be scrolled to that line, otherwise the view will be scrolled to <range-start>.
cmd.find-url-soft.label = &Soft Focus URL
cmd.find-url-soft.params = <url> [<range-start> [<range-end> [<details> [<target-line>]]]]
cmd.find-url-soft.help = Functions the same as |find-sourcetext|, except the view is not scrolled if <target-line> is already visible.
cmd.finish.label = S&tep Out
cmd.finish.key = shift VK_F11
@ -368,12 +549,19 @@ cmd.frame.label = Set &Current Frame
cmd.frame.params = [<frame-index>]
cmd.frame.help = Sets the current frame to the one numbered <frame-index>, and displays a summary of the frame. If <frame-index> is not provided, a summary of the current frame will be displayed. Use the where command to list available frames and frame numbers.
cmd.help.label = &Command Reference
cmd.help.params = [<pattern>]
cmd.help.help = Displays help on <pattern>, which can be a full command name, or the first few characters of the command name. If <pattern> matches more than one command, help on all matching commands will be displayed. If <pattern> is not provided, a complete command reference will be loaded in the source view.
cmd.help.help = Displays help on <pattern>, which can be a full command name, or the first few characters of the command name. If <pattern> matches more than one command, help on all matching commands will be displayed. If <pattern> is not provided, a command reference will be loaded in a browser window.
cmd.loadd.label = Load Script in Debugger Scope
cmd.loadd.params = <url>
cmd.loadd.help = Executes the contents of the url specified by <url> in the context of the debugger. Useful for loading debugger plugins. See also: The ``initialScripts'' pref.
cmd.loadd.help = Executes the contents of the url specified by <url> in the context of the debugger. Useful for loading debugger plugins. See also: The |initialScripts| pref.
cmd.move-view.params = <view-id> <location-url>
cmd.move-view.help = Moves the view associated with <view-id> to the location specified by <location-url>.
cmd.mozilla-help.label = &Help Contents
cmd.mozilla-help.help = Display the table of contents for the Mozilla help system.
cmd.next.label = Step &Over
cmd.next.key = VK_F10
@ -382,49 +570,94 @@ cmd.next.help = Executes the next line of script. If a function call is encoun
cmd.open-dialog.params = <url> [<window-name> [<window-flags>]]
cmd.open-dialog.help = Opens a dialog window and loads the source from <url>. This is typically used to open a new XUL window, though it can be used to load a web page without chrome.
cmd.pprint.label = &Pretty Print
cmd.pprint.key = accel P
cmd.pprint.help = Toggle Pretty Print mode.
cmd.open-url.help = Prompts the user for a url to load in the source view.
cmd.open-url.label = Open Web &Location...
cmd.open-url.key = accel shift L
cmd.pprint.params = [<toggle>]
cmd.pprint.help = Set or display the state of Pretty Print mode. The value of <toggle> can be |true|, |on|, |yes|, or |1| to turn the flag on; |false|, |off|, |no|, or |0| to turn it off; or |toggle| to invert the current state. If <toggle> is not provided, the current state will be displayed.
cmd.pref.params = [<pref-name> [<pref-value>]]
cmd.pref.help = Sets the value of the preference named <pref-name> to the value of <pref-value>. If <pref-value> is not provided, the current value of <pref-name> will be displayed. If both <pref-name> and <pref-value> are omitted, all preferences will be displayed.
cmd.profile.params = [<toggle>]
cmd.profile.help = Enables or disables the collection of profile data. If <toggle> is not provided, the current state is displayed.
cmd.profile.help = Enables or disables the collection of profile data. The value of <toggle> can be |true|, |on|, |yes|, or |1| to turn the flag on; |false|, |off|, |no|, or |0| to turn it off; or |toggle| to invert the current state. If <toggle> is not provided, the current state will be displayed.
cmd.profile-script.label = Don't &Profile
cmd.profile-script.params = <toggle> <script-wrapper> [<...>]
cmd.profile-script.help = Enable or disable profiling the script <script-wrapper>. While profiling is disabled, data will be discarded. The value of <toggle> can be |true|, |on|, |yes|, or |1| to turn the flag on; |false|, |off|, |no|, or |0| to turn it off; or |toggle| to invert the current state. If <toggle> is not provided, the current state will be displayed.
cmd.profile-instance.label = Toggle Profilin&g Contained Functions
cmd.profile-instance.params = <toggle> <script-instance> [<...>]
cmd.profile-instance.help = Enable or disable profiling in all functions contained by the script instance <script-instance>. While profiling is disabled, data will be discarded. The value of <toggle> can be |true|, |on|, |yes|, or |1| to turn the flag on; |false|, |off|, |no|, or |0| to turn it off; or |toggle| to invert the current state. If <toggle> is not provided, the current state will be displayed.
cmd.profile-instance-on.label = Don't &Profile Contained Functions
cmd.profile-instance-on.params = <script-instance> [<...>]
cmd.profile-instance-on.help = Disable profiling in all functions contained by the script instance <script-instance>.
cmd.profile-instance-off.label = Profile &Contained Functions
cmd.profile-instance-off.params = <script-instance> [<...>]
cmd.profile-instance-off.help = Enable profiling in all functions contained by the script instance <script-instance>.
cmd.toggle-profile.label = &Collect Profile Data
cmd.profile-tb.label = Profile
cmd.props.params = <script-text>
cmd.props.help = Lists the properties of the value returned by <script-text>. The expression is evaluated in the scope of the debug target's current frame. See also: where, frame, eval, and propsd.
cmd.props.help = Lists the properties of the value returned by <script-text>. The expression is evaluated in the scope of the debug target's current frame. See also: |where|, |frame|, |eval|, and |propsd|.
cmd.propsd.params = <script-text>
cmd.propsd.help = Lists the properties of the value returned by <script-text>. The expression is evaluated in the debugger's scope. See also: props.
cmd.propsd.help = Lists the properties of the value returned by <script-text>. The expression is evaluated in the debugger's scope. See also: |props|.
cmd.quit.label = &Quit
cmd.quit.key = accel Q
cmd.quit.help = Quit Mozilla.
cmd.reload.label = &Reload Source
cmd.reload.key = accel R
cmd.reload.help = Reload the currently dsplayed source.
cmd.reload-source-tab.label = &Reload Source
cmd.reload-source-tab.params = [<index>]
cmd.reload-source-tab.key = accel R
cmd.reload-source-tab.help = Reload the source in the tab located at the index specified by <index>. If <index> is not provided, the current tab will be reloaded.
cmd.release-notes.label = &Release Notes
cmd.release-notes.help = Display the Mozilla release notes.
cmd.close-source-tab.label = &Close Tab
cmd.close-source-tab.params = [<index>]
cmd.close-source-tab.help = Close the tab located at the index specified by <index>. If <index> is not provided, the current tab will be closed.
cmd.restore-layout.params = [<name>]
cmd.restore-layout.help = Restores the view layout named <name>. If <name> is not provided, the list of available layouts will be displayed. The special name |factory| can be used to restore a default layout.
cmd.reloadui.key = accel alt R
cmd.save-source.label = &Save Source View As...
cmd.save-source.params = [<target-file>]
cmd.save-source.key = accel S
cmd.save-source.help = Saves the contents of the source view to a file on the local system. If <target-file> is not provided, or is the character '?', a file chooser widget will be displayed. <target-file> is an operating system specific path string.
cmd.save-default-layout.label = &Save Default Layout Now
cmd.save-layout.params = [<name>]
cmd.save-layout.help = Saves the current window layout, giving it the name <name>. The layout can be restored later with the |restore-layout| command. If <name> is not provided, the list of available layouts will be displayed. Save to the name ``default'' to set the default layout Venkman restores on startup. The ``factory'' layout cannot be overwritten.
cmd.save-source-tab.label = &Save Source As...
cmd.save-source-tab.params = [<index> [<target-file>]]
cmd.save-source-tab.key = accel S
cmd.save-source-tab.help = Saves the contents of the source file displayed in the tab at the position specified by <index> to a file on the local system. If <index> is not provided, the current tab is saved. If <target-file> is not provided, or is the character '?', a file chooser widget will be displayed. <target-file> is an operating system specific path string.
cmd.save-profile.label = Save P&rofile Data As...
cmd.save-profile.params = [<target-file> [<url> [<...>]]
cmd.save-profile.help = Saves the profile data collected for one or more source files specified by <url> into the file at <target-file>. If <target-file> is not provided, or is the character '?', a file chooser widget will be displayed. If <url> is not provided, all profile data is saved. <target-file> is an operating system specific path string, <url> is a complete url.
cmd.session-css.params = [<css>]
cmd.session-css.help = Sets the current CSS file used to style the Interactive Session. The value of <css> can be the text "default", "dark", or "light" OR a url to the CSS file to use. The "default" css uses your browser defaults as foreground and background colors, "dark" is dark background in light text, and "light" is light background with dark text. If <css> is not provided, the current value is printed.
cmd.session-css-default.label = &Browser Defaults
cmd.session-css-dark.label = &Dark Background/Light Text
cmd.session-css-light.label = &Light Background/Dark Text
cmd.scope.help = Lists the properties of the topmost object in the scope chain for the current frame.
cmd.startup-init.label = Initialize at &Startup
cmd.startup-init.params = [<toggle>]
cmd.startup-init.help = Sets the state of the "Initialize at Startup" feature. With this feature enabled, the debugger will begin tracking scripts when the browser is first started, instead of waiting until the user interface is launched. This will allow the script list to display files that were loaded before you started the debugger user interface. This feature incurrs a *slight* performance hit, and so it is off by default. The value of <toggle> can be "true", "on", "yes", or "1" to turn the flag on; "false", "off", "no", or "0" to turn it off; or "toggle" to invert the current state. If <toggle> is not provided, the current state will be displayed.
cmd.startup-init.help = Sets the state of the "Initialize at Startup" feature. With this feature enabled, the debugger will begin tracking scripts when the browser is first started, instead of waiting until the user interface is launched. This will allow the script list to display files that were loaded before you started the debugger user interface. This feature incurrs a *slight* performance hit, and so it is off by default. The value of <toggle> can be |true|, |on|, |yes|, or |1| to turn the flag on; |false|, |off|, |no|, or |0| to turn it off; or |toggle| to invert the current state. If <toggle> is not provided, the current state will be displayed.
cmd.source-coloring.label = Colori&ze Source
cmd.source-coloring.params = [<toggle>]
cmd.source-coloring.help = Enables or disables the source code coloring feature in the Source Code view. When working with large files, or on a slow machine, source coloring may take too long to be practical. Turning off source coloring will make files load much faster. You will need to reload the source code to see the effect of changing this setting. If <toggle> is not provided, the current state will be displayed.
cmd.stop.label = Sto&p
cmd.stop.key = VK_F4
@ -441,7 +674,7 @@ cmd.testargs1.params = <int> [<...>]
cmd.testargs1.help = Function for testing argument parsing. Pass it what it wants, and it'll spit out the event object to stdout.
cmd.tmode.params = [<mode>]
cmd.tmode.help = Sets what action the debugger should take when an exception is thrown from the debug target. ``tmode ignore'' ignores all exceptions, ``tmode trace'' shows a log of the exception to the console, and ``tmode break'' stops excecution when an exception is thrown. ``tmode'' without any parameter will display the current throw mode. Note that ``tmode'' controls what happens whan an exception is *thrown*, to control what happens when an exception reaches the top level and becomes an error, use ``emode''. The key combination Control + T can be used to cycle the throw mode.
cmd.tmode.help = Sets what action the debugger should take when an exception is thrown from the debug target. |tmode ignore| ignores all exceptions, |tmode trace| shows a log of the exception to the console, and |tmode break| stops excecution when an exception is thrown. |tmode| without any parameter will display the current throw mode. Note that |tmode| controls what happens whan an exception is *thrown*, to control what happens when an exception reaches the top level and becomes an error, use |emode|. The key combination Control + T can be used to cycle the throw mode.
cmd.tm-break.label = Stop for &Exceptions
cmd.tm-cycle.label = Cycle Exception Mode
@ -449,6 +682,47 @@ cmd.tm-cycle.key = accel T
cmd.tm-ignore.label = I&gnore Exceptions
cmd.tm-trace.label = T&race Exceptions
cmd.toggle-float.params = <view-id>
cmd.toggle-float.help = If the view specified by <view-id> is currently displayed in the main window, or is not visible, it will be placed in a new floating window. If <view-id> is already in a floating window, it will be placed back in the main window.
cmd.version.help = Display version information.
cmd.where.help = Displays a summarized list of stack frames in the current call chain.
cmd.toggle-pprint.label = &Pretty Print
cmd.toggle-pprint.key = accel P
cmd.toggle-pprint.help = Toggle Pretty Print mode.
cmd.toggle-save-layout.label = Save Default Layout On &Exit
cmd.toggle-save-layout.help = If set, the window layout will be saved before Venkman exits.
cmd.toggle-view.params = <view-id>
cmd.toggle-view.help = If the view specified by <view-id> is currently displayed, it will be hidden. Otherwise the view will be displayed in its last known location.
cmd.toggle-chrome.label = E&xclude Browser Files
cmd.toggle-profile.label = &Collect Profile Data
cmd.toggle-breaks.label = &Breakpoints
cmd.toggle-stack.label = &Call Stack
cmd.toggle-session.label = &Interactive Session
cmd.toggle-locals.label = &Local Variables
cmd.toggle-scripts.label = Loaded S&cripts
cmd.toggle-windows.label = &Open Windows
cmd.toggle-source.label = Source Code (old)
cmd.toggle-source2.label = So&urce Code (new)
cmd.toggle-watches.label = &Watches
cmd.version.label = About &Venkman
cmd.version.help = Display version information.
cmd.remove-watch.label = &Remove Watch(es)
cmd.remove-watch.params = <index> [<...>]
cmd.remove-watch.help = Removes the watch(es) at the 0 based index specified by <index>.
cmd.watch-expr.params = [<expression>]
cmd.watch-expr.help = Evaluates <expression> in the debug target scope and adds the result to the watch window. If <expression> is not provided, all watches are printed to the console.
cmd.watch-exprd.params = [<expression>]
cmd.watch-exprd.help = Evaluates <expression> in the debugger scope and adds the result to the watch window. If <expression> is not provided, all watches are printed to the console.
cmd.watch-property.params = <jsd-value> <property-name>
cmd.watch-property.help = Adds the property named <property-name> of the object stored in <jsd-value> to the watch window.
cmd.where.label = Dump &Stack to Interactive Session
cmd.where.help = Displays a summarized list of stack frames in the current call chain.

Двоичные данные
extensions/venkman/resources/skin/images/arrow-down.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 318 B

Двоичные данные
extensions/venkman/resources/skin/images/arrow-left.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 319 B

Двоичные данные
extensions/venkman/resources/skin/images/arrow-right.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 324 B

Двоичные данные
extensions/venkman/resources/skin/images/arrow-up.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 319 B

Двоичные данные
extensions/venkman/resources/skin/images/breakpoint-future.gif Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 82 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 204 B

После

Ширина:  |  Высота:  |  Размер: 204 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 306 B

После

Ширина:  |  Высота:  |  Размер: 306 B

Двоичные данные
extensions/venkman/resources/skin/images/clear.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 283 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 422 B

После

Ширина:  |  Высота:  |  Размер: 422 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 400 B

Двоичный файл не отображается.

До

Ширина:  |  Высота:  |  Размер: 236 B

Двоичные данные
extensions/venkman/resources/skin/images/shaded.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 160 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 492 B

После

Ширина:  |  Высота:  |  Размер: 492 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 406 B

После

Ширина:  |  Высота:  |  Размер: 406 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 362 B

После

Ширина:  |  Высота:  |  Размер: 362 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 381 B

После

Ширина:  |  Высота:  |  Размер: 381 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 358 B

После

Ширина:  |  Высота:  |  Размер: 358 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 321 B

После

Ширина:  |  Высота:  |  Размер: 321 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 445 B

После

Ширина:  |  Высота:  |  Размер: 445 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 356 B

После

Ширина:  |  Высота:  |  Размер: 356 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 341 B

После

Ширина:  |  Высота:  |  Размер: 341 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 390 B

После

Ширина:  |  Высота:  |  Размер: 390 B

Двоичные данные
extensions/venkman/resources/skin/images/view-close-button.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 175 B

Двоичные данные
extensions/venkman/resources/skin/images/view-pop-button.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 297 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 239 B

После

Ширина:  |  Высота:  |  Размер: 239 B

Просмотреть файл

До

Ширина:  |  Высота:  |  Размер: 516 B

После

Ширина:  |  Высота:  |  Размер: 516 B

Просмотреть файл

@ -0,0 +1,119 @@
/* -*- tab-width: 4; indent-tabs-mode: nil -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The JavaScript Debugger
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
body {
background: #dddcf4;
}
body[hasSearched="true"] .newbie-help {
display: none;
}
.quick-searches,
.search-input {
display: block;
width: 100%;
text-align: center;
}
a {
font-weight: bold;
color: darkslategrey;
}
a:visited {
color: #444444;
}
#command-list a {
text-decoration: none;
}
#command-list a:hover {
text-decoration: underline;
}
#match-count {
color: darkslategrey;
width: 100%;
display: block;
font-size: larger;
font-weight: bold;
padding-top: 20px;
padding-bottom: 20px;
text-align: center;
}
#help-menu {
background: lightgrey;
padding: 5px;
border: 2px black solid;
}
.value[item="description"] {
margin-left: 15px;
display: block;
}
.value[item="command-name"],
.value[item="usage"] {
font-family: monospace;
}
.command {
padding: 10px;
background: white;
display: block;
border: 2px silver inset;
}
.command-name,
.param {
font-family: monospace;
font-weight: bold;
}
.label {
font-weight: bold;
color: #666666;
font-variant: small-caps;
}
.goto-top {
display: block;
width: 100%;
text-align: right;
}

Просмотреть файл

@ -0,0 +1,92 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The JavaScript Debugger
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
@import url(chrome://venkman/content/venkman-output-base.css);
body {
background: black;
color: lightgrey;
}
a.venkman-link {
color: #7083ff;
}
a.venkman-link:visited {
color: #4b57aa;
}
.msg-data[msg-type="ERROR"] {
background: darkred;
color: white;
}
.msg-data:before {
color: yellow;
}
.msg-data[msg-type="ERROR"]:before {
color: orange;
}
.msg-data[msg-type="ERROR"] a.venkman-link {
color: white;
font-weight: bold;
}
.msg-data[msg-type="STOP"]:before {
color: pink;
}
.msg-data[msg-type="STOP"] {
color: red;
}
.msg-data[msg-type="CONT"]:before {
color: lightgreen;
}
.msg-data[msg-type="CONT"] {
color: green;
}
.msg-data[msg-type="ETRACE"]:before {
color: brown;
}
.msg-data[msg-type="FEVAL-IN"]:before,
.msg-data[msg-type="FEVAL-OUT"]:before {
color: orange;
}

Просмотреть файл

@ -1,78 +1,41 @@
body {
background: black;
color: lightgrey;
}
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The JavaScript Debugger
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
body[mode="inverse"] {
background: white;
color: black;
}
@import url(chrome://venkman/content/venkman-output-base.css);
/* links */
a.venkman-link {
color: #7083ff;
text-decoration: none;
}
.msg-data[msg-type="ERROR"] a.venkman-link {
color: white;
font-weight: bold;
}
/* link hover effect */
a.venkman-link:hover {
text-decoration: underline;
}
#output-table {
width: 100%;
}
.spacer-node { /* this image is inserted between the */
border: none; /* characters in long words, in order to */
height: 0px; /* break them up to allow word wrapping */
width: 0px;
}
.msg { /* .msg = a single message in the */
width: 100%; /* output window */
font-size: 10pt;
font-family: monospace;
white-space: -moz-pre-wrap;
}
.msg-data:before {
content: "-";
font-weight: bold;
color: yellow;
margin-right: 5px;
}
.msg-data[msg-type="STOP"]:before {
content: "*";
color: pink;
}
.msg-data[msg-type="STOP"] {
color: red;
}
.msg-data[msg-type="CONT"]:before {
content: "*";
color: lightgreen;
}
.msg-data[msg-type="CONT"] {
color: green;
}
.msg-data[msg-type="ETRACE"]:before {
content: "X";
color: brown;
}
.msg-data[msg-type="ERROR"]:before {
content: "!!";
color: orange;
}
@ -81,46 +44,7 @@ a.venkman-link:hover {
color: white;
}
.msg-data[msg-type="HELP"]:before {
content: "Help:";
}
.msg-data[msg-type="USAGE"]:before {
font-style: normal;
content: "Usage:";
}
.msg-data[msg-type="SOURCE"]:before {
content: ":";
}
.msg-data[msg-type="STEP"]:before {
content: "|";
}
.msg-data[msg-type="USAGE"] {
.msg-data[msg-type="ERROR"] a.venkman-link {
color: white;
font-weight: bold;
font-style: italic;
}
.msg-data[msg-type="EVAL-IN"]:before {
font-weight: normal;
content: "<";
}
.msg-data[msg-type="EVAL-OUT"]:before {
font-weight: normal;
content: ">";
}
.msg-data[msg-type="FEVAL-IN"]:before {
font-weight: normal;
color: orange;
content: "<";
}
.msg-data[msg-type="FEVAL-OUT"]:before {
font-weight: normal;
color: orange;
content: ">";
}

Просмотреть файл

@ -0,0 +1,98 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The JavaScript Debugger
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
@import url(chrome://venkman/content/venkman-output-base.css);
body {
background: white;
color: black;
}
a.venkman-link {
font-weight: bold;
color: #4b57aa;
}
a.venkman-link:visited {
font-weight: bold;
color: #2d3566;
}
.msg-data[msg-type="ERROR"] {
background: darkred;
font-weight: bold;
color: white;
}
.msg-data:before {
font-weight: bold;
color: #632117;
}
.msg-data[msg-type="ERROR"]:before {
color: orange;
}
.msg-data[msg-type="ERROR"] a.venkman-link {
font-weight: bold;
color: white;
}
.msg-data[msg-type="STOP"]:before {
color: darkred;
}
.msg-data[msg-type="STOP"] {
font-weight: bold;
color: red;
}
.msg-data[msg-type="CONT"]:before {
color: darkgreen;
}
.msg-data[msg-type="CONT"] {
color: green;
font-weight: bold;
}
.msg-data[msg-type="ETRACE"]:before {
color: brown;
}
.msg-data[msg-type="FEVAL-IN"]:before,
.msg-data[msg-type="FEVAL-OUT"]:before {
color: orange;
}

Просмотреть файл

@ -0,0 +1,119 @@
/* -*- tab-width: 4; indent-tabs-mode: nil -*-
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is The JavaScript Debugger
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation
* Portions created by Netscape are
* Copyright (C) 1998 Netscape Communications Corporation.
*
* Alternatively, the contents of this file may be used under the
* terms of the GNU Public License (the "GPL"), in which case the
* provisions of the GPL are applicable instead of those above.
* If you wish to allow use of your version of this file only
* under the terms of the GPL and not to allow others to use your
* version of this file under the MPL, indicate your decision by
* deleting the provisions above and replace them with the notice
* and other provisions required by the GPL. If you do not delete
* the provisions above, a recipient may use your version of this
* file under either the MPL or the GPL.
*
* Contributor(s):
* Robert Ginda, <rginda@netscape.com>, original author
*
*/
body {
margin: 0px;
padding: 0px;
}
source-listing {
display: block;
width: 100%;
font-family: monospace, sans-serif;
}
line {
width: 100%;
white-space: pre;
display: block;
}
line[highlighted] {
background: #EEEEEE;
}
line[highlighted] > num {
border-right: 2px #919bd6 solid;
background: #d5d5e0;
}
line[stoppedAt] {
background: #ecef34;
}
line[stoppedAt] > num {
font-weight: bold;
border-right: 2px orange solid;
background: #ecef34;
}
margin {
-moz-user-select: none;
font-weight: bold;
background: #CCCCCC;
padding-bottom: 0.5em;
white-space: pre;
cursor: pointer;
}
margin[x="t"] {
color: #444444;
}
margin[x="t"]:hover {
color: slategrey;
}
margin[f="t"] {
background: orange;
color: white;
}
margin[b="t"] {
background: red;
color: white;
}
num {
padding-bottom: 0.5em;
padding-left: 5px;
padding-right: 5px;
margin-right: 10px;
border-left: 1px grey solid;
border-right: 2px #CCCCCC solid;
background: #EEEEEE;
}
k {
font-weight: bold;
}
c {
color: steelblue;
}
t {
color: darkgreen;
}

Просмотреть файл

@ -35,8 +35,21 @@
@import url(chrome://communicator/skin/);
#output-iframe {
margin: 5px 5px 0px 5px;
viewcontainer {
-moz-binding: url(chrome://venkman/content/venkman-bindings.xml#viewcontainer);
}
floatingview {
-moz-binding: url(chrome://venkman/content/venkman-bindings.xml#floatingview);
}
treecol[hideheader="true"] {
-moz-appearance: none;
border: none;
padding: 0px 0px 0px;
}
#session-output-iframe {
border: thin silver inset;
}
@ -46,158 +59,299 @@
}
tree {
min-height: 50px;
margin: 0px 0px 0px 0px;
}
tabpanels {
background: none;
padding: 2px;
}
browser {
border: thin silver inset;
}
#source-tree {
font-family: monospace;
}
#maintoolbar-cont {
#maintoolbar\:cont {
list-style-image: url("chrome://venkman/skin/images/cont.png");
}
#maintoolbar-cont[disabled="true"],
#maintoolbar-cont[disabled="true"]:hover,
#maintoolbar-cont[disabled="true"]:active {
#maintoolbar\:cont[disabled="true"],
#maintoolbar\:cont[disabled="true"]:hover,
#maintoolbar\:cont[disabled="true"]:active {
list-style-image: url("chrome://venkman/skin/images/cont-dis.png");
}
#maintoolbar-cont:hover {
#maintoolbar\:cont:hover {
list-style-image: url("chrome://venkman/skin/images/cont-hov.png");
}
#maintoolbar-cont:active {
#maintoolbar\:cont:active {
list-style-image: url("chrome://venkman/skin/images/cont-act.png");
}
#maintoolbar-stop {
#maintoolbar\:stop {
list-style-image: url("chrome://venkman/skin/images/stop.png");
}
#maintoolbar-stop[willStop="true"] {
#maintoolbar\:stop[willStop="true"] {
list-style-image: url("chrome://venkman/skin/images/stop-checked.png");
}
#maintoolbar-stop[willStop="true"]:hover {
#maintoolbar\:stop[willStop="true"]:hover {
list-style-image: url("chrome://venkman/skin/images/stop-checked-hov.png");
}
#maintoolbar-stop[disabled="true"],
#maintoolbar-stop[disabled="true"]:hover,
#maintoolbar-stop[disabled="true"]:active {
#maintoolbar\:stop[disabled="true"],
#maintoolbar\:stop[disabled="true"]:hover,
#maintoolbar\:stop[disabled="true"]:active {
list-style-image: url("chrome://venkman/skin/images/stop-dis.png");
}
#maintoolbar-stop:hover {
#maintoolbar\:stop:hover {
list-style-image: url("chrome://venkman/skin/images/stop-hov.png");
}
#maintoolbar-stop:active {
#maintoolbar\:stop:active {
list-style-image: url("chrome://venkman/skin/images/stop-act.png");
}
#maintoolbar-step {
#maintoolbar\:step {
list-style-image: url("chrome://venkman/skin/images/step-into.png");
}
#maintoolbar-step[disabled="true"],
#maintoolbar-step[disabled="true"]:hover,
#maintoolbar-button[disabled="true"]:active {
#maintoolbar\:step[disabled="true"],
#maintoolbar\:step[disabled="true"]:hover,
#maintoolbar\:button[disabled="true"]:active {
list-style-image: url("chrome://venkman/skin/images/step-into-dis.png");
}
#maintoolbar-step:hover {
#maintoolbar\:step:hover {
list-style-image: url("chrome://venkman/skin/images/step-into-hov.png");
}
#maintoolbar-step:active {
#maintoolbar\:step:active {
list-style-image: url("chrome://venkman/skin/images/step-into-act.png");
}
#maintoolbar-next {
#maintoolbar\:next {
list-style-image: url("chrome://venkman/skin/images/step-over.png");
}
#maintoolbar-next[disabled="true"],
#maintoolbar-next[disabled="true"]:hover,
#maintoolbar-next[disabled="true"]:active {
#maintoolbar\:next[disabled="true"],
#maintoolbar\:next[disabled="true"]:hover,
#maintoolbar\:next[disabled="true"]:active {
list-style-image: url("chrome://venkman/skin/images/step-over-dis.png");
}
#maintoolbar-next:hover {
#maintoolbar\:next:hover {
list-style-image: url("chrome://venkman/skin/images/step-over-hov.png");
}
#maintoolbar-next:active {
#maintoolbar\:next:active {
list-style-image: url("chrome://venkman/skin/images/step-over-act.png");
}
#maintoolbar-finish {
#maintoolbar\:finish {
list-style-image: url("chrome://venkman/skin/images/step-out.png");
}
#maintoolbar-finish[disabled="true"],
#maintoolbar-finish[disabled="true"]:hover,
#maintoolbar-finish[disabled="true"]:active {
#maintoolbar\:finish[disabled="true"],
#maintoolbar\:finish[disabled="true"]:hover,
#maintoolbar\:finish[disabled="true"]:active {
list-style-image: url("chrome://venkman/skin/images/step-out-dis.png");
}
#maintoolbar-finish:hover {
#maintoolbar\:finish:hover {
list-style-image: url("chrome://venkman/skin/images/step-out-hov.png");
}
#maintoolbar-finish:active {
#maintoolbar\:finish:active {
list-style-image: url("chrome://venkman/skin/images/step-out-act.png");
}
#maintoolbar-profile-tb {
#maintoolbar\:profile-tb {
list-style-image: url("chrome://venkman/skin/images/profile.png");
}
#maintoolbar-profile-tb[profile="true"] {
#maintoolbar\:profile-tb[profile="true"] {
list-style-image: url("chrome://venkman/skin/images/profile-checked.png");
}
#maintoolbar-profile-tb[profile="true"]:hover {
#maintoolbar\:profile-tb[profile="true"]:hover {
list-style-image: url("chrome://venkman/skin/images/profile-checked-hov.png");
}
#maintoolbar-profile-tb:hover {
#maintoolbar\:profile-tb:hover {
list-style-image: url("chrome://venkman/skin/images/profile-hov.png");
}
#maintoolbar-profile-tb:active {
#maintoolbar\:profile-tb:active {
list-style-image: url("chrome://venkman/skin/images/profile-act.png");
}
#maintoolbar-pprint {
#maintoolbar\:toggle-pprint {
list-style-image: url("chrome://venkman/skin/images/prettyprint.png");
}
#maintoolbar-pprint[state="true"] {
#maintoolbar\:toggle-pprint[state="true"] {
list-style-image: url("chrome://venkman/skin/images/prettyprint-checked.png");
}
#maintoolbar-pprint[state="true"]:hover {
#maintoolbar\:toggle-pprint[state="true"]:hover {
list-style-image: url("chrome://venkman/skin/images/prettyprint-checked-hov.png");
}
#maintoolbar-pprint:hover {
#maintoolbar\:toggle-pprint:hover {
list-style-image: url("chrome://venkman/skin/images/prettyprint-hov.png");
}
#maintoolbar-pprint:active {
#maintoolbar\:toggle-pprint:active {
list-style-image: url("chrome://venkman/skin/images/prettyprint-act.png");
}
treechildren:-moz-tree-cell(breakpoint-col) {
.view-container {
-moz-box-orient: horizontal;
/*
border-top: 2px red solid;
border-bottom: 2px black solid;
*/
}
.view-container[type="vertical"] {
-moz-box-orient: vertical;
/*
border-top: none;
border-bottom: none;
border-left: 4px green solid;
border-right: 4px black solid;
*/
}
.view-title-margin-left {
display: none;
}
.view-outer {
margin-bottom: 4px;
}
.view-title-grippy {
background: url(chrome://venkman/skin/images/shaded.png);
border: 1px black solid;
-moz-box-align: center;
font-weight: bold;
font-size: 10px;
color: #333333;
margin-right: 2px;
margin-left: 2px;
}
.view-title-pop {
list-style-image: url("chrome://venkman/skin/images/view-pop-button.png");
margin: 1px;
}
.view-title-close {
list-style-image: url("chrome://venkman/skin/images/view-close-button.png");
margin: 1px;
}
.view-title-pop:hover,
.view-title-close:hover {
border: 1px silver outset;
margin: 0px;
}
/*
.view-title-margin-right {
margin: 3px;
border-top: 2px grey groove;
padding: 2px;
border-bottom: 2px grey groove;
}
.view-title-grippy {
-moz-box-align: center;
font-size: 8pt;
font-variant: small-caps;
}
*/
floatingview {
padding: 4px 4px 4px 4px;
}
floatingview[dragover="left"] {
padding-left: 0px;
border-left: 4px black solid;
}
.view-title-pop[dragover="left"] {
list-style-image: url("chrome://venkman/skin/images/arrow-left.png") !important;
}
floatingview[dragover="up"] {
padding-top: 0px;
border-top: 4px black solid;
}
.view-title-pop[dragover="up"] {
list-style-image: url("chrome://venkman/skin/images/arrow-up.png") !important;
}
floatingview[dragover="right"] {
padding-right: 0px;
border-right: 4px black solid;
}
.view-title-pop[dragover="right"] {
list-style-image: url("chrome://venkman/skin/images/arrow-right.png") !important;
}
floatingview[dragover="down"] {
padding-bottom: 0px;
border-bottom: 4px black solid;
}
.view-title-pop[dragover="down"] {
list-style-image: url("chrome://venkman/skin/images/arrow-down.png") !important;
}
/*
.view-title-pop[parentid="locals"],
.view-title-pop[parentid="scripts"],
.view-title-pop[parentid="source"],
.view-title-pop[parentid="watch"] {
list-style-image: url("chrome://venkman/skin/images/XXX.png");
}
*/
/*
.view-title-pop[parentid="stack"] {
list-style-image: url("chrome://venkman/skin/images/stack.png");
}
.view-title-pop[parentid="windows"] {
list-style-image: url("chrome://venkman/skin/images/windows.png");
}
.view-title-pop[parentid="breaks"] {
list-style-image: url("chrome://venkman/skin/images/breakpoints.png");
}
*/
treechildren:-moz-tree-cell(source\:col-0) {
background: #CCCCCC;
border-right: 1px grey solid;
}
treechildren:-moz-tree-cell(source-line-number) {
treechildren:-moz-tree-cell(source\:col-1) {
border-right: 2px #CCCCCC solid;
text-align: right;
background: #EEEEEE;
@ -207,176 +361,177 @@ treechildren:-moz-tree-row(current-line, selected) {
background: green !important;
}
treechildren:-moz-tree-cell(source-line-number, highlight-start),
treechildren:-moz-tree-cell(source-line-number, highlight-range),
treechildren:-moz-tree-cell(source-line-number, highlight-end) {
treechildren:-moz-tree-cell(source\:col-1, highlight-start),
treechildren:-moz-tree-cell(source\:col-1, highlight-range),
treechildren:-moz-tree-cell(source\:col-1, highlight-end) {
border-right: 2px #919bd6 solid;
background: #d5d5e0;
}
treechildren:-moz-tree-cell(source-line-text, highlight-start),
treechildren:-moz-tree-cell(source-line-text, highlight-range),
treechildren:-moz-tree-cell(source-line-text, highlight-end) {
treechildren:-moz-tree-cell(source\:col-2, highlight-start),
treechildren:-moz-tree-cell(source\:col-2, highlight-range),
treechildren:-moz-tree-cell(source\:col-2, highlight-end) {
border-left: 1px black solid;
background: #EEEEEE;
}
treechildren:-moz-tree-cell(source-line-text, selected),
treechildren:-moz-tree-cell(source-line-number, selected) {
treechildren:-moz-tree-cell(source\:col-1, selected),
treechildren:-moz-tree-cell(source\:col-2, selected) {
border-left: inherit !important;
background: inherit !important;
}
treechildren:-moz-tree-row {
border: 0px;
}
treechildren:-moz-tree-cell(source-line-number, current-line),
treechildren:-moz-tree-cell(source-line-text, current-line) {
treechildren:-moz-tree-cell(source\:col-1, current-line),
treechildren:-moz-tree-cell(source\:col-2, current-line) {
background: #ecef34;
}
treechildren:-moz-tree-image(breakpoint-col, code) {
#source-tree-body:-moz-tree-row {
border: 0px;
}
treechildren:-moz-tree-image(source\:col-0, code) {
list-style-image: url("chrome://venkman/skin/images/code-line.gif");
}
treechildren:-moz-tree-image(breakpoint-col, code, prettyprint) {
treechildren:-moz-tree-image(source\:col-0, code, prettyprint) {
list-style-image: url("chrome://venkman/skin/images/code-line-dis.gif");
}
treechildren:-moz-tree-image(breakpoint-col, breakpoint) {
list-style-image: url("chrome://venkman/skin/images/breakpoint-line.gif");
treechildren:-moz-tree-image(source\:col-0, future-breakpoint) {
list-style-image: url("chrome://venkman/skin/images/breakpoint-future-line.gif");
}
treechildren:-moz-tree-image(breakpoint-col, future-breakpoint) {
list-style-image: url("chrome://venkman/skin/images/breakpoint-future-line.gif");
treechildren:-moz-tree-image(source\:col-0, breakpoint) {
list-style-image: url("chrome://venkman/skin/images/breakpoint-line.gif");
}
treechildren:-moz-tree-image(current-frame-flag){
list-style-image: url("chrome://venkman/skin/images/current-frame.gif");
}
treechildren:-moz-tree-cell(script-name,fn-guessed) {
color: red;
font-style: italic;
treechildren:-moz-tree-image(windows\:col-0, item-window) {
list-style-image: url("chrome://venkman/skin/images/window.png");
}
treechildren:-moz-tree-image(project-col-0,pj-blacklist){
list-style-image: url("chrome://venkman/skin/images/proj-blacklist.png");
treechildren:-moz-tree-image(windows\:col-0, item-files) {
list-style-image: url("chrome://venkman/skin/images/files.png");
}
treechildren:-moz-tree-image(project-col-0,pj-bl-item){
list-style-image: url("chrome://venkman/skin/images/proj-bl-item.png");
}
treechildren:-moz-tree-image(project-col-0,pj-windows){
list-style-image: url("chrome://venkman/skin/images/proj-windows.png");
}
treechildren:-moz-tree-image(project-col-0,pj-window){
list-style-image: url("chrome://venkman/skin/images/proj-window.png");
}
treechildren:-moz-tree-image(project-col-0,pj-files){
list-style-image: url("chrome://venkman/skin/images/proj-files.png");
}
treechildren:-moz-tree-image(project-col-0,pj-file){
treechildren:-moz-tree-image(windows\:col-0, item-file) {
list-style-image: url("chrome://venkman/skin/images/file-js.png");
}
treechildren:-moz-tree-image(project-col-0,pj-breakpoints){
list-style-image: url("chrome://venkman/skin/images/proj-breakpoints.png");
treechildren:-moz-tree-image(breaks\:col-0, future-breakpoint) {
list-style-image: url("chrome://venkman/skin/images/breakpoint-future.gif");
}
treechildren:-moz-tree-image(project-col-0,pj-breakpoint){
list-style-image: url("chrome://venkman/skin/images/proj-breakpoint.png");
treechildren:-moz-tree-image(breaks\:col-0, item-breakpoint) {
list-style-image: url("chrome://venkman/skin/images/breakpoint.png");
}
treechildren:-moz-tree-image(script-name){
treechildren:-moz-tree-image(scripts\:col-0, file-function) {
list-style-image: url("chrome://venkman/skin/images/file-function.png");
}
treechildren:-moz-tree-image(script-name,has-bp){
treechildren:-moz-tree-image(scripts\:col-0, file-function, item-has-bp) {
list-style-image: url("chrome://venkman/skin/images/file-function-bp.png");
}
treechildren:-moz-tree-image(script-name,ft-unk){
treechildren:-moz-tree-cell-text(watches\:col-0, item-error) {
font-weight: bold;
font-style: italic;
color: darkred;
}
treechildren:-moz-tree-cell-text(item-exception) {
font-weight: bold;
color: darkred;
}
treechildren:-moz-tree-cell-text(item-hinted) {
font-weight: bold;
color: #555555;
}
treechildren:-moz-tree-cell-text(item-hinted,selected) {
color: white;
}
treechildren:-moz-tree-image(item-unk) {
list-style-image: url("chrome://venkman/skin/images/file-unknown.png");
}
treechildren:-moz-tree-image(script-name,ft-js){
treechildren:-moz-tree-image(item-js) {
list-style-image: url("chrome://venkman/skin/images/file-js.png");
}
treechildren:-moz-tree-image(script-name,ft-html){
treechildren:-moz-tree-image(item-html) {
list-style-image: url("chrome://venkman/skin/images/file-html.png");
}
treechildren:-moz-tree-image(script-name,ft-xul){
treechildren:-moz-tree-image(item-xul) {
list-style-image: url("chrome://venkman/skin/images/file-xul.png");
}
treechildren:-moz-tree-image(script-name,ft-xml){
treechildren:-moz-tree-image(item-xml) {
list-style-image: url("chrome://venkman/skin/images/file-xml.png");
}
treechildren:-moz-tree-image(script-name,ft-unk,has-bp){
treechildren:-moz-tree-image(item-unk, item-has-bp) {
list-style-image: url("chrome://venkman/skin/images/file-unknown-bp.png");
}
treechildren:-moz-tree-image(script-name,ft-js,has-bp){
treechildren:-moz-tree-image(item-js, item-has-bp) {
list-style-image: url("chrome://venkman/skin/images/file-js-bp.png");
}
treechildren:-moz-tree-image(script-name,ft-html,has-bp){
treechildren:-moz-tree-image(item-html, item-has-bp) {
list-style-image: url("chrome://venkman/skin/images/file-html-bp.png");
}
treechildren:-moz-tree-image(script-name,ft-xul,has-bp){
treechildren:-moz-tree-image(item-xul, item-has-bp) {
list-style-image: url("chrome://venkman/skin/images/file-xul-bp.png");
}
treechildren:-moz-tree-image(script-name,ft-xml,has-bp){
treechildren:-moz-tree-image(item-xml, item-has-bp) {
list-style-image: url("chrome://venkman/skin/images/file-xml-bp.png");
}
treechildren:-moz-tree-image(stack-col-0,w-stack){
list-style-image: url("chrome://venkman/skin/images/watch-stack.png");
treechildren:-moz-tree-image(item-frame) {
/* list-style-image: url("chrome://venkman/skin/images/value-frame.png");*/
list-style-image: url("chrome://venkman/skin/images/clear.png");
}
treechildren:-moz-tree-image(stack-col-0,w-frame){
list-style-image: url("chrome://venkman/skin/images/watch-frame.png");
treechildren:-moz-tree-image(item-void) {
list-style-image: url("chrome://venkman/skin/images/value-void.png");
}
treechildren:-moz-tree-image(stack-col-0,w-void){
list-style-image: url("chrome://venkman/skin/images/watch-void.png");
treechildren:-moz-tree-image(item-null) {
list-style-image: url("chrome://venkman/skin/images/value-null.png");
}
treechildren:-moz-tree-image(stack-col-0,w-null){
list-style-image: url("chrome://venkman/skin/images/watch-null.png");
treechildren:-moz-tree-image(item-bool) {
list-style-image: url("chrome://venkman/skin/images/value-bool.png");
}
treechildren:-moz-tree-image(stack-col-0,w-bool){
list-style-image: url("chrome://venkman/skin/images/watch-bool.png");
treechildren:-moz-tree-image(item-int) {
list-style-image: url("chrome://venkman/skin/images/value-int.png");
}
treechildren:-moz-tree-image(stack-col-0,w-int){
list-style-image: url("chrome://venkman/skin/images/watch-int.png");
treechildren:-moz-tree-image(item-double) {
list-style-image: url("chrome://venkman/skin/images/value-double.png");
}
treechildren:-moz-tree-image(stack-col-0,w-double){
list-style-image: url("chrome://venkman/skin/images/watch-double.png");
treechildren:-moz-tree-image(item-string) {
list-style-image: url("chrome://venkman/skin/images/value-string.png");
}
treechildren:-moz-tree-image(stack-col-0,w-string){
list-style-image: url("chrome://venkman/skin/images/watch-string.png");
treechildren:-moz-tree-image(item-function) {
list-style-image: url("chrome://venkman/skin/images/value-function.png");
}
treechildren:-moz-tree-image(stack-col-0,w-function){
list-style-image: url("chrome://venkman/skin/images/watch-function.png");
}
treechildren:-moz-tree-image(stack-col-0,w-object){
list-style-image: url("chrome://venkman/skin/images/watch-object.png");
treechildren:-moz-tree-image(item-object) {
list-style-image: url("chrome://venkman/skin/images/value-object.png");
}