diff --git a/mozilla/accessible/src/atk/nsAccessibleHyperText.cpp b/mozilla/accessible/src/atk/nsAccessibleHyperText.cpp
index 9620f8db07f..321502401ce 100644
--- a/mozilla/accessible/src/atk/nsAccessibleHyperText.cpp
+++ b/mozilla/accessible/src/atk/nsAccessibleHyperText.cpp
@@ -91,6 +91,8 @@ void nsAccessibleHyperText::Shutdown()
PRBool nsAccessibleHyperText::GetAllTextChildren(nsPresContext *aPresContext, nsIFrame *aCurFrame, nsIDOMNode* aNode, PRBool &bSave)
{
+ NS_ENSURE_TRUE(mTextChildren, PR_FALSE);
+
while (aCurFrame) {
nsIAtom* frameType = aCurFrame->GetType();
@@ -143,6 +145,8 @@ PRInt32 nsAccessibleHyperText::GetIndex()
nsIDOMNode* nsAccessibleHyperText::FindTextNodeByOffset(PRInt32 aOffset, PRInt32& aBeforeLength)
{
+ NS_ENSURE_TRUE(mTextChildren, nsnull);
+
aBeforeLength = 0;
PRUint32 index, count;
@@ -183,6 +187,8 @@ nsresult nsAccessibleHyperText::GetTextHelper(EGetTextType aType, nsAccessibleTe
/* attribute long caretOffset; */
NS_IMETHODIMP nsAccessibleHyperText::GetCaretOffset(PRInt32 *aCaretOffset)
{
+ NS_ENSURE_TRUE(mTextChildren, NS_ERROR_FAILURE);
+
*aCaretOffset = 0;
PRInt32 charCount, caretOffset;
@@ -209,6 +215,8 @@ NS_IMETHODIMP nsAccessibleHyperText::GetCaretOffset(PRInt32 *aCaretOffset)
NS_IMETHODIMP nsAccessibleHyperText::SetCaretOffset(PRInt32 aCaretOffset)
{
+ NS_ENSURE_TRUE(mTextChildren, NS_ERROR_FAILURE);
+
PRInt32 beforeLength;
nsIDOMNode* domNode = FindTextNodeByOffset(aCaretOffset, beforeLength);
if (domNode) {
@@ -222,6 +230,8 @@ NS_IMETHODIMP nsAccessibleHyperText::SetCaretOffset(PRInt32 aCaretOffset)
/* readonly attribute long characterCount; */
NS_IMETHODIMP nsAccessibleHyperText::GetCharacterCount(PRInt32 *aCharacterCount)
{
+ NS_ENSURE_TRUE(mTextChildren, NS_ERROR_FAILURE);
+
*aCharacterCount = 0;
PRInt32 charCount;
@@ -240,6 +250,8 @@ NS_IMETHODIMP nsAccessibleHyperText::GetCharacterCount(PRInt32 *aCharacterCount)
/* readonly attribute long selectionCount; */
NS_IMETHODIMP nsAccessibleHyperText::GetSelectionCount(PRInt32 *aSelectionCount)
{
+ NS_ENSURE_TRUE(mTextChildren, NS_ERROR_FAILURE);
+
*aSelectionCount = 0;
PRInt32 selCount;
@@ -258,6 +270,8 @@ NS_IMETHODIMP nsAccessibleHyperText::GetSelectionCount(PRInt32 *aSelectionCount)
/* AString getText (in long startOffset, in long endOffset); */
NS_IMETHODIMP nsAccessibleHyperText::GetText(PRInt32 aStartOffset, PRInt32 aEndOffset, nsAString & aText)
{
+ NS_ENSURE_TRUE(mTextChildren, NS_ERROR_FAILURE);
+
if (aEndOffset == -1)
GetCharacterCount(&aEndOffset);
@@ -392,6 +406,8 @@ NS_IMETHODIMP nsAccessibleHyperText::RemoveSelection(PRInt32 aSelectionNum)
// ------- nsIAccessibleHyperText ---------------
/* readonly attribute long links; */NS_IMETHODIMP nsAccessibleHyperText::GetLinks(PRInt32 *aLinks)
{
+ NS_ENSURE_TRUE(mTextChildren, NS_ERROR_FAILURE);
+
*aLinks = 0;
PRUint32 index, count;
@@ -409,6 +425,8 @@ NS_IMETHODIMP nsAccessibleHyperText::RemoveSelection(PRInt32 aSelectionNum)
/* nsIAccessibleHyperLink getLink (in long index); */
NS_IMETHODIMP nsAccessibleHyperText::GetLink(PRInt32 aIndex, nsIAccessibleHyperLink **aLink)
{
+ NS_ENSURE_TRUE(mTextChildren, NS_ERROR_FAILURE);
+
PRUint32 index, count, linkCount = 0;
mTextChildren->GetLength(&count);
for (index = 0; index < count; index++) {
@@ -456,6 +474,8 @@ NS_IMETHODIMP nsAccessibleHyperText::GetLink(PRInt32 aIndex, nsIAccessibleHyperL
/* long getLinkIndex (in long charIndex); */
NS_IMETHODIMP nsAccessibleHyperText::GetLinkIndex(PRInt32 aCharIndex, PRInt32 *aLinkIndex)
{
+ NS_ENSURE_TRUE(mTextChildren, NS_ERROR_FAILURE);
+
*aLinkIndex = -1;
PRInt32 beforeLength_unused;
PRUint32 nodeIndex;
@@ -476,6 +496,8 @@ NS_IMETHODIMP nsAccessibleHyperText::GetLinkIndex(PRInt32 aCharIndex, PRInt32 *a
/* long getSelectedLinkIndex (); */
NS_IMETHODIMP nsAccessibleHyperText::GetSelectedLinkIndex(PRInt32 *aSelectedLinkIndex)
{
+ NS_ENSURE_TRUE(mTextChildren, NS_ERROR_FAILURE);
+
*aSelectedLinkIndex = -1;
PRUint32 count;
@@ -503,6 +525,8 @@ NS_IMETHODIMP nsAccessibleHyperText::GetSelectedLinkIndex(PRInt32 *aSelectedLink
nsresult nsAccessibleHyperText::GetBounds(nsIWeakReference *aWeakShell, PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
{
+ NS_ENSURE_TRUE(mTextChildren, NS_ERROR_FAILURE);
+
*x = *y = *width = *height = 0;
nsRect unionRectTwips;
diff --git a/mozilla/accessible/src/html/nsHTMLLinkAccessible.cpp b/mozilla/accessible/src/html/nsHTMLLinkAccessible.cpp
index 2bd062826f1..d8df4807a7b 100644
--- a/mozilla/accessible/src/html/nsHTMLLinkAccessible.cpp
+++ b/mozilla/accessible/src/html/nsHTMLLinkAccessible.cpp
@@ -44,7 +44,7 @@
NS_IMPL_ISUPPORTS_INHERITED0(nsHTMLLinkAccessible, nsLinkableAccessible)
nsHTMLLinkAccessible::nsHTMLLinkAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell, nsIFrame *aFrame):
-nsLinkableAccessible(aDomNode, aShell), mFrame(aFrame)
+nsLinkableAccessible(aDomNode, aShell)
{
}
@@ -81,24 +81,3 @@ NS_IMETHODIMP nsHTMLLinkAccessible::GetState(PRUint32 *aState)
return NS_OK;
}
-
-nsIFrame* nsHTMLLinkAccessible::GetFrame()
-{
- if (mWeakShell) {
- if (!mFrame) {
- mFrame = nsLinkableAccessible::GetFrame();
- }
- return mFrame;
- }
- return nsnull;
-}
-
-NS_IMETHODIMP nsHTMLLinkAccessible::FireToolkitEvent(PRUint32 aEvent,
- nsIAccessible *aTarget,
- void *aData)
-{
- if (aEvent == nsIAccessibleEvent::EVENT_HIDE) {
- mFrame = nsnull; // Invalidate cached frame
- }
- return nsLinkableAccessible::FireToolkitEvent(aEvent, aTarget, aData);
-}
diff --git a/mozilla/accessible/src/html/nsHTMLLinkAccessible.h b/mozilla/accessible/src/html/nsHTMLLinkAccessible.h
index 95bb4af17fd..2e231ab2e03 100644
--- a/mozilla/accessible/src/html/nsHTMLLinkAccessible.h
+++ b/mozilla/accessible/src/html/nsHTMLLinkAccessible.h
@@ -52,16 +52,6 @@ public:
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetRole(PRUint32 *_retval);
NS_IMETHOD GetState(PRUint32 *_retval);
-
- // nsPIAccessNode
- NS_IMETHOD_(nsIFrame *) GetFrame(void);
-
- // nsPIAccessible
- NS_IMETHOD FireToolkitEvent(PRUint32 aEvent, nsIAccessible *aTarget,
- void *aData);
-
-private:
- nsIFrame *mFrame;
};
#endif
diff --git a/mozilla/accessible/src/html/nsHTMLSelectAccessible.cpp b/mozilla/accessible/src/html/nsHTMLSelectAccessible.cpp
index 2c350a2aad9..77fe4331cfc 100644
--- a/mozilla/accessible/src/html/nsHTMLSelectAccessible.cpp
+++ b/mozilla/accessible/src/html/nsHTMLSelectAccessible.cpp
@@ -804,13 +804,26 @@ NS_IMETHODIMP nsHTMLComboboxAccessible::GetRole(PRUint32 *_retval)
NS_IMETHODIMP nsHTMLComboboxAccessible::Shutdown()
{
- nsHTMLSelectableAccessible::Shutdown();
+ // Need to hold these locally while we call Shutdown() on them.
+ nsCOMPtr textFieldAcc(do_QueryInterface(mComboboxTextFieldAccessible));
+ nsCOMPtr buttonAcc(do_QueryInterface(mComboboxButtonAccessible));
+ nsCOMPtr listAcc(do_QueryInterface(mComboboxListAccessible));
+ if (listAcc) {
+ listAcc->Shutdown();
+ NS_ASSERTION(mComboboxTextFieldAccessible == nsnull, "why didn't InvalidateChildren clear this?");
+ }
+ if (buttonAcc) {
+ buttonAcc->Shutdown();
+ }
+ if (textFieldAcc) {
+ textFieldAcc->Shutdown();
+ }
mComboboxTextFieldAccessible = nsnull;
mComboboxButtonAccessible = nsnull;
mComboboxListAccessible = nsnull;
- return NS_OK;
+ return nsHTMLSelectableAccessible::Shutdown();
}
NS_IMETHODIMP nsHTMLComboboxAccessible::Init()
@@ -889,6 +902,7 @@ NS_IMETHODIMP nsHTMLComboboxAccessible::GetFirstChild(nsIAccessible **aFirstChil
*aFirstChild = mFirstChild;
}
else {
+ NS_ASSERTION(!mComboboxTextFieldAccessible, "I already have a text field accessible!");
nsHTMLComboboxTextFieldAccessible* accessible =
new nsHTMLComboboxTextFieldAccessible(this, mDOMNode, mWeakShell);
*aFirstChild = accessible;
@@ -901,6 +915,14 @@ NS_IMETHODIMP nsHTMLComboboxAccessible::GetFirstChild(nsIAccessible **aFirstChil
return NS_OK;
}
+NS_IMETHODIMP nsHTMLComboboxAccessible::InvalidateChildren()
+{
+ mComboboxTextFieldAccessible = nsnull;
+ mComboboxButtonAccessible = nsnull;
+ mComboboxListAccessible = nsnull;
+ return nsAccessible::InvalidateChildren();
+}
+
NS_IMETHODIMP nsHTMLComboboxAccessible::GetDescription(nsAString& aDescription)
{
// Use description of currently focused option
@@ -980,6 +1002,7 @@ NS_IMETHODIMP nsHTMLComboboxTextFieldAccessible::GetNextSibling(nsIAccessible **
*aNextSibling = accessible;
if (!*aNextSibling)
return NS_ERROR_FAILURE;
+ mNextSibling = *aNextSibling;
accessible->Init();
}
NS_ADDREF(*aNextSibling);
@@ -1235,6 +1258,7 @@ NS_IMETHODIMP nsHTMLComboboxButtonAccessible::GetNextSibling(nsIAccessible **aNe
*aNextSibling = accessible;
if (!*aNextSibling)
return NS_ERROR_OUT_OF_MEMORY;
+ mNextSibling = *aNextSibling;
accessible->Init();
}
NS_ADDREF(*aNextSibling);
diff --git a/mozilla/accessible/src/html/nsHTMLSelectAccessible.h b/mozilla/accessible/src/html/nsHTMLSelectAccessible.h
index e5d57cb99fb..9e3e91a93c0 100644
--- a/mozilla/accessible/src/html/nsHTMLSelectAccessible.h
+++ b/mozilla/accessible/src/html/nsHTMLSelectAccessible.h
@@ -205,6 +205,7 @@ public:
NS_IMETHOD GetDescription(nsAString& aDescription);
NS_IMETHOD Shutdown();
NS_IMETHOD Init();
+ NS_IMETHOD InvalidateChildren();
protected:
already_AddRefed GetFocusedOptionAccessible();
diff --git a/mozilla/accessible/src/html/nsHTMLTextAccessible.cpp b/mozilla/accessible/src/html/nsHTMLTextAccessible.cpp
index 3332ca75565..791994b3b86 100644
--- a/mozilla/accessible/src/html/nsHTMLTextAccessible.cpp
+++ b/mozilla/accessible/src/html/nsHTMLTextAccessible.cpp
@@ -49,7 +49,7 @@
#include "nsISelectionController.h"
nsHTMLTextAccessible::nsHTMLTextAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell, nsIFrame *aFrame):
-nsTextAccessibleWrap(aDomNode, aShell), mFrame(aFrame)
+nsTextAccessibleWrap(aDomNode, aShell)
{
}
@@ -76,27 +76,6 @@ NS_IMETHODIMP nsHTMLTextAccessible::GetName(nsAString& aName)
return rv;
}
-nsIFrame* nsHTMLTextAccessible::GetFrame()
-{
- if (!mWeakShell) {
- return nsnull;
- }
- if (!mFrame) {
- mFrame = nsTextAccessible::GetFrame();
- }
- return mFrame;
-}
-
-NS_IMETHODIMP nsHTMLTextAccessible::FireToolkitEvent(PRUint32 aEvent,
- nsIAccessible *aTarget,
- void *aData)
-{
- if (aEvent == nsIAccessibleEvent::EVENT_HIDE) {
- mFrame = nsnull; // Invalidate cached frame
- }
- return nsTextAccessibleWrap::FireToolkitEvent(aEvent, aTarget, aData);
-}
-
NS_IMETHODIMP nsHTMLTextAccessible::GetState(PRUint32 *aState)
{
nsTextAccessible::GetState(aState);
diff --git a/mozilla/accessible/src/html/nsHTMLTextAccessible.h b/mozilla/accessible/src/html/nsHTMLTextAccessible.h
index 22b41361fd4..abfea964a85 100644
--- a/mozilla/accessible/src/html/nsHTMLTextAccessible.h
+++ b/mozilla/accessible/src/html/nsHTMLTextAccessible.h
@@ -53,16 +53,6 @@ public:
// nsIAccessible
NS_IMETHOD GetName(nsAString& _retval);
NS_IMETHOD GetState(PRUint32 *aState);
-
- // nsPIAccessNode
- NS_IMETHOD_(nsIFrame *) GetFrame(void);
-
- // nsPIAccessible
- NS_IMETHOD FireToolkitEvent(PRUint32 aEvent, nsIAccessible *aTarget,
- void *aData);
-
-private:
- nsIFrame *mFrame; // Only valid if node is not shut down (mWeakShell != null)
};
class nsHTMLHRAccessible : public nsLeafAccessible
diff --git a/mozilla/accessible/src/msaa/nsAccessibleWrap.cpp b/mozilla/accessible/src/msaa/nsAccessibleWrap.cpp
index d5bf110b279..a0860f47dd8 100644
--- a/mozilla/accessible/src/msaa/nsAccessibleWrap.cpp
+++ b/mozilla/accessible/src/msaa/nsAccessibleWrap.cpp
@@ -251,7 +251,9 @@ STDMETHODIMP nsAccessibleWrap::get_accChild(
nsCOMPtr childAccessible;
GetChildAt(varChild.lVal - 1, getter_AddRefs(childAccessible));
- *ppdispChild = NativeAccessible(childAccessible);
+ if (childAccessible) {
+ *ppdispChild = NativeAccessible(childAccessible);
+ }
return (*ppdispChild)? S_OK: E_FAIL;
}
@@ -1015,6 +1017,10 @@ NS_IMETHODIMP nsAccessibleWrap::GetNativeInterface(void **aOutAccessible)
IDispatch *nsAccessibleWrap::NativeAccessible(nsIAccessible *aXPAccessible)
{
+ if (!aXPAccessible) {
+ return NULL;
+ }
+
nsCOMPtr accObject(do_QueryInterface(aXPAccessible));
if (accObject) {
void* hwnd;
diff --git a/mozilla/accessible/src/xul/nsXULSelectAccessible.cpp b/mozilla/accessible/src/xul/nsXULSelectAccessible.cpp
index c3b837609d7..d7b003aded2 100644
--- a/mozilla/accessible/src/xul/nsXULSelectAccessible.cpp
+++ b/mozilla/accessible/src/xul/nsXULSelectAccessible.cpp
@@ -182,11 +182,7 @@ NS_IMETHODIMP nsXULSelectableAccessible::RefSelection(PRInt32 aIndex, nsIAccessi
xulSelect->GetSelectedItem(getter_AddRefs(tempDOMNode));
if (tempDOMNode) {
- nsCOMPtr tempAccess;
- accService->GetAccessibleInWeakShell(tempDOMNode, mWeakShell, getter_AddRefs(tempAccess));
- *_retval = tempAccess;
- NS_ADDREF(*_retval);
- return NS_OK;
+ return accService->GetAccessibleInWeakShell(tempDOMNode, mWeakShell, _retval);
}
return NS_ERROR_FAILURE;
diff --git a/mozilla/browser/app/module.ver b/mozilla/browser/app/module.ver
index bdab6f54cb3..bbb211d7969 100644
--- a/mozilla/browser/app/module.ver
+++ b/mozilla/browser/app/module.ver
@@ -1,7 +1,7 @@
WIN32_MODULE_COMPANYNAME=Mozilla Corporation
WIN32_MODULE_COPYRIGHT=©Firefox and Mozilla Developers, according to the MPL 1.1/GPL 2.0/LGPL 2.1 licenses, as applicable.
-WIN32_MODULE_PRODUCTVERSION=2,0,0,4
-WIN32_MODULE_PRODUCTVERSION_STRING=2.0.0.4pre
+WIN32_MODULE_PRODUCTVERSION=2,0,0,5
+WIN32_MODULE_PRODUCTVERSION_STRING=2.0.0.5pre
WIN32_MODULE_TRADEMARKS=Firefox is a Trademark of The Mozilla Foundation.
WIN32_MODULE_DESCRIPTION=Firefox
WIN32_MODULE_PRODUCTNAME=Firefox
diff --git a/mozilla/browser/components/bookmarks/content/bookmarks.js b/mozilla/browser/components/bookmarks/content/bookmarks.js
index 398198f3e20..6fc348fb885 100644
--- a/mozilla/browser/components/bookmarks/content/bookmarks.js
+++ b/mozilla/browser/components/bookmarks/content/bookmarks.js
@@ -1662,7 +1662,7 @@ var BookmarksUtils = {
if (aSelection.length > 1)
gBkmkTxnSvc.endBatch();
if (aSelection.length > kBATCH_LIMIT && aAction != "move")
- BMDS.beginUpdateBatch();
+ BMDS.endUpdateBatch();
return true;
},
diff --git a/mozilla/browser/components/feeds/src/FeedWriter.js b/mozilla/browser/components/feeds/src/FeedWriter.js
index 24ddcb5d056..36fcb812d62 100755
--- a/mozilla/browser/components/feeds/src/FeedWriter.js
+++ b/mozilla/browser/components/feeds/src/FeedWriter.js
@@ -285,7 +285,7 @@ FeedWriter.prototype = {
var entryContainer = this._document.createElementNS(HTML_NS, "div");
entryContainer.className = "entry";
- // If the entry has a title, make it a like
+ // If the entry has a title, make it a link
if (entry.title) {
var a = this._document.createElementNS(HTML_NS, "a");
a.appendChild(this._document.createTextNode(entry.title.plainText()));
diff --git a/mozilla/browser/components/nsBrowserContentHandler.js b/mozilla/browser/components/nsBrowserContentHandler.js
index c0c6905833f..42d782a3313 100644
--- a/mozilla/browser/components/nsBrowserContentHandler.js
+++ b/mozilla/browser/components/nsBrowserContentHandler.js
@@ -61,6 +61,7 @@ const nsIWindowWatcher = Components.interfaces.nsIWindowWatcher;
const nsICategoryManager = Components.interfaces.nsICategoryManager;
const nsIWebNavigationInfo = Components.interfaces.nsIWebNavigationInfo;
const nsIBrowserSearchService = Components.interfaces.nsIBrowserSearchService;
+const nsICommandLineValidator = Components.interfaces.nsICommandLineValidator;
const NS_BINDING_ABORTED = 0x804b0002;
const NS_ERROR_WONT_HANDLE_CONTENT = 0x805d0001;
@@ -301,6 +302,7 @@ var nsBrowserContentHandler = {
!iid.equals(nsICommandLineHandler) &&
!iid.equals(nsIBrowserHandler) &&
!iid.equals(nsIContentHandler) &&
+ !iid.equals(nsICommandLineValidator) &&
!iid.equals(nsIFactory))
throw Components.errors.NS_ERROR_NO_INTERFACE;
@@ -604,6 +606,21 @@ var nsBrowserContentHandler = {
request.cancel(NS_BINDING_ABORTED);
},
+ /* nsICommandLineValidator */
+ validate : function bch_validate(cmdLine) {
+ // Other handlers may use osint so only handle the osint flag if the url
+ // flag is also present and the command line is valid.
+ var osintFlagIdx = cmdLine.findFlag("osint", false);
+ var urlFlagIdx = cmdLine.findFlag("url", false);
+ if (urlFlagIdx > -1 && (osintFlagIdx > -1 ||
+ cmdLine.state == nsICommandLine.STATE_REMOTE_EXPLICIT)) {
+ var urlParam = cmdLine.getArgument(urlFlagIdx + 1);
+ if (cmdLine.length != urlFlagIdx + 2 || /firefoxurl:/.test(urlParam))
+ throw NS_ERROR_ABORT;
+ cmdLine.handleFlag("osint", false)
+ }
+ },
+
/* nsIFactory */
createInstance: function bch_CI(outer, iid) {
if (outer != null)
@@ -866,6 +883,9 @@ var Module = {
catMan.addCategoryEntry("command-line-handler",
"x-default",
dch_contractID, true, true);
+ catMan.addCategoryEntry("command-line-validator",
+ "b-browser",
+ bch_contractID, true, true);
},
unregisterSelf : function mod_unregself(compMgr, location, type) {
@@ -880,6 +900,8 @@ var Module = {
"m-browser", true);
catMan.deleteCategoryEntry("command-line-handler",
"x-default", true);
+ catMan.deleteCategoryEntry("command-line-validator",
+ "b-browser", true);
},
canUnload: function(compMgr) {
diff --git a/mozilla/browser/components/safebrowsing/content/phishing-afterload-displayer.js b/mozilla/browser/components/safebrowsing/content/phishing-afterload-displayer.js
index 3fc2ada3d94..e874b78066d 100644
--- a/mozilla/browser/components/safebrowsing/content/phishing-afterload-displayer.js
+++ b/mozilla/browser/components/safebrowsing/content/phishing-afterload-displayer.js
@@ -172,6 +172,10 @@ PROT_PhishMsgDisplayerBase.prototype.getMeOutOfHereUrl_ = function() {
try {
url = prefs.getComplexValue("browser.startup.homepage",
Ci.nsIPrefLocalizedString).data;
+ // If url is a pipe-delimited set of pages, just take the first one.
+ // This will need to change once bug 221445 is fixed.
+ if (url.indexOf("|") != -1)
+ url = url.split("|")[0];
} catch(e) {
G_Debug(this, "Couldn't get homepage pref: " + e);
}
diff --git a/mozilla/browser/components/sessionstore/src/nsSessionStore.js b/mozilla/browser/components/sessionstore/src/nsSessionStore.js
index b66906a8a33..d970bd1cee2 100644
--- a/mozilla/browser/components/sessionstore/src/nsSessionStore.js
+++ b/mozilla/browser/components/sessionstore/src/nsSessionStore.js
@@ -315,6 +315,7 @@ SessionStoreService.prototype = {
delete aBrowser.parentNode.__SS_data;
});
});
+ this._lastWindowClosed = null;
this._clearDisk();
// also clear all data about closed tabs
for (ix in this._windows) {
diff --git a/mozilla/browser/components/shell/src/nsWindowsShellService.cpp b/mozilla/browser/components/shell/src/nsWindowsShellService.cpp
index 53a2d50c8dc..f04b8ec5e54 100644
--- a/mozilla/browser/components/shell/src/nsWindowsShellService.cpp
+++ b/mozilla/browser/components/shell/src/nsWindowsShellService.cpp
@@ -151,7 +151,7 @@ OpenKeyForWriting(HKEY aStartKey, const char* aKeyName, HKEY* aKey,
//
// HKCU\SOFTWARE\Classes\FirefoxHTML\
// DefaultIcon (default) REG_SZ ,1
-// shell\open\command (default) REG_SZ -url "%1" -requestPending
+// shell\open\command (default) REG_SZ -requestPending -osint -url "%1"
// shell\open\ddeexec (default) REG_SZ "%1",,0,0,,,,
// shell\open\ddeexec NoActivateHandler REG_SZ
// \Application (default) REG_SZ Firefox
@@ -163,7 +163,7 @@ OpenKeyForWriting(HKEY aStartKey, const char* aKeyName, HKEY* aKey,
// EditFlags REG_DWORD 2
// FriendlyTypeName REG_SZ URL
// DefaultIcon (default) REG_SZ ,1
-// shell\open\command (default) REG_SZ -url "%1" -requestPending
+// shell\open\command (default) REG_SZ -requestPending -osint -url "%1"
// shell\open\ddeexec (default) REG_SZ "%1",,0,0,,,,
// shell\open\ddeexec NoActivateHandler REG_SZ
// \Application (default) REG_SZ Firefox
@@ -177,7 +177,7 @@ OpenKeyForWriting(HKEY aStartKey, const char* aKeyName, HKEY* aKey,
//
// HKCU\SOFTWARE\Classes\\
// DefaultIcon (default) REG_SZ ,1
-// shell\open\command (default) REG_SZ -url "%1" -requestPending
+// shell\open\command (default) REG_SZ -requestPending -osint -url "%1"
// shell\open\ddeexec (default) REG_SZ "%1",,0,0,,,,
// shell\open\ddeexec NoActivateHandler REG_SZ
// \Application (default) REG_SZ Firefox
@@ -232,7 +232,7 @@ typedef struct {
#define CLS_HTML "FirefoxHTML"
#define CLS_URL "FirefoxURL"
#define VAL_FILE_ICON "%APPPATH%,1"
-#define VAL_OPEN "%APPPATH% -url \"%1\" -requestPending"
+#define VAL_OPEN "%APPPATH% -requestPending -osint -url \"%1\""
#define MAKE_KEY_NAME1(PREFIX, MID) \
PREFIX MID
diff --git a/mozilla/browser/config/version.txt b/mozilla/browser/config/version.txt
index 7c279fe1d08..78cea6d9627 100644
--- a/mozilla/browser/config/version.txt
+++ b/mozilla/browser/config/version.txt
@@ -1 +1 @@
-2.0.0.4pre
+2.0.0.5pre
diff --git a/mozilla/browser/installer/removed-files.in b/mozilla/browser/installer/removed-files.in
index f33cf13a5d1..cecac2628fa 100644
--- a/mozilla/browser/installer/removed-files.in
+++ b/mozilla/browser/installer/removed-files.in
@@ -7,6 +7,7 @@ chrome/app-chrome.manifest
chrome/overlayinfo/
chrome/m3ffxtbr.manifest
chrome/m3ffxtbr.jar
+defaults/existing-profile-defaults.js
defaults/pref/all.js
defaults/pref/security-prefs.js
defaults/pref/winpref.js
diff --git a/mozilla/browser/installer/windows/nsis/installer.nsi b/mozilla/browser/installer/windows/nsis/installer.nsi
index 41978ce6436..ae09dc710f6 100755
--- a/mozilla/browser/installer/windows/nsis/installer.nsi
+++ b/mozilla/browser/installer/windows/nsis/installer.nsi
@@ -80,6 +80,7 @@ Var fhUninstallLog
!insertmacro WordReplace
!insertmacro GetSize
!insertmacro GetParameters
+!insertmacro GetParent
!insertmacro GetOptions
!insertmacro GetRoot
!insertmacro DriveSpace
@@ -107,7 +108,7 @@ VIAddVersionKey "FileDescription" "${BrandShortName} Installer"
!insertmacro CanWriteToInstallDir
!insertmacro CheckDiskSpace
!insertmacro AddHandlerValues
-!insertmacro DisplayCopyErrMsg
+!insertmacro GetSingleInstallPath
!include shared.nsh
@@ -189,37 +190,57 @@ Section "-Application" Section1
SetDetailsPrint textonly
DetailPrint $(STATUS_CLEANUP)
SetDetailsPrint none
- SetOutPath $INSTDIR
; Try to delete the app's main executable and if we can't delete it try to
; close the app. This allows running an instance that is located in another
; directory and prevents the launching of the app during the installation.
- ClearErrors
+ ; A copy of the executable is placed in a temporary directory so it can be
+ ; copied back in the case where a specific file is checked / found to be in
+ ; use that would prevent a successful install.
+
+ ; Create a temporary backup directory.
+ GetTempFileName $TmpVal "$TEMP"
+ ${DeleteFile} $TmpVal
+ SetOutPath $TmpVal
+
${If} ${FileExists} "$INSTDIR\${FileMainEXE}"
- ${DeleteFile} "$INSTDIR\${FileMainEXE}"
- ${EndIf}
- ${If} ${Errors}
ClearErrors
- ${CloseApp} "true" $(WARN_APP_RUNNING_INSTALL)
- ; Try to delete it again to prevent launching the app while we are
- ; installing.
- ClearErrors
- ${DeleteFile} "$INSTDIR\${FileMainEXE}"
+ CopyFiles /SILENT "$INSTDIR\${FileMainEXE}" "$TmpVal\${FileMainEXE}"
+ Delete "$INSTDIR\${FileMainEXE}"
${If} ${Errors}
ClearErrors
- ; Try closing the app a second time
${CloseApp} "true" $(WARN_APP_RUNNING_INSTALL)
- retry:
+ ; Try to delete it again to prevent launching the app while we are
+ ; installing.
ClearErrors
- ${DeleteFile} "$INSTDIR\${FileMainEXE}"
+ CopyFiles /SILENT "$INSTDIR\${FileMainEXE}" "$TmpVal\${FileMainEXE}"
+ Delete "$INSTDIR\${FileMainEXE}"
${If} ${Errors}
- ; Fallback to the FileError_NoIgnore error with retry/cancel options
- ${DisplayCopyErrMsg} "${FileMainEXE}"
- GoTo retry
+ ClearErrors
+ ; Try closing the app a second time
+ ${CloseApp} "true" $(WARN_APP_RUNNING_INSTALL)
+ StrCpy $R1 "${FileMainEXE}"
+ Call CheckInUse
${EndIf}
${EndIf}
${EndIf}
+ StrCpy $R1 "freebl3.dll"
+ Call CheckInUse
+
+ StrCpy $R1 "nssckbi.dll"
+ Call CheckInUse
+
+ StrCpy $R1 "nspr4.dll"
+ Call CheckInUse
+
+ StrCpy $R1 "xpicleanup.exe"
+ Call CheckInUse
+
+ SetOutPath $INSTDIR
+ RmDir /r "$TmpVal"
+ ClearErrors
+
; During an install Vista checks if a new entry is added under the uninstall
; registry key (e.g. ARP). When the same version of the app is installed on
; top of an existing install the key is deleted / added and the Program
@@ -365,11 +386,8 @@ Section "-Application" Section1
${EndIf}
${LogHeader} "Adding Additional Files"
- ; Only for Firefox and only if they don't already exist
- ; Check if QuickTime is installed and copy the contents of its plugins
- ; directory into the app's plugins directory. Previously only the
- ; nsIQTScriptablePlugin.xpt files was copied which is not enough to enable
- ; QuickTime as a plugin.
+ ; Check if QuickTime is installed and copy the nsIQTScriptablePlugin.xpt from
+ ; its plugins directory into the app's components directory.
ClearErrors
ReadRegStr $R0 HKLM "Software\Apple Computer, Inc.\QuickTime" "InstallDir"
${Unless} ${Errors}
@@ -377,12 +395,16 @@ Section "-Application" Section1
${GetPathFromRegStr}
Pop $R0
${Unless} ${Errors}
- GetFullPathName $R0 "$R0\Plugins"
+ GetFullPathName $R0 "$R0\Plugins\nsIQTScriptablePlugin.xpt"
${Unless} ${Errors}
- ${LogHeader} "Copying QuickTime Plugin Files"
- ${LogMsg} "Source Directory: $R0\Plugins"
- StrCpy $R1 "$INSTDIR\plugins"
- Call DoCopyFiles
+ ${LogHeader} "Copying QuickTime Scriptable Component"
+ CopyFiles /SILENT "$R0" "$INSTDIR\components"
+ ${If} ${Errors}
+ ${LogMsg} "** ERROR Installing File: $INSTDIR\components\nsIQTScriptablePlugin.xpt **"
+ ${Else}
+ ${LogMsg} "Installed File: $INSTDIR\components\nsIQTScriptablePlugin.xpt"
+ ${LogUninstall} "File: \components\nsIQTScriptablePlugin.xpt"
+ ${EndIf}
${EndUnless}
${EndUnless}
${EndUnless}
@@ -539,7 +561,7 @@ Function installTalkback
; This will add it during install to the uninstall.log and retains the
; original disabled state from the installation.
${If} ${FileExists} "$R1\InstallDisabled"
- CopyFiles "$R1\InstallDisabled" "$R0"
+ CopyFiles /SILENT "$R1\InstallDisabled" "$R0"
${EndIf}
; Remove the existing install of talkback
RmDir /r "$R1"
@@ -564,6 +586,31 @@ Function installTalkback
${EndIf}
FunctionEnd
+; Copies a file to a temporary backup directory and then checks if it is in use
+; by attempting to delete the file. If the file is in use an error is displayed
+; and the user is given the options to either retry or cancel. If cancel is
+; selected then the files are restored.
+Function CheckInUse
+ ${If} ${FileExists} "$INSTDIR\$R1"
+ retry:
+ ClearErrors
+ CopyFiles /SILENT "$INSTDIR\$R1" "$TmpVal\$R1"
+ ${Unless} ${Errors}
+ Delete "$INSTDIR\$R1"
+ ${EndUnless}
+ ${If} ${Errors}
+ StrCpy $0 "$INSTDIR\$R1"
+ ${WordReplace} "$(^FileError_NoIgnore)" "\r\n" "$\r$\n" "+*" $0
+ MessageBox MB_RETRYCANCEL|MB_ICONQUESTION "$0" IDRETRY retry
+ Delete "$TmpVal\$R1"
+ CopyFiles /SILENT "$TmpVal\*" "$INSTDIR\"
+ SetOutPath $INSTDIR
+ RmDir /r "$TmpVal"
+ Quit
+ ${EndIf}
+ ${EndIf}
+FunctionEnd
+
; Adds a section divider to the human readable log.
Function WriteLogSeparator
FileWrite $fhInstallLog "$\r$\n-------------------------------------------------------------------------------$\r$\n"
@@ -645,8 +692,10 @@ Function CopyFile
CreateDirectory "$R1$R3\$R7"
${If} ${Errors}
${LogMsg} "** ERROR Creating Directory: $R1$R3\$R7 **"
- ${DisplayCopyErrMsg} "$R7"
- GoTo retry
+ StrCpy $0 "$R1$R3\$R7"
+ ${WordReplace} "$(^FileError_NoIgnore)" "\r\n" "$\r$\n" "+*" $0
+ MessageBox MB_RETRYCANCEL|MB_ICONQUESTION "$0" IDRETRY retry
+ Quit
${Else}
${LogMsg} "Created Directory: $R1$R3\$R7"
${EndIf}
@@ -657,25 +706,33 @@ Function CopyFile
CreateDirectory "$R1$R3"
${If} ${Errors}
${LogMsg} "** ERROR Creating Directory: $R1$R3 **"
- ${DisplayCopyErrMsg} "$R3"
- GoTo retry
+ StrCpy $0 "$R1$R3"
+ ${WordReplace} "$(^FileError_NoIgnore)" "\r\n" "$\r$\n" "+*" $0
+ MessageBox MB_RETRYCANCEL|MB_ICONQUESTION "$0" IDRETRY retry
+ Quit
${Else}
${LogMsg} "Created Directory: $R1$R3"
${EndIf}
${EndUnless}
${If} ${FileExists} "$R1$R3\$R7"
+ ClearErrors
Delete "$R1$R3\$R7"
${If} ${Errors}
- ${DisplayCopyErrMsg} "$R7"
- GoTo retry
+ ${LogMsg} "** ERROR Deleting File: $R1$R3\$R7 **"
+ StrCpy $0 "$R1$R3\$R7"
+ ${WordReplace} "$(^FileError_NoIgnore)" "\r\n" "$\r$\n" "+*" $0
+ MessageBox MB_RETRYCANCEL|MB_ICONQUESTION "$0" IDRETRY retry
+ Quit
${EndIf}
${EndIf}
ClearErrors
CopyFiles /SILENT $R9 "$R1$R3"
${If} ${Errors}
${LogMsg} "** ERROR Installing File: $R1$R3\$R7 **"
- ${DisplayCopyErrMsg} "$R7"
- GoTo retry
+ StrCpy $0 "$R1$R3\$R7"
+ ${WordReplace} "$(^FileError_NoIgnore)" "\r\n" "$\r$\n" "+*" $0
+ MessageBox MB_RETRYCANCEL|MB_ICONQUESTION "$0" IDRETRY retry
+ Quit
${Else}
${LogMsg} "Installed File: $R1$R3\$R7"
${EndIf}
@@ -844,6 +901,17 @@ Function leaveComponents
FunctionEnd
Function preDirectory
+ SetShellVarContext all ; Set SHCTX to HKLM
+ ${GetSingleInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $R9
+ ${If} $R9 == "false"
+ SetShellVarContext current ; Set SHCTX to HKCU
+ ${GetSingleInstallPath} "Software\Mozilla\${BrandFullNameInternal}" $R9
+ ${EndIf}
+
+ ${Unless} $R9 == "false"
+ StrCpy $INSTDIR "$R9"
+ ${EndUnless}
+
${If} $InstallType != 4
${CheckDiskSpace} $R9
${If} $R9 != "false"
diff --git a/mozilla/browser/installer/windows/nsis/shared.nsh b/mozilla/browser/installer/windows/nsis/shared.nsh
index 5e9bf3bc996..824e1de147a 100755
--- a/mozilla/browser/installer/windows/nsis/shared.nsh
+++ b/mozilla/browser/installer/windows/nsis/shared.nsh
@@ -137,7 +137,7 @@
${StrFilter} "$8" "+" "" "" $8
StrCpy $0 "SOFTWARE\Classes"
- StrCpy $2 "$8 -url $\"%1$\" -requestPending"
+ StrCpy $2 "$8 -requestPending -osint -url $\"%1$\""
; Associate the file handlers with FirefoxHTML
WriteRegStr SHCTX "$0\.htm" "" "FirefoxHTML"
@@ -171,8 +171,7 @@
${StrFilter} "${FileMainEXE}" "+" "" "" $R9
StrCpy $0 "Software\Clients\StartMenuInternet\$R9"
- ; Remove existing keys so we only have our settings
- DeleteRegKey HKLM "$0"
+
WriteRegStr HKLM "$0" "" "${BrandFullName}"
WriteRegStr HKLM "$0\DefaultIcon" "" "$8,0"
@@ -351,7 +350,7 @@
; Store the command to open the app with an url in a register for easy access.
GetFullPathName /SHORT $8 "$INSTDIR\${FileMainEXE}"
${StrFilter} "$8" "+" "" "" $8
- StrCpy $1 "$8 -url $\"%1$\" -requestPending"
+ StrCpy $1 "$8 -requestPending -osint -url $\"%1$\""
; Always set the file and protocol handlers since they may specify a
; different path and the path is used by Vista when setting associations.
diff --git a/mozilla/browser/installer/windows/packages-static b/mozilla/browser/installer/windows/packages-static
index e78cf104325..b7a1367cfeb 100644
--- a/mozilla/browser/installer/windows/packages-static
+++ b/mozilla/browser/installer/windows/packages-static
@@ -104,7 +104,6 @@ bin\components\fastfind.xpt
bin\components\feeds.xpt
bin\components\find.xpt
bin\components\gfx.xpt
-bin\components\helperAppDlg.xpt
bin\components\history.xpt
bin\components\htmlparser.xpt
bin\components\imglib2.xpt
@@ -116,7 +115,6 @@ bin\components\jsconsole.xpt
bin\components\jsconsole-clhandler.js
bin\components\jsd3250.dll
bin\components\jsdservice.xpt
-bin\components\jsurl.xpt
bin\components\layout_base.xpt
bin\components\layout_printing.xpt
bin\components\layout_xul.xpt
@@ -139,7 +137,6 @@ bin\components\necko_dns.xpt
bin\components\necko_file.xpt
bin\components\necko_ftp.xpt
bin\components\necko_http.xpt
-bin\components\necko_jar.xpt
bin\components\necko_res.xpt
bin\components\necko_socket.xpt
bin\components\necko_viewsource.xpt
@@ -149,12 +146,10 @@ bin\components\places.xpt
bin\components\plugin.xpt
bin\components\pref.xpt
bin\components\prefetch.xpt
-bin\components\prefmigr.xpt
bin\components\profile.xpt
bin\components\progressDlg.xpt
bin\components\proxyObject.xpt
bin\components\rdf.xpt
-bin\components\related.xpt
bin\components\satchel.xpt
bin\components\saxparser.xpt
bin\components\search.xpt
@@ -168,7 +163,6 @@ bin\components\ucnative.xpt
bin\components\uconv.xpt
bin\components\unicharutil.xpt
bin\components\uriloader.xpt
-bin\components\util.xpt
bin\components\wallet.xpt
bin\components\walleteditor.xpt
bin\components\walletpreview.xpt
@@ -264,7 +258,6 @@ bin\res\ua.css
bin\res\html.css
bin\res\quirk.css
bin\res\forms.css
-bin\res\platform-forms.css
bin\res\EditorOverride.css
bin\res\table-add-column-after-active.gif
bin\res\table-add-column-after-hover.gif
@@ -304,7 +297,6 @@ bin\res\entityTables\*
; svg
bin\gksvggdiplus.dll
bin\res\svg.css
-bin\res\svg.properties
bin\components\dom_svg.xpt
; spellchecker (may not be present)
@@ -325,7 +317,6 @@ bin\softokn3.dll
bin\freebl3.chk
bin\freebl3.dll
bin\ssl3.dll
-bin\chrome\pipnss.jar
bin\chrome\pippki.jar
bin\chrome\pippki.manifest
diff --git a/mozilla/browser/locales/shipped-locales b/mozilla/browser/locales/shipped-locales
index 4b3c67dc71f..90f0362caee 100644
--- a/mozilla/browser/locales/shipped-locales
+++ b/mozilla/browser/locales/shipped-locales
@@ -21,7 +21,7 @@ hu
it
ja-JP-mac osx
ja win32 linux
-ka
+ka win32 linux
ko
ku
lt
diff --git a/mozilla/calendar/base/content/calendar-decorated-base.xml b/mozilla/calendar/base/content/calendar-decorated-base.xml
index d0ff39ba451..5ff72d7d825 100644
--- a/mozilla/calendar/base/content/calendar-decorated-base.xml
+++ b/mozilla/calendar/base/content/calendar-decorated-base.xml
@@ -21,6 +21,7 @@
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
+ - Markus Adrario
-
- 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
@@ -137,6 +138,7 @@
false
+ false
false
@@ -174,7 +176,7 @@
@@ -184,14 +186,13 @@
@@ -205,51 +206,61 @@
]]>
-
+
+
+
+
+
+
@@ -263,8 +274,7 @@
diff --git a/mozilla/calendar/base/content/calendar-decorated-day-view.xml b/mozilla/calendar/base/content/calendar-decorated-day-view.xml
index 462d873c3db..a4e7e080ca0 100644
--- a/mozilla/calendar/base/content/calendar-decorated-day-view.xml
+++ b/mozilla/calendar/base/content/calendar-decorated-day-view.xml
@@ -68,14 +68,15 @@
diff --git a/mozilla/calendar/base/content/calendar-decorated-month-view.xml b/mozilla/calendar/base/content/calendar-decorated-month-view.xml
index 866447f2c39..ce976848b00 100644
--- a/mozilla/calendar/base/content/calendar-decorated-month-view.xml
+++ b/mozilla/calendar/base/content/calendar-decorated-month-view.xml
@@ -57,9 +57,7 @@
diff --git a/mozilla/calendar/base/content/calendar-decorated-multiweek-view.xml b/mozilla/calendar/base/content/calendar-decorated-multiweek-view.xml
index 310c82e3772..3fb4884746f 100644
--- a/mozilla/calendar/base/content/calendar-decorated-multiweek-view.xml
+++ b/mozilla/calendar/base/content/calendar-decorated-multiweek-view.xml
@@ -58,9 +58,7 @@
@@ -272,9 +266,7 @@
daysOff.push(Number(i));
}
}
- var viewElem = document.getAnonymousElementByAttribute(
- this, "anonid", "view-element");
- viewElem.daysOffArray = daysOff;
+ this.viewElem.daysOffArray = daysOff;
]]>
diff --git a/mozilla/calendar/base/content/calendar-decorated-week-view.xml b/mozilla/calendar/base/content/calendar-decorated-week-view.xml
index 309b500389a..3f28b9481e8 100644
--- a/mozilla/calendar/base/content/calendar-decorated-week-view.xml
+++ b/mozilla/calendar/base/content/calendar-decorated-week-view.xml
@@ -103,8 +103,9 @@
diff --git a/mozilla/calendar/base/content/calendar-event-dialog.xul b/mozilla/calendar/base/content/calendar-event-dialog.xul
index c6f77a3f4ae..cc66898537c 100644
--- a/mozilla/calendar/base/content/calendar-event-dialog.xul
+++ b/mozilla/calendar/base/content/calendar-event-dialog.xul
@@ -65,7 +65,6 @@
-
-
-
+
diff --git a/mozilla/calendar/prototypes/wcap/wcap-enabler/Makefile.in b/mozilla/calendar/prototypes/wcap/wcap-enabler/Makefile.in
index 5244760f9bf..3914c5d844c 100644
--- a/mozilla/calendar/prototypes/wcap/wcap-enabler/Makefile.in
+++ b/mozilla/calendar/prototypes/wcap/wcap-enabler/Makefile.in
@@ -52,6 +52,9 @@ DEFINES += -DFIREFOX_VERSION=$(FIREFOX_VERSION)
DEFINES += -DTARGET_PLATFORM=$(OS_TARGET)_$(TARGET_XPCOM_ABI)
+LIGHTNING_VERSION := $(shell cat $(srcdir)/../../../sunbird/config/version.txt)
+DEFINES += -DLIGHTNING_VERSION=$(LIGHTNING_VERSION)
+
PREF_JS_EXPORTS = $(srcdir)/wcap-enabler.js
include $(topsrcdir)/config/rules.mk
diff --git a/mozilla/calendar/prototypes/wcap/wcap-enabler/install.rdf b/mozilla/calendar/prototypes/wcap/wcap-enabler/install.rdf
index ceb7737b74b..74f09cbeada 100644
--- a/mozilla/calendar/prototypes/wcap/wcap-enabler/install.rdf
+++ b/mozilla/calendar/prototypes/wcap/wcap-enabler/install.rdf
@@ -17,7 +17,7 @@
wcap-enabler@calendar.mozilla.org
- 0.5
+ @LIGHTNING_VERSION@
WCAP Enabler
Enables support for the Sun Java System Calendar Server (WCAP) in the Lightning calendar extension.
Mozilla Calendar Project
diff --git a/mozilla/calendar/providers/composite/calCompositeCalendar.js b/mozilla/calendar/providers/composite/calCompositeCalendar.js
index 3541f7db45c..7d8694b84a1 100644
--- a/mozilla/calendar/providers/composite/calCompositeCalendar.js
+++ b/mozilla/calendar/providers/composite/calCompositeCalendar.js
@@ -74,8 +74,8 @@ calCompositeCalendarObserverHelper.prototype = {
this.notifyObservers("onEndBatch");
},
- onLoad: function() {
- this.notifyObservers("onLoad");
+ onLoad: function(calendar) {
+ this.notifyObservers("onLoad", [calendar]);
},
onAddItem: function(aItem) {
diff --git a/mozilla/calendar/providers/gdata/components/calGoogleCalendar.js b/mozilla/calendar/providers/gdata/components/calGoogleCalendar.js
index 64c78675b46..5aac245707e 100644
--- a/mozilla/calendar/providers/gdata/components/calGoogleCalendar.js
+++ b/mozilla/calendar/providers/gdata/components/calGoogleCalendar.js
@@ -14,7 +14,7 @@
* The Original Code is Google Calendar Provider code.
*
* The Initial Developer of the Original Code is
- * Philipp Kewisch (mozilla@kewis.ch)
+ * Philipp Kewisch
* Portions created by the Initial Developer are Copyright (C) 2006
* the Initial Developer. All Rights Reserved.
*
@@ -99,25 +99,12 @@ calGoogleCalendar.prototype = {
/**
* readonly attribute googleCalendarName
* Google's Calendar name. This represents the in
- * http://www.google.com/calendar/feeds//private/full
+ * http[s]://www.google.com/calendar/feeds//private/full
*/
get googleCalendarName() {
return this.mCalendarName;
},
- /**
- * readonly attribute isDefaultCalendar
- * Returns true if this is the default calendar of the user.
- */
- get isDefaultCalendar() {
- // If there is no session, use the non-default calendar identifier as a
- // fallback.
- return ((this.mSession &&
- this.mCalendarName == this.mSession.googleUser) ||
- (!this.mSession &&
- this.mCalendarName.indexOf("group.calendar.google.com") < 0));
- },
-
/**
* attribute session
* An calGoogleSession Object that handles the session requests.
@@ -240,17 +227,9 @@ calGoogleCalendar.prototype = {
// Set internal Calendar Name
this.mCalendarName = decodeURIComponent(matches[2]);
- var ioService = Cc["@mozilla.org/network/io-service;1"].
- getService(Ci.nsIIOService);
-
- // Set normalized url. We need the full xml stream and private
- // access. We need private visibility and full projection
- this.mFullUri = ioService.newURI("http://www.google.com" +
- "/calendar/feeds/" +
- matches[2] +
- "/private/full",
- null,
- null);
+ // Set normalized url. We need private visibility and full projection
+ this.mFullUri = aUri.clone();
+ this.mFullUri.path = "/calendar/feeds/" + matches[2] + "/private/full";
// Remember the uri as it was passed, in case the calendar manager
// relies on it.
@@ -296,6 +275,9 @@ calGoogleCalendar.prototype = {
this.findSession();
}
+ // Add the calendar to the item, for later use.
+ aItem.calendar = this;
+
this.mSession.addItem(this,
aItem,
this.addItem_response,
@@ -351,7 +333,7 @@ calGoogleCalendar.prototype = {
// to google. This saves network traffic.
if (relevantFieldsMatch(aOldItem, aNewItem)) {
LOG("Not requesting item modification for " + aOldItem.id +
- "(" + aOldItem.title + "), relevant fields match");
+ "(" + aOldItem.title + "), relevant fields match");
if (aListener != null) {
aListener.onOperationComplete(this,
@@ -369,6 +351,7 @@ calGoogleCalendar.prototype = {
var extradata = { olditem: aOldItem, listener: aListener };
this.mSession.modifyItem(this,
+ aOldItem,
aNewItem,
this.modifyItem_response,
extradata);
@@ -565,8 +548,7 @@ calGoogleCalendar.prototype = {
var item = this.general_response(Ci.calIOperationListener.MODIFY,
aResult,
aStatus,
- aRequest.extraData.listener,
- aRequest);
+ aRequest.extraData.listener);
// Notify Observers
if (item) {
this.notifyObservers("onModifyItem",
@@ -640,7 +622,7 @@ calGoogleCalendar.prototype = {
this.general_response(Ci.calIOperationListener.GET,
aResult,
aStatus,
- aRequest.extraData.listener);
+ aRequest.extraData);
},
/**
diff --git a/mozilla/calendar/providers/gdata/components/calGoogleCalendarModule.js b/mozilla/calendar/providers/gdata/components/calGoogleCalendarModule.js
index 83625ca9d50..7a1ef80cbf7 100644
--- a/mozilla/calendar/providers/gdata/components/calGoogleCalendarModule.js
+++ b/mozilla/calendar/providers/gdata/components/calGoogleCalendarModule.js
@@ -71,8 +71,8 @@ var calGoogleCalendarModule = {
if (this.mUtilsLoaded)
return;
- const scripts = ["calGoogleCalendar.js", "calGoogleSession.js",
- "calUtils.js", "calGoogleRequest.js",
+ const scripts = ["calUtils.js","calGoogleCalendar.js",
+ "calGoogleSession.js", "calGoogleRequest.js",
"calGoogleUtils.js"];
var loader = Components.classes["@mozilla.org/moz/jssubscript-loader;1"]
diff --git a/mozilla/calendar/providers/gdata/components/calGoogleRequest.js b/mozilla/calendar/providers/gdata/components/calGoogleRequest.js
index 304d170a3f1..184ae61b0fe 100644
--- a/mozilla/calendar/providers/gdata/components/calGoogleRequest.js
+++ b/mozilla/calendar/providers/gdata/components/calGoogleRequest.js
@@ -14,7 +14,7 @@
* The Original Code is Google Calendar Provider code.
*
* The Initial Developer of the Original Code is
- * Philipp Kewisch (mozilla@kewis.ch)
+ * Philipp Kewisch
* Portions created by the Initial Developer are Copyright (C) 2006
* the Initial Developer. All Rights Reserved.
*
@@ -97,8 +97,6 @@ calGoogleRequest.prototype = {
this.mUriString = "https://www.google.com/accounts/ClientLogin";
break;
case this.META:
- this.uri = "http://www.google.com/calendar/feeds/" +
- encodeURIComponent(this.mSession.googleUser);
// Fall through
case this.GET:
this.mMethod = "GET";
@@ -229,7 +227,7 @@ calGoogleRequest.prototype = {
if (aSession) {
this.mSession = aSession;
if (this.mType == this.META) {
- this.mUriString = "http://www.google.com/calendar/feeds/"
+ this.mUriString = aSession.uri.prePath + "/calendar/feeds/"
+ encodeURIComponent(aSession.googleUser);
}
}
diff --git a/mozilla/calendar/providers/gdata/components/calGoogleSession.js b/mozilla/calendar/providers/gdata/components/calGoogleSession.js
index 156283a8eaf..757339251d7 100644
--- a/mozilla/calendar/providers/gdata/components/calGoogleSession.js
+++ b/mozilla/calendar/providers/gdata/components/calGoogleSession.js
@@ -431,13 +431,17 @@ calGoogleSession.prototype = {
*
* @param aCalendar An instance of calIGoogleCalendar this
* request belongs to.
- * @param aNewItem An instance of calIEvent to modify
+ * @param aOldItem The instance of calIEvent before
+ * modification.
+ * @param aNewItem The instance of calIEvent after
+ * modification.
* @param aResponseListener The function in aCalendar to call at
* completion.
* @param aExtraData Extra data to be passed to the response
* listener
*/
modifyItem: function cGS_modifyItem(aCalendar,
+ aOldItem,
aNewItem,
aResponseListener,
aExtraData) {
@@ -449,7 +453,7 @@ calGoogleSession.prototype = {
this.googleFullName);
request.type = request.MODIFY;
- request.uri = getItemEditURI(aNewItem);
+ request.uri = getItemEditURI(aOldItem);
request.setUploadData("application/atom+xml; charset=UTF-8", xmlEntry);
request.setResponseListener(aCalendar, aResponseListener);
request.extraData = aExtraData;
diff --git a/mozilla/calendar/providers/gdata/components/calGoogleUtils.js b/mozilla/calendar/providers/gdata/components/calGoogleUtils.js
index 1c612c617a3..f43ece0ec44 100644
--- a/mozilla/calendar/providers/gdata/components/calGoogleUtils.js
+++ b/mozilla/calendar/providers/gdata/components/calGoogleUtils.js
@@ -14,8 +14,8 @@
* The Original Code is Google Calendar Provider code.
*
* The Initial Developer of the Original Code is
- * Philipp Kewisch (mozilla@kewis.ch)
- * Portions created by the Initial Developer are Copyright (C) 2006
+ * Philipp Kewisch
+ * Portions created by the Initial Developer are Copyright (C) 2007
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
@@ -493,6 +493,7 @@ function ItemToXMLEntry(aItem, aAuthorEmail, aAuthorName) {
if (aItem.alarmOffset) {
var gdReminder = ;
var alarmOffset = aItem.alarmOffset.clone();
+
if (aItem.alarmRelated == Ci.calIItemBase.ALARM_RELATED_END) {
// Google always uses an alarm offset related to the start time
alarmOffset.addDuration(duration);
@@ -500,7 +501,7 @@ function ItemToXMLEntry(aItem, aAuthorEmail, aAuthorName) {
// Google only accepts certain alarm values. Snap to them. See
// http://code.google.com/p/google-gdata/issues/detail?id=55
- var alarmValues = [ 300, 600, 900, 1200, 1500, 1800, 2700, 3600, 7200,
+ const alarmValues = [ 300, 600, 900, 1200, 1500, 1800, 2700, 3600, 7200,
10800, 86400, 172800, 604800 ];
var discreteValue = alarmValues[alarmValues.length - 1] / 60;
@@ -512,43 +513,26 @@ function ItemToXMLEntry(aItem, aAuthorEmail, aAuthorName) {
}
gdReminder.@minutes = discreteValue;
+ gdReminder.@method = "alert";
entry.gd::when.gd::reminder += gdReminder;
}
- if (!aItem.calendar.isDefaultCalendar) {
- // On non-default calendars, alarms do not work as expected. This is
- // an error on Google's side. We are going to work around with an
- // extended property. After Google crippled alarm support,
- // non-default calendars will work even better regarding alarms - at
- // least in sunbird/lightning. See
- // http://code.google.com/p/google-gdata/issues/detail?id=20
-
- var gdExtendedReminder = ;
- var alarmTime;
- if (aItem.alarmOffset) {
- alarmTime = aItem.startDate.clone();
- alarmTime.addDuration(aItem.alarmOffset);
- }
-
- gdExtendedReminder.@name = "X-MOZ-ALARM-WORKAROUND";
- gdExtendedReminder.@value = toRFC3339(alarmTime);
-
- // Google has a bug where extendedProperty tags are not unset if the tag
- // is missing from the event feed. Therefore, set the tag in any case.
- entry.gd::extendedProperty += gdExtendedReminder;
+ // saved alarms
+ var otherAlarms = aItem.getProperty("X-GOOGLE-OTHERALARMS");
+ for each (var alarm in otherAlarms) {
+ entry.gd::when.gd::reminder += new XML(alarm);
}
- // XXX Google currently only supports one reminder. Nevertheless, according
- // to the Google Calendar API docs, snoozed events should be implemented by
- // a second gd:reminder element with an absolute time. This issue is tracked
- // at http://code.google.com/p/google-gdata/issues/detail?id=44
-
// gd:extendedProperty (alarmLastAck)
var gdAlarmLastAck = ;
gdAlarmLastAck.@name = "X-MOZ-LASTACK";
gdAlarmLastAck.@value = toRFC3339(aItem.alarmLastAck);
entry.gd::extendedProperty += gdAlarmLastAck;
+ // XXX Google now supports multiple alarms, but since the valid alarms are
+ // restricted to discrete values, using a normal alarm to snooze is pretty
+ // pointless.
+
// gd:extendedProperty (snooze time)
var gdAlarmSnoozeTime = ;
var itemSnoozeTime = aItem.getProperty("X-MOZ-SNOOZE-TIME");
@@ -658,7 +642,7 @@ function getItemEditURI(aItem) {
*
* @param aXMLEntry The xml data of the item
* @param aTimezone The timezone the event is most likely in
- * @param aCalendar The calendar the event will be added to. Can be null.
+ * @param aCalendar The calendar this item will belong to.
* @return The calIEvent with the item data.
*/
function XMLEntryToItem(aXMLEntry, aTimezone, aCalendar) {
@@ -681,8 +665,13 @@ function XMLEntryToItem(aXMLEntry, aTimezone, aCalendar) {
item.id = id.substring(id.lastIndexOf('/')+1);
// link
- item.setProperty("X-GOOGLE-EDITURL",
- aXMLEntry.link.(@rel == 'edit').@href.toString());
+ // Since Google doesn't set the edit url to be https if the request is
+ // https, we need to work around this here.
+ var editUrl = aXMLEntry.link.(@rel == 'edit').@href.toString();
+ if (aCalendar.uri.schemeIs("https")) {
+ editUrl = editUrl.replace(/^http:/, "https:");
+ }
+ item.setProperty("X-GOOGLE-EDITURL", editUrl);
// title
item.title = aXMLEntry.title.(@type == 'text');
@@ -730,49 +719,68 @@ function XMLEntryToItem(aXMLEntry, aTimezone, aCalendar) {
}
// gd:reminder
- var alarmOffset = Cc["@mozilla.org/calendar/duration;1"]
- .createInstance(Ci.calIDuration);
if (aXMLEntry.gd::originalEvent.toString().length > 0) {
// If the item is an occurrence, we cannot change it until bug
// 362650 has been fixed. For now, don't set alarms on
// occurrences.
continue;
- } else if (when.gd::reminder.@absoluteTime.toString()) {
- var absolute = fromRFC3339(when.gd::reminder.@absoluteTime,
- aTimezone);
- alarmOffset = startDate.subtractDate(absolute);
- } else if (when.gd::reminder.@days.toString()) {
- alarmOffset.days = -when.gd::reminder.@days;
- } else if (when.gd::reminder.@hours.toString()) {
- alarmOffset.hours = -when.gd::reminder.@hours;
- } else if (when.gd::reminder.@minutes.toString()) {
- // There is a bug in the Google API that always sets an alarm,
- // even if you didn't specify it. The value is always -1. See
- // http://code.google.com/p/google-gdata/issues/detail?id=43
- // As a workaround, ignore such reminders
- if (when.gd::reminder.@minutes == "-1") {
- continue;
- }
- alarmOffset.minutes = -when.gd::reminder.@minutes;
- } else {
- continue;
}
- alarmOffset.normalize();
- item.alarmOffset = alarmOffset;
- item.alarmRelated = Ci.calIItemBase.ALARM_RELATED_START;
- }
- // gd:extendedProperty (alarm workaround)
- if (!aCalendar.isDefaultCalendar) {
- var alarmTime = fromRFC3339(aXMLEntry.gd::extendedProperty
- .(@name == "X-MOZ-ALARM-WORKAROUND")
- .@value.toString(), aTimezone);
- if (alarmTime) {
- item.alarmOffset = alarmTime.subtractDate(item.startDate);
- item.alarmRelated = Ci.calIItemBase.ALARM_RELATED_START;
- } else {
- item.alarmOffset = null;
+ // Google's alarms are always related to the start
+ item.alarmRelated = Ci.calIItemBase.ALARM_RELATED_START;
+
+ var lastAlarm;
+ var otherAlarms = [];
+ for each (var reminder in when.gd::reminder) {
+ // We are only intrested in "alert" reminders. Other types
+ // include sms and email alerts, but thats not the point here.
+ if (reminder.@method == "alert") {
+ var alarmOffset = Cc["@mozilla.org/calendar/duration;1"]
+ .createInstance(Ci.calIDuration);
+
+ if (reminder.@absoluteTime.toString()) {
+ var absolute = fromRFC3339(reminder.@absoluteTime,
+ aTimezone);
+ alarmOffset = startDate.subtractDate(absolute);
+ } else if (reminder.@days.toString()) {
+ alarmOffset.days = -reminder.@days;
+ } else if (reminder.@hours.toString()) {
+ alarmOffset.hours = -reminder.@hours;
+ } else if (reminder.@minutes.toString()) {
+ alarmOffset.minutes = -reminder.@minutes;
+ } else {
+ continue;
+ }
+ alarmOffset.normalize();
+
+ // If there is more than one alarm, we could either take the
+ // alarm closest to the event or the alarm furthest to the
+ // event. Let the user decide (use a property)
+ var useClosest = getPrefSafe("calendar.google.alarmClosest",
+ true);
+ if (!item.alarmOffset ||
+ (useClosest &&
+ alarmOffset.compare(item.alarmOffset) > 0) ||
+ (!useClosest &&
+ alarmOffset.compare(item.alarmOffset) < 0)) {
+
+ item.alarmOffset = alarmOffset;
+ if (lastAlarm) {
+ // If there was already an alarm, then it is now one
+ // of the other alarms.
+ otherAlarms.push(lastAlarm.toXMLString());
+ }
+ lastAlarm = reminder;
+ // Don't push the reminder below, since we might be
+ // keeping this one as our item's alarmOffset.
+ continue;
+ }
+ }
+ otherAlarms.push(reminder.toXMLString());
}
+
+ // Save other alarms that were set so we don't loose them
+ item.setProperty("X-GOOGLE-OTHERALARMS", otherAlarms);
}
// gd:extendedProperty (alarmLastAck)
@@ -860,14 +868,6 @@ function XMLEntryToItem(aXMLEntry, aTimezone, aCalendar) {
"private").toUpperCase();
}
- // updated
- item.setProperty("LAST-MODIFIED", fromRFC3339(aXMLEntry.updated,
- aTimezone));
-
- // published
- item.setProperty("CREATED", fromRFC3339(aXMLEntry.published,
- aTimezone));
-
// category
var categories = new Array();
for each (var label in aXMLEntry.category.@label) {
@@ -879,6 +879,14 @@ function XMLEntryToItem(aXMLEntry, aTimezone, aCalendar) {
item.setProperty("X-GOOGLE-ITEM-IS-OCCURRENCE",
aXMLEntry.gd::originalEvent.toString().length > 0);
+ // published
+ item.setProperty("CREATED", fromRFC3339(aXMLEntry.published,
+ aTimezone));
+
+ // updated (This must be set last!)
+ item.setProperty("LAST-MODIFIED", fromRFC3339(aXMLEntry.updated,
+ aTimezone));
+
// TODO gd:recurrenceException: Enhancement tracked in bug 362650
// TODO gd:comments: Enhancement tracked in bug 362653
// TODO gd:who Enhancement tracked in bug 355226
diff --git a/mozilla/calendar/providers/gdata/install.rdf b/mozilla/calendar/providers/gdata/install.rdf
index 81dc38eb285..e0f376b8588 100644
--- a/mozilla/calendar/providers/gdata/install.rdf
+++ b/mozilla/calendar/providers/gdata/install.rdf
@@ -38,9 +38,9 @@
-
+
{a62ef8ec-5fdc-40c2-873c-223b8a6925cc}
- 0.1
+ 0.2
2
{718e30fb-e89b-41dd-9da7-e25a45638b28}
- 0.5pre
- 0.6a*
+ 0.4a1
+ 0.6a1
{3550f703-e582-4d05-9a08-453d09bdfdc6}
- 2.0*
+ 2.0a1
3.0a1
@@ -76,5 +76,5 @@
Philipp Kewisch
http://mozilla.kewis.ch/
chrome://gdata-provider/content/gcal.png
-
+
diff --git a/mozilla/calendar/providers/ics/calICSCalendar.js b/mozilla/calendar/providers/ics/calICSCalendar.js
index 88a79decb6c..3a3e5025ef5 100644
--- a/mozilla/calendar/providers/ics/calICSCalendar.js
+++ b/mozilla/calendar/providers/ics/calICSCalendar.js
@@ -170,12 +170,12 @@ calICSCalendar.prototype = {
this.refresh();
},
- refresh: function() {
- // Lock other changes to the item list.
- this.lock();
- // set to prevent writing after loading, without any changes
- this.loading = true;
+ refresh: function calICSCalendar_refresh() {
+ this.queue.push({action: 'refresh'});
+ this.processQueue();
+ },
+ doRefresh: function calICSCalendar_doRefresh() {
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
.getService(Components.interfaces.nsIIOService);
@@ -189,6 +189,10 @@ calICSCalendar.prototype = {
var streamLoader = Components.classes["@mozilla.org/network/stream-loader;1"]
.createInstance(Components.interfaces.nsIStreamLoader);
+
+ // Lock other changes to the item list.
+ this.lock();
+
try {
if (isOnBranch) {
streamLoader.init(channel, this, this);
@@ -268,7 +272,7 @@ calICSCalendar.prototype = {
this.mObserver.onError(e.result, e.toString());
}
this.mObserver.onEndBatch();
- this.mObserver.onLoad();
+ this.mObserver.onLoad(this);
// Now that all items have been stuffed into the memory calendar
// we should add ourselves as observer. It is important that this
@@ -358,8 +362,9 @@ calICSCalendar.prototype = {
listener.serializer.addProperty(prop);
}
- this.getItems(calICalendar.ITEM_FILTER_TYPE_ALL | calICalendar.ITEM_FILTER_COMPLETED_ALL,
- 0, null, null, listener);
+ // don't call this.getItems, because we are locked:
+ this.mMemoryCalendar.getItems(calICalendar.ITEM_FILTER_TYPE_ALL | calICalendar.ITEM_FILTER_COMPLETED_ALL,
+ 0, null, null, listener);
},
// nsIStreamListener impl
@@ -432,15 +437,18 @@ calICSCalendar.prototype = {
},
getItem: function (aId, aListener) {
- return this.mMemoryCalendar.getItem(aId, aListener);
+ this.queue.push({action:'get_item', id:aId, listener:aListener});
+ this.processQueue();
},
getItems: function (aItemFilter, aCount,
aRangeStart, aRangeEnd, aListener)
{
- return this.mMemoryCalendar.getItems(aItemFilter, aCount,
- aRangeStart, aRangeEnd,
- aListener);
+ this.queue.push({action:'get_items',
+ itemFilter:aItemFilter, count:aCount,
+ rangeStart:aRangeStart, rangeEnd:aRangeEnd,
+ listener:aListener});
+ this.processQueue();
},
processQueue: function ()
@@ -448,23 +456,53 @@ calICSCalendar.prototype = {
if (this.isLocked())
return;
var a;
- var hasItems = this.queue.length;
+ var writeICS = false;
+ var refreshAction = null;
while ((a = this.queue.shift())) {
switch (a.action) {
case 'add':
this.mMemoryCalendar.addItem(a.item, a.listener);
+ writeICS = true;
break;
case 'modify':
this.mMemoryCalendar.modifyItem(a.newItem, a.oldItem,
a.listener);
+ writeICS = true;
break;
case 'delete':
this.mMemoryCalendar.deleteItem(a.item, a.listener);
+ writeICS = true;
+ break;
+ case 'get_item':
+ this.mMemoryCalendar.getItem(a.id, a.listener);
+ break;
+ case 'get_items':
+ this.mMemoryCalendar.getItems(a.itemFilter, a.count,
+ a.rangeStart, a.rangeEnd,
+ a.listener);
+ break;
+ case 'refresh':
+ refreshAction = a;
break;
}
+ if (refreshAction) {
+ // break queue processing here and wait for refresh to finish
+ // before processing further operations
+ break;
+ }
}
- if (hasItems)
+ if (writeICS) {
+ if (refreshAction) {
+ // reschedule the refresh for next round, after the file has been written;
+ // strictly we may not need to refresh once the file has been successfully
+ // written, but we don't know if that write will succeed.
+ this.queue.unshift(refreshAction);
+ }
this.writeICS();
+ }
+ else if (refreshAction) {
+ this.doRefresh();
+ }
},
lock: function () {
@@ -740,9 +778,9 @@ calICSObserver.prototype = {
this.mInBatch = false;
},
- onLoad: function() {
+ onLoad: function(calendar) {
for (var i = 0; i < this.mObservers.length; i++)
- this.mObservers[i].onLoad();
+ this.mObservers[i].onLoad(calendar);
},
onAddItem: function(aItem) {
for (var i = 0; i < this.mObservers.length; i++)
diff --git a/mozilla/calendar/providers/storage/calStorageCalendar.js b/mozilla/calendar/providers/storage/calStorageCalendar.js
index e06a03eb6aa..b46e4a20a95 100644
--- a/mozilla/calendar/providers/storage/calStorageCalendar.js
+++ b/mozilla/calendar/providers/storage/calStorageCalendar.js
@@ -843,7 +843,7 @@ calStorageCalendar.prototype = {
//
observeLoad: function () {
for each (obs in this.mObservers)
- obs.onLoad ();
+ obs.onLoad (this);
},
observeBatchChange: function (aNewBatchMode) {
diff --git a/mozilla/calendar/providers/storage/schema-4.sql b/mozilla/calendar/providers/storage/schema-4.sql
new file mode 100755
index 00000000000..70f27c7183d
--- /dev/null
+++ b/mozilla/calendar/providers/storage/schema-4.sql
@@ -0,0 +1,100 @@
+CREATE TABLE cal_calendar_schema_version (
+ version INTEGER
+);
+
+CREATE TABLE cal_calendars (
+ id INTEGER PRIMARY KEY,
+ type STRING,
+ uri STRING
+);
+
+CREATE TABLE cal_calendars_prefs (
+ id INTEGER PRIMARY KEY,
+ calendar INTEGER,
+ name STRING,
+ value STRING
+);
+
+CREATE TABLE cal_events (
+ cal_id INTEGER,
+ id STRING,
+ time_created INTEGER,
+ last_modified INTEGER,
+ title STRING,
+ priority INTEGER,
+ privacy STRING,
+ ical_status STRING,
+ recurrence_id INTEGER,
+ recurrence_id_tz VARCHAR,
+ flags INTEGER,
+ event_start INTEGER,
+ event_start_tz VARCHAR,
+ event_end INTEGER,
+ event_end_tz VARCHAR,
+ event_stamp INTEGER,
+ alarm_time INTEGER,
+ alarm_time_tz VARCHAR
+);
+
+CREATE TABLE cal_todos (
+ cal_id INTEGER,
+ id STRING,
+ time_created INTEGER,
+ last_modified INTEGER,
+ title STRING,
+ priority INTEGER,
+ privacy STRING,
+ ical_status STRING,
+ recurrence_id INTEGER,
+ recurrence_id_tz VARCHAR,
+ flags INTEGER,
+ todo_entry INTEGER,
+ todo_entry_tz VARCHAR,
+ todo_due INTEGER,
+ todo_due_tz VARCHAR,
+ todo_completed INTEGER,
+ todo_completed_tz VARCHAR,
+ todo_complete INTEGER,
+ alarm_time INTEGER,
+ alarm_time_tz VARCHAR
+);
+
+CREATE TABLE cal_attendees (
+ item_id STRING,
+ recurrence_id INTEGER,
+ recurrence_id_tz VARCHAR,
+ attendee_id STRING,
+ common_name STRING,
+ rsvp INTEGER,
+ role STRING,
+ status STRING,
+ type STRING
+);
+
+CREATE TABLE cal_recurrence (
+ item_id STRING,
+ recur_index INTEGER,
+ recur_type STRING,
+ is_negative BOOLEAN,
+ dates STRING,
+ count INTEGER,
+ end_date INTEGER,
+ interval INTEGER,
+ second STRING,
+ minute STRING,
+ hour STRING,
+ day STRING,
+ monthday STRING,
+ yearday STRING,
+ weekno STRING,
+ month STRING,
+ setpos STRING
+);
+
+CREATE TABLE cal_properties (
+ item_id STRING,
+ recurrence_id INTEGER,
+ recurrence_id_tz VARCHAR,
+ key STRING,
+ value BLOB
+);
diff --git a/mozilla/calendar/providers/storage/schema-5.sql b/mozilla/calendar/providers/storage/schema-5.sql
new file mode 100755
index 00000000000..21f1ddbc52c
--- /dev/null
+++ b/mozilla/calendar/providers/storage/schema-5.sql
@@ -0,0 +1,106 @@
+CREATE TABLE cal_calendar_schema_version (
+ version INTEGER
+);
+
+CREATE TABLE cal_calendars (
+ id INTEGER PRIMARY KEY,
+ type STRING,
+ uri STRING
+);
+
+CREATE TABLE cal_calendars_prefs (
+ id INTEGER PRIMARY KEY,
+ calendar INTEGER,
+ name STRING,
+ value STRING
+);
+
+CREATE TABLE cal_events (
+ cal_id INTEGER,
+ id STRING,
+ time_created INTEGER,
+ last_modified INTEGER,
+ title STRING,
+ priority INTEGER,
+ privacy STRING,
+ ical_status STRING,
+ recurrence_id INTEGER,
+ recurrence_id_tz VARCHAR,
+ flags INTEGER,
+ event_start INTEGER,
+ event_start_tz VARCHAR,
+ event_end INTEGER,
+ event_end_tz VARCHAR,
+ event_stamp INTEGER,
+ alarm_time INTEGER,
+ alarm_time_tz VARCHAR,
+ alarm_offset INTEGER,
+ alarm_related INTEGER,
+ alarm_last_ack INTEGER
+);
+
+CREATE TABLE cal_todos (
+ cal_id INTEGER,
+ id STRING,
+ time_created INTEGER,
+ last_modified INTEGER,
+ title STRING,
+ priority INTEGER,
+ privacy STRING,
+ ical_status STRING,
+ recurrence_id INTEGER,
+ recurrence_id_tz VARCHAR,
+ flags INTEGER,
+ todo_entry INTEGER,
+ todo_entry_tz VARCHAR,
+ todo_due INTEGER,
+ todo_due_tz VARCHAR,
+ todo_completed INTEGER,
+ todo_completed_tz VARCHAR,
+ todo_complete INTEGER,
+ alarm_time INTEGER,
+ alarm_time_tz VARCHAR,
+ alarm_offset INTEGER,
+ alarm_related INTEGER,
+ alarm_last_ack INTEGER
+);
+
+CREATE TABLE cal_attendees (
+ item_id STRING,
+ recurrence_id INTEGER,
+ recurrence_id_tz VARCHAR,
+ attendee_id STRING,
+ common_name STRING,
+ rsvp INTEGER,
+ role STRING,
+ status STRING,
+ type STRING
+);
+
+CREATE TABLE cal_recurrence (
+ item_id STRING,
+ recur_index INTEGER,
+ recur_type STRING,
+ is_negative BOOLEAN,
+ dates STRING,
+ count INTEGER,
+ end_date INTEGER,
+ interval INTEGER,
+ second STRING,
+ minute STRING,
+ hour STRING,
+ day STRING,
+ monthday STRING,
+ yearday STRING,
+ weekno STRING,
+ month STRING,
+ setpos STRING
+);
+
+CREATE TABLE cal_properties (
+ item_id STRING,
+ recurrence_id INTEGER,
+ recurrence_id_tz VARCHAR,
+ key STRING,
+ value BLOB
+);
diff --git a/mozilla/calendar/providers/storage/schema-6.sql b/mozilla/calendar/providers/storage/schema-6.sql
new file mode 100755
index 00000000000..49160820cdb
--- /dev/null
+++ b/mozilla/calendar/providers/storage/schema-6.sql
@@ -0,0 +1,106 @@
+CREATE TABLE cal_calendar_schema_version (
+ version INTEGER
+);
+
+CREATE TABLE cal_calendars (
+ id INTEGER PRIMARY KEY,
+ type TEXT,
+ uri TEXT
+);
+
+CREATE TABLE cal_calendars_prefs (
+ id INTEGER PRIMARY KEY,
+ calendar INTEGER,
+ name TEXT,
+ value TEXT
+);
+
+CREATE TABLE cal_events (
+ cal_id INTEGER,
+ id TEXT,
+ time_created INTEGER,
+ last_modified INTEGER,
+ title TEXT,
+ priority INTEGER,
+ privacy TEXT,
+ ical_status TEXT,
+ recurrence_id INTEGER,
+ recurrence_id_tz TEXT,
+ flags INTEGER,
+ event_start INTEGER,
+ event_start_tz TEXT,
+ event_end INTEGER,
+ event_end_tz TEXT,
+ event_stamp INTEGER,
+ alarm_time INTEGER,
+ alarm_time_tz TEXT,
+ alarm_offset INTEGER,
+ alarm_related INTEGER,
+ alarm_last_ack INTEGER
+);
+
+CREATE TABLE cal_todos (
+ cal_id INTEGER,
+ id TEXT,
+ time_created INTEGER,
+ last_modified INTEGER,
+ title TEXT,
+ priority INTEGER,
+ privacy TEXT,
+ ical_status TEXT,
+ recurrence_id INTEGER,
+ recurrence_id_tz TEXT,
+ flags INTEGER,
+ todo_entry INTEGER,
+ todo_entry_tz TEXT,
+ todo_due INTEGER,
+ todo_due_tz TEXT,
+ todo_completed INTEGER,
+ todo_completed_tz TEXT,
+ todo_complete INTEGER,
+ alarm_time INTEGER,
+ alarm_time_tz TEXT,
+ alarm_offset INTEGER,
+ alarm_related INTEGER,
+ alarm_last_ack INTEGER
+);
+
+CREATE TABLE cal_attendees (
+ item_id TEXT,
+ recurrence_id INTEGER,
+ recurrence_id_tz TEXT,
+ attendee_id TEXT,
+ common_name TEXT,
+ rsvp INTEGER,
+ role TEXT,
+ status TEXT,
+ type TEXT
+);
+
+CREATE TABLE cal_recurrence (
+ item_id TEXT,
+ recur_index INTEGER,
+ recur_type TEXT,
+ is_negative BOOLEAN,
+ dates TEXT,
+ count INTEGER,
+ end_date INTEGER,
+ interval INTEGER,
+ second TEXT,
+ minute TEXT,
+ hour TEXT,
+ day TEXT,
+ monthday TEXT,
+ yearday TEXT,
+ weekno TEXT,
+ month TEXT,
+ setpos TEXT
+);
+
+CREATE TABLE cal_properties (
+ item_id TEXT,
+ recurrence_id INTEGER,
+ recurrence_id_tz TEXT,
+ key TEXT,
+ value BLOB
+);
diff --git a/mozilla/calendar/providers/storage/schema-7.sql b/mozilla/calendar/providers/storage/schema-7.sql
new file mode 100755
index 00000000000..4208705c69d
--- /dev/null
+++ b/mozilla/calendar/providers/storage/schema-7.sql
@@ -0,0 +1,166 @@
+CREATE TABLE cal_calendar_schema_version (
+ version INTEGER
+);
+
+CREATE TABLE cal_calendars (
+ id INTEGER PRIMARY KEY,
+ type TEXT,
+ uri TEXT
+);
+
+CREATE TABLE cal_calendars_prefs (
+ --
+ -- defines arbitrary preferences for a calendar
+ -- e.g. name, color, visibility status
+ --
+ id INTEGER PRIMARY KEY,
+ calendar INTEGER, -- REFERENCES cal_calendars.id
+ name TEXT,
+ value TEXT
+);
+
+CREATE TABLE cal_events (
+ --
+ -- defines an Event calendar component
+ --
+ cal_id INTEGER, -- REFERENCES cal_calendars.id
+
+ -- ItemBase bits
+ id TEXT,
+ time_created INTEGER,
+ last_modified INTEGER,
+ title TEXT,
+ priority INTEGER,
+ privacy TEXT,
+
+ ical_status TEXT,
+ recurrence_id INTEGER,
+ recurrence_id_tz TEXT,
+
+ -- CAL_ITEM_FLAG_PRIVATE = 1
+ -- CAL_ITEM_FLAG_HAS_ATTENDEES = 2
+ -- CAL_ITEM_FLAG_HAS_PROPERTIES = 4
+ -- CAL_ITEM_FLAG_EVENT_ALLDAY = 8
+ -- CAL_ITEM_FLAG_HAS_RECURRENCE = 16
+ -- CAL_ITEM_FLAG_HAS_EXCEPTIONS = 32
+ flags INTEGER,
+
+ -- Event bits
+ event_start INTEGER,
+ event_start_tz TEXT,
+ event_end INTEGER,
+ event_end_tz TEXT,
+ event_stamp INTEGER,
+
+ -- Alarm bits
+ alarm_time INTEGER,
+ alarm_time_tz TEXT,
+ alarm_offset INTEGER,
+ alarm_related INTEGER,
+ alarm_last_ack INTEGER
+);
+
+CREATE TABLE cal_todos (
+ --
+ -- defines a Todo/Task calendar component
+ --
+ cal_id INTEGER, -- REFERENCES cal_calendars.id
+
+ -- ItemBase bits
+ id TEXT,
+ time_created INTEGER,
+ last_modified INTEGER,
+ title TEXT,
+ priority INTEGER,
+ privacy TEXT,
+
+ ical_status TEXT,
+ recurrence_id INTEGER,
+ recurrence_id_tz TEXT,
+
+ -- CAL_ITEM_FLAG_PRIVATE = 1
+ -- CAL_ITEM_FLAG_HAS_ATTENDEES = 2
+ -- CAL_ITEM_FLAG_HAS_PROPERTIES = 4
+ -- CAL_ITEM_FLAG_EVENT_ALLDAY = 8
+ -- CAL_ITEM_FLAG_HAS_RECURRENCE = 16
+ -- CAL_ITEM_FLAG_HAS_EXCEPTIONS = 32
+ flags INTEGER,
+
+ -- Todo bits
+ todo_entry INTEGER, -- date the todo is to be displayed
+ todo_entry_tz TEXT,
+ todo_due INTEGER, -- date the todo is due
+ todo_due_tz TEXT,
+ todo_completed INTEGER, -- date the todo is completed
+ todo_completed_tz TEXT,
+ todo_complete INTEGER, -- percent the todo is complete (0-100)
+
+ -- Alarm bits
+ alarm_time INTEGER,
+ alarm_time_tz TEXT,
+ alarm_offset INTEGER,
+ alarm_related INTEGER,
+ alarm_last_ack INTEGER
+);
+
+CREATE TABLE cal_attendees (
+ --
+ -- defines an "Attendee" within a calendar component
+ --
+ item_id TEXT, -- REFERENCES cal_events.id respectively cal_todos.id
+ recurrence_id INTEGER,
+ recurrence_id_tz TEXT,
+ attendee_id TEXT, -- ID, e.g. "mailto:jsmith@host.com"
+ common_name TEXT, -- CN, e.g. "John Smith" or "jsmith@host.com"
+ rsvp INTEGER, -- RSVP expectation
+ role TEXT, -- participation role, e.g. "REQ-PARTICIPANT"
+ status TEXT, -- participation status
+ type TEXT
+);
+
+CREATE TABLE cal_recurrence (
+ --
+ -- defines an "Recurrence Rule" within a calendar component
+ --
+ item_id TEXT, -- REFERENCES cal_events.id respectively cal_todos.id
+ recur_index INTEGER, -- the index in the recurrence array of this thing
+ recur_type TEXT, -- values from calIRecurrenceInfo; if null, date-based
+
+ is_negative BOOLEAN,
+
+ --
+ -- these are for date-based recurrence
+ --
+
+ dates TEXT, -- comma-separated list of dates
+
+ --
+ -- these are for rule-based recurrence
+ --
+ count INTEGER,
+ end_date INTEGER,
+ interval INTEGER,
+
+ -- components, comma-separated list or null
+ second TEXT,
+ minute TEXT,
+ hour TEXT,
+ day TEXT,
+ monthday TEXT,
+ yearday TEXT,
+ weekno TEXT,
+ month TEXT,
+ setpos TEXT
+);
+
+CREATE TABLE cal_properties (
+ --
+ -- defines arbitrary property within a calendar component
+ -- e.g. DESCRIPTION, LOCATION, URL,
+ --
+ item_id TEXT, -- REFERENCES cal_events.id respectively cal_todos.id
+ recurrence_id INTEGER,
+ recurrence_id_tz TEXT,
+ key TEXT,
+ value BLOB
+);
diff --git a/mozilla/calendar/providers/wcap/Makefile.in b/mozilla/calendar/providers/wcap/Makefile.in
index 74e565d1f83..25b16372b93 100644
--- a/mozilla/calendar/providers/wcap/Makefile.in
+++ b/mozilla/calendar/providers/wcap/Makefile.in
@@ -1,27 +1,25 @@
-#
# ***** 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/
+# 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.
+# 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 Original Code is Sun Microsystems code.
#
-# The Initial Developer of the Original Code is Sun Microsystems, Inc.
-# Portions created by Sun Microsystems are Copyright (C) 2006 Sun
-# Microsystems, Inc. All Rights Reserved.
-#
-# Original Author: Daniel Boelzle (daniel.boelzle@sun.com)
+# The Initial Developer of the Original Code is
+# Sun Microsystems, Inc.
+# Portions created by the Initial Developer are Copyright (C) 2007
+# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
-#
+# Daniel Boelzle
#
# 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
@@ -29,11 +27,11 @@
# 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 NPL, indicate your
+# 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 NPL, the GPL or the LGPL.
+# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
diff --git a/mozilla/calendar/providers/wcap/calWcapCachedCalendar.js b/mozilla/calendar/providers/wcap/calWcapCachedCalendar.js
index 3e661683676..fc443546209 100644
--- a/mozilla/calendar/providers/wcap/calWcapCachedCalendar.js
+++ b/mozilla/calendar/providers/wcap/calWcapCachedCalendar.js
@@ -1,27 +1,26 @@
-/* -*- Mode: javascript; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: javascript; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 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 the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
+ * 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.
+ * 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 Original Code is Sun Microsystems code.
*
- * The Initial Developer of the Original Code is Sun Microsystems, Inc.
- * Portions created by Sun Microsystems are Copyright (C) 2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * Original Author: Daniel Boelzle (daniel.boelzle@sun.com)
+ * The Initial Developer of the Original Code is
+ * Sun Microsystems, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- *
+ * Daniel Boelzle
*
* 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
@@ -29,11 +28,11 @@
* 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 NPL, indicate your
+ * 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 NPL, the GPL or the LGPL.
+ * the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
diff --git a/mozilla/calendar/providers/wcap/calWcapCalendar.js b/mozilla/calendar/providers/wcap/calWcapCalendar.js
index 40f95244740..68b400ff1dd 100644
--- a/mozilla/calendar/providers/wcap/calWcapCalendar.js
+++ b/mozilla/calendar/providers/wcap/calWcapCalendar.js
@@ -1,27 +1,26 @@
-/* -*- Mode: javascript; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: javascript; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 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 the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
+ * 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.
+ * 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 Original Code is Sun Microsystems code.
*
- * The Initial Developer of the Original Code is Sun Microsystems, Inc.
- * Portions created by Sun Microsystems are Copyright (C) 2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * Original Author: Daniel Boelzle (daniel.boelzle@sun.com)
+ * The Initial Developer of the Original Code is
+ * Sun Microsystems, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- *
+ * Daniel Boelzle
*
* 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
@@ -29,11 +28,11 @@
* 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 NPL, indicate your
+ * 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 NPL, the GPL or the LGPL.
+ * the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
diff --git a/mozilla/calendar/providers/wcap/calWcapCalendarItems.js b/mozilla/calendar/providers/wcap/calWcapCalendarItems.js
index 4d26be2e068..76f001103b2 100644
--- a/mozilla/calendar/providers/wcap/calWcapCalendarItems.js
+++ b/mozilla/calendar/providers/wcap/calWcapCalendarItems.js
@@ -1,27 +1,26 @@
-/* -*- Mode: javascript; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: javascript; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 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 the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
+ * 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.
+ * 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 Original Code is Sun Microsystems code.
*
- * The Initial Developer of the Original Code is Sun Microsystems, Inc.
- * Portions created by Sun Microsystems are Copyright (C) 2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * Original Author: Daniel Boelzle (daniel.boelzle@sun.com)
+ * The Initial Developer of the Original Code is
+ * Sun Microsystems, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- *
+ * Daniel Boelzle
*
* 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
@@ -29,11 +28,11 @@
* 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 NPL, indicate your
+ * 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 NPL, the GPL or the LGPL.
+ * the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
@@ -286,6 +285,12 @@ function diffProperty(newItem, oldItem, propName) {
return val;
}
+const METHOD_PUBLISH = 1;
+const METHOD_REQUEST = 2;
+const METHOD_REPLY = 4;
+const METHOD_CANCEL = 8;
+const METHOD_UPDATE = 256;
+
calWcapCalendar.prototype.storeItem =
function calWcapCalendar_storeItem(bAddItem, item, oldItem, request, netRespFunc)
{
@@ -293,13 +298,13 @@ function calWcapCalendar_storeItem(bAddItem, item, oldItem, request, netRespFunc
var bIsEvent = isEvent(item);
var bIsParent = isParent(item);
- var bAttendeeReply = false;
- var bOrgRequest = false;
+ var method = METHOD_PUBLISH;
+ var bNoSmtpNotify = false;
var params = "";
var calId = this.calId;
if (this.isInvitation(item)) { // REPLY
- bAttendeeReply = true;
+ method = METHOD_REPLY;
var att = getAttendeeByCalId(item.getAttendees({}), calId);
if (att) {
log("attendee: " + att.icalProperty.icalString, this);
@@ -378,19 +383,30 @@ function calWcapCalendar_storeItem(bAddItem, item, oldItem, request, netRespFunc
}
}
+ function getOrgId(item) {
+ return (item && item.organizer && item.organizer.id ? item.organizer.id : null);
+ }
+ var orgCalId = getCalId(item.organizer);
+ // xxx todo: mbu initially sets this ownerId:
+ if (!orgCalId) {
+ var orgId = getOrgId(item);
+ if (!orgId || (orgId == this.ownerId))
+ orgCalId = calId; // patch to this calid
+ }
+
var attendees = item.getAttendees({});
if (attendees.length > 0) {
- // xxx todo: why ever, X-S1CS-EMAIL is unsupported though documented
- // for calprops... WTF.
- bOrgRequest = true;
+ // xxx todo: why ever, X-S1CS-EMAIL is unsupported though documented for calprops... WTF.
function encodeAttendees(atts) {
- function stringSort(one, two) {
+ function attendeeSort(one, two) {
+ one = one.id;
+ two = two.id;
if (one == two)
return 0;
return (one < two ? -1 : 1);
}
atts = atts.concat([]);
- atts.sort(stringSort);
+ atts.sort(attendeeSort);
var ret = "";
for (var i = 0; i < atts.length; ++i) {
if (ret.length > 0)
@@ -401,15 +417,30 @@ function calWcapCalendar_storeItem(bAddItem, item, oldItem, request, netRespFunc
}
var attParam = encodeAttendees(attendees);
if (!oldItem || attParam != encodeAttendees(oldItem.getAttendees({}))) {
- params += ("&orgCalid=" + encodeURIComponent(calId));
params += ("&attendees=" + attParam);
}
- }
- // else using just PUBLISH (method=1)
+
+ if (orgCalId == calId)
+ method = METHOD_REQUEST;
+ else {
+ method = METHOD_UPDATE;
+ bNoSmtpNotify = true;
+ }
+ } // else using just PUBLISH
else if (oldItem && oldItem.getAttendees({}).length > 0) {
params += "&attendees="; // clear attendees
}
+ if (orgCalId) {
+ if (!oldItem || (orgCalId != getCalId(oldItem.organizer)))
+ params += ("&orgCalid=" + encodeURIComponent(orgCalId));
+ }
+ else { // might be a copy of an iTIP invitation:
+ var orgEmail = getOrgId(item);
+ if (!oldItem || (getOrgId(oldItem) != orgEmail))
+ params += ("&orgEmail=" + encodeURIComponent(orgEmail));
+ }
+
var val = item.title;
if (!oldItem || val != oldItem.title)
params += ("&summary=" + encodeURIComponent(val));
@@ -486,6 +517,8 @@ function calWcapCalendar_storeItem(bAddItem, item, oldItem, request, netRespFunc
for each (var att in attachements) {
if (typeof(att) == "string")
strings.push(encodeURIComponent(att));
+ else if (att instanceof Components.interfaces.calIAttachment)
+ strings.push(encodeURIComponent(att.uri.spec));
else // xxx todo
logError("only URLs supported as attachment, not: " + att, this_);
}
@@ -505,9 +538,9 @@ function calWcapCalendar_storeItem(bAddItem, item, oldItem, request, netRespFunc
var alarmParams = this.getAlarmParams(item);
if (!oldItem || (this.getAlarmParams(oldItem) != alarmParams)) {
- if (bOrgRequest && params.length == 0) {
+ if ((method == METHOD_REQUEST) && params.length == 0) {
// assure no email notifications about this change:
- params += "&smtp=0&smtpNotify=0";
+ bNoSmtpNotify = true;
}
params += alarmParams;
}
@@ -546,12 +579,10 @@ function calWcapCalendar_storeItem(bAddItem, item, oldItem, request, netRespFunc
params += ("&mod=1&rid=" + getIcalUTC(rid)); // THIS INSTANCE
}
- if (bOrgRequest)
- params += "&method=2"; // REQUEST
- else if (bAttendeeReply)
- params += "&method=4"; // REPLY
- // else PUBLISH (default)
-
+ params += ("&method=" + method);
+ if (bNoSmtpNotify) {
+ params += "&smtp=0&smtpNotify=0¬ify=0";
+ }
params += "&replace=1"; // (update) don't append to any lists
params += "&fetch=1&relativealarm=1&compressed=1&recurring=1";
params += "&emailorcalid=1&fmt-out=text%2Fcalendar";
@@ -747,6 +778,13 @@ function calWcapCalendar_deleteItem(item, listener)
}
params += ("&mod=1&rid=" + getIcalUTC(rid));
}
+
+ var orgCalId = getCalId(item.organizer);
+ if (!orgCalId || (orgCalId != this.calId)) {
+ // item does not belong to this user, so son't notify:
+ params += "&smtp=0&smtpNotify=0¬ify=0";
+ }
+
params += "&fmt-out=text%2Fxml";
this.issueNetworkRequest(
@@ -954,79 +992,78 @@ calWcapCalendar.prototype.parseItems = function calWcapCalendar_parseItems(
return items;
};
-// calWcapCalendar.prototype.getItem = function( id, listener )
-// {
-// // xxx todo: test
-// // xxx todo: howto detect whether to call
-// // fetchevents_by_id ot fetchtodos_by_id?
-// // currently drag/drop is implemented for events only,
-// // try events first, fallback to todos... in the future...
-// this.log( ">>>>>>>>>>>>>>>> getItem() call!");
-// try {
-// this.assureAccess(calIWcapCalendar.AC_COMP_READ);
+calWcapCalendar.prototype.getItem =
+function calWcapCalendar_getItem(id, listener)
+{
+ // xxx todo: test
+ // xxx todo: howto detect whether to call
+ // fetchevents_by_id ot fetchtodos_by_id?
+ // currently drag/drop is implemented for events only,
+ // try events first, fallback to todos... in the future...
+
+ var this_ = this;
+ var request = new calWcapRequest(
+ function getItem_resp(request, err, item) {
+ if (listener) {
+ listener.onOperationComplete(
+ this_.superCalendar, getResultCode(err),
+ calIOperationListener.GET,
+ item.id, err ? err : item);
+ }
+ if (err)
+ this_.notifyError(err);
+ },
+ log("getItem() call: id=" + id, this));
+
+ try {
+ if (!id)
+ throw new Components.Exception("no item id!");
+ var params = "&relativealarm=1&compressed=1&recurring=1";
+ params += "&emailorcalid=1&fmt-out=text%2Fcalendar&uid=";
+ params += encodeURIComponent(id);
-// var this_ = this;
-// var syncResponseFunc = function( wcapResponse ) {
-// var icalRootComp = wcapResponse.data; // first statement, may throw
-// var items = this_.parseItems(
-// icalRootComp,
-// calICalendar.ITEM_FILTER_ALL_ITEMS,
-// 1, null, null );
-// if (items.length < 1)
-// throw new Components.Exception("no such item!");
-// if (items.length > 1) {
-// this_.notifyError(
-// "unexpected number of items: " + items.length );
-// }
-// item = items[0];
-// if (listener) {
-// listener.onGetResult(
-// this_.superCalendar, NS_OK,
-// calIItemBase,
-// log("getItem(): success.", this_),
-// items.length, items );
-// listener.onOperationComplete(
-// this_.superCalendar, NS_OK,
-// calIOperationListener.GET,
-// items.length == 1 ? items[0].id : null, null );
-// this_.log( "item delivered." );
-// }
-// };
-
-// var params = ("&relativealarm=1&compressed=1&recurring=1" +
-// "&emailorcalid=1&fmt-out=text%2Fcalendar");
-// params += ("&uid=" + encodeURIComponent(id));
-// try {
-// // xxx todo!!!!
-
-// // most common: event
-// this.session.issueSyncRequest(
-// this.getCommandUrl( "fetchevents_by_id" ) + params,
-// stringToIcal, syncResponseFunc );
-// }
-// catch (exc) {
-// // try again, may be a task:
-// this.session.issueSyncRequest(
-// this.getCommandUrl( "fetchtodos_by_id" ) + params,
-// stringToIcal, syncResponseFunc );
-// }
-// }
-// catch (exc) {
-// if (listener != null) {
-// listener.onOperationComplete(
-// this.superCalendar, Components.results.NS_ERROR_FAILURE,
-// calIOperationListener.GET,
-// null, exc );
-// }
-// if (getResultCode(exc) == calIWcapErrors.WCAP_LOGIN_FAILED) {
-// // silently ignore login failed, no calIObserver UI:
-// this.logError( "getItem() ignored: " + errorToString(exc) );
-// }
-// else
-// this.notifyError( exc );
-// }
-// this.log( "getItem() returning." );
-// };
+ function notifyResult(icalRootComp) {
+ var items = this_.parseItems(icalRootComp, calICalendar.ITEM_FILTER_ALL_ITEMS, 0, null, null);
+ if (items.length < 1)
+ throw new Components.Exception("no such item!");
+ if (items.length > 1)
+ this_.notifyError("unexpected number of items: " + items.length);
+ if (listener) {
+ listener.onGetResult(
+ this_.superCalendar, NS_OK,
+ calIItemBase, log("getItem(): success. id=" + id, this_),
+ items.length, items);
+ }
+ request.execRespFunc(null, items[0]);
+ };
+ // most common: try events first
+ this.issueNetworkRequest(
+ request,
+ function fetchEventById_resp(err, icalRootComp) {
+ if (err) {
+ if (getResultCode(err) != calIWcapErrors.WCAP_FETCH_EVENTS_BY_ID_FAILED)
+ throw err;
+ // try todos:
+ this_.issueNetworkRequest(
+ request,
+ function fetchTodosById_resp(err, icalRootComp) {
+ if (err)
+ throw err;
+ notifyResult(icalRootComp);
+ },
+ stringToIcal, "fetchtodos_by_id", params, calIWcapCalendar.AC_COMP_READ);
+ }
+ else {
+ notifyResult(icalRootComp);
+ }
+ },
+ stringToIcal, "fetchevents_by_id", params, calIWcapCalendar.AC_COMP_READ);
+ }
+ catch (exc) {
+ request.execRespFunc(exc);
+ }
+ return request;
+};
function getItemFilterParams(itemFilter)
{
diff --git a/mozilla/calendar/providers/wcap/calWcapCalendarModule.js b/mozilla/calendar/providers/wcap/calWcapCalendarModule.js
index 4eeee207a79..c23a00f4014 100644
--- a/mozilla/calendar/providers/wcap/calWcapCalendarModule.js
+++ b/mozilla/calendar/providers/wcap/calWcapCalendarModule.js
@@ -1,27 +1,26 @@
-/* -*- Mode: javascript; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: javascript; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 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 the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
+ * 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.
+ * 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 Original Code is Sun Microsystems code.
*
- * The Initial Developer of the Original Code is Sun Microsystems, Inc.
- * Portions created by Sun Microsystems are Copyright (C) 2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * Original Author: Daniel Boelzle (daniel.boelzle@sun.com)
+ * The Initial Developer of the Original Code is
+ * Sun Microsystems, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- *
+ * Daniel Boelzle
*
* 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
@@ -29,11 +28,11 @@
* 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 NPL, indicate your
+ * 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 NPL, the GPL or the LGPL.
+ * the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
diff --git a/mozilla/calendar/providers/wcap/calWcapErrors.js b/mozilla/calendar/providers/wcap/calWcapErrors.js
index 353a095a904..993d3c31951 100644
--- a/mozilla/calendar/providers/wcap/calWcapErrors.js
+++ b/mozilla/calendar/providers/wcap/calWcapErrors.js
@@ -1,27 +1,26 @@
-/* -*- Mode: javascript; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: javascript; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 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 the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
+ * 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.
+ * 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 Original Code is Sun Microsystems code.
*
- * The Initial Developer of the Original Code is Sun Microsystems, Inc.
- * Portions created by Sun Microsystems are Copyright (C) 2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * Original Author: Daniel Boelzle (daniel.boelzle@sun.com)
+ * The Initial Developer of the Original Code is
+ * Sun Microsystems, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- *
+ * Daniel Boelzle
*
* 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
@@ -29,14 +28,16 @@
* 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 NPL, indicate your
+ * 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 NPL, the GPL or the LGPL.
+ * the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
+const NS_ERROR_INVALID_ARG = Components.results.NS_ERROR_INVALID_ARG;
+
//
// Common netwerk errors:
//
@@ -115,7 +116,7 @@ const g_nsNetErrorCodes = [
"The specified socket type could not be created."
];
-function netErrorToString( rc )
+function netErrorToString(rc)
{
if (!isNaN(rc) && getErrorModule(rc) == NS_ERROR_MODULE_NETWORK) {
var i = 0;
@@ -127,7 +128,8 @@ function netErrorToString( rc )
i += 2;
}
}
- throw Components.results.NS_ERROR_INVALID_ARG;
+ throw new Components.Exception("No known network error code: " + rc.toString(0x10),
+ NS_ERROR_INVALID_ARG);
}
@@ -140,11 +142,11 @@ const g_wcapErrorCodes = [
/* 0 */ NS_OK, "Command successful.",
/* 1 */ calIWcapErrors.WCAP_LOGIN_FAILED, "Login failed. Invalid session ID.",
/* 2 */ calIWcapErrors.WCAP_LOGIN_OK_DEFAULT_CALENDAR_NOT_FOUND, "login.wcap was successful, but the default calendar for this user was not found. A new default calendar set to the userid was created.",
- /* 3 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
- /* 4 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
- /* 5 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 3 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 4 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 5 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
/* 6 */ calIWcapErrors.WCAP_DELETE_EVENTS_BY_ID_FAILED, "WCAP_DELETE_EVENTS_BY_ID_FAILED",
- /* 7 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 7 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
/* 8 */ calIWcapErrors.WCAP_SETCALPROPS_FAILED, "WCAP_SETCALPROPS_FAILED",
/* 9 */ calIWcapErrors.WCAP_FETCH_EVENTS_BY_ID_FAILED, "WCAP_FETCH_EVENTS_BY_ID_FAILED",
/* 10 */ calIWcapErrors.WCAP_CREATECALENDAR_FAILED, "WCAP_CREATECALENDAR_FAILED",
@@ -233,18 +235,18 @@ const g_wcapErrorCodes = [
/* 87 */ calIWcapErrors.WCAP_ATTACHMENT_NOT_FOUND,
"The attachent requested to be fetched or deleted from the server was not found.",
/* / new by WCAP 4.0 */
- /* 88 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
- /* 89 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
- /* 90 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
- /* 91 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
- /* 92 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
- /* 93 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
- /* 94 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
- /* 95 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
- /* 96 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
- /* 97 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
- /* 98 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
- /* 99 */ Components.results.NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 88 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 89 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 90 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 91 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 92 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 93 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 94 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 95 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 96 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 97 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 98 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
+ /* 99 */ NS_ERROR_INVALID_ARG, "No WCAP error code.",
/* 11000 */ calIWcapErrors.WCAP_CDWP_ERR_MAX_CONNECTION_REACHED, "Maximum connections to back-end database reached. As connections are freed up, users can connect to the back-end.",
/* 11001 */ calIWcapErrors.WCAP_CDWP_ERR_CANNOT_CONNECT, "Cannot connect to back-end server. Back-end machine might be down or DWP server is not up and running.",
/* 11002 */ calIWcapErrors.WCAP_CDWP_ERR_CANNOT_RESOLVE_CALENDAR, "Front-end can’t resolve calendar to a particular back-end server.",
@@ -256,35 +258,41 @@ const g_wcapErrorCodes = [
/* 11008 */ calIWcapErrors.WCAP_CDWP_ERR_CHECKVERSION_FAILED, "DWP version check failed."
];
-function wcapErrorToString( rc )
+function wcapErrorToString(rc)
{
- if (isNaN(rc))
- throw Components.results.NS_ERROR_INVALID_ARG;
+ if (isNaN(rc)) {
+ throw new Components.Exception("No known WCAP error code: " + rc.toString(0x10),
+ NS_ERROR_INVALID_ARG);
+ }
if (rc == calIWcapErrors.WCAP_NO_ERRNO)
return "No WCAP errno (missing X-NSCP-WCAP-ERRNO).";
var index = (rc - calIWcapErrors.WCAP_ERROR_BASE + 1);
if (index >= 1 && index <= 108 &&
- g_wcapErrorCodes[index * 2] != Components.results.NS_ERROR_INVALID_ARG)
+ g_wcapErrorCodes[index * 2] != NS_ERROR_INVALID_ARG)
{
return g_wcapErrorCodes[(index * 2) + 1];
}
- throw Components.results.NS_ERROR_INVALID_ARG;
+ throw new Components.Exception("No known WCAP error code: " + rc.toString(0x10),
+ NS_ERROR_INVALID_ARG);
}
function getWcapErrorCode(errno)
{
+ if (errno == -5000) // semantically same error
+ errno = 59;
var index = -1;
if (errno >= -1 && errno <= 81)
index = (errno + 1);
else if (errno >= 11000 && errno <= 11008)
index = (errno - 11000 + 100 + 1);
if (index >= 0 &&
- g_wcapErrorCodes[index * 2] != Components.results.NS_ERROR_INVALID_ARG)
+ g_wcapErrorCodes[index * 2] != NS_ERROR_INVALID_ARG)
{
return g_wcapErrorCodes[index * 2];
}
- throw Components.results.NS_ERROR_INVALID_ARG;
+ throw new Components.Exception("No known WCAP error no: " + errno,
+ NS_ERROR_INVALID_ARG);
}
function getWcapXmlErrno(xml)
@@ -315,14 +323,7 @@ function checkWcapErrno(errno, expectedErrno)
if (expectedErrno === undefined)
expectedErrno = 0; // i.e. Command successful.
if (errno !== undefined && errno != expectedErrno) {
- var rc;
- try {
- rc = getWcapErrorCode(errno);
- }
- catch (exc) {
- throw new Components.Exception(
- "No WCAP error no.", Components.results.NS_ERROR_INVALID_ARG);
- }
+ var rc = getWcapErrorCode(errno);
throw new Components.Exception(wcapErrorToString(rc), rc);
}
}
@@ -366,7 +367,7 @@ function errorToString(err)
case null:
case NS_OK:
return "NS_OK";
- case Components.results.NS_ERROR_INVALID_ARG:
+ case NS_ERROR_INVALID_ARG:
return "NS_ERROR_INVALID_ARG";
case Components.results.NS_ERROR_NO_INTERFACE:
return "NS_ERROR_NO_INTERFACE";
diff --git a/mozilla/calendar/providers/wcap/calWcapRequest.js b/mozilla/calendar/providers/wcap/calWcapRequest.js
index 247213fac7d..9ef12b3089b 100644
--- a/mozilla/calendar/providers/wcap/calWcapRequest.js
+++ b/mozilla/calendar/providers/wcap/calWcapRequest.js
@@ -1,27 +1,26 @@
-/* -*- Mode: javascript; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: javascript; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 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 the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
+ * 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.
+ * 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 Original Code is Sun Microsystems code.
*
- * The Initial Developer of the Original Code is Sun Microsystems, Inc.
- * Portions created by Sun Microsystems are Copyright (C) 2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * Original Author: Daniel Boelzle (daniel.boelzle@sun.com)
+ * The Initial Developer of the Original Code is
+ * Sun Microsystems, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- *
+ * Daniel Boelzle
*
* 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
@@ -29,11 +28,11 @@
* 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 NPL, indicate your
+ * 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 NPL, the GPL or the LGPL.
+ * the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
diff --git a/mozilla/calendar/providers/wcap/calWcapSession.js b/mozilla/calendar/providers/wcap/calWcapSession.js
index 49feeb64ac0..24514234f4a 100644
--- a/mozilla/calendar/providers/wcap/calWcapSession.js
+++ b/mozilla/calendar/providers/wcap/calWcapSession.js
@@ -1,27 +1,26 @@
-/* -*- Mode: javascript; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: javascript; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 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 the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
+ * 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.
+ * 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 Original Code is Sun Microsystems code.
*
- * The Initial Developer of the Original Code is Sun Microsystems, Inc.
- * Portions created by Sun Microsystems are Copyright (C) 2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * Original Author: Daniel Boelzle (daniel.boelzle@sun.com)
+ * The Initial Developer of the Original Code is
+ * Sun Microsystems, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- *
+ * Daniel Boelzle
*
* 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
@@ -29,11 +28,11 @@
* 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 NPL, indicate your
+ * 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 NPL, the GPL or the LGPL.
+ * the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
@@ -413,7 +412,7 @@ calWcapSession.prototype = {
throw new Components.Exception(
"missing X-NSCP-WCAP-SESSION-ID in\n" + str);
}
- sessionId = prop.value;
+ sessionId = prop.value;
log("login succeeded: " + sessionId, this_);
}
catch (exc) {
@@ -461,8 +460,7 @@ calWcapSession.prototype = {
// set BEFORE notification
// (about to go offline, nsIOService.cpp).
// WTF.
- url = (this.sessionUri.spec + "logout.wcap?fmt-out=text%2Fxml&id=" +
- encodeURIComponent(this.m_sessionId));
+ url = (this.sessionUri.spec + "logout.wcap?fmt-out=text%2Fxml&id=" + this.m_sessionId);
this.m_sessionId = null;
}
this.m_credentials = null;
@@ -568,42 +566,33 @@ calWcapSession.prototype = {
throw err;
this_.credentials.userPrefs = data;
log("installed user prefs.", this_);
-
- this_.issueNetworkRequest_(
- request,
- function calprops_resp(err, data) {
- if (err)
- throw err;
- // string to xml converter func without WCAP errno check:
- if (!data || data.length == 0) { // assuming time-out
- throw new Components.Exception(
- "Login failed. Invalid session ID.",
- calIWcapErrors.WCAP_LOGIN_FAILED);
- }
- var xml = getDomParser().parseFromString(data, "text/xml");
- var nodeList = xml.getElementsByTagName("iCal");
- for (var i = 0; i < nodeList.length; ++i) {
- var node = nodeList.item(i);
- var ar = filterXmlNodes("X-NSCP-CALPROPS-RELATIVE-CALID", node);
- if ((ar.length > 0) && (ar[0] == this_.defaultCalId)) {
- checkWcapXmlErrno(node);
- this_.defaultCalendar.m_calProps = node;
- log("installed default cal props.", this_);
- break;
+
+ // set of subscribed calendars to be installed:
+ var calIds = {};
+ calIds[this_.defaultCalId] = true; // assure default one is included once
+ if (getPref("calendar.wcap.subscriptions", false)) {
+ var list = this_.getUserPreferences("X-NSCP-WCAP-PREF-icsSubscribed");
+ for each (var item in list) {
+ var ar = item.split(',');
+ // ',', '$' are not encoded. ',' can be handled here. WTF.
+ for each (var a in ar) {
+ var dollar = a.indexOf('$');
+ if (dollar >= 0) {
+ var calId = a.substring(0, dollar);
+ if (calId != this_.defaultCalId)
+ calIds[calId] = true;
}
}
- if (!this_.defaultCalendar.m_calProps) {
- throw new Components.Exception(
- "Login failed. Invalid session ID.",
- calIWcapErrors.WCAP_LOGIN_FAILED);
- }
- },
- null, "search_calprops",
- "&fmt-out=text%2Fxml&searchOpts=3&calid=1&search-string=" +
- encodeURIComponent(this_.defaultCalId),
- sessionId);
- if (getPref("calendar.wcap.subscriptions", false))
- this_.installSubscribedCals(sessionId, request);
+ }
+ }
+
+ if (getPref("calendar.wcap.no_get_calprops", false)) {
+ // hack around the get/search calprops mess:
+ this_.installCals_search_calprops(sessionId, calIds, request);
+ }
+ else {
+ this_.installCals_get_calprops(sessionId, calIds, request);
+ }
},
stringToXml, "get_userprefs",
"&fmt-out=text%2Fxml&userid=" + encodeURIComponent(this.credentials.userId),
@@ -670,27 +659,73 @@ calWcapSession.prototype = {
stringToIcal, "get_all_timezones", "&fmt-out=text%2Fcalendar",
sessionId);
},
-
- installSubscribedCals:
- function calWcapSession_installSubscribedCals(sessionId, request)
+
+ installCals_get_calprops:
+ function calWcapSession_installCals_get_calprops(sessionId, calIds, request)
{
var this_ = this;
- // user may have dangling users referred in his subscription list, so
- // retrieve each by each, don't break:
- var list = this.getUserPreferences("X-NSCP-WCAP-PREF-icsSubscribed");
- var calIds = {};
- for each (var item in list) {
- var ar = item.split(',');
- // ',', '$' are not encoded. ',' can be handled here. WTF.
- for each (var a in ar) {
- var dollar = a.indexOf('$');
- if (dollar >= 0) {
- var calId = a.substring(0, dollar);
- if (calId != this.defaultCalId)
- calIds[calId] = true;
+ function calprops_resp(err, data) {
+ if (err)
+ throw err;
+ // string to xml converter func without WCAP errno check:
+ if (!data || data.length == 0) { // assuming time-out
+ throw new Components.Exception(
+ "Login failed. Invalid session ID.",
+ calIWcapErrors.WCAP_LOGIN_FAILED);
+ }
+ var xml = getDomParser().parseFromString(data, "text/xml");
+ var nodeList = xml.getElementsByTagName("iCal");
+ for (var i = 0; i < nodeList.length; ++i) {
+ var node = nodeList.item(i);
+ var ar = filterXmlNodes("X-NSCP-CALPROPS-RELATIVE-CALID", node);
+ if (ar.length > 0) {
+ var calId = ar[0];
+ var cal = this_.m_subscribedCals[calId];
+ if (!cal && calIds[calId]) {
+ try {
+ checkWcapXmlErrno(node);
+ if (calId == this_.defaultCalId) {
+ cal = this_.defaultCalendar;
+ if (!cal.m_calProps) {
+ cal.m_calProps = node;
+ log("installed default cal props.", this_);
+ }
+ }
+ else {
+ cal = createWcapCalendar(this_, node);
+ this_.m_subscribedCals[calId] = cal;
+ getCalendarManager().registerCalendar(cal);
+ log("installed subscribed calendar: " + calId, this_);
+ }
+ }
+ catch (exc) { // ignore but log any errors on subscribed calendars:
+ logError(exc, this_);
+ }
+ }
}
}
+ if (!this_.defaultCalendar.m_calProps) { // fallback to search_calprops:
+ logError("cannot get default calprops, trying search_calprops...", this_);
+ this_.installCals_search_calprops(sessionId, calIds, request);
+ }
}
+
+ var calidParam = "";
+ for (var calId in calIds) {
+ if (calidParam.length > 0)
+ calidParam += ";";
+ calidParam += encodeURIComponent(calId);
+ }
+ this_.issueNetworkRequest_(request, calprops_resp,
+ null, "get_calprops",
+ "&fmt-out=text%2Fxml&calid=" + calidParam,
+ sessionId);
+ },
+
+ installCals_search_calprops:
+ function calWcapSession_installCals_search_calprops(sessionId, calIds, request)
+ {
+ var this_ = this;
var issuedSearchRequests = {};
for (var calId in calIds) {
if (!this_.m_subscribedCals[calId]) {
@@ -702,12 +737,16 @@ calWcapSession.prototype = {
if (result.length < 1)
throw Components.results.NS_ERROR_UNEXPECTED;
for each (var cal in result) {
+ // user may have dangling users referred in his subscription list, so
+ // retrieve each by each, don't break:
try {
var calId = cal.calId;
if (calIds[calId] && !this_.m_subscribedCals[calId]) {
this_.m_subscribedCals[calId] = cal;
- getCalendarManager().registerCalendar(cal);
- log("installed subscribed calendar: " + calId, this_);
+ if (!cal.isDefaultCalendar) {
+ getCalendarManager().registerCalendar(cal);
+ log("installed subscribed calendar: " + calId, this_);
+ }
}
}
catch (exc) { // ignore but log any errors on subscribed calendars:
@@ -750,7 +789,8 @@ calWcapSession.prototype = {
if (!g_bShutdown) {
for each (var cal in subscribedCals) {
try {
- getCalendarManager().unregisterCalendar(cal);
+ if (!cal.isDefaultCalendar)
+ getCalendarManager().unregisterCalendar(cal);
}
catch (exc) {
this.notifyError(exc);
@@ -762,9 +802,9 @@ calWcapSession.prototype = {
getCommandUrl: function calWcapSession_getCommandUrl(wcapCommand, params, sessionId)
{
var url = this.sessionUri.spec;
- url += (wcapCommand + ".wcap?appid=mozilla-calendar");
+ url += (wcapCommand + ".wcap?appid=mozilla-calendar&id=");
+ url += sessionId;
url += params;
- url += ("&id=" + encodeURIComponent(sessionId));
return url;
},
@@ -860,7 +900,14 @@ calWcapSession.prototype = {
get defaultCalId() {
var list = this.getUserPreferences("X-NSCP-WCAP-PREF-icsCalendar");
- return (list.length > 0 ? list[0] : this.credentials.userId);
+ var id = null;
+ for each (var item in list) {
+ if (item.length > 0) {
+ id = item;
+ break;
+ }
+ }
+ return (id ? id : this.credentials.userId);
},
get isLoggedIn() {
@@ -954,8 +1001,13 @@ calWcapSession.prototype = {
var calId = ar[0];
var cal = this_.m_subscribedCals[calId];
if (!cal) {
- if (calId == this_.defaultCalId)
+ if (calId == this_.defaultCalId) {
cal = this_.defaultCalendar;
+ if (!cal.m_calProps) {
+ cal.m_calProps = node;
+ log("installed default cal props.", this_);
+ }
+ }
else
cal = createWcapCalendar(this_, node);
}
diff --git a/mozilla/calendar/providers/wcap/calWcapUtils.js b/mozilla/calendar/providers/wcap/calWcapUtils.js
index 474d759fe14..63c16422baf 100644
--- a/mozilla/calendar/providers/wcap/calWcapUtils.js
+++ b/mozilla/calendar/providers/wcap/calWcapUtils.js
@@ -1,27 +1,26 @@
-/* -*- Mode: javascript; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: javascript; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 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 the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
+ * 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.
+ * 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 Original Code is Sun Microsystems code.
*
- * The Initial Developer of the Original Code is Sun Microsystems, Inc.
- * Portions created by Sun Microsystems are Copyright (C) 2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * Original Author: Daniel Boelzle (daniel.boelzle@sun.com)
+ * The Initial Developer of the Original Code is
+ * Sun Microsystems, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- *
+ * Daniel Boelzle
*
* 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
@@ -29,11 +28,11 @@
* 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 NPL, indicate your
+ * 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 NPL, the GPL or the LGPL.
+ * the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
@@ -84,7 +83,7 @@ function initLogging()
logError(exc, "init logging");
}
}
- log("################################# NEW LOG #################################",
+ log("################################# NEW LOG (0.5) #################################",
"init logging");
}
if (!g_logPrefObserver) {
diff --git a/mozilla/calendar/providers/wcap/public/Makefile.in b/mozilla/calendar/providers/wcap/public/Makefile.in
index 65bbc01c792..1b949b1e4a6 100644
--- a/mozilla/calendar/providers/wcap/public/Makefile.in
+++ b/mozilla/calendar/providers/wcap/public/Makefile.in
@@ -1,27 +1,25 @@
-#
# ***** 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/
+# 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.
+# 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 Original Code is Sun Microsystems code.
#
-# The Initial Developer of the Original Code is Sun Microsystems, Inc.
-# Portions created by Sun Microsystems are Copyright (C) 2006 Sun
-# Microsystems, Inc. All Rights Reserved.
-#
-# Original Author: Daniel Boelzle (daniel.boelzle@sun.com)
+# The Initial Developer of the Original Code is
+# Sun Microsystems, Inc.
+# Portions created by the Initial Developer are Copyright (C) 2007
+# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
-#
+# Daniel Boelzle
#
# 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
@@ -29,11 +27,11 @@
# 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 NPL, indicate your
+# 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 NPL, the GPL or the LGPL.
+# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
diff --git a/mozilla/calendar/providers/wcap/public/calIWcapCalendar.idl b/mozilla/calendar/providers/wcap/public/calIWcapCalendar.idl
index 602796de7fa..5fb54b94e09 100644
--- a/mozilla/calendar/providers/wcap/public/calIWcapCalendar.idl
+++ b/mozilla/calendar/providers/wcap/public/calIWcapCalendar.idl
@@ -1,27 +1,26 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 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 the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
+ * 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.
+ * 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 Original Code is Sun Microsystems code.
*
- * The Initial Developer of the Original Code is Sun Microsystems, Inc.
- * Portions created by Sun Microsystems are Copyright (C) 2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * Original Author: Daniel Boelzle (daniel.boelzle@sun.com)
+ * The Initial Developer of the Original Code is
+ * Sun Microsystems, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- *
+ * Daniel Boelzle
*
* 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
@@ -29,11 +28,11 @@
* 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 NPL, indicate your
+ * 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 NPL, the GPL or the LGPL.
+ * the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
diff --git a/mozilla/calendar/providers/wcap/public/calIWcapErrors.idl b/mozilla/calendar/providers/wcap/public/calIWcapErrors.idl
index b1643a177bd..f0e0cc4b1ab 100644
--- a/mozilla/calendar/providers/wcap/public/calIWcapErrors.idl
+++ b/mozilla/calendar/providers/wcap/public/calIWcapErrors.idl
@@ -1,27 +1,26 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 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 the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
+ * 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.
+ * 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 Original Code is Sun Microsystems code.
*
- * The Initial Developer of the Original Code is Sun Microsystems, Inc.
- * Portions created by Sun Microsystems are Copyright (C) 2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * Original Author: Daniel Boelzle (daniel.boelzle@sun.com)
+ * The Initial Developer of the Original Code is
+ * Sun Microsystems, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- *
+ * Daniel Boelzle
*
* 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
@@ -29,11 +28,11 @@
* 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 NPL, indicate your
+ * 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 NPL, the GPL or the LGPL.
+ * the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
diff --git a/mozilla/calendar/providers/wcap/public/calIWcapRequest.idl b/mozilla/calendar/providers/wcap/public/calIWcapRequest.idl
index cc157ae4592..d33e955cb29 100755
--- a/mozilla/calendar/providers/wcap/public/calIWcapRequest.idl
+++ b/mozilla/calendar/providers/wcap/public/calIWcapRequest.idl
@@ -1,27 +1,26 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 20; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
- * Version: NPL 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 the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
+ * 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.
+ * 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 Original Code is Sun Microsystems code.
*
- * The Initial Developer of the Original Code is Sun Microsystems, Inc.
- * Portions created by Sun Microsystems are Copyright (C) 2006 Sun
- * Microsystems, Inc. All Rights Reserved.
- *
- * Original Author: Daniel Boelzle (daniel.boelzle@sun.com)
+ * The Initial Developer of the Original Code is
+ * Sun Microsystems, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- *
+ * Daniel Boelzle
*
* 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
@@ -29,11 +28,11 @@
* 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 NPL, indicate your
+ * 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 NPL, the GPL or the LGPL.
+ * the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
diff --git a/mozilla/calendar/resources/content/applicationUtil.js b/mozilla/calendar/resources/content/applicationUtil.js
index f382a3abd41..ac3cb404cfd 100644
--- a/mozilla/calendar/resources/content/applicationUtil.js
+++ b/mozilla/calendar/resources/content/applicationUtil.js
@@ -74,18 +74,6 @@ function toJavaScriptConsole()
toOpenWindowByType("global:console", "chrome://global/content/console.xul");
}
-#ifndef MOZ_SUNBIRD
-function toMessengerWindow()
-{
- toOpenWindowByType("mail:3pane", "chrome://messenger/content/messenger.xul");
-}
-
-function toAddressBook()
-{
- toOpenWindowByType("mail:addressbook", "chrome://messenger/content/addressbook/addressbook.xul");
-}
-#endif
-
function launchBrowser(UrlToGoTo)
{
if (!UrlToGoTo) {
@@ -183,217 +171,6 @@ function goOpenAddons()
window.openDialog(EMURL, "", EMFEATURES);
}
-
-function showElement(elementId)
-{
- try {
- document.getElementById(elementId).removeAttribute("hidden");
- } catch (e) {
- dump("showElement: Couldn't remove hidden attribute from " + elementId + "\n");
- }
-}
-
-
-function hideElement(elementId)
-{
- try {
- document.getElementById(elementId).setAttribute("hidden", "true");
- } catch (e) {
- dump("hideElement: Couldn't set hidden attribute on " + elementId + "\n");
- }
-}
-
-
-function enableElement(elementId)
-{
- try {
- //document.getElementById(elementId).setAttribute("disabled", "false");
-
- // call remove attribute beacuse some widget code checks for the presense of a
- // disabled attribute, not the value.
- document.getElementById(elementId).removeAttribute("disabled");
- } catch (e) {
- dump("enableElement: Couldn't remove disabled attribute on " + elementId + "\n");
- }
-}
-
-
-function disableElement(elementId)
-{
- try {
- document.getElementById(elementId).setAttribute( "disabled", "true");
- } catch (e) {
- dump("disableElement: Couldn't set disabled attribute to true on " +
- elementId + "\n");
- }
-}
-
-
-/**
-* Helper function for filling the form,
-* Set the value of a property of a XUL element
-*
-* PARAMETERS
-* elementId - ID of XUL element to set
-* newValue - value to set property to ( if undefined no change is made )
-* propertyName - OPTIONAL name of property to set, default is "value",
-* use "checked" for radios & checkboxes, "data" for
-* drop-downs
-*/
-function setElementValue(elementId, newValue, propertyName)
-{
- var undefined;
-
- if (newValue !== undefined) {
- var field = document.getElementById(elementId);
-
- if (newValue === false) {
- try {
- field.removeAttribute(propertyName);
- } catch (e) {
- dump("setFieldValue: field.removeAttribute couldn't remove " +
- propertyName + " from " + elementId + " e: " + e + "\n");
- }
- } else if (propertyName) {
- try {
- field.setAttribute(propertyName, newValue);
- } catch (e) {
- dump("setFieldValue: field.setAttribute couldn't set " +
- propertyName + " from " + elementId + " to " + newValue +
- " e: " + e + "\n");
- }
- } else {
- field.value = newValue;
- }
- }
-}
-
-
-/**
-* Helper function for getting data from the form,
-* Get the value of a property of a XUL element
-*
-* PARAMETERS
-* elementId - ID of XUL element to get from
-* propertyName - OPTIONAL name of property to set, default is "value",
-* use "checked" for radios & checkboxes, "data" for
-* drop-downs
-* RETURN
-* newValue - value of property
-*/
-function getElementValue(elementId, propertyName)
-{
- var field = document.getElementById(elementId);
-
- if (propertyName)
- return field[propertyName];
- return field.value;
-}
-
-
-function processEnableCheckbox(checkboxId, elementId)
-{
- if (document.getElementById(checkboxId).checked)
- enableElement(elementId);
- else
- disableElement(elementId);
-}
-
-
-/*
- * Enable/disable button if there are children in a listbox
- */
-function updateListboxDeleteButton(listboxId, buttonId)
-{
- if ( document.getElementById(listboxId).getRowCount() > 0 )
- enableElement(buttonId);
- else
- disableElement(buttonId);
-}
-
-
-/*
- * Update plural singular menu items
- */
-function updateMenuLabels(lengthFieldId, menuId )
-{
- var field = document.getElementById(lengthFieldId);
- var menu = document.getElementById(menuId);
-
- // figure out whether we should use singular or plural
- var length = field.value;
-
- var newLabelNumber;
-
- // XXX This assumes that "0 days, minutes, etc." is plural in other languages.
- if ( ( Number(length) == 0 ) || ( Number(length) > 1 ) )
- newLabelNumber = "label2"
- else
- newLabelNumber = "label1"
-
- // see what we currently show and change it if required
- var oldLabelNumber = menu.getAttribute("labelnumber");
-
- if ( newLabelNumber != oldLabelNumber ) {
- // remember what we are showing now
- menu.setAttribute("labelnumber", newLabelNumber);
-
- // update the menu items
- var items = menu.getElementsByTagName("menuitem");
-
- for( var i = 0; i < items.length; ++i ) {
- var menuItem = items[i];
- var newLabel = menuItem.getAttribute(newLabelNumber);
- menuItem.label = newLabel;
- menuItem.setAttribute("label", newLabel);
- }
-
- // force the menu selection to redraw
- var saveSelectedIndex = menu.selectedIndex;
- menu.selectedIndex = -1;
- menu.selectedIndex = saveSelectedIndex;
- }
-}
-
-
-/** Select value in menuList. Throws string if no such value. **/
-
-function menuListSelectItem(menuListId, value)
-{
- var menuList = document.getElementById(menuListId);
- var index = menuListIndexOf(menuList, value);
- if (index != -1) {
- menuList.selectedIndex = index;
- } else {
- throw "menuListSelectItem: No such Element: "+value;
- }
-}
-
-
-/** Find index of menuitem with the given value, or return -1 if not found. **/
-
-function menuListIndexOf(menuList, value)
-{
- var items = menuList.menupopup.childNodes;
- var index = -1;
- for ( var i = 0; i < items.length; i++ ) {
- var element = items[i];
- if (element.nodeName == "menuitem")
- index++;
- if (element.getAttribute("value") == value)
- return index;
- }
- return -1; // not found
-}
-
-function hasPositiveIntegerValue(elementId)
-{
- var value = document.getElementById(elementId).value;
- if (value && (parseInt(value) == value) && value > 0)
- return true;
- return false;
-}
-
/**
* We recreate the View > Toolbars menu each time it is opened to include any
* user-created toolbars.
diff --git a/mozilla/calendar/resources/content/calendar.js b/mozilla/calendar/resources/content/calendar.js
index 930be413c84..509e45e4e48 100644
--- a/mozilla/calendar/resources/content/calendar.js
+++ b/mozilla/calendar/resources/content/calendar.js
@@ -102,6 +102,15 @@ function calendarInit()
deck.selectedPanel.goToDay(deck.selectedPanel.selectedDay);
}
+ // showCompleted is false by default
+ if (document.getElementById("hide-completed-checkbox").checked == false) {
+ var deck = document.getElementById("view-deck")
+ for each (view in deck.childNodes) {
+ view.showCompleted = true;
+ }
+ deck.selectedPanel.goToDay(deck.selectedPanel.selectedDay);
+ }
+
// set up the unifinder
prepareCalendarUnifinder();
diff --git a/mozilla/calendar/resources/content/calendarManagement.js b/mozilla/calendar/resources/content/calendarManagement.js
index 2f5fb24163d..c378d5978cb 100644
--- a/mozilla/calendar/resources/content/calendarManagement.js
+++ b/mozilla/calendar/resources/content/calendarManagement.js
@@ -188,6 +188,16 @@ function onCalendarCheckboxClick(event) {
// clicked the checkbox cell
+ // XXX Fix for bug #350323, needs improvement.
+ // If the user clicks with the mouse on a checkbox, the timer which
+ // adds the selected calendar to the composite calendar is cancelled.
+ // Otherwise it's not possible for the user to add/remove calendars
+ // to/from the composite calendar by clicking on the checkbox.
+ if (gCalendarListSelectTimeout) {
+ clearTimeout(gCalendarListSelectTimeout);
+ gCalendarListSelectTimeout = null;
+ }
+
var cal = event.target.calendar;
if (checkElem.getAttribute('checked') == "true") {
getCompositeCalendar().removeCalendar(cal.uri);
@@ -261,12 +271,24 @@ function setCalendarManagerUI()
}
}
+var gCalendarListSelectTimeout;
function onCalendarListSelect() {
+ // XXX Fix for bug #350323, needs improvement.
+ // Set up a timer, which schedules adding the selected calendar to the
+ // composite calendar.
+ gCalendarListSelectTimeout = setTimeout(calendarListSelectHandler, 400);
+}
+
+function calendarListSelectHandler() {
var selectedCalendar = getSelectedCalendarOrNull();
if (!selectedCalendar) {
return;
}
- getCompositeCalendar().defaultCalendar = selectedCalendar;
+ var compositeCalendar = getCompositeCalendar();
+ if (!compositeCalendar.getCalendar(selectedCalendar.uri)) {
+ compositeCalendar.addCalendar(selectedCalendar);
+ }
+ compositeCalendar.defaultCalendar = selectedCalendar;
}
function initCalendarManager()
diff --git a/mozilla/calendar/resources/content/datetimepickers/minimonth.xml b/mozilla/calendar/resources/content/datetimepickers/minimonth.xml
index 513cf94e71e..3ff430bc75c 100644
--- a/mozilla/calendar/resources/content/datetimepickers/minimonth.xml
+++ b/mozilla/calendar/resources/content/datetimepickers/minimonth.xml
@@ -133,9 +133,12 @@
+
@@ -143,6 +146,11 @@
+
+
+
@@ -153,6 +161,16 @@
+
+
+
+
+
+ null
+
+
+
+
+
+
+
2; })) {
+ for (var endPrefix = 0; endPrefix < minLength; endPrefix++) {
+ var c = dayList[0][endPrefix];
+ if (dayList.some(function(dayAbbr) {
+ return dayAbbr[endPrefix] != c; })) {
+ if (endPrefix > 0) {
+ for (i = 0; i < dayList.length; i++) // trim prefix chars.
+ dayList[i] = dayList[i].substring(endPrefix);
+ }
break;
}
}
}
- dayList[i] = dayList[i].substring(0,foundMatch)
+ // 3. trim each day abbreviation to 1 char if unique, else 2 chars.
+ for (i = 0; i < dayList.length; i++) {
+ var foundMatch = 1;
+ for (j = 0; j < dayList.length; j++) {
+ if (i != j) {
+ if (dayList[i].substring(0,1) == dayList[j].substring(0,1)) {
+ foundMatch = 2;
+ break;
+ }
+ }
+ }
+ dayList[i] = dayList[i].substring(0,foundMatch)
+ }
}
-
+
for (var column = 0; column < header.childNodes.length; column++) {
header.childNodes[column].setAttribute( "value", dayList[column]);
}
@@ -304,8 +399,8 @@
// Update the year popup
var years = this.kYearList;
var year = new Date(aDate);
- year.setFullYear(aDate.getFullYear() - (years.length%2 + 1));
- for (i = 0; i < years.length; i++) {
+ year.setFullYear(Math.max(1, aDate.getFullYear() - parseInt(years.length / 2) + 1));
+ for (var i = 1; i < years.length - 1; i++) {
years[i].setAttribute("value", year.getFullYear());
years[i].setAttribute("current", "false");
if (year.getFullYear() == aDate.getFullYear())
@@ -320,10 +415,17 @@
// get today's date
var today = new Date();
+ this.mDayMap = {};
+
for (var k = 1; k < calbox.childNodes.length; k++) {
var row = calbox.childNodes[k];
for (i = 0; i < 7; i++) {
var day = row.childNodes[i];
+ var ymd = date.getFullYear() + "-" +
+ date.getMonth() + "-" +
+ date.getDate();
+ this.mDayMap[ymd] = day;
+
if (aDate.getMonth() != date.getMonth()) {
day.setAttribute("othermonth", "true");
} else {
@@ -347,6 +449,10 @@
day.calendar = this;
day.setAttribute("value", date.getDate());
date.setDate(date.getDate() + 1);
+
+ if (monthChanged) {
+ this.resetAttributesForDate(day.date);
+ }
}
}
if (monthChanged) this.fireEvent('monthchange');
@@ -407,52 +513,51 @@
-
-
+
+
+
+
- //get a list of events for this month.
- var monthEvents =
- this.eventSource.getEventsForMonth( this.getSelectedDate() );
- var arrayOfDates = new Array();
-
- for( var eventIndex = 0; eventIndex < monthEvents.length; ++eventIndex )
- {
- var calendarEventDisplay = monthEvents[ eventIndex ];
- var eventDate = new Date( calendarEventDisplay.displayDate );
-
- //add them to an array
- arrayOfDates[ eventDate.getDate() ] = true;
- }
- document.getElementById( "lefthandcalendar" ).setBusyDates( arrayOfDates );
- */
- var aDate = new Date();
- aDate.setDate( 1 );
- // Update the calendar
- var calbox = document.getAnonymousNodes(this)[0].childNodes[1];
-
- // weekStart day is set by preference
- var firstWeekday = (7 + aDate.getDay() - this.weekStart) % 7;
- var date = new Date(aDate.getTime());
- date.setDate(date.getDate() - firstWeekday);
-
- for (var k = 1; k < calbox.childNodes.length; k++) {
- var row = calbox.childNodes[k];
- for (var i = 0; i < 7; i++) {
- var day = row.childNodes[i];
- if (aDate.getMonth() == date.getMonth() &&
- arrayOfDates[ date.getDate() ] == true ) {
- day.setAttribute("busy", "true");
- } else {
- day.removeAttribute("busy");
+
+
+
+ allowedAttributes) {
+ switch (aBox.attributes[allowedAttributes].nodeName) {
+ case "selected":
+ case "othermonth":
+ case "today":
+ case "value":
+ case "class":
+ case "flex":
+ allowedAttributes++;
+ break;
+ default:
+ aBox.removeAttribute(aBox.attributes[allowedAttributes].nodeName);
+ break;
}
+ }
+ }
- // next date of month, may increment month
- date.setDate(date.getDate() + 1);
+ if (aDate) {
+ var box = this.getBoxForDate(aDate);
+ if (box) {
+ removeForBox(box);
+ }
+ } else {
+ for (var k = 1; k < this.kDaysOfMonthBox.childNodes.length; k++) {
+ for (var i = 0; i < 7; i++) {
+ removeForBox(this.kDaysOfMonthBox.childNodes[k].childNodes[i]);
+ }
}
}
]]>
@@ -550,7 +655,7 @@
this.showMonth(aMainDate);
} else if (!sameDate) {
// select day only
- var day = this._findDay(aDate);
+ var day = this.getBoxForDate(aDate);
if (this.mSelected) {
this.mSelected.removeAttribute("selected");
}
@@ -562,25 +667,6 @@
-
-
-
-
-
-
-
@@ -640,7 +726,10 @@
break;
case this.kYearPopup:
this.hidePopupList();
- this.switchYear(element.getAttribute("value"));
+ var value = element.getAttribute("value");
+ if (value) {
+ this.switchYear(value);
+ }
break;
}
}
diff --git a/mozilla/calendar/resources/content/mouseoverPreviews.js b/mozilla/calendar/resources/content/mouseoverPreviews.js
index 48bc1441baf..21db4310a58 100644
--- a/mozilla/calendar/resources/content/mouseoverPreviews.js
+++ b/mozilla/calendar/resources/content/mouseoverPreviews.js
@@ -22,9 +22,9 @@
* Mike Potter
* Chris Charabaruk
* Colin Phillips
- * Karl Guertin
+ * Karl Guertin
* Mike Norton
- * ArentJan Banck
+ * ArentJan Banck
* Eric Belhaire
*
* Alternatively, the contents of this file may be used under the terms of
@@ -41,20 +41,21 @@
*
* ***** END LICENSE BLOCK ***** */
-/** Code which generates event and task (todo) preview tooltips/titletips
- when the mouse hovers over either the event list, the task list, or
- an event or task box in one of the grid views.
-
- (Portions of this code were previously in calendar.js and unifinder.js,
- some of it duplicated.)
-**/
+/**
+ * Code which generates event and task (todo) preview tooltips/titletips
+ * when the mouse hovers over either the event list, the task list, or
+ * an event or task box in one of the grid views.
+ *
+ * (Portions of this code were previously in calendar.js and unifinder.js,
+ * some of it duplicated.)
+ */
/** PUBLIC
-*
-* This changes the mouseover preview based on the start and end dates
-* of an occurrence of a (one-time or recurring) calEvent or calToDo.
-* Used by all grid views.
-*/
+ *
+ * This changes the mouseover preview based on the start and end dates
+ * of an occurrence of a (one-time or recurring) calEvent or calToDo.
+ * Used by all grid views.
+ */
function onMouseOverItem( occurrenceBoxMouseEvent )
{
@@ -106,25 +107,46 @@ function onMouseOverTaskTree( toolTip, mouseEvent )
return false;
}
-/*
-** add newContentBox,
-*/
+/**
+ * Removes old content from tooltip, adds new content box to tooltip,
+ * then resizes the tooltip to the size of the new content box.
+ *
+ * @param tooltip The tooltip to modify.
+ * @param holderBox The box element containing the new content.
+ */
function setToolTipContent(toolTip, holderBox)
{
- while (toolTip.hasChildNodes())
+ while (toolTip.hasChildNodes()) {
toolTip.removeChild( toolTip.firstChild );
+ }
+
toolTip.appendChild( holderBox );
+ var width = holderBox.boxObject.width;
+ var height = holderBox.boxObject.height;
+
+ // workaround bug 369225 (aspect: tooltip may not shrink height)
+ toolTip.sizeTo(0,0);
+ // workaround bug 369225 (aspect: tooltip height too short)
+ // Add top and bottom border and padding to workaround bug where bottom
+ // tooltip border disappears if wrapped description below header grid.
+ height += 1 + 2 + 2 + 1;
+
+ toolTip.sizeTo(width, height);
}
/**
-* Called when a user hovers over a todo element and the text for the mouse over is changed.
-*/
+ * Called when a user hovers over a todo element and the text for the mouse over is changed.
+ */
function getPreviewForTask( toDoItem )
{
if( toDoItem )
{
const vbox = document.createElement( "vbox" );
+ vbox.setAttribute("class", "tooltipBox");
+ // tooltip appears above or below pointer, so may have as little as
+ // one half the screen height available (avoid top going off screen).
+ vbox.maxHeight = Math.floor(screen.height / 2);
boxInitializeHeaderGrid(vbox);
var hasHeader = false;
@@ -195,13 +217,13 @@ function getPreviewForTask( toDoItem )
var description = toDoItem.getProperty("DESCRIPTION");
if (description)
{
- // display up to 4 description lines like body of message below headers
- if (hasHeader)
- boxAppendText(vbox, "");
-
- boxAppendLines(vbox, description, 4);
+ // display wrapped description lines like body of message below headers
+ if (hasHeader) {
+ boxAppendBodySeparator(vbox);
+ }
+ boxAppendBody(vbox, description);
}
-
+
return ( vbox );
}
else
@@ -211,15 +233,19 @@ function getPreviewForTask( toDoItem )
}
/**
-* Called when mouse moves over a different, or
-* when mouse moves over event in event list.
-* The instStartDate is date of instance displayed at event box
-* (recurring or multiday events may be displayed by more than one event box
-* for different days), or null if should compute next instance from now.
-*/
+ * Called when mouse moves over a different, or
+ * when mouse moves over event in event list.
+ * The instStartDate is date of instance displayed at event box
+ * (recurring or multiday events may be displayed by more than one event box
+ * for different days), or null if should compute next instance from now.
+ */
function getPreviewForEvent( event, instStartDate, instEndDate )
{
const vbox = document.createElement( "vbox" );
+ vbox.setAttribute("class", "tooltipBox");
+ // tooltip appears above or below pointer, so may have as little as
+ // one half the screen height available (avoid top going off screen).
+ vbox.maxHeight = Math.floor(screen.height / 2);
boxInitializeHeaderGrid(vbox);
if (event)
@@ -260,9 +286,9 @@ function getPreviewForEvent( event, instStartDate, instEndDate )
var description = event.getProperty("DESCRIPTION");
if (description)
{
- // display up to 4 description lines, like body of message below headers
- boxAppendText(vbox, "");
- boxAppendLines(vbox, description, 4);
+ boxAppendBodySeparator(vbox);
+ // display wrapped description lines, like body of message below headers
+ boxAppendBody(vbox, description);
}
return ( vbox );
@@ -310,8 +336,24 @@ function getToDoStatusString(iCalToDo)
}
}
-/** PRIVATE: Append 1 line of text to box inside an xul description node containing a single text node **/
-function boxAppendText(box, textString)
+/**
+ * PRIVATE: Append a separator, a thin space between header and body.
+ *
+ * @param vbox box to which to append separator.
+ */
+function boxAppendBodySeparator(vbox) {
+ const separator = document.createElement("separator");
+ separator.setAttribute("class", "tooltipBodySeparator");
+ vbox.appendChild(separator);
+}
+
+/**
+ * PRIVATE: Append description to box for body text. Text may contain
+ * paragraphs; line indent and line breaks will be preserved by CSS.
+ * @param box box to which to append body
+ * @param textString text of body
+ */
+function boxAppendBody(box, textString)
{
var textNode = document.createTextNode(textString);
var xulDescription = document.createElement("description");
@@ -319,32 +361,11 @@ function boxAppendText(box, textString)
xulDescription.appendChild(textNode);
box.appendChild(xulDescription);
}
-/** PRIVATE: Append multiple lines of text to box, each line inside an xul description node containing a single text node **/
-function boxAppendLines(vbox, textString, maxLineCount)
-{
- if (!maxLineCount)
- maxLineCount = 4;
- // trim trailing whitespace
- var end = textString.length;
- for (; end > 0; end--)
- if (" \t\r\n".indexOf(textString.charAt(end - 1)) == -1)
- break;
- textString = textString.substring(0, end);
-
- var lines = textString.split("\n");
- var lineCount = lines.length;
- if( lineCount > maxLineCount ) {
- lineCount = maxLineCount;
- lines[ maxLineCount ] = "..." ;
- }
-
- for (var i = 0; i < lineCount; i++) {
- boxAppendText(vbox, lines[i]);
- }
-}
-/** PRIVATE: Use dateFormatter to format date and time.
- Append date to box inside an xul description node containing a single text node. **/
+/**
+ * PRIVATE: Use dateFormatter to format date and time,
+ * and to header grid append a row containing localized Label: date.
+ */
function boxAppendLabeledDateTime(box, labelProperty, date)
{
var dateFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
@@ -353,8 +374,15 @@ function boxAppendLabeledDateTime(box, labelProperty, date)
var formattedDateTime = dateFormatter.formatDateTime(date);
boxAppendLabeledText(box, labelProperty, formattedDateTime);
}
-/** PRIVATE: Use dateFormatter to format date and time interval.
- Append interval to box inside an xul description node containing a single text node. **/
+
+/**
+ * PRIVATE: Use dateFormatter to format date and time interval,
+ * and to header grid append a row containing localized Label: interval.
+ * @param box contains header grid.
+ * @param labelProperty name of property for localized field label.
+ * @param start calDateTime of start of time interval.
+ * @param end calDateTime of end of time interval.
+ */
function boxAppendLabeledDateTimeInterval(box, labelProperty, start, end)
{
var dateFormatter = Components.classes["@mozilla.org/calendar/datetime-formatter;1"]
@@ -371,15 +399,24 @@ function boxAppendLabeledDateTimeInterval(box, labelProperty, start, end)
}
}
+/**
+ * PRIVATE: create empty 2-column grid for header fields,
+ * and append it to box.
+ */
function boxInitializeHeaderGrid(box)
{
var grid = document.createElement("grid");
+ grid.setAttribute("class", "tooltipHeaderGrid");
var rows;
{
var columns = document.createElement("columns");
{
- columns.appendChild(document.createElement("column"));
- columns.appendChild(document.createElement("column"));
+ var labelColumn = document.createElement("column");
+ labelColumn.setAttribute("class", "tooltipLabelColumn");
+ columns.appendChild(labelColumn);
+ var valueColumn = document.createElement("column");
+ valueColumn.setAttribute("class", "tooltipValueColumn");
+ columns.appendChild(valueColumn);
}
grid.appendChild(columns);
rows = document.createElement("rows");
@@ -388,6 +425,13 @@ function boxInitializeHeaderGrid(box)
box.appendChild(grid);
}
+/**
+ * PRIVATE: To headers grid, append a row containing Label: value,
+ * where label is localized text for labelProperty.
+ * @param box box containing headers grid
+ * @param labelProperty name of property for localized name of header
+ * @param textString value of header field.
+ */
function boxAppendLabeledText(box, labelProperty, textString)
{
var labelText = calGetString('calendar', labelProperty);
@@ -402,6 +446,7 @@ function boxAppendLabeledText(box, labelProperty, textString)
}
}
+/** PRIVATE: create element for field label (for header grid). **/
function createTooltipHeaderLabel(text)
{
var label = document.createElement("label");
@@ -410,6 +455,7 @@ function createTooltipHeaderLabel(text)
return label;
}
+/** PRIVATE: create element for field value (for header grid). **/
function createTooltipHeaderDescription(text)
{
var label = document.createElement("description");
@@ -418,9 +464,11 @@ function createTooltipHeaderDescription(text)
return label;
}
-/** If now is during an occurrence, return the ocurrence.
- Else if now is before an ocurrence, return the next ocurrence.
- Otherwise return the previous ocurrence. **/
+/**
+ * If now is during an occurrence, return the ocurrence.
+ * Else if now is before an ocurrence, return the next ocurrence.
+ * Otherwise return the previous ocurrence.
+ */
function getCurrentNextOrPreviousRecurrence(calendarEvent)
{
if (!calendarEvent.recurrenceInfo) {
@@ -443,4 +491,3 @@ function getCurrentNextOrPreviousRecurrence(calendarEvent)
}
return occ;
}
-
diff --git a/mozilla/calendar/resources/content/unifinderToDo.js b/mozilla/calendar/resources/content/unifinderToDo.js
index 82a68c68644..cc229f638ea 100644
--- a/mozilla/calendar/resources/content/unifinderToDo.js
+++ b/mozilla/calendar/resources/content/unifinderToDo.js
@@ -190,6 +190,11 @@ function toDoUnifinderRefresh()
filter |= ccalendar.ITEM_FILTER_TYPE_TODO;
ccalendar.getItems(filter, 0, null, null, refreshListener);
+ var deck = document.getElementById("view-deck")
+ for each (view in deck.childNodes) {
+ view.showCompleted = !hideCompleted;
+ }
+ deck.selectedPanel.goToDay(deck.selectedPanel.selectedDay);
}
function getToDoFromEvent( event )
diff --git a/mozilla/calendar/resources/skin/classic/datetimepickers/datetimepickers.css b/mozilla/calendar/resources/skin/classic/datetimepickers/datetimepickers.css
index be5af1b14e9..2364739680c 100644
--- a/mozilla/calendar/resources/skin/classic/datetimepickers/datetimepickers.css
+++ b/mozilla/calendar/resources/skin/classic/datetimepickers/datetimepickers.css
@@ -156,7 +156,8 @@ grid[anonid="time-picker-five-minute-grid"] {
border-top : 1px solid ThreeDShadow;
border-left : 1px solid ThreeDShadow;
border-right : 1px solid ThreeDShadow;
- background-color : #ffffff;
+ background-color : Window;
+ color : WindowText;
}
@@ -197,7 +198,8 @@ grid[anonid="time-picker-one-minute-grid"] {
border-top : 1px solid ThreeDShadow;
border-left : 1px solid ThreeDShadow;
border-right : 1px solid ThreeDShadow;
- background-color : #ffffff;
+ background-color : Window;
+ color : WindowText;
}
/* box in one-minute grid elements */
diff --git a/mozilla/calendar/resources/skin/classic/datetimepickers/minimonth.css b/mozilla/calendar/resources/skin/classic/datetimepickers/minimonth.css
index 46fc87f3d3c..ca59ad42701 100755
--- a/mozilla/calendar/resources/skin/classic/datetimepickers/minimonth.css
+++ b/mozilla/calendar/resources/skin/classic/datetimepickers/minimonth.css
@@ -18,7 +18,9 @@
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
- * Contributor(s): Matthew Willis (mattwillis@gmail.com)
+ * Contributor(s):
+ * Matthew Willis (mattwillis@gmail.com)
+ * Philipp Kewisch
*
* 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
@@ -127,11 +129,7 @@
}
.minimonth-day[othermonth="true"] {
- color: GrayText;
-}
-
-.minimonth-day[budy="true"] {
- font-weight: bold;
+ color: #b2b2b2;
}
.minimonth-day[today="true"] {
@@ -143,7 +141,7 @@
color: HighlightText;
}
-.minimonth-day[busy="true"] {
+.minimonth-day[busy] {
font-weight: bold;
}
@@ -158,8 +156,10 @@
}
.minimonth-list {
- padding: 2px 4px;
+ padding-left: 1em;
+ padding-right: 1em;
}
+
.minimonth-list[current="true"] {
font-weight: bold;
}
diff --git a/mozilla/calendar/sunbird/app/module.ver b/mozilla/calendar/sunbird/app/module.ver
index 726e12cc301..e47e6319413 100644
--- a/mozilla/calendar/sunbird/app/module.ver
+++ b/mozilla/calendar/sunbird/app/module.ver
@@ -1,7 +1,7 @@
WIN32_MODULE_COMPANYNAME=Mozilla
WIN32_MODULE_COPYRIGHT=©Sunbird and Mozilla Developers, according to the MPL 1.1/GPL 2.0/LGPL 2.1 licenses, as applicable.
-WIN32_MODULE_FILEVERSION=0,4,9,0
-WIN32_MODULE_FILEVERSION_STRING=0.5pre
+WIN32_MODULE_PRODUCTVERSION=0,6,9,0
+WIN32_MODULE_PRODUCTVERSION_STRING=0.7pre
WIN32_MODULE_TRADEMARKS=Sunbird is a trademark of the Mozilla Foundation.
WIN32_MODULE_DESCRIPTION=Sunbird
WIN32_MODULE_PRODUCTNAME=Sunbird
diff --git a/mozilla/calendar/sunbird/base/content/calendar-scripts.inc b/mozilla/calendar/sunbird/base/content/calendar-scripts.inc
index 76cd3cad70f..2310ff040c2 100644
--- a/mozilla/calendar/sunbird/base/content/calendar-scripts.inc
+++ b/mozilla/calendar/sunbird/base/content/calendar-scripts.inc
@@ -26,6 +26,7 @@
# Dan Parent
# ArentJan Banck
# Eric Belhaire
+# Philipp Kewisch
#
# 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
@@ -80,3 +81,7 @@
+
+
+
+
diff --git a/mozilla/calendar/sunbird/base/content/calendar.xul b/mozilla/calendar/sunbird/base/content/calendar.xul
index 708370e4068..40f399efe7b 100644
--- a/mozilla/calendar/sunbird/base/content/calendar.xul
+++ b/mozilla/calendar/sunbird/base/content/calendar.xul
@@ -298,29 +298,29 @@
id="calendar-day-view-button"
type="radio"
group="calendarViews"
- label="&calendar.dayview.button.label;"
- tooltiptext="&calendar.dayview.button.tooltip;"
+ label="&calendar.day.button.label;"
+ tooltiptext="&calendar.day.button.tooltip;"
observes="day_view_command"/>
html {
background-color: white;
+ color: black;
}
* {
diff --git a/mozilla/calendar/sunbird/config/version.txt b/mozilla/calendar/sunbird/config/version.txt
index 18b4a48e00d..50ecf45b14a 100644
--- a/mozilla/calendar/sunbird/config/version.txt
+++ b/mozilla/calendar/sunbird/config/version.txt
@@ -1 +1 @@
-0.5pre
+0.7pre
diff --git a/mozilla/calendar/sunbird/themes/pinstripe/sunbird/calendar.css b/mozilla/calendar/sunbird/themes/pinstripe/sunbird/calendar.css
index 501fc68c2ee..50083209296 100644
--- a/mozilla/calendar/sunbird/themes/pinstripe/sunbird/calendar.css
+++ b/mozilla/calendar/sunbird/themes/pinstripe/sunbird/calendar.css
@@ -747,23 +747,34 @@ listitem[selected="true"] > .calendar-list-item-class
/*--------------------------------------------------------------------
* tooltips
*-------------------------------------------------------------------*/
-label.tooltipHeaderLabel
-{
- font-weight : bold;
- text-align : right;
+vbox.tooltipBox {
+ max-width: 40em;
}
-description.tooltipHeaderDescription
-{
- font-weight : normal;
- text-align : left;
- white-space : normal;
+column.tooltipValueColumn {
+ max-width: 35em; /* tooltipBox max-width minus space for label */
}
-description.tooltipBody
-{
- font-weight : normal;
- white-space : normal;
+label.tooltipHeaderLabel {
+ font-weight: bold;
+ text-align: right;
+ margin: 0em 1em 0em 0em; /* 1em space before value */
+}
+
+description.tooltipHeaderDescription {
+ font-weight: normal;
+ text-align: left;
+ margin: 0px;
+}
+
+separator.tooltipBodySeparator {
+ height: 1ex; /* 1ex space above body text, below last header. */
+}
+
+description.tooltipBody {
+ font-weight: normal;
+ white-space: -moz-pre-wrap;
+ margin: 0px;
}
/*--------------------------------------------------------------------
diff --git a/mozilla/calendar/sunbird/themes/pinstripe/sunbird/datetimepickers/minimonth.css b/mozilla/calendar/sunbird/themes/pinstripe/sunbird/datetimepickers/minimonth.css
index 18e7caa6d20..281eb4761c6 100644
--- a/mozilla/calendar/sunbird/themes/pinstripe/sunbird/datetimepickers/minimonth.css
+++ b/mozilla/calendar/sunbird/themes/pinstripe/sunbird/datetimepickers/minimonth.css
@@ -18,7 +18,9 @@
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
- * Contributor(s): Matthew Willis
+ * Contributor(s):
+ * Matthew Willis
+ * Philipp Kewisch
*
* 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
@@ -114,7 +116,7 @@
}
.minimonth-day[othermonth="true"] {
- color: #d2d2d2;
+ color: #b2b2b2;
}
.minimonth-day[today="true"] {
@@ -126,8 +128,8 @@
color: #ffffff;
}
-.minimonth-day[busy="true"] {
- font-weight : bold;
+.minimonth-day[busy] {
+ font-weight: bold;
}
.minimonth-day:hover {
@@ -140,6 +142,16 @@
background-color: #d2d2d2;
}
+.minimonth-list {
+ padding-left: 1em;
+ padding-right: 1em;
+}
+
.minimonth-list[current="true"] {
font-weight: bold;
}
+
+.minimonth-list:hover {
+ background-color: Highlight;
+ color: HighlightText;
+}
diff --git a/mozilla/calendar/sunbird/themes/winstripe/sunbird/calendar.css b/mozilla/calendar/sunbird/themes/winstripe/sunbird/calendar.css
index a5a7cdd0add..c61c106ee54 100644
--- a/mozilla/calendar/sunbird/themes/winstripe/sunbird/calendar.css
+++ b/mozilla/calendar/sunbird/themes/winstripe/sunbird/calendar.css
@@ -891,23 +891,34 @@ listitem[selected="true"] > .calendar-list-item-class
/*--------------------------------------------------------------------
* tooltips
*-------------------------------------------------------------------*/
-label.tooltipHeaderLabel
-{
- font-weight : bold;
- text-align : right;
+vbox.tooltipBox {
+ max-width: 40em;
}
-description.tooltipHeaderDescription
-{
- font-weight : normal;
- text-align : left;
- white-space : normal;
+column.tooltipValueColumn {
+ max-width: 35em; /* tooltipBox max-width minus space for label */
}
-description.tooltipBody
-{
- font-weight : normal;
- white-space : normal;
+label.tooltipHeaderLabel {
+ font-weight: bold;
+ text-align: right;
+ margin: 0em 1em 0em 0em; /* 1em space before value */
+}
+
+description.tooltipHeaderDescription {
+ font-weight: normal;
+ text-align: left;
+ margin: 0px;
+}
+
+separator.tooltipBodySeparator {
+ height: 1ex; /* 1ex space above body text, below last header. */
+}
+
+description.tooltipBody {
+ font-weight: normal;
+ white-space: -moz-pre-wrap;
+ margin: 0px;
}
/*--------------------------------------------------------------------
diff --git a/mozilla/calendar/sunbird/themes/winstripe/sunbird/datetimepickers/minimonth.css b/mozilla/calendar/sunbird/themes/winstripe/sunbird/datetimepickers/minimonth.css
index f94f086ca76..812a4c18950 100644
--- a/mozilla/calendar/sunbird/themes/winstripe/sunbird/datetimepickers/minimonth.css
+++ b/mozilla/calendar/sunbird/themes/winstripe/sunbird/datetimepickers/minimonth.css
@@ -18,7 +18,9 @@
* Portions created by the Initial Developer are Copyright (C) 2001
* the Initial Developer. All Rights Reserved.
*
- * Contributor(s): Matthew Willis
+ * Contributor(s):
+ * Matthew Willis
+ * Philipp Kewisch
*
* 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
@@ -118,11 +120,7 @@
}
.minimonth-day[othermonth="true"] {
- color: #d2d2d2;
-}
-
-.minimonth-day[budy="true"] {
- font-weight : bold;
+ color: #b2b2b2;
}
.minimonth-day[today="true"] {
@@ -134,8 +132,8 @@
color: #ffffff;
}
-.minimonth-day[busy="true"] {
- font-weight : bold;
+.minimonth-day[busy] {
+ font-weight: bold;
}
.minimonth-day:hover {
@@ -148,7 +146,16 @@
background-color: #d2d2d2;
}
+.minimonth-list {
+ padding-left: 1em;
+ padding-right: 1em;
+}
+
.minimonth-list[current="true"] {
font-weight: bold;
}
+.minimonth-list:hover {
+ background-color: Highlight;
+ color: HighlightText;
+}
diff --git a/mozilla/camino/Camino.xcode/project.pbxproj b/mozilla/camino/Camino.xcode/project.pbxproj
index 998716e7d09..0cac1995a35 100644
--- a/mozilla/camino/Camino.xcode/project.pbxproj
+++ b/mozilla/camino/Camino.xcode/project.pbxproj
@@ -4136,6 +4136,7 @@
DEE9EC4E0AF5C613002BC511,
008116EC0B2722EB001CB3F0,
DEE349A80B84F45500BCD687,
+ DE6D27380C19FE5500292043,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -4699,7 +4700,6 @@
E010866D06BCA2E500BD5DE0,
E010866E06BCA2E500BD5DE0,
E010866F06BCA2E500BD5DE0,
- 3FF71AE00710A6800081B5D7,
0382B4DA07303CCA00A0228A,
0FFE0A81079B147F00966027,
0FFE0A82079B147F00966027,
@@ -4750,6 +4750,9 @@
DE09CE220ACB9BB8008A8D9C,
DE09CE230ACB9BB8008A8D9C,
DE8AD7400ADB4F67009D44F6,
+ DE148A490BF543F300F414D9,
+ DE148A4A0BF543F300F414D9,
+ DE148A4B0BF543F300F414D9,
);
isa = PBXResourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -5258,6 +5261,7 @@
DEE9EC510AF5C654002BC511,
008116ED0B2722EB001CB3F0,
DEE349AB0B84F47400BCD687,
+ DE6D273B0C19FE6F00292043,
);
isa = PBXSourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -8043,6 +8047,7 @@
DEE9EC4F0AF5C613002BC511,
008116EE0B2722EB001CB3F0,
DEE349A70B84F45500BCD687,
+ DE6D27370C19FE5500292043,
);
isa = PBXHeadersBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -8606,7 +8611,6 @@
E010867406BCA2E500BD5DE0,
E010867506BCA2E500BD5DE0,
E010867606BCA2E500BD5DE0,
- 3FF71AE10710A6800081B5D7,
0382B4DB07303CCA00A0228A,
0FFE0A84079B147F00966027,
0FFE0A85079B147F00966027,
@@ -8657,6 +8661,9 @@
DE09CE270ACB9BB8008A8D9C,
DE09CE280ACB9BB8008A8D9C,
DE8AD7410ADB4F67009D44F6,
+ DE148A460BF543F300F414D9,
+ DE148A470BF543F300F414D9,
+ DE148A480BF543F300F414D9,
);
isa = PBXResourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -9166,6 +9173,7 @@
DEE9EC520AF5C654002BC511,
008116EF0B2722EB001CB3F0,
DEE349AA0B84F47400BCD687,
+ DE6D273A0C19FE6F00292043,
);
isa = PBXSourcesBuildPhase;
runOnlyForDeploymentPostprocessing = 0;
@@ -12432,26 +12440,6 @@
settings = {
};
};
- 3FF71ADF0710A67F0081B5D7 = {
- isa = PBXFileReference;
- lastKnownFileType = image.tiff;
- name = tab_overflow.tif;
- path = resources/images/chrome/tab_overflow.tif;
- refType = 2;
- sourceTree = SOURCE_ROOT;
- };
- 3FF71AE00710A6800081B5D7 = {
- fileRef = 3FF71ADF0710A67F0081B5D7;
- isa = PBXBuildFile;
- settings = {
- };
- };
- 3FF71AE10710A6800081B5D7 = {
- fileRef = 3FF71ADF0710A67F0081B5D7;
- isa = PBXBuildFile;
- settings = {
- };
- };
3FFE23520847CB0D00D6CAFC = {
fileEncoding = 30;
isa = PBXFileReference;
@@ -13895,6 +13883,66 @@
settings = {
};
};
+ DE148A430BF543F300F414D9 = {
+ isa = PBXFileReference;
+ lastKnownFileType = image.tiff;
+ name = tab_scroll_button_left.tif;
+ path = resources/images/chrome/tab_scroll_button_left.tif;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ DE148A440BF543F300F414D9 = {
+ isa = PBXFileReference;
+ lastKnownFileType = image.tiff;
+ name = tab_menu_button.tif;
+ path = resources/images/chrome/tab_menu_button.tif;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ DE148A450BF543F300F414D9 = {
+ isa = PBXFileReference;
+ lastKnownFileType = image.tiff;
+ name = tab_scroll_button_right.tif;
+ path = resources/images/chrome/tab_scroll_button_right.tif;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ DE148A460BF543F300F414D9 = {
+ fileRef = DE148A430BF543F300F414D9;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ DE148A470BF543F300F414D9 = {
+ fileRef = DE148A440BF543F300F414D9;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ DE148A480BF543F300F414D9 = {
+ fileRef = DE148A450BF543F300F414D9;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ DE148A490BF543F300F414D9 = {
+ fileRef = DE148A430BF543F300F414D9;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ DE148A4A0BF543F300F414D9 = {
+ fileRef = DE148A440BF543F300F414D9;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ DE148A4B0BF543F300F414D9 = {
+ fileRef = DE148A450BF543F300F414D9;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
DE56E9220B73E71500D27D57 = {
isa = PBXFileReference;
lastKnownFileType = "compiled.mach-o.bundle";
@@ -13923,6 +13971,48 @@
settings = {
};
};
+ DE6D27360C19FE5500292043 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.c.h;
+ name = CHPermissionManager.h;
+ path = src/embedding/CHPermissionManager.h;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ DE6D27370C19FE5500292043 = {
+ fileRef = DE6D27360C19FE5500292043;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ DE6D27380C19FE5500292043 = {
+ fileRef = DE6D27360C19FE5500292043;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ DE6D27390C19FE6F00292043 = {
+ fileEncoding = 30;
+ isa = PBXFileReference;
+ lastKnownFileType = sourcecode.cpp.objcpp;
+ name = CHPermissionManager.mm;
+ path = src/embedding/CHPermissionManager.mm;
+ refType = 2;
+ sourceTree = SOURCE_ROOT;
+ };
+ DE6D273A0C19FE6F00292043 = {
+ fileRef = DE6D27390C19FE6F00292043;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
+ DE6D273B0C19FE6F00292043 = {
+ fileRef = DE6D27390C19FE6F00292043;
+ isa = PBXBuildFile;
+ settings = {
+ };
+ };
DE74F8B80AB2709E00FD1D5B = {
fileEncoding = 30;
isa = PBXFileReference;
@@ -14846,7 +14936,9 @@
3FF08F1206E7D3C2001C9B19,
3FF08F1306E7D3C2001C9B19,
3FF08F1406E7D3C2001C9B19,
- 3FF71ADF0710A67F0081B5D7,
+ DE148A430BF543F300F414D9,
+ DE148A440BF543F300F414D9,
+ DE148A450BF543F300F414D9,
E091C0D006225EA3007D9E8F,
F540BD1A029ED15301026D5D,
F540BD1C029ED17901026D5D,
@@ -15341,9 +15433,11 @@
F632AF8302B9AEBB01000103,
F5AE04B20206A34801A967DF,
F5125A110202064D01FAFD9F,
+ F529788A0371820B01026DCE,
F558B1F0030F6E470166970F,
F5DE10E80209DC0601A967DF,
F5DE10E70209DC0601A967DF,
+ DE6D27360C19FE5500292043,
0FC4B33D08941B4F009C5F41,
F5C8D55203A2A42401A8016F,
F566BD1202EFA9AD01A967F3,
@@ -16298,11 +16392,11 @@
};
F558B1F603107E4A0166970F = {
children = (
- F529788A0371820B01026DCE,
F529788B0371820B01026DCE,
F5DE10EB0209DC0601A967DF,
F558B1F1030F6E470166970F,
F5DE10EA0209DC0601A967DF,
+ DE6D27390C19FE6F00292043,
DEA548EF0A25227200186C93,
);
isa = PBXGroup;
@@ -17015,7 +17109,7 @@
isa = PBXFileReference;
lastKnownFileType = sourcecode.javascript;
name = "all-camino.js";
- path = "resources/application/all-camino.js";
+ path = "generated/all-camino.js";
refType = 2;
sourceTree = SOURCE_ROOT;
};
diff --git a/mozilla/camino/Info-Camino.plist b/mozilla/camino/Info-Camino.plist
index 13d334fcc23..aba66341af0 100644
--- a/mozilla/camino/Info-Camino.plist
+++ b/mozilla/camino/Info-Camino.plist
@@ -95,7 +95,7 @@
CFBundleExecutable
Camino
CFBundleGetInfoString
- Camino 1.1b+, © 1998-2007 Contributors
+ Camino 1.6a1pre, © 1998-2007 Contributors
CFBundleIconFile
appicon.icns
CFBundleIdentifier
@@ -107,7 +107,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.1b+
+ 1.6a1pre
CFBundleSignature
MOZC
CFBundleURLTypes
@@ -158,7 +158,7 @@
CFBundleVersion
- 1.1b+
+ 1.6a1pre
LSMinimumSystemVersion
10.3
NSAppleScriptEnabled
diff --git a/mozilla/camino/Info-CaminoStatic.plist b/mozilla/camino/Info-CaminoStatic.plist
index 13d334fcc23..aba66341af0 100644
--- a/mozilla/camino/Info-CaminoStatic.plist
+++ b/mozilla/camino/Info-CaminoStatic.plist
@@ -95,7 +95,7 @@
CFBundleExecutable
Camino
CFBundleGetInfoString
- Camino 1.1b+, © 1998-2007 Contributors
+ Camino 1.6a1pre, © 1998-2007 Contributors
CFBundleIconFile
appicon.icns
CFBundleIdentifier
@@ -107,7 +107,7 @@
CFBundlePackageType
APPL
CFBundleShortVersionString
- 1.1b+
+ 1.6a1pre
CFBundleSignature
MOZC
CFBundleURLTypes
@@ -158,7 +158,7 @@
CFBundleVersion
- 1.1b+
+ 1.6a1pre
LSMinimumSystemVersion
10.3
NSAppleScriptEnabled
diff --git a/mozilla/camino/Makefile.in b/mozilla/camino/Makefile.in
index 916bc4a9f72..d2d777d622f 100644
--- a/mozilla/camino/Makefile.in
+++ b/mozilla/camino/Makefile.in
@@ -20,6 +20,8 @@
#
# Contributor(s):
# Brian Ryner
+# Mark Mentovai
+# Smokey Ardisson
#
# 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
@@ -49,6 +51,9 @@ DIRS = \
APP_NAME = Camino
+FOX_APP_VERSION_FILE = $(srcdir)/../browser/config/version.txt
+FOX_APP_VERSION = $(shell cat $(FOX_APP_VERSION_FILE))
+
ifdef MOZ_DEBUG
BUILDSTYLE = Development
else
@@ -86,10 +91,18 @@ endif
clean clobber repackage::
rm -rf $(DIST)/$(APP_NAME).app
rm -rf embed-replacements.tmp
+ rm -rf generated
+
+generated:
+ mkdir -p $@
+
+# Generate files which need to pull version numbers from elsewhere in the tree
+generated/all-camino.js: $(srcdir)/resources/application/all-camino.js.in $(FOX_APP_VERSION_FILE) generated
+ sed -e "s/@FOX_APP_VERSION@/$(FOX_APP_VERSION)/" $< > $@
# The embed-replacements rsync is done for both srcdir and objdir builds
# to avoid adding CVS stuff to embed.jar.
-libs::
+libs:: generated/all-camino.js
rsync -aC --delete $(srcdir)/embed-replacements/ embed-replacements.tmp
cd embed-replacements.tmp && $(ZIP) -r0DX ../../dist/Embed/chrome/embed.jar *
$(PBBUILD) -project Camino.xcode -target $(TARGET) -buildstyle $(BUILDSTYLE) $(PBBUILD_SETTINGS)
diff --git a/mozilla/camino/PreferencePanes/Appearance/Appearance.h b/mozilla/camino/PreferencePanes/Appearance/Appearance.h
index 3c8b0f4e59c..5cdb90899ef 100644
--- a/mozilla/camino/PreferencePanes/Appearance/Appearance.h
+++ b/mozilla/camino/PreferencePanes/Appearance/Appearance.h
@@ -80,7 +80,9 @@
IBOutlet NSTextField* mAdvancedFontsLabel;
IBOutlet NSMatrix* mDefaultFontMatrix;
-
+
+ NSArray* mCarbonSystemFontFamilies;
+
NSArray* mRegionMappingTable;
NSButton* mFontButtonForEditor;
diff --git a/mozilla/camino/PreferencePanes/Appearance/Appearance.mm b/mozilla/camino/PreferencePanes/Appearance/Appearance.mm
index 650d3471825..5b7f59e81fe 100644
--- a/mozilla/camino/PreferencePanes/Appearance/Appearance.mm
+++ b/mozilla/camino/PreferencePanes/Appearance/Appearance.mm
@@ -65,7 +65,7 @@
- (NSFont*)getFontOfType:(NSString*)fontType fromDict:(NSDictionary*)regionDict;
-- (void)setFontSampleOfType:(NSString *)fontType withFont:(NSFont*)font andDict:(NSMutableDictionary*)regionDict;
+- (void)setFontSampleOfType:(NSString *)fontType withFont:(NSFont*)font andDict:(NSDictionary*)regionDict;
- (void)saveFont:(NSFont*)font toDict:(NSMutableDictionary*)regionDict forType:(NSString*)fontType;
- (void)updateFontSampleOfType:(NSString *)fontType;
@@ -77,6 +77,9 @@
- (void)setupFontPopup:(NSPopUpButton*)popupButton forType:(NSString*)fontType fromDict:(NSDictionary*)regionDict;
- (void)getFontFromPopup:(NSPopUpButton*)popupButton forType:(NSString*)fontType intoDict:(NSDictionary*)regionDict;
+- (NSString*)carbonNameForFontFamily:(ATSFontFamilyRef)fontFamily;
+- (NSArray*)sortedCarbonSystemFontFamilies;
+
@end
#pragma mark -
@@ -125,7 +128,7 @@
[mRegionMappingTable release];
[mPropSampleFieldEditor release];
[mMonoSampleFieldEditor release];
-
+ [mCarbonSystemFontFamilies release];
[super dealloc];
}
@@ -546,49 +549,47 @@
[self setFontSampleOfType:fontType withFont:foundFont andDict:regionDict];
}
-- (void)setFontSampleOfType:(NSString *)fontType withFont:(NSFont*)font andDict:(NSMutableDictionary*)regionDict
+// TODO: This code modifies sub-dictionaries of regionDict, which works only
+// because they happen to have been constructed as mutableDictionaries. This
+// API (and likely others in this class) should be re-worked to either remove or
+// enforce that assumption.
+- (void)setFontSampleOfType:(NSString *)fontType withFont:(NSFont*)font andDict:(NSDictionary*)regionDict
{
- // font may be nil here, in which case the font is missing, and we construct
- // a string to display from the dict.
NSMutableDictionary *fontTypeDict = [regionDict objectForKey:fontType];
-
- NSTextField *sampleCell = [self getFontSampleForType:fontType];
+ NSString *fontInformationFormat = @"%@, %dpt";
NSString *displayString = nil;
-
- if (font == nil)
- {
- if (regionDict)
- {
- NSDictionary *fontSizeDict = [regionDict objectForKey:@"fontsize"];
- NSString *fontName = [fontTypeDict objectForKey:@"fontfamily"];
- int fontSize = [[fontSizeDict objectForKey:[self getFontSizeType:fontType]] intValue];
- displayString = [NSString stringWithFormat:@"%@, %dpt %@", fontName, fontSize, [self getLocalizedString:@"Missing"]];
- font = [NSFont userFontOfSize:14.0];
+ if (font) {
+ displayString = [NSString stringWithFormat:fontInformationFormat, [font familyName], (int)[font pointSize]];
- // set the missing flag in the dict
- if (![fontTypeDict objectForKey:@"missing"] || ![[fontTypeDict objectForKey:@"missing"] boolValue])
- [fontTypeDict setObject:[NSNumber numberWithBool:YES] forKey:@"missing"];
- }
- else
- {
- // should never happen
- // XXX localize
- displayString = @"Font missing";
- font = [NSFont userFontOfSize:16.0];
- }
- }
- else
- {
- displayString = [NSString stringWithFormat:@"%@, %dpt", [font familyName], (int)[font pointSize]];
-
// make sure we don't have a missing entry
- [fontTypeDict removeObjectForKey:@"missing"];
+ [fontTypeDict removeObjectForKey:@"missing"];
+ }
+ else {
+ // a nil font either means it's missing entirely or that a carbon name was
+ // chosen from the advanced panel and could not be used to create a NSFont.
+ NSDictionary *fontSizeDict = [regionDict objectForKey:@"fontsize"];
+ NSString *fontName = [fontTypeDict objectForKey:@"fontfamily"];
+ int fontSize = [[fontSizeDict objectForKey:[self getFontSizeType:fontType]] intValue];
+ displayString = [NSString stringWithFormat:fontInformationFormat, fontName, fontSize];
+
+ if ([[self sortedCarbonSystemFontFamilies] containsObject:fontName]) {
+ [fontTypeDict removeObjectForKey:@"missing"];
+ }
+ else { // font is definitely missing
+ displayString = [displayString stringByAppendingFormat:@" %@", [self getLocalizedString:@"Missing"]];
+ [fontTypeDict setObject:[NSNumber numberWithBool:YES] forKey:@"missing"];
+ }
+
+ font = [NSFont userFontOfSize:14.0];
+ if (!regionDict) // Should never happen, but this would mean a displayString with no info
+ displayString = @"Font missing"; // XXX localize
}
-
+
// Set the font of the sample to a font that is not bold, italic etc.
NSFont* baseFont = [[NSFontManager sharedFontManager] fontWithFamily:[font familyName] traits:0 weight:5 /* normal weight */ size:[font pointSize]];
-
+
+ NSTextField *sampleCell = [self getFontSampleForType:fontType];
[sampleCell setFont:baseFont];
[sampleCell setStringValue:displayString];
}
@@ -790,21 +791,12 @@ const int kMissingFontPopupItemTag = 9999;
{
NSDictionary* fontTypeDict = [regionDict objectForKey:fontType];
NSString* defaultValue = [fontTypeDict objectForKey:@"fontfamily"];
-
- [self buildFontPopup:popupButton];
- // check to see if the font exists
- NSFont *foundFont = nil;
- if (defaultValue)
- foundFont = [[NSFontManager sharedFontManager] fontWithFamily:defaultValue traits:0 weight:5 size:16.0];
- else {
- foundFont = [fontType isEqualToString:@"monospace"]
- ? [NSFont userFixedPitchFontOfSize:16.0]
- : [NSFont userFontOfSize:16.0];
- defaultValue = [foundFont familyName];
- }
+ [self buildFontPopup:popupButton];
- if (!foundFont) {
+ NSArray* systemFontList = [self sortedCarbonSystemFontFamilies];
+ if (![systemFontList containsObject:defaultValue]) {
+ // indicate that the font saved in defaults is missing
NSMenuItem* missingFontItem = [[popupButton menu] itemWithTag:kMissingFontPopupItemTag];
if (!missingFontItem) {
missingFontItem = [[[NSMenuItem alloc] initWithTitle:@"temp" action:NULL keyEquivalent:@""] autorelease];
@@ -842,45 +834,92 @@ const int kMissingFontPopupItemTag = 9999;
while ([menu numberOfItems] > 0)
[menu removeItemAtIndex:0];
- NSArray* fontList = [[NSFontManager sharedFontManager] availableFontFamilies];
- NSArray* sortedFontList = [fontList sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)];
-
- for (unsigned int i = 0; i < [sortedFontList count]; i ++) {
- NSString* fontFamilyName = [sortedFontList objectAtIndex:i];
- unichar firstChar = [fontFamilyName characterAtIndex:0];
-
- if (firstChar == unichar('.') || firstChar == unichar('#'))
- continue; // skip fonts with ugly names
-
- NSString* uiFamilyName = [[NSFontManager sharedFontManager] localizedNameForFamily:fontFamilyName face:nil];
- NSMenuItem* newItem = [[NSMenuItem alloc] initWithTitle:uiFamilyName action:nil keyEquivalent:@""];
-
-#if SUBMENUS_FOR_VARIANTS
- NSArray* fontFamilyMembers = [[NSFontManager sharedFontManager] availableMembersOfFontFamily:fontFamilyName];
- if ([fontFamilyMembers count] > 1) {
- NSMenu* familySubmenu = [[NSMenu alloc] initWithTitle:fontFamilyName];
- [familySubmenu setAutoenablesItems:NO];
-
- for (unsigned int j = 0; j < [fontFamilyMembers count]; j ++) {
- NSArray* fontFamilyItems = [fontFamilyMembers objectAtIndex:j];
- NSString* fontItemName = [fontFamilyItems objectAtIndex:1];
-
- NSMenuItem* newSubmenuItem = [[NSMenuItem alloc] initWithTitle:fontItemName action:nil keyEquivalent:@""];
- [familySubmenu addItem:newSubmenuItem];
- }
-
- [newItem setSubmenu:familySubmenu];
- } else {
- // use the name from the font family info?
- }
-#endif
-
- [menu addItem:newItem];
+ // Gecko is unable to recognize non-western font names in the
+ // representation returned by NSFontManager. As a workaround,
+ // use Apple Type Services to supply the names of installed fonts.
+ NSEnumerator* fontNameEnumerator = [[self sortedCarbonSystemFontFamilies] objectEnumerator];
+ NSString* fontName;
+ while (fontName = [fontNameEnumerator nextObject]) {
+ NSMenuItem* newMenuItem = [[[NSMenuItem alloc] initWithTitle:fontName action:nil keyEquivalent:@""] autorelease];
+ [menu addItem:newMenuItem];
}
}
+#pragma mark -
+
+- (NSString*)carbonNameForFontFamily:(ATSFontFamilyRef)fontFamily
+{
+ OSStatus status = noErr;
+
+ Str255 quickDrawFontName;
+ status = ATSFontFamilyGetQuickDrawName(fontFamily, quickDrawFontName);
+
+ // Fonts with certain prefixes are not useful.
+ if (status != noErr || quickDrawFontName[0] == 0 || quickDrawFontName[1] == '.' || quickDrawFontName[1] == '#')
+ return nil;
+
+ TextEncoding unicodeTextEncoding = CreateTextEncoding(kTextEncodingUnicodeDefault,
+ kTextEncodingDefaultVariant,
+ kUnicode16BitFormat);
+ TECObjectRef textEncodingConverter = NULL;
+ TextEncoding fontEncoding = ATSFontFamilyGetEncoding(fontFamily);
+ status = TECCreateConverter(&textEncodingConverter, fontEncoding, unicodeTextEncoding);
+ if (status != noErr)
+ return nil;
+
+ // Convert the QuickDraw name to Unicode, allocating a buffer
+ // twice the capacity to ensure ample room for the conversion.
+ UniChar unicodeFontName[(sizeof(quickDrawFontName) * 2)];
+ ByteCount actualInputLength, actualOutputLength;
+ status = TECConvertText(textEncodingConverter, &quickDrawFontName[1], quickDrawFontName[0], &actualInputLength,
+ (TextPtr)unicodeFontName , sizeof(unicodeFontName), &actualOutputLength);
+ TECDisposeConverter(textEncodingConverter);
+ if (status != noErr)
+ return nil;
+
+ return [NSString stringWithCharacters:unicodeFontName length:(actualOutputLength / sizeof(UniChar))];
+}
+
+- (NSArray*)sortedCarbonSystemFontFamilies
+{
+ if (!mCarbonSystemFontFamilies) {
+ NSMutableArray* fontFamilies = [NSMutableArray array];
+ OSStatus status = noErr;
+ ATSFontFamilyIterator fontFamilyIterator;
+ status = ATSFontFamilyIteratorCreate(kATSFontContextLocal, NULL, NULL,
+ kATSOptionFlagsDefaultScope,
+ &fontFamilyIterator);
+ if (status != noErr)
+ return nil;
+
+ ATSFontFamilyRef fontFamily;
+ while (status == noErr) {
+ status = ATSFontFamilyIteratorNext(fontFamilyIterator, &fontFamily);
+ if (status == noErr) {
+ NSString* familyName = [self carbonNameForFontFamily:fontFamily];
+ if (familyName)
+ [fontFamilies addObject:familyName];
+ }
+ else if (status == kATSIterationScopeModified) {
+ // font database has changed; reset the iterator and start over.
+ status = ATSFontFamilyIteratorReset(kATSFontContextLocal, nil, nil,
+ kATSOptionFlagsUnRestrictedScope,
+ &fontFamilyIterator);
+ [fontFamilies removeAllObjects];
+ }
+ }
+
+ ATSFontFamilyIteratorRelease(&fontFamilyIterator);
+
+ mCarbonSystemFontFamilies = [[fontFamilies sortedArrayUsingSelector:@selector(caseInsensitiveCompare:)] retain];
+ }
+ return mCarbonSystemFontFamilies;
+}
+
@end
+#pragma mark -
+
@implementation OrgMozillaChimeraPreferenceAppearance (FontManagerDelegate)
- (id)fieldEditorForObject:(id)inObject
diff --git a/mozilla/camino/PreferencePanes/History/History.mm b/mozilla/camino/PreferencePanes/History/History.mm
index 5892ddd54c6..9735e6efa84 100644
--- a/mozilla/camino/PreferencePanes/History/History.mm
+++ b/mozilla/camino/PreferencePanes/History/History.mm
@@ -39,6 +39,7 @@
* ***** END LICENSE BLOCK ***** */
#import "History.h"
+#import "NSString+Utils.h"
#include "nsCOMPtr.h"
#include "nsIServiceManager.h"
@@ -47,85 +48,64 @@
const int kDefaultExpireDays = 9;
-@interface OrgMozillaChimeraPreferenceHistory(Private)
+// A formatter for the history duration that only accepts integers >= 0
+@interface NonNegativeIntegerFormatter : NSFormatter
+{
+}
+@end
-- (void)doClearDiskCache;
-- (void)doClearGlobalHistory;
-- (BOOL)historyDaysValid;
+@implementation NonNegativeIntegerFormatter
+
+- (NSString *)stringForObjectValue:(id)anObject
+{
+ return [anObject stringValue];
+}
+
+- (BOOL)getObjectValue:(id *)anObject forString:(NSString *)string errorDescription:(NSString **)error
+{
+ *anObject = [NSNumber numberWithInt:[string intValue]];
+ return YES;
+}
+
+- (BOOL)isPartialStringValid:(NSString *)partialString newEditingString:(NSString **)newString errorDescription:(NSString **)error
+{
+ NSCharacterSet* nonDigitSet = [[NSCharacterSet decimalDigitCharacterSet] invertedSet];
+ if ([partialString rangeOfCharacterFromSet:nonDigitSet].location != NSNotFound) {
+ *newString = [partialString stringByRemovingCharactersInSet:nonDigitSet];
+ return NO;
+ }
+ return YES;
+}
@end
+#pragma mark -
+
@implementation OrgMozillaChimeraPreferenceHistory
-- (id)initWithBundle:(NSBundle *)bundle
-{
- self = [super initWithBundle:bundle];
- return self;
-}
-
-- (void)dealloc
-{
- [super dealloc];
-}
-
- (void)mainViewDidLoad
{
- if (!mPrefService)
- return;
-
BOOL gotPref;
int expireDays = [self getIntPref:"browser.history_expire_days" withSuccess:&gotPref];
if (!gotPref)
expireDays = kDefaultExpireDays;
[textFieldHistoryDays setIntValue:expireDays];
-}
-
-- (NSPreferencePaneUnselectReply)shouldUnselect
-{
- // make sure the history days value is numbers only (should use a formatter for this?)
- if (![self historyDaysValid])
- {
- [[textFieldHistoryDays window] makeFirstResponder:textFieldHistoryDays];
- [textFieldHistoryDays selectText:nil];
- NSBeep();
- return NSUnselectCancel;
- }
- return NSUnselectNow;
+ [textFieldHistoryDays setFormatter:[[[NonNegativeIntegerFormatter alloc] init] autorelease]];
}
- (void)didUnselect
{
- if (!mPrefService)
- return;
-
- if ([self historyDaysValid])
- [self setPref:"browser.history_expire_days" toInt:[textFieldHistoryDays intValue]];
+ [self setPref:"browser.history_expire_days" toInt:[textFieldHistoryDays intValue]];
}
- (IBAction)historyDaysModified:(id)sender
{
- if (!mPrefService)
- return;
-
- if ([self historyDaysValid])
- {
- [self setPref:"browser.history_expire_days" toInt:[sender intValue]];
- }
- else
- {
- // If any non-numeric characters were entered make some noise and spit it out.
- BOOL gotPref;
- int prefValue = [self getIntPref:"browser.history_expire_days" withSuccess:&gotPref];
- if (!gotPref)
- prefValue = kDefaultExpireDays;
- [textFieldHistoryDays setIntValue:prefValue];
- NSBeep();
- }
+ [self setPref:"browser.history_expire_days" toInt:[sender intValue]];
}
// Clear the user's disk cache
--(IBAction) clearDiskCache:(id)aSender
+- (IBAction)clearDiskCache:(id)aSender
{
NSBeginCriticalAlertSheet([self getLocalizedString:@"EmptyCacheTitle"],
[self getLocalizedString:@"EmptyButton"],
@@ -158,39 +138,20 @@ const int kDefaultExpireDays = 9;
- (void)clearDiskCacheSheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
- if (returnCode == NSAlertDefaultReturn)
- {
- [self doClearDiskCache];
+ if (returnCode == NSAlertDefaultReturn) {
+ nsCOMPtr cacheServ (do_GetService("@mozilla.org/network/cache-service;1"));
+ if (cacheServ)
+ cacheServ->EvictEntries(nsICache::STORE_ANYWHERE);
}
}
- (void)clearGlobalHistorySheetDidEnd:(NSWindow *)sheet returnCode:(int)returnCode contextInfo:(void *)contextInfo
{
- if (returnCode == NSAlertDefaultReturn)
- {
- [self doClearGlobalHistory];
+ if (returnCode == NSAlertDefaultReturn) {
+ nsCOMPtr hist (do_GetService("@mozilla.org/browser/global-history;2"));
+ if (hist)
+ hist->RemoveAllPages();
}
}
-- (void)doClearDiskCache
-{
- nsCOMPtr cacheServ ( do_GetService("@mozilla.org/network/cache-service;1") );
- if ( cacheServ )
- cacheServ->EvictEntries(nsICache::STORE_ANYWHERE);
-}
-
-- (void)doClearGlobalHistory
-{
- nsCOMPtr hist ( do_GetService("@mozilla.org/browser/global-history;2") );
- if ( hist )
- hist->RemoveAllPages();
-}
-
-- (BOOL)historyDaysValid
-{
- NSCharacterSet* nonDigitsSet = [[NSCharacterSet decimalDigitCharacterSet] invertedSet];
- NSRange nonDigitsRange = [[textFieldHistoryDays stringValue] rangeOfCharacterFromSet:nonDigitsSet];
- return (nonDigitsRange.length == 0);
-}
-
@end
diff --git a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib
index 27f8fd25915..c67f353dcfd 100644
--- a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib
+++ b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/info.nib
@@ -11,6 +11,6 @@
5
IBSystem Version
- 8L127
+ 8P2137
diff --git a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/keyedobjects.nib b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/keyedobjects.nib
index b333dab5e58..faf82c5fc64 100644
Binary files a/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/keyedobjects.nib and b/mozilla/camino/PreferencePanes/Navigation/English.lproj/Navigation.nib/keyedobjects.nib differ
diff --git a/mozilla/camino/docs/Release Notes 1-0-5.rtf b/mozilla/camino/docs/Release Notes 1-0-5.rtf
new file mode 100644
index 00000000000..8f34ad6029a
--- /dev/null
+++ b/mozilla/camino/docs/Release Notes 1-0-5.rtf
@@ -0,0 +1,172 @@
+{\rtf1\mac\ansicpg10000\cocoartf102
+\readonlydoc1{\fonttbl\f0\fnil\fcharset77 TrebuchetMS-Bold;\f1\fnil\fcharset77 LucidaGrande;\f2\fnil\fcharset77 LucidaGrande-Bold;
+\f3\fnil\fcharset77 Monaco;}
+{\colortbl;\red255\green255\blue255;\red51\green51\blue51;\red0\green0\blue255;}
+\margl1440\margr1440\vieww12000\viewh15840\viewkind0
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sl320\sa60\ql\qnatural
+
+\f0\b\fs30 \cf2 About Camino 1.0.5\
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f1\b0\fs20 \cf2 Camino 1.0.5 is a security and stability update for Camino 1.0.x users running Mac OS X 10.2.8. Camino 1.0.5 will be the last update in the 1.0.x series and is thus the last version of Camino to support Mac OS X 10.2.\
+\
+All users on Mac OS X 10.2.8 are recommended to upgrade; all users of Mac OS X 10.3 or higher should upgrade to Camino 1.5 instead.\
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f0\b\fs30 \cf2 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sl320\sa60\ql\qnatural
+\cf2 Changes since Camino 1.0\
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f1\b0\fs20 \cf2 The following changes and improvements have been made since the Camino 1.0 release.
+\f0\b\fs30 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sb200\sa200\ql\qnatural
+
+\f2\fs20 \cf2 In Camino 1.0.5, we have made the following changes and improvements since version 1.0.4:\
+\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
+
+\f1\b0 \cf2 \'a5 Fixed several critical security and stability issues, including those fixed in version 1.8.0.12 of the Mozilla Gecko rendering engine.\
+ \'a5 Thumbnails at Picasa will now display properly.\
+ \'a5 On Mac OS X 10.2 and 10.3, Script Editor will no longer complain that it cannot open Camino\'d5s AppleScript dictionary, and all AppleScripts that interact with Camino will work just as they do on Mac OS X 10.4.\
+ \'a5 Viewing the list of installed plug-ins will no longer cause disabled security warnings to appear when browsing.\
+ \'a5 When changing Chinese, Japanese, or Korean font preferences, using the \'d2Advanced\'d3 sheet will now set the font correctly.\
+ \'a5 Camino now prompts the user before automatically filling a form with a saved username and password from the Keychain if the domain name that the form will be submitted to has changed since the password was saved.\
+ \'a5 Upgraded the bundled Java Embedding Plugin to version 0.9.6.2.\
+ \'a5 Further improved ad-blocking.\
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sb200\sa200\ql\qnatural
+
+\f2\b \cf2 In Camino 1.0.4, we have made the following changes and improvements since version 1.0.3:\
+\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
+
+\f1\b0 \cf2 \'a5 Fixed several critical security and stability issues, including those fixed in version 1.8.0.10 of the Mozilla Gecko rendering engine.\
+ \'a5 Sheets will now close as expected on Intel-based Macs.\
+ \'a5 Upgraded the the bundled Java Embedding Plugin to version 0.9.6.\
+ \'a5 Added support for importing iCab 3 bookmarks.\
+ \'a5 Improved the handling of Internet Explorer
+\f3 .url
+\f1 shortcut files.\
+ \'a5 The text of certain security dialogs now contains \'d2Camino\'d3 instead of \'d2(null)\'d3.\
+ \'a5 Camino will now make a backup copy of the bookmarks file when it launches if the file is not corrupt.\
+ \'a5 Camino will automatically restore bookmarks from a backup when it launches if they are unreadable.\
+ \'a5 Further improved ad-blocking.\
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sb200\sa200\ql\qnatural
+
+\f2\b \cf2 In Camino 1.0.3, we have made the following changes and improvements since version 1.0.2:\
+\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
+
+\f1\b0 \cf2 \'a5 Fixed several critical security and stability issues, including those fixed in version 1.8.0.7 of the Mozilla Gecko rendering engine.\
+ \'a5 Upgraded the the bundled Java Embedding Plugin to version 0.9.5+g.\
+ \'a5 The \'d2Reset Camino\'c9\'d3 command will now reset minimized windows.\
+ \'a5 Fixed an issue where Cmd-B would fail to act as a toggle in some cases.\
+ \'a5 Further improved ad-blocking.\
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sb200\sa200\ql\qnatural
+
+\f2\b \cf2 In Camino 1.0.2, we have made the following changes and improvements since version 1.0.1:\
+\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
+
+\f1\b0 \cf2 \'a5 Fixed several critical security issues, including those fixed in version 1.8.0.4 of the Mozilla Gecko rendering engine.\
+ \'a5 Fixed an issue in Camino 1.0.1 where proxy auto-config (PAC) files were ignored.\
+ \'a5 Fixed an issue where Camino\'d5s bookmark metadata could not be added to the list of locations Spotlight is prevented from searching.\
+ \'a5 Fixed an issue where using Camino on a network with many Bonjour hosts could significantly degrade performance.\
+ \'a5 Fixed an issue where Camino would ignore the \'d2Link from other application\'d3 tabbed browsing preference in certain cases.\
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sb200\sa200\ql\qnatural
+
+\f2\b \cf2 In Camino 1.0.1, we have made the following changes and improvements since version 1.0:\
+\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
+
+\f1\b0 \cf2 \'a5 Fixed several critical security issues, including those fixed in version 1.8.0.3 of the Mozilla Gecko rendering engine.\
+ \'a5 Upgraded the bundled Java Embedding Plugin to version 0.9.5+d.\
+ \'a5 Improved ad-blocking, especially of German ads.\
+ \'a5 Enabled the opening of local SVG files.\
+ \'a5 Fixed an issue where Camino on Intel-based Macs was unable to read Keychain entries stored by Camino on PowerPC-based Macs.\
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f0\b\fs30 \cf2 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sl320\sa60\ql\qnatural
+\cf2 Highlights of Camino 1.0\
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sa200\ql\qnatural
+
+\f1\b0\fs20 \cf2 Below is a list of the major changes in Camino 1.0. A full list is available on our website.\
+\pard\tx360\tx720\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
+\cf2 \'a5 General\
+\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
+\cf2 \'a5 Camino is now a universal binary, allowing it to run natively on both PowerPC- and Intel-based Macs.\
+ \'a5 Moving backward and forward through history is now \'d2blazingly fast\'d3.\
+ \'a5 The \'d2Fill Form\'d3 menu item and toolbar button use your personal Address Book card to automatically fill out forms on the current web page.\
+ \'a5 Ad-blocking is now built-in, but turned off by default.\
+ \'a5 The \'d2Camino\'d3 menu now has a \'d2Reset Camino\'c9\'d3 menu item, which will erase your browsing history, empty the cache, clear downloads, clear all cookies, and clear all site permissions.\
+ \'a5 The \'d2Camino\'d3 menu now has an \'d2Empty Cache\'c9\'d3 menu item.\
+ \'a5 An optional warning is shown when closing windows with multiple tabs or when quitting with multiple windows open.\
+ \'a5 Camino now has certificate-management capabilities.\
+\pard\tx1800\tx2160\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2160\fi-720\ql\qnatural
+\cf2 \'a5 It is now possible to trust a new Certificate Authority.\
+ \'a5 The Certificates window, accessible from the Security preference pane, shows the set of certificates included with Camino and any newly-downloaded certificates.\
+\pard\tx1080\tx1440\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\sa200\ql\qnatural
+\cf2 \'a5 The about:config preference editor is now mostly functional.\
+\pard\tx360\tx720\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
+\cf2 \'a5 Bookmarks and History\
+\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
+\cf2 \'a5 Camino now includes live searching of bookmarks and history.\
+ \'a5 It is now possible to sort bookmarks alphabetically.\
+ \'a5 The \'d2Go\'d3 menu now displays global history, showing sites you visited in any window, ordered by date.\
+ \'a5 Spotlight will now index Camino bookmarks.\
+\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\sa200\ql\qnatural
+\cf2 \'a5 Camino now displays custom icons for Bookmarks, History, and local files.\
+\pard\tx360\tx720\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
+\cf2 \'a5 Tabbed browsing\
+\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
+\cf2 \'a5 The tab bar has been rewritten from scratch.\
+\pard\tx1800\tx2160\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li2160\fi-720\ql\qnatural
+\cf2 \'a5 Tabs now appear on the left of the window, instead of in the center.\
+ \'a5 Windows can now contain more than 16 tabs, and tabs which do not fit on the tab bar appear in an overflow menu.\
+ \'a5 The tab bar can remain visible when a single tab is open.\
+\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
+\cf2 \'a5 Double-clicking on empty space in the tab bar creates a new tab.\
+\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\sa200\ql\qnatural
+\cf2 \'a5 Command-enter in the location bar or search field will now open the page or search results in a new tab or new window (instead of the current tab or window).\
+\pard\tx360\tx720\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
+\cf2 \'a5 Downloading\
+\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
+\cf2 \'a5 Camino now saves the list of downloads between sessions.\
+\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\sa200\ql\qnatural
+\cf2 \'a5 Downloads can be paused and resumed.\
+\pard\tx360\tx720\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
+\cf2 \'a5 Web Content\
+\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
+\cf2 \'a5 Camino now has support for \'d2document.designMode\'d3 (inline HTML editing, also known as Midas), SVG, the tag, and MathML.\
+ \'a5 Web page access keys now work in Camino.\
+ \'a5 Camino now uses version 1.8 of Mozilla\'d5s Gecko rendering engine, which contains thousands of bug fixes.\
+ \'a5 Images are drawn and tiled using Core Graphics for improved performance.\
+\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\sa200\ql\qnatural
+\cf2 \'a5 The pop-up blocker can now stop pop-ups generated by plugins (like Flash).\
+\pard\tx360\tx720\tx940\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
+\cf2 \'a5 Plugins\
+\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\sa200\ql\qnatural
+\cf2 \'a5 Camino now ships with the Java Embedding Plugin ({\field{\*\fldinst{HYPERLINK "http://javaplugin.sourceforge.net/"}}{\fldrslt \cf3 \ul \ulc3 http://javaplugin.sourceforge.net/}}), which provides support for Java 1.4. On Mac OS X 10.4, Java 5.0 is also supported.\
+\pard\tx360\tx720\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\ql\qnatural
+\cf2 \'a5 Preferences\
+\pard\tx1080\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li1440\fi-720\ql\qnatural
+\cf2 \'a5 Camino now supports third-party preference panes. These can be installed by placing them into the
+\f3 ~/Library/Application Support/Camino/PreferencePanes
+\f1 folder.\
+ \'a5 There is a new preference to make animated images play only once.\
+ \'a5 The cookie and cookie exception lists are now searchable.\
+ \'a5 Camino now uses the language information in the International pane of the System Preferences to send data on what languages you understand to websites. This can be overridden by the \'d2camino.accept_languages\'d3 hidden preference.\
+ \'a5 Proxy Auto-Config (PAC) settings are now read from the entries in the Network pane of the System Preferences.
+\f0\b\fs30 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+\cf2 \
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\sl320\sa60\ql\qnatural
+\cf2 Known Issues\
+\pard\tx360\tx720\tx1440\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\li720\fi-720\sa200\ql\qnatural
+
+\f1\b0\fs20 \cf2 \'a5 RealPlayer version 10.1.0 (v400), released in May 2006, causes Camino to crash when viewing any Real content. Real has released RealPlayer 10.1.0 (v412) to address this issue. Users should re-download RealPlayer and verify (using the application\'d5s About window) that it is version 412 before launching Camino.\
+ \'a5 Microsoft\'d5s Windows Media Player (WMP) plugin causes major rendering issues in Camino. Since Microsoft has discontinued WMP on Mac OS X, Camino no longer supports the use of the WMP plugin; instead, all users should download the free Flip4Mac (F4M) plugin, version 2.1 or higher, from {\field{\*\fldinst{HYPERLINK "http://www.flip4mac.com/"}}{\fldrslt \cf3 \ul \ulc3 http://www.flip4mac.com/}}. Version 2.1 causes pages containing WMP content to become white when scrolled in Camino; there is currently no ETA for a fixed version of the F4M plugin.\
+ \'a5 Although typing performance has improved in Camino 1.0, typing in form fields can be slow when Flash or animated images are present. Turning off animations can improve performance in some cases.\
+ \'a5 Shockwave Director content displays at the wrong location in the browser window when hardware rendering is enabled. Switch the plugin to software rendering to solve this.\
+ \'a5 Due to a bug in Mac OS X 10.2.x and 10.3.x, Norwegian users of Camino will need to manually set their \'d4accept-language\'d5 string. To set the accept-language string, add the string
+\f3 user_pref("camino.accept_languages", "nb,nn,no,en");
+\f1 to your {\field{\*\fldinst{HYPERLINK "http://www.caminobrowser.org/support/hiddenprefs/#createUserjs"}}{\fldrslt \cf3 \ul \ulc3 user.js file}}, where the languages are listed in the order in which you\'d5d prefer them if a server can send content in multiple languages. (In this example, you want Bokm\'8cl first, then Nynorsk, then generic Norwegian, then English if none of the other three languages are available.) You may now launch Camino.\
+ Apple fixed this bug in Mac OS X 10.4, so no workarounds are necessary.\
+ \'a5 Camino erroneously claims that the default Japanese and Traditional Chinese fonts are \'d2missing\'d3 when they are actually installed; this is due to a mismatch between Carbon and Cocoa font names. Changing these fonts using the Fonts preference pane will result in incorrect fonts being chosen and will cause some characters to fail to display. Users should either keep the default fonts or change the font preferences using the \'d2Advanced\'c9\'d3 sheet instead.\
+ \'a5 Some users have experienced an issue where downloading files will cause Camino to hang when Quicksilver is installed. Users can work around this issue by either disabling indexing of the Desktop in Quicksilver or by setting the default download location to somewhere other than the Desktop in Camino\'d5s Downloads preferences.}
\ No newline at end of file
diff --git a/mozilla/camino/installer/Makefile.in b/mozilla/camino/installer/Makefile.in
index 28edcb9a351..226dc23bbc4 100644
--- a/mozilla/camino/installer/Makefile.in
+++ b/mozilla/camino/installer/Makefile.in
@@ -44,7 +44,7 @@ include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk
-CAMINO_VERSION=1.1b
+CAMINO_VERSION=1.5
_RELNOTE_VERSION:=$(subst .,-,$(CAMINO_VERSION))
# The packager runs in the dist directory, paths must be relative to there.
diff --git a/mozilla/camino/resources/application/ad_blocking.css b/mozilla/camino/resources/application/ad_blocking.css
index ebcf7f89cf4..c2a34c77645 100644
--- a/mozilla/camino/resources/application/ad_blocking.css
+++ b/mozilla/camino/resources/application/ad_blocking.css
@@ -21,6 +21,7 @@
* Contributor(s):
* Simon Fraser (Original Author)
* Smokey Ardisson
+ * Philippe Wittenbergh
*
* 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
@@ -105,6 +106,8 @@ a:link[class*="adText"],
a:link[class*="adHeadline"],
a:link[href*="hrtrak.net"] img,
a:link[href*="specificclick.net"] img,
+a:link[href*="adremote.timeinc.net"] img,
+a:link[href*=".inetinteractive.com/"] img,
embed[src*="/us.yimg.com/a/"],
embed[type="application/x-shockwave-flash"][src*="/ad."],
@@ -179,8 +182,11 @@ embed[type="application/x-shockwave-flash"][src*="hrtrak.net"],
embed[type="application/x-shockwave-flash"][src*="adbrite"],
embed[type="application/x-shockwave-flash"][src*=".cachefly.net"],
embed[type="application/x-shockwave-flash"][src*=".unicast.com/"],
-embed[type="application/x-shockwave-flash"][src*=".edgesuite.net"],
+embed[type="application/x-shockwave-flash"][src*="content.yieldmanager.edgesuite.net"],
+embed[type="application/x-shockwave-flash"][src^="http://adinterax."],
embed[type="application/x-shockwave-flash"][src*="pubs.lemonde.fr"],
+embed[type="application/x-shockwave-flash"][src*="timeinc.net/sponsors"],
+embed[type="application/x-shockwave-flash"][src*=".admission.net"],
img[src*="googlesyndication.com"],
img[src*=".doubleclick.net"],
@@ -240,8 +246,13 @@ img[src*="/images/advertising/"],
img[src*="hrtrak.net"],
img[src*=".tribalfusion.com"],
img[src*="cdn.specificmedia.com"],
-img[src*=".edgesuite.net"],
+img[src*="content.yieldmanager.edgesuite.net"],
img[src*=".yieldmanager.com"],
+img[src*="phpAds"],
+img[src*=".advertserve.com/advertpro"],
+img[src*="juggler.inetinteractive.com/banners/"],
+img[src*="euroclick.com"],
+img[src*="show.onenetworkdirect.net"],
iframe[src*="/ad."],
iframe[src*="/ads."],
@@ -333,6 +344,9 @@ iframe[src*="reklam.gittigidiyor.com"],
iframe[src*=".specificclick.net"],
iframe[src*="optimizedby.rmxads.com"],
iframe[src*="oasis.nysun.com"],
+iframe[src*=".overture.com"],
+iframe[src*=".fimserve.com"],
+iframe[src*="google-afc"],
table#overtureLinksWrapper,
table.adbritetable,
@@ -351,6 +365,7 @@ div#leaderboardAd,
div[id^="ads_"],
div[id*="ad440x160"],
div[id*="ad300x100"],
+div[id*="ad160x600"],
div.werbeblock,
div.werbung,
div[id$="_ad"],
@@ -386,7 +401,13 @@ div[id*="OvertureSponsoredLinksBlock"],
div[id="googlead"],
div[id*="reklam"],
div[id*="Kanoodle"],
-div[class^="adModule"]
+div[class^="adModule"],
+div[id*="loweradswrapper"],
+div[id="bigad"],
+div[class*="context-ad"],
+div[class^="adbanner"],
+div[class*="_adsys_"],
+div[id*="SendMessage_gads"]
{ display: none ! important }
@@ -406,3 +427,11 @@ img[src*="buttons.googlesyndication.com"],
iframe[src*="mozilla.org"]
{ display: inline ! important }
+
+@-moz-document domain(caminobrowser.org) {
+img[src*="/ad/"] {display: inline !important }
+}
+
+@-moz-document domain(apple.com) {
+img[src*="/ads/"] {display: inline !important }
+}
diff --git a/mozilla/camino/resources/application/all-camino.js b/mozilla/camino/resources/application/all-camino.js.in
similarity index 96%
rename from mozilla/camino/resources/application/all-camino.js
rename to mozilla/camino/resources/application/all-camino.js.in
index de55b170e9a..5bc48f7d775 100644
--- a/mozilla/camino/resources/application/all-camino.js
+++ b/mozilla/camino/resources/application/all-camino.js.in
@@ -64,7 +64,10 @@ pref("chimera.log_js_to_console", false);
// Identify Camino in the UA string
pref("general.useragent.vendor", "Camino");
-pref("general.useragent.vendorSub", "1.1b+");
+pref("general.useragent.vendorSub", "1.6a1pre");
+
+// work around stupid sites sniffing for firefox instead of gecko
+pref("general.useragent.extra.notfox", "(like Firefox/@FOX_APP_VERSION@)");
pref("browser.chrome.favicons", true);
pref("browser.urlbar.autocomplete.enabled", true);
diff --git a/mozilla/camino/resources/images/chrome/tab_menu_button.tif b/mozilla/camino/resources/images/chrome/tab_menu_button.tif
new file mode 100644
index 00000000000..699ca085b1b
Binary files /dev/null and b/mozilla/camino/resources/images/chrome/tab_menu_button.tif differ
diff --git a/mozilla/camino/resources/images/chrome/tab_overflow.tif b/mozilla/camino/resources/images/chrome/tab_overflow.tif
deleted file mode 100644
index 6be72aca1cc..00000000000
Binary files a/mozilla/camino/resources/images/chrome/tab_overflow.tif and /dev/null differ
diff --git a/mozilla/camino/resources/images/chrome/tab_scroll_button_left.tif b/mozilla/camino/resources/images/chrome/tab_scroll_button_left.tif
new file mode 100644
index 00000000000..112af726b62
Binary files /dev/null and b/mozilla/camino/resources/images/chrome/tab_scroll_button_left.tif differ
diff --git a/mozilla/camino/resources/images/chrome/tab_scroll_button_right.tif b/mozilla/camino/resources/images/chrome/tab_scroll_button_right.tif
new file mode 100644
index 00000000000..c511df64722
Binary files /dev/null and b/mozilla/camino/resources/images/chrome/tab_scroll_button_right.tif differ
diff --git a/mozilla/camino/resources/localized/English.lproj/BookmarkInfoPanel.nib/classes.nib b/mozilla/camino/resources/localized/English.lproj/BookmarkInfoPanel.nib/classes.nib
index 88fde84485f..bcdc107eaa2 100644
--- a/mozilla/camino/resources/localized/English.lproj/BookmarkInfoPanel.nib/classes.nib
+++ b/mozilla/camino/resources/localized/English.lproj/BookmarkInfoPanel.nib/classes.nib
@@ -10,15 +10,15 @@
LANGUAGE = ObjC;
OUTLETS = {
mBookmarkDescField = NSTextField;
- mBookmarkKeywordField = NSTextField;
mBookmarkLocationField = NSTextField;
mBookmarkNameField = NSTextField;
+ mBookmarkShortcutField = NSTextField;
mBookmarkView = NSView;
mClearNumberVisitsButton = NSButton;
mDockMenuCheckbox = NSButton;
mFolderDescField = NSTextField;
- mFolderKeywordField = NSTextField;
mFolderNameField = NSTextField;
+ mFolderShortcutField = NSTextField;
mFolderView = NSView;
mLastVisitField = NSTextField;
mNumberVisitsField = NSTextField;
diff --git a/mozilla/camino/resources/localized/English.lproj/BookmarkInfoPanel.nib/info.nib b/mozilla/camino/resources/localized/English.lproj/BookmarkInfoPanel.nib/info.nib
index 0b49acfa1de..efbaf33e054 100644
--- a/mozilla/camino/resources/localized/English.lproj/BookmarkInfoPanel.nib/info.nib
+++ b/mozilla/camino/resources/localized/English.lproj/BookmarkInfoPanel.nib/info.nib
@@ -7,9 +7,9 @@
IBEditorPositions
513
- 312 352 400 292 0 0 1024 746
+ 664 539 400 292 0 0 1680 1028
514
- 312 347 400 302 0 0 1024 746
+ 664 534 400 302 0 0 1680 1028
IBFramework Version
446.1
@@ -17,11 +17,7 @@
130
- IBOpenObjects
-
- 514
-
IBSystem Version
- 8P135
+ 8P2137
diff --git a/mozilla/camino/resources/localized/English.lproj/BookmarkInfoPanel.nib/keyedobjects.nib b/mozilla/camino/resources/localized/English.lproj/BookmarkInfoPanel.nib/keyedobjects.nib
index 15b4e7516fb..0bf92b76d1e 100644
Binary files a/mozilla/camino/resources/localized/English.lproj/BookmarkInfoPanel.nib/keyedobjects.nib and b/mozilla/camino/resources/localized/English.lproj/BookmarkInfoPanel.nib/keyedobjects.nib differ
diff --git a/mozilla/camino/resources/localized/English.lproj/BookmarksEditing.nib/info.nib b/mozilla/camino/resources/localized/English.lproj/BookmarksEditing.nib/info.nib
index 4b6b514a7cb..c07b7cd5e4a 100644
--- a/mozilla/camino/resources/localized/English.lproj/BookmarksEditing.nib/info.nib
+++ b/mozilla/camino/resources/localized/English.lproj/BookmarksEditing.nib/info.nib
@@ -11,13 +11,13 @@
137
355 423 176 87 0 0 1600 1002
160
- 51 280 102 106 0 0 1024 746
+ 87 403 102 106 0 0 1680 1028
169
- 102 289 123 144 0 0 1024 746
+ 176 424 123 144 0 0 1680 1028
18
67 235 606 458 0 0 1024 746
253
- 101 193 454 439 0 0 1024 746
+ 637 465 454 439 0 0 1680 1028
261
192 277 457 383 0 0 1024 746
302
@@ -37,6 +37,6 @@
169
IBSystem Version
- 8J135
+ 8P2137
diff --git a/mozilla/camino/resources/localized/English.lproj/BookmarksEditing.nib/keyedobjects.nib b/mozilla/camino/resources/localized/English.lproj/BookmarksEditing.nib/keyedobjects.nib
index 01ba3fb4144..dfae9cc8d48 100644
Binary files a/mozilla/camino/resources/localized/English.lproj/BookmarksEditing.nib/keyedobjects.nib and b/mozilla/camino/resources/localized/English.lproj/BookmarksEditing.nib/keyedobjects.nib differ
diff --git a/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib b/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib
index 69294a0480e..a89de086947 100644
--- a/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib
+++ b/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/info.nib
@@ -3,74 +3,14 @@
IBDocumentLocation
- 5 5 530 384 0 0 1024 746
- IBEditorPositions
-
- 1014
- 2 428 130 49 0 0 1024 746
- 1022
- 31 561 178 137 0 0 1024 746
- 1058
- 189 317 175 80 0 0 1024 746
- 1066
- 327 466 370 64 0 0 1024 746
- 1103
- 49 411 141 68 0 0 1024 746
- 297
- 89 409 226 337 0 0 1024 746
- 314
- 178 400 226 156 0 0 1024 746
- 336
- 92 461 226 206 0 0 1024 746
- 365
- 76 488 98 180 0 0 1024 746
- 463
- 202 317 226 275 0 0 1024 746
- 56
- 355 466 314 64 0 0 1024 746
- 654
- 326 455 210 168 0 0 1024 746
- 801
- 1074 492 188 64 0 0 1920 1178
-
+ 60 58 356 240 0 0 1680 1028
IBFramework Version
446.1
- IBLockedObjects
-
- 748
- 910
- 889
-
-<<<<<<< info.nib
-<<<<<<< info.nib
-<<<<<<< info.nib
-<<<<<<< info.nib
-<<<<<<< info.nib
-<<<<<<< info.nib
-=======
->>>>>>> 1.89
IBOpenObjects
- 1103
+ 10
-<<<<<<< info.nib
-=======
->>>>>>> 1.88
-=======
->>>>>>> 1.88
-=======
- IBOpenObjects
-
- 1103
-
->>>>>>> 1.89
-=======
->>>>>>> 1.89
-=======
->>>>>>> 1.90
-=======
->>>>>>> 1.90
IBSystem Version
- 8J135
+ 8P2137
diff --git a/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/keyedobjects.nib b/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/keyedobjects.nib
index 0b71f783d05..c7749afd0d6 100644
Binary files a/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/keyedobjects.nib and b/mozilla/camino/resources/localized/English.lproj/BrowserWindow.nib/keyedobjects.nib differ
diff --git a/mozilla/camino/resources/localized/English.lproj/InfoPlist.strings b/mozilla/camino/resources/localized/English.lproj/InfoPlist.strings
index abbe44ee862..662211ae0c9 100644
Binary files a/mozilla/camino/resources/localized/English.lproj/InfoPlist.strings and b/mozilla/camino/resources/localized/English.lproj/InfoPlist.strings differ
diff --git a/mozilla/camino/resources/localized/English.lproj/Localizable.strings b/mozilla/camino/resources/localized/English.lproj/Localizable.strings
index bf0d55ba792..9d9c06f0e61 100644
Binary files a/mozilla/camino/resources/localized/English.lproj/Localizable.strings and b/mozilla/camino/resources/localized/English.lproj/Localizable.strings differ
diff --git a/mozilla/camino/resources/localized/English.lproj/SearchURLList.plist b/mozilla/camino/resources/localized/English.lproj/SearchURLList.plist
index 01da5c50d27..decb3c1828c 100644
--- a/mozilla/camino/resources/localized/English.lproj/SearchURLList.plist
+++ b/mozilla/camino/resources/localized/English.lproj/SearchURLList.plist
@@ -3,7 +3,7 @@
Google
- http://www.google.com/search?q=%s&sourceid=mozilla2&ie=utf-8&oe=utf-8
+ http://www.google.com/search?q=%s&ie=utf-8&oe=utf-8
Google Images
http://images.google.com/images?ie=UTF-8&oe=UTF-8&q=%s
PreferredSearchEngine
diff --git a/mozilla/camino/src/application/MainController.mm b/mozilla/camino/src/application/MainController.mm
index 712595aa4f0..db31e31e171 100644
--- a/mozilla/camino/src/application/MainController.mm
+++ b/mozilla/camino/src/application/MainController.mm
@@ -72,6 +72,7 @@
#import "SharedMenusObj.h"
#import "SiteIconProvider.h"
#import "SessionManager.h"
+#import "CHPermissionManager.h"
#include "nsBuildID.h"
#include "nsCOMPtr.h"
@@ -88,7 +89,6 @@
#include "nsIGenericFactory.h"
#include "nsIEventQueueService.h"
#include "nsNetCID.h"
-#include "nsIPermissionManager.h"
#include "nsICookieManager.h"
#include "nsIBrowserHistory.h"
#include "nsICacheService.h"
@@ -471,7 +471,7 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina
// for non-nightly builds, show a special start page
PreferenceManager* prefManager = [PreferenceManager sharedInstance];
NSString* vendorSubString = [prefManager getStringPref:"general.useragent.vendorSub" withSuccess:NULL];
- if (![vendorSubString hasSuffix:@"+"]) {
+ if ([vendorSubString rangeOfString:@"pre"].location == NSNotFound) {
// has the user seen this already?
NSString* startPageRev = [prefManager getStringPref:"browser.startup_page_override.version" withSuccess:NULL];
if (![vendorSubString isEqualToString:startPageRev]) {
@@ -835,8 +835,8 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina
return;
}
- // check to see if it's a bookmark keyword
- NSArray* resolvedURLs = [[BookmarkManager sharedBookmarkManager] resolveBookmarksKeyword:urlString];
+ // check to see if it's a bookmark shortcut
+ NSArray* resolvedURLs = [[BookmarkManager sharedBookmarkManager] resolveBookmarksShortcut:urlString];
if (resolvedURLs) {
if ([resolvedURLs count] == 1)
@@ -966,10 +966,7 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina
mCookieManager->RemoveAll();
// remove site permissions
- nsCOMPtr pm(do_GetService(NS_PERMISSIONMANAGER_CONTRACTID));
- nsIPermissionManager* mPermissionManager = pm.get();
- if (mPermissionManager)
- mPermissionManager->RemoveAll();
+ [[CHPermissionManager permissionManager] removeAllPermissions];
// remove history
nsCOMPtr hist (do_GetService("@mozilla.org/browser/global-history;2"));
@@ -1069,6 +1066,7 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina
NSFileTypeForHFSTypeCode('ilht'),
NSFileTypeForHFSTypeCode('ilft'),
NSFileTypeForHFSTypeCode('LINK'),
+ NSFileTypeForHFSTypeCode('TEXT'),
nil];
BrowserWindowController* browserController = [self getMainWindowBrowserController];
@@ -1317,9 +1315,7 @@ NSString* const kPreviousSessionTerminatedNormallyKey = @"PreviousSessionTermina
if (!browserController)
return;
- float height = [[browserController bookmarkToolbar] frame].size.height;
- BOOL showToolbar = (BOOL)(!(height > 0));
-
+ BOOL showToolbar = ![[browserController bookmarkToolbar] isVisible];
[[browserController bookmarkToolbar] setVisible:showToolbar];
// save prefs here
diff --git a/mozilla/camino/src/bookmarks/AddBookmarkDialogController.mm b/mozilla/camino/src/bookmarks/AddBookmarkDialogController.mm
index 78e84cf2422..2cd6d6aaa84 100644
--- a/mozilla/camino/src/bookmarks/AddBookmarkDialogController.mm
+++ b/mozilla/camino/src/bookmarks/AddBookmarkDialogController.mm
@@ -284,15 +284,17 @@ NSString* const kAddBookmarkItemPrimaryTabKey = @"primary";
NSString* itemURL = [AddBookmarkDialogController bookmarkUrlForItem:curItem];
NSString* itemTitle = [AddBookmarkDialogController bookmarkTitleForItem:curItem];
- newItem = [newGroup addBookmark:itemTitle url:itemURL inPosition:i isSeparator:NO];
+ newItem = [Bookmark bookmarkWithTitle:itemTitle url:itemURL];
+ [newGroup insertChild:newItem atIndex:i isMove:NO];
}
}
else {
id curItem = [AddBookmarkDialogController primaryBookmarkItem:mBookmarkItems];
- NSString* itemURL = [AddBookmarkDialogController bookmarkUrlForItem:curItem];
+ NSString* itemURL = [AddBookmarkDialogController bookmarkUrlForItem:curItem];
- newItem = [parentFolder addBookmark:titleString url:itemURL inPosition:insertPosition isSeparator:NO];
+ newItem = [Bookmark bookmarkWithTitle:titleString url:itemURL];
+ [parentFolder insertChild:newItem atIndex:insertPosition isMove:NO];
}
}
diff --git a/mozilla/camino/src/bookmarks/AddressBookManager.m b/mozilla/camino/src/bookmarks/AddressBookManager.m
index 97c1463ef6d..41a0e8c017d 100644
--- a/mozilla/camino/src/bookmarks/AddressBookManager.m
+++ b/mozilla/camino/src/bookmarks/AddressBookManager.m
@@ -108,9 +108,8 @@ static NSString * const kABURLsProperty = @"URLs";
if (!name)
name = NSLocalizedString(@"", nil);
}
- id bookmark = [mAddressBookFolder addBookmark];
- [bookmark setTitle:name];
- [bookmark setUrl:homepage];
+ [mAddressBookFolder appendChild:[Bookmark bookmarkWithTitle:name
+ url:homepage]];
}
}
}
diff --git a/mozilla/camino/src/bookmarks/Bookmark.h b/mozilla/camino/src/bookmarks/Bookmark.h
index 9038eca1fca..654cabec9e6 100644
--- a/mozilla/camino/src/bookmarks/Bookmark.h
+++ b/mozilla/camino/src/bookmarks/Bookmark.h
@@ -22,6 +22,7 @@
* Contributor(s):
* David Haas
* Josh Aas
+ * Stuart Morgan
*
* 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
@@ -39,42 +40,33 @@
#import "BookmarkItem.h"
-//Status Flags
-#define kBookmarkOKStatus 0
-#define kBookmarkSpacerStatus 9
-
@interface Bookmark : BookmarkItem
{
NSString* mURL;
NSDate* mLastVisit;
- unsigned int mStatus;
+ BOOL mIsSeparator;
unsigned int mNumberOfVisits;
NSString* mFaviconURL; // only used for favicons
}
++ (Bookmark*)separator;
++ (Bookmark*)bookmarkWithTitle:(NSString*)aTitle url:(NSString*)aURL;
++ (Bookmark*)bookmarkWithNativeDictionary:(NSDictionary*)aDict;
++ (Bookmark*)bookmarkWithSafariDictionary:(NSDictionary*)aDict;
+
- (NSString *)url;
- (NSDate *)lastVisit;
- (unsigned)numberOfVisits;
-- (unsigned)status;
- (NSString*)faviconURL;
- (void)setFaviconURL:(NSString*)inURL;
- (void)setUrl:(NSString *)aURL;
- (void)setLastVisit:(NSDate *)aLastVisit;
-- (void)setStatus:(unsigned)aStatus;
-- (void)setIsSeparator:(BOOL)aSeparatorFlag;
- (void)setNumberOfVisits:(unsigned)aNumber;
- (void)notePageLoadedWithSuccess:(BOOL)inSuccess;
-// methods used for saving to files; are guaranteed never to return nil
-- (id)savedURL;
-- (id)savedLastVisit;
-- (id)savedStatus;
-- (id)savedNumberOfVisits;
-- (id)savedFaviconURL;
-
@end
diff --git a/mozilla/camino/src/bookmarks/Bookmark.mm b/mozilla/camino/src/bookmarks/Bookmark.mm
index be921e30026..7e95703a12a 100644
--- a/mozilla/camino/src/bookmarks/Bookmark.mm
+++ b/mozilla/camino/src/bookmarks/Bookmark.mm
@@ -22,6 +22,7 @@
* Contributor(s):
* David Haas
* Josh Aas
+ * Stuart Morgan
*
* 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
@@ -50,15 +51,75 @@
NSString* const URLLoadNotification = @"url_load";
NSString* const URLLoadSuccessKey = @"url_bool";
+//Status Flags
+#define kBookmarkOKStatus 0
+#define kBookmarkSpacerStatus 9
+
+#pragma mark -
+
+@interface Bookmark (Private)
+
+- (void)setIsSeparator:(BOOL)isSeparator;
+
+// methods used for saving to files; are guaranteed never to return nil
+- (id)savedURL;
+- (id)savedLastVisit;
+- (id)savedStatus;
+- (id)savedNumberOfVisits;
+- (id)savedFaviconURL;
+
+@end
+
#pragma mark -
@implementation Bookmark
++ (Bookmark*)separator
+{
+ Bookmark* separator = [[[self alloc] init] autorelease];
+ [separator setIsSeparator:YES];
+ return separator;
+}
+
++ (Bookmark*)bookmarkWithTitle:(NSString*)aTitle url:(NSString*)aURL
+{
+ Bookmark* bookmark = [[[self alloc] init] autorelease];
+ [bookmark setTitle:aTitle];
+ [bookmark setUrl:aURL];
+ return bookmark;
+}
+
++ (Bookmark*)bookmarkWithNativeDictionary:(NSDictionary*)aDict
+{
+ // There used to be more than two possible status states, but now state just
+ // indicates whether or not it's a separator.
+ if ([[aDict objectForKey:BMStatusKey] unsignedIntValue] == kBookmarkSpacerStatus)
+ return [self separator];
+
+ Bookmark* bookmark = [self bookmarkWithTitle:[aDict objectForKey:BMTitleKey]
+ url:[aDict objectForKey:BMURLKey]];
+ [bookmark setItemDescription:[aDict objectForKey:BMDescKey]];
+ [bookmark setShortcut:[aDict objectForKey:BMShortcutKey]];
+ [bookmark setUUID:[aDict objectForKey:BMUUIDKey]];
+ [bookmark setLastVisit:[aDict objectForKey:BMLastVisitKey]];
+ [bookmark setNumberOfVisits:[[aDict objectForKey:BMNumberVisitsKey] unsignedIntValue]];
+ [bookmark setFaviconURL:[aDict objectForKey:BMLinkedFaviconURLKey]];
+
+ return bookmark;
+}
+
++ (Bookmark*)bookmarkWithSafariDictionary:(NSDictionary*)aDict
+{
+ NSDictionary* uriDict = [aDict objectForKey:SafariURIDictKey];
+ return [self bookmarkWithTitle:[uriDict objectForKey:SafariBookmarkTitleKey]
+ url:[aDict objectForKey:SafariURLStringKey]];
+}
+
- (id)init
{
if ((self = [super init])) {
mURL = [[NSString alloc] init];
- mStatus = kBookmarkOKStatus;
+ mIsSeparator = NO;
mNumberOfVisits = 0;
mLastVisit = [[NSDate date] retain];
}
@@ -69,7 +130,7 @@ NSString* const URLLoadSuccessKey = @"url_bool";
{
id bookmarkCopy = [super copyWithZone:zone];
[bookmarkCopy setUrl:[self url]];
- [bookmarkCopy setStatus:[self status]];
+ [bookmarkCopy setIsSeparator:[self isSeparator]];
[bookmarkCopy setLastVisit:[self lastVisit]];
[bookmarkCopy setNumberOfVisits:[self numberOfVisits]];
return bookmarkCopy;
@@ -78,7 +139,6 @@ NSString* const URLLoadSuccessKey = @"url_bool";
- (void)dealloc
{
[[NSNotificationCenter defaultCenter] removeObserver:self];
- mParent = NULL; // not retained, so just set to null
[mURL release];
[mLastVisit release];
[super dealloc];
@@ -110,11 +170,6 @@ NSString* const URLLoadSuccessKey = @"url_bool";
return mLastVisit;
}
-- (unsigned)status
-{
- return mStatus;
-}
-
- (unsigned)numberOfVisits
{
return mNumberOfVisits;
@@ -122,7 +177,7 @@ NSString* const URLLoadSuccessKey = @"url_bool";
- (BOOL)isSeparator
{
- return (mStatus == kBookmarkSpacerStatus);
+ return mIsSeparator;
}
- (NSString*)faviconURL
@@ -137,23 +192,6 @@ NSString* const URLLoadSuccessKey = @"url_bool";
mFaviconURL = inURL;
}
-- (void)setStatus:(unsigned)aStatus
-{
- if (aStatus != mStatus) {
- // There used to be more than two possible status states.
- // Now we regard everything except kBookmarkSpacerStatus
- // as kBookmarkOKStatus.
- if (aStatus != kBookmarkSpacerStatus)
- aStatus = kBookmarkOKStatus;
-
- mStatus = aStatus;
- [self itemUpdatedNote:kBookmarkItemStatusChangedMask];
-
- if (aStatus == kBookmarkSpacerStatus)
- [self setTitle:NSLocalizedString(@"", nil)];
- }
-}
-
- (void)setUrl:(NSString *)aURL
{
if (!aURL)
@@ -163,7 +201,6 @@ NSString* const URLLoadSuccessKey = @"url_bool";
[aURL retain];
[mURL release];
mURL = aURL;
- [self setStatus:kBookmarkOKStatus];
// clear the icon, so we'll refresh it next time someone asks for it
[mIcon release];
@@ -192,12 +229,14 @@ NSString* const URLLoadSuccessKey = @"url_bool";
}
}
-- (void)setIsSeparator:(BOOL)aBool
+- (void)setIsSeparator:(BOOL)isSeparator
{
- if (aBool)
- [self setStatus:kBookmarkSpacerStatus];
- else
- [self setStatus:kBookmarkOKStatus];
+ if (mIsSeparator != isSeparator) {
+ mIsSeparator = isSeparator;
+ if (isSeparator)
+ [self setTitle:NSLocalizedString(@"", nil)];
+ [self itemUpdatedNote:kBookmarkItemStatusChangedMask];
+ }
}
- (void)refreshIcon
@@ -253,7 +292,10 @@ NSString* const URLLoadSuccessKey = @"url_bool";
- (id)savedStatus
{
- return [NSNumber numberWithUnsignedInt:mStatus];
+ // There used to be more than two possible status states. Now we regard
+ // everything except kBookmarkSpacerStatus as kBookmarkOKStatus.
+ return [NSNumber numberWithUnsignedInt:(mIsSeparator ? kBookmarkSpacerStatus
+ : kBookmarkOKStatus)];
}
- (id)savedNumberOfVisits
@@ -269,80 +311,9 @@ NSString* const URLLoadSuccessKey = @"url_bool";
#pragma mark -
//
-// for reading/writing from/to disk
+// for writing to disk
//
-- (BOOL)readNativeDictionary:(NSDictionary *)aDict
-{
- //gather the redundant update notifications
- [self setAccumulateUpdateNotifications:YES];
-
- [self setTitle:[aDict objectForKey:BMTitleKey]];
- [self setItemDescription:[aDict objectForKey:BMDescKey]];
- [self setKeyword:[aDict objectForKey:BMKeywordKey]];
- [self setUrl:[aDict objectForKey:BMURLKey]];
- [self setUUID:[aDict objectForKey:BMUUIDKey]];
- [self setLastVisit:[aDict objectForKey:BMLastVisitKey]];
- [self setNumberOfVisits:[[aDict objectForKey:BMNumberVisitsKey] unsignedIntValue]];
- [self setStatus:[[aDict objectForKey:BMStatusKey] unsignedIntValue]];
- [self setFaviconURL:[aDict objectForKey:BMLinkedFaviconURLKey]];
-
- //fire an update notification
- [self setAccumulateUpdateNotifications:NO];
- return YES;
-}
-
-- (BOOL)readSafariDictionary:(NSDictionary *)aDict
-{
- //gather the redundant update notifications
- [self setAccumulateUpdateNotifications:YES];
-
- NSDictionary *uriDict = [aDict objectForKey:SafariURIDictKey];
- [self setTitle:[uriDict objectForKey:SafariBookmarkTitleKey]];
- [self setUrl:[aDict objectForKey:SafariURLStringKey]];
-
- //fire an update notification
- [self setAccumulateUpdateNotifications:NO];
- return YES;
-}
-
-- (BOOL)readCaminoXML:(CFXMLTreeRef)aTreeRef settingToolbar:(BOOL)setupToolbar
-{
- CFXMLNodeRef myNode;
- CFXMLElementInfo* elementInfoPtr;
- myNode = CFXMLTreeGetNode(aTreeRef);
- if (myNode) {
- // Process our info
- if (CFXMLNodeGetTypeCode(myNode)==kCFXMLNodeTypeElement){
- elementInfoPtr = (CFXMLElementInfo *)CFXMLNodeGetInfoPtr(myNode);
- if (elementInfoPtr) {
- NSDictionary* attribDict = (NSDictionary*)elementInfoPtr->attributes;
- //gather the redundant update notifications
- [self setAccumulateUpdateNotifications:YES];
- [self setTitle:[[attribDict objectForKey:CaminoNameKey] stringByRemovingAmpEscapes]];
- [self setKeyword:[[attribDict objectForKey:CaminoKeywordKey] stringByRemovingAmpEscapes]];
- [self setItemDescription:[[attribDict objectForKey:CaminoDescKey] stringByRemovingAmpEscapes]];
- [self setUrl:[[attribDict objectForKey:CaminoURLKey] stringByRemovingAmpEscapes]];
- //fire an update notification
- [self setAccumulateUpdateNotifications:NO];
- }
- else {
- NSLog(@"Bookmark:readCaminoXML - elementInfoPtr null, load failed");
- return NO;
- }
- }
- else {
- NSLog(@"Bookmark:readCaminoXML - node not kCFXMLNodeTypeElement, load failed");
- return NO;
- }
- }
- else {
- NSLog(@"Bookmark:readCaminoXML - urk! CFXMLTreeGetNode null, load failed");
- return NO;
- }
- return YES;
-}
-
//
// -writeBookmarksMetaDatatoPath:
//
@@ -391,8 +362,8 @@ NSString* const URLLoadSuccessKey = @"url_bool";
if ([[self itemDescription] length])
[itemDict setObject:[self itemDescription] forKey:BMDescKey];
- if ([[self keyword] length])
- [itemDict setObject:[self keyword] forKey:BMKeywordKey];
+ if ([[self shortcut] length])
+ [itemDict setObject:[self shortcut] forKey:BMShortcutKey];
if ([mUUID length]) // don't call -UUID to avoid generating one
[itemDict setObject:mUUID forKey:BMUUIDKey];
@@ -438,8 +409,8 @@ NSString* const URLLoadSuccessKey = @"url_bool";
if ([self lastVisit]) // if there is a lastVisit, export it
exportHTMLString = [exportHTMLString stringByAppendingFormat:@" LAST_VISIT=\"%d\"", [[self lastVisit] timeIntervalSince1970]];
- if ([[self keyword] length] > 0) // if there is a keyword, export it (bug 307743)
- exportHTMLString = [exportHTMLString stringByAppendingFormat:@" SHORTCUTURL=\"%@\"", [self keyword]];
+ if ([[self shortcut] length] > 0) // if there is a shortcut, export it (bug 307743)
+ exportHTMLString = [exportHTMLString stringByAppendingFormat:@" SHORTCUTURL=\"%@\"", [self shortcut]];
// close up the attributes, export the title, close the A tag
exportHTMLString = [exportHTMLString stringByAppendingFormat:@">%@\n", [mTitle stringByAddingAmpEscapes]];
@@ -488,7 +459,7 @@ NSString* const URLLoadSuccessKey = @"url_bool";
return [inDescending boolValue] ? (NSComparisonResult)(-1 * (int)result) : result;
}
-// base class does the title, keyword and description compares
+// base class does the title, shortcut and description compares
- (NSComparisonResult)compareType:(BookmarkItem *)aItem sortDescending:(NSNumber*)inDescending
{
diff --git a/mozilla/camino/src/bookmarks/BookmarkFolder.h b/mozilla/camino/src/bookmarks/BookmarkFolder.h
index 93cc638d5aa..fa7265da763 100644
--- a/mozilla/camino/src/bookmarks/BookmarkFolder.h
+++ b/mozilla/camino/src/bookmarks/BookmarkFolder.h
@@ -21,6 +21,7 @@
*
* Contributor(s):
* David Haas
+ * Stuart Morgan
*
* 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
@@ -97,17 +98,9 @@ enum {
// methods used for saving to files; are guaranteed never to return nil
- (id)savedSpecialFlag;
-// ways to add a new bookmark
-- (Bookmark *)addBookmark; //adds to end
-- (Bookmark *)addBookmark:(NSString *)aTitle url:(NSString *)aURL inPosition:(unsigned)aIndex isSeparator:(BOOL)aBool;
-- (Bookmark *)addBookmark:(NSString *)aTitle
- inPosition:(unsigned)aIndex
- keyword:(NSString *)aKeyword
- url:(NSString *)aURL
- description:(NSString *)aDescription
- lastVisit:(NSDate *)aDate
- status:(unsigned)aStatus
- isSeparator:(BOOL)aBool;
+// for reading from disk
+- (BOOL)readNativeDictionary:(NSDictionary *)aDict;
+- (BOOL)readSafariDictionary:(NSDictionary *)aDict;
// ways to add a new bookmark array
- (BookmarkFolder *)addBookmarkFolder; //adds to end
@@ -145,8 +138,8 @@ enum {
- (void)buildFlatFolderList:(NSMenu *)menu depth:(unsigned)pad;
// searching
-- (NSArray*)resolveKeyword:(NSString *)keyword withArgs:(NSString *)args;
-- (NSSet *)bookmarksWithString:(NSString *)searchString inFieldWithTag:(int)tag;
+- (NSArray*)resolveShortcut:(NSString *)shortcut withArgs:(NSString *)args;
+- (NSArray*)bookmarksWithString:(NSString*)searchString inFieldWithTag:(int)tag;
- (BOOL)containsChildItem:(BookmarkItem*)inItem;
// Scripting - should be a protocol we could use for these
diff --git a/mozilla/camino/src/bookmarks/BookmarkFolder.mm b/mozilla/camino/src/bookmarks/BookmarkFolder.mm
index df1176b41e4..caa7d759955 100644
--- a/mozilla/camino/src/bookmarks/BookmarkFolder.mm
+++ b/mozilla/camino/src/bookmarks/BookmarkFolder.mm
@@ -21,6 +21,7 @@
*
* Contributor(s):
* David Haas
+ * Stuart Morgan
*
* 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
@@ -100,12 +101,10 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context)
// ways to add a new bookmark
- (BOOL)addBookmarkFromNativeDict:(NSDictionary *)aDict;
- (BOOL)addBookmarkFromSafariDict:(NSDictionary *)aDict;
-- (BOOL)addBookmarkFromXML:(CFXMLTreeRef)aTreeRef;
// ways to add a new bookmark folder
- (BOOL)addBookmarkFolderFromNativeDict:(NSDictionary *)aDict; //read in - adds sequentially
- (BOOL)addBookmarkFolderFromSafariDict:(NSDictionary *)aDict;
-- (BOOL)addBookmarkFolderFromXML:(CFXMLTreeRef)aTreeRef settingToolbar:(BOOL)setupToolbar;
// deletes the bookmark or bookmark array
- (BOOL)deleteBookmark:(Bookmark *)childBookmark;
@@ -481,6 +480,10 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context)
- (void)insertChild:(BookmarkItem *)aChild atIndex:(unsigned)aPosition isMove:(BOOL)inIsMove
{
+ // Ensure that only folders are added to the root.
+ if ([self isRoot] && ![aChild isKindOfClass:[BookmarkFolder class]])
+ return;
+
[aChild setParent:self];
unsigned insertPoint = [mChildArray count];
if (insertPoint > aPosition)
@@ -618,73 +621,41 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context)
// Adding bookmarks
//
-// XXX fix to nicely autorelease etc.
- (Bookmark *)addBookmark
{
- if (![self isRoot]) {
- Bookmark* theBookmark = [[Bookmark alloc] init];
- [self appendChild:theBookmark];
- [theBookmark release]; //retained on insert
- return theBookmark;
- }
- return nil;
+ if ([self isRoot])
+ return nil;
+
+ Bookmark* theBookmark = [[[Bookmark alloc] init] autorelease];
+ [self appendChild:theBookmark];
+ return theBookmark;
}
// adding from native plist
- (BOOL)addBookmarkFromNativeDict:(NSDictionary *)aDict
{
- return [[self addBookmark] readNativeDictionary:aDict];
+ if ([self isRoot])
+ return NO;
+
+ Bookmark* theBookmark = [Bookmark bookmarkWithNativeDictionary:aDict];
+ if (!theBookmark)
+ return NO;
+
+ [self appendChild:theBookmark];
+ return YES;
}
- (BOOL)addBookmarkFromSafariDict:(NSDictionary *)aDict
{
- return [[self addBookmark] readSafariDictionary:aDict];
-}
+ if ([self isRoot])
+ return NO;
-// add from camino xml
-- (BOOL)addBookmarkFromXML:(CFXMLTreeRef)aTreeRef
-{
- return [[self addBookmark] readCaminoXML:aTreeRef settingToolbar:NO];
-}
+ Bookmark* theBookmark = [Bookmark bookmarkWithSafariDictionary:aDict];
+ if (!theBookmark)
+ return NO;
-- (Bookmark *)addBookmark:(NSString *)aTitle url:(NSString *)aURL inPosition:(unsigned)aIndex isSeparator:(BOOL)aBool
-{
- if ([aTitle length] == 0)
- aTitle = aURL;
- return [self addBookmark:aTitle
- inPosition:aIndex
- keyword:@""
- url:aURL
- description:@""
- lastVisit:[NSDate date]
- status:kBookmarkOKStatus
- isSeparator:aBool];
-}
-
-// full bodied addition
-- (Bookmark *)addBookmark:(NSString *)aTitle
- inPosition:(unsigned)aPosition
- keyword:(NSString *)aKeyword
- url:(NSString *)aURL
- description:(NSString *)aDescription
- lastVisit:(NSDate *)aDate
- status:(unsigned)aStatus
- isSeparator:(BOOL)aSeparator
-{
- if (![self isRoot]) {
- Bookmark *theBookmark = [[Bookmark alloc] init];
- [theBookmark setTitle:aTitle];
- [theBookmark setKeyword:aKeyword];
- [theBookmark setUrl:aURL];
- [theBookmark setItemDescription:aDescription];
- [theBookmark setLastVisit:aDate];
- [theBookmark setStatus:aStatus];
- [theBookmark setIsSeparator:aSeparator];
- [self insertChild:theBookmark atIndex:aPosition isMove:NO];
- [theBookmark release];
- return theBookmark;
- }
- return nil;
+ [self appendChild:theBookmark];
+ return YES;
}
//
@@ -710,11 +681,6 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context)
return [[self addBookmarkFolder] readSafariDictionary:aDict];
}
-- (BOOL)addBookmarkFolderFromXML:(CFXMLTreeRef)aTreeRef settingToolbar:(BOOL)setupToolbar
-{
- return [[self addBookmarkFolder] readCaminoXML:aTreeRef settingToolbar:setupToolbar];
-}
-
// normal add while programming running
- (BookmarkFolder *)addBookmarkFolder:(NSString *)aName inPosition:(unsigned)aPosition isGroup:(BOOL)aFlag
{
@@ -979,15 +945,15 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context)
}
//
-// searching/keywords processing
+// searching/shortcut processing
//
-- (NSArray*)resolveKeyword:(NSString *)keyword withArgs:(NSString *)args
+- (NSArray*)resolveShortcut:(NSString *)shortcut withArgs:(NSString *)args
{
- if (!keyword)
+ if (!shortcut)
return nil;
// see if it's us
- if ([[self keyword] caseInsensitiveCompare:keyword] == NSOrderedSame) {
+ if ([[self shortcut] caseInsensitiveCompare:shortcut] == NSOrderedSame) {
NSMutableArray *urlArray = (NSMutableArray *)[self childURLs];
int i, j = [urlArray count];
for (i = 0; i < j; i++) {
@@ -1001,12 +967,12 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context)
id aKid;
while ((aKid = [enumerator nextObject])) {
if ([aKid isKindOfClass:[Bookmark class]]) {
- if ([[aKid keyword] caseInsensitiveCompare:keyword] == NSOrderedSame)
+ if ([[aKid shortcut] caseInsensitiveCompare:shortcut] == NSOrderedSame)
return [NSArray arrayWithObject:[self expandURL:[aKid url] withString:args]];
}
else if ([aKid isKindOfClass:[BookmarkFolder class]]) {
// recurse into sub-folders
- NSArray *childArray = [aKid resolveKeyword:keyword withArgs:args];
+ NSArray *childArray = [aKid resolveShortcut:shortcut withArgs:args];
if (childArray)
return childArray;
}
@@ -1033,9 +999,9 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context)
return url;
}
-- (NSSet*)bookmarksWithString:(NSString *)searchString inFieldWithTag:(int)tag
+- (NSArray*)bookmarksWithString:(NSString*)searchString inFieldWithTag:(int)tag
{
- NSMutableSet *foundSet = [NSMutableSet set];
+ NSMutableArray *matchingBookmarks = [NSMutableArray array];
// see if our kids match
NSEnumerator *enumerator = [[self childArray] objectEnumerator];
@@ -1043,15 +1009,15 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context)
while ((childItem = [enumerator nextObject])) {
if ([childItem isKindOfClass:[Bookmark class]]) {
if ([childItem matchesString:searchString inFieldWithTag:tag])
- [foundSet addObject:childItem];
+ [matchingBookmarks addObject:childItem];
}
else if ([childItem isKindOfClass:[BookmarkFolder class]]) {
- // recurse, adding found items to the existing set
- NSSet *childFoundSet = [childItem bookmarksWithString:searchString inFieldWithTag:tag];
- [foundSet unionSet:childFoundSet];
+ // recurse, adding found items to the existing matches
+ NSArray *matchingDescendents = [childItem bookmarksWithString:searchString inFieldWithTag:tag];
+ [matchingBookmarks addObjectsFromArray:matchingDescendents];
}
}
- return foundSet;
+ return matchingBookmarks;
}
- (BOOL)containsChildItem:(BookmarkItem*)inItem
@@ -1129,7 +1095,7 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context)
{
[self setTitle:[aDict objectForKey:BMTitleKey]];
[self setItemDescription:[aDict objectForKey:BMFolderDescKey]];
- [self setKeyword:[aDict objectForKey:BMFolderKeywordKey]];
+ [self setShortcut:[aDict objectForKey:BMFolderShortcutKey]];
[self setUUID:[aDict objectForKey:BMUUIDKey]];
unsigned int flag = [[aDict objectForKey:BMFolderTypeKey] unsignedIntValue];
@@ -1179,61 +1145,6 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context)
return success;
}
-- (BOOL)readCaminoXML:(CFXMLTreeRef)aTreeRef settingToolbar:(BOOL)setupToolbar
-{
- BOOL success = YES;
- CFXMLNodeRef myNode = CFXMLTreeGetNode(aTreeRef);
- if (myNode) {
- // Process our info - we load info into tempMuteString,
- // then send a cleaned up version to temp string, which gets
- // dropped into appropriate variable
- if (CFXMLNodeGetTypeCode(myNode) == kCFXMLNodeTypeElement) {
- CFXMLElementInfo* elementInfoPtr = (CFXMLElementInfo*)CFXMLNodeGetInfoPtr(myNode);
- if (elementInfoPtr) {
- NSDictionary* attribDict = (NSDictionary*)elementInfoPtr->attributes;
- [self setTitle:[[attribDict objectForKey:CaminoNameKey] stringByRemovingAmpEscapes]];
- [self setItemDescription:[[attribDict objectForKey:CaminoDescKey] stringByRemovingAmpEscapes]];
-
- if ([[attribDict objectForKey:CaminoTypeKey] isEqualToString:CaminoToolbarKey] && setupToolbar) {
- // we move the toolbar folder to its correct location later
- [self setIsToolbar:YES];
- }
-
- if ([[attribDict objectForKey:CaminoGroupKey] isEqualToString:CaminoTrueKey])
- [self setIsGroup:YES];
-
- // Process children
- unsigned int i = 0;
- CFXMLTreeRef childTreeRef;
- while ((childTreeRef = CFTreeGetChildAtIndex(aTreeRef, i++)) && success) {
- CFXMLNodeRef childNodeRef = CFXMLTreeGetNode(childTreeRef);
- if (childNodeRef) {
- NSString *tempString = (NSString *)CFXMLNodeGetString(childNodeRef);
- if ([tempString isEqualToString:CaminoBookmarkKey])
- success = [self addBookmarkFromXML:childTreeRef];
- else if ([tempString isEqualToString:CaminoFolderKey])
- success = [self addBookmarkFolderFromXML:childTreeRef settingToolbar:setupToolbar];
- }
- }
- }
- else {
- NSLog(@"BookmarkFolder: readCaminoXML- elementInfoPtr null - children not imported");
- success = NO;
- }
- }
- else {
- NSLog(@"BookmarkFolder: readCaminoXML - should be, but isn't a CFXMLNodeTypeElement");
- success = NO;
- }
- }
- else {
- NSLog(@"BookmarkFolder: readCaminoXML - myNode null - bookmark not imported");
- success = NO;
- }
-
- return success;
-}
-
//
// -writeBookmarksMetadataToPath:
//
@@ -1293,8 +1204,8 @@ static int BookmarkItemSort(id firstItem, id secondItem, void* context)
if ([[self itemDescription] length])
[folderDict setObject:[self itemDescription] forKey:BMFolderDescKey];
- if ([[self keyword] length])
- [folderDict setObject:[self keyword] forKey:BMFolderKeywordKey];
+ if ([[self shortcut] length])
+ [folderDict setObject:[self shortcut] forKey:BMFolderShortcutKey];
return folderDict;
}
diff --git a/mozilla/camino/src/bookmarks/BookmarkImportDlgController.mm b/mozilla/camino/src/bookmarks/BookmarkImportDlgController.mm
index 28c8e04c7fe..9571f6674da 100644
--- a/mozilla/camino/src/bookmarks/BookmarkImportDlgController.mm
+++ b/mozilla/camino/src/bookmarks/BookmarkImportDlgController.mm
@@ -194,7 +194,7 @@
[openPanel setCanChooseDirectories:NO];
[openPanel setAllowsMultipleSelection:NO];
[openPanel setPrompt:@"Import"];
- NSArray* array = [NSArray arrayWithObjects:@"htm", @"html", @"xml", @"plist", nil];
+ NSArray* array = [NSArray arrayWithObjects:@"htm", @"html", @"plist", nil];
int result = [openPanel runModalForDirectory:nil
file:nil
types:array];
diff --git a/mozilla/camino/src/bookmarks/BookmarkInfoController.h b/mozilla/camino/src/bookmarks/BookmarkInfoController.h
index c00ea0b6a3b..cf1aada477a 100644
--- a/mozilla/camino/src/bookmarks/BookmarkInfoController.h
+++ b/mozilla/camino/src/bookmarks/BookmarkInfoController.h
@@ -51,10 +51,10 @@
IBOutlet NSTabView* mTabView;
IBOutlet NSTextField* mBookmarkNameField;
IBOutlet NSTextField* mBookmarkLocationField;
- IBOutlet NSTextField* mBookmarkKeywordField;
+ IBOutlet NSTextField* mBookmarkShortcutField;
IBOutlet NSTextField* mBookmarkDescField;
IBOutlet NSTextField* mFolderNameField;
- IBOutlet NSTextField* mFolderKeywordField;
+ IBOutlet NSTextField* mFolderShortcutField;
IBOutlet NSTextField* mFolderDescField;
IBOutlet NSTextField* mLastVisitField;
IBOutlet NSTextField* mNumberVisitsField;
diff --git a/mozilla/camino/src/bookmarks/BookmarkInfoController.mm b/mozilla/camino/src/bookmarks/BookmarkInfoController.mm
index 7d297f806dd..7d710591437 100644
--- a/mozilla/camino/src/bookmarks/BookmarkInfoController.mm
+++ b/mozilla/camino/src/bookmarks/BookmarkInfoController.mm
@@ -101,8 +101,8 @@ static BookmarkInfoController* gSharedBookmarkInfoController = nil;
{
[self setShouldCascadeWindows:NO];
[[self window] setFrameAutosaveName:@"BookmarkInfoWindow"];
- [mBookmarkKeywordField setFormatter:[[[BookmarkKeywordFormatter alloc] init] autorelease]];
- [mFolderKeywordField setFormatter:[[[BookmarkKeywordFormatter alloc] init] autorelease]];
+ [mBookmarkShortcutField setFormatter:[[[BookmarkShortcutFormatter alloc] init] autorelease]];
+ [mFolderShortcutField setFormatter:[[[BookmarkShortcutFormatter alloc] init] autorelease]];
}
- (void)windowDidLoad
@@ -217,20 +217,20 @@ static BookmarkInfoController* gSharedBookmarkInfoController = nil;
if ((tabViewItem == mBookmarkInfoTabView) && isBookmark) {
[mBookmarkItem setTitle:[mBookmarkNameField stringValue]];
[mBookmarkItem setItemDescription:[NSString stringWithString:[mBookmarkDescField stringValue]]];
- [mBookmarkItem setKeyword:[mBookmarkKeywordField stringValue]];
+ [mBookmarkItem setShortcut:[mBookmarkShortcutField stringValue]];
[(Bookmark *)mBookmarkItem setUrl:[mBookmarkLocationField stringValue]];
}
else if ([[self window] contentView] == mFolderView && !isBookmark) {
[mBookmarkItem setTitle:[mFolderNameField stringValue]];
[mBookmarkItem setItemDescription:[NSString stringWithString:[mFolderDescField stringValue]]];
if ([(BookmarkFolder *)mBookmarkItem isGroup])
- [mBookmarkItem setKeyword:[mFolderKeywordField stringValue]];
+ [mBookmarkItem setShortcut:[mFolderShortcutField stringValue]];
}
}
else if ((changedField == mBookmarkNameField) || (changedField == mFolderNameField))
[mBookmarkItem setTitle:[changedField stringValue]];
- else if ((changedField == mBookmarkKeywordField) || (changedField == mFolderKeywordField))
- [mBookmarkItem setKeyword:[changedField stringValue]];
+ else if ((changedField == mBookmarkShortcutField) || (changedField == mFolderShortcutField))
+ [mBookmarkItem setShortcut:[changedField stringValue]];
else if ((changedField == mBookmarkDescField) || (changedField == mFolderDescField))
[mBookmarkItem setItemDescription:[NSString stringWithString:[changedField stringValue]]];
else if ((changedField == mBookmarkLocationField) && isBookmark)
@@ -301,7 +301,7 @@ static BookmarkInfoController* gSharedBookmarkInfoController = nil;
[self configureWindowForView:eBookmarkInfoView];
[mBookmarkNameField setStringValue:[mBookmarkItem title]];
[mBookmarkDescField setStringValue:[mBookmarkItem itemDescription]];
- [mBookmarkKeywordField setStringValue:[mBookmarkItem keyword]];
+ [mBookmarkShortcutField setStringValue:[mBookmarkItem shortcut]];
[mBookmarkLocationField setStringValue:[(Bookmark *)mBookmarkItem url]];
[mNumberVisitsField setIntValue:[(Bookmark *)mBookmarkItem numberOfVisits]];
[mLastVisitField setStringValue:[[(Bookmark *)mBookmarkItem lastVisit] descriptionWithCalendarFormat:[[mLastVisitField formatter] dateFormat]
@@ -316,7 +316,7 @@ static BookmarkInfoController* gSharedBookmarkInfoController = nil;
(![(Bookmark *)mBookmarkItem isSeparator]);
[mBookmarkNameField setEditable:canEdit];
[mBookmarkDescField setEditable:canEdit];
- [mBookmarkKeywordField setEditable:canEdit];
+ [mBookmarkShortcutField setEditable:canEdit];
[mBookmarkLocationField setEditable:canEdit];
}
// Folders
@@ -326,7 +326,7 @@ static BookmarkInfoController* gSharedBookmarkInfoController = nil;
[mTabgroupCheckbox setState:[(BookmarkFolder *)mBookmarkItem isGroup] ? NSOnState : NSOffState];
[mFolderNameField setStringValue:[mBookmarkItem title]];
- [mFolderKeywordField setStringValue:[mBookmarkItem keyword]];
+ [mFolderShortcutField setStringValue:[mBookmarkItem shortcut]];
[mFolderDescField setStringValue:[mBookmarkItem itemDescription]];
// we can unselect dock menu - we have a fallback default
@@ -340,12 +340,12 @@ static BookmarkInfoController* gSharedBookmarkInfoController = nil;
// clear stuff
[mBookmarkNameField setStringValue:@""];
[mBookmarkDescField setStringValue:@""];
- [mBookmarkKeywordField setStringValue:@""];
+ [mBookmarkShortcutField setStringValue:@""];
[mBookmarkLocationField setStringValue:@""];
[mBookmarkNameField setEditable:NO];
[mBookmarkDescField setEditable:NO];
- [mBookmarkKeywordField setEditable:NO];
+ [mBookmarkShortcutField setEditable:NO];
[mBookmarkLocationField setEditable:NO];
[mNumberVisitsField setIntValue:0];
diff --git a/mozilla/camino/src/bookmarks/BookmarkItem.h b/mozilla/camino/src/bookmarks/BookmarkItem.h
index 39338f03f28..d62514e80f4 100644
--- a/mozilla/camino/src/bookmarks/BookmarkItem.h
+++ b/mozilla/camino/src/bookmarks/BookmarkItem.h
@@ -47,7 +47,7 @@ enum
kBookmarkItemTitleChangedMask = (1 << 1),
kBookmarkItemDescriptionChangedMask = (1 << 2),
- kBookmarkItemKeywordChangedMask = (1 << 3),
+ kBookmarkItemShortcutChangedMask = (1 << 3),
kBookmarkItemIconChangedMask = (1 << 4),
kBookmarkItemURLChangedMask = (1 << 5),
kBookmarkItemLastVisitChangedMask = (1 << 6),
@@ -60,7 +60,7 @@ enum
// mask of flags that require a save of the bookmarks
kBookmarkItemSignificantChangeFlagsMask = kBookmarkItemTitleChangedMask |
kBookmarkItemDescriptionChangedMask |
- kBookmarkItemKeywordChangedMask |
+ kBookmarkItemShortcutChangedMask |
kBookmarkItemURLChangedMask |
kBookmarkItemLastVisitChangedMask |
kBookmarkItemStatusChangedMask |
@@ -69,9 +69,9 @@ enum
kBookmarkItemEverythingChangedMask = 0xFFFFFFFE
};
-// A formatter for keyword entry fields that prevents whitespace in keywords, since
-// keywords with whitespace don't work.
-@interface BookmarkKeywordFormatter : NSFormatter
+// A formatter for shortcut entry fields that prevents whitespace in shortcuts,
+// since shortcuts with whitespace don't work.
+@interface BookmarkShortcutFormatter : NSFormatter
{
}
@end
@@ -81,7 +81,7 @@ enum
id mParent; //subclasses will use a BookmarkFolder
NSString* mTitle;
NSString* mDescription;
- NSString* mKeyword;
+ NSString* mShortcut;
NSString* mUUID;
NSImage* mIcon;
unsigned int mPendingChangeFlags;
@@ -94,14 +94,14 @@ enum
- (id)parent;
- (NSString *)title;
- (NSString *)itemDescription; // don't use "description"
-- (NSString *)keyword;
+- (NSString *)shortcut;
- (NSImage *)icon;
- (NSString *)UUID;
- (void)setParent:(id)aParent; // note that the parent of root items is the BookmarksManager, for some reason
- (void)setTitle:(NSString *)aString;
- (void)setItemDescription:(NSString *)aString;
-- (void)setKeyword:(NSString *)aKeyword;
+- (void)setShortcut:(NSString *)aShortcut;
- (void)setIcon:(NSImage *)aIcon;
- (void)setUUID:(NSString*)aUUID;
@@ -118,7 +118,7 @@ enum
eBookmarksSearchFieldAll = 1,
eBookmarksSearchFieldTitle,
eBookmarksSearchFieldURL,
- eBookmarksSearchFieldKeyword,
+ eBookmarksSearchFieldShortcut,
eBookmarksSearchFieldDescription
};
@@ -131,11 +131,6 @@ enum
// Methods called on startup for both bookmark & folder
- (void)refreshIcon;
- // for reading/writing to disk - unimplemented in BookmarkItem.
-- (BOOL)readNativeDictionary:(NSDictionary *)aDict;
-- (BOOL)readSafariDictionary:(NSDictionary *)aDict;
-- (BOOL)readCaminoXML:(CFXMLTreeRef)aTreeRef settingToolbar:(BOOL)setupToolbar;
-
- (void)writeBookmarksMetadataToPath:(NSString*)inPath;
- (void)removeBookmarksMetadataFromPath:(NSString*)inPath;
- (NSDictionary *)writeNativeDictionary;
@@ -145,7 +140,7 @@ enum
// methods used for saving to files; are guaranteed never to return nil
- (id)savedTitle;
- (id)savedItemDescription; // don't use "description"
-- (id)savedKeyword;
+- (id)savedShortcut;
- (id)savedUUID; // does not generate a new UUID if UUID is not set
// sorting
@@ -153,7 +148,7 @@ enum
// we put sort comparators on the base class for convenience
- (NSComparisonResult)compareURL:(BookmarkItem *)aItem sortDescending:(NSNumber*)inDescending;
- (NSComparisonResult)compareTitle:(BookmarkItem *)aItem sortDescending:(NSNumber*)inDescending;
-- (NSComparisonResult)compareKeyword:(BookmarkItem *)aItem sortDescending:(NSNumber*)inDescending;
+- (NSComparisonResult)compareShortcut:(BookmarkItem *)aItem sortDescending:(NSNumber*)inDescending;
- (NSComparisonResult)compareDescription:(BookmarkItem *)aItem sortDescending:(NSNumber*)inDescending;
- (NSComparisonResult)compareType:(BookmarkItem *)aItem sortDescending:(NSNumber*)inDescending;
- (NSComparisonResult)compareVisitCount:(BookmarkItem *)aItem sortDescending:(NSNumber*)inDescending;
@@ -172,12 +167,12 @@ extern NSString* const BMChildrenKey;
// Camino plist keys
extern NSString* const BMFolderDescKey;
extern NSString* const BMFolderTypeKey;
-extern NSString* const BMFolderKeywordKey;
+extern NSString* const BMFolderShortcutKey;
extern NSString* const BMDescKey;
extern NSString* const BMStatusKey;
extern NSString* const BMURLKey;
extern NSString* const BMUUIDKey;
-extern NSString* const BMKeywordKey;
+extern NSString* const BMShortcutKey;
extern NSString* const BMLastVisitKey;
extern NSString* const BMNumberVisitsKey;
extern NSString* const BMLinkedFaviconURLKey;
@@ -191,16 +186,3 @@ extern NSString* const SafariUUIDKey;
extern NSString* const SafariURIDictKey;
extern NSString* const SafariBookmarkTitleKey;
extern NSString* const SafariURLStringKey;
-
-// camino XML keys
-extern NSString* const CaminoNameKey;
-extern NSString* const CaminoDescKey;
-extern NSString* const CaminoTypeKey;
-extern NSString* const CaminoKeywordKey;
-extern NSString* const CaminoURLKey;
-extern NSString* const CaminoToolbarKey;
-extern NSString* const CaminoDockMenuKey;
-extern NSString* const CaminoGroupKey;
-extern NSString* const CaminoBookmarkKey;
-extern NSString* const CaminoFolderKey;
-extern NSString* const CaminoTrueKey;
diff --git a/mozilla/camino/src/bookmarks/BookmarkItem.mm b/mozilla/camino/src/bookmarks/BookmarkItem.mm
index 497c3d0a698..b99537accac 100644
--- a/mozilla/camino/src/bookmarks/BookmarkItem.mm
+++ b/mozilla/camino/src/bookmarks/BookmarkItem.mm
@@ -54,12 +54,12 @@ NSString* const BMChildrenKey = @"Children";
// Camino plist keys
NSString* const BMFolderDescKey = @"FolderDescription";
NSString* const BMFolderTypeKey = @"FolderType";
-NSString* const BMFolderKeywordKey = @"FolderKeyword";
+NSString* const BMFolderShortcutKey = @"FolderKeyword";
NSString* const BMDescKey = @"Description";
NSString* const BMStatusKey = @"Status";
NSString* const BMURLKey = @"URL";
NSString* const BMUUIDKey = @"UUID";
-NSString* const BMKeywordKey = @"Keyword";
+NSString* const BMShortcutKey = @"Keyword";
NSString* const BMLastVisitKey = @"LastVisitedDate";
NSString* const BMNumberVisitsKey = @"VisitCount";
NSString* const BMLinkedFaviconURLKey = @"LinkedFaviconURL";
@@ -74,20 +74,7 @@ NSString* const SafariURIDictKey = @"URIDictionary";
NSString* const SafariBookmarkTitleKey = @"title";
NSString* const SafariURLStringKey = @"URLString";
-// camino XML keys
-NSString* const CaminoNameKey = @"name";
-NSString* const CaminoDescKey = @"description";
-NSString* const CaminoTypeKey = @"type";
-NSString* const CaminoKeywordKey = @"id";
-NSString* const CaminoURLKey = @"href";
-NSString* const CaminoToolbarKey = @"toolbar";
-NSString* const CaminoDockMenuKey = @"dockmenu";
-NSString* const CaminoGroupKey = @"group";
-NSString* const CaminoBookmarkKey = @"bookmark";
-NSString* const CaminoFolderKey = @"folder";
-NSString* const CaminoTrueKey = @"true";
-
-@implementation BookmarkKeywordFormatter
+@implementation BookmarkShortcutFormatter
- (NSString *)stringForObjectValue:(id)anObject
{
@@ -132,7 +119,7 @@ NSString* const CaminoTrueKey = @"true";
if ((self = [super init])) {
mParent = nil;
mTitle = [[NSString alloc] init]; //retain count +1
- mKeyword = [mTitle retain]; //retain count +2
+ mShortcut = [mTitle retain]; //retain count +2
mDescription = [mTitle retain]; //retain count +3! and just 1 allocation.
mUUID = nil;
mIcon = nil;
@@ -146,7 +133,7 @@ NSString* const CaminoTrueKey = @"true";
id bmItemCopy = [[[self class] allocWithZone:zone] init];
[bmItemCopy setTitle:[self title]];
[bmItemCopy setItemDescription:[self itemDescription]];
- [bmItemCopy setKeyword:[self keyword]];
+ [bmItemCopy setShortcut:[self shortcut]];
[bmItemCopy setParent:[self parent]];
[bmItemCopy setIcon:[self icon]];
// do NOT copy the UUID. It wouldn't be "U" then, would it?
@@ -157,7 +144,7 @@ NSString* const CaminoTrueKey = @"true";
{
[mTitle release];
[mDescription release];
- [mKeyword release];
+ [mShortcut release];
[mIcon release];
[mUUID release];
@@ -180,9 +167,9 @@ NSString* const CaminoTrueKey = @"true";
return mDescription;
}
-- (NSString *)keyword
+- (NSString *)shortcut
{
- return mKeyword;
+ return mShortcut;
}
// if we ask for a UUID, it means we need
@@ -260,16 +247,16 @@ NSString* const CaminoTrueKey = @"true";
}
}
-- (void)setKeyword:(NSString *)aKeyword
+- (void)setShortcut:(NSString *)aShortcut
{
- if (!aKeyword)
+ if (!aShortcut)
return;
- if (![mKeyword isEqualToString:aKeyword]) {
- [aKeyword retain];
- [mKeyword release];
- mKeyword = aKeyword;
- [self itemUpdatedNote:kBookmarkItemKeywordChangedMask];
+ if (![mShortcut isEqualToString:aShortcut]) {
+ [aShortcut retain];
+ [mShortcut release];
+ mShortcut = aShortcut;
+ [self itemUpdatedNote:kBookmarkItemShortcutChangedMask];
}
}
@@ -301,15 +288,15 @@ NSString* const CaminoTrueKey = @"true";
switch (tag) {
case eBookmarksSearchFieldAll:
return (([[self title] rangeOfString:searchString options:NSCaseInsensitiveSearch].location != NSNotFound) ||
- ([[self keyword] rangeOfString:searchString options:NSCaseInsensitiveSearch].location != NSNotFound) ||
+ ([[self shortcut] rangeOfString:searchString options:NSCaseInsensitiveSearch].location != NSNotFound) ||
([[self itemDescription] rangeOfString:searchString options:NSCaseInsensitiveSearch].location != NSNotFound));
case eBookmarksSearchFieldTitle:
return ([[self title] rangeOfString:searchString options:NSCaseInsensitiveSearch].location != NSNotFound);
// case eBookmarksSearchFieldURL: // Bookmark subclass has to check this
- case eBookmarksSearchFieldKeyword:
- return ([[self keyword] rangeOfString:searchString options:NSCaseInsensitiveSearch].location != NSNotFound);
+ case eBookmarksSearchFieldShortcut:
+ return ([[self shortcut] rangeOfString:searchString options:NSCaseInsensitiveSearch].location != NSNotFound);
case eBookmarksSearchFieldDescription:
return ([[self itemDescription] rangeOfString:searchString options:NSCaseInsensitiveSearch].location != NSNotFound);
@@ -334,6 +321,14 @@ NSString* const CaminoTrueKey = @"true";
- (void)itemUpdatedNote:(unsigned int)inChangeMask
{
+ // If the bookmark hasn't been inserted into the tree yet then it doesn't
+ // matter if it changed, so don't bother sending the notification. Because
+ // we can't tell if it's the root of the bookmark tree (which always has a
+ // nil parent) we always have to let kBookmarkItemChildrenChangedMask
+ // notfications through.
+ if (![self parent] && !(inChangeMask & kBookmarkItemChildrenChangedMask))
+ return;
+
if ([[BookmarkManager sharedBookmarkManager] areChangeNotificationsSuppressed])
return; // don't even accumulate the flags. caller is expected to update stuff manually
@@ -361,22 +356,7 @@ NSString* const CaminoTrueKey = @"true";
#pragma mark -
-//Reading/writing to & from disk - all just stubs.
-
-- (BOOL)readNativeDictionary:(NSDictionary *)aDict
-{
- return NO;
-}
-
-- (BOOL)readSafariDictionary:(NSDictionary *)aDict
-{
- return NO;
-}
-
-- (BOOL)readCaminoXML:(CFXMLTreeRef)aTreeRef settingToolbar:(BOOL)setupToolbar
-{
- return NO;
-}
+// Writing to disk - all just stubs.
- (void)writeBookmarksMetadataToPath:(NSString*)inPath
{
@@ -413,9 +393,9 @@ NSString* const CaminoTrueKey = @"true";
return mDescription ? mDescription : @"";
}
-- (id)savedKeyword
+- (id)savedShortcut
{
- return mKeyword ? mKeyword : @"";
+ return mShortcut ? mShortcut : @"";
}
- (id)savedUUID
@@ -438,9 +418,9 @@ NSString* const CaminoTrueKey = @"true";
return [inDescending boolValue] ? (NSComparisonResult)(-1 * (int)result) : result;
}
-- (NSComparisonResult)compareKeyword:(BookmarkItem *)aItem sortDescending:(NSNumber*)inDescending
+- (NSComparisonResult)compareShortcut:(BookmarkItem *)aItem sortDescending:(NSNumber*)inDescending
{
- NSComparisonResult result = [[self keyword] compare:[aItem keyword] options:NSCaseInsensitiveSearch];
+ NSComparisonResult result = [[self shortcut] compare:[aItem shortcut] options:NSCaseInsensitiveSearch];
return [inDescending boolValue] ? (NSComparisonResult)(-1 * (int)result) : result;
}
diff --git a/mozilla/camino/src/bookmarks/BookmarkManager.h b/mozilla/camino/src/bookmarks/BookmarkManager.h
index e054fa7d647..7079427a4df 100644
--- a/mozilla/camino/src/bookmarks/BookmarkManager.h
+++ b/mozilla/camino/src/bookmarks/BookmarkManager.h
@@ -138,7 +138,7 @@ const int kBookmarksContextMenuArrangeSeparatorTag = 100;
- (void)clearAllVisits;
// Informational things
-- (NSArray *)resolveBookmarksKeyword:(NSString *)keyword;
+- (NSArray *)resolveBookmarksShortcut:(NSString *)shortcut;
- (NSArray *)searchBookmarksContainer:(BookmarkFolder*)container forString:(NSString *)searchString inFieldWithTag:(int)tag;
- (BOOL)isDropValid:(NSArray *)items toFolder:(BookmarkFolder *)parent;
- (NSMenu *)contextMenuForItems:(NSArray*)items fromView:(BookmarkOutlineView *)outlineView target:(id)target;
diff --git a/mozilla/camino/src/bookmarks/BookmarkManager.mm b/mozilla/camino/src/bookmarks/BookmarkManager.mm
index 76ee4ce016a..7276303c157 100644
--- a/mozilla/camino/src/bookmarks/BookmarkManager.mm
+++ b/mozilla/camino/src/bookmarks/BookmarkManager.mm
@@ -130,11 +130,9 @@ enum {
- (BOOL)readPListBookmarks:(NSString *)pathToFile; // camino or safari
- (BOOL)readCaminoPListBookmarks:(NSDictionary *)plist;
- (BOOL)readSafariPListBookmarks:(NSDictionary *)plist;
-- (BOOL)readCaminoXMLBookmarks:(NSString *)pathToFile;
// these are "import" methods that import into a subfolder.
- (BOOL)importHTMLFile:(NSString *)pathToFile intoFolder:(BookmarkFolder *)aFolder;
-- (BOOL)importCaminoXMLFile:(NSString *)pathToFile intoFolder:(BookmarkFolder *)aFolder settingToolbarFolder:(BOOL)setToolbarFolder;
- (BOOL)importPropertyListFile:(NSString *)pathToFile intoFolder:(BookmarkFolder *)aFolder;
- (void)importBookmarksThreadReturn:(NSDictionary *)aDict;
@@ -313,8 +311,7 @@ static BookmarkManager* gBookmarkManager = nil;
BOOL bookmarksReadOK = [self readBookmarks];
if (!bookmarksReadOK) {
// We'll come here either when reading the bookmarks totally failed, or
- // when we did a partial read of the xml file. The xml reading code already
- // fixed up the toolbar folder.
+ // when we did a partial read of the bookmark file.
if ([root count] == 0) {
// failed to read any folders. make some by hand.
BookmarkFolder* menuFolder = [[[BookmarkFolder alloc] initWithIdentifier:kBookmarksMenuFolderIdentifier] autorelease];
@@ -669,22 +666,22 @@ static BookmarkManager* gBookmarkManager = nil;
}
-- (NSArray *)resolveBookmarksKeyword:(NSString *)keyword
+- (NSArray *)resolveBookmarksShortcut:(NSString *)shortcut
{
NSArray *resolvedArray = nil;
- if ([keyword length] > 0) {
- NSRange spaceRange = [keyword rangeOfString:@" "];
+ if ([shortcut length] > 0) {
+ NSRange spaceRange = [shortcut rangeOfString:@" "];
NSString *firstWord = nil;
NSString *secondWord = nil;
if (spaceRange.location != NSNotFound) {
- firstWord = [keyword substringToIndex:spaceRange.location];
- secondWord = [keyword substringFromIndex:(spaceRange.location + spaceRange.length)];
+ firstWord = [shortcut substringToIndex:spaceRange.location];
+ secondWord = [shortcut substringFromIndex:(spaceRange.location + spaceRange.length)];
}
else {
- firstWord = keyword;
+ firstWord = shortcut;
secondWord = @"";
}
- resolvedArray = [[self rootBookmarks] resolveKeyword:firstWord withArgs:secondWord];
+ resolvedArray = [[self rootBookmarks] resolveShortcut:firstWord withArgs:secondWord];
}
return resolvedArray;
}
@@ -694,8 +691,7 @@ static BookmarkManager* gBookmarkManager = nil;
{
if ((searchString) && [searchString length] > 0) {
BookmarkFolder* searchContainer = container ? container : [self rootBookmarks];
- NSSet *matchingSet = [searchContainer bookmarksWithString:searchString inFieldWithTag:tag];
- return [matchingSet allObjects];
+ return [searchContainer bookmarksWithString:searchString inFieldWithTag:tag];
}
return nil;
}
@@ -1299,8 +1295,7 @@ static BookmarkManager* gBookmarkManager = nil;
//
// figure out where Bookmarks.plist is and store it as mPathToBookmarkFile
// if there is a Bookmarks.plist, read it
- // if there isn't a Bookmarks.plist, but there is a bookmarks.xml, read it.
- // if there isn't either, move default Bookmarks.plist to profile dir & read it.
+ // if there isn't, move default Bookmarks.plist to profile dir & read it.
//
NSFileManager *fM = [NSFileManager defaultManager];
NSString *bookmarkPath = [profileDir stringByAppendingPathComponent:@"bookmarks.plist"];
@@ -1345,10 +1340,6 @@ static BookmarkManager* gBookmarkManager = nil;
}
}
}
- else if ([fM isReadableFileAtPath:[profileDir stringByAppendingPathComponent:@"bookmarks.xml"]]) {
- if ([self readCaminoXMLBookmarks:[profileDir stringByAppendingPathComponent:@"bookmarks.xml"]])
- return YES;
- }
// if we're here, we have either no bookmarks or corrupted bookmarks with no backup; either way,
// install the default plist so the bookmarks aren't totally empty.
@@ -1489,37 +1480,6 @@ static BookmarkManager* gBookmarkManager = nil;
return YES;
}
-- (BOOL)readCaminoXMLBookmarks:(NSString *)pathToFile
-{
- BookmarkFolder* menuFolder = [[[BookmarkFolder alloc] initWithIdentifier:kBookmarksMenuFolderIdentifier] autorelease];
- [menuFolder setTitle:NSLocalizedString(@"Bookmark Menu", nil)];
- [[self rootBookmarks] appendChild:menuFolder];
-
- BOOL readOK = [self importCaminoXMLFile:pathToFile intoFolder:menuFolder settingToolbarFolder:YES];
-
- // even if we didn't do a full read, try to fix up the toolbar folder
- BookmarkFolder* toolbarFolder = nil;
- NSEnumerator* bookmarksEnum = [[self rootBookmarks] objectEnumerator];
- BookmarkItem* curItem;
- while ((curItem = [bookmarksEnum nextObject])) {
- if ([curItem isKindOfClass:[BookmarkFolder class]]) {
- BookmarkFolder* curFolder = (BookmarkFolder*)curItem;
- if ([curFolder isToolbar]) {
- toolbarFolder = curFolder;
- break;
- }
- }
- }
-
- if (toolbarFolder) {
- [[toolbarFolder parent] moveChild:toolbarFolder toBookmarkFolder:[self rootBookmarks] atIndex:kToolbarContainerIndex];
- [toolbarFolder setTitle:NSLocalizedString(@"Bookmark Toolbar", nil)];
- [toolbarFolder setIdentifier:kBookmarksToolbarFolderIdentifier];
- }
-
- return readOK;
-}
-
- (void)startImportBookmarks
{
if (!mImportDlgController)
@@ -1555,8 +1515,6 @@ static BookmarkManager* gBookmarkManager = nil;
success = [self readOperaFile:pathToFile intoFolder:importFolder];
else if ([extension isEqualToString:@"html"] || [extension isEqualToString:@"htm"])
success = [self importHTMLFile:pathToFile intoFolder:importFolder];
- else if ([extension isEqualToString:@"xml"])
- success = [self importCaminoXMLFile:pathToFile intoFolder:importFolder settingToolbarFolder:NO];
else if ([extension isEqualToString:@"plist"] || !success)
success = [self importPropertyListFile:pathToFile intoFolder:importFolder];
// we don't know the extension, or we failed to load. we'll take another
@@ -1565,9 +1523,6 @@ static BookmarkManager* gBookmarkManager = nil;
success = [self readOperaFile:pathToFile intoFolder:importFolder];
if (!success) {
success = [self importHTMLFile:pathToFile intoFolder:importFolder];
- if (!success) {
- success = [self importCaminoXMLFile:pathToFile intoFolder:importFolder settingToolbarFolder:NO];
- }
}
}
@@ -1743,8 +1698,8 @@ static BookmarkManager* gBookmarkManager = nil;
[tokenScanner scanUpToString:@"href=\"" intoString:nil]; // tokenScanner now contains HREF="[URL]">[TITLE]
// check for a menu spacer, which will look like this: HREF=""><Menu Spacer> (bug 309008)
if (![tokenScanner isAtEnd] && [[tokenString substringFromIndex:([tokenScanner scanLocation] + 8)] isEqualToString:@"<Menu Spacer>"]) {
- currentItem = [currentArray addBookmark];
- [(Bookmark *)currentItem setIsSeparator:YES];
+ currentItem = [Bookmark separator];
+ [currentArray appendChild:currentItem];
[tokenScanner release];
[tokenTag release];
[fileScanner setScanLocation:([fileScanner scanLocation] + 1)];
@@ -1763,22 +1718,24 @@ static BookmarkManager* gBookmarkManager = nil;
[fileScanner setScanLocation:([fileScanner scanLocation] + 1)];
continue;
}
- currentItem = [currentArray addBookmark];
- [(Bookmark *)currentItem setUrl:[tempItem stringByRemovingAmpEscapes]];
+ NSString* url = [tempItem stringByRemovingAmpEscapes];
+ NSString* title = nil;
[tokenScanner scanUpToString:@">" intoString:&tempItem];
if (![tokenScanner isAtEnd]) { // protect against malformed files
- [currentItem setTitle:[[tokenString substringFromIndex:([tokenScanner scanLocation] + 1)] stringByRemovingAmpEscapes]];
+ title = [[tokenString substringFromIndex:([tokenScanner scanLocation] + 1)] stringByRemovingAmpEscapes];
justSetTitle = YES;
}
- // see if we had a keyword
+ currentItem = [Bookmark bookmarkWithTitle:title url:url];
+ [currentArray appendChild:currentItem];
+ // see if we had a shortcut
if (isNetscape) {
tempRange = [tempItem rangeOfString:@"SHORTCUTURL=\"" options:NSCaseInsensitiveSearch];
if (tempRange.location != NSNotFound) {
- // throw everything to next " into keyword. A malformed bookmark might not have a closing " which
+ // throw everything to next " into shortcut. A malformed bookmark might not have a closing " which
// will throw things out of whack slightly, but it's better than crashing.
keyRange = [tempItem rangeOfString:@"\"" options:0 range:NSMakeRange(tempRange.location + tempRange.length, [tempItem length] - (tempRange.location + tempRange.length))];
if (keyRange.location != NSNotFound)
- [currentItem setKeyword:[tempItem substringWithRange:NSMakeRange(tempRange.location + tempRange.length, keyRange.location - (tempRange.location + tempRange.length))]];
+ [currentItem setShortcut:[tempItem substringWithRange:NSMakeRange(tempRange.location + tempRange.length, keyRange.location - (tempRange.location + tempRange.length))]];
}
}
}
@@ -1865,9 +1822,9 @@ static BookmarkManager* gBookmarkManager = nil;
}
// Firefox menu separator
else if ([tokenTag isEqualToString:@" " intoString:NULL];
@@ -1879,64 +1836,6 @@ static BookmarkManager* gBookmarkManager = nil;
return YES;
}
-
-- (BOOL)importCaminoXMLFile:(NSString *)pathToFile intoFolder:(BookmarkFolder *)aFolder settingToolbarFolder:(BOOL)setToolbarFolder
-{
- NSURL* fileURL = [NSURL fileURLWithPath:pathToFile];
- if (!fileURL) {
- NSLog(@"URL creation failed");
- return NO;
- }
- // Thanks, Apple, for example XML parsing code.
- // Create CFXMLTree from file. This needs to be released later
- CFXMLTreeRef xmlFileTree = CFXMLTreeCreateWithDataFromURL (kCFAllocatorDefault,
- (CFURLRef)fileURL,
- kCFXMLParserSkipWhitespace,
- kCFXMLNodeCurrentVersion);
- if (!xmlFileTree) {
- NSLog(@"XMLTree creation failed");
- return NO;
- }
-
- // process top level nodes. I think we'll find DTD
- // before data - so only need to make 1 pass.
- int count = CFTreeGetChildCount(xmlFileTree);
- for (int index = 0; index < count; index++) {
- CFXMLTreeRef subFileTree = CFTreeGetChildAtIndex(xmlFileTree, index);
- if (subFileTree) {
- CFXMLNodeRef bookmarkNode = CFXMLTreeGetNode(subFileTree);
- if (bookmarkNode) {
- switch (CFXMLNodeGetTypeCode(bookmarkNode)) {
- // make sure it's Camino/Chimera DTD
- case kCFXMLNodeTypeDocumentType:
- {
- CFXMLDocumentTypeInfo* docTypeInfo = (CFXMLDocumentTypeInfo *)CFXMLNodeGetInfoPtr(bookmarkNode);
- CFURLRef dtdURL = docTypeInfo->externalID.systemID;
- if (![[(NSURL *)dtdURL absoluteString] isEqualToString:@"http://www.mozilla.org/DTDs/ChimeraBookmarks.dtd"]) {
- NSLog(@"not a ChimeraBookmarks xml file. Bail");
- CFRelease(xmlFileTree);
- return NO;
- }
- break;
- }
-
- case kCFXMLNodeTypeElement:
- {
- BOOL readOK = [aFolder readCaminoXML:subFileTree settingToolbar:setToolbarFolder];
- CFRelease (xmlFileTree);
- return readOK;
- }
- default:
- break;
- }
- }
- }
- }
- CFRelease(xmlFileTree);
- NSLog(@"run through the tree and didn't find anything interesting. Bailed out");
- return NO;
-}
-
- (BOOL)importPropertyListFile:(NSString *)pathToFile intoFolder:(BookmarkFolder *)aFolder
{
NSDictionary* dict = [NSDictionary dictionaryWithContentsOfFile:pathToFile];
@@ -1980,15 +1879,15 @@ static BookmarkManager* gBookmarkManager = nil;
}
// Maybe it's a new URL!
else if ([aLine hasPrefix:@"#URL"]) {
- currentItem = [currentArray addBookmark];
+ currentItem = [Bookmark bookmarkWithTitle:nil url:nil];
+ [currentArray appendChild:currentItem];
}
// Perhaps a separator? This isn't how I'd spell it, but
// then again, I'm not Norwagian, so what do I know.
// ^
// That's funny
else if ([aLine hasPrefix:@"#SEPERATOR"]) {
- currentItem = [currentArray addBookmark];
- [(Bookmark *)currentItem setIsSeparator:YES];
+ [currentArray appendChild:[Bookmark separator]];
currentItem = nil;
}
// Or maybe this folder is being closed out.
@@ -2003,7 +1902,7 @@ static BookmarkManager* gBookmarkManager = nil;
if (NSNotFound != aRange.location) {
NSRange sRange = [aLine rangeOfString:@"SHORT NAME="];
if (NSNotFound != sRange.location) {
- [currentItem setKeyword:[aLine substringFromIndex:(sRange.location + sRange.length)]];
+ [currentItem setShortcut:[aLine substringFromIndex:(sRange.location + sRange.length)]];
}
else {
[currentItem setTitle:[aLine substringFromIndex:(aRange.location + aRange.length)]];
diff --git a/mozilla/camino/src/bookmarks/BookmarkToolbar.h b/mozilla/camino/src/bookmarks/BookmarkToolbar.h
index 8dc12b80b7b..7977ccefa30 100644
--- a/mozilla/camino/src/bookmarks/BookmarkToolbar.h
+++ b/mozilla/camino/src/bookmarks/BookmarkToolbar.h
@@ -49,7 +49,6 @@
NSMutableArray* mButtons;
BookmarkButton* mDragInsertionButton;
int mDragInsertionPosition;
- BOOL mIsShowing;
BOOL mDrawBorder;
BOOL mButtonListDirty; // do we need a full rebuild of the button list?
}
diff --git a/mozilla/camino/src/bookmarks/BookmarkToolbar.mm b/mozilla/camino/src/bookmarks/BookmarkToolbar.mm
index 234b46010fa..ef37122ea58 100644
--- a/mozilla/camino/src/bookmarks/BookmarkToolbar.mm
+++ b/mozilla/camino/src/bookmarks/BookmarkToolbar.mm
@@ -92,7 +92,6 @@ static const int kBMBarScanningStep = 5;
NSURLPboardType,
nil]];
- mIsShowing = YES;
mButtonListDirty = YES;
// Generic notifications for Bookmark Client
@@ -427,28 +426,16 @@ static void VerticalGrayGradient(void* inInfo, float const* inData, float* outDa
- (BOOL)isVisible
{
- return mIsShowing;
+ return ![self isHidden];
}
-- (void)setVisible:(BOOL)aShow
+- (void)setVisible:(BOOL)isVisible
{
- mIsShowing = aShow;
+ [self setHidden:!isVisible];
+ [[self superview] resizeSubviewsWithOldSize:[[self superview] frame].size];
- if (!aShow) {
- [[self superview] setNeedsDisplayInRect:[self frame]];
- NSRect newFrame = [self frame];
- newFrame.origin.y += newFrame.size.height;
- newFrame.size.height = 0;
- [self setFrame:newFrame];
-
- // tell the superview to resize its subviews
- [[self superview] resizeSubviewsWithOldSize:[[self superview] frame].size];
- }
- else {
+ if (isVisible)
[self reflowButtons];
- [self setNeedsDisplay:YES];
- }
-
}
- (void)setDrawBottomBorder:(BOOL)drawBorder
@@ -707,8 +694,13 @@ static void VerticalGrayGradient(void* inInfo, float const* inData, float* outDa
[[sender draggingPasteboard] getURLs:&urls andTitles:&titles];
// Add in reverse order to preserve order
- for (int i = [urls count] - 1; i >= 0; --i)
- [toolbar addBookmark:[titles objectAtIndex:i] url:[urls objectAtIndex:i] inPosition:index isSeparator:NO];
+ for (int i = [urls count] - 1; i >= 0; --i) {
+ NSString* url = [urls objectAtIndex:i];
+ NSString* title = [titles objectAtIndex:i];
+ if ([title length] == 0)
+ title = url;
+ [toolbar insertChild:[Bookmark bookmarkWithTitle:title url:url] atIndex:index isMove:NO];
+ }
dropHandled = YES;
}
diff --git a/mozilla/camino/src/bookmarks/BookmarkViewController.h b/mozilla/camino/src/bookmarks/BookmarkViewController.h
index 5145be622f2..2601ee0c142 100644
--- a/mozilla/camino/src/bookmarks/BookmarkViewController.h
+++ b/mozilla/camino/src/bookmarks/BookmarkViewController.h
@@ -64,7 +64,7 @@ enum
kArrangeBookmarksByTitleMask = (1 << 1),
// currently unused (but implemented)
- kArrangeBookmarksByKeywordMask = (1 << 2),
+ kArrangeBookmarksByShortcutMask = (1 << 2),
kArrangeBookmarksByDescriptionMask = (1 << 3),
kArrangeBookmarksByLastVisitMask = (1 << 4),
kArrangeBookmarksByVisitCountMask = (1 << 5),
diff --git a/mozilla/camino/src/bookmarks/BookmarkViewController.mm b/mozilla/camino/src/bookmarks/BookmarkViewController.mm
index 34ce2c5e30d..65206db46f5 100644
--- a/mozilla/camino/src/bookmarks/BookmarkViewController.mm
+++ b/mozilla/camino/src/bookmarks/BookmarkViewController.mm
@@ -289,16 +289,16 @@ const int kOutlineViewLeftMargin = 19; // determined empirically, since it doesn
[self ensureBookmarks];
- // set a formatter on the keyword column
- BookmarkKeywordFormatter* keywordFormatter = [[[BookmarkKeywordFormatter alloc] init] autorelease];
- [[[mBookmarksOutlineView tableColumnWithIdentifier:@"keyword"] dataCell] setFormatter:keywordFormatter];
+ // set a formatter on the shortcut column
+ BookmarkShortcutFormatter* shortcutFormatter = [[[BookmarkShortcutFormatter alloc] init] autorelease];
+ [[[mBookmarksOutlineView tableColumnWithIdentifier:@"shortcut"] dataCell] setFormatter:shortcutFormatter];
// these should be settable in the nib. however, whenever
// I try, they disappear as soon as I've saved. Very annoying.
[mContainersTableView setAutosaveName:@"BMContainerView"];
[mContainersTableView setAutosaveTableColumns:YES];
- [mBookmarksOutlineView setAutosaveName:@"BookmarksOutlineView"];
+ [mBookmarksOutlineView setAutosaveName:@"BookmarksOutlineViewV2"];
[mBookmarksOutlineView setAutosaveTableColumns:YES];
[mHistoryOutlineView setAutosaveName:@"HistoryOutlineView"];
@@ -393,16 +393,14 @@ const int kOutlineViewLeftMargin = 19; // determined empirically, since it doesn
- (IBAction)addBookmarkSeparator:(id)aSender
{
- Bookmark *aBookmark = [[Bookmark alloc] init];
- [aBookmark setIsSeparator:YES];
+ Bookmark *separator = [Bookmark separator];
int index;
BookmarkFolder *parentFolder = [self selectedItemFolderAndIndex:&index];
- [parentFolder insertChild:aBookmark atIndex:index isMove:NO];
+ [parentFolder insertChild:separator atIndex:index isMove:NO];
- [self revealItem:aBookmark scrollIntoView:YES selecting:YES byExtendingSelection:NO];
- [aBookmark release];
+ [self revealItem:separator scrollIntoView:YES selecting:YES byExtendingSelection:NO];
}
- (IBAction)addBookmarkFolder:(id)aSender
@@ -1036,11 +1034,13 @@ const int kOutlineViewLeftMargin = 19; // determined empirically, since it doesn
// make sure we re-enable updates
NS_DURING
for (unsigned int i = 0; i < [urls count]; ++i) {
+ NSString* url = [urls objectAtIndex:i];
NSString* title = [titles objectAtIndex:i];
if ([title length] == 0)
- title = [urls objectAtIndex:i];
-
- [newBookmarks addObject:[dropFolder addBookmark:title url:[urls objectAtIndex:i] inPosition:(index + i) isSeparator:NO]];
+ title = url;
+ Bookmark* bookmark = [Bookmark bookmarkWithTitle:title url:url];
+ [dropFolder insertChild:bookmark atIndex:(index + i) isMove:NO];
+ [newBookmarks addObject:bookmark];
}
NS_HANDLER
NS_ENDHANDLER
@@ -1750,8 +1750,8 @@ const int kOutlineViewLeftMargin = 19; // determined empirically, since it doesn
case kArrangeBookmarksByTitleMask:
return @selector(compareTitle:sortDescending:);
- case kArrangeBookmarksByKeywordMask:
- return @selector(compareKeyword:sortDescending:);
+ case kArrangeBookmarksByShortcutMask:
+ return @selector(compareShortcut:sortDescending:);
case kArrangeBookmarksByDescriptionMask:
return @selector(compareDescription:sortDescending:);
@@ -1924,7 +1924,7 @@ const int kOutlineViewLeftMargin = 19; // determined empirically, since it doesn
const unsigned int kVisibleAttributeChangedFlags = (kBookmarkItemTitleChangedMask |
kBookmarkItemIconChangedMask |
kBookmarkItemURLChangedMask |
- kBookmarkItemKeywordChangedMask |
+ kBookmarkItemShortcutChangedMask |
kBookmarkItemDescriptionChangedMask |
kBookmarkItemLastVisitChangedMask |
kBookmarkItemStatusChangedMask);
diff --git a/mozilla/camino/src/bookmarks/nsAboutBookmarks.mm b/mozilla/camino/src/bookmarks/nsAboutBookmarks.mm
index 018c31918f3..14ad3d7e9cc 100644
--- a/mozilla/camino/src/bookmarks/nsAboutBookmarks.mm
+++ b/mozilla/camino/src/bookmarks/nsAboutBookmarks.mm
@@ -58,7 +58,6 @@ nsAboutBookmarks::NewChannel(nsIURI *aURI, nsIChannel **result)
static NSString* const kBlankPageHTML = @" %@ ";
nsresult rv;
- nsIChannel* channel;
NSString* windowTitle = mIsBookmarks ? NSLocalizedString(@"BookmarksWindowTitle", nil)
: NSLocalizedString(@"HistoryWindowTitle", nil);
@@ -72,6 +71,7 @@ nsAboutBookmarks::NewChannel(nsIURI *aURI, nsIChannel **result)
NS_ConvertUTF16toUTF8(pageSource));
NS_ENSURE_SUCCESS(rv, rv);
+ nsIChannel* channel = NULL;
rv = NS_NewInputStreamChannel(&channel, aURI, in,
NS_LITERAL_CSTRING("text/html"),
NS_LITERAL_CSTRING("UTF8"));
diff --git a/mozilla/camino/src/browser/BrowserContentViews.mm b/mozilla/camino/src/browser/BrowserContentViews.mm
index 8d1ab69d62e..b58869b6cda 100644
--- a/mozilla/camino/src/browser/BrowserContentViews.mm
+++ b/mozilla/camino/src/browser/BrowserContentViews.mm
@@ -119,7 +119,8 @@
[mBookmarksToolbar setFrame:newFrame];
}
- bmToolbarHeight = NSHeight([mBookmarksToolbar frame]);
+ if (![mBookmarksToolbar isHidden])
+ bmToolbarHeight = NSHeight([mBookmarksToolbar frame]);
}
if (mStatusBar)
diff --git a/mozilla/camino/src/browser/BrowserTabBarView.h b/mozilla/camino/src/browser/BrowserTabBarView.h
index 9e4760e690c..7a147e32c02 100644
--- a/mozilla/camino/src/browser/BrowserTabBarView.h
+++ b/mozilla/camino/src/browser/BrowserTabBarView.h
@@ -21,6 +21,7 @@
*
* Contributor(s):
* Geoff Beier
+ * Desmond Elliott
*
* 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
@@ -47,8 +48,9 @@
IBOutlet BrowserTabView* mTabView;
TabButtonCell* mActiveTabButton; // active tab button, mainly useful for handling drags (STRONG)
- NSButton* mOverflowButton; // button for overflow menu if we've got more tabs than space (STRONG)
- NSMenu* mOverflowMenu; // menu for tab overflow (STRONG);
+ NSButton* mOverflowRightButton; // button to slide tabs to the left
+ NSButton* mOverflowLeftButton; // button to slide tabs to the right
+ NSButton* mOverflowMenuButton; // button to popup the tab menu
// drag tracking
NSPoint mLastClickPoint;
@@ -61,6 +63,9 @@
NSImage* mBackgroundImage;
NSImage* mButtonDividerImage;
+
+ int mLeftMostVisibleTabIndex; // Index of tab view item left-most in the tab bar
+ int mNumberOfVisibleTabs; // Number of tab view items drawn in the tab bar
}
// destroy the tab bar and recreate it from the tabview
@@ -68,11 +73,10 @@
// return the height the tab bar should be
-(float)tabBarHeight;
-(BrowserTabViewItem*)tabViewItemAtPoint:(NSPoint)location;
--(void)windowClosed;
--(IBAction)overflowMenu:(id)sender;
-(BOOL)isVisible;
// show or hide tabs- should be called if this view will be hidden, to give it a chance to register or
// unregister tracking rects as appropriate
-(void)setVisible:(BOOL)show;
+-(void)scrollTabIndexToVisible:(int)index;
@end
diff --git a/mozilla/camino/src/browser/BrowserTabBarView.mm b/mozilla/camino/src/browser/BrowserTabBarView.mm
index b042e29731e..2d1da32fe13 100644
--- a/mozilla/camino/src/browser/BrowserTabBarView.mm
+++ b/mozilla/camino/src/browser/BrowserTabBarView.mm
@@ -22,6 +22,8 @@
* Contributor(s):
* Geoff Beier
* Aaron Schulman
+ * Desmond Elliott
+ * Ian Leue
*
* 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
@@ -55,35 +57,41 @@
-(TabButtonCell*)buttonAtPoint:(NSPoint)clickPoint;
-(void)registerTabButtonsForTracking;
-(void)unregisterTabButtonsForTracking;
--(void)initOverflowMenu;
+-(void)ensureOverflowButtonsInitted;
-(NSRect)tabsRect;
+-(NSRect)tabsRectWithOverflow:(BOOL)overflowing;
-(BrowserTabViewItem *)tabViewItemUnderMouse;
-(NSString*)view:(NSView*)view stringForToolTip:(NSToolTipTag)tag point:(NSPoint)point userData:(void*)userData;
+-(NSButton*)newOverflowButtonForImageNamed:(NSString*)imageName;
+-(void)setLeftMostVisibleTabIndex:(int)index;
+-(NSButton*)scrollButtonAtPoint:(NSPoint)clickPoint;
+-(BOOL)tabIndexIsVisible:(int)index;
+-(void)setOverflowButtonsVisible:(BOOL)visible;
+-(float)verticalOriginForButtonWithHeight:(float)height;
+-(void)scrollLeft:(id)sender;
+-(void)scrollRight:(id)sender;
@end
static const float kTabBarDefaultHeight = 22.0;
-static const float kTabBottomPad = 4.0;
-
+static const float kTabBottomPad = 4.0; // height of the padding below tabs
@implementation BrowserTabBarView
-static const int kTabBarMargin = 5; // left/right margin for tab bar
-static const float kMinTabWidth = 100.0; // the smallest tabs that will be drawn
-static const float kMaxTabWidth = 175.0; // the widest tabs that will be drawn
+static const float kTabBarMargin = 5.0; // left/right margin for tab bar
+static const float kMinTabWidth = 100.0; // the smallest tabs that will be drawn
+static const float kMaxTabWidth = 175.0; // the widest tabs that will be drawn
-static const int kTabDragThreshold = 3; // distance a drag must go before we start dnd
+static const int kTabDragThreshold = 3; // distance a drag must go before we start dnd
-static const float kOverflowButtonWidth = 16;
-static const float kOverflowButtonHeight = 16;
-static const int kOverflowButtonMargin = 1;
+static const float kScrollButtonDelay = 0.4; // how long a button must be held before we start scrolling
+static const float kScrollButtonInterval = 0.15; // time (in seconds) between firing scroll actions
-(id)initWithFrame:(NSRect)frame
{
self = [super initWithFrame:frame];
if (self) {
mActiveTabButton = nil;
- mOverflowButton = nil;
mOverflowTabs = NO;
// initialize to YES so that awakeFromNib: will set the right size; awakeFromNib uses setVisible which
// will only be effective if visibility changes. initializing to YES causes the right thing to happen even
@@ -113,8 +121,9 @@ static const int kOverflowButtonMargin = 1;
{
[mTrackingCells release];
[mActiveTabButton release];
- [mOverflowButton release];
- [mOverflowMenu release];
+ [mOverflowRightButton release];
+ [mOverflowLeftButton release];
+ [mOverflowMenuButton release];
[mBackgroundImage release];
[mButtonDividerImage release];
@@ -146,14 +155,23 @@ static const int kOverflowButtonMargin = 1;
if (NSIntersectsRect(tabButtonFrame, rect) && NSMaxX(tabButtonFrame) <= NSMaxX(tabsRect))
[tabButton drawWithFrame:tabButtonFrame inView:self];
- // draw the first divider.
- if ((prevButton == nil) && ([tab tabState] != NSSelectedTab))
- [mButtonDividerImage compositeToPoint:NSMakePoint(tabButtonFrame.origin.x - [mButtonDividerImage size].width, tabButtonFrame.origin.y)
- operation:NSCompositeSourceOver];
prevButton = tabButton;
tab = nextTab;
}
-
+
+ // Draw the leftmost button image divider (right sides are drawn by the buttons themselves).
+ // A divider is not needed if the leftmost button is selected.
+ if ([mTabView indexOfTabViewItem:[mTabView selectedTabViewItem]] != mLeftMostVisibleTabIndex) {
+ [mButtonDividerImage compositeToPoint:NSMakePoint(NSMinX(tabsRect), 0)
+ operation:NSCompositeSourceOver];
+ }
+
+ // Draw a divider to the left of the overflow menu button, if it's showing
+ if (mOverflowTabs)
+ [mButtonDividerImage compositeToPoint:NSMakePoint(NSMaxX(tabsRect) +
+ [mOverflowRightButton frame].size.width, 0)
+ operation:NSCompositeSourceOver];
+
if (mDragOverBar && !mDragDestButton)
[self drawTabBarBackgroundHiliteRectInRect:rect];
}
@@ -178,11 +196,12 @@ static const int kOverflowButtonMargin = 1;
{
NSPoint clickPoint = [self convertPoint:[theEvent locationInWindow] fromView:nil];
TabButtonCell *clickedTabButton = [self buttonAtPoint:clickPoint];
+ NSButton *clickedScrollButton = [self scrollButtonAtPoint:clickPoint];
mLastClickPoint = clickPoint;
if (clickedTabButton && ![clickedTabButton willTrackMouse:theEvent inRect:[clickedTabButton frame] ofView:self])
[[[clickedTabButton tabViewItem] tabItemContentsView] mouseDown:theEvent];
- else if (!clickedTabButton && [theEvent clickCount] == 2)
+ else if (!clickedTabButton && !clickedScrollButton && [theEvent clickCount] == 2)
[[NSNotificationCenter defaultCenter] postNotificationName:kTabBarBackgroundDoubleClickedNotification
object:mTabView];
}
@@ -210,6 +229,18 @@ static const int kOverflowButtonMargin = 1;
}*/
}
+// Returns the scroll button at the specified point, if there is one.
+-(NSButton*)scrollButtonAtPoint:(NSPoint)clickPoint
+{
+ if (NSPointInRect(clickPoint, [mOverflowLeftButton frame]))
+ return mOverflowLeftButton;
+ if (NSPointInRect(clickPoint, [mOverflowRightButton frame]))
+ return mOverflowRightButton;
+ if (NSPointInRect(clickPoint, [mOverflowMenuButton frame]))
+ return mOverflowMenuButton;
+ return nil;
+}
+
// returns the tab at the specified point (in tab bar view coordinates)
-(TabButtonCell*)buttonAtPoint:(NSPoint)clickPoint
{
@@ -235,7 +266,7 @@ static const int kOverflowButtonMargin = 1;
NSRect barFrame = [self bounds];
NSPoint patternOrigin = [self convertPoint:NSMakePoint(0.0f, 0.0f) toView:nil];
NSRect fillRect;
-
+
// first, fill to the left of the active tab
fillRect = NSMakeRect(barFrame.origin.x, barFrame.origin.y,
(tabRect.origin.x - barFrame.origin.x), barFrame.size.height);
@@ -308,10 +339,10 @@ static const int kOverflowButtonMargin = 1;
-(void)loadImages
{
- if (mBackgroundImage) return;
-
- mBackgroundImage = [[NSImage imageNamed:@"tab_bar_bg"] retain];
- mButtonDividerImage = [[NSImage imageNamed:@"tab_button_divider"] retain];
+ if (!mBackgroundImage)
+ mBackgroundImage = [[NSImage imageNamed:@"tab_bar_bg"] retain];
+ if (!mButtonDividerImage)
+ mButtonDividerImage = [[NSImage imageNamed:@"tab_button_divider"] retain];
}
// construct the tab bar based on the current state of mTabView;
@@ -327,9 +358,8 @@ static const int kOverflowButtonMargin = 1;
[self registerTabButtonsForTracking];
}
-- (void)windowClosed
+- (void)viewWillMoveToWindow:(NSWindow*)window
{
- // remove all tracking rects because this view is implicitly retained when they're registered
[self unregisterTabButtonsForTracking];
}
@@ -347,14 +377,13 @@ static const int kOverflowButtonMargin = 1;
local = [self convertPoint:local fromView:nil];
BrowserTabViewItem* tab = nil;
- float rightEdge = NSMaxX([self tabsRect]);
while ((tab = [tabEnumerator nextObject])) {
TabButtonCell* tabButton = [tab tabButtonCell];
if (tabButton) {
NSRect trackingRect = [tabButton frame];
// only track tabs that are onscreen
- if (NSMaxX(trackingRect) > (rightEdge + 0.00001))
- break;
+ if (trackingRect.size.width < 0.00001)
+ continue;
[mTrackingCells addObject:tabButton];
[tabButton addTrackingRectInView:self withFrame:trackingRect cursorLocation:local];
@@ -364,6 +393,20 @@ static const int kOverflowButtonMargin = 1;
}
}
+// causes tab buttons to stop reacting to mouse events
+-(void)unregisterTabButtonsForTracking
+{
+ if (mTrackingCells) {
+ NSEnumerator *tabEnumerator = [mTrackingCells objectEnumerator];
+ TabButtonCell *tab = nil;
+ while ((tab = (TabButtonCell *)[tabEnumerator nextObject]))
+ [tab removeTrackingRectFromView:self];
+ [mTrackingCells release];
+ mTrackingCells = nil;
+ }
+ [self removeAllToolTips];
+}
+
- (void)viewDidMoveToWindow
{
// setup the tab bar to recieve notifications of key window changes
@@ -399,20 +442,6 @@ static const int kOverflowButtonMargin = 1;
[[tab tabButtonCell] updateHoverState:NO];
}
}
-
-// causes tab buttons to stop reacting to mouse events
--(void)unregisterTabButtonsForTracking
-{
- if (mTrackingCells) {
- NSEnumerator *tabEnumerator = [mTrackingCells objectEnumerator];
- TabButtonCell *tab = nil;
- while ((tab = (TabButtonCell *)[tabEnumerator nextObject]))
- [tab removeTrackingRectFromView: self];
- [mTrackingCells release];
- mTrackingCells = nil;
- }
- [self removeAllToolTips];
-}
// returns the height the tab bar should be if drawn
-(float)tabBarHeight
@@ -439,112 +468,225 @@ static const int kOverflowButtonMargin = 1;
return [self tabViewItemAtPoint:mousePointInWindow];
}
-// sets the tab buttons to the largest kMinTabWidth <= size <= kMaxTabWidth where they all fit
-// and calculates the frame for each.
-(void)layoutButtons
{
- const int numTabs = [mTabView numberOfTabViewItems];
- float tabWidth = kMaxTabWidth;
+ int numberOfTabs = [mTabView numberOfTabViewItems];
+
+ // check to see whether or not the tabs will fit without the overflows
+ float widthOfATab = NSWidth([self tabsRectWithOverflow:NO]) / numberOfTabs;
+ mOverflowTabs = widthOfATab < kMinTabWidth;
- // calculate the largest tabs that would fit... [self tabsRect] may not be correct until mOverflowTabs is set here.
- float maxWidth = floor((NSWidth([self bounds]) - (2*kTabBarMargin))/numTabs);
- // if tabs will overflow, leave space for the button
- if (maxWidth < kMinTabWidth) {
- mOverflowTabs = YES;
- NSRect tabsRect = [self tabsRect];
- for (int i = 1; i < numTabs; i++) {
- maxWidth = floor(NSWidth(tabsRect)/(numTabs - i));
- if (maxWidth >= kMinTabWidth) break;
- }
- // because the specific tabs which overflow may change, empty the menu and rebuild it as tabs are laid out
- [self initOverflowMenu];
- } else {
- mOverflowTabs = NO;
- }
- // if our tabs are currently larger than that, shrink them to the larger of kMinTabWidth or maxWidth
- if (tabWidth > maxWidth)
- tabWidth = (maxWidth > kMinTabWidth ? maxWidth : kMinTabWidth);
- // resize and position the tab buttons
- int xCoord = kTabBarMargin;
- NSArray *tabItems = [mTabView tabViewItems];
- NSEnumerator *tabEnumerator = [tabItems objectEnumerator];
- BrowserTabViewItem *tab = nil;
- TabButtonCell *prevTabButton = nil;
- while ((tab = [tabEnumerator nextObject])) {
- TabButtonCell *tabButtonCell = [tab tabButtonCell];
- NSSize buttonSize = [tabButtonCell size];
- buttonSize.width = tabWidth;
- buttonSize.height = kTabBarDefaultHeight;
- NSPoint buttonOrigin = NSMakePoint(xCoord,0);
- [tabButtonCell setFrame:NSMakeRect(buttonOrigin.x,buttonOrigin.y,buttonSize.width,buttonSize.height)];
- // tell the button whether it needs to draw the right side dividing line
- if ([tab tabState] == NSSelectedTab) {
- [tabButtonCell setDrawDivider:NO];
- [prevTabButton setDrawDivider:NO];
- } else {
- [tabButtonCell setDrawDivider:YES];
- }
- // If the tab ran off the edge, suppress its close button, make sure the divider is drawn, and add it to the menu
- if (buttonOrigin.x + buttonSize.width > NSMaxX([self tabsRect])) {
- [tabButtonCell hideCloseButton];
- // push the tab off the edge of the view to keep it from grabbing clicks if there is an area
- // between the overflow menu and the last tab which is within tabsRect due to rounding
- [tabButtonCell setFrame:NSMakeRect(NSMaxX([self bounds]),buttonOrigin.y,buttonSize.width,buttonSize.height)];
- // if the tab prior to the overflow is not selected, it must draw a divider
- if([[prevTabButton tabViewItem] tabState] != NSSelectedTab) [prevTabButton setDrawDivider:YES];
- [mOverflowMenu addItem:[tab menuItem]];
- }
- prevTabButton = tabButtonCell;
- xCoord += (int)tabWidth;
- }
- // if tabs overflowed, position and display the overflow button
if (mOverflowTabs) {
- [mOverflowButton setFrame:NSMakeRect(NSMaxX([self tabsRect]) + kOverflowButtonMargin,
- ([self tabBarHeight] - kOverflowButtonHeight)/2,kOverflowButtonWidth,kOverflowButtonHeight)];
- [self addSubview:mOverflowButton];
- } else {
- [mOverflowButton removeFromSuperview];
+ float widthOfTabBar = NSWidth([self tabsRect]);
+ mNumberOfVisibleTabs = (int)floor(widthOfTabBar / kMinTabWidth);
+ widthOfATab = widthOfTabBar / mNumberOfVisibleTabs;
+ if (mNumberOfVisibleTabs + mLeftMostVisibleTabIndex > numberOfTabs)
+ [self setLeftMostVisibleTabIndex:(numberOfTabs - mNumberOfVisibleTabs)];
}
+ else {
+ mLeftMostVisibleTabIndex = 0;
+ mNumberOfVisibleTabs = numberOfTabs;
+ widthOfATab = (widthOfATab > kMaxTabWidth ? kMaxTabWidth : widthOfATab);
+ }
+
+ [self setOverflowButtonsVisible:mOverflowTabs];
+
+ float nextTabXOrigin = NSMinX([self tabsRect]);
+ NSRect invisibleTabRect = NSMakeRect(nextTabXOrigin, 0, 0, 0);
+ for (int i = 0; i < numberOfTabs; i++) {
+ TabButtonCell* tabButtonCell = [(BrowserTabViewItem*)[mTabView tabViewItemAtIndex:i] tabButtonCell];
+
+ // tabButtonCell is off-screen, to the left or right
+ if (i < mLeftMostVisibleTabIndex || i >= mLeftMostVisibleTabIndex + mNumberOfVisibleTabs) {
+ [tabButtonCell setFrame:invisibleTabRect];
+ [tabButtonCell setDrawDivider:NO];
+ [tabButtonCell hideCloseButton];
+ }
+ // Regular visible tab
+ else {
+ [tabButtonCell setFrame:NSMakeRect(nextTabXOrigin, 0, widthOfATab, [self tabBarHeight])];
+ [tabButtonCell setDrawDivider:YES];
+ nextTabXOrigin += (int)widthOfATab;
+ }
+ }
+
+ BrowserTabViewItem* selectedTab = (BrowserTabViewItem*)[mTabView selectedTabViewItem];
+ if (selectedTab) {
+ [[selectedTab tabButtonCell] setDrawDivider:NO];
+ int selectedTabIndex = [mTabView indexOfTabViewItem:selectedTab];
+ if (selectedTabIndex > 0 && [self tabIndexIsVisible:selectedTabIndex])
+ [[(BrowserTabViewItem*)[mTabView tabViewItemAtIndex:(selectedTabIndex - 1)] tabButtonCell] setDrawDivider:NO];
+ }
+
[self setNeedsDisplay:YES];
}
--(void)initOverflowMenu
+// Determines whether or not the specified tab index is in the currently visible
+// tab bar.
+-(BOOL)tabIndexIsVisible:(int)tabIndex
{
- if (!mOverflowButton) {
- // if it hasn't been created yet, create an NSPopUpButton and retain a strong reference
- mOverflowButton = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, kOverflowButtonWidth, kOverflowButtonHeight)];
- [mOverflowButton setImage:[NSImage imageNamed:@"tab_overflow"]];
- [mOverflowButton setImagePosition:NSImageOnly];
- [mOverflowButton setBezelStyle:NSShadowlessSquareBezelStyle];
- [mOverflowButton setBordered:NO];
- [[mOverflowButton cell] setHighlightsBy:NSNoCellMask];
- [mOverflowButton setTarget:self];
- [mOverflowButton setAction:@selector(overflowMenu:)];
- [(NSButtonCell *)[mOverflowButton cell] sendActionOn:NSLeftMouseDownMask];
- }
- if (!mOverflowMenu) {
- // create an empty NSMenu for later use and retain a strong reference
- mOverflowMenu = [[NSMenu alloc] init];
- [mOverflowMenu addItemWithTitle:@"" action:NULL keyEquivalent:@""];
- }
-
- // remove any items on the menu other than the dummy item
- [mOverflowMenu removeItemsFromIndex:1];
+ return (mLeftMostVisibleTabIndex <= tabIndex && tabIndex < mNumberOfVisibleTabs + mLeftMostVisibleTabIndex);
}
-- (IBAction)overflowMenu:(id)sender
+// A helper method that returns an NSButton ready for use as one of our overflow buttons
+-(NSButton*)newOverflowButtonForImageNamed:(NSString*)imageName
{
- NSPopUpButtonCell* popupCell = [[[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:YES] autorelease];
- [popupCell setMenu:mOverflowMenu];
+ NSImage* buttonImage = [NSImage imageNamed:imageName];
+ NSButton* button = [[NSButton alloc] initWithFrame:NSMakeRect(0, 0, [buttonImage size].width, [buttonImage size].height)];
+ [button setImage:buttonImage];
+ [button setImagePosition:NSImageOnly];
+ [button setBezelStyle:NSShadowlessSquareBezelStyle];
+ [button setButtonType:NSToggleButton];
+ [button setBordered:NO];
+ [button setTarget:self];
+ return button;
+}
+
+-(void)ensureOverflowButtonsInitted
+{
+ if (!mOverflowLeftButton) {
+ mOverflowLeftButton = [self newOverflowButtonForImageNamed:@"tab_scroll_button_left"];
+ [[mOverflowLeftButton cell] setContinuous:YES];
+ [mOverflowLeftButton setPeriodicDelay:kScrollButtonDelay interval:kScrollButtonInterval];
+ [mOverflowLeftButton setAction:@selector(scrollLeft:)];
+ }
+ if (!mOverflowRightButton) {
+ mOverflowRightButton = [self newOverflowButtonForImageNamed:@"tab_scroll_button_right"];
+ [[mOverflowRightButton cell] setContinuous:YES];
+ [mOverflowRightButton setPeriodicDelay:kScrollButtonDelay interval:kScrollButtonInterval];
+ [mOverflowRightButton setAction:@selector(scrollRight:)];
+ }
+ if (!mOverflowMenuButton) {
+ mOverflowMenuButton = [self newOverflowButtonForImageNamed:@"tab_menu_button"];
+ [mOverflowMenuButton setAction:@selector(showOverflowMenu:)];
+ [mOverflowMenuButton sendActionOn:NSLeftMouseDownMask];
+ }
+}
+
+-(void)setOverflowButtonsVisible:(BOOL)visible
+{
+ if (visible) {
+ [self ensureOverflowButtonsInitted];
+
+ NSRect rect = [self tabsRect];
+
+ [mOverflowLeftButton setFrameOrigin:NSMakePoint(0, kTabBottomPad)];
+ [mOverflowLeftButton setEnabled:(mLeftMostVisibleTabIndex != 0)];
+ [self addSubview:mOverflowLeftButton];
+
+ [mOverflowRightButton setFrameOrigin:NSMakePoint(NSMaxX(rect), kTabBottomPad)];
+ [mOverflowRightButton setEnabled:(mLeftMostVisibleTabIndex + mNumberOfVisibleTabs != [mTabView numberOfTabViewItems])];
+ [self addSubview:mOverflowRightButton];
+
+ [mOverflowMenuButton setFrameOrigin:NSMakePoint(NSMaxX(rect) +
+ [mOverflowRightButton frame].size.width +
+ [mButtonDividerImage size].width,
+ kTabBottomPad)];
+ [self addSubview:mOverflowMenuButton];
+ }
+ else {
+ [mOverflowLeftButton removeFromSuperview];
+ [mOverflowRightButton removeFromSuperview];
+ [mOverflowMenuButton removeFromSuperview];
+ }
+}
+
+- (void)showOverflowMenu:(id)sender
+{
+ NSMenu* overflowMenu = [[[NSMenu alloc] init] autorelease];
+ int numberOfTabs = [mTabView numberOfTabViewItems];
+
+ for (int i = 0; i < numberOfTabs; i++)
+ [overflowMenu addItem:[(BrowserTabViewItem*)[mTabView tabViewItemAtIndex:i] menuItem]];
+
+ // Insert the separators from right to left, so we don't mess up the index numbers as we go
+ if (mLeftMostVisibleTabIndex + mNumberOfVisibleTabs < numberOfTabs)
+ [overflowMenu insertItem:[NSMenuItem separatorItem] atIndex:(mLeftMostVisibleTabIndex + mNumberOfVisibleTabs)];
+ if (mLeftMostVisibleTabIndex > 0)
+ [overflowMenu insertItem:[NSMenuItem separatorItem] atIndex:mLeftMostVisibleTabIndex];
+
+ NSPopUpButtonCell* popupCell = [[[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:NO] autorelease];
+ [popupCell setAltersStateOfSelectedItem:YES];
+ [popupCell setMenu:overflowMenu];
[popupCell trackMouse:[NSApp currentEvent] inRect:[sender bounds] ofView:sender untilMouseUp:YES];
}
-// returns an NSRect of the area where tab widgets may be drawn
--(NSRect)tabsRect
+-(void)scrollWheel:(NSEvent*)theEvent {
+ // Treat vertical scrolling as horizontal (with down == right), since there's
+ // no other meaning for the tab bar, and many mice are vertical-only.
+ float scrollIncrement = 0.0;
+ if ([theEvent deltaX])
+ scrollIncrement = -[theEvent deltaX];
+ else if ([theEvent deltaY])
+ scrollIncrement = -[theEvent deltaY];
+
+ // We don't use the accellation; just scroll one tab per event.
+ if (scrollIncrement > 0.0)
+ [self scrollRight:nil];
+ else if (scrollIncrement < 0.0)
+ [self scrollLeft:nil];
+}
+
+// Scrolls the tab bar one place to the right, if possible.
+-(void)scrollLeft:(id)aSender
{
- NSRect rect = [self bounds];
- rect.origin.x += kTabBarMargin;
- rect.size.width -= 2 * kTabBarMargin + (mOverflowTabs ? kOverflowButtonWidth : 0.0);
+ if (mLeftMostVisibleTabIndex > 0)
+ [self setLeftMostVisibleTabIndex:(mLeftMostVisibleTabIndex - 1)];
+}
+
+// Scrolls the tab bar one place to the left, if possible.
+-(void)scrollRight:(id)aSender
+{
+ if ((mLeftMostVisibleTabIndex + mNumberOfVisibleTabs) < [mTabView numberOfTabViewItems])
+ [self setLeftMostVisibleTabIndex:(mLeftMostVisibleTabIndex + 1)];
+}
+
+// Sets the left most visible tab index depending on the the relationship between
+// index and mLeftMostVisibleTabIndex.
+-(void)scrollTabIndexToVisible:(int)index
+{
+ if (index < mLeftMostVisibleTabIndex)
+ [self setLeftMostVisibleTabIndex:index];
+ else if (index >= mLeftMostVisibleTabIndex + mNumberOfVisibleTabs)
+ [self setLeftMostVisibleTabIndex:(index - mNumberOfVisibleTabs + 1)];
+}
+
+// Sets the left most visible tab index to the value specified and rebuilds the
+// tab bar. Should not be called before performing necessary sanity checks.
+-(void)setLeftMostVisibleTabIndex:(int)index
+{
+ if (index != mLeftMostVisibleTabIndex) {
+ mLeftMostVisibleTabIndex = index;
+ [self rebuildTabBar];
+ }
+}
+
+// returns an NSRect of the area where tabs may currently be drawn
+- (NSRect)tabsRect
+{
+ return [self tabsRectWithOverflow:mOverflowTabs];
+}
+
+// returns an NSRect of the available area to draw tabs with or without overflowing
+-(NSRect)tabsRectWithOverflow:(BOOL)overflowing
+{
+ NSRect rect = [self frame];
+
+ if (overflowing) {
+ float overflowLeftButtonWidth = [mOverflowLeftButton frame].size.width;
+ rect.origin.x += overflowLeftButtonWidth;
+ rect.size.width -= overflowLeftButtonWidth +
+ [mOverflowRightButton frame].size.width +
+ [mButtonDividerImage size].width +
+ [mOverflowMenuButton frame].size.width;
+ }
+ // If there aren't overflows, give ourselves a little margin around the tabs
+ // to make them look nicer.
+ else {
+ rect.origin.x += kTabBarMargin;
+ rect.size.width -= 2 * kTabBarMargin;
+ }
+
return rect;
}
diff --git a/mozilla/camino/src/browser/BrowserTabView.mm b/mozilla/camino/src/browser/BrowserTabView.mm
index 4f226934920..18478c5c6b9 100644
--- a/mozilla/camino/src/browser/BrowserTabView.mm
+++ b/mozilla/camino/src/browser/BrowserTabView.mm
@@ -328,9 +328,6 @@ NSString* const kTabBarBackgroundDoubleClickedNotification = @"kTabBarBackground
NSTabViewItem* item = [self tabViewItemAtIndex: i];
[[item view] windowClosed];
}
-
- // Tell the tab bar the window is closed so it will perform any needed cleanup
- [mTabBar windowClosed];
}
- (BOOL)tabsVisible
@@ -535,4 +532,11 @@ NSString* const kTabBarBackgroundDoubleClickedNotification = @"kTabBarBackground
[self setJumpbackTab:nil];
}
+// Tabs should be scrolled into view when selected.
+-(void)selectTabViewItem:(NSTabViewItem*)item
+{
+ [mTabBar scrollTabIndexToVisible:[self indexOfTabViewItem:item]];
+ [super selectTabViewItem:item];
+}
+
@end
diff --git a/mozilla/camino/src/browser/BrowserWindowController.h b/mozilla/camino/src/browser/BrowserWindowController.h
index fa73678ee38..2b647fb97a8 100644
--- a/mozilla/camino/src/browser/BrowserWindowController.h
+++ b/mozilla/camino/src/browser/BrowserWindowController.h
@@ -114,7 +114,7 @@ typedef enum
IBOutlet ExtendedSplitView* mLocationToolbarView; // parent splitter of location and search, strong
IBOutlet AutoCompleteTextField* mURLBar;
IBOutlet NSTextField* mStatus;
- IBOutlet NSProgressIndicator* mProgress; // STRONG reference
+ IBOutlet NSProgressIndicator* mProgress;
IBOutlet NSWindow* mLocationSheetWindow;
IBOutlet NSTextField* mLocationSheetURLField;
IBOutlet NSView* mStatusBar; // contains the status text, progress bar, and lock
@@ -175,11 +175,6 @@ typedef enum
// Funky field editor for URL bar
NSTextView *mURLFieldEditor;
-
- // cached superview for progress meter so we know where to add/remove it. This
- // could be an outlet, but i figure it's easier to get it at runtime thereby saving
- // someone from messing up in the nib when making changes.
- NSView* mProgressSuperview; // WEAK ptr
}
- (BrowserTabView*)getTabBrowser;
@@ -338,10 +333,6 @@ typedef enum
- (BookmarkToolbar*) bookmarkToolbar;
-- (NSProgressIndicator*) progressIndicator;
-- (void) showProgressIndicator;
-- (void) hideProgressIndicator;
-
- (BOOL)windowClosesQuietly;
- (void)setWindowClosesQuietly:(BOOL)inClosesQuietly;
diff --git a/mozilla/camino/src/browser/BrowserWindowController.mm b/mozilla/camino/src/browser/BrowserWindowController.mm
index c4d612c83c0..0443c7bbd05 100644
--- a/mozilla/camino/src/browser/BrowserWindowController.mm
+++ b/mozilla/camino/src/browser/BrowserWindowController.mm
@@ -601,7 +601,6 @@ enum BWCOpenDest {
mThrobberImages = nil;
mThrobberHandler = nil;
mURLFieldEditor = nil;
- mProgressSuperview = nil;
// register for services
NSArray* sendTypes = [NSArray arrayWithObjects:NSStringPboardType, nil];
@@ -825,7 +824,6 @@ enum BWCOpenDest {
// superclass dealloc takes care of our child NSView's, which include the
// BrowserWrappers and their child CHBrowserViews.
- [mProgress release];
[self stopThrobber];
[mThrobberImages release];
[mURLFieldEditor release];
@@ -874,18 +872,6 @@ enum BWCOpenDest {
mStatus = nil;
}
else {
- // Retain with a single extra refcount. This allows us to remove
- // the progress meter from its superview without having to worry
- // about retaining and releasing it. Cache the superview of the
- // progress. Dynamically fetch the superview so as not to burden
- // someone rearranging the nib with this detail. Note that this
- // needs to be in a subview from the status bar because if the
- // window resizes while it is hidden, its position wouldn't get updated.
- // Having it in a separate view that stays visible (and is thus
- // involved in the layout process) solves this.
- [mProgress retain];
- mProgressSuperview = [mProgress superview];
-
// due to a cocoa issue with it updating the bounding box of two rects
// that both needing updating instead of just the two individual rects
// (radar 2194819), we need to make the text area opaque.
@@ -1138,7 +1124,7 @@ enum BWCOpenDest {
- (void)windowDidResize:(NSNotification *)aNotification
{
- [self updateWindowTitle:[mBrowserView displayTitle]];
+ [self updateWindowTitle:[mBrowserView pageTitle]];
// Update the cached windowframe unless we are zooming the window
if (!mShouldZoom)
@@ -1814,14 +1800,14 @@ enum BWCOpenDest {
{
[self startThrobber];
[mProgress setIndeterminate:YES];
- [self showProgressIndicator];
+ [mProgress setHidden:NO];
[mProgress startAnimation:self];
}
else
{
[self stopThrobber];
[mProgress stopAnimation:self];
- [self hideProgressIndicator];
+ [mProgress setHidden:YES];
[mProgress setIndeterminate:YES];
[[[self window] toolbar] validateVisibleItems];
}
@@ -2110,7 +2096,7 @@ enum BWCOpenDest {
- (void)updateFromFrontmostTab
{
- [self updateWindowTitle:[mBrowserView displayTitle]];
+ [self updateWindowTitle:[mBrowserView pageTitle]];
[self setLoadingActive:[mBrowserView isBusy]];
[self setLoadingProgress:[mBrowserView loadingProgress]];
[self showSecurityState:[mBrowserView securityState]];
@@ -2391,13 +2377,13 @@ enum BWCOpenDest {
return;
}
- // look for bookmarks keywords match
- NSArray *resolvedURLs = [[BookmarkManager sharedBookmarkManager] resolveBookmarksKeyword:theURL];
+ // look for bookmarks shortcut match
+ NSArray *resolvedURLs = [[BookmarkManager sharedBookmarkManager] resolveBookmarksShortcut:theURL];
NSString* targetURL = nil;
if (!resolvedURLs || [resolvedURLs count] == 1) {
targetURL = resolvedURLs ? [resolvedURLs lastObject] : theURL;
- BOOL allowPopups = resolvedURLs ? YES : NO; //Allow popups if it's a bookmark keyword
+ BOOL allowPopups = resolvedURLs ? YES : NO; //Allow popups if it's a bookmark shortcut
if (inDest == kDestinationNewTab)
[self openNewTabWithURL:targetURL referrer:nil loadInBackground:inLoadInBG allowPopups:allowPopups setJumpback:NO];
else if (inDest == kDestinationNewWindow)
@@ -2414,7 +2400,7 @@ enum BWCOpenDest {
// global history needs to know the user typed this url so it can present it
// in autocomplete. We use the URI fixup service to strip whitespace and remove
- // invalid protocols, etc. Don't save keyword-expanded urls.
+ // invalid protocols, etc. Don't save shortcut-expanded urls.
if (!resolvedURLs &&
mDataOwner &&
mDataOwner->mGlobalHistory &&
@@ -2869,7 +2855,7 @@ enum BWCOpenDest {
NSString* itemURL = [browserWrapper currentURI];
NS_ASSERTION([browserWrapper isBookmarkable], "Bookmarking an innappropriate URI");
- [parentFolder addBookmark:itemTitle url:itemURL inPosition:[parentFolder count] isSeparator:NO];
+ [parentFolder appendChild:[Bookmark bookmarkWithTitle:itemTitle url:itemURL]];
[bookmarkManager setLastUsedBookmarkFolder:parentFolder];
}
@@ -2887,9 +2873,8 @@ enum BWCOpenDest {
if (![browserWrapper isBookmarkable])
continue;
- Bookmark *bookmark = [newTabGroup addBookmark];
- [bookmark setTitle:[browserWrapper pageTitle]];
- [bookmark setUrl:[browserWrapper currentURI]];
+ [newTabGroup appendChild:[Bookmark bookmarkWithTitle:[browserWrapper pageTitle]
+ url:[browserWrapper currentURI]]];
if (browserWrapper == currentBrowserWrapper)
primaryTabTitle = [browserWrapper pageTitle];
@@ -4382,12 +4367,12 @@ enum BWCOpenDest {
[inMenu insertItem:[NSMenuItem separatorItem] atIndex:dictionaryItemsInsertBase];
- [inMenu insertItemWithTitle:NSLocalizedString(@"Ignore Spelling", nil)
+ [inMenu insertItemWithTitle:NSLocalizedString(@"IgnoreSpelling", nil)
action:@selector(ignoreWord:)
keyEquivalent:@""
atIndex:(dictionaryItemsInsertBase + 1)];
- [inMenu insertItemWithTitle:NSLocalizedString(@"Learn Spelling", nil)
+ [inMenu insertItemWithTitle:NSLocalizedString(@"LearnSpelling", nil)
action:@selector(learnWord:)
keyEquivalent:@""
atIndex:(dictionaryItemsInsertBase + 2)];
@@ -4618,22 +4603,6 @@ enum BWCOpenDest {
return mPersonalToolbar;
}
-- (NSProgressIndicator*)progressIndicator
-{
- return mProgress;
-}
-
-- (void)showProgressIndicator
-{
- // note we do nothing to check if the progress indicator is already there.
- [mProgressSuperview addSubview:mProgress];
-}
-
-- (void)hideProgressIndicator
-{
- [mProgress removeFromSuperview];
-}
-
- (BOOL)windowClosesQuietly
{
return mWindowClosesQuietly;
@@ -4810,7 +4779,7 @@ enum BWCOpenDest {
unsigned int bookmarkBarCount = [bookmarkBarChildren count];
unsigned int i;
int loadableItemIndex = -1;
- BookmarkItem* item;
+ BookmarkItem* item = nil;
// We cycle through all the toolbar items. When we've skipped enough loadable items
// (i.e., loadableItemIndex == inIndex), we've gotten there and |item| is the bookmark we want to load.
diff --git a/mozilla/camino/src/browser/BrowserWrapper.h b/mozilla/camino/src/browser/BrowserWrapper.h
index 26f7e6c7e89..da28fd765f3 100644
--- a/mozilla/camino/src/browser/BrowserWrapper.h
+++ b/mozilla/camino/src/browser/BrowserWrapper.h
@@ -193,7 +193,6 @@ class nsIArray;
- (NSString*)pendingURI;
- (NSString*)currentURI;
-- (NSString*)displayTitle;
- (NSString*)pageTitle;
- (NSImage*)siteIcon;
- (NSString*)statusString;
diff --git a/mozilla/camino/src/browser/BrowserWrapper.mm b/mozilla/camino/src/browser/BrowserWrapper.mm
index 7210f0767df..5fa0fd35d7e 100644
--- a/mozilla/camino/src/browser/BrowserWrapper.mm
+++ b/mozilla/camino/src/browser/BrowserWrapper.mm
@@ -51,12 +51,12 @@
#import "KeychainService.h"
#import "AutoCompleteTextField.h"
#import "RolloverImageButton.h"
+#import "CHPermissionManager.h"
#include "CHBrowserService.h"
#include "ContentClickListener.h"
#include "nsCOMPtr.h"
-#include "nsIServiceManager.h"
#ifdef MOZILLA_1_8_BRANCH
#include "nsIArray.h"
@@ -80,7 +80,6 @@
#include "nsIDOMEventReceiver.h"
#include "nsIWebProgressListener.h"
#include "nsIBrowserDOMWindow.h"
-#include "nsIPermissionManager.h"
#include "nsIScriptSecurityManager.h"
class nsIDOMPopupBlockedEvent;
@@ -332,14 +331,9 @@ enum StatusPriority {
return mIsBusy;
}
-- (NSString*)displayTitle
-{
- return mDisplayTitle;
-}
-
- (NSString*)pageTitle
{
- return [mBrowserView pageTitle];
+ return mDisplayTitle;
}
- (NSImage*)siteIcon
@@ -522,7 +516,7 @@ enum StatusPriority {
[(BrowserTabViewItem*)mTabItem stopLoadAnimation];
NSString *urlString = [self currentURI];
- NSString *titleString = [self pageTitle];
+ NSString *titleString = [mBrowserView pageTitle];
// If we never got a page title, then the tab title will be stuck at "Loading..."
// so be sure to set the title here
@@ -1156,15 +1150,9 @@ enum StatusPriority {
- (BOOL)popupsAreBlacklistedForURL:(NSString*)inURL
{
- nsCOMPtr uri;
- NS_NewURI(getter_AddRefs(uri), [inURL UTF8String]);
- nsCOMPtr pm(do_GetService(NS_PERMISSIONMANAGER_CONTRACTID));
- if (pm && uri) {
- PRUint32 permission;
- pm->TestPermission(uri, "popup", &permission);
- return (permission == nsIPermissionManager::DENY_ACTION);
- }
- return NO;
+ int policy = [[CHPermissionManager permissionManager] policyForURI:inURL
+ type:CHPermissionTypePopup];
+ return (policy == CHPermissionDeny);
}
//
diff --git a/mozilla/camino/src/browser/RemoteDataProvider.h b/mozilla/camino/src/browser/RemoteDataProvider.h
index 43074e9b954..a9319d5117e 100644
--- a/mozilla/camino/src/browser/RemoteDataProvider.h
+++ b/mozilla/camino/src/browser/RemoteDataProvider.h
@@ -53,7 +53,7 @@ extern NSString* const RemoteDataLoadRequestResultKey;
// for 'RemoteDataLoadRequestNotificationName' notifications, and catch all loads
// that happen that way.
-@protocol RemoteLoadListener
+@protocol RemoteLoadListener
// called when the load completes, or fails. If the status code is a failure code,
// data may be nil.
- (void)doneRemoteLoad:(NSString*)inURI forTarget:(id)target withUserData:(id)userData data:(NSData*)data status:(nsresult)status usingNetwork:(BOOL)usingNetwork;
diff --git a/mozilla/camino/src/browser/nsAlertController.mm b/mozilla/camino/src/browser/nsAlertController.mm
index 21a18e6c85f..6b819994c4b 100644
--- a/mozilla/camino/src/browser/nsAlertController.mm
+++ b/mozilla/camino/src/browser/nsAlertController.mm
@@ -467,6 +467,8 @@ const int kLabelCheckboxAdjustment = 2; // # pixels the label must be pushed dow
{
NSRect rect = NSMakeRect(0, 0, kMinDialogWidth, kMaxDialogHeight);
NSPanel* panel = [[[NSPanel alloc] initWithContentRect: rect styleMask: NSTitledWindowMask backing: NSBackingStoreBuffered defer: YES] autorelease];
+ // hiding on deactivation will sometimes misplace the dialog
+ [panel setHidesOnDeactivate:NO];
NSImageView* imageView = [[[NSImageView alloc] initWithFrame: NSMakeRect(kWindowBorder, kMaxDialogHeight - kWindowBorder - kIconSize, kIconSize, kIconSize)] autorelease];
// app icon
diff --git a/mozilla/camino/src/download/ProgressViewController.mm b/mozilla/camino/src/download/ProgressViewController.mm
index 93cbac3188e..2055e305cb5 100644
--- a/mozilla/camino/src/download/ProgressViewController.mm
+++ b/mozilla/camino/src/download/ProgressViewController.mm
@@ -377,7 +377,7 @@ enum {
{
if (!mIsFileSave && !mUserCancelled && !mDownloadFailed) {
if ([[PreferenceManager sharedInstance] getBooleanPref:"browser.download.autoDispatch" withSuccess:NULL]) {
- [[NSWorkspace sharedWorkspace] openFile:mDestPath withApplication:nil andDeactivate:NO];
+ [[NSWorkspace sharedWorkspace] openFile:mDestPath];
}
}
}
diff --git a/mozilla/camino/src/embedding/CHBrowserListener.mm b/mozilla/camino/src/embedding/CHBrowserListener.mm
index 68a1e4563be..1f5725c7345 100644
--- a/mozilla/camino/src/embedding/CHBrowserListener.mm
+++ b/mozilla/camino/src/embedding/CHBrowserListener.mm
@@ -37,6 +37,7 @@
* ***** END LICENSE BLOCK ***** */
#import
+#import
#import "NSString+Utils.h"
@@ -418,16 +419,10 @@ CHBrowserListener::SetDimensions(PRUint32 flags, PRInt32 x, PRInt32 y, PRInt32 c
if (flags & nsIEmbeddingSiteWindow::DIM_FLAGS_POSITION)
{
- NSPoint origin;
- origin.x = (float)x;
- origin.y = (float)y;
-
// websites assume the origin is the topleft of the window and that the screen origin
// is "topleft" (quickdraw coordinates). As a result, we have to convert it.
- GDHandle screenDevice = ::GetMainDevice();
- Rect screenRect = (**screenDevice).gdRect;
- short screenHeight = screenRect.bottom - screenRect.top;
- origin.y = screenHeight - origin.y;
+ CGRect screenRect = CGDisplayBounds(CGMainDisplayID());
+ NSPoint origin = NSMakePoint(x, screenRect.size.height - y);
[window setFrameTopLeftPoint:origin];
}
@@ -475,10 +470,8 @@ CHBrowserListener::GetDimensions(PRUint32 flags, PRInt32 *x, PRInt32 *y, PRInt
// websites (and gecko) expect the |y| value to be in "quickdraw" coordinates
// (topleft of window, origin is topleft of main device). Convert from cocoa ->
// quickdraw coord system.
- GDHandle screenDevice = ::GetMainDevice();
- Rect screenRect = (**screenDevice).gdRect;
- short screenHeight = screenRect.bottom - screenRect.top;
- *y = screenHeight - (PRInt32)(frame.origin.y + frame.size.height);
+ CGRect screenRect = CGDisplayBounds(CGMainDisplayID());
+ *y = (PRInt32)(screenRect.size.height - NSMaxY(frame));
}
}
if (flags & nsIEmbeddingSiteWindow::DIM_FLAGS_SIZE_OUTER) {
diff --git a/mozilla/camino/src/embedding/CHPermissionManager.h b/mozilla/camino/src/embedding/CHPermissionManager.h
new file mode 100644
index 00000000000..e9c61352eba
--- /dev/null
+++ b/mozilla/camino/src/embedding/CHPermissionManager.h
@@ -0,0 +1,108 @@
+/* -*- 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 Camino code.
+*
+* The Initial Developer of the Original Code is
+* Stuart Morgan
+* Portions created by the Initial Developer are Copyright (C) 2007
+* the Initial Developer. All Rights Reserved.
+*
+* Contributor(s):
+* Stuart Morgan
+*
+* 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 ***** */
+
+#import
+
+class nsIPermission;
+class nsIPermissionManager;
+
+// Policy constants.
+extern const int CHPermissionUnknown;
+extern const int CHPermissionAllow;
+extern const int CHPermissionDeny;
+extern const int CHPermissionAllowForSession; // meaningful for cookies only
+
+// Permission type constants.
+extern NSString* const CHPermissionTypeCookie;
+extern NSString* const CHPermissionTypePopup;
+
+// An object encompasing a specific permission entry. Used only for enumerating
+// existing permissions; to check or set the permissions for a single host,
+// use CHPermissionManager directly.
+@interface CHPermission : NSObject {
+ @private
+ NSString* mHost; // strong
+ NSString* mType; // strong
+ int mPolicy;
+}
+
+// The host the permission applies to.
+- (NSString*)host;
+
+// The type of the permission. May be an arbitrary value, but common values
+// are defined in the CHPermissionType* constants.
+- (NSString*)type;
+
+// The policy for the permission. May be an arbitrary value, but common values
+// are defined in the CHPermission* constants.
+- (int)policy;
+- (void)setPolicy:(int)policy;
+
+@end
+
+#pragma mark -
+
+// The object responsible for querying and setting the permissions (cookies,
+// popups, etc.) of specific hosts. Wraps the Gecko nsIPermissionManager.
+@interface CHPermissionManager : NSObject {
+ @private
+ nsIPermissionManager* mManager; // strong
+}
+
+// Returns the shared CHPermissionManager instance.
++ (CHPermissionManager*)permissionManager;
+
+// Gets all permissions of the given type. |type| can be an arbitrary value,
+// but common types are defined in the CHPermissionType* constants.
+- (NSArray*)permissionsOfType:(NSString*)type;
+
+// Removes a specific permission for host |host|
+- (void)removePermissionForHost:(NSString*)host type:(NSString*)type;
+
+// Clears all permissions, of all types, far all hosts. Handle with care.
+- (void)removeAllPermissions;
+
+// Getters and setters for individual site policies. Sites can be specified
+// either by host (www.foo.com) or full URI. Policy and type may be arbitrary
+// values, but common values are defined as constants above.
+- (int)policyForHost:(NSString*)host type:(NSString*)type;
+- (int)policyForURI:(NSString*)uri type:(NSString*)type;
+- (void)setPolicy:(int)policy forHost:(NSString*)host type:(NSString*)type;
+- (void)setPolicy:(int)policy forURI:(NSString*)uri type:(NSString*)type;
+
+@end
diff --git a/mozilla/camino/src/embedding/CHPermissionManager.mm b/mozilla/camino/src/embedding/CHPermissionManager.mm
new file mode 100644
index 00000000000..1d3463ce3aa
--- /dev/null
+++ b/mozilla/camino/src/embedding/CHPermissionManager.mm
@@ -0,0 +1,279 @@
+/* -*- 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 Camino code.
+*
+* The Initial Developer of the Original Code is
+* Stuart Morgan
+* Portions created by the Initial Developer are Copyright (C) 2007
+* the Initial Developer. All Rights Reserved.
+*
+* Contributor(s):
+* Stuart Morgan
+*
+* 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 ***** */
+
+// TODO: re-vend PERM_CHANGE_NOTIFICATIONs in a Cocoa-y way.
+
+#import "CHPermissionManager.h"
+
+// For shutdown notification names.
+#import "CHBrowserService.h"
+
+#include "nsCOMPtr.h"
+#include "nsString.h"
+#include "nsServiceManagerUtils.h"
+#include "nsIPermission.h"
+#include "nsIPermissionManager.h"
+#include "nsICookiePermission.h"
+#include "nsISimpleEnumerator.h"
+#include "nsIURI.h"
+#include "nsNetUtil.h"
+
+#pragma mark Policy Definitions
+
+const int CHPermissionUnknown = nsIPermissionManager::UNKNOWN_ACTION;
+const int CHPermissionAllow = nsIPermissionManager::ALLOW_ACTION;
+const int CHPermissionDeny = nsIPermissionManager::DENY_ACTION;
+const int CHPermissionAllowForSession = nsICookiePermission::ACCESS_SESSION;
+
+#pragma mark Permission Type Definitions
+
+NSString* const CHPermissionTypeCookie = @"cookie";
+NSString* const CHPermissionTypePopup = @"popup";
+
+#pragma mark -
+
+@interface CHPermission (CHPermissionManagerMethods)
+- (id)initWithGeckoPermission:(nsIPermission*)geckoPermission;
+@end
+
+@implementation CHPermission
+
+// Creates an autoreleased Cocoa-ized version of the given gecko permission
+// object. Note that it has its own copy of the data, and doesn't actually
+// hold a ref to the gecko permission.
++ (id)permissionWithGeckoPermission:(nsIPermission*)geckoPermission
+{
+ return [[[self alloc] initWithGeckoPermission:geckoPermission] autorelease];
+}
+
+- (id)initWithGeckoPermission:(nsIPermission*)geckoPermission
+{
+ if ((self = [super init])) {
+ if (!geckoPermission) {
+ [self release];
+ return nil;
+ }
+ // nsIPermission is just a glorified struct, so there's no reason to keep it
+ // around; just convert it into a Cocoa-y data store.
+ nsCAutoString host;
+ geckoPermission->GetHost(host);
+ mHost = [[NSString alloc] initWithCString:host.get()];
+ nsCAutoString type;
+ geckoPermission->GetType(type);
+ mType = [[NSString alloc] initWithCString:type.get()];
+ PRUint32 policy;
+ geckoPermission->GetCapability(&policy);
+ mPolicy = policy;
+ }
+ return self;
+}
+
+- (void)delloc
+{
+ [mHost release];
+ [mType release];
+
+ [super dealloc];
+}
+
+- (NSString*)host
+{
+ return mHost;
+}
+
+- (NSString*)type
+{
+ return mType;
+}
+
+- (int)policy
+{
+ return mPolicy;
+}
+
+// Convenience method allowing Permission objects to act like they are
+// mutable and work correctly, even though they aren't hooked up to anything.
+- (void)setPolicy:(int)policy
+{
+ mPolicy = policy;
+ [[CHPermissionManager permissionManager] setPolicy:policy forHost:mHost type:mType];
+}
+
+- (NSString*)description
+{
+ return [NSString stringWithFormat:@"",
+ self, [self host], [self type], [self policy]];
+}
+
+@end
+
+#pragma mark -
+
+static CHPermissionManager* sPermissionManager = nil;
+
+@implementation CHPermissionManager
+
++ (CHPermissionManager*)permissionManager
+{
+ if (!sPermissionManager)
+ sPermissionManager = [[self alloc] init];
+ return sPermissionManager;
+}
+
+- (id)init
+{
+ if ((self = [super init])) {
+ nsCOMPtr pm(do_GetService(NS_PERMISSIONMANAGER_CONTRACTID));
+ mManager = pm.get();
+ if (!mManager) {
+ [self release];
+ return nil;
+ }
+ NS_ADDREF(mManager);
+
+ // Register for xpcom shutdown so that we can release the manager.
+ [[NSNotificationCenter defaultCenter] addObserver:self
+ selector:@selector(xpcomShutdown:)
+ name:XPCOMShutDownNotificationName
+ object:nil];
+ }
+ return self;
+}
+
+- (void)dealloc
+{
+ sPermissionManager = nil;
+ NS_IF_RELEASE(mManager);
+
+ [super dealloc];
+}
+
+- (void)xpcomShutdown:(NSNotification*)notification
+{
+ // This nulls out the pointer
+ NS_IF_RELEASE(mManager);
+}
+
+- (NSArray*)permissionsOfType:(NSString*)type
+{
+ if (!mManager)
+ return nil;
+ const char* typeCString = [type UTF8String];
+
+ nsCOMPtr permEnumerator;
+ mManager->GetEnumerator(getter_AddRefs(permEnumerator));
+
+ if (!permEnumerator)
+ return nil;
+
+ NSMutableArray* permissions = [NSMutableArray array];
+
+ // There's no corresponding accessor for nsIPermissionManager, so we have
+ // to walk all permissions and check the type of each one.
+ PRBool hasMoreElements;
+ permEnumerator->HasMoreElements(&hasMoreElements);
+ while (hasMoreElements) {
+ nsCOMPtr curr;
+ permEnumerator->GetNext(getter_AddRefs(curr));
+ nsCOMPtr currPerm(do_QueryInterface(curr));
+ if (currPerm) {
+ nsCAutoString type;
+ currPerm->GetType(type);
+ if (type.Equals(typeCString)) {
+ CHPermission* perm = [CHPermission permissionWithGeckoPermission:currPerm.get()];
+ [permissions addObject:perm];
+ }
+ }
+ permEnumerator->HasMoreElements(&hasMoreElements);
+ }
+ return permissions;
+}
+
+- (void)removePermissionForHost:(NSString*)host type:(NSString*)type
+{
+ if (!mManager)
+ return;
+ mManager->Remove(nsDependentCString([host UTF8String]), [type UTF8String]);
+}
+
+- (void)removeAllPermissions
+{
+ if (!mManager)
+ return;
+ mManager->RemoveAll();
+}
+
+- (int)policyForHost:(NSString*)host type:(NSString*)type
+{
+ // Even though the permissons are host-based, the Gecko API requires an
+ // nsIURI, so we have to construct a dummy URI and look it up that way.
+ return [self policyForURI:[NSString stringWithFormat:@"http://%@", host] type:type];
+}
+
+- (int)policyForURI:(NSString*)uri type:(NSString*)type
+{
+ if (!mManager)
+ return CHPermissionUnknown;
+ nsCOMPtr geckoURI;
+ NS_NewURI(getter_AddRefs(geckoURI), [uri UTF8String]);
+ if (!geckoURI)
+ return CHPermissionUnknown;
+ PRUint32 policy;
+ mManager->TestPermission(geckoURI, [type UTF8String], &policy);
+ return policy;
+}
+
+- (void)setPolicy:(int)policy forHost:(NSString*)host type:(NSString*)type
+{
+ // Even though the permissons are host-based, the Gecko API requires an
+ // nsIURI, so we have to construct a dummy URI and look it up that way.
+ [self setPolicy:policy forURI:[NSString stringWithFormat:@"http://%@", host] type:type];
+}
+
+- (void)setPolicy:(int)policy forURI:(NSString*)uri type:(NSString*)type
+{
+ if (!mManager)
+ return;
+ nsCOMPtr geckoURI;
+ NS_NewURI(getter_AddRefs(geckoURI), [uri UTF8String]);
+ if (!geckoURI)
+ return;
+ mManager->Add(geckoURI, [type UTF8String], policy);
+}
+
+@end
diff --git a/mozilla/camino/src/extensions/ExtendedOutlineView.mm b/mozilla/camino/src/extensions/ExtendedOutlineView.mm
index 5ce853b125a..1b914b0042a 100644
--- a/mozilla/camino/src/extensions/ExtendedOutlineView.mm
+++ b/mozilla/camino/src/extensions/ExtendedOutlineView.mm
@@ -600,20 +600,6 @@ static NSString* const kAutosaveSortDirectionKey = @"sort_descending";
[super viewWillMoveToWindow:newWindow];
}
-// on jaguar, delegates of NSOutlineView don't receive outlineView:didClickTableColumn messages,
-// so we work around this by overriding an internal NSTableView method
-- (void)_sendDelegateDidClickColumn:(int)column
-{
- if ([self delegate] != nil && [[self delegate] respondsToSelector:@selector(outlineView:didClickTableColumn:)])
- {
- [[self delegate] outlineView:self didClickTableColumn:[[self tableColumns] objectAtIndex:column]];
- }
- else
- {
- [super _sendDelegateDidClickColumn:column];
- }
-}
-
/*
* Set up tooltip rects for every row, but only if the frame size or
* the number of rows changed since the last invocation.
diff --git a/mozilla/camino/src/extensions/NSDate+Utils.h b/mozilla/camino/src/extensions/NSDate+Utils.h
index d02ef19ee82..80794f93ab5 100644
--- a/mozilla/camino/src/extensions/NSDate+Utils.h
+++ b/mozilla/camino/src/extensions/NSDate+Utils.h
@@ -46,9 +46,3 @@
+ (id)dateWithPRTime:(PRTime)microseconds;
@end
-
-@interface NSCalendarDate(ChimeraCalendarDateUtils)
-
-- (NSString*)relativeDateDescription;
-
-@end
diff --git a/mozilla/camino/src/extensions/NSDate+Utils.m b/mozilla/camino/src/extensions/NSDate+Utils.m
index 1a816e01bd7..5bb323d2336 100644
--- a/mozilla/camino/src/extensions/NSDate+Utils.m
+++ b/mozilla/camino/src/extensions/NSDate+Utils.m
@@ -47,46 +47,3 @@
}
@end
-
-
-@implementation NSCalendarDate(ChimeraCalendarDateUtils)
-
-// XXX this sucks pretty badly, mostly because of cocoa.
-// Cocoa does not follow the system prefs for the preferred date format, so
-// we hardcode some formats for now. This should be improved.
-- (NSString*)relativeDateDescription
-{
- int todayDayOfEra = [[NSCalendarDate calendarDate] dayOfCommonEra];
- NSString* result;
-
- int myDayOfEra = [self dayOfCommonEra];
- if (myDayOfEra == todayDayOfEra)
- {
- NSString* dayString = NSLocalizedString(@"Today", @"");
- result = [dayString stringByAppendingString:[self descriptionWithCalendarFormat:@" %I:%M %p"]];
- }
- else if (myDayOfEra == (todayDayOfEra - 1))
- {
- NSString* dayString = NSLocalizedString(@"Yesterday", @"");
- result = [dayString stringByAppendingString:[self descriptionWithCalendarFormat:@" %I:%M %p"]];
- }
- else if (myDayOfEra == (todayDayOfEra + 1))
- {
- NSString* dayString = NSLocalizedString(@"Tomorrow", @"");
- result = [dayString stringByAppendingString:[self descriptionWithCalendarFormat:@" %I:%M %p"]];
- }
- else if (myDayOfEra >= (todayDayOfEra - 7))
- {
- // up to a week ago, show the time
- result = [self descriptionWithCalendarFormat:@"%a %b %d %Y %I:%M %p" locale:nil];
- }
- else
- {
- // older than a week, just show the date
- result = [self descriptionWithCalendarFormat:@"%b %d %Y %I:%M %p" locale:nil];
- }
-
- return result;
-}
-
-@end
diff --git a/mozilla/camino/src/extensions/NSPasteboard+Utils.mm b/mozilla/camino/src/extensions/NSPasteboard+Utils.mm
index 9a6755a1942..487758b713b 100644
--- a/mozilla/camino/src/extensions/NSPasteboard+Utils.mm
+++ b/mozilla/camino/src/extensions/NSPasteboard+Utils.mm
@@ -86,11 +86,11 @@ NSString* const kWebURLsWithTitlesPboardType = @"WebURLsWithTitlesPboardType";
unsigned int urlCount = [inUrls count];
// Best format that we know about is Safari's URL + title arrays - build these up
- NSMutableArray* tmpTitleArray = inTitles;
if (!inTitles) {
- tmpTitleArray = [NSMutableArray array];
+ NSMutableArray* tmpTitleArray = [NSMutableArray arrayWithCapacity:urlCount];
for (unsigned int i = 0; i < urlCount; ++i)
[tmpTitleArray addObject:@""];
+ inTitles = tmpTitleArray;
}
NSMutableArray* filePaths = [NSMutableArray array];
@@ -106,7 +106,7 @@ NSString* const kWebURLsWithTitlesPboardType = @"WebURLsWithTitlesPboardType";
NSMutableArray* clipboardData = [NSMutableArray array];
[clipboardData addObject:[NSArray arrayWithArray:inUrls]];
- [clipboardData addObject:tmpTitleArray];
+ [clipboardData addObject:inTitles];
[self setPropertyList:clipboardData forType:kWebURLsWithTitlesPboardType];
diff --git a/mozilla/camino/src/extensions/NSString+Utils.mm b/mozilla/camino/src/extensions/NSString+Utils.mm
index f97acb3e6c8..c55b9d2afce 100644
--- a/mozilla/camino/src/extensions/NSString+Utils.mm
+++ b/mozilla/camino/src/extensions/NSString+Utils.mm
@@ -323,7 +323,7 @@
// Essentially, we perform a binary search on the string length
// which fits best into maxWidth.
- float width;
+ float width = maxWidth;
int lo = 0;
int hi = [self length];
int mid;
diff --git a/mozilla/camino/src/extensions/RolloverImageButton.m b/mozilla/camino/src/extensions/RolloverImageButton.m
index a55f836ac57..61b2f1004f8 100644
--- a/mozilla/camino/src/extensions/RolloverImageButton.m
+++ b/mozilla/camino/src/extensions/RolloverImageButton.m
@@ -237,6 +237,7 @@
if (mTrackingTag != -1) {
[self removeTrackingRect:mTrackingTag];
mTrackingTag = -1;
+ [self updateImage:NO];
}
}
diff --git a/mozilla/camino/src/find/FindDlgController.mm b/mozilla/camino/src/find/FindDlgController.mm
index af7e3121ca1..bc74c824ea5 100644
--- a/mozilla/camino/src/find/FindDlgController.mm
+++ b/mozilla/camino/src/find/FindDlgController.mm
@@ -43,7 +43,7 @@
- (void)loadNewFindStringFromPasteboard;
- (void)putFindStringOnPasteboard;
-- (NSString*)getSearchText:(BOOL*)outIsNew;
+- (NSString*)getSearchText;
- (BOOL)find:(BOOL)searchBack;
@end
@@ -86,7 +86,7 @@
{
NSWindowController* controller = [[NSApp mainWindow] windowController];
if ( [controller conformsToProtocol:@protocol(Find)] ) {
- id browserController = controller;
+ id browserController = (id)controller;
BOOL ignoreCase = [mIgnoreCaseBox state];
BOOL wrapSearch = [mWrapAroundBox state];
return [browserController findInPageWithPattern:[mSearchField stringValue] caseSensitive:!ignoreCase wrap:wrapSearch backwards:searchBack];
diff --git a/mozilla/camino/src/formfill/KeychainService.h b/mozilla/camino/src/formfill/KeychainService.h
index fe1ae33cb2f..3c3b4381881 100644
--- a/mozilla/camino/src/formfill/KeychainService.h
+++ b/mozilla/camino/src/formfill/KeychainService.h
@@ -64,7 +64,10 @@ enum KeychainPromptResult { kSave, kDontRemember, kNeverRemember } ;
BOOL mFormPasswordFillIsEnabled;
- NSMutableDictionary* mAllowedActionHosts; // strong;
+ NSMutableDictionary* mAllowedActionHosts; // strong
+
+ NSMutableDictionary* mCachedKeychainItems; // strong
+ NSMutableDictionary* mKeychainCacheTimers; // strong
nsIObserver* mFormSubmitObserver;
}
@@ -94,9 +97,7 @@ enum KeychainPromptResult { kSave, kDontRemember, kNeverRemember } ;
isForm:(BOOL)isForm;
- (KeychainItem*)updateKeychainEntry:(KeychainItem*)keychainItem
withUsername:(NSString*)username
- password:(NSString*)password
- scheme:(NSString*)scheme
- isForm:(BOOL)isForm;
+ password:(NSString*)password;
- (void)removeAllUsernamesAndPasswords;
- (void)addListenerToView:(CHBrowserView*)view;
@@ -111,6 +112,11 @@ enum KeychainPromptResult { kSave, kDontRemember, kNeverRemember } ;
- (void)setAllowedActionHosts:(NSArray*)actionHosts forHost:(NSString*)host;
- (NSArray*)allowedActionHostsForHost:(NSString*)host;
+// Methods to interact with the temporary keychain item cache.
+- (KeychainItem*)cachedKeychainEntryForKey:(NSString*)key;
+- (void)cacheKeychainEntry:(KeychainItem*)keychainItem forKey:(NSString*)key;
+- (void)expirationTimerFired:(NSTimer*)theTimer;
+
@end
@@ -151,7 +157,7 @@ protected:
void PreFill(const PRUnichar *, PRUnichar **, PRUnichar **);
void ProcessPrompt(const PRUnichar *, bool, PRUnichar *, PRUnichar *);
- static void ExtractRealmComponents(const PRUnichar* inRealmBlob, NSString** outHost, NSString** outRealm, PRInt32* outPort);
+ static void ExtractRealmComponents(NSString* inRealmBlob, NSString** outHost, NSString** outRealm, PRInt32* outPort);
nsCOMPtr mPrompt;
};
diff --git a/mozilla/camino/src/formfill/KeychainService.mm b/mozilla/camino/src/formfill/KeychainService.mm
index f95c6437ea7..2c4477f3165 100644
--- a/mozilla/camino/src/formfill/KeychainService.mm
+++ b/mozilla/camino/src/formfill/KeychainService.mm
@@ -74,14 +74,17 @@
#include "nsAppDirectoryServiceDefs.h"
#ifdef __LITTLE_ENDIAN__
-const PRUint32 kSecAuthenticationTypeHTTPDigestReversed = 'httd';
+static const PRUint32 kSecAuthenticationTypeHTTPDigestReversed = 'httd';
#else
-const PRUint32 kSecAuthenticationTypeHTTPDigestReversed = 'dtth';
+static const PRUint32 kSecAuthenticationTypeHTTPDigestReversed = 'dtth';
#endif
-const OSType kCaminoKeychainCreatorCode = 'CMOZ';
+static const OSType kCaminoKeychainCreatorCode = 'CMOZ';
-const int kDefaultHTTPSPort = 443;
+static const int kDefaultHTTPSPort = 443;
+
+// Number of seconds to keep a keychain item cached
+static const int kCacheTimeout = 120;
// from CHBrowserService.h
extern NSString* const XPCOMShutDownNotificationName;
@@ -163,6 +166,9 @@ int KeychainPrefChangedCallback(const char* inPref, void* unused)
if (!mAllowedActionHosts)
mAllowedActionHosts = [[NSMutableDictionary alloc] init];
+ mCachedKeychainItems = [[NSMutableDictionary alloc] init];
+ mKeychainCacheTimers = [[NSMutableDictionary alloc] init];
+
// load the keychain.nib file with our dialogs in it
BOOL success = [NSBundle loadNibNamed:@"Keychain" owner:self];
NS_ASSERTION(success, "can't load keychain prompt dialogs");
@@ -177,6 +183,8 @@ int KeychainPrefChangedCallback(const char* inPref, void* unused)
[[NSNotificationCenter defaultCenter] removeObserver:self];
[mAllowedActionHosts release];
+ [mCachedKeychainItems release];
+ [mKeychainCacheTimers release];
[super dealloc];
}
@@ -345,17 +353,7 @@ int KeychainPrefChangedCallback(const char* inPref, void* unused)
- (KeychainItem*)updateKeychainEntry:(KeychainItem*)keychainItem
withUsername:(NSString*)username
password:(NSString*)password
- scheme:(NSString*)scheme
- isForm:(BOOL)isForm
{
- // If this is one of our old items, upgrade it to the new format. We do this here instead of when
- // we first find the item so that users trying out 1.1 previews won't be missing the passwords of
- // all the sites they visit if/when they go back to 1.0.x, as well as to prevent passwords from accidentally
- // being associated with the wrong type (e.g., if a user has a password stored for a site's web form,
- // but hits the http auth dialog first).
- if ([keychainItem authenticationType] == kSecAuthenticationTypeHTTPDigest)
- [self upgradeLegacyKeychainEntry:keychainItem withScheme:scheme isForm:isForm];
-
if ([username isEqualToString:[keychainItem username]] || [keychainItem creator] == kCaminoKeychainCreatorCode) {
[keychainItem setUsername:username password:password];
}
@@ -522,6 +520,47 @@ int KeychainPrefChangedCallback(const char* inPref, void* unused)
return [profilePath stringByAppendingPathComponent:@"AllowedActionHosts.plist"];
}
+// To prevent two lookups for every keychain use (once to fill, and another to
+// compare against on submit), we cache each keychain entry for a little while.
+// This ensures that we update the same entry we filled with, as well as
+// preventing multiple auth dialogs if the user chooses "allow once" the first
+// time.
+//
+// Call with |nil| for |keychainItem| to clear a cached entry.
+- (void)cacheKeychainEntry:(KeychainItem*)keychainItem forKey:(NSString*)key {
+ if (!key)
+ return;
+
+ if (keychainItem) {
+ // If there was already an invalidation timer running for a previously
+ // cached keychain entry for this host, invalidate it so that the new
+ // cached entry will last the full duration.
+ [[mKeychainCacheTimers objectForKey:key] invalidate];
+ [mCachedKeychainItems setObject:keychainItem forKey:key];
+ NSTimer* invalidationTimer = [NSTimer scheduledTimerWithTimeInterval:kCacheTimeout
+ target:self
+ selector:@selector(expirationTimerFired:)
+ userInfo:(id)key
+ repeats:NO];
+ [mKeychainCacheTimers setObject:invalidationTimer forKey:key];
+ }
+ else {
+ [[mKeychainCacheTimers objectForKey:key] invalidate];
+ [mKeychainCacheTimers removeObjectForKey:key];
+ [mCachedKeychainItems removeObjectForKey:key];
+ }
+}
+
+- (KeychainItem*)cachedKeychainEntryForKey:(NSString*)key {
+ return [[[mCachedKeychainItems objectForKey:key] retain] autorelease];
+}
+
+- (void)expirationTimerFired:(NSTimer*)theTimer {
+ // Ensure that the key will survive past the timer invalidation
+ NSString* key = [[[theTimer userInfo] retain] autorelease];
+ [self cacheKeychainEntry:nil forKey:key];
+}
+
@end
@@ -640,52 +679,50 @@ KeychainPrompt::~KeychainPrompt()
// netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp).
//
void
-KeychainPrompt::ExtractRealmComponents(const PRUnichar* inRealmBlob, NSString** outHost, NSString** outRealm, PRInt32* outPort)
+KeychainPrompt::ExtractRealmComponents(NSString* inRealmBlob, NSString** outHost, NSString** outRealm, PRInt32* outPort)
{
if (!outHost || !outPort)
return;
*outHost = nil;
*outRealm = nil;
*outPort = -1;
-
- NSString* realmStr = [NSString stringWithPRUnichars:inRealmBlob];
// first check for an ftp url and pull out the server from the realm
- if ([realmStr rangeOfString:@"ftp://"].location != NSNotFound) {
+ if ([inRealmBlob rangeOfString:@"ftp://"].location != NSNotFound) {
// cut out ftp://
- realmStr = [realmStr substringFromIndex:strlen("ftp://")];
+ inRealmBlob = [inRealmBlob substringFromIndex:strlen("ftp://")];
// cut out any of the path
- NSRange pathDelimeter = [realmStr rangeOfString:@"/"];
+ NSRange pathDelimeter = [inRealmBlob rangeOfString:@"/"];
if (pathDelimeter.location != NSNotFound)
- realmStr = [realmStr substringToIndex:(pathDelimeter.location - 1)];
+ inRealmBlob = [inRealmBlob substringToIndex:(pathDelimeter.location - 1)];
// now we're left with "username@server" with username being optional
- NSRange usernameMarker = [realmStr rangeOfString:@"@"];
+ NSRange usernameMarker = [inRealmBlob rangeOfString:@"@"];
if (usernameMarker.location != NSNotFound)
- *outHost = [realmStr substringFromIndex:(usernameMarker.location + 1)];
+ *outHost = [inRealmBlob substringFromIndex:(usernameMarker.location + 1)];
else
- *outHost = realmStr;
+ *outHost = inRealmBlob;
}
else { // it's an http realm
// pull off the " (realm)" part
- NSRange openParen = [realmStr rangeOfString:@"("];
+ NSRange openParen = [inRealmBlob rangeOfString:@"("];
if (openParen.location != NSNotFound) {
- NSRange closeParen = [realmStr rangeOfString:@")"];
+ NSRange closeParen = [inRealmBlob rangeOfString:@")"];
if (closeParen.location != NSNotFound) {
NSRange realmRange = NSMakeRange(openParen.location + 1, closeParen.location - openParen.location - 1);
- *outRealm = [realmStr substringWithRange:realmRange];
+ *outRealm = [inRealmBlob substringWithRange:realmRange];
}
- realmStr = [realmStr substringToIndex:openParen.location - 1];
+ inRealmBlob = [inRealmBlob substringToIndex:openParen.location - 1];
}
// separate the host and the port
- NSRange endOfHost = [realmStr rangeOfString:@":"];
+ NSRange endOfHost = [inRealmBlob rangeOfString:@":"];
if (endOfHost.location == NSNotFound)
- *outHost = realmStr;
+ *outHost = inRealmBlob;
else {
- *outHost = [realmStr substringToIndex:endOfHost.location];
- *outPort = [[realmStr substringFromIndex:(endOfHost.location + 1)] intValue];
+ *outHost = [inRealmBlob substringToIndex:endOfHost.location];
+ *outPort = [[inRealmBlob substringFromIndex:(endOfHost.location + 1)] intValue];
}
}
}
@@ -696,15 +733,21 @@ KeychainPrompt::PreFill(const PRUnichar *realmBlob, PRUnichar **user, PRUnichar
NSString* host = nil;
NSString* realm = nil;
PRInt32 port = -1;
- ExtractRealmComponents(realmBlob, &host, &realm, &port);
+ NSString* realmBlobString = [NSString stringWithPRUnichars:realmBlob];
+ ExtractRealmComponents(realmBlobString, &host, &realm, &port);
// Pre-fill user/password if found in the keychain.
// We don't get scheme information from gecko, so guess based on the port
NSString* scheme = (port == kDefaultHTTPSPort) ? @"https" : @"http";
KeychainService* keychain = [KeychainService instance];
- KeychainItem* entry = [keychain findKeychainEntryForHost:host port:port scheme:scheme securityDomain:realm isForm:NO];
+ KeychainItem* entry = [keychain findKeychainEntryForHost:host
+ port:port
+ scheme:scheme
+ securityDomain:realm
+ isForm:NO];
if (entry) {
+ [keychain cacheKeychainEntry:entry forKey:realmBlobString];
if (user)
*user = [[entry username] createNewUnicodeBuffer];
if (pwd)
@@ -718,7 +761,8 @@ KeychainPrompt::ProcessPrompt(const PRUnichar* realmBlob, bool checked, PRUnicha
NSString* host = nil;
NSString* realm = nil;
PRInt32 port = -1;
- ExtractRealmComponents(realmBlob, &host, &realm, &port);
+ NSString* realmBlobString = [NSString stringWithPRUnichars:realmBlob];
+ ExtractRealmComponents(realmBlobString, &host, &realm, &port);
NSString* username = [NSString stringWithPRUnichars:user];
NSString* password = [NSString stringWithPRUnichars:pwd];
@@ -726,21 +770,45 @@ KeychainPrompt::ProcessPrompt(const PRUnichar* realmBlob, bool checked, PRUnicha
// We don't get scheme information from gecko, so guess based on the port
NSString* scheme = (port == kDefaultHTTPSPort) ? @"https" : @"http";
+ // Check the cache first, then fall back to a search in case a cached
+ // entry expired before the user submitted.
KeychainService* keychain = [KeychainService instance];
- KeychainItem* keychainEntry = [keychain findKeychainEntryForHost:host port:port scheme:scheme securityDomain:realm isForm:NO];
+ KeychainItem* keychainEntry = [keychain cachedKeychainEntryForKey:realmBlobString];
+ if (!keychainEntry) {
+ keychainEntry = [keychain findKeychainEntryForHost:host
+ port:port
+ scheme:scheme
+ securityDomain:realm
+ isForm:NO];
+ }
// Update, store or remove the user/password depending on the user
// choice and whether or not we found the username/password in the
// keychain.
if (checked) {
if (!keychainEntry) {
- [keychain storeUsername:username password:password forHost:host securityDomain:realm port:port scheme:scheme isForm:NO];
+ [keychain storeUsername:username
+ password:password
+ forHost:host
+ securityDomain:realm
+ port:port
+ scheme:scheme
+ isForm:NO];
}
else {
+ // If it's an old-style entry, upgrade it now that we know what it goes with.
+ if ([keychainEntry authenticationType] == kSecAuthenticationTypeHTTPDigest)
+ [keychain upgradeLegacyKeychainEntry:keychainEntry withScheme:scheme isForm:NO];
+
if (![[keychainEntry username] isEqualToString:username] ||
![[keychainEntry password] isEqualToString:password])
- keychainEntry = [keychain updateKeychainEntry:keychainEntry withUsername:username password:password scheme:scheme isForm:NO];
- // TODO: this is just to upgrade pre-1.1 HTTPAuth items; at some point in the future remove from here...
+ {
+ keychainEntry = [keychain updateKeychainEntry:keychainEntry
+ withUsername:username
+ password:password];
+ }
+ // TODO: this is just to upgrade pre-1.1 HTTPAuth items; at some point in
+ // the future remove from here...
if (realm && [[keychainEntry securityDomain] isEqualToString:@""])
[keychainEntry setSecurityDomain:realm];
// ... to here.
@@ -749,6 +817,8 @@ KeychainPrompt::ProcessPrompt(const PRUnichar* realmBlob, bool checked, PRUnicha
else if (keychainEntry) {
[keychainEntry removeFromKeychain];
}
+ // We are done with the entry, so remove it from the cache.
+ [keychain cacheKeychainEntry:nil forKey:realmBlobString];
}
//
@@ -889,6 +959,9 @@ KeychainFormSubmitObserver::Notify(nsIContent* node, nsIDOMWindowInternal* windo
nsIURI* docURL = doc->GetDocumentURI();
if (!docURL)
return NS_OK;
+ nsCAutoString uriCAString;
+ rv = docURL->GetSpec(uriCAString);
+ NSString* uri = [NSString stringWithCString:uriCAString.get()];
nsCAutoString hostCAString;
docURL->GetHost(hostCAString);
@@ -911,32 +984,57 @@ KeychainFormSubmitObserver::Notify(nsIContent* node, nsIDOMWindowInternal* windo
if (!actionHost)
actionHost = host;
- //
+ // Check the cache first, then fall back to a search in case a cached
+ // entry expired before the user submitted.
+ KeychainItem* keychainEntry = [keychain cachedKeychainEntryForKey:uri];
+ if (!keychainEntry) {
+ keychainEntry = [keychain findKeychainEntryForHost:host
+ port:port
+ scheme:scheme
+ securityDomain:nil
+ isForm:YES];
+ }
// If there's already an entry in the keychain, check if the username
// and password match. If not, ask the user what they want to do and replace
// it as necessary. If there's no entry, ask if they want to remember it
// and then put it into the keychain
- //
- KeychainItem* keychainEntry = [keychain findKeychainEntryForHost:host port:port scheme:scheme securityDomain:nil isForm:YES];
if (keychainEntry) {
+ // If it's an old-style entry, upgrade it now that we know what it goes with.
+ if ([keychainEntry authenticationType] == kSecAuthenticationTypeHTTPDigest)
+ [keychain upgradeLegacyKeychainEntry:keychainEntry withScheme:scheme isForm:YES];
+
if ((![[keychainEntry username] isEqualToString:username] ||
![[keychainEntry password] isEqualToString:password]) &&
[keychain confirmChangePassword:GetNSWindow(window)])
- keychainEntry = [keychain updateKeychainEntry:keychainEntry withUsername:username password:password scheme:scheme isForm:YES];
- // This is just to fix items touched in the pre-1.1 nightlies, before we discovered that using securityDomain
- // for the action hosts broke Safari. At some point in the future remove from here...
+ {
+ keychainEntry = [keychain updateKeychainEntry:keychainEntry
+ withUsername:username
+ password:password];
+ }
+ // This is just to fix items touched in the pre-1.1 nightlies, before we
+ // discovered that using securityDomain for the action hosts broke Safari.
+ // At some point in the future remove from here...
if (![[keychainEntry securityDomain] isEqualToString:@""]) {
- [keychain setAllowedActionHosts:[[keychainEntry securityDomain] componentsSeparatedByString:@";"] forHost:host];
+ [keychain setAllowedActionHosts:[[keychainEntry securityDomain] componentsSeparatedByString:@";"]
+ forHost:host];
[keychainEntry setSecurityDomain:@""];
}
// ... to here.
if ([[keychain allowedActionHostsForHost:host] count] == 0)
[keychain setAllowedActionHosts:[NSArray arrayWithObject:actionHost] forHost:host];
+ // We are done with the entry, so remove it from the cache.
+ [keychain cacheKeychainEntry:nil forKey:uri];
}
else {
switch ([keychain confirmStorePassword:GetNSWindow(window)]) {
case kSave:
- [keychain storeUsername:username password:password forHost:host securityDomain:actionHost port:port scheme:scheme isForm:YES];
+ [keychain storeUsername:username
+ password:password
+ forHost:host
+ securityDomain:actionHost
+ port:port
+ scheme:scheme
+ isForm:YES];
break;
case kNeverRemember:
@@ -992,6 +1090,10 @@ KeychainFormSubmitObserver::Notify(nsIContent* node, nsIDOMWindowInternal* windo
return;
}
+ nsIURI* docURL = doc->GetDocumentURI();
+ if (!docURL)
+ return;
+
nsCOMPtr htmldoc(do_QueryInterface(doc));
if (!htmldoc)
return;
@@ -1001,17 +1103,19 @@ KeychainFormSubmitObserver::Notify(nsIContent* node, nsIDOMWindowInternal* windo
if (NS_FAILED(rv) || !forms)
return;
+ NSString* uri = nil;
+ NSString* host = nil;
+ KeychainItem* keychainEntry = nil;
BOOL silentlyDenySuspiciousForms = NO;
- PRUint32 numForms;
- forms->GetLength(&numForms);
//
// Seek out username and password element in all forms. If found in
// a form, check the keychain to see if the username password are
// stored and prefill the elements.
//
+ PRUint32 numForms;
+ forms->GetLength(&numForms);
for (PRUint32 formX = 0; formX < numForms; formX++) {
-
nsCOMPtr formNode;
rv = forms->Item(formX, getter_AddRefs(formNode));
if (NS_FAILED(rv) || formNode == nsnull)
@@ -1025,68 +1129,77 @@ KeychainFormSubmitObserver::Notify(nsIContent* node, nsIDOMWindowInternal* windo
rv = FindUsernamePasswordFields(formElement, getter_AddRefs(usernameElement), getter_AddRefs(passwordElement),
PR_TRUE);
- if (NS_SUCCEEDED(rv) && usernameElement && passwordElement) {
- //
- // We found the text field and password field. Check if there's
- // a username/password stored in the keychain for this host and
- // pre-fill the fields if that's the case.
- //
- nsIURI* docURL = doc->GetDocumentURI();
- if (!docURL)
- return;
+ if (!(NS_SUCCEEDED(rv) && usernameElement && passwordElement))
+ continue;
+ // We found a login form; if it's the first one we've seen, check the
+ // keychain for a saved password.
+ if (!keychainEntry) {
nsCAutoString hostCAString;
docURL->GetHost(hostCAString);
- NSString *host = [NSString stringWithCString:hostCAString.get()];
+ host = [NSString stringWithCString:hostCAString.get()];
nsCAutoString schemeCAString;
docURL->GetScheme(schemeCAString);
- NSString *scheme = [NSString stringWithCString:schemeCAString.get()];
+ NSString* scheme = [NSString stringWithCString:schemeCAString.get()];
PRInt32 port = -1;
docURL->GetPort(&port);
- KeychainItem* keychainEntry = [keychain findKeychainEntryForHost:host port:port scheme:scheme securityDomain:nil isForm:YES];
- if (keychainEntry) {
- // To help prevent password stealing on sites that allow user-created HTML (but not JS),
- // only fill if the form's action host is one that has been authorized by the user.
- // If the keychain entry doesn't have any authorized hosts, either because it pre-dates
- // this code or because it's a non-Camino entry, fill any form.
- nsAutoString action;
- formElement->GetAction(action);
- NSString* actionHost = [[NSURL URLWithString:[NSString stringWith_nsAString:action]] host];
- if (!actionHost)
- actionHost = host;
- NSArray* allowedActionHosts = [keychain allowedActionHostsForHost:host];
- if ([allowedActionHosts count] > 0 && ![allowedActionHosts containsObject:actionHost]) {
- // The form has an un-authorized action domain. If we haven't
- // asked the user about this page, ask. If we have and they said
- // no, don't ask (to prevent a malicious page from throwing
- // dialogs until the user tries the other button).
- if (silentlyDenySuspiciousForms)
- continue;
- if (![keychain confirmFillPassword:GetNSWindow(inDOMWindow)]) {
- silentlyDenySuspiciousForms = YES;
- continue;
- }
- // Remember the approval
- [keychain setAllowedActionHosts:[allowedActionHosts arrayByAddingObject:actionHost] forHost:host];
- }
-
- nsAutoString user, pwd;
- [[keychainEntry username] assignTo_nsAString:user];
- [[keychainEntry password] assignTo_nsAString:pwd];
-
- // if the server specifies a value attribute (bug 169760), only autofill
- // the password if what we have in keychain matches what the server supplies,
- // otherwise don't. Don't bother checking the password field for a value; i can't
- // imagine the server ever prefilling a password
- nsAutoString userValue;
- usernameElement->GetAttribute(NS_LITERAL_STRING("value"), userValue);
- if (!userValue.Length() || userValue.Equals(user, nsCaseInsensitiveStringComparator())) {
- rv = usernameElement->SetValue(user);
- rv = passwordElement->SetValue(pwd);
- }
- }
+ keychainEntry = [keychain findKeychainEntryForHost:host
+ port:port
+ scheme:scheme
+ securityDomain:nil
+ isForm:YES];
}
+ // If we don't have a password for the page, don't bother looking for
+ // more forms.
+ if (!keychainEntry)
+ break;
+
+ // To help prevent password stealing on sites that allow user-created HTML (but not JS),
+ // only fill if the form's action host is one that has been authorized by the user.
+ // If the site doesn't have any authorized hosts, either because it pre-dates
+ // this code or because it's a non-Camino entry we haven't used before, fill any form.
+ nsAutoString action;
+ formElement->GetAction(action);
+ NSString* actionHost = [[NSURL URLWithString:[NSString stringWith_nsAString:action]] host];
+ if (!actionHost)
+ actionHost = host;
+ NSArray* allowedActionHosts = [keychain allowedActionHostsForHost:host];
+ if ([allowedActionHosts count] > 0 && ![allowedActionHosts containsObject:actionHost]) {
+ // The form has an un-authorized action domain. If we haven't
+ // asked the user about this page, ask. If we have and they said
+ // no, don't ask (to prevent a malicious page from throwing
+ // dialogs until the user tries the other button).
+ if (silentlyDenySuspiciousForms)
+ continue;
+ if (![keychain confirmFillPassword:GetNSWindow(inDOMWindow)]) {
+ silentlyDenySuspiciousForms = YES;
+ continue;
+ }
+ // Remember the approval
+ [keychain setAllowedActionHosts:[allowedActionHosts arrayByAddingObject:actionHost] forHost:host];
+ }
+
+ nsAutoString user, pwd;
+ [[keychainEntry username] assignTo_nsAString:user];
+ [[keychainEntry password] assignTo_nsAString:pwd];
+
+ // If the server specifies a value attribute, only autofill the password if
+ // what we have in keychain matches what the server supplies (bug 169760).
+ nsAutoString userValue;
+ usernameElement->GetAttribute(NS_LITERAL_STRING("value"), userValue);
+ if (!userValue.Length() || userValue.Equals(user, nsCaseInsensitiveStringComparator())) {
+ rv = usernameElement->SetValue(user);
+ rv = passwordElement->SetValue(pwd);
+ }
+
+ // Now that we have actually filled the password, cache the keychain entry.
+ if (!uri) {
+ nsCAutoString uriCAString;
+ rv = docURL->GetSpec(uriCAString);
+ uri = [NSString stringWithCString:uriCAString.get()];
+ }
+ [keychain cacheKeychainEntry:keychainEntry forKey:uri];
} // for each form on page
// recursively check sub-frames and iframes
@@ -1248,6 +1361,11 @@ FindUsernamePasswordFields(nsIDOMHTMLFormElement* inFormElement, nsIDOMHTMLInput
if (NS_FAILED(rv))
continue;
+ PRBool isDisabled = PR_FALSE;
+ rv = inputElement->HasAttribute(NS_LITERAL_STRING("disabled"), &isDisabled);
+ if (NS_FAILED(rv) || isDisabled)
+ continue;
+
bool isText = (type.IsEmpty() || type.Equals(NS_LITERAL_STRING("text"), nsCaseInsensitiveStringComparator()));
bool isPassword = type.Equals(NS_LITERAL_STRING("password"), nsCaseInsensitiveStringComparator());
inputElement->GetAttribute(NS_LITERAL_STRING("autocomplete"), autocomplete);
diff --git a/mozilla/camino/src/history/HistoryDataSource.mm b/mozilla/camino/src/history/HistoryDataSource.mm
index 2176b58a826..3092f97601f 100644
--- a/mozilla/camino/src/history/HistoryDataSource.mm
+++ b/mozilla/camino/src/history/HistoryDataSource.mm
@@ -39,7 +39,6 @@
#import "NSString+Utils.h"
#import "NSPasteboard+Utils.h"
-#import "NSDate+Utils.h"
#import "BrowserWindowController.h"
#import "HistoryDataSource.h"
@@ -161,7 +160,6 @@ static int HistoryItemSort(id firstItem, id secondItem, void* context)
- (NSArray*)historyItems;
- (HistorySiteItem*)itemWithIdentifier:(NSString*)identifier;
-- (NSString*)relativeDataStringForDate:(NSDate*)date;
- (void)siteIconLoaded:(NSNotification*)inNotification;
- (void)checkForNewDay;
@@ -973,12 +971,6 @@ NS_IMPL_ISUPPORTS1(nsHistoryObserver, nsIHistoryObserver);
return [mHistoryItemsDictionary objectForKey:identifier];
}
-- (NSString*)relativeDataStringForDate:(NSDate*)date
-{
- NSCalendarDate* calendarDate = [date dateWithCalendarFormat:nil timeZone:nil];
- return [calendarDate relativeDateDescription];
-}
-
- (void)siteIconLoaded:(NSNotification*)inNotification
{
HistoryItem* theItem = [inNotification object];
@@ -1104,7 +1096,7 @@ NS_IMPL_ISUPPORTS1(nsHistoryObserver, nsIHistoryObserver);
return [item isKindOfClass:[HistoryCategoryItem class]];
}
-// identifiers: title url description keyword
+// identifiers: title url last_visit first_visit
- (id)outlineView:(NSOutlineView*)outlineView objectValueForTableColumn:(NSTableColumn*)aTableColumn byItem:(id)item
{
if ([[aTableColumn identifier] isEqualToString:@"title"])
@@ -1116,10 +1108,10 @@ NS_IMPL_ISUPPORTS1(nsHistoryObserver, nsIHistoryObserver);
return [item url];
if ([[aTableColumn identifier] isEqualToString:@"last_visit"])
- return [self relativeDataStringForDate:[item lastVisit]];
+ return [item lastVisit];
if ([[aTableColumn identifier] isEqualToString:@"first_visit"])
- return [self relativeDataStringForDate:[item firstVisit]];
+ return [item firstVisit];
}
if ([item isKindOfClass:[HistoryCategoryItem class]])
@@ -1128,7 +1120,7 @@ NS_IMPL_ISUPPORTS1(nsHistoryObserver, nsIHistoryObserver);
return [BookmarkViewController greyStringWithItemCount:[item numberOfChildren]];
}
- return @"";
+ return nil;
// TODO truncate string
// - (void)truncateToWidth:(float)maxWidth at:kTruncateAtMiddle withAttributes:(NSDictionary *)attributes
diff --git a/mozilla/camino/src/history/HistoryOutlineViewDelegate.mm b/mozilla/camino/src/history/HistoryOutlineViewDelegate.mm
index 416177714ca..72242282d76 100644
--- a/mozilla/camino/src/history/HistoryOutlineViewDelegate.mm
+++ b/mozilla/camino/src/history/HistoryOutlineViewDelegate.mm
@@ -71,6 +71,15 @@ enum
static NSString* const kExpandedHistoryStatesDefaultsKey = @"history_expand_state";
+// Custom formatter for relative date formatting
+@interface RelativeDateFormatter : NSDateFormatter
+{
+ CFDateFormatterRef mTimeFormatter; // strong
+ CFDateFormatterRef mDateTimeFormatter; // strong
+ NSDateFormatter* mWeekdayFormatter; // strong
+}
+@end
+
@interface HistoryOutlineViewDelegate(Private)
- (void)historyChanged:(NSNotification *)notification;
@@ -117,6 +126,11 @@ static NSString* const kExpandedHistoryStatesDefaultsKey = @"history_expand_stat
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(historyChanged:)
name:kNotificationNameHistoryDataSourceChanged object:[self historyDataSource]];
+
+ // Set up the date column formatting
+ RelativeDateFormatter* dateFormatter = [[[RelativeDateFormatter alloc] init] autorelease];
+ [[[mHistoryOutlineView tableColumnWithIdentifier:@"first_visit"] dataCell] setFormatter:dateFormatter];
+ [[[mHistoryOutlineView tableColumnWithIdentifier:@"last_visit"] dataCell] setFormatter:dateFormatter];
}
- (void)setBrowserWindowController:(BrowserWindowController*)bwController
@@ -719,3 +733,87 @@ static NSString* const kExpandedHistoryStatesDefaultsKey = @"history_expand_stat
}
@end
+
+#pragma mark -
+
+// TODO: Once we are 10.4+ the CFDateFormatters can be replaced with
+// NSDateFormatters using NSDateFormatterBehavior10_4 behavior.
+@implementation RelativeDateFormatter
+
+- (id)init
+{
+ if ((self = [super init])) {
+ CFLocaleRef userLocale = CFLocaleCopyCurrent();
+ if (userLocale) {
+ mTimeFormatter = CFDateFormatterCreate(NULL,
+ userLocale,
+ kCFDateFormatterNoStyle,
+ kCFDateFormatterShortStyle);
+ mDateTimeFormatter = CFDateFormatterCreate(NULL,
+ userLocale,
+ kCFDateFormatterMediumStyle,
+ kCFDateFormatterShortStyle);
+ mWeekdayFormatter = [[NSDateFormatter alloc] initWithDateFormat:@"%a"
+ allowNaturalLanguage:NO];
+ CFRelease(userLocale);
+ }
+ }
+ return self;
+}
+
+- (void)dealloc
+{
+ if (mTimeFormatter)
+ CFRelease(mTimeFormatter);
+ if (mDateTimeFormatter)
+ CFRelease(mDateTimeFormatter);
+ [mWeekdayFormatter release];
+ [super dealloc];
+}
+
+- (NSString*)stringForObjectValue:(id)anObject
+{
+ if (!anObject)
+ return @"";
+
+ if (mTimeFormatter && mDateTimeFormatter) {
+ int day = [[anObject dateWithCalendarFormat:nil timeZone:nil] dayOfCommonEra];
+ int today = [[NSCalendarDate calendarDate] dayOfCommonEra];
+
+ NSString* dayPrefix = nil;
+ CFDateFormatterRef dateFormatter;
+ if (day == today) {
+ dayPrefix = NSLocalizedString(@"Today", nil);
+ dateFormatter = mTimeFormatter;
+ }
+ else if (day == (today - 1)) {
+ dayPrefix = NSLocalizedString(@"Yesterday", nil);
+ dateFormatter = mTimeFormatter;
+ }
+ else if (day == (today + 1)) {
+ dayPrefix = NSLocalizedString(@"Tomorrow", nil);
+ dateFormatter = mTimeFormatter;
+ }
+ else if (day > (today - 7)) {
+ // show the shortened weekday for recent dates
+ dayPrefix = [mWeekdayFormatter stringForObjectValue:anObject];
+ dateFormatter = mDateTimeFormatter;
+ }
+ else {
+ dateFormatter = mDateTimeFormatter;
+ }
+
+ NSString* result = [(NSString*)CFDateFormatterCreateStringWithDate(NULL,
+ dateFormatter,
+ (CFDateRef)anObject) autorelease];
+ if (dayPrefix)
+ result = [NSString stringWithFormat:@"%@ %@", dayPrefix, result];
+
+ return result;
+ }
+
+ // If all else fails, fall back on the standard date formatter
+ return [super stringForObjectValue:anObject];
+}
+
+@end
diff --git a/mozilla/camino/src/preferences/PreferenceManager.h b/mozilla/camino/src/preferences/PreferenceManager.h
index 8ede9c67284..5b4f7222668 100644
--- a/mozilla/camino/src/preferences/PreferenceManager.h
+++ b/mozilla/camino/src/preferences/PreferenceManager.h
@@ -82,8 +82,10 @@ extern NSString* const kPrefChangedPrefNameUserInfoKey; // NSString
- (void)clearPref:(const char*)prefName;
-// the path to the user profile's root folder, used by camino 0.8+
+// the path to the user profile's root folder
- (NSString*)profilePath;
+// the path to Camino's cache root folder
+- (NSString*)cacheParentDirPath;
// turn notifications on and off when the given pref changes.
// if not nil, inObject is used at the 'object' of the resulting notification.
diff --git a/mozilla/caps/src/nsPrincipal.cpp b/mozilla/caps/src/nsPrincipal.cpp
index 39c703b437b..f76a4537e49 100755
--- a/mozilla/caps/src/nsPrincipal.cpp
+++ b/mozilla/caps/src/nsPrincipal.cpp
@@ -260,15 +260,10 @@ nsPrincipal::Equals(nsIPrincipal *aOther, PRBool *aResult)
}
// Codebases are equal if they have the same origin.
- nsIURI *origin = mDomain ? mDomain : mCodebase;
- nsCOMPtr otherOrigin;
- aOther->GetDomain(getter_AddRefs(otherOrigin));
- if (!otherOrigin) {
- aOther->GetURI(getter_AddRefs(otherOrigin));
- }
-
- return nsScriptSecurityManager::GetScriptSecurityManager()
- ->SecurityCompareURIs(origin, otherOrigin, aResult);
+ *aResult =
+ NS_SUCCEEDED(nsScriptSecurityManager::GetScriptSecurityManager()
+ ->CheckSameOriginPrincipal(this, aOther));
+ return NS_OK;
}
*aResult = PR_TRUE;
@@ -278,32 +273,6 @@ nsPrincipal::Equals(nsIPrincipal *aOther, PRBool *aResult)
NS_IMETHODIMP
nsPrincipal::Subsumes(nsIPrincipal *aOther, PRBool *aResult)
{
- // First, check if aOther is an about:blank principal. If it is, then we can
- // subsume it.
-
- nsCOMPtr otherOrigin;
- aOther->GetURI(getter_AddRefs(otherOrigin));
-
- if (otherOrigin) {
- PRBool isAbout = PR_FALSE;
- if (NS_SUCCEEDED(otherOrigin->SchemeIs("about", &isAbout)) && isAbout) {
- nsCAutoString str;
- otherOrigin->GetSpec(str);
-
- // Note: about:blank principals do not necessarily subsume about:blank
- // principals (unless aOther == this, which is checked in the Equals call
- // below).
-
- if (str.Equals("about:blank")) {
- PRBool isEqual = PR_FALSE;
- if (NS_SUCCEEDED(otherOrigin->Equals(mCodebase, &isEqual)) && !isEqual) {
- *aResult = PR_TRUE;
- return NS_OK;
- }
- }
- }
- }
-
return Equals(aOther, aResult);
}
diff --git a/mozilla/caps/src/nsScriptSecurityManager.cpp b/mozilla/caps/src/nsScriptSecurityManager.cpp
index c6f6d6a40ce..2e5798073bf 100644
--- a/mozilla/caps/src/nsScriptSecurityManager.cpp
+++ b/mozilla/caps/src/nsScriptSecurityManager.cpp
@@ -273,7 +273,7 @@ nsScriptSecurityManager::SecurityCompareURIs(nsIURI* aSourceURI,
return NS_OK;
}
- if (!aTargetURI)
+ if (!aTargetURI || !aSourceURI)
{
// return false
return NS_OK;
@@ -863,8 +863,14 @@ nsScriptSecurityManager::CheckSameOriginPrincipalInternal(nsIPrincipal* aSubject
if (aSubject == aObject)
return NS_OK;
+ // These booleans are only used when !aIsCheckConnect. Default
+ // them to false, and change if that turns out wrong.
+ PRBool subjectSetDomain = PR_FALSE;
+ PRBool objectSetDomain = PR_FALSE;
+
nsCOMPtr subjectURI;
nsCOMPtr objectURI;
+
if (aIsCheckConnect)
{
// Don't use domain for CheckConnect calls, since that's called for
@@ -875,12 +881,18 @@ nsScriptSecurityManager::CheckSameOriginPrincipalInternal(nsIPrincipal* aSubject
else
{
aSubject->GetDomain(getter_AddRefs(subjectURI));
- if (!subjectURI)
+ if (!subjectURI) {
aSubject->GetURI(getter_AddRefs(subjectURI));
+ } else {
+ subjectSetDomain = PR_TRUE;
+ }
aObject->GetDomain(getter_AddRefs(objectURI));
- if (!objectURI)
+ if (!objectURI) {
aObject->GetURI(getter_AddRefs(objectURI));
+ } else {
+ objectSetDomain = PR_TRUE;
+ }
}
PRBool isSameOrigin = PR_FALSE;
@@ -899,24 +911,11 @@ nsScriptSecurityManager::CheckSameOriginPrincipalInternal(nsIPrincipal* aSubject
if (aIsCheckConnect)
return NS_OK;
- nsCOMPtr subjectDomain;
- aSubject->GetDomain(getter_AddRefs(subjectDomain));
-
- nsCOMPtr objectDomain;
- aObject->GetDomain(getter_AddRefs(objectDomain));
-
// If both or neither explicitly set their domain, allow the access
- if (!subjectDomain == !objectDomain)
+ if (subjectSetDomain == objectSetDomain)
return NS_OK;
}
- // Allow access to about:blank
- nsXPIDLCString origin;
- rv = aObject->GetOrigin(getter_Copies(origin));
- NS_ENSURE_SUCCESS(rv, rv);
- if (nsCRT::strcasecmp(origin, "about:blank") == 0)
- return NS_OK;
-
/*
** Access tests failed, so now report error.
*/
@@ -1360,7 +1359,8 @@ nsScriptSecurityManager::CheckLoadURIWithPrincipal(nsIPrincipal* aPrincipal,
{ "datetime", DenyProtocol },
{ "finger", AllowProtocol },
{ "res", DenyProtocol },
- { "x-jsd", ChromeProtocol }
+ { "x-jsd", ChromeProtocol },
+ { "wyciwyg", DenyProtocol }
};
NS_NAMED_LITERAL_STRING(errorTag, "CheckLoadURIError");
diff --git a/mozilla/chrome/src/nsChromeRegistry.cpp b/mozilla/chrome/src/nsChromeRegistry.cpp
index a1e3a918305..bc3193c803c 100644
--- a/mozilla/chrome/src/nsChromeRegistry.cpp
+++ b/mozilla/chrome/src/nsChromeRegistry.cpp
@@ -1965,7 +1965,7 @@ CheckVersionFlag(const nsSubstring& aFlag, const nsSubstring& aData,
const nsSubstring& aValue, nsIVersionComparator* aChecker,
TriState& aResult)
{
- if (! (aData.Length() > aFlag.Length() + 2))
+ if (aData.Length() < aFlag.Length() + 2)
return PR_FALSE;
if (!StringBeginsWith(aData, aFlag))
@@ -2006,6 +2006,9 @@ CheckVersionFlag(const nsSubstring& aFlag, const nsSubstring& aData,
return PR_FALSE;
}
+ if (testdata.Length() == 0)
+ return PR_FALSE;
+
if (aResult != eOK) {
if (!aChecker) {
aResult = eBad;
@@ -2388,7 +2391,7 @@ nsChromeRegistry::ProcessManifestBuffer(char *buf, PRInt32 length,
nsCOMPtr chromeuri, resolveduri;
rv = io->NewURI(nsDependentCString(chrome), nsnull, nsnull,
getter_AddRefs(chromeuri));
- rv |= io->NewURI(nsDependentCString(resolved), nsnull, nsnull,
+ rv |= io->NewURI(nsDependentCString(resolved), nsnull, manifestURI,
getter_AddRefs(resolveduri));
if (NS_FAILED(rv))
continue;
diff --git a/mozilla/client.mk b/mozilla/client.mk
index 6ff4d0cb656..e50aec03d05 100644
--- a/mozilla/client.mk
+++ b/mozilla/client.mk
@@ -258,8 +258,8 @@ MODULES_all := \
# For branches, uncomment the MOZ_CO_TAG line with the proper tag,
# and commit this file on that tag.
MOZ_CO_TAG = MOZILLA_1_8_BRANCH
-NSPR_CO_TAG = NSPR_4_6_7_BETA1
-NSS_CO_TAG = NSS_3_11_5_RTM
+NSPR_CO_TAG = NSPR_4_6_7_RTM
+NSS_CO_TAG = NSS_3_11_5_WITH_CKBI_1_64_RTM
LDAPCSDK_CO_TAG = MOZILLA_1_8_BRANCH
LOCALES_CO_TAG = MOZILLA_1_8_BRANCH
diff --git a/mozilla/config/milestone.txt b/mozilla/config/milestone.txt
index 85780e95781..003c1234a45 100644
--- a/mozilla/config/milestone.txt
+++ b/mozilla/config/milestone.txt
@@ -10,4 +10,4 @@
# hardcoded milestones in the tree from these two files.
#--------------------------------------------------------
-1.8.1.4pre
+1.8.1.5pre
diff --git a/mozilla/configure b/mozilla/configure
index c5ecded9737..573c8704678 100755
--- a/mozilla/configure
+++ b/mozilla/configure
@@ -1046,7 +1046,7 @@ _SUBDIR_HOST_LDFLAGS="$HOST_LDFLAGS"
_SUBDIR_CONFIG_ARGS="$ac_configure_args"
MOZJPEG=62
-MOZPNG=10207
+MOZPNG=10217
MOZZLIB=1.2.3
NSPR_VERSION=4
NSS_VERSION=3
diff --git a/mozilla/configure.in b/mozilla/configure.in
index d7e772f8157..11c6b1791b3 100644
--- a/mozilla/configure.in
+++ b/mozilla/configure.in
@@ -102,7 +102,7 @@ _SUBDIR_CONFIG_ARGS="$ac_configure_args"
dnl Set the version number of the libs included with mozilla
dnl ========================================================
MOZJPEG=62
-MOZPNG=10207
+MOZPNG=10217
MOZZLIB=1.2.3
NSPR_VERSION=4
NSS_VERSION=3
diff --git a/mozilla/content/base/public/nsIContent.h b/mozilla/content/base/public/nsIContent.h
index 5ad2a59666a..772fdc8fadb 100644
--- a/mozilla/content/base/public/nsIContent.h
+++ b/mozilla/content/base/public/nsIContent.h
@@ -224,8 +224,8 @@ public:
* @param aKid the content to insert
* @param aIndex the index it is being inserted at (the index it will have
* after it is inserted)
- * @param aNotify whether to notify the document that the insert has
- * occurred
+ * @param aNotify whether to notify the document and appropriate
+ * mutation event listeners that the insert has occurred
*/
virtual nsresult InsertChildAt(nsIContent* aKid, PRUint32 aIndex,
PRBool aNotify) = 0;
@@ -234,8 +234,8 @@ public:
* Append a content node to the end of the child list.
*
* @param aKid the content to append
- * @param aNotify whether to notify the document that the replace has
- * occurred
+ * @param aNotify whether to notify the document and appropriate
+ * mutation event listeners that the replace has occurred
*/
virtual nsresult AppendChildTo(nsIContent* aKid, PRBool aNotify) = 0;
@@ -243,8 +243,8 @@ public:
* Remove a child from this content node.
*
* @param aIndex the index of the child to remove
- * @param aNotify whether to notify the document that the replace has
- * occurred
+ * @param aNotify whether to notify the document and appropriate
+ * mutation event listeners that the replace has occurred
*/
virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify) = 0;
@@ -277,8 +277,9 @@ public:
* @param aNameSpaceID the namespace of the attribute
* @param aName the name of the attribute
* @param aValue the value to set
- * @param aNotify specifies how whether or not the document should be
- * notified of the attribute change.
+ * @param aNotify specifies how whether or not the document and
+ * appropriate mutation event listeners should be notified
+ * of the attribute change.
*/
nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
const nsAString& aValue, PRBool aNotify)
@@ -297,8 +298,9 @@ public:
* @param aName the name of the attribute
* @param aPrefix the prefix of the attribute
* @param aValue the value to set
- * @param aNotify specifies how whether or not the document should be
- * notified of the attribute change.
+ * @param aNotify specifies how whether or not the document and
+ * appropriate mutation event listeners should be notified
+ * of the attribute change.
*/
virtual nsresult SetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsIAtom* aPrefix, const nsAString& aValue,
@@ -334,8 +336,9 @@ public:
*
* @param aNameSpaceID the namespace id of the attribute
* @param aAttr the name of the attribute to unset
- * @param aNotify specifies whether or not the document should be
- * notified of the attribute change
+ * @param aNotify specifies whether or not the document and
+ * appropriate mutation event listeners should be notified of the
+ * attribute change
*/
virtual nsresult UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aAttr,
PRBool aNotify) = 0;
diff --git a/mozilla/content/base/public/nsIDocument.h b/mozilla/content/base/public/nsIDocument.h
index 786a2bc921d..c1392fec828 100644
--- a/mozilla/content/base/public/nsIDocument.h
+++ b/mozilla/content/base/public/nsIDocument.h
@@ -841,7 +841,7 @@ protected:
PRUint32 mPartID;
};
-// IID for the nsIDocument interface
+// IID for the nsIDocument_MOZILLA_1_8_0_BRANCH interface
#define NS_IDOCUMENT_MOZILLA_1_8_0_BRANCH_IID \
{ 0x7d001ad2, 0x01ac, 0x4bf2, \
{ 0xb8, 0x3a, 0x50, 0xaa, 0xed, 0xc6, 0x1d, 0xfa } }
@@ -870,6 +870,46 @@ public:
virtual nsresult RemoveChildAt(PRUint32 aIndex, PRBool aNotify) = 0;
};
+// IID for the nsIDocument_MOZILLA_1_8_BRANCH2 interface
+#define NS_IDOCUMENT_MOZILLA_1_8_BRANCH2_IID \
+{ 0x095024b5, 0x57d1, 0x4117, \
+ { 0xb6, 0x02, 0x5c, 0x6d, 0xf2, 0x81, 0xe0, 0xba } }
+
+class nsIDocument_MOZILLA_1_8_BRANCH2 : public nsISupports
+{
+public:
+ NS_DEFINE_STATIC_IID_ACCESSOR(NS_IDOCUMENT_MOZILLA_1_8_BRANCH2_IID)
+
+ nsIDocument_MOZILLA_1_8_BRANCH2() :
+ mIsInitialDocumentInWindow(PR_FALSE)
+ {
+ }
+
+ /**
+ * Ask this document whether it's the initial document in its window.
+ */
+ PRBool IsInitialDocument() const
+ {
+ return mIsInitialDocumentInWindow;
+ }
+
+ /**
+ * Tell this document that it's the initial document in its window. See
+ * comments on mIsInitialDocumentInWindow for when this should be called.
+ */
+ void SetIsInitialDocument(PRBool aIsInitialDocument)
+ {
+ mIsInitialDocumentInWindow = aIsInitialDocument;
+ }
+
+protected:
+ // True if this document is the initial document for a window. This should
+ // basically be true only for documents that exist in newly-opened windows or
+ // documents created to satisfy a GetDocument() on a window when there's no
+ // document in it.
+ PRBool mIsInitialDocumentInWindow;
+};
+
/**
* Helper class to automatically handle batching of document updates. This
* class will call BeginUpdate on construction and EndUpdate on destruction on
diff --git a/mozilla/content/base/src/nsContentUtils.cpp b/mozilla/content/base/src/nsContentUtils.cpp
index c8e33d8ebc2..531edb1e396 100644
--- a/mozilla/content/base/src/nsContentUtils.cpp
+++ b/mozilla/content/base/src/nsContentUtils.cpp
@@ -2276,7 +2276,7 @@ nsCxPusher::Push(nsISupports *aCurrentTarget)
nsCOMPtr document;
if (content) {
- document = content->GetDocument();
+ document = content->GetOwnerDoc();
}
if (!document) {
diff --git a/mozilla/content/base/src/nsDocument.cpp b/mozilla/content/base/src/nsDocument.cpp
index e0f15d35970..c9cbdc4f911 100644
--- a/mozilla/content/base/src/nsDocument.cpp
+++ b/mozilla/content/base/src/nsDocument.cpp
@@ -785,6 +785,7 @@ NS_IMPL_RELEASE_USING_AGGREGATOR(nsXPathDocumentTearoff, mDocument)
nsDocument::nsDocument()
: nsIDocument(),
+ nsIDocument_MOZILLA_1_8_BRANCH2(),
mVisible(PR_TRUE)
{
nsLayoutStatics::AddRef();
@@ -921,6 +922,7 @@ PRBool gHaveXPathDOM = PR_FALSE;
NS_INTERFACE_MAP_BEGIN(nsDocument)
NS_INTERFACE_MAP_ENTRY(nsIDocument)
NS_INTERFACE_MAP_ENTRY(nsIDocument_MOZILLA_1_8_0_BRANCH)
+ NS_INTERFACE_MAP_ENTRY(nsIDocument_MOZILLA_1_8_BRANCH2)
NS_INTERFACE_MAP_ENTRY(nsIDOMDocument)
NS_INTERFACE_MAP_ENTRY(nsIDOMNSDocument)
NS_INTERFACE_MAP_ENTRY(nsIDOMDocumentEvent)
@@ -976,7 +978,7 @@ NS_IMPL_RELEASE(nsDocument)
nsresult
nsDocument::Init()
{
- if (mBindingManager || mCSSLoader || mNodeInfoManager) {
+ if (mBindingManager || mCSSLoader || mNodeInfoManager || mScriptLoader) {
return NS_ERROR_ALREADY_INITIALIZED;
}
@@ -999,6 +1001,10 @@ nsDocument::Init()
mCSSLoader->SetCaseSensitive(PR_TRUE);
mCSSLoader->SetCompatibilityMode(eCompatibility_FullStandards);
+ mScriptLoader = new nsScriptLoader();
+ NS_ENSURE_TRUE(mScriptLoader, NS_ERROR_OUT_OF_MEMORY);
+ mScriptLoader->Init(this);
+
mNodeInfoManager = new nsNodeInfoManager();
NS_ENSURE_TRUE(mNodeInfoManager, NS_ERROR_OUT_OF_MEMORY);
@@ -2200,14 +2206,6 @@ nsDocument::GetWindow()
nsIScriptLoader *
nsDocument::GetScriptLoader()
{
- if (!mScriptLoader) {
- mScriptLoader = new nsScriptLoader();
- if (!mScriptLoader) {
- return nsnull;
- }
- mScriptLoader->Init(this);
- }
-
return mScriptLoader;
}
diff --git a/mozilla/content/base/src/nsDocument.h b/mozilla/content/base/src/nsDocument.h
index 6555351f03a..2a3ea9d8cf8 100644
--- a/mozilla/content/base/src/nsDocument.h
+++ b/mozilla/content/base/src/nsDocument.h
@@ -366,6 +366,7 @@ private:
// the interface.
class nsDocument : public nsIDocument,
public nsIDocument_MOZILLA_1_8_0_BRANCH,
+ public nsIDocument_MOZILLA_1_8_BRANCH2,
public nsIDOMXMLDocument, // inherits nsIDOMDocument
public nsIDOMNSDocument,
public nsIDOMDocumentEvent,
diff --git a/mozilla/content/base/src/nsFrameLoader.cpp b/mozilla/content/base/src/nsFrameLoader.cpp
index 16f026b2857..d7fb93beaab 100644
--- a/mozilla/content/base/src/nsFrameLoader.cpp
+++ b/mozilla/content/base/src/nsFrameLoader.cpp
@@ -165,6 +165,13 @@ nsFrameLoader::LoadFrame()
// load instead of just forcing the system principal. That way if we have
// something loaded already the principal used will be that of what we
// already have loaded.
+
+ // XXX bz I'd love to nix this, but the problem is chrome calling
+ // setAttribute() on an iframe or browser and passing in a javascript: URI.
+ // We probably don't want to run that with chrome privileges... Though in
+ // similar circumstances, if one sets window.location.href from chrome we
+ // _do_ run that with chrome privileges, so maybe we should do the same
+ // here?
loadInfo->SetInheritOwner(PR_TRUE);
// Also, in this case we don't set a referrer, just in case.
diff --git a/mozilla/content/base/src/nsGenericElement.cpp b/mozilla/content/base/src/nsGenericElement.cpp
index f2725f61c9e..431601f748c 100644
--- a/mozilla/content/base/src/nsGenericElement.cpp
+++ b/mozilla/content/base/src/nsGenericElement.cpp
@@ -2171,7 +2171,9 @@ nsGenericElement::HandleDOMEvent(nsPresContext* aPresContext,
aEvent->message != NS_SCRIPT_LOAD &&
aEvent->message != NS_IMAGE_LOAD &&
aEvent->message != NS_IMAGE_ERROR &&
- aEvent->message != NS_SCROLL_EVENT) {
+ aEvent->message != NS_SCROLL_EVENT &&
+ !(aEvent->eventStructType == NS_MUTATION_EVENT &&
+ IsAnonymousForEvents())) {
//Initiate capturing phase. Special case first call to document
if (parent) {
parent->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
@@ -2248,7 +2250,9 @@ nsGenericElement::HandleDOMEvent(nsPresContext* aPresContext,
aEvent->message != NS_IMAGE_ERROR && aEvent->message != NS_IMAGE_LOAD &&
// scroll events fired at elements don't bubble (although scroll events
// fired at documents do, to the window)
- aEvent->message != NS_SCROLL_EVENT) {
+ aEvent->message != NS_SCROLL_EVENT &&
+ !(aEvent->eventStructType == NS_MUTATION_EVENT &&
+ IsAnonymousForEvents())) {
if (parent) {
// If there's a parent we pass the event to the parent...
@@ -2832,18 +2836,16 @@ doInsertChildAt(nsIContent* aKid, PRUint32 aIndex, PRBool aNotify,
// XXXbz What if the kid just moved us in the document? Scripts suck. We
// really need to stop running them while we're in the middle of modifying
// the DOM....
- if (aDocument && aKid->GetCurrentDoc() == aDocument &&
+ if (aNotify && aDocument && aKid->GetCurrentDoc() == aDocument &&
(!aParent || aKid->GetParent() == aParent)) {
- if (aNotify) {
- // Note that we always want to call ContentInserted when things are added
- // as kids to documents
- if (aParent && isAppend) {
- aDocument->ContentAppended(aParent, aIndex);
- } else {
- aDocument->ContentInserted(aParent, aKid, aIndex);
- }
+ // Note that we always want to call ContentInserted when things are added
+ // as kids to documents
+ if (aParent && isAppend) {
+ aDocument->ContentAppended(aParent, aIndex);
+ } else {
+ aDocument->ContentInserted(aParent, aKid, aIndex);
}
-
+
// XXXbz how come we're not firing mutation listeners for adding to
// documents?
if (aParent &&
@@ -2851,7 +2853,7 @@ doInsertChildAt(nsIContent* aKid, PRUint32 aIndex, PRBool aNotify,
NS_EVENT_BITS_MUTATION_NODEINSERTED)) {
nsMutationEvent mutation(PR_TRUE, NS_MUTATION_NODEINSERTED, aKid);
mutation.mRelatedNode = do_QueryInterface(aParent);
-
+
nsEventStatus status = nsEventStatus_eIgnore;
aKid->HandleDOMEvent(nsnull, &mutation, nsnull, NS_EVENT_FLAG_INIT, &status);
}
@@ -2885,17 +2887,17 @@ nsGenericElement::AppendChildTo(nsIContent* aKid, PRBool aNotify)
// XXXbz What if the kid just moved us in the document? Scripts suck. We
// really need to stop running them while we're in the middle of modifying
// the DOM....
- if (document && document == GetCurrentDoc() && aKid->GetParent() == this) {
- if (aNotify) {
- document->ContentAppended(this, GetChildCount() - 1);
- }
-
+ if (aNotify && document && document == GetCurrentDoc() &&
+ aKid->GetParent() == this) {
+ document->ContentAppended(this, GetChildCount() - 1);
+
if (HasMutationListeners(this, NS_EVENT_BITS_MUTATION_NODEINSERTED)) {
nsMutationEvent mutation(PR_TRUE, NS_MUTATION_NODEINSERTED, aKid);
mutation.mRelatedNode = do_QueryInterface(this);
-
+
nsEventStatus status = nsEventStatus_eIgnore;
- aKid->HandleDOMEvent(nsnull, &mutation, nsnull, NS_EVENT_FLAG_INIT, &status);
+ aKid->HandleDOMEvent(nsnull, &mutation, nsnull, NS_EVENT_FLAG_INIT,
+ &status);
}
}
@@ -3002,24 +3004,27 @@ doRemoveChildAt(PRUint32 aIndex, PRBool aNotify, nsIContent* aKid,
mozAutoDocUpdate updateBatch(aDocument, UPDATE_CONTENT_MODEL, aNotify);
- nsMutationGuard guard;
-
- if (aParent && nsGenericElement::HasMutationListeners(aParent,
- NS_EVENT_BITS_MUTATION_NODEREMOVED)) {
- nsMutationEvent mutation(PR_TRUE, NS_MUTATION_NODEREMOVED, aKid);
- mutation.mRelatedNode = do_QueryInterface(aParent);
+ if (aNotify) {
+ nsMutationGuard guard;
+ if (aParent &&
+ nsGenericElement::HasMutationListeners(aParent,
+ NS_EVENT_BITS_MUTATION_NODEREMOVED)) {
+ nsMutationEvent mutation(PR_TRUE, NS_MUTATION_NODEREMOVED, aKid);
+ mutation.mRelatedNode = do_QueryInterface(aParent);
+
nsEventStatus status = nsEventStatus_eIgnore;
aKid->HandleDOMEvent(nsnull, &mutation, nsnull,
NS_EVENT_FLAG_INIT, &status);
- }
-
- // Someone may have removed the kid or any of its siblings while that event
- // was processing.
- if (guard.Mutated(0)) {
- aIndex = container.IndexOf(aKid);
- if (aIndex == (PRUint32)(-1)) {
- return NS_OK;
+ }
+
+ // Someone may have removed the kid or any of its siblings while that event
+ // was processing.
+ if (guard.Mutated(0)) {
+ aIndex = container.IndexOf(aKid);
+ if (aIndex == (PRUint32)(-1)) {
+ return NS_OK;
+ }
}
}
@@ -3971,42 +3976,42 @@ nsGenericElement::SetAttr(PRInt32 aNamespaceID, nsIAtom* aName,
}
if (document) {
- nsXBLBinding *binding = document->BindingManager()->GetBinding(this);
+ nsRefPtr binding = document->BindingManager()->GetBinding(this);
if (binding)
binding->AttributeChanged(aName, aNamespaceID, PR_FALSE, aNotify);
- if (HasMutationListeners(this, NS_EVENT_BITS_MUTATION_ATTRMODIFIED)) {
- nsCOMPtr node =
- do_QueryInterface(NS_STATIC_CAST(nsIContent *, this));
- nsMutationEvent mutation(PR_TRUE, NS_MUTATION_ATTRMODIFIED, node);
-
- nsAutoString attrName;
- aName->ToString(attrName);
- nsCOMPtr attrNode;
- GetAttributeNode(attrName, getter_AddRefs(attrNode));
- mutation.mRelatedNode = attrNode;
-
- mutation.mAttrName = aName;
- if (!oldValue.IsEmpty()) {
- mutation.mPrevAttrValue = do_GetAtom(oldValue);
- }
-
- if (!aValue.IsEmpty()) {
- mutation.mNewAttrValue = do_GetAtom(aValue);
- }
-
- if (modification) {
- mutation.mAttrChange = nsIDOMMutationEvent::MODIFICATION;
- } else {
- mutation.mAttrChange = nsIDOMMutationEvent::ADDITION;
- }
-
- nsEventStatus status = nsEventStatus_eIgnore;
- HandleDOMEvent(nsnull, &mutation, nsnull,
- NS_EVENT_FLAG_INIT, &status);
- }
-
if (aNotify) {
+ if (HasMutationListeners(this, NS_EVENT_BITS_MUTATION_ATTRMODIFIED)) {
+ nsCOMPtr node =
+ do_QueryInterface(NS_STATIC_CAST(nsIContent *, this));
+ nsMutationEvent mutation(PR_TRUE, NS_MUTATION_ATTRMODIFIED, node);
+
+ nsAutoString attrName;
+ aName->ToString(attrName);
+ nsCOMPtr attrNode;
+ GetAttributeNode(attrName, getter_AddRefs(attrNode));
+ mutation.mRelatedNode = attrNode;
+
+ mutation.mAttrName = aName;
+ if (!oldValue.IsEmpty()) {
+ mutation.mPrevAttrValue = do_GetAtom(oldValue);
+ }
+
+ if (!aValue.IsEmpty()) {
+ mutation.mNewAttrValue = do_GetAtom(aValue);
+ }
+
+ if (modification) {
+ mutation.mAttrChange = nsIDOMMutationEvent::MODIFICATION;
+ } else {
+ mutation.mAttrChange = nsIDOMMutationEvent::ADDITION;
+ }
+
+ nsEventStatus status = nsEventStatus_eIgnore;
+ HandleDOMEvent(nsnull, &mutation, nsnull,
+ NS_EVENT_FLAG_INIT, &status);
+ }
+
PRInt32 modHint = modification ? PRInt32(nsIDOMMutationEvent::MODIFICATION)
: PRInt32(nsIDOMMutationEvent::ADDITION);
document->AttributeChanged(this, aNamespaceID, aName, modHint);
@@ -4069,7 +4074,10 @@ nsGenericElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
nsIDocument *document = GetCurrentDoc();
mozAutoDocUpdate updateBatch(document, UPDATE_CONTENT_MODEL, aNotify);
- PRBool hasMutationListeners = document &&
+ // we do not need to look for mutation listeners if
+ // aNotify is false, because there is no use of that knowledge then
+ // (mutation events won't be fired).
+ PRBool hasMutationListeners = aNotify && document &&
HasMutationListeners(this, NS_EVENT_BITS_MUTATION_ATTRMODIFIED);
// Grab the attr node if needed before we remove it from the attr map
nsCOMPtr attrNode;
@@ -4082,12 +4090,12 @@ nsGenericElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
if (aNotify) {
document->AttributeWillChange(this, aNameSpaceID, aName);
- }
-
- if (hasMutationListeners) {
- nsAutoString attrName;
- aName->ToString(attrName);
- GetAttributeNode(attrName, getter_AddRefs(attrNode));
+
+ if (hasMutationListeners) {
+ nsAutoString attrName;
+ aName->ToString(attrName);
+ GetAttributeNode(attrName, getter_AddRefs(attrNode));
+ }
}
}
@@ -4102,32 +4110,32 @@ nsGenericElement::UnsetAttr(PRInt32 aNameSpaceID, nsIAtom* aName,
NS_ENSURE_SUCCESS(rv, rv);
if (document) {
- nsXBLBinding *binding = document->BindingManager()->GetBinding(this);
+ nsRefPtr binding = document->BindingManager()->GetBinding(this);
if (binding)
binding->AttributeChanged(aName, aNameSpaceID, PR_TRUE, aNotify);
if (aNotify) {
document->AttributeChanged(this, aNameSpaceID, aName,
nsIDOMMutationEvent::REMOVAL);
- }
- if (hasMutationListeners) {
- nsCOMPtr node =
- do_QueryInterface(NS_STATIC_CAST(nsIContent *, this));
- nsMutationEvent mutation(PR_TRUE, NS_MUTATION_ATTRMODIFIED, node);
+ if (hasMutationListeners) {
+ nsCOMPtr node =
+ do_QueryInterface(NS_STATIC_CAST(nsIContent *, this));
+ nsMutationEvent mutation(PR_TRUE, NS_MUTATION_ATTRMODIFIED, node);
- mutation.mRelatedNode = attrNode;
- mutation.mAttrName = aName;
+ mutation.mRelatedNode = attrNode;
+ mutation.mAttrName = aName;
- nsAutoString value;
- oldValue.ToString(value);
- if (!value.IsEmpty())
- mutation.mPrevAttrValue = do_GetAtom(value);
- mutation.mAttrChange = nsIDOMMutationEvent::REMOVAL;
+ nsAutoString value;
+ oldValue.ToString(value);
+ if (!value.IsEmpty())
+ mutation.mPrevAttrValue = do_GetAtom(value);
+ mutation.mAttrChange = nsIDOMMutationEvent::REMOVAL;
- nsEventStatus status = nsEventStatus_eIgnore;
- HandleDOMEvent(nsnull, &mutation, nsnull,
- NS_EVENT_FLAG_INIT, &status);
+ nsEventStatus status = nsEventStatus_eIgnore;
+ HandleDOMEvent(nsnull, &mutation, nsnull,
+ NS_EVENT_FLAG_INIT, &status);
+ }
}
}
diff --git a/mozilla/content/base/src/nsGenericElement.h b/mozilla/content/base/src/nsGenericElement.h
index c88575907b9..682535899f9 100644
--- a/mozilla/content/base/src/nsGenericElement.h
+++ b/mozilla/content/base/src/nsGenericElement.h
@@ -857,6 +857,14 @@ protected:
*/
void GetContentsAsText(nsAString& aText);
+ /**
+ * Returns PR_TRUE if this content is anonymous for event handling.
+ */
+ PRBool IsAnonymousForEvents() const
+ {
+ return !!(GetFlags() & GENERIC_ELEMENT_IS_ANONYMOUS);
+ }
+
/**
* Information about this type of node
*/
diff --git a/mozilla/content/base/src/nsXMLHttpRequest.cpp b/mozilla/content/base/src/nsXMLHttpRequest.cpp
index b5a17ffd91b..01b8f85438b 100644
--- a/mozilla/content/base/src/nsXMLHttpRequest.cpp
+++ b/mozilla/content/base/src/nsXMLHttpRequest.cpp
@@ -82,6 +82,7 @@
#include "nsIContentPolicy.h"
#include "nsContentPolicyUtils.h"
#include "nsContentErrors.h"
+#include "nsLayoutStatics.h"
static const char* kLoadAsData = "loadAsData";
#define LOADSTR NS_LITERAL_STRING("load")
@@ -276,6 +277,7 @@ GetDocumentFromScriptContext(nsIScriptContext *aScriptContext)
nsXMLHttpRequest::nsXMLHttpRequest()
: mState(XML_HTTP_REQUEST_UNINITIALIZED)
{
+ nsLayoutStatics::AddRef();
}
nsXMLHttpRequest::~nsXMLHttpRequest()
@@ -291,6 +293,7 @@ nsXMLHttpRequest::~nsXMLHttpRequest()
// Needed to free the two arrays.
ClearEventListeners();
+ nsLayoutStatics::Release();
}
@@ -909,8 +912,10 @@ nsXMLHttpRequest::OpenRequest(const nsACString& method,
NS_ENSURE_ARG(!method.IsEmpty());
NS_ENSURE_ARG(!url.IsEmpty());
- // Disallow HTTP/1.1 TRACE method (see bug 302489).
- if (method.LowerCaseEqualsASCII("trace")) {
+ // Disallow HTTP/1.1 TRACE method (see bug 302489)
+ // and MS IIS equivalent TRACK (see bug 381264)
+ if (method.LowerCaseEqualsASCII("trace") ||
+ method.LowerCaseEqualsASCII("track")) {
return NS_ERROR_INVALID_ARG;
}
diff --git a/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp b/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp
index 0367d59020a..07a493d8700 100644
--- a/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp
+++ b/mozilla/content/canvas/src/nsCanvasRenderingContext2D.cpp
@@ -883,8 +883,16 @@ nsCanvasRenderingContext2D::Render(nsIRenderingContext *rc)
{
nsresult rv = NS_OK;
+ if (!mSurface || !mCairo ||
+ cairo_surface_status(mSurface) ||
+ cairo_status(mCairo))
+ return NS_ERROR_FAILURE;
+
#ifdef MOZ_CAIRO_GFX
+ if (!mThebesSurface)
+ return NS_ERROR_FAILURE;
+
gfxContext* ctx = (gfxContext*) rc->GetNativeGraphicData(nsIRenderingContext::NATIVE_THEBES_CONTEXT);
nsRefPtr pat = new gfxPattern(mThebesSurface);
@@ -1066,6 +1074,9 @@ nsCanvasRenderingContext2D::GetInputStream(const nsACString& aMimeType,
const nsAString& aEncoderOptions,
nsIInputStream **aStream)
{
+ if (!mSurface || cairo_surface_status(mSurface) != CAIRO_STATUS_SUCCESS)
+ return NS_ERROR_FAILURE;
+
nsCString conid(NS_LITERAL_CSTRING("@mozilla.org/image/encoder;2?type="));
conid += aMimeType;
@@ -2490,8 +2501,8 @@ CheckSaneImageSize (PRInt32 width, PRInt32 height)
return PR_FALSE;
/* reject over-wide or over-tall images */
- const PRInt32 k64KLimit = 0x0000FFFF;
- if (width > k64KLimit || height > k64KLimit)
+ const PRInt32 kSizeLimit = 0x00007FFF;
+ if (width > kSizeLimit || height > kSizeLimit)
return PR_FALSE;
return PR_TRUE;
diff --git a/mozilla/content/html/content/src/nsHTMLCanvasElement.cpp b/mozilla/content/html/content/src/nsHTMLCanvasElement.cpp
index cf359e90a76..c4f33fc57da 100644
--- a/mozilla/content/html/content/src/nsHTMLCanvasElement.cpp
+++ b/mozilla/content/html/content/src/nsHTMLCanvasElement.cpp
@@ -458,10 +458,16 @@ nsHTMLCanvasElement::GetContext(const nsAString& aContextId,
return NS_ERROR_INVALID_ARG;
rv = mCurrentContext->SetCanvasElement(this);
- NS_ENSURE_SUCCESS(rv, rv);
+ if (NS_FAILED(rv)) {
+ mCurrentContext = nsnull;
+ return rv;
+ }
rv = UpdateContext();
- NS_ENSURE_SUCCESS(rv, rv);
+ if (NS_FAILED(rv)) {
+ mCurrentContext = nsnull;
+ return rv;
+ }
mCurrentContextId.Assign(aContextId);
} else if (!mCurrentContextId.Equals(aContextId)) {
diff --git a/mozilla/content/html/document/src/nsHTMLDocument.cpp b/mozilla/content/html/document/src/nsHTMLDocument.cpp
index 9c328cbc294..3d955fc5ce5 100644
--- a/mozilla/content/html/document/src/nsHTMLDocument.cpp
+++ b/mozilla/content/html/document/src/nsHTMLDocument.cpp
@@ -349,6 +349,12 @@ nsHTMLDocument::Init()
return NS_OK;
}
+void
+nsHTMLDocument::Destroy()
+{
+ InvalidateHashTables();
+ nsDocument::Destroy();
+}
void
nsHTMLDocument::Reset(nsIChannel* aChannel, nsILoadGroup* aLoadGroup)
@@ -2025,10 +2031,24 @@ nsHTMLDocument::OpenCommon(const nsACString& aContentType, PRBool aReplace)
// Remember the old scope in case the call to SetNewDocument changes it.
nsCOMPtr oldScope(do_QueryReferent(mScopeObject));
+ // If callerPrincipal doesn't match our principal. make sure that
+ // SetNewDocument gives us a new inner window and clears our scope.
+ NS_ENSURE_TRUE(GetPrincipal(), NS_ERROR_OUT_OF_MEMORY);
+ if (!callerPrincipal ||
+ NS_FAILED(nsContentUtils::GetSecurityManager()->
+ CheckSameOriginPrincipal(callerPrincipal, GetPrincipal()))) {
+ SetIsInitialDocument(PR_FALSE);
+ }
+
rv = mScriptGlobalObject->SetNewDocument((nsDocument *)this, nsnull,
PR_FALSE, PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
+ // Now make sure we're not flagged as the initial document anymore, now
+ // that we've had stuff done to us. From now on, if anyone tries to
+ // document.open() us, they get a new inner window.
+ SetIsInitialDocument(PR_FALSE);
+
nsCOMPtr newScope(do_QueryReferent(mScopeObject));
if (oldScope && newScope != oldScope) {
nsContentUtils::ReparentContentWrappersInScope(oldScope, newScope);
@@ -2364,36 +2384,6 @@ nsHTMLDocument::ScriptWriteCommon(PRBool aNewlineTerminate)
GetCurrentNativeCallContext(getter_AddRefs(ncc));
NS_ENSURE_SUCCESS(rv, rv);
- nsCAutoString spec;
-
- if (mDocumentURI) {
- rv = mDocumentURI->GetSpec(spec);
- NS_ENSURE_SUCCESS(rv, rv);
- }
-
- if (!mDocumentURI || spec.EqualsLiteral("about:blank")) {
- // The current document's URI and principal are empty or "about:blank".
- // By writing to this document, the script acquires responsibility for the
- // document for security purposes. Thus a document.write of a script tag
- // ends up producing a script with the same principals as the script
- // that performed the write.
- nsIScriptSecurityManager *secMan = nsContentUtils::GetSecurityManager();
-
- nsCOMPtr subject;
- rv = secMan->GetSubjectPrincipal(getter_AddRefs(subject));
- NS_ENSURE_SUCCESS(rv, rv);
-
- if (subject) {
- nsCOMPtr subjectURI;
- subject->GetURI(getter_AddRefs(subjectURI));
-
- if (subjectURI) {
- mDocumentURI = subjectURI;
- mPrincipal = subject;
- }
- }
- }
-
if (ncc) {
// We're called from JS, concatenate the extra arguments into
// string_buffer
@@ -2459,53 +2449,63 @@ nsHTMLDocument::GetElementById(const nsAString& aElementId,
NS_ENSURE_ARG_POINTER(aReturn);
*aReturn = nsnull;
- // We don't have to flush before we do the initial hashtable lookup, since if
- // the id is already in the hashtable it couldn't have been removed without
- // us being notified (all removals notify immediately, as far as I can tell).
- // So do the lookup first.
- IdAndNameMapEntry *entry =
- NS_STATIC_CAST(IdAndNameMapEntry *,
- PL_DHashTableOperate(&mIdAndNameHashTable, &aElementId,
- PL_DHASH_ADD));
- NS_ENSURE_TRUE(entry, NS_ERROR_OUT_OF_MEMORY);
-
- nsIContent *e = entry->mIdContent;
-
- if (e == ID_NOT_IN_DOCUMENT) {
- // Now we have to flush. It could be that we have a cached "not in
- // document" but more content has been added to the document since. Note
- // that we have to flush notifications, so that the entry will get updated
- // properly.
-
- // Make sure to stash away the current generation so we can check whether
- // the table changes when we flush.
- PRUint32 generation = mIdAndNameHashTable.generation;
+ IdAndNameMapEntry *entry = nsnull;
+ nsIContent *e = nsnull;
- FlushPendingNotifications(Flush_ContentAndNotify);
+ // We don't want to use the hash table at all after the document has been
+ // destroyed, since the hash table doesn't own the objects that are placed
+ // into it, and so they have an uncertain lifetime after the document's
+ // released them.
+ if (!mIsGoingAway) {
+ // We don't have to flush before we do the initial hashtable lookup, since if
+ // the id is already in the hashtable it couldn't have been removed without
+ // us being notified (all removals notify immediately, as far as I can tell).
+ // So do the lookup first.
+ entry =
+ NS_STATIC_CAST(IdAndNameMapEntry *,
+ PL_DHashTableOperate(&mIdAndNameHashTable, &aElementId,
+ PL_DHASH_ADD));
+ NS_ENSURE_TRUE(entry, NS_ERROR_OUT_OF_MEMORY);
- if (generation != mIdAndNameHashTable.generation) {
- // Table changed, so the entry pointer is no longer valid; look up the
- // entry again, adding if necessary (the adding may be necessary in case
- // the flush actually deleted entries).
- entry =
- NS_STATIC_CAST(IdAndNameMapEntry *,
- PL_DHashTableOperate(&mIdAndNameHashTable, &aElementId,
+ e = entry->mIdContent;
+
+ if (e == ID_NOT_IN_DOCUMENT) {
+ // Now we have to flush. It could be that we have a cached "not in
+ // document" but more content has been added to the document since. Note
+ // that we have to flush notifications, so that the entry will get updated
+ // properly.
+
+ // Make sure to stash away the current generation so we can check whether
+ // the table changes when we flush.
+ PRUint32 generation = mIdAndNameHashTable.generation;
+
+ FlushPendingNotifications(Flush_ContentAndNotify);
+
+ if (generation != mIdAndNameHashTable.generation) {
+ // Table changed, so the entry pointer is no longer valid; look up the
+ // entry again, adding if necessary (the adding may be necessary in case
+ // the flush actually deleted entries).
+ entry =
+ NS_STATIC_CAST(IdAndNameMapEntry *,
+ PL_DHashTableOperate(&mIdAndNameHashTable, &aElementId,
PL_DHASH_ADD));
- NS_ENSURE_TRUE(entry, NS_ERROR_OUT_OF_MEMORY);
+ NS_ENSURE_TRUE(entry, NS_ERROR_OUT_OF_MEMORY);
+ }
+
+ // We could now have a new entry, or the entry could have been
+ // updated, so update e to point to the current entry's
+ // mIdContent.
+ e = entry->mIdContent;
}
- // We could now have a new entry, or the entry could have been
- // updated, so update e to point to the current entry's
- // mIdContent.
- e = entry->mIdContent;
- }
+ if (e == ID_NOT_IN_DOCUMENT) {
+ // We've looked for this id before and we didn't find it, so it
+ // won't be in the document now either (since the
+ // mIdAndNameHashTable is live for entries in the table)
- if (e == ID_NOT_IN_DOCUMENT) {
- // We've looked for this id before and we didn't find it, so it
- // won't be in the document now either (since the
- // mIdAndNameHashTable is live for entries in the table)
-
- return NS_OK;
+ return NS_OK;
+ }
+
}
if (!e) {
@@ -2520,13 +2520,17 @@ nsHTMLDocument::GetElementById(const nsAString& aElementId,
if (!e) {
// There is no element with the given id in the document, cache
// the fact that it's not in the document
- entry->mIdContent = ID_NOT_IN_DOCUMENT;
+ if (entry) {
+ entry->mIdContent = ID_NOT_IN_DOCUMENT;
+ }
return NS_OK;
}
// We found an element with a matching id, store that in the hash
- entry->mIdContent = e;
+ if (entry) {
+ entry->mIdContent = e;
+ }
}
return CallQueryInterface(e, aReturn);
@@ -3150,6 +3154,10 @@ nsHTMLDocument::UpdateNameTableEntry(const nsAString& aName,
nsresult
nsHTMLDocument::AddToIdTable(const nsAString& aId, nsIContent *aContent)
{
+ if (mIsGoingAway) {
+ return NS_OK;
+ }
+
IdAndNameMapEntry *entry =
NS_STATIC_CAST(IdAndNameMapEntry *,
PL_DHashTableOperate(&mIdAndNameHashTable, &aId,
@@ -3168,6 +3176,10 @@ nsHTMLDocument::AddToIdTable(const nsAString& aId, nsIContent *aContent)
nsresult
nsHTMLDocument::UpdateIdTableEntry(const nsAString& aId, nsIContent *aContent)
{
+ if (mIsGoingAway) {
+ return NS_OK;
+ }
+
IdAndNameMapEntry *entry =
NS_STATIC_CAST(IdAndNameMapEntry *,
PL_DHashTableOperate(&mIdAndNameHashTable, &aId,
@@ -3346,8 +3358,9 @@ nsHTMLDocument::ResolveName(const nsAString& aName,
{
*aResult = nsnull;
- if (IsXHTML()) {
+ if (IsXHTML() || mIsGoingAway) {
// We don't dynamically resolve names on XHTML documents.
+ // We also don't want to add a new cache item to a destroyed document
return NS_OK;
}
diff --git a/mozilla/content/html/document/src/nsHTMLDocument.h b/mozilla/content/html/document/src/nsHTMLDocument.h
index 921539873ea..ad9b96d7981 100644
--- a/mozilla/content/html/document/src/nsHTMLDocument.h
+++ b/mozilla/content/html/document/src/nsHTMLDocument.h
@@ -74,7 +74,8 @@ public:
nsHTMLDocument();
virtual ~nsHTMLDocument();
virtual nsresult Init();
-
+ virtual NS_HIDDEN_(void) Destroy();
+
NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr);
NS_IMETHOD_(nsrefcnt) AddRef(void);
diff --git a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp
index c8f9ddf5113..ef46bf61d83 100644
--- a/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp
+++ b/mozilla/content/xbl/src/nsXBLPrototypeBinding.cpp
@@ -466,12 +466,13 @@ nsXBLPrototypeBinding::AttributeChanged(nsIAtom* aAttribute,
return;
// Iterate over the elements in the array.
- nsIContent* content = GetImmediateChild(nsXBLAtoms::content);
+ nsCOMPtr content = GetImmediateChild(nsXBLAtoms::content);
while (xblAttr) {
nsIContent* element = xblAttr->GetElement();
- nsIContent *realElement = LocateInstance(aChangedElement, content,
- aAnonymousContent, element);
+ nsCOMPtr realElement = LocateInstance(aChangedElement, content,
+ aAnonymousContent,
+ element);
if (realElement) {
nsIAtom* dstAttr = xblAttr->GetDstAttribute();
diff --git a/mozilla/content/xul/content/src/nsXULElement.cpp b/mozilla/content/xul/content/src/nsXULElement.cpp
index dde64277536..d81e932609c 100644
--- a/mozilla/content/xul/content/src/nsXULElement.cpp
+++ b/mozilla/content/xul/content/src/nsXULElement.cpp
@@ -2201,7 +2201,9 @@ nsXULElement::HandleDOMEvent(nsPresContext* aPresContext, nsEvent* aEvent,
}
//Capturing stage evaluation
- if (NS_EVENT_FLAG_CAPTURE & aFlags) {
+ if (NS_EVENT_FLAG_CAPTURE & aFlags &&
+ !(aEvent->eventStructType == NS_MUTATION_EVENT &&
+ IsAnonymousForEvents())) {
//Initiate capturing phase. Special case first call to document
if (parent) {
parent->HandleDOMEvent(aPresContext, aEvent, aDOMEvent, aFlags & NS_EVENT_CAPTURE_MASK, aEventStatus);
@@ -2242,7 +2244,9 @@ nsXULElement::HandleDOMEvent(nsPresContext* aPresContext, nsEvent* aEvent,
}
//Bubbling stage
- if (NS_EVENT_FLAG_BUBBLE & aFlags) {
+ if (NS_EVENT_FLAG_BUBBLE & aFlags &&
+ !(aEvent->eventStructType == NS_MUTATION_EVENT &&
+ IsAnonymousForEvents())) {
if (parent != nsnull) {
// We have a parent. Let them field the event.
ret = parent->HandleDOMEvent(aPresContext, aEvent, aDOMEvent,
diff --git a/mozilla/directory/c-sdk/config/OpenBSD.mk b/mozilla/directory/c-sdk/config/OpenBSD.mk
index 8605388ef79..bf7336c8dde 100644
--- a/mozilla/directory/c-sdk/config/OpenBSD.mk
+++ b/mozilla/directory/c-sdk/config/OpenBSD.mk
@@ -43,6 +43,7 @@ include $(MOD_DEPTH)/config/UNIX.mk
CC = gcc
CCC = g++
+LD = ${CC}
RANLIB = ranlib
OS_REL_CFLAGS =
@@ -66,17 +67,6 @@ ARCH = openbsd
DLL_SUFFIX = so.1.0
DSO_CFLAGS = -fPIC
-DSO_LDOPTS = -Bshareable
-ifeq ($(OS_TEST),alpha)
DSO_LDOPTS = -shared
-endif
-ifeq ($(OS_TEST),mips)
-DSO_LDOPTS = -shared
-endif
-ifeq ($(OS_TEST),pmax)
-DSO_LDOPTS = -shared
-endif
MKSHLIB = $(LD) $(DSO_LDOPTS)
-
-G++INCLUDES = -I/usr/include/g++
diff --git a/mozilla/directory/c-sdk/configure.in b/mozilla/directory/c-sdk/configure.in
index 4c355cf1b95..0d92385cec3 100644
--- a/mozilla/directory/c-sdk/configure.in
+++ b/mozilla/directory/c-sdk/configure.in
@@ -1574,9 +1574,11 @@ mips-sony-newsos*)
;;
*-openbsd*)
+ LD='$(CC)'
AC_DEFINE(XP_UNIX)
AC_DEFINE(OPENBSD)
AC_DEFINE(HAVE_BSD_FLOCK)
+ AC_DEFINE(HAVE_SOCKLEN_T)
CFLAGS="$CFLAGS -ansi -Wall"
CXXFLAGS="$CXXFLAGS -ansi -Wall"
DLL_SUFFIX=so.1.0
@@ -1584,12 +1586,7 @@ mips-sony-newsos*)
MDCPUCFG_H=_openbsd.cfg
PR_MD_CSRCS=openbsd.c
USE_NSPR_THREADS=1
- case "$OS_TEST" in
- alpha|mips|pmax)
- DSO_LDOPTS=-shared ;;
- *)
- DSO_LDOPTS=-Bshareable ;;
- esac
+ DSO_LDOPTS='-shared -fPIC'
;;
*-openvms*)
diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp
index 50d3e11eb17..ac0bafef204 100644
--- a/mozilla/docshell/base/nsDocShell.cpp
+++ b/mozilla/docshell/base/nsDocShell.cpp
@@ -3204,21 +3204,20 @@ nsDocShell::Reload(PRUint32 aReloadFlags)
rv = LoadHistoryEntry(mLSHE, type);
}
else {
+ nsCOMPtr domDoc(do_GetInterface(GetAsSupports(this)));
+ nsCOMPtr doc(do_QueryInterface(domDoc));
+
+ nsIPrincipal* principal = nsnull;
nsAutoString contentTypeHint;
- nsCOMPtr window(do_GetInterface((nsIDocShell*)this));
- if (window) {
- nsCOMPtr document;
- window->GetDocument(getter_AddRefs(document));
- nsCOMPtr doc(do_QueryInterface(document));
- if (doc) {
- doc->GetContentType(contentTypeHint);
- }
+ if (doc) {
+ principal = doc->GetPrincipal();
+ doc->GetContentType(contentTypeHint);
}
rv = InternalLoad(mCurrentURI,
mReferrerURI,
- nsnull, // No owner
- INTERNAL_LOAD_FLAGS_INHERIT_OWNER, // Inherit owner from document
+ principal,
+ INTERNAL_LOAD_FLAGS_NONE, // Do not inherit owner from document
nsnull, // No window target
NS_LossyConvertUCS2toASCII(contentTypeHint).get(),
nsnull, // No post data
@@ -4851,7 +4850,38 @@ nsDocShell::EnsureContentViewer()
if (mIsBeingDestroyed)
return NS_ERROR_FAILURE;
- return CreateAboutBlankContentViewer();
+ nsIPrincipal* principal = nsnull;
+
+ nsCOMPtr piDOMWindow =
+ do_QueryInterface(mScriptGlobal);
+ if (piDOMWindow) {
+ principal = piDOMWindow->GetOpenerScriptPrincipal();
+ }
+
+ if (!principal) {
+ principal = GetInheritedPrincipal(PR_FALSE);
+ }
+
+ nsresult rv = CreateAboutBlankContentViewer();
+
+ if (NS_SUCCEEDED(rv)) {
+ nsCOMPtr domDoc;
+ mContentViewer->GetDOMDocument(getter_AddRefs(domDoc));
+ nsCOMPtr doc(do_QueryInterface(domDoc));
+ nsCOMPtr doc_MOZILLA_1_8_BRANCH2 =
+ do_QueryInterface(domDoc);
+ NS_ASSERTION(doc && doc_MOZILLA_1_8_BRANCH2,
+ "Should have doc if CreateAboutBlankContentViewer "
+ "succeeded!");
+
+ doc_MOZILLA_1_8_BRANCH2->SetIsInitialDocument(PR_TRUE);
+
+ if (principal) {
+ doc->SetPrincipal(principal);
+ }
+ }
+
+ return rv;
}
NS_IMETHODIMP
@@ -5158,6 +5188,12 @@ nsDocShell::BeginRestore(nsIContentViewer *aContentViewer, PRBool aTop)
}
if (!aTop) {
+ // This point corresponds to us having gotten OnStartRequest or
+ // STATE_START, so do the same thing that CreateContentViewer does at
+ // this point to ensure that unload/pagehide events for this document
+ // will fire when it's unloaded again.
+ mFiredUnloadEvent = PR_FALSE;
+
// For non-top frames, there is no notion of making sure that the
// previous document is in the domwindow when STATE_START notifications
// happen. We can just call BeginRestore for all of the child shells
@@ -6292,12 +6328,28 @@ nsDocShell::InternalLoad(nsIURI * aURI,
nsCOMPtr owner(aOwner);
//
- // Get an owner from the current document if necessary, but only
- // if this is not an external load.
+ // Get an owner from the current document if necessary. Note that we only
+ // do this for URIs that inherit a security context; in particular we do
+ // NOT do this for about:blank. This way, random about:blank loads that
+ // have no owner (which basically means they were done by someone from
+ // chrome manually messing with our nsIWebNavigation or by C++ setting
+ // document.location) don't get a funky principal. If callers want
+ // something interesting to happen with the about:blank principal in this
+ // case, they should pass an owner in.
//
if (aLoadType != LOAD_NORMAL_EXTERNAL && !owner &&
- (aFlags & INTERNAL_LOAD_FLAGS_INHERIT_OWNER))
- GetCurrentDocumentOwner(getter_AddRefs(owner));
+ (aFlags & INTERNAL_LOAD_FLAGS_INHERIT_OWNER)) {
+ PRBool inherits;
+ PRBool isScheme;
+ inherits =
+ (NS_SUCCEEDED(aURI->SchemeIs("javascript", &isScheme)) &&
+ isScheme) ||
+ (NS_SUCCEEDED(aURI->SchemeIs("data", &isScheme)) &&
+ isScheme);
+ if (inherits) {
+ owner = GetInheritedPrincipal(PR_TRUE);
+ }
+ }
//
// Resolve the window target before going any further...
@@ -6692,42 +6744,51 @@ nsDocShell::InternalLoad(nsIURI * aURI,
return rv;
}
-void
-nsDocShell::GetCurrentDocumentOwner(nsISupports ** aOwner)
+nsIPrincipal*
+nsDocShell::GetInheritedPrincipal(PRBool aConsiderCurrentDocument)
{
- *aOwner = nsnull;
nsCOMPtr document;
- //-- Get the current document
- if (mContentViewer) {
+
+ if (aConsiderCurrentDocument && mContentViewer) {
nsCOMPtr
docViewer(do_QueryInterface(mContentViewer));
if (!docViewer)
- return;
+ return nsnull;
docViewer->GetDocument(getter_AddRefs(document));
}
- else //-- If there's no document loaded yet, look at the parent (frameset)
- {
+
+ if (!document) {
nsCOMPtr parentItem;
GetSameTypeParent(getter_AddRefs(parentItem));
- if (!parentItem)
- return;
- nsCOMPtr
- parentWindow(do_GetInterface(parentItem));
- if (!parentWindow)
- return;
- nsCOMPtr parentDomDoc;
- parentWindow->GetDocument(getter_AddRefs(parentDomDoc));
- if (!parentDomDoc)
- return;
- document = do_QueryInterface(parentDomDoc);
+ if (parentItem) {
+ nsCOMPtr parentDomDoc(do_GetInterface(parentItem));
+ document = do_QueryInterface(parentDomDoc);
+ }
+ }
+
+ if (!document) {
+ if (!aConsiderCurrentDocument) {
+ return nsnull;
+ }
+
+ // Make sure we end up with _something_ as the principal no matter
+ // what.
+ EnsureContentViewer(); // If this fails, we'll just get a null
+ // docViewer and bail.
+
+ nsCOMPtr
+ docViewer(do_QueryInterface(mContentViewer));
+ if (!docViewer)
+ return nsnull;
+ docViewer->GetDocument(getter_AddRefs(document));
}
//-- Get the document's principal
if (document) {
- *aOwner = document->GetPrincipal();
+ return document->GetPrincipal();
}
- NS_IF_ADDREF(*aOwner);
+ return nsnull;
}
nsresult
@@ -6894,7 +6955,12 @@ nsDocShell::DoURILoad(nsIURI * aURI,
// Set the owner of the channel - only for javascript and data channels.
//
// XXX: Is seems wrong that the owner is ignored - even if one is
- // supplied) unless the URI is javascript or data.
+ // supplied) unless the URI is javascript or data or about:blank.
+ // XXX: If this is ever changed, check all callers for what owners they're
+ // passing in. In particular, see the code and comments in LoadURI
+ // where we fall back on inheriting the owner if called
+ // from chrome. That would be very wrong if this code changed
+ // anything but channels that can't provide their own security context!
//
// (Currently chrome URIs set the owner when they are created!
// So setting a NULL owner would be bad!)
@@ -6904,7 +6970,7 @@ nsDocShell::DoURILoad(nsIURI * aURI,
if (!isJSOrData) {
aURI->SchemeIs("data", &isJSOrData);
}
- if (isJSOrData) {
+ if (isJSOrData || IsAboutBlank(aURI)) {
channel->SetOwner(aOwner);
}
@@ -8729,3 +8795,21 @@ nsDocShell::GetAuthPrompt(PRUint32 aPromptReason, nsIAuthPrompt **aResult)
return wwatch->GetNewAuthPrompter(window, aResult);
}
+
+/* static */
+PRBool
+nsDocShell::IsAboutBlank(nsIURI* aURI)
+{
+ NS_PRECONDITION(aURI, "Must have URI");
+
+ // GetSpec can be expensive for some URIs, so check the scheme first.
+ PRBool isAbout = PR_FALSE;
+ if (NS_FAILED(aURI->SchemeIs("about", &isAbout)) || !isAbout) {
+ return PR_FALSE;
+ }
+
+ nsCAutoString str;
+ aURI->GetSpec(str);
+ return str.EqualsLiteral("about:blank");
+}
+
diff --git a/mozilla/docshell/base/nsDocShell.h b/mozilla/docshell/base/nsDocShell.h
index 10324f8ba92..c5a7d8b99df 100644
--- a/mozilla/docshell/base/nsDocShell.h
+++ b/mozilla/docshell/base/nsDocShell.h
@@ -226,7 +226,18 @@ protected:
void SetupReferrerFromChannel(nsIChannel * aChannel);
NS_IMETHOD GetEldestPresContext(nsPresContext** aPresContext);
- void GetCurrentDocumentOwner(nsISupports ** aOwner);
+
+ // Get the principal that we'll set on the channel if we're inheriting. If
+ // aConsiderCurrentDocument is true, we try to use the current document if
+ // at all possible. If that fails, we fall back on the parent document.
+ // If that fails too, we force creation of a content viewer and use the
+ // resulting principal. If aConsiderCurrentDocument is false, we just look
+ // at the parent.
+ nsIPrincipal* GetInheritedPrincipal(PRBool aConsiderCurrentDocument);
+
+ // Actually open a channel and perform a URI load. Note: whatever owner is
+ // passed to this function will be set on the channel. Callers who wish to
+ // not have an owner on the channel should just pass null.
virtual nsresult DoURILoad(nsIURI * aURI,
nsIURI * aReferrer,
PRBool aSendReferrer,
@@ -455,6 +466,9 @@ protected:
// Call BeginRestore(nsnull, PR_FALSE) for each child of this shell.
nsresult BeginRestoreChildren();
+ // Check whether aURI is about:blank
+ static PRBool IsAboutBlank(nsIURI* aURI);
+
protected:
// Override the parent setter from nsDocLoader
virtual nsresult SetDocLoaderParent(nsDocLoader * aLoader);
diff --git a/mozilla/dom/public/base/nsPIDOMWindow.h b/mozilla/dom/public/base/nsPIDOMWindow.h
index a40c9895b9b..60104edfe41 100644
--- a/mozilla/dom/public/base/nsPIDOMWindow.h
+++ b/mozilla/dom/public/base/nsPIDOMWindow.h
@@ -50,6 +50,8 @@
#include "nsIURI.h"
#include "nsCOMPtr.h"
+class nsIPrincipal;
+
// Popup control state enum. The values in this enum must go from most
// permissive to least permissive so that it's safe to push state in
// all situations. Pushing popup state onto the stack never makes the
@@ -250,6 +252,8 @@ public:
return win->mIsHandlingResizeEvent;
}
+ // DO NOT USE THIS FUNCTION. IT DOES NOTHING. USE
+ // SetOpenerScriptPrincipal INSTEAD.
virtual void SetOpenerScriptURL(nsIURI* aURI) = 0;
virtual PopupControlState PushPopupControlState(PopupControlState aState,
@@ -316,7 +320,6 @@ protected:
// These members are only used on outer windows.
nsIDOMElement *mFrameElement; // weak
- nsCOMPtr mOpenerScriptURL; // strong; used to determine whether to clear scope
// These variables are only used on inner windows.
nsTimeout *mRunningTimeout;
@@ -371,6 +374,31 @@ protected:
}
};
+#define NS_PIDOMWINDOW_MOZILLA_1_8_BRANCH2_IID \
+{ 0xddd4affd, 0x6ad4, 0x44b4, \
+ { 0xa8, 0xfc, 0x78, 0x1d, 0xbd, 0xf1, 0x87, 0x1d } }
+
+class nsPIDOMWindow_MOZILLA_1_8_BRANCH2 : public nsPIDOMWindow_MOZILLA_1_8_BRANCH
+{
+public:
+ NS_DEFINE_STATIC_IID_ACCESSOR(NS_PIDOMWINDOW_MOZILLA_1_8_BRANCH2_IID)
+
+ // Tell this window who opened it. This only has an effect if there is
+ // either no document currently in the window or if the document is the
+ // original document this window came with (an about:blank document either
+ // preloaded into it when it was created, or created by
+ // CreateAboutBlankContentViewer()).
+ virtual void SetOpenerScriptPrincipal(nsIPrincipal* aPrincipal) = 0;
+ // Ask this window who opened it.
+ virtual nsIPrincipal* GetOpenerScriptPrincipal() = 0;
+
+protected:
+ nsPIDOMWindow_MOZILLA_1_8_BRANCH2(nsPIDOMWindow *aOuterWindow)
+ : nsPIDOMWindow_MOZILLA_1_8_BRANCH(aOuterWindow)
+ {
+ }
+};
+
#ifdef _IMPL_NS_LAYOUT
PopupControlState
PushPopupControlState(PopupControlState aState, PRBool aForce);
diff --git a/mozilla/dom/src/base/nsDOMClassInfo.cpp b/mozilla/dom/src/base/nsDOMClassInfo.cpp
index 6b926568bfc..0ff0dc8c00d 100644
--- a/mozilla/dom/src/base/nsDOMClassInfo.cpp
+++ b/mozilla/dom/src/base/nsDOMClassInfo.cpp
@@ -6715,6 +6715,17 @@ nsEventReceiverSH::AddEventListenerHelper(JSContext *cx, JSObject *obj,
return JS_FALSE;
}
+ // Can't use the macro OBJ_TO_INNER_OBJECT here due to it using the
+ // non-exported function js_GetSlotThreadSafe().
+ {
+ JSClass *clasp = JS_GET_CLASS(cx, obj);
+ if (clasp->flags & JSCLASS_IS_EXTENDED) {
+ JSExtendedClass *xclasp = (JSExtendedClass*)clasp;
+ if (xclasp->innerObject)
+ obj = xclasp->innerObject(cx, obj);
+ }
+ }
+
nsCOMPtr wrapper;
nsresult rv =
sXPConnect->GetWrappedNativeOfJSObject(cx, obj, getter_AddRefs(wrapper));
@@ -7015,26 +7026,31 @@ nsElementSH::PostCreate(nsIXPConnectWrappedNative *wrapper, JSContext *cx,
nsPresContext *pctx = shell->GetPresContext();
NS_ENSURE_TRUE(pctx, NS_ERROR_UNEXPECTED);
- nsRefPtr sc = pctx->StyleSet()->ResolveStyleFor(content,
- nsnull);
- NS_ENSURE_TRUE(sc, NS_ERROR_FAILURE);
-
- nsIURI *bindingURL = sc->GetStyleDisplay()->mBinding;
- if (!bindingURL) {
- // No binding, nothing left to do here.
- return NS_OK;
- }
-
- // We have a binding that must be installed.
- PRBool dummy;
-
- nsCOMPtr xblService(do_GetService("@mozilla.org/xbl;1"));
- NS_ENSURE_TRUE(xblService, NS_ERROR_NOT_AVAILABLE);
-
+ // Make sure the style context goes away _before_ we execute the binding
+ // constructor, since the constructor can destroy the relevant presshell.
nsRefPtr binding;
- xblService->LoadBindings(content, bindingURL, PR_FALSE,
- getter_AddRefs(binding), &dummy);
+ {
+ // Scope for the nsRefPtr
+ nsRefPtr sc = pctx->StyleSet()->ResolveStyleFor(content,
+ nsnull);
+ NS_ENSURE_TRUE(sc, NS_ERROR_FAILURE);
+ nsIURI *bindingURL = sc->GetStyleDisplay()->mBinding;
+ if (!bindingURL) {
+ // No binding, nothing left to do here.
+ return NS_OK;
+ }
+
+ // We have a binding that must be installed.
+ PRBool dummy;
+
+ nsCOMPtr xblService(do_GetService("@mozilla.org/xbl;1"));
+ NS_ENSURE_TRUE(xblService, NS_ERROR_NOT_AVAILABLE);
+
+ xblService->LoadBindings(content, bindingURL, PR_FALSE,
+ getter_AddRefs(binding), &dummy);
+ }
+
if (binding) {
binding->ExecuteAttachedHandler();
}
diff --git a/mozilla/dom/src/base/nsGlobalWindow.cpp b/mozilla/dom/src/base/nsGlobalWindow.cpp
index a2facc3239d..d0f8b148596 100644
--- a/mozilla/dom/src/base/nsGlobalWindow.cpp
+++ b/mozilla/dom/src/base/nsGlobalWindow.cpp
@@ -303,13 +303,28 @@ static const char kDOMSecurityWarningsBundleURL[] = "chrome://global/locale/dom/
static const char kCryptoContractID[] = NS_CRYPTO_CONTRACTID;
static const char kPkcs11ContractID[] = NS_PKCS11_CONTRACTID;
+static PRBool
+IsAboutBlank(nsIURI* aURI)
+{
+ NS_PRECONDITION(aURI, "Must have URI");
+
+ // GetSpec can be expensive for some URIs, so check the scheme first.
+ PRBool isAbout = PR_FALSE;
+ if (NS_FAILED(aURI->SchemeIs("about", &isAbout)) || !isAbout) {
+ return PR_FALSE;
+ }
+
+ nsCAutoString str;
+ aURI->GetSpec(str);
+ return str.EqualsLiteral("about:blank");
+}
//*****************************************************************************
//*** nsGlobalWindow: Object Management
//*****************************************************************************
nsGlobalWindow::nsGlobalWindow(nsGlobalWindow *aOuterWindow)
- : nsPIDOMWindow_MOZILLA_1_8_BRANCH(aOuterWindow),
+ : nsPIDOMWindow_MOZILLA_1_8_BRANCH2(aOuterWindow),
mIsFrozen(PR_FALSE),
mFullScreen(PR_FALSE),
mIsClosed(PR_FALSE),
@@ -563,6 +578,7 @@ NS_INTERFACE_MAP_BEGIN(nsGlobalWindow)
NS_INTERFACE_MAP_ENTRY(nsIDOMNSEventTarget)
NS_INTERFACE_MAP_ENTRY(nsPIDOMWindow)
NS_INTERFACE_MAP_ENTRY(nsPIDOMWindow_MOZILLA_1_8_BRANCH)
+ NS_INTERFACE_MAP_ENTRY(nsPIDOMWindow_MOZILLA_1_8_BRANCH2)
NS_INTERFACE_MAP_ENTRY(nsIDOMViewCSS)
NS_INTERFACE_MAP_ENTRY(nsIDOMAbstractView)
NS_INTERFACE_MAP_ENTRY(nsIDOMStorageWindow)
@@ -624,71 +640,53 @@ nsGlobalWindow::GetContext()
PRBool
nsGlobalWindow::WouldReuseInnerWindow(nsIDocument *aNewDocument)
-{
- return WouldReuseInnerWindow(aNewDocument, PR_TRUE);
-}
-
-PRBool
-nsGlobalWindow::WouldReuseInnerWindow(nsIDocument *aNewDocument, PRBool useDocURI)
{
// We reuse the inner window when:
- // a. We are currently at about:blank
+ // a. We are currently at our original document.
// b. At least one of the following conditions are true:
// -- We are not currently a content window (i.e., we're currently a chrome
// window).
// -- The new document is the same as the old document. This means that we're
// getting called from document.open().
- // -- The new URI has the same origin as the script opener uri for our current
- // window.
+ // -- The new document has the same origin as what we have loaded right now.
nsCOMPtr curDoc(do_QueryInterface(mDocument));
- if (!curDoc || !aNewDocument) {
+ nsCOMPtr curDoc_MOZILLA_1_8_BRANCH2 =
+ do_QueryInterface(mDocument);
+ if (!curDoc || !curDoc_MOZILLA_1_8_BRANCH2 || !aNewDocument) {
return PR_FALSE;
}
- nsCOMPtr newURI;
- if (useDocURI) {
- newURI = aNewDocument->GetDocumentURI();
- } else {
- nsCOMPtr webNav(do_QueryInterface(mDocShell));
-
- if (webNav) {
- webNav->GetCurrentURI(getter_AddRefs(newURI));
- }
- }
-
- nsIURI* curURI = curDoc->GetDocumentURI();
- if (!curURI || !newURI) {
+ nsIPrincipal* newPrincipal = aNewDocument->GetPrincipal();
+ if (!newPrincipal) {
+ // Play it safe
return PR_FALSE;
}
-
- PRBool isAbout;
- if (NS_FAILED(curURI->SchemeIs("about", &isAbout)) || !isAbout) {
- return PR_FALSE;
- }
-
- nsCAutoString uri;
- curURI->GetSpec(uri);
- if (!uri.EqualsLiteral("about:blank")) {
+
+ if (!curDoc_MOZILLA_1_8_BRANCH2->IsInitialDocument()) {
return PR_FALSE;
}
- // Great, we're an about:blank document, check for one of the other
- // conditions.
+ NS_ASSERTION(IsAboutBlank(curDoc->GetDocumentURI()),
+ "How'd this happen?");
+
+ // Great, we're the original document, check for one of the other
if (curDoc == aNewDocument) {
// aClearScopeHint is false.
return PR_TRUE;
}
- if (mOpenerScriptURL) {
- if (sSecMan) {
- PRBool isSameOrigin = PR_FALSE;
- sSecMan->SecurityCompareURIs(mOpenerScriptURL, newURI, &isSameOrigin);
- if (isSameOrigin) {
- // The origin is the same.
- return PR_TRUE;
- }
- }
+ nsIPrincipal* curPrincipal = curDoc->GetPrincipal();
+ if (!curPrincipal) {
+ // Play it safe
+ return PR_FALSE;
+ }
+
+ if (nsContentUtils::GetSecurityManager() &&
+ NS_SUCCEEDED(nsContentUtils::GetSecurityManager()->
+ CheckSameOriginPrincipal(curPrincipal, newPrincipal))) {
+ // The origin is the same.
+ return PR_TRUE;
}
nsCOMPtr treeItem(do_QueryInterface(mDocShell));
@@ -708,9 +706,49 @@ nsGlobalWindow::WouldReuseInnerWindow(nsIDocument *aNewDocument, PRBool useDocUR
void
nsGlobalWindow::SetOpenerScriptURL(nsIURI* aURI)
{
- FORWARD_TO_OUTER_VOID(SetOpenerScriptURL, (aURI));
+}
- mOpenerScriptURL = aURI;
+void
+nsGlobalWindow::SetOpenerScriptPrincipal(nsIPrincipal* aPrincipal)
+{
+ FORWARD_TO_OUTER_VOID(SetOpenerScriptPrincipal, (aPrincipal));
+
+ nsCOMPtr curDoc(do_QueryInterface(mDocument));
+ nsCOMPtr curDoc_MOZILLA_1_8_BRANCH2 =
+ do_QueryInterface(mDocument);
+ if (curDoc && curDoc_MOZILLA_1_8_BRANCH2) {
+ if (!curDoc_MOZILLA_1_8_BRANCH2->IsInitialDocument()) {
+ // We have a document already, and it's not the original one. Bail out.
+ // Do NOT set mOpenerScriptPrincipal in this case, just to be safe.
+ return;
+ }
+
+#ifdef DEBUG
+ // We better have an about:blank document loaded at this point. Otherwise,
+ // something is really weird.
+ if (curDoc->GetPrincipal()) {
+ nsCOMPtr uri;
+ curDoc->GetPrincipal()->GetURI(getter_AddRefs(uri));
+ NS_ASSERTION(uri && IsAboutBlank(uri) &&
+ IsAboutBlank(curDoc->GetDocumentURI()),
+ "Unexpected original document");
+ }
+#endif
+
+ // Set the opener principal on our document; given the above check, this
+ // is safe.
+ curDoc->SetPrincipal(aPrincipal);
+ }
+
+ mOpenerScriptPrincipal = aPrincipal;
+}
+
+nsIPrincipal*
+nsGlobalWindow::GetOpenerScriptPrincipal()
+{
+ FORWARD_TO_OUTER(GetOpenerScriptPrincipal, (), nsnull);
+
+ return mOpenerScriptPrincipal;
}
PopupControlState
@@ -995,7 +1033,7 @@ nsGlobalWindow::SetNewDocument(nsIDOMDocument* aDocument,
// check xpc here.
nsIXPConnect *xpc = nsContentUtils::XPConnect();
- PRBool reUseInnerWindow = WouldReuseInnerWindow(newDoc, PR_FALSE);
+ PRBool reUseInnerWindow = WouldReuseInnerWindow(newDoc);
// XXX We used to share event listeners between inner windows in special
// circumstances (that were remarkably close to the conditions that we set
@@ -3602,6 +3640,7 @@ nsGlobalWindow::Focus()
if (mDocShell) {
// Don't look for a presshell if we're a root chrome window that's got
// about:blank loaded. We don't want to focus our widget in that case.
+ // XXXbz should we really be checking for IsInitialDocument() instead?
PRBool lookForPresShell = PR_TRUE;
PRInt32 itemType = nsIDocShellTreeItem::typeContent;
nsCOMPtr treeItem(do_QueryInterface(mDocShell));
@@ -3613,12 +3652,8 @@ nsGlobalWindow::Focus()
nsCOMPtr doc(do_QueryInterface(mDocument));
NS_ASSERTION(doc, "Bogus doc?");
nsIURI* ourURI = doc->GetDocumentURI();
- PRBool isAbout;
- if (ourURI && NS_SUCCEEDED(ourURI->SchemeIs("about", &isAbout)) &&
- isAbout) {
- nsCAutoString spec;
- ourURI->GetSpec(spec);
- lookForPresShell = !spec.EqualsLiteral("about:blank");
+ if (ourURI) {
+ lookForPresShell = !IsAboutBlank(ourURI);
}
}
@@ -6217,65 +6252,41 @@ nsGlobalWindow::OpenInternal(const nsAString& aUrl, const nsAString& aName,
// success!
- if (domReturn) {
- // Save the principal of the calling script
- // We need it to decide whether to clear the scope in SetNewDocument
- NS_ASSERTION(sSecMan, "No Security Manager Found!");
- // Note that the opener script URL is not relevant for openDialog
- // callers, since those already have chrome privileges. So we
- // only want to do this wen aDoJSFixups is true.
- if (aDoJSFixups && sSecMan) {
- nsCOMPtr principal;
- sSecMan->GetSubjectPrincipal(getter_AddRefs(principal));
- if (principal) {
- nsCOMPtr subjectURI;
- principal->GetURI(getter_AddRefs(subjectURI));
- if (subjectURI) {
- nsCOMPtr domReturnPrivate(do_QueryInterface(domReturn));
- domReturnPrivate->SetOpenerScriptURL(subjectURI);
- }
- }
- }
+ domReturn.swap(*aReturn);
- domReturn.swap(*aReturn);
- }
-
- if (NS_SUCCEEDED(rv)) {
- if (aDoJSFixups) {
- nsCOMPtr chrome_win(do_QueryInterface(*aReturn));
- if (!chrome_win) {
- // A new non-chrome window was created from a call to
- // window.open() from JavaScript, make sure there's a document in
- // the new window. We do this by simply asking the new window for
- // its document, this will synchronously create an empty document
- // if there is no document in the window.
- // XXXbz should this just use EnsureInnerWindow()?
+ if (aDoJSFixups) {
+ nsCOMPtr chrome_win(do_QueryInterface(*aReturn));
+ if (!chrome_win) {
+ // A new non-chrome window was created from a call to
+ // window.open() from JavaScript, make sure there's a document in
+ // the new window. We do this by simply asking the new window for
+ // its document, this will synchronously create an empty document
+ // if there is no document in the window.
#ifdef DEBUG_jst
- {
- nsCOMPtr pidomwin(do_QueryInterface(*aReturn));
+ {
+ nsCOMPtr pidomwin(do_QueryInterface(*aReturn));
- nsIDOMDocument *temp = pidomwin->GetExtantDocument();
+ nsIDOMDocument *temp = pidomwin->GetExtantDocument();
- NS_ASSERTION(temp, "No document in new window!!!");
- }
+ NS_ASSERTION(temp, "No document in new window!!!");
+ }
#endif
- nsCOMPtr doc;
- (*aReturn)->GetDocument(getter_AddRefs(doc));
- }
+ nsCOMPtr doc;
+ (*aReturn)->GetDocument(getter_AddRefs(doc));
}
+ }
- if (checkForPopup) {
- if (abuseLevel >= openControlled) {
- nsGlobalWindow *opened = NS_STATIC_CAST(nsGlobalWindow *, *aReturn);
- if (!opened->IsPopupSpamWindow()) {
- opened->SetPopupSpamWindow(PR_TRUE);
- ++gOpenPopupSpamCount;
- }
+ if (checkForPopup) {
+ if (abuseLevel >= openControlled) {
+ nsGlobalWindow *opened = NS_STATIC_CAST(nsGlobalWindow *, *aReturn);
+ if (!opened->IsPopupSpamWindow()) {
+ opened->SetPopupSpamWindow(PR_TRUE);
+ ++gOpenPopupSpamCount;
}
- if (abuseLevel >= openAbused)
- FireAbuseEvents(PR_FALSE, PR_TRUE, aUrl, aOptions);
}
+ if (abuseLevel >= openAbused)
+ FireAbuseEvents(PR_FALSE, PR_TRUE, aUrl, aOptions);
}
// copy the session storage data over to the new window if
@@ -6441,6 +6452,12 @@ nsGlobalWindow::SetTimeoutOrInterval(PRBool aIsInterval, PRInt32 *aReturn)
return ncc->SetExceptionWasThrown(PR_TRUE);
}
+ // If we don't have a document (we could have been unloaded since
+ // the call to setTimeout was made), do nothing.
+ if (!mDocument) {
+ return NS_OK;
+ }
+
if (interval < DOM_MIN_TIMEOUT_VALUE) {
// Don't allow timeouts less than DOM_MIN_TIMEOUT_VALUE from
// now...
diff --git a/mozilla/dom/src/base/nsGlobalWindow.h b/mozilla/dom/src/base/nsGlobalWindow.h
index b13e05065ea..4acba9be1d9 100644
--- a/mozilla/dom/src/base/nsGlobalWindow.h
+++ b/mozilla/dom/src/base/nsGlobalWindow.h
@@ -136,7 +136,7 @@ class WindowStateHolder;
// belonging to the same outer window, but that's an unimportant
// side effect of inheriting PRCList).
-class nsGlobalWindow : public nsPIDOMWindow_MOZILLA_1_8_BRANCH,
+class nsGlobalWindow : public nsPIDOMWindow_MOZILLA_1_8_BRANCH2,
public nsIScriptGlobalObject,
public nsIDOMJSWindow,
public nsIScriptObjectPrincipal,
@@ -247,6 +247,10 @@ public:
virtual NS_HIDDEN_(void) EnterModalState();
virtual NS_HIDDEN_(void) LeaveModalState();
+ // nsPIDOMWindow_MOZILLA_1_8_BRANCH2
+ virtual NS_HIDDEN_(void) SetOpenerScriptPrincipal(nsIPrincipal* aPrincipal);
+ virtual NS_HIDDEN_(nsIPrincipal*) GetOpenerScriptPrincipal();
+
// nsIDOMViewCSS
NS_DECL_NSIDOMVIEWCSS
@@ -328,8 +332,6 @@ protected:
PRBool aClearScopeHint,
PRBool aIsInternalCall);
- PRBool WouldReuseInnerWindow(nsIDocument *aNewDocument, PRBool useDocURI);
-
// Get the parent, returns null if this is a toplevel window
nsIDOMWindowInternal *GetParentInternal();
@@ -540,6 +542,8 @@ protected:
nsCOMPtr gGlobalStorageList;
nsCOMPtr mInnerWindowHolder;
+ nsCOMPtr mOpenerScriptPrincipal; // strong; used to determine
+ // whether to clear scope
// These member variable are used only on inner windows.
nsCOMPtr mListenerManager;
diff --git a/mozilla/dom/src/jsurl/nsJSProtocolHandler.cpp b/mozilla/dom/src/jsurl/nsJSProtocolHandler.cpp
index 0c69e3939ba..b697a1ebc57 100644
--- a/mozilla/dom/src/jsurl/nsJSProtocolHandler.cpp
+++ b/mozilla/dom/src/jsurl/nsJSProtocolHandler.cpp
@@ -236,10 +236,8 @@ nsresult nsJSThunk::EvaluateScript(nsIChannel *aChannel)
if (!principal)
return NS_ERROR_FAILURE;
- //-- Don't run if the script principal is different from the
- // principal of the context, with two exceptions: we allow
- // the script to run if the script has the system principal
- // or the context is about:blank.
+ //-- Don't run if the script principal is different from the principal
+ // of the context, unless the script has the system principal.
nsCOMPtr objectPrincipal;
rv = securityManager->GetObjectPrincipal(
(JSContext*)scriptContext->GetNativeContext(),
diff --git a/mozilla/editor/composer/src/nsComposerCommandsUpdater.cpp b/mozilla/editor/composer/src/nsComposerCommandsUpdater.cpp
index d886290eb03..591442127cd 100644
--- a/mozilla/editor/composer/src/nsComposerCommandsUpdater.cpp
+++ b/mozilla/editor/composer/src/nsComposerCommandsUpdater.cpp
@@ -50,14 +50,12 @@
#include "nsString.h"
#include "nsICommandManager.h"
-#include "nsPICommandUpdater.h"
#include "nsIDocShell.h"
#include "nsITransactionManager.h"
nsComposerCommandsUpdater::nsComposerCommandsUpdater()
: mDOMWindow(nsnull)
-, mDocShell(nsnull)
, mDirtyState(eStateUninitialized)
, mSelectionCollapsed(eStateUninitialized)
, mFirstDoOfFirstUndo(PR_TRUE)
@@ -249,7 +247,7 @@ nsComposerCommandsUpdater::Init(nsIDOMWindow* aDOMWindow)
nsCOMPtr scriptObject(do_QueryInterface(aDOMWindow));
if (scriptObject)
{
- mDocShell = scriptObject->GetDocShell();
+ mDocShell = do_GetWeakReference(scriptObject->GetDocShell());
}
return NS_OK;
}
@@ -302,10 +300,7 @@ nsComposerCommandsUpdater::UpdateDirtyState(PRBool aNowDirty)
nsresult
nsComposerCommandsUpdater::UpdateCommandGroup(const nsAString& aCommandGroup)
{
- if (!mDocShell) return NS_ERROR_FAILURE;
-
- nsCOMPtr commandManager = do_GetInterface(mDocShell);
- nsCOMPtr commandUpdater = do_QueryInterface(commandManager);
+ nsCOMPtr commandUpdater = GetCommandUpdater();
if (!commandUpdater) return NS_ERROR_FAILURE;
@@ -359,10 +354,7 @@ nsComposerCommandsUpdater::UpdateCommandGroup(const nsAString& aCommandGroup)
nsresult
nsComposerCommandsUpdater::UpdateOneCommand(const char *aCommand)
{
- if (!mDocShell) return NS_ERROR_FAILURE;
-
- nsCOMPtr commandManager = do_GetInterface(mDocShell);
- nsCOMPtr commandUpdater = do_QueryInterface(commandManager);
+ nsCOMPtr commandUpdater = GetCommandUpdater();
if (!commandUpdater) return NS_ERROR_FAILURE;
commandUpdater->CommandStatusChanged(aCommand);
@@ -388,6 +380,18 @@ nsComposerCommandsUpdater::SelectionIsCollapsed()
return PR_FALSE;
}
+already_AddRefed
+nsComposerCommandsUpdater::GetCommandUpdater()
+{
+ nsCOMPtr docShell = do_QueryReferent(mDocShell);
+ NS_ENSURE_TRUE(docShell, nsnull);
+ nsCOMPtr manager = do_GetInterface(docShell);
+ nsCOMPtr updater = do_QueryInterface(manager);
+ nsPICommandUpdater* retVal = nsnull;
+ updater.swap(retVal);
+ return retVal;
+}
+
#if 0
#pragma mark -
#endif
diff --git a/mozilla/editor/composer/src/nsComposerCommandsUpdater.h b/mozilla/editor/composer/src/nsComposerCommandsUpdater.h
index 75c9b32376b..a660e356d60 100644
--- a/mozilla/editor/composer/src/nsComposerCommandsUpdater.h
+++ b/mozilla/editor/composer/src/nsComposerCommandsUpdater.h
@@ -47,6 +47,8 @@
#include "nsCOMPtr.h"
#include "nsITimer.h"
+#include "nsWeakPtr.h"
+#include "nsPICommandUpdater.h"
#include "nsISelectionListener.h"
#include "nsIDocumentStateListener.h"
@@ -110,13 +112,15 @@ protected:
nsresult UpdateDirtyState(PRBool aNowDirty);
nsresult UpdateOneCommand(const char* aCommand);
nsresult UpdateCommandGroup(const nsAString& aCommandGroup);
+
+ already_AddRefed GetCommandUpdater();
nsresult PrimeUpdateTimer();
void TimerCallback();
nsCOMPtr mUpdateTimer;
nsIDOMWindow* mDOMWindow; // Weak reference
- nsIDocShell* mDocShell; // Weak reference
+ nsWeakPtr mDocShell;
PRInt8 mDirtyState;
PRInt8 mSelectionCollapsed;
PRPackedBool mFirstDoOfFirstUndo;
diff --git a/mozilla/editor/libeditor/base/PlaceholderTxn.cpp b/mozilla/editor/libeditor/base/PlaceholderTxn.cpp
index 1c7ed81ab4b..7460eda5e47 100644
--- a/mozilla/editor/libeditor/base/PlaceholderTxn.cpp
+++ b/mozilla/editor/libeditor/base/PlaceholderTxn.cpp
@@ -39,6 +39,7 @@
#include "PlaceholderTxn.h"
#include "nsEditor.h"
#include "IMETextTxn.h"
+#include "nsAutoPtr.h"
PlaceholderTxn::PlaceholderTxn() : EditAggregateTxn(),
mAbsorb(PR_TRUE),
@@ -156,8 +157,8 @@ NS_IMETHODIMP PlaceholderTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMe
// we are absorbing all txn's if mAbsorb is lit.
if (mAbsorb)
{
- IMETextTxn* otherTxn = nsnull;
- if (NS_SUCCEEDED(aTransaction->QueryInterface(IMETextTxn::GetCID(),(void**)&otherTxn)) && otherTxn)
+ nsRefPtr otherTxn;
+ if (NS_SUCCEEDED(aTransaction->QueryInterface(IMETextTxn::GetCID(), getter_AddRefs(otherTxn))) && otherTxn)
{
// special handling for IMETextTxn's: they need to merge with any previous
// IMETextTxn in this placeholder, if possible.
@@ -180,7 +181,6 @@ NS_IMETHODIMP PlaceholderTxn::Merge(nsITransaction *aTransaction, PRBool *aDidMe
AppendChild(editTxn);
}
}
- NS_IF_RELEASE(otherTxn);
}
else if (!plcTxn) // see bug 171243: just drop incoming placeholders on the floor.
{ // their children will be swallowed by this preexisting one.
diff --git a/mozilla/editor/libeditor/base/nsEditor.cpp b/mozilla/editor/libeditor/base/nsEditor.cpp
index 3a35de4f6e3..81e8314cd5c 100644
--- a/mozilla/editor/libeditor/base/nsEditor.cpp
+++ b/mozilla/editor/libeditor/base/nsEditor.cpp
@@ -693,8 +693,9 @@ nsEditor::DoTransaction(nsITransaction *aTxn)
// this transaction goes through here. I bet this is a record.
// We start off with an EditTxn since that's what the factory returns.
- EditTxn *editTxn;
- result = TransactionFactory::GetNewTransaction(PlaceholderTxn::GetCID(), &editTxn);
+ nsRefPtr editTxn;
+ result = TransactionFactory::GetNewTransaction(PlaceholderTxn::GetCID(),
+ getter_AddRefs(editTxn));
if (NS_FAILED(result)) { return result; }
if (!editTxn) { return NS_ERROR_NULL_POINTER; }
@@ -731,9 +732,6 @@ nsEditor::DoTransaction(nsITransaction *aTxn)
}
}
}
-
- // txn mgr will now own this if it's around, and if it isn't we don't care
- NS_IF_RELEASE(editTxn);
}
if (aTxn)
@@ -1004,8 +1002,6 @@ nsEditor::EndPlaceHolderTransaction()
{
nsCOMPtrselection;
nsresult rv = GetSelection(getter_AddRefs(selection));
- if (NS_FAILED(rv))
- return rv;
nsCOMPtrselPrivate(do_QueryInterface(selection));
@@ -1309,13 +1305,12 @@ nsEditor::InsertFromDrop(nsIDOMEvent *aEvent)
NS_IMETHODIMP
nsEditor::SetAttribute(nsIDOMElement *aElement, const nsAString & aAttribute, const nsAString & aValue)
{
- ChangeAttributeTxn *txn;
- nsresult result = CreateTxnForSetAttribute(aElement, aAttribute, aValue, &txn);
+ nsRefPtr txn;
+ nsresult result = CreateTxnForSetAttribute(aElement, aAttribute, aValue,
+ getter_AddRefs(txn));
if (NS_SUCCEEDED(result)) {
result = DoTransaction(txn);
}
- // The transaction system (if any) has taken ownership of txn
- NS_IF_RELEASE(txn);
return result;
}
@@ -1345,13 +1340,12 @@ nsEditor::GetAttributeValue(nsIDOMElement *aElement,
NS_IMETHODIMP
nsEditor::RemoveAttribute(nsIDOMElement *aElement, const nsAString& aAttribute)
{
- ChangeAttributeTxn *txn;
- nsresult result = CreateTxnForRemoveAttribute(aElement, aAttribute, &txn);
+ nsRefPtr txn;
+ nsresult result = CreateTxnForRemoveAttribute(aElement, aAttribute,
+ getter_AddRefs(txn));
if (NS_SUCCEEDED(result)) {
result = DoTransaction(txn);
}
- // The transaction system (if any) has taken ownership of txn
- NS_IF_RELEASE(txn);
return result;
}
@@ -1468,8 +1462,9 @@ NS_IMETHODIMP nsEditor::CreateNode(const nsAString& aTag,
}
}
- CreateElementTxn *txn;
- nsresult result = CreateTxnForCreateElement(aTag, aParent, aPosition, &txn);
+ nsRefPtr txn;
+ nsresult result = CreateTxnForCreateElement(aTag, aParent, aPosition,
+ getter_AddRefs(txn));
if (NS_SUCCEEDED(result))
{
result = DoTransaction(txn);
@@ -1479,8 +1474,6 @@ NS_IMETHODIMP nsEditor::CreateNode(const nsAString& aTag,
NS_ASSERTION((NS_SUCCEEDED(result)), "GetNewNode can't fail if txn::DoTransaction succeeded.");
}
}
- // The transaction system (if any) has taken ownership of txn
- NS_IF_RELEASE(txn);
mRangeUpdater.SelAdjCreateNode(aParent, aPosition);
@@ -1516,13 +1509,12 @@ NS_IMETHODIMP nsEditor::InsertNode(nsIDOMNode * aNode,
}
}
- InsertElementTxn *txn;
- nsresult result = CreateTxnForInsertElement(aNode, aParent, aPosition, &txn);
+ nsRefPtr txn;
+ nsresult result = CreateTxnForInsertElement(aNode, aParent, aPosition,
+ getter_AddRefs(txn));
if (NS_SUCCEEDED(result)) {
result = DoTransaction(txn);
}
- // The transaction system (if any) has taken ownership of txn
- NS_IF_RELEASE(txn);
mRangeUpdater.SelAdjInsertNode(aParent, aPosition);
@@ -1559,8 +1551,8 @@ nsEditor::SplitNode(nsIDOMNode * aNode,
}
}
- SplitElementTxn *txn;
- nsresult result = CreateTxnForSplitNode(aNode, aOffset, &txn);
+ nsRefPtr txn;
+ nsresult result = CreateTxnForSplitNode(aNode, aOffset, getter_AddRefs(txn));
if (NS_SUCCEEDED(result))
{
result = DoTransaction(txn);
@@ -1570,8 +1562,6 @@ nsEditor::SplitNode(nsIDOMNode * aNode,
NS_ASSERTION((NS_SUCCEEDED(result)), "result must succeeded for GetNewNode");
}
}
- // The transaction system (if any) has taken ownership of txn
- NS_IF_RELEASE(txn);
mRangeUpdater.SelAdjSplitNode(aNode, aOffset, *aNewLeftNode);
@@ -1621,15 +1611,12 @@ nsEditor::JoinNodes(nsIDOMNode * aLeftNode,
}
}
- JoinElementTxn *txn;
- result = CreateTxnForJoinNode(aLeftNode, aRightNode, &txn);
+ nsRefPtr txn;
+ result = CreateTxnForJoinNode(aLeftNode, aRightNode, getter_AddRefs(txn));
if (NS_SUCCEEDED(result)) {
result = DoTransaction(txn);
}
- // The transaction system (if any) has taken ownership of txn
- NS_IF_RELEASE(txn);
-
mRangeUpdater.SelAdjJoinNodes(aLeftNode, aRightNode, aParent, offset, (PRInt32)oldLeftNodeLen);
if (mActionListeners)
@@ -1667,15 +1654,12 @@ NS_IMETHODIMP nsEditor::DeleteNode(nsIDOMNode * aElement)
}
}
- DeleteElementTxn *txn;
- result = CreateTxnForDeleteElement(aElement, &txn);
+ nsRefPtr txn;
+ result = CreateTxnForDeleteElement(aElement, getter_AddRefs(txn));
if (NS_SUCCEEDED(result)) {
result = DoTransaction(txn);
}
- // The transaction system (if any) has taken ownership of txn
- NS_IF_RELEASE(txn);
-
if (mActionListeners)
{
for (i = 0; i < mActionListeners->Count(); i++)
@@ -2815,7 +2799,7 @@ NS_IMETHODIMP nsEditor::InsertTextIntoTextNodeImpl(const nsAString& aStringToIns
nsIDOMCharacterData *aTextNode,
PRInt32 aOffset, PRBool suppressIME)
{
- EditTxn *txn;
+ nsRefPtr txn;
nsresult result;
// suppressIME s used when editor must insert text, yet this text is not
// part of current ime operation. example: adjusting whitespace around an ime insertion.
@@ -2864,13 +2848,18 @@ NS_IMETHODIMP nsEditor::InsertTextIntoTextNodeImpl(const nsAString& aStringToIns
} // for
} // if
- result = CreateTxnForIMEText(aStringToInsert, (IMETextTxn**)&txn);
+ nsRefPtr imeTxn;
+ result = CreateTxnForIMEText(aStringToInsert, getter_AddRefs(imeTxn));
+ txn = imeTxn;
}
else
{
- result = CreateTxnForInsertText(aStringToInsert, aTextNode, aOffset, (InsertTextTxn**)&txn);
+ nsRefPtr insertTxn;
+ result = CreateTxnForInsertText(aStringToInsert, aTextNode, aOffset,
+ getter_AddRefs(insertTxn));
+ txn = insertTxn;
}
- if (NS_FAILED(result)) return result; // we potentially leak txn here?
+ if (NS_FAILED(result)) return result;
// let listeners know whats up
PRInt32 i;
@@ -2921,13 +2910,10 @@ NS_IMETHODIMP nsEditor::InsertTextIntoTextNodeImpl(const nsAString& aStringToIns
{
DeleteNode(mIMETextNode);
mIMETextNode = nsnull;
- ((IMETextTxn*)txn)->MarkFixed(); // mark the ime txn "fixed"
+ ((IMETextTxn*)txn.get())->MarkFixed(); // mark the ime txn "fixed"
}
}
- // The transaction system (if any) has taken ownership of txns.
- // aggTxn released at end of routine.
- NS_IF_RELEASE(txn);
return result;
}
@@ -3081,8 +3067,9 @@ NS_IMETHODIMP nsEditor::DeleteText(nsIDOMCharacterData *aElement,
PRUint32 aOffset,
PRUint32 aLength)
{
- DeleteTextTxn *txn;
- nsresult result = CreateTxnForDeleteText(aElement, aOffset, aLength, &txn);
+ nsRefPtr txn;
+ nsresult result = CreateTxnForDeleteText(aElement, aOffset, aLength,
+ getter_AddRefs(txn));
nsAutoRules beginRulesSniffing(this, kOpDeleteText, nsIEditor::ePrevious);
if (NS_SUCCEEDED(result))
{
@@ -3112,8 +3099,6 @@ NS_IMETHODIMP nsEditor::DeleteText(nsIDOMCharacterData *aElement,
}
}
}
- // The transaction system (if any) has taken ownership of txn
- NS_IF_RELEASE(txn);
return result;
}
@@ -4751,8 +4736,8 @@ nsEditor::DeleteSelectionImpl(nsIEditor::EDirection aAction)
nsCOMPtrselection;
nsresult res = GetSelection(getter_AddRefs(selection));
if (NS_FAILED(res)) return res;
- EditAggregateTxn *txn;
- res = CreateTxnForDeleteSelection(aAction, &txn);
+ nsRefPtr txn;
+ res = CreateTxnForDeleteSelection(aAction, getter_AddRefs(txn));
if (NS_FAILED(res)) return res;
nsAutoRules beginRulesSniffing(this, kOpDeleteSelection, aAction);
@@ -4783,9 +4768,6 @@ nsEditor::DeleteSelectionImpl(nsIEditor::EDirection aAction)
}
}
- // The transaction system (if any) has taken ownership of txn
- NS_IF_RELEASE(txn);
-
return res;
}
diff --git a/mozilla/editor/libeditor/html/nsHTMLCSSUtils.cpp b/mozilla/editor/libeditor/html/nsHTMLCSSUtils.cpp
index 109dc8826db..46dccc600a3 100644
--- a/mozilla/editor/libeditor/html/nsHTMLCSSUtils.cpp
+++ b/mozilla/editor/libeditor/html/nsHTMLCSSUtils.cpp
@@ -56,6 +56,7 @@
#include "nsUnicharUtils.h"
#include "nsHTMLCSSUtils.h"
#include "nsColor.h"
+#include "nsAutoPtr.h"
static
void ProcessBValue(const nsAString * aInputString, nsAString & aOutputString,
@@ -464,8 +465,9 @@ nsresult
nsHTMLCSSUtils::SetCSSProperty(nsIDOMElement *aElement, nsIAtom * aProperty, const nsAString & aValue,
PRBool aSuppressTransaction)
{
- ChangeCSSInlineStyleTxn *txn;
- nsresult result = CreateCSSPropertyTxn(aElement, aProperty, aValue, &txn, PR_FALSE);
+ nsRefPtr txn;
+ nsresult result = CreateCSSPropertyTxn(aElement, aProperty, aValue,
+ getter_AddRefs(txn), PR_FALSE);
if (NS_SUCCEEDED(result)) {
if (aSuppressTransaction) {
result = txn->DoTransaction();
@@ -474,8 +476,6 @@ nsHTMLCSSUtils::SetCSSProperty(nsIDOMElement *aElement, nsIAtom * aProperty, con
result = mHTMLEditor->DoTransaction(txn);
}
}
- // The transaction system (if any) has taken ownership of txn
- NS_IF_RELEASE(txn);
return result;
}
@@ -498,8 +498,9 @@ nsresult
nsHTMLCSSUtils::RemoveCSSProperty(nsIDOMElement *aElement, nsIAtom * aProperty, const nsAString & aValue,
PRBool aSuppressTransaction)
{
- ChangeCSSInlineStyleTxn *txn;
- nsresult result = CreateCSSPropertyTxn(aElement, aProperty, aValue, &txn, PR_TRUE);
+ nsRefPtr txn;
+ nsresult result = CreateCSSPropertyTxn(aElement, aProperty, aValue,
+ getter_AddRefs(txn), PR_TRUE);
if (NS_SUCCEEDED(result)) {
if (aSuppressTransaction) {
result = txn->DoTransaction();
@@ -508,8 +509,6 @@ nsHTMLCSSUtils::RemoveCSSProperty(nsIDOMElement *aElement, nsIAtom * aProperty,
result = mHTMLEditor->DoTransaction(txn);
}
}
- // The transaction system (if any) has taken ownership of txn
- NS_IF_RELEASE(txn);
return result;
}
diff --git a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp
index 559a5fbb901..ea9ffe9ad94 100644
--- a/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp
+++ b/mozilla/editor/libeditor/html/nsHTMLEditRules.cpp
@@ -5550,6 +5550,21 @@ nsHTMLEditRules::PromoteRange(nsIDOMRange *inRange,
return res;
}
+class nsUniqueFunctor : public nsBoolDomIterFunctor
+{
+public:
+ nsUniqueFunctor(nsCOMArray &aArray) : mArray(aArray)
+ {
+ }
+ virtual PRBool operator()(nsIDOMNode* aNode) // used to build list of all nodes iterator covers
+ {
+ return mArray.IndexOf(aNode) < 0;
+ }
+
+private:
+ nsCOMArray &mArray;
+};
+
///////////////////////////////////////////////////////////////////////////
// GetNodesForOperation: run through the ranges in the array and construct
// a new array of nodes to be acted on.
@@ -5614,12 +5629,22 @@ nsHTMLEditRules::GetNodesForOperation(nsCOMArray& inArrayOfRanges,
{
opRange = inArrayOfRanges[i];
- nsTrivialFunctor functor;
nsDOMSubtreeIterator iter;
res = iter.Init(opRange);
if (NS_FAILED(res)) return res;
- res = iter.AppendList(functor, outArrayOfNodes);
- if (NS_FAILED(res)) return res;
+ if (outArrayOfNodes.Count() == 0) {
+ nsTrivialFunctor functor;
+ res = iter.AppendList(functor, outArrayOfNodes);
+ if (NS_FAILED(res)) return res;
+ }
+ else {
+ nsCOMArray nodes;
+ nsUniqueFunctor functor(outArrayOfNodes);
+ res = iter.AppendList(functor, nodes);
+ if (NS_FAILED(res)) return res;
+ if (!outArrayOfNodes.AppendObjects(nodes))
+ return NS_ERROR_OUT_OF_MEMORY;
+ }
}
// certain operations should not act on li's and td's, but rather inside
diff --git a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp
index 1bc94d6802d..ac93cf4ae19 100644
--- a/mozilla/editor/libeditor/html/nsHTMLEditor.cpp
+++ b/mozilla/editor/libeditor/html/nsHTMLEditor.cpp
@@ -713,11 +713,13 @@ nsHTMLEditor::IsBlockNode(nsIDOMNode *aNode)
NS_IMETHODIMP
nsHTMLEditor::SetDocumentTitle(const nsAString &aTitle)
{
- SetDocTitleTxn *txn;
- nsresult result = TransactionFactory::GetNewTransaction(SetDocTitleTxn::GetCID(), (EditTxn **)&txn);
+ nsRefPtr txn;
+ nsresult result = TransactionFactory::GetNewTransaction(SetDocTitleTxn::GetCID(), getter_AddRefs(txn));
if (NS_SUCCEEDED(result))
{
- result = txn->Init(this, &aTitle);
+ result =
+ NS_STATIC_CAST(SetDocTitleTxn*,
+ NS_STATIC_CAST(EditTxn*, txn.get()))->Init(this, &aTitle);
if (NS_SUCCEEDED(result))
{
@@ -726,8 +728,6 @@ nsHTMLEditor::SetDocumentTitle(const nsAString &aTitle)
result = nsEditor::DoTransaction(txn);
}
- // The transaction system (if any) has taken ownership of txn
- NS_IF_RELEASE(txn);
}
return result;
}
@@ -3572,8 +3572,8 @@ nsHTMLEditor::RemoveStyleSheet(const nsAString &aURL)
if (!sheet)
return NS_ERROR_UNEXPECTED;
- RemoveStyleSheetTxn* txn;
- rv = CreateTxnForRemoveStyleSheet(sheet, &txn);
+ nsRefPtr txn;
+ rv = CreateTxnForRemoveStyleSheet(sheet, getter_AddRefs(txn));
if (!txn) rv = NS_ERROR_NULL_POINTER;
if (NS_SUCCEEDED(rv))
{
@@ -3584,8 +3584,6 @@ nsHTMLEditor::RemoveStyleSheet(const nsAString &aURL)
// Remove it from our internal list
rv = RemoveStyleSheetFromList(aURL);
}
- // The transaction system (if any) has taken ownership of txns
- NS_IF_RELEASE(txn);
return rv;
}
@@ -4066,8 +4064,8 @@ nsHTMLEditor::StyleSheetLoaded(nsICSSStyleSheet* aSheet, PRBool aNotify)
if (!mLastStyleSheetURL.IsEmpty())
RemoveStyleSheet(mLastStyleSheetURL);
- AddStyleSheetTxn* txn;
- rv = CreateTxnForAddStyleSheet(aSheet, &txn);
+ nsRefPtr txn;
+ rv = CreateTxnForAddStyleSheet(aSheet, getter_AddRefs(txn));
if (!txn) rv = NS_ERROR_NULL_POINTER;
if (NS_SUCCEEDED(rv))
{
@@ -4095,8 +4093,6 @@ nsHTMLEditor::StyleSheetLoaded(nsICSSStyleSheet* aSheet, PRBool aNotify)
}
}
}
- // The transaction system (if any) has taken ownership of txns
- NS_IF_RELEASE(txn);
return NS_OK;
}
diff --git a/mozilla/editor/libeditor/text/nsTextEditRules.cpp b/mozilla/editor/libeditor/text/nsTextEditRules.cpp
index 48f9525eb7f..88d32635eb2 100644
--- a/mozilla/editor/libeditor/text/nsTextEditRules.cpp
+++ b/mozilla/editor/libeditor/text/nsTextEditRules.cpp
@@ -62,6 +62,8 @@
#include "nsUnicharUtils.h"
#include "nsIWordBreakerFactory.h"
#include "nsLWBrkCIID.h"
+#include "DeleteTextTxn.h"
+#include "nsAutoPtr.h"
// for IBMBIDI
#include "nsIPresShell.h"
@@ -1201,17 +1203,16 @@ nsTextEditRules::ReplaceNewlines(nsIDOMRange *aRange)
if (offset == -1) break; // done with this node
// delete the newline
- EditTxn *txn;
+ nsRefPtr txn;
// note 1: we are not telling edit listeners about these because they don't care
// note 2: we are not wrapping these in a placeholder because we know they already are,
// or, failing that, undo is disabled
- res = mEditor->CreateTxnForDeleteText(textNode, offset, 1, (DeleteTextTxn**)&txn);
+ res = mEditor->CreateTxnForDeleteText(textNode, offset, 1,
+ getter_AddRefs(txn));
if (NS_FAILED(res)) return res;
if (!txn) return NS_ERROR_OUT_OF_MEMORY;
res = mEditor->DoTransaction(txn);
if (NS_FAILED(res)) return res;
- // The transaction system (if any) has taken ownership of txn
- NS_IF_RELEASE(txn);
// insert a break
res = mEditor->CreateBR(textNode, offset, address_of(brNode));
diff --git a/mozilla/embedding/browser/photon/tests/Makefile.in b/mozilla/embedding/browser/photon/tests/Makefile.in
index 3e22bb910bc..01b401610d7 100644
--- a/mozilla/embedding/browser/photon/tests/Makefile.in
+++ b/mozilla/embedding/browser/photon/tests/Makefile.in
@@ -84,3 +84,7 @@ include $(topsrcdir)/config/rules.mk
CXXFLAGS += $(MOZ_GTK_CFLAGS)
+ifneq ($(QCONF_OVERRIDE),)
+include $(QCONF_OVERRIDE)
+CXXFLAGS += -I$(if $(USE_INSTALL_ROOT),$(INSTALL_ROOT_nto),$(USE_ROOT_nto))/usr/include
+endif
diff --git a/mozilla/embedding/browser/photon/tests/TestPhEmbed.cpp b/mozilla/embedding/browser/photon/tests/TestPhEmbed.cpp
index 0cf3531ef17..2d7674c0a7f 100644
--- a/mozilla/embedding/browser/photon/tests/TestPhEmbed.cpp
+++ b/mozilla/embedding/browser/photon/tests/TestPhEmbed.cpp
@@ -39,10 +39,12 @@
#include
#include
#include
+#include
#include
#include
#include
+#include "prtypes.h"
#include "../src/PtMozilla.h"
int window_count = 0;
@@ -206,7 +208,7 @@ int back_cb(PtWidget_t *widget, void *data, PtCallbackInfo_t *cbinfo)
PtArg_t args[1];
struct window_info *info;
PtGetResource(PtFindDisjoint(widget), Pt_ARG_POINTER, &info, 0);
- PtSetArg(&args[0], Pt_ARG_MOZ_NAVIGATE_PAGE, WWW_DIRECTION_BACK, 0);
+ PtSetArg(&args[0], Pt_ARG_MOZ_NAVIGATE_PAGE, Pt_WEB_DIRECTION_BACK, 0);
PtSetResources(info->web, 1, args);
return (Pt_CONTINUE);
}
@@ -216,7 +218,7 @@ int forward_cb(PtWidget_t *widget, void *data, PtCallbackInfo_t *cbinfo)
PtArg_t args[1];
struct window_info *info;
PtGetResource(PtFindDisjoint(widget), Pt_ARG_POINTER, &info, 0);
- PtSetArg(&args[0], Pt_ARG_MOZ_NAVIGATE_PAGE, WWW_DIRECTION_FWD, 0);
+ PtSetArg(&args[0], Pt_ARG_MOZ_NAVIGATE_PAGE, Pt_WEB_DIRECTION_FWD, 0);
PtSetResources(info->web, 1, args);
return (Pt_CONTINUE);
}
@@ -245,7 +247,7 @@ int save_cb(PtWidget_t *widget, void *data, PtCallbackInfo_t *cbinfo)
PtFileSelection(info->window, NULL, "Save Page As", home, "*.html", \
NULL, NULL, NULL, &i, Pt_FSR_NO_FCHECK);
- MozSavePageAs(info->web, i.path, Pt_MOZ_SAVEAS_HTML);
+ //MozSavePageAs(info->web, i.path, Pt_MOZ_SAVEAS_HTML);
return (Pt_CONTINUE);
}
@@ -374,14 +376,14 @@ int moz_url_cb(PtWidget_t *widget, void *data, PtCallbackInfo_t *cbinfo)
// disable or enable the forward and back buttons accordingly
if (i->back)
{
- if (*nflags & (1 << WWW_DIRECTION_BACK))
+ if (*nflags & (1 << Pt_WEB_DIRECTION_BACK))
PtSetResource(i->back, Pt_ARG_FLAGS, 0, Pt_BLOCKED|Pt_GHOST);
else
PtSetResource(i->back, Pt_ARG_FLAGS, ~0, Pt_BLOCKED|Pt_GHOST);
}
if (i->forward)
{
- if (*nflags & (1 << WWW_DIRECTION_FWD))
+ if (*nflags & (1 << Pt_WEB_DIRECTION_FWD))
PtSetResource(i->forward, Pt_ARG_FLAGS, 0, Pt_BLOCKED|Pt_GHOST);
else
PtSetResource(i->forward, Pt_ARG_FLAGS, ~0, Pt_BLOCKED|Pt_GHOST);
@@ -487,7 +489,7 @@ int moz_dialog_cb(PtWidget_t *widget, void *data, PtCallbackInfo_t *cbinfo)
break;
case Pt_MOZ_DIALOG_ALERT_CHECK:
printf("Alert Check\n");
- printf("\tMessage: %s\n", d->message);
+ printf("\tMessage: %s\n", d->checkbox_message);
break;
case Pt_MOZ_DIALOG_CONFIRM:
if (PtAskQuestion(NULL, "JS Confirm", (d->text) ? d->text : "Confirm Message.", \
@@ -502,7 +504,7 @@ int moz_dialog_cb(PtWidget_t *widget, void *data, PtCallbackInfo_t *cbinfo)
break;
case Pt_MOZ_DIALOG_CONFIRM_CHECK:
printf("Confirm Check\n");
- printf("\tMessage: %s\n", d->message);
+ printf("\tMessage: %s\n", d->checkbox_message);
break;
}
@@ -727,6 +729,11 @@ PtWidget_t *create_browser_window(unsigned window_flags)
PtSetArg(&args[n++], Pt_ARG_AREA, &area, 0);
PtSetArg(&args[n++], Pt_ARG_ANCHOR_FLAGS, ~0, Pt_RIGHT_ANCHORED_RIGHT | Pt_LEFT_ANCHORED_LEFT | Pt_TOP_ANCHORED_TOP | Pt_BOTTOM_ANCHORED_BOTTOM);
info->web = PtCreateWidget(PtMozilla, container, n, args);
+ if (!info->web)
+ {
+ printf("*** ERROR: PtMozilla widget could not be created.\n");
+ exit(-1);
+ }
PtExtentWidget (container);
PtWidgetArea(container, &area);
@@ -794,9 +801,16 @@ main(int argc, char **argv)
unsigned window_flags = ~0;
PtWidget_t *win;
struct window_info *i;
+ char *argv0 = strdup(argv[0]);
PtInit(NULL);
+ /*
+ * Set MOZILLA_FIVE_HOME if it is not already set.
+ */
+ if (!getenv("MOZILLA_FIVE_HOME"))
+ setenv("MOZILLA_FIVE_HOME", dirname(argv0), 0);
+ free(argv0);
win = create_browser_window(window_flags);
PtGetResource(win, Pt_ARG_POINTER, &i, 0);
diff --git a/mozilla/embedding/components/windowwatcher/src/Makefile.in b/mozilla/embedding/components/windowwatcher/src/Makefile.in
index f71ef648bbf..9c377368493 100644
--- a/mozilla/embedding/components/windowwatcher/src/Makefile.in
+++ b/mozilla/embedding/components/windowwatcher/src/Makefile.in
@@ -63,6 +63,7 @@ REQUIRES = xpcom \
embed_base \
intl \
layout \
+ uriloader \
$(NULL)
CPPSRCS = nsPrompt.cpp \
diff --git a/mozilla/embedding/components/windowwatcher/src/nsWindowWatcher.cpp b/mozilla/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
index e90dcbf024d..fd438eabc3d 100644
--- a/mozilla/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
+++ b/mozilla/embedding/components/windowwatcher/src/nsWindowWatcher.cpp
@@ -58,6 +58,7 @@
#include "nsIDOMWindow.h"
#include "nsIDOMChromeWindow.h"
#include "nsIDOMWindowInternal.h"
+#include "nsIScriptObjectPrincipal.h"
#include "nsIScreen.h"
#include "nsIScreenManager.h"
#include "nsIScriptContext.h"
@@ -859,6 +860,43 @@ nsWindowWatcher::OpenWindowJSInternal(nsIDOMWindow *aParent,
}
}
+ // Now we have to set the right opener principal on the new window. Note
+ // that we have to do this _before_ starting any URI loads, thanks to the
+ // sync nature of javascript: loads. Since this is the only place where we
+ // set said opener principal, we need to do it for all URIs, including
+ // chrome ones. So to deal with the mess that is bug 79775, just press on in
+ // a reasonable way even if GetSubjectPrincipal fails. In that case, just
+ // use a null subjectPrincipal.
+ nsCOMPtr subjectPrincipal;
+ if (NS_FAILED(sm->GetSubjectPrincipal(getter_AddRefs(subjectPrincipal)))) {
+ subjectPrincipal = nsnull;
+ }
+
+ if (windowIsNew) {
+ // Now set the opener principal on the new window. Note that we need to do
+ // this no matter whether we were opened from JS; if there is nothing on
+ // the JS stack, just use the principal of our parent window. In those
+ // cases we do _not_ set the parent window principal as the owner of the
+ // load--since we really don't know who the owner is, just leave it null.
+ nsIPrincipal* newWindowPrincipal = subjectPrincipal;
+ if (!newWindowPrincipal && aParent) {
+ nsCOMPtr sop(do_QueryInterface(aParent));
+ if (sop) {
+ newWindowPrincipal = sop->GetPrincipal();
+ }
+ }
+
+ nsCOMPtr newWindow =
+ do_QueryInterface(*_retval);
+#ifdef DEBUG
+ nsCOMPtr newDebugWindow = do_GetInterface(newDocShell);
+ NS_ASSERTION(newWindow == newDebugWindow, "Different windows??");
+#endif
+ if (newWindow) {
+ newWindow->SetOpenerScriptPrincipal(newWindowPrincipal);
+ }
+ }
+
if (uriToLoad) { // get the script principal and pass it to docshell
JSContextAutoPopper contextGuard;
@@ -878,15 +916,8 @@ nsWindowWatcher::OpenWindowJSInternal(nsIDOMWindow *aParent,
newDocShell->CreateLoadInfo(getter_AddRefs(loadInfo));
NS_ENSURE_TRUE(loadInfo, NS_ERROR_FAILURE);
- if (!uriToLoadIsChrome) {
- nsCOMPtr principal;
- if (NS_FAILED(sm->GetSubjectPrincipal(getter_AddRefs(principal))))
- return NS_ERROR_FAILURE;
-
- if (principal) {
- nsCOMPtr owner(do_QueryInterface(principal));
- loadInfo->SetOwner(owner);
- }
+ if (subjectPrincipal) {
+ loadInfo->SetOwner(subjectPrincipal);
}
// Set the new window's referrer from the calling context's document:
@@ -1693,6 +1724,14 @@ nsWindowWatcher::ReadyOpenedDocShellItem(nsIDocShellTreeItem *aOpenedItem,
nsCOMPtr branchWindow =
do_QueryInterface(globalObject);
branchWindow->SetOpenerWindow(internalParent, aWindowIsNew); // damnit
+
+ if (aWindowIsNew) {
+ nsCOMPtr doc =
+ do_QueryInterface(branchWindow->GetExtantDocument());
+ if (doc) {
+ doc->SetIsInitialDocument(PR_TRUE);
+ }
+ }
}
rv = CallQueryInterface(globalObject, aOpenedWindow);
}
diff --git a/mozilla/extensions/cck/browser/install.rdf b/mozilla/extensions/cck/browser/install.rdf
index 61ef19e38be..71c3b081fb9 100755
--- a/mozilla/extensions/cck/browser/install.rdf
+++ b/mozilla/extensions/cck/browser/install.rdf
@@ -5,7 +5,7 @@ xmlns:em="http://www.mozilla.org/2004/em-rdf#">
cckwizard@extensions.mozilla.org
CCK Wizard
- 2.0
+ 1.1.1
Michael Kaply
http://www.mozilla.org/projects/cck/firefox
diff --git a/mozilla/extensions/cck/browser/locales/en-US/chrome/cckWizard.dtd b/mozilla/extensions/cck/browser/locales/en-US/chrome/cckWizard.dtd
index debf33d866c..b5fd28be676 100755
--- a/mozilla/extensions/cck/browser/locales/en-US/chrome/cckWizard.dtd
+++ b/mozilla/extensions/cck/browser/locales/en-US/chrome/cckWizard.dtd
@@ -24,14 +24,9 @@
-
-
-
-
+Important: In order to create the XPI, we need to use ZIP or 7-Zip. Use the 'Choose File' button to locate one of these executables. Note we will also attempt to use ZIP.EXE if it is in the path.">
-
-
@@ -62,9 +57,9 @@
-
-
-
+
+
+
@@ -146,6 +141,8 @@
+
+
@@ -173,6 +170,9 @@
+
+
+
@@ -241,8 +241,6 @@
-
-
diff --git a/mozilla/extensions/cck/browser/resources/content/cckwizard/bookmark.xul b/mozilla/extensions/cck/browser/resources/content/cckwizard/bookmark.xul
index b32b9e8d3b8..92b9bdc19e8 100644
--- a/mozilla/extensions/cck/browser/resources/content/cckwizard/bookmark.xul
+++ b/mozilla/extensions/cck/browser/resources/content/cckwizard/bookmark.xul
@@ -57,6 +57,12 @@
&bookmarkURL.label;
-
+
+
+
+
+
+
+
diff --git a/mozilla/extensions/cck/browser/resources/content/cckwizard/cckwizard.js b/mozilla/extensions/cck/browser/resources/content/cckwizard/cckwizard.js
index f092bed7c22..014e143acf1 100755
--- a/mozilla/extensions/cck/browser/resources/content/cckwizard/cckwizard.js
+++ b/mozilla/extensions/cck/browser/resources/content/cckwizard/cckwizard.js
@@ -306,6 +306,7 @@ function ClearAll()
document.getElementById(elements[i].id).clear();
} else if (elements[i].id == "defaultSearchEngine") {
document.getElementById(elements[i].id).removeAllItems();
+ document.getElementById(elements[i].id).value = "";
}
}
}
@@ -529,18 +530,24 @@ function OnBookmarkLoad()
if (window.name == 'editbookmark') {
document.getElementById('bookmarkname').value = listbox.selectedItem.label;
document.getElementById('bookmarkurl').value = listbox.selectedItem.value;
- if (listbox.selectedItem.cck['type'] == "live")
- document.getElementById('liveBookmark').checked = true;
+ document.getElementById('bookmarktype').value = listbox.selectedItem.cck['type'];
}
bookmarkCheckOKButton();
}
function bookmarkCheckOKButton()
{
- if ((document.getElementById("bookmarkname").value) && (document.getElementById("bookmarkurl").value)) {
- document.documentElement.getButton("accept").setAttribute( "disabled", "false" );
+ if (document.getElementById('bookmarktype').value == "separator") {
+ document.getElementById('bookmarkname').disabled = true;
+ document.getElementById('bookmarkurl').disabled = true;
} else {
- document.documentElement.getButton("accept").setAttribute( "disabled", "true" );
+ document.getElementById('bookmarkname').disabled = false;
+ document.getElementById('bookmarkurl').disabled = false;
+ }
+ if ((document.getElementById('bookmarktype').value == "separator") || ((document.getElementById("bookmarkname").value) && (document.getElementById("bookmarkurl").value))) {
+ document.documentElement.getButton("accept").disabled = false;
+ } else {
+ document.documentElement.getButton("accept").disabled = true;
}
}
@@ -550,19 +557,29 @@ function OnBookmarkOK()
listbox = this.opener.document.getElementById(getPageId() +'.bookmarkList');
var listitem;
if (window.name == 'newbookmark') {
- listitem = listbox.appendItem(document.getElementById('bookmarkname').value, document.getElementById('bookmarkurl').value);
+ if (document.getElementById('bookmarktype').value == "separator") {
+ listitem = listbox.appendItem("----------", "");
+ } else {
+ listitem = listbox.appendItem(document.getElementById('bookmarkname').value, document.getElementById('bookmarkurl').value);
+ }
listitem.setAttribute("class", "listitem-iconic");
} else {
listitem = listbox.selectedItem;
- listitem.setAttribute("label", document.getElementById('bookmarkname').value);
- listitem.setAttribute("value", document.getElementById('bookmarkurl').value);
+ if (document.getElementById('bookmarktype').value == "separator") {
+ listitem.setAttribute("label", "----------");
+ listitem.setAttribute("value", "");
+ } else {
+ listitem.setAttribute("label", document.getElementById('bookmarkname').value);
+ listitem.setAttribute("value", document.getElementById('bookmarkurl').value);
+ }
}
- if (document.getElementById('liveBookmark').checked) {
- listitem.cck['type'] = "live";
+ listitem.cck['type'] = document.getElementById('bookmarktype').value;
+ if (document.getElementById('bookmarktype').value == "live") {
listitem.setAttribute("image", "chrome://browser/skin/page-livemarks.png");
+ } else if (document.getElementById('bookmarktype').value == "separator") {
+ listitem.setAttribute("image", "");
} else {
listitem.setAttribute("image", "chrome://browser/skin/Bookmarks-folder.png");
- listitem.cck['type'] = "";
}
}
@@ -894,7 +911,8 @@ function onNewBundle()
try {
var nsIFilePicker = Components.interfaces.nsIFilePicker;
var fp = Components.classes["@mozilla.org/filepicker;1"].createInstance(nsIFilePicker);
- fp.init(window, "Choose File...", nsIFilePicker.modeOpen);
+ var bundle = document.getElementById("bundle_cckwizard");
+ fp.init(window, bundle.getString("chooseFile"), nsIFilePicker.modeOpen);
fp.appendFilters(nsIFilePicker.filterHTML | nsIFilePicker.filterText |
nsIFilePicker.filterAll | nsIFilePicker.filterImages | nsIFilePicker.filterXML);
@@ -1017,7 +1035,8 @@ function CreateCCK()
destdir.create(Components.interfaces.nsIFile.DIRECTORY_TYPE, 0775);
} catch(ex) {}
- CCKCopyChromeToFile("cckService.js", destdir);
+// CCKCopyChromeToFile("cckService.js", destdir);
+ CCKWriteCCKServiceJS(destdir);
if (document.getElementById("noaboutconfig").checked)
CCKCopyChromeToFile("disableAboutConfig.js", destdir);
@@ -1282,10 +1301,15 @@ function CCKZip(zipfile, location)
line += "/d ";
line += "\"" + location.path + "\"\n";
fos.write(line, line.length);
+ var zipParams = "-r";
+ /* check for 7zip */
+ if (zipLocation.match("7z")) {
+ zipParams = "a -tZIP";
+ }
if ((navigator.platform == "Win32") || (navigator.platform == "OS/2"))
- line = "\"" + zipLocation + "\" -r \"" + location.path + "\\" + zipfile + "\"";
+ line = "\"" + zipLocation + "\" " + zipParams + " \"" + location.path + "\\" + zipfile + "\"";
else
- line = zipLocation + " -r \"" + location.path + "/" + zipfile + "\"";
+ line = zipLocation + " " + zipParmams + " \"" + location.path + "/" + zipfile + "\"";
for (var i=2; i < arguments.length; i++) {
line += " " + arguments[i];
}
@@ -1334,7 +1358,7 @@ function CCKZip(zipfile, location)
function CCKWriteXULOverlay(destdir)
{
- var tooltipXUL = ' \n';
+ var tooltipXUL = ' \n';
var titlebarXUL = ' \n';
var helpmenu1 = '
-
Aaron Leventhal,
+Aaron Schulman,
ActiveState Tool Corp,
Akkana Peck,
Alex Fritze,
@@ -695,6 +696,7 @@ Alexander Surkov,
Andreas Otte,
Andreas Premstaller,
Andrew Thompson,
+ArentJan Banck,
Asaf Romano,
Axel Hecht,
Ben Bucksch,
@@ -708,9 +710,12 @@ Brendan Eich,
Brian Bober,
Brian Ryner,
Brian Stell,
+Bruce Davidson,
Bruno Haible,
+Calum Robinson,
Cedric Chantepie,
Chiaki Koufugata,
+Chris McAfee,
Christian Biesinger,
Christopher A. Aillon,
Christopher Blizzard,
@@ -721,6 +726,7 @@ Conrad Carlen,
Crocodile Clips Ltd,
Cyrus Patel,
Dainis Jonitis,
+Dan Mosedale,
Daniel Brooks,
Daniel Glazman,
Daniel Kouril,
@@ -737,18 +743,20 @@ Digital Creations 2 Inc,
Doron Rosenberg,
Doug Turner,
Elika J. Etemad,
+Eric Belhaire,
Eric Hodel,
Esben Mose Hansen,
Frank Schönheit,
Fredrik Holmqvist,
Gavin Sharp,
+Geoff Beier,
Gervase Markham,
Giorgio Maone,
-Google,
Google Inc,
+Håkan Waara,
+Henri Torgemane,
Heriot-Watt University,
Hewlett-Packard Company,
-Håkan Waara,
i-DNS.net International,
Ian Hickson,
Ian Oeschger,
@@ -761,8 +769,10 @@ James Ross,
Jamie Zawinski,
Jan Varga,
Jason Barnabe,
+Jean-Francois Ducarroz,
Jeff Tsai,
Jeff Walden,
+Jefferson Software Inc,
Joe Hewitt,
Joey Minta,
John B. Keiser,
@@ -771,27 +781,36 @@ John Fairhurst,
John Wolfe,
Jonas Sicking,
Jonathan Watt,
+Josh Aas,
Josh Soref,
Juan Lang,
Jungshik Shin,
+Jussi Kukkonen,
Karsten Düsterloh,
Keith Visco,
Ken Herron,
+Kevin Gerich,
Kipp E.B. Hickman,
L. David Baron,
Lixto GmbH,
Makoto Kato,
+Marc Bevand,
Marco Manfredini,
Marco Pesenti Gritti,
Mark Hammond,
Mark Mentovai,
Markus G. Kuhn,
+Matt Judy,
+Matthew Willis,
+Merle Sterling,
Michael J. Fromberger,
Michal Ceresna,
Michiel van Leeuwen,
Mike Connor,
Mike Pinkerton,
+Mike Potter,
Mike Shaver,
+MITRE Corporation,
Mozdev Group,
Mozilla Corporation,
Mozilla Foundation,
@@ -799,20 +818,24 @@ Naoki Hotta,
Neil Deakin,
Neil Rashbrook,
Nelson B. Bolyard,
-Netscape Commmunications Corp,
Netscape Communications Corporation,
New Dimensions Consulting,
Novell Inc,
+OEone Corporation,
Olli Pettay,
Oracle Corporation,
Owen Taylor,
Paul Ashford,
-Paul Kocher of Cryptography Research,
+Paul Kocher,
Paul Sandoz,
Peter Annema,
Peter Hartshorn,
Peter Van der Beken,
+Phil Ringnalda,
+Philipp Kewisch,
Pierre Chanial,
+Prachi Gauriar,
+Qualcomm Inc,
R.J. Keller,
Rajiv Dayal,
Ramalingam Saravanan,
@@ -839,25 +862,29 @@ Sergei Dolgov,
Seth Spitzer,
Shy Shalom,
Silverstone Interactive,
-Simon Bünzli,
+Simdesk Technologies Inc,
+Simon Bënzli,
Simon Fraser,
Simon Montagu,
+Simon Paquet,
Simon Wilkinson,
+Sqlite Project,
Srilatha Moturi,
+Stefan Sitter,
+Stephen Horlander,
Steve Swanson,
+Stuart Morgan,
Stuart Parmenter,
Sun Microsystems Inc,
-The MITRE Corporation,
-The Mozilla Corporation,
-The sqlite Project,
-The University of Queensland,
Tim Copperfield,
Tom Germeau,
Tomas Müller,
+University of Queensland,
Vincent Béron,
Vladimir Vukicevic,
+Wolfgang Rosenauer,
YAMASHITA Makoto,
-Zack Rusin and
+Zack Rusin,
Zero-Knowledge Systems.
diff --git a/mozilla/mailnews/addrbook/resources/content/abDragDrop.js b/mozilla/mailnews/addrbook/resources/content/abDragDrop.js
index 0f759d885b9..52b7d4dd500 100644
--- a/mozilla/mailnews/addrbook/resources/content/abDragDrop.js
+++ b/mozilla/mailnews/addrbook/resources/content/abDragDrop.js
@@ -144,11 +144,15 @@ var abDirTreeObserver = {
if (!dragSession)
return false;
+ // XXX Due to bug 373125/bug 349044 we can't specify a default action,
+ // so we default to move and this means that the user would have to press
+ // ctrl to copy which most users don't realise.
+ //
// If target directory is a mailing list, then only allow copies.
- if (targetDirectory.isMailList &&
- dragSession.dragAction != Components.interfaces.
- nsIDragService.DRAGDROP_ACTION_COPY)
- return false;
+ // if (targetDirectory.isMailList &&
+ // dragSession.dragAction != Components.interfaces.
+ // nsIDragService.DRAGDROP_ACTION_COPY)
+ //return false;
var srcDirectory = GetDirectoryFromURI(srcURI);
diff --git a/mozilla/mailnews/addrbook/src/nsVCard.cpp b/mozilla/mailnews/addrbook/src/nsVCard.cpp
index 7ac9c72d3ce..f7ffa6d3399 100644
--- a/mozilla/mailnews/addrbook/src/nsVCard.cpp
+++ b/mozilla/mailnews/addrbook/src/nsVCard.cpp
@@ -1150,7 +1150,7 @@ static int yylex() {
p = lexGetStrUntil(";\n");
#endif
}
- if (p) {
+ if (p && (*p || lexLookahead() != EOF)) {
DBG_(("db: STRING: '%s'\n", p));
yylval.str = p;
return STRING;
diff --git a/mozilla/mailnews/base/prefs/resources/content/am-identity-edit.js b/mozilla/mailnews/base/prefs/resources/content/am-identity-edit.js
index 3677075ef4f..8e693a5151c 100644
--- a/mozilla/mailnews/base/prefs/resources/content/am-identity-edit.js
+++ b/mozilla/mailnews/base/prefs/resources/content/am-identity-edit.js
@@ -189,18 +189,19 @@ function saveIdentitySettings(identity)
identity.attachVCard = document.getElementById('identity.attachVCard').checked;
identity.escapedVCard = document.getElementById('identity.escapedVCard').value;
identity.smtpServerKey = document.getElementById('identity.smtpServerKey').value;
-
+
var attachSignaturePath = document.getElementById('identity.signature').value;
+ identity.signature = null; // this is important so we don't accidentally inherit the default
+
if (attachSignaturePath)
{
// convert signature path back into a nsIFile
var sfile = Components.classes["@mozilla.org/file/local;1"]
.createInstance(Components.interfaces.nsILocalFile);
sfile.initWithPath(attachSignaturePath);
- identity.signature = sfile;
+ if (sfile.exists())
+ identity.signature = sfile;
}
- else
- identity.signature = null; // this is important so we don't accidentally inherit the default
}
}
@@ -271,7 +272,7 @@ function GetSigFolder()
signatureFile = signatureFile.QueryInterface( Components.interfaces.nsILocalFile );
sigFolder = signatureFile.parent;
- if (!sigFolder.exists)
+ if (!sigFolder.exists())
sigFolder = null;
}
}
diff --git a/mozilla/mailnews/base/prefs/resources/content/am-junk.js b/mozilla/mailnews/base/prefs/resources/content/am-junk.js
index 6ac41c1d6d4..bd995040ec3 100644
--- a/mozilla/mailnews/base/prefs/resources/content/am-junk.js
+++ b/mozilla/mailnews/base/prefs/resources/content/am-junk.js
@@ -38,6 +38,7 @@
*/
const KEY_ISP_DIRECTORY_LIST = "ISPDL";
+var gPrefBranch = null;
function onInit(aPageId, aServerId)
{
@@ -80,15 +81,30 @@ function onInit(aPageId, aServerId)
function onPreInit(account, accountValues)
{
+ gPrefBranch = Components.classes["@mozilla.org/preferences-service;1"]
+ .getService(Components.interfaces.nsIPrefService)
+ .getBranch("mail.server." +
+ account.incomingServer.key + ".");
buildServerFilterMenuList();
}
function updateMoveTargetMode(aEnable)
{
if (aEnable)
- document.getElementById('broadcaster_moveMode').removeAttribute('disabled');
+ document.getElementById("broadcaster_moveMode").removeAttribute("disabled");
else
- document.getElementById('broadcaster_moveMode').setAttribute('disabled', "true");
+ document.getElementById("broadcaster_moveMode").setAttribute("disabled", "true");
+
+ updatePurgeSpam(aEnable, "purgeSpam");
+ updatePurgeSpam(aEnable, "purgeSpamInterval");
+}
+
+function updatePurgeSpam(aEnable, aPref)
+{
+ if (!aEnable || gPrefBranch.prefIsLocked(aPref))
+ document.getElementById("server." + aPref).setAttribute("disabled", "true");
+ else
+ document.getElementById("server." + aPref).removeAttribute("disabled");
}
function updateSpamLevel()
diff --git a/mozilla/mailnews/base/prefs/resources/content/am-junk.xul b/mozilla/mailnews/base/prefs/resources/content/am-junk.xul
index d14552f44d4..1ca04a530c3 100644
--- a/mozilla/mailnews/base/prefs/resources/content/am-junk.xul
+++ b/mozilla/mailnews/base/prefs/resources/content/am-junk.xul
@@ -152,10 +152,8 @@
diff --git a/mozilla/mailnews/base/resources/content/mailWidgets.xml b/mozilla/mailnews/base/resources/content/mailWidgets.xml
index 5e26a074056..c33794ff1d3 100644
--- a/mozilla/mailnews/base/resources/content/mailWidgets.xml
+++ b/mozilla/mailnews/base/resources/content/mailWidgets.xml
@@ -850,8 +850,8 @@
// clear out our local state
this.mAddresses = new Array;
this.toggleIcon.removeAttribute("open");
+ this.toggleIcon.collapsed = true;
this.longEmailAddresses.setAttribute("singleline", "true");
-
// remove anything inside of each of our labels....
this.clearChildNodes(this.emailAddresses);
]]>
diff --git a/mozilla/mailnews/base/resources/content/msgHdrViewOverlay.js b/mozilla/mailnews/base/resources/content/msgHdrViewOverlay.js
index 706beea11b0..853206a98f7 100644
--- a/mozilla/mailnews/base/resources/content/msgHdrViewOverlay.js
+++ b/mozilla/mailnews/base/resources/content/msgHdrViewOverlay.js
@@ -1134,6 +1134,16 @@ function handleAttachmentSelection(commandPrefix)
selectedAttachments[0].attachment[commandPrefix]();
}
+function createAttachmentDisplayName(aAttachment)
+{
+ // Strip any white space at the end of the display name to avoid
+ // attachment name spoofing (especially Windows will drop trailing dots
+ // and whitespace from filename extensions). Leading and internal
+ // whitespace will be taken care of by the crop="center" attribute.
+ // We must not change the actual filename, though.
+ return aAttachment.displayName.replace(/\s+$/, "");
+}
+
function displayAttachmentsForExpandedView()
{
var numAttachments = currentAttachments.length;
@@ -1145,9 +1155,10 @@ function displayAttachmentsForExpandedView()
{
var attachment = currentAttachments[index];
- // we need to create a listitem to insert the attachment
- // into the attachment list..
- var item = attachmentList.appendItem(attachment.displayName,"");
+ // create a listitem for the attachment listbox
+ var displayName = createAttachmentDisplayName(attachment);
+ var item = attachmentList.appendItem(displayName, "");
+ item.setAttribute("crop", "center");
item.setAttribute("class", "listitem-iconic attachment-item");
item.setAttribute("tooltip", "attachmentListTooltip");
item.attachment = attachment;
@@ -1258,9 +1269,10 @@ function addAttachmentToPopup(popup, attachment, attachmentIndex)
item = popup.insertBefore(item, popup.childNodes[attachmentIndex - 1]);
item.setAttribute('class', 'menu-iconic attachment-item');
+ var displayName = createAttachmentDisplayName(attachment);
var formattedDisplayNameString = gMessengerBundle.getFormattedString("attachmentDisplayNameFormat",
- [attachmentIndex, attachment.displayName]);
-
+ [attachmentIndex, displayName]);
+ item.setAttribute("crop", "center");
item.setAttribute('label', formattedDisplayNameString);
item.setAttribute('accesskey', attachmentIndex);
diff --git a/mozilla/mailnews/base/search/src/nsMsgSearchTerm.cpp b/mozilla/mailnews/base/search/src/nsMsgSearchTerm.cpp
index 7b580de5a0c..341f21b072a 100644
--- a/mozilla/mailnews/base/search/src/nsMsgSearchTerm.cpp
+++ b/mozilla/mailnews/base/search/src/nsMsgSearchTerm.cpp
@@ -810,8 +810,9 @@ nsresult nsMsgSearchTerm::MatchBody (nsIMsgSearchScopeTerm *scope, PRUint32 offs
{
softLineBreak = StringEndsWith(buf, NS_LITERAL_CSTRING("="));
MsgStripQuotedPrintable ((unsigned char*)buf.get());
- if (softLineBreak)
- buf.Truncate(buf.Length() - 1);
+ // in case the string shrunk, reset the length. If soft line break,
+ // chop off the last char as well.
+ buf.SetLength(strlen(buf.get()) - (softLineBreak ? 1 : 0));
}
compare.Append(buf);
// If this line ends with a soft line break, loop around
diff --git a/mozilla/mailnews/base/src/nsMsgDBView.cpp b/mozilla/mailnews/base/src/nsMsgDBView.cpp
index 2c8aecbdf37..60741c4045d 100644
--- a/mozilla/mailnews/base/src/nsMsgDBView.cpp
+++ b/mozilla/mailnews/base/src/nsMsgDBView.cpp
@@ -3552,7 +3552,7 @@ NS_IMETHODIMP nsMsgDBView::Sort(nsMsgViewSortTypeValue sortType, nsMsgViewSortOr
{
nsresult rv;
- if (m_sortType == sortType && m_sortValid)
+ if (m_sortType == sortType && m_sortValid && sortType != nsMsgViewSortType::byCustom)
{
if (m_sortOrder == sortOrder)
{
diff --git a/mozilla/mailnews/base/src/nsMsgPrintEngine.cpp b/mozilla/mailnews/base/src/nsMsgPrintEngine.cpp
index bbdc3d5879a..78f6ce0ef1d 100644
--- a/mozilla/mailnews/base/src/nsMsgPrintEngine.cpp
+++ b/mozilla/mailnews/base/src/nsMsgPrintEngine.cpp
@@ -540,11 +540,11 @@ nsMsgPrintEngine::FireThatLoadOperation(nsString *uri)
// if this is a message part (or .eml file on disk)
// skip it, because we don't want to print the parent message
// we want to print the part.
- // example: imap://sspitzer@nsmail-1:143/fetch%3EUID%3E/INBOX%3E180958?part=1.1.2&type=x-message-display&filename=test"
+ // example: imap://sspitzer@nsmail-1:143/fetch%3EUID%3E/INBOX%3E180958?part=1.1.2&type=application/x-message-display&filename=test"
if (strncmp(tString, DATA_URL_PREFIX, DATA_URL_PREFIX_LEN) &&
strncmp(tString, ADDBOOK_URL_PREFIX, ADDBOOK_URL_PREFIX_LEN) &&
strcmp(tString, "about:blank") &&
- !strstr(tString, "type=x-message-display")) {
+ !strstr(tString, "type=application/x-message-display")) {
rv = GetMessageServiceFromURI(tString, getter_AddRefs(messageService));
}
diff --git a/mozilla/mailnews/base/util/nsImapMoveCoalescer.cpp b/mozilla/mailnews/base/util/nsImapMoveCoalescer.cpp
index c2d2a5a0b78..5a32c92d516 100755
--- a/mozilla/mailnews/base/util/nsImapMoveCoalescer.cpp
+++ b/mozilla/mailnews/base/util/nsImapMoveCoalescer.cpp
@@ -301,6 +301,11 @@ NS_IMETHODIMP nsMoveCoalescerCopyListener::OnStopCopy(nsresult aStatus)
rv = imapService->SelectFolder(eventQueue, m_destFolder, listener, nsnull, getter_AddRefs(url));
}
}
+ else // give junk filters a chance to run on new msgs in destination local folder
+ {
+ PRBool filtersRun;
+ m_destFolder->CallFilterPlugins(nsnull, &filtersRun);
+ }
}
return rv;
}
diff --git a/mozilla/mailnews/compose/src/nsMsgSend.cpp b/mozilla/mailnews/compose/src/nsMsgSend.cpp
index e6316bebeef..37f20956dd6 100644
--- a/mozilla/mailnews/compose/src/nsMsgSend.cpp
+++ b/mozilla/mailnews/compose/src/nsMsgSend.cpp
@@ -4640,6 +4640,7 @@ nsMsgComposeAndSend::MimeDoFCC(nsFileSpec *input_file,
goto FAIL;
}
}
+ n = tempOutfile.write(X_MOZILLA_KEYWORDS, sizeof(X_MOZILLA_KEYWORDS) - 1);
}
// Write out the FCC and BCC headers.
diff --git a/mozilla/mailnews/extensions/palmsync/conduit/MozABConduitSync.cpp b/mozilla/mailnews/extensions/palmsync/conduit/MozABConduitSync.cpp
index 71e4f29c308..62d3d3915ff 100644
--- a/mozilla/mailnews/extensions/palmsync/conduit/MozABConduitSync.cpp
+++ b/mozilla/mailnews/extensions/palmsync/conduit/MozABConduitSync.cpp
@@ -320,10 +320,10 @@ DWORD WINAPI DoFastSync(LPVOID lpParameter)
CONDUIT_LOG0(gFD, "Getting moz AB List ... ");
if(!retval)
retval = sync->m_dbPC->GetPCABList(&mozABCount, &mozCatIndexList, &mozABNameList, &mozABUrlList, &mozDirFlagsList);
+ CONDUIT_LOG1(gFD, "done getting moz AB List. retval = %d\n", retval);
if (retval)
return retval;
- CONDUIT_LOG0(gFD, "Done getting moz AB List. \n");
// Create an array to help us identify addrbooks that have been deleted on Palm.
DWORD *mozABSeen = (DWORD *) CoTaskMemAlloc(sizeof(DWORD) * mozABCount);
@@ -644,14 +644,23 @@ DWORD WINAPI DoFastSync(LPVOID lpParameter)
long CMozABConduitSync::PerformFastSync()
{
+ CONDUIT_LOG0(gFD, "-- SYNC Palm -> PerformFastSync --\n");
+
DWORD ThreadId;
+ DWORD threadExitCode;
HANDLE hThread = CreateThread(NULL, 0, DoFastSync, this, 0, &ThreadId);
while (WaitForSingleObject(hThread, 1000) == WAIT_TIMEOUT) {
SyncYieldCycles(1); // every sec call this for feedback & keep Palm connection alive
continue;
}
- return 0;
+ // get and return thread's return code if available
+ BOOL ret = GetExitCodeThread(hThread, &threadExitCode);
+ if (!ret)
+ return GetLastError();
+ // thread failed
+ CONDUIT_LOG1(gFD, "GetExitCodeThread failed return code = %d\n", threadExitCode);
+ return threadExitCode;
}
diff --git a/mozilla/mailnews/extensions/palmsync/install.rdf b/mozilla/mailnews/extensions/palmsync/install.rdf
index 76a5f5118b0..dfb47455eac 100644
--- a/mozilla/mailnews/extensions/palmsync/install.rdf
+++ b/mozilla/mailnews/extensions/palmsync/install.rdf
@@ -22,6 +22,6 @@
Palm Sync
Palm address book synchronization.
Team Thunderbird
- http://www.mozilla.org/projects/thunderbird/palmsync/
+ http://kb.mozillazine.org/PalmSync_-_Thunderbird
diff --git a/mozilla/mailnews/imap/src/nsImapFlagAndUidState.cpp b/mozilla/mailnews/imap/src/nsImapFlagAndUidState.cpp
index 1f60fb6f2e5..71052d6e187 100644
--- a/mozilla/mailnews/imap/src/nsImapFlagAndUidState.cpp
+++ b/mozilla/mailnews/imap/src/nsImapFlagAndUidState.cpp
@@ -216,6 +216,9 @@ NS_IMETHODIMP nsImapFlagAndUidState::AddUidFlagPair(PRUint32 uid, imapMessageFla
{
if (uid == nsMsgKey_None) // ignore uid of -1
return NS_OK;
+ // check for potential overflow in buffer size for uid array
+ if (zeroBasedIndex > 0x3FFFFFFF)
+ return NS_ERROR_INVALID_ARG;
PR_CEnterMonitor(this);
if (zeroBasedIndex + 1 > fNumberOfMessagesAdded)
fNumberOfMessagesAdded = zeroBasedIndex + 1;
diff --git a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp
index 3a11638685f..9f0dc7b4186 100644
--- a/mozilla/mailnews/imap/src/nsImapMailFolder.cpp
+++ b/mozilla/mailnews/imap/src/nsImapMailFolder.cpp
@@ -4333,7 +4333,8 @@ nsImapMailFolder::NormalEndMsgWriteStream(nsMsgKey uidOfMessage,
NS_IMETHODIMP
nsImapMailFolder::AbortMsgWriteStream()
{
- return NS_ERROR_FAILURE;
+ m_offlineHeader = nsnull;
+ return NS_ERROR_FAILURE;
}
// message move/copy related methods
diff --git a/mozilla/mailnews/local/src/nsLocalMailFolder.cpp b/mozilla/mailnews/local/src/nsLocalMailFolder.cpp
index 38f98b2ef28..342600ea9f2 100644
--- a/mozilla/mailnews/local/src/nsLocalMailFolder.cpp
+++ b/mozilla/mailnews/local/src/nsLocalMailFolder.cpp
@@ -545,6 +545,8 @@ NS_IMETHODIMP nsMsgLocalMailFolder::GetDatabaseWithReparse(nsIUrlListener *aRepa
{
if (folderOpen == NS_MSG_ERROR_FOLDER_SUMMARY_MISSING)
dbFolderInfo->SetFlags(mFlags);
+ dbFolderInfo->SetNumMessages(0);
+ dbFolderInfo->SetNumUnreadMessages(0);
dbFolderInfo->GetTransferInfo(getter_AddRefs(transferInfo));
}
dbFolderInfo = nsnull;
@@ -569,8 +571,6 @@ NS_IMETHODIMP nsMsgLocalMailFolder::GetDatabaseWithReparse(nsIUrlListener *aRepa
return rv;
else if (transferInfo && mDatabase)
{
- transferInfo->SetNumMessages(0);
- transferInfo->SetNumUnreadMessages(0);
SetDBTransferInfo(transferInfo);
}
}
@@ -2667,7 +2667,40 @@ NS_IMETHODIMP nsMsgLocalMailFolder::EndCopy(PRBool copySucceeded)
{
// need to copy junk score and label from mCopyState->m_message to newHdr.
if (mCopyState->m_message)
+ {
+ // deal with propagating the new flag on an imap to local folder filter action
+ PRUint32 msgFlags;
+ mCopyState->m_message->GetFlags(&msgFlags);
+ if (!(msgFlags & MSG_FLAG_READ))
+ {
+ nsCOMPtr srcFolder;
+ mCopyState->m_message->GetFolder(getter_AddRefs(srcFolder));
+ if (srcFolder)
+ {
+ PRUint32 folderFlags;
+ srcFolder->GetFlags(&folderFlags);
+ // check if the src folder is an imap inbox.
+ if ((folderFlags & (MSG_FOLDER_FLAG_INBOX|MSG_FOLDER_FLAG_IMAPBOX))
+ == (MSG_FOLDER_FLAG_INBOX|MSG_FOLDER_FLAG_IMAPBOX))
+ {
+ nsCOMPtr db;
+ srcFolder->GetMsgDatabase(nsnull, getter_AddRefs(db));
+ if (db)
+ {
+ nsMsgKey srcKey;
+ PRBool containsKey;
+ mCopyState->m_message->GetMessageKey(&srcKey);
+ db->ContainsKey(srcKey, &containsKey);
+ // if the db doesn't have the key, it must be a filtered imap
+ // message, getting moved to a local folder.
+ if (!containsKey)
+ newHdr->OrFlags(MSG_FLAG_NEW, &msgFlags);
+ }
+ }
+ }
+ }
CopyPropertiesToMsgHdr(newHdr, mCopyState->m_message);
+ }
msgDb->AddNewHdrToDB(newHdr, PR_TRUE);
if (localUndoTxn)
{
diff --git a/mozilla/mailnews/local/src/nsParseMailbox.cpp b/mozilla/mailnews/local/src/nsParseMailbox.cpp
index 5f4dc8b5b18..91d292b1b39 100644
--- a/mozilla/mailnews/local/src/nsParseMailbox.cpp
+++ b/mozilla/mailnews/local/src/nsParseMailbox.cpp
@@ -475,6 +475,7 @@ nsParseMailMessageState::nsParseMailMessageState()
{
m_position = 0;
m_IgnoreXMozillaStatus = PR_FALSE;
+ m_useReceivedDate = PR_FALSE;
m_state = nsIMsgParseMailMsgState::ParseBodyState;
// setup handling of custom db headers, headers that are added to .msf files
@@ -497,6 +498,7 @@ nsParseMailMessageState::nsParseMailMessageState()
if (!m_customDBHeaderValues)
m_customDBHeaders.Clear();
}
+ pPrefBranch->GetBoolPref("mailnews.use_received_date", &m_useReceivedDate);
}
Clear();
@@ -547,6 +549,7 @@ NS_IMETHODIMP nsParseMailMessageState::Clear()
ClearAggregateHeader (m_ccList);
m_headers.ResetWritePos();
m_envelope.ResetWritePos();
+ m_receivedTime = LL_ZERO;
for (PRInt32 i = 0; i < m_customDBHeaders.Count(); i++)
m_customDBHeaderValues[i].length = 0;
@@ -876,6 +879,7 @@ int nsParseMailMessageState::ParseHeaders ()
char *end;
char *value = 0;
struct message_header *header = 0;
+ struct message_header receivedBy;
if (! colon)
break;
@@ -929,6 +933,11 @@ int nsParseMailMessageState::ParseHeaders ()
header = &m_mdn_dnt;
else if (!nsCRT::strncasecmp("Reply-To", buf, end - buf))
header = &m_replyTo;
+ else if (!PL_strncasecmp("Received", buf, end - buf))
+ {
+ header = &receivedBy;
+ header->length = 0;
+ }
break;
case 'S': case 's':
if (!nsCRT::strncasecmp ("Subject", buf, end - buf))
@@ -1032,9 +1041,26 @@ SEARCH_NEWLINE:
while (header->length > 0 &&
IS_SPACE (header->value [header->length - 1]))
((char *) header->value) [--header->length] = 0;
- }
+ if (header == &receivedBy && LL_IS_ZERO(m_receivedTime))
+ {
+ // parse Received: header for date.
+ // We trust the first header as that is closest to recipient,
+ // and less likely to be spoofed.
+ nsCAutoString receivedHdr(header->value, header->length);
+ PRInt32 lastSemicolon = receivedHdr.RFindChar(';');
+ if (lastSemicolon != kNotFound)
+ {
+ nsCAutoString receivedDate;
+ receivedHdr.Right(receivedDate, receivedHdr.Length() - lastSemicolon - 1);
+ receivedDate.Trim(" \t\b\r\n");
+ PRTime resultTime;
+ if (PR_ParseTimeString (receivedDate.get(), PR_FALSE, &resultTime) == PR_SUCCESS)
+ m_receivedTime = resultTime;
}
- return 0;
+ }
+ }
+ }
+ return 0;
}
int nsParseMailMessageState::ParseEnvelope (const char *line, PRUint32 line_size)
@@ -1420,12 +1446,21 @@ int nsParseMailMessageState::FinalizeHeaders()
else if (inReplyTo != nsnull)
m_newMsgHdr->SetReferences(inReplyTo->value);
- if (date) {
- PRTime resultTime;
- PRStatus timeStatus = PR_ParseTimeString (date->value, PR_FALSE, &resultTime);
- if (PR_SUCCESS == timeStatus)
- m_newMsgHdr->SetDate(resultTime);
+ if (!LL_IS_ZERO(m_receivedTime) && (!date || m_useReceivedDate))
+ m_newMsgHdr->SetDate(m_receivedTime);
+ else
+ {
+ // if there's no date, or it's mal-formed, use now as the time.
+ // PR_ParseTimeString won't touch resultTime unless it succeeds.
+ // (this doesn't affect local messages, because we use the envelope
+ // date if there's no Date: header, but it would affect IMAP msgs
+ // w/o a Date: hdr or Received: headers)
+ PRTime resultTime = PR_Now();
+ if (date)
+ PR_ParseTimeString (date->value, PR_FALSE, &resultTime);
+ m_newMsgHdr->SetDate(resultTime);
}
+
if (priority)
m_newMsgHdr->SetPriorityString(priority->value);
else if (priorityFlags == nsMsgPriority::notSet)
@@ -1892,7 +1927,7 @@ NS_IMETHODIMP nsParseNewMailState::ApplyFilterHit(nsIMsgFilter *filter, nsIMsgWi
nsCOMPtr copyService =
do_GetService(NS_MSGCOPYSERVICE_CONTRACTID, &rv);
NS_ENSURE_SUCCESS(rv, rv);
- rv = copyService->CopyMessages(m_rootFolder, messageArray, dstFolder,
+ rv = copyService->CopyMessages(m_downloadFolder, messageArray, dstFolder,
PR_FALSE, nsnull, msgWindow, PR_FALSE);
NS_ENSURE_SUCCESS(rv, rv);
}
diff --git a/mozilla/mailnews/local/src/nsParseMailbox.h b/mozilla/mailnews/local/src/nsParseMailbox.h
index f5ac0da3215..85baaef9d37 100644
--- a/mozilla/mailnews/local/src/nsParseMailbox.h
+++ b/mozilla/mailnews/local/src/nsParseMailbox.h
@@ -148,9 +148,11 @@ public:
struct message_header m_return_path;
struct message_header m_mdn_dnt; /* MDN Disposition-Notification-To: header */
+ PRTime m_receivedTime;
PRUint16 m_body_lines;
PRBool m_IgnoreXMozillaStatus;
+ PRBool m_useReceivedDate;
// this enables extensions to add the values of particular headers to
// the .msf file as properties of nsIMsgHdr. It is initialized from a
// pref, mailnews.customDBHeaders
diff --git a/mozilla/mailnews/local/src/nsPop3Protocol.cpp b/mozilla/mailnews/local/src/nsPop3Protocol.cpp
index 397d2d28a15..80ef15afe92 100644
--- a/mozilla/mailnews/local/src/nsPop3Protocol.cpp
+++ b/mozilla/mailnews/local/src/nsPop3Protocol.cpp
@@ -178,6 +178,14 @@ put_hash(PLHashTable* table, const char* key, char value, PRTime dateReceived)
}
+static PRIntn PR_CALLBACK
+net_pop3_copy_hash_entries(PLHashEntry* he, PRIntn msgindex, void *arg)
+{
+ Pop3UidlEntry *uidlEntry = (Pop3UidlEntry *) he->value;
+ put_hash((PLHashTable *) arg, uidlEntry->uidl, uidlEntry->status, uidlEntry->dateReceived);
+ return HT_ENUMERATE_NEXT;
+}
+
static void * PR_CALLBACK
AllocUidlTable(void * /* pool */, PRSize size)
@@ -934,7 +942,10 @@ nsPop3Protocol::WaitForStartOfConnectionResponse(nsIInputStream* aInputStream,
char * line = nsnull;
PRUint32 line_length = 0;
PRBool pauseForMoreData = PR_FALSE;
- line = m_lineStreamBuffer->ReadNextLine(aInputStream, line_length, pauseForMoreData);
+ nsresult rv;
+ line = m_lineStreamBuffer->ReadNextLine(aInputStream, line_length, pauseForMoreData, &rv);
+ if (NS_FAILED(rv))
+ return -1;
PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS,("RECV: %s", line));
@@ -983,7 +994,10 @@ nsPop3Protocol::WaitForResponse(nsIInputStream* inputStream, PRUint32 length)
char * line;
PRUint32 ln = 0;
PRBool pauseForMoreData = PR_FALSE;
- line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData);
+ nsresult rv;
+ line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData, &rv);
+ if (NS_FAILED(rv))
+ return -1;
if(pauseForMoreData || !line)
{
@@ -1162,7 +1176,9 @@ PRInt32 nsPop3Protocol::AuthResponse(nsIInputStream* inputStream,
}
PRBool pauseForMoreData = PR_FALSE;
- line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData);
+ line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData, &rv);
+ if (NS_FAILED(rv))
+ return -1;
if(pauseForMoreData || !line)
{
@@ -1249,7 +1265,10 @@ PRInt32 nsPop3Protocol::CapaResponse(nsIInputStream* inputStream,
}
PRBool pauseForMoreData = PR_FALSE;
- line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData);
+ nsresult rv;
+ line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData, &rv);
+ if (NS_FAILED(rv))
+ return -1;
if(pauseForMoreData || !line)
{
@@ -2103,7 +2122,10 @@ nsPop3Protocol::GetList(nsIInputStream* inputStream,
return(Error(POP3_LIST_FAILURE));
PRBool pauseForMoreData = PR_FALSE;
- line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData);
+ nsresult rv;
+ line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData, &rv);
+ if (NS_FAILED(rv))
+ return -1;
if(pauseForMoreData || !line)
{
@@ -2200,9 +2222,9 @@ PRInt32 nsPop3Protocol::GetFakeUidlTop(nsIInputStream* inputStream,
* but it's alright since command_succeeded
* will remain constant
*/
+ nsresult rv;
if(!m_pop3ConData->command_succeeded)
{
- nsresult rv;
/* UIDL, XTND and TOP are all unsupported for this mail server.
Tell the user to join the 20th century.
@@ -2247,7 +2269,9 @@ PRInt32 nsPop3Protocol::GetFakeUidlTop(nsIInputStream* inputStream,
}
PRBool pauseForMoreData = PR_FALSE;
- line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData);
+ line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData, &rv);
+ if (NS_FAILED(rv))
+ return -1;
if(pauseForMoreData || !line)
{
@@ -2457,7 +2481,10 @@ nsPop3Protocol::GetXtndXlstMsgid(nsIInputStream* inputStream,
}
PRBool pauseForMoreData = PR_FALSE;
- line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData);
+ nsresult rv;
+ line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData, &rv);
+ if (NS_FAILED(rv))
+ return -1;
if(pauseForMoreData || !line)
{
@@ -2571,7 +2598,10 @@ PRInt32 nsPop3Protocol::GetUidlList(nsIInputStream* inputStream,
}
PRBool pauseForMoreData = PR_FALSE;
- line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData);
+ nsresult rv;
+ line = m_lineStreamBuffer->ReadNextLine(inputStream, ln, pauseForMoreData, &rv);
+ if (NS_FAILED(rv))
+ return -1;
if(pauseForMoreData || !line)
{
@@ -2926,9 +2956,7 @@ nsPop3Protocol::GetMsg()
}
}
}
- if ((m_pop3ConData->next_state != POP3_SEND_DELE) ||
- m_pop3ConData->next_state == POP3_GET_MSG ||
- m_pop3ConData->next_state == POP3_SEND_TOP)
+ if (m_pop3ConData->next_state != POP3_SEND_DELE)
{
/* This is a message we have decided to keep on the server. Notate
@@ -3158,6 +3186,9 @@ nsPop3Protocol::RetrResponse(nsIInputStream* inputStream,
PRBool pauseForMoreData = PR_FALSE;
char *line = m_lineStreamBuffer->ReadNextLine(inputStream, status, pauseForMoreData, &rv, PR_TRUE);
+ if (NS_FAILED(rv))
+ return -1;
+
PR_LOG(POP3LOGMODULE, PR_LOG_ALWAYS,("RECV: %s", line));
buffer_size = status;
@@ -3505,11 +3536,37 @@ nsPop3Protocol::CommitState(PRBool remove_last_entry)
}
}
+ // only use newuidl if we successfully finished looping through all the
+ // messages in the inbox.
if (m_pop3ConData->newuidl)
{
- PL_HashTableDestroy(m_pop3ConData->uidlinfo->hash);
- m_pop3ConData->uidlinfo->hash = m_pop3ConData->newuidl;
- m_pop3ConData->newuidl = NULL;
+ if (m_pop3ConData->last_accessed_msg >= m_pop3ConData->number_of_messages)
+ {
+ PL_HashTableDestroy(m_pop3ConData->uidlinfo->hash);
+ m_pop3ConData->uidlinfo->hash = m_pop3ConData->newuidl;
+ m_pop3ConData->newuidl = nsnull;
+ }
+ else
+ {
+ /* If we are leaving messages on the server, pull out the last
+ uidl from the hash, because it might have been put in there before
+ we got it into the database.
+ */
+ if (remove_last_entry && m_pop3ConData->msg_info &&
+ !m_pop3ConData->only_uidl && m_pop3ConData->newuidl->nentries > 0)
+ {
+ Pop3MsgInfo* info = m_pop3ConData->msg_info + m_pop3ConData->last_accessed_msg;
+ if (info && info->uidl)
+ {
+ PRBool val = PL_HashTableRemove(m_pop3ConData->newuidl, info->uidl);
+ NS_ASSERTION(val, "uidl not in hash table");
+ }
+ }
+
+ // Add the entries in newuidl to m_pop3ConData->uidlinfo->hash to keep
+ // track of the messages we *did* download in this session.
+ PL_HashTableEnumerateEntries(m_pop3ConData->newuidl, net_pop3_copy_hash_entries, (void *)m_pop3ConData->uidlinfo->hash);
+ }
}
if (!m_pop3ConData->only_check_for_new_mail)
diff --git a/mozilla/mailnews/mailnews.js b/mozilla/mailnews/mailnews.js
index 4f2756c25bb..067ffe75d91 100644
--- a/mozilla/mailnews/mailnews.js
+++ b/mozilla/mailnews/mailnews.js
@@ -634,6 +634,8 @@ pref("mail.server.default.retainBy", 1);
pref("mailnews.ui.junk.firstuse", true);
pref("mailnews.ui.junk.manualMarkAsJunkMarksRead", true);
+pref("mailnews.use_received_date", false);
+
// for manual upgrades of certain UI features.
// 1 -> 2 is for the folder pane tree landing, to hide the
// unread and total columns, see msgMail3PaneWindow.js
diff --git a/mozilla/minimo/chrome/content/minimo.js b/mozilla/minimo/chrome/content/minimo.js
index 182d9d34962..c275bd9bc4b 100755
--- a/mozilla/minimo/chrome/content/minimo.js
+++ b/mozilla/minimo/chrome/content/minimo.js
@@ -276,6 +276,8 @@ nsBrowserStatusHandler.prototype =
}
}
+ BrowserResizeFix();
+
BrowserUpdateBackForwardState();
BrowserUpdateFeeds();
@@ -945,6 +947,17 @@ function BrowserLinkAdded(event) {
}
}
+function BrowserResizeFix() {
+
+ /* This is to present pages in bigger view than the device view.
+ Talk with doug and marcio about this. We want to move this probably
+ to enable disable in pref */
+
+ gBrowser.contentDocument.body.style.width="800px";
+ gBrowser.contentDocument.body.style.height="600px";
+
+}
+
function BrowserUpdateFeeds() {
var feedButton = document.getElementById("feed-button");
var feedToolbarButton = document.getElementById("nav-rss");
diff --git a/mozilla/minimo/customization/all.js b/mozilla/minimo/customization/all.js
index 4b951c2d8d7..587a645b6cd 100755
--- a/mozilla/minimo/customization/all.js
+++ b/mozilla/minimo/customization/all.js
@@ -283,7 +283,7 @@ pref("network.http.max-persistent-connections-per-proxy", 2);
pref("network.http.request.max-start-delay", 15);
// Headers
-pref("network.http.accept.default", "text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5");
+pref("network.http.accept.default", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
pref("network.http.sendRefererHeader", 2); // 0=don't send any, 1=send only on clicks, 2=send on image requests as well
// Controls whether we send HTTPS referres to other HTTPS sites.
diff --git a/mozilla/modules/libimg/png/MOZCHANGES b/mozilla/modules/libimg/png/MOZCHANGES
index d81c3938340..020aa4f039c 100644
--- a/mozilla/modules/libimg/png/MOZCHANGES
+++ b/mozilla/modules/libimg/png/MOZCHANGES
@@ -1,6 +1,8 @@
Changes made to pristine png source by mozilla.org developers.
+2007/05/05 -- Zero png_ptr->num_trans on CRC error (bug 374810)
+
2004/10/07 -- Synced with libpng-1.2.7 tree
2004/10/07 -- add mozpngconf.h (bug 208607)
diff --git a/mozilla/modules/libimg/png/pngrutil.c b/mozilla/modules/libimg/png/pngrutil.c
index 10bdabfdebb..3f8a773dd03 100644
--- a/mozilla/modules/libimg/png/pngrutil.c
+++ b/mozilla/modules/libimg/png/pngrutil.c
@@ -1314,7 +1314,10 @@ png_handle_tRNS(png_structp png_ptr, png_infop info_ptr, png_uint_32 length)
}
if (png_crc_finish(png_ptr, 0))
+ {
+ png_ptr->num_trans = 0;
return;
+ }
png_set_tRNS(png_ptr, info_ptr, readbuf, png_ptr->num_trans,
&(png_ptr->trans_values));
diff --git a/mozilla/modules/libpr0n/decoders/icon/nsIconURI.cpp b/mozilla/modules/libpr0n/decoders/icon/nsIconURI.cpp
index 96df5a99df3..a296cf49dc3 100644
--- a/mozilla/modules/libpr0n/decoders/icon/nsIconURI.cpp
+++ b/mozilla/modules/libpr0n/decoders/icon/nsIconURI.cpp
@@ -288,8 +288,13 @@ nsMozIconURI::SetSpec(const nsACString &aSpec)
{
nsCAutoString filespec;
tmpURI->GetSpec(filespec);
- if (filespec.Length() > 8 && filespec.CharAt(8) != '/')
- mFileIcon = tmpURI; // looks good, save the file (bug 376328)
+ if ( strncmp("file:////", filespec.get(), 9) &&
+ strncmp("file:///%", filespec.get(), 9) )
+ {
+ // accept only local files; disallow UNC paths (bug 376328)
+ // and attempts to escape them (bug 386998)
+ mFileIcon = tmpURI;
+ }
}
}
if (!sizeString.IsEmpty())
diff --git a/mozilla/modules/libpr0n/decoders/xbm/nsXBMDecoder.cpp b/mozilla/modules/libpr0n/decoders/xbm/nsXBMDecoder.cpp
index f610324a655..27af1b73832 100644
--- a/mozilla/modules/libpr0n/decoders/xbm/nsXBMDecoder.cpp
+++ b/mozilla/modules/libpr0n/decoders/xbm/nsXBMDecoder.cpp
@@ -136,15 +136,27 @@ nsresult nsXBMDecoder::ProcessData(const char* aData, PRUint32 aCount) {
// calculate the offset since the absolute position might no longer
// be valid after realloc
const PRPtrdiff posOffset = mPos ? (mPos - mBuf) : 0;
- mBuf = (char*)realloc(mBuf, mBufSize + aCount + 1);
+
+ // expand the buffer to hold the new data
+ char* oldbuf = mBuf;
+ PRUint32 newbufsize = mBufSize + aCount + 1;
+ if (newbufsize < mBufSize)
+ mBuf = nsnull; // size wrapped around, give up
+ else
+ mBuf = (char*)realloc(mBuf, newbufsize);
+
if (!mBuf) {
mState = RECV_DONE;
+ if (oldbuf)
+ free(oldbuf);
return NS_ERROR_OUT_OF_MEMORY;
}
memcpy(mBuf + mBufSize, aData, aCount);
mBufSize += aCount;
mBuf[mBufSize] = 0;
mPos = mBuf + posOffset;
+
+ // process latest data according to current state
if (mState == RECV_HEADER) {
mPos = strstr(mBuf, "#define");
if (!mPos)
diff --git a/mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp b/mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp
index 1cc3cb62f20..48e394dfe8f 100644
--- a/mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp
+++ b/mozilla/modules/plugin/base/src/ns4xPluginInstance.cpp
@@ -78,6 +78,9 @@
#include "xlibrgb.h"
#endif
+#if defined(MOZ_WIDGET_PHOTON) && defined (OJI)
+#include "nsPluginInstancePeer.h"
+#endif
////////////////////////////////////////////////////////////////////////
// CID's && IID's
@@ -1043,6 +1046,64 @@ nsresult ns4xPluginInstance::InitializePlugin(nsIPluginInstancePeer* peer)
}
}
+#if defined(MOZ_WIDGET_PHOTON) && defined (OJI)
+ /* our plugins require that "voyager.documentBase"/docbase is present in the array */
+ /* and also the java_code, java_codebase are present */
+ const char **qnames = nsnull, **qvalues = nsnull;
+ if (tagtype == nsPluginTagType_Object || tagtype == nsPluginTagType_Applet ) {
+
+ nsCOMPtr javataginfo = do_QueryInterface(peer, &rv);
+ if ( NS_SUCCEEDED(rv)) {
+
+ taginfo->GetParameters(count, names, values);
+ const char * tmpvalue;
+ PRUint32 tmpivalue;
+ char widthb[10], heightb[10];
+ int i, c = 0;
+ qnames = (const char **)PR_Calloc(count + 7, sizeof(char *));
+ qvalues = (const char **)PR_Calloc(count + 7, sizeof(char *));
+ if (qnames != nsnull && qvalues != nsnull) {
+
+ if ( javataginfo->GetArchive(&tmpvalue) == NS_OK ) {
+ qnames[c] = "java_archive";
+ qvalues[c++] = tmpvalue;
+ }
+ if ( javataginfo->GetCode(&tmpvalue) == NS_OK ) {
+ qnames[c] = "java_code";
+ qvalues[c++] = tmpvalue;
+ }
+ if ( javataginfo->GetCodeBase(&tmpvalue) == NS_OK ) {
+ qnames[c] = "java_codebase";
+ qvalues[c++] = tmpvalue;
+ }
+ if ( taginfo->GetDocumentBase(&tmpvalue) == NS_OK ) {
+ qnames[c] = "voyager.documentBase";
+ qvalues[c++] = tmpvalue;
+ }
+ if ( taginfo->GetWidth(&tmpivalue) == NS_OK ) {
+ qnames[c] = "width";
+ qvalues[c++] = ltoa(tmpivalue, widthb, 10);
+ }
+ if ( taginfo->GetHeight(&tmpivalue) == NS_OK ) {
+ qnames[c] = "height";
+ qvalues[c++] = ltoa(tmpivalue, heightb, 10);
+ }
+
+ for( i = c; i < count + c; i++) {
+ qnames[i] = names[i-c];
+ qvalues[i] = values[i-c];
+ }
+
+ qnames[i] = nsnull;
+ qvalues[i] = nsnull;
+ names = qnames;
+ values = qvalues;
+ count = i;
+ }
+ }
+ }
+#endif
+
NS_ENSURE_TRUE(fCallbacks->newp, NS_ERROR_FAILURE);
// XXX Note that the NPPluginType_* enums were crafted to be
@@ -1125,6 +1186,12 @@ nsresult ns4xPluginInstance::InitializePlugin(nsIPluginInstancePeer* peer)
("NPP New called: this=%p, npp=%p, mime=%s, mode=%d, argc=%d, return=%d\n",
this, &fNPP, mimetype, mode, count, error));
+#if defined(MOZ_WIDGET_PHOTON) && defined (OJI)
+ /* free the names[], values[] arrays, since we overriden them */
+ if( qnames ) PR_Free( (void*)qnames );
+ if( qvalues ) PR_Free( (void*)qvalues );
+#endif
+
if(error != NPERR_NO_ERROR) {
// since the plugin returned failure, these should not be set
mPeer = nsnull;
diff --git a/mozilla/netwerk/base/src/nsFileStreams.cpp b/mozilla/netwerk/base/src/nsFileStreams.cpp
index 6245dd61fc1..dd4b5b2ea25 100644
--- a/mozilla/netwerk/base/src/nsFileStreams.cpp
+++ b/mozilla/netwerk/base/src/nsFileStreams.cpp
@@ -578,12 +578,16 @@ nsSafeFileOutputStream::Finish()
if (NS_FAILED(mTargetFile->Equals(mTempFile, &equal)) || !equal)
NS_ERROR("mTempFile not equal to mTargetFile");
#endif
- } else {
- nsCAutoString targetFilename;
- rv = mTargetFile->GetNativeLeafName(targetFilename);
-
- if (NS_SUCCEEDED(rv))
- rv = mTempFile->MoveToNative(nsnull, targetFilename); // This will replace target
+ }
+ else {
+ nsCAutoString targetFilename;
+ rv = mTargetFile->GetNativeLeafName(targetFilename);
+ if (NS_SUCCEEDED(rv)) {
+ // This will replace target.
+ rv = mTempFile->MoveToNative(nsnull, targetFilename);
+ if (NS_FAILED(rv))
+ mTempFile->Remove(PR_FALSE);
+ }
}
}
else {
diff --git a/mozilla/netwerk/base/src/nsURLHelperOS2.cpp b/mozilla/netwerk/base/src/nsURLHelperOS2.cpp
index c61736ff431..e90310c5da8 100644
--- a/mozilla/netwerk/base/src/nsURLHelperOS2.cpp
+++ b/mozilla/netwerk/base/src/nsURLHelperOS2.cpp
@@ -130,6 +130,8 @@ net_GetFileFromURLSpec(const nsACString &aURL, nsIFile **result)
}
NS_UnescapeURL(path);
+ if (path.Length() != strlen(path.get()))
+ return NS_ERROR_FILE_INVALID_PATH;
// remove leading '\'
if (path.CharAt(0) == '\\')
diff --git a/mozilla/netwerk/base/src/nsURLHelperOSX.cpp b/mozilla/netwerk/base/src/nsURLHelperOSX.cpp
index 676f8a4be85..5e9275007fa 100644
--- a/mozilla/netwerk/base/src/nsURLHelperOSX.cpp
+++ b/mozilla/netwerk/base/src/nsURLHelperOSX.cpp
@@ -235,6 +235,8 @@ net_GetFileFromURLSpec(const nsACString &aURL, nsIFile **result)
}
NS_UnescapeURL(path);
+ if (path.Length() != strlen(path.get()))
+ return NS_ERROR_FILE_INVALID_PATH;
if (bHFSPath)
convertHFSPathtoPOSIX(path, path);
diff --git a/mozilla/netwerk/base/src/nsURLHelperUnix.cpp b/mozilla/netwerk/base/src/nsURLHelperUnix.cpp
index 51b57465088..dd017142374 100644
--- a/mozilla/netwerk/base/src/nsURLHelperUnix.cpp
+++ b/mozilla/netwerk/base/src/nsURLHelperUnix.cpp
@@ -114,6 +114,8 @@ net_GetFileFromURLSpec(const nsACString &aURL, nsIFile **result)
}
NS_UnescapeURL(path);
+ if (path.Length() != strlen(path.get()))
+ return NS_ERROR_FILE_INVALID_PATH;
if (IsUTF8(path)) {
// speed up the start-up where UTF-8 is the native charset
diff --git a/mozilla/netwerk/base/src/nsURLHelperWin.cpp b/mozilla/netwerk/base/src/nsURLHelperWin.cpp
index 747b6541e7a..c008efe1415 100644
--- a/mozilla/netwerk/base/src/nsURLHelperWin.cpp
+++ b/mozilla/netwerk/base/src/nsURLHelperWin.cpp
@@ -128,6 +128,8 @@ net_GetFileFromURLSpec(const nsACString &aURL, nsIFile **result)
}
NS_UnescapeURL(path);
+ if (path.Length() != strlen(path.get()))
+ return NS_ERROR_FILE_INVALID_PATH;
// remove leading '\'
if (path.CharAt(0) == '\\')
diff --git a/mozilla/netwerk/cookie/public/nsICookie2.idl b/mozilla/netwerk/cookie/public/nsICookie2.idl
index d2a180dfad1..9b711dbd3c4 100644
--- a/mozilla/netwerk/cookie/public/nsICookie2.idl
+++ b/mozilla/netwerk/cookie/public/nsICookie2.idl
@@ -72,3 +72,12 @@ interface nsICookie2 : nsICookie
readonly attribute PRInt64 expiry;
};
+
+[scriptable, uuid(40712890-6c9e-45fc-b77c-c8ea344f690e)]
+interface nsICookie2_MOZILLA_1_8_BRANCH : nsICookie2
+{
+ /**
+ * true if the cookie is an http only cookie
+ */
+ readonly attribute boolean isHttpOnly;
+};
diff --git a/mozilla/netwerk/cookie/src/nsCookie.cpp b/mozilla/netwerk/cookie/src/nsCookie.cpp
index b0a79e4682a..39075641dae 100644
--- a/mozilla/netwerk/cookie/src/nsCookie.cpp
+++ b/mozilla/netwerk/cookie/src/nsCookie.cpp
@@ -89,6 +89,7 @@ nsCookie::Create(const nsACString &aName,
nsInt64 aLastAccessed,
PRBool aIsSession,
PRBool aIsSecure,
+ PRBool aIsHttpOnly,
nsCookieStatus aStatus,
nsCookiePolicy aPolicy)
{
@@ -111,7 +112,8 @@ nsCookie::Create(const nsACString &aName,
// construct the cookie. placement new, oh yeah!
return new (place) nsCookie(name, value, host, path, end,
aExpiry, aLastAccessed, ++gLastCreationTime,
- aIsSession, aIsSecure, aStatus, aPolicy);
+ aIsSession, aIsSecure, aIsHttpOnly,
+ aStatus, aPolicy);
}
/******************************************************************************
@@ -129,6 +131,7 @@ NS_IMETHODIMP nsCookie::GetExpiry(PRInt64 *aExpiry) { *aExpiry = Expiry()
NS_IMETHODIMP nsCookie::GetIsSession(PRBool *aIsSession) { *aIsSession = IsSession(); return NS_OK; }
NS_IMETHODIMP nsCookie::GetIsDomain(PRBool *aIsDomain) { *aIsDomain = IsDomain(); return NS_OK; }
NS_IMETHODIMP nsCookie::GetIsSecure(PRBool *aIsSecure) { *aIsSecure = IsSecure(); return NS_OK; }
+NS_IMETHODIMP nsCookie::GetIsHttpOnly(PRBool *aHttpOnly) { *aHttpOnly = IsHttpOnly(); return NS_OK; }
NS_IMETHODIMP nsCookie::GetStatus(nsCookieStatus *aStatus) { *aStatus = Status(); return NS_OK; }
NS_IMETHODIMP nsCookie::GetPolicy(nsCookiePolicy *aPolicy) { *aPolicy = Policy(); return NS_OK; }
@@ -145,4 +148,4 @@ nsCookie::GetExpires(PRUint64 *aExpires)
return NS_OK;
}
-NS_IMPL_ISUPPORTS2(nsCookie, nsICookie2, nsICookie)
+NS_IMPL_ISUPPORTS3(nsCookie, nsICookie2, nsICookie, nsICookie2_MOZILLA_1_8_BRANCH)
diff --git a/mozilla/netwerk/cookie/src/nsCookie.h b/mozilla/netwerk/cookie/src/nsCookie.h
index 90071e4cda3..2e4b2d35d50 100644
--- a/mozilla/netwerk/cookie/src/nsCookie.h
+++ b/mozilla/netwerk/cookie/src/nsCookie.h
@@ -55,7 +55,7 @@
* implementation
******************************************************************************/
-class nsCookie : public nsICookie2
+class nsCookie : public nsICookie2_MOZILLA_1_8_BRANCH
{
// break up the NS_DECL_ISUPPORTS macro, since we use a bitfield refcount member
public:
@@ -67,6 +67,7 @@ class nsCookie : public nsICookie2
// nsISupports
NS_DECL_NSICOOKIE
NS_DECL_NSICOOKIE2
+ NS_DECL_NSICOOKIE2_MOZILLA_1_8_BRANCH
private:
// for internal use only. see nsCookie::Create().
@@ -80,6 +81,7 @@ class nsCookie : public nsICookie2
PRUint32 aCreationTime,
PRBool aIsSession,
PRBool aIsSecure,
+ PRBool aIsHttpOnly,
nsCookieStatus aStatus,
nsCookiePolicy aPolicy)
: mNext(nsnull)
@@ -94,6 +96,7 @@ class nsCookie : public nsICookie2
, mRefCnt(0)
, mIsSession(aIsSession != PR_FALSE)
, mIsSecure(aIsSecure != PR_FALSE)
+ , mIsHttpOnly(aIsHttpOnly != PR_FALSE)
, mStatus(aStatus)
, mPolicy(aPolicy)
{
@@ -110,6 +113,7 @@ class nsCookie : public nsICookie2
nsInt64 aLastAccessed,
PRBool aIsSession,
PRBool aIsSecure,
+ PRBool aIsHttpOnly,
nsCookieStatus aStatus,
nsCookiePolicy aPolicy);
@@ -127,6 +131,7 @@ class nsCookie : public nsICookie2
inline PRBool IsSession() const { return mIsSession; }
inline PRBool IsDomain() const { return *mHost == '.'; }
inline PRBool IsSecure() const { return mIsSecure; }
+ inline PRBool IsHttpOnly() const { return mIsHttpOnly; }
inline nsCookieStatus Status() const { return mStatus; }
inline nsCookiePolicy Policy() const { return mPolicy; }
@@ -158,6 +163,7 @@ class nsCookie : public nsICookie2
PRUint32 mRefCnt : 16;
PRUint32 mIsSession : 1;
PRUint32 mIsSecure : 1;
+ PRUint32 mIsHttpOnly: 1;
PRUint32 mStatus : 3;
PRUint32 mPolicy : 3;
};
diff --git a/mozilla/netwerk/cookie/src/nsCookieService.cpp b/mozilla/netwerk/cookie/src/nsCookieService.cpp
index 6f5af77a1a9..dd3b90c020b 100644
--- a/mozilla/netwerk/cookie/src/nsCookieService.cpp
+++ b/mozilla/netwerk/cookie/src/nsCookieService.cpp
@@ -75,6 +75,12 @@
* useful types & constants
******************************************************************************/
+// XXX_hack. See bug 178993.
+// This is a hack to hide HttpOnly cookies from older browsers
+//
+
+static const char kHttpOnlyPrefix[] = "#HttpOnly_";
+
static const char kCookieFileName[] = "cookies.txt";
static const PRUint32 kLazyWriteTimeout = 5000; //msec
@@ -124,6 +130,7 @@ struct nsCookieAttributes
nsInt64 expiryTime;
PRBool isSession;
PRBool isSecure;
+ PRBool isHttpOnly;
};
// stores linked list iteration state, and provides a rudimentary
@@ -238,7 +245,8 @@ LogSuccess(PRBool aSetCookie, nsIURI *aHostURI, const char *aCookieString, nsCoo
}
nsCAutoString spec;
- aHostURI->GetAsciiSpec(spec);
+ if (aHostURI)
+ aHostURI->GetAsciiSpec(spec);
PR_LOG(sCookieLog, PR_LOG_DEBUG,
("%s%s%s\n", "===== ", aSetCookie ? "COOKIE ACCEPTED" : "COOKIE SENT", " ====="));
@@ -259,14 +267,13 @@ LogSuccess(PRBool aSetCookie, nsIURI *aHostURI, const char *aCookieString, nsCoo
PR_LOG(sCookieLog, PR_LOG_DEBUG,("%s: %s\n", aCookie->IsDomain() ? "domain" : "host", aCookie->Host().get()));
PR_LOG(sCookieLog, PR_LOG_DEBUG,("path: %s\n", aCookie->Path().get()));
- if (!aCookie->IsSession()) {
- PR_ExplodeTime(aCookie->Expiry() * USEC_PER_SEC, PR_GMTParameters, &explodedTime);
- PR_FormatTimeUSEnglish(timeString, 40, "%c GMT", &explodedTime);
- }
-
+ PR_ExplodeTime(aCookie->Expiry() * USEC_PER_SEC, PR_GMTParameters, &explodedTime);
+ PR_FormatTimeUSEnglish(timeString, 40, "%c GMT", &explodedTime);
PR_LOG(sCookieLog, PR_LOG_DEBUG,
- ("expires: %s", aCookie->IsSession() ? "at end of session" : timeString));
+ ("expires: %s%s", timeString, aCookie->IsSession() ? " (at end of session)" : ""));
+
PR_LOG(sCookieLog, PR_LOG_DEBUG,("is secure: %s\n", aCookie->IsSecure() ? "true" : "false"));
+ PR_LOG(sCookieLog, PR_LOG_DEBUG,("is httpOnly: %s\n", aCookie->IsHttpOnly() ? "true" : "false"));
}
PR_LOG(sCookieLog, PR_LOG_DEBUG,("\n"));
}
@@ -482,30 +489,14 @@ nsCookieService::Observe(nsISupports *aSubject,
return NS_OK;
}
-NS_IMETHODIMP
-nsCookieService::GetCookieString(nsIURI *aHostURI,
- nsIChannel *aChannel,
- char **aCookie)
-{
- // try to determine first party URI
- nsCOMPtr firstURI;
- if (aChannel) {
- nsCOMPtr httpInternal = do_QueryInterface(aChannel);
- if (httpInternal)
- httpInternal->GetDocumentURI(getter_AddRefs(firstURI));
- }
-
- return GetCookieStringFromHttp(aHostURI, firstURI, aChannel, aCookie);
-}
-
// helper function for GetCookieStringFromHttp
static inline PRBool ispathdelimiter(char c) { return c == '/' || c == '?' || c == '#' || c == ';'; }
-NS_IMETHODIMP
-nsCookieService::GetCookieStringFromHttp(nsIURI *aHostURI,
- nsIURI *aFirstURI,
- nsIChannel *aChannel,
- char **aCookie)
+nsresult nsCookieService::GetCookieInternal(nsIURI *aHostURI,
+ nsIURI *aFirstURI,
+ nsIChannel *aChannel,
+ PRBool aHttpBound,
+ char **aCookie)
{
*aCookie = nsnull;
@@ -565,6 +556,12 @@ nsCookieService::GetCookieStringFromHttp(nsIURI *aHostURI,
continue;
}
+ // if the cookie is httpOnly and it's not going directly to the HTTP
+ // connection, don't send it
+ if (cookie->IsHttpOnly() && !aHttpBound) {
+ continue;
+ }
+
// calculate cookie path length, excluding trailing '/'
PRUint32 cookiePathLen = cookie->Path().Length();
if (cookiePathLen > 0 && cookie->Path().Last() == '/') {
@@ -643,6 +640,31 @@ nsCookieService::GetCookieStringFromHttp(nsIURI *aHostURI,
return NS_OK;
}
+NS_IMETHODIMP
+nsCookieService::GetCookieString(nsIURI *aHostURI,
+ nsIChannel *aChannel,
+ char **aCookie)
+{
+ // try to determine first party URI
+ nsCOMPtr firstURI;
+ if (aChannel) {
+ nsCOMPtr httpInternal = do_QueryInterface(aChannel);
+ if (httpInternal)
+ httpInternal->GetDocumentURI(getter_AddRefs(firstURI));
+ }
+
+ return GetCookieInternal(aHostURI, firstURI, aChannel, PR_FALSE, aCookie);
+}
+
+NS_IMETHODIMP
+nsCookieService::GetCookieStringFromHttp(nsIURI *aHostURI,
+ nsIURI *aFirstURI,
+ nsIChannel *aChannel,
+ char **aCookie)
+{
+ return GetCookieInternal(aHostURI, aFirstURI, aChannel, PR_TRUE, aCookie);
+}
+
NS_IMETHODIMP
nsCookieService::SetCookieString(nsIURI *aHostURI,
nsIPrompt *aPrompt,
@@ -658,7 +680,7 @@ nsCookieService::SetCookieString(nsIURI *aHostURI,
httpInternal->GetDocumentURI(getter_AddRefs(firstURI));
}
- return SetCookieStringFromHttp(aHostURI, firstURI, aPrompt, aCookieHeader, nsnull, aChannel);
+ return SetCookieStringInternal(aHostURI, firstURI, aPrompt, aCookieHeader, nsnull, aChannel, PR_FALSE);
}
NS_IMETHODIMP
@@ -668,6 +690,18 @@ nsCookieService::SetCookieStringFromHttp(nsIURI *aHostURI,
const char *aCookieHeader,
const char *aServerTime,
nsIChannel *aChannel)
+{
+ return SetCookieStringInternal(aHostURI, aFirstURI, aPrompt, aCookieHeader, aServerTime, aChannel, PR_TRUE);
+}
+
+nsresult
+nsCookieService::SetCookieStringInternal(nsIURI *aHostURI,
+ nsIURI *aFirstURI,
+ nsIPrompt *aPrompt,
+ const char *aCookieHeader,
+ const char *aServerTime,
+ nsIChannel *aChannel,
+ PRBool aFromHttp)
{
if (!aHostURI) {
COOKIE_LOGFAILURE(SET_COOKIE, nsnull, aCookieHeader, "host URI is null");
@@ -701,7 +735,7 @@ nsCookieService::SetCookieStringFromHttp(nsIURI *aHostURI,
// switch to a nice string type now, and process each cookie in the header
nsDependentCString cookieHeader(aCookieHeader);
while (SetCookieInternal(aHostURI, aChannel,
- cookieHeader, serverTime,
+ cookieHeader, serverTime, aFromHttp,
cookieStatus, cookiePolicy));
// write out the cookie file
@@ -852,13 +886,14 @@ nsCookieService::Add(const nsACString &aDomain,
currentTime,
aIsSession,
aIsSecure,
+ PR_FALSE,
nsICookie::STATUS_UNKNOWN,
nsICookie::POLICY_UNKNOWN);
if (!cookie) {
return NS_ERROR_OUT_OF_MEMORY;
}
- AddInternal(cookie, currentTime, nsnull, nsnull);
+ AddInternal(cookie, currentTime, nsnull, nsnull, PR_TRUE);
return NS_OK;
}
@@ -916,11 +951,11 @@ nsCookieService::Read()
nsCAutoString buffer;
PRBool isMore = PR_TRUE;
- PRInt32 hostIndex = 0, isDomainIndex, pathIndex, secureIndex, expiresIndex, nameIndex, cookieIndex;
+ PRInt32 hostIndex, isDomainIndex, pathIndex, secureIndex, expiresIndex, nameIndex, cookieIndex;
nsASingleFragmentCString::char_iterator iter;
PRInt32 numInts;
PRInt64 expires;
- PRBool isDomain;
+ PRBool isDomain, isHttpOnly = PR_FALSE;
nsInt64 currentTime = NOW_IN_SECONDS;
// we use lastAccessedCounter to keep cookies in recently-used order,
// so we start by initializing to currentTime (somewhat arbitrary)
@@ -940,11 +975,26 @@ nsCookieService::Read()
* most-recently used come first; least-recently-used come last.
*/
- while (isMore && NS_SUCCEEDED(lineInputStream->ReadLine(buffer, &isMore))) {
- if (buffer.IsEmpty() || buffer.First() == '#') {
- continue;
- }
+ /*
+ * ...but due to bug 178933, we hide HttpOnly cookies from older code
+ * in a comment, so they don't expose HttpOnly cookies to JS.
+ *
+ * The format for HttpOnly cookies is
+ *
+ * #HttpOnly_host \t isDomain \t path \t secure \t expires \t name \t cookie
+ *
+ */
+ while (isMore && NS_SUCCEEDED(lineInputStream->ReadLine(buffer, &isMore))) {
+ if (StringBeginsWith(buffer, NS_LITERAL_CSTRING(kHttpOnlyPrefix))) {
+ isHttpOnly = PR_TRUE;
+ hostIndex = sizeof(kHttpOnlyPrefix) - 1;
+ } else if (buffer.IsEmpty() || buffer.First() == '#') {
+ continue;
+ } else {
+ isHttpOnly = PR_FALSE;
+ hostIndex = 0;
+ }
// this is a cheap, cheesy way of parsing a tab-delimited line into
// string indexes, which can be lopped off into substrings. just for
// purposes of obfuscation, it also checks that each token was found.
@@ -987,6 +1037,7 @@ nsCookieService::Read()
lastAccessedCounter,
PR_FALSE,
Substring(buffer, secureIndex, expiresIndex - secureIndex - 1).EqualsLiteral(kTrue),
+ isHttpOnly,
nsICookie::STATUS_UNKNOWN,
nsICookie::POLICY_UNKNOWN);
if (!newCookie) {
@@ -1082,6 +1133,11 @@ nsCookieService::Write()
* note 2: cookies are written in order of lastAccessed time:
* most-recently used come first; least-recently-used come last.
*/
+
+ /*
+ * XXX but see above in ::Read for the HttpOnly hack
+ */
+
nsCookie *cookie;
nsInt64 currentTime = NOW_IN_SECONDS;
char dateString[22];
@@ -1094,6 +1150,10 @@ nsCookieService::Write()
continue;
}
+ // XXX hack for HttpOnly. see bug 178993.
+ if (cookie->IsHttpOnly()) {
+ bufferedOutputStream->Write(kHttpOnlyPrefix, sizeof(kHttpOnlyPrefix) - 1, &rv);
+ }
bufferedOutputStream->Write(cookie->Host().get(), cookie->Host().Length(), &rv);
if (cookie->IsDomain()) {
bufferedOutputStream->Write(kTrue, sizeof(kTrue) - 1, &rv);
@@ -1143,6 +1203,7 @@ nsCookieService::SetCookieInternal(nsIURI *aHostURI,
nsIChannel *aChannel,
nsDependentCString &aCookieHeader,
nsInt64 aServerTime,
+ PRBool aFromHttp,
nsCookieStatus aStatus,
nsCookiePolicy aPolicy)
{
@@ -1199,6 +1260,7 @@ nsCookieService::SetCookieInternal(nsIURI *aHostURI,
currentTime,
cookieAttributes.isSession,
cookieAttributes.isSecure,
+ cookieAttributes.isHttpOnly,
aStatus,
aPolicy);
if (!cookie) {
@@ -1229,7 +1291,7 @@ nsCookieService::SetCookieInternal(nsIURI *aHostURI,
}
// add the cookie to the list. AddInternal() takes care of logging.
- AddInternal(cookie, NOW_IN_SECONDS, aHostURI, cookieHeader);
+ AddInternal(cookie, NOW_IN_SECONDS, aHostURI, cookieHeader, aFromHttp);
return newCookie;
}
@@ -1242,8 +1304,15 @@ void
nsCookieService::AddInternal(nsCookie *aCookie,
nsInt64 aCurrentTime,
nsIURI *aHostURI,
- const char *aCookieHeader)
+ const char *aCookieHeader,
+ PRBool aFromHttp)
{
+ // if the new cookie is httponly, make sure we're not coming from script
+ if (!aFromHttp && aCookie->IsHttpOnly()) {
+ COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader, "cookie is httponly; coming from script");
+ return;
+ }
+
nsListIter matchIter;
const PRBool foundCookie =
FindCookie(aCookie->Host(), aCookie->Name(), aCookie->Path(), matchIter);
@@ -1251,6 +1320,13 @@ nsCookieService::AddInternal(nsCookie *aCookie,
nsRefPtr oldCookie;
if (foundCookie) {
oldCookie = matchIter.current;
+
+ // if the old cookie is httponly, make sure we're not coming from script
+ if (!aFromHttp && oldCookie->IsHttpOnly()) {
+ COOKIE_LOGFAILURE(SET_COOKIE, aHostURI, aCookieHeader, "previously stored cookie is httponly; coming from script");
+ return;
+ }
+
RemoveCookieFromList(matchIter);
// check if the cookie has expired
@@ -1343,6 +1419,9 @@ nsCookieService::AddInternal(nsCookie *aCookie,
trivial case, but allows the flexibility of setting only a cookie
with a blank and is required by some sites (see bug 169091).
+ 6. Attribute "HttpOnly", not covered in the RFCs, is supported
+ (see bug 178993).
+
** Begin BNF:
token = 1*
value = token-value | quoted-string
@@ -1377,6 +1456,7 @@ nsCookieService::AddInternal(nsCookie *aCookie,
| "Comment" "=" value
| "Version" "=" value
| "Secure"
+ | "HttpOnly"
******************************************************************************/
@@ -1483,6 +1563,7 @@ nsCookieService::ParseAttributes(nsDependentCString &aCookieHeader,
static const char kExpires[] = "expires";
static const char kMaxage[] = "max-age";
static const char kSecure[] = "secure";
+ static const char kHttpOnly[] = "httponly";
nsASingleFragmentCString::const_char_iterator tempBegin, tempEnd;
nsASingleFragmentCString::const_char_iterator cookieStart, cookieEnd;
@@ -1491,6 +1572,8 @@ nsCookieService::ParseAttributes(nsDependentCString &aCookieHeader,
aCookieAttributes.isSecure = PR_FALSE;
+ aCookieAttributes.isHttpOnly = PR_FALSE;
+
nsDependentCSubstring tokenString(cookieStart, cookieStart);
nsDependentCSubstring tokenValue (cookieStart, cookieStart);
PRBool newCookie, equalsFound;
@@ -1537,6 +1620,11 @@ nsCookieService::ParseAttributes(nsDependentCString &aCookieHeader,
// ignore any tokenValue for isSecure; just set the boolean
else if (tokenString.LowerCaseEqualsLiteral(kSecure))
aCookieAttributes.isSecure = PR_TRUE;
+
+ // ignore any tokenValue for isHttpOnly (see bug 178993);
+ // just set the boolean
+ else if (tokenString.LowerCaseEqualsLiteral(kHttpOnly))
+ aCookieAttributes.isHttpOnly = PR_TRUE;
}
// rebind aCookieHeader, in case we need to process another cookie
@@ -1859,12 +1947,8 @@ nsCookieService::CheckPath(nsCookieAttributes &aCookieAttributes,
}
}
- } else {
- if (aCookieAttributes.path.Length() > kMaxBytesPerPath ||
- aCookieAttributes.path.FindChar('\t') != kNotFound )
- return PR_FALSE;
-
#if 0
+ } else {
/**
* The following test is part of the RFC2109 spec. Loosely speaking, it says that a site
* cannot set a cookie for a path that it is not on. See bug 155083. However this patch
@@ -1880,6 +1964,10 @@ nsCookieService::CheckPath(nsCookieAttributes &aCookieAttributes,
#endif
}
+ if (aCookieAttributes.path.Length() > kMaxBytesPerPath ||
+ aCookieAttributes.path.FindChar('\t') != kNotFound )
+ return PR_FALSE;
+
return PR_TRUE;
}
diff --git a/mozilla/netwerk/cookie/src/nsCookieService.h b/mozilla/netwerk/cookie/src/nsCookieService.h
index 86b88074747..9eccdfd7f35 100644
--- a/mozilla/netwerk/cookie/src/nsCookieService.h
+++ b/mozilla/netwerk/cookie/src/nsCookieService.h
@@ -171,8 +171,10 @@ class nsCookieService : public nsICookieService
void PrefChanged(nsIPrefBranch *aPrefBranch);
nsresult Read();
nsresult Write();
- PRBool SetCookieInternal(nsIURI *aHostURI, nsIChannel *aChannel, nsDependentCString &aCookieHeader, nsInt64 aServerTime, nsCookieStatus aStatus, nsCookiePolicy aPolicy);
- void AddInternal(nsCookie *aCookie, nsInt64 aCurrentTime, nsIURI *aHostURI, const char *aCookieHeader);
+ nsresult GetCookieInternal(nsIURI *aHostURI, nsIURI *aFirstURI, nsIChannel *aChannel, PRBool aHttpBound, char **aCookie);
+ nsresult SetCookieStringInternal(nsIURI *aHostURI, nsIURI *aFirstURI, nsIPrompt *aPrompt, const char *aCookieHeader, const char *aServerTime, nsIChannel *aChannel, PRBool aFromHttp);
+ PRBool SetCookieInternal(nsIURI *aHostURI, nsIChannel *aChannel, nsDependentCString &aCookieHeader, nsInt64 aServerTime, PRBool aFromHttp, nsCookieStatus aStatus, nsCookiePolicy aPolicy);
+ void AddInternal(nsCookie *aCookie, nsInt64 aCurrentTime, nsIURI *aHostURI, const char *aCookieHeader, PRBool aFromHttp);
void RemoveCookieFromList(nsListIter &aIter);
PRBool AddCookieToList(nsCookie *aCookie);
static PRBool GetTokenValue(nsASingleFragmentCString::const_char_iterator &aIter, nsASingleFragmentCString::const_char_iterator &aEndIter, nsDependentCSubstring &aTokenString, nsDependentCSubstring &aTokenValue, PRBool &aEqualsFound);
diff --git a/mozilla/nsprpub/pr/include/prinit.h b/mozilla/nsprpub/pr/include/prinit.h
index 2188d359b73..8ccce8402e0 100644
--- a/mozilla/nsprpub/pr/include/prinit.h
+++ b/mozilla/nsprpub/pr/include/prinit.h
@@ -63,11 +63,11 @@ PR_BEGIN_EXTERN_C
** The format of the version string is
** ".[.] []"
*/
-#define PR_VERSION "4.6.7 Beta"
+#define PR_VERSION "4.6.7"
#define PR_VMAJOR 4
#define PR_VMINOR 6
#define PR_VPATCH 7
-#define PR_BETA PR_TRUE
+#define PR_BETA PR_FALSE
/*
** PRVersionCheck
diff --git a/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp b/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp
index 2e09129b7bd..634bf19bc9f 100644
--- a/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp
+++ b/mozilla/rdf/base/src/nsRDFXMLDataSource.cpp
@@ -830,17 +830,32 @@ RDFXMLDataSourceImpl::rdfXMLFlush(nsIURI *aURI)
nsCOMPtr file;
fileURL->GetFile(getter_AddRefs(file));
if (file) {
- // if file doesn't exist, create it
- (void)file->Create(nsIFile::NORMAL_FILE_TYPE, 0666);
-
+ // get a safe output stream, so we don't clobber the datasource file unless
+ // all the writes succeeded.
nsCOMPtr out;
- rv = NS_NewLocalFileOutputStream(getter_AddRefs(out), file);
+ rv = NS_NewSafeLocalFileOutputStream(getter_AddRefs(out),
+ file,
+ PR_WRONLY | PR_CREATE_FILE,
+ /*octal*/ 0666,
+ 0);
+ if (NS_FAILED(rv)) return rv;
+
nsCOMPtr bufferedOut;
- if (out)
- NS_NewBufferedOutputStream(getter_AddRefs(bufferedOut), out, 4096);
- if (bufferedOut) {
- rv = Serialize(bufferedOut);
- if (NS_FAILED(rv)) return rv;
+ rv = NS_NewBufferedOutputStream(getter_AddRefs(bufferedOut), out, 4096);
+ if (NS_FAILED(rv)) return rv;
+
+ rv = Serialize(bufferedOut);
+ if (NS_FAILED(rv)) return rv;
+
+ // All went ok. Maybe except for problems in Write(), but the stream detects
+ // that for us
+ nsCOMPtr safeStream = do_QueryInterface(bufferedOut, &rv);
+ if (NS_FAILED(rv)) return rv;
+
+ rv = safeStream->Finish();
+ if (NS_FAILED(rv)) {
+ NS_WARNING("failed to save datasource file! possible dataloss");
+ return rv;
}
}
}
diff --git a/mozilla/rdf/chrome/src/nsChromeRegistry.cpp b/mozilla/rdf/chrome/src/nsChromeRegistry.cpp
index 68613d0ac21..4f5f9912b31 100644
--- a/mozilla/rdf/chrome/src/nsChromeRegistry.cpp
+++ b/mozilla/rdf/chrome/src/nsChromeRegistry.cpp
@@ -1586,6 +1586,10 @@ nsChromeRegistry::WriteInfoToDataSource(const char *aDocURI,
nsCOMPtr remote = do_QueryInterface(dataSource, &rv);
if (NS_SUCCEEDED(rv)) {
rv = remote->Flush();
+ // Explicitly ignore permissions failure since we sometimes try to write to
+ // global chrome when we shouldn't.
+ if (rv == NS_ERROR_FILE_ACCESS_DENIED)
+ rv = NS_OK;
}
return rv;
@@ -1951,6 +1955,10 @@ nsChromeRegistry::SetProviderForPackage(const nsACString& aProvider,
// assert the data source only when we are not setting runtime-only provider
if (!mBatchInstallFlushes && !mRuntimeProvider)
rv = remote->Flush();
+ // Explicitly ignore permissions failure since we sometimes try to write to
+ // global chrome when we shouldn't.
+ if (rv == NS_ERROR_FILE_ACCESS_DENIED)
+ rv = NS_OK;
return rv;
}
@@ -2604,6 +2612,10 @@ nsChromeRegistry::InstallProvider(const nsACString& aProviderType,
if (!mBatchInstallFlushes) {
rv = remoteInstall->Flush();
+ // Explicitly ignore permissions failure since we sometimes try to write to
+ // global chrome when we shouldn't.
+ if (rv == NS_ERROR_FILE_ACCESS_DENIED)
+ rv = NS_OK;
if (NS_SUCCEEDED(rv) && aProviderType.Equals("package"))
rv = FlagXPCNativeWrappers();
}
@@ -2641,6 +2653,11 @@ NS_IMETHODIMP nsChromeRegistry::SetAllowOverlaysForPackage(const PRUnichar *aPac
if (NS_FAILED(rv)) return rv;
rv = remote->Flush();
+ // Explicitly ignore permissions failure since we sometimes try to write to
+ // global chrome when we shouldn't.
+ if (rv == NS_ERROR_FILE_ACCESS_DENIED)
+ rv = NS_OK;
+
return rv;
}
diff --git a/mozilla/security/manager/ssl/src/nsCertVerificationThread.cpp b/mozilla/security/manager/ssl/src/nsCertVerificationThread.cpp
index c9d8c34ca98..ed4b4100fb9 100644
--- a/mozilla/security/manager/ssl/src/nsCertVerificationThread.cpp
+++ b/mozilla/security/manager/ssl/src/nsCertVerificationThread.cpp
@@ -123,12 +123,8 @@ nsresult nsCertVerificationThread::addJob(nsBaseVerificationJob *aJob)
return NS_OK;
}
-#define CONDITION_WAIT_TIME PR_TicksPerSecond() / 4
-
void nsCertVerificationThread::Run(void)
{
- const PRIntervalTime wait_time = CONDITION_WAIT_TIME;
-
while (PR_TRUE) {
nsBaseVerificationJob *job = nsnull;
@@ -139,7 +135,7 @@ void nsCertVerificationThread::Run(void)
while (!mExitRequested && (0 == verification_thread_singleton->mJobQ.GetSize())) {
// no work to do ? let's wait a moment
- PR_WaitCondVar(mCond, wait_time);
+ PR_WaitCondVar(mCond, PR_INTERVAL_NO_TIMEOUT);
}
if (mExitRequested)
diff --git a/mozilla/security/manager/ssl/src/nsNSSCertificateDB.cpp b/mozilla/security/manager/ssl/src/nsNSSCertificateDB.cpp
index 2f80c605448..fe36bb6001f 100644
--- a/mozilla/security/manager/ssl/src/nsNSSCertificateDB.cpp
+++ b/mozilla/security/manager/ssl/src/nsNSSCertificateDB.cpp
@@ -140,11 +140,15 @@ nsNSSCertificateDB::FindCertByDBKey(const char *aDBkey, nsISupports *aToken,
CERTIssuerAndSN issuerSN;
unsigned long moduleID,slotID;
*_cert = nsnull;
- if (!aDBkey) return NS_ERROR_FAILURE;
+ if (!aDBkey || !*aDBkey)
+ return NS_ERROR_FAILURE;
+
dummy = NSSBase64_DecodeBuffer(nsnull, &keyItem, aDBkey,
(PRUint32)PL_strlen(aDBkey));
- CERTCertificate *cert;
+ if (!dummy)
+ return NS_ERROR_FAILURE;
+ CERTCertificate *cert;
// someday maybe we can speed up the search using the moduleID and slotID
moduleID = NS_NSS_GET_LONG(keyItem.data);
slotID = NS_NSS_GET_LONG(&keyItem.data[NS_NSS_LONG]);
diff --git a/mozilla/security/manager/ssl/src/nsNSSIOLayer.cpp b/mozilla/security/manager/ssl/src/nsNSSIOLayer.cpp
index a1465ce58c0..0203cb2e489 100644
--- a/mozilla/security/manager/ssl/src/nsNSSIOLayer.cpp
+++ b/mozilla/security/manager/ssl/src/nsNSSIOLayer.cpp
@@ -147,6 +147,9 @@ nsSSLSocketThreadData::nsSSLSocketThreadData()
, mSSLRemainingReadResultData(nsnull)
, mSSLResultRemainingBytes(0)
, mReplacedSSLFileDesc(nsnull)
+, mOneBytePendingFromEarlierWrite(PR_FALSE)
+, mThePendingByte(0)
+, mOriginalRequestedTransferAmount(0)
{
}
diff --git a/mozilla/security/manager/ssl/src/nsNSSIOLayer.h b/mozilla/security/manager/ssl/src/nsNSSIOLayer.h
index 7def8c73473..462495507b9 100644
--- a/mozilla/security/manager/ssl/src/nsNSSIOLayer.h
+++ b/mozilla/security/manager/ssl/src/nsNSSIOLayer.h
@@ -113,6 +113,10 @@ public:
// This variable is used to save the SSL level file descriptor,
// to allow us to restore the original file descriptor layering.
PRFileDesc *mReplacedSSLFileDesc;
+
+ PRBool mOneBytePendingFromEarlierWrite;
+ unsigned char mThePendingByte;
+ PRInt32 mOriginalRequestedTransferAmount;
};
class nsNSSSocketInfo : public nsITransportSecurityInfo,
diff --git a/mozilla/security/manager/ssl/src/nsSSLThread.cpp b/mozilla/security/manager/ssl/src/nsSSLThread.cpp
index 7dbe093e219..b8c2a8e0789 100644
--- a/mozilla/security/manager/ssl/src/nsSSLThread.cpp
+++ b/mozilla/security/manager/ssl/src/nsSSLThread.cpp
@@ -42,6 +42,10 @@
#include "ssl.h"
+#ifdef PR_LOGGING
+extern PRLogModuleInfo* gPIPNSSLog;
+#endif
+
nsSSLThread::nsSSLThread()
: mBusySocket(nsnull),
mSocketScheduledToBeDestroyed(nsnull),
@@ -303,6 +307,17 @@ PRInt16 nsSSLThread::requestPoll(nsNSSSocketInfo *si, PRInt16 in_flags, PRInt16
case nsSSLSocketThreadData::ssl_idle:
{
+ if (si->mThreadData->mOneBytePendingFromEarlierWrite)
+ {
+ if (in_flags & PR_POLL_WRITE)
+ {
+ // In this scenario we always want the caller to immediately
+ // try a write again, because it might not wake up otherwise.
+ *out_flags |= PR_POLL_WRITE;
+ return in_flags;
+ }
+ }
+
handshake_timeout = si->HandshakeTimeout();
if (si != ssl_thread_singleton->mBusySocket)
@@ -386,6 +401,8 @@ PRStatus nsSSLThread::requestClose(nsNSSSocketInfo *si)
close_later = PR_TRUE;
ssl_thread_singleton->mSocketScheduledToBeDestroyed = si;
+
+ PR_NotifyAllCondVar(ssl_thread_singleton->mCond);
}
}
@@ -779,14 +796,23 @@ PRInt32 nsSSLThread::requestWrite(nsNSSSocketInfo *si, const void *buf, PRInt32
// si is idle and good, and no other socket is currently busy,
// so it's fine to continue with the request.
- if (!si->mThreadData->ensure_buffer_size(amount))
+ // However, use special handling for the
+ // mOneBytePendingFromEarlierWrite
+ // scenario, where we will not change any of our buffers at this point,
+ // as we are waiting for completion of the earlier write.
+
+ if (!si->mThreadData->mOneBytePendingFromEarlierWrite)
{
- PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
- return -1;
+ if (!si->mThreadData->ensure_buffer_size(amount))
+ {
+ PR_SetError(PR_OUT_OF_MEMORY_ERROR, 0);
+ return -1;
+ }
+
+ memcpy(si->mThreadData->mSSLDataBuffer, buf, amount);
+ si->mThreadData->mSSLRequestedTransferAmount = amount;
}
- memcpy(si->mThreadData->mSSLDataBuffer, buf, amount);
- si->mThreadData->mSSLRequestedTransferAmount = amount;
si->mThreadData->mSSLState = nsSSLSocketThreadData::ssl_pending_write;
{
@@ -875,8 +901,7 @@ void nsSSLThread::Run(void)
{
// no work to do ? let's wait a moment
- PRIntervalTime wait_time = PR_TicksPerSecond() / 4;
- PR_WaitCondVar(mCond, wait_time);
+ PR_WaitCondVar(mCond, PR_INTERVAL_NO_TIMEOUT);
}
} while (!pending_work && !mExitRequested && !mSocketScheduledToBeDestroyed);
@@ -896,10 +921,12 @@ void nsSSLThread::Run(void)
{
// In this scope we need to make sure NSS does not go away
// while we are busy.
-
nsNSSShutDownPreventionLock locker;
- PRFileDesc *realFileDesc = mBusySocket->mThreadData->mReplacedSSLFileDesc;
+ // Reference for shorter code and to avoid multiple dereferencing.
+ nsSSLSocketThreadData &bstd = *mBusySocket->mThreadData;
+
+ PRFileDesc *realFileDesc = bstd.mReplacedSSLFileDesc;
if (!realFileDesc)
{
realFileDesc = mBusySocket->mFd->lower;
@@ -907,44 +934,83 @@ void nsSSLThread::Run(void)
if (nsSSLSocketThreadData::ssl_pending_write == busy_socket_ssl_state)
{
- PRInt32 bytesWritten = realFileDesc->methods
- ->write(realFileDesc,
- mBusySocket->mThreadData->mSSLDataBuffer,
- mBusySocket->mThreadData->mSSLRequestedTransferAmount);
+ PRInt32 bytesWritten = 0;
+ if (bstd.mOneBytePendingFromEarlierWrite)
+ {
+ // Let's try to flush the final pending byte (that libSSL might already have
+ // processed). Let's be correct and send the final byte from our buffer.
+ bytesWritten = realFileDesc->methods
+ ->write(realFileDesc, &bstd.mThePendingByte, 1);
+
#ifdef DEBUG_SSL_VERBOSE
- PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("[%p] wrote %d bytes\n", (void*)fd, bytesWritten));
+ PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("[%p] wrote %d bytes\n", (void*)realFileDesc, bytesWritten));
#endif
-
- bytesWritten = checkHandshake(bytesWritten, PR_FALSE, realFileDesc, mBusySocket);
- if (bytesWritten < 0) {
- // give the error back to caller
- mBusySocket->mThreadData->mPRErrorCode = PR_GetError();
+
+ bytesWritten = checkHandshake(bytesWritten, PR_FALSE, realFileDesc, mBusySocket);
+ if (bytesWritten < 0) {
+ // give the error back to caller
+ bstd.mPRErrorCode = PR_GetError();
+ }
+ else if (bytesWritten == 1) {
+ // Cool, all flushed now. We can exit the one-byte-pending mode,
+ // and report the full amount back to the caller.
+ bytesWritten = bstd.mOriginalRequestedTransferAmount;
+ bstd.mOriginalRequestedTransferAmount = 0;
+ bstd.mOneBytePendingFromEarlierWrite = PR_FALSE;
+ }
+ }
+ else
+ {
+ // standard code, try to write the buffer we've been given just now
+ bytesWritten = realFileDesc->methods
+ ->write(realFileDesc,
+ bstd.mSSLDataBuffer,
+ bstd.mSSLRequestedTransferAmount);
+
+#ifdef DEBUG_SSL_VERBOSE
+ PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("[%p] wrote %d bytes (out of %d)\n",
+ (void*)realFileDesc, bytesWritten, bstd.mSSLRequestedTransferAmount));
+#endif
+
+ bytesWritten = checkHandshake(bytesWritten, PR_FALSE, realFileDesc, mBusySocket);
+ if (bytesWritten < 0) {
+ // give the error back to caller
+ bstd.mPRErrorCode = PR_GetError();
+ }
+ else if (bstd.mSSLRequestedTransferAmount > 1 &&
+ bytesWritten == (bstd.mSSLRequestedTransferAmount - 1)) {
+ // libSSL signaled us a short write.
+ // While libSSL accepted all data, not all bytes were flushed to the OS socket.
+ bstd.mThePendingByte = *(bstd.mSSLDataBuffer + (bstd.mSSLRequestedTransferAmount-1));
+ bytesWritten = -1;
+ bstd.mPRErrorCode = PR_WOULD_BLOCK_ERROR;
+ bstd.mOneBytePendingFromEarlierWrite = PR_TRUE;
+ bstd.mOriginalRequestedTransferAmount = bstd.mSSLRequestedTransferAmount;
+ }
}
- mBusySocket->mThreadData->mSSLResultRemainingBytes = bytesWritten;
+ bstd.mSSLResultRemainingBytes = bytesWritten;
busy_socket_ssl_state = nsSSLSocketThreadData::ssl_writing_done;
}
else if (nsSSLSocketThreadData::ssl_pending_read == busy_socket_ssl_state)
{
PRInt32 bytesRead = realFileDesc->methods
->read(realFileDesc,
- mBusySocket->mThreadData->mSSLDataBuffer,
- mBusySocket->mThreadData->mSSLRequestedTransferAmount);
+ bstd.mSSLDataBuffer,
+ bstd.mSSLRequestedTransferAmount);
#ifdef DEBUG_SSL_VERBOSE
- PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("[%p] read %d bytes\n", (void*)fd, bytesRead));
- DEBUG_DUMP_BUFFER((unsigned char*)buf, bytesRead);
+ PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("[%p] read %d bytes\n", (void*)realFileDesc, bytesRead));
#endif
bytesRead = checkHandshake(bytesRead, PR_TRUE, realFileDesc, mBusySocket);
if (bytesRead < 0) {
// give the error back to caller
- mBusySocket->mThreadData->mPRErrorCode = PR_GetError();
+ bstd.mPRErrorCode = PR_GetError();
}
- mBusySocket->mThreadData->mSSLResultRemainingBytes = bytesRead;
- mBusySocket->mThreadData->mSSLRemainingReadResultData =
- mBusySocket->mThreadData->mSSLDataBuffer;
+ bstd.mSSLResultRemainingBytes = bytesRead;
+ bstd.mSSLRemainingReadResultData = bstd.mSSLDataBuffer;
busy_socket_ssl_state = nsSSLSocketThreadData::ssl_reading_done;
}
}
diff --git a/mozilla/security/nss/lib/ckfw/builtins/Makefile b/mozilla/security/nss/lib/ckfw/builtins/Makefile
index 560044f0b8e..5e11114e32b 100644
--- a/mozilla/security/nss/lib/ckfw/builtins/Makefile
+++ b/mozilla/security/nss/lib/ckfw/builtins/Makefile
@@ -34,7 +34,7 @@
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
-MAKEFILE_CVS_ID = "@(#) $RCSfile: Makefile,v $ $Revision: 1.16 $ $Date: 2005-08-25 20:08:27 $"
+MAKEFILE_CVS_ID = "@(#) $RCSfile: Makefile,v $ $Revision: 1.16.2.3 $ $Date: 2007-05-09 01:38:15 $"
include manifest.mn
include $(CORE_DEPTH)/coreconf/config.mk
@@ -77,7 +77,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# Generate certdata.c.
generate:
- perl certdata.perl < certdata.txt
+ $(PERL) certdata.perl < certdata.txt
# This'll need some help from a build person.
diff --git a/mozilla/security/nss/lib/ckfw/builtins/certdata.c b/mozilla/security/nss/lib/ckfw/builtins/certdata.c
index 288534a6ad2..697c81356a2 100644
--- a/mozilla/security/nss/lib/ckfw/builtins/certdata.c
+++ b/mozilla/security/nss/lib/ckfw/builtins/certdata.c
@@ -35,14 +35,14 @@
*
* ***** END LICENSE BLOCK ***** */
#ifdef DEBUG
-static const char CVS_ID[] = "@(#) $RCSfile: certdata.c,v $ $Revision: 1.36.24.3 $ $Date: 2006-09-15 00:27:03 $""; @(#) $RCSfile: certdata.c,v $ $Revision: 1.36.24.3 $ $Date: 2006-09-15 00:27:03 $";
+static const char CVS_ID[] = "@(#) $RCSfile: certdata.c,v $ $Revision: 1.36.24.6 $ $Date: 2007-06-16 05:10:58 $""; @(#) $RCSfile: certdata.c,v $ $Revision: 1.36.24.6 $ $Date: 2007-06-16 05:10:58 $";
#endif /* DEBUG */
#ifndef BUILTINS_H
#include "builtins.h"
#endif /* BUILTINS_H */
-static const CK_TRUST ckt_netscape_valid = CKT_NETSCAPE_VALID;
+static const CK_TRUST ckt_netscape_trust_unknown = CKT_NETSCAPE_TRUST_UNKNOWN;
static const CK_OBJECT_CLASS cko_certificate = CKO_CERTIFICATE;
static const CK_TRUST ckt_netscape_trusted_delegator = CKT_NETSCAPE_TRUSTED_DELEGATOR;
static const CK_OBJECT_CLASS cko_netscape_trust = CKO_NETSCAPE_TRUST;
@@ -255,7 +255,7 @@ static const CK_ATTRIBUTE_TYPE nss_builtins_types_66 [] = {
CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
};
static const CK_ATTRIBUTE_TYPE nss_builtins_types_67 [] = {
- CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING, CKA_TRUST_STEP_UP_APPROVED
};
static const CK_ATTRIBUTE_TYPE nss_builtins_types_68 [] = {
CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
@@ -273,7 +273,7 @@ static const CK_ATTRIBUTE_TYPE nss_builtins_types_72 [] = {
CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
};
static const CK_ATTRIBUTE_TYPE nss_builtins_types_73 [] = {
- CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING, CKA_TRUST_STEP_UP_APPROVED
};
static const CK_ATTRIBUTE_TYPE nss_builtins_types_74 [] = {
CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
@@ -303,7 +303,7 @@ static const CK_ATTRIBUTE_TYPE nss_builtins_types_82 [] = {
CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
};
static const CK_ATTRIBUTE_TYPE nss_builtins_types_83 [] = {
- CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING, CKA_TRUST_STEP_UP_APPROVED
};
static const CK_ATTRIBUTE_TYPE nss_builtins_types_84 [] = {
CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
@@ -677,6 +677,54 @@ static const CK_ATTRIBUTE_TYPE nss_builtins_types_206 [] = {
static const CK_ATTRIBUTE_TYPE nss_builtins_types_207 [] = {
CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING, CKA_TRUST_STEP_UP_APPROVED
};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_208 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_209 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING, CKA_TRUST_STEP_UP_APPROVED
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_210 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_211 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING, CKA_TRUST_STEP_UP_APPROVED
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_212 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_213 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING, CKA_TRUST_STEP_UP_APPROVED
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_214 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_215 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING, CKA_TRUST_STEP_UP_APPROVED
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_216 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_217 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING, CKA_TRUST_STEP_UP_APPROVED
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_218 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_219 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING, CKA_TRUST_STEP_UP_APPROVED
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_220 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_221 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING, CKA_TRUST_STEP_UP_APPROVED
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_222 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERTIFICATE_TYPE, CKA_SUBJECT, CKA_ID, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_VALUE
+};
+static const CK_ATTRIBUTE_TYPE nss_builtins_types_223 [] = {
+ CKA_CLASS, CKA_TOKEN, CKA_PRIVATE, CKA_MODIFIABLE, CKA_LABEL, CKA_CERT_SHA1_HASH, CKA_CERT_MD5_HASH, CKA_ISSUER, CKA_SERIAL_NUMBER, CKA_TRUST_SERVER_AUTH, CKA_TRUST_EMAIL_PROTECTION, CKA_TRUST_CODE_SIGNING, CKA_TRUST_STEP_UP_APPROVED
+};
#ifdef DEBUG
static const NSSItem nss_builtins_items_0 [] = {
{ (void *)&cko_data, (PRUint32)sizeof(CK_OBJECT_CLASS) },
@@ -685,7 +733,7 @@ static const NSSItem nss_builtins_items_0 [] = {
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)"CVS ID", (PRUint32)7 },
{ (void *)"NSS", (PRUint32)4 },
- { (void *)"@(#) $RCSfile: certdata.c,v $ $Revision: 1.36.24.3 $ $Date: 2006-09-15 00:27:03 $""; @(#) $RCSfile: certdata.c,v $ $Revision: 1.36.24.3 $ $Date: 2006-09-15 00:27:03 $", (PRUint32)165 }
+ { (void *)"@(#) $RCSfile: certdata.c,v $ $Revision: 1.36.24.6 $ $Date: 2007-06-16 05:10:58 $""; @(#) $RCSfile: certdata.c,v $ $Revision: 1.36.24.6 $ $Date: 2007-06-16 05:10:58 $", (PRUint32)165 }
};
#endif /* DEBUG */
static const NSSItem nss_builtins_items_1 [] = {
@@ -784,7 +832,7 @@ static const NSSItem nss_builtins_items_3 [] = {
, (PRUint32)18 },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) }
};
static const NSSItem nss_builtins_items_4 [] = {
@@ -1080,7 +1128,7 @@ static const NSSItem nss_builtins_items_9 [] = {
, (PRUint32)206 },
{ (void *)"\002\001\000"
, (PRUint32)3 },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
@@ -1206,7 +1254,7 @@ static const NSSItem nss_builtins_items_11 [] = {
, (PRUint32)210 },
{ (void *)"\002\001\000"
, (PRUint32)3 },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
@@ -1333,9 +1381,9 @@ static const NSSItem nss_builtins_items_13 [] = {
, (PRUint32)212 },
{ (void *)"\002\001\000"
, (PRUint32)3 },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
static const NSSItem nss_builtins_items_14 [] = {
@@ -1456,7 +1504,7 @@ static const NSSItem nss_builtins_items_15 [] = {
{ (void *)"\002\001\001"
, (PRUint32)3 },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) }
};
@@ -1582,7 +1630,7 @@ static const NSSItem nss_builtins_items_17 [] = {
{ (void *)"\002\001\001"
, (PRUint32)3 },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) }
};
@@ -2353,9 +2401,9 @@ static const NSSItem nss_builtins_items_31 [] = {
{ (void *)"\002\021\000\315\272\177\126\360\337\344\274\124\376\042\254\263"
"\162\252\125"
, (PRUint32)19 },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
static const NSSItem nss_builtins_items_32 [] = {
@@ -2445,7 +2493,7 @@ static const NSSItem nss_builtins_items_33 [] = {
{ (void *)"\002\020\055\033\374\112\027\215\243\221\353\347\377\365\213\105"
"\276\013"
, (PRUint32)18 },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
@@ -2660,9 +2708,9 @@ static const NSSItem nss_builtins_items_37 [] = {
{ (void *)"\002\020\114\307\352\252\230\076\161\323\223\020\370\075\072\211"
"\221\222"
, (PRUint32)18 },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
static const NSSItem nss_builtins_items_38 [] = {
@@ -2783,7 +2831,7 @@ static const NSSItem nss_builtins_items_39 [] = {
{ (void *)"\002\021\000\271\057\140\314\210\237\241\172\106\011\270\133\160"
"\154\212\257"
, (PRUint32)19 },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
@@ -3142,6 +3190,114 @@ static const NSSItem nss_builtins_items_45 [] = {
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
static const NSSItem nss_builtins_items_46 [] = {
+ { (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"GlobalSign Root CA - R2", (PRUint32)24 },
+ { (void *)&ckc_x_509, (PRUint32)sizeof(CK_CERTIFICATE_TYPE) },
+ { (void *)"\060\114\061\040\060\036\006\003\125\004\013\023\027\107\154\157"
+"\142\141\154\123\151\147\156\040\122\157\157\164\040\103\101\040"
+"\055\040\122\062\061\023\060\021\006\003\125\004\012\023\012\107"
+"\154\157\142\141\154\123\151\147\156\061\023\060\021\006\003\125"
+"\004\003\023\012\107\154\157\142\141\154\123\151\147\156"
+, (PRUint32)78 },
+ { (void *)"0", (PRUint32)2 },
+ { (void *)"\060\114\061\040\060\036\006\003\125\004\013\023\027\107\154\157"
+"\142\141\154\123\151\147\156\040\122\157\157\164\040\103\101\040"
+"\055\040\122\062\061\023\060\021\006\003\125\004\012\023\012\107"
+"\154\157\142\141\154\123\151\147\156\061\023\060\021\006\003\125"
+"\004\003\023\012\107\154\157\142\141\154\123\151\147\156"
+, (PRUint32)78 },
+ { (void *)"\002\013\004\000\000\000\000\001\017\206\046\346\015"
+, (PRUint32)13 },
+ { (void *)"\060\202\003\272\060\202\002\242\240\003\002\001\002\002\013\004"
+"\000\000\000\000\001\017\206\046\346\015\060\015\006\011\052\206"
+"\110\206\367\015\001\001\005\005\000\060\114\061\040\060\036\006"
+"\003\125\004\013\023\027\107\154\157\142\141\154\123\151\147\156"
+"\040\122\157\157\164\040\103\101\040\055\040\122\062\061\023\060"
+"\021\006\003\125\004\012\023\012\107\154\157\142\141\154\123\151"
+"\147\156\061\023\060\021\006\003\125\004\003\023\012\107\154\157"
+"\142\141\154\123\151\147\156\060\036\027\015\060\066\061\062\061"
+"\065\060\070\060\060\060\060\132\027\015\062\061\061\062\061\065"
+"\060\070\060\060\060\060\132\060\114\061\040\060\036\006\003\125"
+"\004\013\023\027\107\154\157\142\141\154\123\151\147\156\040\122"
+"\157\157\164\040\103\101\040\055\040\122\062\061\023\060\021\006"
+"\003\125\004\012\023\012\107\154\157\142\141\154\123\151\147\156"
+"\061\023\060\021\006\003\125\004\003\023\012\107\154\157\142\141"
+"\154\123\151\147\156\060\202\001\042\060\015\006\011\052\206\110"
+"\206\367\015\001\001\001\005\000\003\202\001\017\000\060\202\001"
+"\012\002\202\001\001\000\246\317\044\016\276\056\157\050\231\105"
+"\102\304\253\076\041\124\233\013\323\177\204\160\372\022\263\313"
+"\277\207\137\306\177\206\323\262\060\134\326\375\255\361\173\334"
+"\345\370\140\226\011\222\020\365\320\123\336\373\173\176\163\210"
+"\254\122\210\173\112\246\312\111\246\136\250\247\214\132\021\274"
+"\172\202\353\276\214\351\263\254\226\045\007\227\112\231\052\007"
+"\057\264\036\167\277\212\017\265\002\174\033\226\270\305\271\072"
+"\054\274\326\022\271\353\131\175\342\320\006\206\137\136\111\152"
+"\265\071\136\210\064\354\274\170\014\010\230\204\154\250\315\113"
+"\264\240\175\014\171\115\360\270\055\313\041\312\325\154\133\175"
+"\341\240\051\204\241\371\323\224\111\313\044\142\221\040\274\335"
+"\013\325\331\314\371\352\047\012\053\163\221\306\235\033\254\310"
+"\313\350\340\240\364\057\220\213\115\373\260\066\033\366\031\172"
+"\205\340\155\362\141\023\210\134\237\340\223\012\121\227\212\132"
+"\316\257\253\325\367\252\011\252\140\275\334\331\137\337\162\251"
+"\140\023\136\000\001\311\112\372\077\244\352\007\003\041\002\216"
+"\202\312\003\302\233\217\002\003\001\000\001\243\201\234\060\201"
+"\231\060\016\006\003\125\035\017\001\001\377\004\004\003\002\001"
+"\006\060\017\006\003\125\035\023\001\001\377\004\005\060\003\001"
+"\001\377\060\035\006\003\125\035\016\004\026\004\024\233\342\007"
+"\127\147\034\036\300\152\006\336\131\264\232\055\337\334\031\206"
+"\056\060\066\006\003\125\035\037\004\057\060\055\060\053\240\051"
+"\240\047\206\045\150\164\164\160\072\057\057\143\162\154\056\147"
+"\154\157\142\141\154\163\151\147\156\056\156\145\164\057\162\157"
+"\157\164\055\162\062\056\143\162\154\060\037\006\003\125\035\043"
+"\004\030\060\026\200\024\233\342\007\127\147\034\036\300\152\006"
+"\336\131\264\232\055\337\334\031\206\056\060\015\006\011\052\206"
+"\110\206\367\015\001\001\005\005\000\003\202\001\001\000\231\201"
+"\123\207\034\150\227\206\221\354\340\112\270\104\013\253\201\254"
+"\047\117\326\301\270\034\103\170\263\014\232\374\352\054\074\156"
+"\141\033\115\113\051\365\237\005\035\046\301\270\351\203\000\142"
+"\105\266\251\010\223\271\251\063\113\030\232\302\370\207\210\116"
+"\333\335\161\064\032\301\124\332\106\077\340\323\052\253\155\124"
+"\042\365\072\142\315\040\157\272\051\211\327\335\221\356\323\134"
+"\242\076\241\133\101\365\337\345\144\103\055\351\325\071\253\322"
+"\242\337\267\213\320\300\200\031\034\105\300\055\214\350\370\055"
+"\244\164\126\111\305\005\265\117\025\336\156\104\170\071\207\250"
+"\176\273\363\171\030\221\273\364\157\235\301\360\214\065\214\135"
+"\001\373\303\155\271\357\104\155\171\106\061\176\012\376\251\202"
+"\301\377\357\253\156\040\304\120\311\137\235\115\233\027\214\014"
+"\345\001\311\240\101\152\163\123\372\245\120\264\156\045\017\373"
+"\114\030\364\375\122\331\216\151\261\350\021\017\336\210\330\373"
+"\035\111\367\252\336\225\317\040\170\302\140\022\333\045\100\214"
+"\152\374\176\102\070\100\144\022\367\236\201\341\223\056"
+, (PRUint32)958 }
+};
+static const NSSItem nss_builtins_items_47 [] = {
+ { (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"GlobalSign Root CA - R2", (PRUint32)24 },
+ { (void *)"\165\340\253\266\023\205\022\047\034\004\370\137\335\336\070\344"
+"\267\044\056\376"
+, (PRUint32)20 },
+ { (void *)"\224\024\167\176\076\136\375\217\060\275\101\260\317\347\320\060"
+, (PRUint32)16 },
+ { (void *)"\060\114\061\040\060\036\006\003\125\004\013\023\027\107\154\157"
+"\142\141\154\123\151\147\156\040\122\157\157\164\040\103\101\040"
+"\055\040\122\062\061\023\060\021\006\003\125\004\012\023\012\107"
+"\154\157\142\141\154\123\151\147\156\061\023\060\021\006\003\125"
+"\004\003\023\012\107\154\157\142\141\154\123\151\147\156"
+, (PRUint32)78 },
+ { (void *)"\002\013\004\000\000\000\000\001\017\206\046\346\015"
+, (PRUint32)13 },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
+};
+static const NSSItem nss_builtins_items_48 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -3226,7 +3382,7 @@ static const NSSItem nss_builtins_items_46 [] = {
"\161\202\053\231\317\072\267\365\055\162\310"
, (PRUint32)747 }
};
-static const NSSItem nss_builtins_items_47 [] = {
+static const NSSItem nss_builtins_items_49 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -3257,7 +3413,7 @@ static const NSSItem nss_builtins_items_47 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_48 [] = {
+static const NSSItem nss_builtins_items_50 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -3342,7 +3498,7 @@ static const NSSItem nss_builtins_items_48 [] = {
"\276\355\164\114\274\133\325\142\037\103\335"
, (PRUint32)747 }
};
-static const NSSItem nss_builtins_items_49 [] = {
+static const NSSItem nss_builtins_items_51 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -3373,7 +3529,7 @@ static const NSSItem nss_builtins_items_49 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_50 [] = {
+static const NSSItem nss_builtins_items_52 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -3458,7 +3614,7 @@ static const NSSItem nss_builtins_items_50 [] = {
"\040\017\105\176\153\242\177\243\214\025\356"
, (PRUint32)747 }
};
-static const NSSItem nss_builtins_items_51 [] = {
+static const NSSItem nss_builtins_items_53 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -3489,7 +3645,7 @@ static const NSSItem nss_builtins_items_51 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_52 [] = {
+static const NSSItem nss_builtins_items_54 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -3596,7 +3752,7 @@ static const NSSItem nss_builtins_items_52 [] = {
"\113\336\006\226\161\054\362\333\266\037\244\357\077\356"
, (PRUint32)1054 }
};
-static const NSSItem nss_builtins_items_53 [] = {
+static const NSSItem nss_builtins_items_55 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -3624,12 +3780,12 @@ static const NSSItem nss_builtins_items_53 [] = {
{ (void *)"\002\021\000\213\133\165\126\204\124\205\013\000\317\257\070\110"
"\316\261\244"
, (PRUint32)19 },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_54 [] = {
+static const NSSItem nss_builtins_items_56 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -3736,7 +3892,7 @@ static const NSSItem nss_builtins_items_54 [] = {
"\311\130\020\371\252\357\132\266\317\113\113\337\052"
, (PRUint32)1053 }
};
-static const NSSItem nss_builtins_items_55 [] = {
+static const NSSItem nss_builtins_items_57 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -3764,12 +3920,12 @@ static const NSSItem nss_builtins_items_55 [] = {
{ (void *)"\002\020\141\160\313\111\214\137\230\105\051\347\260\246\331\120"
"\133\172"
, (PRUint32)18 },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_56 [] = {
+static const NSSItem nss_builtins_items_58 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -3876,7 +4032,7 @@ static const NSSItem nss_builtins_items_56 [] = {
"\153\271\012\172\116\117\113\204\356\113\361\175\335\021"
, (PRUint32)1054 }
};
-static const NSSItem nss_builtins_items_57 [] = {
+static const NSSItem nss_builtins_items_59 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -3909,7 +4065,7 @@ static const NSSItem nss_builtins_items_57 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_58 [] = {
+static const NSSItem nss_builtins_items_60 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4016,7 +4172,7 @@ static const NSSItem nss_builtins_items_58 [] = {
"\367\146\103\363\236\203\076\040\252\303\065\140\221\316"
, (PRUint32)1054 }
};
-static const NSSItem nss_builtins_items_59 [] = {
+static const NSSItem nss_builtins_items_61 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4049,7 +4205,7 @@ static const NSSItem nss_builtins_items_59 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_60 [] = {
+static const NSSItem nss_builtins_items_62 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4167,7 +4323,7 @@ static const NSSItem nss_builtins_items_60 [] = {
"\155\055\105\013\367\012\223\352\355\006\371\262"
, (PRUint32)1244 }
};
-static const NSSItem nss_builtins_items_61 [] = {
+static const NSSItem nss_builtins_items_63 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4199,7 +4355,7 @@ static const NSSItem nss_builtins_items_61 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_62 [] = {
+static const NSSItem nss_builtins_items_64 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4319,7 +4475,7 @@ static const NSSItem nss_builtins_items_62 [] = {
"\354"
, (PRUint32)1265 }
};
-static const NSSItem nss_builtins_items_63 [] = {
+static const NSSItem nss_builtins_items_65 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4351,7 +4507,7 @@ static const NSSItem nss_builtins_items_63 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_64 [] = {
+static const NSSItem nss_builtins_items_66 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4459,7 +4615,7 @@ static const NSSItem nss_builtins_items_64 [] = {
"\275\114\105\236\141\272\277\204\201\222\003\321\322\151\174\305"
, (PRUint32)1120 }
};
-static const NSSItem nss_builtins_items_65 [] = {
+static const NSSItem nss_builtins_items_67 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4490,7 +4646,7 @@ static const NSSItem nss_builtins_items_65 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_66 [] = {
+static const NSSItem nss_builtins_items_68 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4572,7 +4728,7 @@ static const NSSItem nss_builtins_items_66 [] = {
"\347\201\035\031\303\044\102\352\143\071\251"
, (PRUint32)891 }
};
-static const NSSItem nss_builtins_items_67 [] = {
+static const NSSItem nss_builtins_items_69 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4594,9 +4750,10 @@ static const NSSItem nss_builtins_items_67 [] = {
, (PRUint32)6 },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) }
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_68 [] = {
+static const NSSItem nss_builtins_items_70 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4664,7 +4821,7 @@ static const NSSItem nss_builtins_items_68 [] = {
"\126\224\251\125"
, (PRUint32)660 }
};
-static const NSSItem nss_builtins_items_69 [] = {
+static const NSSItem nss_builtins_items_71 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4689,7 +4846,7 @@ static const NSSItem nss_builtins_items_69 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_70 [] = {
+static const NSSItem nss_builtins_items_72 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4756,7 +4913,7 @@ static const NSSItem nss_builtins_items_70 [] = {
"\132\052\202\262\067\171"
, (PRUint32)646 }
};
-static const NSSItem nss_builtins_items_71 [] = {
+static const NSSItem nss_builtins_items_73 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4781,7 +4938,7 @@ static const NSSItem nss_builtins_items_71 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_72 [] = {
+static const NSSItem nss_builtins_items_74 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4856,7 +5013,7 @@ static const NSSItem nss_builtins_items_72 [] = {
"\221\060\352\315"
, (PRUint32)804 }
};
-static const NSSItem nss_builtins_items_73 [] = {
+static const NSSItem nss_builtins_items_75 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4877,9 +5034,10 @@ static const NSSItem nss_builtins_items_73 [] = {
, (PRUint32)6 },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) }
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_74 [] = {
+static const NSSItem nss_builtins_items_76 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4964,7 +5122,7 @@ static const NSSItem nss_builtins_items_74 [] = {
"\265\314\255\006"
, (PRUint32)900 }
};
-static const NSSItem nss_builtins_items_75 [] = {
+static const NSSItem nss_builtins_items_77 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -4987,10 +5145,10 @@ static const NSSItem nss_builtins_items_75 [] = {
, (PRUint32)4 },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_76 [] = {
+static const NSSItem nss_builtins_items_78 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5099,7 +5257,7 @@ static const NSSItem nss_builtins_items_76 [] = {
"\043\020\077\041\020\131\267\344\100\335\046\014\043\366\252\256"
, (PRUint32)1328 }
};
-static const NSSItem nss_builtins_items_77 [] = {
+static const NSSItem nss_builtins_items_79 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5124,7 +5282,7 @@ static const NSSItem nss_builtins_items_77 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_78 [] = {
+static const NSSItem nss_builtins_items_80 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5218,7 +5376,7 @@ static const NSSItem nss_builtins_items_78 [] = {
"\065\341\035\026\034\320\274\053\216\326\161\331"
, (PRUint32)1052 }
};
-static const NSSItem nss_builtins_items_79 [] = {
+static const NSSItem nss_builtins_items_81 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5241,10 +5399,10 @@ static const NSSItem nss_builtins_items_79 [] = {
, (PRUint32)3 },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_80 [] = {
+static const NSSItem nss_builtins_items_82 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5342,7 +5500,7 @@ static const NSSItem nss_builtins_items_80 [] = {
"\027\132\173\320\274\307\217\116\206\004"
, (PRUint32)1082 }
};
-static const NSSItem nss_builtins_items_81 [] = {
+static const NSSItem nss_builtins_items_83 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5369,7 +5527,7 @@ static const NSSItem nss_builtins_items_81 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_82 [] = {
+static const NSSItem nss_builtins_items_84 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5463,7 +5621,7 @@ static const NSSItem nss_builtins_items_82 [] = {
"\116\072\063\014\053\263\055\220\006"
, (PRUint32)1049 }
};
-static const NSSItem nss_builtins_items_83 [] = {
+static const NSSItem nss_builtins_items_85 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5474,22 +5632,22 @@ static const NSSItem nss_builtins_items_83 [] = {
, (PRUint32)20 },
{ (void *)"\301\142\076\043\305\202\163\234\003\131\113\053\351\167\111\177"
, (PRUint32)16 },
- { (void *)"\060\157\061\013\060\011\006\003\125\004\006\023\002\123\105\061"
+ { (void *)"\060\144\061\013\060\011\006\003\125\004\006\023\002\123\105\061"
"\024\060\022\006\003\125\004\012\023\013\101\144\144\124\162\165"
-"\163\164\040\101\102\061\046\060\044\006\003\125\004\013\023\035"
-"\101\144\144\124\162\165\163\164\040\105\170\164\145\162\156\141"
-"\154\040\124\124\120\040\116\145\164\167\157\162\153\061\042\060"
-"\040\006\003\125\004\003\023\031\101\144\144\124\162\165\163\164"
-"\040\105\170\164\145\162\156\141\154\040\103\101\040\122\157\157"
-"\164"
-, (PRUint32)113 },
+"\163\164\040\101\102\061\035\060\033\006\003\125\004\013\023\024"
+"\101\144\144\124\162\165\163\164\040\124\124\120\040\116\145\164"
+"\167\157\162\153\061\040\060\036\006\003\125\004\003\023\027\101"
+"\144\144\124\162\165\163\164\040\120\165\142\154\151\143\040\103"
+"\101\040\122\157\157\164"
+, (PRUint32)102 },
{ (void *)"\002\001\001"
, (PRUint32)3 },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) }
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_84 [] = {
+static const NSSItem nss_builtins_items_86 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5584,7 +5742,7 @@ static const NSSItem nss_builtins_items_84 [] = {
"\306\241"
, (PRUint32)1058 }
};
-static const NSSItem nss_builtins_items_85 [] = {
+static const NSSItem nss_builtins_items_87 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5610,7 +5768,7 @@ static const NSSItem nss_builtins_items_85 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_86 [] = {
+static const NSSItem nss_builtins_items_88 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5702,7 +5860,7 @@ static const NSSItem nss_builtins_items_86 [] = {
"\051\303"
, (PRUint32)930 }
};
-static const NSSItem nss_builtins_items_87 [] = {
+static const NSSItem nss_builtins_items_89 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5729,7 +5887,7 @@ static const NSSItem nss_builtins_items_87 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_88 [] = {
+static const NSSItem nss_builtins_items_90 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5821,7 +5979,7 @@ static const NSSItem nss_builtins_items_88 [] = {
"\064\215"
, (PRUint32)930 }
};
-static const NSSItem nss_builtins_items_89 [] = {
+static const NSSItem nss_builtins_items_91 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5848,7 +6006,7 @@ static const NSSItem nss_builtins_items_89 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_90 [] = {
+static const NSSItem nss_builtins_items_92 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5940,7 +6098,7 @@ static const NSSItem nss_builtins_items_90 [] = {
"\116\101\325\226\343\116"
, (PRUint32)934 }
};
-static const NSSItem nss_builtins_items_91 [] = {
+static const NSSItem nss_builtins_items_93 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -5967,7 +6125,7 @@ static const NSSItem nss_builtins_items_91 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_92 [] = {
+static const NSSItem nss_builtins_items_94 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6059,7 +6217,7 @@ static const NSSItem nss_builtins_items_92 [] = {
"\316\324\357"
, (PRUint32)931 }
};
-static const NSSItem nss_builtins_items_93 [] = {
+static const NSSItem nss_builtins_items_95 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6086,7 +6244,7 @@ static const NSSItem nss_builtins_items_93 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_94 [] = {
+static const NSSItem nss_builtins_items_96 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6187,7 +6345,7 @@ static const NSSItem nss_builtins_items_94 [] = {
"\024"
, (PRUint32)977 }
};
-static const NSSItem nss_builtins_items_95 [] = {
+static const NSSItem nss_builtins_items_97 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6220,7 +6378,7 @@ static const NSSItem nss_builtins_items_95 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_96 [] = {
+static const NSSItem nss_builtins_items_98 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6295,7 +6453,7 @@ static const NSSItem nss_builtins_items_96 [] = {
"\011\254\211\111\323"
, (PRUint32)677 }
};
-static const NSSItem nss_builtins_items_97 [] = {
+static const NSSItem nss_builtins_items_99 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6323,7 +6481,7 @@ static const NSSItem nss_builtins_items_97 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_98 [] = {
+static const NSSItem nss_builtins_items_100 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6435,7 +6593,7 @@ static const NSSItem nss_builtins_items_98 [] = {
"\005\377\154\211\063\360\354\025\017"
, (PRUint32)1177 }
};
-static const NSSItem nss_builtins_items_99 [] = {
+static const NSSItem nss_builtins_items_101 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6466,7 +6624,7 @@ static const NSSItem nss_builtins_items_99 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_100 [] = {
+static const NSSItem nss_builtins_items_102 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6577,7 +6735,7 @@ static const NSSItem nss_builtins_items_100 [] = {
"\316\145\146\227\256\046\136"
, (PRUint32)1159 }
};
-static const NSSItem nss_builtins_items_101 [] = {
+static const NSSItem nss_builtins_items_103 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6608,7 +6766,7 @@ static const NSSItem nss_builtins_items_101 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_102 [] = {
+static const NSSItem nss_builtins_items_104 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6703,7 +6861,7 @@ static const NSSItem nss_builtins_items_102 [] = {
"\071\050\150\016\163\335\045\232\336\022"
, (PRUint32)1002 }
};
-static const NSSItem nss_builtins_items_103 [] = {
+static const NSSItem nss_builtins_items_105 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6731,7 +6889,7 @@ static const NSSItem nss_builtins_items_103 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_104 [] = {
+static const NSSItem nss_builtins_items_106 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6858,7 +7016,7 @@ static const NSSItem nss_builtins_items_104 [] = {
"\204\327\372\334\162\133\367\301\072\150"
, (PRUint32)1514 }
};
-static const NSSItem nss_builtins_items_105 [] = {
+static const NSSItem nss_builtins_items_107 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -6886,7 +7044,7 @@ static const NSSItem nss_builtins_items_105 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_106 [] = {
+static const NSSItem nss_builtins_items_108 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7001,7 +7159,7 @@ static const NSSItem nss_builtins_items_106 [] = {
"\061\210\027\120\237\311\304\016\213\330\250\002\143\015"
, (PRUint32)1390 }
};
-static const NSSItem nss_builtins_items_107 [] = {
+static const NSSItem nss_builtins_items_109 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7027,7 +7185,7 @@ static const NSSItem nss_builtins_items_107 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_108 [] = {
+static const NSSItem nss_builtins_items_110 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7157,7 +7315,7 @@ static const NSSItem nss_builtins_items_108 [] = {
"\254\142\127\251\367"
, (PRUint32)1621 }
};
-static const NSSItem nss_builtins_items_109 [] = {
+static const NSSItem nss_builtins_items_111 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7183,7 +7341,7 @@ static const NSSItem nss_builtins_items_109 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_110 [] = {
+static const NSSItem nss_builtins_items_112 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7299,7 +7457,7 @@ static const NSSItem nss_builtins_items_110 [] = {
"\230\150\373\001\103\326\033\342\011\261\227\034"
, (PRUint32)1388 }
};
-static const NSSItem nss_builtins_items_111 [] = {
+static const NSSItem nss_builtins_items_113 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7326,7 +7484,7 @@ static const NSSItem nss_builtins_items_111 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_112 [] = {
+static const NSSItem nss_builtins_items_114 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7404,7 +7562,7 @@ static const NSSItem nss_builtins_items_112 [] = {
"\354\040\005\141\336"
, (PRUint32)869 }
};
-static const NSSItem nss_builtins_items_113 [] = {
+static const NSSItem nss_builtins_items_115 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7428,7 +7586,7 @@ static const NSSItem nss_builtins_items_113 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_114 [] = {
+static const NSSItem nss_builtins_items_116 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7489,7 +7647,7 @@ static const NSSItem nss_builtins_items_114 [] = {
"\215\210\043\361\025\101\015\245\106\076\221\077\213\353\367\161"
, (PRUint32)608 }
};
-static const NSSItem nss_builtins_items_115 [] = {
+static const NSSItem nss_builtins_items_117 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7513,7 +7671,7 @@ static const NSSItem nss_builtins_items_115 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_116 [] = {
+static const NSSItem nss_builtins_items_118 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7591,7 +7749,7 @@ static const NSSItem nss_builtins_items_116 [] = {
"\302\005\146\200\241\313\346\063"
, (PRUint32)856 }
};
-static const NSSItem nss_builtins_items_117 [] = {
+static const NSSItem nss_builtins_items_119 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7615,7 +7773,7 @@ static const NSSItem nss_builtins_items_117 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_118 [] = {
+static const NSSItem nss_builtins_items_120 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7694,7 +7852,7 @@ static const NSSItem nss_builtins_items_118 [] = {
"\342\042\051\256\175\203\100\250\272\154"
, (PRUint32)874 }
};
-static const NSSItem nss_builtins_items_119 [] = {
+static const NSSItem nss_builtins_items_121 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7718,7 +7876,7 @@ static const NSSItem nss_builtins_items_119 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_120 [] = {
+static const NSSItem nss_builtins_items_122 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7829,7 +7987,7 @@ static const NSSItem nss_builtins_items_120 [] = {
"\244\346\216\330\371\051\110\212\316\163\376\054"
, (PRUint32)1388 }
};
-static const NSSItem nss_builtins_items_121 [] = {
+static const NSSItem nss_builtins_items_123 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7853,7 +8011,7 @@ static const NSSItem nss_builtins_items_121 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_122 [] = {
+static const NSSItem nss_builtins_items_124 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7964,7 +8122,7 @@ static const NSSItem nss_builtins_items_122 [] = {
"\362\034\054\176\256\002\026\322\126\320\057\127\123\107\350\222"
, (PRUint32)1392 }
};
-static const NSSItem nss_builtins_items_123 [] = {
+static const NSSItem nss_builtins_items_125 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -7988,7 +8146,7 @@ static const NSSItem nss_builtins_items_123 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_124 [] = {
+static const NSSItem nss_builtins_items_126 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8096,7 +8254,7 @@ static const NSSItem nss_builtins_items_124 [] = {
"\152\372\246\070\254\037\304\204"
, (PRUint32)1128 }
};
-static const NSSItem nss_builtins_items_125 [] = {
+static const NSSItem nss_builtins_items_127 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8127,7 +8285,7 @@ static const NSSItem nss_builtins_items_125 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_126 [] = {
+static const NSSItem nss_builtins_items_128 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8214,7 +8372,7 @@ static const NSSItem nss_builtins_items_126 [] = {
"\200\072\231\355\165\314\106\173"
, (PRUint32)936 }
};
-static const NSSItem nss_builtins_items_127 [] = {
+static const NSSItem nss_builtins_items_129 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8240,7 +8398,7 @@ static const NSSItem nss_builtins_items_127 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_128 [] = {
+static const NSSItem nss_builtins_items_130 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8359,7 +8517,7 @@ static const NSSItem nss_builtins_items_128 [] = {
"\105\217\046\221\242\216\376\251"
, (PRUint32)1448 }
};
-static const NSSItem nss_builtins_items_129 [] = {
+static const NSSItem nss_builtins_items_131 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8385,7 +8543,7 @@ static const NSSItem nss_builtins_items_129 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_130 [] = {
+static const NSSItem nss_builtins_items_132 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8473,7 +8631,7 @@ static const NSSItem nss_builtins_items_130 [] = {
"\222\340\134\366\007\017"
, (PRUint32)934 }
};
-static const NSSItem nss_builtins_items_131 [] = {
+static const NSSItem nss_builtins_items_133 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8500,7 +8658,7 @@ static const NSSItem nss_builtins_items_131 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_132 [] = {
+static const NSSItem nss_builtins_items_134 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8592,7 +8750,7 @@ static const NSSItem nss_builtins_items_132 [] = {
"\367\115\146\177\247\360\034\001\046\170\262\146\107\160\121\144"
, (PRUint32)864 }
};
-static const NSSItem nss_builtins_items_133 [] = {
+static const NSSItem nss_builtins_items_135 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8623,7 +8781,7 @@ static const NSSItem nss_builtins_items_133 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_134 [] = {
+static const NSSItem nss_builtins_items_136 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8715,7 +8873,7 @@ static const NSSItem nss_builtins_items_134 [] = {
"\030\122\051\213\107\064\022\011\324\273\222\065\357\017\333\064"
, (PRUint32)864 }
};
-static const NSSItem nss_builtins_items_135 [] = {
+static const NSSItem nss_builtins_items_137 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8746,7 +8904,7 @@ static const NSSItem nss_builtins_items_135 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_136 [] = {
+static const NSSItem nss_builtins_items_138 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8817,7 +8975,7 @@ static const NSSItem nss_builtins_items_136 [] = {
"\350\140\052\233\205\112\100\363\153\212\044\354\006\026\054\163"
, (PRUint32)784 }
};
-static const NSSItem nss_builtins_items_137 [] = {
+static const NSSItem nss_builtins_items_139 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8840,7 +8998,7 @@ static const NSSItem nss_builtins_items_137 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_138 [] = {
+static const NSSItem nss_builtins_items_140 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8938,7 +9096,7 @@ static const NSSItem nss_builtins_items_138 [] = {
"\225\351\066\226\230\156"
, (PRUint32)1078 }
};
-static const NSSItem nss_builtins_items_139 [] = {
+static const NSSItem nss_builtins_items_141 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -8965,7 +9123,7 @@ static const NSSItem nss_builtins_items_139 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_140 [] = {
+static const NSSItem nss_builtins_items_142 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -9064,7 +9222,7 @@ static const NSSItem nss_builtins_items_140 [] = {
"\354\375\051"
, (PRUint32)1091 }
};
-static const NSSItem nss_builtins_items_141 [] = {
+static const NSSItem nss_builtins_items_143 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -9091,7 +9249,7 @@ static const NSSItem nss_builtins_items_141 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_142 [] = {
+static const NSSItem nss_builtins_items_144 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -9192,7 +9350,7 @@ static const NSSItem nss_builtins_items_142 [] = {
"\160\136\310\304\170\260\142"
, (PRUint32)1095 }
};
-static const NSSItem nss_builtins_items_143 [] = {
+static const NSSItem nss_builtins_items_145 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -9220,7 +9378,7 @@ static const NSSItem nss_builtins_items_143 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_144 [] = {
+static const NSSItem nss_builtins_items_146 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -9398,7 +9556,7 @@ static const NSSItem nss_builtins_items_144 [] = {
"\001\177\046\304\143\365\045\102\136\142\275"
, (PRUint32)2043 }
};
-static const NSSItem nss_builtins_items_145 [] = {
+static const NSSItem nss_builtins_items_147 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -9435,7 +9593,7 @@ static const NSSItem nss_builtins_items_145 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_146 [] = {
+static const NSSItem nss_builtins_items_148 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -9612,7 +9770,7 @@ static const NSSItem nss_builtins_items_146 [] = {
"\206\063\076\346\057\110\156\257\124\220\116\255\261\045"
, (PRUint32)2030 }
};
-static const NSSItem nss_builtins_items_147 [] = {
+static const NSSItem nss_builtins_items_149 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -9649,7 +9807,7 @@ static const NSSItem nss_builtins_items_147 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_148 [] = {
+static const NSSItem nss_builtins_items_150 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -9826,7 +9984,7 @@ static const NSSItem nss_builtins_items_148 [] = {
"\257\175\310\352\351\324\126\331\016\023\262\305\105\120"
, (PRUint32)2030 }
};
-static const NSSItem nss_builtins_items_149 [] = {
+static const NSSItem nss_builtins_items_151 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -9863,7 +10021,7 @@ static const NSSItem nss_builtins_items_149 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_150 [] = {
+static const NSSItem nss_builtins_items_152 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10041,7 +10199,7 @@ static const NSSItem nss_builtins_items_150 [] = {
"\336\007\043\162\346\275\040\024\113\264\206"
, (PRUint32)2043 }
};
-static const NSSItem nss_builtins_items_151 [] = {
+static const NSSItem nss_builtins_items_153 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10078,7 +10236,7 @@ static const NSSItem nss_builtins_items_151 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_152 [] = {
+static const NSSItem nss_builtins_items_154 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10256,7 +10414,7 @@ static const NSSItem nss_builtins_items_152 [] = {
"\311\024\025\014\343\007\203\233\046\165\357"
, (PRUint32)2043 }
};
-static const NSSItem nss_builtins_items_153 [] = {
+static const NSSItem nss_builtins_items_155 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10293,7 +10451,7 @@ static const NSSItem nss_builtins_items_153 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_154 [] = {
+static const NSSItem nss_builtins_items_156 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10373,7 +10531,7 @@ static const NSSItem nss_builtins_items_154 [] = {
"\134\152\371\162\224\325\001\117\240\333\102"
, (PRUint32)699 }
};
-static const NSSItem nss_builtins_items_155 [] = {
+static const NSSItem nss_builtins_items_157 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10403,7 +10561,7 @@ static const NSSItem nss_builtins_items_155 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_156 [] = {
+static const NSSItem nss_builtins_items_158 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10587,7 +10745,7 @@ static const NSSItem nss_builtins_items_156 [] = {
"\207\112\137\334\357\351\126\360\012\014\350\165"
, (PRUint32)2108 }
};
-static const NSSItem nss_builtins_items_157 [] = {
+static const NSSItem nss_builtins_items_159 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10625,7 +10783,7 @@ static const NSSItem nss_builtins_items_157 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_158 [] = {
+static const NSSItem nss_builtins_items_160 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10751,7 +10909,7 @@ static const NSSItem nss_builtins_items_158 [] = {
"\112\164\066\371"
, (PRUint32)1492 }
};
-static const NSSItem nss_builtins_items_159 [] = {
+static const NSSItem nss_builtins_items_161 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10779,7 +10937,302 @@ static const NSSItem nss_builtins_items_159 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_160 [] = {
+static const NSSItem nss_builtins_items_162 [] = {
+ { (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"QuoVadis Root CA 2", (PRUint32)19 },
+ { (void *)&ckc_x_509, (PRUint32)sizeof(CK_CERTIFICATE_TYPE) },
+ { (void *)"\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061"
+"\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144"
+"\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003"
+"\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157"
+"\157\164\040\103\101\040\062"
+, (PRUint32)71 },
+ { (void *)"0", (PRUint32)2 },
+ { (void *)"\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061"
+"\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144"
+"\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003"
+"\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157"
+"\157\164\040\103\101\040\062"
+, (PRUint32)71 },
+ { (void *)"\002\002\005\011"
+, (PRUint32)4 },
+ { (void *)"\060\202\005\267\060\202\003\237\240\003\002\001\002\002\002\005"
+"\011\060\015\006\011\052\206\110\206\367\015\001\001\005\005\000"
+"\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061"
+"\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144"
+"\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003"
+"\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157"
+"\157\164\040\103\101\040\062\060\036\027\015\060\066\061\061\062"
+"\064\061\070\062\067\060\060\132\027\015\063\061\061\061\062\064"
+"\061\070\062\063\063\063\132\060\105\061\013\060\011\006\003\125"
+"\004\006\023\002\102\115\061\031\060\027\006\003\125\004\012\023"
+"\020\121\165\157\126\141\144\151\163\040\114\151\155\151\164\145"
+"\144\061\033\060\031\006\003\125\004\003\023\022\121\165\157\126"
+"\141\144\151\163\040\122\157\157\164\040\103\101\040\062\060\202"
+"\002\042\060\015\006\011\052\206\110\206\367\015\001\001\001\005"
+"\000\003\202\002\017\000\060\202\002\012\002\202\002\001\000\232"
+"\030\312\113\224\015\000\055\257\003\051\212\360\017\201\310\256"
+"\114\031\205\035\010\237\253\051\104\205\363\057\201\255\062\036"
+"\220\106\277\243\206\046\032\036\376\176\034\030\072\134\234\140"
+"\027\052\072\164\203\063\060\175\141\124\021\313\355\253\340\346"
+"\322\242\176\365\153\157\030\267\012\013\055\375\351\076\357\012"
+"\306\263\020\351\334\302\106\027\370\135\375\244\332\377\236\111"
+"\132\234\346\063\346\044\226\367\077\272\133\053\034\172\065\302"
+"\326\147\376\253\146\120\213\155\050\140\053\357\327\140\303\307"
+"\223\274\215\066\221\363\177\370\333\021\023\304\234\167\166\301"
+"\256\267\002\152\201\172\251\105\203\342\005\346\271\126\301\224"
+"\067\217\110\161\143\042\354\027\145\007\225\212\113\337\217\306"
+"\132\012\345\260\343\137\136\153\021\253\014\371\205\353\104\351"
+"\370\004\163\362\351\376\134\230\214\365\163\257\153\264\176\315"
+"\324\134\002\053\114\071\341\262\225\225\055\102\207\327\325\263"
+"\220\103\267\154\023\361\336\335\366\304\370\211\077\321\165\365"
+"\222\303\221\325\212\210\320\220\354\334\155\336\211\302\145\161"
+"\226\213\015\003\375\234\277\133\026\254\222\333\352\376\171\174"
+"\255\353\257\367\026\313\333\315\045\053\345\037\373\232\237\342"
+"\121\314\072\123\014\110\346\016\275\311\264\166\006\122\346\021"
+"\023\205\162\143\003\004\340\004\066\053\040\031\002\350\164\247"
+"\037\266\311\126\146\360\165\045\334\147\301\016\141\140\210\263"
+"\076\321\250\374\243\332\035\260\321\261\043\124\337\104\166\155"
+"\355\101\330\301\262\042\266\123\034\337\065\035\334\241\167\052"
+"\061\344\055\365\345\345\333\310\340\377\345\200\327\013\143\240"
+"\377\063\241\017\272\054\025\025\352\227\263\322\242\265\276\362"
+"\214\226\036\032\217\035\154\244\141\067\271\206\163\063\327\227"
+"\226\236\043\175\202\244\114\201\342\241\321\272\147\137\225\007"
+"\243\047\021\356\026\020\173\274\105\112\114\262\004\322\253\357"
+"\325\375\014\121\316\120\152\010\061\371\221\332\014\217\144\134"
+"\003\303\072\213\040\077\156\215\147\075\072\326\376\175\133\210"
+"\311\136\373\314\141\334\213\063\167\323\104\062\065\011\142\004"
+"\222\026\020\330\236\047\107\373\073\041\343\370\353\035\133\002"
+"\003\001\000\001\243\201\260\060\201\255\060\017\006\003\125\035"
+"\023\001\001\377\004\005\060\003\001\001\377\060\013\006\003\125"
+"\035\017\004\004\003\002\001\006\060\035\006\003\125\035\016\004"
+"\026\004\024\032\204\142\274\110\114\063\045\004\324\356\320\366"
+"\003\304\031\106\321\224\153\060\156\006\003\125\035\043\004\147"
+"\060\145\200\024\032\204\142\274\110\114\063\045\004\324\356\320"
+"\366\003\304\031\106\321\224\153\241\111\244\107\060\105\061\013"
+"\060\011\006\003\125\004\006\023\002\102\115\061\031\060\027\006"
+"\003\125\004\012\023\020\121\165\157\126\141\144\151\163\040\114"
+"\151\155\151\164\145\144\061\033\060\031\006\003\125\004\003\023"
+"\022\121\165\157\126\141\144\151\163\040\122\157\157\164\040\103"
+"\101\040\062\202\002\005\011\060\015\006\011\052\206\110\206\367"
+"\015\001\001\005\005\000\003\202\002\001\000\076\012\026\115\237"
+"\006\133\250\256\161\135\057\005\057\147\346\023\105\203\304\066"
+"\366\363\300\046\014\015\265\107\144\135\370\264\162\311\106\245"
+"\003\030\047\125\211\170\175\166\352\226\064\200\027\040\334\347"
+"\203\370\215\374\007\270\332\137\115\056\147\262\204\375\331\104"
+"\374\167\120\201\346\174\264\311\015\013\162\123\370\166\007\007"
+"\101\107\226\014\373\340\202\046\223\125\214\376\042\037\140\145"
+"\174\137\347\046\263\367\062\220\230\120\324\067\161\125\366\222"
+"\041\170\367\225\171\372\370\055\046\207\146\126\060\167\246\067"
+"\170\063\122\020\130\256\077\141\216\362\152\261\357\030\176\112"
+"\131\143\312\215\242\126\325\247\057\274\126\037\317\071\301\342"
+"\373\012\250\025\054\175\115\172\143\306\154\227\104\074\322\157"
+"\303\112\027\012\370\220\322\127\242\031\121\245\055\227\101\332"
+"\007\117\251\120\332\220\215\224\106\341\076\360\224\375\020\000"
+"\070\365\073\350\100\341\264\156\126\032\040\314\157\130\215\355"
+"\056\105\217\326\351\223\077\347\261\054\337\072\326\042\214\334"
+"\204\273\042\157\320\370\344\306\071\351\004\210\074\303\272\353"
+"\125\172\155\200\231\044\365\154\001\373\370\227\260\224\133\353"
+"\375\322\157\361\167\150\015\065\144\043\254\270\125\241\003\321"
+"\115\102\031\334\370\165\131\126\243\371\250\111\171\370\257\016"
+"\271\021\240\174\267\152\355\064\320\266\046\142\070\032\207\014"
+"\370\350\375\056\323\220\177\007\221\052\035\326\176\134\205\203"
+"\231\260\070\010\077\351\136\371\065\007\344\311\142\156\127\177"
+"\247\120\225\367\272\310\233\346\216\242\001\305\326\146\277\171"
+"\141\363\074\034\341\271\202\134\135\240\303\351\330\110\275\031"
+"\242\021\024\031\156\262\206\033\150\076\110\067\032\210\267\135"
+"\226\136\234\307\357\047\142\010\342\221\031\134\322\361\041\335"
+"\272\027\102\202\227\161\201\123\061\251\237\366\175\142\277\162"
+"\341\243\223\035\314\212\046\132\011\070\320\316\327\015\200\026"
+"\264\170\245\072\207\114\215\212\245\325\106\227\362\054\020\271"
+"\274\124\042\300\001\120\151\103\236\364\262\357\155\370\354\332"
+"\361\343\261\357\337\221\217\124\052\013\045\301\046\031\304\122"
+"\020\005\145\325\202\020\352\302\061\315\056"
+, (PRUint32)1467 }
+};
+static const NSSItem nss_builtins_items_163 [] = {
+ { (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"QuoVadis Root CA 2", (PRUint32)19 },
+ { (void *)"\312\072\373\317\022\100\066\113\104\262\026\040\210\200\110\071"
+"\031\223\174\367"
+, (PRUint32)20 },
+ { (void *)"\136\071\173\335\370\272\354\202\351\254\142\272\014\124\000\053"
+, (PRUint32)16 },
+ { (void *)"\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061"
+"\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144"
+"\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003"
+"\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157"
+"\157\164\040\103\101\040\062"
+, (PRUint32)71 },
+ { (void *)"\002\002\005\011"
+, (PRUint32)4 },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
+};
+static const NSSItem nss_builtins_items_164 [] = {
+ { (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"QuoVadis Root CA 3", (PRUint32)19 },
+ { (void *)&ckc_x_509, (PRUint32)sizeof(CK_CERTIFICATE_TYPE) },
+ { (void *)"\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061"
+"\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144"
+"\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003"
+"\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157"
+"\157\164\040\103\101\040\063"
+, (PRUint32)71 },
+ { (void *)"0", (PRUint32)2 },
+ { (void *)"\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061"
+"\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144"
+"\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003"
+"\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157"
+"\157\164\040\103\101\040\063"
+, (PRUint32)71 },
+ { (void *)"\002\002\005\306"
+, (PRUint32)4 },
+ { (void *)"\060\202\006\235\060\202\004\205\240\003\002\001\002\002\002\005"
+"\306\060\015\006\011\052\206\110\206\367\015\001\001\005\005\000"
+"\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061"
+"\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144"
+"\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003"
+"\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157"
+"\157\164\040\103\101\040\063\060\036\027\015\060\066\061\061\062"
+"\064\061\071\061\061\062\063\132\027\015\063\061\061\061\062\064"
+"\061\071\060\066\064\064\132\060\105\061\013\060\011\006\003\125"
+"\004\006\023\002\102\115\061\031\060\027\006\003\125\004\012\023"
+"\020\121\165\157\126\141\144\151\163\040\114\151\155\151\164\145"
+"\144\061\033\060\031\006\003\125\004\003\023\022\121\165\157\126"
+"\141\144\151\163\040\122\157\157\164\040\103\101\040\063\060\202"
+"\002\042\060\015\006\011\052\206\110\206\367\015\001\001\001\005"
+"\000\003\202\002\017\000\060\202\002\012\002\202\002\001\000\314"
+"\127\102\026\124\234\346\230\323\323\115\356\376\355\307\237\103"
+"\071\112\145\263\350\026\210\064\333\015\131\221\164\317\222\270"
+"\004\100\255\002\113\061\253\274\215\221\150\330\040\016\032\001"
+"\342\032\173\116\027\135\342\212\267\077\231\032\315\353\141\253"
+"\302\145\246\037\267\267\275\267\217\374\375\160\217\013\240\147"
+"\276\001\242\131\317\161\346\017\051\166\377\261\126\171\105\053"
+"\037\236\172\124\350\243\051\065\150\244\001\117\017\244\056\067"
+"\357\033\277\343\217\020\250\162\253\130\127\347\124\206\310\311"
+"\363\133\332\054\332\135\216\156\074\243\076\332\373\202\345\335"
+"\362\134\262\005\063\157\212\066\316\320\023\116\377\277\112\014"
+"\064\114\246\303\041\275\120\004\125\353\261\273\235\373\105\036"
+"\144\025\336\125\001\214\002\166\265\313\241\077\102\151\274\057"
+"\275\150\103\026\126\211\052\067\141\221\375\246\256\116\300\313"
+"\024\145\224\067\113\222\006\357\004\320\310\234\210\333\013\173"
+"\201\257\261\075\052\304\145\072\170\266\356\334\200\261\322\323"
+"\231\234\072\356\153\132\153\263\215\267\325\316\234\302\276\245"
+"\113\057\026\261\236\150\073\006\157\256\175\237\370\336\354\314"
+"\051\247\230\243\045\103\057\357\361\137\046\341\210\115\370\136"
+"\156\327\331\024\156\031\063\151\247\073\204\211\223\304\123\125"
+"\023\241\121\170\100\370\270\311\242\356\173\272\122\102\203\236"
+"\024\355\005\122\132\131\126\247\227\374\235\077\012\051\330\334"
+"\117\221\016\023\274\336\225\244\337\213\231\276\254\233\063\210"
+"\357\265\201\257\033\306\042\123\310\366\307\356\227\024\260\305"
+"\174\170\122\310\360\316\156\167\140\204\246\351\052\166\040\355"
+"\130\001\027\060\223\351\032\213\340\163\143\331\152\222\224\111"
+"\116\264\255\112\205\304\243\042\060\374\011\355\150\042\163\246"
+"\210\014\125\041\130\305\341\072\237\052\335\312\341\220\340\331"
+"\163\253\154\200\270\350\013\144\223\240\234\214\031\377\263\322"
+"\014\354\221\046\207\212\263\242\341\160\217\054\012\345\315\155"
+"\150\121\353\332\077\005\177\213\062\346\023\134\153\376\137\100"
+"\342\042\310\264\264\144\117\326\272\175\110\076\250\151\014\327"
+"\273\206\161\311\163\270\077\073\235\045\113\332\377\100\353\002"
+"\003\001\000\001\243\202\001\225\060\202\001\221\060\017\006\003"
+"\125\035\023\001\001\377\004\005\060\003\001\001\377\060\201\341"
+"\006\003\125\035\040\004\201\331\060\201\326\060\201\323\006\011"
+"\053\006\001\004\001\276\130\000\003\060\201\305\060\201\223\006"
+"\010\053\006\001\005\005\007\002\002\060\201\206\032\201\203\101"
+"\156\171\040\165\163\145\040\157\146\040\164\150\151\163\040\103"
+"\145\162\164\151\146\151\143\141\164\145\040\143\157\156\163\164"
+"\151\164\165\164\145\163\040\141\143\143\145\160\164\141\156\143"
+"\145\040\157\146\040\164\150\145\040\121\165\157\126\141\144\151"
+"\163\040\122\157\157\164\040\103\101\040\063\040\103\145\162\164"
+"\151\146\151\143\141\164\145\040\120\157\154\151\143\171\040\057"
+"\040\103\145\162\164\151\146\151\143\141\164\151\157\156\040\120"
+"\162\141\143\164\151\143\145\040\123\164\141\164\145\155\145\156"
+"\164\056\060\055\006\010\053\006\001\005\005\007\002\001\026\041"
+"\150\164\164\160\072\057\057\167\167\167\056\161\165\157\166\141"
+"\144\151\163\147\154\157\142\141\154\056\143\157\155\057\143\160"
+"\163\060\013\006\003\125\035\017\004\004\003\002\001\006\060\035"
+"\006\003\125\035\016\004\026\004\024\362\300\023\340\202\103\076"
+"\373\356\057\147\062\226\065\134\333\270\313\002\320\060\156\006"
+"\003\125\035\043\004\147\060\145\200\024\362\300\023\340\202\103"
+"\076\373\356\057\147\062\226\065\134\333\270\313\002\320\241\111"
+"\244\107\060\105\061\013\060\011\006\003\125\004\006\023\002\102"
+"\115\061\031\060\027\006\003\125\004\012\023\020\121\165\157\126"
+"\141\144\151\163\040\114\151\155\151\164\145\144\061\033\060\031"
+"\006\003\125\004\003\023\022\121\165\157\126\141\144\151\163\040"
+"\122\157\157\164\040\103\101\040\063\202\002\005\306\060\015\006"
+"\011\052\206\110\206\367\015\001\001\005\005\000\003\202\002\001"
+"\000\117\255\240\054\114\372\300\362\157\367\146\125\253\043\064"
+"\356\347\051\332\303\133\266\260\203\331\320\320\342\041\373\363"
+"\140\247\073\135\140\123\047\242\233\366\010\042\052\347\277\240"
+"\162\345\234\044\152\061\261\220\172\047\333\204\021\211\047\246"
+"\167\132\070\327\277\254\206\374\356\135\203\274\006\306\321\167"
+"\153\017\155\044\057\113\172\154\247\007\226\312\343\204\237\255"
+"\210\213\035\253\026\215\133\146\027\331\026\364\213\200\322\335"
+"\370\262\166\303\374\070\023\252\014\336\102\151\053\156\363\074"
+"\353\200\047\333\365\246\104\015\237\132\125\131\013\325\015\122"
+"\110\305\256\237\362\057\200\305\352\062\120\065\022\227\056\301"
+"\341\377\361\043\210\121\070\237\362\146\126\166\347\017\121\227"
+"\245\122\014\115\111\121\225\066\075\277\242\113\014\020\035\206"
+"\231\114\252\363\162\021\223\344\352\366\233\332\250\135\247\115"
+"\267\236\002\256\163\000\310\332\043\003\350\371\352\031\164\142"
+"\000\224\313\042\040\276\224\247\131\265\202\152\276\231\171\172"
+"\251\362\112\044\122\367\164\375\272\116\346\250\035\002\156\261"
+"\015\200\104\301\256\323\043\067\137\273\205\174\053\222\056\350"
+"\176\245\213\335\231\341\277\047\157\055\135\252\173\207\376\012"
+"\335\113\374\216\365\046\344\156\160\102\156\063\354\061\236\173"
+"\223\301\344\311\151\032\075\300\153\116\042\155\356\253\130\115"
+"\306\320\101\301\053\352\117\022\207\136\353\105\330\154\365\230"
+"\002\323\240\330\125\212\006\231\031\242\240\167\321\060\236\254"
+"\314\165\356\203\365\260\142\071\317\154\127\342\114\322\221\013"
+"\016\165\050\033\232\277\375\032\103\361\312\167\373\073\217\141"
+"\270\151\050\026\102\004\136\160\052\034\041\330\217\341\275\043"
+"\133\055\164\100\222\331\143\031\015\163\335\151\274\142\107\274"
+"\340\164\053\262\353\175\276\101\033\265\300\106\305\241\042\313"
+"\137\116\301\050\222\336\030\272\325\052\050\273\021\213\027\223"
+"\230\231\140\224\134\043\317\132\047\227\136\013\005\006\223\067"
+"\036\073\151\066\353\251\236\141\035\217\062\332\216\014\326\164"
+"\076\173\011\044\332\001\167\107\304\073\315\064\214\231\365\312"
+"\341\045\141\063\262\131\033\342\156\327\067\127\266\015\251\022"
+"\332"
+, (PRUint32)1697 }
+};
+static const NSSItem nss_builtins_items_165 [] = {
+ { (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"QuoVadis Root CA 3", (PRUint32)19 },
+ { (void *)"\037\111\024\367\330\164\225\035\335\256\002\300\276\375\072\055"
+"\202\165\121\205"
+, (PRUint32)20 },
+ { (void *)"\061\205\074\142\224\227\143\271\252\375\211\116\257\157\340\317"
+, (PRUint32)16 },
+ { (void *)"\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061"
+"\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144"
+"\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003"
+"\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157"
+"\157\164\040\103\101\040\063"
+, (PRUint32)71 },
+ { (void *)"\002\002\005\306"
+, (PRUint32)4 },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
+};
+static const NSSItem nss_builtins_items_166 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10859,7 +11312,7 @@ static const NSSItem nss_builtins_items_160 [] = {
"\057\317\246\356\311\160\042\024\275\375\276\154\013\003"
, (PRUint32)862 }
};
-static const NSSItem nss_builtins_items_161 [] = {
+static const NSSItem nss_builtins_items_167 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10884,7 +11337,7 @@ static const NSSItem nss_builtins_items_161 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_162 [] = {
+static const NSSItem nss_builtins_items_168 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10957,7 +11410,7 @@ static const NSSItem nss_builtins_items_162 [] = {
"\127\275\125\232"
, (PRUint32)804 }
};
-static const NSSItem nss_builtins_items_163 [] = {
+static const NSSItem nss_builtins_items_169 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -10975,12 +11428,12 @@ static const NSSItem nss_builtins_items_163 [] = {
, (PRUint32)59 },
{ (void *)"\002\001\044"
, (PRUint32)3 },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_164 [] = {
+static const NSSItem nss_builtins_items_170 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11053,7 +11506,7 @@ static const NSSItem nss_builtins_items_164 [] = {
"\160\254\337\114"
, (PRUint32)804 }
};
-static const NSSItem nss_builtins_items_165 [] = {
+static const NSSItem nss_builtins_items_171 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11076,7 +11529,7 @@ static const NSSItem nss_builtins_items_165 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_166 [] = {
+static const NSSItem nss_builtins_items_172 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11162,7 +11615,7 @@ static const NSSItem nss_builtins_items_166 [] = {
"\025\301\044\174\062\174\003\035\073\241\130\105\062\223"
, (PRUint32)958 }
};
-static const NSSItem nss_builtins_items_167 [] = {
+static const NSSItem nss_builtins_items_173 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11187,7 +11640,7 @@ static const NSSItem nss_builtins_items_167 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_168 [] = {
+static const NSSItem nss_builtins_items_174 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11278,7 +11731,7 @@ static const NSSItem nss_builtins_items_168 [] = {
"\151\003\142\270\231\005\005\075\153\170\022\275\260\157\145"
, (PRUint32)1071 }
};
-static const NSSItem nss_builtins_items_169 [] = {
+static const NSSItem nss_builtins_items_175 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11302,7 +11755,7 @@ static const NSSItem nss_builtins_items_169 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_170 [] = {
+static const NSSItem nss_builtins_items_176 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11406,7 +11859,7 @@ static const NSSItem nss_builtins_items_170 [] = {
"\004\243\103\055\332\374\013\142\352\057\137\142\123"
, (PRUint32)1309 }
};
-static const NSSItem nss_builtins_items_171 [] = {
+static const NSSItem nss_builtins_items_177 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11429,7 +11882,7 @@ static const NSSItem nss_builtins_items_171 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_172 [] = {
+static const NSSItem nss_builtins_items_178 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11535,7 +11988,7 @@ static const NSSItem nss_builtins_items_172 [] = {
"\364\010"
, (PRUint32)1122 }
};
-static const NSSItem nss_builtins_items_173 [] = {
+static const NSSItem nss_builtins_items_179 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11561,11 +12014,11 @@ static const NSSItem nss_builtins_items_173 [] = {
"\255\151"
, (PRUint32)18 },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_174 [] = {
+static const NSSItem nss_builtins_items_180 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11679,7 +12132,7 @@ static const NSSItem nss_builtins_items_174 [] = {
"\005\323\312\003\112\124"
, (PRUint32)1190 }
};
-static const NSSItem nss_builtins_items_175 [] = {
+static const NSSItem nss_builtins_items_181 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11706,12 +12159,12 @@ static const NSSItem nss_builtins_items_175 [] = {
{ (void *)"\002\020\104\276\014\213\120\000\044\264\021\323\066\045\045\147"
"\311\211"
, (PRUint32)18 },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_176 [] = {
+static const NSSItem nss_builtins_items_182 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11818,7 +12271,7 @@ static const NSSItem nss_builtins_items_176 [] = {
"\062\234\036\273\235\370\146\250"
, (PRUint32)1144 }
};
-static const NSSItem nss_builtins_items_177 [] = {
+static const NSSItem nss_builtins_items_183 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11844,11 +12297,11 @@ static const NSSItem nss_builtins_items_177 [] = {
"\012\375"
, (PRUint32)18 },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_178 [] = {
+static const NSSItem nss_builtins_items_184 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11954,7 +12407,7 @@ static const NSSItem nss_builtins_items_178 [] = {
"\275\023\122\035\250\076\315\000\037\310"
, (PRUint32)1130 }
};
-static const NSSItem nss_builtins_items_179 [] = {
+static const NSSItem nss_builtins_items_185 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -11979,12 +12432,12 @@ static const NSSItem nss_builtins_items_179 [] = {
{ (void *)"\002\020\104\276\014\213\120\000\044\264\021\323\066\055\340\263"
"\137\033"
, (PRUint32)18 },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_180 [] = {
+static const NSSItem nss_builtins_items_186 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -12093,7 +12546,7 @@ static const NSSItem nss_builtins_items_180 [] = {
"\334"
, (PRUint32)1217 }
};
-static const NSSItem nss_builtins_items_181 [] = {
+static const NSSItem nss_builtins_items_187 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -12121,7 +12574,7 @@ static const NSSItem nss_builtins_items_181 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_182 [] = {
+static const NSSItem nss_builtins_items_188 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -12228,7 +12681,7 @@ static const NSSItem nss_builtins_items_182 [] = {
"\166\135\165\220\032\365\046\217\360"
, (PRUint32)1225 }
};
-static const NSSItem nss_builtins_items_183 [] = {
+static const NSSItem nss_builtins_items_189 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -12255,7 +12708,7 @@ static const NSSItem nss_builtins_items_183 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_184 [] = {
+static const NSSItem nss_builtins_items_190 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -12405,7 +12858,7 @@ static const NSSItem nss_builtins_items_184 [] = {
"\306\224\107\351\050"
, (PRUint32)1749 }
};
-static const NSSItem nss_builtins_items_185 [] = {
+static const NSSItem nss_builtins_items_191 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -12432,12 +12885,12 @@ static const NSSItem nss_builtins_items_185 [] = {
, (PRUint32)204 },
{ (void *)"\002\001\173"
, (PRUint32)3 },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_186 [] = {
+static const NSSItem nss_builtins_items_192 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -12580,7 +13033,7 @@ static const NSSItem nss_builtins_items_186 [] = {
"\210"
, (PRUint32)1665 }
};
-static const NSSItem nss_builtins_items_187 [] = {
+static const NSSItem nss_builtins_items_193 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -12611,7 +13064,7 @@ static const NSSItem nss_builtins_items_187 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_188 [] = {
+static const NSSItem nss_builtins_items_194 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -12730,7 +13183,7 @@ static const NSSItem nss_builtins_items_188 [] = {
"\066\053\143\254\130\001\153\063\051\120\206\203\361\001\110"
, (PRUint32)1359 }
};
-static const NSSItem nss_builtins_items_189 [] = {
+static const NSSItem nss_builtins_items_195 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -12759,7 +13212,7 @@ static const NSSItem nss_builtins_items_189 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_190 [] = {
+static const NSSItem nss_builtins_items_196 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -12879,7 +13332,7 @@ static const NSSItem nss_builtins_items_190 [] = {
"\063\004\324"
, (PRUint32)1363 }
};
-static const NSSItem nss_builtins_items_191 [] = {
+static const NSSItem nss_builtins_items_197 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -12908,7 +13361,7 @@ static const NSSItem nss_builtins_items_191 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_192 [] = {
+static const NSSItem nss_builtins_items_198 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13009,7 +13462,7 @@ static const NSSItem nss_builtins_items_192 [] = {
"\264\003\045\274"
, (PRUint32)1076 }
};
-static const NSSItem nss_builtins_items_193 [] = {
+static const NSSItem nss_builtins_items_199 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13038,7 +13491,7 @@ static const NSSItem nss_builtins_items_193 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_194 [] = {
+static const NSSItem nss_builtins_items_200 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13131,7 +13584,7 @@ static const NSSItem nss_builtins_items_194 [] = {
"\177\333\275\237"
, (PRUint32)1028 }
};
-static const NSSItem nss_builtins_items_195 [] = {
+static const NSSItem nss_builtins_items_201 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13157,7 +13610,7 @@ static const NSSItem nss_builtins_items_195 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_196 [] = {
+static const NSSItem nss_builtins_items_202 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13251,7 +13704,7 @@ static const NSSItem nss_builtins_items_196 [] = {
"\037\027\224"
, (PRUint32)1043 }
};
-static const NSSItem nss_builtins_items_197 [] = {
+static const NSSItem nss_builtins_items_203 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13277,7 +13730,7 @@ static const NSSItem nss_builtins_items_197 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_198 [] = {
+static const NSSItem nss_builtins_items_204 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13397,7 +13850,7 @@ static const NSSItem nss_builtins_items_198 [] = {
"\160\043\261\200\337\032\040\070\347\176"
, (PRUint32)1306 }
};
-static const NSSItem nss_builtins_items_199 [] = {
+static const NSSItem nss_builtins_items_205 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13425,10 +13878,192 @@ static const NSSItem nss_builtins_items_199 [] = {
, (PRUint32)3 },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_200 [] = {
+static const NSSItem nss_builtins_items_206 [] = {
+ { (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"StartCom Certification Authority", (PRUint32)33 },
+ { (void *)&ckc_x_509, (PRUint32)sizeof(CK_CERTIFICATE_TYPE) },
+ { (void *)"\060\175\061\013\060\011\006\003\125\004\006\023\002\111\114\061"
+"\026\060\024\006\003\125\004\012\023\015\123\164\141\162\164\103"
+"\157\155\040\114\164\144\056\061\053\060\051\006\003\125\004\013"
+"\023\042\123\145\143\165\162\145\040\104\151\147\151\164\141\154"
+"\040\103\145\162\164\151\146\151\143\141\164\145\040\123\151\147"
+"\156\151\156\147\061\051\060\047\006\003\125\004\003\023\040\123"
+"\164\141\162\164\103\157\155\040\103\145\162\164\151\146\151\143"
+"\141\164\151\157\156\040\101\165\164\150\157\162\151\164\171"
+, (PRUint32)127 },
+ { (void *)"0", (PRUint32)2 },
+ { (void *)"\060\175\061\013\060\011\006\003\125\004\006\023\002\111\114\061"
+"\026\060\024\006\003\125\004\012\023\015\123\164\141\162\164\103"
+"\157\155\040\114\164\144\056\061\053\060\051\006\003\125\004\013"
+"\023\042\123\145\143\165\162\145\040\104\151\147\151\164\141\154"
+"\040\103\145\162\164\151\146\151\143\141\164\145\040\123\151\147"
+"\156\151\156\147\061\051\060\047\006\003\125\004\003\023\040\123"
+"\164\141\162\164\103\157\155\040\103\145\162\164\151\146\151\143"
+"\141\164\151\157\156\040\101\165\164\150\157\162\151\164\171"
+, (PRUint32)127 },
+ { (void *)"\002\001\001"
+, (PRUint32)3 },
+ { (void *)"\060\202\007\311\060\202\005\261\240\003\002\001\002\002\001\001"
+"\060\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060"
+"\175\061\013\060\011\006\003\125\004\006\023\002\111\114\061\026"
+"\060\024\006\003\125\004\012\023\015\123\164\141\162\164\103\157"
+"\155\040\114\164\144\056\061\053\060\051\006\003\125\004\013\023"
+"\042\123\145\143\165\162\145\040\104\151\147\151\164\141\154\040"
+"\103\145\162\164\151\146\151\143\141\164\145\040\123\151\147\156"
+"\151\156\147\061\051\060\047\006\003\125\004\003\023\040\123\164"
+"\141\162\164\103\157\155\040\103\145\162\164\151\146\151\143\141"
+"\164\151\157\156\040\101\165\164\150\157\162\151\164\171\060\036"
+"\027\015\060\066\060\071\061\067\061\071\064\066\063\066\132\027"
+"\015\063\066\060\071\061\067\061\071\064\066\063\066\132\060\175"
+"\061\013\060\011\006\003\125\004\006\023\002\111\114\061\026\060"
+"\024\006\003\125\004\012\023\015\123\164\141\162\164\103\157\155"
+"\040\114\164\144\056\061\053\060\051\006\003\125\004\013\023\042"
+"\123\145\143\165\162\145\040\104\151\147\151\164\141\154\040\103"
+"\145\162\164\151\146\151\143\141\164\145\040\123\151\147\156\151"
+"\156\147\061\051\060\047\006\003\125\004\003\023\040\123\164\141"
+"\162\164\103\157\155\040\103\145\162\164\151\146\151\143\141\164"
+"\151\157\156\040\101\165\164\150\157\162\151\164\171\060\202\002"
+"\042\060\015\006\011\052\206\110\206\367\015\001\001\001\005\000"
+"\003\202\002\017\000\060\202\002\012\002\202\002\001\000\301\210"
+"\333\011\274\154\106\174\170\237\225\173\265\063\220\362\162\142"
+"\326\301\066\040\042\044\136\316\351\167\362\103\012\242\006\144"
+"\244\314\216\066\370\070\346\043\360\156\155\261\074\335\162\243"
+"\205\034\241\323\075\264\063\053\323\057\257\376\352\260\101\131"
+"\147\266\304\006\175\012\236\164\205\326\171\114\200\067\172\337"
+"\071\005\122\131\367\364\033\106\103\244\322\205\205\322\303\161"
+"\363\165\142\064\272\054\212\177\036\217\356\355\064\320\021\307"
+"\226\315\122\075\272\063\326\335\115\336\013\073\112\113\237\302"
+"\046\057\372\265\026\034\162\065\167\312\074\135\346\312\341\046"
+"\213\032\066\166\134\001\333\164\024\045\376\355\265\240\210\017"
+"\335\170\312\055\037\007\227\060\001\055\162\171\372\106\326\023"
+"\052\250\271\246\253\203\111\035\345\362\357\335\344\001\216\030"
+"\012\217\143\123\026\205\142\251\016\031\072\314\265\146\246\302"
+"\153\164\007\344\053\341\166\076\264\155\330\366\104\341\163\142"
+"\037\073\304\276\240\123\126\045\154\121\011\367\252\253\312\277"
+"\166\375\155\233\363\235\333\277\075\146\274\014\126\252\257\230"
+"\110\225\072\113\337\247\130\120\331\070\165\251\133\352\103\014"
+"\002\377\231\353\350\154\115\160\133\051\145\234\335\252\135\314"
+"\257\001\061\354\014\353\322\215\350\352\234\173\346\156\367\047"
+"\146\014\032\110\327\156\102\343\077\336\041\076\173\341\015\160"
+"\373\143\252\250\154\032\124\264\134\045\172\311\242\311\213\026"
+"\246\273\054\176\027\136\005\115\130\156\022\035\001\356\022\020"
+"\015\306\062\177\030\377\374\364\372\315\156\221\350\066\111\276"
+"\032\110\151\213\302\226\115\032\022\262\151\027\301\012\220\326"
+"\372\171\042\110\277\272\173\151\370\160\307\372\172\067\330\330"
+"\015\322\166\117\127\377\220\267\343\221\322\335\357\302\140\267"
+"\147\072\335\376\252\234\360\324\213\177\162\042\316\306\237\227"
+"\266\370\257\212\240\020\250\331\373\030\306\266\265\134\122\074"
+"\211\266\031\052\163\001\012\017\003\263\022\140\362\172\057\201"
+"\333\243\156\377\046\060\227\365\213\335\211\127\266\255\075\263"
+"\257\053\305\267\166\002\360\245\326\053\232\206\024\052\162\366"
+"\343\063\214\135\011\113\023\337\273\214\164\023\122\113\002\003"
+"\001\000\001\243\202\002\122\060\202\002\116\060\014\006\003\125"
+"\035\023\004\005\060\003\001\001\377\060\013\006\003\125\035\017"
+"\004\004\003\002\001\256\060\035\006\003\125\035\016\004\026\004"
+"\024\116\013\357\032\244\100\133\245\027\151\207\060\312\064\150"
+"\103\320\101\256\362\060\144\006\003\125\035\037\004\135\060\133"
+"\060\054\240\052\240\050\206\046\150\164\164\160\072\057\057\143"
+"\145\162\164\056\163\164\141\162\164\143\157\155\056\157\162\147"
+"\057\163\146\163\143\141\055\143\162\154\056\143\162\154\060\053"
+"\240\051\240\047\206\045\150\164\164\160\072\057\057\143\162\154"
+"\056\163\164\141\162\164\143\157\155\056\157\162\147\057\163\146"
+"\163\143\141\055\143\162\154\056\143\162\154\060\202\001\135\006"
+"\003\125\035\040\004\202\001\124\060\202\001\120\060\202\001\114"
+"\006\013\053\006\001\004\001\201\265\067\001\001\001\060\202\001"
+"\073\060\057\006\010\053\006\001\005\005\007\002\001\026\043\150"
+"\164\164\160\072\057\057\143\145\162\164\056\163\164\141\162\164"
+"\143\157\155\056\157\162\147\057\160\157\154\151\143\171\056\160"
+"\144\146\060\065\006\010\053\006\001\005\005\007\002\001\026\051"
+"\150\164\164\160\072\057\057\143\145\162\164\056\163\164\141\162"
+"\164\143\157\155\056\157\162\147\057\151\156\164\145\162\155\145"
+"\144\151\141\164\145\056\160\144\146\060\201\320\006\010\053\006"
+"\001\005\005\007\002\002\060\201\303\060\047\026\040\123\164\141"
+"\162\164\040\103\157\155\155\145\162\143\151\141\154\040\050\123"
+"\164\141\162\164\103\157\155\051\040\114\164\144\056\060\003\002"
+"\001\001\032\201\227\114\151\155\151\164\145\144\040\114\151\141"
+"\142\151\154\151\164\171\054\040\162\145\141\144\040\164\150\145"
+"\040\163\145\143\164\151\157\156\040\052\114\145\147\141\154\040"
+"\114\151\155\151\164\141\164\151\157\156\163\052\040\157\146\040"
+"\164\150\145\040\123\164\141\162\164\103\157\155\040\103\145\162"
+"\164\151\146\151\143\141\164\151\157\156\040\101\165\164\150\157"
+"\162\151\164\171\040\120\157\154\151\143\171\040\141\166\141\151"
+"\154\141\142\154\145\040\141\164\040\150\164\164\160\072\057\057"
+"\143\145\162\164\056\163\164\141\162\164\143\157\155\056\157\162"
+"\147\057\160\157\154\151\143\171\056\160\144\146\060\021\006\011"
+"\140\206\110\001\206\370\102\001\001\004\004\003\002\000\007\060"
+"\070\006\011\140\206\110\001\206\370\102\001\015\004\053\026\051"
+"\123\164\141\162\164\103\157\155\040\106\162\145\145\040\123\123"
+"\114\040\103\145\162\164\151\146\151\143\141\164\151\157\156\040"
+"\101\165\164\150\157\162\151\164\171\060\015\006\011\052\206\110"
+"\206\367\015\001\001\005\005\000\003\202\002\001\000\026\154\231"
+"\364\146\014\064\365\320\205\136\175\012\354\332\020\116\070\034"
+"\136\337\246\045\005\113\221\062\301\350\073\361\075\335\104\011"
+"\133\007\111\212\051\313\146\002\267\261\232\367\045\230\011\074"
+"\216\033\341\335\066\207\053\113\273\150\323\071\146\075\240\046"
+"\307\362\071\221\035\121\253\202\173\176\325\316\132\344\342\003"
+"\127\160\151\227\010\371\136\130\246\012\337\214\006\232\105\026"
+"\026\070\012\136\127\366\142\307\172\002\005\346\274\036\265\362"
+"\236\364\251\051\203\370\262\024\343\156\050\207\104\303\220\032"
+"\336\070\251\074\254\103\115\144\105\316\335\050\251\134\362\163"
+"\173\004\370\027\350\253\261\363\056\134\144\156\163\061\072\022"
+"\270\274\263\021\344\175\217\201\121\232\073\215\211\364\115\223"
+"\146\173\074\003\355\323\232\035\232\363\145\120\365\240\320\165"
+"\237\057\257\360\352\202\103\230\370\151\234\211\171\304\103\216"
+"\106\162\343\144\066\022\257\367\045\036\070\211\220\167\176\303"
+"\153\152\271\303\313\104\113\254\170\220\213\347\307\054\036\113"
+"\021\104\310\064\122\047\315\012\135\237\205\301\211\325\032\170"
+"\362\225\020\123\062\335\200\204\146\165\331\265\150\050\373\141"
+"\056\276\204\250\070\300\231\022\206\245\036\147\144\255\006\056"
+"\057\251\160\205\307\226\017\174\211\145\365\216\103\124\016\253"
+"\335\245\200\071\224\140\300\064\311\226\160\054\243\022\365\037"
+"\110\173\275\034\176\153\267\235\220\364\042\073\256\370\374\052"
+"\312\372\202\122\240\357\257\113\125\223\353\301\265\360\042\213"
+"\254\064\116\046\042\004\241\207\054\165\112\267\345\175\023\327"
+"\270\014\144\300\066\322\311\057\206\022\214\043\011\301\033\202"
+"\073\163\111\243\152\127\207\224\345\326\170\305\231\103\143\343"
+"\115\340\167\055\341\145\231\162\151\004\032\107\011\346\017\001"
+"\126\044\373\037\277\016\171\251\130\056\271\304\011\001\176\225"
+"\272\155\000\006\076\262\352\112\020\071\330\320\053\365\277\354"
+"\165\277\227\002\305\011\033\010\334\125\067\342\201\373\067\204"
+"\103\142\040\312\347\126\113\145\352\376\154\301\044\223\044\241"
+"\064\353\005\377\232\042\256\233\175\077\361\145\121\012\246\060"
+"\152\263\364\210\034\200\015\374\162\212\350\203\136"
+, (PRUint32)1997 }
+};
+static const NSSItem nss_builtins_items_207 [] = {
+ { (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"StartCom Certification Authority", (PRUint32)33 },
+ { (void *)"\076\053\367\362\003\033\226\363\214\346\304\330\250\135\076\055"
+"\130\107\152\017"
+, (PRUint32)20 },
+ { (void *)"\042\115\217\212\374\367\065\302\273\127\064\220\173\213\042\026"
+, (PRUint32)16 },
+ { (void *)"\060\175\061\013\060\011\006\003\125\004\006\023\002\111\114\061"
+"\026\060\024\006\003\125\004\012\023\015\123\164\141\162\164\103"
+"\157\155\040\114\164\144\056\061\053\060\051\006\003\125\004\013"
+"\023\042\123\145\143\165\162\145\040\104\151\147\151\164\141\154"
+"\040\103\145\162\164\151\146\151\143\141\164\145\040\123\151\147"
+"\156\151\156\147\061\051\060\047\006\003\125\004\003\023\040\123"
+"\164\141\162\164\103\157\155\040\103\145\162\164\151\146\151\143"
+"\141\164\151\157\156\040\101\165\164\150\157\162\151\164\171"
+, (PRUint32)127 },
+ { (void *)"\002\001\001"
+, (PRUint32)3 },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
+};
+static const NSSItem nss_builtins_items_208 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13541,7 +14176,7 @@ static const NSSItem nss_builtins_items_200 [] = {
"\245\206\054\174\364\022"
, (PRUint32)1398 }
};
-static const NSSItem nss_builtins_items_201 [] = {
+static const NSSItem nss_builtins_items_209 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13566,7 +14201,7 @@ static const NSSItem nss_builtins_items_201 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_202 [] = {
+static const NSSItem nss_builtins_items_210 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13670,7 +14305,7 @@ static const NSSItem nss_builtins_items_202 [] = {
"\252\341\247\063\366\375\112\037\366\331\140"
, (PRUint32)1115 }
};
-static const NSSItem nss_builtins_items_203 [] = {
+static const NSSItem nss_builtins_items_211 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13696,10 +14331,10 @@ static const NSSItem nss_builtins_items_203 [] = {
, (PRUint32)3 },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
- { (void *)&ckt_netscape_valid, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_204 [] = {
+static const NSSItem nss_builtins_items_212 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13794,7 +14429,7 @@ static const NSSItem nss_builtins_items_204 [] = {
"\117\041\145\073\112\177\107\243\373"
, (PRUint32)1001 }
};
-static const NSSItem nss_builtins_items_205 [] = {
+static const NSSItem nss_builtins_items_213 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13822,7 +14457,7 @@ static const NSSItem nss_builtins_items_205 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
-static const NSSItem nss_builtins_items_206 [] = {
+static const NSSItem nss_builtins_items_214 [] = {
{ (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13945,7 +14580,7 @@ static const NSSItem nss_builtins_items_206 [] = {
"\060\032\365\232\154\364\016\123\371\072\133\321\034"
, (PRUint32)1501 }
};
-static const NSSItem nss_builtins_items_207 [] = {
+static const NSSItem nss_builtins_items_215 [] = {
{ (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
{ (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
@@ -13972,6 +14607,460 @@ static const NSSItem nss_builtins_items_207 [] = {
{ (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
{ (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
};
+static const NSSItem nss_builtins_items_216 [] = {
+ { (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"DigiCert Assured ID Root CA", (PRUint32)28 },
+ { (void *)&ckc_x_509, (PRUint32)sizeof(CK_CERTIFICATE_TYPE) },
+ { (void *)"\060\145\061\013\060\011\006\003\125\004\006\023\002\125\123\061"
+"\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145"
+"\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023"
+"\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157"
+"\155\061\044\060\042\006\003\125\004\003\023\033\104\151\147\151"
+"\103\145\162\164\040\101\163\163\165\162\145\144\040\111\104\040"
+"\122\157\157\164\040\103\101"
+, (PRUint32)103 },
+ { (void *)"0", (PRUint32)2 },
+ { (void *)"\060\145\061\013\060\011\006\003\125\004\006\023\002\125\123\061"
+"\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145"
+"\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023"
+"\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157"
+"\155\061\044\060\042\006\003\125\004\003\023\033\104\151\147\151"
+"\103\145\162\164\040\101\163\163\165\162\145\144\040\111\104\040"
+"\122\157\157\164\040\103\101"
+, (PRUint32)103 },
+ { (void *)"\002\020\014\347\340\345\027\330\106\376\217\345\140\374\033\360"
+"\060\071"
+, (PRUint32)18 },
+ { (void *)"\060\202\003\267\060\202\002\237\240\003\002\001\002\002\020\014"
+"\347\340\345\027\330\106\376\217\345\140\374\033\360\060\071\060"
+"\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060\145"
+"\061\013\060\011\006\003\125\004\006\023\002\125\123\061\025\060"
+"\023\006\003\125\004\012\023\014\104\151\147\151\103\145\162\164"
+"\040\111\156\143\061\031\060\027\006\003\125\004\013\023\020\167"
+"\167\167\056\144\151\147\151\143\145\162\164\056\143\157\155\061"
+"\044\060\042\006\003\125\004\003\023\033\104\151\147\151\103\145"
+"\162\164\040\101\163\163\165\162\145\144\040\111\104\040\122\157"
+"\157\164\040\103\101\060\036\027\015\060\066\061\061\061\060\060"
+"\060\060\060\060\060\132\027\015\063\061\061\061\061\060\060\060"
+"\060\060\060\060\132\060\145\061\013\060\011\006\003\125\004\006"
+"\023\002\125\123\061\025\060\023\006\003\125\004\012\023\014\104"
+"\151\147\151\103\145\162\164\040\111\156\143\061\031\060\027\006"
+"\003\125\004\013\023\020\167\167\167\056\144\151\147\151\143\145"
+"\162\164\056\143\157\155\061\044\060\042\006\003\125\004\003\023"
+"\033\104\151\147\151\103\145\162\164\040\101\163\163\165\162\145"
+"\144\040\111\104\040\122\157\157\164\040\103\101\060\202\001\042"
+"\060\015\006\011\052\206\110\206\367\015\001\001\001\005\000\003"
+"\202\001\017\000\060\202\001\012\002\202\001\001\000\255\016\025"
+"\316\344\103\200\134\261\207\363\267\140\371\161\022\245\256\334"
+"\046\224\210\252\364\316\365\040\071\050\130\140\014\370\200\332"
+"\251\025\225\062\141\074\265\261\050\204\212\212\334\237\012\014"
+"\203\027\172\217\220\254\212\347\171\123\134\061\204\052\366\017"
+"\230\062\066\166\314\336\335\074\250\242\357\152\373\041\362\122"
+"\141\337\237\040\327\037\342\261\331\376\030\144\322\022\133\137"
+"\371\130\030\065\274\107\315\241\066\371\153\177\324\260\070\076"
+"\301\033\303\214\063\331\330\057\030\376\050\017\263\247\203\326"
+"\303\156\104\300\141\065\226\026\376\131\234\213\166\155\327\361"
+"\242\113\015\053\377\013\162\332\236\140\320\216\220\065\306\170"
+"\125\207\040\241\317\345\155\012\310\111\174\061\230\063\154\042"
+"\351\207\320\062\132\242\272\023\202\021\355\071\027\235\231\072"
+"\162\241\346\372\244\331\325\027\061\165\256\205\175\042\256\077"
+"\001\106\206\366\050\171\310\261\332\344\127\027\304\176\034\016"
+"\260\264\222\246\126\263\275\262\227\355\252\247\360\267\305\250"
+"\077\225\026\320\377\241\226\353\010\137\030\167\117\002\003\001"
+"\000\001\243\143\060\141\060\016\006\003\125\035\017\001\001\377"
+"\004\004\003\002\001\206\060\017\006\003\125\035\023\001\001\377"
+"\004\005\060\003\001\001\377\060\035\006\003\125\035\016\004\026"
+"\004\024\105\353\242\257\364\222\313\202\061\055\121\213\247\247"
+"\041\235\363\155\310\017\060\037\006\003\125\035\043\004\030\060"
+"\026\200\024\105\353\242\257\364\222\313\202\061\055\121\213\247"
+"\247\041\235\363\155\310\017\060\015\006\011\052\206\110\206\367"
+"\015\001\001\005\005\000\003\202\001\001\000\242\016\274\337\342"
+"\355\360\343\162\163\172\144\224\277\367\162\146\330\062\344\102"
+"\165\142\256\207\353\362\325\331\336\126\263\237\314\316\024\050"
+"\271\015\227\140\134\022\114\130\344\323\075\203\111\105\130\227"
+"\065\151\032\250\107\352\126\306\171\253\022\330\147\201\204\337"
+"\177\011\074\224\346\270\046\054\040\275\075\263\050\211\367\137"
+"\377\042\342\227\204\037\351\145\357\207\340\337\301\147\111\263"
+"\135\353\262\011\052\353\046\355\170\276\175\077\053\363\267\046"
+"\065\155\137\211\001\266\111\133\237\001\005\233\253\075\045\301"
+"\314\266\177\302\361\157\206\306\372\144\150\353\201\055\224\353"
+"\102\267\372\214\036\335\142\361\276\120\147\267\154\275\363\361"
+"\037\153\014\066\007\026\177\067\174\251\133\155\172\361\022\106"
+"\140\203\327\047\004\276\113\316\227\276\303\147\052\150\021\337"
+"\200\347\014\063\146\277\023\015\024\156\363\177\037\143\020\036"
+"\372\215\033\045\155\154\217\245\267\141\001\261\322\243\046\241"
+"\020\161\235\255\342\303\371\303\231\121\267\053\007\010\316\056"
+"\346\120\262\247\372\012\105\057\242\360\362"
+, (PRUint32)955 }
+};
+static const NSSItem nss_builtins_items_217 [] = {
+ { (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"DigiCert Assured ID Root CA", (PRUint32)28 },
+ { (void *)"\005\143\270\143\015\142\327\132\273\310\253\036\113\337\265\250"
+"\231\262\115\103"
+, (PRUint32)20 },
+ { (void *)"\207\316\013\173\052\016\111\000\341\130\161\233\067\250\223\162"
+, (PRUint32)16 },
+ { (void *)"\060\145\061\013\060\011\006\003\125\004\006\023\002\125\123\061"
+"\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145"
+"\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023"
+"\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157"
+"\155\061\044\060\042\006\003\125\004\003\023\033\104\151\147\151"
+"\103\145\162\164\040\101\163\163\165\162\145\144\040\111\104\040"
+"\122\157\157\164\040\103\101"
+, (PRUint32)103 },
+ { (void *)"\002\020\014\347\340\345\027\330\106\376\217\345\140\374\033\360"
+"\060\071"
+, (PRUint32)18 },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
+};
+static const NSSItem nss_builtins_items_218 [] = {
+ { (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"DigiCert Global Root CA", (PRUint32)24 },
+ { (void *)&ckc_x_509, (PRUint32)sizeof(CK_CERTIFICATE_TYPE) },
+ { (void *)"\060\141\061\013\060\011\006\003\125\004\006\023\002\125\123\061"
+"\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145"
+"\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023"
+"\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157"
+"\155\061\040\060\036\006\003\125\004\003\023\027\104\151\147\151"
+"\103\145\162\164\040\107\154\157\142\141\154\040\122\157\157\164"
+"\040\103\101"
+, (PRUint32)99 },
+ { (void *)"0", (PRUint32)2 },
+ { (void *)"\060\141\061\013\060\011\006\003\125\004\006\023\002\125\123\061"
+"\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145"
+"\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023"
+"\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157"
+"\155\061\040\060\036\006\003\125\004\003\023\027\104\151\147\151"
+"\103\145\162\164\040\107\154\157\142\141\154\040\122\157\157\164"
+"\040\103\101"
+, (PRUint32)99 },
+ { (void *)"\002\020\010\073\340\126\220\102\106\261\241\165\152\311\131\221"
+"\307\112"
+, (PRUint32)18 },
+ { (void *)"\060\202\003\257\060\202\002\227\240\003\002\001\002\002\020\010"
+"\073\340\126\220\102\106\261\241\165\152\311\131\221\307\112\060"
+"\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060\141"
+"\061\013\060\011\006\003\125\004\006\023\002\125\123\061\025\060"
+"\023\006\003\125\004\012\023\014\104\151\147\151\103\145\162\164"
+"\040\111\156\143\061\031\060\027\006\003\125\004\013\023\020\167"
+"\167\167\056\144\151\147\151\143\145\162\164\056\143\157\155\061"
+"\040\060\036\006\003\125\004\003\023\027\104\151\147\151\103\145"
+"\162\164\040\107\154\157\142\141\154\040\122\157\157\164\040\103"
+"\101\060\036\027\015\060\066\061\061\061\060\060\060\060\060\060"
+"\060\132\027\015\063\061\061\061\061\060\060\060\060\060\060\060"
+"\132\060\141\061\013\060\011\006\003\125\004\006\023\002\125\123"
+"\061\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103"
+"\145\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013"
+"\023\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143"
+"\157\155\061\040\060\036\006\003\125\004\003\023\027\104\151\147"
+"\151\103\145\162\164\040\107\154\157\142\141\154\040\122\157\157"
+"\164\040\103\101\060\202\001\042\060\015\006\011\052\206\110\206"
+"\367\015\001\001\001\005\000\003\202\001\017\000\060\202\001\012"
+"\002\202\001\001\000\342\073\341\021\162\336\250\244\323\243\127"
+"\252\120\242\217\013\167\220\311\242\245\356\022\316\226\133\001"
+"\011\040\314\001\223\247\116\060\267\123\367\103\304\151\000\127"
+"\235\342\215\042\335\207\006\100\000\201\011\316\316\033\203\277"
+"\337\315\073\161\106\342\326\146\307\005\263\166\047\026\217\173"
+"\236\036\225\175\356\267\110\243\010\332\326\257\172\014\071\006"
+"\145\177\112\135\037\274\027\370\253\276\356\050\327\164\177\172"
+"\170\231\131\205\150\156\134\043\062\113\277\116\300\350\132\155"
+"\343\160\277\167\020\277\374\001\366\205\331\250\104\020\130\062"
+"\251\165\030\325\321\242\276\107\342\047\152\364\232\063\370\111"
+"\010\140\213\324\137\264\072\204\277\241\252\112\114\175\076\317"
+"\117\137\154\166\136\240\113\067\221\236\334\042\346\155\316\024"
+"\032\216\152\313\376\315\263\024\144\027\307\133\051\236\062\277"
+"\362\356\372\323\013\102\324\253\267\101\062\332\014\324\357\370"
+"\201\325\273\215\130\077\265\033\350\111\050\242\160\332\061\004"
+"\335\367\262\026\362\114\012\116\007\250\355\112\075\136\265\177"
+"\243\220\303\257\047\002\003\001\000\001\243\143\060\141\060\016"
+"\006\003\125\035\017\001\001\377\004\004\003\002\001\206\060\017"
+"\006\003\125\035\023\001\001\377\004\005\060\003\001\001\377\060"
+"\035\006\003\125\035\016\004\026\004\024\003\336\120\065\126\321"
+"\114\273\146\360\243\342\033\033\303\227\262\075\321\125\060\037"
+"\006\003\125\035\043\004\030\060\026\200\024\003\336\120\065\126"
+"\321\114\273\146\360\243\342\033\033\303\227\262\075\321\125\060"
+"\015\006\011\052\206\110\206\367\015\001\001\005\005\000\003\202"
+"\001\001\000\313\234\067\252\110\023\022\012\372\335\104\234\117"
+"\122\260\364\337\256\004\365\171\171\010\243\044\030\374\113\053"
+"\204\300\055\271\325\307\376\364\301\037\130\313\270\155\234\172"
+"\164\347\230\051\253\021\265\343\160\240\241\315\114\210\231\223"
+"\214\221\160\342\253\017\034\276\223\251\377\143\325\344\007\140"
+"\323\243\277\235\133\011\361\325\216\343\123\364\216\143\372\077"
+"\247\333\264\146\337\142\146\326\321\156\101\215\362\055\265\352"
+"\167\112\237\235\130\342\053\131\300\100\043\355\055\050\202\105"
+"\076\171\124\222\046\230\340\200\110\250\067\357\360\326\171\140"
+"\026\336\254\350\016\315\156\254\104\027\070\057\111\332\341\105"
+"\076\052\271\066\123\317\072\120\006\367\056\350\304\127\111\154"
+"\141\041\030\325\004\255\170\074\054\072\200\153\247\353\257\025"
+"\024\351\330\211\301\271\070\154\342\221\154\212\377\144\271\167"
+"\045\127\060\300\033\044\243\341\334\351\337\107\174\265\264\044"
+"\010\005\060\354\055\275\013\277\105\277\120\271\251\363\353\230"
+"\001\022\255\310\210\306\230\064\137\215\012\074\306\351\325\225"
+"\225\155\336"
+, (PRUint32)947 }
+};
+static const NSSItem nss_builtins_items_219 [] = {
+ { (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"DigiCert Global Root CA", (PRUint32)24 },
+ { (void *)"\250\230\135\072\145\345\345\304\262\327\326\155\100\306\335\057"
+"\261\234\124\066"
+, (PRUint32)20 },
+ { (void *)"\171\344\251\204\015\175\072\226\327\300\117\342\103\114\211\056"
+, (PRUint32)16 },
+ { (void *)"\060\141\061\013\060\011\006\003\125\004\006\023\002\125\123\061"
+"\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145"
+"\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023"
+"\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157"
+"\155\061\040\060\036\006\003\125\004\003\023\027\104\151\147\151"
+"\103\145\162\164\040\107\154\157\142\141\154\040\122\157\157\164"
+"\040\103\101"
+, (PRUint32)99 },
+ { (void *)"\002\020\010\073\340\126\220\102\106\261\241\165\152\311\131\221"
+"\307\112"
+, (PRUint32)18 },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
+};
+static const NSSItem nss_builtins_items_220 [] = {
+ { (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"DigiCert High Assurance EV Root CA", (PRUint32)35 },
+ { (void *)&ckc_x_509, (PRUint32)sizeof(CK_CERTIFICATE_TYPE) },
+ { (void *)"\060\154\061\013\060\011\006\003\125\004\006\023\002\125\123\061"
+"\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145"
+"\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023"
+"\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157"
+"\155\061\053\060\051\006\003\125\004\003\023\042\104\151\147\151"
+"\103\145\162\164\040\110\151\147\150\040\101\163\163\165\162\141"
+"\156\143\145\040\105\126\040\122\157\157\164\040\103\101"
+, (PRUint32)110 },
+ { (void *)"0", (PRUint32)2 },
+ { (void *)"\060\154\061\013\060\011\006\003\125\004\006\023\002\125\123\061"
+"\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145"
+"\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023"
+"\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157"
+"\155\061\053\060\051\006\003\125\004\003\023\042\104\151\147\151"
+"\103\145\162\164\040\110\151\147\150\040\101\163\163\165\162\141"
+"\156\143\145\040\105\126\040\122\157\157\164\040\103\101"
+, (PRUint32)110 },
+ { (void *)"\002\020\002\254\134\046\152\013\100\233\217\013\171\362\256\106"
+"\045\167"
+, (PRUint32)18 },
+ { (void *)"\060\202\003\305\060\202\002\255\240\003\002\001\002\002\020\002"
+"\254\134\046\152\013\100\233\217\013\171\362\256\106\045\167\060"
+"\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060\154"
+"\061\013\060\011\006\003\125\004\006\023\002\125\123\061\025\060"
+"\023\006\003\125\004\012\023\014\104\151\147\151\103\145\162\164"
+"\040\111\156\143\061\031\060\027\006\003\125\004\013\023\020\167"
+"\167\167\056\144\151\147\151\143\145\162\164\056\143\157\155\061"
+"\053\060\051\006\003\125\004\003\023\042\104\151\147\151\103\145"
+"\162\164\040\110\151\147\150\040\101\163\163\165\162\141\156\143"
+"\145\040\105\126\040\122\157\157\164\040\103\101\060\036\027\015"
+"\060\066\061\061\061\060\060\060\060\060\060\060\132\027\015\063"
+"\061\061\061\061\060\060\060\060\060\060\060\132\060\154\061\013"
+"\060\011\006\003\125\004\006\023\002\125\123\061\025\060\023\006"
+"\003\125\004\012\023\014\104\151\147\151\103\145\162\164\040\111"
+"\156\143\061\031\060\027\006\003\125\004\013\023\020\167\167\167"
+"\056\144\151\147\151\143\145\162\164\056\143\157\155\061\053\060"
+"\051\006\003\125\004\003\023\042\104\151\147\151\103\145\162\164"
+"\040\110\151\147\150\040\101\163\163\165\162\141\156\143\145\040"
+"\105\126\040\122\157\157\164\040\103\101\060\202\001\042\060\015"
+"\006\011\052\206\110\206\367\015\001\001\001\005\000\003\202\001"
+"\017\000\060\202\001\012\002\202\001\001\000\306\314\345\163\346"
+"\373\324\273\345\055\055\062\246\337\345\201\077\311\315\045\111"
+"\266\161\052\303\325\224\064\147\242\012\034\260\137\151\246\100"
+"\261\304\267\262\217\320\230\244\251\101\131\072\323\334\224\326"
+"\074\333\164\070\244\112\314\115\045\202\367\112\245\123\022\070"
+"\356\363\111\155\161\221\176\143\266\253\246\137\303\244\204\370"
+"\117\142\121\276\370\305\354\333\070\222\343\006\345\010\221\014"
+"\304\050\101\125\373\313\132\211\025\176\161\350\065\277\115\162"
+"\011\075\276\072\070\120\133\167\061\033\215\263\307\044\105\232"
+"\247\254\155\000\024\132\004\267\272\023\353\121\012\230\101\101"
+"\042\116\145\141\207\201\101\120\246\171\134\211\336\031\112\127"
+"\325\056\346\135\034\123\054\176\230\315\032\006\026\244\150\163"
+"\320\064\004\023\134\241\161\323\132\174\125\333\136\144\341\067"
+"\207\060\126\004\345\021\264\051\200\022\361\171\071\210\242\002"
+"\021\174\047\146\267\210\267\170\362\312\012\250\070\253\012\144"
+"\302\277\146\135\225\204\301\241\045\036\207\135\032\120\013\040"
+"\022\314\101\273\156\013\121\070\270\113\313\002\003\001\000\001"
+"\243\143\060\141\060\016\006\003\125\035\017\001\001\377\004\004"
+"\003\002\001\206\060\017\006\003\125\035\023\001\001\377\004\005"
+"\060\003\001\001\377\060\035\006\003\125\035\016\004\026\004\024"
+"\261\076\303\151\003\370\277\107\001\324\230\046\032\010\002\357"
+"\143\144\053\303\060\037\006\003\125\035\043\004\030\060\026\200"
+"\024\261\076\303\151\003\370\277\107\001\324\230\046\032\010\002"
+"\357\143\144\053\303\060\015\006\011\052\206\110\206\367\015\001"
+"\001\005\005\000\003\202\001\001\000\034\032\006\227\334\327\234"
+"\237\074\210\146\006\010\127\041\333\041\107\370\052\147\252\277"
+"\030\062\166\100\020\127\301\212\363\172\331\021\145\216\065\372"
+"\236\374\105\265\236\331\114\061\113\270\221\350\103\054\216\263"
+"\170\316\333\343\123\171\161\326\345\041\224\001\332\125\207\232"
+"\044\144\366\212\146\314\336\234\067\315\250\064\261\151\233\043"
+"\310\236\170\042\053\160\103\343\125\107\061\141\031\357\130\305"
+"\205\057\116\060\366\240\061\026\043\310\347\342\145\026\063\313"
+"\277\032\033\240\075\370\312\136\213\061\213\140\010\211\055\014"
+"\006\134\122\267\304\371\012\230\321\025\137\237\022\276\174\066"
+"\143\070\275\104\244\177\344\046\053\012\304\227\151\015\351\214"
+"\342\300\020\127\270\310\166\022\221\125\362\110\151\330\274\052"
+"\002\133\017\104\324\040\061\333\364\272\160\046\135\220\140\236"
+"\274\113\027\011\057\264\313\036\103\150\311\007\047\301\322\134"
+"\367\352\041\271\150\022\234\074\234\277\236\374\200\134\233\143"
+"\315\354\107\252\045\047\147\240\067\363\000\202\175\124\327\251"
+"\370\351\056\023\243\167\350\037\112"
+, (PRUint32)969 }
+};
+static const NSSItem nss_builtins_items_221 [] = {
+ { (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"DigiCert High Assurance EV Root CA", (PRUint32)35 },
+ { (void *)"\137\267\356\006\063\342\131\333\255\014\114\232\346\323\217\032"
+"\141\307\334\045"
+, (PRUint32)20 },
+ { (void *)"\324\164\336\127\134\071\262\323\234\205\203\305\300\145\111\212"
+, (PRUint32)16 },
+ { (void *)"\060\154\061\013\060\011\006\003\125\004\006\023\002\125\123\061"
+"\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145"
+"\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023"
+"\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157"
+"\155\061\053\060\051\006\003\125\004\003\023\042\104\151\147\151"
+"\103\145\162\164\040\110\151\147\150\040\101\163\163\165\162\141"
+"\156\143\145\040\105\126\040\122\157\157\164\040\103\101"
+, (PRUint32)110 },
+ { (void *)"\002\020\002\254\134\046\152\013\100\233\217\013\171\362\256\106"
+"\045\167"
+, (PRUint32)18 },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
+};
+static const NSSItem nss_builtins_items_222 [] = {
+ { (void *)&cko_certificate, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"Certplus Class 2 Primary CA", (PRUint32)28 },
+ { (void *)&ckc_x_509, (PRUint32)sizeof(CK_CERTIFICATE_TYPE) },
+ { (void *)"\060\075\061\013\060\011\006\003\125\004\006\023\002\106\122\061"
+"\021\060\017\006\003\125\004\012\023\010\103\145\162\164\160\154"
+"\165\163\061\033\060\031\006\003\125\004\003\023\022\103\154\141"
+"\163\163\040\062\040\120\162\151\155\141\162\171\040\103\101"
+, (PRUint32)63 },
+ { (void *)"0", (PRUint32)2 },
+ { (void *)"\060\075\061\013\060\011\006\003\125\004\006\023\002\106\122\061"
+"\021\060\017\006\003\125\004\012\023\010\103\145\162\164\160\154"
+"\165\163\061\033\060\031\006\003\125\004\003\023\022\103\154\141"
+"\163\163\040\062\040\120\162\151\155\141\162\171\040\103\101"
+, (PRUint32)63 },
+ { (void *)"\002\021\000\205\275\113\363\330\332\343\151\366\224\327\137\303"
+"\245\104\043"
+, (PRUint32)19 },
+ { (void *)"\060\202\003\222\060\202\002\172\240\003\002\001\002\002\021\000"
+"\205\275\113\363\330\332\343\151\366\224\327\137\303\245\104\043"
+"\060\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060"
+"\075\061\013\060\011\006\003\125\004\006\023\002\106\122\061\021"
+"\060\017\006\003\125\004\012\023\010\103\145\162\164\160\154\165"
+"\163\061\033\060\031\006\003\125\004\003\023\022\103\154\141\163"
+"\163\040\062\040\120\162\151\155\141\162\171\040\103\101\060\036"
+"\027\015\071\071\060\067\060\067\061\067\060\065\060\060\132\027"
+"\015\061\071\060\067\060\066\062\063\065\071\065\071\132\060\075"
+"\061\013\060\011\006\003\125\004\006\023\002\106\122\061\021\060"
+"\017\006\003\125\004\012\023\010\103\145\162\164\160\154\165\163"
+"\061\033\060\031\006\003\125\004\003\023\022\103\154\141\163\163"
+"\040\062\040\120\162\151\155\141\162\171\040\103\101\060\202\001"
+"\042\060\015\006\011\052\206\110\206\367\015\001\001\001\005\000"
+"\003\202\001\017\000\060\202\001\012\002\202\001\001\000\334\120"
+"\226\320\022\370\065\322\010\170\172\266\122\160\375\157\356\317"
+"\271\021\313\135\167\341\354\351\176\004\215\326\314\157\163\103"
+"\127\140\254\063\012\104\354\003\137\034\200\044\221\345\250\221"
+"\126\022\202\367\340\053\364\333\256\141\056\211\020\215\153\154"
+"\272\263\002\275\325\066\305\110\067\043\342\360\132\067\122\063"
+"\027\022\342\321\140\115\276\057\101\021\343\366\027\045\014\213"
+"\221\300\033\231\173\231\126\015\257\356\322\274\107\127\343\171"
+"\111\173\064\211\047\044\204\336\261\354\351\130\116\376\116\337"
+"\132\276\101\255\254\010\305\030\016\357\322\123\356\154\320\235"
+"\022\001\023\215\334\200\142\367\225\251\104\210\112\161\116\140"
+"\125\236\333\043\031\171\126\007\014\077\143\013\134\260\342\276"
+"\176\025\374\224\063\130\101\070\164\304\341\217\213\337\046\254"
+"\037\265\213\073\267\103\131\153\260\044\246\155\220\213\304\162"
+"\352\135\063\230\267\313\336\136\173\357\224\361\033\076\312\311"
+"\041\301\305\230\002\252\242\366\133\167\233\365\176\226\125\064"
+"\034\147\151\300\361\102\343\107\254\374\050\034\146\125\002\003"
+"\001\000\001\243\201\214\060\201\211\060\017\006\003\125\035\023"
+"\004\010\060\006\001\001\377\002\001\012\060\013\006\003\125\035"
+"\017\004\004\003\002\001\006\060\035\006\003\125\035\016\004\026"
+"\004\024\343\163\055\337\313\016\050\014\336\335\263\244\312\171"
+"\270\216\273\350\060\211\060\021\006\011\140\206\110\001\206\370"
+"\102\001\001\004\004\003\002\001\006\060\067\006\003\125\035\037"
+"\004\060\060\056\060\054\240\052\240\050\206\046\150\164\164\160"
+"\072\057\057\167\167\167\056\143\145\162\164\160\154\165\163\056"
+"\143\157\155\057\103\122\114\057\143\154\141\163\163\062\056\143"
+"\162\154\060\015\006\011\052\206\110\206\367\015\001\001\005\005"
+"\000\003\202\001\001\000\247\124\317\210\104\031\313\337\324\177"
+"\000\337\126\063\142\265\367\121\001\220\353\303\077\321\210\104"
+"\351\044\135\357\347\024\275\040\267\232\074\000\376\155\237\333"
+"\220\334\327\364\142\326\213\160\135\347\345\004\110\251\150\174"
+"\311\361\102\363\154\177\305\172\174\035\121\210\272\322\012\076"
+"\047\135\336\055\121\116\323\023\144\151\344\056\343\323\347\233"
+"\011\231\246\340\225\233\316\032\327\177\276\074\316\122\263\021"
+"\025\301\017\027\315\003\273\234\045\025\272\242\166\211\374\006"
+"\361\030\320\223\113\016\174\202\267\245\364\366\137\376\355\100"
+"\246\235\204\164\071\271\334\036\205\026\332\051\033\206\043\000"
+"\311\273\211\176\156\200\210\036\057\024\264\003\044\250\062\157"
+"\003\232\107\054\060\276\126\306\247\102\002\160\033\352\100\330"
+"\272\005\003\160\007\244\226\377\375\110\063\012\341\334\245\201"
+"\220\233\115\335\175\347\347\262\315\134\310\152\225\370\245\366"
+"\215\304\135\170\010\276\173\006\326\111\317\031\066\120\043\056"
+"\010\346\236\005\115\107\030\325\026\351\261\326\266\020\325\273"
+"\227\277\242\216\264\124"
+, (PRUint32)918 }
+};
+static const NSSItem nss_builtins_items_223 [] = {
+ { (void *)&cko_netscape_trust, (PRUint32)sizeof(CK_OBJECT_CLASS) },
+ { (void *)&ck_true, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) },
+ { (void *)"Certplus Class 2 Primary CA", (PRUint32)28 },
+ { (void *)"\164\040\164\101\162\234\335\222\354\171\061\330\043\020\215\302"
+"\201\222\342\273"
+, (PRUint32)20 },
+ { (void *)"\210\054\214\122\270\242\074\363\367\273\003\352\256\254\102\013"
+, (PRUint32)16 },
+ { (void *)"\060\075\061\013\060\011\006\003\125\004\006\023\002\106\122\061"
+"\021\060\017\006\003\125\004\012\023\010\103\145\162\164\160\154"
+"\165\163\061\033\060\031\006\003\125\004\003\023\022\103\154\141"
+"\163\163\040\062\040\120\162\151\155\141\162\171\040\103\101"
+, (PRUint32)63 },
+ { (void *)"\002\021\000\205\275\113\363\330\332\343\151\366\224\327\137\303"
+"\245\104\043"
+, (PRUint32)19 },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trusted_delegator, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ckt_netscape_trust_unknown, (PRUint32)sizeof(CK_TRUST) },
+ { (void *)&ck_false, (PRUint32)sizeof(CK_BBOOL) }
+};
PR_IMPLEMENT_DATA(builtinsInternalObject)
nss_builtins_data[] = {
@@ -14044,13 +15133,13 @@ nss_builtins_data[] = {
{ 11, nss_builtins_types_64, nss_builtins_items_64, {NULL} },
{ 13, nss_builtins_types_65, nss_builtins_items_65, {NULL} },
{ 11, nss_builtins_types_66, nss_builtins_items_66, {NULL} },
- { 12, nss_builtins_types_67, nss_builtins_items_67, {NULL} },
+ { 13, nss_builtins_types_67, nss_builtins_items_67, {NULL} },
{ 11, nss_builtins_types_68, nss_builtins_items_68, {NULL} },
{ 13, nss_builtins_types_69, nss_builtins_items_69, {NULL} },
{ 11, nss_builtins_types_70, nss_builtins_items_70, {NULL} },
{ 13, nss_builtins_types_71, nss_builtins_items_71, {NULL} },
{ 11, nss_builtins_types_72, nss_builtins_items_72, {NULL} },
- { 12, nss_builtins_types_73, nss_builtins_items_73, {NULL} },
+ { 13, nss_builtins_types_73, nss_builtins_items_73, {NULL} },
{ 11, nss_builtins_types_74, nss_builtins_items_74, {NULL} },
{ 13, nss_builtins_types_75, nss_builtins_items_75, {NULL} },
{ 11, nss_builtins_types_76, nss_builtins_items_76, {NULL} },
@@ -14060,7 +15149,7 @@ nss_builtins_data[] = {
{ 11, nss_builtins_types_80, nss_builtins_items_80, {NULL} },
{ 13, nss_builtins_types_81, nss_builtins_items_81, {NULL} },
{ 11, nss_builtins_types_82, nss_builtins_items_82, {NULL} },
- { 12, nss_builtins_types_83, nss_builtins_items_83, {NULL} },
+ { 13, nss_builtins_types_83, nss_builtins_items_83, {NULL} },
{ 11, nss_builtins_types_84, nss_builtins_items_84, {NULL} },
{ 13, nss_builtins_types_85, nss_builtins_items_85, {NULL} },
{ 11, nss_builtins_types_86, nss_builtins_items_86, {NULL} },
@@ -14184,11 +15273,27 @@ nss_builtins_data[] = {
{ 11, nss_builtins_types_204, nss_builtins_items_204, {NULL} },
{ 13, nss_builtins_types_205, nss_builtins_items_205, {NULL} },
{ 11, nss_builtins_types_206, nss_builtins_items_206, {NULL} },
- { 13, nss_builtins_types_207, nss_builtins_items_207, {NULL} }
+ { 13, nss_builtins_types_207, nss_builtins_items_207, {NULL} },
+ { 11, nss_builtins_types_208, nss_builtins_items_208, {NULL} },
+ { 13, nss_builtins_types_209, nss_builtins_items_209, {NULL} },
+ { 11, nss_builtins_types_210, nss_builtins_items_210, {NULL} },
+ { 13, nss_builtins_types_211, nss_builtins_items_211, {NULL} },
+ { 11, nss_builtins_types_212, nss_builtins_items_212, {NULL} },
+ { 13, nss_builtins_types_213, nss_builtins_items_213, {NULL} },
+ { 11, nss_builtins_types_214, nss_builtins_items_214, {NULL} },
+ { 13, nss_builtins_types_215, nss_builtins_items_215, {NULL} },
+ { 11, nss_builtins_types_216, nss_builtins_items_216, {NULL} },
+ { 13, nss_builtins_types_217, nss_builtins_items_217, {NULL} },
+ { 11, nss_builtins_types_218, nss_builtins_items_218, {NULL} },
+ { 13, nss_builtins_types_219, nss_builtins_items_219, {NULL} },
+ { 11, nss_builtins_types_220, nss_builtins_items_220, {NULL} },
+ { 13, nss_builtins_types_221, nss_builtins_items_221, {NULL} },
+ { 11, nss_builtins_types_222, nss_builtins_items_222, {NULL} },
+ { 13, nss_builtins_types_223, nss_builtins_items_223, {NULL} }
};
PR_IMPLEMENT_DATA(const PRUint32)
#ifdef DEBUG
- nss_builtins_nObjects = 207+1;
+ nss_builtins_nObjects = 223+1;
#else
- nss_builtins_nObjects = 207;
+ nss_builtins_nObjects = 223;
#endif /* DEBUG */
diff --git a/mozilla/security/nss/lib/ckfw/builtins/certdata.txt b/mozilla/security/nss/lib/ckfw/builtins/certdata.txt
index c27e21a213d..417edfe7cc8 100644
--- a/mozilla/security/nss/lib/ckfw/builtins/certdata.txt
+++ b/mozilla/security/nss/lib/ckfw/builtins/certdata.txt
@@ -34,7 +34,7 @@
# the terms of any one of the MPL, the GPL or the LGPL.
#
# ***** END LICENSE BLOCK *****
-CVS_ID "@(#) $RCSfile: certdata.txt,v $ $Revision: 1.37.24.3 $ $Date: 2006-09-15 00:27:03 $"
+CVS_ID "@(#) $RCSfile: certdata.txt,v $ $Revision: 1.37.24.6 $ $Date: 2007-06-16 05:10:59 $"
#
# certdata.txt
@@ -201,7 +201,7 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_TRUE
#
@@ -527,7 +527,7 @@ END
CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\001\000
END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
@@ -663,7 +663,7 @@ END
CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\001\000
END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
@@ -800,9 +800,9 @@ END
CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\001\000
END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
@@ -933,7 +933,7 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\001\001
END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_TRUE
@@ -1069,7 +1069,7 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\001\001
END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_TRUE
@@ -1910,9 +1910,9 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\021\000\315\272\177\126\360\337\344\274\124\376\042\254\263
\162\252\125
END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
@@ -2012,7 +2012,7 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\020\055\033\374\112\027\215\243\221\353\347\377\365\213\105
\276\013
END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
@@ -2247,9 +2247,9 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\020\114\307\352\252\230\076\161\323\223\020\370\075\072\211
\221\222
END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
@@ -2380,7 +2380,7 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\021\000\271\057\140\314\210\237\241\172\106\011\270\133\160
\154\212\257
END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
@@ -2768,6 +2768,124 @@ CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+#
+# Certificate "GlobalSign Root CA - R2"
+#
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "GlobalSign Root CA - R2"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\114\061\040\060\036\006\003\125\004\013\023\027\107\154\157
+\142\141\154\123\151\147\156\040\122\157\157\164\040\103\101\040
+\055\040\122\062\061\023\060\021\006\003\125\004\012\023\012\107
+\154\157\142\141\154\123\151\147\156\061\023\060\021\006\003\125
+\004\003\023\012\107\154\157\142\141\154\123\151\147\156
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\114\061\040\060\036\006\003\125\004\013\023\027\107\154\157
+\142\141\154\123\151\147\156\040\122\157\157\164\040\103\101\040
+\055\040\122\062\061\023\060\021\006\003\125\004\012\023\012\107
+\154\157\142\141\154\123\151\147\156\061\023\060\021\006\003\125
+\004\003\023\012\107\154\157\142\141\154\123\151\147\156
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\013\004\000\000\000\000\001\017\206\046\346\015
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\003\272\060\202\002\242\240\003\002\001\002\002\013\004
+\000\000\000\000\001\017\206\046\346\015\060\015\006\011\052\206
+\110\206\367\015\001\001\005\005\000\060\114\061\040\060\036\006
+\003\125\004\013\023\027\107\154\157\142\141\154\123\151\147\156
+\040\122\157\157\164\040\103\101\040\055\040\122\062\061\023\060
+\021\006\003\125\004\012\023\012\107\154\157\142\141\154\123\151
+\147\156\061\023\060\021\006\003\125\004\003\023\012\107\154\157
+\142\141\154\123\151\147\156\060\036\027\015\060\066\061\062\061
+\065\060\070\060\060\060\060\132\027\015\062\061\061\062\061\065
+\060\070\060\060\060\060\132\060\114\061\040\060\036\006\003\125
+\004\013\023\027\107\154\157\142\141\154\123\151\147\156\040\122
+\157\157\164\040\103\101\040\055\040\122\062\061\023\060\021\006
+\003\125\004\012\023\012\107\154\157\142\141\154\123\151\147\156
+\061\023\060\021\006\003\125\004\003\023\012\107\154\157\142\141
+\154\123\151\147\156\060\202\001\042\060\015\006\011\052\206\110
+\206\367\015\001\001\001\005\000\003\202\001\017\000\060\202\001
+\012\002\202\001\001\000\246\317\044\016\276\056\157\050\231\105
+\102\304\253\076\041\124\233\013\323\177\204\160\372\022\263\313
+\277\207\137\306\177\206\323\262\060\134\326\375\255\361\173\334
+\345\370\140\226\011\222\020\365\320\123\336\373\173\176\163\210
+\254\122\210\173\112\246\312\111\246\136\250\247\214\132\021\274
+\172\202\353\276\214\351\263\254\226\045\007\227\112\231\052\007
+\057\264\036\167\277\212\017\265\002\174\033\226\270\305\271\072
+\054\274\326\022\271\353\131\175\342\320\006\206\137\136\111\152
+\265\071\136\210\064\354\274\170\014\010\230\204\154\250\315\113
+\264\240\175\014\171\115\360\270\055\313\041\312\325\154\133\175
+\341\240\051\204\241\371\323\224\111\313\044\142\221\040\274\335
+\013\325\331\314\371\352\047\012\053\163\221\306\235\033\254\310
+\313\350\340\240\364\057\220\213\115\373\260\066\033\366\031\172
+\205\340\155\362\141\023\210\134\237\340\223\012\121\227\212\132
+\316\257\253\325\367\252\011\252\140\275\334\331\137\337\162\251
+\140\023\136\000\001\311\112\372\077\244\352\007\003\041\002\216
+\202\312\003\302\233\217\002\003\001\000\001\243\201\234\060\201
+\231\060\016\006\003\125\035\017\001\001\377\004\004\003\002\001
+\006\060\017\006\003\125\035\023\001\001\377\004\005\060\003\001
+\001\377\060\035\006\003\125\035\016\004\026\004\024\233\342\007
+\127\147\034\036\300\152\006\336\131\264\232\055\337\334\031\206
+\056\060\066\006\003\125\035\037\004\057\060\055\060\053\240\051
+\240\047\206\045\150\164\164\160\072\057\057\143\162\154\056\147
+\154\157\142\141\154\163\151\147\156\056\156\145\164\057\162\157
+\157\164\055\162\062\056\143\162\154\060\037\006\003\125\035\043
+\004\030\060\026\200\024\233\342\007\127\147\034\036\300\152\006
+\336\131\264\232\055\337\334\031\206\056\060\015\006\011\052\206
+\110\206\367\015\001\001\005\005\000\003\202\001\001\000\231\201
+\123\207\034\150\227\206\221\354\340\112\270\104\013\253\201\254
+\047\117\326\301\270\034\103\170\263\014\232\374\352\054\074\156
+\141\033\115\113\051\365\237\005\035\046\301\270\351\203\000\142
+\105\266\251\010\223\271\251\063\113\030\232\302\370\207\210\116
+\333\335\161\064\032\301\124\332\106\077\340\323\052\253\155\124
+\042\365\072\142\315\040\157\272\051\211\327\335\221\356\323\134
+\242\076\241\133\101\365\337\345\144\103\055\351\325\071\253\322
+\242\337\267\213\320\300\200\031\034\105\300\055\214\350\370\055
+\244\164\126\111\305\005\265\117\025\336\156\104\170\071\207\250
+\176\273\363\171\030\221\273\364\157\235\301\360\214\065\214\135
+\001\373\303\155\271\357\104\155\171\106\061\176\012\376\251\202
+\301\377\357\253\156\040\304\120\311\137\235\115\233\027\214\014
+\345\001\311\240\101\152\163\123\372\245\120\264\156\045\017\373
+\114\030\364\375\122\331\216\151\261\350\021\017\336\210\330\373
+\035\111\367\252\336\225\317\040\170\302\140\022\333\045\100\214
+\152\374\176\102\070\100\144\022\367\236\201\341\223\056
+END
+
+# Trust for Certificate "GlobalSign Root CA - R2"
+CKA_CLASS CK_OBJECT_CLASS CKO_NETSCAPE_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "GlobalSign Root CA - R2"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\165\340\253\266\023\205\022\047\034\004\370\137\335\336\070\344
+\267\044\056\376
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\224\024\167\176\076\136\375\217\060\275\101\260\317\347\320\060
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\114\061\040\060\036\006\003\125\004\013\023\027\107\154\157
+\142\141\154\123\151\147\156\040\122\157\157\164\040\103\101\040
+\055\040\122\062\061\023\060\021\006\003\125\004\012\023\012\107
+\154\157\142\141\154\123\151\147\156\061\023\060\021\006\003\125
+\004\003\023\012\107\154\157\142\141\154\123\151\147\156
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\013\004\000\000\000\000\001\017\206\046\346\015
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
#
# Certificate "ValiCert Class 1 VA"
#
@@ -3291,9 +3409,9 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\021\000\213\133\165\126\204\124\205\013\000\317\257\070\110
\316\261\244
END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
@@ -3441,7 +3559,7 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\020\141\160\313\111\214\137\230\105\051\347\260\246\331\120
\133\172
END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
@@ -4331,7 +4449,8 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
# Certificate "Equifax Secure Global eBusiness CA"
@@ -4645,6 +4764,7 @@ END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
# Certificate "Visa International Global Root 2"
@@ -4764,7 +4884,7 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
@@ -5038,7 +5158,7 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
@@ -5290,14 +5410,13 @@ CKA_CERT_MD5_HASH MULTILINE_OCTAL
\301\142\076\043\305\202\163\234\003\131\113\053\351\167\111\177
END
CKA_ISSUER MULTILINE_OCTAL
-\060\157\061\013\060\011\006\003\125\004\006\023\002\123\105\061
+\060\144\061\013\060\011\006\003\125\004\006\023\002\123\105\061
\024\060\022\006\003\125\004\012\023\013\101\144\144\124\162\165
-\163\164\040\101\102\061\046\060\044\006\003\125\004\013\023\035
-\101\144\144\124\162\165\163\164\040\105\170\164\145\162\156\141
-\154\040\124\124\120\040\116\145\164\167\157\162\153\061\042\060
-\040\006\003\125\004\003\023\031\101\144\144\124\162\165\163\164
-\040\105\170\164\145\162\156\141\154\040\103\101\040\122\157\157
-\164
+\163\164\040\101\102\061\035\060\033\006\003\125\004\013\023\024
+\101\144\144\124\162\165\163\164\040\124\124\120\040\116\145\164
+\167\157\162\153\061\040\060\036\006\003\125\004\003\023\027\101
+\144\144\124\162\165\163\164\040\120\165\142\154\151\143\040\103
+\101\040\122\157\157\164
END
CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\001\001
@@ -5305,6 +5424,7 @@ END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
# Certificate "AddTrust Qualified Certificates Root"
@@ -10976,6 +11096,321 @@ CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+#
+# Certificate "QuoVadis Root CA 2"
+#
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "QuoVadis Root CA 2"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061
+\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144
+\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003
+\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157
+\157\164\040\103\101\040\062
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061
+\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144
+\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003
+\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157
+\157\164\040\103\101\040\062
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\002\005\011
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\005\267\060\202\003\237\240\003\002\001\002\002\002\005
+\011\060\015\006\011\052\206\110\206\367\015\001\001\005\005\000
+\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061
+\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144
+\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003
+\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157
+\157\164\040\103\101\040\062\060\036\027\015\060\066\061\061\062
+\064\061\070\062\067\060\060\132\027\015\063\061\061\061\062\064
+\061\070\062\063\063\063\132\060\105\061\013\060\011\006\003\125
+\004\006\023\002\102\115\061\031\060\027\006\003\125\004\012\023
+\020\121\165\157\126\141\144\151\163\040\114\151\155\151\164\145
+\144\061\033\060\031\006\003\125\004\003\023\022\121\165\157\126
+\141\144\151\163\040\122\157\157\164\040\103\101\040\062\060\202
+\002\042\060\015\006\011\052\206\110\206\367\015\001\001\001\005
+\000\003\202\002\017\000\060\202\002\012\002\202\002\001\000\232
+\030\312\113\224\015\000\055\257\003\051\212\360\017\201\310\256
+\114\031\205\035\010\237\253\051\104\205\363\057\201\255\062\036
+\220\106\277\243\206\046\032\036\376\176\034\030\072\134\234\140
+\027\052\072\164\203\063\060\175\141\124\021\313\355\253\340\346
+\322\242\176\365\153\157\030\267\012\013\055\375\351\076\357\012
+\306\263\020\351\334\302\106\027\370\135\375\244\332\377\236\111
+\132\234\346\063\346\044\226\367\077\272\133\053\034\172\065\302
+\326\147\376\253\146\120\213\155\050\140\053\357\327\140\303\307
+\223\274\215\066\221\363\177\370\333\021\023\304\234\167\166\301
+\256\267\002\152\201\172\251\105\203\342\005\346\271\126\301\224
+\067\217\110\161\143\042\354\027\145\007\225\212\113\337\217\306
+\132\012\345\260\343\137\136\153\021\253\014\371\205\353\104\351
+\370\004\163\362\351\376\134\230\214\365\163\257\153\264\176\315
+\324\134\002\053\114\071\341\262\225\225\055\102\207\327\325\263
+\220\103\267\154\023\361\336\335\366\304\370\211\077\321\165\365
+\222\303\221\325\212\210\320\220\354\334\155\336\211\302\145\161
+\226\213\015\003\375\234\277\133\026\254\222\333\352\376\171\174
+\255\353\257\367\026\313\333\315\045\053\345\037\373\232\237\342
+\121\314\072\123\014\110\346\016\275\311\264\166\006\122\346\021
+\023\205\162\143\003\004\340\004\066\053\040\031\002\350\164\247
+\037\266\311\126\146\360\165\045\334\147\301\016\141\140\210\263
+\076\321\250\374\243\332\035\260\321\261\043\124\337\104\166\155
+\355\101\330\301\262\042\266\123\034\337\065\035\334\241\167\052
+\061\344\055\365\345\345\333\310\340\377\345\200\327\013\143\240
+\377\063\241\017\272\054\025\025\352\227\263\322\242\265\276\362
+\214\226\036\032\217\035\154\244\141\067\271\206\163\063\327\227
+\226\236\043\175\202\244\114\201\342\241\321\272\147\137\225\007
+\243\047\021\356\026\020\173\274\105\112\114\262\004\322\253\357
+\325\375\014\121\316\120\152\010\061\371\221\332\014\217\144\134
+\003\303\072\213\040\077\156\215\147\075\072\326\376\175\133\210
+\311\136\373\314\141\334\213\063\167\323\104\062\065\011\142\004
+\222\026\020\330\236\047\107\373\073\041\343\370\353\035\133\002
+\003\001\000\001\243\201\260\060\201\255\060\017\006\003\125\035
+\023\001\001\377\004\005\060\003\001\001\377\060\013\006\003\125
+\035\017\004\004\003\002\001\006\060\035\006\003\125\035\016\004
+\026\004\024\032\204\142\274\110\114\063\045\004\324\356\320\366
+\003\304\031\106\321\224\153\060\156\006\003\125\035\043\004\147
+\060\145\200\024\032\204\142\274\110\114\063\045\004\324\356\320
+\366\003\304\031\106\321\224\153\241\111\244\107\060\105\061\013
+\060\011\006\003\125\004\006\023\002\102\115\061\031\060\027\006
+\003\125\004\012\023\020\121\165\157\126\141\144\151\163\040\114
+\151\155\151\164\145\144\061\033\060\031\006\003\125\004\003\023
+\022\121\165\157\126\141\144\151\163\040\122\157\157\164\040\103
+\101\040\062\202\002\005\011\060\015\006\011\052\206\110\206\367
+\015\001\001\005\005\000\003\202\002\001\000\076\012\026\115\237
+\006\133\250\256\161\135\057\005\057\147\346\023\105\203\304\066
+\366\363\300\046\014\015\265\107\144\135\370\264\162\311\106\245
+\003\030\047\125\211\170\175\166\352\226\064\200\027\040\334\347
+\203\370\215\374\007\270\332\137\115\056\147\262\204\375\331\104
+\374\167\120\201\346\174\264\311\015\013\162\123\370\166\007\007
+\101\107\226\014\373\340\202\046\223\125\214\376\042\037\140\145
+\174\137\347\046\263\367\062\220\230\120\324\067\161\125\366\222
+\041\170\367\225\171\372\370\055\046\207\146\126\060\167\246\067
+\170\063\122\020\130\256\077\141\216\362\152\261\357\030\176\112
+\131\143\312\215\242\126\325\247\057\274\126\037\317\071\301\342
+\373\012\250\025\054\175\115\172\143\306\154\227\104\074\322\157
+\303\112\027\012\370\220\322\127\242\031\121\245\055\227\101\332
+\007\117\251\120\332\220\215\224\106\341\076\360\224\375\020\000
+\070\365\073\350\100\341\264\156\126\032\040\314\157\130\215\355
+\056\105\217\326\351\223\077\347\261\054\337\072\326\042\214\334
+\204\273\042\157\320\370\344\306\071\351\004\210\074\303\272\353
+\125\172\155\200\231\044\365\154\001\373\370\227\260\224\133\353
+\375\322\157\361\167\150\015\065\144\043\254\270\125\241\003\321
+\115\102\031\334\370\165\131\126\243\371\250\111\171\370\257\016
+\271\021\240\174\267\152\355\064\320\266\046\142\070\032\207\014
+\370\350\375\056\323\220\177\007\221\052\035\326\176\134\205\203
+\231\260\070\010\077\351\136\371\065\007\344\311\142\156\127\177
+\247\120\225\367\272\310\233\346\216\242\001\305\326\146\277\171
+\141\363\074\034\341\271\202\134\135\240\303\351\330\110\275\031
+\242\021\024\031\156\262\206\033\150\076\110\067\032\210\267\135
+\226\136\234\307\357\047\142\010\342\221\031\134\322\361\041\335
+\272\027\102\202\227\161\201\123\061\251\237\366\175\142\277\162
+\341\243\223\035\314\212\046\132\011\070\320\316\327\015\200\026
+\264\170\245\072\207\114\215\212\245\325\106\227\362\054\020\271
+\274\124\042\300\001\120\151\103\236\364\262\357\155\370\354\332
+\361\343\261\357\337\221\217\124\052\013\045\301\046\031\304\122
+\020\005\145\325\202\020\352\302\061\315\056
+END
+
+# Trust for Certificate "QuoVadis Root CA 2"
+CKA_CLASS CK_OBJECT_CLASS CKO_NETSCAPE_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "QuoVadis Root CA 2"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\312\072\373\317\022\100\066\113\104\262\026\040\210\200\110\071
+\031\223\174\367
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\136\071\173\335\370\272\354\202\351\254\142\272\014\124\000\053
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061
+\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144
+\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003
+\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157
+\157\164\040\103\101\040\062
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\002\005\011
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
+#
+# Certificate "QuoVadis Root CA 3"
+#
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "QuoVadis Root CA 3"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061
+\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144
+\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003
+\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157
+\157\164\040\103\101\040\063
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061
+\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144
+\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003
+\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157
+\157\164\040\103\101\040\063
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\002\005\306
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\006\235\060\202\004\205\240\003\002\001\002\002\002\005
+\306\060\015\006\011\052\206\110\206\367\015\001\001\005\005\000
+\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061
+\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144
+\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003
+\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157
+\157\164\040\103\101\040\063\060\036\027\015\060\066\061\061\062
+\064\061\071\061\061\062\063\132\027\015\063\061\061\061\062\064
+\061\071\060\066\064\064\132\060\105\061\013\060\011\006\003\125
+\004\006\023\002\102\115\061\031\060\027\006\003\125\004\012\023
+\020\121\165\157\126\141\144\151\163\040\114\151\155\151\164\145
+\144\061\033\060\031\006\003\125\004\003\023\022\121\165\157\126
+\141\144\151\163\040\122\157\157\164\040\103\101\040\063\060\202
+\002\042\060\015\006\011\052\206\110\206\367\015\001\001\001\005
+\000\003\202\002\017\000\060\202\002\012\002\202\002\001\000\314
+\127\102\026\124\234\346\230\323\323\115\356\376\355\307\237\103
+\071\112\145\263\350\026\210\064\333\015\131\221\164\317\222\270
+\004\100\255\002\113\061\253\274\215\221\150\330\040\016\032\001
+\342\032\173\116\027\135\342\212\267\077\231\032\315\353\141\253
+\302\145\246\037\267\267\275\267\217\374\375\160\217\013\240\147
+\276\001\242\131\317\161\346\017\051\166\377\261\126\171\105\053
+\037\236\172\124\350\243\051\065\150\244\001\117\017\244\056\067
+\357\033\277\343\217\020\250\162\253\130\127\347\124\206\310\311
+\363\133\332\054\332\135\216\156\074\243\076\332\373\202\345\335
+\362\134\262\005\063\157\212\066\316\320\023\116\377\277\112\014
+\064\114\246\303\041\275\120\004\125\353\261\273\235\373\105\036
+\144\025\336\125\001\214\002\166\265\313\241\077\102\151\274\057
+\275\150\103\026\126\211\052\067\141\221\375\246\256\116\300\313
+\024\145\224\067\113\222\006\357\004\320\310\234\210\333\013\173
+\201\257\261\075\052\304\145\072\170\266\356\334\200\261\322\323
+\231\234\072\356\153\132\153\263\215\267\325\316\234\302\276\245
+\113\057\026\261\236\150\073\006\157\256\175\237\370\336\354\314
+\051\247\230\243\045\103\057\357\361\137\046\341\210\115\370\136
+\156\327\331\024\156\031\063\151\247\073\204\211\223\304\123\125
+\023\241\121\170\100\370\270\311\242\356\173\272\122\102\203\236
+\024\355\005\122\132\131\126\247\227\374\235\077\012\051\330\334
+\117\221\016\023\274\336\225\244\337\213\231\276\254\233\063\210
+\357\265\201\257\033\306\042\123\310\366\307\356\227\024\260\305
+\174\170\122\310\360\316\156\167\140\204\246\351\052\166\040\355
+\130\001\027\060\223\351\032\213\340\163\143\331\152\222\224\111
+\116\264\255\112\205\304\243\042\060\374\011\355\150\042\163\246
+\210\014\125\041\130\305\341\072\237\052\335\312\341\220\340\331
+\163\253\154\200\270\350\013\144\223\240\234\214\031\377\263\322
+\014\354\221\046\207\212\263\242\341\160\217\054\012\345\315\155
+\150\121\353\332\077\005\177\213\062\346\023\134\153\376\137\100
+\342\042\310\264\264\144\117\326\272\175\110\076\250\151\014\327
+\273\206\161\311\163\270\077\073\235\045\113\332\377\100\353\002
+\003\001\000\001\243\202\001\225\060\202\001\221\060\017\006\003
+\125\035\023\001\001\377\004\005\060\003\001\001\377\060\201\341
+\006\003\125\035\040\004\201\331\060\201\326\060\201\323\006\011
+\053\006\001\004\001\276\130\000\003\060\201\305\060\201\223\006
+\010\053\006\001\005\005\007\002\002\060\201\206\032\201\203\101
+\156\171\040\165\163\145\040\157\146\040\164\150\151\163\040\103
+\145\162\164\151\146\151\143\141\164\145\040\143\157\156\163\164
+\151\164\165\164\145\163\040\141\143\143\145\160\164\141\156\143
+\145\040\157\146\040\164\150\145\040\121\165\157\126\141\144\151
+\163\040\122\157\157\164\040\103\101\040\063\040\103\145\162\164
+\151\146\151\143\141\164\145\040\120\157\154\151\143\171\040\057
+\040\103\145\162\164\151\146\151\143\141\164\151\157\156\040\120
+\162\141\143\164\151\143\145\040\123\164\141\164\145\155\145\156
+\164\056\060\055\006\010\053\006\001\005\005\007\002\001\026\041
+\150\164\164\160\072\057\057\167\167\167\056\161\165\157\166\141
+\144\151\163\147\154\157\142\141\154\056\143\157\155\057\143\160
+\163\060\013\006\003\125\035\017\004\004\003\002\001\006\060\035
+\006\003\125\035\016\004\026\004\024\362\300\023\340\202\103\076
+\373\356\057\147\062\226\065\134\333\270\313\002\320\060\156\006
+\003\125\035\043\004\147\060\145\200\024\362\300\023\340\202\103
+\076\373\356\057\147\062\226\065\134\333\270\313\002\320\241\111
+\244\107\060\105\061\013\060\011\006\003\125\004\006\023\002\102
+\115\061\031\060\027\006\003\125\004\012\023\020\121\165\157\126
+\141\144\151\163\040\114\151\155\151\164\145\144\061\033\060\031
+\006\003\125\004\003\023\022\121\165\157\126\141\144\151\163\040
+\122\157\157\164\040\103\101\040\063\202\002\005\306\060\015\006
+\011\052\206\110\206\367\015\001\001\005\005\000\003\202\002\001
+\000\117\255\240\054\114\372\300\362\157\367\146\125\253\043\064
+\356\347\051\332\303\133\266\260\203\331\320\320\342\041\373\363
+\140\247\073\135\140\123\047\242\233\366\010\042\052\347\277\240
+\162\345\234\044\152\061\261\220\172\047\333\204\021\211\047\246
+\167\132\070\327\277\254\206\374\356\135\203\274\006\306\321\167
+\153\017\155\044\057\113\172\154\247\007\226\312\343\204\237\255
+\210\213\035\253\026\215\133\146\027\331\026\364\213\200\322\335
+\370\262\166\303\374\070\023\252\014\336\102\151\053\156\363\074
+\353\200\047\333\365\246\104\015\237\132\125\131\013\325\015\122
+\110\305\256\237\362\057\200\305\352\062\120\065\022\227\056\301
+\341\377\361\043\210\121\070\237\362\146\126\166\347\017\121\227
+\245\122\014\115\111\121\225\066\075\277\242\113\014\020\035\206
+\231\114\252\363\162\021\223\344\352\366\233\332\250\135\247\115
+\267\236\002\256\163\000\310\332\043\003\350\371\352\031\164\142
+\000\224\313\042\040\276\224\247\131\265\202\152\276\231\171\172
+\251\362\112\044\122\367\164\375\272\116\346\250\035\002\156\261
+\015\200\104\301\256\323\043\067\137\273\205\174\053\222\056\350
+\176\245\213\335\231\341\277\047\157\055\135\252\173\207\376\012
+\335\113\374\216\365\046\344\156\160\102\156\063\354\061\236\173
+\223\301\344\311\151\032\075\300\153\116\042\155\356\253\130\115
+\306\320\101\301\053\352\117\022\207\136\353\105\330\154\365\230
+\002\323\240\330\125\212\006\231\031\242\240\167\321\060\236\254
+\314\165\356\203\365\260\142\071\317\154\127\342\114\322\221\013
+\016\165\050\033\232\277\375\032\103\361\312\167\373\073\217\141
+\270\151\050\026\102\004\136\160\052\034\041\330\217\341\275\043
+\133\055\164\100\222\331\143\031\015\163\335\151\274\142\107\274
+\340\164\053\262\353\175\276\101\033\265\300\106\305\241\042\313
+\137\116\301\050\222\336\030\272\325\052\050\273\021\213\027\223
+\230\231\140\224\134\043\317\132\047\227\136\013\005\006\223\067
+\036\073\151\066\353\251\236\141\035\217\062\332\216\014\326\164
+\076\173\011\044\332\001\167\107\304\073\315\064\214\231\365\312
+\341\045\141\063\262\131\033\342\156\327\067\127\266\015\251\022
+\332
+END
+
+# Trust for Certificate "QuoVadis Root CA 3"
+CKA_CLASS CK_OBJECT_CLASS CKO_NETSCAPE_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "QuoVadis Root CA 3"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\037\111\024\367\330\164\225\035\335\256\002\300\276\375\072\055
+\202\165\121\205
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\061\205\074\142\224\227\143\271\252\375\211\116\257\157\340\317
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\105\061\013\060\011\006\003\125\004\006\023\002\102\115\061
+\031\060\027\006\003\125\004\012\023\020\121\165\157\126\141\144
+\151\163\040\114\151\155\151\164\145\144\061\033\060\031\006\003
+\125\004\003\023\022\121\165\157\126\141\144\151\163\040\122\157
+\157\164\040\103\101\040\063
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\002\005\306
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
#
# Certificate "Security Communication Root CA"
#
@@ -11192,9 +11627,9 @@ END
CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\001\044
END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
@@ -11828,8 +12263,8 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
\255\151
END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_VALID
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
@@ -11983,9 +12418,9 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\020\104\276\014\213\120\000\044\264\021\323\066\045\045\147
\311\211
END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
@@ -12131,8 +12566,8 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
\012\375
END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_VALID
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
@@ -12276,8 +12711,8 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\020\104\276\014\213\120\000\044\264\021\323\066\055\340\263
\137\033
END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_VALID
-CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
@@ -12759,7 +13194,7 @@ END
CKA_SERIAL_NUMBER MULTILINE_OCTAL
\002\001\173
END
-CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
@@ -13822,7 +14257,199 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
+#
+# Certificate "StartCom Certification Authority"
+#
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "StartCom Certification Authority"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\175\061\013\060\011\006\003\125\004\006\023\002\111\114\061
+\026\060\024\006\003\125\004\012\023\015\123\164\141\162\164\103
+\157\155\040\114\164\144\056\061\053\060\051\006\003\125\004\013
+\023\042\123\145\143\165\162\145\040\104\151\147\151\164\141\154
+\040\103\145\162\164\151\146\151\143\141\164\145\040\123\151\147
+\156\151\156\147\061\051\060\047\006\003\125\004\003\023\040\123
+\164\141\162\164\103\157\155\040\103\145\162\164\151\146\151\143
+\141\164\151\157\156\040\101\165\164\150\157\162\151\164\171
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\175\061\013\060\011\006\003\125\004\006\023\002\111\114\061
+\026\060\024\006\003\125\004\012\023\015\123\164\141\162\164\103
+\157\155\040\114\164\144\056\061\053\060\051\006\003\125\004\013
+\023\042\123\145\143\165\162\145\040\104\151\147\151\164\141\154
+\040\103\145\162\164\151\146\151\143\141\164\145\040\123\151\147
+\156\151\156\147\061\051\060\047\006\003\125\004\003\023\040\123
+\164\141\162\164\103\157\155\040\103\145\162\164\151\146\151\143
+\141\164\151\157\156\040\101\165\164\150\157\162\151\164\171
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\001\001
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\007\311\060\202\005\261\240\003\002\001\002\002\001\001
+\060\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060
+\175\061\013\060\011\006\003\125\004\006\023\002\111\114\061\026
+\060\024\006\003\125\004\012\023\015\123\164\141\162\164\103\157
+\155\040\114\164\144\056\061\053\060\051\006\003\125\004\013\023
+\042\123\145\143\165\162\145\040\104\151\147\151\164\141\154\040
+\103\145\162\164\151\146\151\143\141\164\145\040\123\151\147\156
+\151\156\147\061\051\060\047\006\003\125\004\003\023\040\123\164
+\141\162\164\103\157\155\040\103\145\162\164\151\146\151\143\141
+\164\151\157\156\040\101\165\164\150\157\162\151\164\171\060\036
+\027\015\060\066\060\071\061\067\061\071\064\066\063\066\132\027
+\015\063\066\060\071\061\067\061\071\064\066\063\066\132\060\175
+\061\013\060\011\006\003\125\004\006\023\002\111\114\061\026\060
+\024\006\003\125\004\012\023\015\123\164\141\162\164\103\157\155
+\040\114\164\144\056\061\053\060\051\006\003\125\004\013\023\042
+\123\145\143\165\162\145\040\104\151\147\151\164\141\154\040\103
+\145\162\164\151\146\151\143\141\164\145\040\123\151\147\156\151
+\156\147\061\051\060\047\006\003\125\004\003\023\040\123\164\141
+\162\164\103\157\155\040\103\145\162\164\151\146\151\143\141\164
+\151\157\156\040\101\165\164\150\157\162\151\164\171\060\202\002
+\042\060\015\006\011\052\206\110\206\367\015\001\001\001\005\000
+\003\202\002\017\000\060\202\002\012\002\202\002\001\000\301\210
+\333\011\274\154\106\174\170\237\225\173\265\063\220\362\162\142
+\326\301\066\040\042\044\136\316\351\167\362\103\012\242\006\144
+\244\314\216\066\370\070\346\043\360\156\155\261\074\335\162\243
+\205\034\241\323\075\264\063\053\323\057\257\376\352\260\101\131
+\147\266\304\006\175\012\236\164\205\326\171\114\200\067\172\337
+\071\005\122\131\367\364\033\106\103\244\322\205\205\322\303\161
+\363\165\142\064\272\054\212\177\036\217\356\355\064\320\021\307
+\226\315\122\075\272\063\326\335\115\336\013\073\112\113\237\302
+\046\057\372\265\026\034\162\065\167\312\074\135\346\312\341\046
+\213\032\066\166\134\001\333\164\024\045\376\355\265\240\210\017
+\335\170\312\055\037\007\227\060\001\055\162\171\372\106\326\023
+\052\250\271\246\253\203\111\035\345\362\357\335\344\001\216\030
+\012\217\143\123\026\205\142\251\016\031\072\314\265\146\246\302
+\153\164\007\344\053\341\166\076\264\155\330\366\104\341\163\142
+\037\073\304\276\240\123\126\045\154\121\011\367\252\253\312\277
+\166\375\155\233\363\235\333\277\075\146\274\014\126\252\257\230
+\110\225\072\113\337\247\130\120\331\070\165\251\133\352\103\014
+\002\377\231\353\350\154\115\160\133\051\145\234\335\252\135\314
+\257\001\061\354\014\353\322\215\350\352\234\173\346\156\367\047
+\146\014\032\110\327\156\102\343\077\336\041\076\173\341\015\160
+\373\143\252\250\154\032\124\264\134\045\172\311\242\311\213\026
+\246\273\054\176\027\136\005\115\130\156\022\035\001\356\022\020
+\015\306\062\177\030\377\374\364\372\315\156\221\350\066\111\276
+\032\110\151\213\302\226\115\032\022\262\151\027\301\012\220\326
+\372\171\042\110\277\272\173\151\370\160\307\372\172\067\330\330
+\015\322\166\117\127\377\220\267\343\221\322\335\357\302\140\267
+\147\072\335\376\252\234\360\324\213\177\162\042\316\306\237\227
+\266\370\257\212\240\020\250\331\373\030\306\266\265\134\122\074
+\211\266\031\052\163\001\012\017\003\263\022\140\362\172\057\201
+\333\243\156\377\046\060\227\365\213\335\211\127\266\255\075\263
+\257\053\305\267\166\002\360\245\326\053\232\206\024\052\162\366
+\343\063\214\135\011\113\023\337\273\214\164\023\122\113\002\003
+\001\000\001\243\202\002\122\060\202\002\116\060\014\006\003\125
+\035\023\004\005\060\003\001\001\377\060\013\006\003\125\035\017
+\004\004\003\002\001\256\060\035\006\003\125\035\016\004\026\004
+\024\116\013\357\032\244\100\133\245\027\151\207\060\312\064\150
+\103\320\101\256\362\060\144\006\003\125\035\037\004\135\060\133
+\060\054\240\052\240\050\206\046\150\164\164\160\072\057\057\143
+\145\162\164\056\163\164\141\162\164\143\157\155\056\157\162\147
+\057\163\146\163\143\141\055\143\162\154\056\143\162\154\060\053
+\240\051\240\047\206\045\150\164\164\160\072\057\057\143\162\154
+\056\163\164\141\162\164\143\157\155\056\157\162\147\057\163\146
+\163\143\141\055\143\162\154\056\143\162\154\060\202\001\135\006
+\003\125\035\040\004\202\001\124\060\202\001\120\060\202\001\114
+\006\013\053\006\001\004\001\201\265\067\001\001\001\060\202\001
+\073\060\057\006\010\053\006\001\005\005\007\002\001\026\043\150
+\164\164\160\072\057\057\143\145\162\164\056\163\164\141\162\164
+\143\157\155\056\157\162\147\057\160\157\154\151\143\171\056\160
+\144\146\060\065\006\010\053\006\001\005\005\007\002\001\026\051
+\150\164\164\160\072\057\057\143\145\162\164\056\163\164\141\162
+\164\143\157\155\056\157\162\147\057\151\156\164\145\162\155\145
+\144\151\141\164\145\056\160\144\146\060\201\320\006\010\053\006
+\001\005\005\007\002\002\060\201\303\060\047\026\040\123\164\141
+\162\164\040\103\157\155\155\145\162\143\151\141\154\040\050\123
+\164\141\162\164\103\157\155\051\040\114\164\144\056\060\003\002
+\001\001\032\201\227\114\151\155\151\164\145\144\040\114\151\141
+\142\151\154\151\164\171\054\040\162\145\141\144\040\164\150\145
+\040\163\145\143\164\151\157\156\040\052\114\145\147\141\154\040
+\114\151\155\151\164\141\164\151\157\156\163\052\040\157\146\040
+\164\150\145\040\123\164\141\162\164\103\157\155\040\103\145\162
+\164\151\146\151\143\141\164\151\157\156\040\101\165\164\150\157
+\162\151\164\171\040\120\157\154\151\143\171\040\141\166\141\151
+\154\141\142\154\145\040\141\164\040\150\164\164\160\072\057\057
+\143\145\162\164\056\163\164\141\162\164\143\157\155\056\157\162
+\147\057\160\157\154\151\143\171\056\160\144\146\060\021\006\011
+\140\206\110\001\206\370\102\001\001\004\004\003\002\000\007\060
+\070\006\011\140\206\110\001\206\370\102\001\015\004\053\026\051
+\123\164\141\162\164\103\157\155\040\106\162\145\145\040\123\123
+\114\040\103\145\162\164\151\146\151\143\141\164\151\157\156\040
+\101\165\164\150\157\162\151\164\171\060\015\006\011\052\206\110
+\206\367\015\001\001\005\005\000\003\202\002\001\000\026\154\231
+\364\146\014\064\365\320\205\136\175\012\354\332\020\116\070\034
+\136\337\246\045\005\113\221\062\301\350\073\361\075\335\104\011
+\133\007\111\212\051\313\146\002\267\261\232\367\045\230\011\074
+\216\033\341\335\066\207\053\113\273\150\323\071\146\075\240\046
+\307\362\071\221\035\121\253\202\173\176\325\316\132\344\342\003
+\127\160\151\227\010\371\136\130\246\012\337\214\006\232\105\026
+\026\070\012\136\127\366\142\307\172\002\005\346\274\036\265\362
+\236\364\251\051\203\370\262\024\343\156\050\207\104\303\220\032
+\336\070\251\074\254\103\115\144\105\316\335\050\251\134\362\163
+\173\004\370\027\350\253\261\363\056\134\144\156\163\061\072\022
+\270\274\263\021\344\175\217\201\121\232\073\215\211\364\115\223
+\146\173\074\003\355\323\232\035\232\363\145\120\365\240\320\165
+\237\057\257\360\352\202\103\230\370\151\234\211\171\304\103\216
+\106\162\343\144\066\022\257\367\045\036\070\211\220\167\176\303
+\153\152\271\303\313\104\113\254\170\220\213\347\307\054\036\113
+\021\104\310\064\122\047\315\012\135\237\205\301\211\325\032\170
+\362\225\020\123\062\335\200\204\146\165\331\265\150\050\373\141
+\056\276\204\250\070\300\231\022\206\245\036\147\144\255\006\056
+\057\251\160\205\307\226\017\174\211\145\365\216\103\124\016\253
+\335\245\200\071\224\140\300\064\311\226\160\054\243\022\365\037
+\110\173\275\034\176\153\267\235\220\364\042\073\256\370\374\052
+\312\372\202\122\240\357\257\113\125\223\353\301\265\360\042\213
+\254\064\116\046\042\004\241\207\054\165\112\267\345\175\023\327
+\270\014\144\300\066\322\311\057\206\022\214\043\011\301\033\202
+\073\163\111\243\152\127\207\224\345\326\170\305\231\103\143\343
+\115\340\167\055\341\145\231\162\151\004\032\107\011\346\017\001
+\126\044\373\037\277\016\171\251\130\056\271\304\011\001\176\225
+\272\155\000\006\076\262\352\112\020\071\330\320\053\365\277\354
+\165\277\227\002\305\011\033\010\334\125\067\342\201\373\067\204
+\103\142\040\312\347\126\113\145\352\376\154\301\044\223\044\241
+\064\353\005\377\232\042\256\233\175\077\361\145\121\012\246\060
+\152\263\364\210\034\200\015\374\162\212\350\203\136
+END
+
+# Trust for Certificate "StartCom Certification Authority"
+CKA_CLASS CK_OBJECT_CLASS CKO_NETSCAPE_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "StartCom Certification Authority"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\076\053\367\362\003\033\226\363\214\346\304\330\250\135\076\055
+\130\107\152\017
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\042\115\217\212\374\367\065\302\273\127\064\220\173\213\042\026
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\175\061\013\060\011\006\003\125\004\006\023\002\111\114\061
+\026\060\024\006\003\125\004\012\023\015\123\164\141\162\164\103
+\157\155\040\114\164\144\056\061\053\060\051\006\003\125\004\013
+\023\042\123\145\143\165\162\145\040\104\151\147\151\164\141\154
+\040\103\145\162\164\151\146\151\143\141\164\145\040\123\151\147
+\156\151\156\147\061\051\060\047\006\003\125\004\003\023\040\123
+\164\141\162\164\103\157\155\040\103\145\162\164\151\146\151\143
+\141\164\151\157\156\040\101\165\164\150\157\162\151\164\171
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\001\001
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
@@ -14113,7 +14740,7 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL
END
CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
-CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_VALID
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
#
@@ -14408,3 +15035,497 @@ CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
+#
+# Certificate "DigiCert Assured ID Root CA"
+#
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "DigiCert Assured ID Root CA"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\145\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145
+\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023
+\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157
+\155\061\044\060\042\006\003\125\004\003\023\033\104\151\147\151
+\103\145\162\164\040\101\163\163\165\162\145\144\040\111\104\040
+\122\157\157\164\040\103\101
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\145\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145
+\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023
+\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157
+\155\061\044\060\042\006\003\125\004\003\023\033\104\151\147\151
+\103\145\162\164\040\101\163\163\165\162\145\144\040\111\104\040
+\122\157\157\164\040\103\101
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\014\347\340\345\027\330\106\376\217\345\140\374\033\360
+\060\071
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\003\267\060\202\002\237\240\003\002\001\002\002\020\014
+\347\340\345\027\330\106\376\217\345\140\374\033\360\060\071\060
+\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060\145
+\061\013\060\011\006\003\125\004\006\023\002\125\123\061\025\060
+\023\006\003\125\004\012\023\014\104\151\147\151\103\145\162\164
+\040\111\156\143\061\031\060\027\006\003\125\004\013\023\020\167
+\167\167\056\144\151\147\151\143\145\162\164\056\143\157\155\061
+\044\060\042\006\003\125\004\003\023\033\104\151\147\151\103\145
+\162\164\040\101\163\163\165\162\145\144\040\111\104\040\122\157
+\157\164\040\103\101\060\036\027\015\060\066\061\061\061\060\060
+\060\060\060\060\060\132\027\015\063\061\061\061\061\060\060\060
+\060\060\060\060\132\060\145\061\013\060\011\006\003\125\004\006
+\023\002\125\123\061\025\060\023\006\003\125\004\012\023\014\104
+\151\147\151\103\145\162\164\040\111\156\143\061\031\060\027\006
+\003\125\004\013\023\020\167\167\167\056\144\151\147\151\143\145
+\162\164\056\143\157\155\061\044\060\042\006\003\125\004\003\023
+\033\104\151\147\151\103\145\162\164\040\101\163\163\165\162\145
+\144\040\111\104\040\122\157\157\164\040\103\101\060\202\001\042
+\060\015\006\011\052\206\110\206\367\015\001\001\001\005\000\003
+\202\001\017\000\060\202\001\012\002\202\001\001\000\255\016\025
+\316\344\103\200\134\261\207\363\267\140\371\161\022\245\256\334
+\046\224\210\252\364\316\365\040\071\050\130\140\014\370\200\332
+\251\025\225\062\141\074\265\261\050\204\212\212\334\237\012\014
+\203\027\172\217\220\254\212\347\171\123\134\061\204\052\366\017
+\230\062\066\166\314\336\335\074\250\242\357\152\373\041\362\122
+\141\337\237\040\327\037\342\261\331\376\030\144\322\022\133\137
+\371\130\030\065\274\107\315\241\066\371\153\177\324\260\070\076
+\301\033\303\214\063\331\330\057\030\376\050\017\263\247\203\326
+\303\156\104\300\141\065\226\026\376\131\234\213\166\155\327\361
+\242\113\015\053\377\013\162\332\236\140\320\216\220\065\306\170
+\125\207\040\241\317\345\155\012\310\111\174\061\230\063\154\042
+\351\207\320\062\132\242\272\023\202\021\355\071\027\235\231\072
+\162\241\346\372\244\331\325\027\061\165\256\205\175\042\256\077
+\001\106\206\366\050\171\310\261\332\344\127\027\304\176\034\016
+\260\264\222\246\126\263\275\262\227\355\252\247\360\267\305\250
+\077\225\026\320\377\241\226\353\010\137\030\167\117\002\003\001
+\000\001\243\143\060\141\060\016\006\003\125\035\017\001\001\377
+\004\004\003\002\001\206\060\017\006\003\125\035\023\001\001\377
+\004\005\060\003\001\001\377\060\035\006\003\125\035\016\004\026
+\004\024\105\353\242\257\364\222\313\202\061\055\121\213\247\247
+\041\235\363\155\310\017\060\037\006\003\125\035\043\004\030\060
+\026\200\024\105\353\242\257\364\222\313\202\061\055\121\213\247
+\247\041\235\363\155\310\017\060\015\006\011\052\206\110\206\367
+\015\001\001\005\005\000\003\202\001\001\000\242\016\274\337\342
+\355\360\343\162\163\172\144\224\277\367\162\146\330\062\344\102
+\165\142\256\207\353\362\325\331\336\126\263\237\314\316\024\050
+\271\015\227\140\134\022\114\130\344\323\075\203\111\105\130\227
+\065\151\032\250\107\352\126\306\171\253\022\330\147\201\204\337
+\177\011\074\224\346\270\046\054\040\275\075\263\050\211\367\137
+\377\042\342\227\204\037\351\145\357\207\340\337\301\147\111\263
+\135\353\262\011\052\353\046\355\170\276\175\077\053\363\267\046
+\065\155\137\211\001\266\111\133\237\001\005\233\253\075\045\301
+\314\266\177\302\361\157\206\306\372\144\150\353\201\055\224\353
+\102\267\372\214\036\335\142\361\276\120\147\267\154\275\363\361
+\037\153\014\066\007\026\177\067\174\251\133\155\172\361\022\106
+\140\203\327\047\004\276\113\316\227\276\303\147\052\150\021\337
+\200\347\014\063\146\277\023\015\024\156\363\177\037\143\020\036
+\372\215\033\045\155\154\217\245\267\141\001\261\322\243\046\241
+\020\161\235\255\342\303\371\303\231\121\267\053\007\010\316\056
+\346\120\262\247\372\012\105\057\242\360\362
+END
+
+# Trust for Certificate "DigiCert Assured ID Root CA"
+CKA_CLASS CK_OBJECT_CLASS CKO_NETSCAPE_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "DigiCert Assured ID Root CA"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\005\143\270\143\015\142\327\132\273\310\253\036\113\337\265\250
+\231\262\115\103
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\207\316\013\173\052\016\111\000\341\130\161\233\067\250\223\162
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\145\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145
+\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023
+\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157
+\155\061\044\060\042\006\003\125\004\003\023\033\104\151\147\151
+\103\145\162\164\040\101\163\163\165\162\145\144\040\111\104\040
+\122\157\157\164\040\103\101
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\014\347\340\345\027\330\106\376\217\345\140\374\033\360
+\060\071
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
+#
+# Certificate "DigiCert Global Root CA"
+#
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "DigiCert Global Root CA"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\141\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145
+\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023
+\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157
+\155\061\040\060\036\006\003\125\004\003\023\027\104\151\147\151
+\103\145\162\164\040\107\154\157\142\141\154\040\122\157\157\164
+\040\103\101
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\141\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145
+\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023
+\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157
+\155\061\040\060\036\006\003\125\004\003\023\027\104\151\147\151
+\103\145\162\164\040\107\154\157\142\141\154\040\122\157\157\164
+\040\103\101
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\010\073\340\126\220\102\106\261\241\165\152\311\131\221
+\307\112
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\003\257\060\202\002\227\240\003\002\001\002\002\020\010
+\073\340\126\220\102\106\261\241\165\152\311\131\221\307\112\060
+\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060\141
+\061\013\060\011\006\003\125\004\006\023\002\125\123\061\025\060
+\023\006\003\125\004\012\023\014\104\151\147\151\103\145\162\164
+\040\111\156\143\061\031\060\027\006\003\125\004\013\023\020\167
+\167\167\056\144\151\147\151\143\145\162\164\056\143\157\155\061
+\040\060\036\006\003\125\004\003\023\027\104\151\147\151\103\145
+\162\164\040\107\154\157\142\141\154\040\122\157\157\164\040\103
+\101\060\036\027\015\060\066\061\061\061\060\060\060\060\060\060
+\060\132\027\015\063\061\061\061\061\060\060\060\060\060\060\060
+\132\060\141\061\013\060\011\006\003\125\004\006\023\002\125\123
+\061\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103
+\145\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013
+\023\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143
+\157\155\061\040\060\036\006\003\125\004\003\023\027\104\151\147
+\151\103\145\162\164\040\107\154\157\142\141\154\040\122\157\157
+\164\040\103\101\060\202\001\042\060\015\006\011\052\206\110\206
+\367\015\001\001\001\005\000\003\202\001\017\000\060\202\001\012
+\002\202\001\001\000\342\073\341\021\162\336\250\244\323\243\127
+\252\120\242\217\013\167\220\311\242\245\356\022\316\226\133\001
+\011\040\314\001\223\247\116\060\267\123\367\103\304\151\000\127
+\235\342\215\042\335\207\006\100\000\201\011\316\316\033\203\277
+\337\315\073\161\106\342\326\146\307\005\263\166\047\026\217\173
+\236\036\225\175\356\267\110\243\010\332\326\257\172\014\071\006
+\145\177\112\135\037\274\027\370\253\276\356\050\327\164\177\172
+\170\231\131\205\150\156\134\043\062\113\277\116\300\350\132\155
+\343\160\277\167\020\277\374\001\366\205\331\250\104\020\130\062
+\251\165\030\325\321\242\276\107\342\047\152\364\232\063\370\111
+\010\140\213\324\137\264\072\204\277\241\252\112\114\175\076\317
+\117\137\154\166\136\240\113\067\221\236\334\042\346\155\316\024
+\032\216\152\313\376\315\263\024\144\027\307\133\051\236\062\277
+\362\356\372\323\013\102\324\253\267\101\062\332\014\324\357\370
+\201\325\273\215\130\077\265\033\350\111\050\242\160\332\061\004
+\335\367\262\026\362\114\012\116\007\250\355\112\075\136\265\177
+\243\220\303\257\047\002\003\001\000\001\243\143\060\141\060\016
+\006\003\125\035\017\001\001\377\004\004\003\002\001\206\060\017
+\006\003\125\035\023\001\001\377\004\005\060\003\001\001\377\060
+\035\006\003\125\035\016\004\026\004\024\003\336\120\065\126\321
+\114\273\146\360\243\342\033\033\303\227\262\075\321\125\060\037
+\006\003\125\035\043\004\030\060\026\200\024\003\336\120\065\126
+\321\114\273\146\360\243\342\033\033\303\227\262\075\321\125\060
+\015\006\011\052\206\110\206\367\015\001\001\005\005\000\003\202
+\001\001\000\313\234\067\252\110\023\022\012\372\335\104\234\117
+\122\260\364\337\256\004\365\171\171\010\243\044\030\374\113\053
+\204\300\055\271\325\307\376\364\301\037\130\313\270\155\234\172
+\164\347\230\051\253\021\265\343\160\240\241\315\114\210\231\223
+\214\221\160\342\253\017\034\276\223\251\377\143\325\344\007\140
+\323\243\277\235\133\011\361\325\216\343\123\364\216\143\372\077
+\247\333\264\146\337\142\146\326\321\156\101\215\362\055\265\352
+\167\112\237\235\130\342\053\131\300\100\043\355\055\050\202\105
+\076\171\124\222\046\230\340\200\110\250\067\357\360\326\171\140
+\026\336\254\350\016\315\156\254\104\027\070\057\111\332\341\105
+\076\052\271\066\123\317\072\120\006\367\056\350\304\127\111\154
+\141\041\030\325\004\255\170\074\054\072\200\153\247\353\257\025
+\024\351\330\211\301\271\070\154\342\221\154\212\377\144\271\167
+\045\127\060\300\033\044\243\341\334\351\337\107\174\265\264\044
+\010\005\060\354\055\275\013\277\105\277\120\271\251\363\353\230
+\001\022\255\310\210\306\230\064\137\215\012\074\306\351\325\225
+\225\155\336
+END
+
+# Trust for Certificate "DigiCert Global Root CA"
+CKA_CLASS CK_OBJECT_CLASS CKO_NETSCAPE_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "DigiCert Global Root CA"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\250\230\135\072\145\345\345\304\262\327\326\155\100\306\335\057
+\261\234\124\066
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\171\344\251\204\015\175\072\226\327\300\117\342\103\114\211\056
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\141\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145
+\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023
+\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157
+\155\061\040\060\036\006\003\125\004\003\023\027\104\151\147\151
+\103\145\162\164\040\107\154\157\142\141\154\040\122\157\157\164
+\040\103\101
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\010\073\340\126\220\102\106\261\241\165\152\311\131\221
+\307\112
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
+#
+# Certificate "DigiCert High Assurance EV Root CA"
+#
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "DigiCert High Assurance EV Root CA"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\154\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145
+\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023
+\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157
+\155\061\053\060\051\006\003\125\004\003\023\042\104\151\147\151
+\103\145\162\164\040\110\151\147\150\040\101\163\163\165\162\141
+\156\143\145\040\105\126\040\122\157\157\164\040\103\101
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\154\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145
+\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023
+\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157
+\155\061\053\060\051\006\003\125\004\003\023\042\104\151\147\151
+\103\145\162\164\040\110\151\147\150\040\101\163\163\165\162\141
+\156\143\145\040\105\126\040\122\157\157\164\040\103\101
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\002\254\134\046\152\013\100\233\217\013\171\362\256\106
+\045\167
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\003\305\060\202\002\255\240\003\002\001\002\002\020\002
+\254\134\046\152\013\100\233\217\013\171\362\256\106\045\167\060
+\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060\154
+\061\013\060\011\006\003\125\004\006\023\002\125\123\061\025\060
+\023\006\003\125\004\012\023\014\104\151\147\151\103\145\162\164
+\040\111\156\143\061\031\060\027\006\003\125\004\013\023\020\167
+\167\167\056\144\151\147\151\143\145\162\164\056\143\157\155\061
+\053\060\051\006\003\125\004\003\023\042\104\151\147\151\103\145
+\162\164\040\110\151\147\150\040\101\163\163\165\162\141\156\143
+\145\040\105\126\040\122\157\157\164\040\103\101\060\036\027\015
+\060\066\061\061\061\060\060\060\060\060\060\060\132\027\015\063
+\061\061\061\061\060\060\060\060\060\060\060\132\060\154\061\013
+\060\011\006\003\125\004\006\023\002\125\123\061\025\060\023\006
+\003\125\004\012\023\014\104\151\147\151\103\145\162\164\040\111
+\156\143\061\031\060\027\006\003\125\004\013\023\020\167\167\167
+\056\144\151\147\151\143\145\162\164\056\143\157\155\061\053\060
+\051\006\003\125\004\003\023\042\104\151\147\151\103\145\162\164
+\040\110\151\147\150\040\101\163\163\165\162\141\156\143\145\040
+\105\126\040\122\157\157\164\040\103\101\060\202\001\042\060\015
+\006\011\052\206\110\206\367\015\001\001\001\005\000\003\202\001
+\017\000\060\202\001\012\002\202\001\001\000\306\314\345\163\346
+\373\324\273\345\055\055\062\246\337\345\201\077\311\315\045\111
+\266\161\052\303\325\224\064\147\242\012\034\260\137\151\246\100
+\261\304\267\262\217\320\230\244\251\101\131\072\323\334\224\326
+\074\333\164\070\244\112\314\115\045\202\367\112\245\123\022\070
+\356\363\111\155\161\221\176\143\266\253\246\137\303\244\204\370
+\117\142\121\276\370\305\354\333\070\222\343\006\345\010\221\014
+\304\050\101\125\373\313\132\211\025\176\161\350\065\277\115\162
+\011\075\276\072\070\120\133\167\061\033\215\263\307\044\105\232
+\247\254\155\000\024\132\004\267\272\023\353\121\012\230\101\101
+\042\116\145\141\207\201\101\120\246\171\134\211\336\031\112\127
+\325\056\346\135\034\123\054\176\230\315\032\006\026\244\150\163
+\320\064\004\023\134\241\161\323\132\174\125\333\136\144\341\067
+\207\060\126\004\345\021\264\051\200\022\361\171\071\210\242\002
+\021\174\047\146\267\210\267\170\362\312\012\250\070\253\012\144
+\302\277\146\135\225\204\301\241\045\036\207\135\032\120\013\040
+\022\314\101\273\156\013\121\070\270\113\313\002\003\001\000\001
+\243\143\060\141\060\016\006\003\125\035\017\001\001\377\004\004
+\003\002\001\206\060\017\006\003\125\035\023\001\001\377\004\005
+\060\003\001\001\377\060\035\006\003\125\035\016\004\026\004\024
+\261\076\303\151\003\370\277\107\001\324\230\046\032\010\002\357
+\143\144\053\303\060\037\006\003\125\035\043\004\030\060\026\200
+\024\261\076\303\151\003\370\277\107\001\324\230\046\032\010\002
+\357\143\144\053\303\060\015\006\011\052\206\110\206\367\015\001
+\001\005\005\000\003\202\001\001\000\034\032\006\227\334\327\234
+\237\074\210\146\006\010\127\041\333\041\107\370\052\147\252\277
+\030\062\166\100\020\127\301\212\363\172\331\021\145\216\065\372
+\236\374\105\265\236\331\114\061\113\270\221\350\103\054\216\263
+\170\316\333\343\123\171\161\326\345\041\224\001\332\125\207\232
+\044\144\366\212\146\314\336\234\067\315\250\064\261\151\233\043
+\310\236\170\042\053\160\103\343\125\107\061\141\031\357\130\305
+\205\057\116\060\366\240\061\026\043\310\347\342\145\026\063\313
+\277\032\033\240\075\370\312\136\213\061\213\140\010\211\055\014
+\006\134\122\267\304\371\012\230\321\025\137\237\022\276\174\066
+\143\070\275\104\244\177\344\046\053\012\304\227\151\015\351\214
+\342\300\020\127\270\310\166\022\221\125\362\110\151\330\274\052
+\002\133\017\104\324\040\061\333\364\272\160\046\135\220\140\236
+\274\113\027\011\057\264\313\036\103\150\311\007\047\301\322\134
+\367\352\041\271\150\022\234\074\234\277\236\374\200\134\233\143
+\315\354\107\252\045\047\147\240\067\363\000\202\175\124\327\251
+\370\351\056\023\243\167\350\037\112
+END
+
+# Trust for Certificate "DigiCert High Assurance EV Root CA"
+CKA_CLASS CK_OBJECT_CLASS CKO_NETSCAPE_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "DigiCert High Assurance EV Root CA"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\137\267\356\006\063\342\131\333\255\014\114\232\346\323\217\032
+\141\307\334\045
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\324\164\336\127\134\071\262\323\234\205\203\305\300\145\111\212
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\154\061\013\060\011\006\003\125\004\006\023\002\125\123\061
+\025\060\023\006\003\125\004\012\023\014\104\151\147\151\103\145
+\162\164\040\111\156\143\061\031\060\027\006\003\125\004\013\023
+\020\167\167\167\056\144\151\147\151\143\145\162\164\056\143\157
+\155\061\053\060\051\006\003\125\004\003\023\042\104\151\147\151
+\103\145\162\164\040\110\151\147\150\040\101\163\163\165\162\141
+\156\143\145\040\105\126\040\122\157\157\164\040\103\101
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\020\002\254\134\046\152\013\100\233\217\013\171\362\256\106
+\045\167
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
+
+#
+# Certificate "Certplus Class 2 Primary CA"
+#
+CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "Certplus Class 2 Primary CA"
+CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509
+CKA_SUBJECT MULTILINE_OCTAL
+\060\075\061\013\060\011\006\003\125\004\006\023\002\106\122\061
+\021\060\017\006\003\125\004\012\023\010\103\145\162\164\160\154
+\165\163\061\033\060\031\006\003\125\004\003\023\022\103\154\141
+\163\163\040\062\040\120\162\151\155\141\162\171\040\103\101
+END
+CKA_ID UTF8 "0"
+CKA_ISSUER MULTILINE_OCTAL
+\060\075\061\013\060\011\006\003\125\004\006\023\002\106\122\061
+\021\060\017\006\003\125\004\012\023\010\103\145\162\164\160\154
+\165\163\061\033\060\031\006\003\125\004\003\023\022\103\154\141
+\163\163\040\062\040\120\162\151\155\141\162\171\040\103\101
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\021\000\205\275\113\363\330\332\343\151\366\224\327\137\303
+\245\104\043
+END
+CKA_VALUE MULTILINE_OCTAL
+\060\202\003\222\060\202\002\172\240\003\002\001\002\002\021\000
+\205\275\113\363\330\332\343\151\366\224\327\137\303\245\104\043
+\060\015\006\011\052\206\110\206\367\015\001\001\005\005\000\060
+\075\061\013\060\011\006\003\125\004\006\023\002\106\122\061\021
+\060\017\006\003\125\004\012\023\010\103\145\162\164\160\154\165
+\163\061\033\060\031\006\003\125\004\003\023\022\103\154\141\163
+\163\040\062\040\120\162\151\155\141\162\171\040\103\101\060\036
+\027\015\071\071\060\067\060\067\061\067\060\065\060\060\132\027
+\015\061\071\060\067\060\066\062\063\065\071\065\071\132\060\075
+\061\013\060\011\006\003\125\004\006\023\002\106\122\061\021\060
+\017\006\003\125\004\012\023\010\103\145\162\164\160\154\165\163
+\061\033\060\031\006\003\125\004\003\023\022\103\154\141\163\163
+\040\062\040\120\162\151\155\141\162\171\040\103\101\060\202\001
+\042\060\015\006\011\052\206\110\206\367\015\001\001\001\005\000
+\003\202\001\017\000\060\202\001\012\002\202\001\001\000\334\120
+\226\320\022\370\065\322\010\170\172\266\122\160\375\157\356\317
+\271\021\313\135\167\341\354\351\176\004\215\326\314\157\163\103
+\127\140\254\063\012\104\354\003\137\034\200\044\221\345\250\221
+\126\022\202\367\340\053\364\333\256\141\056\211\020\215\153\154
+\272\263\002\275\325\066\305\110\067\043\342\360\132\067\122\063
+\027\022\342\321\140\115\276\057\101\021\343\366\027\045\014\213
+\221\300\033\231\173\231\126\015\257\356\322\274\107\127\343\171
+\111\173\064\211\047\044\204\336\261\354\351\130\116\376\116\337
+\132\276\101\255\254\010\305\030\016\357\322\123\356\154\320\235
+\022\001\023\215\334\200\142\367\225\251\104\210\112\161\116\140
+\125\236\333\043\031\171\126\007\014\077\143\013\134\260\342\276
+\176\025\374\224\063\130\101\070\164\304\341\217\213\337\046\254
+\037\265\213\073\267\103\131\153\260\044\246\155\220\213\304\162
+\352\135\063\230\267\313\336\136\173\357\224\361\033\076\312\311
+\041\301\305\230\002\252\242\366\133\167\233\365\176\226\125\064
+\034\147\151\300\361\102\343\107\254\374\050\034\146\125\002\003
+\001\000\001\243\201\214\060\201\211\060\017\006\003\125\035\023
+\004\010\060\006\001\001\377\002\001\012\060\013\006\003\125\035
+\017\004\004\003\002\001\006\060\035\006\003\125\035\016\004\026
+\004\024\343\163\055\337\313\016\050\014\336\335\263\244\312\171
+\270\216\273\350\060\211\060\021\006\011\140\206\110\001\206\370
+\102\001\001\004\004\003\002\001\006\060\067\006\003\125\035\037
+\004\060\060\056\060\054\240\052\240\050\206\046\150\164\164\160
+\072\057\057\167\167\167\056\143\145\162\164\160\154\165\163\056
+\143\157\155\057\103\122\114\057\143\154\141\163\163\062\056\143
+\162\154\060\015\006\011\052\206\110\206\367\015\001\001\005\005
+\000\003\202\001\001\000\247\124\317\210\104\031\313\337\324\177
+\000\337\126\063\142\265\367\121\001\220\353\303\077\321\210\104
+\351\044\135\357\347\024\275\040\267\232\074\000\376\155\237\333
+\220\334\327\364\142\326\213\160\135\347\345\004\110\251\150\174
+\311\361\102\363\154\177\305\172\174\035\121\210\272\322\012\076
+\047\135\336\055\121\116\323\023\144\151\344\056\343\323\347\233
+\011\231\246\340\225\233\316\032\327\177\276\074\316\122\263\021
+\025\301\017\027\315\003\273\234\045\025\272\242\166\211\374\006
+\361\030\320\223\113\016\174\202\267\245\364\366\137\376\355\100
+\246\235\204\164\071\271\334\036\205\026\332\051\033\206\043\000
+\311\273\211\176\156\200\210\036\057\024\264\003\044\250\062\157
+\003\232\107\054\060\276\126\306\247\102\002\160\033\352\100\330
+\272\005\003\160\007\244\226\377\375\110\063\012\341\334\245\201
+\220\233\115\335\175\347\347\262\315\134\310\152\225\370\245\366
+\215\304\135\170\010\276\173\006\326\111\317\031\066\120\043\056
+\010\346\236\005\115\107\030\325\026\351\261\326\266\020\325\273
+\227\277\242\216\264\124
+END
+
+# Trust for Certificate "Certplus Class 2 Primary CA"
+CKA_CLASS CK_OBJECT_CLASS CKO_NETSCAPE_TRUST
+CKA_TOKEN CK_BBOOL CK_TRUE
+CKA_PRIVATE CK_BBOOL CK_FALSE
+CKA_MODIFIABLE CK_BBOOL CK_FALSE
+CKA_LABEL UTF8 "Certplus Class 2 Primary CA"
+CKA_CERT_SHA1_HASH MULTILINE_OCTAL
+\164\040\164\101\162\234\335\222\354\171\061\330\043\020\215\302
+\201\222\342\273
+END
+CKA_CERT_MD5_HASH MULTILINE_OCTAL
+\210\054\214\122\270\242\074\363\367\273\003\352\256\254\102\013
+END
+CKA_ISSUER MULTILINE_OCTAL
+\060\075\061\013\060\011\006\003\125\004\006\023\002\106\122\061
+\021\060\017\006\003\125\004\012\023\010\103\145\162\164\160\154
+\165\163\061\033\060\031\006\003\125\004\003\023\022\103\154\141
+\163\163\040\062\040\120\162\151\155\141\162\171\040\103\101
+END
+CKA_SERIAL_NUMBER MULTILINE_OCTAL
+\002\021\000\205\275\113\363\330\332\343\151\366\224\327\137\303
+\245\104\043
+END
+CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NETSCAPE_TRUSTED_DELEGATOR
+CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NETSCAPE_TRUST_UNKNOWN
+CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE
diff --git a/mozilla/security/nss/lib/ckfw/builtins/nssckbi.h b/mozilla/security/nss/lib/ckfw/builtins/nssckbi.h
index 9397c2710b3..22a9eaa9f56 100644
--- a/mozilla/security/nss/lib/ckfw/builtins/nssckbi.h
+++ b/mozilla/security/nss/lib/ckfw/builtins/nssckbi.h
@@ -75,8 +75,8 @@
* of the comment in the CK_VERSION type definition.
*/
#define NSS_BUILTINS_LIBRARY_VERSION_MAJOR 1
-#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 62
-#define NSS_BUILTINS_LIBRARY_VERSION "1.62"
+#define NSS_BUILTINS_LIBRARY_VERSION_MINOR 64
+#define NSS_BUILTINS_LIBRARY_VERSION "1.64"
/* These version numbers detail the semantic changes to the ckfw engine. */
#define NSS_BUILTINS_HARDWARE_VERSION_MAJOR 1
diff --git a/mozilla/toolkit/components/commandlines/public/Makefile.in b/mozilla/toolkit/components/commandlines/public/Makefile.in
index 64890e045bc..03420076ba7 100644
--- a/mozilla/toolkit/components/commandlines/public/Makefile.in
+++ b/mozilla/toolkit/components/commandlines/public/Makefile.in
@@ -49,6 +49,7 @@ XPIDLSRCS = \
nsICommandLine.idl \
nsICommandLineRunner.idl \
nsICommandLineHandler.idl \
+ nsICommandLineValidator.idl \
$(NULL)
include $(topsrcdir)/config/rules.mk
diff --git a/mozilla/toolkit/components/commandlines/public/nsICommandLineValidator.idl b/mozilla/toolkit/components/commandlines/public/nsICommandLineValidator.idl
new file mode 100644
index 00000000000..327070d1146
--- /dev/null
+++ b/mozilla/toolkit/components/commandlines/public/nsICommandLineValidator.idl
@@ -0,0 +1,70 @@
+/* ***** 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 the Mozilla toolkit.
+ *
+ * The Initial Developer of the Original Code is
+ * Robert Strong
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the 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 ***** */
+
+#include "nsISupports.idl"
+
+interface nsICommandLine;
+
+/**
+ * Validates arguments on the command line of an XUL application.
+ *
+ * Each validator is registered in the category "command-line-validator".
+ * The entries in this category are read in alphabetical order, and each
+ * category value is treated as a service contractid implementing this
+ * interface.
+ *
+ * By convention, validator with ordinary priority should begin with "m".
+ *
+ * Example:
+ * Category Entry Value
+ * command-line-validator b-browser @mozilla.org/browser/clh;1
+ * command-line-validator m-edit @mozilla.org/composer/clh;1
+ * command-line-validator m-irc @mozilla.org/chatzilla/clh;1
+ *
+ */
+
+[scriptable, uuid(5ecaa593-7660-4a3a-957a-92d5770671c7)]
+interface nsICommandLineValidator : nsISupports
+{
+ /**
+ * Process the command-line validators in the proper order, calling
+ * "validate()" on each.
+ *
+ * @throws NS_ERROR_ABORT if any validator throws NS_ERROR_ABORT. All other
+ * errors thrown by validators will be silently ignored.
+ */
+ void validate(in nsICommandLine aCommandLine);
+};
diff --git a/mozilla/toolkit/components/commandlines/src/nsCommandLine.cpp b/mozilla/toolkit/components/commandlines/src/nsCommandLine.cpp
index b8e2ebdd354..a28b44ffaf1 100644
--- a/mozilla/toolkit/components/commandlines/src/nsCommandLine.cpp
+++ b/mozilla/toolkit/components/commandlines/src/nsCommandLine.cpp
@@ -39,6 +39,7 @@
#include "nsICategoryManager.h"
#include "nsICommandLineHandler.h"
+#include "nsICommandLineValidator.h"
#include "nsIDOMWindow.h"
#include "nsIFile.h"
#include "nsISimpleEnumerator.h"
@@ -85,12 +86,16 @@ public:
protected:
~nsCommandLine() { }
- typedef nsresult (*EnumerateCallback)(nsICommandLineHandler* aHandler,
+ typedef nsresult (*EnumerateHandlersCallback)(nsICommandLineHandler* aHandler,
+ nsICommandLine* aThis,
+ void *aClosure);
+ typedef nsresult (*EnumerateValidatorsCallback)(nsICommandLineValidator* aValidator,
nsICommandLine* aThis,
void *aClosure);
void appendArg(const char* arg);
- nsresult EnumerateHandlers(EnumerateCallback aCallback, void *aClosure);
+ nsresult EnumerateHandlers(EnumerateHandlersCallback aCallback, void *aClosure);
+ nsresult EnumerateValidators(EnumerateValidatorsCallback aCallback, void *aClosure);
nsStringArray mArgs;
PRUint32 mState;
@@ -536,7 +541,7 @@ nsCommandLine::Init(PRInt32 argc, char** argv, nsIFile* aWorkingDir,
}
nsresult
-nsCommandLine::EnumerateHandlers(EnumerateCallback aCallback, void *aClosure)
+nsCommandLine::EnumerateHandlers(EnumerateHandlersCallback aCallback, void *aClosure)
{
nsresult rv;
@@ -578,6 +583,55 @@ nsCommandLine::EnumerateHandlers(EnumerateCallback aCallback, void *aClosure)
return rv;
}
+nsresult
+nsCommandLine::EnumerateValidators(EnumerateValidatorsCallback aCallback, void *aClosure)
+{
+ nsresult rv;
+
+ nsCOMPtr catman
+ (do_GetService(NS_CATEGORYMANAGER_CONTRACTID));
+ NS_ENSURE_TRUE(catman, NS_ERROR_UNEXPECTED);
+
+ nsCOMPtr entenum;
+ rv = catman->EnumerateCategory("command-line-validator",
+ getter_AddRefs(entenum));
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ nsCOMPtr strenum (do_QueryInterface(entenum));
+ NS_ENSURE_TRUE(strenum, NS_ERROR_UNEXPECTED);
+
+ nsCAutoString entry;
+ PRBool hasMore;
+ while (NS_SUCCEEDED(strenum->HasMore(&hasMore)) && hasMore) {
+ strenum->GetNext(entry);
+
+ nsXPIDLCString contractID;
+ rv = catman->GetCategoryEntry("command-line-validator",
+ entry.get(),
+ getter_Copies(contractID));
+ if (!contractID)
+ continue;
+
+ nsCOMPtr clv(do_GetService(contractID.get()));
+ if (!clv)
+ continue;
+
+ rv = (aCallback)(clv, this, aClosure);
+ if (rv == NS_ERROR_ABORT)
+ break;
+
+ rv = NS_OK;
+ }
+
+ return rv;
+}
+
+static nsresult
+EnumValidate(nsICommandLineValidator* aValidator, nsICommandLine* aThis, void*)
+{
+ return aValidator->Validate(aThis);
+}
+
static nsresult
EnumRun(nsICommandLineHandler* aHandler, nsICommandLine* aThis, void*)
{
@@ -589,6 +643,10 @@ nsCommandLine::Run()
{
nsresult rv;
+ rv = EnumerateValidators(EnumValidate, nsnull);
+ if (rv == NS_ERROR_ABORT)
+ return rv;
+
rv = EnumerateHandlers(EnumRun, nsnull);
if (rv == NS_ERROR_ABORT)
return rv;
diff --git a/mozilla/toolkit/components/nsDefaultCLH.js b/mozilla/toolkit/components/nsDefaultCLH.js
index 5eb91048ece..19f150a709e 100644
--- a/mozilla/toolkit/components/nsDefaultCLH.js
+++ b/mozilla/toolkit/components/nsDefaultCLH.js
@@ -83,7 +83,6 @@ var nsDefaultCLH = {
/* nsICommandLineHandler */
handle : function clh_handle(cmdLine) {
- dump('Handling command line!\n');
var printDir;
while (printDir = cmdLine.handleFlagWithParam("print-xpcom-dir", false)) {
diff --git a/mozilla/toolkit/components/passwordmgr/base/nsPasswordManager.cpp b/mozilla/toolkit/components/passwordmgr/base/nsPasswordManager.cpp
index 4559ed14286..a9a6d058cf4 100644
--- a/mozilla/toolkit/components/passwordmgr/base/nsPasswordManager.cpp
+++ b/mozilla/toolkit/components/passwordmgr/base/nsPasswordManager.cpp
@@ -795,7 +795,7 @@ nsPasswordManager::Observe(nsISupports* aSubject,
obsService->AddObserver(this, "profile-after-change", PR_TRUE);
} else if (!strcmp(aTopic, "profile-after-change"))
- nsCOMPtr pm = do_GetService(NS_PASSWORDMANAGER_CONTRACTID);
+ LoadPasswords();
return NS_OK;
}
diff --git a/mozilla/toolkit/content/license.html b/mozilla/toolkit/content/license.html
index e8b63aab695..acc77529a9d 100644
--- a/mozilla/toolkit/content/license.html
+++ b/mozilla/toolkit/content/license.html
@@ -701,11 +701,12 @@ under either the MPL or the [___] License."
-
Aaron Leventhal,
+Aaron Schulman,
ActiveState Tool Corp,
Akkana Peck,
Alex Fritze,
@@ -714,6 +715,7 @@ Alexander Surkov,
Andreas Otte,
Andreas Premstaller,
Andrew Thompson,
+ArentJan Banck,
Asaf Romano,
Axel Hecht,
Ben Bucksch,
@@ -727,9 +729,12 @@ Brendan Eich,
Brian Bober,
Brian Ryner,
Brian Stell,
+Bruce Davidson,
Bruno Haible,
+Calum Robinson,
Cedric Chantepie,
Chiaki Koufugata,
+Chris McAfee,
Christian Biesinger,
Christopher A. Aillon,
Christopher Blizzard,
@@ -740,6 +745,7 @@ Conrad Carlen,
Crocodile Clips Ltd,
Cyrus Patel,
Dainis Jonitis,
+Dan Mosedale,
Daniel Brooks,
Daniel Glazman,
Daniel Kouril,
@@ -756,18 +762,20 @@ Digital Creations 2 Inc,
Doron Rosenberg,
Doug Turner,
Elika J. Etemad,
+Eric Belhaire,
Eric Hodel,
Esben Mose Hansen,
Frank Schönheit,
Fredrik Holmqvist,
Gavin Sharp,
+Geoff Beier,
Gervase Markham,
Giorgio Maone,
-Google,
Google Inc,
+Håkan Waara,
+Henri Torgemane,
Heriot-Watt University,
Hewlett-Packard Company,
-Håkan Waara,
i-DNS.net International,
Ian Hickson,
Ian Oeschger,
@@ -780,8 +788,10 @@ James Ross,
Jamie Zawinski,
Jan Varga,
Jason Barnabe,
+Jean-Francois Ducarroz,
Jeff Tsai,
Jeff Walden,
+Jefferson Software Inc,
Joe Hewitt,
Joey Minta,
John B. Keiser,
@@ -790,27 +800,36 @@ John Fairhurst,
John Wolfe,
Jonas Sicking,
Jonathan Watt,
+Josh Aas,
Josh Soref,
Juan Lang,
Jungshik Shin,
+Jussi Kukkonen,
Karsten Düsterloh,
Keith Visco,
Ken Herron,
+Kevin Gerich,
Kipp E.B. Hickman,
L. David Baron,
Lixto GmbH,
Makoto Kato,
+Marc Bevand,
Marco Manfredini,
Marco Pesenti Gritti,
Mark Hammond,
Mark Mentovai,
Markus G. Kuhn,
+Matt Judy,
+Matthew Willis,
+Merle Sterling,
Michael J. Fromberger,
Michal Ceresna,
Michiel van Leeuwen,
Mike Connor,
Mike Pinkerton,
+Mike Potter,
Mike Shaver,
+MITRE Corporation,
Mozdev Group,
Mozilla Corporation,
Mozilla Foundation,
@@ -818,20 +837,24 @@ Naoki Hotta,
Neil Deakin,
Neil Rashbrook,
Nelson B. Bolyard,
-Netscape Commmunications Corp,
Netscape Communications Corporation,
New Dimensions Consulting,
Novell Inc,
+OEone Corporation,
Olli Pettay,
Oracle Corporation,
Owen Taylor,
Paul Ashford,
-Paul Kocher of Cryptography Research,
+Paul Kocher,
Paul Sandoz,
Peter Annema,
Peter Hartshorn,
Peter Van der Beken,
+Phil Ringnalda,
+Philipp Kewisch,
Pierre Chanial,
+Prachi Gauriar,
+Qualcomm Inc,
R.J. Keller,
Rajiv Dayal,
Ramalingam Saravanan,
@@ -858,25 +881,29 @@ Sergei Dolgov,
Seth Spitzer,
Shy Shalom,
Silverstone Interactive,
-Simon Bünzli,
+Simdesk Technologies Inc,
+Simon Bënzli,
Simon Fraser,
Simon Montagu,
+Simon Paquet,
Simon Wilkinson,
+Sqlite Project,
Srilatha Moturi,
+Stefan Sitter,
+Stephen Horlander,
Steve Swanson,
+Stuart Morgan,
Stuart Parmenter,
Sun Microsystems Inc,
-The MITRE Corporation,
-The Mozilla Corporation,
-The sqlite Project,
-The University of Queensland,
Tim Copperfield,
Tom Germeau,
Tomas Müller,
+University of Queensland,
Vincent Béron,
Vladimir Vukicevic,
+Wolfgang Rosenauer,
YAMASHITA Makoto,
-Zack Rusin and
+Zack Rusin,
Zero-Knowledge Systems.
diff --git a/mozilla/toolkit/library/Makefile.in b/mozilla/toolkit/library/Makefile.in
index 443b46a7835..3147a88caf6 100644
--- a/mozilla/toolkit/library/Makefile.in
+++ b/mozilla/toolkit/library/Makefile.in
@@ -366,7 +366,7 @@ EXTRA_DSO_LDOPTS += -lbe
endif
ifeq ($(OS_ARCH),WINNT)
-EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool Comdlg32)
+EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,shell32 ole32 uuid version winspool comdlg32)
ifneq (,$(MOZ_DEBUG)$(NS_TRACE_MALLOC))
EXTRA_DSO_LDOPTS += $(call EXPAND_LIBNAME,imagehlp)
endif
diff --git a/mozilla/toolkit/mozapps/installer/windows/nsis/common.nsh b/mozilla/toolkit/mozapps/installer/windows/nsis/common.nsh
index aa46c04feab..187cadb691b 100755
--- a/mozilla/toolkit/mozapps/installer/windows/nsis/common.nsh
+++ b/mozilla/toolkit/mozapps/installer/windows/nsis/common.nsh
@@ -1613,6 +1613,117 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
!endif
!macroend
+/**
+ * Finds an existing installation path of the application based on the
+ * application name so we can default to using this path for the install. If
+ * there is zero or more than one installation for the application then we
+ * default to the normal default path. This uses SHCTX to determine the
+ * registry hive so you must call SetShellVarContext first.
+ *
+ * IMPORTANT! $R9 will be overwritten by this macro with the return value so
+ * protect yourself!
+ *
+ * @param _KEY
+ * The registry subkey (typically this will be Software\Mozilla\App Name).
+ * @return _RESULT
+ * false if a single install location for this app name isn't found,
+ * path to the install directory if a single install location is found.
+ *
+ * $R5 = _KEY
+ * $R6 = value returned from EnumRegKey
+ * $R7 = value returned from ReadRegStr
+ * $R8 = counter for the loop's EnumRegKey
+ * $R9 = _RESULT
+ */
+!macro GetSingleInstallPath
+
+ !ifndef ${_MOZFUNC_UN}GetSingleInstallPath
+ !verbose push
+ !verbose ${_MOZFUNC_VERBOSE}
+ !define ${_MOZFUNC_UN}GetSingleInstallPath "!insertmacro ${_MOZFUNC_UN}GetSingleInstallPathCall"
+
+ Function ${_MOZFUNC_UN}GetSingleInstallPath
+ Exch $R5
+ Push $R6
+ Push $R7
+ Push $R8
+
+ StrCpy $R9 "false"
+ StrCpy $R8 0 ; set the counter for the loop to 0
+
+ loop:
+ ClearErrors
+ EnumRegKey $R6 SHCTX $R5 $R8
+ IfErrors cleanup
+ StrCmp $R6 "" cleanup ; if empty there are no more keys to enumerate
+ IntOp $R8 $R8 + 1 ; increment the loop's counter
+ ClearErrors
+ ReadRegStr $R7 SHCTX "$R5\$R6\Main" "PathToExe"
+ IfErrors loop
+ GetFullPathName $R7 "$R7"
+ IfErrors loop
+
+
+ StrCmp "$R9" "false" 0 +3
+ StrCpy $R9 "$R7"
+ GoTo Loop
+
+ StrCpy $R9 "false"
+
+ cleanup:
+ StrCmp $R9 "false" end
+ ${${_MOZFUNC_UN}GetParent} "$R9" $R9
+ StrCpy $R8 $R9 "" -1 ; Copy the last char.
+ StrCmp $R8 '\' end ; Is it a \?
+ StrCpy $R9 "$R9\" ; Append \ to the string
+
+ end:
+ ClearErrors
+
+ Pop $R8
+ Pop $R7
+ Pop $R6
+ Exch $R5
+ Push $R9
+ FunctionEnd
+
+ !verbose pop
+ !endif
+!macroend
+
+!macro GetSingleInstallPathCall _KEY _RESULT
+ !verbose push
+ !verbose ${_MOZFUNC_VERBOSE}
+ Push "${_KEY}"
+ Call GetSingleInstallPath
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetSingleInstallPathCall _KEY _RESULT
+ !verbose push
+ !verbose ${_MOZFUNC_VERBOSE}
+ Push "${_KEY}"
+ Call un.GetSingleInstallPath
+ Pop ${_RESULT}
+ !verbose pop
+!macroend
+
+!macro un.GetSingleInstallPath
+ !ifndef un.GetSingleInstallPath
+ !verbose push
+ !verbose ${_MOZFUNC_VERBOSE}
+ !undef _MOZFUNC_UN
+ !define _MOZFUNC_UN "un."
+
+ !insertmacro GetSingleInstallPath
+
+ !undef _MOZFUNC_UN
+ !define _MOZFUNC_UN
+ !verbose pop
+ !endif
+!macroend
+
/**
* Writes common registry values for a handler using SHCTX.
* @param _KEY
@@ -1880,58 +1991,3 @@ Exch $R9 ; exchange the new $R9 value with the top of the stack
!endif
!macroend
-/**
- * Displays a error message when a file can't be copied.
- *
- * $0 = file name inserted into the error message
- */
-!macro DisplayCopyErrMsg
-
- !ifndef ${_MOZFUNC_UN}DisplayCopyErrMsg
- !verbose push
- !verbose ${_MOZFUNC_VERBOSE}
- !define ${_MOZFUNC_UN}DisplayCopyErrMsg "!insertmacro ${_MOZFUNC_UN}DisplayCopyErrMsgCall"
-
- Function ${_MOZFUNC_UN}DisplayCopyErrMsg
- Exch $0
-
- MessageBox MB_RETRYCANCEL|MB_ICONQUESTION "$(^FileError_NoIgnore)" IDRETRY +2
- Quit
-
- Exch $0
- FunctionEnd
-
- !verbose pop
- !endif
-!macroend
-
-!macro DisplayCopyErrMsgCall _FILE
- !verbose push
- !verbose ${_MOZFUNC_VERBOSE}
- Push "${_FILE}"
- Call DisplayCopyErrMsg
- !verbose pop
-!macroend
-
-!macro un.DisplayCopyErrMsgCall _FILE
- !verbose push
- !verbose ${_MOZFUNC_VERBOSE}
- Push "${_FILE}"
- Call un.DisplayCopyErrMsg
- !verbose pop
-!macroend
-
-!macro un.DisplayCopyErrMsg
- !ifndef un.DisplayCopyErrMsg
- !verbose push
- !verbose ${_MOZFUNC_VERBOSE}
- !undef _MOZFUNC_UN
- !define _MOZFUNC_UN "un."
-
- !insertmacro DisplayCopyErrMsg
-
- !undef _MOZFUNC_UN
- !define _MOZFUNC_UN
- !verbose pop
- !endif
-!macroend
diff --git a/mozilla/toolkit/mozapps/plugins/content/pluginInstallerDatasource.js b/mozilla/toolkit/mozapps/plugins/content/pluginInstallerDatasource.js
index 8164000ad5f..63fd5942b3b 100644
--- a/mozilla/toolkit/mozapps/plugins/content/pluginInstallerDatasource.js
+++ b/mozilla/toolkit/mozapps/plugins/content/pluginInstallerDatasource.js
@@ -109,27 +109,31 @@ nsRDFItemUpdater.prototype = {
target = child;
}
- function getPFSValueFromRDF(aValue, aDatasource, aRDFService){
+ var rdfs = this._rdfService;
+
+ function getPFSValueFromRDF(aValue){
var rv = null;
- var myTarget = aDatasource.GetTarget(target, aRDFService.GetResource(PFS_NS + aValue), true);
+ var myTarget = aDatasource.GetTarget(target, rdfs.GetResource(PFS_NS + aValue), true);
if (myTarget)
rv = myTarget.QueryInterface(Components.interfaces.nsIRDFLiteral).Value;
return rv;
}
- pluginInfo = new Object();
- pluginInfo.name = getPFSValueFromRDF("name", aDatasource, this._rdfService);
- pluginInfo.pid = getPFSValueFromRDF("guid", aDatasource, this._rdfService);
- pluginInfo.version = getPFSValueFromRDF("version", aDatasource, this._rdfService);
- pluginInfo.IconUrl = getPFSValueFromRDF("IconUrl", aDatasource, this._rdfService);
- pluginInfo.XPILocation = getPFSValueFromRDF("XPILocation", aDatasource, this._rdfService);
- pluginInfo.InstallerShowsUI = getPFSValueFromRDF("InstallerShowsUI", aDatasource, this._rdfService);
- pluginInfo.manualInstallationURL = getPFSValueFromRDF("manualInstallationURL", aDatasource, this._rdfService);
- pluginInfo.requestedMimetype = getPFSValueFromRDF("requestedMimetype", aDatasource, this._rdfService);
- pluginInfo.licenseURL = getPFSValueFromRDF("licenseURL", aDatasource, this._rdfService);
- pluginInfo.needsRestart = getPFSValueFromRDF("needsRestart", aDatasource, this._rdfService);
+ pluginInfo = {
+ name: getPFSValueFromRDF("name"),
+ pid: getPFSValueFromRDF("guid"),
+ version: getPFSValueFromRDF("version"),
+ IconUrl: getPFSValueFromRDF("IconUrl"),
+ XPILocation: getPFSValueFromRDF("XPILocation"),
+ XPIHash: getPFSValueFromRDF("XPIHash"),
+ InstallerShowsUI: getPFSValueFromRDF("InstallerShowsUI"),
+ manualInstallationURL: getPFSValueFromRDF("manualInstallationURL"),
+ requestedMimetype: getPFSValueFromRDF("requestedMimetype"),
+ licenseURL: getPFSValueFromRDF("licenseURL"),
+ needsRestart: getPFSValueFromRDF("needsRestart")
+ };
}
catch (ex){}
}
diff --git a/mozilla/toolkit/mozapps/plugins/content/pluginInstallerService.js b/mozilla/toolkit/mozapps/plugins/content/pluginInstallerService.js
index ba4f49b70e2..02654077189 100644
--- a/mozilla/toolkit/mozapps/plugins/content/pluginInstallerService.js
+++ b/mozilla/toolkit/mozapps/plugins/content/pluginInstallerService.js
@@ -43,12 +43,15 @@ var PluginInstallService = {
pluginPidArray: null,
- startPluginInsallation: function (aPluginXPIUrlsArray, aPluginPidArray) {
+ startPluginInstallation: function (aPluginXPIUrlsArray,
+ aPluginHashes,
+ aPluginPidArray) {
this.pluginPidArray = aPluginPidArray;
var xpiManager = Components.classes["@mozilla.org/xpinstall/install-manager;1"]
.createInstance(Components.interfaces.nsIXPInstallManager);
- xpiManager.initManagerFromChrome(aPluginXPIUrlsArray, aPluginXPIUrlsArray.length, this);
+ xpiManager.initManagerWithHashes(aPluginXPIUrlsArray, aPluginHashes,
+ aPluginXPIUrlsArray.length, this);
},
// XPI progress listener stuff
diff --git a/mozilla/toolkit/mozapps/plugins/content/pluginInstallerWizard.js b/mozilla/toolkit/mozapps/plugins/content/pluginInstallerWizard.js
index c84d84b4c97..dfe209fc165 100644
--- a/mozilla/toolkit/mozapps/plugins/content/pluginInstallerWizard.js
+++ b/mozilla/toolkit/mozapps/plugins/content/pluginInstallerWizard.js
@@ -342,6 +342,7 @@ nsPluginInstallerWizard.prototype.startPluginInstallation = function (){
// mimetype. So store the pids.
var pluginURLArray = new Array();
+ var pluginHashArray = new Array();
var pluginPidArray = new Array();
for (pluginInfoItem in this.mPluginInfoArray){
@@ -351,12 +352,15 @@ nsPluginInstallerWizard.prototype.startPluginInstallation = function (){
// will complain.
if (pluginItem.toBeInstalled && pluginItem.XPILocation && pluginItem.licenseAccepted) {
pluginURLArray.push(pluginItem.XPILocation);
+ pluginHashArray.push(pluginItem.XPIHash);
pluginPidArray.push(pluginItem.pid);
}
}
if (pluginURLArray.length > 0)
- PluginInstallService.startPluginInsallation(pluginURLArray, pluginPidArray);
+ PluginInstallService.startPluginInstallation(pluginURLArray,
+ pluginHashArray,
+ pluginPidArray);
else
this.advancePage(null, true, false, false);
}
@@ -617,6 +621,7 @@ function PluginInfo(aResult) {
this.version = aResult.version;
this.IconUrl = aResult.IconUrl;
this.XPILocation = aResult.XPILocation;
+ this.XPIHash = aResult.XPIHash;
this.InstallerShowsUI = aResult.InstallerShowsUI;
this.manualInstallationURL = aResult.manualInstallationURL;
this.requestedMimetype = aResult.requestedMimetype;
diff --git a/mozilla/toolkit/mozapps/update/src/nsUpdateService.js.in b/mozilla/toolkit/mozapps/update/src/nsUpdateService.js.in
index 569f00d71fd..f9b8a732dbf 100644
--- a/mozilla/toolkit/mozapps/update/src/nsUpdateService.js.in
+++ b/mozilla/toolkit/mozapps/update/src/nsUpdateService.js.in
@@ -1839,7 +1839,9 @@ Checker.prototype = {
* The URL of the update service XML file to connect to that contains details
* about available updates.
*/
- get updateURL() {
+ getUpdateURL: function(force) {
+ this._forced = force;
+
var defaults =
gPref.QueryInterface(Components.interfaces.nsIPrefService).
getDefaultBranch(null);
@@ -1869,6 +1871,9 @@ Checker.prototype = {
url = url.replace(/%CHANNEL%/g, getUpdateChannel());
url = url.replace(/\+/g, "%2B");
+ if (force)
+ url += "?force=1"
+
LOG("Checker", "update url: " + url);
return url;
},
@@ -1880,13 +1885,13 @@ Checker.prototype = {
if (!listener)
throw Components.results.NS_ERROR_NULL_POINTER;
- if (!this.updateURL || (!this.enabled && !force))
+ if (!this.getUpdateURL(force) || (!this.enabled && !force))
return;
this._request =
Components.classes["@mozilla.org/xmlextras/xmlhttprequest;1"].
createInstance(Components.interfaces.nsIXMLHttpRequest);
- this._request.open("GET", this.updateURL, true);
+ this._request.open("GET", this.getUpdateURL(force), true);
this._request.channel.notificationCallbacks = new BadCertHandler();
this._request.overrideMimeType("text/xml");
this._request.setRequestHeader("Cache-Control", "no-cache");
@@ -1896,7 +1901,7 @@ Checker.prototype = {
this._request.onload = function(event) { self.onLoad(event); };
this._request.onprogress = function(event) { self.onProgress(event); };
- LOG("Checker", "checkForUpdates: sending request to " + this.updateURL);
+ LOG("Checker", "checkForUpdates: sending request to " + this.getUpdateURL(force));
this._request.send(null);
this._callback = listener;
@@ -1941,7 +1946,7 @@ Checker.prototype = {
LOG("Checker", "Invalid , ignoring...");
continue;
}
- update.serviceURL = this.updateURL;
+ update.serviceURL = this.getUpdateURL(this._forced);
update.channel = getUpdateChannel();
updates.push(update);
}
diff --git a/mozilla/toolkit/xre/nsAppRunner.cpp b/mozilla/toolkit/xre/nsAppRunner.cpp
index 63c0cf2d649..a734fd7c667 100644
--- a/mozilla/toolkit/xre/nsAppRunner.cpp
+++ b/mozilla/toolkit/xre/nsAppRunner.cpp
@@ -328,13 +328,16 @@ static void RemoveArg(char **argv)
* --arg (or /arg on win32/OS2).
*
* @param aArg the parameter to check. Must be lowercase.
+ * @param aCheckOSInt if true returns ARG_BAD if the osint argument is present
+ * when aArg is also present.
* @param if non-null, the -arg will be stored in this pointer. This is *not*
* allocated, but rather a pointer to the argv data.
*/
static ArgResult
-CheckArg(const char* aArg, const char **aParam = nsnull)
+CheckArg(const char* aArg, PRBool aCheckOSInt = PR_FALSE, const char **aParam = nsnull)
{
char **curarg = gArgv + 1; // skip argv[0]
+ ArgResult ar = ARG_NONE;
while (*curarg) {
char *arg = curarg[0];
@@ -351,7 +354,8 @@ CheckArg(const char* aArg, const char **aParam = nsnull)
if (strimatch(aArg, arg)) {
RemoveArg(curarg);
if (!aParam) {
- return ARG_FOUND;
+ ar = ARG_FOUND;
+ break;
}
if (*curarg) {
@@ -364,7 +368,8 @@ CheckArg(const char* aArg, const char **aParam = nsnull)
*aParam = *curarg;
RemoveArg(curarg);
- return ARG_FOUND;
+ ar = ARG_FOUND;
+ break;
}
return ARG_BAD;
}
@@ -373,7 +378,15 @@ CheckArg(const char* aArg, const char **aParam = nsnull)
++curarg;
}
- return ARG_NONE;
+ if (aCheckOSInt && ar == ARG_FOUND) {
+ ArgResult arOSInt = CheckArg("osint");
+ if (arOSInt == ARG_FOUND) {
+ ar = ARG_BAD;
+ PR_fprintf(PR_STDERR, "Error: argument -osint is invalid\n");
+ }
+ }
+
+ return ar;
}
#if defined(XP_WIN)
@@ -1115,14 +1128,14 @@ HandleRemoteArgument(const char* remote)
ToLowerCase(program);
const char *username = getenv("LOGNAME");
- ar = CheckArg("p", &profile);
+ ar = CheckArg("p", PR_FALSE, &profile);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR, "Error: argument -p requires a profile name\n");
return 1;
}
const char *temp = nsnull;
- ar = CheckArg("a", &temp);
+ ar = CheckArg("a", PR_FALSE, &temp);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR, "Error: argument -a requires an application name\n");
return 1;
@@ -1130,7 +1143,7 @@ HandleRemoteArgument(const char* remote)
program.Assign(temp);
}
- ar = CheckArg("u", &username);
+ ar = CheckArg("u", PR_FALSE, &username);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR, "Error: argument -u requires a username\n");
return 1;
@@ -1173,7 +1186,7 @@ RemoteCommandLine()
const char *username = getenv("LOGNAME");
const char *temp = nsnull;
- ar = CheckArg("a", &temp);
+ ar = CheckArg("a", PR_TRUE, &temp);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR, "Error: argument -a requires an application name\n");
return PR_FALSE;
@@ -1181,7 +1194,7 @@ RemoteCommandLine()
program.Assign(temp);
}
- ar = CheckArg("u", &username);
+ ar = CheckArg("u", PR_TRUE, &username);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR, "Error: argument -u requires a username\n");
return PR_FALSE;
@@ -1646,10 +1659,17 @@ SelectProfile(nsIProfileLock* *aResult, nsINativeAppSupport* aNative,
*aResult = nsnull;
*aStartOffline = PR_FALSE;
+ ar = CheckArg("offline", PR_TRUE);
+ if (ar == ARG_BAD) {
+ PR_fprintf(PR_STDERR, "Error: argument -offline is invalid when argument -osint is specified\n");
+ return NS_ERROR_FAILURE;
+ }
+
arg = PR_GetEnv("XRE_START_OFFLINE");
- if ((arg && *arg) || CheckArg("offline"))
+ if ((arg && *arg) || ar)
*aStartOffline = PR_TRUE;
+
arg = PR_GetEnv("XRE_PROFILE_PATH");
if (arg && *arg) {
nsCOMPtr lf;
@@ -1669,17 +1689,22 @@ SelectProfile(nsIProfileLock* *aResult, nsINativeAppSupport* aNative,
// Clear out flags that we handled (or should have handled!) last startup.
const char *dummy;
- CheckArg("p", &dummy);
- CheckArg("profile", &dummy);
+ CheckArg("p", PR_FALSE, &dummy);
+ CheckArg("profile", PR_FALSE, &dummy);
CheckArg("profilemanager");
return NS_LockProfilePath(lf, localDir, nsnull, aResult);
}
- if (CheckArg("migration"))
+ ar = CheckArg("migration", PR_TRUE);
+ if (ar == ARG_BAD) {
+ PR_fprintf(PR_STDERR, "Error: argument -migration is invalid when argument -osint is specified\n");
+ return NS_ERROR_FAILURE;
+ } else if (ar == ARG_FOUND) {
gDoMigration = PR_TRUE;
+ }
- ar = CheckArg("profile", &arg);
+ ar = CheckArg("profile", PR_TRUE, &arg);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR, "Error: argument -profile requires a path\n");
return NS_ERROR_FAILURE;
@@ -1704,7 +1729,7 @@ SelectProfile(nsIProfileLock* *aResult, nsINativeAppSupport* aNative,
rv = NS_NewToolkitProfileService(getter_AddRefs(profileSvc));
NS_ENSURE_SUCCESS(rv, rv);
- ar = CheckArg("createprofile", &arg);
+ ar = CheckArg("createprofile", PR_TRUE, &arg);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR, "Error: argument -createprofile requires a profile name\n");
return NS_ERROR_FAILURE;
@@ -1761,11 +1786,21 @@ SelectProfile(nsIProfileLock* *aResult, nsINativeAppSupport* aNative,
}
}
- ar = CheckArg("p", &arg);
+ ar = CheckArg("p", PR_FALSE, &arg);
if (ar == ARG_BAD) {
+ ar = CheckArg("osint");
+ if (ar == ARG_FOUND) {
+ PR_fprintf(PR_STDERR, "Error: argument -p is invalid when argument -osint is specified\n");
+ return NS_ERROR_FAILURE;
+ }
return ShowProfileManager(profileSvc, aNative);
}
if (ar) {
+ ar = CheckArg("osint");
+ if (ar == ARG_FOUND) {
+ PR_fprintf(PR_STDERR, "Error: argument -p is invalid when argument -osint is specified\n");
+ return NS_ERROR_FAILURE;
+ }
nsCOMPtr profile;
rv = profileSvc->GetProfileByName(nsDependentCString(arg),
getter_AddRefs(profile));
@@ -1790,7 +1825,11 @@ SelectProfile(nsIProfileLock* *aResult, nsINativeAppSupport* aNative,
return ShowProfileManager(profileSvc, aNative);
}
- if (CheckArg("profilemanager")) {
+ ar = CheckArg("profilemanager", PR_TRUE);
+ if (ar == ARG_BAD) {
+ PR_fprintf(PR_STDERR, "Error: argument -profilemanager is invalid when argument -osint is specified\n");
+ return NS_ERROR_FAILURE;
+ } else if (ar == ARG_FOUND) {
return ShowProfileManager(profileSvc, aNative);
}
@@ -2065,6 +2104,7 @@ int
XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
{
nsresult rv;
+ ArgResult ar;
NS_TIMELINE_MARK("enter main");
#ifdef DEBUG
@@ -2180,13 +2220,23 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
ScopedFPHandler handler;
#endif /* XP_OS2 */
- if (CheckArg("safe-mode"))
+ ar = CheckArg("safe-mode", PR_TRUE);
+ if (ar == ARG_BAD) {
+ PR_fprintf(PR_STDERR, "Error: argument -safe-mode is invalid when argument -osint is specified\n");
+ return 1;
+ } else if (ar == ARG_FOUND) {
gSafeMode = PR_TRUE;
+ }
// Handle -no-remote command line argument. Setup the environment to
// better accommodate other components and various restart scenarios.
- if (CheckArg("no-remote"))
+ ar = CheckArg("no-remote", PR_TRUE);
+ if (ar == ARG_BAD) {
+ PR_fprintf(PR_STDERR, "Error: argument -a requires an application name\n");
+ return 1;
+ } else if (ar == ARG_FOUND) {
PR_SetEnv("MOZ_NO_REMOTE=1");
+ }
// Handle -help and -version command line arguments.
// They should return quickly, so we deal with them here.
@@ -2212,7 +2262,12 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
}
// Check for -register, which registers chrome and then exits immediately.
- if (CheckArg("register")) {
+
+ ar = CheckArg("register", PR_TRUE);
+ if (ar == ARG_BAD) {
+ PR_fprintf(PR_STDERR, "Error: argument -register is invalid when argument -osint is specified\n");
+ return 1;
+ } else if (ar == ARG_FOUND) {
ScopedXPCOMStartup xpcom;
rv = xpcom.Initialize();
NS_ENSURE_SUCCESS(rv, 1);
@@ -2310,7 +2365,7 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
// handle -remote now that xpcom is fired up
const char* xremotearg;
- ArgResult ar = CheckArg("remote", &xremotearg);
+ ar = CheckArg("remote", PR_TRUE, &xremotearg);
if (ar == ARG_BAD) {
PR_fprintf(PR_STDERR, "Error: -remote requires an argument\n");
return 1;
@@ -2538,7 +2593,21 @@ XRE_main(int argc, char* argv[], const nsXREAppData* aAppData)
nsCOMPtr em(do_GetService("@mozilla.org/extensions/manager;1"));
NS_ENSURE_TRUE(em, 1);
- if (CheckArg("install-global-extension") || CheckArg("install-global-theme")) {
+ ar = CheckArg("install-global-extension", PR_TRUE);
+ if (ar == ARG_BAD) {
+ PR_fprintf(PR_STDERR, "Error: argument -install-global-extension is invalid when argument -osint is specified\n");
+ return 1;
+ } else if (ar == ARG_FOUND) {
+ // Do the required processing and then shut down.
+ em->HandleCommandLineArgs(cmdLine);
+ return 0;
+ }
+
+ ar = CheckArg("install-global-theme", PR_TRUE);
+ if (ar == ARG_BAD) {
+ PR_fprintf(PR_STDERR, "Error: argument -install-global-theme is invalid when argument -osint is specified\n");
+ return 1;
+ } else if (ar == ARG_FOUND) {
// Do the required processing and then shut down.
em->HandleCommandLineArgs(cmdLine);
return 0;
diff --git a/mozilla/toolkit/xre/nsXREDirProvider.cpp b/mozilla/toolkit/xre/nsXREDirProvider.cpp
index d74c8a98876..487acad41c2 100644
--- a/mozilla/toolkit/xre/nsXREDirProvider.cpp
+++ b/mozilla/toolkit/xre/nsXREDirProvider.cpp
@@ -740,12 +740,23 @@ nsXREDirProvider::GetUpdateRootDir(nsIFile* *aResult)
nsCString longPath;
longPath.SetLength(MAXPATHLEN);
char *buf = longPath.BeginWriting();
- DWORD len = GetLongPathName(appPath.get(), buf, MAXPATHLEN);
- // Failing GetLongPathName() is not fatal.
- if (len <= 0 || len >= MAXPATHLEN)
+
+ DWORD (WINAPI *pGetLongPathName)(LPCTSTR, LPTSTR, DWORD);
+ // GetLongPathName() is not present on WinNT 4.0
+ *(FARPROC *)&pGetLongPathName =
+ GetProcAddress(GetModuleHandle("kernel32.dll"), "GetLongPathNameA");
+
+ if (pGetLongPathName) {
+ DWORD len = pGetLongPathName(appPath.get(), buf, MAXPATHLEN);
+ // Failing GetLongPathName() is not fatal.
+ if (len <= 0 || len >= MAXPATHLEN)
+ longPath.Assign(appPath);
+ else
+ longPath.SetLength(len);
+ }
+ else {
longPath.Assign(appPath);
- else
- longPath.SetLength(len);
+ }
// Use \updates\ if app dir is under Program Files to avoid the
diff --git a/mozilla/view/src/nsView.cpp b/mozilla/view/src/nsView.cpp
index c6c4b3244a1..3fef11424bd 100644
--- a/mozilla/view/src/nsView.cpp
+++ b/mozilla/view/src/nsView.cpp
@@ -652,8 +652,13 @@ nsresult nsIView::CreateWidget(const nsIID &aWindowIID,
nsIDeviceContext *dx;
nsRect trect = mDimBounds;
- NS_ASSERTION(!mWindow, "We already have a window for this view? BAD");
- NS_IF_RELEASE(mWindow);
+ if (NS_UNLIKELY(!!mWindow)) {
+ NS_ERROR("We already have a window for this view? BAD");
+ ViewWrapper* wrapper = GetWrapperFor(mWindow);
+ NS_IF_RELEASE(wrapper);
+ mWindow->SetClientData(nsnull);
+ NS_RELEASE(mWindow);
+ }
mViewManager->GetDeviceContext(dx);
float scale = dx->AppUnitsToDevUnits();
diff --git a/mozilla/widget/src/beos/nsAppShell.cpp b/mozilla/widget/src/beos/nsAppShell.cpp
index ae781411dac..dd828cc2438 100644
--- a/mozilla/widget/src/beos/nsAppShell.cpp
+++ b/mozilla/widget/src/beos/nsAppShell.cpp
@@ -44,7 +44,6 @@
#include "nsIServiceManager.h"
#include "nsIWidget.h"
#include "nsIAppShell.h"
-#include "nsWindow.h"
#include "nsSwitchToUIThread.h"
#include "plevent.h"
#include "prprf.h"
@@ -146,7 +145,7 @@ NS_IMETHODIMP nsAppShell::Create(int* argc, char ** argv)
if(eventport < 0)
{
eventport = create_port(200, portname);
- }
+ }
return NS_OK;
}
if(eventport >= 0)
@@ -481,15 +480,15 @@ void nsAppShell::RetrieveAllEvents(bool blockable)
{
MethodInfo *mInfo = (MethodInfo *)newitem->ifdata.data;
switch( mInfo->methodId ) {
- case nsWindow::ONKEY :
+ case nsSwitchToUIThread::ONKEY :
events[PRIORITY_SECOND].AddItem(newitem);
break;
- case nsWindow::ONMOUSE:
+ case nsSwitchToUIThread::ONMOUSE:
ConsumeRedundantMouseMoveEvent(mInfo);
events[PRIORITY_THIRD].AddItem(newitem);
break;
- case nsWindow::ONWHEEL :
- case nsWindow::BTNCLICK :
+ case nsSwitchToUIThread::ONWHEEL :
+ case nsSwitchToUIThread::BTNCLICK :
events[PRIORITY_THIRD].AddItem(newitem);
break;
default:
diff --git a/mozilla/widget/src/beos/nsAppShell.h b/mozilla/widget/src/beos/nsAppShell.h
index 5c4f6c54189..3e4d322c391 100644
--- a/mozilla/widget/src/beos/nsAppShell.h
+++ b/mozilla/widget/src/beos/nsAppShell.h
@@ -41,10 +41,12 @@
#include "nsCOMPtr.h"
#include "nsIAppShell.h"
#include "nsIEventQueue.h"
-#include "nsSwitchToUIThread.h"
#include
#include
+
+struct MethodInfo;
+
/**
* Native BeOS Application shell wrapper
*/
diff --git a/mozilla/widget/src/beos/nsDragService.cpp b/mozilla/widget/src/beos/nsDragService.cpp
index 2e149ebaf4d..2a4db3adbc3 100644
--- a/mozilla/widget/src/beos/nsDragService.cpp
+++ b/mozilla/widget/src/beos/nsDragService.cpp
@@ -66,6 +66,9 @@
#include
#include
#include
+#include
+#include
+#include
#include "prlog.h"
#include "nsIPresShell.h"
diff --git a/mozilla/widget/src/beos/nsDragService.h b/mozilla/widget/src/beos/nsDragService.h
index c88c7377619..946d943b66e 100644
--- a/mozilla/widget/src/beos/nsDragService.h
+++ b/mozilla/widget/src/beos/nsDragService.h
@@ -41,13 +41,9 @@
#include "nsBaseDragService.h"
#include "nsIDragSessionBeOS.h"
-#include "nsWindow.h"
-#include
-#include
#include
-#include
-class nsDragView;
+class BMessage;
/**
* Native BeOS DragService wrapper
diff --git a/mozilla/widget/src/beos/nsSwitchToUIThread.h b/mozilla/widget/src/beos/nsSwitchToUIThread.h
index 975c399aebb..f41d114cf64 100644
--- a/mozilla/widget/src/beos/nsSwitchToUIThread.h
+++ b/mozilla/widget/src/beos/nsSwitchToUIThread.h
@@ -43,6 +43,9 @@
// foreward declaration
struct MethodInfo;
+
+#define WM_CALLMETHOD 'CAme'
+
/**
* Switch thread to match the thread the widget was created in so messages will be dispatched.
*/
@@ -52,6 +55,34 @@ class nsSwitchToUIThread {
public:
virtual bool CallMethod(MethodInfo *info) = 0;
+ // Enumeration of the methods which are accessable on the "main GUI thread"
+ // via the CallMethod(...) mechanism...
+ // see nsSwitchToUIThread
+ enum
+ {
+ CREATE = 0x0101,
+ CREATE_NATIVE,
+ DESTROY,
+ SET_FOCUS,
+ GOT_FOCUS,
+ KILL_FOCUS,
+ ONMOUSE,
+ ONDROP,
+ ONWHEEL,
+ ONPAINT,
+ ONRESIZE,
+ CLOSEWINDOW,
+ ONKEY,
+ BTNCLICK,
+ ONACTIVATE,
+ ONMOVE,
+ ONWORKSPACE
+#if defined(BeIME)
+ ,
+ ONIME
+#endif
+ };
+
};
//
diff --git a/mozilla/widget/src/beos/nsToolkit.cpp b/mozilla/widget/src/beos/nsToolkit.cpp
index a90397043a8..e7c41ba9537 100644
--- a/mozilla/widget/src/beos/nsToolkit.cpp
+++ b/mozilla/widget/src/beos/nsToolkit.cpp
@@ -36,7 +36,6 @@
* ***** END LICENSE BLOCK ***** */
#include "nsToolkit.h"
-#include "nsWindow.h"
#include "prmon.h"
#include "prtime.h"
#include "nsGUIEvent.h"
diff --git a/mozilla/widget/src/beos/nsToolkit.h b/mozilla/widget/src/beos/nsToolkit.h
index 98bfd40683d..0a7f171206e 100644
--- a/mozilla/widget/src/beos/nsToolkit.h
+++ b/mozilla/widget/src/beos/nsToolkit.h
@@ -78,8 +78,4 @@ protected:
port_id eventport;
};
-#define WM_CALLMETHOD 'CAme'
-
-class nsWindow;
-
#endif // TOOLKIT_H
diff --git a/mozilla/widget/src/beos/nsWindow.cpp b/mozilla/widget/src/beos/nsWindow.cpp
index 319b9fab431..5b5e403be96 100644
--- a/mozilla/widget/src/beos/nsWindow.cpp
+++ b/mozilla/widget/src/beos/nsWindow.cpp
@@ -286,22 +286,18 @@ nsWindow::nsWindow() : nsBaseWidget()
rgb_color back = ui_color(B_PANEL_BACKGROUND_COLOR);
mView = 0;
- mIsDestroying = PR_FALSE;
- mOnDestroyCalled = PR_FALSE;
mPreferredWidth = 0;
mPreferredHeight = 0;
mFontMetrics = nsnull;
mIsVisible = PR_FALSE;
- mWindowType = eWindowType_child;
- mBorderStyle = eBorderStyle_default;
mEnabled = PR_TRUE;
- mJustGotActivate = PR_FALSE;
- mJustGotDeactivate = PR_FALSE;
mIsScrolling = PR_FALSE;
mParent = nsnull;
+ mWindowParent = nsnull;
mUpdateArea = do_CreateInstance(kRegionCID);
mForeground = NS_RGBA(0xFF,0xFF,0xFF,0xFF);
mBackground = mForeground;
+ mBWindowFeel = B_NORMAL_WINDOW_FEEL;
if (mUpdateArea)
{
mUpdateArea->Init();
@@ -471,6 +467,16 @@ PRBool nsWindow::DispatchStandardEvent(PRUint32 aMsg)
return result;
}
+NS_IMETHODIMP nsWindow::PreCreateWidget(nsWidgetInitData *aInitData)
+{
+ if ( nsnull == aInitData)
+ return NS_ERROR_FAILURE;
+
+ SetWindowType(aInitData->mWindowType);
+ SetBorderStyle(aInitData->mBorderStyle);
+ return NS_OK;
+}
+
//-------------------------------------------------------------------------
//
// Utility method for implementing both Create(nsIWidget ...) and
@@ -485,252 +491,195 @@ nsresult nsWindow::StandardWindowCreate(nsIWidget *aParent,
nsWidgetInitData *aInitData,
nsNativeWidget aNativeParent)
{
- nsIWidget *baseParent = aInitData &&
+
+ //Do as little as possible for invisible windows, why are these needed?
+ if (mWindowType == eWindowType_invisible)
+ return NS_ERROR_FAILURE;
+
+ nsIWidget *baseParent =
(aInitData->mWindowType == eWindowType_dialog ||
aInitData->mWindowType == eWindowType_toplevel ||
aInitData->mWindowType == eWindowType_invisible) ?
nsnull : aParent;
+ NS_ASSERTION(aInitData->mWindowType != eWindowType_popup ||
+ !aParent, "Popups should not be hooked into nsIWidget hierarchy");
+
mIsTopWidgetWindow = (nsnull == baseParent);
-
+
BaseCreate(baseParent, aRect, aHandleEventFunction, aContext,
aAppShell, aToolkit, aInitData);
- if (nsnull != aInitData)
- {
- SetWindowType(aInitData->mWindowType);
- SetBorderStyle(aInitData->mBorderStyle);
- }
-
-
+ mListenForResizes = aNativeParent ? PR_TRUE : aInitData->mListenForResizes;
+
// Switch to the "main gui thread" if necessary... This method must
// be executed on the "gui thread"...
//
-
nsToolkit* toolkit = (nsToolkit *)mToolkit;
- if (toolkit)
+ if (toolkit && !toolkit->IsGuiThread())
{
- if (!toolkit->IsGuiThread())
- {
- uint32 args[7];
- args[0] = (uint32)aParent;
- args[1] = (uint32)&aRect;
- args[2] = (uint32)aHandleEventFunction;
- args[3] = (uint32)aContext;
- args[4] = (uint32)aAppShell;
- args[5] = (uint32)aToolkit;
- args[6] = (uint32)aInitData;
+ uint32 args[7];
+ args[0] = (uint32)aParent;
+ args[1] = (uint32)&aRect;
+ args[2] = (uint32)aHandleEventFunction;
+ args[3] = (uint32)aContext;
+ args[4] = (uint32)aAppShell;
+ args[5] = (uint32)aToolkit;
+ args[6] = (uint32)aInitData;
- if (nsnull != aParent)
- {
- // nsIWidget parent dispatch
- MethodInfo info(this, this, nsWindow::CREATE, 7, args);
- toolkit->CallMethod(&info);
- return NS_OK;
+ if (nsnull != aParent)
+ {
+ // nsIWidget parent dispatch
+ MethodInfo info(this, this, nsSwitchToUIThread::CREATE, 7, args);
+ toolkit->CallMethod(&info);
+ }
+ else
+ {
+ // Native parent dispatch
+ MethodInfo info(this, this, nsSwitchToUIThread::CREATE_NATIVE, 5, args);
+ toolkit->CallMethod(&info);
+ }
+ return NS_OK;
+ }
+
+ mParent = aParent;
+ // Useful shortcut, wondering if we can use it also in GetParent() instead nsIWidget* type mParent.
+ mWindowParent = (nsWindow *)aParent;
+ SetBounds(aRect);
+
+ BRect winrect = BRect(aRect.x, aRect.y, aRect.x + aRect.width - 1, aRect.y + aRect.height - 1);
+
+ // Default mode for window, everything switched off.
+ uint32 flags = B_NOT_RESIZABLE | B_NOT_MINIMIZABLE | B_NOT_ZOOMABLE | B_NOT_CLOSABLE | B_ASYNCHRONOUS_CONTROLS;
+ window_look look = B_NO_BORDER_WINDOW_LOOK;
+ switch (mWindowType)
+ {
+ //handle them as childviews until I know better. Shame on me.
+ case eWindowType_java:
+ case eWindowType_plugin:
+ NS_NOTYETIMPLEMENTED("Java and plugin windows not yet implemented properly trying childview"); // to be implemented
+ //These fall thru and behave just like child for the time being. They may require special implementation.
+ case eWindowType_child:
+ {
+ //NS_NATIVE_GRAPHIC maybe?
+ //Parent may be a BView if we embed.
+ BView *parent= (BView *) (aParent ? aParent->GetNativeData(NS_NATIVE_WIDGET) : aNativeParent);
+ //There seems to be three of these on startup,
+ //but I believe that these are because of bugs in
+ //other code as they existed before rewriting this
+ //function.
+ NS_PRECONDITION(parent, "Childviews without parents don't get added to anything.");
+ // A childview that is never added to a parent is very strange.
+ if (!parent)
+ return NS_ERROR_FAILURE;
+
+ mView = new nsViewBeOS(this, winrect, "Child view", 0, B_WILL_DRAW);
+#if defined(BeIME)
+ mView->SetFlags(mView->Flags() | B_INPUT_METHOD_AWARE);
+#endif
+ bool mustUnlock = parent->Parent() && parent->LockLooper();
+ parent->AddChild(mView);
+ if (mustUnlock) parent->UnlockLooper();
+ DispatchStandardEvent(NS_CREATE);
+ return NS_OK;
+ }
+
+ case eWindowType_popup:
+ case eWindowType_dialog:
+ case eWindowType_toplevel:
+ {
+ //eBorderStyle_default is to ask the OS to handle it as it sees best.
+ //eBorderStyle_all is same as top_level window default.
+ if (eBorderStyle_default == mBorderStyle || eBorderStyle_all & mBorderStyle)
+ {
+ //(Firefox prefs doesn't go this way, so apparently it wants titlebar, zoom, resize and close.)
+
+ //Look and feel for others are set ok at init.
+ if (eWindowType_toplevel==mWindowType)
+ {
+ look = B_TITLED_WINDOW_LOOK;
+ flags = B_ASYNCHRONOUS_CONTROLS;
+ }
}
else
{
- // Native parent dispatch
- MethodInfo info(this, this, nsWindow::CREATE_NATIVE, 5, args);
- toolkit->CallMethod(&info);
- return NS_OK;
+ if (eBorderStyle_border & mBorderStyle)
+ look = B_MODAL_WINDOW_LOOK;
+
+ if (eBorderStyle_resizeh & mBorderStyle)
+ {
+ //Resize demands at least border
+ look = B_MODAL_WINDOW_LOOK;
+ flags &= !B_NOT_RESIZABLE;
+ }
+
+ //We don't have titlebar menus, so treat like title as it demands titlebar.
+ if (eBorderStyle_title & mBorderStyle || eBorderStyle_menu & mBorderStyle)
+ look = B_TITLED_WINDOW_LOOK;
+
+ if (eBorderStyle_minimize & mBorderStyle)
+ flags &= !B_NOT_MINIMIZABLE;
+
+ if (eBorderStyle_maximize & mBorderStyle)
+ flags &= !B_NOT_ZOOMABLE;
+
+ if (eBorderStyle_close & mBorderStyle)
+ flags &= !B_NOT_CLOSABLE;
}
- }
- }
- nsViewBeOS *parent;
- if (nsnull != aParent) // has a nsIWidget parent
- {
- parent = ((aParent) ? (nsViewBeOS *)aParent->GetNativeData(NS_NATIVE_WIDGET) : nsnull);
- }
- else // has a nsNative parent
- {
- parent = (nsViewBeOS *)aNativeParent;
- }
+ //popups always avoid focus and don't force the user to another workspace.
+ if (eWindowType_popup==mWindowType)
+ flags |= B_AVOID_FOCUS | B_NO_WORKSPACE_ACTIVATION;
- // Only popups have mBorderlessParents
- mParent = aParent;
- mView = new nsViewBeOS(this, BRect(0,0,0,0), "", 0, 0);
- if (mView)
- {
-#ifdef MOZ_DEBUG_WINDOW_CREATE
- printf("nsWindow::StandardWindowCreate : type = ");
-#endif
- if (mWindowType == eWindowType_child)
- {
-#ifdef MOZ_DEBUG_WINDOW_CREATE
- printf("child window\n");
-#endif
- // create view only
- bool mustunlock=false;
+ nsWindowBeOS * w = new nsWindowBeOS(this, winrect, "", look, mBWindowFeel, flags);
+ if (!w)
+ return NS_ERROR_OUT_OF_MEMORY;
- if (parent->LockLooper())
+ mView = new nsViewBeOS(this, w->Bounds(), "Toplevel view", B_FOLLOW_ALL, (mWindowType == eWindowType_popup ? B_WILL_DRAW: 0));
+
+ if (!mView)
+ return NS_ERROR_OUT_OF_MEMORY;
+
+ w->AddChild(mView);
+ // I'm wondering if we can move part of that code to above
+ if (eWindowType_dialog == mWindowType && mWindowParent)
{
- mustunlock = true;
- }
- mView->SetFlags(mView->Flags() | B_WILL_DRAW);
-#if defined(BeIME)
- mView->SetFlags(mView->Flags() | B_INPUT_METHOD_AWARE);
-#endif
- parent->AddChild(mView);
- mView->MoveTo(aRect.x, aRect.y);
- mView->ResizeTo(aRect.width - 1, aRect.height - 1);
-
- if (mustunlock)
+ nsWindow *topparent = mWindowParent;
+ while(topparent->mWindowParent)
+ topparent = topparent->mWindowParent;
+ // may be got via mView and mView->Window() of topparent explicitly
+ BWindow* subsetparent = (BWindow *)topparent->GetNativeData(NS_NATIVE_WINDOW);
+ if (subsetparent)
+ {
+ mBWindowFeel = B_FLOATING_SUBSET_WINDOW_FEEL;
+ w->SetFeel(mBWindowFeel);
+ w->AddToSubset(subsetparent);
+ }
+ }
+ else if (eWindowType_popup == mWindowType && aNativeParent)
{
- parent->UnlockLooper();
+ // Due poor BeOS capability to control windows hierarchy/z-order we use this workaround
+ // to show eWindowType_popup (e.g. drop-downs) over floating (subset) parent window.
+ if (((BView *)aNativeParent)->Window() && ((BView *)aNativeParent)->Window()->IsFloating())
+ {
+ mBWindowFeel = B_FLOATING_ALL_WINDOW_FEEL;
+ w->SetFeel(mBWindowFeel);
+ }
}
-
- }
- else // if eWindowType_Child
- {
- nsWindowBeOS *w;
- BRect winrect = BRect(aRect.x, aRect.y, aRect.x + aRect.width - 1, aRect.y + aRect.height - 1);
- window_look look = B_TITLED_WINDOW_LOOK;
- window_feel feel = B_NORMAL_WINDOW_FEEL;
- // Set all windows to use outline resize, since currently, the redraw of the window during resize
- // is very "choppy"
- uint32 flags = B_ASYNCHRONOUS_CONTROLS;
-#ifdef MOZ_DEBUG_WINDOW_CREATE
- printf("%s\n", (mWindowType == eWindowType_popup) ? "popup" :
- (mWindowType == eWindowType_dialog) ? "dialog" :
- (mWindowType == eWindowType_toplevel) ? "toplevel" : "unknown");
-#endif
- switch (mWindowType)
- {
- case eWindowType_popup:
- {
- flags |= B_NOT_CLOSABLE | B_AVOID_FOCUS | B_NO_WORKSPACE_ACTIVATION;
- look = B_NO_BORDER_WINDOW_LOOK;
- mView->SetFlags(mView->Flags() | B_WILL_DRAW );
- break;
- }
-
- case eWindowType_dialog:
- {
- if (mBorderStyle == eBorderStyle_default)
- {
- flags |= B_NOT_ZOOMABLE;
- }
- // don't break here
- }
- case eWindowType_toplevel:
- case eWindowType_invisible:
- {
- // This was never documented, so I'm not sure why we did it
- //winrect.OffsetBy( 10, 30 );
-
-#ifdef MOZ_DEBUG_WINDOW_CREATE
- printf("\tBorder Style : ");
-#endif
- // Set the border style(s)
- switch (mBorderStyle)
- {
- case eBorderStyle_default:
- {
-#ifdef MOZ_DEBUG_WINDOW_CREATE
- printf("default\n");
-#endif
- break;
- }
- case eBorderStyle_all:
- {
-#ifdef MOZ_DEBUG_WINDOW_CREATE
- printf("all\n");
-#endif
- break;
- }
-
- case eBorderStyle_none:
- {
-#ifdef MOZ_DEBUG_WINDOW_CREATE
- printf("none\n");
-#endif
- look = B_NO_BORDER_WINDOW_LOOK;
- break;
- }
-
- default:
- {
- if (!(mBorderStyle & eBorderStyle_resizeh))
- {
-#ifdef MOZ_DEBUG_WINDOW_CREATE
- printf("no_resize ");
-#endif
- flags |= B_NOT_RESIZABLE;
- }
- if (!(mBorderStyle & eBorderStyle_title))
- {
-#ifdef MOZ_DEBUG_WINDOW_CREATE
- printf("no_titlebar ");
-#endif
- look = B_BORDERED_WINDOW_LOOK;
- }
- if (!(mBorderStyle & eBorderStyle_minimize) || !(mBorderStyle & eBorderStyle_maximize))
- {
-#ifdef MOZ_DEBUG_WINDOW_CREATE
- printf("no_zoom ");
-#endif
- flags |= B_NOT_ZOOMABLE;
- }
- if (!(mBorderStyle & eBorderStyle_close))
- {
-#ifdef MOZ_DEBUG_WINDOW_CREATE
- printf("no_close ");
-#endif
- flags |= B_NOT_CLOSABLE;
- }
-#ifdef MOZ_DEBUG_WINDOW_CREATE
- printf("\n");
-#endif
- }
- } // case (mBorderStyle)
- break;
- } // eWindowType_toplevel
-
- default:
- {
- NS_ASSERTION(false, "Unhandled Window Type in nsWindow::StandardWindowCreate!");
- break;
- }
- } // case (mWindowType)
-
- w = new nsWindowBeOS(this, winrect, "", look, feel, flags);
- if (w)
- {
- w->AddChild(mView);
-
- // FIXME: we have to use the window size because
- // the window might not like sizes less then 30x30 or something like that
- mView->MoveTo(0, 0);
- mView->ResizeTo(w->Bounds().Width(), w->Bounds().Height());
- mView->SetResizingMode(B_FOLLOW_ALL);
- w->Hide();
- w->Show();
- }
- } // if eWindowType_Child
-
- // There is BeOS API/app_server issue creating little/0-sized windows. See comment above
- // Checking here real size. Probably should be done only for toplevel objects.
- nsRect r(aRect);
- if (mView && mView->LockLooper())
- {
- BRect br = mView->Frame();
- r.x = nscoord(br.left);
- r.y = nscoord(br.top);
- r.width = br.IntegerWidth() + 1;
- r.height = br.IntegerHeight() + 1;
- mView->UnlockLooper();
+ DispatchStandardEvent(NS_CREATE);
+ return NS_OK;
}
- SetBounds(r);
+ case eWindowType_invisible:
+ case eWindowType_sheet:
+ break;
+ default:
+ {
+ printf("UNKNOWN or not handled windowtype!!!\n");
+ }
+ }
- // call the event callback to notify about creation
- DispatchStandardEvent(NS_CREATE);
- return(NS_OK);
- } // if mView
-
- return NS_ERROR_OUT_OF_MEMORY;
+ return NS_ERROR_FAILURE;
}
//-------------------------------------------------------------------------
@@ -783,7 +732,7 @@ NS_METHOD nsWindow::Destroy()
nsToolkit* toolkit = (nsToolkit *)mToolkit;
if (toolkit != nsnull && !toolkit->IsGuiThread())
{
- MethodInfo info(this, this, nsWindow::DESTROY);
+ MethodInfo info(this, this, nsSwitchToUIThread::DESTROY);
toolkit->CallMethod(&info);
return NS_ERROR_FAILURE;
}
@@ -801,11 +750,12 @@ NS_METHOD nsWindow::Destroy()
{
// prevent the widget from causing additional events
mEventCallback = nsnull;
-
+
if (mView->LockLooper())
{
// destroy from inside
BWindow *w = mView->Window();
+ // Do we need here null-check for w ?
w->Sync();
if (mView->Parent())
{
@@ -834,7 +784,8 @@ NS_METHOD nsWindow::Destroy()
nsBaseWidget::Destroy();
}
}
- mParent = 0;
+ mParent = nsnull;
+ mWindowParent = nsnull;
return NS_OK;
}
@@ -848,7 +799,7 @@ nsIWidget* nsWindow::GetParent(void)
{
//We cannot addref mParent directly
nsIWidget *widget = 0;
- if (mIsTopWidgetWindow || mIsDestroying || mOnDestroyCalled)
+ if (mIsDestroying || mOnDestroyCalled)
return nsnull;
widget = (nsIWidget *)mParent;
NS_IF_ADDREF(widget);
@@ -1234,7 +1185,35 @@ NS_METHOD nsWindow::Resize(PRInt32 aX,
return NS_OK;
}
-
+NS_METHOD nsWindow::SetModal(PRBool aModal)
+{
+ if(!(mView && mView->Window()))
+ return NS_ERROR_FAILURE;
+ if(aModal)
+ {
+ window_feel newfeel;
+ switch(mBWindowFeel)
+ {
+ case B_FLOATING_SUBSET_WINDOW_FEEL:
+ newfeel = B_MODAL_SUBSET_WINDOW_FEEL;
+ break;
+ case B_FLOATING_APP_WINDOW_FEEL:
+ newfeel = B_MODAL_APP_WINDOW_FEEL;
+ break;
+ case B_FLOATING_ALL_WINDOW_FEEL:
+ newfeel = B_MODAL_ALL_WINDOW_FEEL;
+ break;
+ default:
+ return NS_OK;
+ }
+ mView->Window()->SetFeel(newfeel);
+ }
+ else
+ {
+ mView->Window()->SetFeel(mBWindowFeel);
+ }
+ return NS_OK;
+}
//-------------------------------------------------------------------------
//
// Enable/disable this component
@@ -1243,20 +1222,6 @@ NS_METHOD nsWindow::Resize(PRInt32 aX,
NS_METHOD nsWindow::Enable(PRBool aState)
{
//TODO: Needs real corect implementation in future
- if (mView && mView->LockLooper())
- {
- if (mView->Window())
- {
- uint flags = mView->Window()->Flags();
- if (aState == PR_TRUE) {
- flags &= ~B_AVOID_FOCUS;
- } else {
- flags |= B_AVOID_FOCUS;
- }
- mView->Window()->SetFlags(flags);
- }
- mView->UnlockLooper();
- }
mEnabled = aState;
return NS_OK;
}
@@ -1286,7 +1251,7 @@ NS_METHOD nsWindow::SetFocus(PRBool aRaise)
{
uint32 args[1];
args[0] = (uint32)aRaise;
- MethodInfo info(this, this, nsWindow::SET_FOCUS, 1, args);
+ MethodInfo info(this, this, nsSwitchToUIThread::SET_FOCUS, 1, args);
toolkit->CallMethod(&info);
return NS_ERROR_FAILURE;
}
@@ -1883,7 +1848,7 @@ bool nsWindow::CallMethod(MethodInfo *info)
switch (info->methodId)
{
- case nsWindow::CREATE:
+ case nsSwitchToUIThread::CREATE:
NS_ASSERTION(info->nArgs == 7, "Wrong number of arguments to CallMethod");
Create((nsIWidget*)(info->args[0]),
(nsRect&)*(nsRect*)(info->args[1]),
@@ -1894,7 +1859,7 @@ bool nsWindow::CallMethod(MethodInfo *info)
(nsWidgetInitData*)(info->args[6]));
break;
- case nsWindow::CREATE_NATIVE:
+ case nsSwitchToUIThread::CREATE_NATIVE:
NS_ASSERTION(info->nArgs == 7, "Wrong number of arguments to CallMethod");
Create((nsNativeWidget)(info->args[0]),
(nsRect&)*(nsRect*)(info->args[1]),
@@ -1905,19 +1870,19 @@ bool nsWindow::CallMethod(MethodInfo *info)
(nsWidgetInitData*)(info->args[6]));
break;
- case nsWindow::DESTROY:
+ case nsSwitchToUIThread::DESTROY:
NS_ASSERTION(info->nArgs == 0, "Wrong number of arguments to CallMethod");
Destroy();
break;
- case nsWindow::CLOSEWINDOW :
+ case nsSwitchToUIThread::CLOSEWINDOW :
NS_ASSERTION(info->nArgs == 0, "Wrong number of arguments to CallMethod");
if (eWindowType_popup != mWindowType && eWindowType_child != mWindowType)
- DealWithPopups(CLOSEWINDOW,nsPoint(0,0));
+ DealWithPopups(nsSwitchToUIThread::CLOSEWINDOW,nsPoint(0,0));
DispatchStandardEvent(NS_DESTROY);
break;
- case nsWindow::SET_FOCUS:
+ case nsSwitchToUIThread::SET_FOCUS:
NS_ASSERTION(info->nArgs == 1, "Wrong number of arguments to CallMethod");
if (!mEnabled)
return false;
@@ -1925,7 +1890,7 @@ bool nsWindow::CallMethod(MethodInfo *info)
break;
#ifdef DEBUG_FOCUS
- case nsWindow::GOT_FOCUS:
+ case nsSwitchToUIThread::GOT_FOCUS:
NS_ASSERTION(info->nArgs == 1, "Wrong number of arguments to CallMethod");
if (!mEnabled)
return false;
@@ -1933,7 +1898,7 @@ bool nsWindow::CallMethod(MethodInfo *info)
printf("Wrong view to get focus\n");*/
break;
#endif
- case nsWindow::KILL_FOCUS:
+ case nsSwitchToUIThread::KILL_FOCUS:
NS_ASSERTION(info->nArgs == 1, "Wrong number of arguments to CallMethod");
if ((uint32)info->args[0] == (uint32)mView)
DispatchFocus(NS_LOSTFOCUS);
@@ -1951,7 +1916,7 @@ bool nsWindow::CallMethod(MethodInfo *info)
#endif
break;
- case nsWindow::BTNCLICK :
+ case nsSwitchToUIThread::BTNCLICK :
{
NS_ASSERTION(info->nArgs == 5, "Wrong number of arguments to CallMethod");
if (!mEnabled)
@@ -1967,7 +1932,7 @@ bool nsWindow::CallMethod(MethodInfo *info)
{
BPoint p(((int32 *)info->args)[1], ((int32 *)info->args)[2]);
mView->ConvertToScreen(&p);
- rollup = DealWithPopups(nsWindow::ONMOUSE, nsPoint(p.x, p.y));
+ rollup = DealWithPopups(nsSwitchToUIThread::ONMOUSE, nsPoint(p.x, p.y));
mView->UnlockLooper();
}
// Drop click event - bug 314330
@@ -1988,7 +1953,7 @@ bool nsWindow::CallMethod(MethodInfo *info)
}
break;
- case nsWindow::ONWHEEL :
+ case nsSwitchToUIThread::ONWHEEL :
{
NS_ASSERTION(info->nArgs == 1, "Wrong number of arguments to CallMethod");
// avoid mistargeting
@@ -2017,7 +1982,7 @@ bool nsWindow::CallMethod(MethodInfo *info)
}
break;
- case nsWindow::ONKEY :
+ case nsSwitchToUIThread::ONKEY :
NS_ASSERTION(info->nArgs == 6, "Wrong number of arguments to CallMethod");
if (((int32 *)info->args)[0] == NS_KEY_DOWN)
{
@@ -2036,7 +2001,7 @@ bool nsWindow::CallMethod(MethodInfo *info)
}
break;
- case nsWindow::ONPAINT :
+ case nsSwitchToUIThread::ONPAINT :
NS_ASSERTION(info->nArgs == 1, "Wrong number of arguments to CallMethod");
{
if ((uint32)mView != ((uint32 *)info->args)[0])
@@ -2053,11 +2018,11 @@ bool nsWindow::CallMethod(MethodInfo *info)
}
break;
- case nsWindow::ONRESIZE :
+ case nsSwitchToUIThread::ONRESIZE :
{
NS_ASSERTION(info->nArgs == 0, "Wrong number of arguments to CallMethod");
if (eWindowType_popup != mWindowType && eWindowType_child != mWindowType)
- DealWithPopups(ONRESIZE,nsPoint(0,0));
+ DealWithPopups(nsSwitchToUIThread::ONRESIZE,nsPoint(0,0));
// This should be called only from BWindow::FrameResized()
if (!mIsTopWidgetWindow || !mView || !mView->Window())
return false;
@@ -2078,7 +2043,7 @@ bool nsWindow::CallMethod(MethodInfo *info)
}
break;
- case nsWindow::ONMOUSE :
+ case nsSwitchToUIThread::ONMOUSE :
{
NS_ASSERTION(info->nArgs == 1, "Wrong number of arguments to CallMethod");
if (!mEnabled)
@@ -2099,7 +2064,7 @@ bool nsWindow::CallMethod(MethodInfo *info)
}
break;
- case nsWindow::ONDROP :
+ case nsSwitchToUIThread::ONDROP :
{
NS_ASSERTION(info->nArgs == 4, "Wrong number of arguments to CallMethod");
@@ -2146,24 +2111,29 @@ bool nsWindow::CallMethod(MethodInfo *info)
}
break;
- case nsWindow::ONACTIVATE:
+ case nsSwitchToUIThread::ONACTIVATE:
NS_ASSERTION(info->nArgs == 2, "Wrong number of arguments to CallMethod");
if (!mEnabled || eWindowType_popup == mWindowType || 0 == mView->Window())
return false;
if ((BWindow *)info->args[1] != mView->Window())
return false;
- if (*mEventCallback || eWindowType_child == mWindowType)
+ if (mEventCallback || eWindowType_child == mWindowType )
{
bool active = (bool)info->args[0];
if (!active)
{
if (eWindowType_dialog == mWindowType ||
eWindowType_toplevel == mWindowType)
- DealWithPopups(ONACTIVATE,nsPoint(0,0));
-
+ DealWithPopups(nsSwitchToUIThread::ONACTIVATE,nsPoint(0,0));
//Testing if BWindow is really deactivated.
if (!mView->Window()->IsActive())
{
+ // BeOS is poor in windows hierarchy and variations support. In lot of aspects.
+ // Here is workaround for flacky Activate() handling for B_FLOATING windows.
+ // We should force parent (de)activation to allow main window to regain control after closing floating dialog.
+ if (mWindowParent && mView->Window()->IsFloating())
+ mWindowParent->DispatchFocus(NS_ACTIVATE);
+
DispatchFocus(NS_DEACTIVATE);
#if defined(BeIME)
nsIMEBeOS::GetIME()->DispatchCancelIME();
@@ -2172,37 +2142,43 @@ bool nsWindow::CallMethod(MethodInfo *info)
}
else
{
+
if (mView->Window()->IsActive())
- DispatchFocus(NS_ACTIVATE);
+ {
+ // See comment above.
+ if (mWindowParent && mView->Window()->IsFloating())
+ mWindowParent->DispatchFocus(NS_DEACTIVATE);
- if (mView && mView->Window())
- gLastActiveWindow = mView->Window();
+ DispatchFocus(NS_ACTIVATE);
+ if (mView && mView->Window())
+ gLastActiveWindow = mView->Window();
+ }
}
}
break;
- case nsWindow::ONMOVE:
+ case nsSwitchToUIThread::ONMOVE:
{
NS_ASSERTION(info->nArgs == 0, "Wrong number of arguments to CallMethod");
nsRect r;
// We use this only for tracking whole window moves
GetScreenBounds(r);
if (eWindowType_popup != mWindowType && eWindowType_child != mWindowType)
- DealWithPopups(ONMOVE,nsPoint(0,0));
+ DealWithPopups(nsSwitchToUIThread::ONMOVE,nsPoint(0,0));
OnMove(r.x, r.y);
}
break;
- case nsWindow::ONWORKSPACE:
+ case nsSwitchToUIThread::ONWORKSPACE:
{
NS_ASSERTION(info->nArgs == 2, "Wrong number of arguments to CallMethod");
if (eWindowType_popup != mWindowType && eWindowType_child != mWindowType)
- DealWithPopups(ONWORKSPACE,nsPoint(0,0));
+ DealWithPopups(nsSwitchToUIThread::ONWORKSPACE,nsPoint(0,0));
}
break;
#if defined(BeIME)
- case nsWindow::ONIME:
+ case nsSwitchToUIThread::ONIME:
//No assertion used, as number of arguments varies here
if (mView && mView->LockLooper())
{
@@ -2868,7 +2844,7 @@ bool nsWindowBeOS::QuitRequested( void )
if (w && (t = w->GetToolkit()) != 0)
{
MethodInfo *info = nsnull;
- if (nsnull != (info = new MethodInfo(w, w, nsWindow::CLOSEWINDOW)))
+ if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::CLOSEWINDOW)))
t->CallMethodAsync(info);
NS_RELEASE(t);
}
@@ -2919,7 +2895,7 @@ void nsWindowBeOS::FrameMoved(BPoint origin)
if (w && (t = w->GetToolkit()) != 0)
{
MethodInfo *info = nsnull;
- if (nsnull != (info = new MethodInfo(w, w, nsWindow::ONMOVE)))
+ if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::ONMOVE)))
t->CallMethodAsync(info);
NS_RELEASE(t);
}
@@ -2936,7 +2912,7 @@ void nsWindowBeOS::WindowActivated(bool active)
args[0] = (uint32)active;
args[1] = (uint32)this;
MethodInfo *info = nsnull;
- if (nsnull != (info = new MethodInfo(w, w, nsWindow::ONACTIVATE, 2, args)))
+ if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::ONACTIVATE, 2, args)))
t->CallMethodAsync(info);
NS_RELEASE(t);
}
@@ -2954,7 +2930,7 @@ void nsWindowBeOS::WorkspacesChanged(uint32 oldworkspace, uint32 newworkspace)
args[0] = newworkspace;
args[1] = oldworkspace;
MethodInfo *info = nsnull;
- if (nsnull != (info = new MethodInfo(w, w, nsWindow::ONWORKSPACE, 2, args)))
+ if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::ONWORKSPACE, 2, args)))
t->CallMethodAsync(info);
NS_RELEASE(t);
}
@@ -2971,7 +2947,7 @@ void nsWindowBeOS::FrameResized(float width, float height)
if (w && (t = w->GetToolkit()) != 0)
{
MethodInfo *info = nsnull;
- if (nsnull != (info = new MethodInfo(w, w, nsWindow::ONRESIZE)))
+ if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::ONRESIZE)))
{
t->CallMethodAsync(info);
//Memorize fact of sending message
@@ -3031,7 +3007,7 @@ void nsViewBeOS::Draw(BRect updateRect)
if (w && (t = w->GetToolkit()) != 0)
{
MethodInfo *info = nsnull;
- info = new MethodInfo(w, w, nsWindow::ONPAINT, 1, args);
+ info = new MethodInfo(w, w, nsSwitchToUIThread::ONPAINT, 1, args);
if (info)
{
t->CallMethodAsync(info);
@@ -3106,7 +3082,7 @@ void nsViewBeOS::MouseDown(BPoint point)
args[3] = clicks;
args[4] = modifiers();
MethodInfo *info = nsnull;
- if (nsnull != (info = new MethodInfo(w, w, nsWindow::BTNCLICK, 5, args)))
+ if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::BTNCLICK, 5, args)))
t->CallMethodAsync(info);
NS_RELEASE(t);
}
@@ -3164,7 +3140,7 @@ void nsViewBeOS::MouseMoved(BPoint point, uint32 transit, const BMessage *msg)
}
MethodInfo *moveInfo = nsnull;
- if (nsnull != (moveInfo = new MethodInfo(w, w, nsWindow::ONMOUSE, 1, args)))
+ if (nsnull != (moveInfo = new MethodInfo(w, w, nsSwitchToUIThread::ONMOUSE, 1, args)))
t->CallMethodAsync(moveInfo);
NS_RELEASE(t);
}
@@ -3200,7 +3176,7 @@ void nsViewBeOS::MouseUp(BPoint point)
args[3] = 0;
args[4] = modifiers();
MethodInfo *info = nsnull;
- if (nsnull != (info = new MethodInfo(w, w, nsWindow::BTNCLICK, 5, args)))
+ if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::BTNCLICK, 5, args)))
t->CallMethodAsync(info);
NS_RELEASE(t);
}
@@ -3226,7 +3202,7 @@ void nsViewBeOS::MessageReceived(BMessage *msg)
args[2] = (uint32) aPoint.y;
args[3] = modifiers();
- MethodInfo *info = new MethodInfo(w, w, nsWindow::ONDROP, 4, args);
+ MethodInfo *info = new MethodInfo(w, w, nsSwitchToUIThread::ONDROP, 4, args);
t->CallMethodAsync(info);
BView::MessageReceived(msg);
return;
@@ -3276,7 +3252,7 @@ void nsViewBeOS::MessageReceived(BMessage *msg)
{
MethodInfo *info = nsnull;
- if (nsnull != (info = new MethodInfo(w, w, nsWindow::ONWHEEL, 1, args)))
+ if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::ONWHEEL, 1, args)))
{
t->CallMethodAsync(info);
fWheelDispatched = false;
@@ -3325,7 +3301,7 @@ void nsViewBeOS::KeyDown(const char *bytes, int32 numBytes)
args[4] = keycode;
args[5] = rawcode;
MethodInfo *info = nsnull;
- if (nsnull != (info = new MethodInfo(w, w, nsWindow::ONKEY, 6, args)))
+ if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::ONKEY, 6, args)))
t->CallMethodAsync(info);
NS_RELEASE(t);
}
@@ -3357,7 +3333,7 @@ void nsViewBeOS::KeyUp(const char *bytes, int32 numBytes)
args[4] = keycode;
args[5] = rawcode;
MethodInfo *info = nsnull;
- if (nsnull != (info = new MethodInfo(w, w, nsWindow::ONKEY, 6, args)))
+ if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::ONKEY, 6, args)))
t->CallMethodAsync(info);
NS_RELEASE(t);
}
@@ -3376,13 +3352,13 @@ void nsViewBeOS::MakeFocus(bool focused)
MethodInfo *info = nsnull;
if (!focused)
{
- if (nsnull != (info = new MethodInfo(w, w, nsWindow::KILL_FOCUS,1,args)))
+ if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::KILL_FOCUS,1,args)))
t->CallMethodAsync(info);
}
#ifdef DEBUG_FOCUS
else
{
- if (nsnull != (info = new MethodInfo(w, w, nsWindow::GOT_FOCUS,1,args)))
+ if (nsnull != (info = new MethodInfo(w, w, nsSwitchToUIThread::GOT_FOCUS,1,args)))
t->CallMethodAsync(info);
}
#endif
@@ -3405,7 +3381,7 @@ void nsViewBeOS::DoIME(BMessage *msg)
if (args)
{
msg->Flatten((char*)args, size);
- MethodInfo *info = new MethodInfo(w, w, nsWindow::ONIME, argc, args);
+ MethodInfo *info = new MethodInfo(w, w, nsSwitchToUIThread::ONIME, argc, args);
if (info)
{
t->CallMethodAsync(info);
@@ -3415,4 +3391,4 @@ void nsViewBeOS::DoIME(BMessage *msg)
}
}
}
-#endif
\ No newline at end of file
+#endif
diff --git a/mozilla/widget/src/beos/nsWindow.h b/mozilla/widget/src/beos/nsWindow.h
index dc59b7892c9..c9bbba953b6 100644
--- a/mozilla/widget/src/beos/nsWindow.h
+++ b/mozilla/widget/src/beos/nsWindow.h
@@ -112,6 +112,8 @@ public:
// Utility method for implementing both Create(nsIWidget ...) and
// Create(nsNativeWidget...)
+ NS_IMETHOD PreCreateWidget(nsWidgetInitData *aWidgetInitData);
+
virtual nsresult StandardWindowCreate(nsIWidget *aParent,
const nsRect &aRect,
EVENT_CALLBACK aHandleEventFunction,
@@ -141,6 +143,7 @@ public:
PRInt32 aWidth,
PRInt32 aHeight,
PRBool aRepaint);
+ NS_IMETHOD SetModal(PRBool aModal);
NS_IMETHOD Enable(PRBool aState);
NS_IMETHOD IsEnabled(PRBool *aState);
NS_IMETHOD SetFocus(PRBool aRaise);
@@ -213,49 +216,26 @@ protected:
void HideKids(PRBool state);
- nsViewBeOS* mView;
- PRBool mIsTopWidgetWindow;
nsCOMPtr mParent;
+ nsWindow* mWindowParent;
nsCOMPtr mUpdateArea;
- PRBool mIsMetaDown;
- PRBool mOnDestroyCalled;
- PRBool mIsVisible;
nsIFontMetrics* mFontMetrics;
+
+ nsViewBeOS* mView;
PRInt32 mPreferredWidth;
PRInt32 mPreferredHeight;
- PRBool mEnabled;
- PRBool mJustGotActivate;
- PRBool mJustGotDeactivate;
- PRBool mIsScrolling;
+ window_feel mBWindowFeel;
+
+ //Just for saving space we use packed bools.
+ PRPackedBool mIsTopWidgetWindow;
+ PRPackedBool mIsMetaDown;
+ PRPackedBool mIsVisible;
+ PRPackedBool mEnabled;
+ PRPackedBool mIsScrolling;
+ PRPackedBool mListenForResizes;
+
public: // public on BeOS to allow BViews to access it
- // Enumeration of the methods which are accessable on the "main GUI thread"
- // via the CallMethod(...) mechanism...
- // see nsSwitchToUIThread
- enum
- {
- CREATE = 0x0101,
- CREATE_NATIVE,
- DESTROY,
- SET_FOCUS,
- GOT_FOCUS,
- KILL_FOCUS,
- SET_CURSOR,
- ONMOUSE,
- ONDROP,
- ONWHEEL,
- ONPAINT,
- ONRESIZE,
- CLOSEWINDOW,
- ONKEY,
- BTNCLICK,
- ONACTIVATE,
- ONMOVE,
- ONWORKSPACE
-#if defined(BeIME)
- ,
- ONIME
-#endif
- };
+
nsToolkit *GetToolkit() { return (nsToolkit *)nsBaseWidget::GetToolkit(); }
};
diff --git a/mozilla/widget/src/cocoa/nsChildView.mm b/mozilla/widget/src/cocoa/nsChildView.mm
index 3cae406baa8..ca568d019f3 100644
--- a/mozilla/widget/src/cocoa/nsChildView.mm
+++ b/mozilla/widget/src/cocoa/nsChildView.mm
@@ -2241,6 +2241,9 @@ nsChildView::Idle()
// set the closed hand cursor and record the starting scroll positions
- (void) startHandScroll:(NSEvent*)theEvent
{
+ if (!mGeckoChild)
+ return;
+
mHandScrollStartMouseLoc = [[self window] convertBaseToScreen: [theEvent locationInWindow]];
nsIScrollableView* aScrollableView = [self getScrollableView];
@@ -2257,7 +2260,7 @@ nsChildView::Idle()
- (void) updateHandScroll:(NSEvent*)theEvent
{
nsIScrollableView* aScrollableView = [self getScrollableView];
- if (!aScrollableView)
+ if (!aScrollableView || !mGeckoChild)
return;
NSPoint newMouseLoc = [[self window] convertBaseToScreen: [theEvent locationInWindow]];
@@ -2289,6 +2292,9 @@ nsChildView::Idle()
// the hand scroll cursor.
- (void) setHandScrollCursor:(NSEvent*)theEvent
{
+ if (!mGeckoChild)
+ return;
+
BOOL inMouseView = NO;
// check to see if the user has hand scroll modifiers held down; if so,
@@ -2614,6 +2620,9 @@ nsChildView::Idle()
[self stopHandScroll:theEvent];
return;
}
+ if (!mGeckoChild)
+ return;
+
nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
[self convertEvent:theEvent message:NS_MOUSE_LEFT_BUTTON_UP toGeckoEvent:&geckoEvent];
@@ -2645,9 +2654,11 @@ nsChildView::Idle()
// check if we are in a hand scroll or if the user
// has command and alt held down; if so, we do not want
// gecko messing with the cursor.
- if ([ChildView areHandScrollModifiers:[theEvent modifierFlags]]) {
+ if ([ChildView areHandScrollModifiers:[theEvent modifierFlags]])
return;
- }
+ if (!mGeckoChild)
+ return;
+
nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
[self convertEvent:theEvent message:NS_MOUSE_MOVE toGeckoEvent:&geckoEvent];
@@ -2670,11 +2681,14 @@ nsChildView::Idle()
- (void)mouseDragged:(NSEvent*)theEvent
{
+ if (!mGeckoChild)
+ return;
// if the handscroll flag is set, steal this event
if (mInHandScroll) {
[self updateHandScroll:theEvent];
return;
}
+
nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
[self convertEvent:theEvent message:NS_MOUSE_MOVE toGeckoEvent:&geckoEvent];
@@ -2708,7 +2722,8 @@ nsChildView::Idle()
{
// Gecko may have set the cursor to ibeam or link hand, or handscroll may
// have set it to the open hand cursor. Cocoa won't call this during a drag.
- mGeckoChild->SetCursor(eCursor_standard);
+ if (mGeckoChild)
+ mGeckoChild->SetCursor(eCursor_standard);
// no need to monitor mouse movements outside of the gecko view,
// but make sure we are not a plugin view.
@@ -2718,6 +2733,9 @@ nsChildView::Idle()
- (void)rightMouseDown:(NSEvent *)theEvent
{
+ if (!mGeckoChild)
+ [super rightMouseDown:theEvent];
+
// The right mouse went down. Fire off a right mouse down and
// then send the context menu event.
nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
@@ -2740,6 +2758,9 @@ nsChildView::Idle()
- (void)rightMouseUp:(NSEvent *)theEvent
{
+ if (!mGeckoChild)
+ [super rightMouseUp:theEvent];
+
nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
[self convertEvent:theEvent message:NS_MOUSE_RIGHT_BUTTON_UP toGeckoEvent:&geckoEvent];
@@ -2760,6 +2781,9 @@ nsChildView::Idle()
- (void)otherMouseDown:(NSEvent *)theEvent
{
+ if (!mGeckoChild)
+ return;
+
nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
[self convertEvent:theEvent message:NS_MOUSE_MIDDLE_BUTTON_DOWN toGeckoEvent:&geckoEvent];
geckoEvent.clickCount = [theEvent clickCount];
@@ -2773,6 +2797,9 @@ nsChildView::Idle()
- (void)otherMouseUp:(NSEvent *)theEvent
{
+ if (!mGeckoChild)
+ return;
+
nsMouseEvent geckoEvent(PR_TRUE, 0, nsnull, nsMouseEvent::eReal);
[self convertEvent:theEvent message:NS_MOUSE_MIDDLE_BUTTON_UP toGeckoEvent:&geckoEvent];
@@ -2789,6 +2816,9 @@ nsChildView::Idle()
//
-(void)scrollWheel:(NSEvent*)theEvent forAxis:(enum nsMouseScrollEvent::nsMouseScrollFlags)inAxis
{
+ if (!mGeckoChild)
+ return;
+
float scrollDelta;
if (inAxis & nsMouseScrollEvent::kIsVertical)
@@ -2874,7 +2904,7 @@ nsChildView::Idle()
-(NSMenu*)menuForEvent:(NSEvent*)theEvent
{
- if ([self getIsPluginView])
+ if ([self getIsPluginView] || !mGeckoChild)
return nil;
// Fire the context menu event into Gecko.
@@ -3018,6 +3048,9 @@ static void ConvertCocoaKeyEventToMacEvent(NSEvent* cocoaEvent, EventRecord& mac
- (nsRect)sendCompositionEvent:(PRInt32) aEventType
{
+ if (!mGeckoChild)
+ return nsRect(0, 0, 0, 0);
+
#ifdef DEBUG_IME
NSLog(@"****in sendCompositionEvent; type = %d", aEventType);
#endif
@@ -3035,6 +3068,9 @@ static void ConvertCocoaKeyEventToMacEvent(NSEvent* cocoaEvent, EventRecord& mac
markedRange:(NSRange) markRange
doCommit:(BOOL) doCommit
{
+ if (!mGeckoChild)
+ return;
+
#ifdef DEBUG_IME
NSLog(@"****in sendTextEvent; string = '%@'", aString);
NSLog(@" markRange = %d, %d; selRange = %d, %d", markRange.location, markRange.length, selRange.location, selRange.length);
@@ -3057,6 +3093,9 @@ static void ConvertCocoaKeyEventToMacEvent(NSEvent* cocoaEvent, EventRecord& mac
- (void)insertText:(id)insertString
{
+ if (!mGeckoChild)
+ return;
+
#if DEBUG_IME
NSLog(@"****in insertText: '%@'", insertString);
NSLog(@" markRange = %d, %d; selRange = %d, %d", mMarkedRange.location, mMarkedRange.length, mSelectedRange.location, mSelectedRange.length);
@@ -3210,6 +3249,9 @@ static void ConvertCocoaKeyEventToMacEvent(NSEvent* cocoaEvent, EventRecord& mac
- (NSAttributedString *) attributedSubstringFromRange:(NSRange)theRange
{
+ if (!mGeckoChild)
+ return nil;
+
#if DEBUG_IME
NSLog(@"****in attributedSubstringFromRange");
NSLog(@" theRange = %d, %d", theRange.location, theRange.length);
@@ -3323,7 +3365,7 @@ static void ConvertCocoaKeyEventToMacEvent(NSEvent* cocoaEvent, EventRecord& mac
// since we have no character, there isn't any point to generating
// a gecko event until they have dead key events
BOOL nonDeadKeyPress = [[theEvent characters] length] > 0;
- if (!isARepeat && nonDeadKeyPress)
+ if (!isARepeat && nonDeadKeyPress && mGeckoChild)
{
// Fire a key down. We'll fire key presses via -insertText:
nsKeyEvent geckoEvent(PR_TRUE, 0, nsnull);
@@ -3351,7 +3393,7 @@ static void ConvertCocoaKeyEventToMacEvent(NSEvent* cocoaEvent, EventRecord& mac
return;
}
- if (nonDeadKeyPress)
+ if (nonDeadKeyPress && mGeckoChild)
{
nsKeyEvent geckoEvent(PR_TRUE, 0, nsnull);
geckoEvent.point.x = geckoEvent.point.y = 0;
@@ -3385,7 +3427,7 @@ static void ConvertCocoaKeyEventToMacEvent(NSEvent* cocoaEvent, EventRecord& mac
- (void)keyUp:(NSEvent*)theEvent
{
// if we don't have any characters we can't generate a keyUp event
- if (0 == [[theEvent characters] length])
+ if (!mGeckoChild || [[theEvent characters] length] == 0)
return;
// Fire a key up.
@@ -3407,6 +3449,9 @@ static void ConvertCocoaKeyEventToMacEvent(NSEvent* cocoaEvent, EventRecord& mac
// Fire key up/down events for the modifier keys (shift, alt, ctrl, command).
- (void)flagsChanged:(NSEvent*)theEvent
{
+ if (!mGeckoChild)
+ return;
+
if ([theEvent type] == NSFlagsChanged) {
unsigned int modifiers =
[theEvent modifierFlags] & NSDeviceIndependentModifierFlagsMask;
diff --git a/mozilla/widget/src/photon/nsDragService.cpp b/mozilla/widget/src/photon/nsDragService.cpp
index d78e6ac9839..b97886fdf01 100644
--- a/mozilla/widget/src/photon/nsDragService.cpp
+++ b/mozilla/widget/src/photon/nsDragService.cpp
@@ -263,7 +263,7 @@ NS_IMETHODIMP nsDragService::GetData (nsITransferable * aTransferable, PRUint32
this_len = ( ( this_len + 3 ) / 4 ) * 4;
char *raw_data = flavorStr + strlen( flavorStr ) + 1;
- if( d[0] == aItemIndex && !strcmp( mFlavourStr, flavorStr ) ) {
+ if( d[0] == aItemIndex && mFlavourStr && !strcmp( mFlavourStr, flavorStr ) ) {
nsPrimitiveHelpers::CreatePrimitiveForData( flavorStr, raw_data, d[1], getter_AddRefs( genericDataWrapper ) );
rv = aTransferable->SetTransferData( flavorStr, genericDataWrapper, d[1] );
break;
diff --git a/mozilla/widget/src/photon/nsWidget.cpp b/mozilla/widget/src/photon/nsWidget.cpp
index 5bc2d86de87..18e5bdcd3cb 100644
--- a/mozilla/widget/src/photon/nsWidget.cpp
+++ b/mozilla/widget/src/photon/nsWidget.cpp
@@ -1011,7 +1011,8 @@ inline PRBool nsWidget::HandleEvent( PtWidget_t *widget, PtCallbackInfo_t* aCbIn
/* there should be no reason to do this - mozilla should figure out how to call SetFocus */
/* this though fixes the problem with the plugins capturing the focus */
PtWidget_t *disjoint = PtFindDisjoint( widget );
- if( PtWidgetIsClassMember( disjoint, PtServer ) )
+ if( PtWidgetIsClassMember( disjoint, PtServer ) || //mozserver
+ PtWidgetIsClassMember( disjoint, PtContainer ) ) //TestPhEmbed
PtContainerGiveFocus( widget, aCbInfo->event );
if( ptrev ) {
diff --git a/mozilla/widget/src/windows/nsWindow.cpp b/mozilla/widget/src/windows/nsWindow.cpp
index facbd778ae9..87acd61c89f 100644
--- a/mozilla/widget/src/windows/nsWindow.cpp
+++ b/mozilla/widget/src/windows/nsWindow.cpp
@@ -224,76 +224,6 @@ static PRBool gOverrideHWKeys = PR_TRUE;
static PRInt32 gSoftkeyContextDelay = 1000;
static PRInt32 gBackRepeatDelay = 500;
-typedef BOOL (__stdcall *UnregisterFunc1Proc)( UINT, UINT );
-static UnregisterFunc1Proc gProcUnregisterFunc = NULL;
-static HINSTANCE gCoreDll = NULL;
-
-UINT gHardwareKeys[][2] =
- {
- { 0xc1, MOD_WIN },
- { 0xc2, MOD_WIN },
- { 0xc3, MOD_WIN },
- { 0xc4, MOD_WIN },
- { 0xc5, MOD_WIN },
- { 0xc6, MOD_WIN },
-
- { 0x72, 0 },// Answer - 0x72 Modifier - 0
- { 0x73, 0 },// Hangup - 0x73 Modifier - 0
- { 0x74, 0 },//
- { 0x75, 0 },// Volume Up - 0x75 Modifier - 0
- { 0x76, 0 },// Volume Down - 0x76 Modifier - 0
- { 0, 0 },
- };
-
-static void MapHardwareButtons(HWND window)
-{
- if (!window)
- return;
-
- // handle hardware buttons so that they broadcast into our
- // application. the following code is based on an article
- // on the Pocket PC Developer Network:
- //
- // http://www.pocketpcdn.com/articles/handle_hardware_keys.html
-
- if (gOverrideHWKeys)
- {
- if (!gProcUnregisterFunc)
- {
- gCoreDll = LoadLibrary(_T("coredll.dll")); // leak
-
- if (gCoreDll)
- gProcUnregisterFunc = (UnregisterFunc1Proc)GetProcAddress( gCoreDll, _T("UnregisterFunc1"));
- }
-
- if (gProcUnregisterFunc)
- {
- for (int i=0; gHardwareKeys[i][0]; i++)
- {
- UINT mod = gHardwareKeys[i][1];
- UINT kc = gHardwareKeys[i][0];
-
- gProcUnregisterFunc(mod, kc);
- RegisterHotKey(window, kc, mod, kc);
- }
- }
- }
-}
-
-static void UnmapHardwareButtons()
-{
- if (!gProcUnregisterFunc)
- return;
-
- for (int i=0; gHardwareKeys[i][0]; i++)
- {
- UINT mod = gHardwareKeys[i][1];
- UINT kc = gHardwareKeys[i][0];
-
- gProcUnregisterFunc(mod, kc);
- }
-}
-
// We want the back key to be able to repeat while the key is held down.
VOID CALLBACK BackSoftkeyTimer(HWND hwnd, UINT uMsg, UINT idEvent, DWORD dwTime)
{
@@ -1796,7 +1726,6 @@ nsWindow::StandardWindowCreate(nsIWidget *aParent,
mWindowType == eWindowType_popup )
{
CreateSoftKeyMenuBar(mWnd);
- MapHardwareButtons(mWnd);
}
#endif
@@ -2537,10 +2466,6 @@ NS_METHOD nsWindow::SetFocus(PRBool aRaise)
::ShowWindow(toplevelWnd, SW_RESTORE);
::SetFocus(mWnd);
-#ifdef WINCE
- MapHardwareButtons(mWnd);
-#endif
-
}
return NS_OK;
}
@@ -4761,44 +4686,6 @@ PRBool nsWindow::ProcessMessage(UINT msg, WPARAM wParam, LPARAM lParam, LRESULT
result = 0;
break;
}
-
- nsString key;
-
- switch (wParam)
- {
- case VK_APP1:
- key = NS_LITERAL_STRING("VK_APP1");
- break;
-
- case VK_APP2:
- key = NS_LITERAL_STRING("VK_APP2");
- break;
-
- case VK_APP3:
- key = NS_LITERAL_STRING("VK_APP3");
- break;
-
- case VK_APP4:
- key = NS_LITERAL_STRING("VK_APP4");
- break;
-
- case VK_APP5:
- key = NS_LITERAL_STRING("VK_APP5");
- break;
-
- case VK_APP6:
- key = NS_LITERAL_STRING("VK_APP6");
- break;
- default:
- key = NS_LITERAL_STRING("unknown");
- }
-
- result = 0;
-
- nsCOMPtr observerService = do_GetService("@mozilla.org/observer-service;1");
- if (observerService)
- observerService->NotifyObservers(nsnull, "hardware-key", key.get());
-
}
break;
#endif
diff --git a/mozilla/xpcom/build/nsXPCOMCID.h b/mozilla/xpcom/build/nsXPCOMCID.h
index 4920322c401..19b47f6397a 100644
--- a/mozilla/xpcom/build/nsXPCOMCID.h
+++ b/mozilla/xpcom/build/nsXPCOMCID.h
@@ -181,4 +181,11 @@
{ 0xb9, 0xb8, 0xc8, 0x11, 0x75, 0x95, 0x51, 0x99 } }
#define NS_HASH_PROPERTY_BAG_CONTRACTID "@mozilla.org/hash-property-bag;1"
+/**
+ * A service that wants to be notified before and after event queues
+ * will process events.
+ */
+#define NS_EVENT_QUEUE_LISTENER_CONTRACTID \
+ "@mozilla.org/event-queue-listener;1"
+
#endif
diff --git a/mozilla/xpcom/threads/Makefile.in b/mozilla/xpcom/threads/Makefile.in
index 2cb9bc61a04..203b702e111 100644
--- a/mozilla/xpcom/threads/Makefile.in
+++ b/mozilla/xpcom/threads/Makefile.in
@@ -86,6 +86,7 @@ XPIDLSRCS = \
nsIEventTarget.idl \
nsIEventQueue.idl \
nsIEventQueueService.idl \
+ nsIEventQueueListener.idl \
nsIEnvironment.idl \
nsIProcess.idl \
nsISupportsPriority.idl \
diff --git a/mozilla/xpcom/threads/nsEventQueue.cpp b/mozilla/xpcom/threads/nsEventQueue.cpp
index 6d375e7eef8..cd075d5b731 100644
--- a/mozilla/xpcom/threads/nsEventQueue.cpp
+++ b/mozilla/xpcom/threads/nsEventQueue.cpp
@@ -39,6 +39,7 @@
#include "nsEventQueue.h"
#include "nsIEventQueueService.h"
#include "nsIThread.h"
+#include "nsIEventQueueListener.h"
#include "nsIServiceManager.h"
#include "nsIObserverService.h"
@@ -66,6 +67,31 @@ static PRThread *gEventQueueLogThread = 0;
static const char gActivatedNotification[] = "nsIEventQueueActivated";
static const char gDestroyedNotification[] = "nsIEventQueueDestroyed";
+class ListenerCaller {
+public:
+ ListenerCaller(nsIEventQueue* aQueue, nsresult* rv) : mQueue(aQueue)
+ {
+ mListener = do_GetService(NS_EVENT_QUEUE_LISTENER_CONTRACTID);
+ // There might be no listener... but if so, warn
+ if (mListener) {
+ *rv = mListener->WillProcessEvents(mQueue);
+ } else {
+ NS_WARNING("No event queue listener?");
+ *rv = NS_OK;
+ }
+ }
+
+ ~ListenerCaller() {
+ if (mListener) {
+ mListener->DidProcessEvents(mQueue);
+ }
+ }
+
+private:
+ nsIEventQueue* mQueue;
+ nsCOMPtr mListener;
+};
+
nsEventQueueImpl::nsEventQueueImpl()
{
NS_ADDREF_THIS();
@@ -402,6 +428,11 @@ nsEventQueueImpl::ProcessPendingEvents()
if (!correctThread)
return NS_ERROR_FAILURE;
+
+ nsresult rv;
+ ListenerCaller caller(this, &rv);
+ NS_ENSURE_SUCCESS(rv, rv);
+
#if defined(PR_LOGGING) && defined(DEBUG_danm)
++gEventQueueLogPPLevel;
if ((gEventQueueLogQueue != mEventQueue || gEventQueueLogThread != PR_GetCurrentThread() ||
@@ -471,6 +502,10 @@ nsEventQueueImpl::HandleEvent(PLEvent* aEvent)
if (!correctThread)
return NS_ERROR_FAILURE;
+ nsresult rv;
+ ListenerCaller caller(this, &rv);
+ NS_ENSURE_SUCCESS(rv, rv);
+
#if defined(PR_LOGGING) && defined(DEBUG_danm)
PR_LOG(gEventQueueLog, PR_LOG_DEBUG,
("EventQueue: handle event [queue=%lx, accept=%d, could=%d]",
diff --git a/mozilla/xpcom/threads/nsIEventQueueListener.idl b/mozilla/xpcom/threads/nsIEventQueueListener.idl
new file mode 100644
index 00000000000..fa988dd4e17
--- /dev/null
+++ b/mozilla/xpcom/threads/nsIEventQueueListener.idl
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
+/* vim:set ts=2 sw=2 sts=2 et cindent: */
+/* ***** 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 code.
+ *
+ * The Initial Developer of the Original Code is the Mozilla Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ * Boris Zbarsky
+ *
+ * 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 ***** */
+
+#include "nsISupports.idl"
+
+interface nsIEventQueue;
+
+/**
+ * This interface represents a listener who wants to be notified when
+ * an event queue is about to process events or when it has finished
+ * processing events.
+ */
+[uuid(7579c049-8f16-4981-a6fb-a2c4126799ca)]
+interface nsIEventQueueListener : nsISupports
+{
+ /**
+ * Call before processing events.
+ *
+ * @param aQueue the queue that will process events
+ *
+ * If this method throws, events should NOT be processed.
+ */
+ void willProcessEvents(in nsIEventQueue aQueue);
+
+ /**
+ * Call after processing events.
+ *
+ * @param aQueue the queue that has processed events
+ */
+ void didProcessEvents(in nsIEventQueue aQueue);
+};
diff --git a/mozilla/xpcom/threads/nsThread.cpp b/mozilla/xpcom/threads/nsThread.cpp
index 46c923d9298..b43294c232a 100644
--- a/mozilla/xpcom/threads/nsThread.cpp
+++ b/mozilla/xpcom/threads/nsThread.cpp
@@ -470,9 +470,17 @@ void
nsThread::Shutdown()
{
if (gMainThread) {
- // XXX nspr doesn't seem to be calling the main thread's destructor
- // callback, so let's help it out:
- nsThread::Exit(NS_STATIC_CAST(nsThread*, gMainThread));
+ // In most recent versions of NSPR the main thread's destructor
+ // callback will get called.
+ // In older versions of NSPR it will not get called,
+ // (unless we call PR_Cleanup).
+ // Because of that we:
+ // - call the function ourselves
+ // - set the data pointer to NULL to ensure the function will
+ // not get called again by NSPR
+ // The PR_SetThreadPrivate call does both of these.
+ // See also bugs 379550, 362768.
+ PR_SetThreadPrivate(kIThreadSelfIndex, NULL);
nsrefcnt cnt;
NS_RELEASE2(gMainThread, cnt);
NS_WARN_IF_FALSE(cnt == 0, "Main thread being held past XPCOM shutdown.");
diff --git a/mozilla/xpfe/global/resources/content/license.html b/mozilla/xpfe/global/resources/content/license.html
index 5b98111d764..cbcc05cdb5b 100755
--- a/mozilla/xpfe/global/resources/content/license.html
+++ b/mozilla/xpfe/global/resources/content/license.html
@@ -701,11 +701,12 @@ under either the MPL or the [___] License."
-
Aaron Leventhal,
+Aaron Schulman,
ActiveState Tool Corp,
Akkana Peck,
Alex Fritze,
@@ -714,6 +715,7 @@ Alexander Surkov,
Andreas Otte,
Andreas Premstaller,
Andrew Thompson,
+ArentJan Banck,
Asaf Romano,
Axel Hecht,
Ben Bucksch,
@@ -727,9 +729,12 @@ Brendan Eich,
Brian Bober,
Brian Ryner,
Brian Stell,
+Bruce Davidson,
Bruno Haible,
+Calum Robinson,
Cedric Chantepie,
Chiaki Koufugata,
+Chris McAfee,
Christian Biesinger,
Christopher A. Aillon,
Christopher Blizzard,
@@ -740,6 +745,7 @@ Conrad Carlen,
Crocodile Clips Ltd,
Cyrus Patel,
Dainis Jonitis,
+Dan Mosedale,
Daniel Brooks,
Daniel Glazman,
Daniel Kouril,
@@ -756,18 +762,20 @@ Digital Creations 2 Inc,
Doron Rosenberg,
Doug Turner,
Elika J. Etemad,
+Eric Belhaire,
Eric Hodel,
Esben Mose Hansen,
Frank Schönheit,
Fredrik Holmqvist,
Gavin Sharp,
+Geoff Beier,
Gervase Markham,
Giorgio Maone,
-Google,
Google Inc,
+Håkan Waara,
+Henri Torgemane,
Heriot-Watt University,
Hewlett-Packard Company,
-Håkan Waara,
i-DNS.net International,
Ian Hickson,
Ian Oeschger,
@@ -780,8 +788,10 @@ James Ross,
Jamie Zawinski,
Jan Varga,
Jason Barnabe,
+Jean-Francois Ducarroz,
Jeff Tsai,
Jeff Walden,
+Jefferson Software Inc,
Joe Hewitt,
Joey Minta,
John B. Keiser,
@@ -790,27 +800,36 @@ John Fairhurst,
John Wolfe,
Jonas Sicking,
Jonathan Watt,
+Josh Aas,
Josh Soref,
Juan Lang,
Jungshik Shin,
+Jussi Kukkonen,
Karsten Düsterloh,
Keith Visco,
Ken Herron,
+Kevin Gerich,
Kipp E.B. Hickman,
L. David Baron,
Lixto GmbH,
Makoto Kato,
+Marc Bevand,
Marco Manfredini,
Marco Pesenti Gritti,
Mark Hammond,
Mark Mentovai,
Markus G. Kuhn,
+Matt Judy,
+Matthew Willis,
+Merle Sterling,
Michael J. Fromberger,
Michal Ceresna,
Michiel van Leeuwen,
Mike Connor,
Mike Pinkerton,
+Mike Potter,
Mike Shaver,
+MITRE Corporation,
Mozdev Group,
Mozilla Corporation,
Mozilla Foundation,
@@ -818,20 +837,24 @@ Naoki Hotta,
Neil Deakin,
Neil Rashbrook,
Nelson B. Bolyard,
-Netscape Commmunications Corp,
Netscape Communications Corporation,
New Dimensions Consulting,
Novell Inc,
+OEone Corporation,
Olli Pettay,
Oracle Corporation,
Owen Taylor,
Paul Ashford,
-Paul Kocher of Cryptography Research,
+Paul Kocher,
Paul Sandoz,
Peter Annema,
Peter Hartshorn,
Peter Van der Beken,
+Phil Ringnalda,
+Philipp Kewisch,
Pierre Chanial,
+Prachi Gauriar,
+Qualcomm Inc,
R.J. Keller,
Rajiv Dayal,
Ramalingam Saravanan,
@@ -858,25 +881,29 @@ Sergei Dolgov,
Seth Spitzer,
Shy Shalom,
Silverstone Interactive,
-Simon Bünzli,
+Simdesk Technologies Inc,
+Simon Bënzli,
Simon Fraser,
Simon Montagu,
+Simon Paquet,
Simon Wilkinson,
+Sqlite Project,
Srilatha Moturi,
+Stefan Sitter,
+Stephen Horlander,
Steve Swanson,
+Stuart Morgan,
Stuart Parmenter,
Sun Microsystems Inc,
-The MITRE Corporation,
-The Mozilla Corporation,
-The sqlite Project,
-The University of Queensland,
Tim Copperfield,
Tom Germeau,
Tomas Müller,
+University of Queensland,
Vincent Béron,
Vladimir Vukicevic,
+Wolfgang Rosenauer,
YAMASHITA Makoto,
-Zack Rusin and
+Zack Rusin,
Zero-Knowledge Systems.
diff --git a/mozilla/xpinstall/src/nsXPInstallManager.cpp b/mozilla/xpinstall/src/nsXPInstallManager.cpp
index 0aa284bfae6..79df75604d6 100644
--- a/mozilla/xpinstall/src/nsXPInstallManager.cpp
+++ b/mozilla/xpinstall/src/nsXPInstallManager.cpp
@@ -65,6 +65,7 @@
#include "nsInstallResources.h"
#include "nsIProxyObjectManager.h"
#include "nsIWindowWatcher.h"
+#include "nsIAuthPrompt.h"
#include "nsIWindowMediator.h"
#include "nsIDOMWindowInternal.h"
#include "nsDirectoryService.h"
@@ -1162,6 +1163,22 @@ nsXPInstallManager::OnStatus(nsIRequest* request, nsISupports *ctxt,
NS_IMETHODIMP
nsXPInstallManager::GetInterface(const nsIID & eventSinkIID, void* *_retval)
{
+ if (eventSinkIID.Equals(NS_GET_IID(nsIAuthPrompt))) {
+ *_retval = nsnull;
+
+ nsresult rv;
+ nsCOMPtr ww(do_GetService(NS_WINDOWWATCHER_CONTRACTID, &rv));
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ nsCOMPtr prompt;
+ rv = ww->GetNewAuthPrompter(nsnull, getter_AddRefs(prompt));
+ NS_ENSURE_SUCCESS(rv, rv);
+
+ nsIAuthPrompt *p = prompt.get();
+ NS_ADDREF(p);
+ *_retval = p;
+ return NS_OK;
+ }
return QueryInterface(eventSinkIID, (void**)_retval);
}