зеркало из https://github.com/mozilla/pjs.git
removing dump()s.
This commit is contained in:
Родитель
401ef38033
Коммит
cc16fa5b5e
|
@ -130,7 +130,6 @@ function addToUrlbarHistory()
|
|||
var uriToAdd = Components.classes["@mozilla.org/network/standard-url;1"]
|
||||
.createInstance(Components.interfaces.nsIURI);
|
||||
uriToAdd.spec = urlToAdd;
|
||||
//dump("** URL entered = " + urlToAdd + "\n");
|
||||
var rdfUri = Components.classes["@mozilla.org/network/standard-url;1"]
|
||||
.createInstance(Components.interfaces.nsIURI);
|
||||
while(elements.hasMoreElements()) {
|
||||
|
@ -138,14 +137,12 @@ function addToUrlbarHistory()
|
|||
if (entry) {
|
||||
index ++;
|
||||
entry= entry.QueryInterface(Components.interfaces.nsIRDFLiteral);
|
||||
var rdfValue = entry.Value;
|
||||
//dump("**** value obtained from RDF " + rdfValue + "\n");
|
||||
var rdfValue = entry.Value;
|
||||
rdfUri.spec = rdfValue;
|
||||
if (rdfUri.equals(uriToAdd)) {
|
||||
// URI already present in the database
|
||||
// Remove it from its current position.
|
||||
// It is inserted to the top after the while loop.
|
||||
//dump("*** URL are the same \n");
|
||||
entries.RemoveElementAt(index, true);
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,6 @@ function viewSource(url)
|
|||
createBrowserInstance();
|
||||
if (appCore == null) {
|
||||
// Give up.
|
||||
dump("Giving up...\n");
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
|
@ -25,7 +24,6 @@ function viewSource(url)
|
|||
}
|
||||
|
||||
catch(ex) {
|
||||
dump("Failed to create and initialiaze the AppCore...\n");
|
||||
}
|
||||
|
||||
var docShellElement = document.getElementById("content-frame");
|
||||
|
@ -38,7 +36,6 @@ function viewSource(url)
|
|||
if (window.arguments[1].indexOf('charset=') != -1) {
|
||||
var arrayArgComponents = window.arguments[1].split('=');
|
||||
if (arrayArgComponents) {
|
||||
dump("*** SetDocumentCharset(" + arrayArgComponents[1] + ")\n");
|
||||
appCore.SetDocumentCharset(arrayArgComponents[1]);
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +43,6 @@ function viewSource(url)
|
|||
}
|
||||
|
||||
catch(ex) {
|
||||
dump("*** Failed to SetDocumentCharset...\n");
|
||||
}
|
||||
|
||||
var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||
|
@ -59,9 +55,6 @@ function createBrowserInstance()
|
|||
appCore = Components
|
||||
.classes[ "@mozilla.org/appshell/component/browser/instance;1" ]
|
||||
.createInstance( Components.interfaces.nsIBrowserInstance );
|
||||
if ( !appCore ) {
|
||||
dump("Error creating browser instance\n");
|
||||
}
|
||||
}
|
||||
|
||||
function BrowserClose()
|
||||
|
@ -71,20 +64,14 @@ function BrowserClose()
|
|||
|
||||
function BrowserFind()
|
||||
{
|
||||
if (appCore) {
|
||||
appCore.find();
|
||||
} else {
|
||||
dump("BrowserAppCore has not been created!\n");
|
||||
}
|
||||
if (appCore)
|
||||
appCore.find();
|
||||
}
|
||||
|
||||
|
||||
function BrowserFindAgain()
|
||||
{
|
||||
if (appCore) {
|
||||
if (appCore)
|
||||
appCore.findNext();
|
||||
} else {
|
||||
dump("BrowserAppCore has not been created!\n");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -54,7 +54,6 @@ var contentAreaDNDObserver = {
|
|||
if (domselection && !domselection.isCollapsed &&
|
||||
domselection.containsNode(draggedNode,false))
|
||||
{
|
||||
dump("Dragging the selection..\n");
|
||||
var privateSelection = domselection.QueryInterface(Components.interfaces.nsISelectionPrivate);
|
||||
if (privateSelection)
|
||||
{
|
||||
|
@ -65,11 +64,9 @@ var contentAreaDNDObserver = {
|
|||
// how are we going to get the URL, if any? Scan the selection
|
||||
// for the first anchor? See bug #58315
|
||||
}
|
||||
dump("we cool?");
|
||||
}
|
||||
else
|
||||
{
|
||||
//dump("Dragging DOM node: <" + draggedNode.localName + ">\n");
|
||||
if (aEvent.altKey && findParentNode(draggedNode, 'a'))
|
||||
return false;
|
||||
switch (draggedNode.localName.toUpperCase())
|
||||
|
@ -113,7 +110,6 @@ var contentAreaDNDObserver = {
|
|||
this.normalizeSelection(linkNode, domselection);
|
||||
} catch (ex) {
|
||||
// non-fatal, so catch & ignore
|
||||
dump("Couldn't normalize selection: " + ex + "\n");
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@ -204,7 +200,6 @@ var contentAreaDNDObserver = {
|
|||
}
|
||||
|
||||
if (index >= nodelist.length) {
|
||||
dump("BAD: Could not find our position in the parent\n");
|
||||
throw Components.results.NS_ERROR_FAILURE;
|
||||
}
|
||||
|
||||
|
|
|
@ -67,7 +67,6 @@
|
|||
window._content && window._content.document) {
|
||||
var DocCharset = window._content.document.characterSet;
|
||||
var charsetArg = "charset="+DocCharset;
|
||||
dump("*** Current document charset: " + DocCharset + "\n");
|
||||
|
||||
//we should "inherit" the charset menu setting in a new window
|
||||
newWin = window.openDialog( getBrowserURL(), "_blank", "chrome,all,dialog=no", url, charsetArg );
|
||||
|
|
|
@ -33,7 +33,6 @@
|
|||
| longer term, this code will be restructured to make it more reusable. |
|
||||
------------------------------------------------------------------------------*/
|
||||
function nsContextMenu( xulMenu ) {
|
||||
dump("... entering nsContextMenu constructor in nsContextMenu.js\n");
|
||||
this.target = null;
|
||||
this.menu = null;
|
||||
this.onTextInput = false;
|
||||
|
@ -50,7 +49,6 @@ dump("... entering nsContextMenu constructor in nsContextMenu.js\n");
|
|||
|
||||
// Initialize new menu.
|
||||
this.initMenu( xulMenu );
|
||||
dump("... leaving nsContextMenu constructor in nsContextMenu.js\n");
|
||||
}
|
||||
|
||||
// Prototype for nsContextMenu "class."
|
||||
|
@ -210,7 +208,6 @@ nsContextMenu.prototype = {
|
|||
// Search child <area>s for a match.
|
||||
var areas = map.childNodes;
|
||||
//XXX Client side image maps are too hard for now!
|
||||
dump( "Client side image maps not supported yet, sorry!\n" );
|
||||
areas.length = 0;
|
||||
for ( var i = 0; i < areas.length && !this.onLink; i++ ) {
|
||||
var area = areas[i];
|
||||
|
@ -404,10 +401,10 @@ nsContextMenu.prototype = {
|
|||
this.target.ownerDocument.location.href);
|
||||
},
|
||||
viewInfo : function () {
|
||||
dump( "nsContextMenu.viewInfo not implemented yet\n" );
|
||||
// XXX not implemented
|
||||
},
|
||||
viewFrameInfo : function () {
|
||||
dump( "nsContextMenu.viewFrameInfo not implemented yet\n" );
|
||||
// XXX not implemented
|
||||
},
|
||||
// Open new window with the URL of the image.
|
||||
viewImage : function () {
|
||||
|
@ -816,7 +813,6 @@ nsContextMenu.prototype = {
|
|||
xfer.SelectFileAndTransferLocationSpec( url, window, "", "", doNotValidate, postData );
|
||||
} catch( exception ) {
|
||||
// Failed (or cancelled), give them another chance.
|
||||
dump( "SelectFileAndTransferLocationSpec failed, rv=" + exception + "\n" );
|
||||
}
|
||||
return;
|
||||
},
|
||||
|
|
|
@ -101,7 +101,6 @@ function toOpenWindowByType( inType, uri )
|
|||
|
||||
function OpenBrowserWindow()
|
||||
{
|
||||
dump("In OpenBrowserWindw()...\n");
|
||||
var charsetArg = new String();
|
||||
var handler = Components.classes['@mozilla.org/commandlinehandler/general-startup;1?type=browser'];
|
||||
handler = handler.getService();
|
||||
|
@ -117,7 +116,6 @@ function OpenBrowserWindow()
|
|||
{
|
||||
var DocCharset = window._content.document.characterSet;
|
||||
charsetArg = "charset="+DocCharset;
|
||||
dump("*** Current document charset: " + DocCharset + "\n");
|
||||
|
||||
//we should "inherit" the charset menu setting in a new window
|
||||
window.openDialog(url, "_blank", "chrome,all,dialog=no", startpage, charsetArg);
|
||||
|
@ -138,7 +136,6 @@ function newWindowOfType( aType )
|
|||
NewEditorWindow();
|
||||
break;
|
||||
default:
|
||||
dump( "Unsupported type of window: " + aType + "\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -180,25 +177,19 @@ function toEditor()
|
|||
function ShowWindowFromResource( node )
|
||||
{
|
||||
var windowManager = Components.classes['@mozilla.org/rdf/datasource;1?name=window-mediator'].getService();
|
||||
dump("got window Manager \n");
|
||||
var windowManagerInterface = windowManager.QueryInterface( Components.interfaces.nsIWindowMediator);
|
||||
dump("got interface \n");
|
||||
|
||||
var desiredWindow = null;
|
||||
var url = node.getAttribute('id');
|
||||
dump( url +" finding \n" );
|
||||
desiredWindow = windowManagerInterface.getWindowForResource( url );
|
||||
dump( "got window \n");
|
||||
if ( desiredWindow )
|
||||
{
|
||||
dump("focusing \n");
|
||||
desiredWindow.focus();
|
||||
}
|
||||
}
|
||||
|
||||
function OpenTaskURL( inURL )
|
||||
{
|
||||
dump("loading "+inURL+"\n");
|
||||
|
||||
window.open( inURL );
|
||||
}
|
||||
|
@ -206,7 +197,6 @@ function OpenTaskURL( inURL )
|
|||
function ShowUpdateFromResource( node )
|
||||
{
|
||||
var url = node.getAttribute('url');
|
||||
dump( url +" finding \n" );
|
||||
// hack until I get a new interface on xpiflash to do a
|
||||
// look up on the name/url pair.
|
||||
OpenTaskURL( "http://www.mozilla.org/binaries.html");
|
||||
|
|
|
@ -242,24 +242,20 @@ function walletPreview(aForm) {
|
|||
|
||||
function goToggleToolbar( id, elementID )
|
||||
{
|
||||
dump( "toggling toolbar "+id+"\n");
|
||||
var toolbar = document.getElementById( id );
|
||||
var element = document.getElementById( elementID );
|
||||
if ( toolbar )
|
||||
{
|
||||
var attribValue = toolbar.getAttribute("hidden") ;
|
||||
|
||||
//dump("set hidden to "+!attribValue+"\n");
|
||||
if ( attribValue == "true" )
|
||||
{
|
||||
// dump( "Show \n");
|
||||
toolbar.setAttribute("hidden", "false" );
|
||||
if ( element )
|
||||
element.setAttribute("checked","true")
|
||||
}
|
||||
else
|
||||
{
|
||||
// dump("hide \n");
|
||||
toolbar.setAttribute("hidden", true );
|
||||
if ( element )
|
||||
element.setAttribute("checked","false")
|
||||
|
@ -304,7 +300,6 @@ function openTopWin( url )
|
|||
but if we do this we need to have the option for chrome controls because goClickThrobber()
|
||||
needs to use this function with chrome controls */
|
||||
/* also, do we want to limit the number of help windows that can be spawned? */
|
||||
// dump("SetPrefToCurrentPage("+ url +")\n");
|
||||
if ((url == null) || (url == "")) return;
|
||||
|
||||
// xlate the URL if necessary
|
||||
|
@ -315,7 +310,6 @@ function openTopWin( url )
|
|||
|
||||
// avoid loading "", since this loads a directory listing
|
||||
if (url == "") {
|
||||
dump("openTopWin told to load an empty URL, so loading about:blank instead\n");
|
||||
url = "about:blank";
|
||||
}
|
||||
|
||||
|
@ -355,7 +349,6 @@ function goAboutDialog()
|
|||
|
||||
function goUpdateGlobalEditMenuItems()
|
||||
{
|
||||
//dump("Updating edit menu items\n");
|
||||
goUpdateCommand('cmd_undo');
|
||||
goUpdateCommand('cmd_redo');
|
||||
goUpdateCommand('cmd_cut');
|
||||
|
@ -373,7 +366,6 @@ function goUpdateFormsEditMenuItems() {
|
|||
// update menu items that rely on the current selection
|
||||
function goUpdateSelectEditMenuItems()
|
||||
{
|
||||
//dump("Updating select menu items\n");
|
||||
goUpdateCommand('cmd_cut');
|
||||
goUpdateCommand('cmd_copy');
|
||||
goUpdateCommand('cmd_delete');
|
||||
|
@ -382,7 +374,6 @@ function goUpdateSelectEditMenuItems()
|
|||
// update menu items that relate to undo/redo
|
||||
function goUpdateUndoEditMenuItems()
|
||||
{
|
||||
//dump("Updating undo/redo menu items\n");
|
||||
goUpdateCommand('cmd_undo');
|
||||
goUpdateCommand('cmd_redo');
|
||||
}
|
||||
|
@ -390,14 +381,12 @@ function goUpdateUndoEditMenuItems()
|
|||
// update menu items that depend on clipboard contents
|
||||
function goUpdatePasteMenuItems()
|
||||
{
|
||||
//dump("Updating clipboard menu items\n");
|
||||
goUpdateCommand('cmd_paste');
|
||||
}
|
||||
|
||||
// This used to be BrowserNewEditorWindow in navigator.js
|
||||
function NewEditorWindow()
|
||||
{
|
||||
dump("In NewEditorWindow()...\n");
|
||||
// Open editor window with blank page
|
||||
// Kludge to leverage openDialog non-modal!
|
||||
window.openDialog( "chrome://editor/content", "_blank", "chrome,all,dialog=no", "about:blank");
|
||||
|
@ -405,12 +394,12 @@ function NewEditorWindow()
|
|||
|
||||
function NewEditorFromTemplate()
|
||||
{
|
||||
dump("NOT IMPLEMENTED: Write NewEditorFromTemplate()!\n")
|
||||
// XXX not implemented
|
||||
}
|
||||
|
||||
function NewEditorFromDraft()
|
||||
{
|
||||
dump("NOT IMPLEMENTED: Write NewEditorFromDraft()!\n")
|
||||
// XXX not implemented
|
||||
}
|
||||
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче