|
From: <re...@us...> - 2008-02-27 17:12:26
|
Revision: 434
http://edu2.svn.sourceforge.net/edu2/?rev=434&view=rev
Author: res2002
Date: 2008-02-27 09:12:23 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
Updated OSGK, using latest XULrunner
Modified Paths:
--------------
edu2/OffscreenGecko.dll
edu2/OffscreenGecko.pdb
edu2/xulrunner-win32/AccessibleMarshal.dll
edu2/xulrunner-win32/IA2Marshal.dll
edu2/xulrunner-win32/README.txt
edu2/xulrunner-win32/chrome/classic.jar
edu2/xulrunner-win32/chrome/comm.jar
edu2/xulrunner-win32/chrome/en-US.jar
edu2/xulrunner-win32/chrome/pippki.jar
edu2/xulrunner-win32/chrome/toolkit.jar
edu2/xulrunner-win32/components/FeedProcessor.js
edu2/xulrunner-win32/components/accessibility.xpt
edu2/xulrunner-win32/components/autocomplete.xpt
edu2/xulrunner-win32/components/caps.xpt
edu2/xulrunner-win32/components/content_base.xpt
edu2/xulrunner-win32/components/contentprefs.xpt
edu2/xulrunner-win32/components/docshell_base.xpt
edu2/xulrunner-win32/components/dom_base.xpt
edu2/xulrunner-win32/components/dom_events.xpt
edu2/xulrunner-win32/components/dom_offline.xpt
edu2/xulrunner-win32/components/dom_storage.xpt
edu2/xulrunner-win32/components/dom_svg.xpt
edu2/xulrunner-win32/components/dom_xul.xpt
edu2/xulrunner-win32/components/downloads.xpt
edu2/xulrunner-win32/components/editor.xpt
edu2/xulrunner-win32/components/extensions.xpt
edu2/xulrunner-win32/components/exthandler.xpt
edu2/xulrunner-win32/components/imglib2.xpt
edu2/xulrunner-win32/components/inspector.xpt
edu2/xulrunner-win32/components/loginmgr.xpt
edu2/xulrunner-win32/components/necko.xpt
edu2/xulrunner-win32/components/necko_cache.xpt
edu2/xulrunner-win32/components/necko_dns.xpt
edu2/xulrunner-win32/components/nsBlocklistService.js
edu2/xulrunner-win32/components/nsContentDispatchChooser.js
edu2/xulrunner-win32/components/nsContentPrefService.js
edu2/xulrunner-win32/components/nsDownloadManagerUI.js
edu2/xulrunner-win32/components/nsExtensionManager.js
edu2/xulrunner-win32/components/nsHandlerService.js
edu2/xulrunner-win32/components/nsHelperAppDlg.js
edu2/xulrunner-win32/components/nsLivemarkService.js
edu2/xulrunner-win32/components/nsLoginInfo.js
edu2/xulrunner-win32/components/nsLoginManager.js
edu2/xulrunner-win32/components/nsLoginManagerPrompter.js
edu2/xulrunner-win32/components/nsTaggingService.js
edu2/xulrunner-win32/components/nsURLFormatter.js
edu2/xulrunner-win32/components/nsUpdateService.js
edu2/xulrunner-win32/components/pipnss.xpt
edu2/xulrunner-win32/components/places.xpt
edu2/xulrunner-win32/components/prefetch.xpt
edu2/xulrunner-win32/components/storage-Legacy.js
edu2/xulrunner-win32/components/storage.xpt
edu2/xulrunner-win32/components/txEXSLTRegExFunctions.js
edu2/xulrunner-win32/components/update.xpt
edu2/xulrunner-win32/components/widget.xpt
edu2/xulrunner-win32/components/windowds.xpt
edu2/xulrunner-win32/components/xpcom_io.xpt
edu2/xulrunner-win32/components/xpcom_system.xpt
edu2/xulrunner-win32/components/xpconnect.xpt
edu2/xulrunner-win32/components/xpinstall.xpt
edu2/xulrunner-win32/components/xultmpl.xpt
edu2/xulrunner-win32/crashreporter.exe
edu2/xulrunner-win32/crashreporter.ini
edu2/xulrunner-win32/dependentlibs.list
edu2/xulrunner-win32/dictionaries/en-US.aff
edu2/xulrunner-win32/dictionaries/en-US.dic
edu2/xulrunner-win32/freebl3.chk
edu2/xulrunner-win32/freebl3.dll
edu2/xulrunner-win32/greprefs/all.js
edu2/xulrunner-win32/javaxpcom.jar
edu2/xulrunner-win32/javaxpcomglue.dll
edu2/xulrunner-win32/js3250.dll
edu2/xulrunner-win32/modules/Microformats.js
edu2/xulrunner-win32/mozctl.dll
edu2/xulrunner-win32/mozctlx.dll
edu2/xulrunner-win32/nspr4.dll
edu2/xulrunner-win32/nss3.dll
edu2/xulrunner-win32/nssckbi.dll
edu2/xulrunner-win32/nssdbm3.dll
edu2/xulrunner-win32/platform.ini
edu2/xulrunner-win32/plc4.dll
edu2/xulrunner-win32/plds4.dll
edu2/xulrunner-win32/plugins/npnul32.dll
edu2/xulrunner-win32/res/arrow.gif
edu2/xulrunner-win32/res/arrowd.gif
edu2/xulrunner-win32/res/dtd/mathml.dtd
edu2/xulrunner-win32/res/entityTables/mathml20.properties
edu2/xulrunner-win32/res/fonts/mathfont.properties
edu2/xulrunner-win32/res/fonts/mathfontSTIXNonUnicode.properties
edu2/xulrunner-win32/res/forms.css
edu2/xulrunner-win32/res/html.css
edu2/xulrunner-win32/res/language.properties
edu2/xulrunner-win32/res/mathml.css
edu2/xulrunner-win32/res/table-add-column-after-active.gif
edu2/xulrunner-win32/res/table-add-column-before-active.gif
edu2/xulrunner-win32/res/table-add-row-after-active.gif
edu2/xulrunner-win32/res/table-add-row-before-active.gif
edu2/xulrunner-win32/smime3.dll
edu2/xulrunner-win32/softokn3.chk
edu2/xulrunner-win32/softokn3.dll
edu2/xulrunner-win32/sqlite3.dll
edu2/xulrunner-win32/ssl3.dll
edu2/xulrunner-win32/updater.exe
edu2/xulrunner-win32/xpcom.dll
edu2/xulrunner-win32/xpidl.exe
edu2/xulrunner-win32/xpt_dump.exe
edu2/xulrunner-win32/xpt_link.exe
edu2/xulrunner-win32/xul.dll
edu2/xulrunner-win32/xulrunner-stub.exe
edu2/xulrunner-win32/xulrunner.exe
Added Paths:
-----------
edu2/xulrunner-win32/components/dom_json.xpt
edu2/xulrunner-win32/components/nsAddonRepository.js
edu2/xulrunner-win32/modules/DownloadUtils.jsm
edu2/xulrunner-win32/modules/PluralForm.jsm
edu2/xulrunner-win32/nssutil3.dll
edu2/xulrunner-win32/xpcshell.exe
Modified: edu2/OffscreenGecko.dll
===================================================================
(Binary files differ)
Modified: edu2/OffscreenGecko.pdb
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/AccessibleMarshal.dll
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/IA2Marshal.dll
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/README.txt
===================================================================
--- edu2/xulrunner-win32/README.txt 2008-02-27 16:39:23 UTC (rev 433)
+++ edu2/xulrunner-win32/README.txt 2008-02-27 17:12:23 UTC (rev 434)
@@ -1,306 +1,20 @@
-==============================================================
+For information on how to build Mozilla from the source code, see:
-= = = = = = = = = = Mozilla Read Me = = = = = = = = = = =
+ http://developer.mozilla.org/en/docs/Build_Documentation
-==============================================================
+To have your bug fix / feature added to Mozilla, you should create a patch and
+submit it to Bugzilla (http://bugzilla.mozilla.org). Instructions are at:
-Mozilla is subject to the terms detailed in the license
-agreement accompanying it.
+ http://developer.mozilla.org/en/docs/Creating_a_patch
+ http://developer.mozilla.org/en/docs/Getting_your_patch_in_the_tree
-This Read Me file contains information about system
-requirements and installation instructions for the Windows,
-Mac OS, and Linux builds of Mozilla.
+If you have a question about developing Mozilla, and can't find the solution
+on http://developer.mozilla.org, you can try asking your question in a
+mozilla.* Usenet group, or on IRC at irc.mozilla.org. [The Mozilla news groups
+are accessible on Google Groups, or news.mozilla.org with a NNTP reader.]
-For more info on Mozilla, see www.mozilla.org. To submit bugs
-or other feedback, see the Navigator QA menu and check out
-Bugzilla at http://bugzilla.mozilla.org for links to known
-bugs, bug-writing guidelines, and more. You can also get help
-with Bugzilla by pointing your IRC client to #mozillazine
-at irc.mozilla.org.
+You can download nightly development builds from the the Mozilla FTP server.
+Keep in mind that nightly builds, which are used by Mozilla developers for
+testing, may be buggy. Firefox nightlies, for example, can be found at:
-
-==============================================================
-
- Getting Mozilla
-
-==============================================================
-
-You can download nightly builds of Mozilla from the
-Mozilla.org FTP site at
-
- ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/
-
-For the very latest builds, see
-
- ftp://ftp.mozilla.org/pub/mozilla.org/mozilla/nightly/latest-trunk
-
-Keep in mind that nightly builds, which are used by
-Mozilla.org developers for testing, may be buggy. If you are
-looking for a more polished version of Mozilla, Mozilla.org
-releases Milestone builds of Mozilla every six weeks or so
-that you can download from
-
- http://www.mozilla.org/releases
-
-Be sure to read the Mozilla release notes for information
-on known problems and installation issues with Mozilla.
-The release notes can be found at the preceding URL along
-with the milestone releases themselves.
-
-Note: Please use Talkback builds whenever possible. These
-builds allow transmission of crash data back to Mozilla
-developers, improved crash analysis, and posting of crash
-information to our crash-data newsgroup.
-
-
-==============================================================
-
- System Requirements
-
-==============================================================
-
-*All Platforms
-
- To view and use the new streamlined "Modern" theme,
- your display monitor should be set to display
- thousands of colors. For users who cannot set their
- displays to use more than 256 colors, Mozilla.org
- recommends using the "Classic" theme for Mozilla.
-
- To select the Modern theme after you have installed
- Mozilla, from the Navigator browser, open the View
- menu, and then open then open the Apply Theme submenu
- and choose Modern.
-
-*Mac OS
-
- -Mac OS X or later
- -PowerPC processor (266 MHz or faster recommended)
- -64 MB RAM
- -36 MB of free hard disk space
-
-*Windows
-
- -Windows 95, 98, Me, NT4, 2000 or XP
- -Intel Pentium class processor (233 MHz or faster
- recommended)
- -64 MB RAM
- -26 MB free hard disk space
-
-*Linux
-
- -The following library versions (or compatible) are
- required: glibc 2.1, XFree86 3.3.x, GTK 1.2.x, Glib
- 1.2.x, Libstdc++ 2.9.0. Red Hat Linux 6.0,
- Debian 2.1, and SuSE 6.2 (or later) installations
- should work.
- -Red Hat 6.x users who want to install the Mozilla
- RPM must have at least version 4.0.2 of rpm
- installed.
- -Intel Pentium class processor (233 MHz or faster
- recommended)
- -64MB RAM
- -26MB free hard disk space
-
-
-==============================================================
-
- Installation Instructions
-
-==============================================================
-
-For Mac OS and Windows users, it is strongly recommended that
-you exit all programs before running the setup program. Also,
-you should temporarily disable virus-detection software.
-
-For Linux users, note that the installation instructions use
-the bash shell. If you're not using bash, adjust the commands
-accordingly.
-
-For all platforms, install into a clean (new) directory.
-Installing on top of previously released builds may cause
-problems.
-
-Note: These instructions do not tell you how to build Mozilla.
-For info on building the Mozilla source, see
-
- http://www.mozilla.org/source.html
-
-
-Windows Installation Instructions
----------------------------------
-
-Note: For Windows NT/2000/XP systems, you need Administrator
-privileges to install Mozilla. If you see an "Error 5" message
-during installation, make sure you're running the installation
-with Administrator privileges.
-
-
- To install Mozilla by downloading the Mozilla installer,
- follow these steps:
-
- 1. Click the the mozilla-win32-installer.exe link on
- the site you're downloading Mozilla from to download
- the installer file to your machine.
-
- 2. Navigate to where you downloaded the file and
- double-click the Mozilla program icon on your machine
- to begin the Setup program.
-
- 3. Follow the on-screen instructions in the setup
- program. The program starts automatically the first
- time.
-
-
- To install Mozilla by downloading the .zip file and
- installing manually, follow these steps:
-
- 1. Click the mozilla-win32-talkback.zip link or the
- mozilla-win32.zip link on the site you're down-
- loading Mozilla from to download the .zip file to
- your machine.
-
- 2. Navigate to where you downloaded the file and
- double-click the compressed file.
-
- Note: This step assumes you already have a recent
- version of WinZip installed, and that you know how to
- use it. If not, you can get WinZip and information
- about the program at www.winzip.com.
-
- 3. Extract the .zip file to a directory such as
- C:\Program Files\mozilla.org\Mozilla.
-
- 4. To start Mozilla, navigate to the directory you
- extracted Mozilla to and double-click the Mozilla.exe
- icon.
-
-
-Mac OS X Installation Instructions
-----------------------------------
-
- To install Mozilla by downloading the Mozilla disk image,
- follow these steps:
-
- 1. Click the mozilla-mac-MachO.dmg.gz link to download
- it to your machine. By default, the download file is
- downloaded to your desktop.
-
- 2. Once you have downloaded the .dmg.gz file, drag it
- onto Stuffit Expander to decompress it. If the disk
- image doesn't mount automatically, double-click on the
- .dmg file to mount it. If that fails, and the file
- does not look like a disk image file, do a "Show Info"
- on the file, and, in the "Open with application"
- category, choose Disk Copy. In Mac OS 10.2, you can
- use "Open with" from the context menu.
-
- 3. Once the disk image mounts, open it, and drag the
- Mozilla icon onto your hard disk.
-
- 4. We recommend that you copy it to the Applications
- folder.
-
- 5. Now Eject the disk image.
-
- 6. If you like, you can drag Mozilla to your dock to
- have it easily accessible at all times. You might also
- wish to select Mozilla as your default browser in the
- Internet system preferences pane (under the Web tab).
-
-
-Linux Installation Instructions
--------------------------------
-
-Note: If you install in the default directory (which is
-usually /usr/local/mozilla), or any other directory where
-only the root user normally has write-access, you must
-start Mozilla first as root before other users can start
-the program. Doing so generates a set of files required
-for later use by other users.
-
-
- To install Mozilla by downloading the Mozilla installer,
- follow these steps:
-
- 1. Create a directory named mozilla (mkdir mozilla)
- and change to that directory (cd mozilla).
-
- 2. Click the link on the site you're downloading
- Mozilla from to download the installer file
- (called mozilla-1686-pc-linux-gnu-installer.tar.gz)
- to your machine.
-
- 3. Change to the mozilla directory (cd mozilla) and
- decompress the archive with the following command:
-
- tar zxvf moz*.tar.gz
-
- The installer is now located in a subdirectory of
- Mozilla named mozilla-installer.
-
- 4. Change to the mozilla-installer directory
- (cd mozilla-installer) and run the installer with the
- ./mozilla-installer command.
-
- 5. Follow the instructions in the install wizard for
- installing Mozilla.
-
- Note: If you have a slower machine, be aware that the
- installation may take some time. In this case, the
- installation progress may appear to hang indefinitely,
- even though the installation is still in process.
-
- 6. To start Mozilla, change to the directory where you
- installed it and run the ./mozilla command.
-
-
- To install Mozilla by downloading the tar.gz file:
-
- 1. Create a directory named "mozilla" (mkdir mozilla)
- and change to that directory (cd mozilla).
-
- 2. Click the link on the site you're downloading
- Mozilla from to download the non-installer
- (mozilla*.tar.gz) file into the mozilla directory.
-
- 3. Change to the mozilla directory (cd mozilla) and
- decompress the file with the following command:
-
- tar zxvf moz*.tar.gz
-
- This creates a "mozilla" directory under your mozilla
- directory.
-
- 4. Change to the mozilla directory (cd mozilla).
-
- 5. Run Mozilla with the following run script:
-
- ./mozilla
-
-
- To hook up Mozilla complete with icon to the GNOME Panel,
- follow these steps:
-
- 1. Click the GNOME Main Menu button, open the Panel menu,
- and then open the Add to Panel submenu and choose Launcher.
-
- 2. Right-click the icon for Mozilla on the Panel and
- enter the following command:
- directory_name./mozilla
-
- where directory_name is the name of the directory
- you downloaded mozilla to. For example, the default
- directory that Mozilla suggests is /usr/local/mozilla.
-
- 3. Type in a name for the icon, and type in a comment
- if you wish.
-
- 4. Click the icon button and type in the following as
- the icon's location:
-
- directory_name/icons/mozicon50.xpm
-
- where directory name is the directory where you
- installed Mozilla. For example, the default directory
- is /usr/local/mozilla/icons/mozicon50.xpm.
+ ftp://ftp.mozilla.org/pub/firefox/nightly/latest-trunk/
Modified: edu2/xulrunner-win32/chrome/classic.jar
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/chrome/comm.jar
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/chrome/en-US.jar
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/chrome/pippki.jar
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/chrome/toolkit.jar
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/FeedProcessor.js
===================================================================
--- edu2/xulrunner-win32/components/FeedProcessor.js 2008-02-27 16:39:23 UTC (rev 433)
+++ edu2/xulrunner-win32/components/FeedProcessor.js 2008-02-27 17:12:23 UTC (rev 434)
@@ -22,6 +22,7 @@
* Ben Goodger <be...@go...>
* Myk Melez <my...@mo...>
* Michael Ventnor <m.v...@gm...>
+ * Will Guaraldi <wil...@pc...>
*
* 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
@@ -220,7 +221,9 @@
"http://my.netscape.com/rdf/simple/0.9/":"rss1",
"http://wellformedweb.org/CommentAPI/":"wfw",
"http://purl.org/rss/1.0/modules/wiki/":"wiki",
- "http://www.w3.org/XML/1998/namespace":"xml"
+ "http://www.w3.org/XML/1998/namespace":"xml",
+ "http://search.yahoo.com/mrss/":"media",
+ "http://search.yahoo.com/mrss":"media"
}
// We allow a very small set of namespaces in XHTML content,
@@ -264,6 +267,8 @@
this.authors = Cc[ARRAY_CONTRACTID].createInstance(Ci.nsIMutableArray);
this.contributors = Cc[ARRAY_CONTRACTID].createInstance(Ci.nsIMutableArray);
this.baseURI = null;
+ this.enclosureCount = 0;
+ this.type = Ci.nsIFeed.TYPE_FEED;
}
Feed.prototype = {
@@ -303,6 +308,8 @@
if (bagHasKey(this.fields, "links"))
this._atomLinksToURI();
+ this._calcEnclosureCountAndFeedType();
+
// Resolve relative image links
if (this.image && bagHasKey(this.image, "url"))
this._resolveImageLink();
@@ -311,6 +318,67 @@
this.searchLists.title]);
},
+ _calcEnclosureCountAndFeedType: function Feed_calcEnclosureCountAndFeedType() {
+ var entries_with_enclosures = 0;
+ var audio_count = 0;
+ var image_count = 0;
+ var video_count = 0;
+ var other_count = 0;
+
+ for (var i = 0; i < this.items.length; ++i) {
+ var entry = this.items.queryElementAt(i, Ci.nsIFeedEntry);
+ entry.QueryInterface(Ci.nsIFeedContainer);
+
+ if (entry.enclosures && entry.enclosures.length > 0) {
+ ++entries_with_enclosures;
+
+ for (var e = 0; e < entry.enclosures.length; ++e) {
+ var enc = entry.enclosures.queryElementAt(e, Ci.nsIWritablePropertyBag2);
+ if (enc.hasKey("type")) {
+ var enctype = enc.get("type");
+
+ if (/^audio/.test(enctype)) {
+ ++audio_count;
+ } else if (/^image/.test(enctype)) {
+ ++image_count;
+ } else if (/^video/.test(enctype)) {
+ ++video_count;
+ } else {
+ ++other_count;
+ }
+ } else {
+ ++other_count;
+ }
+ }
+ }
+ }
+
+ var feedtype = Ci.nsIFeed.TYPE_FEED;
+
+ // For a feed to be marked as TYPE_VIDEO, TYPE_AUDIO and TYPE_IMAGE,
+ // we enforce two things:
+ //
+ // 1. all entries must have at least one enclosure
+ // 2. all enclosures must be video for TYPE_VIDEO, audio for TYPE_AUDIO or image
+ // for TYPE_IMAGE
+ //
+ // Otherwise it's a TYPE_FEED.
+ if (entries_with_enclosures == this.items.length && other_count == 0) {
+ if (audio_count > 0 && !video_count && !image_count) {
+ feedtype = Ci.nsIFeed.TYPE_AUDIO;
+
+ } else if (image_count > 0 && !audio_count && !video_count) {
+ feedtype = Ci.nsIFeed.TYPE_IMAGE;
+
+ } else if (video_count > 0 && !audio_count && !image_count) {
+ feedtype = Ci.nsIFeed.TYPE_VIDEO;
+ }
+ }
+
+ this.type = feedtype;
+ this.enclosureCount = other_count + video_count + audio_count + image_count;
+ },
+
_atomLinksToURI: function Feed_linkToURI() {
var links = this.fields.getPropertyAsInterface("links", Ci.nsIArray);
var alternates = findAtomLinks("alternate", links);
@@ -396,7 +464,7 @@
"atom03:summary", "atom:summary"],
content: ["content:encoded","atom03:content","atom:content"],
rights: ["atom03:rights","atom:rights"],
- published: ["atom03:issued", "dcterms:issued", "atom:published"],
+ published: ["pubDate", "atom03:issued", "dcterms:issued", "atom:published"],
updated: ["pubDate", "atom03:modified", "dc:date", "dcterms:modified",
"atom:updated"]
},
@@ -407,7 +475,10 @@
// Assign Atom link if needed
if (bagHasKey(this.fields, "links"))
this._atomLinksToURI();
-
+
+ // Populate enclosures array
+ this._populateEnclosures();
+
// The link might be a guid w/ permalink=true
if (!this.link && bagHasKey(this.fields, "guid")) {
var guid = this.fields.getProperty("guid");
@@ -430,6 +501,133 @@
this.searchLists.title]);
},
+ _populateEnclosures: function Entry_populateEnclosures() {
+ if (bagHasKey(this.fields, "links"))
+ this._atomLinksToEnclosures();
+
+ // Add RSS2 enclosure to enclosures
+ if (bagHasKey(this.fields, "enclosure"))
+ this._enclosureToEnclosures();
+
+ // Add media:content to enclosures
+ if (bagHasKey(this.fields, "mediacontent"))
+ this._mediacontentToEnclosures();
+
+ // Add media:content in media:group to enclosures
+ if (bagHasKey(this.fields, "mediagroup"))
+ this._mediagroupToEnclosures();
+ },
+
+ __enclosure_map: null,
+
+ _addToEnclosures: function Entry_addToEnclosures(new_enc) {
+ if (!bagHasKey(new_enc, "url"))
+ return;
+
+ if (this.__enclosure_map == null)
+ this.__enclosure_map = {};
+
+ var previous_enc = this.__enclosure_map[new_enc.getPropertyAsAString("url")];
+
+ if (previous_enc != undefined) {
+ previous_enc.QueryInterface(Ci.nsIWritablePropertyBag2);
+
+ if (!bagHasKey(previous_enc, "type") && bagHasKey(new_enc, "type"))
+ previous_enc.setPropertyAsAString("type", new_enc.getPropertyAsAString("type"));
+
+ if (!bagHasKey(previous_enc, "length") && bagHasKey(new_enc, "length"))
+ previous_enc.setPropertyAsAString("length", new_enc.getPropertyAsAString("length"));
+
+ return;
+ }
+
+ if (this.enclosures == null) {
+ this.enclosures = Cc[ARRAY_CONTRACTID].createInstance(Ci.nsIMutableArray);
+ this.enclosures.QueryInterface(Ci.nsIMutableArray);
+ }
+
+ this.enclosures.appendElement(new_enc, false);
+ this.__enclosure_map[new_enc.getPropertyAsAString("url")] = new_enc;
+ },
+
+ _atomLinksToEnclosures: function Entry_linkToEnclosure() {
+ var links = this.fields.getPropertyAsInterface("links", Ci.nsIArray);
+ var enc_links = findAtomLinks("enclosure", links);
+ if (enc_links.length == 0)
+ return;
+
+ for (var i = 0; i < enc_links.length; ++i) {
+ var link = enc_links[i];
+
+ // an enclosure must have an href
+ if (!(link.getProperty("href")))
+ return;
+
+ var enc = Cc[BAG_CONTRACTID].createInstance(Ci.nsIWritablePropertyBag2);
+
+ // copy Atom bits over to equivalent enclosure bits
+ enc.setPropertyAsAString("url", link.getPropertyAsAString("href"));
+ if (bagHasKey(link, "type"))
+ enc.setPropertyAsAString("type", link.getPropertyAsAString("type"));
+ if (bagHasKey(link, "length"))
+ enc.setPropertyAsAString("length", link.getPropertyAsAString("length"));
+
+ this._addToEnclosures(enc);
+ }
+ },
+
+ _enclosureToEnclosures: function Entry_enclosureToEnclosures() {
+ var enc = this.fields.getPropertyAsInterface("enclosure", Ci.nsIPropertyBag2);
+
+ if (!(enc.getProperty("url")))
+ return;
+
+ this._addToEnclosures(enc);
+ },
+
+ _mediacontentToEnclosures: function Entry_mediacontentToEnclosures() {
+ var mc = this.fields.getPropertyAsInterface("mediacontent", Ci.nsIPropertyBag2);
+
+ if (!(mc.getProperty("url")))
+ return;
+
+ var enc = Cc[BAG_CONTRACTID].createInstance(Ci.nsIWritablePropertyBag2);
+
+ enc.setPropertyAsAString("url", mc.getPropertyAsAString("url"));
+ if (bagHasKey(mc, "fileSize"))
+ enc.setPropertyAsAString("length", mc.getPropertyAsAString("fileSize"));
+ if (bagHasKey(mc, "type"))
+ enc.setPropertyAsAString("type", mc.getPropertyAsAString("type"));
+
+ this._addToEnclosures(enc);
+ },
+
+ _mediagroupToEnclosures: function Entry_mediagroupToEnclosures() {
+ var group = this.fields.getPropertyAsInterface("mediagroup", Ci.nsIPropertyBag2);
+
+ var content = group.getPropertyAsInterface("mediacontent", Ci.nsIArray);
+ for (var i = 0; i < content.length; ++i) {
+ var contentElement = content.queryElementAt(i, Ci.nsIWritablePropertyBag2);
+ // media:content don't require url, but if it's not there, we should
+ // skip it.
+ if (!bagHasKey(contentElement, "url"))
+ continue;
+
+ var enc = Cc[BAG_CONTRACTID].createInstance(Ci.nsIWritablePropertyBag2);
+
+ // copy media:content bits over to equivalent enclosure bits
+ enc.setPropertyAsAString("url", contentElement.getPropertyAsAString("url"));
+ if (bagHasKey(contentElement, "type")) {
+ enc.setPropertyAsAString("type", contentElement.getPropertyAsAString("type"));
+ }
+ if (bagHasKey(contentElement, "fileSize")) {
+ enc.setPropertyAsAString("length", contentElement.getPropertyAsAString("fileSize"));
+ }
+
+ this._addToEnclosures(enc);
+ }
+ },
+
// XPCOM stuff
classDescription: ENTRY_CLASSNAME,
classID: ENTRY_CLASSID,
@@ -1063,7 +1261,9 @@
"dc:contributor": new ElementInfo("contributors", Cc[PERSON_CONTRACTID],
rssAuthor, true),
"category": new ElementInfo("categories", null, rssCatTerm, true),
- "enclosure": new ElementInfo("enclosure", null, null, true),
+ "enclosure": new ElementInfo("enclosure", null, null, false),
+ "media:content": new ElementInfo("mediacontent", null, null, false),
+ "media:group": new ElementInfo("mediagroup", null, null, false),
"guid": new ElementInfo("guid", null, rssGuid, false)
},
@@ -1075,6 +1275,10 @@
"hour": new ElementInfo("hours", null, rssArrayElement, true)
},
+ "IN_MEDIAGROUP": {
+ "media:content": new ElementInfo("mediacontent", null, null, true)
+ },
+
/********* RSS1 **********/
"IN_RDF": {
// If we hit a rss1:channel, we can verify that we have RSS1
Modified: edu2/xulrunner-win32/components/accessibility.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/autocomplete.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/caps.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/content_base.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/contentprefs.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/docshell_base.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/dom_base.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/dom_events.xpt
===================================================================
(Binary files differ)
Added: edu2/xulrunner-win32/components/dom_json.xpt
===================================================================
(Binary files differ)
Property changes on: edu2/xulrunner-win32/components/dom_json.xpt
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: edu2/xulrunner-win32/components/dom_offline.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/dom_storage.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/dom_svg.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/dom_xul.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/downloads.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/editor.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/extensions.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/exthandler.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/imglib2.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/inspector.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/loginmgr.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/necko.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/necko_cache.xpt
===================================================================
(Binary files differ)
Modified: edu2/xulrunner-win32/components/necko_dns.xpt
===================================================================
(Binary files differ)
Added: edu2/xulrunner-win32/components/nsAddonRepository.js
===================================================================
--- edu2/xulrunner-win32/components/nsAddonRepository.js (rev 0)
+++ edu2/xulrunner-win32/components/nsAddonRepository.js 2008-02-27 17:12:23 UTC (rev 434)
@@ -0,0 +1,333 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/*
+//@line 38 "e:\builds\tinderbox\XR-Trunk\WINNT_5.2_Depend\mozilla\toolkit\mozapps\extensions\src\nsAddonRepository.js"
+*/
+
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+const Cr = Components.results;
+
+Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
+
+const PREF_GETADDONS_BROWSEADDONS = "extensions.getAddons.browseAddons";
+const PREF_GETADDONS_BROWSERECOMMENDED = "extensions.getAddons.recommended.browseURL";
+const PREF_GETADDONS_GETRECOMMENDED = "extensions.getAddons.recommended.url";
+const PREF_GETADDONS_BROWSESEARCHRESULTS = "extensions.getAddons.search.browseURL";
+const PREF_GETADDONS_GETSEARCHRESULTS = "extensions.getAddons.search.url";
+
+const XMLURI_PARSE_ERROR = "http://www.mozilla.org/newlayout/xml/parsererror.xml"
+
+function AddonSearchResult() {
+}
+
+AddonSearchResult.prototype = {
+ id: null,
+ name: null,
+ version: null,
+ summary: null,
+ description: null,
+ rating: null,
+ iconURL: null,
+ thumbnailURL: null,
+ homepageURL: null,
+ eula: null,
+ type: null,
+ xpiURL: null,
+ xpiHash: null,
+
+ QueryInterface: XPCOMUtils.generateQI([Ci.nsIAddonSearchResult])
+}
+
+function AddonRepository() {
+}
+
+AddonRepository.prototype = {
+ // The current set of results
+ _addons: [],
+
+ // Whether we are currently searching or not
+ _searching: false,
+
+ // Is this a search for recommended add-ons
+ _recommended: false,
+
+ // XHR associated with the current request
+ _request: null,
+
+ // How many times in succession has a search yielded no new results. Stops
+ // us trying to find more results indefinately
+ _emptyCount: null,
+
+ // Callback object to notify on completion
+ _callback: null,
+
+ // The uri to pull results from
+ _retrieveURI: null,
+
+ // Maximum number of results to return
+ _maxResults: null,
+
+ get homepageURL() {
+ return Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
+ .getService(Components.interfaces.nsIURLFormatter)
+ .formatURLPref(PREF_GETADDONS_BROWSEADDONS);
+ },
+
+ get isSearching() {
+ return this._searching;
+ },
+
+ getRecommendedURL: function() {
+ var urlf = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
+ .getService(Components.interfaces.nsIURLFormatter);
+
+ return urlf.formatURLPref(PREF_GETADDONS_BROWSERECOMMENDED);
+ },
+
+ getSearchURL: function(aSearchTerms) {
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ var urlf = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
+ .getService(Components.interfaces.nsIURLFormatter);
+
+ var url = prefs.getCharPref(PREF_GETADDONS_BROWSESEARCHRESULTS);
+ url = url.replace(/%TERMS%/g, encodeURIComponent(aSearchTerms));
+ return urlf.formatURL(url);
+ },
+
+ cancelSearch: function() {
+ this._searching = false;
+ if (this._request) {
+ this._request.abort();
+ this._request = null;
+ }
+ },
+
+ retrieveRecommendedAddons: function(aMaxResults, aCallback) {
+ if (this._searching)
+ return;
+
+ this._searching = true;
+ this._addons = [];
+ this._callback = aCallback;
+ this._recommended = true;
+ this._emptyCount = 0;
+ this._maxResults = aMaxResults;
+
+ var urlf = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
+ .getService(Components.interfaces.nsIURLFormatter);
+
+ this._retrieveURI = urlf.formatURLPref(PREF_GETADDONS_GETRECOMMENDED);
+ this._loadList();
+ },
+
+ searchAddons: function(aSearchTerms, aMaxResults, aCallback) {
+ if (this._searching)
+ return;
+
+ this._searching = true;
+ this._addons = [];
+ this._callback = aCallback;
+ this._recommended = false;
+ this._emptyCount = 0;
+ this._maxResults = aMaxResults;
+
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ var urlf = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
+ .getService(Components.interfaces.nsIURLFormatter);
+
+ this._retrieveURI = prefs.getCharPref(PREF_GETADDONS_GETSEARCHRESULTS);
+ this._retrieveURI = this._retrieveURI.replace(/%TERMS%/g, encodeURIComponent(aSearchTerms));
+ this._retrieveURI = urlf.formatURL(this._retrieveURI);
+ this._loadList();
+ },
+
+ // Posts results to the callback
+ _reportSuccess: function(aCount) {
+ this._searching = false;
+ this._request = null;
+ this._callback.searchSucceeded(this._addons, this._addons.length,
+ this._recommended ? -1 : aCount);
+ },
+
+ // Notifies the callback of a failure
+ _reportFailure: function(aEvent) {
+ this._searching = false;
+ this._request = null;
+ this._callback.searchFailed();
+ },
+
+ // Parses an add-on entry from an <addon> element
+ _parseAddon: function(element) {
+ var em = Cc["@mozilla.org/extensions/manager;1"].
+ getService(Ci.nsIExtensionManager);
+ var app = Cc["@mozilla.org/xre/app-info;1"].
+ getService(Ci.nsIXULAppInfo).
+ QueryInterface(Ci.nsIXULRuntime);
+
+ var guid = element.getElementsByTagName("guid");
+ if (guid.length != 1)
+ return;
+
+ // Ignore add-ons already seen in the results
+ for (var i = 0; i < this._addons.length; i++)
+ if (this._addons[i].id == guid[0].textContent)
+ return;
+
+ // Ignore installed add-ons
+ if (em.getItemForID(guid[0].textContent) != null)
+ return;
+
+ // Ignore sandboxed add-ons
+ var status = element.getElementsByTagName("status");
+ // The status element has a unique id for each status type. 4 is Public.
+ if (status.length != 1 || status[0].getAttribute("id") != 4)
+ return;
+
+ // Ignore add-ons not compatible with this OS
+ var compatible = false;
+ var os = element.getElementsByTagName("compatible_os");
+ var i = 0;
+ while (i < os.length && !compatible) {
+ if (os[i].textContent == "ALL" || os[i].textContent == app.OS) {
+ compatible = true;
+ break;
+ }
+ i++;
+ }
+ if (!compatible)
+ return;
+
+ // Ignore add-ons not compatible with this Application
+ compatible = false;
+ var tags = element.getElementsByTagName("compatible_applications");
+ if (tags.length != 1)
+ return;
+ var vc = Cc["@mozilla.org/xpcom/version-comparator;1"].
+ getService(Ci.nsIVersionComparator);
+ var apps = tags[0].getElementsByTagName("name");
+ var i = 0;
+ while (i < apps.length) {
+ if (apps[i].textContent.toLowerCase() == app.name.toLowerCase()) {
+ var minversion = apps[i].parentNode.getElementsByTagName("min_version")[0].textContent;
+ var maxversion = apps[i].parentNode.getElementsByTagName("max_version")[0].textContent;
+ if ((vc.compare(minversion, app.version) > 0) ||
+ (vc.compare(app.version, maxversion) > 0))
+ return;
+ compatible = true;
+ break;
+ }
+ i++;
+ }
+ if (!compatible)
+ return;
+
+ var addon = new AddonSearchResult();
+ addon.id = guid[0].textContent;
+ addon.rating = -1;
+ var node = element.firstChild;
+ while (node) {
+ if (node instanceof Ci.nsIDOMElement) {
+ switch (node.localName) {
+ case "name":
+ case "version":
+ case "summary":
+ case "description":
+ case "eula":
+ addon[node.localName] = node.textContent;
+ break;
+ case "rating":
+ if (node.textContent.length > 0)
+ addon.rating = parseInt(node.textContent);
+ break;
+ case "thumbnail":
+ addon.thumbnailURL = node.textContent;
+ break;
+ case "icon":
+ addon.iconURL = node.textContent;
+ break;
+ case "learnmore":
+ addon.homepageURL = node.textContent;
+ break;
+ case "type":
+ // The type element has an id attribute that is the id from AMO's
+ // database. This doesn't match our type values to perform a mapping
+ if (node.getAttribute("id") == 2)
+ addon.type = Ci.nsIUpdateItem.TYPE_THEME;
+ else
+ addon.type = Ci.nsIUpdateItem.TYPE_EXTENSION;
+ break;
+ case "install":
+ addon.xpiURL = node.textContent;
+ if (node.hasAttribute("hash"))
+ addon.xpiHash = node.getAttribute("hash");
+ break;
+ }
+ }
+ node = node.nextSibling;
+ }
+
+ this._addons.push(addon);
+ },
+
+ // Called when a single request has completed, parses out any add-ons and
+ // either notifies the callback or does a new request for more results
+ _listLoaded: function(aEvent) {
+ var request = aEvent.target;
+ var responseXML = request.responseXML;
+
+ if (!responseXML || responseXML.documentElement.namespaceURI == XMLURI_PARSE_ERROR ||
+ (request.status != 200 && request.status != 0)) {
+ this._reportFailure();
+ return;
+ }
+ var elements = responseXML.documentElement.getElementsByTagName("addon");
+ var oldcount = this._addons.length;
+ for (var i = 0; i < elements.length; i++) {
+ this._parseAddon(elements[i]);
+
+ var prefs = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefBranch);
+ if (this._addons.length == this._maxResults) {
+ this._reportSuccess(elements.length);
+ return;
+ }
+ }
+
+ // We didn't find any new add-ons this pass
+ if (oldcount == this._addons.length)
+ this._emptyCount++;
+ else
+ this._emptyCount = 0;
+
+ /* We should keep trying to find new recommended add-ons, but bail if we
+ don't get a new result for a few passes. */
+ if (this._recommended && this._emptyCount < 5)
+ this._loadList();
+ else
+ this._reportSuccess(elements.length);
+ },
+
+ // Performs a new request for results
+ _loadList: function() {
+ this._request = Cc["@mozilla.org/xmlextras/xmlhttprequest;1"].
+ createInstance(Ci.nsIXMLHttpRequest);
+ this._request.open("GET", this._retrieveURI, true);
+ this._request.overrideMimeType("text/xml");
+
+ var self = this;
+ this._request.onerror = function(event) { self._reportFailure(event); };
+ this._request.onload = function(event) { self._listLoaded(event); };
+ this._request.send(null);
+ },
+
+ classDescription: "Addon Repository",
+ contractID: "@mozilla.org/extensions/addon-repository;1",
+ classID: Components.ID("{8eaaf524-7d6d-4f7d-ae8b-9277b324008d}"),
+ QueryInterface: XPCOMUtils.generateQI([Ci.nsIAddonRepository])
+}
+
+function NSGetModule(aCompMgr, aFileSpec) {
+ return XPCOMUtils.generateModule([AddonRepository]);
+}
Modified: edu2/xulrunner-win32/components/nsBlocklistService.js
===================================================================
--- edu2/xulrunner-win32/components/nsBlocklistService.js 2008-02-27 16:39:23 UTC (rev 433)
+++ edu2/xulrunner-win32/components/nsBlocklistService.js 2008-02-27 17:12:23 UTC (rev 434)
@@ -76,6 +76,16 @@
checkCert(oldChannel);
},
+ // Suppress any certificate errors
+ notifyCertProblem: function(socketInfo, status, targetSite) {
+ return true;
+ },
+
+ // Suppress any ssl errors
+ notifySSLError: function(socketInfo, error, targetSite) {
+ return true;
+ },
+
// nsIInterfaceRequestor
getInterface: function(iid) {
return this.QueryInterface(iid);
@@ -84,6 +94,8 @@
// nsISupports
QueryInterface: function(iid) {
if (!iid.equals(Components.interfaces.nsIChannelEventSink) &&
+ !iid.equals(Components.interfaces.nsIBadCertListener2) &&
+ !iid.equals(Components.interfaces.nsISSLErrorListener) &&
!iid.equals(Components.interfaces.nsIInterfaceRequestor) &&
!iid.equals(Components.interfaces.nsISupports))
throw Components.results.NS_ERROR_NO_INTERFACE;
Modified: edu2/xulrunner-win32/components/nsContentDispatchChooser.js
===================================================================
--- edu2/xulrunner-win32/components/nsContentDispatchChooser.js 2008-02-27 16:39:23 UTC (rev 433)
+++ edu2/xulrunner-win32/components/nsContentDispatchChooser.js 2008-02-27 17:12:23 UTC (rev 434)
@@ -86,6 +86,7 @@
bundle.GetStringFromName("protocol.choices.label"),
bundle.formatStringFromName("protocol.checkbox.label",
[aURI.scheme], 1),
+ bundle.GetStringFromName("protocol.checkbox.accesskey"),
bundle.formatStringFromName("protocol.checkbox.extra",
[xai.name], 1)];
Modified: edu2/xulrunner-win32/components/nsContentPrefService.js
===================================================================
--- edu2/xulrunner-win32/components/nsContentPrefService.js 2008-02-27 16:39:23 UTC (rev 433)
+++ edu2/xulrunner-win32/components/nsContentPrefService.js 2008-02-27 17:12:23 UTC (rev 434)
@@ -270,7 +270,11 @@
return this._grouper;
},
+ get DBConnection ContentPrefService_get_DBConnection() {
+ return this._dbConnection;
+ },
+
//**************************************************************************//
// Data Retrieval & Modification
@@ -691,32 +695,26 @@
if (!dbFile.exists())
dbConnection = this._dbCreate(dbService, dbFile);
else {
- try {
- dbConnection = dbService.openDatabase(dbFile);
+ dbConnection = dbService.openDatabase(dbFile);
- // Get the version of the database in the file.
- var version = dbConnection.schemaVersion;
+ // If the connection isn't ready after we open the database, that means
+ // the database has been corrupted, so we back it up and then recreate it.
+ if (!dbConnection.connectionReady)
+ dbConnection = this._dbBackUpAndRecreate(dbService, dbFile, dbConnection);
- if (version != this._dbVersion)
+ // Get the version of the schema in the file.
+ var version = dbConnection.schemaVersion;
+
+ // Try to migrate the schema in the database to the current schema used by
+ // the service. If migration fails, back up the database and recreate it.
+ if (version != this._dbVersion) {
+ try {
this._dbMigrate(dbConnection, version, this._dbVersion);
- }
- catch (ex) {
- // If the database file is corrupted, I'm not sure whether we should
- // just delete the corrupted file or back it up. For now I'm just
- // deleting it, but here's some code that backs it up (but doesn't limit
- // the number of backups, which is probably necessary, thus I'm not
- // using this code):
- //var backup = this._dbFile.clone();
- //backup.createUnique(Ci.nsIFile.NORMAL_FILE_TYPE, PERMS_FILE);
- //backup.remove(false);
- //this._dbFile.moveTo(null, backup.leafName);
- if (ex.result == Cr.NS_ERROR_FILE_CORRUPTED) {
- // Remove the corrupted file, then recreate it.
- dbFile.remove(false);
- dbConnection = this._dbCreate(dbService, dbFile);
}
- else
- throw ex;
+ catch(ex) {
+ Cu.reportError("error migrating DB: " + ex + "; backing up and recreating");
+ dbConnection = this._dbBackUpAndRecreate(dbService, dbFile, dbConnection);
+ }
}
}
@@ -725,13 +723,33 @@
_dbCreate: function ContentPrefService__dbCreate(aDBService, aDBFile) {
var dbConnection = aDBService.openDatabase(aDBFile);
- for (let name in this._dbSchema.tables)
- dbConnection.createTable(name, this._dbSchema.tables[name]);
- this._dbCreateIndices(dbConnection);
- dbConnection.schemaVersion = this._dbVersion;
+
+ try {
+ this._dbCreateSchema(dbConnection);
+ dbConnection.schemaVersion = this._dbVersion;
+ }
+ catch(ex) {
+ // If we failed to create the database (perhaps because the disk ran out
+ // of space), then remove the database file so we don't leave it in some
+ // half-created state from which we won't know how to recover.
+ dbConnection.close();
+ aDBFile.remove(false);
+ throw ex;
+ }
+
return dbConnection;
},
+ _dbCreateSchema: function ContentPrefService__dbCreateSchema(aDBConnection) {
+ this._dbCreateTables(aDBConnection);
+ this._dbCreateIndices(aDBConnection);
+ },
+
+ _dbCreateTables: function ContentPrefService__dbCreateTables(aDBConnection) {
+ for (let name in this._dbSchema.tables)
+ aDBConnection.createTable(name, this._dbSchema.tables[name]);
+ },
+
_dbCreateIndices: function ContentPrefService__dbCreateIndices(aDBConnection) {
for (let name in this._dbSchema.indices) {
let index = this._dbSchema.indices[name];
@@ -741,6 +759,23 @@
}
},
+ _dbBackUpAndRecreate: function ContentPrefService__dbBackUpAndRecreate(aDBService,
+ aDBFile,
+ aDBConnection) {
+ aDBConnection.backupDB("content-prefs.sqlite.corrupt");
+
+ // Close the database, ignoring the "already closed" exception, if any.
+ // It'll be open if we're here because of a migration failure but closed
+ // if we're here because of database corruption.
+ try { aDBConnection.close() } catch(ex) {}
+
+ aDBFile.remove(false);
+
+ let dbConnection = this._dbCreate(aDBService, aDBFile);
+
+ return dbConnection;
+ },
+
_dbMigrate: function ContentPrefService__dbMigrate(aDBConnection, aOldVersion, aNewVersion) {
if (this["_dbMigrate" + aOldVersion + "To" + aNewVersion]) {
aDBConnection.beginTransaction();
@@ -755,34 +790,19 @@
}
}
else
- throw("can't migrate database from v" + aOldVersion +
- " to v" + aNewVersion + ": no migrator function");
+ throw("no migrator function from version " + aOldVersion +
+ " to version " + aNewVersion);
},
+ /**
+ * If the schema version is 0, that means it was never set, which means
+ * the database was somehow created without the schema being applied, perhaps
+ * because the system ran out of disk space (although we check for this
+ * in _createDB) or because some other code created the database file without
+ * applying the schema. In any case, recover by simply reapplying the schema.
+ */
_dbMigrate0To3: function ContentPrefService___dbMigrate0To3(aDBConnection) {
- aDBConnection.createTable("groups", this._dbSchema.tables.groups);
- aDBConnection.executeSimpleSQL(
- "INSERT INTO groups (id, name) SELECT id, name FROM sites"
- );
-
- aDBConnection.createTable("settings", this._dbSchema.tables.settings);
- aDBConnection.executeSimpleSQL(
- "INSERT INTO settings (id, name) SELECT id, name FROM keys"
- );
-
- aDBConnection.executeSimpleSQL("ALTER TABLE prefs RENAME TO prefsOld");
- aDBConnection.createTable("prefs", this._dbSchema.tables.prefs);
- aDBConnection.executeSimpleSQL(
- "INSERT INTO prefs (id, groupID, settingID, value) " +
- "SELECT id, site_id, key_id, value FROM prefsOld"
- );
-
- // Drop obsolete tables.
- aDBConnection.executeSimpleSQL("DROP TABLE prefsOld");
- aDBConnection.executeSimpleSQL("DROP TABLE keys");
- aDBConnection.executeSimpleSQL("DROP TABLE sites");
-
- this._dbCreateIndices(aDBConnection);
+ this._dbCreateSchema(aDBConnection);
},
_dbMigrate1To3: function ContentPrefService___dbMigrate1To3(aDBConnection) {
Modified: edu2/xulrunner-win32/components/nsDownloadManagerUI.js
===================================================================
--- edu2/xulrunner-win32/components/nsDownloadManagerUI.js 2008-02-27 16:39:23 UTC (rev 433)
+++ edu2/xulrunner-win32/components/nsDownloadManagerUI.js 2008-02-27 17:12:23 UTC (rev 434)
@@ -1,5 +1,5 @@
/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ * 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
@@ -66,6 +66,9 @@
return;
}
+ // We try to get a window to use as the parent here. If we don't have one,
+ // the download manager will close immediately after opening if the pref
+ // browser.download.manager.closeWhenDone is set to true.
var window = null;
try {
if (aWindowContext)
@@ -89,7 +92,7 @@
getService(Ci.nsIWindowWatcher);
ww.openWindow(window,
DOWNLOAD_MANAGER_URL,
- null,
+ "Download:Manager",
"chrome,dialog=no,resizable",
params);
},
@@ -105,7 +108,11 @@
var prefs = Cc["@mozilla.org/preferences-service;1"].
getService(Ci.nsIPrefBranch);
- var flashCount = prefs.getIntPref(PREF_FLASH_COUNT);
+ // This preference may not be set, so defaulting to two.
+ let flashCount = 2;
+ try {
+ flashCount = prefs.getIntPref(PREF_FLASH_COUNT);
+ } catch (e) { }
var win = this.recentWindow.QueryInterface(Ci.nsIDOMChromeWindow);
win.getAttentionWithCycleCount(flashCount);
Modified: edu2/xulrunner-win32/components/nsExtensionManager.js
===================================================================
--- edu2/xulrunner-win32/components/nsExtensionManager.js 2008-02-27 16:39:23 UTC (rev 433)
+++ edu2/xulrunner-win32/components/nsExtensionManager.js 2008-02-27 17:12:23 UTC (rev 434)
@@ -17,11 +17,11 @@
const PREF_EM_CHECK_COMPATIBILITY = "extensions.checkCompatibility";
const PREF_EM_CHECK_UPDATE_SECURITY = "extensions.checkUpdateSecurity";
const PREF_EM_LAST_APP_VERSION = "extensions.lastAppVersion";
+const PREF_EM_ENABLED_ITEMS = "extensions.enabledItems";
const PREF_UPDATE_COUNT = "extensions.update.count";
const PREF_UPDATE_DEFAULT_URL = "extensions.update.url";
const PREF_EM_IGNOREMTIMECHANGES = "extensions.ignoreMTimeChanges";
const PREF_EM_DISABLEDOBSOLETE = "extensions.disabledObsolete";
-const PREF_EM_LAST_SELECTED_SKIN = "extensions.lastSelectedSkin";
const PREF_EM_EXTENSION_FORMAT = "extensions.%UUID%.";
const PREF_EM_ITEM_UPDATE_ENABLED = "extensions.%UUID%.update.enabled";
const PREF_EM_UPDATE_ENABLED = "extensions.update.enabled";
@@ -75,6 +75,9 @@
const KEY_APP_PROFILE = "app-profile";
const KEY_APP_GLOBAL = "app-global";
+const KEY_APP_SYSTEM_LOCAL = "app-system-local";
+const KEY_APP_SYSTEM_SHARE = "app-system-share";
+const KEY_APP_SYSTEM_USER = "app-system-user";
const CATEGORY_INSTALL_LOCATIONS = "extension-install-locations";
const CATEGORY_UPDATE_PARAMS = "extension-update-params";
@@ -177,6 +180,16 @@
checkCert(oldChannel);
},
+ // Suppress any certificate errors
+ notifyCertProblem: function(socketInfo, status, targetSite) {
+ return true;
+ },
+
+ // Suppress any ssl errors
+ notifySSLError: function(socketInfo, error, targetSite) {
+ return true;
+ },
+
// nsIInterfaceRequestor
getInterface: function(iid) {
return this.QueryInterface(iid);
@@ -185,13 +198,15 @@
// nsISupports
QueryInterface: function(iid) {
if (!iid.equals(Components.interfaces.nsIChannelEventSink) &&
+ !iid.equals(Components.interfaces.nsIBadCertListener2) &&
+ !iid.equals(Components.interfaces.nsISSLErrorListener) &&
!iid.equals(Components.interfaces.nsIInterfaceRequestor) &&
!iid.equals(Components.interfaces.nsISupports))
throw Components.results.NS_ERROR_NO_INTERFACE;
return this;
}
};
-//@line 181 "e:\builds\tinderbox\XR-Trunk\WINNT_5.2_Depend\mozilla\toolkit\mozapps\extensions\src\nsExtensionManager.js.in"
+//@line 184 "e:\builds\tinderbox\XR-Trunk\WINNT_5.2_Depend\mozilla\toolkit\mozapps\extensions\src\nsExtensionManager.js.in"
/**
* Creates a Version Checker object.
@@ -1023,7 +1038,7 @@
* The directory that contains the items.
* @constructor
*/
-function DirectoryInstallLocation(name, location, restricted, priority) {
+function DirectoryInstallLocation(name, location, restricted, priority, independent) {
this._name = name;
if (location.exists()) {
if (!location.isDirectory())
@@ -1043,6 +1058,7 @@
this._locationToIDMap = {};
this._restricted = restricted;
this._priority = priority;
+ this._independent = independent;
}
DirectoryInstallLocation.prototype = {
_name : "",
@@ -1050,6 +1066,7 @@
_locationToIDMap: null,
_restricted : false,
_priority : 0,
+ _independent : false,
_canAccess : null,
/**
@@ -1199,6 +1216,8 @@
* See nsIExtensionManager.idl
*/
itemIsManagedIndependently: function(id) {
+ if (this._independent)
+ return true;
var itemLocation = this.location;
itemLocation.append(id);
return itemLocation.exists() && !itemLocation.isDirectory();
@@ -1314,7 +1333,7 @@
QueryInterface: XPCOMUtils.generateQI([Ci.nsIInstallLocation])
};
-//@line 1304 "e:\builds\tinderbox\XR-Trunk\WINNT_5.2_Depend\mozilla\toolkit\mozapps\extensions\src\nsExtensionManager.js.in"
+//@line 1311 "e:\builds\tinderbox\XR-Trunk\WINNT_5.2_Depend\mozilla\toolkit\mozapps\extensions\src\nsExtensionManager.js.in"
const nsIWindowsRegKey = Ci.nsIWindowsRegKey;
@@ -1372,7 +1391,7 @@
var appVendor = gApp.vendor;
var appName = gApp.name;
-//@line 1366 "e:\builds\tinderbox\XR-Trunk\WINNT_5.2_Depend\mozilla\toolkit\mozapps\extensions\src\nsExtensionManager.js.in"
+//@line 1373 "e:\builds\tinderbox\XR-Trunk\WINNT_5.2_Depend\mozilla\toolkit\mozapps\extensions\src\nsExtensionManager.js.in"
// XULRunner-based apps may intentionally not specify a vendor:
if (appVendor != "")
@@ -1455,7 +1474,7 @@
QueryInterface: XPCOMUtils.generateQI([Ci.nsIInstallLocation])
};
-//@line 1449 "e:\builds\tinderbox\XR-Trunk\WINNT_5.2_Depend\mozilla\toolkit\mozapps\extensions\src\nsExtensionManager.js.in"
+//@line 1456 "e:\builds\tinderbox\XR-Trunk\WINNT_5.2_Depend\mozilla\toolkit\mozapps\extensions\src\nsExtensionManager.js.in"
/**
* An object which handles the installation of an Extension.
@@ -1979,7 +1998,8 @@
}
}
else if (installLocation.name == KEY_APP_PROFILE ||
- installLocation.name == KEY_APP_GLOBAL) {
+ installLocation.name == KEY_APP_GLOBAL ||
+ installLocation.name == KEY_APP_SYSTEM_USER) {
// Check for a pointer file and move it aside if it exists
var pointerFile = installLocation.location.clone();
pointerFile.append(itemID);
@@ -2385,7 +2405,7 @@
var priority = Ci.nsIInstallLocation.PRIORITY_APP_SYSTEM_GLOBAL;
var globalLocation = new DirectoryInstallLocation(KEY_APP_GLOBAL,
appGlobalExtensions, true,
- priority);
+ priority, false);
InstallLocations.put(globalLocation);
// Register App-Profile Install Location
@@ -2393,10 +2413,27 @@
var priority = Ci.nsIInstallLocation.PRIORITY_APP_PROFILE;
var profileLocation = new DirectoryInstallLocation(KEY_APP_PROFILE,
appProfileExtensions, false,
- priority);
+ priority, false);
InstallLocations.put(profileLocation);
-//@line 2390 "e:\builds\tinderbox\XR-Trunk\WINNT_5.2_Depend\mozilla\toolkit\mozapps\extensions\src\nsExtensionManager.js.in"
+ // Register per-user Install Location
+ try {
+ ...
[truncated message content] |