* Fixes errors in the default string bundle
* Prevents a double-click on a scrollbar from being interpreted as a
double-click on the currently selected item
* Displays the value for Boolean and Number objects in the Local Variables and
Watch views.
* Fixes a problem saving profile data on versions of Mozilla from before Sept. 2002
* Makes breakpoints set as a result of a ``Scan for Meta Comments'' act as
future breakpoints, as well as hard breakpoints, so you don't have to rescan
after reloading.
* Fixes the "Two help menus" problem on the Mac (bug 162285)
This commit is contained in:
rginda%netscape.com 2002-10-25 05:03:43 +00:00
Родитель 07c5bc616b
Коммит e8430867f5
13 изменённых файлов: 119 добавлений и 72 удалений

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

@ -209,12 +209,6 @@ function jsdph_allowport (aPort, aScheme)
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;

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

@ -79,8 +79,11 @@ function mmgr_showpop (event)
*/
function satisfied()
{
if (menuitem.hasAttribute("isSeparator"))
if (menuitem.hasAttribute("isSeparator") ||
!menuitem.hasAttribute("commandname"))
{
return true;
}
if (!("menuManager" in cx))
{

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

@ -441,7 +441,7 @@ function cmdClearBreak (e)
if ("breakWrapperList" in e)
{
for (i = 0; i < e.breakWrapperList.length; ++i)
for (var i = 0; i < e.breakWrapperList.length; ++i)
clear(e.breakWrapperList[i]);
}
else
@ -1608,6 +1608,8 @@ function cmdSetTransientFlag (e)
function cmdStartupInit (e)
{
dd ("startup-init " + e.toggle);
if (e.toggle != null)
{
e.toggle = getToggle (e.toggle, console.jsds.initAtStartup);

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

@ -228,7 +228,8 @@ function jsdExecutionHook (frame, type, rv)
frame.script.fileName == MSG_VAL_CONSOLE ||
!ASSERT(!(frame.script.flags & SCRIPT_NODEBUG),
"Stopped in a script marked as don't debug") ||
!ASSERT(!isURLFiltered(frame.script.fileName),
!ASSERT(isURLVenkman(frame.script.fileName) ||
!isURLFiltered(frame.script.fileName),
"stopped in a filtered URL"))
{
return hookReturn;

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

@ -831,7 +831,7 @@ function con_respondsourcetext (response, sourceText)
else
{
maxDigits = Math.floor(Math.log(sourceLines.length) / Math.LN10) + 1;
dd ("building response {");
dd ("OFF building response {");
response.channel.contentType = "text/xml";
resultSource = "<?xml version='1.0'";
// if ("charset" in sourceText)

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

@ -142,18 +142,6 @@ function initMenus()
]
};
console.menuSpecs["mainmenu:help"] = {
label: MSG_MNU_HELP,
items:
[
["mozilla-help"],
["help"],
["-"],
["version"],
["about-mozilla"]
]
};
console.menuSpecs["mainmenu:profile"] = {
label: MSG_MNU_PROFILE,
items:
@ -166,6 +154,19 @@ function initMenus()
]
};
/* Mac expects a help menu with this ID, and there is nothing we can do
* about it. */
console.menuSpecs["mainmenu:help"] = {
label: MSG_MNU_HELP,
domID: "menu_Help",
items:
[
["version"],
["-"],
["help"]
]
};
console.menuSpecs["popup:emode"] = {
label: MSG_MNU_EMODE,
items:
@ -211,8 +212,14 @@ function createMainMenu(document)
var menuManager = console.menuManager;
for (var id in console.menuSpecs)
{
var domID;
if ("domID" in console.menuSpecs[id])
domID = console.menuSpecs[id].domID;
else
domID = id;
if (id.indexOf("mainmenu:") == 0)
menuManager.createMenu (mainmenu, null, id);
menuManager.createMenu (mainmenu, null, id, domID);
}
mainmenu.removeAttribute ("collapsed");

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

@ -126,7 +126,9 @@
<menu id="windowMenu"/>
<!-- Help menu -->
<menu id="mainmenu:help"/>
<!-- Mac expects a help menu with this ID, and there is nothing we can
do about it. -->
<menu id="menu_Help"/>
</menubar>
<!-- Debug toolbar -->

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

@ -649,9 +649,11 @@ function vr_refresh ()
this.property = this.atomDouble;
break;
case TYPE_STRING:
strval = this.value.stringValue.quote();
strval = this.value.stringValue;
if (strval.length > console.prefs["maxStringLength"])
strval = getMsg(MSN_FMT_LONGSTR, strval.length);
else
strval = strval.quote();
this.displayValue = strval;
this.displayType = MSG_TYPE_STRING;
this.property = this.atomString;
@ -665,29 +667,49 @@ function vr_refresh ()
this.value.refresh();
var ctor = this.value.jsClassName;
strval = null;
switch (ctor)
{
case "Function":
this.displayType = MSG_TYPE_FUNCTION;
ctor = (this.value.isNative ? MSG_CLASS_NATIVE_FUN :
MSG_CLASS_SCRIPT_FUN);
this.property = this.atomFunction;
break;
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;
case "Object":
if (this.value.jsConstructor)
ctor = this.value.jsConstructor.jsFunctionName;
break;
case "XPCWrappedNative_NoHelper":
ctor = MSG_CLASS_CONST_XPCOBJ;
break;
case "XPC_WN_ModsAllowed_Proto_JSClass":
ctor = MSG_CLASS_XPCOBJ;
break;
case "String":
strval = this.value.stringValue;
if (strval.length > console.prefs["maxStringLength"])
strval = getMsg(MSN_FMT_LONGSTR, strval.length);
else
strval = strval.quote();
break;
case "Number":
case "Boolean":
strval = this.value.stringValue;
break;
}
if (ctor != "String")
if (strval != null)
{
this.displayValue = strval;
}
else
{
if (0) {
/* too slow... */
@ -711,13 +733,6 @@ function vr_refresh ()
this.displayValue = "{" + ctor + "}";
}
}
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)
@ -729,7 +744,7 @@ function vr_refresh ()
this.close();
}
}
break;
break;
default:
ASSERT (0, "invalid value");

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

@ -33,7 +33,7 @@
*
*/
const __vnk_version = "0.9.37";
const __vnk_version = "0.9.39";
const __vnk_requiredLocale = "0.9.x";
var __vnk_versionSuffix = "";
@ -819,7 +819,10 @@ function metaBreak (scriptInstance, line, matchResult)
if (scriptWrapper.getBreakpoint(pc))
return;
var breakpoint = scriptWrapper.setBreakpoint (pc);
var sourceLine = scriptWrapper.jsdScript.pcToLine(pc, PCMAP_SOURCETEXT);
var breakpoint = setFutureBreakpoint (scriptWrapper.jsdScript.fileName,
sourceLine);
scriptWrapper.setBreakpoint (pc, breakpoint);
matchResult[2] = stringTrim(matchResult[2]);
switch (matchResult[1])
@ -1101,7 +1104,7 @@ function st_loadsrc (cb)
/* if we can't load it now, try to load it later */
try
{
dd ("trying async");
// dd ("trying async");
loadURLAsync (url, { onComplete: onComplete });
return;
}

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

@ -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);
}

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

@ -496,7 +496,13 @@ function getURLSpecFromFile (file)
const nsIIOService = Components.interfaces.nsIIOService;
const nsILocalFile = Components.interfaces.nsILocalFile;
const nsIFileProtocolHandler = Components.interfaces.nsIFileProtocolHandler;
/* bug 166792 added this interface in Sept. 2002, but we need to work on
* older versions too. */
var nsIFileProtocolHandler;
if ("nsIFileProtocolHandler" in Components.interfaces)
nsIFileProtocolHandler = Components.interfaces.nsIFileProtocolHandler;
else
nsIFileProtocolHandler = null;
if (typeof file == "string")
{
@ -507,8 +513,11 @@ function getURLSpecFromFile (file)
}
var service = Components.classes[IOS_CTRID].getService(nsIIOService);
var fileHandler = service.getProtocolHandler("file")
.QueryInterface(nsIFileProtocolHandler);
if (!nsIFileProtocolHandler)
return service.getURLSpecFromFile(file);
var fileHandler = service.getProtocolHandler("file");
fileHandler = fileHandler.QueryInterface(nsIFileProtocolHandler);
return fileHandler.getURLSpecFromFile(file);
}

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

@ -353,6 +353,9 @@ function bv_hide()
console.views.breaks.onDblClick =
function bv_sel (e)
{
if (e.target.localName != "treechildren")
return;
var rowIndex = this.tree.selection.currentIndex;
if (rowIndex == -1 || rowIndex > this.rowCount)
return;
@ -953,6 +956,9 @@ function scv_hide ()
console.views.scripts.onDblClick =
function scv_dblclick (e)
{
if (e.target.localName != "treechildren")
return;
var scriptsView = console.views.scripts;
var rowIndex = scriptsView.tree.selection.currentIndex;
@ -1778,8 +1784,11 @@ function skv_hide()
}
console.views.stack.onDblClick =
function skv_select (row)
function skv_select (e)
{
if (e.target.localName != "treechildren")
return;
var rowIndex = console.views.stack.tree.selection.currentIndex;
if (rowIndex == -1)
@ -2458,7 +2467,7 @@ function s2v_syncframe (iframe)
function tryAgain ()
{
//dd ("source2 view trying again...");
dd ("source2 view trying again...");
source2View.syncOutputFrame(iframe);
};
@ -2486,8 +2495,8 @@ function s2v_syncframe (iframe)
}
catch (ex)
{
//dd ("caught exception showing session view, will try again later.");
//dd (dumpObjectTree(ex));
// dd ("caught exception showing session view, will try again later.");
// dd (dumpObjectTree(ex));
setTimeout (tryAgain, 500);
}
@ -2820,7 +2829,6 @@ function s2v_statechange (webProgress, request, stateFlags, status)
*/
sourceTab = source2View.getSourceTabForDOMWindow(webProgress.DOMWindow);
if (webProgress.DOMWindow.location.href !=
sourceTab.iframe.getAttribute("targetSrc"))
{
@ -3921,8 +3929,11 @@ function winv_cellprops (index, colID, properties)
}
console.views.windows.onDblClick =
function winv_dblclick ()
function winv_dblclick (e)
{
if (e.target.localName != "treechildren")
return;
var rowIndex = this.tree.selection.currentIndex;
if (rowIndex == -1 || rowIndex > this.rowCount)
return;

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

@ -97,7 +97,7 @@ msn.err.source.load.failed = Error loading URL <%1$S>: %2$S.
msn.err.no.such.container = No such container ``%1$S''.
msg.err.condition.failed = Error evaluating breakpoint condition.
msg.err.format.not.available = Source not available in requested format.
msn.err.no.function = Line %1$S in <%1$S> is not part of an executable function.
msn.err.no.function = Line %1$S in <%2$S> is not part of an executable function.
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.
@ -479,7 +479,7 @@ cmd.debug-instance-off.help = Enable debugging in all functions contained by t
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-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.
cmd.debug-transient.label = Don't Debug Eval/Ti&meouts
cmd.debug-transient.params = <toggle> <url> [<...>]
@ -557,7 +557,7 @@ cmd.find-string.help = Brings up a ``Find Dialog'' for the currently selected t
cmd.find-scriptinstance.label = &Find File
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-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 <script-instance> 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>]]]]
@ -565,7 +565,7 @@ cmd.find-url.help = Displays the contents of the URL <url> in the source view.
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.find-url-soft.help = Functions the same as |find-url|, except the view is not scrolled if <target-line> is already visible.
cmd.finish.label = S&tep Out
cmd.finish.key = shift VK_F11
@ -620,7 +620,7 @@ cmd.profile-script.help = Enable or disable profiling the script <script-wrapp
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.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.
cmd.profile-instance-on.label = Don't &Profile Contained Functions
cmd.profile-instance-on.params = <script-instance> [<...>]
@ -734,7 +734,7 @@ cmd.this-expr.params = <expression>
cmd.this-expr.help = Sets the ``evaluation object'' to the result of <expression>. The evaluation object is used as the |this| object in all evaluations. The result of <expression> *must* be an object. See also: |eval|, |props|, |watch-expr|, and |set-this-obj|.
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 when 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