" + NEWLINE;
- }
- if (self.nodeIsURI(bNode))
- return "" + escapedTitle + "" + NEWLINE;
- if (self.nodeIsSeparator(bNode))
- return "" + NEWLINE;
- return "";
- }
- return gatherDataHtml(convertNode(aNode));
- }
- // case this.TYPE_UNICODE:
- function gatherDataText(bNode) {
- if (self.nodeIsLivemarkContainer(bNode))
- return self.livemarks.getSiteURI(bNode.itemId).spec;
- if (self.nodeIsContainer(bNode)) {
- asContainer(bNode);
- var wasOpen = bNode.containerOpen;
- if (!wasOpen)
- bNode.containerOpen = true;
-
- var childString = bNode.title + NEWLINE;
- var cc = bNode.childCount;
- for (var i = 0; i < cc; ++i) {
- var child = bNode.getChild(i);
- var suffix = i < (cc - 1) ? NEWLINE : "";
- childString += gatherDataText(child) + suffix;
- }
- bNode.containerOpen = wasOpen;
- return childString;
- }
- if (self.nodeIsURI(bNode))
- return (aOverrideURI || bNode.uri);
- if (self.nodeIsSeparator(bNode))
- return "--------------------";
- return "";
- }
-
- return gatherDataText(convertNode(aNode));
- },
-
- /**
- * Unwraps data from the Clipboard or the current Drag Session.
- * @param blob
- * A blob (string) of data, in some format we potentially know how
- * to parse.
- * @param type
- * The content type of the blob.
- * @returns An array of objects representing each item contained by the source.
- */
- unwrapNodes: function PU_unwrapNodes(blob, type) {
- // We split on "\n" because the transferable system converts "\r\n" to "\n"
- var nodes = [];
- switch(type) {
- case this.TYPE_X_MOZ_PLACE:
- case this.TYPE_X_MOZ_PLACE_SEPARATOR:
- case this.TYPE_X_MOZ_PLACE_CONTAINER:
- var JSON = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
- nodes = JSON.decode("[" + blob + "]");
- break;
- case this.TYPE_X_MOZ_URL:
- var parts = blob.split("\n");
- // data in this type has 2 parts per entry, so if there are fewer
- // than 2 parts left, the blob is malformed and we should stop
- // but drag and drop of files from the shell has parts.length = 1
- if (parts.length != 1 && parts.length % 2)
- break;
- for (var i = 0; i < parts.length; i=i+2) {
- var uriString = parts[i];
- var titleString = "";
- if (parts.length > i+1)
- titleString = parts[i+1];
- else {
- // for drag and drop of files, try to use the leafName as title
- try {
- titleString = this._uri(uriString).QueryInterface(Ci.nsIURL)
- .fileName;
- }
- catch (e) {}
- }
- // note: this._uri() will throw if uriString is not a valid URI
- if (this._uri(uriString)) {
- nodes.push({ uri: uriString,
- title: titleString ? titleString : uriString ,
- type: this.TYPE_X_MOZ_URL });
- }
- }
- break;
- case this.TYPE_UNICODE:
- var parts = blob.split("\n");
- for (var i = 0; i < parts.length; i++) {
- var uriString = parts[i];
- // note: this._uri() will throw if uriString is not a valid URI
- if (uriString != "" && this._uri(uriString))
- nodes.push({ uri: uriString,
- title: uriString,
- type: this.TYPE_X_MOZ_URL });
- }
- break;
- default:
- LOG("Cannot unwrap data of type " + type);
- throw Cr.NS_ERROR_INVALID_ARG;
- }
- return nodes;
- },
-
- /**
- * Generates a nsINavHistoryResult for the contents of a folder.
- * @param folderId
- * The folder to open
- * @param [optional] excludeItems
- * True to hide all items (individual bookmarks). This is used on
- * the left places pane so you just get a folder hierarchy.
- * @param [optional] expandQueries
- * True to make query items expand as new containers. For managing,
- * you want this to be false, for menus and such, you want this to
- * be true.
- * @returns A nsINavHistoryResult containing the contents of the
- * folder. The result.root is guaranteed to be open.
- */
- getFolderContents:
- function PU_getFolderContents(aFolderId, aExcludeItems, aExpandQueries) {
- var query = this.history.getNewQuery();
- query.setFolders([aFolderId], 1);
- var options = this.history.getNewQueryOptions();
- options.excludeItems = aExcludeItems;
- options.expandQueries = aExpandQueries;
-
- var result = this.history.executeQuery(query, options);
- result.root.containerOpen = true;
- return result;
- },
-
- /**
- * Fetch all annotations for a URI, including all properties of each
- * annotation which would be required to recreate it.
- * @param aURI
- * The URI for which annotations are to be retrieved.
- * @return Array of objects, each containing the following properties:
- * name, flags, expires, mimeType, type, value
- */
- getAnnotationsForURI: function PU_getAnnotationsForURI(aURI) {
- var annosvc = this.annotations;
- var annos = [], val = null;
- var annoNames = annosvc.getPageAnnotationNames(aURI, {});
- for (var i = 0; i < annoNames.length; i++) {
- var flags = {}, exp = {}, mimeType = {}, storageType = {};
- annosvc.getPageAnnotationInfo(aURI, annoNames[i], flags, exp, mimeType, storageType);
- if (storageType.value == annosvc.TYPE_BINARY) {
- var data = {}, length = {}, mimeType = {};
- annosvc.getPageAnnotationBinary(aURI, annoNames[i], data, length, mimeType);
- val = data.value;
- }
- else
- val = annosvc.getPageAnnotation(aURI, annoNames[i]);
-
- annos.push({name: annoNames[i],
- flags: flags.value,
- expires: exp.value,
- mimeType: mimeType.value,
- type: storageType.value,
- value: val});
- }
- return annos;
- },
-
- /**
- * Fetch all annotations for an item, including all properties of each
- * annotation which would be required to recreate it.
- * @param aItemId
- * The identifier of the itme for which annotations are to be
- * retrieved.
- * @return Array of objects, each containing the following properties:
- * name, flags, expires, mimeType, type, value
- */
- getAnnotationsForItem: function PU_getAnnotationsForItem(aItemId) {
- var annosvc = this.annotations;
- var annos = [], val = null;
- var annoNames = annosvc.getItemAnnotationNames(aItemId, {});
- for (var i = 0; i < annoNames.length; i++) {
- var flags = {}, exp = {}, mimeType = {}, storageType = {};
- annosvc.getItemAnnotationInfo(aItemId, annoNames[i], flags, exp, mimeType, storageType);
- if (storageType.value == annosvc.TYPE_BINARY) {
- var data = {}, length = {}, mimeType = {};
- annosvc.geItemAnnotationBinary(aItemId, annoNames[i], data, length, mimeType);
- val = data.value;
- }
- else
- val = annosvc.getItemAnnotation(aItemId, annoNames[i]);
-
- annos.push({name: annoNames[i],
- flags: flags.value,
- expires: exp.value,
- mimeType: mimeType.value,
- type: storageType.value,
- value: val});
- }
- return annos;
- },
-
- /**
- * Annotate a URI with a batch of annotations.
- * @param aURI
- * The URI for which annotations are to be set.
- * @param aAnnotations
- * Array of objects, each containing the following properties:
- * name, flags, expires, type, mimeType (only used for binary
- * annotations) value.
- */
- setAnnotationsForURI: function PU_setAnnotationsForURI(aURI, aAnnos) {
- var annosvc = this.annotations;
- aAnnos.forEach(function(anno) {
- var flags = ("flags" in anno) ? anno.flags : 0;
- var expires = ("expires" in anno) ?
- anno.expires : Ci.nsIAnnotationService.EXPIRE_NEVER;
- if (anno.type == annosvc.TYPE_BINARY) {
- annosvc.setPageAnnotationBinary(aURI, anno.name, anno.value,
- anno.value.length, anno.mimeType,
- flags, expires);
- }
- else
- annosvc.setPageAnnotation(aURI, anno.name, anno.value, flags, expires);
- });
- },
-
- /**
- * Annotate an item with a batch of annotations.
- * @param aItemId
- * The identifier of the item for which annotations are to be set
- * @param aAnnotations
- * Array of objects, each containing the following properties:
- * name, flags, expires, type, mimeType (only used for binary
- * annotations) value.
- */
- setAnnotationsForItem: function PU_setAnnotationsForItem(aItemId, aAnnos) {
- var annosvc = this.annotations;
- aAnnos.forEach(function(anno) {
- var flags = ("flags" in anno) ? anno.flags : 0;
- var expires = ("expires" in anno) ?
- anno.expires : Ci.nsIAnnotationService.EXPIRE_NEVER;
- if (anno.type == annosvc.TYPE_BINARY) {
- annosvc.setItemAnnotationBinary(aItemId, anno.name, anno.value,
- anno.value.length, anno.mimeType,
- flags, expires);
- }
- else {
- annosvc.setItemAnnotation(aItemId, anno.name, anno.value, flags,
- expires);
- }
- });
- },
-
- /**
- * Helper for getting a serialized Places query for a particular folder.
- * @param aFolderId The folder id to get a query for.
- * @return string serialized place URI
- */
- getQueryStringForFolder: function PU_getQueryStringForFolder(aFolderId) {
- var options = this.history.getNewQueryOptions();
- var query = this.history.getNewQuery();
- query.setFolders([aFolderId], 1);
- return this.history.queriesToQueryString([query], 1, options);
- },
-
- // identifier getters for special folders
- get placesRootId() {
- delete this.placesRootId;
- return this.placesRootId = this.bookmarks.placesRoot;
- },
-
- get bookmarksMenuFolderId() {
- delete this.bookmarksMenuFolderId;
- return this.bookmarksMenuFolderId = this.bookmarks.bookmarksMenuFolder;
- },
-
- get toolbarFolderId() {
- delete this.toolbarFolderId;
- return this.toolbarFolderId = this.bookmarks.toolbarFolder;
- },
-
- get tagsFolderId() {
- delete this.tagsFolderId;
- return this.tagsFolderId = this.bookmarks.tagsFolder;
- },
-
- get unfiledBookmarksFolderId() {
- delete this.unfiledBookmarksFolderId;
- return this.unfiledBookmarksFolderId = this.bookmarks.unfiledBookmarksFolder;
- },
-
- /**
- * Set the POST data associated with a bookmark, if any.
- * Used by POST keywords.
- * @param aBookmarkId
- * @returns string of POST data
- */
- setPostDataForBookmark: function PU_setPostDataForBookmark(aBookmarkId, aPostData) {
- const annos = this.annotations;
- if (aPostData)
- annos.setItemAnnotation(aBookmarkId, POST_DATA_ANNO, aPostData,
- 0, Ci.nsIAnnotationService.EXPIRE_NEVER);
- else if (annos.itemHasAnnotation(aBookmarkId, POST_DATA_ANNO))
- annos.removeItemAnnotation(aBookmarkId, POST_DATA_ANNO);
- },
-
- /**
- * Get the POST data associated with a bookmark, if any.
- * @param aBookmarkId
- * @returns string of POST data if set for aBookmarkId. null otherwise.
- */
- getPostDataForBookmark: function PU_getPostDataForBookmark(aBookmarkId) {
- const annos = this.annotations;
- if (annos.itemHasAnnotation(aBookmarkId, POST_DATA_ANNO))
- return annos.getItemAnnotation(aBookmarkId, POST_DATA_ANNO);
-
- return null;
- },
-
- /**
- * Get the URI (and any associated POST data) for a given keyword.
- * @param aKeyword string keyword
- * @returns an array containing a string URL and a string of POST data
- */
- getURLAndPostDataForKeyword: function PU_getURLAndPostDataForKeyword(aKeyword) {
- var url = null, postdata = null;
- try {
- var uri = this.bookmarks.getURIForKeyword(aKeyword);
- if (uri) {
- url = uri.spec;
- var bookmarks = this.bookmarks.getBookmarkIdsForURI(uri, {});
- for (let i = 0; i < bookmarks.length; i++) {
- var bookmark = bookmarks[i];
- var kw = this.bookmarks.getKeywordForBookmark(bookmark);
- if (kw == aKeyword) {
- postdata = this.getPostDataForBookmark(bookmark);
- break;
- }
- }
- }
- } catch(ex) {}
- return [url, postdata];
- },
-
- /**
- * Get all bookmarks for a URL, excluding items under tag or livemark
- * containers.
- */
- getBookmarksForURI:
- function PU_getBookmarksForURI(aURI) {
- var bmkIds = this.bookmarks.getBookmarkIdsForURI(aURI, {});
-
- // filter the ids list
- return bmkIds.filter(function(aID) {
- var parent = this.bookmarks.getFolderIdForItem(aID);
- // Livemark child
- if (this.annotations.itemHasAnnotation(parent, LMANNO_FEEDURI))
- return false;
- var grandparent = this.bookmarks.getFolderIdForItem(parent);
- // item under a tag container
- if (grandparent == this.tagsFolderId)
- return false;
- return true;
- }, this);
- },
-
- /**
- * Get the most recently added/modified bookmark for a URL, excluding items
- * under tag or livemark containers. -1 is returned if no item is found.
- */
- getMostRecentBookmarkForURI:
- function PU_getMostRecentBookmarkForURI(aURI) {
- var bmkIds = this.bookmarks.getBookmarkIdsForURI(aURI, {});
- for (var i = 0; i < bmkIds.length; i++) {
- // Find the first folder which isn't a tag container
- var bk = bmkIds[i];
- var parent = this.bookmarks.getFolderIdForItem(bk);
- if (parent == this.unfiledBookmarksFolderId)
- return bk;
-
- var grandparent = this.bookmarks.getFolderIdForItem(parent);
- if (grandparent != this.tagsFolderId &&
- !this.annotations.itemHasAnnotation(parent, LMANNO_FEEDURI))
- return bk;
- }
- return -1;
- },
-
- getMostRecentFolderForFeedURI:
- function PU_getMostRecentFolderForFeedURI(aURI) {
- var feedSpec = aURI.spec
- var annosvc = this.annotations;
- var livemarks = annosvc.getItemsWithAnnotation(LMANNO_FEEDURI, {});
- for (var i = 0; i < livemarks.length; i++) {
- if (annosvc.getItemAnnotation(livemarks[i], LMANNO_FEEDURI) == feedSpec)
- return livemarks[i];
- }
- return -1;
- },
-
- // Returns true if a container has uris in its first level
- // Has better performances than checking getURLsForContainerNode(node).length
- hasChildURIs: function PU_hasChildURIs(aNode) {
- if (!this.nodeIsContainer(aNode))
- return false;
-
- // in the Library left pane we use excludeItems
- if (this.nodeIsFolder(aNode) && asQuery(aNode).queryOptions.excludeItems) {
- var itemId = PlacesUtils.getConcreteItemId(aNode);
- var contents = this.getFolderContents(itemId, false, false).root;
- for (var i = 0; i < contents.childCount; ++i) {
- var child = contents.getChild(i);
- if (this.nodeIsURI(child))
- return true;
- }
- return false;
- }
-
- var wasOpen = aNode.containerOpen;
- if (!wasOpen)
- aNode.containerOpen = true;
- var found = false;
- for (var i = 0; i < aNode.childCount && !found; i++) {
- var child = aNode.getChild(i);
- if (this.nodeIsURI(child))
- found = true;
- }
- if (!wasOpen)
- aNode.containerOpen = false;
- return found;
- },
-
- getURLsForContainerNode: function PU_getURLsForContainerNode(aNode) {
- let urls = [];
- if (this.nodeIsFolder(aNode) && asQuery(aNode).queryOptions.excludeItems) {
- // grab manually
- var itemId = this.getConcreteItemId(aNode);
- let contents = this.getFolderContents(itemId, false, false).root;
- for (let i = 0; i < contents.childCount; ++i) {
- let child = contents.getChild(i);
- if (this.nodeIsURI(child))
- urls.push({uri: child.uri, isBookmark: this.nodeIsBookmark(child)});
- }
- }
- else {
- let result, oldViewer, wasOpen;
- try {
- let wasOpen = aNode.containerOpen;
- result = aNode.parentResult;
- oldViewer = result.viewer;
- if (!wasOpen) {
- result.viewer = null;
- aNode.containerOpen = true;
- }
- for (let i = 0; i < aNode.childCount; ++i) {
- // Include visible url nodes only
- let child = aNode.getChild(i);
- if (this.nodeIsURI(child)) {
- // If the node contents is visible, add the uri only if its node is
- // visible. Otherwise follow viewer's collapseDuplicates property,
- // default to true
- if ((wasOpen && oldViewer && child.viewIndex != -1) ||
- (oldViewer && !oldViewer.collapseDuplicates) ||
- urls.indexOf(child.uri) == -1) {
- urls.push({ uri: child.uri,
- isBookmark: this.nodeIsBookmark(child) });
- }
- }
- }
- if (!wasOpen)
- aNode.containerOpen = false;
- }
- finally {
- if (!wasOpen)
- result.viewer = oldViewer;
- }
- }
-
- return urls;
- },
-
- /**
- * Restores bookmarks/tags from a JSON file.
- * WARNING: This method *removes* any bookmarks in the collection before
- * restoring from the file.
- *
- * @param aFile
- * nsIFile of bookmarks in JSON format to be restored.
- * @param aExcludeItems
- * Array of root item ids (ie: children of the places root)
- * to not delete when restoring.
- */
- restoreBookmarksFromJSONFile:
- function PU_restoreBookmarksFromJSONFile(aFile, aExcludeItems) {
- // open file stream
- var stream = Cc["@mozilla.org/network/file-input-stream;1"].
- createInstance(Ci.nsIFileInputStream);
- stream.init(aFile, 0x01, 0, 0);
- var converted = Cc["@mozilla.org/intl/converter-input-stream;1"].
- createInstance(Ci.nsIConverterInputStream);
- converted.init(stream, "UTF-8", 1024,
- Ci.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER);
-
- // read in contents
- var str = {};
- var jsonStr = "";
- while (converted.readString(4096, str) != 0)
- jsonStr += str.value;
- converted.close();
-
- if (jsonStr.length == 0)
- return; // empty file
-
- this.restoreBookmarksFromJSONString(jsonStr, true, aExcludeItems);
- },
-
- /**
- * Import bookmarks from a JSON string.
- *
- * @param aString
- * JSON string of serialized bookmark data.
- * @param aReplace
- * Boolean if true, replace existing bookmarks, else merge.
- * @param aExcludeItems
- * Array of root item ids (ie: children of the places root)
- * to not delete when restoring.
- */
- restoreBookmarksFromJSONString:
- function PU_restoreBookmarksFromJSONString(aString, aReplace, aExcludeItems) {
- // convert string to JSON
- var nodes = this.unwrapNodes(aString, this.TYPE_X_MOZ_PLACE_CONTAINER);
-
- if (nodes.length == 0 || !nodes[0].children ||
- nodes[0].children.length == 0)
- return; // nothing to restore
-
- // ensure tag folder gets processed last
- nodes[0].children.sort(function sortRoots(aNode, bNode) {
- return (aNode.root && aNode.root == "tagsFolder") ? 1 :
- (bNode.root && bNode.root == "tagsFolder") ? -1 : 0;
- });
-
- var batch = {
- _utils: this,
- nodes: nodes[0].children,
- runBatched: function restore_runBatched() {
- if (aReplace) {
- var excludeItems = aExcludeItems || [];
- // delete existing children of the root node, excepting:
- // 1. special folders: delete the child nodes
- // 2. tags folder: untag via the tagging api
- var query = this._utils.history.getNewQuery();
- query.setFolders([this._utils.placesRootId], 1);
- var options = this._utils.history.getNewQueryOptions();
- options.expandQueries = false;
- var root = this._utils.history.executeQuery(query, options).root;
- root.containerOpen = true;
- var childIds = [];
- for (var i = 0; i < root.childCount; i++) {
- var childId = root.getChild(i).itemId;
- if (excludeItems.indexOf(childId) == -1)
- childIds.push(childId);
- }
- root.containerOpen = false;
-
- for (var i = 0; i < childIds.length; i++) {
- var rootItemId = childIds[i];
- if (rootItemId == this._utils.tagsFolderId) {
- // remove tags via the tagging service
- var tags = this._utils.tagging.allTags;
- var uris = [];
- var bogusTagContainer = false;
- for (let i in tags) {
- var tagURIs = [];
- // skip empty tags since getURIsForTag would throw
- if (tags[i])
- tagURIs = this._utils.tagging.getURIsForTag(tags[i]);
-
- if (!tagURIs.length) {
- // This is a bogus tag container, empty tags should be removed
- // automatically, but this does not work if they contain some
- // not-uri node, so we remove them manually.
- // XXX this is a temporary workaround until we implement
- // preventive database maintainance in bug 431558.
- bogusTagContainer = true;
- }
- for (let j in tagURIs)
- this._utils.tagging.untagURI(tagURIs[j], [tags[i]]);
- }
- if (bogusTagContainer)
- this._utils.bookmarks.removeFolderChildren(rootItemId);
- }
- else if ([this._utils.toolbarFolderId,
- this._utils.unfiledBookmarksFolderId,
- this._utils.bookmarksMenuFolderId].indexOf(rootItemId) != -1)
- this._utils.bookmarks.removeFolderChildren(rootItemId);
- else
- this._utils.bookmarks.removeItem(rootItemId);
- }
- }
-
- var searchIds = [];
- var folderIdMap = [];
-
- this.nodes.forEach(function(node) {
- if (!node.children || node.children.length == 0)
- return; // nothing to restore for this root
-
- if (node.root) {
- var container = this.placesRootId; // default to places root
- switch (node.root) {
- case "bookmarksMenuFolder":
- container = this.bookmarksMenuFolderId;
- break;
- case "tagsFolder":
- container = this.tagsFolderId;
- break;
- case "unfiledBookmarksFolder":
- container = this.unfiledBookmarksFolderId;
- break;
- case "toolbarFolder":
- container = this.toolbarFolderId;
- break;
- }
-
- // insert the data into the db
- node.children.forEach(function(child) {
- var index = child.index;
- var [folders, searches] = this.importJSONNode(child, container, index);
- folderIdMap = folderIdMap.concat(folders);
- searchIds = searchIds.concat(searches);
- }, this);
- }
- else
- this.importJSONNode(node, this.placesRootId, node.index);
-
- }, this._utils);
-
- // fixup imported place: uris that contain folders
- searchIds.forEach(function(aId) {
- var oldURI = this.bookmarks.getBookmarkURI(aId);
- var uri = this._fixupQuery(this.bookmarks.getBookmarkURI(aId),
- folderIdMap);
- if (!uri.equals(oldURI))
- this.bookmarks.changeBookmarkURI(aId, uri);
- }, this._utils);
- }
- };
-
- this.bookmarks.runInBatchMode(batch, null);
- },
-
- /**
- * Takes a JSON-serialized node and inserts it into the db.
- *
- * @param aData
- * The unwrapped data blob of dropped or pasted data.
- * @param aContainer
- * The container the data was dropped or pasted into
- * @param aIndex
- * The index within the container the item was dropped or pasted at
- * @returns an array containing of maps of old folder ids to new folder ids,
- * and an array of saved search ids that need to be fixed up.
- * eg: [[[oldFolder1, newFolder1]], [search1]]
- */
- importJSONNode: function PU_importJSONNode(aData, aContainer, aIndex) {
- var folderIdMap = [];
- var searchIds = [];
- var id = -1;
- switch (aData.type) {
- case this.TYPE_X_MOZ_PLACE_CONTAINER:
- if (aContainer == PlacesUtils.bookmarks.tagsFolder) {
- if (aData.children) {
- aData.children.forEach(function(aChild) {
- try {
- this.tagging.tagURI(this._uri(aChild.uri), [aData.title]);
- } catch (ex) {
- // invalid tag child, skip it
- }
- }, this);
- return [folderIdMap, searchIds];
- }
- }
- else if (aData.livemark && aData.annos) {
- // node is a livemark
- var feedURI = null;
- var siteURI = null;
- aData.annos = aData.annos.filter(function(aAnno) {
- if (aAnno.name == LMANNO_FEEDURI) {
- feedURI = this._uri(aAnno.value);
- return false;
- }
- else if (aAnno.name == LMANNO_SITEURI) {
- siteURI = this._uri(aAnno.value);
- return false;
- }
- return true;
- }, this);
-
- if (feedURI)
- id = this.livemarks.createLivemark(aContainer, aData.title, siteURI, feedURI, aIndex);
- }
- else {
- id = this.bookmarks.createFolder(aContainer, aData.title, aIndex);
- folderIdMap.push([aData.id, id]);
- // process children
- if (aData.children) {
- aData.children.every(function(aChild, aIndex) {
- var [folderIds, searches] = this.importJSONNode(aChild, id, aIndex);
- folderIdMap = folderIdMap.concat(folderIds);
- searchIds = searchIds.concat(searches);
- return true;
- }, this);
- }
- }
- break;
- case this.TYPE_X_MOZ_PLACE:
- id = this.bookmarks.insertBookmark(aContainer, this._uri(aData.uri), aIndex, aData.title);
- if (aData.keyword)
- this.bookmarks.setKeywordForBookmark(id, aData.keyword);
- if (aData.tags) {
- var tags = aData.tags.split(", ");
- if (tags.length)
- this.tagging.tagURI(this._uri(aData.uri), tags);
- }
- if (aData.charset)
- this.history.setCharsetForURI(this._uri(aData.uri), aData.charset);
- if (aData.uri.match(/^place:/))
- searchIds.push(id);
- break;
- case this.TYPE_X_MOZ_PLACE_SEPARATOR:
- id = this.bookmarks.insertSeparator(aContainer, aIndex);
- break;
- default:
- }
-
- // set generic properties
- if (id != -1) {
- this.bookmarks.setItemDateAdded(id, aData.dateAdded);
- this.bookmarks.setItemLastModified(id, aData.lastModified);
- if (aData.annos)
- this.setAnnotationsForItem(id, aData.annos);
- }
-
- return [folderIdMap, searchIds];
- },
-
- /**
- * Replaces imported folder ids with their local counterparts in a place: URI.
- *
- * @param aURI
- * A place: URI with folder ids.
- * @param aFolderIdMap
- * An array mapping old folder id to new folder ids.
- * @returns the fixed up URI if all matched. If some matched, it returns
- * the URI with only the matching folders included. If none matched it
- * returns the input URI unchanged.
- */
- _fixupQuery: function PU__fixupQuery(aQueryURI, aFolderIdMap) {
- var queries = {};
- var options = {};
- this.history.queryStringToQueries(aQueryURI.spec, queries, {}, options);
-
- var fixedQueries = [];
- queries.value.forEach(function(aQuery) {
- var folders = aQuery.getFolders({});
-
- var newFolders = [];
- aFolderIdMap.forEach(function(aMapping) {
- if (folders.indexOf(aMapping[0]) != -1)
- newFolders.push(aMapping[1]);
- });
-
- if (newFolders.length)
- aQuery.setFolders(newFolders, newFolders.length);
- fixedQueries.push(aQuery);
- });
-
- var stringURI = this.history.queriesToQueryString(fixedQueries,
- fixedQueries.length,
- options.value);
- return this._uri(stringURI);
- },
-
- /**
- * Serializes the given node (and all it's descendents) as JSON
- * and writes the serialization to the given output stream.
- *
- * @param aNode
- * An nsINavHistoryResultNode
- * @param aStream
- * An nsIOutputStream. NOTE: it only uses the write(str, len)
- * method of nsIOutputStream. The caller is responsible for
- * closing the stream.
- * @param aIsUICommand
- * Boolean - If true, modifies serialization so that each node self-contained.
- * For Example, tags are serialized inline with each bookmark.
- * @param aResolveShortcuts
- * Converts folder shortcuts into actual folders.
- * @param aExcludeItems
- * An array of item ids that should not be written to the backup.
- */
- serializeNodeAsJSONToOutputStream:
- function PU_serializeNodeAsJSONToOutputStream(aNode, aStream, aIsUICommand,
- aResolveShortcuts,
- aExcludeItems) {
- var self = this;
-
- function addGenericProperties(aPlacesNode, aJSNode) {
- aJSNode.title = aPlacesNode.title;
- var id = aPlacesNode.itemId;
- if (id != -1) {
- aJSNode.id = id;
-
- var parent = aPlacesNode.parent;
- if (parent)
- aJSNode.parent = parent.itemId;
- var dateAdded = aPlacesNode.dateAdded;
- if (dateAdded)
- aJSNode.dateAdded = dateAdded;
- var lastModified = aPlacesNode.lastModified;
- if (lastModified)
- aJSNode.lastModified = lastModified;
-
- // XXX need a hasAnnos api
- var annos = [];
- try {
- annos = self.getAnnotationsForItem(id).filter(function(anno) {
- // XXX should whitelist this instead, w/ a pref for
- // backup/restore of non-whitelisted annos
- // XXX causes JSON encoding errors, so utf-8 encode
- //anno.value = unescape(encodeURIComponent(anno.value));
- if (anno.name == LMANNO_FEEDURI)
- aJSNode.livemark = 1;
- if (anno.name == READ_ONLY_ANNO && aResolveShortcuts) {
- // When copying a read-only node, remove the read-only annotation.
- return false;
- }
- return true;
- });
- } catch(ex) {
- LOG(ex);
- }
- if (annos.length != 0)
- aJSNode.annos = annos;
- }
- // XXXdietrich - store annos for non-bookmark items
- }
-
- function addURIProperties(aPlacesNode, aJSNode) {
- aJSNode.type = self.TYPE_X_MOZ_PLACE;
- aJSNode.uri = aPlacesNode.uri;
- if (aJSNode.id && aJSNode.id != -1) {
- // harvest bookmark-specific properties
- var keyword = self.bookmarks.getKeywordForBookmark(aJSNode.id);
- if (keyword)
- aJSNode.keyword = keyword;
- }
-
- var tags = aIsUICommand ? aPlacesNode.tags : null;
- if (tags)
- aJSNode.tags = tags;
-
- // last character-set
- var uri = self._uri(aPlacesNode.uri);
- var lastCharset = self.history.getCharsetForURI(uri);
- if (lastCharset)
- aJSNode.charset = lastCharset;
- }
-
- function addSeparatorProperties(aPlacesNode, aJSNode) {
- aJSNode.type = self.TYPE_X_MOZ_PLACE_SEPARATOR;
- }
-
- function addContainerProperties(aPlacesNode, aJSNode) {
- // saved queries
- var concreteId = PlacesUtils.getConcreteItemId(aPlacesNode);
- if (aJSNode.id != -1 && (PlacesUtils.nodeIsQuery(aPlacesNode) ||
- (concreteId != aPlacesNode.itemId && !aResolveShortcuts))) {
- aJSNode.type = self.TYPE_X_MOZ_PLACE;
- aJSNode.uri = aPlacesNode.uri;
- // folder shortcut
- if (aIsUICommand)
- aJSNode.concreteId = concreteId;
- return;
- }
- else if (aJSNode.id != -1) { // bookmark folder
- if (concreteId != aPlacesNode.itemId)
- aJSNode.type = self.TYPE_X_MOZ_PLACE;
- aJSNode.type = self.TYPE_X_MOZ_PLACE_CONTAINER;
- // mark special folders
- if (aJSNode.id == self.bookmarks.placesRoot)
- aJSNode.root = "placesRoot";
- else if (aJSNode.id == self.bookmarks.bookmarksMenuFolder)
- aJSNode.root = "bookmarksMenuFolder";
- else if (aJSNode.id == self.bookmarks.tagsFolder)
- aJSNode.root = "tagsFolder";
- else if (aJSNode.id == self.bookmarks.unfiledBookmarksFolder)
- aJSNode.root = "unfiledBookmarksFolder";
- else if (aJSNode.id == self.bookmarks.toolbarFolder)
- aJSNode.root = "toolbarFolder";
- }
- }
-
- function writeScalarNode(aStream, aNode) {
- // serialize to json
- var jstr = self.toJSONString(aNode);
- // write to stream
- aStream.write(jstr, jstr.length);
- }
-
- function writeComplexNode(aStream, aNode, aSourceNode) {
- var escJSONStringRegExp = /(["\\])/g;
- // write prefix
- var properties = [];
- for (let [name, value] in Iterator(aNode)) {
- if (name == "annos")
- value = self.toJSONString(value);
- else if (typeof value == "string")
- value = "\"" + value.replace(escJSONStringRegExp, '\\$1') + "\"";
- properties.push("\"" + name.replace(escJSONStringRegExp, '\\$1') + "\":" + value);
- }
- var jStr = "{" + properties.join(",") + ",\"children\":[";
- aStream.write(jStr, jStr.length);
-
- // write child nodes
- if (!aNode.livemark) {
- asContainer(aSourceNode);
- var wasOpen = aSourceNode.containerOpen;
- if (!wasOpen)
- aSourceNode.containerOpen = true;
- var cc = aSourceNode.childCount;
- for (var i = 0; i < cc; ++i) {
- var childNode = aSourceNode.getChild(i);
- if (aExcludeItems && aExcludeItems.indexOf(childNode.itemId) != -1)
- continue;
- var written = serializeNodeToJSONStream(aSourceNode.getChild(i), i);
- if (written && i < cc - 1)
- aStream.write(",", 1);
- }
- if (!wasOpen)
- aSourceNode.containerOpen = false;
- }
-
- // write suffix
- aStream.write("]}", 2);
- }
-
- function serializeNodeToJSONStream(bNode, aIndex) {
- var node = {};
-
- // set index in order received
- // XXX handy shortcut, but are there cases where we don't want
- // to export using the sorting provided by the query?
- if (aIndex)
- node.index = aIndex;
-
- addGenericProperties(bNode, node);
-
- var parent = bNode.parent;
- var grandParent = parent ? parent.parent : null;
-
- if (self.nodeIsURI(bNode)) {
- // Tag root accept only folder nodes
- if (parent && parent.itemId == self.tagsFolderId)
- return false;
- // Check for url validity, since we can't halt while writing a backup.
- // This will throw if we try to serialize an invalid url and it does
- // not make sense saving a wrong or corrupt uri node.
- try {
- self._uri(bNode.uri);
- } catch (ex) {
- return false;
- }
- addURIProperties(bNode, node);
- }
- else if (self.nodeIsContainer(bNode)) {
- // Tag containers accept only uri nodes
- if (grandParent && grandParent.itemId == self.tagsFolderId)
- return false;
- addContainerProperties(bNode, node);
- }
- else if (self.nodeIsSeparator(bNode)) {
- // Tag root accept only folder nodes
- // Tag containers accept only uri nodes
- if ((parent && parent.itemId == self.tagsFolderId) ||
- (grandParent && grandParent.itemId == self.tagsFolderId))
- return false;
-
- addSeparatorProperties(bNode, node);
- }
-
- if (!node.feedURI && node.type == self.TYPE_X_MOZ_PLACE_CONTAINER)
- writeComplexNode(aStream, node, bNode);
- else
- writeScalarNode(aStream, node);
- return true;
- }
-
- // serialize to stream
- serializeNodeToJSONStream(aNode, null);
- },
-
- /**
- * Serialize a JS object to JSON
- */
- toJSONString: function PU_toJSONString(aObj) {
- var JSON = Cc["@mozilla.org/dom/json;1"].createInstance(Ci.nsIJSON);
- return JSON.encode(aObj);
- },
-
- /**
- * Serializes bookmarks using JSON, and writes to the supplied file.
- */
- backupBookmarksToFile: function PU_backupBookmarksToFile(aFile, aExcludeItems) {
- if (aFile.exists() && !aFile.isWritable())
- return; // XXX
-
- // init stream
- var stream = Cc["@mozilla.org/network/file-output-stream;1"].
- createInstance(Ci.nsIFileOutputStream);
- stream.init(aFile, 0x02 | 0x08 | 0x20, 0600, 0);
-
- // utf-8 converter stream
- var converter = Cc["@mozilla.org/intl/converter-output-stream;1"].
- createInstance(Ci.nsIConverterOutputStream);
- converter.init(stream, "UTF-8", 0, 0x0000);
-
- // weep over stream interface variance
- var streamProxy = {
- converter: converter,
- write: function(aData, aLen) {
- this.converter.writeString(aData);
- }
- };
-
- // query places root
- var options = this.history.getNewQueryOptions();
- options.expandQueries = false;
- var query = this.history.getNewQuery();
- query.setFolders([this.bookmarks.placesRoot], 1);
- var result = this.history.executeQuery(query, options);
- result.root.containerOpen = true;
- // serialize as JSON, write to stream
- this.serializeNodeAsJSONToOutputStream(result.root, streamProxy,
- false, false, aExcludeItems);
- result.root.containerOpen = false;
-
- // close converter and stream
- converter.close();
- stream.close();
- },
-
- /**
- * ArchiveBookmarksFile()
- *
- * Creates a dated backup once a day in /bookmarkbackups.
- * Stores the bookmarks using JSON.
- *
- * @param int aNumberOfBackups - the maximum number of backups to keep
- *
- * @param bool aForceArchive - forces creating an archive even if one was
- * already created that day (overwrites)
- */
- archiveBookmarksFile:
- function PU_archiveBookmarksFile(aNumberOfBackups, aForceArchive) {
- // get/create backups directory
- var dirService = Cc["@mozilla.org/file/directory_service;1"].
- getService(Ci.nsIProperties);
- var bookmarksBackupDir = dirService.get("ProfD", Ci.nsILocalFile);
- bookmarksBackupDir.append("bookmarkbackups");
- if (!bookmarksBackupDir.exists()) {
- bookmarksBackupDir.create(Ci.nsIFile.DIRECTORY_TYPE, 0700);
- if (!bookmarksBackupDir.exists())
- return; // unable to create directory!
- }
-
- // construct the new leafname
- // Use YYYY-MM-DD (ISO 8601) as it doesn't contain illegal characters
- // and makes the alphabetical order of multiple backup files more useful.
- var date = new Date().toLocaleFormat("%Y-%m-%d");
- var backupFilename = this.getFormattedString("bookmarksArchiveFilename", [date]);
-
- var backupFile = null;
- if (!aForceArchive) {
- var backupFileNames = [];
- var backupFilenamePrefix = backupFilename.substr(0, backupFilename.indexOf("-"));
- var entries = bookmarksBackupDir.directoryEntries;
- while (entries.hasMoreElements()) {
- var entry = entries.getNext().QueryInterface(Ci.nsIFile);
- var backupName = entry.leafName;
- if (backupName.substr(0, backupFilenamePrefix.length) == backupFilenamePrefix) {
- if (backupName == backupFilename)
- backupFile = entry;
- backupFileNames.push(backupName);
- }
- }
-
- var numberOfBackupsToDelete = 0;
- if (aNumberOfBackups > -1)
- numberOfBackupsToDelete = backupFileNames.length - aNumberOfBackups;
-
- if (numberOfBackupsToDelete > 0) {
- // If we don't have today's backup, remove one more so that
- // the total backups after this operation does not exceed the
- // number specified in the pref.
- if (!backupFile)
- numberOfBackupsToDelete++;
-
- backupFileNames.sort();
- while (numberOfBackupsToDelete--) {
- let backupFile = bookmarksBackupDir.clone();
- backupFile.append(backupFileNames[0]);
- backupFile.remove(false);
- backupFileNames.shift();
- }
- }
-
- // do nothing if we either have today's backup already
- // or the user has set the pref to zero.
- if (backupFile || aNumberOfBackups == 0)
- return;
- }
-
- backupFile = bookmarksBackupDir.clone();
- backupFile.append(backupFilename);
-
- if (aForceArchive && backupFile.exists())
- backupFile.remove(false);
-
- if (!backupFile.exists())
- backupFile.create(Ci.nsIFile.NORMAL_FILE_TYPE, 0600);
-
- this.backupBookmarksToFile(backupFile);
- },
-
- /**
- * Get the most recent backup file.
- * @returns nsIFile backup file
- */
- getMostRecentBackup: function PU_getMostRecentBackup() {
- var dirService = Cc["@mozilla.org/file/directory_service;1"].
- getService(Ci.nsIProperties);
- var bookmarksBackupDir = dirService.get("ProfD", Ci.nsILocalFile);
- bookmarksBackupDir.append("bookmarkbackups");
- if (!bookmarksBackupDir.exists())
- return null;
-
- var backups = [];
- var entries = bookmarksBackupDir.directoryEntries;
- while (entries.hasMoreElements()) {
- var entry = entries.getNext().QueryInterface(Ci.nsIFile);
- if (!entry.isHidden() && entry.leafName.match(/^bookmarks-.+(html|json)?$/))
- backups.push(entry.leafName);
- }
-
- if (backups.length == 0)
- return null;
-
- backups.sort();
- var filename = backups.pop();
-
- var backupFile = bookmarksBackupDir.clone();
- backupFile.append(filename);
- return backupFile;
- }
-};
diff --git a/XUL-mac/platform.ini b/XUL-mac/platform.ini
deleted file mode 100644
index 8309928e..00000000
--- a/XUL-mac/platform.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[Build]
-BuildID=2008122605
-Milestone=1.9.0.5
diff --git a/XUL-mac/plugins/Default Plugin.plugin/Contents/Info.plist b/XUL-mac/plugins/Default Plugin.plugin/Contents/Info.plist
deleted file mode 100644
index b26c7e93..00000000
--- a/XUL-mac/plugins/Default Plugin.plugin/Contents/Info.plist
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- English
- CFBundleExecutable
- Default Plugin
- CFBundleIdentifier
- com.netscape.DefaultPlugin
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundlePackageType
- NSPL
- CFBundleSignature
- MOSS
- CFBundleVersion
- 1.0
- CSResourcesFileMapped
-
-
-
diff --git a/XUL-mac/plugins/Default Plugin.plugin/Contents/MacOS/Default Plugin b/XUL-mac/plugins/Default Plugin.plugin/Contents/MacOS/Default Plugin
deleted file mode 100644
index 54b1dd2e..00000000
Binary files a/XUL-mac/plugins/Default Plugin.plugin/Contents/MacOS/Default Plugin and /dev/null differ
diff --git a/XUL-mac/plugins/Default Plugin.plugin/Contents/PkgInfo b/XUL-mac/plugins/Default Plugin.plugin/Contents/PkgInfo
deleted file mode 100644
index 8dd85812..00000000
--- a/XUL-mac/plugins/Default Plugin.plugin/Contents/PkgInfo
+++ /dev/null
@@ -1 +0,0 @@
-NSPLMOSS
\ No newline at end of file
diff --git a/XUL-mac/plugins/Default Plugin.plugin/Contents/Resources/Default Plugin.rsrc b/XUL-mac/plugins/Default Plugin.plugin/Contents/Resources/Default Plugin.rsrc
deleted file mode 100644
index f58ec267..00000000
Binary files a/XUL-mac/plugins/Default Plugin.plugin/Contents/Resources/Default Plugin.rsrc and /dev/null differ
diff --git a/XUL-mac/plugins/Default Plugin.plugin/Contents/Resources/English.lproj/InfoPlist.strings b/XUL-mac/plugins/Default Plugin.plugin/Contents/Resources/English.lproj/InfoPlist.strings
deleted file mode 100644
index f8728d8f..00000000
Binary files a/XUL-mac/plugins/Default Plugin.plugin/Contents/Resources/English.lproj/InfoPlist.strings and /dev/null differ
diff --git a/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/Info.plist b/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/Info.plist
deleted file mode 100644
index 23599d87..00000000
--- a/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/Info.plist
+++ /dev/null
@@ -1,32 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- English
- CFBundleExecutable
- JavaEmbeddingPlugin
- CFBundleGetInfoString
- Java Embedding Plugin 0.9.6.4 Copyright (c) 2008 Steven Michaud
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- Java Embedding Plugin
- CFBundlePackageType
- BNDL
- CFBundleShortVersionString
- 0.9.6.4
- CFBundleSignature
- ????
- CFBundleVersion
- 0.9.6.4
- NSJavaNeeded
- YES
- NSJavaPath
-
- JavaEmbeddingPlugin.jar
-
- NSJavaRoot
- Contents/Resources/Java
-
-
diff --git a/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/MacOS/JavaEmbeddingPlugin b/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/MacOS/JavaEmbeddingPlugin
deleted file mode 100644
index 06d6a30f..00000000
Binary files a/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/MacOS/JavaEmbeddingPlugin and /dev/null differ
diff --git a/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/MacOS/JavaEmbeddingPlugin.policy b/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/MacOS/JavaEmbeddingPlugin.policy
deleted file mode 100644
index 177c273c..00000000
--- a/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/MacOS/JavaEmbeddingPlugin.policy
+++ /dev/null
@@ -1,3 +0,0 @@
-grant codeBase "file:${jep.pluginhome}/Contents/Resources/Java/JavaEmbeddingPlugin.jar" {
- permission java.security.AllPermission;
-};
diff --git a/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/PkgInfo b/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/PkgInfo
deleted file mode 100644
index 19a9cf67..00000000
--- a/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/PkgInfo
+++ /dev/null
@@ -1 +0,0 @@
-BNDL????
\ No newline at end of file
diff --git a/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/Resources/English.lproj/InfoPlist.strings b/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/Resources/English.lproj/InfoPlist.strings
deleted file mode 100644
index 1fc1ac8c..00000000
Binary files a/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/Resources/English.lproj/InfoPlist.strings and /dev/null differ
diff --git a/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/Resources/Java/JavaEmbeddingPlugin.jar b/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/Resources/Java/JavaEmbeddingPlugin.jar
deleted file mode 100644
index 17b0128e..00000000
Binary files a/XUL-mac/plugins/JavaEmbeddingPlugin.bundle/Contents/Resources/Java/JavaEmbeddingPlugin.jar and /dev/null differ
diff --git a/XUL-mac/plugins/MRJPlugin.plugin/Contents/Info.plist b/XUL-mac/plugins/MRJPlugin.plugin/Contents/Info.plist
deleted file mode 100644
index fd7c4c04..00000000
--- a/XUL-mac/plugins/MRJPlugin.plugin/Contents/Info.plist
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-
- CFBundleDevelopmentRegion
- English
- CFBundleExecutable
- MRJPlugin
- CFBundleGetInfoString
- MRJ Plugin 1.0-JEP-0.9.6.4, Copyright (c) 2002 The Mozilla Organization
- CFBundleIdentifier
- com.netscape.MRJPlugin
- CFBundleInfoDictionaryVersion
- 6.0
- CFBundleName
- MRJ Plugin
- CFBundlePackageType
- NSPL
- CFBundleShortVersionString
- 1.0-JEP-0.9.6.4
- CFBundleSignature
- MOSS
- CFBundleVersion
- 1.0-JEP-0.9.6.4
- CSResourcesFileMapped
-
-
-
diff --git a/XUL-mac/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin b/XUL-mac/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin
deleted file mode 100644
index 1a1b14c2..00000000
Binary files a/XUL-mac/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin and /dev/null differ
diff --git a/XUL-mac/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin.jar b/XUL-mac/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin.jar
deleted file mode 100644
index fe8f002e..00000000
Binary files a/XUL-mac/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin.jar and /dev/null differ
diff --git a/XUL-mac/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin.policy b/XUL-mac/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin.policy
deleted file mode 100644
index ca8436d8..00000000
--- a/XUL-mac/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin.policy
+++ /dev/null
@@ -1,4 +0,0 @@
-// MRJPlugin.policy
-grant codeBase "file:${netscape.oji.plugin.home}/MRJPlugin.jar" {
- permission java.security.AllPermission;
-};
diff --git a/XUL-mac/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin.properties b/XUL-mac/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin.properties
deleted file mode 100644
index 75dda1b4..00000000
--- a/XUL-mac/plugins/MRJPlugin.plugin/Contents/MacOS/MRJPlugin.properties
+++ /dev/null
@@ -1,4 +0,0 @@
-# MRJPlugin.properties
-netscape.oji.plugin.console.append=false
-netscape.oji.plugin.version=1.0.1
-netscape.oji.plugin.security=com.apple.mrj.JavaEmbedding.JE_AppletSecurity
diff --git a/XUL-mac/plugins/MRJPlugin.plugin/Contents/PkgInfo b/XUL-mac/plugins/MRJPlugin.plugin/Contents/PkgInfo
deleted file mode 100644
index 8dd85812..00000000
--- a/XUL-mac/plugins/MRJPlugin.plugin/Contents/PkgInfo
+++ /dev/null
@@ -1 +0,0 @@
-NSPLMOSS
\ No newline at end of file
diff --git a/XUL-mac/plugins/MRJPlugin.plugin/Contents/Resources/English.lproj/InfoPlist.strings b/XUL-mac/plugins/MRJPlugin.plugin/Contents/Resources/English.lproj/InfoPlist.strings
deleted file mode 100644
index 582b88bf..00000000
Binary files a/XUL-mac/plugins/MRJPlugin.plugin/Contents/Resources/English.lproj/InfoPlist.strings and /dev/null differ
diff --git a/XUL-mac/plugins/MRJPlugin.plugin/Contents/Resources/MRJPlugin.rsrc b/XUL-mac/plugins/MRJPlugin.plugin/Contents/Resources/MRJPlugin.rsrc
deleted file mode 100644
index ea8b8f63..00000000
Binary files a/XUL-mac/plugins/MRJPlugin.plugin/Contents/Resources/MRJPlugin.rsrc and /dev/null differ
diff --git a/XUL-mac/res/EditorOverride.css b/XUL-mac/res/EditorOverride.css
deleted file mode 100644
index 1af76bce..00000000
--- a/XUL-mac/res/EditorOverride.css
+++ /dev/null
@@ -1,363 +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, 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 ***** */
-
-*|* {
- -moz-user-modify: read-write;
-}
-
-/* Styles to alter look of things in the Editor content window
- * that should NOT be removed when we display in completely WYSIWYG
- * "Browser Preview" mode.
- * Anything that should change, like appearance of table borders
- * and Named Anchors, should be placed in EditorContent.css instead of here.
-*/
-
-/* Primary cursor is text I-beam */
-
-::-moz-canvas, a:link {
- cursor: text;
-}
-
-/* Use default arrow over objects with size that
- are selected when clicked on.
- Override the browser's pointer cursor over links
-*/
-
-img, img[usemap], area,
-object, object[usemap],
-applet, hr, button, input, isindex, textarea, select,
-a:link img, a:visited img, a:active img,
-a[name]:-moz-only-whitespace {
- cursor: default;
-}
-
-a:visited, a:active {
- cursor: text;
-}
-
-/* Prevent clicking on links from going to link */
-a:link img, a:visited img {
- -moz-user-input: none;
-}
-
-/* We suppress user/author's prefs for link underline,
- so we must set explicitly. This isn't good!
-*/
-a:link {
- text-decoration: underline -moz-anchor-decoration;
- color: -moz-hyperlinktext;
-}
-
-/* Allow double-clicks on these widgets to open properties dialogs
- XXX except when the widget has disabled attribute */
-input, button, textarea {
- -moz-user-select: all !important;
- -moz-user-input: auto !important;
- -moz-user-focus: none !important;
-}
-
-/* XXX Still need a better way of blocking other events to these widgets */
-select, input[disabled], input[type="checkbox"], input[type="radio"], input[type="file"] {
- -moz-user-select: all !important;
- -moz-user-input: none !important;
- -moz-user-focus: none !important;
-}
-
-isindex[prompt]
-{
- -moz-user-select: none !important;
- -moz-user-input: none !important;
- -moz-user-focus: none !important;
-}
-
-input[type="hidden"] {
- border: 1px solid black !important;
- visibility: visible !important;
-}
-
-label {
- -moz-user-select: all !important;
-}
-
-::-moz-display-comboboxcontrol-frame {
- -moz-user-select: text !important;
-}
-
-option {
- -moz-user-select: text !important;
-}
-
-#mozToc.readonly {
- -moz-user-select: all !important;
- -moz-user-input: none !important;
-}
-
-/* the following rules are for Image Resizing */
-
-span[\_moz_anonclass="mozResizer"] {
- width: 5px;
- height: 5px;
- position: absolute;
- border: 1px black solid;
- background-color: white;
- -moz-user-select: none;
- z-index: 2147483646; /* max value -1 for this property */
-}
-
-/* we can't use :active below */
-span[\_moz_anonclass="mozResizer"][\_moz_activated],
-span[\_moz_anonclass="mozResizer"]:hover {
- background-color: black;
-}
-
-span[\_moz_anonclass="mozResizer"].hidden,
-span[\_moz_anonclass="mozResizingShadow"].hidden,
-img[\_moz_anonclass="mozResizingShadow"].hidden,
-span[\_moz_anonclass="mozGrabber"].hidden,
-span[\_moz_anonclass="mozResizingInfo"].hidden,
-a[\_moz_anonclass="mozTableRemoveRow"].hidden,
-a[\_moz_anonclass="mozTableRemoveColumn"].hidden {
- display: none !important;
-}
-
-span[\_moz_anonclass="mozResizer"][anonlocation="nw"] {
- cursor: nw-resize;
-}
-span[\_moz_anonclass="mozResizer"][anonlocation="n"] {
- cursor: n-resize;
-}
-span[\_moz_anonclass="mozResizer"][anonlocation="ne"] {
- cursor: ne-resize;
-}
-span[\_moz_anonclass="mozResizer"][anonlocation="w"] {
- cursor: w-resize;
-}
-span[\_moz_anonclass="mozResizer"][anonlocation="e"] {
- cursor: e-resize;
-}
-span[\_moz_anonclass="mozResizer"][anonlocation="sw"] {
- cursor: sw-resize;
-}
-span[\_moz_anonclass="mozResizer"][anonlocation="s"] {
- cursor: s-resize;
-}
-span[\_moz_anonclass="mozResizer"][anonlocation="se"] {
- cursor: se-resize;
-}
-
-span[\_moz_anonclass="mozResizingShadow"],
-img[\_moz_anonclass="mozResizingShadow"] {
- outline: thin dashed black;
- -moz-user-select: none;
- opacity: 0.5;
- position: absolute;
- z-index: 2147483647; /* max value for this property */
-}
-
-span[\_moz_anonclass="mozResizingInfo"] {
- font-family: sans-serif;
- font-size: x-small;
- color: black;
- background-color: #d0d0d0;
- border: ridge 2px #d0d0d0;
- padding: 2px;
- position: absolute;
- z-index: 2147483647; /* max value for this property */
-}
-
-img[\_moz_resizing] {
- outline: thin solid black;
-}
-
-*[\_moz_abspos] {
- outline: silver ridge 2px;
- z-index: 2147483645 !important; /* max value -2 for this property */
-}
-*[\_moz_abspos="white"] {
- background-color: white !important;
-}
-*[\_moz_abspos="black"] {
- background-color: black !important;
-}
-
-span[\_moz_anonclass="mozGrabber"] {
- outline: ridge 2px silver;
- padding: 2px;
- position: absolute;
- width: 12px;
- height: 12px;
- background-image: url("resource://gre/res/grabber.gif");
- background-repeat: no-repeat;
- background-position: center center;
- -moz-user-select: none;
- cursor: move;
- z-index: 2147483647; /* max value for this property */
-}
-
-/* INLINE TABLE EDITING */
-
-a[\_moz_anonclass="mozTableAddColumnBefore"] {
- position: absolute;
- z-index: 2147483647; /* max value for this property */
- text-decoration: none !important;
- border: none 0px !important;
- width: 4px;
- height: 8px;
- background-image: url("resource://gre/res/table-add-column-before.gif");
- background-repeat: no-repeat;
- background-position: center center;
- -moz-user-select: none !important;
- -moz-user-focus: none !important;
-}
-
-a[\_moz_anonclass="mozTableAddColumnBefore"]:hover {
- background-image: url("resource://gre/res/table-add-column-before-hover.gif");
-}
-
-a[\_moz_anonclass="mozTableAddColumnBefore"]:active {
- background-image: url("resource://gre/res/table-add-column-before-active.gif");
-}
-
-a[\_moz_anonclass="mozTableAddColumnAfter"] {
- position: absolute;
- z-index: 2147483647; /* max value for this property */
- text-decoration: none !important;
- border: none 0px !important;
- width: 4px;
- height: 8px;
- background-image: url("resource://gre/res/table-add-column-after.gif");
- background-repeat: no-repeat;
- background-position: center center;
- -moz-user-select: none !important;
- -moz-user-focus: none !important;
-}
-
-a[\_moz_anonclass="mozTableAddColumnAfter"]:hover {
- background-image: url("resource://gre/res/table-add-column-after-hover.gif");
-}
-
-a[\_moz_anonclass="mozTableAddColumnAfter"]:active {
- background-image: url("resource://gre/res/table-add-column-after-active.gif");
-}
-
-a[\_moz_anonclass="mozTableRemoveColumn"] {
- position: absolute;
- z-index: 2147483647; /* max value for this property */
- text-decoration: none !important;
- border: none 0px !important;
- width: 8px;
- height: 8px;
- background-image: url("resource://gre/res/table-remove-column.gif");
- background-repeat: no-repeat;
- background-position: center center;
- -moz-user-select: none !important;
- -moz-user-focus: none !important;
-}
-
-a[\_moz_anonclass="mozTableRemoveColumn"]:hover {
- background-image: url("resource://gre/res/table-remove-column-hover.gif");
-}
-
-a[\_moz_anonclass="mozTableRemoveColumn"]:active {
- background-image: url("resource://gre/res/table-remove-column-active.gif");
-}
-
-a[\_moz_anonclass="mozTableAddRowBefore"] {
- position: absolute;
- z-index: 2147483647; /* max value for this property */
- text-decoration: none !important;
- border: none 0px !important;
- width: 8px;
- height: 4px;
- background-image: url("resource://gre/res/table-add-row-before.gif");
- background-repeat: no-repeat;
- background-position: center center;
- -moz-user-select: none !important;
- -moz-user-focus: none !important;
-}
-
-a[\_moz_anonclass="mozTableAddRowBefore"]:hover {
- background-image: url("resource://gre/res/table-add-row-before-hover.gif");
-}
-
-a[\_moz_anonclass="mozTableAddRowBefore"]:active {
- background-image: url("resource://gre/res/table-add-row-before-active.gif");
-}
-
-a[\_moz_anonclass="mozTableAddRowAfter"] {
- position: absolute;
- z-index: 2147483647; /* max value for this property */
- text-decoration: none !important;
- border: none 0px !important;
- width: 8px;
- height: 4px;
- background-image: url("resource://gre/res/table-add-row-after.gif");
- background-repeat: no-repeat;
- background-position: center center;
- -moz-user-select: none !important;
- -moz-user-focus: none !important;
-}
-
-a[\_moz_anonclass="mozTableAddRowAfter"]:hover {
- background-image: url("resource://gre/res/table-add-row-after-hover.gif");
-}
-
-a[\_moz_anonclass="mozTableAddRowAfter"]:active {
- background-image: url("resource://gre/res/table-add-row-after-active.gif");
-}
-
-a[\_moz_anonclass="mozTableRemoveRow"] {
- position: absolute;
- z-index: 2147483647; /* max value for this property */
- text-decoration: none !important;
- border: none 0px !important;
- width: 8px;
- height: 8px;
- background-image: url("resource://gre/res/table-remove-row.gif");
- background-repeat: no-repeat;
- background-position: center center;
- -moz-user-select: none !important;
- -moz-user-focus: none !important;
-}
-
-a[\_moz_anonclass="mozTableRemoveRow"]:hover {
- background-image: url("resource://gre/res/table-remove-row-hover.gif");
-}
-
-a[\_moz_anonclass="mozTableRemoveRow"]:active {
- background-image: url("resource://gre/res/table-remove-row-active.gif");
-}
diff --git a/XUL-mac/res/MainMenu.nib/classes.nib b/XUL-mac/res/MainMenu.nib/classes.nib
deleted file mode 100644
index b9b4b09f..00000000
--- a/XUL-mac/res/MainMenu.nib/classes.nib
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- IBClasses = ({CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; });
- IBVersion = 1;
-}
\ No newline at end of file
diff --git a/XUL-mac/res/MainMenu.nib/info.nib b/XUL-mac/res/MainMenu.nib/info.nib
deleted file mode 100644
index bcf3ace8..00000000
--- a/XUL-mac/res/MainMenu.nib/info.nib
+++ /dev/null
@@ -1,21 +0,0 @@
-
-
-
-
- IBDocumentLocation
- 159 127 356 240 0 0 1920 1178
- IBEditorPositions
-
- 29
- 413 971 130 44 0 0 1920 1178
-
- IBFramework Version
- 443.0
- IBOpenObjects
-
- 29
-
- IBSystem Version
- 8F46
-
-
diff --git a/XUL-mac/res/MainMenu.nib/keyedobjects.nib b/XUL-mac/res/MainMenu.nib/keyedobjects.nib
deleted file mode 100644
index 16b3f7e5..00000000
Binary files a/XUL-mac/res/MainMenu.nib/keyedobjects.nib and /dev/null differ
diff --git a/XUL-mac/res/arrow.gif b/XUL-mac/res/arrow.gif
deleted file mode 100644
index afb46412..00000000
Binary files a/XUL-mac/res/arrow.gif and /dev/null differ
diff --git a/XUL-mac/res/arrowd.gif b/XUL-mac/res/arrowd.gif
deleted file mode 100644
index 02173c70..00000000
Binary files a/XUL-mac/res/arrowd.gif and /dev/null differ
diff --git a/XUL-mac/res/broken-image.gif b/XUL-mac/res/broken-image.gif
deleted file mode 100644
index a070cec2..00000000
Binary files a/XUL-mac/res/broken-image.gif and /dev/null differ
diff --git a/XUL-mac/res/charsetData.properties b/XUL-mac/res/charsetData.properties
deleted file mode 100644
index 853b3fa5..00000000
--- a/XUL-mac/res/charsetData.properties
+++ /dev/null
@@ -1,223 +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 Netscape
-# Communications Corporation. Portions created by Netscape are
-# Copyright (C) 1999 Netscape Communications Corporation. All
-# Rights Reserved.
-#
-# Contributor(s):
-# IBM Corporation
-# Jungshik Shin
-#
-# 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 *****
-
-## Rule of this file:
-## 1. key should always be in lower case ascii so we can do case insensitive
-## comparison in the code faster.
-
-## Format of this file:
-##
-## charset_name.notForBrowser = anything - specifies that this charset is
-## not to be used in the browser
-## charset_name.notForOutgoing = anything - specifies that this charset is
-## not to be used for exporting files ('SaveAsCharset' in composer)
-##
-## charset_name.LangGroup =
-##
-## charset_name.isMultibyte = multi byte charsets
-
-t.61-8bit.notForBrowser = true
-x-imap4-modified-utf7.notForBrowser = true
-windows-936.notForBrowser = true
-us-ascii.notForBrowser = true
-x-obsoleted-euc-jp.notForBrowser = true
-x-obsoleted-iso-2022-jp.notForBrowser = true
-x-obsoleted-shift_jis.notForBrowser = true
-iso-8859-6-e.notForBrowser = true
-iso-8859-6-i.notForBrowser = true
-ibm864i.notForBrowser = true
-ibm869.notForBrowser = true
-ibm1125.notForBrowser = true
-ibm1131.notForBrowser = true
-x-ibm1046.notForBrowser = true
-iso-8859-8-e.notForBrowser = true
-utf-7.notForBrowser = true
-
-t.61-8bit.notForOutgoing = true
-utf-7.notForOutgoing = true
-x-imap4-modified-utf7.notForOutgoing = true
-windows-936.notForOutgoing = true
-us-ascii.notForOutgoing = true
-x-obsoleted-euc-jp.notForOutgoing = true
-x-obsoleted-iso-2022-jp.notForOutgoing = true
-x-obsoleted-shift_jis.notForOutgoing = true
-iso-8859-6-e.notForOutgoing = true
-iso-8859-6-i.notForOutgoing = true
-ibm864i.notForOutgoing = true
-ibm869.notForOutgoing = true
-ibm1125.notForOutgoing = true
-ibm1131.notForOutgoing = true
-x-ibm1046.notForOutgoing = true
-iso-8859-8-e.notForOutgoing = true
-iso-8859-8.notForOutgoing = true
-iso-2022-kr.notForOutgoing = true
-x-windows-949.notForOutgoing = true
-x-johab.notForOutgoing = true
-
-
-// XXX : there are some entries only necessary for Gtk/Xlib builds
-// to map XLFD registry-encoding pairs to langGroups. they can be
-// removed once bug 215537 is fixed.
-adobe-symbol-encoding.LangGroup = el
-armscii-8.LangGroup = x-armn
-big5.LangGroup = zh-TW
-x-x-big5.LangGroup = zh-TW
-big5-hkscs.LangGroup = zh-HK
-euc-jp.LangGroup = ja
-euc-kr.LangGroup = ko
-gb2312.LangGroup = zh-CN
-gb18030.LangGroup = zh-CN
-gb18030.2000-0.LangGroup = zh-CN
-gb18030.2000-1.LangGroup = zh-CN
-geostd8.LangGroup = x-geor
-hkscs-1.LangGroup = zh-HK
-hz-gb-2312.LangGroup = zh-CN
-ibm850.LangGroup = x-western
-ibm852.LangGroup = x-central-euro
-ibm855.LangGroup = x-cyrillic
-ibm857.LangGroup = tr
-ibm862.LangGroup = he
-ibm864.LangGroup = ar
-ibm864i.LangGroup = ar
-ibm866.LangGroup = x-cyrillic
-ibm869.LangGroup = el
-ibm1125.LangGroup = x-cyrillic
-ibm1131.LangGroup = x-cyrillic
-x-ibm1046.LangGroup = ar
-iso-2022-cn.LangGroup = zh-CN
-iso-2022-jp.LangGroup = ja
-iso-2022-kr.LangGroup = ko
-iso-8859-1.LangGroup = x-western
-iso-8859-10.LangGroup = x-western
-iso-8859-14.LangGroup = x-western
-iso-8859-15.LangGroup = x-western
-iso-8859-2.LangGroup = x-central-euro
-iso-8859-16.LangGroup = x-central-euro
-iso-8859-3.LangGroup = x-western
-iso-8859-4.LangGroup = x-baltic
-iso-8859-13.LangGroup = x-baltic
-iso-8859-5.LangGroup = x-cyrillic
-iso-8859-6.LangGroup = ar
-iso-8859-6-e.LangGroup = ar
-iso-8859-6-i.LangGroup = ar
-iso-8859-7.LangGroup = el
-iso-8859-8.LangGroup = he
-iso-8859-8-e.LangGroup = he
-iso-8859-8-i.LangGroup = he
-iso-8859-9.LangGroup = tr
-jis_0208-1983.LangGroup = ja
-koi8-r.LangGroup = x-cyrillic
-koi8-u.LangGroup = x-cyrillic
-iso-ir-111.LangGroup = x-cyrillic
-shift_jis.LangGroup = ja
-tis-620.LangGroup = th
-tis620-2.LangGroup = th
-windows-874.LangGroup = th
-iso-8859-11.LangGroup = th
-x-thaittf-0.LangGroup = th
-us-ascii.LangGroup = x-western
-t.61-8bit.LangGroup = x-western
-utf-8.LangGroup = x-unicode
-utf-16.LangGroup = x-unicode
-utf-16be.LangGroup = x-unicode
-utf-16le.LangGroup = x-unicode
-utf-32.LangGroup = x-unicode
-utf-32be.LangGroup = x-unicode
-utf-32le.LangGroup = x-unicode
-utf-7.LangGroup = x-unicode
-x-imap4-modified-utf7.LangGroup = x-unicode
-viscii.LangGroup = x-western
-x-viet-tcvn5712.LangGroup = x-western
-x-viet-vps.LangGroup = x-western
-windows-1250.LangGroup = x-central-euro
-windows-1251.LangGroup = x-cyrillic
-windows-1252.LangGroup = x-western
-windows-1253.LangGroup = el
-windows-1254.LangGroup = tr
-windows-1255.LangGroup = he
-windows-1256.LangGroup = ar
-windows-1257.LangGroup = x-baltic
-windows-1258.LangGroup = x-western
-windows-936.LangGroup = zh-CN
-x-cns-11643-1.LangGroup = zh-TW
-x-euc-tw.LangGroup = zh-TW
-x-gbk.LangGroup = zh-CN
-gb_2312-80.LangGroup = zh-CN
-x-gbk-noascii.LangGroup = zh-CN
-x-mac-ce.LangGroup = x-central-euro
-x-mac-croatian.LangGroup = x-central-euro
-x-mac-cyrillic.LangGroup = x-cyrillic
-x-mac-devanagari.LangGroup = x-devanagari
-x-mac-farsi.LangGroup = ar
-x-mac-greek.LangGroup = el
-x-mac-gujarati.LangGroup = x-gujr
-x-mac-gurmukhi.LangGroup = x-guru
-x-mac-icelandic.LangGroup = x-western
-x-mac-roman.LangGroup = x-western
-x-mac-turkish.LangGroup = tr
-x-mac-ukrainian.LangGroup = x-cyrillic
-x-mac-romanian.LangGroup = x-central-euro
-x-user-defined.LangGroup = x-user-def
-ks_c_5601-1987.LangGroup = ko
-x-x11johab.LangGroup = ko
-x-johab.LangGroup = ko
-x-johab-noascii.LangGroup = ko
-x-windows-949.LangGroup = ko
-x-koreanjamo-0.LangGroup = ko
-x-mac-hebrew.LangGroup = he
-x-mac-arabic.LangGroup = ar
-x-iso-8859-6-8-x.LangGroup = ar
-x-iso-8859-6-16.LangGroup = ar
-x-sun-unicode-india-0.LangGroup = x-devanagari
-x-tscii.LangGroup = x-tamil
-x-tamilttf-0.LangGroup = x-tamil
-
-iso-2022-jp.isMultibyte = true
-shift_jis.isMultibyte = true
-euc-jp.isMultibyte = true
-big5.isMultibyte = true
-big5-hkscs.isMultibyte = true
-x-euc-tw.isMultibyte = true
-gb2312.isMultibyte = true
-hz-gb-2312.isMultibyte = true
-iso-2022-kr.isMultibyte = true
-euc-kr.isMultibyte = true
-x-johab.isMultibyte = true
-x-windows-949.isMultibyte = true
-utf-7.isMultibyte = true
-utf-8.isMultibyte = true
diff --git a/XUL-mac/res/charsetalias.properties b/XUL-mac/res/charsetalias.properties
deleted file mode 100644
index d35f55d5..00000000
--- a/XUL-mac/res/charsetalias.properties
+++ /dev/null
@@ -1,521 +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
-# Netscape Communications Corporation.
-# Portions created by the Initial Developer are Copyright (C) 1999
-# the Initial Developer. All Rights Reserved.
-#
-# Contributor(s):
-# IBM Corporation
-#
-# 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 *****
-#
-# This Original Code has been modified by IBM Corporation.
-# Modifications made by IBM described herein are
-# Copyright (c) International Business Machines
-# Corporation, 1999
-#
-# Modifications to Mozilla code or documentation
-# identified per MPL Section 3.3
-#
-# Date Modified by Description of modification
-# 12/09/1999 IBM Corp. Support for IBM codepages - 850,852,855,857,862,864
-#
-# Rule of this file:
-# 1. key should always be in lower case ascii so we can do case insensitive
-# comparison in the code faster.
-# 2. value should be the one used in unicode converter
-#
-# 3. If the charset is not used for document charset, but font charset
-# (e.g. XLFD charset- such as JIS x0201, JIS x0208), don't put here
-#
-
-ascii=us-ascii
-us-ascii=us-ascii
-ansi_x3.4-1968=us-ascii
-646=us-ascii
-iso-8859-1=ISO-8859-1
-iso-8859-2=ISO-8859-2
-iso-8859-3=ISO-8859-3
-iso-8859-4=ISO-8859-4
-iso-8859-5=ISO-8859-5
-iso-8859-6=ISO-8859-6
-iso-8859-6-i=ISO-8859-6-I
-iso-8859-6-e=ISO-8859-6-E
-iso-8859-7=ISO-8859-7
-iso-8859-8=ISO-8859-8
-iso-8859-8-i=ISO-8859-8-I
-iso-8859-8-e=ISO-8859-8-E
-iso-8859-9=ISO-8859-9
-iso-8859-10=ISO-8859-10
-iso-8859-11=ISO-8859-11
-iso-8859-13=ISO-8859-13
-iso-8859-14=ISO-8859-14
-iso-8859-15=ISO-8859-15
-iso-8859-16=ISO-8859-16
-iso-ir-111=ISO-IR-111
-iso-2022-cn=ISO-2022-CN
-iso-2022-cn-ext=ISO-2022-CN
-iso-2022-kr=ISO-2022-KR
-iso-2022-jp=ISO-2022-JP
-utf-32be=UTF-32BE
-utf-32le=UTF-32LE
-utf-16be=UTF-16BE
-utf-16le=UTF-16LE
-utf-16=UTF-16
-windows-1250=windows-1250
-windows-1251=windows-1251
-windows-1252=windows-1252
-windows-1253=windows-1253
-windows-1254=windows-1254
-windows-1255=windows-1255
-windows-1256=windows-1256
-windows-1257=windows-1257
-windows-1258=windows-1258
-ibm866=IBM866
-ibm850=IBM850
-ibm852=IBM852
-ibm855=IBM855
-ibm857=IBM857
-ibm862=IBM862
-ibm864=IBM864
-ibm864i=IBM864i
-utf-8=UTF-8
-utf-7=UTF-7
-shift_jis=Shift_JIS
-big5=Big5
-euc-jp=EUC-JP
-euc-kr=EUC-KR
-gb2312=GB2312
-gb18030=gb18030
-viscii=VISCII
-koi8-r=KOI8-R
-koi8-u=KOI8-U
-tis-620=TIS-620
-t.61-8bit=T.61-8bit
-hz-gb-2312=HZ-GB-2312
-big5-hkscs=Big5-HKSCS
-gbk=x-gbk
-cns11643=x-euc-tw
-#
-# Netscape private ...
-#
-x-imap4-modified-utf7=x-imap4-modified-utf7
-x-euc-tw=x-euc-tw
-x-mac-roman=x-mac-roman
-x-mac-ce=x-mac-ce
-x-mac-turkish=x-mac-turkish
-x-mac-greek=x-mac-greek
-x-mac-icelandic=x-mac-icelandic
-x-mac-croatian=x-mac-croatian
-x-mac-romanian=x-mac-romanian
-x-mac-cyrillic=x-mac-cyrillic
-x-mac-ukrainian=x-mac-ukrainian
-x-mac-hebrew=x-mac-hebrew
-x-mac-arabic=x-mac-arabic
-x-mac-farsi=x-mac-farsi
-x-mac-devanagari=x-mac-devanagari
-x-mac-gujarati=x-mac-gujarati
-x-mac-gurmukhi=x-mac-gurmukhi
-geostd8=GEOSTD8
-armscii-8=armscii-8
-x-viet-tcvn5712=x-viet-tcvn5712
-x-viet-vps=x-viet-vps
-x-viet-vni=x-viet-vni
-iso-10646-ucs-2=UTF-16BE
-x-iso-10646-ucs-2-be=UTF-16BE
-x-iso-10646-ucs-2-le=UTF-16LE
-iso-10646-ucs-4=UTF-32BE
-x-iso-10646-ucs-4-be=UTF-32BE
-x-iso-10646-ucs-4-le=UTF-32LE
-x-user-defined=x-user-defined
-x-johab=x-johab
-x-windows-949=x-windows-949
-#
-# Aliases for ISO-8859-1
-#
-latin1=ISO-8859-1
-iso_8859-1=ISO-8859-1
-iso8859-1=ISO-8859-1
-iso8859-2=ISO-8859-2
-iso8859-3=ISO-8859-3
-iso8859-4=ISO-8859-4
-iso8859-5=ISO-8859-5
-iso8859-6=ISO-8859-6
-iso8859-7=ISO-8859-7
-iso8859-8=ISO-8859-8
-iso8859-9=ISO-8859-9
-iso8859-10=ISO-8859-10
-iso8859-11=ISO-8859-11
-iso8859-13=ISO-8859-13
-iso8859-14=ISO-8859-14
-iso8859-15=ISO-8859-15
-# Currently .properties cannot handle : in key
-# iso_8859-1:1987=ISO-8859-1
-iso-ir-100=ISO-8859-1
-l1=ISO-8859-1
-ibm819=ISO-8859-1
-cp819=ISO-8859-1
-csisolatin1=ISO-8859-1
-#
-# Aliases for ISO-8859-2
-#
-latin2=ISO-8859-2
-iso_8859-2=ISO-8859-2
-# Currently .properties cannot handle : in key
-# iso_8859-2:1987=ISO-8859-2
-iso-ir-101=ISO-8859-2
-l2=ISO-8859-2
-csisolatin2=ISO-8859-2
-#
-# Aliases for ISO-8859-3
-#
-latin3=ISO-8859-3
-iso_8859-3=ISO-8859-3
-# Currently .properties cannot handle : in key
-#iso_8859-3:1988=ISO-8859-3
-iso-ir-109=ISO-8859-3
-l3=ISO-8859-3
-csisolatin3=ISO-8859-3
-#
-# Aliases for ISO-8859-4
-#
-latin4=ISO-8859-4
-iso_8859-4=ISO-8859-4
-# Currently .properties cannot handle : in key
-#iso_8859-4:1988=ISO-8859-4
-iso-ir-110=ISO-8859-4
-l4=ISO-8859-4
-csisolatin4=ISO-8859-4
-#
-# Aliases for ISO-8859-5
-#
-cyrillic=ISO-8859-5
-iso_8859-5=ISO-8859-5
-# Currently .properties cannot handle : in key
-#iso_8859-5:1988=ISO-8859-5
-iso-ir-144=ISO-8859-5
-csisolatincyrillic=ISO-8859-5
-#
-# Aliases for ISO-8859-6
-#
-arabic=ISO-8859-6
-iso_8859-6=ISO-8859-6
-# Currently .properties cannot handle : in key
-#iso_8859-6:1987=ISO-8859-6
-iso-ir-127=ISO-8859-6
-ecma-114=ISO-8859-6
-asmo-708=ISO-8859-6
-csisolatinarabic=ISO-8859-6
-#
-# Aliases for ISO-8859-6-I
-#
-csiso88596i=ISO-8859-6-I
-#
-# Aliases for ISO-8859-6-E
-#
-csiso88596e=ISO-8859-6-E
-#
-# Aliases for ISO-8859-7
-#
-greek=ISO-8859-7
-greek8=ISO-8859-7
-sun_eu_greek=ISO-8859-7
-iso_8859-7=ISO-8859-7
-# Currently .properties cannot handle : in key
-#iso_8859-7:1987=ISO-8859-7
-iso-ir-126=ISO-8859-7
-elot_928=ISO-8859-7
-ecma-118=ISO-8859-7
-csisolatingreek=ISO-8859-7
-#
-# Aliases for ISO-8859-8
-#
-hebrew=ISO-8859-8
-iso_8859-8=ISO-8859-8
-visual=ISO-8859-8
-# Currently .properties cannot handle : in key
-#iso_8859-8:1988=ISO-8859-8
-iso-ir-138=ISO-8859-8
-csisolatinhebrew=ISO-8859-8
-#
-# Aliases for ISO-8859-8-I
-#
-csiso88598i=ISO-8859-8-I
-iso-8859-8i=ISO-8859-8-I
-#
-# Aliases for ISO-8859-8-E
-#
-csiso88598e=ISO-8859-8-E
-#
-# Aliases for ISO-8859-9
-#
-latin5=ISO-8859-9
-iso_8859-9=ISO-8859-9
-# Currently .properties cannot handle : in key
-#iso_8859-9:1989=ISO-8859-9
-iso-ir-148=ISO-8859-9
-l5=ISO-8859-9
-csisolatin5=ISO-8859-9
-#
-# Aliases for UTF-8
-#
-unicode-1-1-utf-8=UTF-8
-# nl_langinfo(CODESET) in HP/UX returns 'utf8' under UTF-8 locales
-utf8=UTF-8
-#
-# Aliases for Shift_JIS
-#
-x-sjis=Shift_JIS
-shift-jis=Shift_JIS
-ms_kanji=Shift_JIS
-csshiftjis=Shift_JIS
-windows-31j=Shift_JIS
-#
-# Aliases for EUC_JP
-#
-cseucjpkdfmtjapanese=EUC-JP
-x-euc-jp=EUC-JP
-#
-# Aliases for ISO-2022-JP
-#
-csiso2022jp=ISO-2022-JP
-# The following are really not aliases ISO-2022-JP, but sharing the same decoder
-iso-2022-jp-2=ISO-2022-JP
-csiso2022jp2=ISO-2022-JP
-#
-# Aliases for Big5
-#
-csbig5=Big5
-# x-x-big5 is not really a alias for Big5, add it only for MS FrontPage
-x-x-big5=Big5
-# Sun Solaris
-zh_tw-big5=Big5
-#
-# Aliases for EUC-KR
-#
-csueckr=EUC-KR
-# The following are really not aliases EUC-KR, add them only for MS FrontPage
-#ks_c_5601-1987=EUC-KR
-iso-ir-149=EUC-KR
-ks_c_5601-1989=EUC-KR
-ksc_5601=EUC-KR
-ksc5601=EUC-KR
-korean=EUC-KR
-csksc56011987=EUC-KR
-5601=EUC-KR
-#
-# Aliases for X-Windows-949, CP949, Unified Hangul Code (UHC)
-#
-# Microsoft uses ks_c_5601-1987 to mean Windows-949 or its subset EUC-KR.
-ks_c_5601-1987=x-windows-949
-#
-# Aliases for GB2312
-#
-# The following are really not aliases GB2312, add them only for MS FrontPage
-gb_2312-80=GB2312
-iso-ir-58=GB2312
-chinese=GB2312
-csiso58gb231280=GB2312
-csgb2312=GB2312
-zh_cn.euc=GB2312
-# Sun Solaris
-gb_2312=GB2312
-#
-# Aliases for windows-125x
-#
-x-cp1250=windows-1250
-x-cp1251=windows-1251
-x-cp1252=windows-1252
-x-cp1253=windows-1253
-x-cp1254=windows-1254
-x-cp1255=windows-1255
-x-cp1256=windows-1256
-x-cp1257=windows-1257
-x-cp1258=windows-1258
-#
-# Aliases for windows-874
-#
-windows-874=windows-874
-ibm874=windows-874
-#
-# Aliases for x-mac-roman
-# XXX: should make macintosh the canonical name later
-#
-macintosh=x-mac-roman
-mac=x-mac-roman
-csMacintosh=x-mac-roman
-#
-# Aliases for IBM866
-#
-cp866=IBM866
-cp-866=IBM866
-866=IBM866
-csIBM866=IBM866
-#
-# Aliases for IBM850
-#
-cp850=IBM850
-850=IBM850
-csIBM850=IBM850
-#
-# Aliases for IBM852
-#
-cp852=IBM852
-852=IBM852
-csIBM852=IBM852
-#
-# Aliases for IBM855
-#
-cp855=IBM855
-855=IBM855
-csIBM855=IBM855
-#
-# Aliases for IBM857
-#
-cp857=IBM857
-857=IBM857
-csIBM857=IBM857
-#
-# Aliases for IBM862
-#
-cp862=IBM862
-862=IBM862
-csIBM862=IBM862
-#
-# Aliases for IBM864
-#
-cp864=IBM864
-864=IBM864
-csIBM864=IBM864
-ibm-864=IBM864
-#
-# Aliases for IBM864i
-#
-cp864i=IBM864i
-864i=IBM864i
-csibm864i=IBM864i
-ibm-864i=IBM864i
-#
-# Aliases for T.61-8bit
-#
-t.61=T.61-8bit
-iso-ir-103=T.61-8bit
-csiso103t618bit=T.61-8bit
-#
-# Aliases for UTF-7
-#
-x-unicode-2-0-utf-7=UTF-7
-unicode-2-0-utf-7=UTF-7
-unicode-1-1-utf-7=UTF-7
-csunicode11utf7=UTF-7
-#
-# Aliases for ISO-10646-UCS-2
-#
-csunicode=UTF-16BE
-csunicode11=UTF-16BE
-iso-10646-ucs-basic=UTF-16BE
-csunicodeascii=UTF-16BE
-iso-10646-unicode-latin1=UTF-16BE
-csunicodelatin1=UTF-16BE
-iso-10646=UTF-16BE
-iso-10646-j-1=UTF-16BE
-#
-# Aliases for ISO-8859-10
-#
-latin6=ISO-8859-10
-iso-ir-157=ISO-8859-10
-l6=ISO-8859-10
-# Currently .properties cannot handle : in key
-#iso_8859-10:1992=ISO-8859-10
-csisolatin6=ISO-8859-10
-#
-# Aliases for ISO-8859-15
-#
-iso_8859-15=ISO-8859-15
-#
-# Aliases for ISO-IR-111
-#
-ecma-cyrillic=ISO-IR-111
-csiso111ecmacyrillic=ISO-IR-111
-#
-# Aliases for ISO-2022-KR
-#
-csiso2022kr=ISO-2022-KR
-#
-# Aliases for VISCII
-#
-csviscii=VISCII
-#
-# Aliases for VIQR
-#
-csviqr=VIQR
-#
-# Aliases for x-euc-tw
-#
-zh_tw-euc=x-euc-tw
-#
-# Following names appears in unix nl_langinfo(CODESET)
-# They can be compiled as platform specific if necessary
-# DONT put things here if it does not look generic enough (like hp15CN)
-#
-iso88591=ISO-8859-1
-iso88592=ISO-8859-2
-iso88593=ISO-8859-3
-iso88594=ISO-8859-4
-iso88595=ISO-8859-5
-iso88596=ISO-8859-6
-iso88597=ISO-8859-7
-iso88598=ISO-8859-8
-iso88599=ISO-8859-9
-iso885910=ISO-8859-10
-iso885911=ISO-8859-11
-iso885912=ISO-8859-12
-iso885913=ISO-8859-13
-iso885914=ISO-8859-14
-iso885915=ISO-8859-15
-#
-tis620=TIS-620
-#
-cp1250=windows-1250
-cp1251=windows-1251
-cp1252=windows-1252
-cp1253=windows-1253
-cp1254=windows-1254
-cp1255=windows-1255
-cp1256=windows-1256
-cp1257=windows-1257
-cp1258=windows-1258
-
-# Tempory charset for testing purpose. Should be remove before Beta
-x-obsoleted-shift_jis=x-obsoleted-Shift_JIS
-x-obsoleted-iso-2022-jp=x-obsoleted-ISO-2022-JP
-x-obsoleted-euc-jp=x-obsoleted-EUC-JP
-x-gbk=x-gbk
-windows-936=windows-936
-ansi-1251=windows-1251
diff --git a/XUL-mac/res/contenteditable.css b/XUL-mac/res/contenteditable.css
deleted file mode 100644
index 245f6505..00000000
--- a/XUL-mac/res/contenteditable.css
+++ /dev/null
@@ -1,375 +0,0 @@
-/* -*- Mode: C++; 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
- * Disruptive Innovations.
- * Portions created by the Initial Developer are Copyright (C) 2004
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- * Peter Van der Beken
- *
- * 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 ***** */
-
-::-moz-canvas {
- cursor: text;
-}
-
-:focus:-moz-read-write :-moz-read-only {
- -moz-user-select: all !important;
-}
-
-input:-moz-read-write > .anonymous-div:-moz-read-only,
-textarea:-moz-read-write > .anonymous-div:-moz-read-only {
- -moz-user-select: text !important;
-}
-
-/* Use default arrow over objects with size that
- are selected when clicked on.
- Override the browser's pointer cursor over links
-*/
-
-img:-moz-read-write, img:-moz-read-write[usemap], area:-moz-read-write,
-object:-moz-read-write, object:-moz-read-write[usemap],
-applet:-moz-read-write, hr:-moz-read-write, button:-moz-read-write,
-isindex:-moz-read-write, select:-moz-read-write,
-a:link img, a:visited img, a:active img,
-a[name]:-moz-only-whitespace {
- cursor: default;
-}
-
-:-moz-any-link:-moz-read-write {
- cursor: text;
-}
-
-/* Prevent clicking on links from going to link */
-a:link img, a:visited img {
- -moz-user-input: none;
-}
-
-/* We suppress user/author's prefs for link underline,
- so we must set explicitly. This isn't good!
-*/
-a:link:-moz-read-write {
- text-decoration: underline -moz-anchor-decoration;
- color: -moz-hyperlinktext;
-}
-
-/* Allow double-clicks on these widgets to open properties dialogs
- XXX except when the widget has disabled attribute */
-:-moz-read-write > input:-moz-read-only,
-:-moz-read-write > button:-moz-read-only,
-:-moz-read-write > textarea:-moz-read-only {
- -moz-user-select: all !important;
- -moz-user-input: auto !important;
- -moz-user-focus: none !important;
-}
-
-/* XXX Still need a better way of blocking other events to these widgets */
-select:-moz-read-write,
-:-moz-read-write > input[disabled],
-:-moz-read-write > input[type="checkbox"],
-:-moz-read-write > input[type="radio"],
-:-moz-read-write > input[type="file"],
-input[contenteditable="true"][disabled],
-input[contenteditable="true"][type="checkbox"],
-input[contenteditable="true"][type="radio"],
-input[contenteditable="true"][type="file"] {
- -moz-user-select: all !important;
- -moz-user-input: none !important;
- -moz-user-focus: none !important;
-}
-
-isindex:-moz-read-write[prompt]
-{
- -moz-user-select: none !important;
- -moz-user-input: none !important;
- -moz-user-focus: none !important;
-}
-
-/* emulation of non-standard HTML