rem
stringlengths
0
126k
add
stringlengths
0
441k
context
stringlengths
15
136k
accesskey: bundle_browser.getString("undo.accessKey"),
accessKey: bundle_browser.getString("undo.accessKey"),
toggleImageBlocking : function (aBlock) { var nsIPermissionManager = Components.interfaces.nsIPermissionManager; var permissionmanager = Components.classes["@mozilla.org/permissionmanager;1"] .getService(nsIPermissionManager); var uri = this.target.QueryInterface(Components.in...
InlineSpellChecker.inlineSpellChecker.enableRealTimeSpell = !InlineSpellChecker.inlineSpellChecker.enableRealTimeSpell;
InlineSpellChecker.editor.setSpellcheckUserOverride(!InlineSpellChecker.inlineSpellChecker.enableRealTimeSpell);
function ToggleInlineSpellChecker(target){ if (InlineSpellChecker.inlineSpellChecker) { InlineSpellChecker.inlineSpellChecker.enableRealTimeSpell = !InlineSpellChecker.inlineSpellChecker.enableRealTimeSpell; if (InlineSpellChecker.inlineSpellChecker.enableRealTimeSpell) InlineSpellChecker.checkDocument(win...
InlineSpellChecker.inlineSpellChecker.enableRealTimeSpell = !InlineSpellChecker.inlineSpellChecker.enableRealTimeSpell;
InlineSpellChecker.editor.setSpellcheckUserOverride(!InlineSpellChecker.inlineSpellChecker.enableRealTimeSpell);
function ToggleInlineSpellChecker(target){ if (InlineSpellChecker.inlineSpellChecker) { InlineSpellChecker.inlineSpellChecker.enableRealTimeSpell = !InlineSpellChecker.inlineSpellChecker.enableRealTimeSpell; target.setAttribute('checked', InlineSpellChecker.inlineSpellChecker.enableRealTimeSpell); if (Inline...
var allKeys = tagService.keyEnumerator; while (allKeys.hasMore())
var tagArray = tagService.getAllTags({}); for (var i = 0; i < tagArray.length; ++i)
function ToggleMessageTagKey(index){ if (GetNumSelectedMessages() < 1) return; // toggle the tag state based upon that of the first selected message var msgHdr = gDBView.hdrForFirstSelectedMessage; var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"] .getService(...
var key = allKeys.getNext();
var key = tagArray[i].key;
function ToggleMessageTagKey(index){ if (GetNumSelectedMessages() < 1) return; // toggle the tag state based upon that of the first selected message var msgHdr = gDBView.hdrForFirstSelectedMessage; var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"] .getService(...
var allKeys = tagService.keyEnumerator; while (allKeys.hasMore())
var tagArray = tagService.getAllTags({}); for (var i = 0; i < tagArray.length; ++i)
function ToggleMessageTagKey(index){ if (GetNumSelectedMessages() < 1) return; // set the tag state based upon that of the first selected message, // just like we do for markAsRead etc. var msgHdr = gDBView.hdrForFirstSelectedMessage; var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"] ...
var key = allKeys.getNext();
var key = tagArray[i].key;
function ToggleMessageTagKey(index){ if (GetNumSelectedMessages() < 1) return; // set the tag state based upon that of the first selected message, // just like we do for markAsRead etc. var msgHdr = gDBView.hdrForFirstSelectedMessage; var tagService = Components.classes["@mozilla.org/messenger/tagservice;1"] ...
try { var ioService = Components.classes["@mozilla.org/network/io-service;1"]. getService(Components.interfaces.nsIIOService2); ioService.manageOfflineStatus = false; } catch (ex) { }
function toggleOfflineStatus(){ var checkfunc; try { checkfunc = document.getElementById("offline-status").getAttribute('checkfunc'); } catch (ex) { checkfunc = null; } var ioService = Components.classes[kIOServiceProgID] .getService(Components.interfaces.nsIIOService); if (check...
remove1.disabled = !enabled; remove2.disabled = !enabled;
if (enabled && persissionsExist) { remove1.disabled = false; remove2.disabled = false; } else { remove1.disabled = true; remove2.disabled = true; }
function togglePermissionEnabling() { var enabled = policyButton.checked; var add = document.getElementById("addPermission"); var remove1 = document.getElementById("removePermission"); var remove2 = document.getElementById("removeAllPermissions"); var description = document.getElementById("popupDescription"); add...
var val = aExplicit ? aValue : !this.mDOMDS.showSubDocuments; this.mDOMDS.showSubDocuments = val;
var val = aExplicit ? aValue : !this.mDOMView.showSubDocuments; this.mDOMView.showSubDocuments = val;
toggleSubDocs: function(aExplicit, aValue) { var val = aExplicit ? aValue : !this.mDOMDS.showSubDocuments; this.mDOMDS.showSubDocuments = val; this.mPanel.panelset.setCommandAttribute("cmd:toggleSubDocs", "checked", val ? "true" : "false"); },
CommandUpdate_MsgCompose();
updateComposeItems();
function ToggleWindowLock(){ gWindowLocked = !gWindowLocked; CommandUpdate_MsgCompose();}
for ( var mag = 1; Math.pow(16,mag) <= n ; mag++ ) { ;
for ( var mag = 1; Math.pow(16,mag) <= n ; mag++ ) { ; } for ( index = 0, mag -= 1; mag > 0; index++, mag-- ) { hex[index] = Math.floor( n / Math.pow(16,mag) ); n -= Math.pow(16,mag) * Math.floor( n/Math.pow(16,mag) ); } hex[hex.length] = n % 16; var string =""; for ( var index = 0 ; index < hex.length ; index++ ) ...
function ToHexString( n ) { var hex = new Array(); for ( var mag = 1; Math.pow(16,mag) <= n ; mag++ ) { ; } for ( index = 0, mag -= 1; mag > 0; index++, mag-- ) { hex[index] = Math.floor( n / Math.pow(16,mag) ); n -= Math.pow(16,mag) * Math.floor( n/Math.pow(16,mag) ); } hex[hex.l...
for ( index = 0, mag -= 1; mag > 0; index++, mag-- ) { hex[index] = Math.floor( n / Math.pow(16,mag) ); n -= Math.pow(16,mag) * Math.floor( n/Math.pow(16,mag) ); } hex[hex.length] = n % 16; var string =""; for ( var index = 0 ; index < hex.length ; index++ ) { switch ( hex[index] ) { case 10: string += "A"; break; c...
if ( string.length == 1 ) { string = "0" + string; } return string;
function ToHexString( n ) { var hex = new Array(); for ( var mag = 1; Math.pow(16,mag) <= n ; mag++ ) { ; } for ( index = 0, mag -= 1; mag > 0; index++, mag-- ) { hex[index] = Math.floor( n / Math.pow(16,mag) ); n -= Math.pow(16,mag) * Math.floor( n/Math.pow(16,mag) ); } hex[hex.l...
var toolkitCore = XPAppCoresManager.Find("toolkitCore"); if (!toolkitCore) { toolkitCore = new ToolkitCore(); if (toolkitCore) { toolkitCore.Init("toolkitCore"); } } if (toolkitCore) { toolkitCore.ShowWindow("chrome: }
window.open( "chrome:
function toHistory(){ var toolkitCore = XPAppCoresManager.Find("toolkitCore"); if (!toolkitCore) { toolkitCore = new ToolkitCore(); if (toolkitCore) { toolkitCore.Init("toolkitCore"); } } if (toolkitCore) { toolkitCore.ShowWindow("chrome://history/content/",window); }}
window.open( "chrome:
window.open( "chrome: "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar" );
function toHistory(){ // Use a single sidebar history dialog var cwindowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService(); var iwindowManager = Components.interfaces.nsIWindowMediator; var windowManager = cwindowManager.QueryInterface(iwindowManager); var historyWindo...
for ( p = 30; p >=0; p-- ) { if ( (sign == 1 ) ? sign * n >= Math.pow(2,p) : sign * n > Math.pow(2,p) ) { b += ( sign == 1 ) ? "1" : "0"; n -= sign * Math.pow( 2, p ); } else { b += ( sign == 1 ) ? "0" : "1"; }
for ( p = 30; p >=0; p-- ) { if ( (sign == 1 ) ? sign * n >= Math.pow(2,p) : sign * n > Math.pow(2,p) ) { b += ( sign == 1 ) ? "1" : "0"; n -= sign * Math.pow( 2, p ); } else { b += ( sign == 1 ) ? "0" : "1";
function ToInt32BitString( n ) { var b = ""; var sign = ( n < 0 ) ? -1 : 1; b += ( sign == 1 ) ? "0" : "1"; for ( p = 30; p >=0; p-- ) { if ( (sign == 1 ) ? sign * n >= Math.pow(2,p) : sign * n > Math.pow(2,p) ) { b += ( sign == 1 ) ? "1" : "0"; n -= sign * Math.pow( 2, p ); ...
for ( p = 30; p >=0; p-- ) { if ( (sign == 1 ) ? sign * n >= Math.pow(2,p) : sign * n > Math.pow(2,p) ) { b += ( sign == 1 ) ? "1" : "0"; n -= sign * Math.pow( 2, p ); } else { b += ( sign == 1 ) ? "0" : "1"; }
for ( var p = 30; p >=0; p-- ) { if ( (sign == 1 ) ? sign * n >= Math.pow(2,p) : sign * n > Math.pow(2,p) ) { b += ( sign == 1 ) ? "1" : "0"; n -= sign * Math.pow( 2, p ); } else { b += ( sign == 1 ) ? "0" : "1";
function ToInt32BitString( n ) { var b = ""; var sign = ( n < 0 ) ? -1 : 1; b += ( sign == 1 ) ? "0" : "1"; for ( p = 30; p >=0; p-- ) { if ( (sign == 1 ) ? sign * n >= Math.pow(2,p) : sign * n > Math.pow(2,p) ) { b += ( sign == 1 ) ? "1" : "0"; n -= sign * Math.pow( 2, p ); ...
CycleWindow('navigator:browser', getBrowserURL());
if (!CycleWindow("navigator:browser")) OpenBrowserWindow();
function toNavigator(){ CycleWindow('navigator:browser', getBrowserURL());}
core = XPAppCoresManager.Find("toolkitCore"); if ( !core ) { core = new ToolkitCore(); if ( core ) { core.Init("toolkitCore"); } } if ( core ) { core.ShowWindowWithArgs( "chrome: } else { dump("Error; can't create toolkitCore\n"); }
window.openDialog( "chrome: "_blank", "chrome,dialog=no,all", "chrome:
function toNewTextEditorWindow(){ core = XPAppCoresManager.Find("toolkitCore"); if ( !core ) { core = new ToolkitCore(); if ( core ) { core.Init("toolkitCore"); } } if ( core ) { core.ShowWindowWithArgs( "chrome://editor/content/TextEditorAppShell.xul", null, "chrome://editor/content/EditorInitP...
try { result = foo["bar"]; } catch ( e ) { result = "passed: threw exception", exception = e.toString(); } finally { testcases[tc++] = new TestCase( SECTION, "foo[\"bar\"] [ exception is " + exception +" ]", "passed: threw exception", result ); } }
try { result = foo["bar"]; } catch ( e ) { result = "passed: threw exception", exception = e.toString(); } finally { new TestCase( SECTION, "foo[\"bar\"] [ exception is " + exception +" ]", "passed: threw exception", result ); } }
function ToObject_1() { result = "failed: no exception thrown"; exception = null; try { result = foo["bar"]; } catch ( e ) { result = "passed: threw exception", exception = e.toString(); } finally { testcases[tc++] = new TestCase( ...
window.open(uri, "_blank", "chrome,menubar,toolbar,resizable,scrollbars");
window.open(uri, "_blank", "chrome,extrachrome,menubar,resizable,scrollbars,status,toolbar");
function toOpenWindowByType( inType, uri ){ var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService(); var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator); var topWindow = windowManagerInterface.getMostRecentWindow( inType )...
debug("TOP LEVEL bookmarks window got a drag\n");
debug("TOP LEVEL bookmarks window got a drag");
function TopLevelDrag ( event ){ debug("TOP LEVEL bookmarks window got a drag\n"); return(true);}
try { result = new MyObject() + new MyObject(); } catch ( e ) { result = "passed: threw exception", exception = e.toString(); } finally { testcases[tc++] = new TestCase( SECTION, "new MyObject() + new MyObject() [ exception is " + exception +" ]", "passed: threw exception", result ); } }
try { result = new MyObject() + new MyObject(); } catch ( e ) { result = "passed: threw exception", exception = e.toString(); } finally { new TestCase( SECTION, "new MyObject() + new MyObject() [ exception is " + exception +" ]", "passed: threw exception", result ); } }
function ToPrimitive_1() { result = "failed: no exception thrown"; exception = null; try { result = new MyObject() + new MyObject(); } catch ( e ) { result = "passed: threw exception", exception = e.toString(); } finally { testcases[tc++...
var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); var params = Components.classes["@mozilla.org/embedcomp/dialogparam;1"]
const wm = Components.classes["@mozilla.org/appshell/window-mediator;1"] .getService(Components.interfaces.nsIWindowMediator); var promgrWin = wm.getMostRecentWindow( "mozilla:profileSelection" ); if (promgrWin) { promgrWin.focus(); } else { var params = Components.classes["@mozilla.org/embedcomp/dialogparam;1"]
function toProfileManager(){ var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); var params = Components.classes["@mozilla.org/embedcomp/dialogparam;1"] .createInstance(Components.interfaces.nsIDialogParamBlock); pa...
params.SetNumberStrings(1); params.SetString(0, "menu"); ww.openWindow(null, "chrome: null, "centerscreen,chrome,modal,titlebar",
params.SetNumberStrings(1); params.SetString(0, "menu"); window.openDialog("chrome: "", "centerscreen,chrome,titlebar",
function toProfileManager(){ var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); var params = Components.classes["@mozilla.org/embedcomp/dialogparam;1"] .createInstance(Components.interfaces.nsIDialogParamBlock); pa...
}
function toProfileManager(){ var ww = Components.classes["@mozilla.org/embedcomp/window-watcher;1"] .getService(Components.interfaces.nsIWindowWatcher); var params = Components.classes["@mozilla.org/embedcomp/dialogparam;1"] .createInstance(Components.interfaces.nsIDialogParamBlock); pa...
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
function toScriptableInputStream (i){ var si = Components.classes["component://netscape/scriptableinputstream"]; si = si.createInstance(); si = si.QueryInterface(Components.interfaces.nsIScriptableInputStream); si.init(i); return si; }
var b = ""; for ( p = 31; p >=0; p-- ) { if ( n >= Math.pow(2,p) ) { b += "1"; n -= Math.pow(2,p); } else { b += "0"; }
var b = ""; for ( p = 31; p >=0; p-- ) { if ( n >= Math.pow(2,p) ) { b += "1"; n -= Math.pow(2,p); } else { b += "0";
function ToUint32BitString( n ) { var b = ""; for ( p = 31; p >=0; p-- ) { if ( n >= Math.pow(2,p) ) { b += "1"; n -= Math.pow(2,p); } else { b += "0"; } } return b;}
return b;
} return b;
function ToUint32BitString( n ) { var b = ""; for ( p = 31; p >=0; p-- ) { if ( n >= Math.pow(2,p) ) { b += "1"; n -= Math.pow(2,p); } else { b += "0"; } } return b;}
var b = ""; for ( p = 31; p >=0; p-- ) { if ( n >= Math.pow(2,p) ) { b += "1"; n -= Math.pow(2,p); } else { b += "0"; }
var b = ""; for ( var p = 31; p >=0; p-- ) { if ( n >= Math.pow(2,p) ) { b += "1"; n -= Math.pow(2,p); } else { b += "0";
function ToUint32BitString( n ) { var b = ""; for ( p = 31; p >=0; p-- ) { if ( n >= Math.pow(2,p) ) { b += "1"; n -= Math.pow(2,p); } else { b += "0"; } } return b;}
for ( l = bin.length; l < 32; l++ ) { bin = "0" + bin; }
for ( var l = bin.length; l < 32; l++ ) { bin = "0" + bin; }
function ToUint32Decimal( bin ) { var r = 0; for ( l = bin.length; l < 32; l++ ) { bin = "0" + bin; } for ( j = 0; j < 31; j++ ) { r += Math.pow( 2, j ) * Number(bin.charAt(31-j)); } return r;}
for ( j = 0; j < 31; j++ ) { r += Math.pow( 2, j ) * Number(bin.charAt(31-j)); }
for ( var j = 0; j < 31; j++ ) { r += Math.pow( 2, j ) * Number(bin.charAt(31-j)); }
function ToUint32Decimal( bin ) { var r = 0; for ( l = bin.length; l < 32; l++ ) { bin = "0" + bin; } for ( j = 0; j < 31; j++ ) { r += Math.pow( 2, j ) * Number(bin.charAt(31-j)); } return r;}
/* ASSERT(row, "bogus row " + index);
function tov_getpi (index){ var row = this.childData.locateChildByVisualRow (index); /* ASSERT(row, "bogus row " + index); var rv = row.parentRecord.calculateVisualRow(); dd ("getParentIndex: row " + index + " returning " + rv); return rv; */ return row.parentRecord.calculateVisualRow();}
dd ("getParentIndex: row " + index + " returning " + rv); return rv; */ return row.parentRecord.calculateVisualRow();
return (rv != null) ? rv : -1;
function tov_getpi (index){ var row = this.childData.locateChildByVisualRow (index); /* ASSERT(row, "bogus row " + index); var rv = row.parentRecord.calculateVisualRow(); dd ("getParentIndex: row " + index + " returning " + rv); return rv; */ return row.parentRecord.calculateVisualRow();}
leakDetector.vtable.traceObject(document, leakDetector.verbose);
leakDetector.traceObject(document, leakDetector.verbose);
function traceChrome(){ leakDetector.vtable.traceObject(document, leakDetector.verbose);}
leakDetector.vtable.markObject(document, true); leakDetector.vtable.traceObject(window._content, leakDetector.verbose); leakDetector.vtable.markObject(document, false);
leakDetector.markObject(document, true); leakDetector.traceObject(window._content, leakDetector.verbose); leakDetector.markObject(document, false);
function traceDocument(){ // keep the chrome document out of the dump. leakDetector.vtable.markObject(document, true); leakDetector.vtable.traceObject(window._content, leakDetector.verbose); leakDetector.vtable.markObject(document, false);}
var targetURI = getWebNavigation().currentURI.spec;
var targetURI = _content.location.href;
function Translate(){ var service = "http://cgi.netscape.com/cgi-bin/translate.cgi?AlisUI=simple_frames/ns_home"; // if we're already viewing a translated page, then just get the // last argument (which we expect to always be "AlisTargetURI") var targetURI = getWebNavigation().currentURI.spec; var targetURIIndex =...
service += "&AlisTargetURI=" + targetURI;
service += "&AlisTargetURI=" + escape(targetURI);
function Translate() { var service = "http://cgi.netscape.com/cgi-bin/translate.cgi?AlisUI=simple_frames/ns_home"; // if we're already viewing a translated page, then just get the // last argument (which we expect to always be "AlisTargetURI") var targetURI = window.content.location.href; var targetURIIndex = target...
var targetURI = window.content.location.href; var targetURIIndex = targetURI.indexOf("AlisTargetURI="); if (targetURIIndex >= 0) targetURI = targetURI.substring(targetURIIndex + 14); service += "&AlisTargetURI=" + targetURI; window.content.location.href = service; }
var targetURI = window.content.location.href; var targetURIIndex = targetURI.indexOf("AlisTargetURI="); if (targetURIIndex >= 0) { targetURI = targetURI.substring(targetURIIndex + 14); } service += "&AlisTargetURI=" + targetURI; window.content.location.href = service; }
function Translate(src, dest, engine){ var service = "http://levis.alis.com:8080"; service += "?AlisSourceLang=" + src; service += "&AlisTargetLang=" + dest; service += "&AlisMTEngine=" + engine; // if we're already viewing a translated page, the just get the // last argument (which we expect to always be "AlisMT...
Dump("\n")
dump("\n")
function traverse(node, indent){ Dump("\n") indent += " " var type = node.GetNodeType() // if it's an element dump the tag and recurse the children if (type == Node.ELEMENT) { Dump(indent + node.GetTagName()) // go through the children if (node.HasChildNodes()) { var chil...
var type = node.GetNodeType()
var type = node.getNodeType()
function traverse(node, indent){ Dump("\n") indent += " " var type = node.GetNodeType() // if it's an element dump the tag and recurse the children if (type == Node.ELEMENT) { Dump(indent + node.GetTagName()) // go through the children if (node.HasChildNodes()) { var chil...
Dump(indent + node.GetTagName())
dump(indent + node.getTagName())
function traverse(node, indent){ Dump("\n") indent += " " var type = node.GetNodeType() // if it's an element dump the tag and recurse the children if (type == Node.ELEMENT) { Dump(indent + node.GetTagName()) // go through the children if (node.HasChildNodes()) { var chil...
if (node.HasChildNodes()) { var children = node.GetChildNodes() var length = children.GetLength() var child = children.GetNextNode()
if (node.hasChildNodes()) { var children = node.getChildNodes() var length = children.getLength() var child = children.getNextNode()
function traverse(node, indent){ Dump("\n") indent += " " var type = node.GetNodeType() // if it's an element dump the tag and recurse the children if (type == Node.ELEMENT) { Dump(indent + node.GetTagName()) // go through the children if (node.HasChildNodes()) { var chil...
child = children.GetNextNode()
child = children.getNextNode()
function traverse(node, indent){ Dump("\n") indent += " " var type = node.GetNodeType() // if it's an element dump the tag and recurse the children if (type == Node.ELEMENT) { Dump(indent + node.GetTagName()) // go through the children if (node.HasChildNodes()) { var chil...
Dump(indent + "Text")
dump(indent + "Text")
function traverse(node, indent){ Dump("\n") indent += " " var type = node.GetNodeType() // if it's an element dump the tag and recurse the children if (type == Node.ELEMENT) { Dump(indent + node.GetTagName()) // go through the children if (node.HasChildNodes()) { var chil...
debug("TriStateColumnSort("+column_name+")");
function TriStateColumnSort(column_name){ debug("TriStateColumnSort("+column_name+")"); var current_column = find_sort_column(); var current_direction = find_sort_direction(current_column); var column = document.getElementById(column_name); if (!column) return false; var direction = "ascending"; if...
try { for ( p in object ) { if ( typeof object[p] == "function" ) { result = object[p](); } } } catch ( e ) { result = e;
try { for ( p in object ) { if ( typeof object[p] == "function" ) { result = object[p](); }
function TryForIn( object ) { try { for ( p in object ) { if ( typeof object[p] == "function" ) { result = object[p](); } } } catch ( e ) { result = e; } testcases[tc++] = new TestCase( SECTION, "TryForIn( " + object+ " )", (obj...
testcases[tc++] = new TestCase( SECTION, "TryForIn( " + object+ " )", (object.exception ? EXCEPTION_STRING +": " + object.value : object.value), result );
new TestCase( SECTION, "TryForIn( " + object+ " )", (object.exception ? EXCEPTION_STRING +": " + object.value : object.value), result );
function TryForIn( object ) { try { for ( p in object ) { if ( typeof object[p] == "function" ) { result = object[p](); } } } catch ( e ) { result = e; } testcases[tc++] = new TestCase( SECTION, "TryForIn( " + object+ " )", (obj...
testcases[tc++] = new TestCase( SECTION, "( "+ object +".thrower() )", (object.result ? EXCEPTION_STRING + object.value : NO_EXCEPTION_STRING + object.value), result ); }
new TestCase( SECTION, "( "+ object +".thrower() )", (object.result ? EXCEPTION_STRING + object.value : NO_EXCEPTION_STRING + object.value), result ); }
function TryInWhile( object ) { result = null; while ( true ) { try { object.thrower(); result = NO_EXCEPTION_STRING + object.value; break; } catch ( e ) { result = e; break; } } t...
try { result = newJavaInteger( value ); } catch ( e ) { result = String( e ); } finally { finalTest = true; } testcases[tc++] = new TestCase( SECTION, "newJavaValue( " + value +" )", expect, result);
try { result = newJavaInteger( value ); } catch ( e ) { result = String( e ); } finally { finalTest = true; } new TestCase( SECTION, "newJavaValue( " + value +" )", expect, result);
function TryNewJavaInteger( value, expect ) { var finalTest = false; try { result = newJavaInteger( value ); } catch ( e ) { result = String( e ); } finally { finalTest = true; } testcases[tc++] = new TestCase( SECTION, ...
testcases[tc++] = new TestCase( SECTION, "newJavaValue( " + value +" ) hit finally block", true, finalTest);
new TestCase( SECTION, "newJavaValue( " + value +" ) hit finally block", true, finalTest);
function TryNewJavaInteger( value, expect ) { var finalTest = false; try { result = newJavaInteger( value ); } catch ( e ) { result = String( e ); } finally { finalTest = true; } testcases[tc++] = new TestCase( SECTION, ...
testcases[tc++] = new TestCase( SECTION, "eval( " + expression +" ): evaluated inner finally block", "PASS", innerFinally ); testcases[tc++] = new TestCase( SECTION, "eval( " + expression +" ): evaluated outer catch block ", "PASS", outerCatch ); testcases[tc++] = new TestCase( SECTION, "eval( " + expression +" ): eva...
new TestCase( SECTION, "eval( " + expression +" ): evaluated inner finally block", "PASS", innerFinally ); new TestCase( SECTION, "eval( " + expression +" ): evaluated outer catch block ", "PASS", outerCatch ); new TestCase( SECTION, "eval( " + expression +" ): evaluated outer finally block", "PASS", outerFinally ); }
function TrySomething( expression, throwing ) { innerFinally = "FAIL: DID NOT HIT INNER FINALLY BLOCK"; if (throwing) { outerCatch = "FAILED: NO EXCEPTION CAUGHT"; } else { outerCatch = "PASS"; } outerFinally = "FAIL: DID NOT HIT OUTER FINALLY BLOCK"; ...
testcases[tc++] = new TestCase( SECTION, "eval( " + expression +" )", "PASS", innerFinally ); testcases[tc++] = new TestCase( SECTION, "eval( " + expression +" )", "PASS", outerCatch ); testcases[tc++] = new TestCase( SECTION, "eval( " + expression +" )", "PASS", outerFinally );
new TestCase( SECTION, "eval( " + expression +" )", "PASS", innerFinally ); new TestCase( SECTION, "eval( " + expression +" )", "PASS", outerCatch ); new TestCase( SECTION, "eval( " + expression +" )", "PASS", outerFinally );
function TrySomething( expression, throwing ) { innerFinally = "FAIL: DID NOT HIT INNER FINALLY BLOCK"; if (throwing) { outerCatch = "FAILED: NO EXCEPTION CAUGHT"; } else { outerCatch = "PASS"; } outerFinally = "FAIL: DID NOT HIT OUTER FINALLY BLOCK"; ...
print("In finally case of tryThis() function");
writeLineToLog("In finally case of tryThis() function");
function tryThis(){ var sum = 4 ; var i = 0; while (sum < 10) { try { sum += 1; i += 1; } finally { print("In finally case of tryThis() function"); } } return i;}
testcases[tc++] = new TestCase( SECTION, "eval( " + value +" )", expect, result ); }
new TestCase( SECTION, "eval( " + value +" )", expect, result ); }
function TryToCatch( value, expect ) { try { result = eval( value ); } catch ( e ) { result = e; } testcases[tc++] = new TestCase( SECTION, "eval( " + value +" )", expect, result ); }
testcases[tc++] = new TestCase( SECTION, "eval( " + value +" )", expect, result ); }
new TestCase( SECTION, "eval( " + value +" )", expect, result ); }
function TryToCatch( value, expect ) { try { result = Eval( value ); } catch ( e ) { result = e; } testcases[tc++] = new TestCase( SECTION, "eval( " + value +" )", expect, result ); }
function tryToSetContentWindow() { var startpage = startPageDefault; if ( window.content ) { appCore.setContentWindow( window.content );
function tryToSetContentWindow() { var startpage = startPageDefault; if ( window.content ) { dump("Setting content window\n"); appCore.setContentWindow( window.content );
function tryToSetContentWindow() { var startpage = startPageDefault; if ( window.content ) { appCore.setContentWindow( window.content ); if ( !explicitURL ) { // if all else fails, use trusty "about:blank" as the start page if (pref) { // from mozilla/modules/libpref/src/init/all.js // 0...
if ( !explicitURL ) { if (pref) { var choice = 1; try { choice = pref.GetIntPref("browser.startup.page");
if ( !explicitURL ) { if (pref) { choice = 1; try { choice = pref.GetIntPref("browser.startup.page"); } catch (ex) { dump("failed to get the browser.startup.page pref\n"); } dump("browser.startup.page = " + choice + "\n"); switch (choice) { case 0: startpage = "about:blank"; break; case 1: try { startpage = pref.C...
function tryToSetContentWindow() { var startpage = startPageDefault; if ( window.content ) { appCore.setContentWindow( window.content ); if ( !explicitURL ) { // if all else fails, use trusty "about:blank" as the start page if (pref) { // from mozilla/modules/libpref/src/init/all.js // 0...
catch (ex) { dump("failed to get the browser.startup.page pref\n"); } switch (choice) { case 0: startpage = "about:blank"; break; case 1: try { startpage = pref.CopyCharPref("browser.startup.homepage"); } catch (ex) { startpage = startPageDefault; } break; case 2: var history = getService( "component: if (history) star...
appCore.loadInitialPage(); } else { dump("Scheduling later attempt to set content window\n"); window.setTimeout( "tryToSetContentWindow()", 100 );
function tryToSetContentWindow() { var startpage = startPageDefault; if ( window.content ) { appCore.setContentWindow( window.content ); if ( !explicitURL ) { // if all else fails, use trusty "about:blank" as the start page if (pref) { // from mozilla/modules/libpref/src/init/all.js // 0...
appCore.loadInitialPage(); } else window.setTimeout( "tryToSetContentWindow()", 100 ); }
}
function tryToSetContentWindow() { var startpage = startPageDefault; if ( window.content ) { appCore.setContentWindow( window.content ); if ( !explicitURL ) { // if all else fails, use trusty "about:blank" as the start page if (pref) { // from mozilla/modules/libpref/src/init/all.js // 0...
testcases[tc++] = new TestCase( SECTION, "TryWith( " + object.value +" )", (object.exception ? EXCEPTION_STRING +": " + object.valueOf() : object.valueOf()), result ); }
new TestCase( SECTION, "TryWith( " + object.value +" )", (object.exception ? EXCEPTION_STRING +": " + object.valueOf() : object.valueOf()), result ); }
function TryWith( object ) { try { with ( object ) { result = check(); } } catch ( e ) { result = e; } testcases[tc++] = new TestCase( SECTION, "TryWith( " + object.value +" )", (object.exception ? EXCEPTION...
case "null": writeProp(p, "null"); break;
case "object": if (o[p] == null) { writeProp(p, "null"); } else { var className = ""; if (o[p] instanceof Array) className = "<Array> ";
function ts_serialize(obj){ if (!this._open) this.open(">"); if (!ASSERT(this._open, "Unable to open the file for writing!")) return; var me = this; function writeObjProps(o, indent) { function writeProp(name, val) { me._fileStream.write(indent + "\"" + ecmaEscape(n...
case "undefined": writeProp(p, "undefined"); break; case "object": var className = ""; if (o[p] instanceof Array) className = "<Array> "; me._fileStream.write(indent + "START " + className + ecmaEscape(p) + me.lineEnd); writeObjProps(o[p], indent + " "); me._fileStream.write(indent + "END" + me.lineEnd);
me._fileStream.write(indent + "START " + className + ecmaEscape(p) + me.lineEnd); writeObjProps(o[p], indent + " "); me._fileStream.write(indent + "END" + me.lineEnd); }
function ts_serialize(obj){ if (!this._open) this.open(">"); if (!ASSERT(this._open, "Unable to open the file for writing!")) return; var me = this; function writeObjProps(o, indent) { function writeProp(name, val) { me._fileStream.write(indent + "\"" + ecmaEscape(n...
var enum = srcItem.propertyEnumerator; while (enum.hasMoreElements()) { var prop = enum.getNext().QueryInterface(
var en = srcItem.propertyEnumerator; while (en.hasMoreElements()) { var prop = en.getNext().QueryInterface(
calWcapCalendar.prototype.tunnelXProps = function( destItem, srcItem ){ // xxx todo: temp workaround for bug in calItemBase.js if (!isParent(srcItem)) return; var enum = srcItem.propertyEnumerator; while (enum.hasMoreElements()) { var prop = enum.getNext().QueryInterface( Components...
if (name != "X-MOZ-VALARM-LASTACK" && name.indexOf("X-MOZ-") == 0) {
if (name.indexOf("X-MOZ-") == 0) {
calWcapCalendar.prototype.tunnelXProps = function( destItem, srcItem ){ // xxx todo: temp workaround for bug in calItemBase.js if (!isParent(srcItem)) return; var enum = srcItem.propertyEnumerator; while (enum.hasMoreElements()) { var prop = enum.getNext().QueryInterface( Components...
};
calWcapCalendar.prototype.tunnelXProps = function( destItem, srcItem ){ // xxx todo: temp workaround for bug in calItemBase.js if (!isParent(srcItem)) return; var enum = srcItem.propertyEnumerator; while (enum.hasMoreElements()) { var prop = enum.getNext().QueryInterface( Components...
delete this.mViewerHash[aViewer.uid].viewer;
delete this.mViewerHash[aViewer.uid];
uncacheViewer: function(aViewer) { delete this.mViewerHash[aViewer.uid].viewer; },
if (ss.getClosedTabCount(window) == 0) return;
function undoCloseTab(aIndex) { var ss = Cc["@mozilla.org/browser/sessionstore;1"]. getService(Ci.nsISessionStore); ss.undoCloseTab(window, aIndex || 0);}
this.mCalendar.deleteItem(this.mItem, null);
this.mCalendar.deleteItem(this.mItem, this);
undoTransaction: function () { switch (this.mAction) { case 'add': this.mCalendar.deleteItem(this.mItem, null); break; case 'modify': this.mCalendar.modifyItem(this.mOldItem, this.mItem, null); break; case 'delete': ...
this.mCalendar.modifyItem(this.mOldItem, this.mItem, null);
this.mCalendar.modifyItem(this.mOldItem, this.mItem, this);
undoTransaction: function () { switch (this.mAction) { case 'add': this.mCalendar.deleteItem(this.mItem, null); break; case 'modify': this.mCalendar.modifyItem(this.mOldItem, this.mItem, null); break; case 'delete': ...
this.mCalendar.addItem(this.mItem, null);
this.mCalendar.addItem(this.mItem, this);
undoTransaction: function () { switch (this.mAction) { case 'add': this.mCalendar.deleteItem(this.mItem, null); break; case 'modify': this.mCalendar.modifyItem(this.mOldItem, this.mItem, null); break; case 'delete': ...
this.mCalendar.deleteItem(this.mItem, this.mListener); this.mOldCalendar.addItem(this.mOldItem, this.mListener);
this.mCalendar.deleteItem(this.mItem, this); this.mOldCalendar.addItem(this.mOldItem, this);
undoTransaction: function () { switch (this.mAction) { case 'add': this.mCalendar.deleteItem(this.mItem, null); break; case 'modify': this.mCalendar.modifyItem(this.mOldItem, this.mItem, null); break; case 'delete': ...
var ArrayOfEvents = new Array( ThisEvent );
function unifinderClickEvent( event ){ var tree = document.getElementById( UnifinderTreeName ); var ThisEvent = getCalendarEventFromEvent( event ); var ArrayOfEvents = new Array( ThisEvent ); gCalendarWindow.EventSelection.setArrayToSelection( ArrayOfEvents ); if( ArrayOfEvents.length == 1 ) { /*sta...
var eventStartDate = getNextOrPreviousRecurrence( ThisEvent );
var eventStartDate = getNextOrPreviousRecurrence( gICalLib.fetchEvent( eventId ) );
function unifinderClickEvent( event ){ var tree = document.getElementById( UnifinderTreeName ); var ThisEvent = getCalendarEventFromEvent( event ); var ArrayOfEvents = new Array( ThisEvent ); gCalendarWindow.EventSelection.setArrayToSelection( ArrayOfEvents ); if( ArrayOfEvents.length == 1 ) { /*sta...
var eventBox = gCalendarWindow.currentView.getVisibleEvent( calendarEvent );
eventBox = gCalendarWindow.currentView.getVisibleEvent( calendarEvent );
function unifinderClickEvent( id, event ){ gUnifinderSelection = id; var calendarEvent = gICalLib.fetchEvent( id ); var eventBox = gCalendarWindow.currentView.getVisibleEvent( calendarEvent ); if ( eventBox ) { //the event box exists, so the event is visible. gCalendarWindow.currentView.cli...
gICalLib.batchMode = false;
function unifinderDeleteCommand( DoNotConfirm ){ if( unifinderToDoHasFocus() ) { unifinderDeleteToDoCommand( DoNotConfirm ); return; } var SelectedItems = gCalendarWindow.EventSelection.selectedEvents; if( SelectedItems.length == 1 ) { var calendarEvent = SelectedItems[0]; if ( cal...
if (tree.treeBoxObject.selection.count > 0) { var treeitem = tree.treeBoxObject.view.getItemAtIndex( tree.currentIndex ); if(treeitem) {
var start = new Object(); var end = new Object(); var numRanges = tree.view.selection.getRangeCount(); gICalLib.batchMode = true; for (var t=0; t<numRanges; t++){ tree.view.selection.getRangeAt(t,start,end); for (var v=start.value; v<=end.value; v++){ var treeitem = tree.treeBoxObject.view.getItemAtIndex( v );
function unifinderDeleteToDoCommand( DoNotConfirm ){// TODO Implement Confirm var tree = document.getElementById( ToDoUnifinderTreeName ); if (tree.treeBoxObject.selection.count > 0) { var treeitem = tree.treeBoxObject.view.getItemAtIndex( tree.currentIndex ); if(treeitem) { var todoId = tr...
gICalLib.batchMode = false; toDoUnifinderRefresh();
function unifinderDeleteToDoCommand( DoNotConfirm ){// TODO Implement Confirm var tree = document.getElementById( ToDoUnifinderTreeName ); if (tree.treeBoxObject.selection.count > 0) { var treeitem = tree.treeBoxObject.view.getItemAtIndex( tree.currentIndex ); if(treeitem) { var todoId = tr...
if (event.button != 0) return;
function unifinderDoubleClickEvent( event ){ // find event by id var calendarEvent = getCalendarEventFromEvent( event ); if( calendarEvent != null ) { // go to day view, of the day of the event, select the event editEvent( calendarEvent ); }}
var SearchTree = document.getElementById( "unifinder-search-tree" );
var SearchTree = document.getElementById( "unifinder-search-results-tree" );
function unifinderInit( CalendarWindow ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { var CategoriesTree = document.getElementById( "unifinder-categories-tree" ); var SearchTree = document.getElementById( "unifinder-search-tree" ); ...
CategoriesTree.addItemToSelection( document.getElementById( "search-unifinder-treeitem-"+EventSelectionArray[i].id ) );
SearchTree.addItemToSelection( document.getElementById( "search-unifinder-treeitem-"+EventSelectionArray[i].id ) );
function unifinderInit( CalendarWindow ){ var unifinderEventSelectionObserver = { onSelectionChanged : function( EventSelectionArray ) { var CategoriesTree = document.getElementById( "unifinder-categories-tree" ); var SearchTree = document.getElementById( "unifinder-search-tree" ); ...
var SelectedItem = document.getElementById( "unifinder-categories-tree" ).selectedItems.item(0);
var SelectedItem = document.getElementById( "unifinder-categories-tree" ).selectedItems[0];
function unifinderModifyCommand(){ var SelectedItem = document.getElementById( "unifinder-categories-tree" ).selectedItems.item(0); if( SelectedItem ) { if( SelectedItem.getAttribute( "container" ) == "true" ) { launchEditCategoryDialog( SelectedItem.categoryobject ); } else { ...
if(event.button == 2) treechildren.setAttribute("context", "taskitem-context-menu")
function unifinderMouseDownToDo( event ){ var tree = document.getElementById( ToDoUnifinderTreeName ); var treechildren = tree.getElementsByTagName( "treechildren" )[0]; var ThisToDo = getToDoFromEvent( event ); if( ThisToDo ) { if(event.button == 2) treechildren.setAttribute("context", "taskite...
if(event.button == 2) treechildren.setAttribute("context", "context-menu");
function unifinderMouseDownToDo( event ){ var tree = document.getElementById( ToDoUnifinderTreeName ); var treechildren = tree.getElementsByTagName( "treechildren" )[0]; var ThisToDo = getToDoFromEvent( event ); if( ThisToDo ) { if(event.button == 2) treechildren.setAttribute("context", "taskite...
gCalendarWindow.currentView.goToDay( eventStartDate, true);
if( gCalendarWindow.currentView.getVisibleEvent( calendarEvent ) == false ) gCalendarWindow.currentView.goToDay( eventStartDate, true);
function unifinderOnSelect( event ){ dump( "\n\nin unifinder onselect" ); var ArrayOfEvents = new Array( ); gCalendarEventTreeClicked = true; var calendarEvent; //get the selected events from the tree var tree = document.getElementById( UnifinderTreeName ); var start = new Object(); var end = new ...
dump( "\n\nin unifinder onselect" );
dump( "\n\nin unifinder onselect\n" ); if( event.target.view.selection.getRangeCount() == 0 ) return;
function unifinderOnSelect( event ){ dump( "\n\nin unifinder onselect" ); var ArrayOfEvents = new Array( ); gCalendarEventTreeClicked = true; var calendarEvent; //get the selected events from the tree var tree = document.getElementById( UnifinderTreeName ); var start = new Object(); var end = new ...
else gICalLib.deleteEvent( calendarEvent.id );
function unifinderRemoveCommand( DoNotConfirm ){ var SelectedItems = gCalendarWindow.EventSelection.selectedEvents; if( SelectedItems.length == 1 ) { var calendarEvent = SelectedItems[0]; if ( calendarEvent.title != "" ) { if( !DoNotConfirm ) { if ( confirm( confirmDeleteEv...
catman = Components.classes["mozilla.categorymanager.1"]
catman = Components.classes["@mozilla.org/categorymanager;1"]
XMLtermModule.unregisterSelf =function(compMgr, fileSpec, location){ compMgr.unregisterComponentSpec(CLINE_SERVICE_CID, fileSpec); catman = Components.classes["mozilla.categorymanager.1"] .getService(nsICategoryManager); catman.deleteCategoryEntry("command-line-argument-handlers", ...
cr.unregisterFactoryLocation(GENERATOR_CLASSID, location); cr.unregisterFactoryLocation(PERSON_CLASSID, location);
unregisterSelf: function(cm, location, type) { var cr = cm.QueryInterface(Ci.nsIComponentRegistrar); // Feed Processor cr.unregisterFactoryLocation(FP_CLASSID, location); // Feed Result cr.unregisterFactoryLocation(FR_CLASSID, location); // Feed cr.unregisterFactoryLocation(FEED_CLASSID, location...
CalendarModule.unregisterSelf =
ChatzillaModule.unregisterSelf =
CalendarModule.unregisterSelf =function(compMgr, fileSpec, location){ compMgr = compMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar); compMgr.unregisterFactoryLocation(CLINE_SERVICE_CID, fileSpec); catman = Components.classes["@mozilla.org/categorymanager;1"] ...
aCompMgr = aCompMgr.QueryInterface( Components.interfaces.nsIComponentRegistrar); aCompMgr.unregisterFactoryLocation(this.mClassID, aFileSpec);
aCompMgr = aCompMgr.QueryInterface(Components.interfaces.nsIComponentRegistrar); for (var key in this.mObjects) { var obj = this.mObjects[key]; aCompMgr.unregisterFactoryLocation(obj.CID, aFileSpec); }
unregisterSelf: function(aCompMgr, aFileSpec, aLocation) { aCompMgr = aCompMgr.QueryInterface( Components.interfaces.nsIComponentRegistrar); aCompMgr.unregisterFactoryLocation(this.mClassID, aFileSpec); },
catman = Components.classes["@mozilla.org/categorymanager;1"].getService(Components.interfaces.nsICategoryManager); catman.deleteCategoryEntry("mailnews-accountmanager-extensions", "@mozilla.org/accountmanager/extension;1?name=newsblog", true);
unregisterSelf: function(aCompMgr, aFileSpec, aLocation) { aCompMgr = aCompMgr.QueryInterface( Components.interfaces.nsIComponentRegistrar); aCompMgr.unregisterFactoryLocation(this.mClassID, aFileSpec); },
var catman = Components.classes["mozilla.categorymanager.1"]
var catman = Components.classes["@mozilla.org/categorymanager;1"]
unregisterSelf: function(compMgr, fileSpec, location) { compMgr.unregisterComponentSpec(JSCONSOLEHANDLER_CID, fileSpec); var catman = Components.classes["mozilla.categorymanager.1"] .getService(Components.interfaces.nsICategoryManager); catman.deleteCategoryEntry("command-line-argume...
catman = Components.classes["mozilla.categorymanager.1"]
catman = Components.classes["@mozilla.org/categorymanager;1"]
ChatzillaModule.unregisterSelf =function(compMgr, fileSpec, location){ compMgr.unregisterComponentSpec(CLINE_SERVICE_CID, fileSpec); catman = Components.classes["mozilla.categorymanager.1"] .getService(nsICategoryManager); catman.deleteCategoryEntry("command-line-argument-handlers", ...
function unwrapToolbarItems()
function unwrapToolbarItems(aRemovePreviousSet)
function unwrapToolbarItems(){ for (var i = 0; i < gToolbox.childNodes.length; ++i) { var toolbar = getToolbarAt(i); if (isCustomizableToolbar(toolbar)) { toolbar.removeAttribute('previousset'); // remove previous set attribute for (var k = 0; k < toolbar.childNodes.length; ++k) { var paletteIt...
toolbar.removeAttribute('previousset');
if (aRemovePreviousSet) toolbar.removeAttribute('previousset');
function unwrapToolbarItems(){ for (var i = 0; i < gToolbox.childNodes.length; ++i) { var toolbar = getToolbarAt(i); if (isCustomizableToolbar(toolbar)) { toolbar.removeAttribute('previousset'); // remove previous set attribute for (var k = 0; k < toolbar.childNodes.length; ++k) { var paletteIt...
if (isToolbarItem(toolbarItem)) {
if (toolbarItem && isToolbarItem(toolbarItem)) {
function unwrapToolbarItems(){ for (var i = 0; i < gToolbox.childNodes.length; ++i) { var toolbar = getToolbarAt(i); if (isCustomizableToolbar(toolbar)) { toolbar.removeAttribute('previousset'); // remove previous set attribute for (var k = 0; k < toolbar.childNodes.length; ++k) { var paletteIt...
gClockId = setTimeout( "update_date( )", milliSecsTillTomorrow );
var gClockId = setTimeout( "update_date( )", milliSecsTillTomorrow );
function update_date( Refresh ){ // get the current time var now = new Date(); var tomorrow = new Date( now.getFullYear(), now.getMonth(), ( now.getDate() + 1 ) ); var milliSecsTillTomorrow = tomorrow.getTime() - now.getTime(); gCalendarWindow.currentView.hiliteTodaysDate(); gClockId = setTimeout( ...
debug("update: "+name)
function update_sort_menuitems(column, direction){ var unsorted_menuitem = document.getElementById("unsorted_menuitem"); var sort_ascending = document.getElementById('sort_ascending'); var sort_descending = document.getElementById('sort_descending'); // as this function may be called from various places, in...
var ndays = Number(getElementValue("daily-days")); if (ndays == "" || ndays < 1) { document.getElementById("repeat-interval-warning").removeAttribute("hidden"); acceptButton.setAttribute("disabled", "true"); }
interval = Number(getElementValue("daily-days")); break; case 1: interval = Number(getElementValue("weekly-weeks")); break; case 2: interval = Number(getElementValue("monthly-months"));
function updateAccept(){ var acceptButton = document.getElementById("calendar-recurrence-dialog").getButton("accept"); acceptButton.removeAttribute("disabled", "true"); document.getElementById("repeat-interval-warning").setAttribute("hidden", true); document.getElementById("repeat-numberoftimes-warning").se...