cvs removing files moved to suite/ by bug 349220, still r+sr=Neil

This commit is contained in:
kairo%kairo.at 2006-09-14 19:10:01 +00:00
Родитель 006997ce62
Коммит 0a8f6f0f46
73 изменённых файлов: 0 добавлений и 11807 удалений

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

@ -1 +0,0 @@
Makefile

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

@ -1,2 +0,0 @@
Makefile
viewSource.xul.out

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

@ -1,285 +0,0 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Blake Ross <blakeross@telocity.com>
* Peter Annema <disttsc@bart.nl>
* Samir Gehani <sgehani@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
const nsIWebNavigation = Components.interfaces.nsIWebNavigation;
var gPrintSettingsAreGlobal = true;
var gSavePrintSettings = true;
var gChromeState = null; // chrome state before we went into print preview
var gInPrintPreviewMode = false;
function getWebNavigation()
{
try {
return getBrowser().webNavigation;
} catch (e) {
return null;
}
}
function BrowserReloadWithFlags(reloadFlags)
{
/* First, we'll try to use the session history object to reload so
* that framesets are handled properly. If we're in a special
* window (such as view-source) that has no session history, fall
* back on using the web navigation's reload method.
*/
var webNav = getWebNavigation();
try {
var sh = webNav.sessionHistory;
if (sh)
webNav = sh.QueryInterface(Components.interfaces.nsIWebNavigation);
} catch (e) {
}
try {
webNav.reload(reloadFlags);
} catch (e) {
}
}
function toggleAffectedChrome(aHide)
{
// chrome to toggle includes:
// (*) menubar
// (*) navigation bar
// (*) personal toolbar
// (*) tab browser ``strip''
// (*) sidebar
// (*) statusbar
if (!gChromeState)
gChromeState = new Object;
var statusbar = document.getElementById("status-bar");
var navToolbox = document.getElementById("navigator-toolbox");
navToolbox.hidden = aHide;
var theTabbrowser = document.getElementById("content");
// sidebar states map as follows:
// was-hidden => hide/show nothing
// was-collapsed => hide/show only the splitter
// was-shown => hide/show the splitter and the box
if (aHide)
{
// going into print preview mode
if (sidebar_is_collapsed())
{
gChromeState.sidebar = "was-collapsed";
}
else if (sidebar_is_hidden())
gChromeState.sidebar = "was-hidden";
else
{
gChromeState.sidebar = "was-visible";
}
document.getElementById("sidebar-box").hidden = true;
document.getElementById("sidebar-splitter").hidden = true;
// deal with tab browser
gChromeState.hadTabStrip = theTabbrowser.getStripVisibility();
theTabbrowser.setStripVisibilityTo(false);
// deal with the Status Bar
gChromeState.statusbarWasHidden = statusbar.hidden;
statusbar.hidden = true;
}
else
{
// restoring normal mode (i.e., leaving print preview mode)
if (gChromeState.sidebar == "was-collapsed" ||
gChromeState.sidebar == "was-visible")
document.getElementById("sidebar-splitter").hidden = false;
if (gChromeState.sidebar == "was-visible")
document.getElementById("sidebar-box").hidden = false;
// restore tab browser
theTabbrowser.setStripVisibilityTo(gChromeState.hadTabStrip);
// restore the Status Bar
statusbar.hidden = gChromeState.statusbarWasHidden;
}
// if we are unhiding and sidebar used to be there rebuild it
if (!aHide && gChromeState.sidebar == "was-visible")
SidebarRebuild();
}
function onEnterPrintPreview()
{
toggleAffectedChrome(true);
gInPrintPreviewMode = true;
}
function onExitPrintPreview()
{
gInPrintPreviewMode = false;
// restore chrome to original state
toggleAffectedChrome(false);
}
function getEngineWebBrowserPrint()
{
return content.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIWebBrowserPrint);
}
function getNavToolbox()
{
return document.getElementById("navigator-toolbox");
}
function getPPBrowser()
{
return document.getElementById("browser");
}
function BrowserPrintPreview()
{
PrintUtils.printPreview(onEnterPrintPreview, onExitPrintPreview);
}
function BrowserSetDefaultCharacterSet(aCharset)
{
// no longer needed; set when setting Force; see bug 79608
}
function BrowserSetForcedCharacterSet(aCharset)
{
var docCharset = getBrowser().docShell.QueryInterface(
Components.interfaces.nsIDocCharset);
docCharset.charset = aCharset;
BrowserReloadWithFlags(nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
}
function BrowserSetForcedDetector(doReload)
{
getBrowser().documentCharsetInfo.forcedDetector = true;
if (doReload)
BrowserReloadWithFlags(nsIWebNavigation.LOAD_FLAGS_CHARSET_CHANGE);
}
var gFindInstData;
function getFindInstData()
{
if (!gFindInstData) {
gFindInstData = new nsFindInstData();
gFindInstData.browser = getBrowser();
// defaults for rootSearchWindow and currentSearchWindow are fine here
}
return gFindInstData;
}
function BrowserFind()
{
findInPage(getFindInstData());
}
function BrowserFindAgain(reverse)
{
findAgainInPage(getFindInstData(), reverse);
}
function BrowserCanFindAgain()
{
return canFindAgainInPage();
}
function getMarkupDocumentViewer()
{
return getBrowser().markupDocumentViewer;
}
/**
* Content area tooltip.
* XXX - this must move into XBL binding/equiv! Do not want to pollute
* navigator.js with functionality that can be encapsulated into
* browser widget. TEMPORARY!
*
* NOTE: Any changes to this routine need to be mirrored in ChromeListener::FindTitleText()
* (located in mozilla/embedding/browser/webBrowser/nsDocShellTreeOwner.cpp)
* which performs the same function, but for embedded clients that
* don't use a XUL/JS layer. It is important that the logic of
* these two routines be kept more or less in sync.
* (pinkerton)
**/
function FillInHTMLTooltip(tipElement)
{
var retVal = false;
if (tipElement.namespaceURI == "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul")
return retVal;
const XLinkNS = "http://www.w3.org/1999/xlink";
var titleText = null;
var XLinkTitleText = null;
var direction = tipElement.ownerDocument.dir;
while (!titleText && !XLinkTitleText && tipElement) {
if (tipElement.nodeType == Node.ELEMENT_NODE) {
titleText = tipElement.getAttribute("title");
XLinkTitleText = tipElement.getAttributeNS(XLinkNS, "title");
var defView = tipElement.ownerDocument.defaultView;
// XXX Work around bug 350679:
// "Tooltips can be fired in documents with no view".
if (!defView)
return retVal;
direction = defView.getComputedStyle(tipElement, "")
.getPropertyValue("direction");
}
tipElement = tipElement.parentNode;
}
var texts = [titleText, XLinkTitleText];
var tipNode = document.getElementById("aHTMLTooltip");
tipNode.style.direction = direction;
for (var i = 0; i < texts.length; ++i) {
var t = texts[i];
if (t && t.search(/\S/) >= 0) {
// XXX - Short-term fix to bug 67127: collapse whitespace here
tipNode.setAttribute("label", t.replace(/\s+/g, " ") );
retVal = true;
}
}
return retVal;
}

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

@ -1,17 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:navigator-region"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:navigator-region"
chrome:author="mozilla.org"
chrome:name="navigator-region"
#expand chrome:localeVersion="__MOZILLA_REGION_VERSION__">
</RDF:Description>
</RDF:RDF>

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

@ -1,21 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:navigator"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:navigator"
chrome:displayName="Navigator"
chrome:author="mozilla.org"
chrome:name="navigator"
chrome:xpcNativeWrappers="true"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__"
#expand chrome:skinVersion="__MOZILLA_SKIN_VERSION__">
</RDF:Description>
</RDF:RDF>

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

@ -1,89 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 Eric Hodel's <drbrain@segment7.net> code.
*
* The Initial Developer of the Original Code is
* Eric Hodel.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Christopher Hoess <choess@force.stwing.upenn.edu>
* Tim Taylor <tim@tool-man.org>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* LanguageDictionary is a Singleton for looking up a language name
* given its language code.
*/
function LanguageDictionary() {
this.dictionary = null;
}
LanguageDictionary.prototype = {
lookupLanguageName: function(languageCode)
{
if (this.getDictionary()[languageCode])
return this.getDictionary()[languageCode];
else
// XXX: handle non-standard language code's per
// hixie's spec (see bug 2800)
return "";
},
getDictionary: function()
{
if (!this.dictionary)
this.dictionary = LanguageDictionary.createDictionary();
return this.dictionary;
}
}
LanguageDictionary.createDictionary = function()
{
var dictionary = new Array();
var e = LanguageDictionary.getLanguageNames().getSimpleEnumeration();
while (e.hasMoreElements()) {
var property = e.getNext();
property = property.QueryInterface(
Components.interfaces.nsIPropertyElement);
dictionary[property.key] = property.value;
}
return dictionary;
}
LanguageDictionary.getLanguageNames = function()
{
return srGetStrBundle(
"chrome://global/locale/languageNames.properties");
}
const languageDictionary = new LanguageDictionary();

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

@ -1,290 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 Eric Hodel's <drbrain@segment7.net> code.
*
* The Initial Developer of the Original Code is
* Eric Hodel.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Christopher Hoess <choess@force.stwing.upenn.edu>
* Tim Taylor <tim@tool-man.org>
* Stuart Ballard <sballard@netreach.net>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/**
* LinkToolbarHandler is a Singleton that displays LINK elements
* and nodeLists of LINK elements in the Link Toolbar. It
* associates the LINK with a corresponding LinkToolbarItem based
* on it's REL attribute and the toolbar item's ID attribute.
* LinkToolbarHandler is also a Factory and will create
* LinkToolbarItems as necessary.
*/
function LinkToolbarHandler()
{
this.items = new Array();
this.hasItems = false;
}
LinkToolbarHandler.prototype.handle =
function(element)
{
// XXX: if you're going to re-enable handling of anchor elements,
// you'll want to change this to AnchorElementDecorator
var linkElement = new LinkElementDecorator(element);
if (linkElement.isIgnored()) return;
for (var i = 0; i < linkElement.relValues.length; i++) {
var linkType = LinkToolbarHandler.getLinkType(linkElement.relValues[i]);
if (linkType) {
if (!this.hasItems) {
this.hasItems = true;
linkToolbarUI.activate();
}
this.getItemForLinkType(linkType).displayLink(linkElement);
}
}
}
LinkToolbarHandler.getLinkType =
function(relAttribute)
{
switch (relAttribute.toLowerCase()) {
case "start":
case "top":
case "origin":
return "top";
case "up":
case "parent":
return "up";
case "begin":
case "first":
return "first";
case "next":
case "child":
return "next";
case "prev":
case "previous":
return "prev";
case "end":
case "last":
return "last";
case "author":
case "made":
return "author";
case "contents":
case "toc":
return "toc";
case "prefetch":
return null;
default:
return relAttribute.toLowerCase();
}
}
LinkToolbarHandler.prototype.getItemForLinkType =
function(linkType) {
if (!(linkType in this.items && this.items[linkType]))
this.items[linkType] = LinkToolbarHandler.createItemForLinkType(linkType);
return this.items[linkType];
}
LinkToolbarHandler.createItemForLinkType =
function(linkType)
{
if (!document.getElementById("link-" + linkType))
return new LinkToolbarTransientMenu(linkType);
// XXX: replace switch with polymorphism
switch(document.getElementById("link-" + linkType).localName) {
case "toolbarbutton":
return new LinkToolbarButton(linkType);
case "menuitem":
return new LinkToolbarItem(linkType);
case "menu":
return new LinkToolbarMenu(linkType);
default:
return new LinkToolbarTransientMenu(linkType);
}
}
LinkToolbarHandler.prototype.clearAllItems =
function()
{
// Hide the 'miscellaneous' separator
document.getElementById("misc-separator").setAttribute("collapsed", "true");
// Disable the individual items
for (var linkType in this.items)
this.items[linkType].clear();
// Store the fact that the toolbar is empty
this.hasItems = false;
}
const linkToolbarHandler = new LinkToolbarHandler();
function LinkElementDecorator(element) {
/*
* XXX: this is an incomplete decorator, because it doesn't implement
* the full Element interface. If you need to use a method
* or member in the Element interface, just add it here and
* have it delegate to this.element
*
* XXX: would rather add some methods to Element.prototype instead of
* using a decorator, but Element.prototype is no longer exposed
* since the XPCDOM landing, see bug 83433
*/
if (!element) return; // skip the rest on foo.prototype = new ThisClass calls
this.element = element;
this.rel = LinkElementDecorator.convertRevMade(element.rel, element.rev);
if (this.rel)
this.relValues = this.rel.split(" ");
this.rev = element.rev;
this.title = element.title;
this.href = element.href;
this.hreflang = element.hreflang;
this.media = element.media;
this.longTitle = null;
}
LinkElementDecorator.prototype.isIgnored =
function()
{
if (!this.rel) return true;
for (var i = 0; i < this.relValues.length; i++)
if (/^stylesheet$|^icon$|^fontdef$|^p3pv|^schema./i.test(this.relValues[i]))
return true;
return false;
}
LinkElementDecorator.convertRevMade =
function(rel, rev)
{
if (!rel && rev && /\bmade\b/i.test(rev))
return rev;
else
return rel;
}
LinkElementDecorator.prototype.getTooltip =
function()
{
return this.getLongTitle() != "" ? this.getLongTitle() : this.href;
}
LinkElementDecorator.prototype.getLabel =
function()
{
return this.getLongTitle() != "" ? this.getLongTitle() : this.rel;
}
LinkElementDecorator.prototype.getLongTitle =
function()
{
if (this.longTitle == null)
this.longTitle = this.makeLongTitle();
return this.longTitle;
}
LinkElementDecorator.prototype.makeLongTitle =
function()
{
var prefix = "";
// XXX: lookup more meaningful and localized version of media,
// i.e. media="print" becomes "Printable" or some such
// XXX: use localized version of ":" separator
if (this.media && !/\ball\b|\bscreen\b/i.test(this.media))
prefix += this.media + ": ";
if (this.hreflang)
prefix += languageDictionary.lookupLanguageName(this.hreflang)
+ ": ";
return this.title ? prefix + this.title : prefix;
}
function AnchorElementDecorator(element) {
this.constructor(element);
}
AnchorElementDecorator.prototype = new LinkElementDecorator;
AnchorElementDecorator.prototype.getLongTitle =
function()
{
return this.title ? this.__proto__.getLongTitle.apply(this)
: getText(this.element);
}
AnchorElementDecorator.prototype.getText =
function(element)
{
return condenseWhitespace(getTextRecursive(element));
}
AnchorElementDecorator.prototype.getTextRecursive =
function(node)
{
var text = "";
node.normalize();
if (node.hasChildNodes()) {
for (var i = 0; i < node.childNodes.length; i++) {
if (node.childNodes.item(i).nodeType == Node.TEXT_NODE)
text += node.childNodes.item(i).nodeValue;
else if (node.childNodes.item(i).nodeType == Node.ELEMENT_NODE)
text += getTextRecursive(node.childNodes.item(i));
}
}
return text;
}
AnchorElementDecorator.prototype.condenseWhitespace =
function(text)
{
return text.replace(/\W*$/, "").replace(/^\W*/, "").replace(/\W+/g, " ");
}

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

@ -1,254 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 Eric Hodel's <drbrain@segment7.net> code.
*
* The Initial Developer of the Original Code is
* Eric Hodel.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Christopher Hoess <choess@force.stwing.upenn.edu>
* Tim Taylor <tim@tool-man.org>
* Stuart Ballard <sballard@netreach.net>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
/*
* LinkToolbarItem and its subclasses represent the buttons, menuitems,
* and menus that handle the various link types.
*/
function LinkToolbarItem (linkType) {
this.linkType = linkType;
this.xulElementId = "link-" + linkType;
this.xulPopupId = this.xulElementId + "-popup";
this.parentMenuButton = null;
this.getXULElement = function() {
return document.getElementById(this.xulElementId);
}
this.clear = function() {
this.disableParentMenuButton();
this.getXULElement().setAttribute("disabled", "true");
this.getXULElement().removeAttribute("href");
}
this.displayLink = function(linkElement) {
if (this.getXULElement().hasAttribute("href")) return false;
this.setItem(linkElement);
this.enableParentMenuButton();
return true;
}
this.setItem = function(linkElement) {
this.getXULElement().setAttribute("href", linkElement.href);
this.getXULElement().removeAttribute("disabled");
}
this.enableParentMenuButton = function() {
if(this.getParentMenuButton())
this.getParentMenuButton().removeAttribute("disabled");
}
this.disableParentMenuButton = function() {
if (!this.parentMenuButton) return;
this.parentMenuButton.setAttribute("disabled", "true");
this.parentMenuButton = null;
}
this.getParentMenuButton = function() {
if (!this.parentMenuButton)
this.parentMenuButton = getParentMenuButtonRecursive(
this.getXULElement());
return this.parentMenuButton;
}
function getParentMenuButtonRecursive(xulElement) {
if (!xulElement) return null;
if (xulElement.tagName == "toolbarbutton")
return xulElement;
return getParentMenuButtonRecursive(xulElement.parentNode)
}
}
function LinkToolbarButton (linkType) {
this.constructor(linkType);
this.clear = function() {
this.__proto__.clear.apply(this);
this.getXULElement().removeAttribute("tooltiptext");
}
this.setItem = function(linkElement) {
this.__proto__.setItem.apply(this, [linkElement]);
this.getXULElement().setAttribute("tooltiptext", linkElement.getTooltip());
}
this.enableParentMenuButton = function() { /* do nothing */ }
this.disableParentMenuButton = function() { /* do nothing */ }
}
LinkToolbarButton.prototype = new LinkToolbarItem;
function LinkToolbarMenu (linkType) {
this.constructor(linkType);
this.clear = function() {
this.disableParentMenuButton();
this.getXULElement().setAttribute("disabled", "true");
clearPopup(this.getPopup());
}
function clearPopup(popup) {
while (popup.hasChildNodes())
popup.removeChild(popup.lastChild);
}
this.getPopup = function() {
return document.getElementById(this.xulPopupId);
}
this.displayLink = function(linkElement) {
this.addMenuItem(linkElement);
this.getXULElement().removeAttribute("disabled");
this.enableParentMenuButton();
return true;
}
function match(first, second) {
if (!first && !second) return true;
if (!first || !second) return false;
return first == second;
}
this.addMenuItem = function(linkElement) {
this.getPopup().appendChild(this.createMenuItem(linkElement));
}
this.createMenuItem = function(linkElement) {
// XXX: clone a prototypical XUL element instead of hardcoding these
// attributes
var menuitem = document.createElement("menuitem");
menuitem.setAttribute("label", linkElement.getLabel());
menuitem.setAttribute("href", linkElement.href);
menuitem.setAttribute("class", "menuitem-iconic bookmark-item");
menuitem.setAttribute("rdf:type",
"rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#linkType");
return menuitem;
}
}
LinkToolbarMenu.prototype = new LinkToolbarItem;
function LinkToolbarTransientMenu (linkType) {
this.constructor(linkType);
this.getXULElement = function() {
if (this.__proto__.getXULElement.apply(this))
return this.__proto__.getXULElement.apply(this);
else
return this.createXULElement();
}
this.createXULElement = function() {
// XXX: clone a prototypical XUL element instead of hardcoding these
// attributes
var menu = document.createElement("menu");
menu.setAttribute("id", this.xulElementId);
menu.setAttribute("label", this.linkType);
menu.setAttribute("disabled", "true");
menu.setAttribute("class", "menu-iconic bookmark-item");
menu.setAttribute("container", "true");
menu.setAttribute("type", "rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type");
document.getElementById("more-menu-popup").appendChild(menu);
return menu;
}
this.getPopup = function() {
if (!this.__proto__.getPopup.apply(this))
this.getXULElement().appendChild(this.createPopup());
return this.__proto__.getPopup.apply(this)
}
this.createPopup = function() {
var popup = document.createElement("menupopup");
popup.setAttribute("id", this.xulPopupId);
return popup;
}
this.clear = function() {
this.__proto__.clear.apply(this);
// XXX: we really want to use this instead of removeXULElement
//this.hideXULElement();
this.removeXULElement();
}
this.hideXULElement = function() {
/*
* XXX: using "hidden" or "collapsed" leads to a crash when you
* open the More menu under certain circumstances. Maybe
* related to bug 83906. As of 0.9.2 I it doesn't seem
* to crash anymore.
*/
this.getXULElement().setAttribute("collapsed", "true");
}
this.removeXULElement = function() {
// XXX: stop using this method once it's safe to use hideXULElement
if (this.__proto__.getXULElement.apply(this))
this.__proto__.getXULElement.apply(this).parentNode.removeChild(
this.__proto__.getXULElement.apply(this));
}
this.displayLink = function(linkElement) {
if(!this.__proto__.displayLink.apply(this, [linkElement])) return false;
this.getXULElement().removeAttribute("collapsed");
// Show the 'miscellaneous' separator
document.getElementById("misc-separator").removeAttribute("collapsed");
return true;
}
}
LinkToolbarTransientMenu.prototype = new LinkToolbarMenu;

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

@ -1,257 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 Eric Hodel's <drbrain@segment7.net> code.
*
* The Initial Developer of the Original Code is
* Eric Hodel.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Christopher Hoess <choess@force.stwing.upenn.edu>
* Tim Taylor <tim@tool-man.org>
* Henri Sivonen <henris@clinet.fi>
* Stuart Ballard <sballard@netreach.net>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
var LinkToolbarUI = function()
{
}
LinkToolbarUI.prototype.linkAdded =
function(event)
{
var element = event.originalTarget;
if (element.ownerDocument != getBrowser().contentDocument ||
!linkToolbarUI.isLinkToolbarEnabled() ||
!element instanceof Components.interfaces.nsIDOMHTMLLinkElement ||
!element.href || (!element.rel && !element.rev))
return;
linkToolbarHandler.handle(element);
}
LinkToolbarUI.prototype.isLinkToolbarEnabled =
function()
{
if (document.getElementById("linktoolbar").getAttribute("hidden") == "true")
return false;
else
return true;
}
LinkToolbarUI.prototype.clear =
function(event)
{
if (event.originalTarget != getBrowser().contentDocument ||
!linkToolbarUI.isLinkToolbarEnabled() ||
!linkToolbarHandler.hasItems)
return;
linkToolbarHandler.clearAllItems();
}
LinkToolbarUI.prototype.tabSelected =
function(event)
{
if (event.originalTarget.localName != "tabs" ||
!linkToolbarUI.isLinkToolbarEnabled())
return;
linkToolbarHandler.clearAllItems();
linkToolbarUI.deactivate();
linkToolbarUI.fullSlowRefresh();
}
LinkToolbarUI.prototype.fullSlowRefresh =
function()
{
var currentNode = getBrowser().contentDocument.documentElement;
if (!(currentNode instanceof Components.interfaces.nsIDOMHTMLHtmlElement))
return;
currentNode = currentNode.firstChild;
while(currentNode)
{
if (currentNode instanceof Components.interfaces.nsIDOMHTMLHeadElement) {
currentNode = currentNode.firstChild;
while(currentNode)
{
if (currentNode instanceof Components.interfaces.nsIDOMHTMLLinkElement)
linkToolbarUI.linkAdded({originalTarget: currentNode});
currentNode = currentNode.nextSibling;
}
}
else if (currentNode instanceof Components.interfaces.nsIDOMElement)
{
// head is supposed to be the first element inside html.
// Got something else instead. returning
return;
}
else
{
// Got a comment node or something like that. Moving on.
currentNode = currentNode.nextSibling;
}
}
}
LinkToolbarUI.prototype.toolbarActive = false;
LinkToolbarUI.prototype.activate =
function()
{
if (!linkToolbarUI.toolbarActive) {
linkToolbarUI.toolbarActive = true;
document.getElementById("linktoolbar").setAttribute("hasitems", "true");
var contentArea = document.getElementById("appcontent");
contentArea.addEventListener("pagehide", linkToolbarUI.clear, true);
contentArea.addEventListener("pageshow", linkToolbarUI.deactivate, true);
contentArea.addEventListener("DOMHeadLoaded", linkToolbarUI.deactivate,
true);
}
}
LinkToolbarUI.prototype.deactivate =
function()
{
// This function can never be called unless the toolbar is active, because
// it's a handler that's only activated in that situation, so there's no need
// to check toolbarActive. On the other hand, by the time this method is
// called the toolbar might have been populated again already, in which case
// we don't want to deactivate.
if (!linkToolbarHandler.hasItems) {
linkToolbarUI.toolbarActive = false;
document.getElementById("linktoolbar").setAttribute("hasitems", "false");
var contentArea = document.getElementById("appcontent");
contentArea.removeEventListener("pagehide", linkToolbarUI.clear, true);
contentArea.removeEventListener("pageshow", linkToolbarUI.deactivate, true);
contentArea.removeEventListener("DOMHeadLoaded", linkToolbarUI.deactivate,
true);
}
}
/* called whenever something on the toolbar gets an oncommand event */
LinkToolbarUI.prototype.commanded =
function(event)
{
// Return if this is one of the menubuttons.
if (event.target.getAttribute("type") == "menu") return;
if (!event.target.getAttribute("href")) return;
var destURL = event.target.getAttribute("href");
// We have to do a security check here, because we are loading URIs given
// to us by a web page from chrome, which is privileged.
try {
var ssm = Components.classes["@mozilla.org/scriptsecuritymanager;1"].getService().
QueryInterface(Components.interfaces.nsIScriptSecurityManager);
ssm.checkLoadURIStr(window.content.location.href, destURL, 0);
var referrer =
Components.classes["@mozilla.org/network/standard-url;1"].
createInstance(Components.interfaces.nsIURI);
referrer.spec = window.content.location.href;
loadURI(destURL, referrer);
} catch (e) {
dump("Error: it is not permitted to load this URI from a <link> element: " + e);
}
}
// functions for twiddling XUL elements in the toolbar
LinkToolbarUI.prototype.toggleLinkToolbar =
function(checkedItem)
{
this.goToggleTristateToolbar("linktoolbar", checkedItem);
this.initHandlers();
if (this.isLinkToolbarEnabled())
this.fullSlowRefresh();
else
linkToolbarHandler.clearAllItems();
}
LinkToolbarUI.prototype.initLinkbarVisibilityMenu =
function()
{
var state = document.getElementById("linktoolbar").getAttribute("hidden");
if (!state)
state = "maybe";
var checkedItem = document.getElementById("cmd_viewlinktoolbar_" + state);
checkedItem.setAttribute("checked", true);
checkedItem.checked = true;
}
LinkToolbarUI.prototype.goToggleTristateToolbar =
function(id, checkedItem)
{
var toolbar = document.getElementById(id);
if (toolbar)
{
toolbar.setAttribute("hidden", checkedItem.value);
document.persist(id, "hidden");
}
}
LinkToolbarUI.prototype.addHandlerActive = false;
LinkToolbarUI.prototype.initialized = false;
LinkToolbarUI.prototype.initHandlers =
function()
{
var contentArea = document.getElementById("appcontent");
if (linkToolbarUI.isLinkToolbarEnabled())
{
if (!linkToolbarUI.addHandlerActive) {
contentArea.addEventListener("select", linkToolbarUI.tabSelected,
false);
contentArea.addEventListener("DOMLinkAdded", linkToolbarUI.linkAdded,
true);
linkToolbarUI.addHandlerActive = true;
}
} else
{
if (linkToolbarUI.addHandlerActive) {
contentArea.removeEventListener("select", linkToolbarUI.tabSelected,
false);
contentArea.removeEventListener("DOMLinkAdded", linkToolbarUI.linkAdded,
true);
linkToolbarUI.addHandlerActive = false;
}
}
if (!linkToolbarUI.initialized)
{
linkToolbarUI.initialized = true;
document.removeEventListener("pageshow", linkToolbarUI.initHandlers, true);
}
}
const linkToolbarUI = new LinkToolbarUI;

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

@ -1,196 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- 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 Eric Hodel's <drbrain@segment7.net> code.
-
- The Initial Developer of the Original Code is
- Eric Hodel.
- Portions created by the Initial Developer are Copyright (C) 2001
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Christopher Hoess <choess@force.stwing.upenn.edu>
- Tim Taylor <tim@tool-man.org>
- Stuart Ballard <sballard@netreach.net>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://navigator/skin/linkToolbar.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<!DOCTYPE overlay SYSTEM "chrome://navigator/locale/linkToolbar.dtd">
<overlay id="linkToolbarOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:rdf="http://www.mozilla.org/rdf">
<!-- classes -->
<script type="application/x-javascript" src="chrome://navigator/content/linkToolbarHandler.js" />
<script type="application/x-javascript" src="chrome://navigator/content/linkToolbarItem.js" />
<script type="application/x-javascript" src="chrome://navigator/content/languageDictionary.js" />
<!-- functions -->
<script type="application/x-javascript" src="chrome://navigator/content/linkToolbarOverlay.js" />
<script type="application/x-javascript">
<![CDATA[
document.addEventListener("pageshow", linkToolbarUI.initHandlers, true);
]]>
</script>
<menupopup id="view_toolbars_popup">
<menu label="&linkToolbar.label;" position="3"
accesskey="&linkToolbar.accesskey;"
oncommand="linkToolbarUI.toggleLinkToolbar(event.target)"
onpopupshowing="linkToolbarUI.initLinkbarVisibilityMenu()">
<menupopup>
<menuitem label="&linkToolbarAlways.label;"
accesskey="&linkToolbarAlways.accesskey;"
class="menuitem-iconic" type="radio" value="false"
name="cmd_viewlinktoolbar" id="cmd_viewlinktoolbar_false" />
<menuitem label="&linkToolbarAsNeeded.label;"
accesskey="&linkToolbarAsNeeded.accesskey;"
class="menuitem-iconic" type="radio" value="maybe"
name="cmd_viewlinktoolbar" id="cmd_viewlinktoolbar_maybe" />
<menuitem label="&linkToolbarNever.label;"
accesskey="&linkToolbarNever.accesskey;"
class="menuitem-iconic" type="radio" value="true"
name="cmd_viewlinktoolbar" id="cmd_viewlinktoolbar_true" />
</menupopup>
</menu>
</menupopup>
<toolbox id="navigator-toolbox">
<toolbar id="linktoolbar" class="chromeclass-directories"
oncommand="event.stopPropagation(); return linkToolbarUI.commanded(event);"
tbalign="stretch" hidden="true" hasitems="false">
<toolbarbutton id="link-top" class="bookmark-item"
label="&topButton.label;" disabled="true"/>
<toolbarbutton id="link-up" class="bookmark-item"
label="&upButton.label;" disabled="true"/>
<toolbarseparator />
<toolbarbutton id="link-first" class="bookmark-item"
label="&firstButton.label;" disabled="true"/>
<toolbarbutton id="link-prev" class="bookmark-item"
label="&prevButton.label;" disabled="true"/>
<toolbarbutton id="link-next" class="bookmark-item"
label="&nextButton.label;" disabled="true"/>
<toolbarbutton id="link-last" class="bookmark-item"
label="&lastButton.label;" disabled="true"/>
<toolbarseparator />
<toolbarbutton id="document-menu" class="bookmark-item"
type="menu"
container="true"
label="&documentButton.label;" disabled="true">
<menupopup id="document-menu-popup">
<menuitem id="link-toc" label="&tocButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
<menu id="link-chapter" label="&chapterButton.label;" disabled="true"
class="menu-iconic bookmark-item" container="true"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<menupopup id="link-chapter-popup" />
</menu>
<menu id="link-section" label="&sectionButton.label;" disabled="true"
class="menu-iconic bookmark-item" container="true"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<menupopup id="link-section-popup" />
</menu>
<menu id="link-subsection" label="&subSectionButton.label;" disabled="true"
class="menu-iconic bookmark-item" container="true"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<menupopup id="link-subsection-popup" />
</menu>
<menu id="link-appendix" label="&appendixButton.label;" disabled="true"
class="menu-iconic bookmark-item" container="true"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<menupopup id="link-appendix-popup" />
</menu>
<menuitem id="link-glossary" label="&glossaryButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
<menuitem id="link-index" label="&indexButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
</menupopup>
</toolbarbutton>
<toolbarbutton id="more-menu" class="bookmark-item"
type="menu"
container="true"
label="&moreButton.label;" disabled="true">
<menupopup id="more-menu-popup">
<menuitem id="link-help" label="&helpButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
<menuitem id="link-search" label="&searchButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
<menuseparator />
<menuitem id="link-author" label="&authorButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
<menuitem id="link-copyright" label="&copyrightButton.label;" disabled="true"
class="menuitem-iconic bookmark-item"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type" />
<menuseparator />
<menu id="link-bookmark" label="&bookmarkButton.label;" disabled="true"
class="menu-iconic bookmark-item" container="true"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<menupopup id="link-bookmark-popup" />
</menu>
<menuseparator />
<menu id="link-alternate" label="&alternateButton.label;" disabled="true"
class="menu-iconic bookmark-item" container="true"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<menupopup id="link-alternate-popup" />
</menu>
<menuseparator collapsed="true" id="misc-separator" />
</menupopup>
</toolbarbutton>
</toolbar>
</toolbox>
</overlay>

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

@ -1 +0,0 @@
Makefile

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

@ -1,17 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:navigator-platform"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:navigator-platform"
chrome:displayName="Mac Specific Resources"
chrome:author="mozilla.org"
chrome:name="navigator-platform"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__">
</RDF:Description>
</RDF:RDF>

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

@ -1,12 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE overlay SYSTEM "chrome://navigator/locale/mailNavigatorOverlay.dtd">
<overlay id="platformMailOverlay.xul"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<keyset id="tasksKeys">
<key id="key_newMessage" key="&newMessageCmd.key;" modifiers="accel,shift" command="cmd_newMessage"/>
</keyset>
</overlay>

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

@ -1,26 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE overlay SYSTEM "chrome://navigator-platform/locale/platformNavigationBindings.dtd">
<overlay id="platformNavigationBindings"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<keyset id="navigationKeys">
<!-- proper arrow key navigation, 4.xP -->
<key keycode="&goBackCmd.keyCode;" command="Browser:Back" modifiers="accel"/>
<key keycode="&goForwardCmd.keyCode;" command="Browser:Forward" modifiers="accel"/>
<key id="goBackKb" key="&goBackCmd.commandKey;" command="Browser:Back" modifiers="accel"/>
<key id="goForwardKb" key="&goForwardCmd.commandKey;" command="Browser:Forward" modifiers="accel"/>
<key id="goUpKb" keycode="VK_UP" command="Browser:Up" modifiers="accel"/>
<key id="key_stop2" keycode="VK_ESCAPE" oncommand="BrowserStop();"/>
<key id="key_stop" key="." oncommand="BrowserStop();" modifiers="accel"/>
<key id="goHome" keycode="VK_HOME" command="Browser:Home" modifiers="meta"/>
<key id="key_newTabWithTarget" keycode="VK_INSERT" modifiers="shift" command="cmd_newTabWithTarget"/>
<!-- Support Accel+Shift for Add Bookmark -->
<key id="addBookmarkKb" key="&addCurPageCmd.commandkey;" command="Browser:AddBookmark" modifiers="accel,shift"/>
</keyset>
</overlay>

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

@ -1,230 +0,0 @@
<?xml version="1.0"?>
<?xul-overlay href="chrome://navigator/content/platformMailOverlay.xul"?>
<!DOCTYPE overlay SYSTEM "chrome://navigator/locale/mailNavigatorOverlay.dtd" >
<overlay id="mailNavigatorOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript">
<![CDATA[
var gHasIntegratedMailClient = ("@mozilla.org/messengercompose/composeparams;1" in Components.classes);
// attachment: 0 - link
// 1 - page
// 2 - image
function openComposeWindow(url, title, attachment, charset)
{
if (gHasIntegratedMailClient) {
var params = Components.classes["@mozilla.org/messengercompose/composeparams;1"]
.createInstance(Components.interfaces.nsIMsgComposeParams);
if (params)
{
params.composeFields = Components.classes['@mozilla.org/messengercompose/composefields;1']
.createInstance(Components.interfaces.nsIMsgCompFields);
if (params.composeFields)
{
if (attachment == 0 || attachment == 1)
{
params.composeFields.body = url;
params.composeFields.subject = title;
params.bodyIsLink = true;
}
if (attachment == 1 || attachment == 2)
{
var attachmentData = Components.classes["@mozilla.org/messengercompose/attachment;1"]
.createInstance(Components.interfaces.nsIMsgAttachment);
if (attachmentData)
{
attachmentData.url = url;
attachmentData.urlCharset = charset;
params.composeFields.addAttachment(attachmentData);
}
}
var composeService = Components.classes["@mozilla.org/messengercompose;1"]
.getService(Components.interfaces.nsIMsgComposeService);
if (composeService) {
// it is possible you won't have a default identity
// like if you've never launched mail before on a new profile.
// see bug #196073
try {
params.identity = composeService.defaultIdentity;
}
catch (ex) {
params.identity = null;
}
composeService.OpenComposeWindowWithParams(null, params);
}
}
}
}
else {
openExternalMailer(url, title);
}
}
function openExternalMailer(url, title) {
var extProtocolSvc = Components.classes["@mozilla.org/uriloader/external-protocol-service;1"]
.getService(Components.interfaces.nsIExternalProtocolService);
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var mailto = url ? "mailto:?body="+encodeURIComponent(url)+"&subject="+encodeURIComponent(title) : "mailto:";
var uri = ioService.newURI(mailto, null, null);
extProtocolSvc.loadUrl(uri);
}
function openNewCardDialog()
{
window.openDialog("chrome://messenger/content/addressbook/abNewCardDialog.xul",
"",
"chrome,resizable=no,titlebar,modal");
}
function goOpenNewMessage()
{
if (gHasIntegratedMailClient) {
if ("MsgNewMessage" in window)
{
MsgNewMessage(null);
return;
}
var msgComposeService = Components.classes["@mozilla.org/messengercompose;1"].getService();
msgComposeService = msgComposeService.QueryInterface(Components.interfaces.nsIMsgComposeService);
msgComposeService.OpenComposeWindow(null, null,
Components.interfaces.nsIMsgCompType.New,
Components.interfaces.nsIMsgCompFormat.Default,
null, null);
}
else {
openExternalMailer();
}
}
function sendLink(aDocument)
{
if (!aDocument)
aDocument = window.content.document;
try {
openComposeWindow(aDocument.URL, aDocument.title, 0, null);
} catch(ex) { dump("Cannot Send Link: " + ex + "\n"); }
}
function sendImage(imageURL)
{
try {
var charset = getCharsetforSave(null);
openComposeWindow(imageURL, null, 2, charset);
} catch(ex) { dump("Cannot Send Image: " + ex + "\n"); }
}
function sendPage(aDocument)
{
if (!aDocument)
aDocument = window.content.document;
try {
var charset = getCharsetforSave(aDocument);
openComposeWindow(aDocument.URL, aDocument.title, 1, charset);
} catch(ex) { dump("Cannot Send Page: " + ex + "\n"); }
}
function initMailContextMenuItems(aEvent)
{
var shouldShowSendPage = !(gContextMenu.onTextInput ||
gContextMenu.isTextSelected) &&
!(gContextMenu.onLink && gContextMenu.onImage) &&
gHasIntegratedMailClient;
gContextMenu.showItem("context-sendpage", shouldShowSendPage);
gContextMenu.showItem("context-sep-apps", gContextMenu.shouldShowSeparator("context-sep-apps"));
}
function initMailContextMenuPopupListener(aEvent)
{
var popup = document.getElementById("contentAreaContextMenu");
if (popup)
popup.addEventListener("popupshowing", initMailContextMenuItems, false);
}
function hideMenuitems() {
document.getElementById("menu_newCard").hidden = !gHasIntegratedMailClient;
var menu_sendPage = document.getElementById("menu_sendPage");
if (menu_sendPage)
menu_sendPage.hidden = !gHasIntegratedMailClient;
}
function initOverlay(aEvent) {
initMailContextMenuPopupListener(aEvent);
hideMenuitems();
}
addEventListener("load", initOverlay, false);
]]>
</script>
<!-- navigator specific commands -->
<commandset id="tasksCommands">
<command id="cmd_newMessage" oncommand="goOpenNewMessage();"/>
<command id="cmd_newCard" oncommand="openNewCardDialog()"/>
<command id="cmd_sendPage" oncommand="sendPage();"/>
<command id="Browser:SendLink" oncommand="sendLink();"/>
</commandset>
<keyset id="tasksKeys">
<key id="key_newMessage" key="&newMessageCmd.key;" command="cmd_newMessage" modifiers="accel"/>
</keyset>
<!-- navigator specific UI items -->
<menupopup id="menu_NewPopup">
<menuitem id="menu_newCard"
label="&newCardCmd.label;"
accesskey="&newCardCmd.accesskey;"
command="cmd_newCard"
insertafter="navBeginGlobalNewItems"/>
<menuitem id="menu_newMessage"
label="&newMessageCmd.label;"
accesskey="&newMessageCmd.accesskey;"
command="cmd_newMessage"
key="key_newMessage"
insertafter="navBeginGlobalNewItems"/>
</menupopup>
<menupopup id="menu_FilePopup">
<menuitem id="menu_sendPage"
label="&sendPage.label;"
accesskey="&sendPage.accesskey;"
command="cmd_sendPage"
position="9"/>
<menuitem id="menu_sendLink"
label="&sendLinkCmd.label;"
accesskey="&sendLinkCmd.accesskey;"
command="Browser:SendLink"
position="10"/>
</menupopup>
<popup id="contentAreaContextMenu">
<menuitem id="context-sendpage"
label="&contextSendPage.label;"
accesskey="&contextSendPage.accesskey;"
oncommand="sendPage();"
insertafter="context-savepage"/>
<menuitem id="context-sendimage"
label="&contextSendImage.label;"
accesskey="&contextSendImage.accesskey;"
oncommand="sendImage(gContextMenu.imageURL);"
insertafter="context-saveimage"/>
<menu id="frame">
<menupopup id="frame_popup">
<menuitem insertafter="saveframeas"
label="&contextSendFrame.label;"
accesskey="&contextSendFrame.accesskey;"
oncommand="sendPage(gContextMenu.target.ownerDocument);"/>
</menupopup>
</menu>
</popup>
</overlay>

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

@ -1,548 +0,0 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 this file as it was released on January 3, 2001.
*
* The Initial Developer of the Original Code is
* Jonas Sicking.
* Portions created by the Initial Developer are Copyright (C) 2000
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Jonas Sicking <sicking@bigfoot.com> (Original Author)
* Gervase Markham <gerv@gerv.net>
* Heikki Toivonen <heikki@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
const XLinkNS = "http://www.w3.org/1999/xlink";
const XULNS = "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul";
const XMLNS = "http://www.w3.org/XML/1998/namespace";
const XHTMLNS = "http://www.w3.org/1999/xhtml";
var gMetadataBundle;
var gLangBundle;
var gRegionBundle;
var nodeView;
var htmlMode = false;
var onLink = false;
var onImage = false;
var onInsDel = false;
var onQuote = false;
var onMisc = false;
var onTable = false;
var onTitle = false;
var onLang = false;
const nsICacheService = Components.interfaces.nsICacheService;
const cacheService = Components.classes["@mozilla.org/network/cache-service;1"]
.getService(nsICacheService);
var httpCacheSession = cacheService.createSession("HTTP", 0, true);
httpCacheSession.doomEntriesIfExpired = false;
var ftpCacheSession = cacheService.createSession("FTP", 0, true);
ftpCacheSession.doomEntriesIfExpired = false;
function onLoad()
{
gMetadataBundle = document.getElementById("bundle_metadata");
gLangBundle = document.getElementById("bundle_languages");
gRegionBundle = document.getElementById("bundle_regions");
showMetadataFor(window.arguments[0]);
nodeView = window.arguments[0].ownerDocument.defaultView;
}
function showMetadataFor(elem)
{
// skip past non-element nodes
while (elem && elem.nodeType != Node.ELEMENT_NODE)
elem = elem.parentNode;
if (!elem) {
alert(gMetadataBundle.getString("unableToShowProps"));
window.close();
}
if (elem.ownerDocument.getElementsByName && !elem.ownerDocument.namespaceURI)
htmlMode = true;
// htmllocalname is "" if it's not an html tag, or the name of the tag if it is.
var htmllocalname = "";
if (isHTMLElement(elem,"")) {
htmllocalname = elem.localName.toLowerCase();
}
// We only look for images once
checkForImage(elem, htmllocalname);
// Walk up the tree, looking for elements of interest.
// Each of them could be at a different level in the tree, so they each
// need their own boolean to tell us to stop looking.
while (elem && elem.nodeType == Node.ELEMENT_NODE) {
htmllocalname = "";
if (isHTMLElement(elem,"")) {
htmllocalname = elem.localName.toLowerCase();
}
if (!onLink) checkForLink(elem, htmllocalname);
if (!onInsDel) checkForInsDel(elem, htmllocalname);
if (!onQuote) checkForQuote(elem, htmllocalname);
if (!onTable) checkForTable(elem, htmllocalname);
if (!onTitle) checkForTitle(elem, htmllocalname);
if (!onLang) checkForLang(elem, htmllocalname);
elem = elem.parentNode;
}
// Decide which sections to show
var onMisc = onTable || onTitle || onLang;
if (!onMisc) hideNode("misc-sec");
if (!onLink) hideNode("link-sec");
if (!onImage) hideNode("image-sec");
if (!onInsDel) hideNode("insdel-sec");
if (!onQuote) hideNode("quote-sec");
// Fix the Misc section visibilities
if (onMisc) {
if (!onTable) hideNode("misc-tblsummary");
if (!onLang) hideNode("misc-lang");
if (!onTitle) hideNode("misc-title");
}
// Get rid of the "No properties" message. This is a backstop -
// it should really never show, as long as nsContextMenu.js's
// checking doesn't get broken.
if (onLink || onImage || onInsDel || onQuote || onMisc)
hideNode("no-properties")
}
function checkForImage(elem, htmllocalname)
{
var img;
var imgType; // "img" = <img>
// "object" = <object>
// "input" = <input type=image>
// "background" = css background (to be added later)
var ismap = false;
if (htmllocalname === "img") {
img = elem;
imgType = "img";
} else if (htmllocalname === "object" &&
elem.type.substring(0,6) == "image/" &&
elem.data) {
img = elem;
imgType = "object";
} else if (htmllocalname === "input" &&
elem.type.toUpperCase() == "IMAGE") {
img = elem;
imgType = "input";
} else if (htmllocalname === "area" || htmllocalname === "a") {
// Clicked in image map?
var map = elem;
ismap = true;
setAlt(map);
while (map && map.nodeType == Node.ELEMENT_NODE && !isHTMLElement(map,"map") )
map = map.parentNode;
if (map && map.nodeType == Node.ELEMENT_NODE) {
img = getImageForMap(map);
var imgLocalName = img && img.localName.toLowerCase();
if (imgLocalName == "img" || imgLocalName == "object") {
imgType = imgLocalName;
}
}
}
if (img) {
var imgURL = imgType == "object" ? img.data : img.src;
setInfo("image-url", imgURL);
var size = getSize(imgURL);
if (size != -1) {
var kbSize = size / 1024;
kbSize = Math.round(kbSize*100)/100;
setInfo("image-filesize", gMetadataBundle.getFormattedString("imageSize", [kbSize, size]));
} else {
setInfo("image-filesize", gMetadataBundle.getString("imageSizeUnknown"));
}
if ("width" in img && img.width != "") {
setInfo("image-width", gMetadataBundle.getFormattedString("imageWidth", [ img.width ]));
setInfo("image-height", gMetadataBundle.getFormattedString("imageHeight", [ img.height ]));
}
else {
setInfo("image-width", "");
setInfo("image-height", "");
}
if (imgType == "img") {
setInfo("image-desc", img.longDesc);
} else {
setInfo("image-desc", "");
}
onImage = true;
}
if (!ismap) {
if (imgType == "img" || imgType == "input") {
setAlt(img);
} else {
hideNode("image-alt");
}
}
}
function checkForLink(elem, htmllocalname)
{
if ((htmllocalname === "a" && elem.href != "") ||
htmllocalname === "area") {
setInfo("link-lang", convertLanguageCode(elem.getAttribute("hreflang")));
setInfo("link-url", elem.href);
setInfo("link-type", elem.getAttribute("type"));
setInfo("link-rel", elem.getAttribute("rel"));
setInfo("link-rev", elem.getAttribute("rev"));
var target = elem.target;
switch (target) {
case "_top":
setInfo("link-target", gMetadataBundle.getString("sameWindowText"));
break;
case "_parent":
setInfo("link-target", gMetadataBundle.getString("parentFrameText"));
break;
case "_blank":
setInfo("link-target", gMetadataBundle.getString("newWindowText"));
break;
case "":
case "_self":
if (elem.ownerDocument.defaultView) {
if (elem.ownerDocument != elem.ownerDocument.defaultView.content.document)
setInfo("link-target", gMetadataBundle.getString("sameFrameText"));
else
setInfo("link-target", gMetadataBundle.getString("sameWindowText"));
} else {
hideNode("link-target");
}
break;
default:
setInfo("link-target", "\"" + target + "\"");
}
onLink = true;
}
else if (elem.getAttributeNS(XLinkNS, "href") != "") {
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
var url = elem.getAttributeNS(XLinkNS, "href");
try {
var baseURI = ioService.newURI(elem.baseURI, elem.ownerDocument.characterSet, null);
url = ioService.newURI(url, elem.ownerDocument.characterSet, baseURI).spec;
} catch (e) {}
setInfo("link-url", url);
setInfo("link-lang", "");
setInfo("link-type", "");
setInfo("link-rel", "");
setInfo("link-rev", "");
switch (elem.getAttributeNS(XLinkNS,"show")) {
case "embed":
setInfo("link-target", gMetadataBundle.getString("embeddedText"));
break;
case "new":
setInfo("link-target", gMetadataBundle.getString("newWindowText"));
break;
case "":
case "replace":
if (elem.ownerDocument != elem.ownerDocument.defaultView.content.document)
setInfo("link-target", gMetadataBundle.getString("sameFrameText"));
else
setInfo("link-target", gMetadataBundle.getString("sameWindowText"));
break;
default:
setInfo("link-target", "");
break;
}
onLink = true;
}
}
function checkForInsDel(elem, htmllocalname)
{
if ((htmllocalname === "ins" || htmllocalname === "del") &&
(elem.cite || elem.dateTime)) {
setInfo("insdel-cite", elem.cite);
setInfo("insdel-date", elem.dateTime);
onInsDel = true;
}
}
function checkForQuote(elem, htmllocalname)
{
if ((htmllocalname === "q" || htmllocalname === "blockquote") && elem.cite) {
setInfo("quote-cite", elem.cite);
onQuote = true;
}
}
function checkForTable(elem, htmllocalname)
{
if (htmllocalname === "table" && elem.summary) {
setInfo("misc-tblsummary", elem.summary);
onTable = true;
}
}
function checkForLang(elem, htmllocalname)
{
if ((htmllocalname && elem.lang) || elem.getAttributeNS(XMLNS, "lang")) {
var abbr;
if (htmllocalname && elem.lang)
abbr = elem.lang;
else
abbr = elem.getAttributeNS(XMLNS, "lang");
setInfo("misc-lang", convertLanguageCode(abbr));
onLang = true;
}
}
function checkForTitle(elem, htmllocalname)
{
if (htmllocalname && elem.title) {
setInfo("misc-title", elem.title);
onTitle = true;
}
}
/*
* Set text of node id to value
* if value="" the node with specified id is hidden.
* Node should be have one of these forms
* <xul:label id="id-text" value=""/>
* <xul:description id="id-text"/>
*/
function setInfo(id, value)
{
if (!value) {
hideNode(id);
return;
}
var node = document.getElementById(id+"-text");
if (node.namespaceURI == XULNS && node.localName == "label" ||
(node.namespaceURI == XULNS && node.localName == "textbox")) {
node.setAttribute("value",value);
} else if (node.namespaceURI == XULNS && node.localName == "description") {
while (node.hasChildNodes())
node.removeChild(node.firstChild);
node.appendChild(node.ownerDocument.createTextNode(value));
}
}
// Hide node with specified id
function hideNode(id)
{
var style = document.getElementById(id).getAttribute("style");
document.getElementById(id).setAttribute("style", "display:none;" + style);
}
/*
* Find <img> or <object> which uses an imagemap.
* If more then one object is found we can't determine which one
* was clicked.
*
* This code has to be changed once bug 1882 is fixed.
* Once bug 72527 is fixed this code should use the .images collection.
*/
function getImageForMap(map)
{
var mapuri = "#" + map.getAttribute("name");
var multipleFound = false;
var img;
var list = getHTMLElements(map.ownerDocument, "img");
for (var i=0; i < list.length; i++) {
if (list.item(i).getAttribute("usemap") == mapuri) {
if (img) {
multipleFound = true;
break;
} else {
img = list.item(i);
imgType = "img";
}
}
}
list = getHTMLElements(map.ownerDocument, "object");
for (i = 0; i < list.length; i++) {
if (list.item(i).getAttribute("usemap") == mapuri) {
if (img) {
multipleFound = true;
break;
} else {
img = list.item(i);
imgType = "object";
}
}
}
if (multipleFound)
img = null;
return img;
}
function getHTMLElements(node, name)
{
if (htmlMode)
return node.getElementsByTagName(name);
return node.getElementsByTagNameNS(XHTMLNS, name);
}
// name should be in lower case
function isHTMLElement(node, name)
{
if (node.nodeType != Node.ELEMENT_NODE)
return false;
if (htmlMode)
return !name || node.localName.toLowerCase() == name;
return (!name || node.localName == name) && node.namespaceURI == XHTMLNS;
}
// This function coded according to the spec at:
// http://www.bath.ac.uk/~py8ieh/internet/discussion/metadata.txt
function convertLanguageCode(abbr)
{
if (!abbr) return "";
var result;
var region = "";
var tokens = abbr.split("-");
var language = tokens.shift();
if (language == "x" || language == "i")
{
// x and i prefixes mean unofficial ones. So we proper-case the next
// word and leave the rest.
if (tokens.length > 0)
{
// Upper-case first letter
language = tokens[0].substr(0, 1).toUpperCase() + tokens[0].substr(1);
tokens.shift();
// Add on the rest as space-separated strings inside the brackets
region = tokens.join(" ");
}
}
else
{
// Otherwise we treat the first as a lang, the second as a region
// and the rest as strings.
try
{
language = gLangBundle.getString(language.toLowerCase());
}
catch (e)
{
}
if (tokens.length > 0)
{
try
{
tokens[0] = gRegionBundle.getString(tokens[0].toLowerCase());
}
catch (e)
{
}
region = tokens.join(" ");
}
}
if (region) {
result = gMetadataBundle.getFormattedString("languageRegionFormat",
[language, region]);
} else {
result = language;
}
return result;
}
// Returns the size of the URL in bytes; must be cached and therefore an HTTP or FTP URL
function getSize(url) {
try
{
var cacheEntryDescriptor = httpCacheSession.openCacheEntry(url, Components.interfaces.nsICache.ACCESS_READ, false);
if(cacheEntryDescriptor)
return cacheEntryDescriptor.dataSize;
}
catch(ex) {}
try
{
cacheEntryDescriptor = ftpCacheSession.openCacheEntry(url, Components.interfaces.nsICache.ACCESS_READ, false);
if (cacheEntryDescriptor)
return cacheEntryDescriptor.dataSize;
}
catch(ex) {}
return -1;
}
function setAlt(elem) {
var altText = document.getElementById("image-alt-text");
if (elem.hasAttribute("alt")) {
if (elem.alt != "") {
altText.value = elem.alt;
altText.setAttribute("style","font-style:inherit");
} else {
altText.value = gMetadataBundle.getString("altTextBlank");
altText.setAttribute("style","font-style:italic");
}
} else {
altText.value = gMetadataBundle.getString("altTextMissing");
altText.setAttribute("style","font-style:italic");
}
}

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

@ -1,230 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- 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 this file as it was released on January 3, 2001.
-
- The Initial Developer of the Original Code is
- Jonas Sicking.
- Portions created by the Initial Developer are Copyright (C) 2000
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Jonas Sicking <sicking@bigfoot.com> (Original Author)
- Gervase Markham <gerv@gerv.net>
-
- Alternatively, the contents of this file may be used under the terms of
- either of the GNU General Public License Version 2 or later (the "GPL"),
- or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<?xml-stylesheet href="chrome://navigator/skin/pageInfo.css" type="text/css"?>
<?xul-overlay href="chrome://global/content/dialogOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % metadataDTD SYSTEM "chrome://navigator/locale/metadata.dtd" >
%metadataDTD;
]>
<window id="metadata"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&caption.label;"
onload="onLoad()"
class="dialog"
minwidth="350"
persist="screenX screenY"
screenX="24" screenY="24">
<script type="application/x-javascript" src="chrome://navigator/content/metadata.js"/>
<keyset id="dialogKeys"/>
<stringbundle src="chrome://navigator/locale/metadata.properties" id="bundle_metadata"/>
<stringbundle src="chrome://global/locale/languageNames.properties" id="bundle_languages"/>
<stringbundle src="chrome://global/locale/regionNames.properties" id="bundle_regions"/>
<label id="no-properties" value="&no-properties.label;"/>
<vbox id="link-sec">
<label value="&link-sec.label;"/>
<separator class="groove"/>
<grid>
<columns>
<column/>
<column/>
<column flex="1"/>
</columns>
<rows>
<row id="link-url">
<separator orient="vertical"/>
<label value="&link-url.label; "/>
<textbox readonly="true" id="link-url-text"/>
</row>
<row id="link-target">
<separator orient="vertical"/>
<label value="&link-target.label; "/>
<textbox readonly="true" id="link-target-text"/>
</row>
<row id="link-type">
<separator orient="vertical"/>
<label value="&link-type.label; "/>
<textbox readonly="true" id="link-type-text"/>
</row>
<row id="link-lang">
<separator orient="vertical"/>
<label value="&link-lang.label; "/>
<textbox readonly="true" id="link-lang-text"/>
</row>
<row id="link-rel">
<separator orient="vertical"/>
<label value="&link-rel.label; "/>
<textbox readonly="true" id="link-rel-text"/>
</row>
<row id="link-rev">
<separator orient="vertical"/>
<label value="&link-rev.label; "/>
<textbox readonly="true" id="link-rev-text"/>
</row>
</rows>
</grid>
<separator/>
</vbox>
<vbox id="image-sec">
<label value="&image-sec.label;"/>
<separator class="groove"/>
<grid>
<columns>
<column/>
<column/>
<column flex="1"/>
</columns>
<rows>
<row id="image-url">
<separator orient="vertical"/>
<label value="&image-url.label; "/>
<textbox readonly="true" id="image-url-text"/>
</row>
<row id="image-width">
<separator orient="vertical"/>
<label value="&image-width.label; "/>
<textbox readonly="true" id="image-width-text"/>
</row>
<row id="image-height">
<separator orient="vertical"/>
<label value="&image-height.label; "/>
<textbox readonly="true" id="image-height-text"/>
</row>
<row id="image-filesize">
<separator orient="vertical"/>
<label value="&image-filesize.label; "/>
<textbox readonly="true" id="image-filesize-text"/>
</row>
<row id="image-alt">
<separator orient="vertical"/>
<label value="&image-alt.label; "/>
<textbox readonly="true" id="image-alt-text"/>
</row>
<row id="image-desc">
<separator orient="vertical"/>
<label value="&image-desc.label; "/>
<textbox readonly="true" id="image-desc-text"/>
</row>
</rows>
</grid>
<separator/>
</vbox>
<vbox id="insdel-sec">
<label value="&insdel-sec.label;"/>
<separator class="groove"/>
<grid>
<columns>
<column/>
<column/>
<column flex="1"/>
</columns>
<rows>
<row id="insdel-cite">
<separator orient="vertical"/>
<label value="&insdel-cite.label; "/>
<textbox readonly="true" id="insdel-cite-text"/>
</row>
<row id="insdel-date">
<separator orient="vertical"/>
<label value="&insdel-date.label; "/>
<textbox readonly="true" id="insdel-date-text"/>
</row>
</rows>
</grid>
<separator/>
</vbox>
<vbox id="quote-sec">
<label value="&quote-sec.label;"/>
<separator class="groove"/>
<grid>
<columns>
<column/>
<column/>
<column flex="1"/>
</columns>
<rows>
<row id="quote-cite">
<separator orient="vertical"/>
<label value="&quote-cite.label; "/>
<textbox readonly="true" id="quote-cite-text"/>
</row>
</rows>
</grid>
<separator/>
</vbox>
<vbox id="misc-sec">
<label value="&misc-sec.label;"/>
<separator class="groove"/>
<grid>
<columns>
<column/>
<column/>
<column flex="1"/>
</columns>
<rows>
<row id="misc-lang">
<separator orient="vertical"/>
<label value="&misc-lang.label; "/>
<textbox readonly="true" id="misc-lang-text"/>
</row>
<row id="misc-title">
<separator orient="vertical"/>
<label value="&misc-title.label; "/>
<textbox readonly="true" id="misc-title-text"/>
</row>
<row id="misc-tblsummary">
<separator orient="vertical"/>
<label value="&misc-tblsummary.label; "/>
<textbox readonly="true" id="misc-tblsummary-text"/>
</row>
</rows>
</grid>
<separator/>
</vbox>
</window>

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

@ -1,43 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
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 Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-1999
the Initial Developer. All Rights Reserved.
Contributor(s):
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<!-- DO NOT REMOVE OR ADD TO THIS FILE! -->
<overlay id="navExtraOverlay"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"/>

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

@ -1,35 +0,0 @@
/* ::::: Hide the link toolbar if it is set to autohide and has no items. ::::: */
#linktoolbar[hidden="maybe"][hasitems="false"] {
display: none;
}
/* ::::: urlbar autocomplete ::::: */
#urlbar {
-moz-binding: url("chrome://navigator/content/urlbarBindings.xml#urlbar");
}
.autocomplete-result-popup[for="urlbar"] {
-moz-binding: url("chrome://navigator/content/urlbarBindings.xml#autocomplete-result-popup") !important;
}
.autocomplete-search-box {
-moz-binding: url("chrome://navigator/content/urlbarBindings.xml#autocomplete-search-box");
}
.autocomplete-search-engine {
-moz-binding: url("chrome://navigator/content/urlbarBindings.xml#autocomplete-search-engine");
}
/* ::::::::::
:: Rules for 'hiding' portions of the chrome for special
:: kinds of browser-specific window toolbars. Other global
:: window rules are in xul.css
::::: */
window[chromehidden~="toolbar"] #nav-bar-buttons,
window[chromehidden~="toolbar"] #print-button {
display: none;
}

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

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

@ -1,382 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: HTML; indent-tabs-mode: nil -*- -->
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
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 Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-2000
the Initial Developer. All Rights Reserved.
Contributor(s):
Dean Tessman <dean_tessman@hotmail.com>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<?xul-overlay href="chrome://navigator/content/navigatorOverlay.xul"?>
<?xul-overlay href="chrome://navigator/content/mailNavigatorOverlay.xul"?>
<?xul-overlay href="chrome://navigator/content/navExtraOverlay.xul"?>
<?xul-overlay href="chrome://navigator/content/linkToolbarOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/contentAreaContextOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/sidebar/sidebarOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/bookmarks/bookmarksOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % buildDTD SYSTEM "chrome://global/content/build.dtd" >
%buildDTD;
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
%navigatorDTD;
]>
<window id="main-window"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="Startup()" onunload="Shutdown()"
onclose="return WindowIsClosing();"
contenttitlesetting="true"
title="&mainWindow.title;"
titlemodifier="&mainWindow.titlemodifier;"
titlemenuseparator="&mainWindow.titlemodifiermenuseparator;"
windowtype="navigator:browser"
width="610" height="450"
screenX="4" screenY="4"
persist="screenX screenY width height sizemode">
<!-- Generic Utility -->
<script type="application/x-javascript" src="chrome://global/content/nsUserSettings.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsClipboard.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://global/content/strres.js"/>
<script type="application/x-javascript" src="chrome://global/content/fullScreen.js"/>
<!-- Content Area -->
<script type="application/x-javascript" src="chrome://navigator/content/nsBrowserStatusHandler.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/nsBrowserContentListener.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaClick.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/findUtils.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/printing.js"/>
<!-- Shared Bookmarks Utility Library -->
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarks.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/bookmarks/bookmarksMenu.js"/>
<!-- Navigator -->
<script type="application/x-javascript" src="chrome://navigator/content/browser.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/navigator.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/navigatorDD.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/sessionHistoryUI.js"/>
<!-- hook for stringbundle overlays -->
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_navigator" src="chrome://navigator/locale/navigator.properties"/>
<stringbundle id="bundle_brand" src="chrome://branding/locale/brand.properties"/>
<stringbundle id="bundle_navigator_region" src="chrome://navigator-region/locale/region.properties"/>
<stringbundle id="bundle_brand_region" src="chrome://global-region/locale/region.properties"/>
<stringbundle id="findBundle" src="chrome://global/locale/finddialog.properties"/>
</stringbundleset>
<commandset id="commands">
<commandset id="findTypeMenuItems"/>
<commandset id="globalEditMenuItems"/>
<commandset id="selectEditMenuItems"/>
<commandset id="undoEditMenuItems"/>
<commandset id="clipboardEditMenuItems"/>
<!-- <command id="cmd_pageSetup"/> -->
<command id="toggleSidebar"/>
</commandset>
<!-- broadcasters are appended from the overlay -->
<broadcasterset id="navBroadcasters"/>
<!-- keys are appended from the overlay -->
<keyset id="navKeys">
<key id="showHideSidebar"/>
</keyset>
<popup id="backMenu" position="after_start" onpopupshowing="return BrowserBackMenu(event);" oncommand="gotoHistoryIndex(event);"/>
<popup id="forwardMenu" position="after_start" onpopupshowing="return BrowserForwardMenu(event);" oncommand="gotoHistoryIndex(event);"/>
<tooltip id="aHTMLTooltip" onpopupshowing="return FillInHTMLTooltip(document.tooltipNode);"/>
<popup id="sidebarPopup"/>
<popupset id="bookmarksPopupset"/>
<tooltip id="btTooltip"/>
<template id="bookmarksMenuTemplate"/>
<!-- context menu -->
<popupset id="contentAreaContextSet"/>
<toolbox id="navigator-toolbox" class="toolbox-top" deferattached="true">
<!-- Menu -->
<menubar id="main-menubar" persist="collapsed" grippytooltiptext="&menuBar.tooltip;"/>
<toolbar class="toolbar-primary chromeclass-toolbar" id="nav-bar" persist="collapsed"
grippytooltiptext="&navigationToolbar.tooltip;"
tbalign="stretch" fullscreentoolbar="true">
<hbox id="nav-bar-buttons">
<toolbarbutton id="back-button" type="menu-button" class="toolbarbutton-1"
label="&backButton.label;"
oncommand="if (event.target==this) BrowserBack(); else gotoHistoryIndex(event);"
observes="canGoBack" context="backMenu"
tooltiptext="&backButton.tooltip;">
<menupopup context="" onpopupshowing="BrowserBackMenu(event);"/>
</toolbarbutton>
<toolbarbutton id="forward-button" type="menu-button" class="toolbarbutton-1"
label="&forwardButton.label;"
oncommand="if (event.target==this) BrowserForward(); else gotoHistoryIndex(event);"
observes="canGoForward" context="forwardMenu"
tooltiptext="&forwardButton.tooltip;">
<menupopup context="" onpopupshowing="BrowserForwardMenu(event);"/>
</toolbarbutton>
<toolbarbutton id="reload-button" class="toolbarbutton-1"
label="&reloadButton.label;"
oncommand="if (event.shiftKey) BrowserReloadSkipCache(); else BrowserReload();"
tooltiptext="&reloadButton.tooltip;"/>
<toolbarbutton id="stop-button" class="toolbarbutton-1"
label="&stopButton.label;"
oncommand="BrowserStop();" observes="canStop"
tooltiptext="&stopButton.tooltip;"/>
</hbox>
<hbox id="nav-bar-inner" flex="1">
<observes element="nav-bar" attribute="buttonstyle"/>
<!-- Need hidden label on textbox for accessibility, because what
receives focus needs a text name -->
<label control="urlbar" hidden="true" value="&locationBar.title;"/>
<textbox id="urlbar" class="chromeclass-location uri-element" flex="1"
type="autocomplete" searchSessions="history"
timeout="50" maxrows="6"
disablehistory="false" accesskey="&locationBar.accesskey;"
defaultSearchEngine="true" tabScrolling="true"
showCommentColumn="true"
inputtooltiptext="&locationBar.tooltip;"
newlines="stripsurroundingwhitespace"
oninput="gBrowser.userTypedValue = this.value;"
ontextentered="return handleURLBarCommand(eventParam, domEvent);"
ontextreverted="return handleURLBarRevert();"
onfocus="URLBarFocusHandler(event);"
onmousedown="URLBarMouseDownHandler(event);"
onclick="URLBarClickHandler(event);">
<deck id="page-proxy-deck" onclick="handlePageProxyClick(event);">
<image id="page-proxy-button"
ondraggesture="PageProxyDragGesture(event);"
tooltiptext="&proxyIcon.tooltip;"/>
<image id="page-proxy-favicon" validate="never"
ondraggesture="PageProxyDragGesture(event);"
onload="this.parentNode.selectedIndex = 1;
event.stopPropagation();
HandleBookmarkIcon(this.src, true);"
onerror="gBrowser.addToMissedIconCache(this.src); HandleBookmarkIcon(this.src, false);"
tooltiptext="&proxyIcon.tooltip;"/>
</deck>
<menupopup id="ubhist-popup" class="autocomplete-history-popup"
popupalign="topleft" popupanchor="bottomleft"
onpopupshowing="createUBHistoryMenu(event.target);"
oncommand="executeUrlBarHistoryCommand(event.target);"/>
</textbox>
<button id="go-button" class="button-toolbar chromeclass-location"
label="&goButton.label;" hidden="true"
oncommand="addToUrlbarHistory(gURLBar.value); BrowserLoadURL(event);"
ondragover="nsDragAndDrop.dragOver(event, goButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, goButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, goButtonObserver);"
tooltiptext="&goButton.tooltip;" default="true"/>
<button id="search-button" class="button-toolbar chromeclass-location"
label="&searchButton.label;"
oncommand="OpenSearch('internet', QualifySearchTerm());"
ondragover="nsDragAndDrop.dragOver(event, searchButtonObserver);"
ondragdrop="nsDragAndDrop.drop(event, searchButtonObserver);"
ondragexit="nsDragAndDrop.dragExit(event, searchButtonObserver);"
tooltiptext="&searchButton.tooltip;"/>
</hbox>
<toolbarbutton id="print-button" type="menu-button" class="toolbarbutton-1"
label="&printButton.label;"
oncommand="if (event.target==this) NSPrint();"
tooltiptext="&printButton.tooltip;">
<menupopup id="printMenu">
<menuitem id="printMenuItemToolbar" label="&printCmd.label;" accesskey="&printCmd.accesskey;"
default="true" oncommand="NSPrint()"/>
<menuitem id="printPreviewMenuItemToolbar" label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;"
oncommand="setTimeout(BrowserPrintPreview, 0);"/>
</menupopup>
</toolbarbutton>
<hbox id="throbber-box" align="center">
<button id="navigator-throbber" oncommand="goClickThrobber('browser.throbber.url')"
tooltiptext="&throbber.tooltip;"/>
</hbox>
<hbox id="window-controls" hidden="true" fullscreencontrol="true">
<toolbarbutton id="minimize-button" class="toolbarbutton-1"
tooltiptext="&minimizeButton.tooltip;"
oncommand="window.minimize();"/>
<toolbarbutton id="restore-button" class="toolbarbutton-1"
tooltiptext="&restoreButton.tooltip;"
oncommand="BrowserFullScreen();"/>
<toolbarbutton id="close-button" class="toolbarbutton-1"
tooltiptext="&closeWindow.label;"
oncommand="BrowserTryToCloseWindow();"/>
</hbox>
</toolbar>
<toolbar id="PersonalToolbar" class="chromeclass-directories" persist="collapsed"
grippytooltiptext="&personalToolbar.tooltip;" tbalign="stretch" prefixhidden="true"
ondraggesture="nsDragAndDrop.startDrag(event, BookmarksMenuDNDObserver)"
ondragdrop="nsDragAndDrop.drop(event, BookmarksMenuDNDObserver); event.stopPropagation()"
ondragenter="nsDragAndDrop.dragEnter(event, BookmarksMenuDNDObserver); event.stopPropagation()"
ondragexit="nsDragAndDrop.dragExit(event, BookmarksMenuDNDObserver); event.stopPropagation()"
ondragover="nsDragAndDrop.dragOver(event, BookmarksMenuDNDObserver); event.stopPropagation()">
<tooltip id="home-button-tooltip" noautohide="true">
<vbox id="home-button-tooltip-inner" flex="1"/>
</tooltip>
<toolbarbutton id="home-button" class="bookmark-item"
label="&homeButton.label;"
oncommand="BrowserHome(event);"
onclick="if (event.button == 1) BrowserHome(event);"
tooltip="home-button-tooltip"
ondraggesture="nsDragAndDrop.startDrag(event, homeButtonObserver)"
ondragdrop="nsDragAndDrop.drop(event, homeButtonObserver); event.stopPropagation()"
ondragenter="event.stopPropagation()"
ondragexit="nsDragAndDrop.dragExit(event, homeButtonObserver); event.stopPropagation()"
ondragover="nsDragAndDrop.dragOver(event, homeButtonObserver); event.stopPropagation()"/>
<toolbarseparator id="home-bm-separator"/>
<!-- "Bookmarks" button on personal toolbar -->
<toolbarbutton type="menu" id="bookmarks-button" class="bookmark-item"
label="&bookmarksButton.label;"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
ref="NC:BookmarksRoot" container="true" flags="dont-test-empty"
tooltip="btTooltip"
oncommand="BookmarksMenu.loadBookmark(event, this.database);"
onclick="BookmarksMenu.loadBookmarkMiddleClick(event, this.database)"
template="bookmarksMenuTemplate"
ondraggesture="if (event.target.id=='bookmarks-button') event.stopPropagation()">
<menupopup context="bookmarks-context-menu"
onpopupshowing="updateGroupmarkCommand();">
<menuitem command="Browser:AddBookmark"/>
<menuitem command="Browser:AddBookmarkAs"/>
<menuitem command="Browser:AddGroupmarkAs"/>
<menuitem command="Browser:ManageBookmark"/>
<menuseparator id="lastStaticSeparator"/>
</menupopup>
</toolbarbutton>
<!-- Personal toolbar items -->
<hbox id="bookmarks-ptf" flex="1" style="min-width: 1px;"
context="bookmarks-context-menu" template="bookmarksMenuTemplate"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
ref="NC:PersonalToolbarFolder" flags="dont-test-empty"
tooltip="btTooltip"
oncommand="BookmarksUtils.loadBookmarkBrowser(event, this.database)"
onclick="BookmarksMenu.loadBookmarkMiddleClick(event, this.database)"
rdf:type="http://home.netscape.com/NC-rdf#Folder">
</hbox>
<hbox class="bookmarks-toolbar-overflow-items" mousethrough="always">
<hbox mousethrough="always" id="overflow-padder" flex="1"/>
<toolbarbutton id="bookmarks-chevron" type="menu" class="chevron"
mousethrough="never" collapsed="true"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
template="bookmarksMenuTemplate"
ref="NC:PersonalToolbarFolder" flags="dont-test-empty"
tooltip="btTooltip"
oncommand="BookmarksUtils.loadBookmarkBrowser(event, this.database)"
onclick="BookmarksMenu.loadBookmarkMiddleClick(event, this.database)">
<menupopup id="bookmarks-chevron-popup"
context="bookmarks-context-menu"
onpopupshowing="if (event.target == this) BookmarksToolbar.updateOverflowMenu(this);"/>
</toolbarbutton>
</hbox>
</toolbar>
</toolbox>
<hbox flex="1">
<vbox id="sidebar-box" class="chromeclass-extrachrome"/>
<splitter id="sidebar-splitter" class="chromeclass-extrachrome" />
<!-- we only need to handle |ondragdrop| because everything else is
taken care of by the builtin behavior inside the tabbrowser -->
<vbox id="appcontent" flex="1"
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
<!-- this box is temporary, pending XBLified <browser> -->
<hbox id="browser" flex="1">
<tabbrowser id="content"
flex="1" contenttooltip="aHTMLTooltip"
contentcontextmenu="contentAreaContextMenu"
onnewtab="BrowserOpenTab();"
onbookmarkgroup="addGroupmarkAs();"
onmousedown="return contentAreaMouseDown(event);"
onclick="return contentAreaClick(event);"/>
</hbox>
</vbox>
</hbox>
<statusbar id="status-bar" class="chromeclass-status"
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
<statusbarpanel id="component-bar"/>
<statusbarpanel id="statusbar-display" label="&statusText.label;" flex="1"/>
<statusbarpanel class="statusbarpanel-progress" id="progress-panel" hidden="true">
<progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/>
</statusbarpanel>
<statusbarpanel id="popupIcon" class="statusbarpanel-iconic" hidden="true"
oncommand="StatusbarViewPopupManager()"
tooltiptext="&popupIcon.tooltiptext;"
context="popupBlockerMenu"/>
<statusbarpanel class="statusbarpanel-iconic" id="offline-status"/>
<statusbarpanel class="statusbarpanel-iconic" id="security-button"
oncommand="BrowserPageInfo(null, 'securityTab')"/>
</statusbar>
<popupset>
<menupopup id="popupBlockerMenu"
oncommand="popupBlockerMenuCommand(event.target);"
onpopupshowing="return popupBlockerMenuShowing(event)"/>
<!-- Items are generated, see popupBlockerMenuShowing() -->
</popupset>
<popupset>
<popup id="networkProperties"/>
</popupset>
</window>

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

@ -1,217 +0,0 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* - Kevin Puetz (puetzk@iastate.edu)
* - Ben Goodger <ben@netscape.com>
* - Blake Ross <blaker@netscape.com>
* - Pierre Chanial <pierrechanial@netscape.net>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
function _RDF(aType)
{
return "http://www.w3.org/1999/02/22-rdf-syntax-ns#" + aType;
}
function NC_RDF(aType)
{
return "http://home.netscape.com/NC-rdf#" + aType;
}
var RDFUtils = {
getResource: function(aString)
{
return this.rdf.GetResource(aString, true);
},
getTarget: function(aDS, aSourceID, aPropertyID)
{
var source = this.getResource(aSourceID);
var property = this.getResource(aPropertyID);
return aDS.GetTarget(source, property, true);
},
getValueFromResource: function(aResource)
{
aResource = aResource.QueryInterface(Components.interfaces.nsIRDFResource);
return aResource ? aResource.Value : null;
},
_rdf: null,
get rdf() {
if (!this._rdf) {
this._rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"]
.getService(Components.interfaces.nsIRDFService);
}
return this._rdf;
}
}
var proxyIconDNDObserver = {
onDragStart: function (aEvent, aXferData, aDragAction)
{
var urlBar = document.getElementById("urlbar");
// XXX - do we want to allow the user to set a blank page to their homepage?
// if so then we want to modify this a little to set about:blank as
// the homepage in the event of an empty urlbar.
if (!urlBar.value) return;
var urlString = urlBar.value + "\n" + window.content.document.title;
var htmlString = "<a href=\"" + urlBar.value + "\">" + urlBar.value + "</a>";
aXferData.data = new TransferData();
aXferData.data.addDataForFlavour("text/x-moz-url", urlString);
aXferData.data.addDataForFlavour("text/unicode", urlBar.value);
aXferData.data.addDataForFlavour("text/html", htmlString);
}
}
var homeButtonObserver = {
onDragStart: function (aEvent, aXferData, aDragAction)
{
var homepage = nsPreferences.getLocalizedUnicharPref("browser.startup.homepage", "about:blank");
if (homepage)
{
// XXX find a readable title string for homepage, perhaps do a history lookup.
var htmlString = "<a href=\"" + homepage + "\">" + homepage + "</a>";
aXferData.data = new TransferData();
aXferData.data.addDataForFlavour("text/x-moz-url", homepage + "\n" + homepage);
aXferData.data.addDataForFlavour("text/html", htmlString);
aXferData.data.addDataForFlavour("text/unicode", homepage);
}
},
onDrop: function (aEvent, aXferData, aDragSession)
{
var url = transferUtils.retrieveURLFromData(aXferData.data, aXferData.flavour.contentType);
setTimeout(openHomeDialog, 0, url);
},
onDragOver: function (aEvent, aFlavour, aDragSession)
{
var statusTextFld = document.getElementById("statusbar-display");
statusTextFld.label = gNavigatorBundle.getString("droponhomebutton");
aDragSession.dragAction = Components.interfaces.nsIDragService.DRAGDROP_ACTION_LINK;
},
onDragExit: function (aEvent, aDragSession)
{
var statusTextFld = document.getElementById("statusbar-display");
statusTextFld.label = "";
},
getSupportedFlavours: function ()
{
var flavourSet = new FlavourSet();
flavourSet.appendFlavour("application/x-moz-file", "nsIFile");
flavourSet.appendFlavour("text/x-moz-url");
flavourSet.appendFlavour("text/unicode");
return flavourSet;
}
}
function openHomeDialog(aURL)
{
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"].getService(Components.interfaces.nsIPromptService);
var promptTitle = gNavigatorBundle.getString("droponhometitle");
var promptMsg = gNavigatorBundle.getString("droponhomemsg");
var okButton = gNavigatorBundle.getString("droponhomeokbutton");
var pressedVal = promptService.confirmEx(window, promptTitle, promptMsg,
(promptService.BUTTON_TITLE_IS_STRING * promptService.BUTTON_POS_0) +
(promptService.BUTTON_TITLE_CANCEL * promptService.BUTTON_POS_1),
okButton, null, null, null, {value:0});
if (pressedVal == 0) {
nsPreferences.setUnicharPref("browser.startup.homepage", aURL);
}
}
var goButtonObserver = {
onDragOver: function(aEvent, aFlavour, aDragSession)
{
aEvent.target.setAttribute("dragover", "true");
return true;
},
onDragExit: function (aEvent, aDragSession)
{
aEvent.target.removeAttribute("dragover");
},
onDrop: function (aEvent, aXferData, aDragSession)
{
var xferData = aXferData.data.split("\n");
var uri = xferData[0] ? xferData[0] : xferData[1];
if (uri)
{
// Perform a security check before loading the URI
nsDragAndDrop.dragDropSecurityCheck(aEvent, aDragSession, uri);
loadURI(uri);
}
},
getSupportedFlavours: function ()
{
var flavourSet = new FlavourSet();
flavourSet.appendFlavour("application/x-moz-file", "nsIFile");
flavourSet.appendFlavour("text/x-moz-url");
flavourSet.appendFlavour("text/unicode");
return flavourSet;
}
}
var searchButtonObserver = {
onDragOver: function(aEvent, aFlavour, aDragSession)
{
aEvent.target.setAttribute("dragover", "true");
return true;
},
onDragExit: function (aEvent, aDragSession)
{
aEvent.target.removeAttribute("dragover");
},
onDrop: function (aEvent, aXferData, aDragSession)
{
var xferData = aXferData.data.split("\n");
var uri = xferData[1] ? xferData[1] : xferData[0];
if (uri)
OpenSearch('internet', uri);
},
getSupportedFlavours: function ()
{
var flavourSet = new FlavourSet();
flavourSet.appendFlavour("application/x-moz-file", "nsIFile");
flavourSet.appendFlavour("text/x-moz-url");
flavourSet.appendFlavour("text/unicode");
return flavourSet;
}
}

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

@ -1,628 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- 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 Mozilla Communicator client code, released
- March 31, 1998.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 1998-1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Blake Ross <blakeross@telocity.com>
- Peter Annema <disttsc@bart.nl>
- Jeremy M. Dolan <jmd@pobox.com>
-
- Alternatively, the contents of this file may be used under the terms of
- either of the GNU General Public License Version 2 or later (the "GPL"),
- or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xul-overlay href="chrome://global/content/globalOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/utilityOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/viewZoomOverlay.xul"?>
<?xul-overlay href="chrome://communicator/content/tasksOverlay.xul"?>
<?xul-overlay href="chrome://global/content/charsetOverlay.xul"?>
<?xul-overlay href="chrome://navigator/content/platformNavigationBindings.xul"?>
<!DOCTYPE overlay [
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
%navigatorDTD;
<!ENTITY % contentAreaCommandsDTD SYSTEM "chrome://communicator/locale/contentAreaCommands.dtd" >
%contentAreaCommandsDTD;
]>
<overlay id="navigatorOverlay"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<stringbundleset id="stringbundleset">
<stringbundle id="bundle_viewZoom"/>
</stringbundleset>
<!-- Keysets -->
<keyset id="navKeys">
<!-- File Menu -->
<key id="key_newNavigator"/>
<key id="key_newNavigatorTab" key="&tabCmd.commandkey;" modifiers="accel" command="cmd_newNavigatorTab"/>
<key id="key_newBlankPage"/>
<key id="focusURLBar" key="&openCmd.commandkey;" oncommand="ShowAndSelectContentsOfURLBar();"
modifiers="accel"/>
<key id="openLocationKb" key="&openCmd.commandkey;" command="Browser:Open" modifiers="accel,shift"/>
<key id="openFileKb" key="&openFileCmd.commandkey;" command="Browser:OpenFile" modifiers="accel"/>
<key id="key_savePage" key="&savePageCmd.commandkey;" command="Browser:SavePage" modifiers="accel"/>
<key id="key_editPage" key="&editPageCmd.commandkey;" command="Browser:EditPage" modifiers="accel"/>
<key id="printKb" key="&printCmd.commandkey;" command="Browser:Print" modifiers="accel"/>
<key id="key_close"/>
<key id="key_closeWindow"/>
<key id="key_quit"/>
<!-- Edit Menu -->
<key id="key_undo"/>
<key id="key_redo"/>
<key id="key_cut"/>
<key id="key_copy"/>
<key id="key_paste"/>
<key id="key_delete"/>
<key id="key_delete2"/>
<key id="key_selectAll"/>
<key id="key_switchTextDirection"/>
<!-- View Menu -->
<key id="key_reload" key="&reloadCmd.commandkey;" oncommand="BrowserReload();" modifiers="accel"/>
<key key="&reloadCmd.commandkey;" oncommand="BrowserReloadSkipCache();" modifiers="accel,shift"/>
<key id="key_viewSource" key="&pageSourceCmd.commandkey;" command="View:PageSource" modifiers="accel"/>
<key id="key_viewInfo" key="&pageInfoCmd.commandkey;" command="View:PageInfo" modifiers="accel"/>
<key id="key_viewNextSidebarPanel" keycode="VK_PAGE_DOWN" oncommand="SidebarGetRelativePanel(1);" modifiers="alt" />
<key id="key_viewPrevSidebarPanel" keycode="VK_PAGE_UP" oncommand="SidebarGetRelativePanel(-1);" modifiers="alt" />
<!-- Search Menu -->
<key id="key_find" key="&findOnCmd.commandkey;" command="Browser:Find" modifiers="accel"/>
<key id="key_findAgain" key="&findAgainCmd.commandkey;" command="Browser:FindAgain" modifiers="accel"/>
<key id="key_findPrev" key="&findPrevCmd.commandkey;" command="Browser:FindPrev" modifiers="accel,shift"/>
<key keycode="&findAgainCmd.commandkey2;" command="Browser:FindAgain"/>
<key keycode="&findPrevCmd.commandkey2;" command="Browser:FindPrev" modifiers="shift"/>
<key id="key_findTypeText"/>
<key id="key_findTypeLinks"/>
<!-- Go Menu -->
<key keycode="VK_BACK" command="cmd_handleBackspace"/>
<key keycode="VK_BACK" command="cmd_handleShiftBackspace" modifiers="shift"/>
<!-- Bookmarks Menu -->
<key id="addBookmarkAsKb" key="&addCurPageAsCmd.commandkey;" command="Browser:AddBookmarkAs" modifiers="accel"/>
<key id="manBookmarkKb" key="&manBookmarksCmd.commandkey;" command="Browser:ManageBookmark" modifiers="accel"/>
<!-- Tools Menu -->
<key id="searchInternetKb" key="&searchInternet.commandKey;" modifiers="accel,shift" command="Browser:SearchInternet"/>
<!-- Misc -->
<!-- the amazing fishcam dept. -->
<key key="f" modifiers="control,alt" oncommand="loadURI('http://home.netscape.com/fishcam/fishcam.html');"/>
<key id="key_gotoHistory" key="&history.commandKey;" oncommand="toHistory();" modifiers="accel"/>
<keyset id="viewZoomKeys"/>
<keyset id="navigationKeys"/>
<keyset id="tasksKeys"/>
</keyset>
<commandset id="commands">
<command id="cmd_newNavigator"/>
<command id="cmd_newNavigatorTab" oncommand="BrowserOpenTab();"/>
<command id="cmd_newTabWithTarget" oncommand="contentAreaClick(event);"/>
<command id="cmd_handleBackspace" oncommand="BrowserHandleBackspace();" />
<command id="cmd_handleShiftBackspace" oncommand="BrowserHandleShiftBackspace();" />
<command id="cmd_newEditor"/>
<!-- NOT IMPLEMENTED
<command id="cmd_newEditorTemplate"/>
<command id="cmd_newEditorDraft"/> -->
<command id="Browser:OpenFile" oncommand="BrowserOpenFileWindow();"/>
<command id="Browser:SavePage" oncommand="saveDocument(window.content.document);"/>
<command id="Browser:EditPage" oncommand="editPageOrFrame();" observes="isImage"/>
<command id="Browser:UploadFile" oncommand="BrowserUploadFile();"/>
<command id="Browser:Open" oncommand="BrowserOpenWindow();"/>
<command id="cmd_printSetup" oncommand="NSPrintSetup();"/>
<command id="Browser:Print" oncommand="NSPrint();"/>
<command id="Browser:PrintPreview" oncommand="BrowserPrintPreview();"/>
<command id="cmd_quit"/>
<command id="cmd_close" oncommand="BrowserCloseTabOrWindow()"/>
<command id="cmd_closeOtherTabs" oncommand="BrowserCloseOtherTabs()"/>
<command id="cmd_closeWindow" oncommand="BrowserTryToCloseWindow()"/>
<!-- Edit Menu -->
<command id="cmd_undo"/>
<command id="cmd_redo"/>
<command id="cmd_cut"/>
<command id="cmd_copy"/>
<command id="cmd_paste"/>
<command id="cmd_delete"/>
<command id="cmd_selectAll" observes="isImage"/>
<command id="cmd_switchTextDirection"/>
<!-- Content area context menu -->
<command id="cmd_copyLink"/>
<command id="cmd_copyImage"/>
<!-- View Menu -->
<command id="View:PageSource" oncommand="BrowserViewSourceOfDocument(content.document);" observes="isImage"/>
<command id="View:PageInfo" oncommand="BrowserPageInfo();"/>
<command id="View:FullScreen" oncommand="BrowserFullScreen();"/>
<command id="cmd_SwitchDocumentDirection" oncommand="SwitchDocumentDirection(window.content);" />
<!-- Search Menu -->
<command id="Browser:Find" oncommand="BrowserFind();" observes="isImage"/>
<command id="Browser:FindAgain" oncommand="BrowserFindAgain(false);" observes="isImage"/>
<command id="Browser:FindPrev" oncommand="BrowserFindAgain(true);" observes="isImage"/>
<command id="cmd_findTypeText" observes="isImage"/>
<command id="cmd_findTypeLinks" observes="isImage"/>
<!-- Bookmarks Menu -->
<command id="Browser:AddBookmark" label="&addCurPageCmd.label;" accesskey="&addCurPageCmd.accesskey;"
oncommand="BookmarksUtils.addBookmarkForBrowser(document.getElementById('content').webNavigation, false);"/>
<command id="Browser:AddBookmarkAs" label="&addCurPageAsCmd.label;"
accesskey="&addCurPageAsCmd.accesskey;"
oncommand="addBookmarkAs();"/>
<command id="Browser:AddGroupmarkAs" label="&addCurTabsAsCmd.label;"
accesskey="&addCurTabsAsCmd.accesskey;"
oncommand="addGroupmarkAs(); event.stopPropagation();"/>
<command id="Browser:ManageBookmark" label="&manBookmarksCmd.label;" accesskey="&manBookmarksCmd.accesskey;"
oncommand="BrowserEditBookmarks();" />
<!-- Go Menu -->
<command id="Browser:Home" oncommand="BrowserHome(event);"/>
<command id="Browser:Back" oncommand="BrowserBack();" observes="canGoBack"/>
<command id="Browser:Forward" oncommand="BrowserForward();" observes="canGoForward"/>
<command id="Browser:Up" oncommand="BrowserUp();" observes="canGoUp"/>
<commandset id="viewZoomCommands"/>
<commandset id="tasksCommands"/>
<!-- Tools Menu -->
<command id="Browser:SearchInternet" oncommand="BrowserSearchInternet();"/>
</commandset>
<broadcasterset id="navBroadcasters">
<broadcaster id="canGoBack" disabled="true"/>
<broadcaster id="canGoForward" disabled="true"/>
<broadcaster id="canGoUp" disabled="true"/>
<broadcaster id="Communicator:WorkMode"/>
<broadcaster id="cmd_viewnavbar" oncommand="goToggleToolbar( 'nav-bar','cmd_viewnavbar');" checked="true"/>
<broadcaster id="cmd_viewpersonaltoolbar" oncommand="goToggleToolbar('PersonalToolbar','cmd_viewpersonaltoolbar');" checked="true"/>
<broadcaster id="cmd_viewtaskbar" oncommand="goToggleToolbar('status-bar','cmd_viewtaskbar');" checked="true"/>
<broadcaster id="cmd_viewcomponentbar" oncommand="goToggleToolbar('component-bar', 'cmd_viewcomponentbar');" checked="true"/>
<broadcaster id="isImage"/>
</broadcasterset>
<!-- bookmarks context menu -->
<popupset id="bookmarksPopupset">
<popup id="bookmarks-context-menu"
onpopupshowing="return BookmarksMenu.createContextMenu(event);"
onpopuphidden ="BookmarksMenu.destroyContextMenu(event);"/>
</popupset>
<!-- bookmarks toolbar tooltip -->
<tooltip id="btTooltip" noautohide="true"
onpopupshowing="return BookmarksToolbar.fillInBTTooltip(document.tooltipNode)">
<vbox id="btTooltipTextBox" flex="1">
<label id="btTitleText"/>
<label id="btUrlText"/>
</vbox>
</tooltip>
<!-- bookmarks template -->
<template id="bookmarksMenuTemplate" xmlns:nc="http://home.netscape.com/NC-rdf#">
<rule parent="hbox" rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<toolbarseparator uri="rdf:*"
rdf:type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"/>
</rule>
<!-- yes, the type attribute is necessary otherwise all leaves are
treated as containers for some reason -->
<rule parent="hbox" iscontainer="true"
nc:FolderGroup="true">
<toolbarbutton class="bookmark-item bookmark-group" uri="rdf:*" xulcontentsgenerated="true"
group="true"
container="false"
rdf:type="http://home.netscape.com/NC-rdf#Folder"
label="rdf:http://home.netscape.com/NC-rdf#Name"/>
</rule>
<rule parent="hbox" iscontainer="true" isempty="true"
rdf:type="http://home.netscape.com/NC-rdf#Folder">
<toolbarbutton type="menu" editable="true" class="bookmark-item"
image="rdf:http://home.netscape.com/NC-rdf#Icon"
validate="never"
rdf:type="http://home.netscape.com/NC-rdf#Folder"
uri="rdf:*" label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup>
<menuitem label="&emptyItem.label;" disabled="true"/>
</menupopup>
</toolbarbutton>
</rule>
<rule parent="hbox" iscontainer="true">
<toolbarbutton type="menu" class="bookmark-item" uri="rdf:*" editable="true"
image="rdf:http://home.netscape.com/NC-rdf#Icon"
validate="never"
rdf:type="http://home.netscape.com/NC-rdf#Folder"
label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup context="bookmarks-context-menu"/>
</toolbarbutton>
</rule>
<rule parent="hbox">
<toolbarbutton class="bookmark-item" uri="rdf:*" editable="true"
image="rdf:http://home.netscape.com/NC-rdf#Icon"
validate="never"
status="rdf:http://home.netscape.com/WEB-rdf#status"
rdf:type="http://home.netscape.com/NC-rdf#Bookmark"
statustext="rdf:http://home.netscape.com/NC-rdf#URL"
label="rdf:http://home.netscape.com/NC-rdf#Name"/>
</rule>
<rule nc:FolderGroup="true" iscontainer="true">
<menupopup>
<menuitem class="menuitem-iconic bookmark-group"
label="rdf:http://home.netscape.com/NC-rdf#Name"
group="true"
uri="rdf:*"
xulcontentsgenerated="true"/>
</menupopup>
</rule>
<rule iscontainer="true" isempty="true"
rdf:type="http://home.netscape.com/NC-rdf#Folder">
<menupopup>
<menu class="menu-iconic bookmark-item" uri="rdf:*"
image="rdf:http://home.netscape.com/NC-rdf#Icon"
validate="never"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type"
label="rdf:http://home.netscape.com/NC-rdf#Name">
<menupopup>
<menuitem label="&emptyItem.label;" disabled="true"/>
</menupopup>
</menu>
</menupopup>
</rule>
<rule iscontainer="true">
<menupopup>
<menu class="menu-iconic bookmark-item" uri="rdf:*"
image="rdf:http://home.netscape.com/NC-rdf#Icon"
validate="never"
label="rdf:http://home.netscape.com/NC-rdf#Name"
type="rdf:http://www.w3.org/1999/02/22-rdf-syntax-ns#type">
<menupopup context="bookmarks-context-menu"/>
</menu>
</menupopup>
</rule>
<rule rdf:type="http://home.netscape.com/NC-rdf#BookmarkSeparator">
<menupopup>
<menuseparator uri="rdf:*" />
</menupopup>
</rule>
<rule>
<menupopup>
<menuitem class="menuitem-iconic bookmark-item" uri="rdf:*"
src="rdf:http://home.netscape.com/NC-rdf#Icon"
validate="never"
label="rdf:http://home.netscape.com/NC-rdf#Name"
status="rdf:http://home.netscape.com/WEB-rdf#status"
statustext="rdf:http://home.netscape.com/NC-rdf#URL"/>
</menupopup>
</rule>
</template>
<!-- Menu -->
<menubar id="main-menubar" class="chromeclass-menubar">
<menu id="menu_File">
<menupopup id="menu_FilePopup" onpopupshowing="updateCloseItems();getContentAreaFrameCount();updateSavePageItems();updateFileUploadItem();">
<menu id="menu_New">
<menupopup id="menu_NewPopup">
<!-- From utilityOverlay.xul -->
<menuitem id="menu_newNavigator" command="cmd_newNavigator"/>
<menuitem id="menu_newNavigatorTab" command="cmd_newNavigatorTab" key="key_newNavigatorTab"
label="&tabCmd.label;" accesskey="&tabCmd.accesskey;"/>
<menuseparator id="navBeginGlobalNewItems"/>
<menuitem id="menu_newEditor" command="cmd_newEditor"/>
</menupopup>
</menu>
<menuitem label="&openCmd.label;" accesskey="&openCmd.accesskey;" key="openLocationKb" command="Browser:Open"/>
<menuitem label="&openFileCmd.label;" accesskey="&openFileCmd.accesskey;" key="openFileKb" command="Browser:OpenFile"/>
<menuitem id="menu_close"/>
<menuitem id="menu_closeOtherTabs" command="cmd_closeOtherTabs" label="&closeOtherTabs.label;"/>
<menuitem id="menu_closeWindow" hidden="true" command="cmd_closeWindow" key="key_closeWindow" label="&closeWindow.label;"/>
<menuseparator/>
<menuitem id="savepage" valueSaveAs="&savePageAsCmd.label;" valueSave="&savePageCmd.label;"
accesskey="&savePageCmd.accesskey;" key="key_savePage" command="Browser:SavePage"/>
<menuitem id="saveframe" valueSaveAs="&saveFrameAsCmd.label;" valueSave="&saveFrameCmd.label;"
accesskey="&saveFrameCmd.accesskey;" oncommand="saveFrameDocument();" hidden="true"/>
<menuseparator id="saveMenuBlockEnd"/>
<menuitem label="&editPageCmd.label;" accesskey="&editPageCmd.accesskey;" key="key_editPage" command="Browser:EditPage" />
<menuseparator/>
<menuitem command="Browser:UploadFile" label="&uploadFile.label;" accesskey="&uploadFile.accesskey;"/>
<menuseparator/>
<menuitem id="printSetupMenuItem" label="&printSetupCmd.label;" accesskey="&printSetupCmd.accesskey;" command="cmd_printSetup"/>
<menuitem id="printPreviewMenuItem" label="&printPreviewCmd.label;" accesskey="&printPreviewCmd.accesskey;" command="Browser:PrintPreview"/>
<menuitem id="printMenuItem" label="&printCmd.label;" accesskey="&printCmd.accesskey;" key="printKb" command="Browser:Print"/>
<menuseparator/>
<menuitem id="offlineGoOfflineCmd"/>
</menupopup>
</menu>
<menu id="menu_Edit">
<menupopup id="menu_Edit_Popup">
<menuitem id="menu_undo"/>
<menuitem id="menu_redo"/>
<menuseparator/>
<menuitem id="menu_cut"/>
<menuitem id="menu_copy"/>
<menuitem id="menu_paste"/>
<menuitem id="menu_delete"/>
<menuseparator/>
<menuitem id="menu_selectAll"/>
<menuseparator/>
<menuitem id="menu_find" label="&findOnCmd.label;" accesskey="&findOnCmd.accesskey;" key="key_find" command="Browser:Find"/>
<menuitem id="menu_findAgain" label="&findAgainCmd.label;" accesskey="&findAgainCmd.accesskey;" key="key_findAgain" command="Browser:FindAgain"/>
<menuitem id="menu_findPrev" label="&findPrevCmd.label;" accesskey="&findPrevCmd.accesskey;" key="key_findPrev" command="Browser:FindPrev"/>
<menuseparator/>
<menuitem id="menu_findTypeLinks"/>
<menuitem id="menu_findTypeText"/>
<menuseparator id="textfieldDirection-separator" hidden="true"/>
<menuitem id="textfieldDirection-swap" hidden="true"/>
<menuseparator id="menu_PrefsSeparator"/>
<menuitem id="menu_preferences" oncommand="goPreferences('navigator', 'chrome://communicator/content/pref/pref-navigator.xul', 'navigator')"/>
</menupopup>
</menu>
<menu id="menu_View" accesskey="&viewMenu.accesskey;" label="&viewMenu.label;">
<menupopup id="menu_View_Popup">
<menu label="&toolbarsCmd.label;" accesskey="&toolbarsCmd.accesskey;" id="menu_Toolbars">
<menupopup id="view_toolbars_popup" onpopupshowing="updateToolbarStates(this);">
<menuitem label="&navbarCmd.label;" accesskey="&navbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewnavbar" />
<menuitem label="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewpersonaltoolbar" />
<menuitem id="menuitem_showhide_tabbar" label="&tabbarCmd.label;" accesskey="&tabbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" oncommand="showHideTabbar();" checked="true"/>
<menuitem label="&taskbarCmd.label;" accesskey="&taskbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewtaskbar" />
<menuitem label="&componentbarCmd.label;" accesskey="&componentbarCmd.accesskey;" class="menuitem-iconic" type="checkbox" observes="cmd_viewcomponentbar"/>
</menupopup>
</menu>
<menuitem id="menuitem_fullScreen" accesskey="&fullScreenCmd.accesskey;"
label="&fullScreenCmd.label;" key="key_fullScreen"
command="View:FullScreen" hidden="true"/>
<menuseparator />
<menuitem label="&stopCmd.label;" accesskey="&stopCmd.accesskey;" id="menuitem-stop" disabled="true" oncommand="BrowserStop();" key="key_stop"/>
<menuitem accesskey="&reloadCmd.accesskey;" key="key_reload" label="&reloadCmd.label;" oncommand="BrowserReload();"/>
<menuseparator />
<!-- overlayed from viewZoomOverlay.xul -->
<menu id="menu_textZoom" observes="isImage"/>
<menu label="&useStyleSheetMenu.label;" accesskey="&useStyleSheetMenu.accesskey;" disabled="false" observes="isImage">
<menupopup onpopupshowing="stylesheetFillPopup(this);"
oncommand="stylesheetSwitchAll(window.content, event.target.getAttribute('data')); setStyleDisabled(false);" type="radio">
<menuitem label="&useStyleSheetNone.label;" accesskey="&useStyleSheetNone.accesskey;" oncommand="setStyleDisabled(true); event.stopPropagation();" type="radio"/>
<menuitem label="&useStyleSheetPersistentOnly.label;" accesskey="&useStyleSheetPersistentOnly.accesskey;" type="radio"/>
</menupopup>
</menu>
<menu id="charsetMenu" observes="isImage"/>
<menuitem hidden="true" id="documentDirection-swap"
label="&bidiSwitchPageDirectionItem.label;"
accesskey="&bidiSwitchPageDirectionItem.accesskey;"
command="cmd_SwitchDocumentDirection"/>
<menuseparator />
<menuitem accesskey="&pageSourceCmd.accesskey;" label="&pageSourceCmd.label;" key="key_viewSource" command="View:PageSource"/>
<menuitem accesskey="&pageInfoCmd.accesskey;" label="&pageInfoCmd.label;" key="key_viewInfo" command="View:PageInfo"/>
<menuseparator />
<menu label="&applyTheme.label;" accesskey="&applyTheme.accesskey;">
<menupopup id="theme" datasources="rdf:chrome" ref="urn:mozilla:skin:root" oncommand="applyTheme(event.target)" onpopupshowing="checkTheme()"
sortResource="http://www.mozilla.org/rdf/chrome#displayName"
sortDirection="ascending">
<menuitem label="&getNewThemesCmd.label;" accesskey="&getNewThemesCmd.accesskey;" oncommand="getNewThemes();"/>
<menuseparator/>
<template>
<menuitem uri="..."
label="rdf:http://www.mozilla.org/rdf/chrome#displayName"
accesskey="rdf:http://www.mozilla.org/rdf/chrome#accessKey"
id="rdf:http://www.mozilla.org/rdf/chrome#name"
type="radio"
name="themeGroup"/>
</template>
</menupopup>
</menu>
</menupopup>
</menu>
<menu accesskey="&goMenu.accesskey;" label="&goMenu.label;" oncommand="gotoHistoryIndex(event);">
<menupopup id="goPopup" onpopupshowing="updateGoMenu(event);">
<menuitem label="&goBackCmd.label;" accesskey="&goBackCmd.accesskey;" key="goBackKb" command="Browser:Back"/>
<menuitem label="&goForwardCmd.label;" accesskey="&goForwardCmd.accesskey;" key="goForwardKb" command="Browser:Forward"/>
<menuitem label="&goUpCmd.label;" accesskey="&goUpCmd.accesskey;" key="goUpKb" command="Browser:Up"/>
<menuitem label="&goHomeCmd.label;" accesskey="&goHomeCmd.accesskey;" command="Browser:Home" key="goHome"/>
<menuseparator/>
<menuitem label="&historyCmd.label;" accesskey="&historyCmd.accesskey;" oncommand="toHistory()" key="key_gotoHistory"/>
<menuseparator hidden="true"/>
</menupopup>
</menu>
<menu id="BookmarksMenu" label="&bookmarksMenu.label;" accesskey="&bookmarksMenu.accesskey;"
datasources="rdf:bookmarks rdf:files rdf:localsearch rdf:internetsearch"
ref="NC:BookmarksRoot" flags="dont-test-empty" template="bookmarksMenuTemplate"
tooltip="btTooltip"
oncommand="BookmarksMenu.loadBookmark(event, this.database)"
onclick="BookmarksMenu.loadBookmarkMiddleClick(event, this.database)"
ondraggesture="nsDragAndDrop.startDrag(event, BookmarksMenuDNDObserver)"
ondragdrop="nsDragAndDrop.drop(event, BookmarksMenuDNDObserver); event.stopPropagation()"
ondragenter="nsDragAndDrop.dragEnter(event, BookmarksMenuDNDObserver); event.stopPropagation()"
ondragexit="nsDragAndDrop.dragExit(event, BookmarksMenuDNDObserver); event.stopPropagation()"
ondragover="nsDragAndDrop.dragOver(event, BookmarksMenuDNDObserver); event.stopPropagation()">
<menupopup id="menu_BookmarksPopup"
context="bookmarks-context-menu"
onpopupshowing="updateGroupmarkCommand();">
<menuitem key="addBookmarkKb" command="Browser:AddBookmark"/>
<menuitem key="addBookmarkAsKb" command="Browser:AddBookmarkAs"/>
<menuitem command="Browser:AddGroupmarkAs"/>
<menuitem key="manBookmarkKb" command="Browser:ManageBookmark"/>
<menuseparator/>
</menupopup>
</menu>
<menu id="tasksMenu">
<menupopup id="taskPopup">
<menuitem id="menu_searchWeb" label="&searchInternetCmd.label;" key="searchInternetKb" accesskey="&searchInternetCmd.accesskey;" command="Browser:SearchInternet"/>
<menuitem id="menu_translate" label="&translateMenu.label;" accesskey="&translateMenu.accesskey;" oncommand="Translate();"/>
<menuseparator id="navBeginGlobalItems"/>
</menupopup>
</menu>
<menu id="windowMenu"/>
<menu accesskey="&helpMenuCmd.accesskey;" id="menu_Help"/>
<!-- Menu for testing. -->
<menu id="debugMenu" accesskey="U" label="Debug">
<menupopup id="menu_Debug_Popup">
<menu label="Verification">
<menupopup>
<menuitem label="Tables" oncommand="loadURI('resource:/res/samples/test6.html');"/>
<menuitem label="DOM" oncommand="loadURI('http://mozilla.org/quality/browser/standards/javascript/tcmatrix/index.html');"/>
<menuitem label="GIF Images" oncommand="loadURI('http://www.mozilla.org/quality/browser/debugtc/bft_browser_imagemap.html');"/>
<menuitem label="JPEG Images" oncommand="loadURI('resource:/res/samples/test2.html');"/>
<menuitem label="PNG Images" oncommand="loadURI('http://www.libpng.org/pub/png/png-MagnoliaAlpha.html');"/>
<menuitem label="Transparency" oncommand="loadURI('resource:/res/samples/test13.html');"/>
<menuitem label="Animation" oncommand="loadURI('resource:/res/samples/test2.html');"/>
<menuitem label="Larger page" oncommand="loadURI('http://www.mozilla.org/quality/browser/debugtc/bft_browser_html_mix3.html');"/>
<menuitem label="Smaller page" oncommand="loadURI('http://www.mozilla.org/quality/browser/debugtc/bft_browser_link.html');"/>
<menuseparator />
<menuitem label="Mozilla" oncommand="loadURI('http://www.mozilla.org');"/>
<menuitem label="Yahoo" oncommand="loadURI('http://www.yahoo.com');"/>
<menuitem label="Netscape" oncommand="loadURI('http://www.netscape.com');"/>
<menuitem label="Excite" oncommand="loadURI('http://www.excite.com');"/>
<menuitem label="Microsoft" oncommand="loadURI('http://www.microsoft.com');"/>
<menuitem label="city.net" oncommand="loadURI('http://www.city.net');"/>
<menuitem label="Mirabilis" oncommand="loadURI('http://www.mirabilis.com');"/>
<menuitem label="Time" oncommand="loadURI('http://www.time.com');"/>
<menuitem label="Warner Bros." oncommand="loadURI('http://www.warnerbros.com');"/>
<menuitem label="CNN" oncommand="loadURI('http://www.cnn.com');"/>
<menuitem label="USA Today" oncommand="loadURI('http://www.usatoday.com');"/>
<menuitem label="Disney" oncommand="loadURI('http://www.disney.go.com');"/>
<menuitem label="Hotwired" oncommand="loadURI('http://www.hotwired.com');"/>
<menuitem label="Hotbot" oncommand="loadURI('http://www.hotbot.com');"/>
</menupopup>
</menu>
<menu label="Viewer Demos">
<menupopup>
<menuitem label="#0 Basic Styles" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test0.html');"/>
<menuitem label="#1 CSS Styles" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test1.html');"/>
<menuitem label="#2 Images" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test2.html');"/>
<menuitem label="#3 Basic Tables" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test3.html');"/>
<menuitem label="#4 Simple Tables" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test4.html');"/>
<menuitem label="#5 More Styles" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test5.html');"/>
<menuitem label="#6 Deeply Nested Tables" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test6.html');"/>
<menuitem label="#7 Scaled Anim Image" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test7.html');"/>
<menuitem label="#8 Form" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test8.html');"/>
<menuitem label="#9 Frames" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test9.html');"/>
<menuitem label="#10 Anim Images" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test10.html');"/>
<menuitem label="#11 Fixed Positioning" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test11.html');"/>
<menuitem label="#12 More Fixed Pos" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test12.html');"/>
<menuitem label="#13 DHTML" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test13.html');"/>
<menuitem label="#14 XML Sorting" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test14.html');"/>
<menuitem label="#15 XML IRS" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test15.html');"/>
<menuitem label="#16 Gfx Widgets" oncommand="loadURI('http://www.mozilla.org/newlayout/samples/test16.html');"/>
</menupopup>
</menu>
<menu label="XBL Test Suite">
<menupopup>
<menuitem label="#0 Remote XBL" oncommand="loadURI('http://www.mozilla.org/projects/xbl/test0/test.xul');"/>
<menuitem label="#1 Technicolor DIV" oncommand="loadURI('http://www.mozilla.org/projects/xbl/test1/test.html');"/>
<menuitem label="#2 Rollover Madness" oncommand="loadURI('http://www.mozilla.org/projects/xbl/test2/test.html');"/>
<menuitem label="#3 Popups in HTML" oncommand="loadURI('http://www.mozilla.org/projects/xbl/test3/test.html');"/>
<menuitem label="#4 Partition Magic" oncommand="loadURI('http://www.mozilla.org/projects/xbl/test4/test.html');"/>
<menuitem label="#5 Sticky Notes" oncommand="loadURI('http://www.mozilla.org/projects/xbl/test5/test.html');"/>
</menupopup>
</menu>
<menu label="XUL Test Suite">
<menupopup>
<menuitem label="#1 Stacks" oncommand="loadURI('http://www.mozilla.org/projects/xul/tests/stacks.xul');"/>
<menuitem label="#2 Popups" oncommand="loadURI('http://www.mozilla.org/projects/xul/tests/popups.xul');"/>
<menuitem label="#3 Descriptions and Labels" oncommand="loadURI('http://www.mozilla.org/projects/xul/tests/label.xul');"/>
<menuitem label="#4 Dialog Buttons" oncommand="loadURI('http://www.mozilla.org/projects/xul/tests/buttons.xul');"/>
<menuitem label="#5 Tabindex" oncommand="loadURI('http://www.mozilla.org/projects/xul/tests/tabindex.xul');"/>
</menupopup>
</menu>
<menuitem label="Form Manager Samples" oncommand="loadURI('http://www.mozilla.org/wallet/samples/wallet.html');"/>
<menuitem label="chofmann's Browser Buster" oncommand="loadURI('http://webtools.mozilla.org/buster/');"/>
<menuitem label="Composer (with test page)" oncommand="window.openDialog('chrome://editor/content','_blank','chrome,all,dialog=no','chrome://editor/content/EditorInitPage.html')"/>
<menuitem label="Flush Memory" oncommand="Components.classes['@mozilla.org/xpcom/memory-service;1'].getService(Components.interfaces.nsIMemory).heapMinimize(true);" />
<menuitem label="Show Build Configuration" oncommand="loadURI('about:buildconfig');"/>
<menuseparator />
<menuitem label="StringBundle Test" oncommand="loadURI('resource:/res/strres-test.xul');"/>
<menuitem label="Bloat: Dump New Stats" oncommand="loadURI('about:bloat?new');"/>
<menuitem label="Bloat: Dump All Stats" oncommand="loadURI('about:bloat');"/>
<menuitem label="Bloat: Clear Stats" oncommand="loadURI('about:bloat?clear');"/>
<menuseparator />
<menu label="Leak Detector">
<menupopup>
<menuitem label="Dump Memory Leaks" oncommand="dumpMemoryLeaks();"/>
<menuitem label="Trace Chrome" oncommand="traceChrome();"/>
<menuitem label="Trace Document" oncommand="traceDocument();"/>
<menuitem label="Verbose" oncommand="traceVerbose(this.getAttribute('checked'))" type="checkbox" checked="false"/>
</menupopup>
</menu>
</menupopup>
</menu>
<menu id="qaMenu" accesskey="Q" label="QA">
<menupopup id="qaMenuPopup">
<menuitem label="Getting Involved" oncommand="loadURI('http://www.mozilla.org/projects/seamonkey/start/');"/>
<menuitem label="Mozilla QA Overview" oncommand="loadURI('http://www.mozilla.org/quality/');"/>
<menuseparator />
<menuitem label="Frequently Reported Bugs" oncommand="loadURI('https://bugzilla.mozilla.org/duplicates.cgi');"/>
<menuitem label="Bug Writing Guidelines" oncommand="loadURI('http://www.mozilla.org/quality/bug-writing-guidelines.html');"/>
<menuitem label="File a Bug" oncommand="loadURI('https://bugzilla.mozilla.org/enter_bug.cgi?format=guided');"/>
<menuseparator />
<menuitem label="Bugs Filed Today" oncommand="loadURI('https://bugzilla.mozilla.org/buglist.cgi?product=Core&amp;product=Mozilla+Application+Suite&amp;chfieldfrom=0d&amp;chfieldto=Now&amp;chfield=%5BBug+creation%5D');"/>
<menuitem label="CVS Checkins Today" oncommand="loadURI('http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&amp;module=SeaMonkeyAll&amp;branch=HEAD&amp;branchtype=match&amp;sortby=Date&amp;date=day&amp;cvsroot=%2Fcvsroot');"/>
<menuitem label="Tree Status" oncommand="loadURI('http://tinderbox.mozilla.org/showbuilds.cgi?tree=SeaMonkey');"/>
<menuseparator />
<menuitem label="Smoke Tests" oncommand="loadURI('http://www.mozilla.org/quality/smoketests/');"/>
<menuitem label="Pre-Checkin Tests" oncommand="loadURI('http://www.mozilla.org/quality/precheckin-tests.html');"/>
<menuseparator />
<menuitem label="Latest Builds" oncommand="loadURI('http://ftp.mozilla.org/pub/mozilla.org/seamonkey/nightly/latest-trunk/');"/>
</menupopup>
</menu>
</menubar>
</overlay>

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

@ -1,169 +0,0 @@
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Alec Flett <alecf@netscape.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
const mediatorContractId = "@mozilla.org/appshell/window-mediator;1";
const nsIWebBrowserChrome = Components.interfaces.nsIWebBrowserChrome;
function nsBrowserContentListener(toplevelWindow, contentWindow)
{
// this one is not as easy as you would hope.
// need to convert toplevelWindow to an XPConnected object, instead
// of a DOM-based object, to be able to QI() it to nsIXULWindow
this.init(toplevelWindow, contentWindow);
}
/* implements nsIURIContentListener */
nsBrowserContentListener.prototype =
{
init: function(toplevelWindow, contentWindow)
{
this.toplevelWindow = toplevelWindow;
this.contentWindow = contentWindow;
// hook up the whole parent chain thing
var windowDocShell = this.convertWindowToDocShell(toplevelWindow);
if (windowDocShell) {
windowDocshell
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIURIContentListener)
.parentContentListener = this;
}
var registerWindow = false;
try {
var treeItem = contentWindow.docShell.QueryInterface(Components.interfaces.nsIDocShellTreeItem);
var treeOwner = treeItem.treeOwner;
var interfaceRequestor = treeOwner.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
var webBrowserChrome = interfaceRequestor.getInterface(nsIWebBrowserChrome);
if (webBrowserChrome)
{
var chromeFlags = webBrowserChrome.chromeFlags;
var res = chromeFlags & nsIWebBrowserChrome.CHROME_ALL;
var res2 = chromeFlags & nsIWebBrowserChrome.CHROME_DEFAULT;
if ( res == nsIWebBrowserChrome.CHROME_ALL || res2 == nsIWebBrowserChrome.CHROME_DEFAULT)
{
registerWindow = true;
}
}
} catch (ex) {}
// register ourselves
if (registerWindow)
{
var uriLoader = Components.classes["@mozilla.org/uriloader;1"].getService(Components.interfaces.nsIURILoader);
uriLoader.registerContentListener(this);
}
},
close: function()
{
this.contentWindow = null;
var uriLoader = Components.classes["@mozilla.org/uriloader;1"].getService(Components.interfaces.nsIURILoader);
uriLoader.unRegisterContentListener(this);
},
QueryInterface: function(iid)
{
if (iid.equals(Components.interfaces.nsIURIContentListener) ||
iid.equals(Components.interfaces.nsISupportsWeakReference) ||
iid.equals(Components.interfaces.nsISupports))
return this;
Components.returnCode = Components.results.NS_ERROR_NO_INTERFACE;
return null;
},
onStartURIOpen: function(uri)
{
// ignore and don't abort
return false;
},
doContent: function(contentType, isContentPreferred, request, contentHandler)
{
// forward the doContent to our content area webshell
var docShell = this.contentWindow.docShell;
var contentListener;
try {
contentListener =
docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIURIContentListener);
} catch (ex) {
dump(ex);
}
if (!contentListener) return false;
return contentListener.doContent(contentType, isContentPreferred, request, contentHandler);
},
isPreferred: function(contentType, desiredContentType)
{
try {
var webNavInfo =
Components.classes["@mozilla.org/webnavigation-info;1"]
.getService(Components.interfaces.nsIWebNavigationInfo);
return webNavInfo.isTypeSupported(contentType, null);
} catch (e) {
// XXX propagate failures other than "NS_ERROR_NOT_AVAILABLE"?
// This seems to never get called, so not like it matters....
return false;
}
},
canHandleContent: function(contentType, isContentPreferred, desiredContentType)
{
var docShell = this.contentWindow.docShell;
var contentListener;
try {
contentListener =
docShell.QueryInterface(Components.interfaces.nsIInterfaceRequestor).getInterface(Components.interfaces.nsIURIContentListener);
} catch (ex) {
dump(ex);
}
if (!contentListener) return false;
return contentListener.canHandleContent(contentType, isContentPreferred, desiredContentType);
},
convertWindowToDocShell: function(win) {
// don't know how to do this
return null;
},
loadCookie: null,
parentContentListener: null
}

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

@ -1,472 +0,0 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Blake Ross <blakeross@telocity.com>
* Peter Annema <disttsc@bart.nl>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
function nsBrowserStatusHandler()
{
this.init();
}
nsBrowserStatusHandler.prototype =
{
// Stored Status, Link and Loading values
status : "",
defaultStatus : "",
jsStatus : "",
jsDefaultStatus : "",
overLink : "",
QueryInterface : function(aIID)
{
if (aIID.equals(Components.interfaces.nsIWebProgressListener) ||
aIID.equals(Components.interfaces.nsISupportsWeakReference) ||
aIID.equals(Components.interfaces.nsIXULBrowserWindow) ||
aIID.equals(Components.interfaces.nsISupports))
return this;
throw Components.results.NS_NOINTERFACE;
},
init : function()
{
this.urlBar = document.getElementById("urlbar");
this.throbberElement = document.getElementById("navigator-throbber");
this.statusMeter = document.getElementById("statusbar-icon");
this.statusPanel = document.getElementById("progress-panel");
this.stopButton = document.getElementById("stop-button");
this.stopMenu = document.getElementById("menuitem-stop");
this.stopContext = document.getElementById("context-stop");
this.statusTextField = document.getElementById("statusbar-display");
this.isImage = document.getElementById("isImage");
this.securityButton = document.getElementById("security-button");
// Initialize the security button's state and tooltip text
const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
this.onSecurityChange(null, null, nsIWebProgressListener.STATE_IS_INSECURE);
},
destroy : function()
{
// XXXjag to avoid leaks :-/, see bug 60729
this.urlBar = null;
this.throbberElement = null;
this.statusMeter = null;
this.statusPanel = null;
this.stopButton = null;
this.stopMenu = null;
this.stopContext = null;
this.statusTextField = null;
this.isImage = null;
this.securityButton = null;
},
setJSStatus : function(status)
{
this.jsStatus = status;
this.updateStatusField();
},
setJSDefaultStatus : function(status)
{
this.jsDefaultStatus = status;
this.updateStatusField();
},
setDefaultStatus : function(status)
{
this.defaultStatus = status;
this.updateStatusField();
},
setOverLink : function(link, context)
{
this.overLink = link;
// clear out 'Done' (or other message) on first hover
if (this.defaultStatus)
this.defaultStatus = "";
this.updateStatusField();
if (link)
this.statusTextField.setAttribute('crop', 'center');
else
this.statusTextField.setAttribute('crop', 'end');
},
updateStatusField : function()
{
var text = this.overLink || this.status || this.jsStatus || this.jsDefaultStatus || this.defaultStatus;
// check the current value so we don't trigger an attribute change
// and cause needless (slow!) UI updates
if (this.statusTextField.label != text)
this.statusTextField.label = text;
},
mimeTypeIsTextBased : function(contentType)
{
return /^text\/|\+xml$/.test(contentType) ||
contentType == "application/x-javascript" ||
contentType == "application/xml" ||
contentType == "mozilla.application/cached-xul";
},
onLinkIconAvailable : function(aHref)
{
if (gProxyFavIcon && pref.getBoolPref("browser.chrome.site_icons")) {
var browser = getBrowser();
if (browser.userTypedValue === null)
gProxyFavIcon.setAttribute("src", aHref);
// update any bookmarks with new icon reference
if (!gBookmarksService)
gBookmarksService = Components.classes["@mozilla.org/browser/bookmarks-service;1"]
.getService(Components.interfaces.nsIBookmarksService);
gBookmarksService.updateBookmarkIcon(browser.currentURI.spec, aHref);
}
},
onProgressChange : function (aWebProgress, aRequest,
aCurSelfProgress, aMaxSelfProgress,
aCurTotalProgress, aMaxTotalProgress)
{
if (aMaxTotalProgress > 0) {
// This is highly optimized. Don't touch this code unless
// you are intimately familiar with the cost of setting
// attrs on XUL elements. -- hyatt
var percentage = (aCurTotalProgress * 100) / aMaxTotalProgress;
this.statusMeter.value = percentage;
}
},
onStateChange : function(aWebProgress, aRequest, aStateFlags, aStatus)
{
const nsIWebProgressListener = Components.interfaces.nsIWebProgressListener;
const nsIChannel = Components.interfaces.nsIChannel;
var ctype;
if (aStateFlags & nsIWebProgressListener.STATE_START) {
// This (thanks to the filter) is a network start or the first
// stray request (the first request outside of the document load),
// initialize the throbber and his friends.
// Call start document load listeners (only if this is a network load)
if (aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK &&
aRequest && aWebProgress.DOMWindow == content)
this.startDocumentLoad(aRequest);
// Show the progress meter
this.statusPanel.hidden = false;
// Turn the throbber on.
this.throbberElement.setAttribute("busy", "true");
// XXX: These need to be based on window activity...
this.stopButton.disabled = false;
this.stopMenu.removeAttribute('disabled');
this.stopContext.removeAttribute('disabled');
}
else if (aStateFlags & nsIWebProgressListener.STATE_STOP) {
if (aStateFlags & nsIWebProgressListener.STATE_IS_NETWORK) {
if (aRequest) {
if (aWebProgress.DOMWindow == content)
this.endDocumentLoad(aRequest, aStatus);
}
}
// This (thanks to the filter) is a network stop or the last
// request stop outside of loading the document, stop throbbers
// and progress bars and such
if (aRequest) {
var msg = "";
// Get the channel if the request is a channel
if (aRequest instanceof nsIChannel) {
var location = aRequest.URI.spec;
if (location != "about:blank") {
const kErrorBindingAborted = 0x804B0002;
const kErrorNetTimeout = 0x804B000E;
switch (aStatus) {
case kErrorBindingAborted:
msg = gNavigatorBundle.getString("nv_stopped");
break;
case kErrorNetTimeout:
msg = gNavigatorBundle.getString("nv_timeout");
break;
}
}
}
// If msg is false then we did not have an error (channel may have
// been null, in the case of a stray image load).
if (!msg) {
msg = gNavigatorBundle.getString("nv_done");
}
this.status = "";
this.setDefaultStatus(msg);
// Disable menu entries for images, enable otherwise
if (content.document && this.mimeTypeIsTextBased(content.document.contentType))
this.isImage.removeAttribute('disabled');
else
this.isImage.setAttribute('disabled', 'true');
}
// Turn the progress meter and throbber off.
this.statusPanel.hidden = true;
this.statusMeter.value = 0; // be sure to clear the progress bar
this.throbberElement.removeAttribute("busy");
// XXX: These need to be based on window activity...
// XXXjag: <command id="cmd_stop"/> ?
this.stopButton.disabled = true;
this.stopMenu.setAttribute('disabled', 'true');
this.stopContext.setAttribute('disabled', 'true');
}
},
onLocationChange : function(aWebProgress, aRequest, aLocation)
{
if (gContextMenu) {
// Optimise for the common case
if (aWebProgress.DOMWindow == content)
gContextMenu.menu.hidePopup();
else {
for (var contextWindow = gContextMenu.target.ownerDocument.defaultView;
contextWindow != contextWindow.parent;
contextWindow = contextWindow.parent) {
if (contextWindow == aWebProgress.DOMWindow) {
gContextMenu.menu.hidePopup();
break;
}
}
}
}
if (document.tooltipNode) {
// Optimise for the common case
if (aWebProgress.DOMWindow == content) {
document.getElementById("aHTMLTooltip").hidePopup();
document.tooltipNode = null;
} else {
for (var tooltipWindow =
document.tooltipNode.target.ownerDocument.defaultView;
tooltipWindow != tooltipWindow.parent;
tooltipWindow = tooltipWindow.parent) {
if (tooltipWindow == aWebProgress.DOMWindow) {
document.getElementById("aHTMLTooltip").hidePopup();
document.tooltipNode = null;
break;
}
}
}
}
// XXX temporary hack for bug 104532.
// Depends heavily on setOverLink implementation
if (!aRequest)
this.status = this.jsStatus = this.jsDefaultStatus = "";
this.setOverLink("");
var locationURI = null;
var location = "";
if (aLocation) {
try {
if (!gURIFixup)
gURIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"]
.getService(Components.interfaces.nsIURIFixup);
// If the url has "wyciwyg://" as the protocol, strip it off.
// Nobody wants to see it on the urlbar for dynamically generated
// pages.
locationURI = gURIFixup.createExposableURI(aLocation);
location = locationURI.spec;
}
catch(ex) {
location = aLocation.spec;
}
}
if (!getWebNavigation().canGoBack && location == "about:blank")
location = "";
// Disable menu entries for images, enable otherwise
if (content.document && this.mimeTypeIsTextBased(content.document.contentType))
this.isImage.removeAttribute('disabled');
else
this.isImage.setAttribute('disabled', 'true');
// We should probably not do this if the value has changed since the user
// searched
// Update urlbar only if a new page was loaded on the primary content area
// Do not update urlbar if there was a subframe navigation
var browser = getBrowser().selectedBrowser;
if (aWebProgress.DOMWindow == content) {
// The document loaded correctly, clear the value if we should
if (browser.userTypedClear > 0)
browser.userTypedValue = null;
var userTypedValue = browser.userTypedValue;
if (userTypedValue === null) {
this.urlBar.value = location;
SetPageProxyState("valid", aLocation);
// Setting the urlBar value in some cases causes userTypedValue to
// become set because of oninput, so reset it to null
browser.userTypedValue = null;
} else {
this.urlBar.value = userTypedValue;
SetPageProxyState("invalid", null);
}
}
UpdateBackForwardButtons();
var blank = (location == "about:blank") || (location == "");
//clear popupDomain accordingly so that icon will go away when visiting
//an unblocked site after a blocked site. note: if a popup is blocked
//the icon will stay as long as we are in the same domain.
if (blank ||
!("popupDomain" in browser)) {
browser.popupDomain = null;
browser.popupUrls = [];
browser.popupFeatures = [];
}
else {
var hostPort = "";
try {
hostPort = locationURI.hostPort;
}
catch(ex) { }
if (hostPort != browser.popupDomain) {
browser.popupDomain = null;
browser.popupUrls = [];
browser.popupFeatures = [];
}
}
var popupIcon = document.getElementById("popupIcon");
popupIcon.hidden = !browser.popupDomain;
},
onStatusChange : function(aWebProgress, aRequest, aStatus, aMessage)
{
this.status = aMessage;
this.updateStatusField();
},
onSecurityChange : function(aWebProgress, aRequest, aState)
{
const wpl = Components.interfaces.nsIWebProgressListener;
switch (aState) {
case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_HIGH:
this.securityButton.setAttribute("level", "high");
this.urlBar.setAttribute("level", "high");
break;
case wpl.STATE_IS_SECURE | wpl.STATE_SECURE_LOW:
this.securityButton.setAttribute("level", "low");
this.urlBar.setAttribute("level", "low");
break;
case wpl.STATE_IS_BROKEN:
this.securityButton.setAttribute("level", "broken");
this.urlBar.setAttribute("level", "broken");
break;
case wpl.STATE_IS_INSECURE:
default:
this.securityButton.removeAttribute("level");
this.urlBar.removeAttribute("level");
break;
}
var securityUI = getBrowser().securityUI;
if (securityUI)
this.securityButton.setAttribute("tooltiptext", securityUI.tooltipText);
else
this.securityButton.removeAttribute("tooltiptext");
},
startDocumentLoad : function(aRequest)
{
// It's okay to clear what the user typed when we start
// loading a document. If the user types, this flag gets
// set to false, if the document load ends without an
// onLocationChange, this flag also gets set to false
// (so we keep it while switching tabs after failed load
getBrowser().userTypedClear++;
const nsIChannel = Components.interfaces.nsIChannel;
var urlStr = aRequest.QueryInterface(nsIChannel).URI.spec;
var observerService = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
try {
observerService.notifyObservers(content, "StartDocumentLoad", urlStr);
} catch (e) {
}
},
endDocumentLoad : function(aRequest, aStatus)
{
// The document is done loading, it's okay to clear
// the value again.
if (getBrowser().userTypedClear > 0)
getBrowser().userTypedClear--;
const nsIChannel = Components.interfaces.nsIChannel;
var urlStr = aRequest.QueryInterface(nsIChannel).originalURI.spec;
if (Components.isSuccessCode(aStatus))
dump("Document "+urlStr+" loaded successfully\n"); // per QA request
else {
// per QA request
var e = new Components.Exception("", aStatus);
var name = e.name;
dump("Error loading URL "+urlStr+" : "+
Number(aStatus).toString(16));
if (name)
dump(" ("+name+")");
dump('\n');
}
var observerService = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
var notification = Components.isSuccessCode(aStatus) ? "EndDocumentLoad" : "FailDocumentLoad";
try {
observerService.notifyObservers(content, notification, urlStr);
} catch (e) {
}
}
}

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

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

@ -1,361 +0,0 @@
<?xml version="1.0"?>
<!-- ***** BEGIN LICENSE BLOCK *****
Version: MPL 1.1/GPL 2.0/LGPL 2.1
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 Mozilla Communicator client code, released
March 31, 1998.
The Initial Developer of the Original Code is
Netscape Communications Corporation.
Portions created by the Initial Developer are Copyright (C) 1998-2004
the Initial Developer. All Rights Reserved.
Contributor(s):
Simeon Morrison <smorrison@gte.com>
Chris McAfee <mcafee@netscape.com>
Daniel Brooks <db48x@yahoo.com>
Gervase Markham <gerv@gerv.net>
Florian QUEZE <f.qu@queze.net>
Alternatively, the contents of this file may be used under the terms of
either of the GNU General Public License Version 2 or later (the "GPL"),
or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
in which case the provisions of the GPL or the LGPL are applicable instead
of those above. If you wish to allow use of your version of this file only
under the terms of either the GPL or the LGPL, and not to allow others to
use your version of this file under the terms of the MPL, indicate your
decision by deleting the provisions above and replace them with the notice
and other provisions required by the GPL or the LGPL. If you do not delete
the provisions above, a recipient may use your version of this file under
the terms of any one of the MPL, the GPL or the LGPL.
***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://navigator/skin/pageInfo.css" type="text/css"?>
<!DOCTYPE window [
<!ENTITY % pageInfoDTD SYSTEM "chrome://navigator/locale/pageInfo.dtd">
%pageInfoDTD;
]>
<window id="main-window"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
windowtype="Browser:page-info"
onload="onLoadPageInfo()"
align="stretch"
screenX="10" screenY="10"
width="&pageInfoWindow.width;" height="&pageInfoWindow.height;"
persist="screenX screenY width height sizemode">
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaUtils.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/utilityOverlay.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/pageInfo.js"/>
<script type="application/x-javascript" src="chrome://help/content/contextHelp.js"/>
<stringbundleset id="pageinfobundleset">
<stringbundle id="pageinfobundle" src="chrome://navigator/locale/pageInfo.properties"/>
</stringbundleset>
<commandset>
<command id="cmd_close" oncommand="window.close();"/>
<command id="cmd_help" oncommand="doHelpButton();"/>
<command id="cmd_copy" oncommand="doCopy();"/>
<command id="cmd_selectall" oncommand="doSelectAll();"/>
</commandset>
<keyset>
<key key="&closeWindow.key;" modifiers="accel" command="cmd_close"/>
<key keycode="VK_ESCAPE" command="cmd_close"/>
<key key="." modifiers="meta" command="cmd_close"/>
<key keycode="VK_F1" command="cmd_help"/>
<key key="&copy.key;" modifiers="accel" command="cmd_copy"/>
<key key="&selectall.key;" modifiers="accel" command="cmd_selectall"/>
<key key="&selectall.key;" modifiers="alt" command="cmd_selectall"/>
</keyset>
<menupopup id="picontext">
<menuitem label="&selectall.label;" command="cmd_selectall" accesskey="&selectall.accesskey;"/>
<menuitem label="&copy.label;" command="cmd_copy" accesskey="&copy.accesskey;"/>
</menupopup>
<tabbox id="tabbox" flex="1" class="spaced">
<tabs id="tabs">
<tab id="generalTab" label="&generalTab;" accesskey="&generalTab.accesskey;"/>
<tab id="formsTab" label="&formsTab;" accesskey="&formsTab.accesskey;"
oncommand="ensureSelection(formView)"/>
<tab id="linksTab" label="&linksTab;" accesskey="&linksTab.accesskey;"
oncommand="ensureSelection(linkView)"/>
<tab id="mediaTab" label="&mediaTab;" accesskey="&mediaTab.accesskey;"
oncommand="ensureSelection(imageView)"/>
<!-- Others added by overlay -->
</tabs>
<tabpanels id="tabpanels" flex="1">
<!-- General page information -->
<vbox>
<textbox class="header" readonly="true" id="titletext"/>
<grid>
<columns>
<column/>
<column style="width: .5em;"/>
<column flex="1"/>
</columns>
<rows>
<row>
<label control="urltext" value="&generalURL;"/>
<separator/>
<textbox readonly="true" id="urltext"/>
</row>
<row>
<separator class="thin"/>
</row>
<row>
<label control="typetext" value="&generalType;"/>
<separator/>
<textbox readonly="true" id="typetext"/>
</row>
<row>
<label control="modetext" value="&generalMode;"/>
<separator/>
<textbox readonly="true" id="modetext"/>
</row>
<row>
<label control="sourcetext" value="&generalSource;"/>
<separator/>
<textbox readonly="true" id="sourcetext"/>
</row>
<row>
<label control="encodingtext" value="&generalEncoding;"/>
<separator/>
<textbox readonly="true" id="encodingtext"/>
</row>
<row>
<label control="sizetext" value="&generalSize;"/>
<separator/>
<textbox readonly="true" id="sizetext"/>
</row>
<row>
<label control="refertext" value="&generalReferrer;"/>
<separator/>
<textbox readonly="true" id="refertext"/>
</row>
<row>
<separator class="thin"/>
</row>
<row>
<label control="modifiedtext" value="&generalModified;"/>
<separator/>
<textbox readonly="true" id="modifiedtext"/>
</row>
<row>
<label control="expirestext" value="&generalExpires;"/>
<separator/>
<textbox readonly="true" id="expirestext"/>
</row>
</rows>
</grid>
<separator class="thin"/>
<label id="metahead" control="metatree" class="header" value="&generalMeta;"/>
<tree id="metatree" flex="1" contextmenu="picontext">
<treecols>
<treecol persist="hidden width" flex="1" id="meta-name" label="&generalMetaName;"/>
<splitter class="tree-splitter"/>
<treecol persist="hidden width" flex="4" id="meta-content" label="&generalMetaContent;"/>
</treecols>
<treechildren flex="1"/>
</tree>
</vbox>
<!-- Form information -->
<vbox>
<tree id="formtree" class="fixedsize" onselect="onFormSelect();" contextmenu="picontext">
<treecols>
<splitter class="tree-splitter"/>
<treecol sortSeparators="true" persist="hidden width" flex="1"
width="1" id="form-name" label="&formName;"/>
<splitter class="tree-splitter"/>
<treecol sortSeparators="true" persist="hidden width" flex="3"
width="3" id="form-method" label="&formMethod;"/>
<splitter class="tree-splitter"/>
<treecol sortSeparators="true" persist="hidden width" flex="2"
width="2" id="form-action" label="&formAction;"/>
</treecols>
<treechildren flex="1"/>
</tree>
<splitter orient="vertical"/>
<vbox flex="1">
<textbox readonly="true" class="header" id="formname"/>
<grid>
<columns>
<column/>
<column style="width: .5em;"/>
<column flex="1"/>
</columns>
<rows>
<row>
<label control="formenctype" value="&formEncoding;"/>
<separator/>
<textbox readonly="true" id="formenctype"/>
</row>
<row>
<label control="formtarget" value="&formTarget;"/>
<separator/>
<textbox readonly="true" class="label" id="formtarget"/>
</row>
</rows>
</grid>
<label control="formpreview" class="header" value="&formFields;"/>
<tree id="formpreview" flex="1" contextmenu="picontext">
<treecols>
<treecol sortSeparators="true" persist="hidden width" flex="3"
width="3" id="field-label" label="&formLabel;"/>
<splitter class="tree-splitter"/>
<treecol sortSeparators="true" persist="hidden width" flex="3"
width="3" id="field-field" label="&formFName;"/>
<splitter class="tree-splitter"/>
<treecol sortSeparators="true" persist="hidden width" flex="1"
width="1" id="field-type" label="&formType;"/>
<splitter class="tree-splitter"/>
<treecol sortSeparators="true" persist="hidden width" flex="3"
width="3" id="field-value" label="&formCValue;"/>
</treecols>
<treechildren flex="1"/>
</tree>
</vbox>
</vbox>
<!-- Link info -->
<vbox>
<tree id="linktree" flex="1" ondraggesture="onBeginLinkDrag(event,'link-address','link-name')" contextmenu="picontext">
<treecols>
<treecol sortSeparators="true" persist="hidden width" flex="5"
width="5" id="link-name" label="&linkName;"/>
<splitter class="tree-splitter"/>
<treecol sortSeparators="true" persist="hidden width" flex="7"
width="7" id="link-address" label="&linkAddress;"/>
<splitter class="tree-splitter"/>
<treecol sortSeparators="true" persist="hidden width" flex="2"
width="2" id="link-type" label="&linkType;"/>
<splitter class="tree-splitter"/>
<treecol sortSeparators="true" persist="hidden width" flex="2"
width="2" id="link-target" label="&linkTarget;" hidden="true"/>
<splitter class="tree-splitter"/>
<treecol sortSeparators="true" persist="hidden width" flex="1"
width="1" id="link-accesskey" label="&linkAccessKey;" hidden="true"/>
</treecols>
<treechildren flex="1"/>
</tree>
</vbox>
<!-- Media information -->
<vbox>
<tree id="imagetree" class="fixedsize" onselect="onImageSelect();" ondraggesture="onBeginLinkDrag(event,'image-address','image-alt')" contextmenu="picontext">
<treecols>
<treecol sortSeparators="true" persist="hidden width" flex="10"
width="10" id="image-address" label="&mediaAddress;"/>
<splitter class="tree-splitter"/>
<treecol sortSeparators="true" persist="hidden width" flex="2"
width="2" id="image-type" label="&mediaType;"/>
<splitter class="tree-splitter"/>
<treecol sortSeparators="true" hidden="true" persist="hidden width" flex="4"
width="4" id="image-alt" label="&mediaAltHeader;"/>
<splitter class="tree-splitter"/>
<treecol sortSeparators="true" hidden="true" persist="hidden width" flex="1"
width="1" id="image-count" label="&mediaCount;"/>
</treecols>
<treechildren flex="1"/>
</tree>
<splitter orient="vertical"/>
<vbox flex="1">
<grid>
<columns>
<column/>
<column style="width: .5em;"/>
<column flex="1"/>
</columns>
<rows>
<row>
<label control="imageurltext" value="&mediaURL;"/>
<separator/>
<textbox readonly="true" id="imageurltext"/>
</row>
<row>
<label control="imagetitletext" value="&mediaTitle;"/>
<separator/>
<textbox readonly="true" id="imagetitletext"/>
</row>
<row>
<label control="imagealttext" value="&mediaAlt;"/>
<separator/>
<textbox readonly="true" id="imagealttext"/>
</row>
<row>
<label control="imagelongdesctext" value="&mediaLongdesc;"/>
<separator/>
<textbox readonly="true" id="imagelongdesctext"/>
</row>
<row>
<label control="imagetypetext" value="&generalType;"/>
<separator/>
<textbox readonly="true" id="imagetypetext"/>
</row>
<row>
<label control="imagesourcetext" value="&generalSource;"/>
<separator/>
<textbox readonly="true" id="imagesourcetext"/>
</row>
<row>
<label control="imagesizetext" value="&generalSize;"/>
<separator/>
<textbox readonly="true" id="imagesizetext"/>
</row>
<row>
<label control="imageexpirestext" value="&generalExpires;"/>
<separator/>
<textbox readonly="true" id="imageexpirestext"/>
</row>
<row>
<label control="imageSize" value="&mediaDimensions;"/>
<separator/>
<textbox readonly="true" id="imageSize"/>
</row>
<row id="physRow" collapsed="true">
<label control="physSize" value="&mediaPhysDimensions;"/>
<separator/>
<textbox readonly="true" id="physSize"/>
</row>
</rows>
</grid>
<hbox align="end">
<label control="thepreviewimage" value="&mediaPreview;" class="header"/>
<spacer flex="1"/>
<button label="&mediaSaveAs;" accesskey="&mediaSaveAs.accesskey;"
id="imagesaveasbutton" disabled="true"
oncommand="saveMedia();"/>
</hbox>
<vbox class="inset iframe" flex="1" pack="center">
<hbox id="theimagecontainer" pack="center">
<image id="thepreviewimage"/>
</hbox>
<hbox id="brokenimagecontainer" pack="center" collapsed="true">
<image id="brokenimage" src="resource:///res/broken-image.gif"/>
</hbox>
</vbox>
</vbox>
</vbox>
<!-- Others added by overlay -->
</tabpanels>
</tabbox>
</window>

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

@ -1,5 +0,0 @@
# Do NOT localize or otherwise change these values
browser.search.param.Google.1.custom=client=mozilla
browser.search.param.Google.1.default=client=mozilla
browser.search.param.Google.release=rls=%S:%S:unofficial

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

@ -1,193 +0,0 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation.
* Portions created by the Initial Developer are Copyright (C) 1998
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Jason Eager <jce2@po.cwru.edu>
* Blake Ross <BlakeR1234@aol.com>
* Peter Annema <disttsc@bart.nl>
* Dean Tessman <dean_tessman@hotmail.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
const MAX_HISTORY_MENU_ITEMS = 15;
const MAX_URLBAR_HISTORY_MENU_ITEMS = 30;
const MAX_URLBAR_HISTORY_ITEMS = 100;
var gRDF = null;
var gRDFC = null;
var gGlobalHistory = null;
var gURIFixup = null;
var gLocalStore = null;
function FillHistoryMenu(aParent, aMenu)
{
// Remove old entries if any
deleteHistoryItems(aParent);
var sessionHistory = getWebNavigation().sessionHistory;
var count = sessionHistory.count;
var index = sessionHistory.index;
var end;
var j;
var entry;
switch (aMenu)
{
case "back":
end = (index > MAX_HISTORY_MENU_ITEMS) ? index - MAX_HISTORY_MENU_ITEMS : 0;
if ((index - 1) < end) return false;
for (j = index - 1; j >= end; j--)
{
entry = sessionHistory.getEntryAtIndex(j, false);
if (entry)
createMenuItem(aParent, j, entry.title);
}
break;
case "forward":
end = ((count-index) > MAX_HISTORY_MENU_ITEMS) ? index + MAX_HISTORY_MENU_ITEMS : count - 1;
if ((index + 1) > end) return false;
for (j = index + 1; j <= end; j++)
{
entry = sessionHistory.getEntryAtIndex(j, false);
if (entry)
createMenuItem(aParent, j, entry.title);
}
break;
case "go":
aParent.lastChild.hidden = (count == 0);
end = count > MAX_HISTORY_MENU_ITEMS ? count - MAX_HISTORY_MENU_ITEMS : 0;
for (j = count - 1; j >= end; j--)
{
entry = sessionHistory.getEntryAtIndex(j, false);
if (entry)
createRadioMenuItem(aParent, j, entry.title, j==index);
}
break;
}
return true;
}
function executeUrlBarHistoryCommand( aTarget )
{
var index = aTarget.getAttribute("index");
var label = aTarget.getAttribute("label");
if (index != "nothing_available" && label)
{
if (gURLBar) {
gURLBar.value = label;
addToUrlbarHistory(gURLBar.value);
BrowserLoadURL();
} else {
var uri = getShortcutOrURI(label);
loadURI(uri);
}
}
}
function createUBHistoryMenu( aParent )
{
if (!gRDF)
gRDF = Components.classes["@mozilla.org/rdf/rdf-service;1"]
.getService(Components.interfaces.nsIRDFService);
if (!gLocalStore)
gLocalStore = gRDF.GetDataSource("rdf:local-store");
if (gLocalStore) {
if (!gRDFC)
gRDFC = Components.classes["@mozilla.org/rdf/container-utils;1"]
.getService(Components.interfaces.nsIRDFContainerUtils);
var entries = gRDFC.MakeSeq(gLocalStore, gRDF.GetResource("nc:urlbar-history")).GetElements();
var i = MAX_URLBAR_HISTORY_MENU_ITEMS;
// Delete any old menu items only if there are legitimate
// urls to display, otherwise we want to display the
// '(Nothing Available)' item.
deleteHistoryItems(aParent);
if (!entries.hasMoreElements()) {
//Create the "Nothing Available" Menu item and disable it.
var na = gNavigatorBundle.getString("nothingAvailable");
createMenuItem(aParent, "nothing_available", na);
aParent.firstChild.setAttribute("disabled", "true");
}
while (entries.hasMoreElements() && (i-- > 0)) {
var entry = entries.getNext();
if (entry) {
try {
entry = entry.QueryInterface(Components.interfaces.nsIRDFLiteral);
} catch(ex) {
// XXXbar not an nsIRDFLiteral for some reason. see 90337.
continue;
}
var url = entry.Value;
createMenuItem(aParent, i, url);
}
}
}
}
function createMenuItem( aParent, aIndex, aLabel)
{
var menuitem = document.createElement( "menuitem" );
menuitem.setAttribute( "label", aLabel );
menuitem.setAttribute( "index", aIndex );
aParent.appendChild( menuitem );
}
function createRadioMenuItem( aParent, aIndex, aLabel, aChecked)
{
var menuitem = document.createElement( "menuitem" );
menuitem.setAttribute( "type", "radio" );
menuitem.setAttribute( "label", aLabel );
menuitem.setAttribute( "index", aIndex );
if (aChecked==true)
menuitem.setAttribute( "checked", "true" );
aParent.appendChild( menuitem );
}
function deleteHistoryItems(aParent)
{
var children = aParent.childNodes;
for (var i = children.length - 1; i >= 0; --i )
{
var index = children[i].getAttribute( "index" );
if (index)
aParent.removeChild( children[i] );
}
}
function updateGoMenu(event)
{
FillHistoryMenu(event.target, "go");
}

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

@ -1,96 +0,0 @@
<?xml version="1.0"?>
<!-- -*- Mode: xml; indent-tabs-mode: nil; -*-
- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- 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 Mozilla Communicator client code, released
- March 31, 1998.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 1998-1999
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- - Blake Ross <blake@netscape.com> (Original Author)
-
- Alternatively, the contents of this file may be used under the terms of
- either of the GNU General Public License Version 2 or later (the "GPL"),
- or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="chrome://communicator/skin/dialogs.css" type="text/css"?>
<!DOCTYPE dialog [
<!ENTITY % turboDialogDTD SYSTEM "chrome://navigator/locale/turboDialog.dtd" >
%turboDialogDTD;
<!ENTITY % dialogOverlayDTD SYSTEM "chrome://global-platform/locale/platformDialogOverlay.dtd" >
%dialogOverlayDTD;
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
]>
<dialog id="turboDialog" buttons="accept" buttonpack="center"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
title="&exitWarningTitle.label;"
onunload="SetTurboPref();">
<script type="application/x-javascript">
<![CDATA[
function SetTurboPref() {
var showDialog = document.getElementById("showAgain").checked;
try {
var prefs = Components.classes["@mozilla.org/preferences-service;1"].getService(Components.interfaces.nsIPrefBranch);
if (prefs)
prefs.setBoolPref("browser.turbo.showDialog", !showDialog);
}
catch(e) {
}
}
]]>
</script>
<hbox flex="1">
<hbox align="start" valign="top">
<image class="message-icon"/>
</hbox>
<separator orient="vertical" class="thin"/>
<vbox flex="1">
<!-- text -->
<description flex="1">&exitWarningMsg.label;</description>
<vbox flex="1" style="max-width: 36em;"/>
<separator/>
<hbox>
<spacer flex="45%"/>
<image id="turboTrayImage"/>
<spacer flex="55%"/>
</hbox>
<separator class="thin"/>
<separator class="thin"/>
<!-- checkbox -->
<hbox align="start">
<checkbox id="showAgain" label="&exitWarningCheckbox.label;"
accesskey="&exitWarningCheckbox.accesskey;"/>
</hbox>
</vbox>
</hbox>
</dialog>

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

@ -1,2 +0,0 @@
Makefile

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

@ -1,17 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:navigator-platform"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:navigator-platform"
chrome:displayName="UNIX Bindings"
chrome:author="mozilla.org"
chrome:name="navigator-platform"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__">
</RDF:Description>
</RDF:RDF>

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

@ -1,6 +0,0 @@
<?xml version="1.0"?>
<overlay id="platformMailOverlay.xul"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
</overlay>

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

@ -1,32 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE overlay SYSTEM "chrome://navigator-platform/locale/platformNavigationBindings.dtd">
<overlay id="platformNavigationBindings"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<keyset id="navigationKeys">
<!-- proper arrow key navigation, 4.xP -->
<key id="goBackKb" keycode="&goBackCmd.keyCode;" command="Browser:Back" modifiers="alt"/>
<key id="goForwardKb" keycode="&goForwardCmd.keyCode;" command="Browser:Forward" modifiers="alt"/>
<key id="goUpKb" keycode="VK_UP" command="Browser:Up" modifiers="alt"/>
<!-- Some people apparently use this combination too on Unix...
we live and learn. -->
<key key="&goBackCmd.commandKey;" command="Browser:Back" modifiers="accel"/>
<key key="&goForwardCmd.commandKey;" command="Browser:Forward" modifiers="accel"/>
<key id="key_stop" keycode="VK_ESCAPE" oncommand="BrowserStop();"/>
<!-- Specific keybinding for Sun keyboard -->
<key keycode="&findOnCmd.commandkey2;" command="Browser:Find"/>
<key id="goHome" keycode="VK_HOME" command="Browser:Home" modifiers="alt"/>
<key id="key_fullScreen" keycode="VK_F11" command="View:FullScreen"/>
<key id="key_newTabWithTarget" keycode="VK_INSERT" command="cmd_newTabWithTarget"/>
<key id="key_newTabWithTarget" keycode="VK_INSERT" modifiers="shift" command="cmd_newTabWithTarget"/>
</keyset>
<menuitem id="menuitem_fullScreen" hidden="false"/>
</overlay>

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

@ -1,480 +0,0 @@
<?xml version="1.0"?>
<bindings id="urlbarBindings"
xmlns="http://www.mozilla.org/xbl"
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:xbl="http://www.mozilla.org/xbl">
<binding id="urlbar" extends="chrome://global/content/autocomplete.xml#autocomplete">
<implementation>
<constructor><![CDATA[
var pbi = this.mPrefs.QueryInterface(Components.interfaces.nsIPrefBranch2);
if (pbi)
pbi.addObserver("browser.urlbar", this.mPrefObserver, false);
this.updatePref("browser.urlbar.showPopup");
this.updatePref("browser.urlbar.autoFill");
this.updatePref("browser.urlbar.showSearch");
]]></constructor>
<destructor><![CDATA[
var pbi = this.mPrefs.QueryInterface(Components.interfaces.nsIPrefBranch2);
if (pbi)
pbi.removeObserver("browser.urlbar", this.mPrefObserver);
]]></destructor>
<field name="mPrefs">
var svc = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService);
svc.getBranch(null);
</field>
<field name="mPrefObserver"><![CDATA[
({
urlbar: this,
observe: function(aObserver, aBlah, aPref) {
if (/^browser\.urlbar\./.test(aPref))
this.urlbar.updatePref(aPref);
}
});
]]></field>
<method name="updatePref">
<parameter name="aPref"/>
<body><![CDATA[
if (aPref == "browser.urlbar.showPopup") {
this.showPopup = this.mPrefs.getBoolPref("browser.urlbar.showPopup");
} else if (aPref == "browser.urlbar.autoFill") {
this.autoFill = this.mPrefs.getBoolPref("browser.urlbar.autoFill");
} else if (aPref == "browser.urlbar.showSearch") {
this.minResultsForPopup = this.mPrefs.getBoolPref("browser.urlbar.showSearch") ?
0 : 1;
}
]]></body>
</method>
</implementation>
</binding>
<binding id="autocomplete-result-popup" extends="chrome://global/content/autocomplete.xml#autocomplete-result-popup">
<content>
<xul:tree anonid="tree" class="autocomplete-tree plain" flex="1">
<xul:treecols anonid="treecols"/>
<xul:treechildren anonid="treebody" class="autocomplete-treebody" flex="1"/>
</xul:tree>
<xul:box role="search-box" class="autocomplete-search-box"/>
</content>
<implementation>
<constructor><![CDATA[
// listen for changes to default search engine
var pbi = this.mPrefs.QueryInterface(Components.interfaces.nsIPrefBranch2);
if (pbi) {
pbi.addObserver("browser.search", this.mPrefObserver, false);
pbi.addObserver("browser.urlbar", this.mPrefObserver, false);
}
]]></constructor>
<destructor><![CDATA[
var pbi = this.mPrefs.QueryInterface(Components.interfaces.nsIPrefBranch2);
if (pbi) {
pbi.removeObserver("browser.search", this.mPrefObserver);
pbi.removeObserver("browser.urlbar", this.mPrefObserver);
}
]]></destructor>
<property name="selectedIndex"
onget="return this.textbox.view.selectedIndex;">
<setter>
this.mSelectedIndex = val;
if (val == null)
this.mSearchBox.selectedIndex = null;
return val;
</setter>
</property>
<property name="showSearch" onget="return this.mShowSearch;">
<setter><![CDATA[
this.mShowSearch = val;
if (val) {
this.updateEngines();
this.mSearchBox.removeAttribute("hidden");
} else {
this.clearEngines();
this.mSearchBox.setAttribute("hidden", "true");
}
]]></setter>
</property>
<property name="mSelectedIndex">
<setter>
this.textbox.view.selectedIndex = val;
return val;
</setter>
</property>
<property name="defaultSearchEngine"
onget="return this.textbox.getAttribute('defaultSearchEngine') == 'true';"
onset="this.textbox.setAttribute('defaultSearchEngine', val); return val;"/>
<field name="mSearchBox">
document.getAnonymousElementByAttribute(this, "role", "search-box");
</field>
<field name="mPrefs">
var svc = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService);
svc.getBranch(null);
</field>
<field name="mPrefObserver"><![CDATA[
({
resultsPopup: this,
observe: function(aObserver, aBlah, aPref) {
if (/^browser\.search\./.test(aPref))
this.resultsPopup.updateEngines();
else if (/^browser\.urlbar\./.test(aPref))
this.resultsPopup.updatePref(aPref);
}
});
]]></field>
<field name="mInputListener"><![CDATA[
(function(aEvent) {
// "this" is the textbox, not the popup
if (this.mSearchInputTO)
window.clearTimeout(this.mSearchInputTO);
this.mSearchInputTO = window.setTimeout(this.resultsPopup.mInputTimeout, this.timeout, this);
});
]]></field>
<field name="mInputTimeout"><![CDATA[
(function(me) {
me.resultsPopup.mSearchBox.searchValue = me.value;
me.mSearchInputTO = 0;
});
]]></field>
<field name="mEnginesReady">false</field>
<method name="getOverrideValue">
<body><![CDATA[
if (this.mSearchBox.selectedIndex != null) {
try {
if (pref.getBoolPref("browser.search.opensidebarsearchpanel"))
RevealSearchPanel();
} catch (ex) {
}
return this.mSearchBox.getOverrideValue();
}
return null;
]]></body>
</method>
<method name="updatePref">
<parameter name="aPref"/>
<body><![CDATA[
if (aPref == "browser.urlbar.showSearch")
this.showSearch = this.mPrefs.getBoolPref("browser.urlbar.showSearch");
]]></body>
</method>
<method name="addEngine">
<parameter name="aEngineId"/>
<parameter name="aName"/>
<parameter name="aIcon"/>
<parameter name="aSearchBarUrl"/>
<body><![CDATA[
var box = document.createElement("box");
box.setAttribute("class", "autocomplete-search-engine");
box.setAttribute("searchEngine", aEngineId);
box.setAttribute("name", aName);
box.setAttribute("icon", aIcon);
box.setAttribute("searchBarUrl", aSearchBarUrl);
box.setAttribute("engineIndex", this.childNodes.length);
this.mSearchBox.appendChild(box);
]]></body>
</method>
<method name="clearEngines">
<body><![CDATA[
while (this.mSearchBox.hasChildNodes())
this.mSearchBox.removeChild(this.mSearchBox.lastChild);
]]></body>
</method>
<method name="updateEngines">
<body><![CDATA[
var rdf = Components.classes["@mozilla.org/rdf/rdf-service;1"]
.getService(Components.interfaces.nsIRDFService);
try {
var ds = rdf.GetDataSource("rdf:internetsearch");
} catch (ex) {
// sometimes bad profiles cause this error, which horks the hold urlbar
return;
}
const kNC_Name = rdf.GetResource("http://home.netscape.com/NC-rdf#Name");
const kNC_Icon = rdf.GetResource("http://home.netscape.com/NC-rdf#Icon");
const kNC_searchBarUrl = rdf.GetResource("http://home.netscape.com/NC-rdf#actionBar");
var defaultEngine = null;
try {
defaultEngine = this.mPrefs.getComplexValue("browser.search.defaultengine",
Components.interfaces.nsISupportsString).data;
} catch(ex) {
// this will re-invoke updateEngines via the pref observer if the pref changes
this.ensureDefaultEnginePrefs(rdf, ds);
return;
}
if (defaultEngine) {
this.clearEngines();
if (ds) {
var res = rdf.GetResource(defaultEngine);
try {
var searchBarUrl = this.readRDFString(ds, res, kNC_searchBarUrl);
} catch(ex) {
searchBarUrl = null;
}
if (searchBarUrl == null) {
// this will re-invoke updateEngines via the pref observer if the pref changes
this.ensureDefaultEnginePrefs(rdf, ds);
return;
}
this.addEngine(res.Value,
this.readRDFString(ds, res, kNC_Name),
this.readRDFString(ds, res, kNC_Icon),
searchBarUrl);
}
}
this.mEnginesReady = true;
]]></body>
</method>
<method name="ensureDefaultEnginePrefs">
<parameter name="aRDF"/>
<parameter name="aDS"/>
<body><![CDATA[
var defaultName = this.mPrefs.getComplexValue("browser.search.defaultenginename",
Components.interfaces.nsIPrefLocalizedString).data;
const kNC_Root = aRDF.GetResource("NC:SearchEngineRoot");
const kNC_child = aRDF.GetResource("http://home.netscape.com/NC-rdf#child");
const kNC_Name = aRDF.GetResource("http://home.netscape.com/NC-rdf#Name");
var arcs = aDS.GetTargets(kNC_Root, kNC_child, true);
while (arcs.hasMoreElements()) {
var engineRes = arcs.getNext().QueryInterface(Components.interfaces.nsIRDFResource);
var name = this.readRDFString(aDS, engineRes, kNC_Name);
if (name == defaultName) {
var str = Components.classes["@mozilla.org/supports-string;1"]
.createInstance(Components.interfaces.nsISupportsString);
str.data = engineRes.Value;
this.mPrefs.setComplexValue("browser.search.defaultengine",
Components.interfaces.nsISupportsString,
str);
}
}
]]></body>
</method>
<method name="readRDFString">
<parameter name="aDS"/>
<parameter name="aRes"/>
<parameter name="aProp"/>
<body><![CDATA[
var n = aDS.GetTarget(aRes, aProp, true);
return n ? n.QueryInterface(Components.interfaces.nsIRDFLiteral).Value : null;
]]></body>
</method>
<method name="selectBy">
<parameter name="aDir"/>
<parameter name="aAmount"/>
<body><![CDATA[
var bx = this.tree.treeBoxObject;
var view = bx.view;
var sel;
if (this.selectedIndex == null && aDir < 0) {
sel = this.mSearchBox.selectBy(aDir, aAmount);
if (sel != null)
return null;
}
sel = this.getNextIndex(aDir, aAmount, this.selectedIndex, view.rowCount-1);
this.mSelectedIndex = sel;
if (sel == null && aDir > 0)
this.mSearchBox.selectBy(aDir, aAmount);
else if (this.mSearchBox.selectedIndex != null)
this.mSearchBox.selectedIndex = null;
return sel;
]]></body>
</method>
</implementation>
<handlers>
<handler event="popupshowing"><![CDATA[
// sync up with prefs about showing search in the URL bar if
// the URL bar hasn't finished initializing the default engine info
// -or-
// the search sidebar tab was displayed already triggering a change
// notification to the browser.search pref branch listener here which
// calls updateEngines but doesn't cause the ``Search for ...''
// display string to be updated
if ( (!this.mEnginesReady && this.defaultSearchEngine) ||
!("mShowSearch" in this) )
this.updatePref("browser.urlbar.showSearch");
if (this.mShowSearch) {
this.textbox.mSearchInputTO = 0;
this.textbox.addEventListener("input", this.mInputListener, false);
if ("searchValue" in this.mSearchBox)
this.mSearchBox.searchValue = this.textbox.currentSearchString;
else
this.mSearchBox.setAttribute("searchvalue", this.textbox.currentSearchString);
}
]]></handler>
<handler event="popuphiding"><![CDATA[
if (this.mShowSearch)
this.textbox.removeEventListener("input", this.mInputListener, false);
]]></handler>
</handlers>
</binding>
<binding id="autocomplete-search-box">
<content orient="vertical"/>
<implementation>
<constructor><![CDATA[
var text = this.getAttribute("searchvalue");
if (text)
this.searchValue = text;
this.mSelectedIndex = null;
]]></constructor>
<field name="parentMouseoverListener">
// ensure that if a result menuitem is moused-over, any
// search selection is cleared
(function(aEvent) {
if (aEvent.target.nodeName == "menuitem")
this.mSearchBox.selectedIndex = null;
})
</field>
<field name="parentDestroyListener">
// ensure that if the popup closes, any search selection is cleared
(function(aEvent) {
this.mSearchBox.selectedIndex = null;
})
</field>
<property name="activeChild"
onget="return this.childNodes[this.mSelectedIndex]"/>
<property name="selectedIndex">
<getter>return this.mSelectedIndex;</getter>
<setter><![CDATA[
if (this.mSelectedIndex != null)
this.activeChild.removeAttribute("menuactive");
this.mSelectedIndex = val;
if (val != null) {
this.parentNode.mSelectedIndex = null;
this.parentNode.addEventListener("mouseover", this.parentMouseoverListener, false);
this.parentNode.addEventListener("popuphiding", this.parentDestroyListener, false);
if (this.activeChild)
this.activeChild.setAttribute("menuactive", "true");
} else {
this.parentNode.removeEventListener("mouseover", this.parentMouseoverListener, false);
this.parentNode.removeEventListener("popuphiding", this.parentDestroyListener, false);
}
]]></setter>
</property>
<property name="searchValue">
<getter><![CDATA[
return this.mSearchValue;
]]></getter>
<setter><![CDATA[
this.mSearchValue = val;
var kids = this.childNodes;
var searchForStrBundle = srGetStrBundle("chrome://navigator/locale/navigator.properties");
for (var i = 0; i < kids.length; ++i) {
var name = kids[i].getAttribute("name");
var searchForStr = searchForStrBundle.formatStringFromName("searchFor", [name, val], 2);
kids[i].setAttribute("label", searchForStr);
}
]]></setter>
</property>
<method name="selectBy">
<parameter name="aDir"/>
<parameter name="aAmount"/>
<body><![CDATA[
var sel = this.parentNode.getNextIndex(aDir, aAmount, this.selectedIndex, this.childNodes.length-1);
this.selectedIndex = sel;
return sel;
]]></body>
</method>
<method name="getOverrideValue">
<body><![CDATA[
var item = this.activeChild;
if (item) {
const ISEARCH_CONTRACTID = "@mozilla.org/rdf/datasource;1?name=internetsearch";
const nsIInternetSearchService = Components.interfaces.nsIInternetSearchService;
var searchService = Components.classes[ISEARCH_CONTRACTID].getService(nsIInternetSearchService);
var searchEng = item.getAttribute("searchEngine");
var searchEngUrl = item.getAttribute("searchBarUrl");
var escapedSearch = encodeURIComponent(this.mSearchValue)
if (searchEngUrl) {
searchEngUrl += escapedSearch;
return searchEngUrl;
} else {
return searchService.GetInternetSearchURL(item.getAttribute("searchEngine"),escapedSearch, 0, 0, {value:0});
}
}
return null;
]]></body>
</method>
</implementation>
<handlers>
<handler event="mouseup">
this.parentNode.textbox.onResultClick();
</handler>
</handlers>
</binding>
<binding id="autocomplete-search-engine">
<content>
<xul:image class="autocomplete-search-engine-img" xbl:inherits="src=icon"/>
<xul:label class="autocomplete-search-engine-text" xbl:inherits="value=label" crop="right" flex="1"/>
</content>
<handlers>
<handler event="mouseover">
this.parentNode.selectedIndex = this.getAttribute("engineIndex");
</handler>
<handler event="mouseout">
this.parentNode.selectedIndex = null;
</handler>
</handlers>
</binding>
</bindings>

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

@ -1,508 +0,0 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 mozilla.org view-source front-end.
*
* The Initial Developer of the Original Code is mozilla.org.
* Portions created by the Initial Developer are Copyright (C) 2002
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Roger B. Sidje <rbs@maths.uq.edu.au> (Original Author)
* Steve Swanson <steve.swanson@mackichan.com>
* Doron Rosenberg <doronr@naboonline.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
var gDebug = 0;
var gLineCount = 0;
var gStartTargetLine = 0;
var gEndTargetLine = 0;
var gTargetNode = null;
var gEntityConverter = null;
var gWrapLongLines = false;
const gViewSourceCSS = 'resource://gre/res/viewsource.css';
const NS_XHTML = 'http://www.w3.org/1999/xhtml';
// These are markers used to delimit the selection during processing. They
// are removed from the final rendering, but we pick space-like characters for
// safety (and futhermore, these are known to be mapped to a 0-length string
// in transliterate.properties). It is okay to set start=end, we use findNext()
// U+200B ZERO WIDTH SPACE
const MARK_SELECTION_START = '\u200B\u200B\u200B\u200B\u200B';
const MARK_SELECTION_END = '\u200B\u200B\u200B\u200B\u200B';
function onLoadViewPartialSource()
{
// check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly
if (gPrefs) {
try {
var wraplonglinesPrefValue = gPrefs.getBoolPref('view_source.wrap_long_lines');
if (wraplonglinesPrefValue) {
document.getElementById('menu_wrapLongLines').setAttribute('checked', 'true');
gWrapLongLines = true;
}
} catch (e) { }
try {
document.getElementById("menu_highlightSyntax").setAttribute("checked", gPrefs.getBoolPref("view_source.syntax_highlight"));
} catch (e) {
}
} else {
document.getElementById("menu_highlightSyntax").setAttribute("hidden", "true");
}
// disable menu items that don't work since the selection is munged and
// the editor doesn't work for MathML
document.getElementById('cmd_savePage').setAttribute('disabled', 'true');
document.getElementById('cmd_editPage').setAttribute('disabled', 'true');
if (window.arguments[3] == 'selection')
viewPartialSourceForSelection(window.arguments[2]);
else
viewPartialSourceForFragment(window.arguments[2], window.arguments[3]);
window.content.focus();
}
////////////////////////////////////////////////////////////////////////////////
// view-source of a selection with the special effect of remapping the selection
// to the underlying view-source output
function viewPartialSourceForSelection(selection)
{
var range = selection.getRangeAt(0);
var ancestorContainer = range.commonAncestorContainer;
var doc = ancestorContainer.ownerDocument;
var startContainer = range.startContainer;
var endContainer = range.endContainer;
var startOffset = range.startOffset;
var endOffset = range.endOffset;
// let the ancestor be an element
if (ancestorContainer.nodeType == Node.TEXT_NODE ||
ancestorContainer.nodeType == Node.CDATA_SECTION_NODE)
ancestorContainer = ancestorContainer.parentNode;
// for selectAll, let's use the entire document, including <html>...</html>
// @see DocumentViewerImpl::SelectAll() for how selectAll is implemented
try {
if (ancestorContainer == doc.body)
ancestorContainer = doc.documentElement;
} catch (e) { }
// each path is a "child sequence" (a.k.a. "tumbler") that
// descends from the ancestor down to the boundary point
var startPath = getPath(ancestorContainer, startContainer);
var endPath = getPath(ancestorContainer, endContainer);
// clone the fragment of interest and reset everything to be relative to it
// note: it is with the clone that we operate/munge from now on
ancestorContainer = ancestorContainer.cloneNode(true);
startContainer = ancestorContainer;
endContainer = ancestorContainer;
// Only bother with the selection if it can be remapped. Don't mess with
// leaf elements (such as <isindex>) that secretly use anynomous content
// for their display appearance.
var canDrawSelection = ancestorContainer.hasChildNodes();
if (canDrawSelection) {
var i;
for (i = startPath ? startPath.length-1 : -1; i >= 0; i--) {
startContainer = startContainer.childNodes.item(startPath[i]);
}
for (i = endPath ? endPath.length-1 : -1; i >= 0; i--) {
endContainer = endContainer.childNodes.item(endPath[i]);
}
// add special markers to record the extent of the selection
// note: |startOffset| and |endOffset| are interpreted either as
// offsets in the text data or as child indices (see the Range spec)
// (here, munging the end point first to keep the start point safe...)
var tmpNode;
if (endContainer.nodeType == Node.TEXT_NODE ||
endContainer.nodeType == Node.CDATA_SECTION_NODE) {
// do some extra tweaks to try to avoid the view-source output to look like
// ...<tag>]... or ...]</tag>... (where ']' marks the end of the selection).
// To get a neat output, the idea here is to remap the end point from:
// 1. ...<tag>]... to ...]<tag>...
// 2. ...]</tag>... to ...</tag>]...
if ((endOffset > 0 && endOffset < endContainer.data.length) ||
!endContainer.parentNode || !endContainer.parentNode.parentNode)
endContainer.insertData(endOffset, MARK_SELECTION_END);
else {
tmpNode = doc.createTextNode(MARK_SELECTION_END);
endContainer = endContainer.parentNode;
if (endOffset == 0)
endContainer.parentNode.insertBefore(tmpNode, endContainer);
else
endContainer.parentNode.insertBefore(tmpNode, endContainer.nextSibling);
}
}
else {
tmpNode = doc.createTextNode(MARK_SELECTION_END);
endContainer.insertBefore(tmpNode, endContainer.childNodes.item(endOffset));
}
if (startContainer.nodeType == Node.TEXT_NODE ||
startContainer.nodeType == Node.CDATA_SECTION_NODE) {
// do some extra tweaks to try to avoid the view-source output to look like
// ...<tag>[... or ...[</tag>... (where '[' marks the start of the selection).
// To get a neat output, the idea here is to remap the start point from:
// 1. ...<tag>[... to ...[<tag>...
// 2. ...[</tag>... to ...</tag>[...
if ((startOffset > 0 && startOffset < startContainer.data.length) ||
!startContainer.parentNode || !startContainer.parentNode.parentNode ||
startContainer != startContainer.parentNode.lastChild)
startContainer.insertData(startOffset, MARK_SELECTION_START);
else {
tmpNode = doc.createTextNode(MARK_SELECTION_START);
startContainer = startContainer.parentNode;
if (startOffset == 0)
startContainer.parentNode.insertBefore(tmpNode, startContainer);
else
startContainer.parentNode.insertBefore(tmpNode, startContainer.nextSibling);
}
}
else {
tmpNode = doc.createTextNode(MARK_SELECTION_START);
startContainer.insertBefore(tmpNode, startContainer.childNodes.item(startOffset));
}
}
// now extract and display the syntax highlighted source
tmpNode = doc.createElementNS(NS_XHTML, 'div');
tmpNode.appendChild(ancestorContainer);
// the load is aynchronous and so we will wait until the view-source DOM is done
// before drawing the selection.
if (canDrawSelection) {
window.document.getElementById("appcontent").addEventListener("load", drawSelection, true);
}
// all our content is held by the data:URI and URIs are internally stored as utf-8 (see nsIURI.idl)
var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE;
getBrowser().webNavigation
.loadURI("view-source:data:text/html;charset=utf-8," + encodeURIComponent(tmpNode.innerHTML),
loadFlags, null, null, null);
}
////////////////////////////////////////////////////////////////////////////////
// helper to get a path like FIXptr, but with an array instead of the "tumbler" notation
// see FIXptr: http://lists.w3.org/Archives/Public/www-xml-linking-comments/2001AprJun/att-0074/01-NOTE-FIXptr-20010425.htm
function getPath(ancestor, node)
{
var n = node;
var p = n.parentNode;
if (n == ancestor || !p)
return null;
var path = new Array();
if (!path)
return null;
do {
for (var i = 0; i < p.childNodes.length; i++) {
if (p.childNodes.item(i) == n) {
path.push(i);
break;
}
}
n = p;
p = n.parentNode;
} while (n != ancestor && p);
return path;
}
////////////////////////////////////////////////////////////////////////////////
// using special markers left in the serialized source, this helper makes the
// underlying markup of the selected fragment to automatically appear as selected
// on the inflated view-source DOM
function drawSelection()
{
// find the special selection markers that we added earlier, and
// draw the selection between the two...
var findService = null;
try {
// get the find service which stores the global find state
findService = Components.classes["@mozilla.org/find/find_service;1"]
.getService(Components.interfaces.nsIFindService);
} catch(e) { }
if (!findService)
return;
// cache the current global find state
var matchCase = findService.matchCase;
var entireWord = findService.entireWord;
var wrapFind = findService.wrapFind;
var findBackwards = findService.findBackwards;
var searchString = findService.searchString;
var replaceString = findService.replaceString;
// setup our find instance
var findInst = getBrowser().webBrowserFind;
findInst.matchCase = true;
findInst.entireWord = false;
findInst.wrapFind = true;
findInst.findBackwards = false;
// ...lookup the start mark
findInst.searchString = MARK_SELECTION_START;
var startLength = MARK_SELECTION_START.length;
findInst.findNext();
var contentWindow = getBrowser().contentDocument.defaultView;
var selection = contentWindow.getSelection();
var range = selection.getRangeAt(0);
var startContainer = range.startContainer;
var startOffset = range.startOffset;
// ...lookup the end mark
findInst.searchString = MARK_SELECTION_END;
var endLength = MARK_SELECTION_END.length;
findInst.findNext();
var endContainer = selection.anchorNode;
var endOffset = selection.anchorOffset;
// reset the selection that find has left
selection.removeAllRanges();
// delete the special markers now...
endContainer.deleteData(endOffset, endLength);
startContainer.deleteData(startOffset, startLength);
if (startContainer == endContainer)
endOffset -= startLength; // has shrunk if on same text node...
range.setEnd(endContainer, endOffset);
// show the selection and scroll it into view
selection.addRange(range);
// the default behavior of the selection is to scroll at the end of
// the selection, whereas in this situation, it is more user-friendly
// to scroll at the beginning. So we override the default behavior here
try {
getBrowser().docShell
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsISelectionDisplay)
.QueryInterface(Components.interfaces.nsISelectionController)
.scrollSelectionIntoView(Components.interfaces.nsISelectionController.SELECTION_NORMAL,
Components.interfaces.nsISelectionController.SELECTION_ANCHOR_REGION,
true);
}
catch(e) { }
// restore the current find state
findService.matchCase = matchCase;
findService.entireWord = entireWord;
findService.wrapFind = wrapFind;
findService.findBackwards = findBackwards;
findService.searchString = searchString;
findService.replaceString = replaceString;
findInst.matchCase = matchCase;
findInst.entireWord = entireWord;
findInst.wrapFind = wrapFind;
findInst.findBackwards = findBackwards;
findInst.searchString = searchString;
}
////////////////////////////////////////////////////////////////////////////////
// special handler for markups such as MathML where reformatting the output is
// helpful
function viewPartialSourceForFragment(node, context)
{
gTargetNode = node;
if (gTargetNode && gTargetNode.nodeType == Node.TEXT_NODE)
gTargetNode = gTargetNode.parentNode;
// walk up the tree to the top-level element (e.g., <math>, <svg>)
var topTag;
if (context == 'mathml')
topTag = 'math';
else
throw 'not reached';
var topNode = gTargetNode;
while (topNode && topNode.localName != topTag)
topNode = topNode.parentNode;
if (!topNode)
return;
// serialize (note: the main window overrides the title set here)
var wrapClass = gWrapLongLines ? ' class="wrap"' : '';
var source =
'<html>'
+ '<head><title>Mozilla</title>'
+ '<link rel="stylesheet" type="text/css" href="' + gViewSourceCSS + '">'
+ '<style type="text/css">'
+ '#target { border: dashed 1px; background-color: lightyellow; }'
+ '</style>'
+ '</head>'
+ '<body id="viewsource"' + wrapClass
+ ' onload="document.getElementById(\'target\').scrollIntoView(true)">'
+ '<pre>'
+ getOuterMarkup(topNode, 0)
+ '</pre></body></html>'
; // end
// display
var doc = getBrowser().contentDocument;
doc.open("text/html", "replace");
doc.write(source);
doc.close();
}
////////////////////////////////////////////////////////////////////////////////
function getInnerMarkup(node, indent) {
var str = '';
for (var i = 0; i < node.childNodes.length; i++) {
str += getOuterMarkup(node.childNodes.item(i), indent);
}
return str;
}
////////////////////////////////////////////////////////////////////////////////
function getOuterMarkup(node, indent) {
var newline = '';
var padding = '';
var str = '';
if (node == gTargetNode) {
gStartTargetLine = gLineCount;
str += '</pre><pre id="target">';
}
switch (node.nodeType) {
case Node.ELEMENT_NODE: // Element
// to avoid the wide gap problem, '\n' is not emitted on the first
// line and the lines before & after the <pre id="target">...</pre>
if (gLineCount > 0 &&
gLineCount != gStartTargetLine &&
gLineCount != gEndTargetLine) {
newline = '\n';
}
gLineCount++;
if (gDebug) {
newline += gLineCount;
}
for (var k = 0; k < indent; k++) {
padding += ' ';
}
str += newline + padding
+ '&lt;<span class="start-tag">' + node.nodeName + '</span>';
for (var i = 0; i < node.attributes.length; i++) {
var attr = node.attributes.item(i);
if (!gDebug && attr.nodeName.match(/^[-_]moz/)) {
continue;
}
str += ' <span class="attribute-name">'
+ attr.nodeName
+ '</span>=<span class="attribute-value">"'
+ unicodeTOentity(attr.nodeValue)
+ '"</span>';
}
if (!node.hasChildNodes()) {
str += '/&gt;';
}
else {
str += '&gt;';
var oldLine = gLineCount;
str += getInnerMarkup(node, indent + 2);
if (oldLine == gLineCount) {
newline = '';
padding = '';
}
else {
newline = (gLineCount == gEndTargetLine) ? '' : '\n';
gLineCount++;
if (gDebug) {
newline += gLineCount;
}
}
str += newline + padding
+ '&lt;/<span class="end-tag">' + node.nodeName + '</span>&gt;';
}
break;
case Node.TEXT_NODE: // Text
var tmp = node.nodeValue;
tmp = tmp.replace(/(\n|\r|\t)+/g, " ");
tmp = tmp.replace(/^ +/, "");
tmp = tmp.replace(/ +$/, "");
if (tmp.length != 0) {
str += '<span class="text">' + unicodeTOentity(tmp) + '</span>';
}
break;
default:
break;
}
if (node == gTargetNode) {
gEndTargetLine = gLineCount;
str += '</pre><pre>';
}
return str;
}
////////////////////////////////////////////////////////////////////////////////
function unicodeTOentity(text)
{
const charTable = {
'&': '&amp;<span class="entity">amp;</span>',
'<': '&amp;<span class="entity">lt;</span>',
'>': '&amp;<span class="entity">gt;</span>',
'"': '&amp;<span class="entity">quot;</span>'
};
function charTableLookup(letter) {
return charTable[letter];
}
function convertEntity(letter) {
try {
var unichar = gEntityConverter.ConvertToEntity(letter, entityVersion);
var entity = unichar.substring(1); // extract '&'
return '&amp;<span class="entity">' + entity + '</span>';
} catch (ex) {
return letter;
}
}
if (!gEntityConverter) {
try {
gEntityConverter =
Components.classes["@mozilla.org/intl/entityconverter;1"]
.createInstance(Components.interfaces.nsIEntityConverter);
} catch(e) { }
}
const entityVersion = Components.interfaces.nsIEntityConverter.entityW3C;
var str = text;
// replace chars in our charTable
str = str.replace(/[<>&"]/g, charTableLookup);
// replace chars > 0x7f via nsIEntityConverter
str = str.replace(/[^\0-\u007f]/g, convertEntity);
return str;
}

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

@ -1,105 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- 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 mozilla.org view-source front end.
-
- The Initial Developer of the Original Code is
- mozilla.org.
- Portions created by the Initial Developer are Copyright (C) 2002
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Roger B. Sidje <rbs@maths.uq.edu.au> (Original Author)
- Doron Rosenberg <doronr@naboonline.com>
-
- Alternatively, the contents of this file may be used under the terms of
- either of the GNU General Public License Version 2 or later (the "GPL"),
- or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xul-overlay href="chrome://navigator/content/viewSourceOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % sourceDTD SYSTEM "chrome://navigator/locale/viewSource.dtd" >
%sourceDTD;
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
%navigatorDTD;
<!ENTITY % contentAreaCommandsDTD SYSTEM "chrome://communicator/locale/contentAreaCommands.dtd" >
%contentAreaCommandsDTD;
]>
<window id="main-window"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="onLoadViewPartialSource();"
contenttitlesetting="false"
title="&viewPartialSourceWindow.title;&mainWindow.titlemodifierseparator;&mainWindow.titlemodifier;"
windowtype="navigator:view-source"
width="500" height="300"
screenX="10" screenY="10"
persist="screenX screenY width height sizemode">
<script type="application/x-javascript" src="chrome://navigator/content/viewPartialSource.js"/>
<commandset id="commands"/>
<keyset id="viewSourceKeys"/>
<stringbundleset id="viewSource-stringbundleset"/>
<popupset id="viewSourceContextSet" />
<toolbox id="viewSource-toolbox">
<menubar id="viewSource-main-menubar">
<menu id="menu_File"/>
<menu id="menu_Edit"/>
<menu id="menu_View">
<menupopup id="menu_View_Popup">
<menuitem accesskey="&reloadCmd.accesskey;" key="key_reload" label="&reloadCmd.label;" oncommand="BrowserReload();"/>
<menuseparator />
<menu id="menu_textZoom"/>
<menuseparator/>
<!-- <menuitem key="key_viewInfo" observes="View:PageInfo"
label="&pageInfoCmd.label;" accesskey="&pageInfoCmd.accesskey;"/>
<menuseparator id="file_moduleSeparator"/>-->
<menuitem id="menu_wrapLongLines" type="checkbox" oncommand="wrapLongLines()"
label="&menu_wrapLongLines.title;" accesskey="&menu_wrapLongLines.accesskey;"/>
<menuitem type="checkbox" id="menu_highlightSyntax" oncommand="highlightSyntax();"
label="&menu_highlightSyntax.label;" accesskey="&menu_highlightSyntax.accesskey;"/>
</menupopup>
</menu>
<menu id="windowMenu"/>
<menu id="menu_Help"/>
</menubar>
</toolbox>
<vbox id="appcontent" flex="1"
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
<browser id="content" type="content-primary" name="content" src="about:blank" flex="1"
disablehistory="true" disablesecurity="true"
context="viewSourceContextMenu"/>
</vbox>
</window>

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

@ -1,111 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- 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 mozilla.org viewsource frontend.
-
- The Initial Developer of the Original Code is
- Netscape Communications Corporation.
- Portions created by the Initial Developer are Copyright (C) 2000
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Doron Rosenberg (doronr@naboonline.com)
- Roger B. Sidje (rbs@maths.uq.edu.au)
-
- Alternatively, the contents of this file may be used under the terms of
- either of the GNU General Public License Version 2 or later (the "GPL"),
- or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xul-overlay href="chrome://navigator/content/viewSourceOverlay.xul"?>
<!DOCTYPE window [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % sourceDTD SYSTEM "chrome://navigator/locale/viewSource.dtd" >
%sourceDTD;
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
%navigatorDTD;
<!ENTITY % contentAreaCommandsDTD SYSTEM "chrome://communicator/locale/contentAreaCommands.dtd" >
%contentAreaCommandsDTD;
]>
<window id="main-window"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
onload="onLoadViewSource();"
contenttitlesetting="true"
title="&mainWindow.title;"
titlemodifier="&mainWindow.titlemodifier;"
titlepreface="&mainWindow.preface;"
titlemenuseparator ="&mainWindow.titlemodifierseparator;"
windowtype="navigator:view-source"
width="640" height="480"
screenX="10" screenY="10"
persist="screenX screenY width height sizemode">
<commandset id="commands"/>
<keyset id="viewSourceKeys"/>
<stringbundleset id="viewSource-stringbundleset"/>
<popupset id="viewSourceContextSet" />
<toolbox id="viewSource-toolbox">
<menubar id="viewSource-main-menubar">
<menu id="menu_File"/>
<menu id="menu_Edit"/>
<menu id="menu_View">
<menupopup id="menu_View_Popup">
<menuitem accesskey="&reloadCmd.accesskey;" key="key_reload" label="&reloadCmd.label;" oncommand="BrowserReload();"/>
<menuseparator />
<menu id="menu_textZoom"/>
<menuseparator/>
<!-- <menuitem key="key_viewInfo" observes="View:PageInfo"
label="&pageInfoCmd.label;" accesskey="&pageInfoCmd.accesskey;"/>
<menuseparator id="file_moduleSeparator"/>-->
<menu id="charsetMenu"/>
<menuitem id="menu_wrapLongLines" type="checkbox" oncommand="wrapLongLines()"
label="&menu_wrapLongLines.title;" accesskey="&menu_wrapLongLines.accesskey;"/>
<menuitem type="checkbox" id="menu_highlightSyntax" oncommand="highlightSyntax();"
label="&menu_highlightSyntax.label;" accesskey="&menu_highlightSyntax.accesskey;"/>
</menupopup>
</menu>
<menu id="windowMenu"/>
<menu id="menu_Help"/>
</menubar>
</toolbox>
<vbox id="appcontent" flex="1"
ondragdrop="nsDragAndDrop.drop(event, contentAreaDNDObserver);">
<browser id="content" type="content-primary" name="content" src="about:blank" flex="1"
disablehistory="true" disablesecurity="true"
onmousedown="startScrolling(event);"
context="viewSourceContextMenu"/>
</vbox>
<statusbar id="status-bar" class="chromeclass-status">
<statusbarpanel id="statusbar-line-col" label="" flex="1"/>
</statusbar>
</window>

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

@ -1,182 +0,0 @@
<?xml version="1.0"?> <!-- -*- Mode: HTML -*- -->
<?xml-stylesheet href="chrome://navigator/skin/" type="text/css"?>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- 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 mozilla.org view-source front-end.
-
- The Initial Developer of the Original Code is
- mozilla.org.
- Portions created by the Initial Developer are Copyright (C) 2002
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Doron Rosenberg (doronr@naboonline.com)
- Roger B. Sidje (rbs@maths.uq.edu.au)
-
- Alternatively, the contents of this file may be used under the terms of
- either of the GNU General Public License Version 2 or later (the "GPL"),
- or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the GPL or the LGPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<?xul-overlay href="chrome://navigator/content/navigatorOverlay.xul"?>
<!DOCTYPE overlay [
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd" >
%brandDTD;
<!ENTITY % sourceDTD SYSTEM "chrome://navigator/locale/viewSource.dtd" >
%sourceDTD;
<!ENTITY % navigatorDTD SYSTEM "chrome://navigator/locale/navigator.dtd" >
%navigatorDTD;
<!ENTITY % contentAreaCommandsDTD SYSTEM "chrome://communicator/locale/contentAreaCommands.dtd" >
%contentAreaCommandsDTD;
]>
<overlay id="viewSourceOverlay"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script type="application/x-javascript" src="chrome://global/content/nsTransferable.js"/>
<script type="application/x-javascript" src="chrome://global/content/nsDragAndDrop.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaDD.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/printing.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/browser.js"/>
<script type="application/x-javascript" src="chrome://navigator/content/viewsource.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/findUtils.js"/>
<script type="application/x-javascript" src="chrome://communicator/content/contentAreaUtils.js"/>
<commandset id="commands">
<commandset id="globalEditMenuItems"/>
<commandset id="selectEditMenuItems"/>
<commandset id="clipboardEditMenuItems"/>
<commandset id="viewSourceMenuItems">
<command id="cmd_close" oncommand="ViewSourceClose()"/>
<command id="cmd_savePage" oncommand="ViewSourceSavePage();"/>
<command id="cmd_editPage" oncommand="ViewSourceEditPage();"/>
<command id="cmd_goToLine" oncommand="ViewSourceGoToLine();" disabled="true"/>
</commandset>
</commandset>
<stringbundleset id="viewSource-stringbundleset">
<stringbundle id="bundle_viewZoom"/>
<stringbundle id="findBundle" src="chrome://global/locale/finddialog.properties"/>
<stringbundle id="viewSourceBundle" src="chrome://navigator/locale/viewSource.properties"/>
</stringbundleset>
<!-- keys are appended from the overlay -->
<keyset id="viewSourceKeys">
<!-- File Menu -->
<key id="key_newNavigator"/>
<key id="key_newBlankPage"/>
<key id="key_savePage" key="&savePageCmd.commandkey;" command="cmd_savePage" modifiers="accel"/>
<key id="key_editPage" key="&editPageCmd.commandkey;" command="Browser:EditPage" modifiers="accel"/>
<key id="printKb" key="&printCmd.commandkey;" command="Browser:Print" modifiers="accel"/>
<key id="key_close"/>
<!-- Edit Menu -->
<key id="key_undo"/>
<key id="key_redo"/>
<key id="key_cut"/>
<key id="key_copy"/>
<key id="key_paste"/>
<key id="key_delete"/>
<key id="key_delete2"/>
<key id="key_selectAll"/>
<key id="key_goToLine" key="&goToLineCmd.commandkey;" command="cmd_goToLine" modifiers="accel"/>
<key id="key_find" key="&findOnCmd.commandkey;" command="Browser:Find" modifiers="accel"/>
<key id="key_findAgain" key="&findAgainCmd.commandkey;" command="Browser:FindAgain" modifiers="accel"/>
<key id="key_findPrev" key="&findPrevCmd.commandkey;" command="Browser:FindPrev" modifiers="accel, shift"/>
<key keycode="&findAgainCmd.commandkey2;" command="Browser:FindAgain"/>
<key keycode="&findPrevCmd.commandkey2;" command="Browser:FindPrev" modifiers="shift"/>
<key id="key_findTypeText"/>
<!-- View Menu -->
<key id="key_reload" key="&reloadCmd.commandkey;" oncommand="BrowserReload();" modifiers="accel"/>
<key key="&reloadCmd.commandkey;" oncommand="BrowserReloadSkipCache();" modifiers="accel,shift"/>
<keyset id="viewZoomKeys"/>
<!-- Window Menu -->
<keyset id="tasksKeys"/>
</keyset>
<!-- context menu -->
<popupset id="viewSourceContextSet">
<popup id="viewSourceContextMenu">
<menuitem label="&findNextCmd.label;" accesskey="&findNextCmd.accesskey;" command="Browser:FindAgain"/>
<menuseparator/>
<menuitem id="menu_copy_cm" command="cmd_copy"
label="&copyCmd.label;" accesskey="&copyCmd.accesskey;"/>
<menuseparator/>
<menuitem id="menu_selectAll_cm" command="cmd_selectAll"
label="&selectAllCmd.label;" accesskey="&selectAllCmd.accesskey;"/>
</popup>
</popupset>
<!-- Common menus -->
<menu id="menu_File">
<menupopup id="filemenu-popup" onpopupshowing="updateSavePageItems();">
<menu id="menu_New">
<menupopup id="menu_NewPopup">
<menuitem id="menu_newNavigator"/>
<menuitem id="menu_newEditor"/>
</menupopup>
</menu>
<menuitem id="menu_close"/>
<menuseparator/>
<menuitem id="savepage" key="key_savePage" command="cmd_savePage"
valueSaveAs="&savePageAsCmd.label;" valueSave="&savePageCmd.label;"
accesskey="&savePageCmd.accesskey;"/>
<menuseparator/>
<menuitem key="key_editPage" command="cmd_editPage"
label="&editPageCmd.label;" accesskey="&editPageCmd.accesskey;"/>
<menuseparator/>
<menuitem id="printSetupMenuItem" label="&printSetupCmd.label;" accesskey="&printSetupCmd.accesskey;" command="cmd_printSetup"/>
<menuitem label="&printCmd.label;" accesskey="&printCmd.accesskey;" key="printKb" command="Browser:Print"/>
</menupopup>
</menu>
<menu id="menu_Edit">
<menupopup id="menu_Edit_Popup">
<menuitem id="menu_undo"/>
<menuitem id="menu_redo"/>
<menuseparator/>
<menuitem id="menu_cut"/>
<menuitem id="menu_copy"/>
<menuitem id="menu_paste"/>
<menuitem id="menu_delete"/>
<menuseparator/>
<menuitem id="menu_selectAll"/>
<menuseparator />
<menuitem id="menu_goToLine" key="key_goToLine" command="cmd_goToLine"
label="&goToLineCmd.label;" accesskey="&goToLineCmd.accesskey;"/>
<menuitem id="menu_find" key="key_find" command="Browser:Find"
label="&findOnCmd.label;" accesskey="&findOnCmd.accesskey;"/>
<menuitem id="menu_findAgain" key="key_findAgain" command="Browser:FindAgain"
label="&findAgainCmd.label;" accesskey="&findAgainCmd.accesskey;"/>
<menuitem id="menu_findPrev" key="key_findPrev" command="Browser:FindPrev"
label="&findPrevCmd.label;" accesskey="&findPrevCmd.accesskey;"/>
<menuseparator/>
<menuitem id="menu_findTypeText"/>
</menupopup>
</menu>
</overlay>

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

@ -1,585 +0,0 @@
/* -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* 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 mozilla.org code.
*
* The Initial Developer of the Original Code is
* Netscape Communications Corporation. Portions created by Netscape are Copyright (C) Netscape Communications Corporation. All Rights Reserved.
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Doron Rosenberg (doronr@naboonline.com)
* Neil Rashbrook (neil@parkwaycc.co.uk)
*
* Alternatively, the contents of this file may be used under the terms of
* either of the GNU General Public License Version 2 or later (the "GPL"),
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
const pageLoaderIface = Components.interfaces.nsIWebPageDescriptor;
const nsISelectionPrivate = Components.interfaces.nsISelectionPrivate;
const nsISelectionController = Components.interfaces.nsISelectionController;
var gBrowser = null;
var gViewSourceBundle = null;
var gPrefs = null;
var gLastLineFound = '';
var gGoToLine = 0;
try {
var prefService = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefService);
gPrefs = prefService.getBranch(null);
} catch (ex) {
}
var gSelectionListener = {
timeout: 0,
notifySelectionChanged: function(doc, sel, reason)
{
// Coalesce notifications within 100ms intervals.
if (!this.timeout)
this.timeout = setTimeout(updateStatusBar, 100);
}
}
function onLoadViewSource()
{
viewSource(window.arguments[0]);
document.commandDispatcher.focusedWindow = content;
}
function getBrowser()
{
if (!gBrowser)
gBrowser = document.getElementById("content");
return gBrowser;
}
function getSelectionController()
{
return getBrowser().docShell
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsISelectionDisplay)
.QueryInterface(nsISelectionController);
}
function getViewSourceBundle()
{
if (!gViewSourceBundle)
gViewSourceBundle = document.getElementById("viewSourceBundle");
return gViewSourceBundle;
}
function viewSource(url)
{
if (!url)
return false; // throw Components.results.NS_ERROR_FAILURE;
getBrowser().addEventListener("unload", onUnloadContent, true);
getBrowser().addEventListener("load", onLoadContent, true);
var loadFromURL = true;
//
// Parse the 'arguments' supplied with the dialog.
// arg[0] - URL string.
// arg[1] - Charset value in the form 'charset=xxx'.
// arg[2] - Page descriptor used to load content from the cache.
// arg[3] - Line number to go to.
//
if ("arguments" in window) {
var arg;
//
// Set the charset of the viewsource window...
//
if (window.arguments.length >= 2) {
arg = window.arguments[1];
try {
if (typeof(arg) == "string" && arg.indexOf('charset=') != -1) {
var arrayArgComponents = arg.split('=');
if (arrayArgComponents) {
//we should "inherit" the charset menu setting in a new window
getMarkupDocumentViewer().defaultCharacterSet = arrayArgComponents[1];
}
}
} catch (ex) {
// Ignore the failure and keep processing arguments...
}
}
//
// Get any specified line to jump to.
//
if (window.arguments.length >= 4) {
arg = window.arguments[3];
gGoToLine = parseInt(arg);
}
//
// Use the page descriptor to load the content from the cache (if
// available).
//
if (window.arguments.length >= 3) {
arg = window.arguments[2];
try {
if (typeof(arg) == "object" && arg != null) {
var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface);
//
// Load the page using the page descriptor rather than the URL.
// This allows the content to be fetched from the cache (if
// possible) rather than the network...
//
PageLoader.loadPage(arg, pageLoaderIface.DISPLAY_AS_SOURCE);
// The content was successfully loaded from the page cookie.
loadFromURL = false;
}
} catch(ex) {
// Ignore the failure. The content will be loaded via the URL
// that was supplied in arg[0].
}
}
}
if (loadFromURL) {
//
// We need to set up session history to give us a page descriptor.
//
var webNavigation = getBrowser().webNavigation;
webNavigation.sessionHistory = Components.classes["@mozilla.org/browser/shistory;1"].createInstance();
//
// Currently, an exception is thrown if the URL load fails...
//
var loadFlags = Components.interfaces.nsIWebNavigation.LOAD_FLAGS_NONE;
var viewSrcUrl = "view-source:" + url;
webNavigation.loadURI(viewSrcUrl, loadFlags, null, null, null);
}
//check the view_source.wrap_long_lines pref and set the menuitem's checked attribute accordingly
if (gPrefs) {
try {
var wraplonglinesPrefValue = gPrefs.getBoolPref("view_source.wrap_long_lines");
if (wraplonglinesPrefValue)
document.getElementById('menu_wrapLongLines').setAttribute("checked", "true");
} catch (ex) {
}
try {
document.getElementById("menu_highlightSyntax").setAttribute("checked", gPrefs.getBoolPref("view_source.syntax_highlight"));
} catch (ex) {
}
} else {
document.getElementById("menu_highlightSyntax").setAttribute("hidden", "true");
}
window.content.focus();
return true;
}
function onLoadContent()
{
//
// If the view source was opened with a "go to line" argument.
//
if (gGoToLine > 0) {
goToLine(gGoToLine);
gGoToLine = 0;
}
document.getElementById('cmd_goToLine').removeAttribute('disabled');
// Register a listener so that we can show the caret position on the status bar.
window.content.getSelection()
.QueryInterface(nsISelectionPrivate)
.addSelectionListener(gSelectionListener);
}
function onUnloadContent()
{
//
// Disable "go to line" while reloading due to e.g. change of charset
// or toggling of syntax highlighting.
//
document.getElementById('cmd_goToLine').setAttribute('disabled', 'true');
}
function ViewSourceClose()
{
window.close();
}
function BrowserReload()
{
// Reload will always reload from cache which is probably not what's wanted
BrowserReloadSkipCache();
}
function BrowserReloadSkipCache()
{
const webNavigation = getBrowser().webNavigation;
webNavigation.reload(webNavigation.LOAD_FLAGS_BYPASS_PROXY | webNavigation.LOAD_FLAGS_BYPASS_CACHE);
}
// Strips the |view-source:| for editPage()
function ViewSourceEditPage()
{
editPage(window.content.location.href.substring(12));
}
// Strips the |view-source:| for saveURL()
function ViewSourceSavePage()
{
saveURL(window.content.location.href.substring(12), null, "SaveLinkTitle");
}
function ViewSourceGoToLine()
{
var promptService = Components.classes["@mozilla.org/embedcomp/prompt-service;1"]
.getService(Components.interfaces.nsIPromptService);
var viewSourceBundle = getViewSourceBundle();
var input = {value:gLastLineFound};
for (;;) {
var ok = promptService.prompt(
window,
viewSourceBundle.getString("goToLineTitle"),
viewSourceBundle.getString("goToLineText"),
input,
null,
{value:0});
if (!ok) return;
var line = parseInt(input.value);
if (!(line > 0)) {
promptService.alert(window,
viewSourceBundle.getString("invalidInputTitle"),
viewSourceBundle.getString("invalidInputText"));
continue;
}
var found = goToLine(line);
if (found) {
break;
}
promptService.alert(window,
viewSourceBundle.getString("outOfRangeTitle"),
viewSourceBundle.getString("outOfRangeText"));
}
}
function goToLine(line)
{
var viewsource = window.content.document.body;
//
// The source document is made up of a number of pre elements with
// id attributes in the format <pre id="line123">, meaning that
// the first line in the pre element is number 123.
// Do binary search to find the pre element containing the line.
//
var pre;
for (var lbound = 0, ubound = viewsource.childNodes.length; ; ) {
var middle = (lbound + ubound) >> 1;
pre = viewsource.childNodes[middle];
var firstLine = parseInt(pre.id.substring(4));
if (lbound == ubound - 1) {
break;
}
if (line >= firstLine) {
lbound = middle;
} else {
ubound = middle;
}
}
var result = {};
var found = findLocation(pre, line, null, -1, false, result);
if (!found) {
return false;
}
var selection = window.content.getSelection();
selection.removeAllRanges();
// In our case, the range's startOffset is after "\n" on the previous line.
// Tune the selection at the beginning of the next line and do some tweaking
// to position the focusNode and the caret at the beginning of the line.
selection.QueryInterface(nsISelectionPrivate)
.interlinePosition = true;
selection.addRange(result.range);
if (!selection.isCollapsed) {
selection.collapseToEnd();
var offset = result.range.startOffset;
var node = result.range.startContainer;
if (offset < node.data.length) {
// The same text node spans across the "\n", just focus where we were.
selection.extend(node, offset);
}
else {
// There is another tag just after the "\n", hook there. We need
// to focus a safe point because there are edgy cases such as
// <span>...\n</span><span>...</span> vs.
// <span>...\n<span>...</span></span><span>...</span>
node = node.nextSibling ? node.nextSibling : node.parentNode.nextSibling;
selection.extend(node, 0);
}
}
var selCon = getSelectionController();
selCon.setDisplaySelection(nsISelectionController.SELECTION_ON);
selCon.setCaretEnabled(true);
selCon.setCaretVisibilityDuringSelection(true);
// Scroll the beginning of the line into view.
selCon.scrollSelectionIntoView(
nsISelectionController.SELECTION_NORMAL,
nsISelectionController.SELECTION_FOCUS_REGION,
true);
gLastLineFound = line;
document.getElementById("statusbar-line-col").label = getViewSourceBundle()
.getFormattedString("statusBarLineCol", [line, 1]);
return true;
}
function updateStatusBar()
{
// Reset the coalesce flag.
gSelectionListener.timeout = 0;
var statusBarField = document.getElementById("statusbar-line-col");
var selection = window.content.getSelection();
if (!selection.focusNode) {
statusBarField.label = '';
return;
}
if (selection.focusNode.nodeType != Node.TEXT_NODE) {
return;
}
var selCon = getSelectionController();
selCon.setDisplaySelection(nsISelectionController.SELECTION_ON);
selCon.setCaretEnabled(true);
selCon.setCaretVisibilityDuringSelection(true);
var interlinePosition = selection
.QueryInterface(nsISelectionPrivate).interlinePosition;
var result = {};
findLocation(null, -1,
selection.focusNode, selection.focusOffset, interlinePosition, result);
statusBarField.label = getViewSourceBundle()
.getFormattedString("statusBarLineCol", [result.line, result.col]);
}
//
// Loops through the text lines in the pre element. The arguments are either
// (pre, line) or (node, offset, interlinePosition). result is an out
// argument. If (pre, line) are specified (and node == null), result.range is
// a range spanning the specified line. If the (node, offset,
// interlinePosition) are specified, result.line and result.col are the line
// and column number of the specified offset in the specified node relative to
// the whole file.
//
function findLocation(pre, line, node, offset, interlinePosition, result)
{
if (node && !pre) {
//
// Look upwards to find the current pre element.
//
for (pre = node;
pre.nodeName != "PRE";
pre = pre.parentNode);
}
//
// The source document is made up of a number of pre elements with
// id attributes in the format <pre id="line123">, meaning that
// the first line in the pre element is number 123.
//
var curLine = parseInt(pre.id.substring(4));
//
// Walk through each of the text nodes and count newlines.
//
var treewalker = window.content.document
.createTreeWalker(pre, NodeFilter.SHOW_TEXT, null, false);
//
// The column number of the first character in the current text node.
//
var firstCol = 1;
var found = false;
for (var textNode = treewalker.firstChild();
textNode && !found;
textNode = treewalker.nextNode()) {
//
// \r is not a valid character in the DOM, so we only check for \n.
//
var lineArray = textNode.data.split(/\n/);
var lastLineInNode = curLine + lineArray.length - 1;
//
// Check if we can skip the text node without further inspection.
//
if (node ? (textNode != node) : (lastLineInNode < line)) {
if (lineArray.length > 1) {
firstCol = 1;
}
firstCol += lineArray[lineArray.length - 1].length;
curLine = lastLineInNode;
continue;
}
//
// curPos is the offset within the current text node of the first
// character in the current line.
//
for (var i = 0, curPos = 0;
i < lineArray.length;
curPos += lineArray[i++].length + 1) {
if (i > 0) {
curLine++;
}
if (node) {
if (offset >= curPos && offset <= curPos + lineArray[i].length) {
//
// If we are right after the \n of a line and interlinePosition is
// false, the caret looks as if it were at the end of the previous
// line, so we display that line and column instead.
//
if (i > 0 && offset == curPos && !interlinePosition) {
result.line = curLine - 1;
var prevPos = curPos - lineArray[i - 1].length;
result.col = (i == 1 ? firstCol : 1) + offset - prevPos;
} else {
result.line = curLine;
result.col = (i == 0 ? firstCol : 1) + offset - curPos;
}
found = true;
break;
}
} else {
if (curLine == line && !("range" in result)) {
result.range = document.createRange();
result.range.setStart(textNode, curPos);
//
// This will always be overridden later, except when we look for
// the very last line in the file (this is the only line that does
// not end with \n).
//
result.range.setEndAfter(pre.lastChild);
} else if (curLine == line + 1) {
result.range.setEnd(textNode, curPos - 1);
found = true;
break;
}
}
}
}
return found || ("range" in result);
}
//function to toggle long-line wrapping and set the view_source.wrap_long_lines
//pref to persist the last state
function wrapLongLines()
{
var myWrap = window.content.document.body;
if (myWrap.className == '')
myWrap.className = 'wrap';
else myWrap.className = '';
//since multiple viewsource windows are possible, another window could have
//affected the pref, so instead of determining the new pref value via the current
//pref value, we use myWrap.className
if (gPrefs){
try {
if (myWrap.className == '') {
gPrefs.setBoolPref("view_source.wrap_long_lines", false);
}
else {
gPrefs.setBoolPref("view_source.wrap_long_lines", true);
}
} catch (ex) {
}
}
}
//function to toggle syntax highlighting and set the view_source.syntax_highlight
//pref to persist the last state
function highlightSyntax()
{
var highlightSyntaxMenu = document.getElementById("menu_highlightSyntax");
var highlightSyntax = (highlightSyntaxMenu.getAttribute("checked") == "true");
gPrefs.setBoolPref("view_source.syntax_highlight", highlightSyntax);
var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface);
PageLoader.loadPage(PageLoader.currentDescriptor, pageLoaderIface.DISPLAY_NORMAL);
}
// Fix for bug 136322: this function overrides the function in
// browser.js to call PageLoader.loadPage() instead of BrowserReloadWithFlags()
function BrowserSetForcedCharacterSet(aCharset)
{
var docCharset = getBrowser().docShell.QueryInterface(
Components.interfaces.nsIDocCharset);
docCharset.charset = aCharset;
var PageLoader = getBrowser().webNavigation.QueryInterface(pageLoaderIface);
PageLoader.loadPage(PageLoader.currentDescriptor, pageLoaderIface.DISPLAY_NORMAL);
}
function updateSavePageItems()
{
var autoDownload = gPrefs.getBoolPref("browser.download.autoDownload");
goSetMenuValue("savepage", autoDownload ? "valueSave" : "valueSaveAs");
}

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

@ -1 +0,0 @@
Makefile

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

@ -1,17 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the packages being supplied by this jar -->
<RDF:Seq about="urn:mozilla:package:root">
<RDF:li resource="urn:mozilla:package:navigator-platform"/>
</RDF:Seq>
<!-- package information -->
<RDF:Description about="urn:mozilla:package:navigator-platform"
chrome:displayName="Windows Specific Resources"
chrome:author="mozilla.org"
chrome:name="navigator-platform"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__">
</RDF:Description>
</RDF:RDF>

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

@ -1,6 +0,0 @@
<?xml version="1.0"?>
<overlay id="platformMailOverlay.xul"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
</overlay>

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

@ -1,39 +0,0 @@
<?xml version="1.0"?>
<!DOCTYPE overlay SYSTEM "chrome://navigator-platform/locale/platformNavigationBindings.dtd">
<overlay id="platformNavigationBindings"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<keyset id="navigationKeys">
<!-- back and forward accelerators on Windows, strangely enough, are
Alt+Left arrow and Alt+Right arrow. -->
<key id="goBackKb" keycode="&goBackCmd.keyCode;" command="Browser:Back" modifiers="alt"/>
<key id="goForwardKb" keycode="&goForwardCmd.keyCode;" command="Browser:Forward" modifiers="alt"/>
<key id="goUpKb" keycode="VK_UP" command="Browser:Up" modifiers="alt"/>
<key id="key_stop" keycode="VK_ESCAPE" oncommand="BrowserStop();"/>
<!-- Supporting IE 'refresh' shortcut key -->
<key keycode="VK_F5" oncommand="BrowserReload();"/>
<key keycode="VK_F5" modifiers="control" oncommand="BrowserReloadSkipCache();"/>
<key id="goHome" keycode="VK_HOME" command="Browser:Home" modifiers="alt"/>
<key id="key_fullScreen" keycode="VK_F11" command="View:FullScreen"/>
<key id="key_newTabWithTarget" keycode="VK_INSERT" command="cmd_newTabWithTarget"/>
<key id="key_newTabWithTarget" keycode="VK_INSERT" modifiers="shift" command="cmd_newTabWithTarget"/>
<!-- Support Accel+Shift for Add Bookmark -->
<key id="addBookmarkKb" key="&addCurPageCmd.commandkey;" command="Browser:AddBookmark" modifiers="accel,shift"/>
</keyset>
<keyset id="viewSourceKeys">
<!-- Supporting IE 'refresh' shortcut key in view source -->
<key keycode="VK_F5" oncommand="BrowserReload();"/>
<key keycode="VK_F5" modifiers="control" oncommand="BrowserReloadSkipCache();"/>
</keyset>
<menuitem id="menuitem_fullScreen" hidden="false"/>
</overlay>

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

@ -1 +0,0 @@
Makefile

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

@ -1,2 +0,0 @@
Makefile
navigator.dtd.out

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

@ -1,23 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the locale being supplied by this package -->
<RDF:Seq about="urn:mozilla:locale:root">
<RDF:li resource="urn:mozilla:locale:en-US"/>
</RDF:Seq>
<!-- locale information -->
<RDF:Description about="urn:mozilla:locale:en-US">
<chrome:packages>
<RDF:Seq about="urn:mozilla:locale:en-US:packages">
<RDF:li resource="urn:mozilla:locale:en-US:navigator-region"/>
</RDF:Seq>
</chrome:packages>
</RDF:Description>
<!-- Version Information. State that we work only with major version of this
package. -->
<RDF:Description about="urn:mozilla:locale:en-US:navigator-region"
#expand chrome:localeVersion="__MOZILLA_REGION_VERSION__"/>
</RDF:RDF>

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

@ -1,23 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the skins being supplied by this package -->
<RDF:Seq about="urn:mozilla:locale:root">
<RDF:li resource="urn:mozilla:locale:en-US"/>
</RDF:Seq>
<!-- locale information -->
<RDF:Description about="urn:mozilla:locale:en-US">
<chrome:packages>
<RDF:Seq about="urn:mozilla:locale:en-US:packages">
<RDF:li resource="urn:mozilla:locale:en-US:navigator"/>
</RDF:Seq>
</chrome:packages>
</RDF:Description>
<!-- Version Information. State that we work only with major version of this
package. -->
<RDF:Description about="urn:mozilla:locale:en-US:navigator"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__"/>
</RDF:RDF>

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

@ -1,79 +0,0 @@
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- 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 Christopher Hoess <choess@stwing.upenn.edu>'s code.
-
- The Initial Developer of the Original Code is
- Christopher Hoess.
- Portions created by the Initial Developer are Copyright (C) 2001
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Eric Hodel <drbrain@segment7.net>
- Stuart Ballard <sballard@netreach.net>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<!-- Link Toolbar Title -->
<!ENTITY linkToolbar.label "Site Navigation Bar">
<!ENTITY linkToolbar.accesskey "a">
<!-- Link Toolbar visibility options -->
<!ENTITY linkToolbarAlways.label "Show Always">
<!ENTITY linkToolbarAlways.accesskey "S">
<!ENTITY linkToolbarAsNeeded.label "Show Only As Needed">
<!ENTITY linkToolbarAsNeeded.accesskey "O">
<!ENTITY linkToolbarNever.label "Hide Always">
<!ENTITY linkToolbarNever.accesskey "H">
<!-- Toolbar buttons, menus, and menuitems -->
<!ENTITY topButton.label "Top">
<!ENTITY upButton.label "Up">
<!ENTITY firstButton.label "First">
<!ENTITY prevButton.label "Previous">
<!ENTITY nextButton.label "Next">
<!ENTITY lastButton.label "Last">
<!ENTITY documentButton.label "Document">
<!ENTITY tocButton.label "Table of Contents">
<!ENTITY chapterButton.label "Chapters">
<!ENTITY sectionButton.label "Sections">
<!ENTITY subSectionButton.label "Subsections">
<!ENTITY appendixButton.label "Appendices">
<!ENTITY glossaryButton.label "Glossary">
<!ENTITY indexButton.label "Index">
<!ENTITY moreButton.label "More">
<!ENTITY helpButton.label "Help">
<!ENTITY searchButton.label "Search">
<!ENTITY authorButton.label "Author(s)">
<!ENTITY copyrightButton.label "Copyright">
<!ENTITY bookmarkButton.label "Bookmarks">
<!ENTITY alternateButton.label "Other Versions">

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

@ -1 +0,0 @@
Makefile

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

@ -1,26 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the locale being supplied by this package -->
<RDF:Seq about="urn:mozilla:locale:root">
<RDF:li resource="urn:mozilla:locale:en-US"/>
</RDF:Seq>
<!-- locale information -->
<RDF:Description about="urn:mozilla:locale:en-US"
chrome:author="mozilla.org"
chrome:name="en-US"
chrome:previewURL="http://www.mozilla.org/locales/en-US.gif">
<chrome:packages>
<RDF:Seq about="urn:mozilla:locale:en-US:packages">
<RDF:li resource="urn:mozilla:locale:en-US:navigator-platform"/>
</RDF:Seq>
</chrome:packages>
</RDF:Description>
<!-- Version Information. State that we work only with major version of this
package. -->
<RDF:Description about="urn:mozilla:locale:en-US:navigator-platform"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__"/>
</RDF:RDF>

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

@ -1,5 +0,0 @@
# moved from navigator/locale/navigator.properties
# valid collation options are: <empty string> or useCodePointOrder
intl.collationOption=
intl.charset.default=ISO-8859-1

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

@ -1,9 +0,0 @@
<!-- LOCALIZATION NOTE: RTL languages may wish to switch these -->
<!ENTITY goBackCmd.keyCode "VK_LEFT">
<!ENTITY goForwardCmd.keyCode "VK_RIGHT">
<!ENTITY goBackCmd.commandKey "[">
<!ENTITY goForwardCmd.commandKey "]">
<!ENTITY addCurPageCmd.commandkey "d">

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

@ -1,20 +0,0 @@
<!ENTITY newMessageCmd.label "Message">
<!ENTITY newMessageCmd.accesskey "M">
<!ENTITY newMessageCmd.key "M">
<!ENTITY newCardCmd.label "Address Book Card...">
<!ENTITY newCardCmd.accesskey "C">
<!ENTITY sendPage.label "Send Page...">
<!ENTITY sendPage.accesskey "S">
<!ENTITY contextSendPage.label "Send Page...">
<!ENTITY contextSendPage.accesskey "d">
<!ENTITY contextSendImage.label "Send Image...">
<!ENTITY contextSendImage.accesskey "n">
<!ENTITY contextSendFrame.label "Send Frame...">
<!ENTITY contextSendFrame.accesskey "d">
<!ENTITY sendLinkCmd.label "Send Link...">
<!ENTITY sendLinkCmd.accesskey "d">

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

@ -1,26 +0,0 @@
<!ENTITY no-properties.label "No properties set.">
<!ENTITY caption.label "Element Properties">
<!ENTITY image-sec.label "Image Properties">
<!ENTITY image-url.label "Location:">
<!ENTITY image-desc.label "Description:">
<!ENTITY image-alt.label "Alternate text:">
<!ENTITY image-width.label "Width:">
<!ENTITY image-height.label "Height:">
<!ENTITY image-filesize.label "Size of File:">
<!ENTITY insdel-sec.label "Insert/Delete Properties">
<!ENTITY insdel-cite.label "Info:">
<!ENTITY insdel-date.label "Date:">
<!ENTITY link-sec.label "Link Properties">
<!ENTITY link-url.label "Address:">
<!ENTITY link-target.label "Will open in:">
<!ENTITY link-type.label "Target type:">
<!ENTITY link-lang.label "Target language:">
<!ENTITY link-rel.label "Relation:">
<!ENTITY link-rev.label "Reversed relation:">
<!ENTITY misc-sec.label "Miscellaneous Properties">
<!ENTITY misc-lang.label "Text language:">
<!ENTITY misc-title.label "Title:">
<!ENTITY misc-tblsummary.label "Table summary:">
<!ENTITY quote-sec.label "Quote Properties">
<!ENTITY quote-cite.label "Info:">

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

@ -1,15 +0,0 @@
sameWindowText=Same window
newWindowText=New window
parentFrameText=Parent frame
sameFrameText=Same frame
embeddedText=Embedded
unableToShowProps=No properties available.
altTextMissing=Missing
altTextBlank=Blank
imageSize=%S KB (%S bytes)
imageSizeUnknown=Unknown (not cached)
imageWidth=%Spx
imageHeight=%Spx
# LOCALIZATION NOTE: Next two strings are for language name representations
# %1$S = language name, %2$S = region name
languageRegionFormat=%1$S (%2$S)

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

@ -1,203 +0,0 @@
<!-- extracted from content/navigator.xul -->
<!-- LOCALIZATION NOTE : FILE This file contains the browser main menu items -->
<!-- LOCALIZATION NOTE : FILE Do not translate accesskey and commandkey -->
<!-- LOCALIZATION NOTE (mainWindow.title): DONT_TRANSLATE -->
<!ENTITY mainWindow.title "&brandShortName; {&buildId.label;}">
<!-- LOCALIZATION NOTE (mainWindow.titlemodifier) : DONT_TRANSLATE -->
<!ENTITY mainWindow.titlemodifier "&brandShortName; {&buildId.label;}">
<!-- LOCALIZATION NOTE (mainWindow.titlemodifiermenuseparator): DONT_TRANSLATE -->
<!ENTITY mainWindow.titlemodifiermenuseparator " - ">
<!ENTITY nothingAvailable.label "(Nothing Available)">
<!ENTITY browserCmd.label "New Navigator Window">
<!ENTITY browserCmd.accesskey "N">
<!ENTITY tabCmd.label "Navigator Tab">
<!ENTITY tabCmd.accesskey "T">
<!ENTITY tabCmd.commandkey "t">
<!ENTITY openCmd.label "Open Web Location...">
<!ENTITY openCmd.accesskey "l">
<!ENTITY openCmd.commandkey "l">
<!ENTITY openFileCmd.label "Open File...">
<!ENTITY openFileCmd.accesskey "o">
<!ENTITY openFileCmd.commandkey "o">
<!ENTITY editPageCmd.label "Edit Page">
<!ENTITY editPageCmd.accesskey "E">
<!ENTITY editPageCmd.commandkey "e">
<!ENTITY editFrameCmd.label "Edit Frame">
<!ENTITY editFrameCmd.accesskey "m">
<!ENTITY editFrameSetCmd.label "Edit Frameset">
<!ENTITY editFrameSetCmd.accesskey "t">
<!ENTITY uploadFile.label "Upload File...">
<!ENTITY uploadFile.accesskey "F">
<!ENTITY printSetupCmd.label "Page Setup...">
<!ENTITY printSetupCmd.accesskey "u">
<!ENTITY printPreviewCmd.label "Print Preview">
<!ENTITY printPreviewCmd.accesskey "v">
<!ENTITY printCmd.label "Print...">
<!ENTITY printCmd.accesskey "p">
<!ENTITY printCmd.commandkey "p">
<!ENTITY viewMenu.label "View">
<!ENTITY viewMenu.accesskey "v">
<!ENTITY toolbarsCmd.label "Show/Hide">
<!ENTITY toolbarsCmd.accesskey "w">
<!ENTITY navbarCmd.label "Navigation Toolbar">
<!ENTITY navbarCmd.accesskey "N">
<!ENTITY personalbarCmd.label "Personal Toolbar">
<!ENTITY personalbarCmd.accesskey "p">
<!ENTITY tabbarCmd.label "Tab Bar">
<!ENTITY tabbarCmd.accesskey "T">
<!ENTITY taskbarCmd.label "Status Bar">
<!ENTITY taskbarCmd.accesskey "S">
<!ENTITY componentbarCmd.label "Component Bar">
<!ENTITY componentbarCmd.accesskey "C">
<!ENTITY useStyleSheetMenu.label "Use Style">
<!ENTITY useStyleSheetMenu.accesskey "u">
<!ENTITY useStyleSheetNone.label "None">
<!ENTITY useStyleSheetNone.accesskey "N">
<!ENTITY useStyleSheetPersistentOnly.label "Default Style">
<!ENTITY useStyleSheetPersistentOnly.accesskey "d">
<!ENTITY pageSourceCmd.label "Page Source">
<!ENTITY pageSourceCmd.accesskey "o">
<!ENTITY pageSourceCmd.commandkey "u">
<!ENTITY pageInfoCmd.label "Page Info">
<!ENTITY pageInfoCmd.accesskey "i">
<!ENTITY pageInfoCmd.commandkey "i">
<!ENTITY fullScreenCmd.label "Full Screen">
<!ENTITY fullScreenCmd.accesskey "f">
<!ENTITY translateMenu.label "Translate Page">
<!ENTITY translateMenu.accesskey "T">
<!ENTITY translate.commandKey "t">
<!ENTITY closeOtherTabs.label "Close Other Tabs">
<!ENTITY closeWindow.label "Close Window">
<!ENTITY minimizeButton.tooltip "Minimize">
<!ENTITY restoreButton.tooltip "Restore">
<!-- I'd like all this to move to an overlay or something -->
<!ENTITY bidiMenu.label "Bidi Options">
<!ENTITY directionBidiMenu.label "Default Direction">
<!ENTITY directionRTLBidiCmd.label "Right to Left">
<!ENTITY directionLTRBidiCmd.label "Left to Right">
<!ENTITY texttypeBidiMenu.label "Text Type">
<!ENTITY charsettexttypeBidiCmd.label "Based on Character Set">
<!ENTITY logicaltexttypeBidiCmd.label "Logical">
<!ENTITY visualtexttypeBidiCmd.label "Visual">
<!ENTITY numeralBidiMenu.label "Numeral Shape">
<!ENTITY regularcontextnumeralBidiCmd.label "Contextual">
<!ENTITY hindicontextnumeralBidiCmd.label "Hindi Numerals on RTL Document Direction">
<!ENTITY arabicnumeralBidiCmd.label "Arabic">
<!ENTITY hindinumeralBidiCmd.label "Hindi">
<!ENTITY controlstextmodeBidiMenu.label "Text Mode in Controls">
<!ENTITY logicalcontrolstextmodeBidiCmd.label "Logical">
<!ENTITY visiualcontrolstextmodeBidiCmd.label "Visual">
<!ENTITY containercontrolstextmodeBidiCmd.label "Like Containing Document">
<!ENTITY charactersetBidiMenu.label "Character set">
<!ENTITY doccharactersetBidiCmd.label "Use the document specified character set">
<!ENTITY defaultcharactersetBidiCmd.label "Use my default character set, overriding the document-specified character set">
<!ENTITY webContentMenu.label "Languages and Web Content">
<!ENTITY webContentMenu.accesskey "l">
<!ENTITY downloadMore.label "Download More">
<!ENTITY downloadMore.accesskey "D">
<!ENTITY applyTheme.label "Apply Theme">
<!ENTITY applyTheme.accesskey "A">
<!ENTITY getNewThemesCmd.label "Get New Themes">
<!ENTITY getNewThemesCmd.accesskey "G">
<!ENTITY searchMenu.label "Search">
<!ENTITY searchMenu.accesskey "S">
<!ENTITY findOnCmd.label "Find in This Page...">
<!ENTITY findOnCmd.accesskey "f">
<!ENTITY findOnCmd.commandkey "f">
<!ENTITY findAgainCmd.label "Find Again">
<!ENTITY findAgainCmd.accesskey "g">
<!ENTITY findAgainCmd.commandkey "g">
<!ENTITY findPrevCmd.label "Find Previous">
<!ENTITY findPrevCmd.accesskey "v">
<!ENTITY findPrevCmd.commandkey "g">
<!ENTITY findAgainCmd.commandkey2 "VK_F3">
<!ENTITY findPrevCmd.commandkey2 "VK_F3">
<!ENTITY searchInternetCmd.label "Search the Web">
<!ENTITY searchInternetCmd.accesskey "S">
<!ENTITY searchInternet.commandKey "s">
<!ENTITY goMenu.label "Go">
<!ENTITY goMenu.accesskey "g">
<!ENTITY goHomeCmd.label "Home">
<!ENTITY goHomeCmd.accesskey "h">
<!ENTITY bookmarksMenu.label "Bookmarks">
<!ENTITY bookmarksMenu.accesskey "B">
<!ENTITY addCurPageCmd.label "Bookmark This Page">
<!ENTITY addCurPageCmd.accesskey "B">
<!ENTITY addCurPageAsCmd.label "File Bookmark...">
<!ENTITY addCurPageAsCmd.accesskey "F">
<!ENTITY addCurPageAsCmd.commandkey "d">
<!ENTITY addCurTabsAsCmd.label "Bookmark This Group of Tabs...">
<!ENTITY addCurTabsAsCmd.accesskey "G">
<!ENTITY manBookmarksCmd.label "Manage Bookmarks...">
<!ENTITY manBookmarksCmd.accesskey "M">
<!ENTITY manBookmarksCmd.commandkey "b">
<!ENTITY emptyItem.label "(Empty)">
<!ENTITY helpMenuCmd.label "Help">
<!ENTITY helpMenuCmd.accesskey "h">
<!ENTITY helpContentsCmd.label "Help Contents">
<!ENTITY softwareUpdatesCmd.label "Software Updates">
<!ENTITY technicalSupportCmd.label "Technical Support">
<!ENTITY releaseNotesCmd.label "Release Notes">
<!ENTITY menuBar.tooltip "Menu Bar">
<!ENTITY personalToolbar.tooltip "Personal Toolbar">
<!ENTITY navigationToolbar.tooltip "Navigation Toolbar">
<!-- Toolbar items -->
<!ENTITY backButton.label "Back">
<!ENTITY backButton.tooltip "Go back one page">
<!ENTITY forwardButton.label "Forward">
<!ENTITY forwardButton.tooltip "Go forward one page">
<!ENTITY reloadButton.label "Reload">
<!ENTITY reloadButton.tooltip "Reload current page">
<!ENTITY stopButton.label "Stop">
<!ENTITY stopButton.tooltip "Stop loading this page">
<!ENTITY searchButton.label "Search">
<!ENTITY searchButton.tooltip "Type a word in the field to the left, then click Search">
<!ENTITY goButton.label "Go">
<!ENTITY goButton.tooltip "Type a location in the field to the left, then click Go">
<!ENTITY printButton.label "Print">
<!ENTITY printButton.tooltip "Print this page">
<!ENTITY throbber.tooltip "Go to the &vendorShortName; home page">
<!ENTITY locationBar.tooltip "Enter search term, keyword, or web address">
<!ENTITY locationBar.accesskey "d">
<!ENTITY locationBar.title "Location">
<!ENTITY proxyIcon.tooltip "Drag and drop this icon to create a link to this page">
<!ENTITY internetKeyword.tooltip "Return to previously viewed page or choose keyword">
<!-- Toolbar items -->
<!ENTITY bookmarksButton.label "Bookmarks">
<!ENTITY bookmarksButton.tooltip "Bookmarks list">
<!ENTITY homeButton.label "Home">
<!-- Statusbar -->
<!ENTITY statusText.label "Done">
<!ENTITY historyCmd.label "History">
<!ENTITY historyCmd.accesskey "i">
<!ENTITY history.commandKey "h">
<!ENTITY popupIcon.tooltiptext "Unblock this site's popups">
<!ENTITY bidiSwitchPageDirectionItem.label "Switch Page Direction">
<!ENTITY bidiSwitchPageDirectionItem.accesskey "g">

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

@ -1,99 +0,0 @@
nv_done=Done
nv_timeout=Timed Out
nv_stopped=Stopped
openFile=Open File
uploadFile=Upload File
droponhomebutton=Drop a link or file to make it your home page
droponhometitle=Set Home Page
droponhomemsg=Do you want this document to be your new home page?
droponhomeokbutton=Set Home Page
jserror=An error has occurred on this page. Double click here for details.
#
# localizable preference value
#
# all.js
#
# Localization Note: Cases of charset names must be preserved. If you're
# adding charsets to your localized version, please refer to
# intl/uconv/src/charsetalias.properties file for the list of canonical
# charset names and use canonical names exactly as listed there.
# Also, note that UTF-8 MUST be listed in intl.charsetmenu.browser.static.
general.useragent.locale=en-US
# Localization Note: font.language.group controls the initial setting of the
# language drop-down in the fonts pref panel. Set it to the value of one of the
# menuitems in the "selectLangs" menulist in
# /xpfe/components/prefwindow/resources/content/pref-fonts.xul
font.language.group=x-western
# Localization Note: Add the code for your language at the front of this entry,
# leaving "en-us, en" for fallback. It's recommended to use the same form, e.g.
# "ja-jp, ja, en-us, en"
intl.accept_languages=en-us, en
intl.charsetmenu.browser.static=ISO-8859-1, UTF-8
intl.charsetmenu.browser.more1=ISO-8859-1, ISO-8859-15, IBM850, x-mac-roman, windows-1252, ISO-8859-14, ISO-8859-7, x-mac-greek, windows-1253, x-mac-icelandic, ISO-8859-10, ISO-8859-3
intl.charsetmenu.browser.more2=ISO-8859-4, ISO-8859-13, windows-1257, IBM852, ISO-8859-2, x-mac-ce, windows-1250, x-mac-croatian, IBM855, ISO-8859-5, ISO-IR-111, KOI8-R, x-mac-cyrillic, windows-1251, IBM866, KOI8-U, x-mac-ukrainian, ISO-8859-16, x-mac-romanian
intl.charsetmenu.browser.more3=GB2312, x-gbk, gb18030, HZ-GB-2312, ISO-2022-CN, Big5, Big5-HKSCS, x-euc-tw, EUC-JP, ISO-2022-JP, Shift_JIS, EUC-KR, x-windows-949, x-johab, ISO-2022-KR
intl.charsetmenu.browser.more4=armscii-8, GEOSTD8, TIS-620, ISO-8859-11, windows-874, IBM857, ISO-8859-9, x-mac-turkish, windows-1254, x-viet-tcvn5712, VISCII, x-viet-vps, windows-1258, x-mac-devanagari, x-mac-gujarati, x-mac-gurmukhi
intl.charsetmenu.browser.more5=ISO-8859-6, windows-1256, IBM864, x-mac-arabic, x-mac-farsi, ISO-8859-8-I, windows-1255, ISO-8859-8, IBM862, x-mac-hebrew
# Localization Note: Do NOT change this entry.
intl.charsetmenu.browser.unicode=UTF-8, UTF-16, UTF-16LE, UTF-16BE, UTF-32LE, UTF-32BE, UTF-7
intl.charset.default=ISO-8859-1
intl.charset.detector=
intl.charsetmenu.mailedit=ISO-8859-1, ISO-8859-15, ISO-8859-6, armscii-8, geostd8, ISO-8859-13, ISO-8859-14, ISO-8859-2, GB2312, GB18030, Big5, KOI8-R, windows-1251, KOI8-U, ISO-8859-7, ISO-8859-8-I, windows-1255, ISO-2022-JP, EUC-KR, ISO-8859-10, ISO-8859-3, TIS-620, ISO-8859-9, UTF-8, VISCII
# valid collation options are: <empty string> or useCodePointOrder
intl.collationOption=
# valid intl.menuitems.appendedacceskeys are: true or false, <empty string> (missing or empty preference equals false)
intl.menuitems.alwaysappendaccesskeys=
# valid intl.menuitems.insertseparatorbeforeaccesskeys are: true or false, <empty string> (missing or empty preference equals false)
intl.menuitems.insertseparatorbeforeaccesskeys=true
linkTargetLabel=Link will open in:
linkHREFLabel=Location:
#SessionHistory.js
nothingAvailable=(Nothing Available)
#navigator.js
oldthemetitle=Warning: incompatible theme
oldTheme=You have selected a theme which was designed for an earlier version of %brand% and is incompatible with your current %brand% version. Please check %brand% theme sites for an updated version of the theme. You can uninstall this theme by clicking \"OK\" button.
noPopupControl=can't control popups for this site
#nsContextMenu.js (setWallpaper confirmation dialog)
wallpaperConfirmTitle = Set As Wallpaper
wallpaperConfirmButton = Set Wallpaper
wallpaperConfirmMsg = Do you want to set this image as your desktop wallpaper?
# XXX - this sucks and should only be temporary.
switchskins=Theme changes will take effect when you restart %S.
switchskinstitle=Apply Theme
# Localization Note: Use 'true' or 'false' to control the pref:theme to
# show the English description or not
# for example, in Japanese build, instead of showing English description
# set the following value to false so it won't show up.
showskinsdescription=true
# menu_close labels
tabs.closeTab=Close Tab
tabs.close=Close
tabs.closeWarningTitle=Confirm close
tabs.closeWarning=This Navigator window has %S tabs open. Do you want to close it and all its tabs?
tabs.closeButton=Close all tabs
tabs.closeWarningPromptMe=Warn me when closing multiple tabs
tabs.historyItem=Group of Tabs
# urlbarBindings.xml
# LOCALIZATION NOTE: This is for the location bar drop-down string:
# "Seach " + search_engine_name + " for " + user_input
# e.g. "Search Google for abc"
# DO NOT change the %S order when translate, the first %S must be the search engine name.
searchFor=Search %S for "%S"
# For JVM Configuration
switchJVMTitle=Select Java version
switchJVMFailed=Failed to select this version of java
popupMenuShow=Show %S

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

@ -1,118 +0,0 @@
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- 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 Mozilla Communicator client code.
-
- The Initial Developer of the Original Code is Daniel Brooks.
- Portions created by the Initial Developer are Copyright (C) 2001-2004
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<!ENTITY preface "Info for: ">
<!ENTITY title "Page Info">
<!ENTITY description "Information about the current page">
<!ENTITY pageInfoWindow.width "425">
<!ENTITY pageInfoWindow.height "470">
<!ENTITY copy.key "C">
<!ENTITY copy.label "Copy">
<!ENTITY copy.accesskey "C">
<!ENTITY selectall.key "A">
<!ENTITY selectall.label "Select All">
<!ENTITY selectall.accesskey "A">
<!ENTITY closeWindow.key "w">
<!ENTITY generalTab "General">
<!ENTITY generalTab.accesskey "G">
<!ENTITY generalTitle "Title:">
<!ENTITY generalURL "Address:">
<!ENTITY generalMode "Render Mode:">
<!ENTITY generalType "Type:">
<!ENTITY generalSize "Size:">
<!ENTITY generalReferrer "Referring URL:">
<!ENTITY generalSource "Cache Source:">
<!ENTITY generalSent "Sent:">
<!ENTITY generalModified "Modified:">
<!ENTITY generalExpires "Expires:">
<!ENTITY generalEncoding "Encoding:">
<!ENTITY generalMeta "Meta:">
<!ENTITY generalMetaName "Name">
<!ENTITY generalMetaContent "Content">
<!ENTITY formsTab "Forms">
<!ENTITY formsTab.accesskey "F">
<!ENTITY formAction "Form Action">
<!ENTITY formMethod "Method">
<!ENTITY formName "Name">
<!ENTITY formNo "No.">
<!ENTITY formEncoding "Encoding:">
<!ENTITY formTarget "Target:">
<!ENTITY formFields "Fields:">
<!ENTITY formLabel "Label">
<!ENTITY formFName "Field Name">
<!ENTITY formType "Type">
<!ENTITY formCValue "Current Value">
<!ENTITY linksTab "Links">
<!ENTITY linksTab.accesskey "L">
<!ENTITY linkNo "No.">
<!ENTITY linkName "Name">
<!ENTITY linkAddress "Address">
<!ENTITY linkType "Type">
<!ENTITY linkTarget "Target">
<!ENTITY linkAccessKey "Access Key">
<!ENTITY mediaTab "Media">
<!ENTITY mediaTab.accesskey "M">
<!ENTITY mediaHeader "Images on this page">
<!ENTITY mediaURL "Address:">
<!ENTITY mediaBase "Base Address:">
<!ENTITY mediaAlt "Alternate Text:">
<!ENTITY mediaAltHeader "Alternate Text">
<!ENTITY mediaNo "No.">
<!ENTITY mediaName "Name">
<!ENTITY mediaAddress "Address">
<!ENTITY mediaType "Type">
<!ENTITY mediaCount "Count">
<!ENTITY mediaPlugin "Plugin:">
<!ENTITY mediaCharset "Encoding:">
<!ENTITY mediaDimensions "Specified Dimensions:">
<!ENTITY mediaPhysDimensions "Actual Dimensions:">
<!ENTITY mediaEncryption "Encryption:">
<!ENTITY mediaTitle "Title:">
<!ENTITY mediaLongdesc "Long Description:">
<!ENTITY mediaSaveAs "Save As...">
<!ENTITY mediaSaveAs.accesskey "A">
<!ENTITY mediaPreview "Media Preview:">
<!ENTITY framesTab "Frames">
<!ENTITY framesTab.accesskey "r">
<!ENTITY frameName "Name">
<!ENTITY frameAddress "Address">
<!ENTITY frameType "Type">

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

@ -1,86 +0,0 @@
#
# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1/GPL 2.0/LGPL 2.1
#
# 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 mozilla.org code.
#
# The Initial Developer of the Original Code is
# International Business Machines Corporation.
# Portions created by the Initial Developer are Copyright (C) 2000
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Daniel Brooks <db48x@yahoo.com>
# Mike Kowalski <mikejk@ameritech.net>
#
# Alternatively, the contents of this file may be used under the terms of
# either the GNU General Public License Version 2 or later (the "GPL"), or
# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
# in which case the provisions of the GPL or the LGPL are applicable instead
# of those above. If you wish to allow use of your version of this file only
# under the terms of either the GPL or the LGPL, and not to allow others to
# use your version of this file under the terms of the MPL, indicate your
# decision by deleting the provisions above and replace them with the notice
# and other provisions required by the GPL or the LGPL. If you do not delete
# the provisions above, a recipient may use your version of this file under
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
pageInfo.title=Page Info
frameInfo.title=Frame Info
noPageTitle=Untitled Page:
pageTitle=%S:
unknown=Unknown
default=Default
notset=Not specified
emptystring=Empty String
generalNotCached=Not cached
generalNoExpiration=No expiration set
generalQuirksMode=Quirks mode
generalStrictMode=Standards compliance mode
generalNoReferrer=no referrer
formTitle=Form %S:
formUntitled=Unnamed Form:
formDefaultTarget=None (opens in same window)
formChecked=Checked
formUnchecked=Unchecked
formPassword=********
linkAnchor=Anchor
linkArea=Area
linkSubmission=Form Submission
linkSubmit=Submit Query
linkRel=Related Item
linkStylesheet=Stylesheet
linkRev=Reverse Link
linkX=Simple XLink
mediaImg=Image
mediaBGImg=Background
mediaApplet=Applet
mediaObject=Object
mediaEmbed=Embed
mediaLink=Icon
mediaInput=Input
mediaSize=%Spx \u00D7 %Spx
generalDiskCache=Disk cache
generalMemoryCache=Memory cache
generalHTTPCache=HTTP cache
generalFTPCache=FTP cache
generalSize=%S KB (%S bytes)

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

@ -1,20 +0,0 @@
# navigator.properties
homePageDefault=http://www.mozilla.org/
keywordList=http://home.netscape.com/escapes/keywords
webmailKeyword=http://webmail.netscape.com
fallbackDefaultSearchURL=http://www.google.com/search?q=
otherSearchURL=http://www.google.com
#
# all.js
#
browser.startup.homepage=http://www.mozilla.org/projects/seamonkey/start/
browser.throbber.url=http://www.mozilla.org/projects/seamonkey/
browser.search.defaulturl=http://www.google.com/search?q=
general.useragent.contentlocale=US
browser.translation.service=http://translate.google.com/translate?prev=/language_tools&u=
browser.translation.serviceDomain=translate.google.com
#config.js
#
startup.homepage_override_url=http://www.mozilla.org/projects/seamonkey/start/

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

@ -1,4 +0,0 @@
<!ENTITY exitWarningMsg.label "Quick Launch is enabled, so &brandShortName; remains in memory and can be started again quickly. To completely exit, right click on the &brandShortName; icon in the system tray and select Exit &brandShortName;.">
<!ENTITY exitWarningTitle.label "Quick Launch">
<!ENTITY exitWarningCheckbox.label "Don't show me this message again">
<!ENTITY exitWarningCheckbox.accesskey "D">

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

@ -1,6 +0,0 @@
Exit=E&xit %S
Disable=&Disable Quick Launch
DisableDlgMsg=Disabling Quick Launch will increase the time it takes to start %1$S. Once disabled, open the Edit menu and choose Preferences. Choose the "Advanced" category and check "Keep %1$S in memory to improve startup performance" to enable it. Are you sure you want to disable Quick Launch?
DisableDlgTitle=%S Quick Launch
Navigator=&Navigator
Editor=&Composer

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

@ -1 +0,0 @@
Makefile

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

@ -1,26 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the locale being supplied by this package -->
<RDF:Seq about="urn:mozilla:locale:root">
<RDF:li resource="urn:mozilla:locale:en-US"/>
</RDF:Seq>
<!-- locale information -->
<RDF:Description about="urn:mozilla:locale:en-US"
chrome:author="mozilla.org"
chrome:name="en-US"
chrome:previewURL="http://www.mozilla.org/locales/en-US.gif">
<chrome:packages>
<RDF:Seq about="urn:mozilla:locale:en-US:packages">
<RDF:li resource="urn:mozilla:locale:en-US:navigator-platform"/>
</RDF:Seq>
</chrome:packages>
</RDF:Description>
<!-- Version Information. State that we work only with major version of this
package. -->
<RDF:Description about="urn:mozilla:locale:en-US:navigator-platform"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__"/>
</RDF:RDF>

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

@ -1,5 +0,0 @@
# moved from navigator/locale/navigator.properties
# valid collation options are: <empty string> or useCodePointOrder
intl.collationOption=
intl.charset.default=ISO-8859-1

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

@ -1,6 +0,0 @@
<!-- LOCALIZATION NOTE: RTL languages may wish to switch these -->
<!ENTITY goBackCmd.keyCode "VK_LEFT">
<!ENTITY goForwardCmd.keyCode "VK_RIGHT">
<!ENTITY goBackCmd.commandKey "[">
<!ENTITY goForwardCmd.commandKey "]">
<!ENTITY findOnCmd.commandkey2 "VK_F19">

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

@ -1,27 +0,0 @@
<!-- extracted from content/viewSource.xul -->
<!-- LOCALIZATION NOTE (mainWindow.title) : DONT_TRANSLATE -->
<!ENTITY mainWindow.title "&brandShortName;">
<!-- LOCALIZATION NOTE (mainWindow.titlemodifier) : DONT_TRANSLATE -->
<!ENTITY mainWindow.titlemodifier "&brandShortName;">
<!-- LOCALIZATION NOTE (mainWindow.titlemodifierseparator) : DONT_TRANSLATE -->
<!ENTITY mainWindow.titlemodifierseparator " - ">
<!ENTITY mainWindow.preface "Source of: ">
<!ENTITY viewPartialSourceWindow.title "DOM Source">
<!ENTITY menu_wrapLongLines.title "Wrap Long Lines">
<!ENTITY menu_wrapLongLines.accesskey "W">
<!ENTITY menu_highlightSyntax.label "Syntax Highlighting">
<!ENTITY menu_highlightSyntax.accesskey "H">
<!ENTITY findNextCmd.label "Find Next">
<!ENTITY findNextCmd.accesskey "n">
<!ENTITY goToLineCmd.label "Go to Line...">
<!ENTITY goToLineCmd.accesskey "G">
<!ENTITY goToLineCmd.commandkey "l">
<!ENTITY printSetupCmd.label "Page Setup...">
<!ENTITY printSetupCmd.accesskey "u">

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

@ -1,7 +0,0 @@
goToLineTitle = Go to line
goToLineText = Enter line number
invalidInputTitle = Invalid input
invalidInputText = The line number entered is invalid.
outOfRangeTitle = Line not found
outOfRangeText = The specified line was not found.
statusBarLineCol = Line %1$S, Col %2$S

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

@ -1 +0,0 @@
Makefile

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

@ -1,26 +0,0 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:chrome="http://www.mozilla.org/rdf/chrome#">
<!-- list all the locale being supplied by this package -->
<RDF:Seq about="urn:mozilla:locale:root">
<RDF:li resource="urn:mozilla:locale:en-US"/>
</RDF:Seq>
<!-- locale information -->
<RDF:Description about="urn:mozilla:locale:en-US"
chrome:author="mozilla.org"
chrome:name="en-US"
chrome:previewURL="http://www.mozilla.org/locales/en-US.gif">
<chrome:packages>
<RDF:Seq about="urn:mozilla:locale:en-US:packages">
<RDF:li resource="urn:mozilla:locale:en-US:navigator-platform"/>
</RDF:Seq>
</chrome:packages>
</RDF:Description>
<!-- Version Information. State that we work only with major version of this
package. -->
<RDF:Description about="urn:mozilla:locale:en-US:navigator-platform"
#expand chrome:localeVersion="__MOZILLA_LOCALE_VERSION__"/>
</RDF:RDF>

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

@ -1,5 +0,0 @@
# moved from navigator/locale/navigator.properties
# valid collation options are: <empty string> or useCodePointOrder
intl.collationOption=
intl.charset.default=ISO-8859-1

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

@ -1,7 +0,0 @@
<!-- LOCALIZATION NOTE: RTL languages may wish to switch these -->
<!ENTITY goBackCmd.keyCode "VK_LEFT">
<!ENTITY goForwardCmd.keyCode "VK_RIGHT">
<!ENTITY addCurPageCmd.commandkey "d">