Merge from cvs-trunk-mirror to mozilla-central.
authorjorendorff@mozilla.com
Mon, 07 Jan 2008 12:35:51 -0600
changeset 9820 4b4c7b7ea2ad69eede203efbeab5e83c1f96b342
parent 9014 5603fa93e575d0c274fedfbf3eac4c768f49a412 (current diff)
parent 9819 78d445df561d51bbb47c69b84a360b65b880abb1 (diff)
child 9995 27d22dda60ff95674d1e83c6d520f1d905fd256a
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
milestone1.9b3pre
Merge from cvs-trunk-mirror to mozilla-central.
build/wince/shunt/build/mozce_shunt/mozce_shunt.sln
build/wince/shunt/build/mozce_shunt/mozce_shunt.vcproj
build/wince/shunt/build/shunt.vcb
build/wince/shunt/build/shunt.vcl
build/wince/shunt/build/shunt.vco
build/wince/shunt/build/shunt.vcp
build/wince/shunt/build/shunt.vcw
build/wince/shunt/build/static/static.sln
build/wince/shunt/build/static/static.vcp
build/wince/shunt/build/static/static.vcproj
build/wince/shunt/build/static/static.vcw
build/wince/shunt/include/assert.h
build/wince/shunt/include/crtdbg.h
build/wince/shunt/include/ddeml.h
build/wince/shunt/include/time.h
build/wince/shunt/include/unistd.h
build/wince/shunt/include/varargs.h
build/wince/shunt/include/winresrc.h
build/wince/shunt/include/winsock2.h
build/wince/shunt/include/winsvc.h
client.mk
client.py
config/rules.mk
configure.in
db/sqlite3/preload-cache.patch
js/src/Makefile.in
js/src/js.cpp
js/src/jsapi.cpp
js/src/jsarray.cpp
js/src/jsbool.cpp
js/src/jscntxt.cpp
js/src/jsdate.cpp
js/src/jsemit.cpp
js/src/jsfun.cpp
js/src/jsgc.cpp
js/src/jsinterp.cpp
js/src/jsiter.cpp
js/src/jslock.cpp
js/src/jsnum.cpp
js/src/jsobj.cpp
js/src/jsparse.cpp
js/src/jsregexp.cpp
js/src/jsstr.cpp
js/src/jsxml.cpp
js/src/xpconnect/tests/mochitest/test_xow.html
js/tests/e4x/Regress/regress-407323.js
js/tests/js1_5/Regress/regress-406769.js
js/tests/js1_5/Regress/regress-407323.js
js/tests/js1_5/Regress/regress-407957.js
js/tests/js1_5/extensions/regress-351463-01.js
js/tests/js1_5/extensions/regress-407501.js
js/tests/js1_7/regress/regress-406477.js
js/tests/js1_7/regress/regress-407727-01.js
js/tests/js1_7/regress/regress-407727-02.js
js/tests/js1_7/regress/regress-407957.js
layout/reftests/bugs/271747-1-ref.html
layout/reftests/bugs/271747-1a.html
layout/reftests/bugs/271747-1b.html
layout/reftests/bugs/402807-1-ref.html
layout/reftests/bugs/402807-1.html
layout/reftests/bugs/403519-2-ref.html
layout/reftests/bugs/403519-2.html
layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01-ref.svg
layout/reftests/svg/moz-only/zoomed-svg-with-viewBox-01.svg
toolkit/components/places/tests/unit/test_408221.js
widget/src/os2/nsPaletteOS2.cpp
widget/src/os2/nsPaletteOS2.h
widget/src/photon/nsPhMozRemoteHelper.h
xpcom/ds/nsUnitConversion.h
xpcom/io/nsStringIO.h
--- a/accessible/src/base/nsAccessNode.h
+++ b/accessible/src/base/nsAccessNode.h
@@ -113,16 +113,21 @@ class nsAccessNode: public nsIAccessNode
                                             nsIDOMCSSStyleDeclaration **aCssDecl);
 
     already_AddRefed<nsRootAccessible> GetRootAccessible();
 
     static nsIDOMNode *gLastFocusedNode;
     static nsIAccessibilityService* GetAccService();
     already_AddRefed<nsIDOMNode> GetCurrentFocus();
 
+    /**
+     * Returns true when the accessible is defunct.
+     */
+    virtual PRBool IsDefunct() { return !mDOMNode; }
+
 protected:
     nsresult MakeAccessNode(nsIDOMNode *aNode, nsIAccessNode **aAccessNode);
     already_AddRefed<nsIPresShell> GetPresShell();
     nsPresContext* GetPresContext();
     already_AddRefed<nsIAccessibleDocument> GetDocAccessible();
     void LastRelease();
 
     nsCOMPtr<nsIDOMNode> mDOMNode;
--- a/accessible/src/base/nsAccessibilityService.cpp
+++ b/accessible/src/base/nsAccessibilityService.cpp
@@ -1346,18 +1346,23 @@ NS_IMETHODIMP nsAccessibilityService::Ge
     return NS_OK;
 
   /**
    * Attempt to create an accessible based on what we know
    */
   if (content->IsNodeOfType(nsINode::eTEXT)) {
     // --- Create HTML for visible text frames ---
     if (frame->IsEmpty()) {
-      *aIsHidden = PR_TRUE;
-      return NS_OK;
+      nsAutoString renderedWhitespace;
+      frame->GetRenderedText(&renderedWhitespace, nsnull, nsnull, 0, 1);
+      if (renderedWhitespace.IsEmpty()) {
+        // Really empty -- nothing is rendered
+        *aIsHidden = PR_TRUE;
+        return NS_OK;
+      }
     }
     frame->GetAccessible(getter_AddRefs(newAcc));
     return InitAccessible(newAcc, aAccessible, nsnull);
   }
 
   nsRoleMapEntry *roleMapEntry = nsAccUtils::GetRoleMapEntry(aNode);
   if (roleMapEntry && !nsCRT::strcmp(roleMapEntry->roleString, "presentation") &&
       !content->IsFocusable()) { // For presentation only
--- a/accessible/src/base/nsAccessible.cpp
+++ b/accessible/src/base/nsAccessible.cpp
@@ -932,22 +932,27 @@ PRBool nsAccessible::IsVisible(PRBool *a
   }
 
   nsRectVisibility rectVisibility;
   viewManager->GetRectVisibility(containingView, relFrameRect,
                                  nsPresContext::CSSPixelsToAppUnits(kMinPixels),
                                  &rectVisibility);
 
   if (rectVisibility == nsRectVisibility_kZeroAreaRect) {
-    if (frame->GetNextContinuation()) {
+    nsIAtom *frameType = frame->GetType();
+    if (frameType == nsAccessibilityAtoms::textFrame) {
       // Zero area rects can occur in the first frame of a multi-frame text flow,
-      // in which case the next frame exists because the text flow is visible
-      rectVisibility = nsRectVisibility_kVisible;
+      // in which case the rendered text is not empty and the frame should not be marked invisible
+      nsAutoString renderedText;
+      frame->GetRenderedText (&renderedText, nsnull, nsnull, 0, 1);
+      if (!renderedText.IsEmpty()) {
+        rectVisibility = nsRectVisibility_kVisible;
+      }
     }
-    else if (IsCorrectFrameType(frame, nsAccessibilityAtoms::inlineFrame)) {
+    else if (frameType == nsAccessibilityAtoms::inlineFrame) {
       // Yuck. Unfortunately inline frames can contain larger frames inside of them,
       // so we can't really believe this is a zero area rect without checking more deeply.
       // GetBounds() will do that for us.
       PRInt32 x, y, width, height;
       GetBounds(&x, &y, &width, &height);
       if (width > 0 && height > 0) {
         rectVisibility = nsRectVisibility_kVisible;    
       }
--- a/accessible/src/base/nsCaretAccessible.cpp
+++ b/accessible/src/base/nsCaretAccessible.cpp
@@ -162,16 +162,17 @@ nsresult nsCaretAccessible::RemoveDocSel
 
 NS_IMETHODIMP nsCaretAccessible::NotifySelectionChanged(nsIDOMDocument *aDoc, nsISelection *aSel, PRInt16 aReason)
 {
   NS_ENSURE_TRUE(mRootAccessible, NS_ERROR_FAILURE);
 
   mLastUsedSelection = do_GetWeakReference(aSel);
 
   nsCOMPtr<nsIDocument> doc = do_QueryInterface(aDoc);
+  NS_ENSURE_TRUE(doc, NS_OK);
   nsIPresShell *presShell = doc->GetPrimaryShell();
   NS_ENSURE_TRUE(presShell, NS_OK);
 
   // Get first nnsIAccessibleText in parent chain and fire caret-move, selection-change event for it
   nsCOMPtr<nsIAccessible> accessible;
   nsIAccessibilityService *accService = mRootAccessible->GetAccService();
   NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
   // Get accessible from selection's focus node or its parent
--- a/accessible/src/base/nsDocAccessible.cpp
+++ b/accessible/src/base/nsDocAccessible.cpp
@@ -529,27 +529,35 @@ NS_IMETHODIMP nsDocAccessible::Shutdown(
     mDocLoadTimer->Cancel();
     mDocLoadTimer = nsnull;
   }
 
   RemoveEventListeners();
 
   mWeakShell = nsnull;  // Avoid reentrancy
 
-  if (mFireEventTimer) {
-    mFireEventTimer->Cancel();
-    mFireEventTimer = nsnull;
-  }
-  mEventsToFire.Clear();
-
   ClearCache(mAccessNodeCache);
 
   mDocument = nsnull;
 
-  return nsHyperTextAccessibleWrap::Shutdown();
+  nsHyperTextAccessibleWrap::Shutdown();
+
+  if (mFireEventTimer) {
+    // Doc being shut down before events fired,
+    mFireEventTimer->Cancel();
+    mFireEventTimer = nsnull;
+    if (mEventsToFire.Count() > 0 ) {
+      mEventsToFire.Clear();
+      // Make sure we release the kung fu death grip which is always
+      // there when there are still events left to be fired
+      NS_RELEASE_THIS();
+    }
+  }
+
+  return NS_OK;
 }
 
 void nsDocAccessible::ShutdownChildDocuments(nsIDocShellTreeItem *aStart)
 {
   nsCOMPtr<nsIDocShellTreeNode> treeNode(do_QueryInterface(aStart));
   if (treeNode) {
     PRInt32 subDocuments;
     treeNode->GetChildCount(&subDocuments);
@@ -1466,16 +1474,17 @@ nsDocAccessible::FireDelayedAccessibleEv
       }
     }
   }
 
   mEventsToFire.AppendObject(aEvent);
   if (!isTimerStarted) {
     // This is be the first delayed event in queue, start timer
     // so that event gets fired via FlushEventsCallback
+    NS_ADDREF_THIS(); // Kung fu death grip to prevent crash in callback
     mFireEventTimer->InitWithFuncCallback(FlushEventsCallback,
                                           static_cast<nsPIAccessibleDocument*>(this),
                                           0, nsITimer::TYPE_ONE_SHOT);
   }
 
   return NS_OK;
 }
 
@@ -1590,24 +1599,29 @@ NS_IMETHODIMP nsDocAccessible::FlushPend
           if (hidingNode) {
             RefreshNodes(hidingNode); // Will this bite us with asynch events
           }
         }
       }
     }
   }
   mEventsToFire.Clear(); // Clear out array
+  NS_RELEASE_THIS(); // Release kung fu death grip
   return NS_OK;
 }
 
 void nsDocAccessible::FlushEventsCallback(nsITimer *aTimer, void *aClosure)
 {
   nsPIAccessibleDocument *accessibleDoc = static_cast<nsPIAccessibleDocument*>(aClosure);
   NS_ASSERTION(accessibleDoc, "How did we get here without an accessible document?");
-  accessibleDoc->FlushPendingEvents();
+  if (accessibleDoc) {
+    // A lot of crashes were happening here, so now we're reffing the doc
+    // now until the events are flushed
+    accessibleDoc->FlushPendingEvents();
+  }
 }
 
 void nsDocAccessible::RefreshNodes(nsIDOMNode *aStartNode)
 {
   nsCOMPtr<nsIAccessNode> accessNode;
   GetCachedAccessNode(aStartNode, getter_AddRefs(accessNode));
   nsCOMPtr<nsIDOMNode> nextNode, iterNode;
 
--- a/accessible/src/html/nsHTMLTableAccessible.cpp
+++ b/accessible/src/html/nsHTMLTableAccessible.cpp
@@ -502,16 +502,18 @@ nsHTMLTableAccessible::GetSelectedRows(P
   *aRows = outArray;
   return rv;
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::CellRefAt(PRInt32 aRow, PRInt32 aColumn,
                                  nsIAccessible **aTableCellAccessible)
 {
+  NS_ENSURE_TRUE(IsValidRow(aRow) && IsValidColumn(aColumn), NS_ERROR_INVALID_ARG);
+
   nsresult rv = NS_OK;
 
   nsCOMPtr<nsIDOMElement> cellElement;
   rv = GetCellAt(aRow, aColumn, *getter_AddRefs(cellElement));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIAccessibilityService>
     accService(do_GetService("@mozilla.org/accessibilityService;1"));
@@ -522,16 +524,18 @@ nsHTMLTableAccessible::CellRefAt(PRInt32
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::GetIndexAt(PRInt32 aRow, PRInt32 aColumn,
                                   PRInt32 *aIndex)
 {
   NS_ENSURE_ARG_POINTER(aIndex);
 
+  NS_ENSURE_TRUE(IsValidRow(aRow) && IsValidColumn(aColumn), NS_ERROR_INVALID_ARG);
+
   nsresult rv = NS_OK;
   nsCOMPtr<nsIDOMElement> domElement;
   rv = GetCellAt(aRow, aColumn, *getter_AddRefs(domElement));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIAccessible> accessible;
   GetAccService()->GetCachedAccessible(domElement, mWeakShell, getter_AddRefs(accessible));
   if (accessible) {
@@ -545,57 +549,67 @@ nsHTMLTableAccessible::GetIndexAt(PRInt3
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::GetColumnAtIndex(PRInt32 aIndex, PRInt32 *aColumn)
 {
   NS_ENSURE_ARG_POINTER(aColumn);
 
   nsCOMPtr<nsIAccessible> child;
   GetChildAt(aIndex, getter_AddRefs(child));
+  NS_ENSURE_TRUE(child, NS_ERROR_FAILURE);
   nsCOMPtr<nsPIAccessNode> childNode(do_QueryInterface(child));
+  NS_ASSERTION(childNode, "childNode not valid in GetColumnAtIndex!");
   nsIFrame* frame = childNode->GetFrame();
+  NS_ENSURE_TRUE(frame, NS_ERROR_FAILURE);
   nsCOMPtr<nsITableCellLayout> cellLayout(do_QueryInterface(frame));
   NS_ENSURE_TRUE(cellLayout, NS_ERROR_FAILURE);
   return cellLayout->GetColIndex(*aColumn);
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::GetRowAtIndex(PRInt32 aIndex, PRInt32 *aRow)
 {
   NS_ENSURE_ARG_POINTER(aRow);
 
   nsCOMPtr<nsIAccessible> child;
   GetChildAt(aIndex, getter_AddRefs(child));
+  NS_ENSURE_TRUE(child, NS_ERROR_FAILURE);
   nsCOMPtr<nsPIAccessNode> childNode(do_QueryInterface(child));
+  NS_ASSERTION(childNode, "childNode not valid in GetRowAtIndex!");
   nsIFrame* frame = childNode->GetFrame();
+  NS_ENSURE_TRUE(frame, NS_ERROR_FAILURE);
   nsCOMPtr<nsITableCellLayout> cellLayout(do_QueryInterface(frame));
   NS_ENSURE_TRUE(cellLayout, NS_ERROR_FAILURE);
   return cellLayout->GetRowIndex(*aRow);
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::GetColumnExtentAt(PRInt32 aRow, PRInt32 aColumn,
                                          PRInt32 *_retval)
 {
+  NS_ENSURE_TRUE(IsValidRow(aRow) && IsValidColumn(aColumn), NS_ERROR_INVALID_ARG);
+
   nsresult rv = NS_OK;
 
   nsCOMPtr<nsIDOMElement> domElement;
   rv = GetCellAt(aRow, aColumn, *getter_AddRefs(domElement));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDOMHTMLTableCellElement> cell(do_QueryInterface(domElement));
   NS_ENSURE_TRUE(cell, NS_ERROR_FAILURE);
 
   return cell->GetColSpan(_retval);
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::GetRowExtentAt(PRInt32 aRow, PRInt32 aColumn,
                                       PRInt32 *_retval)
 {
+  NS_ENSURE_TRUE(IsValidRow(aRow) && IsValidColumn(aColumn), NS_ERROR_INVALID_ARG);
+
   nsresult rv = NS_OK;
 
   nsCOMPtr<nsIDOMElement> domElement;
   rv = GetCellAt(aRow, aColumn, *getter_AddRefs(domElement));
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDOMHTMLTableCellElement> cell(do_QueryInterface(domElement));
   NS_ENSURE_TRUE(cell, NS_ERROR_FAILURE);
@@ -615,16 +629,18 @@ nsHTMLTableAccessible::GetRowDescription
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::IsColumnSelected(PRInt32 aColumn, PRBool *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
 
+  NS_ENSURE_TRUE(IsValidColumn(aColumn), NS_ERROR_INVALID_ARG);
+
   nsresult rv = NS_OK;
 
   PRInt32 rows;
   rv = GetRows(&rows);
   NS_ENSURE_SUCCESS(rv, rv);
 
   for (PRInt32 index = 0; index < rows; index++) {
     rv = IsCellSelected(index, aColumn, _retval);
@@ -637,16 +653,18 @@ nsHTMLTableAccessible::IsColumnSelected(
   return rv;
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::IsRowSelected(PRInt32 aRow, PRBool *_retval)
 {
   NS_ENSURE_ARG_POINTER(_retval);
 
+  NS_ENSURE_TRUE(IsValidRow(aRow), NS_ERROR_INVALID_ARG);
+
   nsresult rv = NS_OK;
 
   PRInt32 columns;
   rv = GetColumns(&columns);
   NS_ENSURE_SUCCESS(rv, rv);
 
   for (PRInt32 index = 0; index < columns; index++) {
     rv = IsCellSelected(aRow, index, _retval);
@@ -658,31 +676,49 @@ nsHTMLTableAccessible::IsRowSelected(PRI
 
   return rv;
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::IsCellSelected(PRInt32 aRow, PRInt32 aColumn,
                                       PRBool *_retval)
 {
+  NS_ENSURE_TRUE(IsValidRow(aRow) && IsValidColumn(aColumn), NS_ERROR_INVALID_ARG);
+
   nsITableLayout *tableLayout;
   nsresult rv = GetTableLayout(&tableLayout);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDOMElement> domElement;
   PRInt32 startRowIndex = 0, startColIndex = 0,
           rowSpan, colSpan, actualRowSpan, actualColSpan;
 
   return tableLayout->GetCellDataAt(aRow, aColumn,
                                     *getter_AddRefs(domElement),
                                     startRowIndex, startColIndex, rowSpan,
                                     colSpan, actualRowSpan, actualColSpan,
                                     *_retval);
 }
 
+PRBool
+nsHTMLTableAccessible::IsValidColumn(PRInt32 aColumn)
+{
+  PRInt32 colCount = 0;
+  nsresult rv = GetColumns(&colCount);
+  return NS_SUCCEEDED(rv) && (aColumn >= 0) && (aColumn < colCount);
+}
+
+PRBool
+nsHTMLTableAccessible::IsValidRow(PRInt32 aRow)
+{
+  PRInt32 rowCount = 0;
+  nsresult rv = GetRows(&rowCount);
+  return NS_SUCCEEDED(rv) && (aRow >= 0) && (aRow < rowCount);
+}
+
 NS_IMETHODIMP
 nsHTMLTableAccessible::SelectRow(PRInt32 aRow)
 {
   return SelectRowOrColumn(aRow, nsISelectionPrivate::TABLESELECTION_ROW,
                            PR_TRUE);
 }
 
 NS_IMETHODIMP
--- a/accessible/src/html/nsHTMLTableAccessible.h
+++ b/accessible/src/html/nsHTMLTableAccessible.h
@@ -68,16 +68,30 @@ public:
   nsHTMLTableAccessible(nsIDOMNode* aDomNode, nsIWeakReference* aShell);
   NS_IMETHOD GetRole(PRUint32 *aResult); 
   NS_IMETHOD GetState(PRUint32 *aState, PRUint32 *aExtraState);
   NS_IMETHOD GetName(nsAString& aResult);
   virtual nsresult GetAttributesInternal(nsIPersistentProperties *aAttributes);
   NS_IMETHOD GetDescription(nsAString& aDescription);
   NS_IMETHOD GetAccessibleRelated(PRUint32 aRelationType, nsIAccessible **aRelated);
 
+  /**
+    * Returns true if the column index is in the valid column range.
+    *
+    * @param aColumn  The index to check for validity.
+    */
+  PRBool IsValidColumn(PRInt32 aColumn);
+
+  /**
+    * Returns true if the given index is in the valid row range.
+    *
+    * @param aRow  The index to check for validity.
+    */
+  PRBool IsValidRow(PRInt32 aRow);
+
 protected:
 
   /**
    * Selects or unselects row or column.
    *
    * @param aIndex - index of row or column to be selected
    * @param aTarget - indicates what should be selected, either row or column
    *                  (see nsISelectionPrivate)
--- a/accessible/src/xul/nsXULTreeAccessible.cpp
+++ b/accessible/src/xul/nsXULTreeAccessible.cpp
@@ -665,17 +665,19 @@ NS_IMETHODIMP nsXULTreeitemAccessible::S
   mTree = nsnull;
   mTreeView = nsnull;
   mColumn = nsnull;
   return nsLeafAccessible::Shutdown();
 }
 
 NS_IMETHODIMP nsXULTreeitemAccessible::GetName(nsAString& aName)
 {
-  NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
+  if (IsDefunct())
+    return NS_ERROR_FAILURE;
+
   mTreeView->GetCellText(mRow, mColumn, aName);
   
   // If there is still no name try the cell value:
   // This is for graphical cells. We need tree/table view implementors to implement
   // FooView::GetCellValue to return a meaningful string for cases where there is
   // something shown in the cell (non-text) such as a star icon; in which case
   // GetCellValue for that cell would return "starred" or "flagged" for example.
   if (aName.IsEmpty()) {
@@ -708,17 +710,21 @@ NS_IMETHODIMP
 nsXULTreeitemAccessible::GetState(PRUint32 *aState, PRUint32 *aExtraState)
 {
   NS_ENSURE_ARG_POINTER(aState);
 
   *aState = 0;
   if (aExtraState)
     *aExtraState = 0;
 
-  NS_ENSURE_TRUE(mColumn && mTree && mTreeView, NS_ERROR_FAILURE);
+  if (IsDefunct()) {
+    if (aExtraState)
+      *aExtraState = nsIAccessibleStates::EXT_STATE_DEFUNCT;
+    return NS_OK;
+  }
 
   *aState = nsIAccessibleStates::STATE_FOCUSABLE |
             nsIAccessibleStates::STATE_SELECTABLE;
 
   // get expanded/collapsed state
   if (IsExpandable()) {
     PRBool isContainerOpen;
     mTreeView->IsContainerOpen(mRow, &isContainerOpen);
@@ -762,19 +768,32 @@ nsXULTreeitemAccessible::GetState(PRUint
     if (checked.EqualsIgnoreCase("true")) {
       *aState |= nsIAccessibleStates::STATE_CHECKED;
     }
   }
 
   return NS_OK;
 }
 
+PRBool
+nsXULTreeitemAccessible::IsDefunct()
+{
+  if (!mTree || !mTreeView || !mColumn || mRow < 0)
+    return PR_TRUE;
+
+  PRInt32 rowCount = 0;
+  nsresult rv = mTreeView->GetRowCount(&rowCount);
+  return NS_FAILED(rv) || mRow >= rowCount;
+}
+
 PRBool nsXULTreeitemAccessible::IsExpandable()
 {
-  NS_ENSURE_TRUE(mTree && mTreeView && mColumn, NS_ERROR_FAILURE);
+  if (IsDefunct())
+    return NS_ERROR_FAILURE;
+
   PRBool isContainer;
   mTreeView->IsContainer(mRow, &isContainer);
   if (isContainer) {
     PRBool isEmpty; 
     mTreeView->IsContainerEmpty(mRow, &isEmpty);
     if (!isEmpty) {
       PRBool isPrimary;
       mColumn->GetPrimary(&isPrimary);
@@ -785,26 +804,31 @@ PRBool nsXULTreeitemAccessible::IsExpand
   }
   return PR_FALSE;
 }
 
 // "activate" (xor "cycle") action is available for all treeitems
 // "expand/collapse" action is avaible for treeitem which is container
 NS_IMETHODIMP nsXULTreeitemAccessible::GetNumActions(PRUint8 *aNumActions)
 {
-  NS_ENSURE_TRUE(mTree && mTreeView && mColumn, NS_ERROR_FAILURE);
+  NS_ENSURE_ARG_POINTER(aNumActions);
+  *aNumActions = 0;
+
+  if (IsDefunct())
+    return NS_ERROR_FAILURE;
+
   *aNumActions = IsExpandable() ? 2 : 1;
-
   return NS_OK;
 }
 
 // Return the name of our actions
 NS_IMETHODIMP nsXULTreeitemAccessible::GetActionName(PRUint8 aIndex, nsAString& aName)
 {
-  NS_ENSURE_TRUE(mColumn && mTree && mTreeView, NS_ERROR_FAILURE);
+  if (IsDefunct())
+    return NS_ERROR_FAILURE;
 
   if (aIndex == eAction_Click) {
     PRBool isCycler;
     mColumn->GetCycler(&isCycler);
     if (isCycler) {
       aName.AssignLiteral("cycle");
     }
     else {
@@ -824,17 +848,19 @@ NS_IMETHODIMP nsXULTreeitemAccessible::G
 
   return NS_ERROR_INVALID_ARG;
 }
 
 nsresult
 nsXULTreeitemAccessible::GetAttributesInternal(nsIPersistentProperties *aAttributes)
 {
   NS_ENSURE_ARG_POINTER(aAttributes);
-  NS_ENSURE_TRUE(mDOMNode, NS_ERROR_FAILURE);
+
+  if (IsDefunct())
+    return NS_ERROR_FAILURE;
 
   nsresult rv = nsLeafAccessible::GetAttributesInternal(aAttributes);
   NS_ENSURE_SUCCESS(rv, rv);
 
   nsCOMPtr<nsIDOMXULTreeElement> tree(do_QueryInterface(mDOMNode));
   NS_ENSURE_TRUE(tree, NS_OK);
 
   nsCOMPtr<nsITreeView> view;
@@ -887,33 +913,39 @@ nsXULTreeitemAccessible::GetAttributesIn
                            NS_LITERAL_STRING("true"));
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsXULTreeitemAccessible::GetParent(nsIAccessible **aParent)
 {
+  NS_ENSURE_ARG_POINTER(aParent);
   *aParent = nsnull;
 
+  if (IsDefunct())
+    return NS_ERROR_FAILURE;
+
   if (mParent) {
     *aParent = mParent;
     NS_ADDREF(*aParent);
   }
 
   return NS_OK;
 }
 
 // Return the next row of tree if mColumn (if any),
 // otherwise return the next cell.
 NS_IMETHODIMP nsXULTreeitemAccessible::GetNextSibling(nsIAccessible **aNextSibling)
 {
+  NS_ENSURE_ARG_POINTER(aNextSibling);
   *aNextSibling = nsnull;
 
-  NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
+  if (IsDefunct())
+    return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsIAccessibleTreeCache> treeCache(do_QueryInterface(mParent));
   NS_ENSURE_TRUE(treeCache, NS_ERROR_FAILURE);
 
   PRInt32 rowCount;
   mTreeView->GetRowCount(&rowCount);
 
   if (!mColumn) {
@@ -948,19 +980,21 @@ NS_IMETHODIMP nsXULTreeitemAccessible::G
   
   return rv;
 }
 
 // Return the previous row of tree if mColumn (if any),
 // otherwise return the previous cell.
 NS_IMETHODIMP nsXULTreeitemAccessible::GetPreviousSibling(nsIAccessible **aPreviousSibling)
 {
+  NS_ENSURE_ARG_POINTER(aPreviousSibling);
   *aPreviousSibling = nsnull;
 
-  NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
+  if (IsDefunct())
+    return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsIAccessibleTreeCache> treeCache(do_QueryInterface(mParent));
   NS_ENSURE_TRUE(treeCache, NS_ERROR_FAILURE);
 
   if (!mColumn && mRow > 0)
     return treeCache->GetCachedTreeitemAccessible(mRow - 1, nsnull, aPreviousSibling);
   
   nsresult rv = NS_OK;
@@ -984,17 +1018,18 @@ NS_IMETHODIMP nsXULTreeitemAccessible::G
 
   rv = treeCache->GetCachedTreeitemAccessible(row, column, aPreviousSibling);
 
   return rv;
 }
 
 NS_IMETHODIMP nsXULTreeitemAccessible::DoAction(PRUint8 index)
 {
-  NS_ENSURE_TRUE(mColumn && mTree && mTreeView, NS_ERROR_FAILURE);
+  if (IsDefunct())
+    return NS_ERROR_FAILURE;
 
   if (index == eAction_Click) {
     nsresult rv = NS_OK;
     PRBool isCycler;
     mColumn->GetCycler(&isCycler);
     if (isCycler) {
       rv = mTreeView->CycleCell(mRow, mColumn);
     } 
@@ -1012,19 +1047,27 @@ NS_IMETHODIMP nsXULTreeitemAccessible::D
     return mTreeView->ToggleOpenState(mRow);
   }
 
   return NS_ERROR_INVALID_ARG;
 }
 
 NS_IMETHODIMP nsXULTreeitemAccessible::GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height)
 {
-  *x = *y = *width = *height = 0;
+  NS_ENSURE_ARG_POINTER(x);
+  *x = 0;
+  NS_ENSURE_ARG_POINTER(y);
+  *y = 0;
+  NS_ENSURE_ARG_POINTER(width);
+  *width = 0;
+  NS_ENSURE_ARG_POINTER(height);
+  *height = 0;
 
-  NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
+  if (IsDefunct())
+    return NS_ERROR_FAILURE;
 
   // This Bounds are based on Tree's coord
   mTree->GetCoordsForCellItem(mRow, mColumn, EmptyCString(), x, y, width, height);
 
   // Get treechildren's BoxObject to adjust the Bounds' upper left corner
   // XXXvarga consider using mTree->GetTreeBody()
   nsCOMPtr<nsIBoxObject> boxObject(do_QueryInterface(mTree));
   if (boxObject) {
@@ -1063,50 +1106,54 @@ NS_IMETHODIMP nsXULTreeitemAccessible::G
     }
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsXULTreeitemAccessible::SetSelected(PRBool aSelect)
 {
-  NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
+  if (IsDefunct())
+    return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsITreeSelection> selection;
   mTreeView->GetSelection(getter_AddRefs(selection));
   if (selection) {
     PRBool isSelected;
     selection->IsSelected(mRow, &isSelected);
     if (isSelected != aSelect)
       selection->ToggleSelect(mRow);
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP nsXULTreeitemAccessible::TakeFocus()
-{ 
-  NS_ENSURE_TRUE(mTree && mTreeView, NS_ERROR_FAILURE);
+{
+  if (IsDefunct())
+    return NS_ERROR_FAILURE;
 
   nsCOMPtr<nsITreeSelection> selection;
   mTreeView->GetSelection(getter_AddRefs(selection));
   if (selection)
     selection->SetCurrentIndex(mRow);
 
   // focus event will be fired here
   return nsAccessible::TakeFocus();
 }
 
 NS_IMETHODIMP nsXULTreeitemAccessible::GetAccessibleRelated(PRUint32 aRelationType, nsIAccessible **aRelated)
 {
+  if (IsDefunct())
+    return NS_ERROR_FAILURE;
+
   //currentlly only for ATK. and in the future, we'll sync MSAA and ATK same. 
   //that's why ATK specific code shows here
   *aRelated = nsnull;
 #ifdef MOZ_ACCESSIBILITY_ATK
-  NS_ENSURE_TRUE(mColumn && mTree && mTreeView, NS_ERROR_FAILURE);
   if (aRelationType == nsIAccessibleRelation::RELATION_NODE_CHILD_OF) {
     PRInt32 columnIndex;
     if (NS_SUCCEEDED(mColumn->GetIndex(&columnIndex)) && columnIndex == 0) {
       PRInt32 parentIndex;
       if (NS_SUCCEEDED(mTreeView->GetParentIndex(mRow, &parentIndex))) {
         if (parentIndex == -1) {
           NS_IF_ADDREF(*aRelated = mParent);
           return NS_OK;
--- a/accessible/src/xul/nsXULTreeAccessible.h
+++ b/accessible/src/xul/nsXULTreeAccessible.h
@@ -121,16 +121,19 @@ public:
   NS_IMETHOD GetBounds(PRInt32 *x, PRInt32 *y, PRInt32 *width, PRInt32 *height);
   NS_IMETHOD SetSelected(PRBool aSelect); 
   NS_IMETHOD TakeFocus(void); 
 
   NS_IMETHOD GetAccessibleRelated(PRUint32 aRelationType, nsIAccessible **aRelated);
   /* ------ nsIAccessNode ----- */
   NS_IMETHOD GetUniqueID(void **aUniqueID);
 
+  // nsAccessNode
+  virtual PRBool IsDefunct();
+
 protected:
   PRBool IsExpandable();
   nsCOMPtr<nsITreeBoxObject> mTree;
   nsCOMPtr<nsITreeView> mTreeView;
   PRInt32 mRow;
   nsCOMPtr<nsITreeColumn> mColumn;
 };
 
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -146,16 +146,23 @@ MOZ_WINCONSOLE = 1
 else
 MOZ_WINCONSOLE = 0
 endif
 endif
 
 NSDISTMODE = copy
 
 include $(topsrcdir)/config/config.mk
+
+ifdef _MSC_VER
+# Always enter a Windows program through wmain, whether or not we're
+# a console application.
+WIN32_EXE_LDFLAGS += -ENTRY:wmainCRTStartup
+endif
+
 ifndef BUILD_STATIC_LIBS
 
 ifdef NS_TRACE_MALLOC
 # when libxul is enabled, trace-malloc is part of it
 ifndef MOZ_ENABLE_LIBXUL
 EXTRA_DSO_LIBS += tracemalloc
 endif
 endif
--- a/browser/app/application.ini
+++ b/browser/app/application.ini
@@ -36,17 +36,17 @@
 ; ***** END LICENSE BLOCK *****
 
 #filter substitution
 [App]
 Vendor=Mozilla
 Name=Firefox
 Version=@APP_VERSION@
 BuildID=@GRE_BUILDID@
-Copyright=Copyright (c) 1998 - 2007 mozilla.org
+Copyright=Copyright (c) 1998 - 2008 mozilla.org
 ID={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
 
 [Gecko]
 MinVersion=@GRE_MILESTONE@
 MaxVersion=@GRE_MILESTONE@
 
 [XRE]
 EnableProfileMigrator=1
--- a/browser/app/macbuild/Contents/Info.plist.in
+++ b/browser/app/macbuild/Contents/Info.plist.in
@@ -69,17 +69,17 @@
 			</array>
 			<key>CFBundleTypeRole</key>
 			<string>Viewer</string>
 		</dict>
 	</array>
 	<key>CFBundleExecutable</key>
 	<string>firefox-bin</string>
 	<key>CFBundleGetInfoString</key>
-	<string>%APP_NAME% %APP_VERSION%, © 1998-2007 Contributors</string>
+	<string>%APP_NAME% %APP_VERSION%, © 1998-2008 Contributors</string>
 	<key>CFBundleIconFile</key>
 	<string>firefox</string>
 	<key>CFBundleIdentifier</key>
 	<string>org.mozilla.firefox</string>
 	<key>CFBundleInfoDictionaryVersion</key>
 	<string>6.0</string>
 	<key>CFBundleName</key>
 	<string>%APP_NAME%</string>
--- a/browser/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in
+++ b/browser/app/macbuild/Contents/Resources/English.lproj/InfoPlist.strings.in
@@ -1,2 +1,2 @@
 CFBundleName = "%APP_NAME%";
-NSHumanReadableCopyright = "Copyright © 1998-2007 Contributors";
+NSHumanReadableCopyright = "Copyright © 1998-2008 Contributors";
--- a/browser/app/nsBrowserApp.cpp
+++ b/browser/app/nsBrowserApp.cpp
@@ -48,16 +48,21 @@
 #include "plstr.h"
 #include "prprf.h"
 #include "prenv.h"
 
 #include "nsCOMPtr.h"
 #include "nsILocalFile.h"
 #include "nsStringGlue.h"
 
+#ifdef XP_WIN
+// we want a wmain entry point
+#include "nsWindowsWMain.cpp"
+#endif
+
 static void Output(const char *fmt, ... )
 {
   va_list ap;
   va_start(ap, fmt);
 
 #if defined(XP_WIN) && !MOZ_WINCONSOLE
   char msg[2048];
 
@@ -151,18 +156,8 @@ int main(int argc, char* argv[])
   }
 
   int result = XRE_main(argc, argv, appData);
   XRE_FreeAppData(appData);
   if (appEnv)
     PR_smprintf_free(appEnv);
   return result;
 }
-
-#if defined( XP_WIN ) && defined( WIN32 ) && !defined(__GNUC__)
-// We need WinMain in order to not be a console app.  This function is
-// unused if we are a console application.
-int WINAPI WinMain( HINSTANCE, HINSTANCE, LPSTR args, int )
-{
-    // Do the real work.
-    return main( __argc, __argv );
-}
-#endif
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -185,46 +185,43 @@ pref("browser.startup.homepage",        
 
 pref("browser.cache.disk.capacity",         50000);
 pref("browser.enable_automatic_image_resizing", true);
 pref("browser.chrome.site_icons", true);
 pref("browser.chrome.favicons", true);
 pref("browser.formfill.enable", true);
 pref("browser.warnOnQuit", true);
 
-#ifdef XP_UNIX
+#ifdef UNIX_BUT_NOT_MAC
 pref("browser.urlbar.clickSelectsAll", false);
 #else
 pref("browser.urlbar.clickSelectsAll", true);
 #endif
 #ifdef UNIX_BUT_NOT_MAC
 pref("browser.urlbar.doubleClickSelectsAll", true);
 #else
 pref("browser.urlbar.doubleClickSelectsAll", false);
 #endif
 pref("browser.urlbar.autoFill", false);
 pref("browser.urlbar.matchOnlyTyped", false);
 
-// if false, will use one-line-per-result for urlbar autocomplete
-pref("browser.urlbar.richResults", true);
 // the maximum number of results to show in autocomplete when doing richResults
 pref("browser.urlbar.maxRichResults", 25);
 
 pref("browser.download.useDownloadDir", true);
 pref("browser.download.folderList", 0);
 pref("browser.download.manager.showAlertOnComplete", true);
 pref("browser.download.manager.showAlertInterval", 2000);
 pref("browser.download.manager.retention", 2);
 pref("browser.download.manager.showWhenStarting", true);
 pref("browser.download.manager.useWindow", true);
 pref("browser.download.manager.closeWhenDone", false);
 pref("browser.download.manager.openDelay", 0);
 pref("browser.download.manager.focusWhenStarting", false);
 pref("browser.download.manager.flashCount", 2);
-pref("browser.download.manager.displayedHistoryDays", 7);
 pref("browser.download.manager.addToRecentDocs", true);
 
 // search engines URL
 pref("browser.search.searchEnginesURL",      "https://%LOCALE%.add-ons.mozilla.com/%LOCALE%/firefox/%VERSION%/search-engines/");
 
 // pointer to the default engine name
 pref("browser.search.defaultenginename",      "chrome://browser-region/locale/region.properties");
 
@@ -268,17 +265,22 @@ pref("browser.link.open_external", 3);
 // handle links targeting new windows
 pref("browser.link.open_newwindow", 3);
 
 // 0: no restrictions - divert everything
 // 1: don't divert window.open at all
 // 2: don't divert window.open with features
 pref("browser.link.open_newwindow.restriction", 2);
 
-// Tab browser preferences.
+// Tabbed browser
+pref("browser.tabs.autoHide", true);
+pref("browser.tabs.forceHide", false);
+pref("browser.tabs.warnOnClose", true);
+pref("browser.tabs.warnOnOpen", true);
+pref("browser.tabs.maxOpenBeforeWarn", 15);
 pref("browser.tabs.loadInBackground", true);
 pref("browser.tabs.loadFolderAndReplace", true);
 pref("browser.tabs.opentabfor.middleclick", true);
 pref("browser.tabs.loadDivertedInBackground", false);
 pref("browser.tabs.loadBookmarksInBackground", false);
 pref("browser.tabs.tabMinWidth", 100);
 pref("browser.tabs.tabMaxWidth", 250);
 pref("browser.tabs.tabClipWidth", 140);
@@ -343,18 +345,17 @@ pref("privacy.item.cache",      true);
 pref("privacy.item.siteprefs",  false);
 pref("privacy.item.sessions",   true);
 
 pref("privacy.sanitize.sanitizeOnShutdown", false);
 pref("privacy.sanitize.promptOnSanitize", true);
 
 pref("network.proxy.share_proxy_settings",  false); // use the same proxy settings for all protocols
 
-pref("network.cookie.cookieBehavior",       0); // cookies enabled
-pref("network.cookie.enableForCurrentSessionOnly", false);
+pref("network.cookie.cookieBehavior",       1); // 0-Accept, 1-dontAcceptForeign, 2-dontUse
 
 // l12n and i18n
 pref("intl.accept_languages", "chrome://global/locale/intl.properties");
 pref("intl.charsetmenu.browser.static", "chrome://global/locale/intl.properties");
 pref("intl.charsetmenu.browser.more1",  "chrome://global/locale/intl.properties");
 pref("intl.charsetmenu.browser.more2",  "chrome://global/locale/intl.properties");
 pref("intl.charsetmenu.browser.more3",  "chrome://global/locale/intl.properties");
 pref("intl.charsetmenu.browser.more4",  "chrome://global/locale/intl.properties");
@@ -449,17 +450,21 @@ pref("pfs.datasource.url", "https://pfs.
 // by default we show an infobar message when pages require plugins the user has not installed
 pref("plugins.hide_infobar_for_missing_plugin", false);
 
 #ifdef XP_WIN
 pref("browser.preferences.instantApply", false);
 #else
 pref("browser.preferences.instantApply", true);
 #endif
+#ifdef XP_MACOSX
+pref("browser.preferences.animateFadeIn", true);
+#else
 pref("browser.preferences.animateFadeIn", false);
+#endif
 
 pref("browser.download.show_plugins_in_list", true);
 pref("browser.download.hide_plugins_without_extensions", true);
 
 // Setting this pref to |true| forces BiDi UI menu items and keyboard shortcuts
 // to be exposed. By default, only expose it for bidi-associated system locales.
 pref("bidi.browser.ui", false);
 
@@ -593,8 +598,12 @@ pref("browser.places.createdSmartBookmar
 // XXX to be removed after beta 2 (bug 391419)
 pref("browser.places.migratePostDataAnnotations", true);
 
 // Controls behavior of the "Add Exception" dialog launched from SSL error pages
 // 0 - don't pre-populate anything
 // 1 - pre-populate site URL, but don't fetch certificate
 // 2 - pre-populate site URL and pre-fetch certificate
 pref("browser.ssl_override_behavior", 1);
+
+// replace newlines with spaces when pasting into <input type="text"> fields
+pref("editor.singleLine.pasteNewlines", 2);
+
--- a/browser/base/content/browser-context.inc
+++ b/browser/base/content/browser-context.inc
@@ -104,20 +104,22 @@
                 oncommand="gContextMenu.setDesktopBackground();"/>
       <menuitem id="context-blockimage"
                 type="checkbox"
                 accesskey="&blockImageCmd.accesskey;"
                 oncommand="gContextMenu.toggleImageBlocking(this.getAttribute('checked') == 'true');"/>
       <menuitem id="context-back"
                 label="&backCmd.label;"
                 accesskey="&backCmd.accesskey;"
+                chromedir="&locale.dir;"
                 command="Browser:Back"/>
       <menuitem id="context-forward"
                 label="&forwardCmd.label;"
                 accesskey="&forwardCmd.accesskey;"
+                chromedir="&locale.dir;"
                 command="Browser:Forward"/>
       <menuitem id="context-reload"
                 label="&reloadCmd.label;"
                 accesskey="&reloadCmd.accesskey;"
                 command="Browser:Reload"/>
       <menuitem id="context-stop"
                 label="&stopCmd.label;"
                 accesskey="&stopCmd.accesskey;"
--- a/browser/base/content/browser-menubar.inc
+++ b/browser/base/content/browser-menubar.inc
@@ -319,40 +319,42 @@
                 <menuitem hidden="true" id="documentDirection-swap" 
                           label="&bidiSwitchPageDirectionItem.label;"
                           accesskey="&bidiSwitchPageDirectionItem.accesskey;"
                           oncommand="SwitchDocumentDirection(window.content)"/>
               </menupopup>
             </menu>
 
             <menu id="history-menu"
-                  oncommand="var url = event.target.getAttribute('statustext'); if (url) openUILink(url, event, false, true);"
+                  oncommand="var url = event.target.getAttribute('statustext'); if (url) { PlacesUtils.markPageAsTyped(url); openUILink(url, event, false, true); }"
                   onclick="checkForMiddleClick(this, event);"
                   label="&historyMenu.label;"
                   accesskey="&historyMenu.accesskey;">
               <menupopup id="goPopup"
                          type="places"
                          onpopupshowing="HistoryMenu.onPopupShowing(this);"
                          place="place:type=0&amp;sort=4&amp;maxResults=10">
                 <menuitem label="&backCmd.label;"
 #ifdef XP_MACOSX
                           key="goBackKb2"
 #else
                           key="goBackKb"
 #endif
+                          chromedir="&locale.dir;"
                           oncommand="BrowserBack(event, true)"
                           onclick="checkForMiddleClick(this, event);">
                   <observes element="Browser:Back" attribute="disabled" />
                 </menuitem>
                 <menuitem label="&forwardCmd.label;" 
 #ifdef XP_MACOSX
                           key="goForwardKb2"
 #else
                           key="goForwardKb"
 #endif
+                          chromedir="&locale.dir;"
                           oncommand="BrowserForward(event, true)"
                           onclick="checkForMiddleClick(this, event);">
                   <observes element="Browser:Forward" attribute="disabled" />
                 </menuitem>
 
                 <menuitem label="&historyHomeCmd.label;"
                           command="Browser:Home"
                           key="goHome"/>
--- a/browser/base/content/browser-places.js
+++ b/browser/base/content/browser-places.js
@@ -1,47 +1,46 @@
-/* -*- Mode: C++; tab-width: 8; 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 the Places Browser Integration
- *
- * The Initial Developer of the Original Code is Google Inc.
- * Portions created by the Initial Developer are Copyright (C) 2006
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Ben Goodger <beng@google.com>
- *   Annie Sullivan <annie.sullivan@gmail.com>
- *   Joe Hughes <joe@retrovirus.com>
- *   Asaf Romano <mano@mozilla.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ***** */
+# ***** 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 Places Browser Integration
+#
+# The Initial Developer of the Original Code is Google Inc.
+# Portions created by the Initial Developer are Copyright (C) 2006
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#   Ben Goodger <beng@google.com>
+#   Annie Sullivan <annie.sullivan@gmail.com>
+#   Joe Hughes <joe@retrovirus.com>
+#   Asaf Romano <mano@mozilla.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
 
 var PlacesCommandHook = {
   // nsISupports
   QueryInterface: function PCH_QueryInterface(aIID) {
     if (aIID.equals(Ci.nsIDOMEventListener) ||
         aIID.equals(Ci.nsISupports))
       return this;
 
@@ -61,16 +60,19 @@ var PlacesCommandHook = {
   },
 
   // list of command elements (by id) to disable when the panel is opened
   _blockedCommands: ["cmd_close", "cmd_closeWindow"],
 
   _blockCommands: function PCH__blockCommands() {
     for each(var key in this._blockedCommands) {
       var elt = document.getElementById(key);
+      // make sure not to permanently disable this item (see bug 409155)
+      if (elt.hasAttribute("wasDisabled"))
+        continue;
       if (elt.getAttribute("disabled") == "true")
         elt.setAttribute("wasDisabled", "true");
       else {
         elt.setAttribute("wasDisabled", "false");
         elt.setAttribute("disabled", "true");
       }
     }
   },
@@ -180,17 +182,17 @@ var PlacesCommandHook = {
       // This is because when a full page plugin is loaded, there is
       // no DOMWindow (?) but information about the loaded document
       // may still be obtained from the webNavigation.
       var webNav = aBrowser.webNavigation;
       var url = webNav.currentURI;
       var title;
       var description;
       try {
-        title = webNav.document.title;
+        title = webNav.document.title || url.spec;
         description = PlacesUtils.getDescriptionFromDocument(webNav.document);
       }
       catch (e) { }
 
       var parent = aParent != undefined ?
                    aParent : PlacesUtils.unfiledBookmarksFolderId;
       var descAnno = { name: DESCRIPTION_ANNO, value: description };
       var txn = PlacesUtils.ptm.createItem(uri, parent, -1,
@@ -231,17 +233,17 @@ var PlacesCommandHook = {
    * @param aTitle
    *        The link text
    */
   bookmarkLink: function PCH_bookmarkLink(aParent, aURL, aTitle) {
     var linkURI = IO.newURI(aURL)
     var itemId = PlacesUtils.getMostRecentBookmarkForURI(linkURI);
     if (itemId == -1) {
       var txn = PlacesUtils.ptm.createItem(linkURI, aParent, -1, aTitle);
-      PlacesUtils.ptm.commitTransaction(txn);
+      PlacesUtils.ptm.doTransaction(txn);
       itemId = PlacesUtils.getMostRecentBookmarkForURI(linkURI);
     }
 
     this.showEditBookmarkPopup(itemId, getBrowser(), "overlap");
   },
 
   /**
    * This function returns a list of nsIURI objects characterizing the
@@ -482,21 +484,26 @@ var BookmarksEventHandler = {
       if (hasMultipleEntries || siteURIString) {
         var separator = document.createElement("menuseparator");
         target.appendChild(separator);
 
         if (siteURIString) {
           var openHomePage = document.createElement("menuitem");
           openHomePage.setAttribute("siteURI", siteURIString);
           openHomePage.setAttribute("oncommand",
-                                    "openUILink(this.getAttribute('siteURI'), event);");
-          openHomePage.setAttribute(
-            "label",
-            PlacesUtils.getFormattedString("menuOpenLivemarkOrigin.label",
-                                           [target.parentNode.getAttribute("label")]));
+              "openUILink(this.getAttribute('siteURI'), event);");
+          // If a user middle-clicks this item we serve the oncommand event
+          // We are using checkForMiddleClick because of Bug 246720
+          // Note: stopPropagation is needed to avoid serving middle-click 
+          // with BT_onClick that would open all items in tabs
+          openHomePage.setAttribute("onclick",
+              "checkForMiddleClick(this, event); event.stopPropagation();");
+          openHomePage.setAttribute("label",
+              PlacesUtils.getFormattedString("menuOpenLivemarkOrigin.label",
+              [target.parentNode.getAttribute("label")]));
           target.appendChild(openHomePage);
         }
 
         if (hasMultipleEntries) {
           var openInTabs = document.createElement("menuitem");
           openInTabs.setAttribute("openInTabs", "true");
           openInTabs.setAttribute("oncommand",
                                   "PlacesUtils.openContainerNodeInTabs(this.parentNode._resultNode, event);");
--- a/browser/base/content/browser.css
+++ b/browser/base/content/browser.css
@@ -3,17 +3,17 @@ searchbar {
 }
 
 /* ::::: location bar ::::: */
 #urlbar {
   -moz-binding: url(chrome://browser/content/urlbarBindings.xml#urlbar);
 }
 
 #PopupAutoComplete {
-  -moz-binding: url("chrome://browser/content/urlbarBindings.xml#urlbar-result-popup");
+  -moz-binding: url("chrome://browser/content/urlbarBindings.xml#browser-autocomplete-result-popup");
 }
 
 #PopupAutoCompleteRichResult {
   -moz-binding: url("chrome://browser/content/urlbarBindings.xml#urlbar-rich-result-popup");
 }
 
 /* ::::: print preview toolbar ::::: */
 toolbar[printpreview="true"] {
@@ -70,8 +70,15 @@ tabbrowser {
 
 .tabbrowser-tabs:not([closebuttons="noclose"]):not([closebuttons="closeatend"]) > .tabbrowser-tab[selected="true"] > .tab-close-button {
   display: -moz-box;
 }
 
 .tabbrowser-tabs[closebuttons="alltabs"] > .tabbrowser-tab > .tab-close-button {
   display: -moz-box;
 }
+
+/* Hide extension toolbars that neglected to set the proper class */
+window[chromehidden~="location"][chromehidden~="toolbar"] toolbar:not(.chromeclass-menubar),
+window[chromehidden~="toolbar"] toolbar:not(.toolbar-primary):not(.chromeclass-menubar)
+{
+  display: none;
+}
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -72,17 +72,16 @@ const BROWSER_ADD_BM_FEATURES = "centers
 #endif
 
 const TYPE_MAYBE_FEED = "application/vnd.mozilla.maybe.feed";
 const TYPE_XUL = "application/vnd.mozilla.xul+xml";
 
 // We use this once, for Clear Private Data
 const GLUE_CID = "@mozilla.org/browser/browserglue;1";
 
-var gGlobalHistory = null;
 var gURIFixup = null;
 var gCharsetMenu = null;
 var gLastBrowserCharset = null;
 var gPrevCharset = null;
 var gURLBar = null;
 var gFindBar = null;
 var gProxyButton = null;
 var gProxyFavIcon = null;
@@ -315,18 +314,21 @@ function findChildShell(aDocument, aDocS
   }
   return null;
 }
 
 const gPopupBlockerObserver = {
   _reportButton: null,
   _kIPM: Components.interfaces.nsIPermissionManager,
 
-  onUpdatePageReport: function ()
+  onUpdatePageReport: function (aEvent)
   {
+    if (aEvent.originalTarget != gBrowser.selectedBrowser)
+      return;
+
     if (!this._reportButton)
       this._reportButton = document.getElementById("page-report-button");
 
     if (!gBrowser.pageReport) {
       // Hide the popup blocker statusbar button
       this._reportButton.removeAttribute("blocked");
 
       return;
@@ -799,16 +801,18 @@ function prepareForStartup()
   gURLBar = document.getElementById("urlbar");
   gNavigatorBundle = document.getElementById("bundle_browser");
   gProgressMeterPanel = document.getElementById("statusbar-progresspanel");
   gFindBar = document.getElementById("FindToolbar");
   gBrowser.addEventListener("DOMUpdatePageReport", gPopupBlockerObserver.onUpdatePageReport, false);
   // Note: we need to listen to untrusted events, because the pluginfinder XBL
   // binding can't fire trusted ones (runs with page privileges).
   gBrowser.addEventListener("PluginNotFound", gMissingPluginInstaller.newMissingPlugin, true, true);
+  gBrowser.addEventListener("PluginBlocklisted", gMissingPluginInstaller.newMissingPlugin, true, true);
+  gBrowser.addEventListener("NewPluginInstalled", gMissingPluginInstaller.refreshBrowser, false);
   gBrowser.addEventListener("NewTab", BrowserOpenTab, false);
   window.addEventListener("AppCommand", HandleAppCommandEvent, true);
 
   var webNavigation;
   try {
     // Create the browser instance component.
     appCore = Components.classes["@mozilla.org/appshell/component/browser/instance;1"]
                         .createInstance(Components.interfaces.nsIBrowserInstance);
@@ -885,24 +889,16 @@ function delayedStartup()
                              .getService(Components.interfaces.nsIPrefBranch2);
   BrowserOffline.init();
   
   if (gURLBar && document.documentElement.getAttribute("chromehidden").indexOf("toolbar") != -1) {
     gURLBar.setAttribute("readonly", "true");
     gURLBar.setAttribute("enablehistory", "false");
   }
 
-  if (gURLBar) {
-    try {
-      if (gPrefService.getBoolPref("browser.urlbar.richResults"))
-        gURLBar.setAttribute("autocompletepopup", "PopupAutoCompleteRichResult");
-    } catch (ex) {
-    }
-  }
-
   gBrowser.addEventListener("pageshow", function(evt) { setTimeout(pageShowEventHandlers, 0, evt); }, true);
 
   window.addEventListener("keypress", ctrlNumberTabSelection, false);
 
   // Ensure login manager is up and running.
   Cc["@mozilla.org/login-manager;1"].getService(Ci.nsILoginManager);
 
   if (gMustLoadSidebar) {
@@ -1046,16 +1042,24 @@ function delayedStartup()
   // bookmark-all-tabs command
   gBookmarkAllTabsHandler = new BookmarkAllTabsHandler();
 
   // Attach a listener to watch for "command" events bubbling up from error
   // pages.  This lets us fix bugs like 401575 which require error page UI to
   // do privileged things, without letting error pages have any privilege
   // themselves.
   gBrowser.addEventListener("command", BrowserOnCommand, false);
+
+  // Initialize the download manager some time after the app starts so that
+  // auto-resume downloads begin (such as after crashing or quitting with
+  // active downloads) and speeds up the first-load of the download manager UI.
+  // If the user manually opens the download manager before the timeout, the
+  // downloads will start right away, and getting the service again won't hurt.
+  setTimeout(function() Cc["@mozilla.org/download-manager;1"].
+                        getService(Ci.nsIDownloadManager), 10000);
 }
 
 function BrowserShutdown()
 {
   try {
     FullZoom.destroy();
   }
   catch(ex) {
@@ -1082,24 +1086,16 @@ function BrowserShutdown()
     Components.utils.reportError(ex);
   }
 
   if (gSanitizeListener)
     gSanitizeListener.shutdown();
 
   BrowserOffline.uninit();
 
-  // Store current window position/size into the window attributes 
-  // for persistence.
-  var win = document.documentElement;
-  win.setAttribute("x", window.screenX);
-  win.setAttribute("y", window.screenY);
-  win.setAttribute("height", window.outerHeight);
-  win.setAttribute("width", window.outerWidth);
-
   var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();
   var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator);
   var enumerator = windowManagerInterface.getEnumerator(null);
   enumerator.getNext();
   if (!enumerator.hasMoreElements()) {
     document.persist("sidebar-box", "sidebarcommand");
     document.persist("sidebar-box", "width");
     document.persist("sidebar-box", "src");
@@ -2883,27 +2879,19 @@ function FillHistoryMenu(aParent, aMenu)
 
 function addToUrlbarHistory(aUrlToAdd)
 {
   if (!aUrlToAdd)
      return;
   if (aUrlToAdd.search(/[\x00-\x1F]/) != -1) // don't store bad URLs
      return;
 
-  if (!gGlobalHistory)
-    gGlobalHistory = Components.classes["@mozilla.org/browser/global-history;2"]
-                               .getService(Components.interfaces.nsIBrowserHistory);
-
-  if (!gURIFixup)
-    gURIFixup = Components.classes["@mozilla.org/docshell/urifixup;1"]
-                          .getService(Components.interfaces.nsIURIFixup);
    try {
      if (aUrlToAdd.indexOf(" ") == -1) {
-       var fixedUpURI = gURIFixup.createFixupURI(aUrlToAdd, 0);
-       gGlobalHistory.markPageAsTyped(fixedUpURI);
+       PlacesUtils.markPageAsTyped(aUrlToAdd);
      }
    }
    catch(ex) {
    }
 }
 
 function createMenuItem( aParent, aIndex, aLabel)
   {
@@ -3811,61 +3799,70 @@ nsBrowserAccess.prototype =
       switch (aContext) {
         case Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL :
           aWhere = gPrefService.getIntPref("browser.link.open_external");
           break;
         default : // OPEN_NEW or an illegal value
           aWhere = gPrefService.getIntPref("browser.link.open_newwindow");
       }
     }
-    var url = aURI ? aURI.spec : "about:blank";
     switch(aWhere) {
       case Ci.nsIBrowserDOMWindow.OPEN_NEWWINDOW :
+        // FIXME: Bug 408379. So how come this doesn't send the
+        // referrer like the other loads do?
+        var url = aURI ? aURI.spec : "about:blank";
         newWindow = openDialog(getBrowserURL(), "_blank", "all,dialog=no", url);
         break;
       case Ci.nsIBrowserDOMWindow.OPEN_NEWTAB :
         var loadInBackground = gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground");
         var newTab = gBrowser.loadOneTab("about:blank", null, null, null, loadInBackground, false);
         newWindow = gBrowser.getBrowserForTab(newTab).docShell
                             .QueryInterface(Ci.nsIInterfaceRequestor)
                             .getInterface(Ci.nsIDOMWindow);
         try {
-          if (aOpener) {
-            location = aOpener.location;
-            referrer =
-                    Components.classes["@mozilla.org/network/io-service;1"]
-                              .getService(Components.interfaces.nsIIOService)
-                              .newURI(location, null, null);
+          if (aURI) {
+            if (aOpener) {
+              location = aOpener.location;
+              referrer =
+                      Components.classes["@mozilla.org/network/io-service;1"]
+                                .getService(Components.interfaces.nsIIOService)
+                                .newURI(location, null, null);
+            }
+            newWindow.QueryInterface(Ci.nsIInterfaceRequestor)
+                     .getInterface(Ci.nsIWebNavigation)
+                     .loadURI(aURI.spec, loadflags, referrer, null, null);
           }
-          newWindow.QueryInterface(Ci.nsIInterfaceRequestor)
-                   .getInterface(Ci.nsIWebNavigation)
-                   .loadURI(url, loadflags, referrer, null, null);
           if (!loadInBackground && isExternal)
             newWindow.focus();
         } catch(e) {
         }
         break;
       default : // OPEN_CURRENTWINDOW or an illegal value
         try {
           if (aOpener) {
             newWindow = aOpener.top;
-            location = aOpener.location;
-            referrer =
-                    Components.classes["@mozilla.org/network/io-service;1"]
-                              .getService(Components.interfaces.nsIIOService)
-                              .newURI(location, null, null);
-
-            newWindow.QueryInterface(Ci.nsIInterfaceRequestor)
-                     .getInterface(nsIWebNavigation)
-                     .loadURI(url, loadflags, referrer, null, null);
+            if (aURI) {
+              location = aOpener.location;
+              referrer =
+                      Components.classes["@mozilla.org/network/io-service;1"]
+                                .getService(Components.interfaces.nsIIOService)
+                                .newURI(location, null, null);
+
+              newWindow.QueryInterface(Ci.nsIInterfaceRequestor)
+                       .getInterface(nsIWebNavigation)
+                       .loadURI(aURI.spec, loadflags, referrer, null, null);
+            }
           } else {
             newWindow = gBrowser.selectedBrowser.docShell
                                 .QueryInterface(Ci.nsIInterfaceRequestor)
                                 .getInterface(Ci.nsIDOMWindow);
-            getWebNavigation().loadURI(url, loadflags, null, null, null);
+            if (aURI) {
+              getWebNavigation().loadURI(aURI.spec, loadflags, null, 
+                                         null, null);
+            }
           }
           if(!gPrefService.getBoolPref("browser.tabs.loadDivertedInBackground"))
             content.focus();
         } catch(e) {
         }
     }
     return newWindow;
   },
@@ -4159,38 +4156,41 @@ function asyncOpenWebPanel(event)
      // <a> cannot be nested.  So if we find an anchor without an
      // href, there is no useful <a> around the target
      if (linkNode && !linkNode.hasAttribute("href"))
        linkNode = null;
    }
    var wrapper = null;
    if (linkNode) {
      wrapper = linkNode;
+
+     // javascript links should be executed in the current browser
+     if (wrapper.href.substr(0, 11) === "javascript:")
+       return true;
+
+     // data links should be executed in the current browser
+     if (wrapper.href.substr(0, 5) === "data:")
+       return true;
+
      if (event.button == 0 && !event.ctrlKey && !event.shiftKey &&
          !event.altKey && !event.metaKey) {
        // A Web panel's links should target the main content area.  Do this
        // if no modifier keys are down and if there's no target or the target equals
        // _main (the IE convention) or _content (the Mozilla convention).
        // XXX Now that markLinkVisited is gone, we may not need to field _main and
        // _content here.
        target = wrapper.getAttribute("target");
        if (fieldNormalClicks &&
            (!target || target == "_content" || target  == "_main"))
          // IE uses _main, SeaMonkey uses _content, we support both
        {
          if (!wrapper.href)
            return true;
          if (wrapper.getAttribute("onclick"))
            return true;
-         // javascript links should be executed in the current browser
-         if (wrapper.href.substr(0, 11) === "javascript:")
-           return true;
-         // data links should be executed in the current browser
-         if (wrapper.href.substr(0, 5) === "data:")
-           return true;
 
          try {
            urlSecurityCheck(wrapper.href, wrapper.ownerDocument.nodePrincipal);
          }
          catch(ex) {
            return false;
          } 
 
@@ -4343,26 +4343,16 @@ function middleMousePaste(event)
 
   openUILink(url,
              event,
              true /* ignore the fact this is a middle click */);
 
   event.stopPropagation();
 }
 
-function makeURLAbsolute( base, url )
-{
-  // Construct nsIURL.
-  var ioService = Components.classes["@mozilla.org/network/io-service;1"]
-                .getService(Components.interfaces.nsIIOService);
-  var baseURI  = ioService.newURI(base, null, null);
-
-  return ioService.newURI(baseURI.resolve(url), null, null).spec;
-}
-
 /*
  * Note that most of this routine has been moved into C++ in order to
  * be available for all <browser> tags as well as gecko embedding. See
  * mozilla/content/base/src/nsContentAreaDragDrop.cpp.
  *
  * Do not add any new fuctionality here other than what is needed for
  * a standalone product.
  */
@@ -4971,42 +4961,43 @@ function getPluginInfo(pluginElement)
     }
   }
 
   return {mimetype: tagMimetype, pluginsPage: pluginsPage};
 }
 
 missingPluginInstaller.prototype.installSinglePlugin = function(aEvent){
   var tabbrowser = getBrowser();
-  var missingPluginsArray = new Object;
+  var missingPluginsArray = {};
 
   var pluginInfo = getPluginInfo(aEvent.target);
   missingPluginsArray[pluginInfo.mimetype] = pluginInfo;
 
   if (missingPluginsArray) {
     window.openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul",
                       "PFSWindow", "modal,chrome,resizable=yes",
-                      {plugins: missingPluginsArray, tab: tabbrowser.mCurrentTab});
+                      {plugins: missingPluginsArray, browser: tabbrowser.selectedBrowser});
   }
 
   aEvent.preventDefault();
 }
 
 missingPluginInstaller.prototype.newMissingPlugin = function(aEvent){
   // Since we are expecting also untrusted events, make sure
   // that the target is a plugin
   if (!(aEvent.target instanceof Components.interfaces.nsIObjectLoadingContent))
     return;
 
   // For broken non-object plugin tags, register a click handler so
   // that the user can click the plugin replacement to get the new
   // plugin. Object tags can, and often do, deal with that themselves,
   // so don't stomp on the page developers toes.
 
-  if (!(aEvent.target instanceof HTMLObjectElement)) {
+  if (aEvent.type != "PluginBlocklisted" &&
+      !(aEvent.target instanceof HTMLObjectElement)) {
     aEvent.target.addEventListener("click",
                                    gMissingPluginInstaller.installSinglePlugin,
                                    false);
   }
 
   try {
     if (gPrefService.getBoolPref("plugins.hide_infobar_for_missing_plugin"))
       return;
@@ -5018,60 +5009,104 @@ missingPluginInstaller.prototype.newMiss
   var contentWindow = aEvent.target.ownerDocument.defaultView.top;
 
   var i = 0;
   for (; i < browsers.length; i++) {
     if (tabbrowser.getBrowserAtIndex(i).contentWindow == contentWindow)
       break;
   }
 
-  var tab = tabbrowser.mTabContainer.childNodes[i];
-  if (!tab.missingPlugins)
-    tab.missingPlugins = {};
+  var browser = tabbrowser.getBrowserAtIndex(i);
+  if (!browser.missingPlugins)
+    browser.missingPlugins = {};
 
   var pluginInfo = getPluginInfo(aEvent.target);
 
-  tab.missingPlugins[pluginInfo.mimetype] = pluginInfo;
-
-  var browser = tabbrowser.getBrowserAtIndex(i);
+  browser.missingPlugins[pluginInfo.mimetype] = pluginInfo;
+
   var notificationBox = gBrowser.getNotificationBox(browser);
-  if (!notificationBox.getNotificationWithValue("missing-plugins")) {
-    var bundle_browser = document.getElementById("bundle_browser");
+
+  // If there is already a missing plugin notification then do nothing
+  if (notificationBox.getNotificationWithValue("missing-plugins"))
+    return;
+
+  var bundle_browser = document.getElementById("bundle_browser");
+  var blockedNotification = notificationBox.getNotificationWithValue("blocked-plugins");
+  const priority = notificationBox.PRIORITY_WARNING_MEDIUM;
+  const iconURL = "chrome://mozapps/skin/plugins/pluginGeneric.png";
+
+  if (aEvent.type == "PluginBlocklisted" && !blockedNotification) {
+    var messageString = bundle_browser.getString("blockedpluginsMessage.title");
+    var buttons = [{
+      label: bundle_browser.getString("blockedpluginsMessage.infoButton.label"),
+      accessKey: bundle_browser.getString("blockedpluginsMessage.infoButton.accesskey"),
+      popup: null,
+      callback: blocklistInfo
+    }, {
+      label: bundle_browser.getString("blockedpluginsMessage.searchButton.label"),
+      accessKey: bundle_browser.getString("blockedpluginsMessage.searchButton.accesskey"),
+      popup: null,
+      callback: pluginsMissing
+    }];
+
+    notificationBox.appendNotification(messageString, "blocked-plugins",
+                                       iconURL, priority, buttons);
+  }
+
+  if (aEvent.type == "PluginNotFound") {
+    // Cancel any notification about blocklisting
+    if (blockedNotification)
+      blockedNotification.close();
+
     var messageString = bundle_browser.getString("missingpluginsMessage.title");
     var buttons = [{
       label: bundle_browser.getString("missingpluginsMessage.button.label"),
       accessKey: bundle_browser.getString("missingpluginsMessage.button.accesskey"),
       popup: null,
       callback: pluginsMissing
     }];
 
-    const priority = notificationBox.PRIORITY_WARNING_MEDIUM;
-    const iconURL = "chrome://mozapps/skin/plugins/pluginGeneric.png";
     notificationBox.appendNotification(messageString, "missing-plugins",
                                        iconURL, priority, buttons);
   }
 }
 
-missingPluginInstaller.prototype.closeNotification = function() {
-  var notificationBox = gBrowser.getNotificationBox();
+missingPluginInstaller.prototype.refreshBrowser = function(aEvent) {
+  var browser = aEvent.target;
+  var notificationBox = gBrowser.getNotificationBox(browser);
   var notification = notificationBox.getNotificationWithValue("missing-plugins");
 
+  // clear the plugin list, now that at least one plugin has been installed
+  browser.missingPlugins = null;
   if (notification) {
+    // reset UI
     notificationBox.removeNotification(notification);
   }
+  // reload the browser to make the new plugin show.
+  browser.reload();
+}
+
+function blocklistInfo()
+{
+  var formatter = Components.classes["@mozilla.org/toolkit/URLFormatterService;1"]
+                            .getService(Components.interfaces.nsIURLFormatter);
+  var url = formatter.formatURLPref("extensions.blocklist.detailsURL");
+  gBrowser.loadOneTab(url, null, null, null, false, false);
+  return true;
 }
 
 function pluginsMissing()
 {
   // get the urls of missing plugins
   var tabbrowser = getBrowser();
-  var missingPluginsArray = tabbrowser.mCurrentTab.missingPlugins;
+  var missingPluginsArray = tabbrowser.selectedBrowser.missingPlugins;
   if (missingPluginsArray) {
     window.openDialog("chrome://mozapps/content/plugins/pluginInstallerWizard.xul",
-      "PFSWindow", "modal,chrome,resizable=yes", {plugins: missingPluginsArray, tab: tabbrowser.mCurrentTab});
+                      "PFSWindow", "modal,chrome,resizable=yes",
+                      {plugins: missingPluginsArray, browser: tabbrowser.selectedBrowser});
   }
 }
 
 var gMissingPluginInstaller = new missingPluginInstaller();
 
 function convertFromUnicode(charset, str)
 {
   try {
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -250,17 +250,17 @@
                      onclick="BrowserHomeClick(event);"/>
 
       <toolbaritem id="urlbar-container" align="center" flex="400" persist="width"
                    title="&locationItem.title;" class="chromeclass-location">
         <textbox id="urlbar" flex="1"
                  chromedir="&locale.dir;"
                  type="autocomplete"
                  autocompletesearch="history"
-                 autocompletepopup="PopupAutoComplete"
+                 autocompletepopup="PopupAutoCompleteRichResult"
                  completeselectedindex="true"
                  tabscrolling="true"
                  showcommentcolumn="true"
                  showimagecolumn="true"
                  enablehistory="true"
                  maxrows="10"
                  newlines="stripsurroundingwhitespace"
                  oninput="URLBarOnInput(event);"
--- a/browser/base/content/credits.xhtml
+++ b/browser/base/content/credits.xhtml
@@ -462,17 +462,17 @@
             <li></li>
             <li>MozillaZine Community</li>
           </ul>
         </div>
 
         <p id="gecko" class="center">&credit.poweredByGecko;&reg;</p>
 
         <p class="footnote">
-          &brandFullName;&trade; &license.part0; &copy;1998-2007 &license.part1;
+          &brandFullName;&trade; &license.part0; &copy;1998-2008 &license.part1;
           <a href="" link="about:credits" onclick="visitLink(event);">&license.contrib;</a>,
           &license.part2;
           <a href="" link="about:license" onclick="visitLink(event);">about:license</a>
           &license.part3;</p>
 
         <p class="footnote">
           Mozilla Firefox&reg; and the Firefox logo are registered trademarks of the
           Mozilla Foundation. You are not granted rights or licenses to the trademarks
--- a/browser/base/content/nsContextMenu.js
+++ b/browser/base/content/nsContextMenu.js
@@ -1153,18 +1153,19 @@ nsContextMenu.prototype = {
     var uri = doc.documentURIObject;
 
     var itemId = PlacesUtils.getMostRecentBookmarkForURI(uri);
     if (itemId == -1) {
       var title = doc.title;
       var description = PlacesUtils.getDescriptionFromDocument(doc);
 
       var descAnno = { name: DESCRIPTION_ANNO, value: description };
-      var txn = PlacesUtils.ptm.createItem(uri, PlacesUtils.bookmarksRootId, -1,
-                                           title, null, [descAnno]);
+      var txn = PlacesUtils.ptm.createItem(uri, 
+                                           PlacesUtils.bookmarksMenuFolderId,
+                                           -1, title, null, [descAnno]);
       PlacesUtils.ptm.doTransaction(txn);
       itemId = PlacesUtils.getMostRecentBookmarkForURI(uri);
     }
 
     window.top.PlacesCommandHook.showEditBookmarkPopup(itemId, this.browser, "overlap");
   },
 
   savePageAs: function CM_savePageAs() {
--- a/browser/base/content/pageinfo/pageInfo.js
+++ b/browser/base/content/pageinfo/pageInfo.js
@@ -552,21 +552,21 @@ function ensureSelection(view)
   if (view.selection.count == 0 && view.rowCount)
     view.selection.select(0);
 }
 
 function addImage(url, type, alt, elem, isBg)
 {
   if (!url)
     return;
-  if (!(url in gImageHash))
+  if (!gImageHash.hasOwnProperty(url))
     gImageHash[url] = { };
-  if (!(type in gImageHash[url]))
+  if (!gImageHash[url].hasOwnProperty(type))
     gImageHash[url][type] = { };
-  if (!(alt in gImageHash[url][type])) {
+  if (!gImageHash[url][type].hasOwnProperty(alt)) {
     gImageHash[url][type][alt] = gImageView.data.length;
     try {
       // open for READ, in non-blocking mode
       var cacheEntryDescriptor = httpCacheSession.openCacheEntry(url, ACCESS_READ, false);
     }
     catch(ex) {
       try {
         // open for READ, in non-blocking mode
@@ -604,16 +604,26 @@ function grabAll(elem)
   var url = ComputedStyle && ComputedStyle.getPropertyCSSValue("background-image");
   if (url && url.primitiveType == CSSPrimitiveValue.CSS_URI)
     addImage(url.getStringValue(), gStrings.mediaBGImg, gStrings.notSet, elem, true);
 
   // one swi^H^H^Hif-else to rule them all
   if (elem instanceof HTMLImageElement)
     addImage(elem.src, gStrings.mediaImg,
              (elem.hasAttribute("alt")) ? elem.alt : gStrings.notSet, elem, false);
+#ifdef MOZ_SVG
+  else if (elem instanceof SVGImageElement) {
+    try {
+      // Note: makeURLAbsolute will throw if either the baseURI is not a valid URI
+      //       or the URI formed from the baseURI and the URL is not a valid URI
+      var href = makeURLAbsolute(elem.baseURI, elem.href.baseVal);
+      addImage(href, gStrings.mediaImg, "", elem, false);
+    } catch (e) { }
+  }
+#endif
   else if (elem instanceof HTMLLinkElement) {
     if (elem.rel && /\bicon\b/i.test(elem.rel))
       addImage(elem.href, gStrings.mediaLink, "", elem, false);
   }
   else if (elem instanceof HTMLInputElement || elem instanceof HTMLButtonElement) {
     if (elem.type.toLowerCase() == "image")
       addImage(elem.src, gStrings.mediaInput,
                (elem.hasAttribute("alt")) ? elem.alt : gStrings.notSet, elem, false);
@@ -832,16 +842,24 @@ function makePreview(row)
 
   if (item.hasAttribute("alt"))
     setItemValue("imagealttext", item.alt);
   else if (item instanceof HTMLImageElement || isBG)
     setItemValue("imagealttext", null);
   else
     setItemValue("imagealttext", getValueText(item));
 
+#ifdef MOZ_SVG
+  if (item instanceof SVGImageElement) {
+    setItemValue("imagetitletext", null);
+    setItemValue("imagelongdesctext", null);
+    setItemValue("imagealttext", null);
+  }
+#endif
+
   // get cache info
   var sourceText = gBundle.getString("generalNotCached");
   var cacheKey = url.replace(/#.*$/, "");
   try {
     // open for READ, in non-blocking mode
     var cacheEntryDescriptor = httpCacheSession.openCacheEntry(cacheKey, ACCESS_READ, false);
     if (cacheEntryDescriptor)
       switch (cacheEntryDescriptor.deviceID) {
@@ -908,35 +926,45 @@ function makePreview(row)
 
   var newImage = new Image();
   newImage.setAttribute("id", "thepreviewimage");
   var physWidth = 0, physHeight = 0;
   var width = 0, height = 0;
 
   if ((item instanceof HTMLLinkElement || item instanceof HTMLInputElement ||
        item instanceof HTMLImageElement ||
+#ifdef MOZ_SVG
+       item instanceof SVGImageElement ||
+#endif
       (item instanceof HTMLObjectElement && /^image\//.test(mimeType)) || isBG) && isProtocolAllowed) {
     newImage.setAttribute("src", url);
     physWidth = newImage.width || 0;
     physHeight = newImage.height || 0;
 
     // "width" and "height" attributes must be set to newImage,
     // even if there is no "width" or "height attribute in item;
     // otherwise, the preview image cannot be displayed correctly.
     if (!isBG) {
       newImage.width = ("width" in item && item.width) || newImage.naturalWidth;
       newImage.height = ("height" in item && item.height) || newImage.naturalHeight;
     }
     else {
-      // the Width and Height of an HTML tag should not be use for its background image
+      // the Width and Height of an HTML tag should not be used for its background image
       // (for example, "table" can have "width" or "height" attributes)
       newImage.width = newImage.naturalWidth;
       newImage.height = newImage.naturalHeight;
     }
 
+#ifdef MOZ_SVG
+    if (item instanceof SVGImageElement) {
+      newImage.width = item.width.baseVal.value;
+      newImage.height = item.height.baseVal.value;
+    }
+#endif
+
     width = newImage.width;
     height = newImage.height;
 
     document.getElementById("theimagecontainer").collapsed = false
     document.getElementById("brokenimagecontainer").collapsed = true;
   }
   else {
     // fallback image for protocols not allowed (e.g., data: or javascript:)
--- a/browser/base/content/pageinfo/pageInfo.xul
+++ b/browser/base/content/pageinfo/pageInfo.xul
@@ -409,17 +409,17 @@
                      control="security-identity-verifier-value"/>
               <textbox id="security-identity-verifier-value"
                        class="fieldValue" readonly="true" />
             </row>
           </rows>
         </grid>
         <spacer flex="1"/>
         <hbox><!-- Cert button -->
-          <label id="security-view-text" class="fieldLabel"
+          <description id="security-view-text" class="fieldLabel"
                  control="security-view-cert" flex="1"/>
           <button id="security-view-cert" label="&securityView.certView;"
                   accesskey="&securityView.accesskey;"
                   oncommand="security.viewCert();"/>
         </hbox>
       </groupbox>
       
       <!-- Privacy & History section -->
--- a/browser/base/content/pageinfo/security.js
+++ b/browser/base/content/pageinfo/security.js
@@ -130,20 +130,23 @@ var security = {
   /**
    * Open the cookie manager window
    */
   viewCookies : function()
   {
     var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                        .getService(Components.interfaces.nsIWindowMediator);
     var win = wm.getMostRecentWindow("Browser:Cookies");
-    var eTLDService = Cc["@mozilla.org/network/effective-tld-service;1"].
-                      getService(Ci.nsIEffectiveTLDService);
-    var eTLD = eTLDService.getBaseDomainFromHost(this._getSecurityInfo()
-                                                     .hostName);
+    var eTLDService = Components.classes["@mozilla.org/network/effective-tld-service;1"].
+                      getService(Components.interfaces.nsIEffectiveTLDService);
+    var eTLD = "";
+
+    if (this._getSecurityInfo().hostName)
+      eTLD = eTLDService.getBaseDomainFromHost(this._getSecurityInfo().hostName);
+
     if (win) {
       win.gCookiesWindow.setFilter(eTLD);
       win.focus();
     }
     else
       window.openDialog("chrome://browser/content/preferences/cookies.xul",
                         "Browser:Cookies", "", {filterString : eTLD});
   },
--- a/browser/base/content/sanitize.js
+++ b/browser/base/content/sanitize.js
@@ -205,18 +205,18 @@ Sanitizer.prototype = {
                               .getService(Components.interfaces.nsILoginManager);
         pwmgr.removeAllLogins();
       },
       
       get canClear()
       {
         var pwmgr = Components.classes["@mozilla.org/login-manager;1"]
                               .getService(Components.interfaces.nsILoginManager);
-        var logins = pwmgr.getAllLogins({});
-        return (logins.length > 0);
+        var count = pwmgr.countLogins("", "", ""); // count all logins
+        return (count > 0);
       }
     },
     
     sessions: {
       clear: function ()
       {
         // clear all auth tokens
         var sdr = Components.classes["@mozilla.org/security/sdr;1"]
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -414,17 +414,17 @@
               if (this.mBrowser.userTypedClear > 0 && aRequest)
                 this.mBrowser.userTypedValue = null;
 
               if (aWebProgress.DOMWindow == this.mBrowser.contentWindow &&
                   aWebProgress.isLoadingDocument)
                 this.mTabBrowser.setIcon(this.mTab, null);
 
               // changing location, clear out the missing plugins list
-              this.mTab.missingPlugins = null;
+              this.mBrowser.missingPlugins = null;
 
               if (!this.mBlank && this.mTabBrowser.mCurrentTab == this.mTab) {
                 for (var i = 0; i < this.mTabBrowser.mProgressListeners.length; i++) {
                   var p = this.mTabBrowser.mProgressListeners[i];
                   if (p)
                     p.onLocationChange(aWebProgress, aRequest, aLocation);
                 }
               }
@@ -703,17 +703,18 @@
                   if (content instanceof Components.interfaces.nsIInterfaceRequestor)
                     content.getInterface(Components.interfaces.nsIDOMWindowUtils).focus(null);
                 }
               }
               this.mCurrentBrowser.setAttribute("type", "content-targetable");
             }
 
             var updatePageReport = false;
-            if ((this.mCurrentBrowser.pageReport && !newBrowser.pageReport) ||
+            if (!this.mCurrentBrowser ||
+                (this.mCurrentBrowser.pageReport && !newBrowser.pageReport) ||
                 (!this.mCurrentBrowser.pageReport && newBrowser.pageReport))
               updatePageReport = true;
 
             newBrowser.setAttribute("type", "content-primary");
             this.mCurrentBrowser = newBrowser;
             this.mCurrentTab = this.selectedTab;
 
             if (updatePageReport)
@@ -1427,16 +1428,19 @@
             // destroyed until the document goes away.  So we force a
             // cleanup ourselves.
             // This has to happen before we remove the child so that the
             // XBL implementation of nsIObserver still works.  But
             // clearing focusedWindow happens below because it gets
             // reset by updateCurrentBrowser.
             oldBrowser.destroy();
 
+            if (oldBrowser == this.mCurrentBrowser)
+              this.mCurrentBrowser = null;
+
             // Remove the tab
             this.mTabContainer.removeChild(oldTab);
             // invalidate cache, because mTabContainer is about to change
             this._browsers = null; 
             this.mPanelContainer.removeChild(oldBrowser.parentNode);
 
             try {
               // if we're at the right side (and not the logical end,
--- a/browser/base/content/test/Makefile.in
+++ b/browser/base/content/test/Makefile.in
@@ -45,16 +45,17 @@ include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES =	test_feed_discovery.html \
 		feed_discovery.html \
 		test_bug395533.html \
 		bug395533-data.txt \
 		$(NULL)
 
 _BROWSER_FILES = browser_bug321000.js \
+                 browser_bug409481.js \
                  browser_autodiscovery.js \
                  autodiscovery.html \
                  moz.png \
     $(NULL)
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
new file mode 100644
--- /dev/null
+++ b/browser/base/content/test/browser_bug409481.js
@@ -0,0 +1,37 @@
+function test() {
+  waitForExplicitFinish();
+
+  // XXX This looks a bit odd, but is needed to avoid throwing when removing the
+  // event listeners below. See bug 310955.
+  document.getElementById("sidebar").addEventListener("load", function() { setTimeout(openPanelUrl, 100) }, true);
+  toggleSidebar("viewWebPanelsSidebar", true);
+}
+
+function openPanelUrl(event) {
+  ok(!document.getElementById("sidebar-box").hidden, "Sidebar showing");
+
+  var sidebar = document.getElementById("sidebar");
+  var root = sidebar.contentDocument.documentElement;
+  ok(root.nodeName != "parsererror", "Sidebar is well formed");
+
+  sidebar.removeEventListener("load", openPanelUrl, true);
+  // XXX See comment above
+  sidebar.contentDocument.addEventListener("load", function() { setTimeout(runTest, 100) }, true);
+  var url = 'data:text/html,<div%20id="test_bug409481">Content!</div>';
+  sidebar.contentWindow.loadWebPanel(url);
+}
+
+function runTest(event) {
+  var sidebar = document.getElementById("sidebar");
+  sidebar.contentDocument.removeEventListener("load", runTest, true);
+
+  var browser = sidebar.contentDocument.getElementById("web-panels-browser");
+  var div = browser && browser.contentDocument.getElementById("test_bug409481");
+  ok(div && div.textContent == "Content!", "Sidebar content loaded");
+
+  toggleSidebar("viewWebPanelsSidebar");
+
+  ok(document.getElementById("sidebar-box").hidden, "Sidebar successfully hidden");
+
+  finish();
+}
--- a/browser/base/content/urlbarBindings.xml
+++ b/browser/base/content/urlbarBindings.xml
@@ -141,24 +141,25 @@
         <body><![CDATA[
           var url = transferUtils.retrieveURLFromData(aXferData.data, aXferData.flavour.contentType);
 
           // The URL bar automatically handles inputs with newline characters,
           // so we can get away with treating text/x-moz-url flavours as text/unicode.
           if (url) {
             nsDragAndDrop.dragDropSecurityCheck(aEvent, aDragSession, url);
 
+            this.value = url;
             try {
-              gURLBar.value = url;
-              const nsIScriptSecMan = Components.interfaces.nsIScriptSecurityManager;
-              urlSecurityCheck(gURLBar.value,
+              urlSecurityCheck(this.value,
                                gBrowser.contentPrincipal,
-                               nsIScriptSecMan.DISALLOW_INHERIT_PRINCIPAL);
-              handleURLBarCommand();
-            } catch (ex) {}
+                               Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL);
+            } catch (ex) {
+              return;
+            }
+            handleURLBarCommand();
           }
         ]]></body>
       </method>
 
       <method name="getSupportedFlavours">
         <body><![CDATA[
           var flavourSet = new FlavourSet();
 
@@ -261,17 +262,18 @@
     <handlers>
       <handler event="focus" phase="capturing" action="this._hideURLTooltip();"/>
       <handler event="dragover" phase="capturing" action="nsDragAndDrop.dragOver(event, this);"/>
       <handler event="dragdrop" phase="capturing" action="nsDragAndDrop.drop(event, this);"/>
     </handlers>
 
   </binding>
 
-  <binding id="urlbar-result-popup" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete-result-popup">
+  <!-- Note: this binding is applied to the autocomplete popup used in the Search bar and in web page content -->
+  <binding id="browser-autocomplete-result-popup" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete-result-popup">
     <implementation>
       <method name="openAutocompletePopup">
         <parameter name="aInput"/>
         <parameter name="aElement"/>
         <body>
           <![CDATA[
           // initially the panel is hidden
           // to avoid impacting startup / new window performance
@@ -280,41 +282,45 @@
           // this method is defined on the base binding
           this._openAutocompletePopup(aInput, aElement);
         ]]></body>
       </method>
 
       <method name="onPopupClick">
         <parameter name="aEvent"/>
         <body><![CDATA[
+          // Ignore all right-clicks
+          if (aEvent.button == 2)
+            return;
+
           var controller = this.view.QueryInterface(Components.interfaces.nsIAutoCompleteController);
 
-          // default action on unmodified left-click
+          // Check for unmodified left-click, and use default behavior
           if (aEvent.button == 0 && !aEvent.shiftKey && !aEvent.ctrlKey &&
               !aEvent.altKey && !aEvent.metaKey) {
             controller.handleEnter();
+            return;
           }
-          // completely ignore right-clicks
-          else if (aEvent.button != 2) {
-            if (this.mInput._getParentSearchbar) {
-              // handle search bar click
-              var search = controller.getValueAt(this.selectedIndex);
-              var textbox = this.mInput;
 
-              // close the autocomplete popup and copy the selected value to the search box
-              this.closePopup();
-              textbox.value = search;
-              // open the search results according to the clicking subtlety
-              var where = whereToOpenLink(aEvent, false, true);
-              textbox._getParentSearchbar().doSearch(search, where);
-            }
-            else {
-              // everybody else (i.e. browser content) gets unmodified behavior
-              controller.handleEnter();
-            }
+          // Check for middle-click or modified clicks on the search bar
+          var searchBar = BrowserSearch.searchBar;
+          if (searchBar && searchBar.textbox == this.mInput) {
+            // Handle search bar popup clicks
+            var search = controller.getValueAt(this.selectedIndex);
+  
+            // close the autocomplete popup and revert the entered search term
+            this.closePopup();
+            controller.handleEscape();
+
+            // Fill in the search bar's value
+            searchBar.value = search;
+
+            // open the search results according to the clicking subtlety
+            var where = whereToOpenLink(aEvent, false, true);
+            searchBar.doSearch(search, where);
           }
           ]]></body>
         </method>
       </implementation>
     </binding>
 
     <binding id="urlbar-rich-result-popup" extends="chrome://global/content/bindings/autocomplete.xml#autocomplete-rich-result-popup">
       <implementation>
@@ -353,35 +359,39 @@
           this._openAutocompletePopup(aInput, aElement);
         ]]></body>
       </method>
 
       <method name="onPopupClick">
         <parameter name="aEvent"/>
         <body>
           <![CDATA[
+          // Ignore right-clicks
+          if (aEvent.button == 2)
+            return;
+
           var controller = this.view.QueryInterface(Components.interfaces.nsIAutoCompleteController);
 
-          // default action on unmodified left-click
+          // Check for unmodified left-click, and use default behavior
           if (aEvent.button == 0 && !aEvent.shiftKey && !aEvent.ctrlKey &&
               !aEvent.altKey && !aEvent.metaKey) {
             controller.handleEnter();
+            return;
           }
-          // completely ignore right-clicks
-          else if (aEvent.button != 2) {
-            if (gURLBar && this.mInput == gURLBar) {
-              // handle address bar click
-              var url = controller.getValueAt(this.selectedIndex);
+
+          // Check for middle-click or modified clicks on the URL bar
+          if (gURLBar && this.mInput == gURLBar) {
+            var url = controller.getValueAt(this.selectedIndex);
 
-              // close the autocomplete popup and revert the entered address
-              this.closePopup();
-              controller.handleEscape();
-              // respect the usual clicking subtleties
-              openUILink(url, aEvent);
-            }
+            // close the autocomplete popup and revert the entered address
+            this.closePopup();
+            controller.handleEscape();
+
+            // respect the usual clicking subtleties
+            openUILink(url, aEvent);
           }
         ]]>
         </body>
       </method>
 
       <method name="createResultLabel">
         <parameter name="aTitle"/>
         <parameter name="aUrl"/>
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -490,16 +490,22 @@ function isElementVisible(aElement)
     return false;
 
   // If aElement or a direct or indirect parent is hidden or collapsed,
   // height, width or both will be 0.
   var bo = aElement.boxObject;
   return (bo.height > 0 && bo.width > 0);
 }
 
+function makeURLAbsolute(aBase, aUrl)
+{
+  // Note:  IO.newURI(aUri) will throw if aUri is not a valid URI
+  return IO.newURI(aUrl, null, IO.newURI(aBase)).spec;
+}
+
 function getBrowserFromContentWindow(aContentWindow)
 {
   var browsers = gBrowser.browsers;
   for (var i = 0; i < browsers.length; i++) {
     if (browsers[i].contentWindow == aContentWindow)
       return browsers[i];
   }
   return null;
--- a/browser/base/content/web-panels.xul
+++ b/browser/base/content/web-panels.xul
@@ -42,16 +42,18 @@
 <?xul-overlay href="chrome://global/content/editMenuOverlay.xul"?>
 <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
 
 <!DOCTYPE page [
 <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
 %browserDTD;
 <!ENTITY % textcontextDTD SYSTEM "chrome://global/locale/textcontext.dtd">
 %textcontextDTD;
+<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
+%globalDTD;
 ]>
 
 <page id="webpanels-window"
         xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         onload="load()" onunload="unload()">
   <script type="application/x-javascript" src="chrome://global/content/contentAreaUtils.js"/>
   <script type="application/x-javascript" src="chrome://browser/content/browser.js"/>
--- a/browser/components/feeds/Makefile.in
+++ b/browser/components/feeds/Makefile.in
@@ -38,9 +38,13 @@ DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS = public src
 
+ifdef MOZ_MOCHITEST
+DIRS += test
+endif
+
 include $(topsrcdir)/config/rules.mk
--- a/browser/components/feeds/src/FeedConverter.js
+++ b/browser/components/feeds/src/FeedConverter.js
@@ -456,19 +456,18 @@ var FeedResultService = {
         iid.equals(Ci.nsIFactory) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NOT_IMPLEMENTED;
   },
 };
 
 /**
- * A protocol handler that converts the URIs of Apple's various bogo protocol
- * schemes into http, as they should be. Mostly, this object just forwards 
- * things through to the HTTP protocol handler.
+ * A protocol handler that attempts to deal with the variant forms of feed:
+ * URIs that are actually either http or https.
  */
 function FeedProtocolHandler(scheme) {
   this._scheme = scheme;
   var ios = 
       Cc["@mozilla.org/network/io-service;1"].
       getService(Ci.nsIIOService);
   this._http = ios.getProtocolHandler("http");
 }
@@ -486,44 +485,63 @@ FeedProtocolHandler.prototype = {
     return this._http.defaultPort;
   },
   
   allowPort: function FPH_allowPort(port, scheme) {
     return this._http.allowPort(port, scheme);
   },
   
   newURI: function FPH_newURI(spec, originalCharset, baseURI) {
+    // See bug 408599 - feed URIs can be either standard URLs of the form
+    // feed://example.com, in which case the real protocol is http, or nested
+    // URIs of the form feed:realscheme:. When realscheme is either http or
+    // https, we deal with the way that creates a standard URL with the
+    // realscheme as the host by unmangling in newChannel; for others, we fail
+    // rather than let it wind up loading something like www.realscheme.com//foo
+
+    const feedSlashes = "feed://";
+    const feedHttpSlashes = "feed:http://";
+    const feedHttpsSlashes = "feed:https://";
+    const NS_ERROR_MALFORMED_URI = 0x804B000A;
+
+    if (spec.substr(0, feedSlashes.length) != feedSlashes &&
+        spec.substr(0, feedHttpSlashes.length) != feedHttpSlashes &&
+        spec.substr(0, feedHttpsSlashes.length) != feedHttpsSlashes)
+      throw NS_ERROR_MALFORMED_URI;
+
     var uri = 
         Cc["@mozilla.org/network/standard-url;1"].
         createInstance(Ci.nsIStandardURL);
     uri.init(Ci.nsIStandardURL.URLTYPE_STANDARD, 80, spec, originalCharset,
              baseURI);
     return uri;
   },
   
-  newChannel: function FPH_newChannel(uri) {
+  newChannel: function FPH_newChannel(aUri) {
     var ios = 
         Cc["@mozilla.org/network/io-service;1"].
         getService(Ci.nsIIOService);
     // feed: URIs either start feed://, in which case the real scheme is http:
     // or feed:http(s)://, (which by now we've changed to feed://realscheme//)
+    var feedSpec = aUri.spec;
     const httpsChunk = "feed://https//";
     const httpChunk = "feed://http//";
-    if (uri.spec.substr(0, httpsChunk.length) == httpsChunk)
-      uri.spec = "https://" + uri.spec.substr(httpsChunk.length);
-    else if (uri.spec.substr(0, httpChunk.length) == httpChunk)
-      uri.spec = "http://" + uri.spec.substr(httpChunk.length);
+    if (feedSpec.substr(0, httpsChunk.length) == httpsChunk)
+      feedSpec = "https://" + feedSpec.substr(httpsChunk.length);
+    else if (feedSpec.substr(0, httpChunk.length) == httpChunk)
+      feedSpec = "http://" + feedSpec.substr(httpChunk.length);
     else
-      uri.scheme = "http";
+      feedSpec = feedSpec.replace(/^feed/, "http");
 
+    var uri = ios.newURI(feedSpec, aUri.originCharset, null);
     var channel =
       ios.newChannelFromURI(uri, null).QueryInterface(Ci.nsIHttpChannel);
     // Set this so we know this is supposed to be a feed
     channel.setRequestHeader("X-Moz-Is-Feed", "1", false);
-    channel.originalURI = uri;
+    channel.originalURI = aUri;
     return channel;
   },
   
   QueryInterface: function FPH_QueryInterface(iid) {
     if (iid.equals(Ci.nsIProtocolHandler) ||
         iid.equals(Ci.nsISupports))
       return this;
     throw Cr.NS_ERROR_NO_INTERFACE;
--- a/browser/components/feeds/src/FeedWriter.js
+++ b/browser/components/feeds/src/FeedWriter.js
@@ -125,18 +125,19 @@ FeedWriter.prototype = {
    *          The URI spec to set as the href
    */
   _safeSetURIAttribute: 
   function FW__safeSetURIAttribute(element, attribute, uri) {
     var secman = Cc["@mozilla.org/scriptsecuritymanager;1"].
                  getService(Ci.nsIScriptSecurityManager);    
     const flags = Ci.nsIScriptSecurityManager.DISALLOW_INHERIT_PRINCIPAL;
     try {
-      secman.checkLoadURIStr(this._window.location.href, uri, flags);
-      // checkLoadURIStr will throw if the link URI should not be loaded per 
+      secman.checkLoadURIStrWithPrincipal(this._feedPrincipal, uri, flags);
+      // checkLoadURIStrWithPrincipal will throw if the link URI should not be
+      // loaded, either because our feedURI isn't allowed to load it or per
       // the rules specified in |flags|, so we'll never "linkify" the link...
       element.setAttribute(attribute, uri);
     }
     catch (e) {
       // Not allowed to load this link because secman.checkLoadURIStr threw
     }
   },
 
@@ -771,30 +772,35 @@ FeedWriter.prototype = {
       return chan.originalURI;
 
     return null;
   },
 
   _window: null,
   _document: null,
   _feedURI: null,
+  _feedPrincipal: null,
 
   // nsIFeedWriter
   init: function FW_init(aWindow) {
     // Explicitly wrap |window| in an XPCNativeWrapper to make sure
     // it's a real native object! This will throw an exception if we
     // get a non-native object.
     var window = new XPCNativeWrapper(aWindow);
     this._feedURI = this._getOriginalURI(window);
     if (!this._feedURI)
       return;
 
     this._window = window;
     this._document = window.document;
 
+    var secman = Cc["@mozilla.org/scriptsecuritymanager;1"].
+                 getService(Ci.nsIScriptSecurityManager);
+    this._feedPrincipal = secman.getCodebasePrincipal(this._feedURI);
+
     LOG("Subscribe Preview: feed uri = " + this._window.location.href);
 
     // Set up the subscription UI
     this._initSubscriptionUI();
     var prefs = Cc["@mozilla.org/preferences-service;1"].
                 getService(Ci.nsIPrefBranch2);
     prefs.addObserver(PREF_SELECTED_ACTION, this, false);
     prefs.addObserver(PREF_SELECTED_READER, this, false);
--- a/browser/components/feeds/src/nsFeedSniffer.cpp
+++ b/browser/components/feeds/src/nsFeedSniffer.cpp
@@ -357,18 +357,18 @@ nsFeedSniffer::GetMIMETypeFromContent(ns
 
   // Atom 1.0
   if (!isFeed)
     isFeed = ContainsTopLevelSubstring(dataString, "<feed");
 
   // RSS 1.0
   if (!isFeed) {
     isFeed = ContainsTopLevelSubstring(dataString, "<rdf:RDF") &&
-      dataString.Find(NS_RDF) &&
-      dataString.Find(NS_RSS);
+      dataString.Find(NS_RDF) != -1 &&
+      dataString.Find(NS_RSS) != -1;
   }
 
   // If we sniffed a feed, coerce our internal type
   if (isFeed && !HasAttachmentDisposition(channel))
     sniffedType.AssignLiteral(TYPE_MAYBE_FEED);
   else
     sniffedType.Truncate();
   return NS_OK;
new file mode 100644
--- /dev/null
+++ b/browser/components/feeds/test/Makefile.in
@@ -0,0 +1,57 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Original Code is mozilla.org code.
+#
+# The Initial Developer of the Original Code is
+# Phil Ringnalda.
+# 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 of the GNU General Public License Version 2 or later (the "GPL"),
+# or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+DEPTH		= ../../../..
+topsrcdir	= @top_srcdir@
+srcdir		= @srcdir@
+VPATH		= @srcdir@
+relativesrcdir  = browser/components/feeds/test
+
+include $(DEPTH)/config/autoconf.mk
+
+MODULE		= test_browser_feeds
+XPCSHELL_TESTS	= unit
+
+include $(topsrcdir)/config/rules.mk
+
+_TEST_FILES =	test_bug408328.html \
+		bug408328-data.xml \
+		test_bug368464.html \
+		bug368464-data.xml \
+		$(NULL)
+
+libs:: $(_TEST_FILES)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
new file mode 100644
--- /dev/null
+++ b/browser/components/feeds/test/bug368464-data.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0"?>
+                 <rdf:RDF 
+               xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+               xmlns="http://my.netscape.com/rdf/simple/0.9/">
+               <channel>
+               <title>Tinderbox - Firefox</title>
+               <description>Build bustages for Firefox</description>
+               <link>http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox</link>
+               </channel>
+               <image>
+               <title>Bad</title>
+               <url>http://tinderbox.mozilla.org/channelflames.gif</url>
+               <link>http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox</link>
+               </image>
+           <item><title>The tree is currently closed</title><link>http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox</link></item>
+
+<item><title>MacOSX Darwin 8.8.4 qm-xserve01 dep unit test is in flames</title><link>http://tinderbox.mozilla.org/showbuilds.cgi?tree=Firefox</link></item>
+</rdf:RDF>
new file mode 100644
--- /dev/null
+++ b/browser/components/feeds/test/bug408328-data.xml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8"?>
+<feed xmlns="http://www.w3.org/2005/Atom">
+
+  <title>Example Feed</title> 
+  <link href="http://example.org/"/>
+  <updated>2003-12-13T18:30:02Z</updated>
+
+  <author> 
+    <name>John Doe</name>
+  </author> 
+  <id>urn:uuid:60a76c80-d399-11d9-b93C-0003939e0af6</id>
+
+  <entry>
+
+    <title>Good item</title>
+    <link href="http://example.org/first"/>
+    <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>
+    <updated>2003-12-13T18:30:02Z</updated>
+
+    <summary>Some text.</summary>
+  </entry>
+
+  <entry>
+
+    <title>data: link</title>
+    <link href="data:text/plain,Hi"/>
+    <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6b</id>
+    <updated>2003-12-13T18:30:03Z</updated>
+
+    <summary>Some text.</summary>
+  </entry>
+  
+  <entry>
+
+    <title>javascript: link</title>
+    <link href="javascript:alert('Hi')"/>
+    <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6c</id>
+    <updated>2003-12-13T18:30:04Z</updated>
+
+    <summary>Some text.</summary>
+  </entry>
+  
+  <entry>
+
+    <title>file: link</title>
+    <link href="file:///var/"/>
+    <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6d</id>
+    <updated>2003-12-13T18:30:05Z</updated>
+
+    <summary>Some text.</summary>
+  </entry>
+
+  <entry>
+
+    <title>chrome: link</title>
+    <link href="chrome://browser/content/browser.js"/>
+    <id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6e</id>
+    <updated>2003-12-13T18:30:06Z</updated>
+
+    <summary>Some text.</summary>
+  </entry>
+
+</feed>
new file mode 100644
--- /dev/null
+++ b/browser/components/feeds/test/test_bug368464.html
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=368464
+-->
+<head>
+  <title>Test that RSS 0.90 isn't sniffed</title>
+  <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
+  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=368464">Mozilla Bug 368464</a>
+<p id="display"><iframe id="testFrame" src="bug368464-data.xml"></iframe></p>
+<div id="content" style="display: none">
+
+</div>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+
+/** Test for Bug 368464 **/
+SimpleTest.waitForExplicitFinish();
+
+addLoadEvent(function() {
+  netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
+  ok($("testFrame").contentDocument.documentElement.id != "feedHandler",
+     "RSS 0.90 shouldn't be sniffed as a feed");
+});
+addLoadEvent(SimpleTest.finish);
+
+</script>
+</pre>
+</body>
+</html>
new file mode 100644
--- /dev/null
+++ b/browser/components/feeds/test/test_bug408328.html
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=408328
+-->
+<head>
+  <title>Test feed preview safe-linkification</title>
+  <script type="text/javascript" src="/MochiKit/MochiKit.js"></script>
+  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=408328">Mozilla Bug 408328</a>
+<p id="display"><iframe id="testFrame" src="bug408328-data.xml"></iframe></p>
+<div id="content" style="display: none">
+  
+</div>
+<pre id="test">
+<script class="testbody" type="text/javascript">
+
+/** Test for Bug 408328 **/
+SimpleTest.waitForExplicitFinish();
+
+addLoadEvent(function() {
+  netscape.security.PrivilegeManager.enablePrivilege("UniversalBrowserRead");
+  var links = $("testFrame").contentDocument.getElementById("feedContent").getElementsByTagName("a");
+  is(links.length, 5, "wrong number of linked items in feed preview");
+  for (var i = 0; i < links.length; i++) {
+    if (links[i].href)
+      is(links[i].href, "http://example.org/first", "bad linkified item");
+  }
+});
+addLoadEvent(SimpleTest.finish);
+
+</script>
+</pre>
+</body>
+</html>
+
new file mode 100644
--- /dev/null
+++ b/browser/components/feeds/test/unit/head_feeds.js
@@ -0,0 +1,5 @@
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+const Cr = Components.results;
+
+var ios = Cc["@mozilla.org/network/io-service;1"].getService(Ci.nsIIOService);
new file mode 100644
--- /dev/null
+++ b/browser/components/feeds/test/unit/test_355473.js
@@ -0,0 +1,49 @@
+const NS_ERROR_MALFORMED_URI = 0x804B000A;
+
+function run_test() {
+  var feedFeedURI = ios.newURI("feed://example.com/feed.xml", null, null);
+  var httpFeedURI = ios.newURI("feed:http://example.com/feed.xml", null, null);
+  var httpURI = ios.newURI("http://example.com/feed.xml", null, null);
+
+  var httpsFeedURI =
+    ios.newURI("feed:https://example.com/feed.xml", null, null);
+  var httpsURI = ios.newURI("https://example.com/feed.xml", null, null);
+
+  var feedChannel = ios.newChannelFromURI(feedFeedURI, null);
+  var httpChannel = ios.newChannelFromURI(httpFeedURI, null);
+  var httpsChannel = ios.newChannelFromURI(httpsFeedURI, null);
+
+  // not setting .originalURI to the original URI is naughty
+  do_check_true(feedFeedURI.equals(feedChannel.originalURI));
+  do_check_true(httpFeedURI.equals(httpChannel.originalURI));
+  do_check_true(httpsFeedURI.equals(httpsChannel.originalURI));
+
+  // actually using the horrible mess that's a feed: URI is suicidal
+  do_check_true(httpURI.equals(feedChannel.URI));
+  do_check_true(httpURI.equals(httpChannel.URI));
+  do_check_true(httpsURI.equals(httpsChannel.URI));
+
+  // trying to create a feed URI with something non-http(s) as the inner URL
+  // should fail, until someone fixes bug 408599
+  try {
+    var dataFeedURI = ios.newURI("feed:data:text/xml,<rss/>", null, null);
+    do_throw("Not reached");
+  } catch (e if (e instanceof Ci.nsIException &&
+                 e.result == NS_ERROR_MALFORMED_URI)) {
+    // do nothing
+  }
+  try {
+    var ftpFeedURI = ios.newURI("feed:ftp://example.com/feed.xml", null, null);
+    do_throw("Not reached");
+  } catch (e if (e instanceof Ci.nsIException &&
+                 e.result == NS_ERROR_MALFORMED_URI)) {
+    // do nothing
+  }
+  try {
+    var fileFeedURI = ios.newURI("feed:file:///var/feed.xml", null, null);
+    do_throw("Not reached");
+  } catch (e if (e instanceof Ci.nsIException &&
+                 e.result == NS_ERROR_MALFORMED_URI)) {
+    // do nothing
+  }
+}
--- a/browser/components/migration/src/nsOperaProfileMigrator.cpp
+++ b/browser/components/migration/src/nsOperaProfileMigrator.cpp
@@ -311,17 +311,17 @@ nsOperaProfileMigrator::GetSourceHomePag
  
 
 #define _OPM(type) nsOperaProfileMigrator::type
 
 static
 nsOperaProfileMigrator::PrefTransform gTransforms[] = {
   { "User Prefs", "Download Directory", _OPM(STRING), "browser.download.dir", _OPM(SetFile), PR_FALSE, -1 },
   { nsnull, "Enable Cookies", _OPM(INT), "network.cookie.cookieBehavior", _OPM(SetCookieBehavior), PR_FALSE, -1 },
-  { nsnull, "Accept Cookies Session Only", _OPM(BOOL), "network.cookie.enableForCurrentSessionOnly", _OPM(SetBool), PR_FALSE, -1 },
+  { nsnull, "Accept Cookies Session Only", _OPM(BOOL), "network.cookie.lifetimePolicy", _OPM(SetCookieLifetime), PR_FALSE, -1 },
   { nsnull, "Allow script to resize window", _OPM(BOOL), "dom.disable_window_move_resize", _OPM(SetBool), PR_FALSE, -1 },
   { nsnull, "Allow script to move window", _OPM(BOOL), "dom.disable_window_move_resize", _OPM(SetBool), PR_FALSE, -1 },
   { nsnull, "Allow script to raise window", _OPM(BOOL), "dom.disable_window_flip", _OPM(SetBool), PR_FALSE, -1 },
   { nsnull, "Allow script to change status", _OPM(BOOL), "dom.disable_window_status_change", _OPM(SetBool), PR_FALSE, -1 },
   { nsnull, "Ignore Unrequested Popups", _OPM(BOOL), "dom.disable_open_during_load", _OPM(SetBool), PR_FALSE, -1 },
   { nsnull, "Load Figures", _OPM(BOOL), "permissions.default.image", _OPM(SetImageBehavior), PR_FALSE, -1 },
 
   { "Visited link", nsnull, _OPM(COLOR), "browser.visited_color", _OPM(SetString), PR_FALSE, -1 },
@@ -349,16 +349,23 @@ nsresult
 nsOperaProfileMigrator::SetCookieBehavior(void* aTransform, nsIPrefBranch* aBranch)
 {
   PrefTransform* xform = (PrefTransform*)aTransform;
   PRInt32 val = (xform->intValue == 3) ? 0 : (xform->intValue == 0) ? 2 : 1;
   return aBranch->SetIntPref(xform->targetPrefName, val);
 }
 
 nsresult 
+nsOperaProfileMigrator::SetCookieLifetime(void* aTransform, nsIPrefBranch* aBranch)
+{
+  PrefTransform* xform = (PrefTransform*)aTransform;
+  return aBranch->SetIntPref(xform->targetPrefName, xform->boolValue ? 2 : 0);
+}
+
+nsresult 
 nsOperaProfileMigrator::SetImageBehavior(void* aTransform, nsIPrefBranch* aBranch)
 {
   PrefTransform* xform = (PrefTransform*)aTransform;
   return aBranch->SetIntPref(xform->targetPrefName, xform->boolValue ? 1 : 2);
 }
 
 nsresult 
 nsOperaProfileMigrator::SetBool(void* aTransform, nsIPrefBranch* aBranch)
--- a/browser/components/migration/src/nsOperaProfileMigrator.h
+++ b/browser/components/migration/src/nsOperaProfileMigrator.h
@@ -84,16 +84,17 @@ public:
       PRInt32     intValue;
       PRBool      boolValue;
       char*       stringValue;
     };
   };
 
   static nsresult SetFile(void* aTransform, nsIPrefBranch* aBranch);
   static nsresult SetCookieBehavior(void* aTransform, nsIPrefBranch* aBranch);
+  static nsresult SetCookieLifetime(void* aTransform, nsIPrefBranch* aBranch);
   static nsresult SetImageBehavior(void* aTransform, nsIPrefBranch* aBranch);
   static nsresult SetBool(void* aTransform, nsIPrefBranch* aBranch);
   static nsresult SetWString(void* aTransform, nsIPrefBranch* aBranch);
   static nsresult SetInt(void* aTransform, nsIPrefBranch* aBranch);
   static nsresult SetString(void* aTransform, nsIPrefBranch* aBranch);
 
 protected:
   nsresult CopyPreferences(PRBool aReplace);
--- a/browser/components/places/content/controller.js
+++ b/browser/components/places/content/controller.js
@@ -633,19 +633,26 @@ PlacesController.prototype = {
   /**
    * Loads the selected node's URL in the appropriate tab or window or as a
    * web panel.
    * see also openUILinkIn
    */
   openSelectedNodeIn: function PC_openSelectedNodeIn(aWhere) {
     var node = this._view.selectedURINode;
     if (node && PlacesUtils.checkURLSecurity(node)) {
-       // Check whether the node is a bookmark which should be opened as
-       // a web panel
-      if (aWhere == "current" && PlacesUtils.nodeIsBookmark(node)) {
+      var isBookmark = PlacesUtils.nodeIsBookmark(node);
+
+      if (isBookmark)
+        PlacesUtils.markPageAsFollowedBookmark(node.uri);
+      else
+        PlacesUtils.markPageAsTyped(node.uri);
+
+      // Check whether the node is a bookmark which should be opened as
+      // a web panel
+      if (aWhere == "current" && isBookmark) {
         if (PlacesUtils.annotations
                        .itemHasAnnotation(node.itemId, LOAD_IN_SIDEBAR_ANNO)) {
           var w = getTopWin();
           if (w) {
             w.openWebPanel(node.title, node.uri);
             return;
           }
         }
--- a/browser/components/places/content/editBookmarkOverlay.js
+++ b/browser/components/places/content/editBookmarkOverlay.js
@@ -106,18 +106,22 @@ var gEditItemOverlay = {
       if (PlacesUtils.livemarks.isLivemark(container))
         this._readOnly = true;
       else
         this._readOnly = false;
 
       this._initTextField("locationField", this._uri.spec);
       this._initTextField("tagsField",
                            PlacesUtils.tagging
-                                      .getTagsForURI(this._uri).join(", "),
+                                      .getTagsForURI(this._uri, {}).join(", "),
                           false);
+
+      // tags selector
+      this._rebuildTagsSelectorList();
+
       this._initTextField("keywordField",
                           bms.getKeywordForBookmark(this._itemId));
 
       // Load In Sidebar checkbox
       this._element("loadInSidebarCheckbox").checked =
         PlacesUtils.annotations.itemHasAnnotation(this._itemId,
                                                   LOAD_IN_SIDEBAR_ANNO);
     }
@@ -423,17 +427,17 @@ var gEditItemOverlay = {
     this._itemId = -1;
   },
 
   onTagsFieldBlur: function EIO_onTagsFieldBlur() {
     this._updateTags();
   },
 
   _updateTags: function EIO__updateTags() {
-    var currentTags = PlacesUtils.tagging.getTagsForURI(this._uri);
+    var currentTags = PlacesUtils.tagging.getTagsForURI(this._uri, { });
     var tags = this._getTagsArrayFromTagField();
     if (tags.length > 0 || currentTags.length > 0) {
       var tagsToRemove = [];
       var tagsToAdd = [];
       var t;
       for each (t in currentTags) {
         if (tags.indexOf(t) == -1)
           tagsToRemove.push(t);
@@ -664,16 +668,18 @@ var gEditItemOverlay = {
     PlacesUtils.annotations
                .setItemAnnotation(aFolderId, LAST_USED_ANNO,
                                   new Date().getTime(), 0,
                                   Ci.nsIAnnotationService.EXPIRE_NEVER);
   },
 
   _rebuildTagsSelectorList: function EIO__rebuildTagsSelectorList() {
     var tagsSelector = this._element("tagsSelector");
+    if (tagsSelector.collapsed)
+      return;
 
     while (tagsSelector.hasChildNodes())
       tagsSelector.removeChild(tagsSelector.lastChild);
 
     var tagsInField = this._getTagsArrayFromTagField();
     var allTags = PlacesUtils.tagging.allTags;
     for each (var tag in allTags) {
       var elt = document.createElement("listitem");
@@ -688,22 +694,21 @@ var gEditItemOverlay = {
 
   toggleTagsSelector: function EIO_toggleTagsSelector() {
     var tagsSelector = this._element("tagsSelector");
     var expander = this._element("tagsSelectorExpander");
     if (tagsSelector.collapsed) {
       expander.className = "expander-up";
       expander.setAttribute("tooltiptext",
                             expander.getAttribute("tooltiptextup"));
-
+      tagsSelector.collapsed = false;
       this._rebuildTagsSelectorList();
 
       // This is a no-op if we've added the listener.
       tagsSelector.addEventListener("CheckboxStateChange", this, false);
-      tagsSelector.collapsed = false;
     }
     else {
       expander.className = "expander-down";
       expander.setAttribute("tooltiptext",
                             expander.getAttribute("tooltiptextdown"));
       tagsSelector.collapsed = true;
     }
   },
@@ -774,17 +779,17 @@ var gEditItemOverlay = {
     case "uri":
       var locationField = this._element("locationField");
       if (locationField.value != aValue) {
         this._uri = IO.newURI(aValue);
         this._initTextField("locationField", this._uri.spec);
         this._initNamePicker(); // for microsummaries
         this._initTextField("tagsField",
                              PlacesUtils.tagging
-                                        .getTagsForURI(this._uri).join(", "),
+                                        .getTagsForURI(this._uri, { }).join(", "),
                             false);
         this._rebuildTagsSelectorList();
       }
       break;
     case "keyword":
       this._initTextField("keywordField",
                           PlacesUtils.bookmarks
                                      .getKeywordForBookmark(this._itemId));
--- a/browser/components/places/content/menu.xml
+++ b/browser/components/places/content/menu.xml
@@ -283,16 +283,36 @@
                   (popup.childNodes.length == 1 &&
                    popup.firstChild == popup._emptyMenuItem)) {
                 this._self._showEmptyMenuItem(popup);
               }
             }
           }
         },
 
+        itemMoved:
+        function PMV_itemMoved(aItem, aOldParent, aOldIndex, aNewParent,
+                               aNewIndex) {
+          // This cannot actually happen yet (see IDL)
+          if (aNewParent != aOldParent);
+            return;
+
+          var popup = this._getPopupForContainer(aNewParent);
+          var index = popup._startMarker + 1 + aNewIndex;
+          var children = popup.childNodes;
+          for (var i = 0; i < children.length; i++) {
+            var menuItem = children[i];
+            if (menuItem.node == aItem) {
+              popup.removeChild(menuItem);
+              popup.insertBefore(menuItem, children[index]);
+              return;
+            }
+          }
+        },
+
         itemChanged: function PMV_itemChanged(aNode) {
           // this check can be removed once we fix bug #382397
           var parentNode = aNode.parent;
           if (!parentNode)
             return;
 
           var popup = this._getPopupForContainer(parentNode);
           if (!popup._built)
--- a/browser/components/places/content/places.js
+++ b/browser/components/places/content/places.js
@@ -75,31 +75,60 @@ var PlacesOrganizer = {
     this._content.focus();
 
     // Set up the search UI.
     PlacesSearchBox.init();
 
     // Set up the advanced query builder UI
     PlacesQueryBuilder.init();
 
+    window.addEventListener("AppCommand", this, true);
 #ifdef XP_MACOSX
     // 1. Map Edit->Find command to the organizer's command
     var findMenuItem = document.getElementById("menu_find");
     findMenuItem.setAttribute("command", "OrganizerCommand_find:current");
     var findKey = document.getElementById("key_find");
     findKey.setAttribute("command", "OrganizerCommand_find:current");
 
     // 2. Disable some keybindings from browser.xul
     var elements = ["cmd_handleBackspace", "cmd_handleShiftBackspace"];
     for (var i=0; i < elements.length; i++) {
       document.getElementById(elements[i]).setAttribute("disabled", "true");
     }
 #endif
   },
 
+  QueryInterface: function PO_QueryInterface(aIID) {
+    if (aIID.equals(Components.interfaces.nsIDOMEventListener) ||
+        aIID.equals(Components.interfaces.nsISupports))
+      return this;
+
+    throw Components.results.NS_NOINTERFACE;
+  },
+
+  handleEvent: function PO_handleEvent(aEvent) {
+    if (aEvent.type != "AppCommand")
+      return;
+
+    aEvent.stopPropagation();
+    switch (aEvent.command) {
+      case "Back":
+        if (this._backHistory.length > 0)
+          this.back();
+        break;
+      case "Forward":
+        if (this._forwardHistory.length > 0)
+          this.forward();
+        break;
+      case "Search":
+        PlacesSearchBox.findAll();
+        break;
+    }
+  },
+
   destroy: function PO_destroy() {
   },
 
   _location: null,
   get location() {
     return this._location;
   },
 
@@ -1609,8 +1638,32 @@ var ViewMenu = {
         break;
       default:
         throw("Invalid Column");
     }
     result.sortingAnnotation = sortingAnnotation;
     result.sortingMode = sortingMode;
   }
 };
+
+var PlacesToolbar = {
+  // make places toolbar act like menus
+  openedMenuButton: null,
+
+  autoOpenMenu: function (aTarget) {
+    if (this.openedMenuButton && this.openedMenuButton != aTarget &&
+        aTarget.localName == "toolbarbutton" &&
+        (aTarget.type == "menu" || aTarget.type == "menu-button")) {
+      this.openedMenuButton.open = false;
+      aTarget.open = true;
+    }
+  },
+
+  onMenuOpen: function (aTarget) {
+    if (aTarget.parentNode.localName == "toolbarbutton")
+      this.openedMenuButton = aTarget.parentNode;
+  },
+
+  onMenuClose: function (aTarget) {
+    if (aTarget.parentNode.localName == "toolbarbutton")
+      this.openedMenuButton = null;
+  }
+};
--- a/browser/components/places/content/places.xul
+++ b/browser/components/places/content/places.xul
@@ -57,16 +57,18 @@
 <?xul-overlay href="chrome://browser/content/places/placesOverlay.xul"?>
 #endif
 
 <!DOCTYPE window [
 <!ENTITY % placesDTD SYSTEM "chrome://browser/locale/places/places.dtd">
 %placesDTD;
 <!ENTITY % editMenuOverlayDTD SYSTEM "chrome://global/locale/editMenuOverlay.dtd">
 %editMenuOverlayDTD;
+<!ENTITY % globalDTD SYSTEM "chrome://global/locale/global.dtd">
+%globalDTD;
 ]>
 
 <window id="places"
         title="&places.library.title;" 
         windowtype="Places:Organizer" 
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         onload="PlacesOrganizer.init();"
@@ -136,27 +138,32 @@
 #endif
   </keyset>
 
   <popupset id="placesPopupset">
     <popup id="placesContext"/>
   </popupset>
 
   <toolbox id="placesToolbox">
-    <toolbar class="chromeclass-toolbar" id="placesToolbar" align="center">
+    <toolbar class="chromeclass-toolbar" id="placesToolbar" align="center"
+             onmouseover="PlacesToolbar.autoOpenMenu(event.target);"
+             onpopupshowing="PlacesToolbar.onMenuOpen(event.target);"
+             onpopuphidden="PlacesToolbar.onMenuClose(event.target);">
       <toolbarbutton id="back-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                      command="OrganizerCommand:Back"
                      tooltiptext="&backButton.tooltip;"
                      accesskey="&backCmd.accesskey;"
+                     chromedir="&locale.dir;"
                      disabled="true"/>
     
       <toolbarbutton id="forward-button" class="toolbarbutton-1 chromeclass-toolbar-additional"
                      command="OrganizerCommand:Forward"
                      tooltiptext="&forwardButton.tooltip;"
                      accesskey="&forwardCmd.accesskey;"
+                     chromedir="&locale.dir;"
                      disabled="true"/>
 
       <toolbarbutton id="organizeButton" type="menu" label="&organize.label;">
         <menupopup id="organizeButtonPopup">
           <menuitem id="newbookmark"
                     command="placesCmd_new:bookmark"
                     label="&cmd.new_bookmark.label;"
                     accesskey="&cmd.new_bookmark.accesskey;"/>
--- a/browser/components/places/content/toolbar.xml
+++ b/browser/components/places/content/toolbar.xml
@@ -491,16 +491,47 @@
                      popup.firstChild == popup._emptyMenuItem)) {
                   this._self._showEmptyMenuItem(popup);
                 }
               }
             }
           }
         },
 
+        itemMoved:
+        function TV_V_itemMoved(aItem, aOldParent, aOldIndex, aNewParent,
+                                aNewIndex) {
+          // This cannot actually happen yet (see IDL)
+          if (aNewParent != aOldParent);
+            return;
+
+          if (aNewParent == this._self.getResultNode()) {
+            var children = this._self.childNodes;
+            for (var i = 0; i < children.length; i++) {
+              var button = children[i];
+              if (button.node == aItem) {
+                this._self.removeChild(button);
+                this._self.insertBefore(button, children[aNewIndex]);
+                this._self.updateChevron();
+                return;
+              }
+            }
+          }
+          var popup = this._getPopupForContainer(aNewParent);
+          var children = popup.childNodes;
+          for (var i = 0; i < children.length; i++) {
+            var menuItem = children[i];
+            if (menuItem.node == aItem) {
+              popup.removeChild(menuItem);
+              popup.insertBefore(menuItem, children[aNewIndex]);
+              return;
+            }
+          }
+        },
+
         itemChanged: function TV_V_itemChanged(aNode) {
           // this check can be removed once we fix bug #382397
           var parentNode = aNode.parent;
           if (!parentNode)
             return;
 
           var element;
           var onToolbar = false;
@@ -996,26 +1027,26 @@
       </method>
     </implementation>
 
     <handlers>
       <handler event="mousedown"><![CDATA[
         // When the user clicks down on a button, set it as the selection and 
         // tell the controller that we are the active view.
         //
-        // Sub-menus are handled by the DOMMenuItemActive handler
         var target = event.target;
-        if (target.parentNode != this)
+        if (target == this)
+          this._selection = this.getResult().root;
+        else if (target.parentNode == this &&
+                 (target.localName == "toolbarbutton" ||
+                  target.localName == "toolbarseparator"))
+          this._selection = target.node;
+        else  // Sub-menus are handled by the DOMMenuItemActive handler
           return;
 
-        if (target.localName == "toolbarbutton" ||
-            target.localName == "toolbarseparator")
-          this._selection = target.node;
-        else
-          this._selection = this.getResult().root;
         this._cachedInsertionPoint = undefined;
       ]]></handler>
       <handler event="draggesture"><![CDATA[
         if (event.target.localName == "toolbarbutton")
           nsDragAndDrop.startDrag(event, this._DNDObserver);
       ]]></handler>
       <handler event="dragover"><![CDATA[
         if (!this.checkForMenuEvent(event, "dragOver"))
--- a/browser/components/places/content/treeView.js
+++ b/browser/components/places/content/treeView.js
@@ -300,41 +300,40 @@ PlacesTreeView.prototype = {
 
     // We don't replace the container item itself so we decrease the
     // replaceCount by 1. We don't do so though if there is no visible item
     // for the container. This happens when aContainer is the root node and
     // showRoot is not set.
     if (aContainer.viewIndex != -1)
       replaceCount-=1;
 
+    // Persist selection state
+    var nodesToSelect = [];
+    var selection = this.selection;
+    var rc = selection.getRangeCount();
+    for (var rangeIndex = 0; rangeIndex < rc; rangeIndex++) {
+      var min = { }, max = { };
+      selection.getRangeAt(rangeIndex, min, max);
+      var lastIndex = Math.min(max.value, startReplacement + replaceCount -1);
+      if (min.value < startReplacement || min.value > lastIndex)
+        continue;
+
+      for (var nodeIndex = min.value; nodeIndex <= lastIndex; nodeIndex++)
+        nodesToSelect.push(this._visibleElements[nodeIndex]);
+    }
+
     // Mark the removes as invisible
     for (var i = 0; i < replaceCount; i++)
       this._visibleElements[startReplacement + i].viewIndex = -1;
 
     // Building the new list will set the new elements' visible indices.
     var newElements = [];
     var toOpenElements = [];
     this._buildVisibleSection(aContainer, newElements, toOpenElements, startReplacement);
 
-    // Persist selection state
-    var nodesToSelect = [];
-    var selection = this.selection;
-    var rc = selection.getRangeCount();
-    for (var rangeIndex = 0; rangeIndex < rc; rangeIndex++) {
-      var min = { }, max = { };
-      selection.getRangeAt(rangeIndex, min, max);
-      if (min.value > startReplacement + replaceCount)
-        continue;
-
-      for (var nodeIndex = min.value; nodeIndex <= max.value; nodeIndex++) {
-        if (newElements.indexOf(this._visibleElements[nodeIndex]) != -1)
-          nodesToSelect.push(this._visibleElements[nodeIndex]);
-      }
-    }
-
     // actually update the visible list
     this._visibleElements =
       this._visibleElements.slice(0, startReplacement).concat(newElements)
           .concat(this._visibleElements.slice(startReplacement + replaceCount,
                                               this._visibleElements.length));
 
     // If the new area has a different size, we'll have to renumber the
     // elements following the area.
@@ -372,17 +371,39 @@ PlacesTreeView.prototype = {
     }
 
     this._tree.endUpdateBatch();
 
     // restore selection
     if (nodesToSelect.length > 0) {
       for each (var node in nodesToSelect) {
         var index = node.viewIndex;
-        selection.rangedSelect(index, index, true);
+
+        // if the same node was used (happens on sorting-changes),
+        // just use viewIndex
+        if (index == -1) { // otherwise, try to find an equal node
+          var itemId = node.itemId;
+          if (itemId != 1) { // bookmark-nodes in queries case
+            for (i=0; i < newElements.length && index == -1; i++) {
+              if (newElements[i].itemId == itemId)
+                index = newElements[i].viewIndex;
+            }
+          }
+          else { // history nodes
+            var uri = node.uri;
+            if (uri) {
+              for (i=0; i < newElements.length && index == -1; i++) {
+                if (newElements[i].uri == uri)
+                  index = newElements[i].viewIndex;
+              }
+            }
+          }
+        }
+        if (index != -1)
+          selection.rangedSelect(index, index, true);
       }
       selection.selectEventsSuppressed = false;
     }
   },
 
   /**
    * This returns true if the two results can be collapsed as duplicates.
    * aShowThisOne will be either 0 or 1, indicating which of the
@@ -467,17 +488,17 @@ PlacesTreeView.prototype = {
         return this.COLUMN_TYPE_LASTMODIFIED;
       case "tags":
         return this.COLUMN_TYPE_TAGS;
     }
     return this.COLUMN_TYPE_UNKNOWN;
   },
 
   _sortTypeToColumnType: function PTV__sortTypeToColumnType(aSortType) {
-    switch(aSortType) {
+    switch (aSortType) {
       case Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_ASCENDING:
         return [this.COLUMN_TYPE_TITLE, false];
       case Ci.nsINavHistoryQueryOptions.SORT_BY_TITLE_DESCENDING:
         return [this.COLUMN_TYPE_TITLE, true];
       case Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_ASCENDING:
         return [this.COLUMN_TYPE_DATE, false];
       case Ci.nsINavHistoryQueryOptions.SORT_BY_DATE_DESCENDING:
         return [this.COLUMN_TYPE_DATE, true];
@@ -503,16 +524,20 @@ PlacesTreeView.prototype = {
       case Ci.nsINavHistoryQueryOptions.SORT_BY_DATEADDED_ASCENDING:
         return [this.COLUMN_TYPE_DATEADDED, false];
       case Ci.nsINavHistoryQueryOptions.SORT_BY_DATEADDED_DESCENDING:
         return [this.COLUMN_TYPE_DATEADDED, true];
       case Ci.nsINavHistoryQueryOptions.SORT_BY_LASTMODIFIED_ASCENDING:
         return [this.COLUMN_TYPE_LASTMODIFIED, false];
       case Ci.nsINavHistoryQueryOptions.SORT_BY_LASTMODIFIED_DESCENDING:
         return [this.COLUMN_TYPE_LASTMODIFIED, true];
+      case Ci.nsINavHistoryQueryOptions.SORT_BY_TAGS_ASCENDING:
+        return [this.COLUMN_TYPE_TAGS, false];
+      case Ci.nsINavHistoryQueryOptions.SORT_BY_TAGS_DESCENDING:
+        return [this.COLUMN_TYPE_TAGS, true];
     }
     return [this.COLUMN_TYPE_UNKNOWN, false];
   },
 
   // nsINavHistoryResultViewer
   itemInserted: function PTV_itemInserted(aParent, aItem, aNewIndex) {
     if (!this._tree)
       return;
@@ -631,17 +656,17 @@ PlacesTreeView.prototype = {
    * when we really remove things is when deleting URIs, which will apply to
    * all collapsees. This function is called sometimes when resorting items.
    * However, we won't do this when sorted by date because dates will never
    * change for visits, and date sorting is the only time things are collapsed.
    */
   itemRemoved: function PTV_itemRemoved(aParent, aItem, aOldIndex) {
     NS_ASSERT(this._result, "Got a notification but have no result!");
     if (!this._tree)
-        return; // nothing to do
+      return; // nothing to do
 
     var oldViewIndex = aItem.viewIndex;
     if (oldViewIndex < 0)
       return; // item was already invisible, nothing to do
 
     // this may have been a container, in which case it has a lot of rows
     var count = this._countVisibleRowsForItem(aItem);
 
@@ -683,16 +708,65 @@ PlacesTreeView.prototype = {
     }
 
     // redraw parent because twisty may have changed
     if (!aParent.hasChildren)
       this.itemChanged(aParent);
   },
 
   /**
+   * Be careful, aOldIndex and aNewIndex specify the index in the
+   * corresponding parent nodes, not the visible indexes.
+   */
+  itemMoved:
+  function PTV_itemMoved(aItem, aOldParent, aOldIndex, aNewParent, aNewIndex) {
+    NS_ASSERT(this._result, "Got a notification but have no result!");
+    if (!this._tree)
+      return; // nothing to do
+
+    var oldViewIndex = aItem.viewIndex;
+    if (oldViewIndex < 0)
+      return; // item was already invisible, nothing to do
+
+    // this may have been a container, in which case it has a lot of rows
+    var count = this._countVisibleRowsForItem(aItem);
+
+    // Persist selection state
+    var nodesToSelect = [];
+    var selection = this.selection;
+    var rc = selection.getRangeCount();
+    for (var rangeIndex = 0; rangeIndex < rc; rangeIndex++) {
+      var min = { }, max = { };
+      selection.getRangeAt(rangeIndex, min, max);
+      var lastIndex = Math.min(max.value, oldViewIndex + count -1);
+      if (min.value < oldViewIndex || min.value > lastIndex)
+        continue;
+
+      for (var nodeIndex = min.value; nodeIndex <= lastIndex; nodeIndex++)
+        nodesToSelect.push(this._visibleElements[nodeIndex]);
+    }
+    if (nodesToSelect.length > 0)
+      selection.selectEventsSuppressed = true;
+
+    // remove the nodes, let itemInserted restore all of its contents
+    this._visibleElements.splice(oldViewIndex, count);
+    this._tree.rowCountChanged(oldViewIndex, -count);
+    this.itemInserted(aNewParent, aItem, aNewIndex);
+
+    // restore selection
+    if (nodesToSelect.length > 0) {
+      for each (var node in nodesToSelect) {
+        var index = node.viewIndex;
+        selection.rangedSelect(index, index, true);
+      }
+      selection.selectEventsSuppressed = false;
+    }
+  },
+
+  /**
    * Be careful, the parameter 'aIndex' here specifies the index in the parent
    * node of the item, not the visible index.
    *
    * This is called from the result when the item is replaced, but this object
    * calls this function internally also when duplicate collapsing changes. In
    * this case, aIndex will be 0, so we should be careful not to use the value.
    */
   itemReplaced:
@@ -1074,23 +1148,17 @@ PlacesTreeView.prototype = {
         // normally, this is just the title, but we don't want empty items in
         // the tree view so return a special string if the title is empty.
         // Do it here so that callers can still get at the 0 length title
         // if they go through the "result" API.
         if (PlacesUtils.nodeIsSeparator(node))
           return "";
         return node.title || PlacesUtils.getString("noTitle");
       case this.COLUMN_TYPE_TAGS:
-        if (PlacesUtils.nodeIsURI(node)) {
-          var tagsvc = PlacesUtils.tagging;
-          var uri = PlacesUtils._uri(node.uri);
-          var tags = tagsvc.getTagsForURI(uri, {});
-          return tags.join(", ");
-        }
-        return "";
+        return node.tags;
       case this.COLUMN_TYPE_URI:
         if (PlacesUtils.nodeIsURI(node))
           return node.uri;
         return "";
       case this.COLUMN_TYPE_DATE:
         if (node.time == 0 || !PlacesUtils.nodeIsURI(node)) {
           // hosts and days shouldn't have a value for the date column.
           // Actually, you could argue this point, but looking at the
@@ -1165,20 +1233,16 @@ PlacesTreeView.prototype = {
 
     node.containerOpen = !node.containerOpen;
   },
 
   cycleHeader: function PTV_cycleHeader(aColumn) {
     if (!this._result)
       throw Cr.NS_ERROR_UNEXPECTED;
 
-    // Currently cannot sort by tags
-    if (aColumn.id == "tags")
-      return;
-
     this._enumerateObservers("onCycleHeader", [aColumn]);
 
     // Sometimes you want a tri-state sorting, and sometimes you don't. This
     // rule allows tri-state sorting when the root node is a folder. This will
     // catch the most common cases. When you are looking at folders, you want
     // the third state to reset the sorting to the natural bookmark order. When
     // you are looking at history, that third state has no meaning so we try
     // to disallow it.
@@ -1276,16 +1340,25 @@ PlacesTreeView.prototype = {
           newSort = NHQO.SORT_BY_LASTMODIFIED_DESCENDING;
         else if (allowTriState &&
                  oldSort == NHQO.SORT_BY_LASTMODIFIED_DESCENDING)
           newSort = NHQO.SORT_BY_NONE;
         else
           newSort = NHQO.SORT_BY_LASTMODIFIED_ASCENDING;
 
         break;
+      case this.COLUMN_TYPE_TAGS:
+        if (oldSort == NHQO.SORT_BY_TAGS_ASCENDING)
+          newSort = NHQO.SORT_BY_TAGS_DESCENDING;
+        else if (allowTriState && oldSort == NHQO.SORT_BY_TAGS_DESCENDING)
+          newSort = NHQO.SORT_BY_NONE;
+        else
+          newSort = NHQO.SORT_BY_TAGS_ASCENDING;
+
+        break;
       default:
         throw Cr.NS_ERROR_INVALID_ARG;
     }
     this._result.sortingAnnotation = newSortingAnnotation;
     this._result.sortingMode = newSort;
   },
 
   selectionChanged: function PTV_selectionChnaged() {
--- a/browser/components/places/content/utils.js
+++ b/browser/components/places/content/utils.js
@@ -106,16 +106,22 @@ var PlacesUtils = {
    * The Nav History Service.
    */
   get history() {
     delete this.history;
     return this.history = Cc["@mozilla.org/browser/nav-history-service;1"].
                           getService(Ci.nsINavHistoryService);
   },
 
+  get globalHistory() {
+    delete this.globalHistory;
+    return this.globalHistory = Cc["@mozilla.org/browser/global-history;2"].
+                                getService(Ci.nsIBrowserHistory);
+  },
+
   /**
    * The Live Bookmark Service.
    */
   get livemarks() {
     delete this.livemarks;
     return this.livemarks = Cc["@mozilla.org/browser/livemark-service;2"].
                             getService(Ci.nsILivemarkService);
   },
@@ -658,19 +664,24 @@ var PlacesUtils = {
     var keyword = aData.keyword;
     var annos = aData.annos;
     if (aExcludeAnnotations) {
       annos =
         annos.filter(function(aValue, aIndex, aArray) {
                        return aExcludeAnnotations.indexOf(aValue.name) == -1;
                     });
     }
+    var childTxns = [];
+    if (aData.dateAdded)
+      childTxns.push(this.ptm.editItemDateAdded(null, aData.dateAdded));
+    if (aData.lastModified)
+      childTxns.push(this.ptm.editItemLastModified(null, aData.lastModified));
 
     return this.ptm.createItem(itemURL, aContainer, aIndex, itemTitle, keyword,
-                               annos);
+                               annos, childTxns);
   },
 
   /**
    * Gets a transaction for copying (recursively nesting to include children)
    * a folder (or container) and its contents from one folder to another.
    *
    * @param   aData
    *          Unwrapped dropped folder data - Obj containing folder and children
@@ -721,19 +732,22 @@ var PlacesUtils = {
         if (txn)
           childItemsTransactions.push(txn);
       }
       return childItemsTransactions;
     }
 
     var title = aData.folder.title;
     var annos = aData.folder.annos;
-
-    return this.ptm.createFolder(title, aContainer, aIndex, annos,
-                                 getChildItemsTransactions(aData.children));
+    var childItems = getChildItemsTransactions(aData.children);
+    if (aData.folder.dateAdded)
+      childItems.push(this.ptm.editItemDateAdded(null, aData.folder.dateAdded));
+    if (aData.folder.lastModified)
+      childItems.push(this.ptm.editItemLastModified(null, aData.folder.lastModified));
+    return this.ptm.createFolder(title, aContainer, aIndex, annos, childItems);
   },
 
   /**
    * Unwraps data from the Clipboard or the current Drag Session.
    * @param   blob
    *          A blob (string) of data, in some format we potentially know how
    *          to parse.
    * @param   type
@@ -1237,16 +1251,39 @@ var PlacesUtils = {
 
       node = node.parentNode;
     }
 
     return null;
   },
 
   /**
+   * By calling this before we visit a URL, we will use TRANSITION_TYPED
+   * as the transition for the visit to that URL (if we don't have a referrer).
+   * This is used when visiting pages from the history menu, history sidebar,
+   * url bar, url autocomplete results, and history searches from the places
+   * organizer.  If we don't call this, we'll treat those visits as
+   * TRANSITION_LINK.
+   */
+  markPageAsTyped: function PU_markPageAsTyped(aURL) {
+    this.globalHistory.markPageAsTyped(this.createFixedURI(aURL));
+  },
+
+  /**
+   * By calling this before we visit a URL, we will use TRANSITION_BOOKMARK
+   * as the transition for the visit to that URL (if we don't have a referrer).
+   * This is used when visiting pages from the bookmarks menu, 
+   * personal toolbar, and bookmarks from within the places organizer.
+   * If we don't call this, we'll treat those visits as TRANSITION_LINK.
+   */
+  markPageAsFollowedBookmark: function PU_markPageAsFollowedBookmark(aURL) {
+    this.history.markPageAsFollowedBookmark(this.createFixedURI(aURL));
+  },
+
+  /**
    * Allows opening of javascript/data URI only if the given node is
    * bookmarked (see bug 224521).
    * @param aURINode
    *        a URI node
    * @return true if it's safe to open the node in the browser, false otherwise.
    *
    */
   checkURLSecurity: function PU_checkURLSecurity(aURINode) {
@@ -1547,33 +1584,33 @@ var PlacesUtils = {
   getURLsForContainerNode: function PU_getURLsForContainerNode(aNode) {
     let urls = [];
     if (this.nodeIsFolder(aNode) && asQuery(aNode).queryOptions.excludeItems) {
       // grab manually
       let contents = this.getFolderContents(aNode.itemId, false, false).root;
       for (let i = 0; i < contents.childCount; ++i) {
         let child = contents.getChild(i);
         if (this.nodeIsURI(child))
-          urls.push(child.uri);
+          urls.push({uri: child.uri, isBookmark: this.nodeIsBookmark(child)});
       }
     }
     else {
       let result, oldViewer;
       try {
         let wasOpen = aNode.containerOpen;
         if (!wasOpen) {
           result = aNode.parentResult;
           oldViewer = result.viewer;
           result.viewer = null;
           aNode.containerOpen = true;
         }
         for (let i = 0; i < aNode.childCount; ++i) {
           let child = aNode.getChild(i);
           if (this.nodeIsURI(child))
-            urls.push(child.uri);
+            urls.push({uri: child.uri, isBookmark: this.nodeIsBookmark(child)});
         }
         if (!wasOpen)
           aNode.containerOpen = false;
       }
       finally {
         if (oldViewer)
           result.viewer = oldViewer;
       }
@@ -1620,44 +1657,59 @@ var PlacesUtils = {
         // don't set the pref unless they press OK and it's false
         if (reallyOpen && !warnOnOpen.value)
           pref.setBoolPref(kWarnOnOpenPref, false);
       }
     }
     return reallyOpen;
   },
 
-  _openTabset: function PU__openTabset(aURLs, aEvent) {
+  /** aItemsToOpen needs to be an array of objects of the form:
+    * {uri: string, isBookmark: boolean}
+    */
+  _openTabset: function PU__openTabset(aItemsToOpen, aEvent) {
+    var urls = [];
+    for each (var item in aItemsToOpen) {
+      if (item.isBookmark)
+        this.markPageAsFollowedBookmark(item.uri);
+      else
+        this.markPageAsTyped(item.uri);
+
+      urls.push(item.uri);
+    }
+
     var browserWindow = getTopWin();
     var where = browserWindow ?
                 whereToOpenLink(aEvent, false, true) : "window";
     if (where == "window") {
       window.openDialog(getBrowserURL(), "_blank",
-                        "chrome,all,dialog=no", aURLs.join("|"));
+                        "chrome,all,dialog=no", urls.join("|"));
       return;
     }
 
     var loadInBackground = where == "tabshifted" ? true : false;
     var replaceCurrentTab = where == "tab" ? false : true;
-    browserWindow.getBrowser().loadTabs(aURLs, loadInBackground,
+    browserWindow.getBrowser().loadTabs(urls, loadInBackground,
                                         replaceCurrentTab);
   },
 
   openContainerNodeInTabs: function PU_openContainerInTabs(aNode, aEvent) {
     var urlsToOpen = this.getURLsForContainerNode(aNode);
     if (!this._confirmOpenInTabs(urlsToOpen.length))
       return;
+
     this._openTabset(urlsToOpen, aEvent);
   },
 
   openURINodesInTabs: function PU_openURINodesInTabs(aNodes, aEvent) {
     var urlsToOpen = [];
     for (var i=0; i < aNodes.length; i++) {
+      // skip over separators and folders
       if (this.nodeIsURI(aNodes[i]))
-        urlsToOpen.push(aNodes[i].uri);
+        urlsToOpen.push({uri: aNodes[i].uri, isBookmark: this.nodeIsBookmark(aNodes[i])});
     }
     this._openTabset(urlsToOpen, aEvent);
   },
 
   /**
    * Helper for the toolbar and menu views
    */
   createMenuItemForNode: function(aNode, aContainersMap) {
--- a/browser/components/places/public/nsIPlacesTransactionsService.idl
+++ b/browser/components/places/public/nsIPlacesTransactionsService.idl
@@ -47,17 +47,17 @@ interface nsITransaction;
 
 /**
  * nsIPlacesTransactionService is a service designed to handle
  * nsITransactions that correspond to changes in Places. It is here as a
  * service so that we can keep the transactions around without holding onto
  * the global scope of a js window.
  */
 
-[scriptable, uuid(89f61a91-c8f7-4abb-b880-895cb9852c35)]
+[scriptable, uuid(310f22ff-35e3-44b2-8593-08a119933f7e)]
 interface nsIPlacesTransactionsService : nsITransactionManager
 {
   /**
    * Transaction for performing several Places Transactions in a single batch. 
    * 
    * @param aName
    *        title of the aggregate transactions
    * @param aTransactions
@@ -282,16 +282,40 @@ interface nsIPlacesTransactionsService :
    * @param aNewMicrosummary
    *        new microsummary for the bookmark
    * @returns nsITransaction object
    */
   nsITransaction editBookmarkMicrosummary(in long long aItemId,
                                           in nsIMicrosummary aNewMicrosummary);
 
   /**
+   * Transaction for editing an item's date added property.
+   *
+   * @param aItemId
+   *        id of the item to edit
+   * @param aNewDateAdded
+   *        new date added for the item 
+   * @returns nsITransaction object
+   */
+  nsITransaction editItemDateAdded(in long long aItemId,
+                                   in PRTime aNewDateAdded);
+
+  /**
+   * Transaction for editing an item's last modified time.
+   *
+   * @param aItemId
+   *        id of the item to edit
+   * @param aNewLastModified
+   *        new last modified date for the item 
+   * @returns nsITransaction object
+   */
+  nsITransaction editItemLastModified(in long long aItemId,
+                                      in PRTime aNewLastModified);
+
+  /**
    * Transaction for sorting a folder by name
    *
    * @param aFolderId
    *        id of the folder to sort
    * @oaram aFolderIndex
    *        index of the folder to sort
    * @returns nsITransaction object
    */
--- a/browser/components/places/src/nsPlacesTransactionsService.js
+++ b/browser/components/places/src/nsPlacesTransactionsService.js
@@ -131,16 +131,24 @@ placesTransactionsService.prototype = {
   editLivemarkFeedURI: function placesEditLvmkFeedURI(folderId, uri) {
     return new placesEditLivemarkFeedURITransactions(folderId, uri);
   },
 
   editBookmarkMicrosummary: function placesEditBkmkMicrosummary(aID, newMicrosummary) {
     return new placesEditBookmarkMicrosummaryTransactions(aID, newMicrosummary);
   },
 
+  editItemDateAdded: function placesEditItemDateAdded(aID, aNewDateAdded) {
+    return new placesEditItemDateAddedTransaction(aID, aNewDateAdded);
+  },
+
+  editItemLastModified: function placesEditItemLastModified(aID, aNewLastModified) {
+    return new placesEditItemLastModifiedTransaction(aID, aNewLastModified);
+  },
+
   sortFolderByName: function placesSortFldrByName(aFolderId, aFolderIndex) {
    return new placesSortFolderByNameTransactions(aFolderId, aFolderIndex);
   },
 
   // Update commands in the undo group of the active window
   // commands in inactive windows will are updated on-focus
   _updateCommands: function() {
     var wm = Cc["@mozilla.org/appshell/window-mediator;1"].
@@ -725,16 +733,64 @@ placesEditBookmarkMicrosummaryTransactio
   undoTransaction: function PEBMT_undoTransaction() {
     if (this._oldMicrosummary)
       this._mss.setMicrosummary(this.id, this._oldMicrosummary);
     else
       this._mss.removeMicrosummary(this.id);
   }
 };
 
+function placesEditItemDateAddedTransaction(id, newDateAdded) {
+  this.id = id;
+  this._newDateAdded = newDateAdded;
+  this._oldDateAdded = null;
+  this.redoTransaction = this.doTransaction;
+}
+
+placesEditItemDateAddedTransaction.prototype = {
+  __proto__: placesBaseTransaction.prototype,
+
+  // to support folders as well
+  get container() { return this.id; },
+  set container(val) { return this.id = val; },
+
+  doTransaction: function PEITT_doTransaction() {
+    this._oldDateAdded = PlacesUtils.bookmarks.getItemDateAdded(this.id);
+    PlacesUtils.bookmarks.setItemDateAdded(this.id, this._newDateAdded);
+  },
+
+  undoTransaction: function PEITT_undoTransaction() {
+    PlacesUtils.bookmarks.setItemDateAdded(this.id, this._oldDateAdded);
+  }
+};
+
+function placesEditItemLastModifiedTransaction(id, newLastModified) {
+  this.id = id;
+  this._newLastModified = newLastModified;
+  this._oldLastModified = null;
+  this.redoTransaction = this.doTransaction;
+}
+
+placesEditItemLastModifiedTransaction.prototype = {
+  __proto__: placesBaseTransaction.prototype,
+
+  // to support folders as well
+  get container() { return this.id; },
+  set container(val) { return this.id = val; },
+
+  doTransaction: function PEITT_doTransaction() {
+    this._oldLastModified = PlacesUtils.bookmarks.getItemLastModified(this.id);
+    PlacesUtils.bookmarks.setItemLastModified(this.id, this._newLastModified);
+  },
+
+  undoTransaction: function PEITT_undoTransaction() {
+    PlacesUtils.bookmarks.setItemLastModified(this.id, this._oldLastModified);
+  }
+};
+
 function placesSortFolderByNameTransactions(aFolderId, aFolderIndex) {
   this._folderId = aFolderId;
   this._folderIndex = aFolderIndex;
   this._oldOrder = null,
   this.redoTransaction = this.doTransaction;
 }
 
 placesSortFolderByNameTransactions.prototype = {
--- a/browser/components/places/tests/unit/test_placesTxn.js
+++ b/browser/components/places/tests/unit/test_placesTxn.js
@@ -108,24 +108,24 @@ var observer = {
         iid.equals(Ci.nsISupports)) {
       return this;
     }
     throw Cr.NS_ERROR_NO_INTERFACE;
   }
 };
 bmsvc.addObserver(observer, false);
 
-// get bookmarks root index
-var root = bmsvc.bookmarksMenuFolder;
-
 // index at which items should begin
 var bmStartIndex = 0;
 
 // main
 function run_test() {
+  // get bookmarks root index
+  var root = bmsvc.bookmarksMenuFolder;
+
   const DESCRIPTION_ANNO = "bookmarkProperties/description";
   var testDescription = "this is my test description";
   var annotationService = Cc["@mozilla.org/browser/annotation-service;1"].
                           getService(Ci.nsIAnnotationService);
 
   //Test creating a folder with a description
   var annos = [{ name: DESCRIPTION_ANNO,
                  type: Ci.nsIAnnotationService.TYPE_STRING,
@@ -154,24 +154,25 @@ function run_test() {
   do_check_eq(observer._itemAddedIndex, bmStartIndex);
   do_check_true(bmsvc.isBookmarked(uri("http://www.example.com")));
   txn2.undoTransaction();
   do_check_eq(observer._itemRemovedId, b);
   do_check_eq(observer._itemRemovedIndex, bmStartIndex);
 
   // Create to a folder
   var txn2a = ptSvc.createFolder("Folder", root, bmStartIndex);
+  ptSvc.doTransaction(txn2a);
   var fldrId = bmsvc.getChildFolder(root, "Folder");
   var txn2b = ptSvc.createItem(uri("http://www.example2.com"), fldrId, bmStartIndex, "Testing1b");
   ptSvc.doTransaction(txn2b);
   var b2 = (bmsvc.getBookmarkIdsForURI(uri("http://www.example2.com"), {}))[0];
   do_check_eq(observer._itemAddedId, b2);
   do_check_eq(observer._itemAddedIndex, bmStartIndex);
   do_check_true(bmsvc.isBookmarked(uri("http://www.example2.com")));
-  txn2.undoTransaction();
+  txn2b.undoTransaction();
   do_check_eq(observer._itemRemovedId, b2);
   do_check_eq(observer._itemRemovedIndex, bmStartIndex);
 
   // Testing moving an item
   ptSvc.doTransaction(ptSvc.createItem(uri("http://www.example3.com"), root, -1, "Testing2"));
   ptSvc.doTransaction(ptSvc.createItem(uri("http://www.example3.com"), root, -1, "Testing3"));   
   ptSvc.doTransaction(ptSvc.createItem(uri("http://www.example3.com"), fldrId, -1, "Testing4"));
   var bkmkIds = bmsvc.getBookmarkIdsForURI(uri("http://www.example3.com"), {});
@@ -180,64 +181,64 @@ function run_test() {
   var bkmk2Id = bkmkIds[1];
   var bkmk3Id = bkmkIds[2];
   var txn3 = ptSvc.moveItem(bkmk1Id, root, -1);
   txn3.doTransaction();
 
   // Moving items between the same folder
   do_check_eq(observer._itemMovedId, bkmk1Id);
   do_check_eq(observer._itemMovedOldParent, root);
-  do_check_eq(observer._itemMovedOldIndex, 0);
+  do_check_eq(observer._itemMovedOldIndex, 1);
   do_check_eq(observer._itemMovedNewParent, root);
-  do_check_eq(observer._itemMovedNewIndex, 1);
+  do_check_eq(observer._itemMovedNewIndex, 2);
   txn3.undoTransaction();
   do_check_eq(observer._itemMovedId, bkmk1Id);
   do_check_eq(observer._itemMovedOldParent, root);
-  do_check_eq(observer._itemMovedOldIndex, 1);
+  do_check_eq(observer._itemMovedOldIndex, 2);
   do_check_eq(observer._itemMovedNewParent, root);
-  do_check_eq(observer._itemMovedNewIndex, 0);
+  do_check_eq(observer._itemMovedNewIndex, 1);
 
   // Moving items between different folders
   var txn3b = ptSvc.moveItem(bkmk1Id, fldrId, -1);
   txn3b.doTransaction();
   do_check_eq(observer._itemMovedId, bkmk1Id);
   do_check_eq(observer._itemMovedOldParent, root);
-  do_check_eq(observer._itemMovedOldIndex, 0);
+  do_check_eq(observer._itemMovedOldIndex, 1);
   do_check_eq(observer._itemMovedNewParent, fldrId);
-  do_check_eq(observer._itemMovedNewIndex, 2);
+  do_check_eq(observer._itemMovedNewIndex, 1);
   txn3.undoTransaction();
   do_check_eq(observer._itemMovedId, bkmk1Id);
   do_check_eq(observer._itemMovedOldParent, fldrId);
-  do_check_eq(observer._itemMovedOldIndex, 2);
+  do_check_eq(observer._itemMovedOldIndex, 1);
   do_check_eq(observer._itemMovedNewParent, root);
-  do_check_eq(observer._itemMovedNewIndex, 0);
+  do_check_eq(observer._itemMovedNewIndex, 1);
 
   // Test Removing a Folder
   ptSvc.doTransaction(ptSvc.createFolder("Folder2", root, -1));
   var fldrId2 = bmsvc.getChildFolder(root, "Folder2");
   var txn4 = ptSvc.removeItem(fldrId2);
   txn4.doTransaction();
   do_check_eq(observer._itemRemovedId, fldrId2);
   do_check_eq(observer._itemRemovedFolder, root);
-  do_check_eq(observer._itemRemovedIndex, 2);
+  do_check_eq(observer._itemRemovedIndex, 3);
   txn4.undoTransaction();
   do_check_eq(observer._itemAddedId, fldrId2);
   do_check_eq(observer._itemAddedParent, root);
-  do_check_eq(observer._itemAddedIndex, 2);
+  do_check_eq(observer._itemAddedIndex, 3);
 
   // Test removing an item
   var txn5 = ptSvc.removeItem(bkmk2Id);
   txn5.doTransaction();
   do_check_eq(observer._itemRemovedId, bkmk2Id);
   do_check_eq(observer._itemRemovedFolder, root);
-  do_check_eq(observer._itemRemovedIndex, 0);
+  do_check_eq(observer._itemRemovedIndex, 1);
   txn5.undoTransaction();
 
   do_check_eq(observer._itemAddedParent, root);
-  do_check_eq(observer._itemAddedIndex, 0);
+  do_check_eq(observer._itemAddedIndex, 1);
 
   // Test creating a separator
   var txn6 = ptSvc.createSeparator(root, 1);
   txn6.doTransaction();
   var sepId = observer._itemAddedId;
   do_check_eq(observer._itemAddedIndex, 1);
   do_check_eq(observer._itemAddedParent, root);
   txn6.undoTransaction();
@@ -389,9 +390,27 @@ function run_test() {
     ptSvc.createItem(postDataURI, root, -1, "postdata test", null, null, null));
   var postDataId = (bmsvc.getBookmarkIdsForURI(postDataURI,{}))[0];
   var postDataTxn = ptSvc.editBookmarkPostData(postDataId, postData);
   postDataTxn.doTransaction();
   do_check_true(annotationService.itemHasAnnotation(postDataId, POST_DATA_ANNO))
   do_check_eq(annotationService.getItemAnnotation(postDataId, POST_DATA_ANNO), postData);
   postDataTxn.undoTransaction();
   do_check_false(annotationService.itemHasAnnotation(postDataId, POST_DATA_ANNO))
+
+  // Test editing item date added
+  var oldAdded = bmsvc.getItemDateAdded(bkmk1Id);
+  var newAdded = Date.now();
+  var eidaTxn = ptSvc.editItemDateAdded(bkmk1Id, newAdded);
+  eidaTxn.doTransaction();
+  do_check_eq(newAdded, bmsvc.getItemDateAdded(bkmk1Id));
+  eidaTxn.undoTransaction();
+  do_check_eq(oldAdded, bmsvc.getItemDateAdded(bkmk1Id));
+
+  // Test editing item last modified 
+  var oldModified = bmsvc.getItemLastModified(bkmk1Id);
+  var newModified = Date.now();
+  var eilmTxn = ptSvc.editItemLastModified(bkmk1Id, newModified);
+  eilmTxn.doTransaction();
+  do_check_eq(newModified, bmsvc.getItemLastModified(bkmk1Id));
+  eilmTxn.undoTransaction();
+  do_check_eq(oldModified, bmsvc.getItemLastModified(bkmk1Id));
 }
--- a/browser/components/preferences/applications.js
+++ b/browser/components/preferences/applications.js
@@ -495,18 +495,23 @@ var feedHandlerInfo = {
 
   //**************************************************************************//
   // Convenience Utils
 
   _converterSvc:
     Cc["@mozilla.org/embeddor.implemented/web-content-handler-registrar;1"].
     getService(Ci.nsIWebContentConverterService),
 
-  _shellSvc: Cc["@mozilla.org/browser/shell-service;1"].
-             getService(Ci.nsIShellService),
+  _shellSvc:
+#ifdef HAVE_SHELL_SERVICE
+    Cc["@mozilla.org/browser/shell-service;1"].
+    getService(Ci.nsIShellService),
+#else
+    null,
+#endif
 
 
   //**************************************************************************//
   // nsIHandlerInfo
 
   get description() {
     return this.element("bundlePreferences").getString("webFeed");
   },
@@ -605,23 +610,25 @@ var feedHandlerInfo = {
     return this._possibleApplicationHandlers;
   },
 
   __defaultApplicationHandler: undefined,
   get _defaultApplicationHandler() {
     if (typeof this.__defaultApplicationHandler != "undefined")
       return this.__defaultApplicationHandler;
 
-    var defaultFeedReader;
+    var defaultFeedReader = null;
+#ifdef HAVE_SHELL_SERVICE
     try {
       defaultFeedReader = this._shellSvc.defaultFeedReader;
     }
     catch(ex) {
       // no default reader
     }
+#endif
 
     if (defaultFeedReader) {
       let handlerApp = Cc["@mozilla.org/uriloader/local-handler-app;1"].
                        createInstance(Ci.nsIHandlerApp);
       handlerApp.name = getDisplayNameForFile(defaultFeedReader);
       handlerApp.QueryInterface(Ci.nsILocalHandlerApp);
       handlerApp.executable = defaultFeedReader;
 
@@ -630,23 +637,25 @@ var feedHandlerInfo = {
     else {
       this.__defaultApplicationHandler = null;
     }
 
     return this.__defaultApplicationHandler;
   },
 
   get hasDefaultHandler() {
+#ifdef HAVE_SHELL_SERVICE
     try {
       if (this._shellSvc.defaultFeedReader)
         return true;
     }
     catch(ex) {
       // no default reader
     }
+#endif
 
     return false;
   },
 
   get defaultDescription() {
     if (this.hasDefaultHandler)
       return this._defaultApplicationHandler.name;
 
--- a/browser/components/preferences/cookies.js
+++ b/browser/components/preferences/cookies.js
@@ -60,17 +60,17 @@ var gCookiesWindow = {
     this._tree = document.getElementById("cookiesList");
     
     this._loadCookies();
     this._tree.treeBoxObject.view = this._view;
     this.sort("rawHost");
     if (this._view.rowCount > 0) 
       this._tree.view.selection.select(0);
 
-    if ("arguments" in window && window.arguments.length > 0 &&
+    if ("arguments" in window && window.arguments[0] &&
         window.arguments[0].filterString)
       this.setFilter(window.arguments[0].filterString);
     
     this._saveState();
       
     document.getElementById("filter").focus();
   },
   
--- a/browser/components/preferences/permissions.js
+++ b/browser/components/preferences/permissions.js
@@ -121,19 +121,20 @@ var gPermissionManager = {
     }
 
     var capabilityString = this._getCapabilityString(aCapability);
 
     // check whether the permission already exists, if not, add it
     var exists = false;
     for (var i = 0; i < this._permissions.length; ++i) {
       if (this._permissions[i].rawHost == host) {
-        exists = true;
-        this._permissions[i].capability = capabilityString;
-        this._permissions[i].perm = aCapability;
+        // Avoid calling the permission manager if the capability settings are
+        // the same. Otherwise allow the call to the permissions manager to
+        // update the listbox for us.
+        exists = this._permissions[i].perm == aCapability;
         break;
       }
     }
     
     if (!exists) {
       host = (host.charAt(0) == ".") ? host.substring(1,host.length) : host;
       var uri = ioService.newURI("http://" + host, null, null);
       this._pm.add(uri, this._type, aCapability);
--- a/browser/components/preferences/privacy.js
+++ b/browser/components/preferences/privacy.js
@@ -159,17 +159,16 @@ var gPrivacyPane = {
    * Preferences:
    *
    * network.cookie.cookieBehavior
    * - determines how the browser should handle cookies:
    *     0   means enable all cookies
    *     1   means allow cookies from the "originating" server only; see
    *         netwerk/cookie/src/nsCookieService.cpp for a hairier definition
    *     2   means disable all cookies
-   *     3   means use P3P policy to decide, which is probably broken
    * network.cookie.lifetimePolicy
    * - determines how long cookies are stored:
    *     0   means keep cookies until they expire
    *     1   means ask how long to keep each cookie
    *     2   means keep cookies until the browser is closed
    */
 
   /**
@@ -193,17 +192,17 @@ var gPrivacyPane = {
 
   /**
    * Enables/disables the "keep until" label and menulist in response to the
    * "accept cookies" checkbox being checked or unchecked.
    */
   writeAcceptCookies: function ()
   {
     var checkbox = document.getElementById("acceptCookies");
-    return checkbox.checked ? 0 : 2;
+    return checkbox.checked ? 1 : 2;
   },
 
   /**
    * Displays fine-grained, per-site preferences for cookies.
    */
   showCookieExceptions: function ()
   {
     var bundlePreferences = document.getElementById("bundlePreferences");
--- a/browser/components/preferences/security.xul
+++ b/browser/components/preferences/security.xul
@@ -165,17 +165,18 @@
                 label="&showPasswords.label;" accesskey="&showPasswords.accesskey;"
                 oncommand="gSecurityPane.showPasswords();"
                 preference="pref.privacy.disable_button.view_passwords"/>
       </hbox>
     </groupbox>
 
     <!-- Warning Messages -->
     <hbox class="bottomBox">
-      <groupbox id="warningMessagesGroup" orient="horizontal" flex="1">
+      <groupbox id="warningMessagesGroup" orient="horizontal" flex="1"
+                align="center">
         <caption label="&warnings.label;"/>
 
         <description control="warningSettings" flex="1">&chooseWarnings.label;</description>
         <button id="warningSettings"
                 label="&warningSettings.label;"
                 accesskey="&warningSettings.accesskey;"
                 oncommand="gSecurityPane.showWarningMessageSettings();"/>
       </groupbox>
--- a/browser/components/search/content/search.xml
+++ b/browser/components/search/content/search.xml
@@ -648,18 +648,19 @@
       <method name="openPopup">
         <body><![CDATA[
           var popup = this.popup;
           if (!popup.mPopupOpen) {
             // Initially the panel used for the searchbar (PopupAutoComplete
             // in browser.xul) is hidden to avoid impacting startup / new
             // window performance. The base binding's openPopup would normally
             // call the overriden openAutocompletePopup in urlbarBindings.xml's
-            // urlbar-result-popup binding to unhide the popup, but since we're
-            // overriding openPopup we need to unhide the panel ourselves.
+            // browser-autocomplete-result-popup binding to unhide the popup,
+            // but since we're overriding openPopup we need to unhide the panel
+            // ourselves.
             popup.hidden = false;
 
             popup.mInput = this;
             popup.view = this.controller.QueryInterface(Components.interfaces.nsITreeView);
             popup.invalidate();
             
             popup.showCommentColumn = this.showCommentColumn;
             popup.showImageColumn = this.showImageColumn;
--- a/browser/components/sessionstore/src/nsSessionStore.js
+++ b/browser/components/sessionstore/src/nsSessionStore.js
@@ -49,20 +49,16 @@
 
 /* :::::::: Constants and Helpers ::::::::::::::: */
 
 const Cc = Components.classes;
 const Ci = Components.interfaces;
 const Cr = Components.results;
 const Cu = Components.utils;
 
-const CID = Components.ID("{5280606b-2510-4fe0-97ef-9b5a22eafe6b}");
-const CONTRACT_ID = "@mozilla.org/browser/sessionstore;1";
-const CLASS_NAME = "Browser Session Store Service";
-
 const STATE_STOPPED = 0;
 const STATE_RUNNING = 1;
 const STATE_QUITTING = -1;
 
 const STATE_STOPPED_STR = "stopped";
 const STATE_RUNNING_STR = "running";
 
 const PRIVACY_NONE = 0;
@@ -97,29 +93,37 @@ Restored in restoreHistory()
 eg: browser.docShell["allow" + aCapability] = false;
 */
 const CAPABILITIES = [
   "Subframes", "Plugins", "Javascript", "MetaRedirects", "Images"
 ];
 
 // module for JSON conversion (needed for the nsISessionStore API)
 Cu.import("resource://gre/modules/JSON.jsm");
+Cu.import("resource://gre/modules/XPCOMUtils.jsm");
 
 function debug(aMsg) {
   aMsg = ("SessionStore: " + aMsg).replace(/\S{80}/g, "$&\n");
   Cc["@mozilla.org/consoleservice;1"].getService(Ci.nsIConsoleService)
                                      .logStringMessage(aMsg);
 }
 
 /* :::::::: The Service ::::::::::::::: */
 
 function SessionStoreService() {
 }
 
 SessionStoreService.prototype = {
+  classDescription: "Browser Session Store Service",
+  contractID: "@mozilla.org/browser/sessionstore;1",
+  classID: Components.ID("{5280606b-2510-4fe0-97ef-9b5a22eafe6b}"),
+  QueryInterface: XPCOMUtils.generateQI([Ci.nsISessionStore,
+                                         Ci.nsIDOMEventListener,
+                                         Ci.nsIObserver,
+                                         Ci.nsISupportsWeakReference]),
 
   // xul:tab attributes to (re)store (extensions might want to hook in here)
   xulAttributes: [],
 
   // set default load state
   _loadState: STATE_STOPPED,
 
   // minimal interval between two save operations (in milliseconds)
@@ -414,21 +418,16 @@ SessionStoreService.prototype = {
 
       // restore a crashed session resp. resume the last session if requested
       if (this._initialState) {
         // make sure that the restored tabs are first in the window
         this._initialState._firstTabs = true;
         this.restoreWindow(aWindow, this._initialState, this._isCmdLineEmpty(aWindow));
         delete this._initialState;
       }
-      
-      if (this._lastSessionCrashed) {
-        // restart any interrupted downloads
-        aWindow.setTimeout(this.retryDownloads, 0);
-      }
     }
     
     var tabbrowser = aWindow.getBrowser();
     var tabpanels = tabbrowser.mPanelContainer;
     
     // add tab change listeners to all already existing tabs
     for (var i = 0; i < tabpanels.childNodes.length; i++) {
       this.onTabAdd(aWindow, tabpanels.childNodes[i], true);
@@ -535,16 +534,22 @@ SessionStoreService.prototype = {
   /**
    * When a tab closes, collect it's properties
    * @param aWindow
    *        Window reference
    * @param aTab
    *        TabPanel reference
    */
   onTabClose: function sss_onTabClose(aWindow, aTab) {
+    // notify the tabbrowser that the tab state will be retrieved for the last time
+    // (so that extension authors can easily set data on soon-to-be-closed tabs)
+    var event = aWindow.document.createEvent("Events");
+    event.initEvent("SSTabClosing", true, false);
+    aTab.dispatchEvent(event);
+    
     var maxTabsUndo = this._prefBranch.getIntPref("sessionstore.max_tabs_undo");
     // don't update our internal state if we don't have to
     if (maxTabsUndo == 0) {
       return;
     }
     
     // make sure that the tab related data is up-to-date
     var tabState = this._collectTabData(aTab);
@@ -1750,25 +1755,16 @@ SessionStoreService.prototype = {
       var cookie = aCookies[i];
       try {
         cookieManager.add(cookie.host, cookie.path || "", cookie.name || "", cookie.value, !!cookie.secure, !!cookie.httponly, true, "expiry" in cookie ? cookie.expiry : MAX_EXPIRY);
       }
       catch (ex) { Cu.reportError(ex); } // don't let a single cookie stop recovering
     }
   },
 
-  /**
-   * Restart incomplete downloads
-   */
-  retryDownloads: function sss_retryDownloads() {
-    // The download manager cleans up after itself when it is created.
-    var dlManager = Cc["@mozilla.org/download-manager;1"].
-                    getService(Ci.nsIDownloadManager);
-  },
-
 /* ........ Disk Access .............. */
 
   /**
    * save state delayed by N ms
    * marks window as dirty (i.e. data update can't be skipped)
    * @param aWindow
    *        Window reference
    * @param aDelay
@@ -2063,93 +2059,13 @@ SessionStoreService.prototype = {
 
     // write and close stream
     stream.write(convertedData, convertedData.length);
     if (stream instanceof Ci.nsISafeOutputStream) {
       stream.finish();
     } else {
       stream.close();
     }
-  },
-
-/* ........ QueryInterface .............. */
-
-  QueryInterface: function(aIID) {
-    if (!aIID.equals(Ci.nsISupports) && 
-      !aIID.equals(Ci.nsIObserver) && 
-      !aIID.equals(Ci.nsISupportsWeakReference) && 
-      !aIID.equals(Ci.nsIDOMEventListener) &&
-      !aIID.equals(Ci.nsISessionStore)) {
-      Components.returnCode = Cr.NS_ERROR_NO_INTERFACE;
-      return null;
-    }
-    
-    return this;
   }
 };
 
-/* :::::::: Service Registration & Initialization ::::::::::::::: */
-
-/* ........ nsIModule .............. */
-
-const SessionStoreModule = {
-
-  getClassObject: function(aCompMgr, aCID, aIID) {
-    if (aCID.equals(CID)) {
-      return SessionStoreFactory;
-    }
-    
-    Components.returnCode = Cr.NS_ERROR_NOT_REGISTERED;
-    return null;
-  },
-
-  registerSelf: function(aCompMgr, aFileSpec, aLocation, aType) {
-    aCompMgr.QueryInterface(Ci.nsIComponentRegistrar);
-    aCompMgr.registerFactoryLocation(CID, CLASS_NAME, CONTRACT_ID, aFileSpec, aLocation, aType);
-
-    var catMan = Cc["@mozilla.org/categorymanager;1"].
-                 getService(Ci.nsICategoryManager);
-    catMan.addCategoryEntry("app-startup", CLASS_NAME, "service," + CONTRACT_ID, true, true);
-  },
-
-  unregisterSelf: function(aCompMgr, aLocation, aType) {
-    aCompMgr.QueryInterface(Ci.nsIComponentRegistrar);
-    aCompMgr.unregisterFactoryLocation(CID, aLocation);
-
-    var catMan = Cc["@mozilla.org/categorymanager;1"].
-                 getService(Ci.nsICategoryManager);
-    catMan.deleteCategoryEntry( "app-startup", "service," + CONTRACT_ID, true);
-  },
-
-  canUnload: function(aCompMgr) {
-    return true;
-  }
-}
-
-/* ........ nsIFactory .............. */
-
-const SessionStoreFactory = {
-
-  createInstance: function(aOuter, aIID) {
-    if (aOuter != null) {
-      Components.returnCode = Cr.NS_ERROR_NO_AGGREGATION;
-      return null;
-    }
-    
-    return (new SessionStoreService()).QueryInterface(aIID);
-  },
-
-  lockFactory: function(aLock) { },
-
-  QueryInterface: function(aIID) {
-    if (!aIID.equals(Ci.nsISupports) && !aIID.equals(Ci.nsIModule) &&
-        !aIID.equals(Ci.nsIFactory) && !aIID.equals(Ci.nsISessionStore)) {
-      Components.returnCode = Cr.NS_ERROR_NO_INTERFACE;
-      return null;
-    }
-    
-    return this;
-  }
-};
-
-function NSGetModule(aComMgr, aFileSpec) {
-  return SessionStoreModule;
-}
+function NSGetModule(aComMgr, aFileSpec)
+  XPCOMUtils.generateModule([SessionStoreService]);
--- a/browser/installer/removed-files.in
+++ b/browser/installer/removed-files.in
@@ -533,8 +533,17 @@ res/html/gopher-binary.gif
 res/html/gopher-find.gif
 res/html/gopher-image.gif
 res/html/gopher-menu.gif
 res/html/gopher-movie.gif
 res/html/gopher-sound.gif
 res/html/gopher-telnet.gif
 res/html/gopher-text.gif
 res/html/gopher-unknown.gif
+res/fonts/mathfontCMEX10.properties
+res/fonts/mathfontCMSY10.properties
+res/fonts/mathfontMath1.properties
+res/fonts/mathfontMath2.properties
+res/fonts/mathfontMath4.properties
+res/fonts/mathfontMTExtra.properties
+res/fonts/mathfontPUA.properties
+res/fonts/mathfontSymbol.properties
+
--- a/browser/locales/en-US/chrome/browser/aboutDialog.dtd
+++ b/browser/locales/en-US/chrome/browser/aboutDialog.dtd
@@ -1,10 +1,10 @@
 <!ENTITY aboutDialog.title      "About &brandFullName;">
 <!ENTITY copyright              "Credits">
 <!ENTITY copyright.accesskey    "C">
 <!ENTITY aboutLink              "&lt; About &brandFullName;">
 <!ENTITY aboutLink.accesskey    "A">
 <!ENTITY aboutVersion           "version">
-<!ENTITY copyrightText          "&#169;1998-2007 Contributors. All Rights Reserved. Firefox and the 
+<!ENTITY copyrightText          "&#169;1998-2008 Contributors. All Rights Reserved. Firefox and the 
                                  Firefox logos are trademarks of the Mozilla Foundation.  All rights 
                                  reserved. Some trademark rights used under license from The 
                                  Charlton Company.">
--- a/browser/locales/en-US/chrome/browser/browser.dtd
+++ b/browser/locales/en-US/chrome/browser/browser.dtd
@@ -308,24 +308,24 @@
 
 <!ENTITY pageStyleMenu.label "Page Style">
 <!ENTITY pageStyleMenu.accesskey "y">
 <!ENTITY pageStyleNoStyle.label "No Style">
 <!ENTITY pageStyleNoStyle.accesskey "n">
 <!ENTITY pageStylePersistentOnly.label "Basic Page Style">
 <!ENTITY pageStylePersistentOnly.accesskey "b">
 
-<!ENTITY pageReportIcon.tooltip            "Change popup blocking settings for this web site">
+<!ENTITY pageReportIcon.tooltip            "Change pop-up blocking settings for this web site">
 
 <!ENTITY allowPopups.accesskey "p">
 <!-- On Windows we use the term "Options" to describe settings, but
      on Linux and Mac OS X we use "Preferences" - carry that distinction
      over into this string, which is used in the "popup blocked" info bar . -->
-<!ENTITY editPopupSettingsUnix.label "Edit Popup Blocker Preferences…">
-<!ENTITY editPopupSettings.label "Edit Popup Blocker Options…">
+<!ENTITY editPopupSettingsUnix.label "Edit Pop-up Blocker Preferences…">
+<!ENTITY editPopupSettings.label "Edit Pop-up Blocker Options…">
 <!ENTITY editPopupSettings.accesskey "E">
 <!ENTITY dontShowMessage.accesskey "D">
 
 <!ENTITY bidiSwitchPageDirectionItem.label        "Switch Page Direction">
 <!ENTITY bidiSwitchPageDirectionItem.accesskey    "g">
 <!ENTITY bidiSwitchTextDirectionItem.label        "Switch Text Direction">
 <!ENTITY bidiSwitchTextDirectionItem.accesskey    "w">
 <!ENTITY bidiSwitchTextDirectionItem.commandkey   "X">
--- a/browser/locales/en-US/chrome/browser/browser.properties
+++ b/browser/locales/en-US/chrome/browser/browser.properties
@@ -26,37 +26,42 @@ xpinstallPromptAllowButton=Allow
 # Accessibility Note:
 # Be sure you do not choose an accesskey that is used elsewhere in the active context (e.g. main menu bar, submenu of the warning popup button)
 # See http://www.mozilla.org/access/keyboard/accesskey for details
 xpinstallPromptAllowButton.accesskey=A
 xpinstallDisabledMessageLocked=Software installation has been disabled by your system administrator.
 xpinstallDisabledMessage=Software installation is currently disabled. Click Enable and try again.
 xpinstallDisabledButton=Enable
 xpinstallDisabledButton.accesskey=n
-popupWarning=%S prevented this site from opening a popup window.
-popupWarningMultiple=%S prevented this site from opening %S popup windows.
+popupWarning=%S prevented this site from opening a pop-up window.
+popupWarningMultiple=%S prevented this site from opening %S pop-up windows.
 popupWarningButton=Options
 popupWarningButton.accesskey=O
 popupWarningButtonUnix=Preferences
 popupWarningButtonUnix.accesskey=P
-popupAllow=Allow popups for %S
-popupBlock=Block popups for %S
-popupWarningDontShowFromMessage=Don't show this message when popups are blocked
-popupWarningDontShowFromStatusbar=Don't show info message when popups are blocked
+popupAllow=Allow pop-ups for %S
+popupBlock=Block pop-ups for %S
+popupWarningDontShowFromMessage=Don't show this message when pop-ups are blocked
+popupWarningDontShowFromStatusbar=Don't show info message when pop-ups are blocked
 popupShowPopupPrefix=Show '%S'
 
 imageBlockedWarning=%S will now always block images from %S.
 imageAllowedWarning=%S will now allow images from %S.
 undo=Undo
 undo.accessKey=U
 
 # missing plugin installer
 missingpluginsMessage.title=Additional plugins are required to display all the media on this page.
 missingpluginsMessage.button.label=Install Missing Plugins…
 missingpluginsMessage.button.accesskey=I
+blockedpluginsMessage.title=Some plugins required by this page have been blocked for your protection.
+blockedpluginsMessage.infoButton.label=Details…
+blockedpluginsMessage.infoButton.accesskey=D
+blockedpluginsMessage.searchButton.label=Update Plugins…
+blockedpluginsMessage.searchButton.accesskey=U
 
 # Sanitize
 sanitizeWithPromptLabel=Clear Private Data…
 sanitizeButton=Clear Private Data Now
 
 # Check for Updates
 updatesItem_default=Check for Updates…
 updatesItem_defaultFallback=Check for Updates…
--- a/browser/locales/en-US/chrome/browser/pageInfo.dtd
+++ b/browser/locales/en-US/chrome/browser/pageInfo.dtd
@@ -90,17 +90,17 @@
 <!ENTITY  permTab               "Permissions">
 <!ENTITY  permTab.accesskey     "P">
 <!ENTITY  permUseDefault        "Use Default">
 <!ENTITY  permAllow             "Allow">
 <!ENTITY  permAllowSession      "Allow for Session">
 <!ENTITY  permBlock             "Block">
 <!ENTITY  permissionsFor        "Permissions for:">
 <!ENTITY  permImage             "Load Images">
-<!ENTITY  permPopup             "Open Popup Windows">
+<!ENTITY  permPopup             "Open Pop-up Windows">
 <!ENTITY  permCookie            "Set Cookies">
 <!ENTITY  permInstall           "Install Extensions or Themes">
 
 <!ENTITY  securityTab           "Security">
 <!ENTITY  securityTab.accesskey "S">
 <!ENTITY  securityHeader        "Security information for this page">
 <!ENTITY  securityView.certView "View Certificate">
 <!ENTITY  securityView.accesskey "V">
--- a/browser/locales/en-US/chrome/browser/pageReport.dtd
+++ b/browser/locales/en-US/chrome/browser/pageReport.dtd
@@ -1,10 +1,10 @@
-<!ENTITY caption.label "Blocked Popups">
+<!ENTITY caption.label "Blocked Pop-ups">
 
 <!ENTITY intro.label "The following pages were prevented from displaying 
-unrequested popup windows:">
+unrequested pop-up windows:">
 
 <!ENTITY done.label "Done">
 <!ENTITY done.accesskey "D">
 
 <!ENTITY unblock.label "Unblock Site">
 <!ENTITY unblock.accesskey "U">
--- a/browser/locales/en-US/chrome/browser/pageReportFirstTime.dtd
+++ b/browser/locales/en-US/chrome/browser/pageReportFirstTime.dtd
@@ -1,7 +1,7 @@
-<!ENTITY startDescription.label            "A web site has attempted to open a popup window without your permission. &brandShortName; has automatically closed the popup window.  Whenever &brandShortName; blocks these popups, you will see an icon on the status bar.">
+<!ENTITY startDescription.label            "A web site has attempted to open a pop-up window without your permission. &brandShortName; has automatically closed the pop-up window.  Whenever &brandShortName; blocks these pop-ups, you will see an icon on the status bar.">
 
-<!ENTITY endDescription.label              "You can click on this icon to see which sites &brandShortName; blocked and to allow those sites to open popups if they are required for the site to function correctly.">
+<!ENTITY endDescription.label              "You can click on this icon to see which sites &brandShortName; blocked and to allow those sites to open pop-ups if they are required for the site to function correctly.">
 
-<!ENTITY caption.label                     "About Popup Blocking">
+<!ENTITY caption.label                     "About Pop-up Blocking">
 
 <!ENTITY done.label "Done">
--- a/browser/locales/en-US/chrome/browser/preferences/preferences.properties
+++ b/browser/locales/en-US/chrome/browser/preferences/preferences.properties
@@ -10,18 +10,18 @@ phishBeforeText=Selecting this option wi
 labelDefaultFont=Default (%S)
 
 #### Permissions Manager
 
 cookiepermissionstext=You can specify which web sites are always or never allowed to use cookies.  Type the exact address of the site you want to manage and then click Block, Allow for Session, or Allow.
 cookiepermissionstitle=Exceptions - Cookies
 addonspermissionstext=You can specify which web sites are allowed to install add-ons. Type the exact address of the site you want to allow and then click Allow.
 addons_permissions_title=Allowed Sites - Add-ons Installation
-popuppermissionstext=You can specify which web sites are allowed to open popup windows. Type the exact address of the site you want to allow and then click Allow.
-popuppermissionstitle=Allowed Sites - Popups
+popuppermissionstext=You can specify which web sites are allowed to open pop-up windows. Type the exact address of the site you want to allow and then click Allow.
+popuppermissionstitle=Allowed Sites - Pop-ups
 imagepermissionstext=You can specify which web sites are allowed to load images. Type the exact address of the site you want to manage and then click Block or Allow.
 imagepermissionstitle=Exceptions - Images
 invalidURI=Please enter a valid hostname
 invalidURITitle=Invalid Hostname Entered
 
 #### Master Password
 
 pw_change2empty_in_fips_mode=You are currently in FIPS mode. FIPS requires a non-empty Master Password.
--- a/browser/locales/en-US/chrome/help/accessibility.xhtml
+++ b/browser/locales/en-US/chrome/help/accessibility.xhtml
@@ -206,20 +206,20 @@ Contributors:
       <span class="menuPath">Start Menu &gt; Control Panel &gt;
       Accessibility Options &gt; Display</span> and check the
       <em>Use High Contrast</em> &pref.singular;.</p>
 
   </div>
 
   <h2 id="controlling_web_content">Controlling Web Content</h2>
 
-  <h3 id="blocking_popup_windows">Blocking Popup Windows</h3>
+  <h3 id="blocking_popup_windows">Blocking Pop-up Windows</h3>
 
-  <p>See <a href="popup.xhtml">Controlling Popups</a> for information on
-    blocking popup windows.</p>
+  <p>See <a href="popup.xhtml">Controlling Pop-ups</a> for information on
+    blocking pop-up windows.</p>
 
   <h3 id="turning_off_java_applets">Turning Off Java Applets</h3>
 
   <p>Some web pages provide a rich interactive experience with Java&trade;
     applets.  However, some users that rely on keyboard navigation may
     experience problems with some Java applets that automatically set
     focus and do not provide a way to <q>break out</q> of the applet and
     navigate to the rest of the web page.  If this is a problem for you,
--- a/browser/locales/en-US/chrome/help/firebird-toc.rdf
+++ b/browser/locales/en-US/chrome/help/firebird-toc.rdf
@@ -21,17 +21,17 @@
             <nc:subheadings rdf:resource="#prefs-tree"/>
           </rdf:Description>
         </rdf:li>
         <rdf:li>
           <rdf:Description ID="prefs-unix" nc:name="Preferences" nc:link="prefs.xhtml" nc:platform="unix mac">
             <nc:subheadings rdf:resource="#prefs-tree"/>
           </rdf:Description>
         </rdf:li>
-        <rdf:li> <rdf:Description ID="popup-blocker" nc:name="Controlling Popups" nc:link="popup.xhtml"/> </rdf:li>
+        <rdf:li> <rdf:Description ID="popup-blocker" nc:name="Controlling Pop-ups" nc:link="popup.xhtml"/> </rdf:li>
         <rdf:li> <rdf:Description ID="cookies" nc:name="Managing Cookies" nc:link="cookies.xhtml"/> </rdf:li>
         <rdf:li> <rdf:Description ID="tabbed-browsing" nc:name="Tabbed Browsing" nc:link="tabbed_browsing.xhtml"/> </rdf:li>
         <rdf:li> <rdf:Description ID="firebird-keyboard-shortcuts" nc:name="Keyboard Shortcuts" nc:link="shortcuts.xhtml"/> </rdf:li>
         <rdf:li> <rdf:Description ID="firebird-mouse-shortcuts" nc:name="Mouse Shortcuts" nc:link="mouse_shortcuts.xhtml"/> </rdf:li>
         <rdf:li> <rdf:Description ID="a11y" nc:name="Accessibility Features" nc:link="accessibility.xhtml"/> </rdf:li>
         <rdf:li> <rdf:Description ID="menu" nc:name="Menu Reference" nc:link="menu_reference.xhtml"/> </rdf:li>
         <rdf:li> <rdf:Description ID="ieusers" nc:name="Help for Internet Explorer Users" nc:link="forieusers.xhtml"/> </rdf:li>
       </rdf:Seq>
@@ -132,19 +132,19 @@
           <rdf:li> <rdf:Description ID="add-ons-manager" nc:name="Using the Add-ons manager" nc:link="customization.xhtml#add_ons_manager"/> </rdf:li>
         </rdf:Seq>
       </nc:subheadings>
   </rdf:Description>
 
   <rdf:Description about="#popup-blocker">
       <nc:subheadings>
         <rdf:Seq>
-          <rdf:li> <rdf:Description ID="popup-blocker-what-are-popups" nc:name="What are Popups?" nc:link="popup.xhtml#what_are_popups"/> </rdf:li>
-          <rdf:li> <rdf:Description ID="popup-blocker-prefs-win" nc:name="Popup Blocker Options" nc:link="popup.xhtml#popup_blocker_preferences" nc:platform="win os2"/> </rdf:li>
-          <rdf:li> <rdf:Description ID="popup-blocker-prefs-unix" nc:name="Popup Blocker Preferences" nc:link="popup.xhtml#popup_blocker_preferences" nc:platform="unix mac"/> </rdf:li>
+          <rdf:li> <rdf:Description ID="popup-blocker-what-are-popups" nc:name="What are Pop-ups?" nc:link="popup.xhtml#what_are_popups"/> </rdf:li>
+          <rdf:li> <rdf:Description ID="popup-blocker-prefs-win" nc:name="Pop-up Blocker Options" nc:link="popup.xhtml#popup_blocker_preferences" nc:platform="win os2"/> </rdf:li>
+          <rdf:li> <rdf:Description ID="popup-blocker-prefs-unix" nc:name="Pop-up Blocker Preferences" nc:link="popup.xhtml#popup_blocker_preferences" nc:platform="unix mac"/> </rdf:li>
         </rdf:Seq>
       </nc:subheadings>
   </rdf:Description>
 
   <rdf:Description about="#cookies">
     <nc:subheadings>
       <rdf:Seq>
         <rdf:li><rdf:Description ID="cookies-what-is-a-cookie" nc:name="What is a Cookie?" nc:link="cookies.xhtml#what_is_a_cookie"/> </rdf:li>
@@ -210,17 +210,17 @@
         <rdf:li> <rdf:Description ID="a11y-high-contrast" nc:name="Using a High Contrast Theme" nc:link="accessibility.xhtml#using_a_high_contrast_theme" nc:platform="win unix"/> </rdf:li>
       </rdf:Seq>
     </nc:subheadings>
   </rdf:Description>
 
   <rdf:Description about="#a11y-web-content">
     <nc:subheadings>
       <rdf:Seq>
-        <rdf:li> <rdf:Description ID="a11y-popup-windows" nc:name="Blocking Popup Windows" nc:link="accessibility.xhtml#blocking_popup_windows"/> </rdf:li>
+        <rdf:li> <rdf:Description ID="a11y-popup-windows" nc:name="Blocking Pop-up Windows" nc:link="accessibility.xhtml#blocking_popup_windows"/> </rdf:li>
         <rdf:li> <rdf:Description ID="a11y-java" nc:name="Turning Off Java Applets" nc:link="accessibility.xhtml#turning_off_java_applets"/> </rdf:li>
         <rdf:li> <rdf:Description ID="a11y-javascript" nc:name="Restricting JavaScript Behavior" nc:link="accessibility.xhtml#restricting_javascript_behavior"/> </rdf:li>
       </rdf:Seq>
     </nc:subheadings>
   </rdf:Description>
 
   <rdf:Description about="#menu">
     <nc:subheadings>
--- a/browser/locales/en-US/chrome/help/forieusers.xhtml
+++ b/browser/locales/en-US/chrome/help/forieusers.xhtml
@@ -86,17 +86,17 @@
 <h2 id="firebirds_features">&brandShortName;'s Features</h2>
 <ul>
   <li><strong>Tabbed Browsing</strong>: Instead of opening a separate browser
     window for each site you want to visit, you can open multiple sites within
     the same window and tab between them. You can also set a group of tabs as
     your home page.  For more information see <a
     href="tabbed_browsing.xhtml">Tabbed Browsing</a>.</li>
   <li><strong>Pop-up Window Controls</strong>: Lets you allow or suppress both
-    popup and popunder windows.</li>
+    pop-up and pop-under windows.</li>
   <li><strong>Cookie Manager</strong>: Lets you change what &brandShortName; will
     do when accepting cookies.</li>
   <li><strong>Download Manager</strong>: Organizes your downloads by storing
     them in a single window to minimize clutter.  You have full access to
     download statistics without using unnecessary multiple windows for each
     download.</li>
   <li><strong>Image Manager</strong>: Enables you to disable images from certain
     web sites or disable them altogether. This is useful if you wish to decrease
--- a/browser/locales/en-US/chrome/help/platformStrings.dtd
+++ b/browser/locales/en-US/chrome/help/platformStrings.dtd
@@ -35,9 +35,9 @@
                              class="mac">Return</kbd>' >
 
 <!-- Image Location Base URL -->
 
 <!ENTITY images.baseURL     'http://www.mozilla.org/projects/firefox/help/2.0'>
 
 <!-- Copyright years -->
 
-<!ENTITY copyright.years    '2003-2007'>
+<!ENTITY copyright.years    '2003-2008'>
--- a/browser/locales/en-US/chrome/help/popup.xhtml
+++ b/browser/locales/en-US/chrome/help/popup.xhtml
@@ -7,89 +7,89 @@
 ]>
 <!--
 Contributors:
   David Tenser <david.tenser@comhem.se> (original author)
   Steffen Wilberg <steffen.wilberg@web.de>
 -->
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-	<title>Controlling Popups</title>
+	<title>Controlling Pop-ups</title>
 	<link rel="stylesheet" type="text/css" href="chrome://help/skin/helpFileLayout.css"/>
 </head>
 
 <body>
 
-<h1>Controlling Popups</h1>
+<h1>Controlling Pop-ups</h1>
 <p>This document explains all of the &pref.plural; available in &brandFullName;
-  for controlling popups.</p>
+  for controlling pop-ups.</p>
 
 <div class="contentsBox">
   In this section:
   <ul>
-    <li><a href="#what_are_popups">What are Popups?</a></li>
-    <li><a href="#popup_blocker_preferences">Popup Blocker &pref.pluralCaps;</a></li>
+    <li><a href="#what_are_popups">What are Pop-ups?</a></li>
+    <li><a href="#popup_blocker_preferences">Pop-up Blocker &pref.pluralCaps;</a></li>
   </ul>
 </div>
 
-<h2 id="what_are_popups">What are Popups?</h2>
-<p>Popup windows, or popups, are windows that appear automatically without your
-permission. They vary in size but usually don't cover the whole screen. Some popups
+<h2 id="what_are_popups">What are Pop-ups?</h2>
+<p>Pop-up windows, or pop-ups, are windows that appear automatically without your
+permission. They vary in size but usually don't cover the whole screen. Some pop-ups
 open on top of the current &brandShortName; window, while others appear
-underneath &brandShortName; (popunders).</p>
+underneath &brandShortName; (pop-unders).</p>
 
-<p>&brandShortName; allows you to control both popups and popunders through the
+<p>&brandShortName; allows you to control both pop-ups and popunders through the
 <a href="prefs.xhtml#content_options">Content panel</a> in &pref.pluralCaps;.
-Popup blocking is turned on by default, so you don't have to worry about enabling it
-to prevent popups from appearing in &brandShortName;.</p>
+Pop-up blocking is turned on by default, so you don't have to worry about enabling it
+to prevent pop-ups from appearing in &brandShortName;.</p>
 
-<p>When blocking a popup, &brandShortName; displays an information bar, as well
+<p>When blocking a pop-up, &brandShortName; displays an information bar, as well
 as an icon <img src="chrome://browser/skin/Info.png" width="16" height="16"
 alt=""/> in the status bar. When you click either the <em>&pref.pluralCaps;</em>
 button in the information bar or the icon in the status bar, a menu is displayed
 with the following choices:</p>
 
 <ul>
-  <li>Allow/Block popups for this site</li>
-  <li>Edit <a href="#popup_blocker_preferences">Popup Blocker
+  <li>Allow/Block pop-ups for this site</li>
+  <li>Edit <a href="#popup_blocker_preferences">Pop-up Blocker
     &pref.pluralCaps;…</a></li>
-  <li>Don't show this message (info message) when popups are blocked</li>
-  <li>(show a blocked popup)</li>
+  <li>Don't show this message (info message) when pop-ups are blocked</li>
+  <li>(show a blocked pop-up)</li>
 </ul>
 
-<p><strong>Blocking popups may interfere with some web sites</strong>: Some web sites,
-including some banking sites, use popups for important features. Blocking all popups
-disables such features. To allow specific web sites to use popups, while blocking
+<p><strong>Blocking pop-ups may interfere with some web sites</strong>: Some web sites,
+including some banking sites, use pop-ups for important features. Blocking all pop-ups
+disables such features. To allow specific web sites to use pop-ups, while blocking
 all others, you can add specific web sites to the list of allowed sites.</p>
 
-<p><strong>Blocking popups doesn't always work</strong>: Although &brandShortName; blocks most
-popups, some web sites may show popups using uncovered methods, even when blocked.</p>
+<p><strong>Blocking pop-ups doesn't always work</strong>: Although &brandShortName; blocks most
+pop-ups, some web sites may show pop-ups using uncovered methods, even when blocked.</p>
 
-<h2 id="popup_blocker_preferences">Popup Blocker &pref.pluralCaps;</h2>
+<h2 id="popup_blocker_preferences">Pop-up Blocker &pref.pluralCaps;</h2>
 
-<p>The Popup Blocker &pref.pluralCaps; are located in the <a
+<p>The Pop-up Blocker &pref.pluralCaps; are located in the <a
   href="prefs.xhtml#content_options">Content panel</a> of &pref.menuPath;.</p>
 
 <p>From there, you can do the following things:</p>
 
 <ul>
   <li><strong>Block pop-up windows</strong>: Deselect this &pref.singular; to
-    disable the popup blocker altogether.</li>
+    disable the pop-up blocker altogether.</li>
   <li><strong>Exceptions dialog</strong>: This is a list of sites that you want to allow
-    to display popups. The dialog has the following choices:
+    to display pop-ups. The dialog has the following choices:
   <ul>
     <li><strong>Allow</strong>: Click this to add a web site to the exceptions list.</li>
     <li><strong>Remove Site</strong>: Click this to remove a web site from the exceptions list.</li>
     <li><strong>Remove All Sites</strong>: Click this to remove all of the web sites in
       the exceptions list.</li>
   </ul>
   </li>
 </ul>
 
-<p><strong>Note</strong>: Blocking popups may not always work and may interfere with
-some web sites. For more information about blocking popups, see
-<a href="#what_are_popups">What are Popups</a>.</p>
+<p><strong>Note</strong>: Blocking pop-ups may not always work and may interfere with
+some web sites. For more information about blocking pop-ups, see
+<a href="#what_are_popups">What are Pop-ups</a>.</p>
 
 <div class="contentsBox"><em>12 September 2005</em></div>
 <p>Copyright &copy; &copyright.years; Contributors to the Mozilla Help Viewer Project.</p>
 
 </body>
 </html>
--- a/browser/locales/en-US/chrome/help/search-db.rdf
+++ b/browser/locales/en-US/chrome/help/search-db.rdf
@@ -13,17 +13,17 @@
           DO NOT CREATE NAME COLLISIONS BETWEEN THE ITEMS HERE AND THE ITEMS IN THE TOC!
         -->
         <li><Description nc:name="Accessibility Options" nc:link="prefs.xhtml#accessibility" nc:platform="win os2"/></li>
         <li><Description nc:name="Accessibility Preferences" nc:link="prefs.xhtml#accessibility" nc:platform="unix mac"/></li>
         <li><Description nc:name="Anti-Phishing Options" nc:link="prefs.xhtml#phishing" nc:platform="win os2"/></li>
         <li><Description nc:name="Anti-Phishing Preferences" nc:link="prefs.xhtml#phishing" nc:platform="unix mac"/></li>
         <li><Description nc:name="authentication (definition)" nc:link="glossary.xhtml#authentication"/></li>
         <li><Description nc:name="Back Button" nc:link="using_firebird.xhtml#retracing_your_steps"/></li>
-        <li><Description nc:name="Block Popups" nc:link="popup.xhtml"/></li>
+        <li><Description nc:name="Block Pop-ups" nc:link="popup.xhtml"/></li>
         <li><Description nc:name="bookmark (definition)" nc:link="glossary.xhtml#bookmark"/></li>
         <li><Description nc:name="Bookmarks Toolbar (definition)" nc:link="glossary.xhtml#Bookmarks_Toolbar"/></li>
         <li><Description nc:name="Browsing" nc:link="using_firebird.xhtml#navigating_web_pages"/></li>
         <li><Description nc:name="cache (definition)" nc:link="glossary.xhtml#cache"/></li>
         <li><Description nc:name="certificate (definition)" nc:link="glossary.xhtml#certificate"/></li>
         <li><Description nc:name="Certificates" nc:link="prefs.xhtml#certificates"/></li>
         <li><Description nc:name="Certificate Revocation Lists" nc:link="prefs.xhtml#certificates"/></li>
         <li><Description nc:name="client (definition)" nc:link="glossary.xhtml#client"/></li>
--- a/browser/locales/en-US/chrome/help/using_firebird.xhtml
+++ b/browser/locales/en-US/chrome/help/using_firebird.xhtml
@@ -169,17 +169,17 @@ Contributors:
 
 <p>&brandShortName; allows you to search the web for words you select within
   a web page:</p>
 
 <ol>
   <li>Select (highlight) any words in a web page.</li>
   <li><span class="noMac">Right-click</span><span class="mac">Press &ctrlKey;,
     click the mouse button,</span> and choose <em>Search [Search Engine] for
-    "[your selected words]"</em> from the popup menu.</li>
+    "[your selected words]"</em> from the pop-up menu.</li>
 </ol>
 
 <p>&brandShortName; opens a new tab and uses the currently selected Search
   Engine to search for your selected words.</p>
 
 <h3 id="searching_within_a_page">Searching Within a Page</h3>
 
 <p>To find text within the page you are currently viewing in
@@ -230,17 +230,17 @@ Contributors:
 
 <p>You can paste the text into other programs.</p>
 
 <p>To copy a link (URL) or an image link from a page:</p>
 
 <ol>
   <li>Position the pointer over the link or image.</li>
   <li><span class="noMac">Right-click</span><span class="mac">Press &ctrlKey;
-    and click on</span> the link or image to display a popup menu.</li>
+    and click on</span> the link or image to display a pop-up menu.</li>
   <li>Choose Copy Link Location or Copy Image Location. If an image is also a
     link, you can choose either menu item.</li>
 </ol>
 
 <p>You can paste the link into other programs or into &brandShortName;'s
   Location Bar.</p>
 
 <h3 id="saving_all_or_part_of_a_page">Saving All or Part of a Page</h3>
@@ -271,62 +271,62 @@ Contributors:
   <li>Type a file name for the page and click <em>Save</em>.</li>
 </ol>
 
 <p>To save a frame from within a web page:</p>
 
 <ol>
   <li>Position the mouse pointer within the frame.</li>
   <li><span class="mac">Press &ctrlKey; and click on</span><span
-    class="noMac">Right-click</span> the frame to display a popup menu.</li>
+    class="noMac">Right-click</span> the frame to display a pop-up menu.</li>
   <li>Select <span class="menuPath">This Frame &gt; Save Frame As</span> from
     the submenu. You will see the Save As dialog box.</li>
   <li>Choose a location for the saved page.</li>
   <li>Choose a format for the page you want to save.</li>
   <li>Type a file name for the page and click <em>Save</em>.</li>
 </ol>
 
 <p>Saving a file onto your hard drive lets you view the page when you aren't
   connected to the Internet.</p>
 
 <p>To save an image from a page:</p>
 <ol>
   <li>Position the mouse pointer over the image.</li>
   <li><span class="noMac">Right-click</span><span class="mac">Press &ctrlKey;
-    and click on</span> the image to display a popup menu.</li>
+    and click on</span> the image to display a pop-up menu.</li>
   <li>Select <span class="menuPath">Save Image As</span>. You will see the
     Save Image dialog box.</li>
   <li>Choose a location for the saved image.</li>
   <li>Type a file name for the image and click <em>Save</em>.</li>
 </ol>
 
 <p>To save a page without displaying it (which is useful for retrieving a
   nonformatted page that isn't intended for viewing):</p>
 
 <ol>
   <li>Position the mouse pointer over a link to the page.</li>
   <li><span class="noMac">Right-click</span><span class="mac">Press &ctrlKey;
-    and click on</span> the link to display a popup menu.</li>
+    and click on</span> the link to display a pop-up menu.</li>
   <li>Select <span class="menuPath">Save Link to Disk</span>. You will see the
     Save As dialog box.</li>
   <li>Choose a location for the saved page.</li>
   <li>Type a file name for the page and click <em>Save</em>.</li>
 </ol>
 
 <p><strong>Important</strong>: Some links automatically download and save files
   to your hard drive after you click them. The URLs for these links often
   begin with &quot;ftp&quot; or end with a file-type extension such as
   &quot;au&quot; or &quot;mpeg.&quot; These links might transmit software,
   sound, or movie files and can launch helper applications that support the
   files.</p>
 
 <p><strong>Tip</strong>: To set an image as your desktop background,
   <span class="noMac">right-click</span><span class="mac">press &ctrlKey;,
   click the mouse button</span> on an image and choose <em>Set As Desktop
-  Background…</em> from the popup menu.</p>
+  Background…</em> from the pop-up menu.</p>
 
 <h3 id="printing_a_page">Printing a Page</h3>
 
 <p>To print the current page:</p>
 
 <ul>
   <li>Select <span class="menuPath">File &gt; Print</span>.</li>
 </ul>
--- a/browser/modules/Sanitizer.jsm
+++ b/browser/modules/Sanitizer.jsm
@@ -205,18 +205,18 @@ Sanitizer.prototype = {
                               .getService(Components.interfaces.nsILoginManager);
         pwmgr.removeAllLogins();
       },
       
       get canClear()
       {
         var pwmgr = Components.classes["@mozilla.org/login-manager;1"]
                               .getService(Components.interfaces.nsILoginManager);
-        var logins = pwmgr.getAllLogins({});
-        return (logins.length > 0);
+        var count = pwmgr.countLogins("", "", ""); // count all logins
+        return (count > 0);
       }
     },
     
     sessions: {
       clear: function ()
       {
         // clear all auth tokens
         var sdr = Components.classes["@mozilla.org/security/sdr;1"]
--- a/browser/themes/gnomestripe/browser/browser.css
+++ b/browser/themes/gnomestripe/browser/browser.css
@@ -395,32 +395,52 @@ menuitem[command="cmd_fullZoomReduce"] {
 }
 
 menuitem[command="cmd_fullZoomReset"] {
   list-style-image: url("moz-icon://stock/gtk-zoom-100?size=menu");
 }
 
 menuitem[key="goBackKb"],
 #context-back {
-  list-style-image: url("moz-icon://stock/gtk-go-back?size=menu");
+  list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu");
 }
 
 menuitem[key="goBackKb"][disabled],
 #context-back[disabled] {
-  list-style-image: url("moz-icon://stock/gtk-go-back?size=menu&state=disabled");
+  list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu&state=disabled");
+}
+
+menuitem[key="goBackKb"][chromedir="rtl"],
+#context-back[chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu");
+}
+
+menuitem[key="goBackKb"][disabled][chromedir="rtl"],
+#context-back[disabled][chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu&state=disabled");
 }
 
 menuitem[key="goForwardKb"],
 #context-forward {
-  list-style-image: url("moz-icon://stock/gtk-go-forward?size=menu");
+  list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu");
 }
 
 menuitem[key="goForwardKb"][disabled],
 #context-forward[disabled] {
-  list-style-image: url("moz-icon://stock/gtk-go-forward?size=menu&state=disabled");
+  list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu&state=disabled");
+}
+
+menuitem[key="goForwardKb"][chromedir="rtl"],
+#context-forward[chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu");
+}
+
+menuitem[key="goForwardKb"][disabled][chromedir="rtl"],
+#context-forward[disabled][chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu&state=disabled");
 }
 
 menuitem[command="Browser:Home"] {
   list-style-image: url("moz-icon://stock/gtk-home?size=menu");
 }
 
 menuitem[command="Browser:ShowAllHistory"] {
   list-style-image: url("chrome://browser/skin/Toolbar-small.png");
@@ -479,28 +499,41 @@ toolbar[mode="full"] .toolbarbutton-menu
 }
 
 .toolbarbutton-1[checked="true"] {
   padding: 5px !important;
 }
 
 /* 24px primary toolbar buttons */
 #back-button {
-  list-style-image: url("moz-icon://stock/gtk-go-back?size=toolbar");
+  list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=toolbar");
 }
 #back-button[disabled="true"] {
-  list-style-image: url("moz-icon://stock/gtk-go-back?size=toolbar&state=disabled");
+  list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=toolbar&state=disabled");
+}
+
+#back-button[chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=toolbar");
+}
+#back-button[disabled="true"][chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=toolbar&state=disabled");
 }
 
-/* GTK takes care of the RTL for us. Yay for libraries! */
 #forward-button {
-  list-style-image: url("moz-icon://stock/gtk-go-forward?size=toolbar");
+  list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=toolbar");
 }
 #forward-button[disabled="true"] {
-  list-style-image: url("moz-icon://stock/gtk-go-forward?size=toolbar&state=disabled");
+  list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=toolbar&state=disabled");
+}
+
+#forward-button[chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=toolbar");
+}
+#forward-button[disabled="true"][chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=toolbar&state=disabled");
 }
 
 #reload-button {
   list-style-image: url("moz-icon://stock/gtk-refresh?size=toolbar");
 }
 #reload-button[disabled="true"] {
   list-style-image: url("moz-icon://stock/gtk-refresh?size=toolbar&state=disabled");
 }
@@ -593,27 +626,41 @@ toolbar[iconsize="small"] .toolbarbutton
   -moz-margin-end: 0px;
 }
 
 toolbar[iconsize="small"] .toolbarbutton-1[type="menu-button"] {
   border: 0 !important;
 }
 
 toolbar[iconsize="small"] #back-button {
-  list-style-image: url("moz-icon://stock/gtk-go-back?size=menu");
+  list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu");
 }
 toolbar[iconsize="small"] #back-button[disabled="true"] {
-  list-style-image: url("moz-icon://stock/gtk-go-back?size=menu&state=disabled");
+  list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=menu&state=disabled");
+}
+
+toolbar[iconsize="small"] #back-button[chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu");
+}
+toolbar[iconsize="small"] #back-button[disabled="true"][chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=menu&state=disabled");
 }
 
 toolbar[iconsize="small"] #forward-button {
-  list-style-image: url("moz-icon://stock/gtk-go-forward?size=menu");
+  list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu");
 }
 toolbar[iconsize="small"] #forward-button[disabled="true"] {
-  list-style-image: url("moz-icon://stock/gtk-go-forward?size=menu&state=disabled");
+  list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=menu&state=disabled");
+}
+
+toolbar[iconsize="small"] #forward-button[chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu");
+}
+toolbar[iconsize="small"] #forward-button[disabled="true"][chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=menu&state=disabled");
 }
 
 toolbar[iconsize="small"] #stop-button {
   list-style-image: url("moz-icon://stock/gtk-stop?size=menu");
 }
 toolbar[iconsize="small"] #stop-button[disabled="true"] {
   list-style-image: url("moz-icon://stock/gtk-stop?size=menu&state=disabled");
 }
@@ -1175,21 +1222,22 @@ tabpanels {
   width: 11px;
   margin-bottom: -5px;
   position: relative;
   background: url('chrome://browser/skin/tabbrowser/tabDragIndicator.png') 50% 50% no-repeat;
 }
 
 /* In-tab close button */
 .tab-close-button > .toolbarbutton-icon {
-  -moz-margin-end: 0px !important;
+  /* XXX Buttons have padding in widget/ that we don't want here but can't override with good CSS, so we must
+     use evil CSS to give the impression of smaller content */
+  margin: -3px !important;
 }
 
 .tab-close-button {
-  -moz-appearance: none;
   -moz-margin-end: 6px;
   padding: 0px;
   border: none;
   list-style-image: url("moz-icon://stock/gtk-close?size=menu");
 }
 
 .tabbrowser-tab[selected="true"] > .tab-close-button {
   /* Make this button focusable so clicking on it will not focus the tab while
@@ -1202,16 +1250,20 @@ tabpanels {
 }
 
 /* Tabstrip close button */
 .tabs-closebutton {
   list-style-image: url("moz-icon://stock/gtk-close?size=menu");
   border: none;
 }
 
+.tabs-closebutton > .toolbarbutton-icon {
+  margin: -3px !important;
+}
+
 /* All tabs menupopup */
 .alltabs-item > .menu-iconic-left > .menu-iconic-icon {
   list-style-image: url("chrome://global/skin/icons/folder-item.png");
   -moz-image-region: rect(0px, 16px, 16px, 0px);
 }
 
 .alltabs-item[selected="true"] {
   font-weight: bold;
--- a/browser/themes/gnomestripe/browser/places/organizer.css
+++ b/browser/themes/gnomestripe/browser/places/organizer.css
@@ -2,29 +2,43 @@
 /* Toolbar */
 #placesToolbar {
   border: none;
 }
 
 /* back button */
 
 #back-button {
-  list-style-image: url("moz-icon://stock/gtk-go-back?size=toolbar");
+  list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=toolbar");
 }
 #back-button[disabled="true"] {
-  list-style-image: url("moz-icon://stock/gtk-go-back?size=toolbar&state=disabled");
+  list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=toolbar&state=disabled");
+}
+
+#back-button[chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=toolbar");
+}
+#back-button[disabled="true"][chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=toolbar&state=disabled");
 }
 
 /* forward button */
 
 #forward-button {
-  list-style-image: url("moz-icon://stock/gtk-go-forward?size=toolbar");
+  list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=toolbar");
 }
 #forward-button[disabled="true"] {
-  list-style-image: url("moz-icon://stock/gtk-go-forward?size=toolbar&state=disabled");
+  list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=toolbar&state=disabled");
+}
+
+#forward-button[chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=toolbar");
+}
+#forward-button[disabled="true"][chromedir="rtl"] {
+  list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=toolbar&state=disabled");
 }
 
 /* organize button */
 #organizeButton {
   list-style-image: url("moz-icon://stock/gtk-properties?size=button");
 }
 
 /* view button */
@@ -34,39 +48,35 @@
 
 /* maintenance button */
 #maintenanceButton {
   list-style-image: url("moz-icon://stock/gtk-revert-to-saved?size=button");
 }
 
 /* Root View */
 #placesView {
-  border-top: 1px solid ThreeDDarkShadow;
   background-color: Window;
 }
 
 #splitter {
-  border: 0px;
-  width: 3px;
+  min-width: 3px;
 }
 
 /* Place List, Place Content */
 .placesTree {
   margin: 0px;
 }
 
 #placesList {
-  -moz-appearance: none;
   margin: 0px;
   border: none;
   padding: 0;
 }
 
 #placeContent {
-  -moz-appearance: none;
   border: 0px;
 }
 
 /* Search Bar */
 #searchbar {
   margin: 6px -4px 0px 2px;
 }
 
@@ -232,38 +242,21 @@
   margin: 0 !important;
 }
 
 #saveSearch {
   list-style-image: url("moz-icon://stock/gtk-save?size=menu");
 }
 
 /**** expanders ****/
-
 .expander-up,
 .expander-down {
   min-width: 0;
 }
 
-.expander-up {
-  list-style-image: url("chrome://global/skin/arrow/arrow-up.gif");
-}
-
-.expander-down {
-  list-style-image: url("chrome://global/skin/arrow/arrow-dn.gif");
-}
-
-.expander-down:hover:active {
-  list-style-image: url("chrome://global/skin/arrow/arrow-dn-hov.gif");
-}
-
-.expander-up:hover:active {
-  list-style-image: url("chrome://global/skin/arrow/arrow-up-hov.gif");
-}
-
 /**** menuitem stock icons ****/
 menuitem:not([type]) {
   -moz-binding: url("chrome://global/content/bindings/menu.xml#menuitem-iconic");
 }
 
 menuitem[command="cmd_cut"] {
   list-style-image: url("moz-icon://stock/gtk-cut?size=menu");
 }
deleted file mode 100755
--- a/build/wince/shunt/build/mozce_shunt/mozce_shunt.sln
+++ /dev/null
@@ -1,30 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mozce_shunt", "mozce_shunt.vcproj", "{8A44014F-AAE6-4232-B8AC-584EBEB83C28}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Pocket PC 2003 (ARMV4) = Debug|Pocket PC 2003 (ARMV4)
-		Debug|Smartphone 2003 (ARMV4) = Debug|Smartphone 2003 (ARMV4)
-		Release|Pocket PC 2003 (ARMV4) = Release|Pocket PC 2003 (ARMV4)
-		Release|Smartphone 2003 (ARMV4) = Release|Smartphone 2003 (ARMV4)
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{8A44014F-AAE6-4232-B8AC-584EBEB83C28}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4)
-		{8A44014F-AAE6-4232-B8AC-584EBEB83C28}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4)
-		{8A44014F-AAE6-4232-B8AC-584EBEB83C28}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4)
-		{8A44014F-AAE6-4232-B8AC-584EBEB83C28}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Smartphone 2003 (ARMV4)
-		{8A44014F-AAE6-4232-B8AC-584EBEB83C28}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Smartphone 2003 (ARMV4)
-		{8A44014F-AAE6-4232-B8AC-584EBEB83C28}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Smartphone 2003 (ARMV4)
-		{8A44014F-AAE6-4232-B8AC-584EBEB83C28}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4)
-		{8A44014F-AAE6-4232-B8AC-584EBEB83C28}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4)
-		{8A44014F-AAE6-4232-B8AC-584EBEB83C28}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4)
-		{8A44014F-AAE6-4232-B8AC-584EBEB83C28}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4)
-		{8A44014F-AAE6-4232-B8AC-584EBEB83C28}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4)
-		{8A44014F-AAE6-4232-B8AC-584EBEB83C28}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4)
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
deleted file mode 100755
--- a/build/wince/shunt/build/mozce_shunt/mozce_shunt.vcproj
+++ /dev/null
@@ -1,459 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="mozce_shunt"
-	ProjectGUID="{8A44014F-AAE6-4232-B8AC-584EBEB83C28}"
-	RootNamespace="mozce_shunt"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Pocket PC 2003 (ARMV4)"
-		/>
-		<Platform
-			Name="Smartphone 2003 (ARMV4)"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Pocket PC 2003 (ARMV4)"
-			OutputDirectory="$(PlatformName)\Debug"
-			IntermediateDirectory="$(PlatformName)\Debug"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="0"
-				AdditionalIncludeDirectories="../../include"
-				PreprocessorDefinitions="MOZCE_SHUNT_EXPORTS;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_WINDOWS;_USRDLL;MOZCE_SHUNT_EXPORTS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
-				MinimalRebuild="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				FloatingPointModel="2"
-				DisableLanguageExtensions="false"
-				TreatWChar_tAsBuiltInType="false"
-				RuntimeTypeInfo="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions=" /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE"
-				OutputFile="$(OutDir)/mozce_shunt.dll"
-				LinkIncremental="2"
-				IgnoreDefaultLibraryNames="OLDNAMES"
-				DelayLoadDLLs="$(NOINHERIT)"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mozce_shunt.pdb"
-				SubSystem="0"
-				ImportLibrary="$(OutDir)/mozce_shunt.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory="\bin"
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Smartphone 2003 (ARMV4)"
-			OutputDirectory="$(PlatformName)\Debug"
-			IntermediateDirectory="$(PlatformName)\Debug"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="0"
-				AdditionalIncludeDirectories="../../include"
-				PreprocessorDefinitions="MOZCE_SHUNT_EXPORTS;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_WINDOWS;_USRDLL;MOZCE_SHUNT_EXPORTS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
-				MinimalRebuild="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				TreatWChar_tAsBuiltInType="false"
-				RuntimeTypeInfo="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions=" /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE"
-				OutputFile="$(OutDir)/mozce_shunt.dll"
-				LinkIncremental="2"
-				IgnoreDefaultLibraryNames="oldnames"
-				DelayLoadDLLs="$(NOINHERIT)"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mozce_shunt.pdb"
-				SubSystem="0"
-				ImportLibrary="$(OutDir)/mozce_shunt.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Pocket PC 2003 (ARMV4)"
-			OutputDirectory="$(PlatformName)\Release"
-			IntermediateDirectory="$(PlatformName)\Release"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="2"
-				AdditionalIncludeDirectories="../../include"
-				PreprocessorDefinitions="MOZCE_SHUNT_EXPORTS;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_WINDOWS;_USRDLL;MOZCE_SHUNT_EXPORTS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				DisableLanguageExtensions="false"
-				TreatWChar_tAsBuiltInType="false"
-				RuntimeTypeInfo="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions=" /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE"
-				OutputFile="$(OutDir)/mozce_shunt.dll"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames="OLDNAMES"
-				DelayLoadDLLs="$(NOINHERIT)"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mozce_shunt.pdb"
-				SubSystem="0"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				ImportLibrary="$(OutDir)/mozce_shunt.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory="\windows"
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Smartphone 2003 (ARMV4)"
-			OutputDirectory="$(PlatformName)\Release"
-			IntermediateDirectory="$(PlatformName)\Release"
-			ConfigurationType="2"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="2"
-				AdditionalIncludeDirectories="../../include"
-				PreprocessorDefinitions="MOZCE_SHUNT_EXPORTS;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_WINDOWS;_USRDLL;MOZCE_SHUNT_EXPORTS;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				TreatWChar_tAsBuiltInType="false"
-				RuntimeTypeInfo="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLinkerTool"
-				AdditionalOptions=" /subsystem:windowsce,4.20 /machine:ARM /ARMPADCODE"
-				OutputFile="$(OutDir)/mozce_shunt.dll"
-				LinkIncremental="1"
-				IgnoreDefaultLibraryNames="oldnames"
-				DelayLoadDLLs="$(NOINHERIT)"
-				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mozce_shunt.pdb"
-				SubSystem="0"
-				OptimizeReferences="2"
-				EnableCOMDATFolding="2"
-				ImportLibrary="$(OutDir)/mozce_shunt.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\..\a2w.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\assert.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\clipboard.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\direct.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\errno.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\io.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\mbstring.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\nclog.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\process.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\signal.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\stat.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\stdio.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\stdlib.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\string.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\time.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\w2a.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\win32.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\win32A.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\win32W.cpp"
-				>
-			</File>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
deleted file mode 100755
index bec93f2e60dc1ff68deeda34433a444c5dae410c..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100755
--- a/build/wince/shunt/build/shunt.vcl
+++ /dev/null
@@ -1,29 +0,0 @@
-<html>
-<body>
-<pre>
-<h1>Build Log</h1>
-<h3>
---------------------Configuration: shunt - Win32 (WCE ARMV4) Debug--------------------
-</h3>
-<h3>Command Lines</h3>
-
-
-
-
-
-<h3>Results</h3>
-shunt.dll - 0 error(s), 0 warning(s)
-<h3>
---------------------Configuration: shunt - Win32 (WCE ARMV4) Release--------------------
-</h3>
-<h3>Command Lines</h3>
-
-
-
-
-
-<h3>Results</h3>
-shunt.dll - 0 error(s), 0 warning(s)
-</pre>
-</body>
-</html>
deleted file mode 100755
index 588d3cc411c0a227d70b0024bdf583a735237f3e..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391
GIT binary patch
literal 0
Hc$@<O00001
deleted file mode 100755
--- a/build/wince/shunt/build/shunt.vcp
+++ /dev/null
@@ -1,394 +0,0 @@
-# Microsoft eMbedded Visual Tools Project File - Name="shunt" - Package Owner=<4>
-# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (WCE ARMV4) Dynamic-Link Library" 0xa302
-
-CFG=shunt - Win32 (WCE ARMV4) Release
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "shunt.vcn".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "shunt.vcn" CFG="shunt - Win32 (WCE ARMV4) Release"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "shunt - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Dynamic-Link Library")
-!MESSAGE "shunt - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Dynamic-Link Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-# PROP ATL_Project 2
-CPP=clarm.exe
-MTL=midl.exe
-RSC=rc.exe
-
-!IF  "$(CFG)" == "shunt - Win32 (WCE ARMV4) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "ARMV4Rel"
-# PROP BASE Intermediate_Dir "ARMV4Rel"
-# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
-# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "ARMV4Rel"
-# PROP Intermediate_Dir "ARMV4Rel"
-# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
-# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
-# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "NDEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
-# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "NDEBUG" /D "SHUNT_EXPORTS" /Yu"stdafx.h" /O2 /M$(CECrtMT) /c
-# ADD CPP /nologo /W3 /Oxt /I "../include" /D "ARM" /D "_ARM_" /D "ARMV4" /D "NDEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "SHUNT_EXPORTS" /D "MOZCE_SHUNT_EXPORTS" /FR  /M$(CECrtMT) /c
-# SUBTRACT CPP /YX /Yc /Yu
-# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
-# ADD LINK32 commctrl.lib coredll.lib ole32.lib uuid.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
-
-!ELSEIF  "$(CFG)" == "shunt - Win32 (WCE ARMV4) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "ARMV4Dbg"
-# PROP BASE Intermediate_Dir "ARMV4Dbg"
-# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
-# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "ARMV4Dbg"
-# PROP Intermediate_Dir "ARMV4Dbg"
-# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
-# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
-# PROP Ignore_Export_Lib 0
-# PROP Target_Dir ""
-# ADD BASE RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
-# ADD RSC /l 0x409 /d UNDER_CE=$(CEVersion) /d _WIN32_WCE=$(CEVersion) /d "DEBUG" /d "UNICODE" /d "_UNICODE" /d "$(CePlatform)" /d "ARM" /d "_ARM_" /d "ARMV4" /r
-# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "SHUNT_EXPORTS" /Yu"stdafx.h" /M$(CECrtMTDebug) /c
-# ADD CPP /nologo /W3 /Zi /Od /I "../include" /D "DEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "SHUNT_EXPORTS" /D "MOZCE_SHUNT_EXPORTS" /M$(CECrtMTDebug) /c
-# SUBTRACT CPP /Gf /Gy /YX /Yc /Yu
-# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o "NUL" /win32
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-LINK32=link.exe
-# ADD BASE LINK32 commctrl.lib coredll.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
-# ADD LINK32 commctrl.lib coredll.lib ole32.lib uuid.lib /nologo /base:"0x00100000" /stack:0x10000,0x1000 /entry:"_DllMainCRTStartup" /dll /debug /nodefaultlib:"$(CENoDefaultLib)" /subsystem:$(CESubsystem) /align:"4096" /MACHINE:ARM
-
-!ENDIF 
-
-# Begin Target
-
-# Name "shunt - Win32 (WCE ARMV4) Release"
-# Name "shunt - Win32 (WCE ARMV4) Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\a2w.cpp
-DEP_CPP_A2W_C=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\assert.cpp
-DEP_CPP_ASSER=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\clipboard.cpp
-DEP_CPP_CLIPB=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\direct.cpp
-DEP_CPP_DIREC=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\errno.cpp
-DEP_CPP_ERRNO=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\io.cpp
-DEP_CPP_IO_CP=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\mbstring.cpp
-DEP_CPP_MBSTR=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\nclog.cpp
-DEP_CPP_NCLOG=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\process.cpp
-DEP_CPP_PROCE=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	{$(INCLUDE)}"kfuncs.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\signal.cpp
-DEP_CPP_SIGNA=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\stat.cpp
-DEP_CPP_STAT_=\
-	"..\include\mozce_defs.h"\
-	"..\include\time_conversions.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\stdio.cpp
-DEP_CPP_STDIO=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\stdlib.cpp
-DEP_CPP_STDLI=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\string.cpp
-DEP_CPP_STRIN=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\time.cpp
-DEP_CPP_TIME_=\
-	"..\include\mozce_defs.h"\
-	"..\include\time_conversions.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\w2a.cpp
-DEP_CPP_W2A_C=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\win32.cpp
-DEP_CPP_WIN32=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	{$(INCLUDE)}"kfuncs.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\win32A.cpp
-DEP_CPP_WIN32A=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\win32W.cpp
-DEP_CPP_WIN32W=\
-	"..\include\mozce_defs.h"\
-	"..\mozce_internal.h"\
-	
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# Begin Group "sys"
-
-# PROP Default_Filter ""
-# Begin Source File
-
-SOURCE=..\include\sys\socket.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\sys\stat.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\sys\timeb.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\sys\types.h
-# End Source File
-# End Group
-# Begin Source File
-
-SOURCE=..\include\assert.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\crtdbg.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\ddeml.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\direct.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\dlgs.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\errno.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\fcntl.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\intshcut.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\io.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\mbstring.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\mozce_defs.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\mozce_internal.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\mozce_shunt.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\new.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\process.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\rasdlg.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\signal.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\time.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\time_conversions.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\varargs.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\winresrc.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\winsock2.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\winspool.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\winsvc.h
-# End Source File
-# Begin Source File
-
-SOURCE=..\include\zmouse.h
-# End Source File
-# End Group
-# Begin Group "Resource Files"
-
-# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
-# End Group
-# Begin Source File
-
-SOURCE=.\ReadMe.txt
-# End Source File
-# End Target
-# End Project
deleted file mode 100755
--- a/build/wince/shunt/build/shunt.vcw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft eMbedded Visual Tools Workspace File, Format Version 4.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "shunt"=.\shunt.vcp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
deleted file mode 100755
--- a/build/wince/shunt/build/static/static.sln
+++ /dev/null
@@ -1,22 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "static", "static.vcproj", "{082BAB06-D10F-4C57-B123-F84DC06C246D}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
deleted file mode 100755
--- a/build/wince/shunt/build/static/static.vcp
+++ /dev/null
@@ -1,254 +0,0 @@
-# Microsoft eMbedded Visual Tools Project File - Name="static" - Package Owner=<4>
-# Microsoft eMbedded Visual Tools Generated Build File, Format Version 6.02
-# ** DO NOT EDIT **
-
-# TARGTYPE "Win32 (WCE ARMV4) Static Library" 0xa304
-
-CFG=static - Win32 (WCE ARMV4) Debug
-!MESSAGE This is not a valid makefile. To build this project using NMAKE,
-!MESSAGE use the Export Makefile command and run
-!MESSAGE 
-!MESSAGE NMAKE /f "static.vcn".
-!MESSAGE 
-!MESSAGE You can specify a configuration when running NMAKE
-!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE 
-!MESSAGE NMAKE /f "static.vcn" CFG="static - Win32 (WCE ARMV4) Debug"
-!MESSAGE 
-!MESSAGE Possible choices for configuration are:
-!MESSAGE 
-!MESSAGE "static - Win32 (WCE ARMV4) Release" (based on "Win32 (WCE ARMV4) Static Library")
-!MESSAGE "static - Win32 (WCE ARMV4) Debug" (based on "Win32 (WCE ARMV4) Static Library")
-!MESSAGE 
-
-# Begin Project
-# PROP AllowPerConfigDependencies 0
-# PROP Scc_ProjName ""
-# PROP Scc_LocalPath ""
-# PROP ATL_Project 2
-CPP=clarm.exe
-
-!IF  "$(CFG)" == "static - Win32 (WCE ARMV4) Release"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 0
-# PROP BASE Output_Dir "ARMV4Rel"
-# PROP BASE Intermediate_Dir "ARMV4Rel"
-# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
-# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 0
-# PROP Output_Dir "ARMV4Rel"
-# PROP Intermediate_Dir "ARMV4Rel"
-# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
-# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "NDEBUG" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /O2 /M$(CECrtMT) /c
-# ADD CPP /nologo /W3 /Gy /I "..\..\\" /I "..\..\include" /D "NDEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /D "MOZCE_SHUNT_EXPORTS" /O2 /M$(CECrtMT) /c
-# SUBTRACT CPP /YX
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"ARMV4Rel\shunt.lib"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-
-!ELSEIF  "$(CFG)" == "static - Win32 (WCE ARMV4) Debug"
-
-# PROP BASE Use_MFC 0
-# PROP BASE Use_Debug_Libraries 1
-# PROP BASE Output_Dir "ARMV4Dbg"
-# PROP BASE Intermediate_Dir "ARMV4Dbg"
-# PROP BASE CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
-# PROP BASE Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
-# PROP BASE Target_Dir ""
-# PROP Use_MFC 0
-# PROP Use_Debug_Libraries 1
-# PROP Output_Dir "ARMV4Dbg"
-# PROP Intermediate_Dir "ARMV4Dbg"
-# PROP CPU_ID "{ECBEA43D-CD7B-4852-AD55-D4227B5D624B}"
-# PROP Platform_ID "{8A9A2F80-6887-11D3-842E-005004848CBA}"
-# PROP Target_Dir ""
-# ADD BASE CPP /nologo /W3 /Zi /Od /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /YX /M$(CECrtMTDebug) /c
-# ADD CPP /nologo /W3 /Zi /Od /Gy /I "..\..\\" /I "..\..\include" /D "DEBUG" /D _WIN32_WCE=$(CEVersion) /D "$(CePlatform)" /D "ARM" /D "_ARM_" /D "ARMV4" /D UNDER_CE=$(CEVersion) /D "UNICODE" /D "_UNICODE" /D "_LIB" /D "MOZCE_SHUNT_EXPORTS" /M$(CECrtMTDebug) /c
-# SUBTRACT CPP /YX
-LIB32=link.exe -lib
-# ADD BASE LIB32 /nologo
-# ADD LIB32 /nologo /out:"ARMV4Dbg\shunt.lib"
-BSC32=bscmake.exe
-# ADD BASE BSC32 /nologo
-# ADD BSC32 /nologo
-
-!ENDIF 
-
-# Begin Target
-
-# Name "static - Win32 (WCE ARMV4) Release"
-# Name "static - Win32 (WCE ARMV4) Debug"
-# Begin Group "Source Files"
-
-# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
-# Begin Source File
-
-SOURCE=..\..\a2w.cpp
-DEP_CPP_A2W_C=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\assert.cpp
-DEP_CPP_ASSER=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\clipboard.cpp
-DEP_CPP_CLIPB=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\direct.cpp
-DEP_CPP_DIREC=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\errno.cpp
-DEP_CPP_ERRNO=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\io.cpp
-DEP_CPP_IO_CP=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\mbstring.cpp
-DEP_CPP_MBSTR=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\nclog.cpp
-DEP_CPP_NCLOG=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\process.cpp
-DEP_CPP_PROCE=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	{$(INCLUDE)}"kfuncs.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\signal.cpp
-DEP_CPP_SIGNA=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\stat.cpp
-DEP_CPP_STAT_=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\include\time_conversions.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\stdio.cpp
-DEP_CPP_STDIO=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\stdlib.cpp
-DEP_CPP_STDLI=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\string.cpp
-DEP_CPP_STRIN=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\time.cpp
-DEP_CPP_TIME_=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\include\time_conversions.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\w2a.cpp
-DEP_CPP_W2A_C=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\win32.cpp
-DEP_CPP_WIN32=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	{$(INCLUDE)}"kfuncs.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\win32A.cpp
-DEP_CPP_WIN32A=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# Begin Source File
-
-SOURCE=..\..\win32W.cpp
-DEP_CPP_WIN32W=\
-	"..\..\include\mozce_defs.h"\
-	"..\..\mozce_internal.h"\
-	
-# End Source File
-# End Group
-# Begin Group "Header Files"
-
-# PROP Default_Filter "h;hpp;hxx;hm;inl"
-# End Group
-# End Target
-# End Project
deleted file mode 100755
--- a/build/wince/shunt/build/static/static.vcproj
+++ /dev/null
@@ -1,277 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="static"
-	ProjectGUID="{082BAB06-D10F-4C57-B123-F84DC06C246D}"
-	RootNamespace="static"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
-			OutputDirectory="$(PlatformName)\Debug"
-			IntermediateDirectory="$(PlatformName)\Debug"
-			ConfigurationType="4"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\include"
-				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD"
-				MinimalRebuild="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="1"
-				EnableFunctionLevelLinking="true"
-				TreatWChar_tAsBuiltInType="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
-				OutputFile="$(InputDir)/shunt_dbg.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
-			OutputDirectory="$(PlatformName)\Release"
-			IntermediateDirectory="$(PlatformName)\Release"
-			ConfigurationType="4"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\..\include"
-				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				TreatWChar_tAsBuiltInType="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
-				OutputFile="$(InputDir)/shunt.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\..\a2w.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\assert.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\clipboard.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\direct.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\errno.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\io.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\mbstring.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\nclog.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\process.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\signal.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\stat.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\stdio.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\stdlib.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\string.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\time.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\w2a.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\win32.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\win32A.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\win32W.cpp"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-		<File
-			RelativePath=".\ReadMe.txt"
-			>
-		</File>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
deleted file mode 100755
--- a/build/wince/shunt/build/static/static.vcw
+++ /dev/null
@@ -1,29 +0,0 @@
-Microsoft eMbedded Visual Tools Workspace File, Format Version 4.00
-# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
-
-###############################################################################
-
-Project: "static"=.\static.vcp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
-Global:
-
-Package=<5>
-{{{
-}}}
-
-Package=<3>
-{{{
-}}}
-
-###############################################################################
-
--- a/build/wince/shunt/build/vs8/mozce_shunt_static.sln
+++ b/build/wince/shunt/build/vs8/mozce_shunt_static.sln
@@ -1,46 +1,30 @@
-
-Microsoft Visual Studio Solution File, Format Version 9.00
-# Visual Studio 2005
-Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mozce_shunt_static", "mozce_shunt_static.vcproj", "{082BAB06-D10F-4C57-B123-F84DC06C246D}"
-EndProject
-Global
-	GlobalSection(SolutionConfigurationPlatforms) = preSolution
-		Debug|Pocket PC 2003 (ARMV4) = Debug|Pocket PC 2003 (ARMV4)
-		Debug|Smartphone 2003 (ARMV4) = Debug|Smartphone 2003 (ARMV4)
-		Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
-		Release|Pocket PC 2003 (ARMV4) = Release|Pocket PC 2003 (ARMV4)
-		Release|Smartphone 2003 (ARMV4) = Release|Smartphone 2003 (ARMV4)
-		Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
-	EndGlobalSection
-	GlobalSection(ProjectConfigurationPlatforms) = postSolution
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Pocket PC 2003 (ARMV4).ActiveCfg = Debug|Pocket PC 2003 (ARMV4)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Pocket PC 2003 (ARMV4).Build.0 = Debug|Pocket PC 2003 (ARMV4)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Pocket PC 2003 (ARMV4).Deploy.0 = Debug|Pocket PC 2003 (ARMV4)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Smartphone 2003 (ARMV4).ActiveCfg = Debug|Smartphone 2003 (ARMV4)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Smartphone 2003 (ARMV4).Build.0 = Debug|Smartphone 2003 (ARMV4)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Smartphone 2003 (ARMV4).Deploy.0 = Debug|Smartphone 2003 (ARMV4)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Pocket PC 2003 (ARMV4).ActiveCfg = Release|Pocket PC 2003 (ARMV4)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Pocket PC 2003 (ARMV4).Build.0 = Release|Pocket PC 2003 (ARMV4)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Pocket PC 2003 (ARMV4).Deploy.0 = Release|Pocket PC 2003 (ARMV4)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Smartphone 2003 (ARMV4).ActiveCfg = Release|Smartphone 2003 (ARMV4)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Smartphone 2003 (ARMV4).Build.0 = Release|Smartphone 2003 (ARMV4)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Smartphone 2003 (ARMV4).Deploy.0 = Release|Smartphone 2003 (ARMV4)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
-		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)
-	EndGlobalSection
-	GlobalSection(SolutionProperties) = preSolution
-		HideSolutionNode = FALSE
-	EndGlobalSection
-EndGlobal
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mozce_shunt_static", "mozce_shunt_static.vcproj", "{082BAB06-D10F-4C57-B123-F84DC06C246D}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
+		Debug|Windows Mobile 6 Standard SDK (ARMV4I) = Debug|Windows Mobile 6 Standard SDK (ARMV4I)
+		Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I)
+		Release|Windows Mobile 6 Standard SDK (ARMV4I) = Release|Windows Mobile 6 Standard SDK (ARMV4I)
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
+		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
+		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I)
+		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I)
+		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I)
+		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I)
+		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I)
+		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
+		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I)
+		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I)
+		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I)
+		{082BAB06-D10F-4C57-B123-F84DC06C246D}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I)
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
--- a/build/wince/shunt/build/vs8/mozce_shunt_static.vcproj
+++ b/build/wince/shunt/build/vs8/mozce_shunt_static.vcproj
@@ -1,866 +1,1192 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioProject
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="mozce_shunt_static"
-	ProjectGUID="{082BAB06-D10F-4C57-B123-F84DC06C246D}"
-	RootNamespace="mozce_shunt_static"
-	Keyword="Win32Proj"
-	>
-	<Platforms>
-		<Platform
-			Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
-		/>
-		<Platform
-			Name="Pocket PC 2003 (ARMV4)"
-		/>
-		<Platform
-			Name="Smartphone 2003 (ARMV4)"
-		/>
-		<Platform
-			Name="Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
-		/>
-	</Platforms>
-	<ToolFiles>
-	</ToolFiles>
-	<Configurations>
-		<Configuration
-			Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
-			OutputDirectory="$(PlatformName)\Debug"
-			IntermediateDirectory="$(PlatformName)\Debug"
-			ConfigurationType="4"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\include"
-				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
-				MinimalRebuild="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				TreatWChar_tAsBuiltInType="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
-				OutputFile="$(InputDir)/shunt_dbg.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Pocket PC 2003 (ARMV4)"
-			OutputDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
-			IntermediateDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
-			ConfigurationType="4"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="1"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\include"
-				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
-				MinimalRebuild="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				TreatWChar_tAsBuiltInType="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
-				OutputFile="$(InputDir)/shunt_dbg.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
-			OutputDirectory="$(PlatformName)\Release"
-			IntermediateDirectory="$(PlatformName)\Release"
-			ConfigurationType="4"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\..\include"
-				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				TreatWChar_tAsBuiltInType="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
-				OutputFile="$(InputDir)/shunt.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Pocket PC 2003 (ARMV4)"
-			OutputDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
-			IntermediateDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
-			ConfigurationType="4"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="1"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\..\include"
-				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
-				ExceptionHandling="1"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				FloatingPointModel="2"
-				TreatWChar_tAsBuiltInType="false"
-				RuntimeTypeInfo="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-				CompileForArchitecture="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
-				OutputFile="$(InputDir)/shunt.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Smartphone 2003 (ARMV4)"
-			OutputDirectory="Smartphone 2003 (ARMV4)\$(ConfigurationName)"
-			IntermediateDirectory="Smartphone 2003 (ARMV4)\$(ConfigurationName)"
-			ConfigurationType="4"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="1"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\include"
-				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
-				MinimalRebuild="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				TreatWChar_tAsBuiltInType="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
-				OutputFile="$(InputDir)/shunt_dbg.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Smartphone 2003 (ARMV4)"
-			OutputDirectory="Smartphone 2003 (ARMV4)\$(ConfigurationName)"
-			IntermediateDirectory="Smartphone 2003 (ARMV4)\$(ConfigurationName)"
-			ConfigurationType="4"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="1"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\..\include"
-				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
-				ExceptionHandling="1"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				FloatingPointModel="2"
-				TreatWChar_tAsBuiltInType="false"
-				RuntimeTypeInfo="true"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-				CompileForArchitecture="0"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
-				OutputFile="$(InputDir)/shunt.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-		<Configuration
-			Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
-			OutputDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)"
-			IntermediateDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)"
-			ConfigurationType="4"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="1"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="0"
-				AdditionalIncludeDirectories="..\..\include"
-				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
-				MinimalRebuild="true"
-				ExceptionHandling="0"
-				RuntimeLibrary="1"
-				BufferSecurityCheck="false"
-				EnableFunctionLevelLinking="true"
-				TreatWChar_tAsBuiltInType="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
-				OutputFile="$(InputDir)/shunt_dbg.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
-			OutputDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)"
-			IntermediateDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)"
-			ConfigurationType="4"
-			CharacterSet="1"
-			>
-			<Tool
-				Name="VCPreBuildEventTool"
-			/>
-			<Tool
-				Name="VCCustomBuildTool"
-			/>
-			<Tool
-				Name="VCXMLDataGeneratorTool"
-			/>
-			<Tool
-				Name="VCWebServiceProxyGeneratorTool"
-			/>
-			<Tool
-				Name="VCMIDLTool"
-				TargetEnvironment="1"
-			/>
-			<Tool
-				Name="VCCLCompilerTool"
-				ExecutionBucket="7"
-				Optimization="2"
-				AdditionalIncludeDirectories="..\..\include"
-				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
-				ExceptionHandling="0"
-				RuntimeLibrary="0"
-				BufferSecurityCheck="false"
-				TreatWChar_tAsBuiltInType="false"
-				UsePrecompiledHeader="0"
-				WarningLevel="3"
-				DebugInformationFormat="3"
-			/>
-			<Tool
-				Name="VCManagedResourceCompilerTool"
-			/>
-			<Tool
-				Name="VCResourceCompilerTool"
-				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
-				Culture="1033"
-				AdditionalIncludeDirectories="$(IntDir)"
-			/>
-			<Tool
-				Name="VCPreLinkEventTool"
-			/>
-			<Tool
-				Name="VCLibrarianTool"
-				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
-				OutputFile="$(InputDir)/shunt.lib"
-			/>
-			<Tool
-				Name="VCALinkTool"
-			/>
-			<Tool
-				Name="VCXDCMakeTool"
-			/>
-			<Tool
-				Name="VCBscMakeTool"
-			/>
-			<Tool
-				Name="VCCodeSignTool"
-			/>
-			<Tool
-				Name="VCPostBuildEventTool"
-			/>
-			<DeploymentTool
-				ForceDirty="-1"
-				RemoteDirectory=""
-				RegisterOutput="0"
-				AdditionalFiles=""
-			/>
-			<DebuggerTool
-			/>
-		</Configuration>
-	</Configurations>
-	<References>
-	</References>
-	<Files>
-		<Filter
-			Name="Source Files"
-			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
-			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
-			>
-			<File
-				RelativePath="..\..\a2w.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\assert.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\clipboard.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\direct.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\errno.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\io.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\mbstring.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\nclog.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\process.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\signal.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\stat.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\stdio.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\stdlib.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\string.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\time.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\w2a.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\win32.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\win32A.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\..\win32W.cpp"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Header Files"
-			Filter="h;hpp;hxx;hm;inl;inc;xsd"
-			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
-			>
-			<File
-				RelativePath="..\..\include\assert.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\crtdbg.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\ddeml.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\direct.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\dlgs.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\errno.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\fcntl.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\intshcut.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\io.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\mbstring.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\mozce_defs.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\mozce_shunt.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\new.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\process.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\rasdlg.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\signal.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\time.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\time_conversions.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\unistd.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\varargs.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\winresrc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\winsock2.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\winspool.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\winsvc.h"
-				>
-			</File>
-			<File
-				RelativePath="..\..\include\zmouse.h"
-				>
-			</File>
-		</Filter>
-		<Filter
-			Name="Resource Files"
-			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
-			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
-			>
-		</Filter>
-	</Files>
-	<Globals>
-	</Globals>
-</VisualStudioProject>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="mozce_shunt_static"
+	ProjectGUID="{082BAB06-D10F-4C57-B123-F84DC06C246D}"
+	RootNamespace="mozce_shunt_static"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Pocket PC 2003 (ARMV4)"
+		/>
+		<Platform
+			Name="Smartphone 2003 (ARMV4)"
+		/>
+		<Platform
+			Name="Windows Mobile 6 Standard SDK (ARMV4I)"
+		/>
+		<Platform
+			Name="Windows Mobile 6 Professional SDK (ARMV4I)"
+		/>
+		<Platform
+			Name="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+		/>
+		<Platform
+			Name="Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Pocket PC 2003 (ARMV4)"
+			OutputDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
+			IntermediateDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="1"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
+				MinimalRebuild="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				TreatWChar_tAsBuiltInType="false"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+				OutputFile="$(InputDir)/shunt_dbg.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCCodeSignTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Smartphone 2003 (ARMV4)"
+			OutputDirectory="Smartphone 2003 (ARMV4)\$(ConfigurationName)"
+			IntermediateDirectory="Smartphone 2003 (ARMV4)\$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="1"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
+				MinimalRebuild="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				TreatWChar_tAsBuiltInType="false"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+				OutputFile="$(InputDir)/shunt_dbg.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCCodeSignTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Windows Mobile 6 Standard SDK (ARMV4I)"
+			OutputDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)"
+			IntermediateDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="1"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
+				MinimalRebuild="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				TreatWChar_tAsBuiltInType="false"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+				OutputFile="$(InputDir)/shunt_dbg.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCCodeSignTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)"
+			OutputDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)"
+			IntermediateDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="1"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
+				MinimalRebuild="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				TreatWChar_tAsBuiltInType="false"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+				OutputFile="$(InputDir)/shunt_dbg.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCCodeSignTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Pocket PC 2003 (ARMV4)"
+			OutputDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
+			IntermediateDirectory="Pocket PC 2003 (ARMV4)\$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="1"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
+				Optimization="2"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				TreatWChar_tAsBuiltInType="false"
+				RuntimeTypeInfo="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+				CompileForArchitecture="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+				OutputFile="$(InputDir)/shunt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCCodeSignTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Smartphone 2003 (ARMV4)"
+			OutputDirectory="Smartphone 2003 (ARMV4)\$(ConfigurationName)"
+			IntermediateDirectory="Smartphone 2003 (ARMV4)\$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="1"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
+				Optimization="2"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				TreatWChar_tAsBuiltInType="false"
+				RuntimeTypeInfo="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+				CompileForArchitecture="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+				OutputFile="$(InputDir)/shunt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCCodeSignTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)"
+			OutputDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)"
+			IntermediateDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="1"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
+				Optimization="2"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				TreatWChar_tAsBuiltInType="false"
+				RuntimeTypeInfo="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+				CompileForArchitecture="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+				OutputFile="$(InputDir)/shunt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCCodeSignTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)"
+			OutputDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)"
+			IntermediateDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="1"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
+				Optimization="2"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
+				ExceptionHandling="1"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				FloatingPointModel="2"
+				TreatWChar_tAsBuiltInType="false"
+				RuntimeTypeInfo="true"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+				CompileForArchitecture="0"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+				OutputFile="$(InputDir)/shunt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCCodeSignTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+			OutputDirectory="$(PlatformName)\Debug"
+			IntermediateDirectory="$(PlatformName)\Debug"
+			ConfigurationType="4"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
+				MinimalRebuild="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				TreatWChar_tAsBuiltInType="false"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+				OutputFile="$(InputDir)/shunt_dbg.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCCodeSignTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)"
+			OutputDirectory="$(PlatformName)\Release"
+			IntermediateDirectory="$(PlatformName)\Release"
+			ConfigurationType="4"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
+				Optimization="2"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
+				ExceptionHandling="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				TreatWChar_tAsBuiltInType="false"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+				OutputFile="$(InputDir)/shunt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCCodeSignTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
+		</Configuration>
+		<Configuration
+			Name="Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
+			OutputDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)"
+			IntermediateDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="1"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;DEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
+				MinimalRebuild="true"
+				ExceptionHandling="0"
+				RuntimeLibrary="1"
+				BufferSecurityCheck="false"
+				EnableFunctionLevelLinking="true"
+				TreatWChar_tAsBuiltInType="false"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+				OutputFile="$(InputDir)/shunt_dbg.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCCodeSignTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)"
+			OutputDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)"
+			IntermediateDirectory="Windows Mobile 5.0 Smartphone SDK (ARMV4I)\$(ConfigurationName)"
+			ConfigurationType="4"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+				TargetEnvironment="1"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				ExecutionBucket="7"
+				Optimization="2"
+				AdditionalIncludeDirectories="..\..\include"
+				PreprocessorDefinitions="_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_LIB;$(ARCHFAM);$(_ARCHFAM_);MOZCE_STATIC_BUILD;MOZCE_SHUNT_EXPORTS"
+				ExceptionHandling="0"
+				RuntimeLibrary="0"
+				BufferSecurityCheck="false"
+				TreatWChar_tAsBuiltInType="false"
+				UsePrecompiledHeader="0"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+				PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE"
+				Culture="1033"
+				AdditionalIncludeDirectories="$(IntDir)"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+				AdditionalOptions=" /subsystem:windowsce,5.01 /machine:THUMB"
+				OutputFile="$(InputDir)/shunt.lib"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCCodeSignTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+			<DeploymentTool
+				ForceDirty="-1"
+				RemoteDirectory=""
+				RegisterOutput="0"
+				AdditionalFiles=""
+			/>
+			<DebuggerTool
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\a2w.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\assert.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\clipboard.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\direct.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\errno.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\io.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\mbstring.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\nclog.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\process.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\signal.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\stat.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\stdio.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\stdlib.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\string.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\time.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\w2a.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\win32.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\win32A.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\..\win32W.cpp"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\..\include\crtdbg.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\ddeml.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\direct.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\dlgs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\errno.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\fcntl.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\intshcut.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\io.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\mbstring.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\mozce_defs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\mozce_internal.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\mozce_shunt.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\new.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\process.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\rasdlg.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\signal.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\time_conversions.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\unistd.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\varargs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\winresrc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\winsock2.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\winspool.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\winsvc.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\include\zmouse.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
--- a/build/wince/shunt/clipboard.cpp
+++ b/build/wince/shunt/clipboard.cpp
@@ -1,310 +1,311 @@
-/* ***** 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 WinCE Shunt
- *
- * The Initial Developer of the Original Code is 
- * Douglas F. Turner II  <dougt@meer.net>
- * Portions created by the Initial Developer are Copyright (C) 2005
- * 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 "mozce_internal.h"
-
-extern "C" {
-#if 0
-}
-#endif
-
-static IDataObject* gDataObject = NULL;
-static HWND gClipboardWND = NULL; /* we may need to free this */
-
-void oleSetup()
-{
-  if (gClipboardWND)
-    return;
-  
-  WNDCLASS wndclass;
-  ZeroMemory( &wndclass, sizeof(WNDCLASS));
-  
-  
-  wndclass.style          = CS_GLOBALCLASS;
-  wndclass.lpfnWndProc    = DefWindowProc;
-  wndclass.lpszClassName  = L"OLE_CLIPBOARD";
-  
-  RegisterClass(&wndclass);
-  
-  gClipboardWND = CreateWindow(L"OLE_Clipboard",
-                         0,
-                         0,
-                         CW_USEDEFAULT, CW_USEDEFAULT,
-                         CW_USEDEFAULT, CW_USEDEFAULT,
-                         0,
-                         0,
-                         0,
-                         0);
-}
-
-class ClipDataObj : public IDataObject
-{
-public:
-  ClipDataObj()
-  {
-    mRefCnt = 0;
-  } 
-  
-  ~ClipDataObj()
-  {  
-  }
-  
-  STDMETHODIMP_(ULONG) AddRef()
-  {
-    mRefCnt++; 
-    return mRefCnt; 
-  }
-  
-  STDMETHODIMP QueryInterface(REFIID iid, void **ppvObject)
-  {
-    // check to see what interface has been requested
-    if(iid == IID_IDataObject || iid == IID_IUnknown)
-    {
-      AddRef();
-      *ppvObject = this;
-      return S_OK;
-    }
-    else
-    {
-      *ppvObject = 0;
-      return E_NOINTERFACE;
-    }
-  }
-  
-  STDMETHODIMP_(ULONG) Release()
-  {
-    mRefCnt--;
-    if (mRefCnt == 0)
-    {
-      delete this;
-      return 0;
-    }
-    
-    return mRefCnt;
-  }
-  
-  STDMETHODIMP GetData	(FORMATETC *pFormatEtc, STGMEDIUM *pMedium)
-  {
-    
-    oleSetup();
-    
-    BOOL b = OpenClipboard(gClipboardWND);
-    
-    if (!b)
-      return E_FAIL;
-    
-    HANDLE hData = GetClipboardData(pFormatEtc->cfFormat);
-    
-    LPVOID src = GlobalLock(hData);
-    if(src) {
-      ULONG  size  = GlobalSize(hData);
-      HANDLE hDest = GlobalAlloc(GHND, size);
-      LPVOID dest  = GlobalLock(hDest);
-      memcpy(dest, src, size);
-      
-      GlobalUnlock(hDest);
-      GlobalUnlock(hData);
-      
-      hData = hDest;
-    }
-    
-    pMedium->tymed = (hData == 0) ? TYMED_NULL : TYMED_HGLOBAL;
-    pMedium->hGlobal = (HGLOBAL)hData;
-    pMedium->pUnkForRelease = NULL;
-    
-    return S_OK;
-  }
-  
-  STDMETHODIMP GetDataHere (LPFORMATETC pFE, LPSTGMEDIUM pSTM)
-  {
-    return DATA_E_FORMATETC;
-  }
-  
-  STDMETHODIMP QueryGetData (LPFORMATETC pFE)
-  {
-    return S_OK;
-  }
-  
-  STDMETHODIMP GetCanonicalFormatEtc (LPFORMATETC pFE, LPFORMATETC pCanonFE)
-  {
-    pFE->ptd = NULL;
-    return E_NOTIMPL;
-  }
-  
-  STDMETHODIMP SetData	(LPFORMATETC pFE, LPSTGMEDIUM pSTM, BOOL release)
-  {
-    return E_NOTIMPL;
-  }
-  
-  STDMETHODIMP EnumFormatEtc	(DWORD dwDirection, LPENUMFORMATETC* ppEnum)
-  {
-    return E_NOTIMPL;
-  }
-  
-  STDMETHODIMP DAdvise	(LPFORMATETC pFE, DWORD flags, LPADVISESINK pAdvise, DWORD* pConn)
-  {
-    return OLE_E_ADVISENOTSUPPORTED;
-  }
-  
-  STDMETHODIMP DUnadvise (DWORD pConn)
-  {
-    return OLE_E_ADVISENOTSUPPORTED;
-  }
-  
-  STDMETHODIMP EnumDAdvise (LPENUMSTATDATA *ppEnum)
-  {
-    return OLE_E_ADVISENOTSUPPORTED;
-  }
-private:
-  LONG	   mRefCnt;
-};
-
-
-
-MOZCE_SHUNT_API HRESULT mozce_OleSetClipboard(IDataObject * pDataObj)
-{
-  MOZCE_PRECHECK
-    
-	oleSetup();
-  
-  if (gDataObject)
-    gDataObject->Release();
-  
-  gDataObject = pDataObj;
-  
-  if (pDataObj) 
-  {
-    BOOL b = OpenClipboard(gClipboardWND);
-    
-    if (!b)
-      return E_FAIL;
-    
-    EmptyClipboard();
-    
-    pDataObj->AddRef();
-    
-    IEnumFORMATETC* enumerator = NULL;
-    pDataObj->EnumFormatEtc(DATADIR_GET, &enumerator);
-    if (!enumerator)
-      return S_OK;
-    
-    FORMATETC etc;
-    
-    while (S_OK == enumerator->Next(1, &etc, NULL))
-    {
-      if ( etc.tymed == TYMED_HGLOBAL )
-      {
-
-		STGMEDIUM medium;
-		pDataObj->GetData(&etc, &medium);
-        SetClipboardData( etc.cfFormat, medium.hGlobal);
-      }
-    }
-    
-    enumerator->Release();
-    
-    CloseClipboard();
-    
-  }
-  return S_OK;
-}
-
-MOZCE_SHUNT_API HRESULT mozce_OleGetClipboard(IDataObject ** pDataObj)
-{
-  MOZCE_PRECHECK
-    oleSetup();
-  
-  if (pDataObj)
-    *pDataObj = gDataObject;
-  
-  if (!*pDataObj)
-  {
-    *pDataObj = new ClipDataObj();
-    if (!*pDataObj)
-      return E_FAIL;
-
-    gDataObject = *pDataObj;
-  }
-  
-  (*pDataObj)->AddRef();
-  return S_OK;
-}
-
-MOZCE_SHUNT_API HRESULT mozce_OleFlushClipboard()
-{
-  MOZCE_PRECHECK
-    oleSetup();
-  
-  mozce_OleSetClipboard(NULL);
-  return S_OK;
-}
-
-
-MOZCE_SHUNT_API BOOL mozce_IsClipboardFormatAvailable(UINT format)
-{
-  if (gClipboardWND)
-  {
-    BOOL b = OpenClipboard(gClipboardWND);
-    if (!b)
-      return E_FAIL;
-    
-    IEnumFORMATETC* enumerator = NULL;
-    gDataObject->EnumFormatEtc(DATADIR_GET, &enumerator);
-    if (!enumerator)
-      return S_OK;
-    
-    FORMATETC etc;
-    
-    while (S_OK == enumerator->Next(1, &etc, NULL))
-    {
-      if ( etc.cfFormat == format)
-      {
-        enumerator->Release();
-        CloseClipboard();
-        return true;
-      }
-    }
-    enumerator->Release();
-    CloseClipboard();
-  }
-  
-  return IsClipboardFormatAvailable(format);
-}
-
-#if 0
-{
-#endif
-} /* extern "C" */
+/* ***** 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 WinCE Shunt
+ *
+ * The Initial Developer of the Original Code is 
+ * Douglas F. Turner II  <dougt@meer.net>
+ * Portions created by the Initial Developer are Copyright (C) 2005
+ * 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 "mozce_internal.h"
+
+extern "C" {
+#if 0
+}
+#endif
+
+static IDataObject* gDataObject = NULL;
+static HWND gClipboardWND = NULL; /* we may need to free this */
+
+void oleSetup()
+{
+  if (gClipboardWND)
+    return;
+  
+  WNDCLASS wndclass;
+  ZeroMemory( &wndclass, sizeof(WNDCLASS));
+  
+  
+  wndclass.style          = CS_GLOBALCLASS;
+  wndclass.lpfnWndProc    = DefWindowProc;
+  wndclass.lpszClassName  = L"OLE_CLIPBOARD";
+  
+  RegisterClass(&wndclass);
+  
+  gClipboardWND = CreateWindow(L"OLE_Clipboard",
+                         0,
+                         0,
+                         CW_USEDEFAULT, CW_USEDEFAULT,
+                         CW_USEDEFAULT, CW_USEDEFAULT,
+                         0,
+                         0,
+                         0,
+                         0);
+}
+
+class ClipDataObj : public IDataObject
+{
+public:
+  ClipDataObj()
+  {
+    mRefCnt = 0;
+  } 
+  
+  ~ClipDataObj()
+  {  
+  }
+  
+  STDMETHODIMP_(ULONG) AddRef()
+  {
+    mRefCnt++; 
+    return mRefCnt; 
+  }
+  
+  STDMETHODIMP QueryInterface(REFIID iid, void **ppvObject)
+  {
+    // check to see what interface has been requested
+    if(iid == IID_IDataObject || iid == IID_IUnknown)
+    {
+      AddRef();
+      *ppvObject = this;
+      return S_OK;
+    }
+    else
+    {
+      *ppvObject = 0;
+      return E_NOINTERFACE;
+    }
+  }
+  
+  STDMETHODIMP_(ULONG) Release()
+  {
+    mRefCnt--;
+    if (mRefCnt == 0)
+    {
+      delete this;
+      return 0;
+    }
+    
+    return mRefCnt;
+  }
+  
+  STDMETHODIMP GetData	(FORMATETC *pFormatEtc, STGMEDIUM *pMedium)
+  {
+    
+    oleSetup();
+    
+    BOOL b = OpenClipboard(gClipboardWND);
+    
+    if (!b)
+      return E_FAIL;
+    
+    HANDLE hData = GetClipboardData(pFormatEtc->cfFormat);
+    
+    LPVOID src = GlobalLock(hData);
+    if(src) {
+      ULONG  size  = GlobalSize(hData);
+      HANDLE hDest = GlobalAlloc(GHND, size);
+      LPVOID dest  = GlobalLock(hDest);
+      memcpy(dest, src, size);
+      
+      GlobalUnlock(hDest);
+      GlobalUnlock(hData);
+      
+      hData = hDest;
+    }
+    
+    pMedium->tymed = (hData == 0) ? TYMED_NULL : TYMED_HGLOBAL;
+    pMedium->hGlobal = (HGLOBAL)hData;
+    pMedium->pUnkForRelease = NULL;
+    
+    return S_OK;
+  }
+  
+  STDMETHODIMP GetDataHere (LPFORMATETC pFE, LPSTGMEDIUM pSTM)
+  {
+    return DATA_E_FORMATETC;
+  }
+  
+  STDMETHODIMP QueryGetData (LPFORMATETC pFE)
+  {
+    return S_OK;
+  }
+  
+  STDMETHODIMP GetCanonicalFormatEtc (LPFORMATETC pFE, LPFORMATETC pCanonFE)
+  {
+    pFE->ptd = NULL;
+    return E_NOTIMPL;
+  }
+  
+  STDMETHODIMP SetData	(LPFORMATETC pFE, LPSTGMEDIUM pSTM, BOOL release)
+  {
+    return E_NOTIMPL;
+  }
+  
+  STDMETHODIMP EnumFormatEtc	(DWORD dwDirection, LPENUMFORMATETC* ppEnum)
+  {
+    return E_NOTIMPL;
+  }
+  
+  STDMETHODIMP DAdvise	(LPFORMATETC pFE, DWORD flags, LPADVISESINK pAdvise, DWORD* pConn)
+  {
+    return OLE_E_ADVISENOTSUPPORTED;
+  }
+  
+  STDMETHODIMP DUnadvise (DWORD pConn)
+  {
+    return OLE_E_ADVISENOTSUPPORTED;
+  }
+  
+  STDMETHODIMP EnumDAdvise (LPENUMSTATDATA *ppEnum)
+  {
+    return OLE_E_ADVISENOTSUPPORTED;
+  }
+private:
+  LONG	   mRefCnt;
+};
+
+
+
+MOZCE_SHUNT_API HRESULT OleSetClipboard(IDataObject * pDataObj)
+{
+  MOZCE_PRECHECK
+    
+	oleSetup();
+  
+  if (gDataObject)
+    gDataObject->Release();
+  
+  gDataObject = pDataObj;
+  
+  if (pDataObj) 
+  {
+    BOOL b = OpenClipboard(gClipboardWND);
+    
+    if (!b)
+      return E_FAIL;
+    
+    EmptyClipboard();
+    
+    pDataObj->AddRef();
+    
+    IEnumFORMATETC* enumerator = NULL;
+    pDataObj->EnumFormatEtc(DATADIR_GET, &enumerator);
+    if (!enumerator)
+      return S_OK;
+    
+    FORMATETC etc;
+    
+    while (S_OK == enumerator->Next(1, &etc, NULL))
+    {
+      if ( etc.tymed == TYMED_HGLOBAL )
+      {
+
+		STGMEDIUM medium;
+		pDataObj->GetData(&etc, &medium);
+        SetClipboardData( etc.cfFormat, medium.hGlobal);
+      }
+    }
+    
+    enumerator->Release();
+    
+    CloseClipboard();
+    
+  }
+  return S_OK;
+}
+
+// dougt??  do we need this clipboard function
+MOZCE_SHUNT_API HRESULT OleGetClipboard(IDataObject ** pDataObj)
+{
+  MOZCE_PRECHECK
+    oleSetup();
+  
+  if (pDataObj)
+    *pDataObj = gDataObject;
+  
+  if (!*pDataObj)
+  {
+    *pDataObj = new ClipDataObj();
+    if (!*pDataObj)
+      return E_FAIL;
+
+    gDataObject = *pDataObj;
+  }
+  
+  (*pDataObj)->AddRef();
+  return S_OK;
+}
+
+MOZCE_SHUNT_API HRESULT OleFlushClipboard()
+{
+  MOZCE_PRECHECK
+    oleSetup();
+  
+  OleSetClipboard(NULL);
+  return S_OK;
+}
+
+
+MOZCE_SHUNT_API BOOL IsClipboardFormatAvailable(UINT format)
+{
+  if (gClipboardWND)
+  {
+    BOOL b = OpenClipboard(gClipboardWND);
+    if (!b)
+      return E_FAIL;
+    
+    IEnumFORMATETC* enumerator = NULL;
+    gDataObject->EnumFormatEtc(DATADIR_GET, &enumerator);
+    if (!enumerator)
+      return S_OK;
+    
+    FORMATETC etc;
+    
+    while (S_OK == enumerator->Next(1, &etc, NULL))
+    {
+      if ( etc.cfFormat == format)
+      {
+        enumerator->Release();
+        CloseClipboard();
+        return true;
+      }
+    }
+    enumerator->Release();
+    CloseClipboard();
+  }
+  
+  return IsClipboardFormatAvailable(format);
+}
+
+#if 0
+{
+#endif
+} /* extern "C" */
--- a/build/wince/shunt/direct.cpp
+++ b/build/wince/shunt/direct.cpp
@@ -42,22 +42,22 @@
 
 
 extern "C" {
 #if 0
 }
 #endif
 
 
-MOZCE_SHUNT_API int mozce_mkdir(const char* inDirname)
+MOZCE_SHUNT_API int mkdir(const char* inDirname)
 {
     MOZCE_PRECHECK
 
 #ifdef DEBUG
-    mozce_printf("mozce_mkdir called\n");
+    mozce_printf("mkdir called\n");
 #endif
     
     int retval = -1;
     
     if(NULL != inDirname)
     {
         unsigned short wDirname[MAX_PATH];
         
@@ -69,22 +69,22 @@ MOZCE_SHUNT_API int mozce_mkdir(const ch
             }
         }
     }
     
     return retval;
 }
 
 
-MOZCE_SHUNT_API int mozce_rmdir(const char* inDirname)
+MOZCE_SHUNT_API int rmdir(const char* inDirname)
 {
     MOZCE_PRECHECK
 
 #ifdef DEBUG
-    mozce_printf("mozce_rmdir called (%s)\n", inDirname);
+    mozce_printf("rmdir called (%s)\n", inDirname);
 #endif
     
     int retval = -1;
     
     if(NULL != inDirname)
     {
         unsigned short wDirname[MAX_PATH];
         
--- a/build/wince/shunt/errno.cpp
+++ b/build/wince/shunt/errno.cpp
@@ -40,15 +40,15 @@
 
 #include "mozce_internal.h"
 
 extern "C" {
 #if 0
 }
 #endif
 
-MOZCE_SHUNT_API int mozce_errno = 0;
+MOZCE_SHUNT_API int errno = 0;
 
 #if 0
 {
 #endif
 } /* extern "C" */
 
deleted file mode 100755
--- a/build/wince/shunt/include/assert.h
+++ /dev